@ainyc/canonry 1.5.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,205 +0,0 @@
1
- function lx(a,i){for(var s=0;s<i.length;s++){const r=i[s];if(typeof r!="string"&&!Array.isArray(r)){for(const c in r)if(c!=="default"&&!(c in a)){const d=Object.getOwnPropertyDescriptor(r,c);d&&Object.defineProperty(a,c,d.get?d:{enumerable:!0,get:()=>r[c]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))r(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function s(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(c){if(c.ep)return;c.ep=!0;const d=s(c);fetch(c.href,d)}})();function Rg(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var _u={exports:{}},Vs={};var Bp;function rx(){if(Bp)return Vs;Bp=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(r,c,d){var h=null;if(d!==void 0&&(h=""+d),c.key!==void 0&&(h=""+c.key),"key"in c){d={};for(var m in c)m!=="key"&&(d[m]=c[m])}else d=c;return c=d.ref,{$$typeof:a,type:r,key:h,ref:c!==void 0?c:null,props:d}}return Vs.Fragment=i,Vs.jsx=s,Vs.jsxs=s,Vs}var Hp;function cx(){return Hp||(Hp=1,_u.exports=rx()),_u.exports}var u=cx(),Du={exports:{}},ve={};var qp;function ox(){if(qp)return ve;qp=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),S=Symbol.iterator;function E(A){return A===null||typeof A!="object"?null:(A=S&&A[S]||A["@@iterator"],typeof A=="function"?A:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,N={};function z(A,G,ee){this.props=A,this.context=G,this.refs=N,this.updater=ee||T}z.prototype.isReactComponent={},z.prototype.setState=function(A,G){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,G,"setState")},z.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function Y(){}Y.prototype=z.prototype;function M(A,G,ee){this.props=A,this.context=G,this.refs=N,this.updater=ee||T}var H=M.prototype=new Y;H.constructor=M,w(H,z.prototype),H.isPureReactComponent=!0;var q=Array.isArray;function X(){}var Z={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function P(A,G,ee){var D=ee.ref;return{$$typeof:a,type:A,key:G,ref:D!==void 0?D:null,props:ee}}function Se(A,G){return P(A.type,G,A.props)}function W(A){return typeof A=="object"&&A!==null&&A.$$typeof===a}function se(A){var G={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(ee){return G[ee]})}var ue=/\/+/g;function ge(A,G){return typeof A=="object"&&A!==null&&A.key!=null?se(""+A.key):G.toString(36)}function te(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(X,X):(A.status="pending",A.then(function(G){A.status==="pending"&&(A.status="fulfilled",A.value=G)},function(G){A.status==="pending"&&(A.status="rejected",A.reason=G)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function L(A,G,ee,D,F){var ie=typeof A;(ie==="undefined"||ie==="boolean")&&(A=null);var pe=!1;if(A===null)pe=!0;else switch(ie){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(A.$$typeof){case a:case i:pe=!0;break;case x:return pe=A._init,L(pe(A._payload),G,ee,D,F)}}if(pe)return F=F(A),pe=D===""?"."+ge(A,0):D,q(F)?(ee="",pe!=null&&(ee=pe.replace(ue,"$&/")+"/"),L(F,G,ee,"",function(Pt){return Pt})):F!=null&&(W(F)&&(F=Se(F,ee+(F.key==null||A&&A.key===F.key?"":(""+F.key).replace(ue,"$&/")+"/")+pe)),G.push(F)),1;pe=0;var $e=D===""?".":D+":";if(q(A))for(var ye=0;ye<A.length;ye++)D=A[ye],ie=$e+ge(D,ye),pe+=L(D,G,ee,ie,F);else if(ye=E(A),typeof ye=="function")for(A=ye.call(A),ye=0;!(D=A.next()).done;)D=D.value,ie=$e+ge(D,ye++),pe+=L(D,G,ee,ie,F);else if(ie==="object"){if(typeof A.then=="function")return L(te(A),G,ee,D,F);throw G=String(A),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return pe}function J(A,G,ee){if(A==null)return A;var D=[],F=0;return L(A,D,"","",function(ie){return G.call(ee,ie,F++)}),D}function ne(A){if(A._status===-1){var G=A._result;G=G(),G.then(function(ee){(A._status===0||A._status===-1)&&(A._status=1,A._result=ee)},function(ee){(A._status===0||A._status===-1)&&(A._status=2,A._result=ee)}),A._status===-1&&(A._status=0,A._result=G)}if(A._status===1)return A._result.default;throw A._result}var fe=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},I={map:J,forEach:function(A,G,ee){J(A,function(){G.apply(this,arguments)},ee)},count:function(A){var G=0;return J(A,function(){G++}),G},toArray:function(A){return J(A,function(G){return G})||[]},only:function(A){if(!W(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return ve.Activity=b,ve.Children=I,ve.Component=z,ve.Fragment=s,ve.Profiler=c,ve.PureComponent=M,ve.StrictMode=r,ve.Suspense=y,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,ve.__COMPILER_RUNTIME={__proto__:null,c:function(A){return Z.H.useMemoCache(A)}},ve.cache=function(A){return function(){return A.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(A,G,ee){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var D=w({},A.props),F=A.key;if(G!=null)for(ie in G.key!==void 0&&(F=""+G.key),G)!_.call(G,ie)||ie==="key"||ie==="__self"||ie==="__source"||ie==="ref"&&G.ref===void 0||(D[ie]=G[ie]);var ie=arguments.length-2;if(ie===1)D.children=ee;else if(1<ie){for(var pe=Array(ie),$e=0;$e<ie;$e++)pe[$e]=arguments[$e+2];D.children=pe}return P(A.type,F,D)},ve.createContext=function(A){return A={$$typeof:h,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:d,_context:A},A},ve.createElement=function(A,G,ee){var D,F={},ie=null;if(G!=null)for(D in G.key!==void 0&&(ie=""+G.key),G)_.call(G,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(F[D]=G[D]);var pe=arguments.length-2;if(pe===1)F.children=ee;else if(1<pe){for(var $e=Array(pe),ye=0;ye<pe;ye++)$e[ye]=arguments[ye+2];F.children=$e}if(A&&A.defaultProps)for(D in pe=A.defaultProps,pe)F[D]===void 0&&(F[D]=pe[D]);return P(A,ie,F)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(A){return{$$typeof:m,render:A}},ve.isValidElement=W,ve.lazy=function(A){return{$$typeof:x,_payload:{_status:-1,_result:A},_init:ne}},ve.memo=function(A,G){return{$$typeof:g,type:A,compare:G===void 0?null:G}},ve.startTransition=function(A){var G=Z.T,ee={};Z.T=ee;try{var D=A(),F=Z.S;F!==null&&F(ee,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(X,fe)}catch(ie){fe(ie)}finally{G!==null&&ee.types!==null&&(G.types=ee.types),Z.T=G}},ve.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},ve.use=function(A){return Z.H.use(A)},ve.useActionState=function(A,G,ee){return Z.H.useActionState(A,G,ee)},ve.useCallback=function(A,G){return Z.H.useCallback(A,G)},ve.useContext=function(A){return Z.H.useContext(A)},ve.useDebugValue=function(){},ve.useDeferredValue=function(A,G){return Z.H.useDeferredValue(A,G)},ve.useEffect=function(A,G){return Z.H.useEffect(A,G)},ve.useEffectEvent=function(A){return Z.H.useEffectEvent(A)},ve.useId=function(){return Z.H.useId()},ve.useImperativeHandle=function(A,G,ee){return Z.H.useImperativeHandle(A,G,ee)},ve.useInsertionEffect=function(A,G){return Z.H.useInsertionEffect(A,G)},ve.useLayoutEffect=function(A,G){return Z.H.useLayoutEffect(A,G)},ve.useMemo=function(A,G){return Z.H.useMemo(A,G)},ve.useOptimistic=function(A,G){return Z.H.useOptimistic(A,G)},ve.useReducer=function(A,G,ee){return Z.H.useReducer(A,G,ee)},ve.useRef=function(A){return Z.H.useRef(A)},ve.useState=function(A){return Z.H.useState(A)},ve.useSyncExternalStore=function(A,G,ee){return Z.H.useSyncExternalStore(A,G,ee)},ve.useTransition=function(){return Z.H.useTransition()},ve.version="19.2.4",ve}var $p;function od(){return $p||($p=1,Du.exports=ox()),Du.exports}var j=od();const ux=Rg(j),ud=lx({__proto__:null,default:ux},[j]);var Mu={exports:{}},Qs={},Ru={exports:{}},Lu={};var Yp;function dx(){return Yp||(Yp=1,(function(a){function i(L,J){var ne=L.length;L.push(J);e:for(;0<ne;){var fe=ne-1>>>1,I=L[fe];if(0<c(I,J))L[fe]=J,L[ne]=I,ne=fe;else break e}}function s(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var J=L[0],ne=L.pop();if(ne!==J){L[0]=ne;e:for(var fe=0,I=L.length,A=I>>>1;fe<A;){var G=2*(fe+1)-1,ee=L[G],D=G+1,F=L[D];if(0>c(ee,ne))D<I&&0>c(F,ee)?(L[fe]=F,L[D]=ne,fe=D):(L[fe]=ee,L[G]=ne,fe=G);else if(D<I&&0>c(F,ne))L[fe]=F,L[D]=ne,fe=D;else break e}}return J}function c(L,J){var ne=L.sortIndex-J.sortIndex;return ne!==0?ne:L.id-J.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;a.unstable_now=function(){return d.now()}}else{var h=Date,m=h.now();a.unstable_now=function(){return h.now()-m}}var y=[],g=[],x=1,b=null,S=3,E=!1,T=!1,w=!1,N=!1,z=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function H(L){for(var J=s(g);J!==null;){if(J.callback===null)r(g);else if(J.startTime<=L)r(g),J.sortIndex=J.expirationTime,i(y,J);else break;J=s(g)}}function q(L){if(w=!1,H(L),!T)if(s(y)!==null)T=!0,X||(X=!0,se());else{var J=s(g);J!==null&&te(q,J.startTime-L)}}var X=!1,Z=-1,_=5,P=-1;function Se(){return N?!0:!(a.unstable_now()-P<_)}function W(){if(N=!1,X){var L=a.unstable_now();P=L;var J=!0;try{e:{T=!1,w&&(w=!1,Y(Z),Z=-1),E=!0;var ne=S;try{t:{for(H(L),b=s(y);b!==null&&!(b.expirationTime>L&&Se());){var fe=b.callback;if(typeof fe=="function"){b.callback=null,S=b.priorityLevel;var I=fe(b.expirationTime<=L);if(L=a.unstable_now(),typeof I=="function"){b.callback=I,H(L),J=!0;break t}b===s(y)&&r(y),H(L)}else r(y);b=s(y)}if(b!==null)J=!0;else{var A=s(g);A!==null&&te(q,A.startTime-L),J=!1}}break e}finally{b=null,S=ne,E=!1}J=void 0}}finally{J?se():X=!1}}}var se;if(typeof M=="function")se=function(){M(W)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,ge=ue.port2;ue.port1.onmessage=W,se=function(){ge.postMessage(null)}}else se=function(){z(W,0)};function te(L,J){Z=z(function(){L(a.unstable_now())},J)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(L){L.callback=null},a.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<L?Math.floor(1e3/L):5},a.unstable_getCurrentPriorityLevel=function(){return S},a.unstable_next=function(L){switch(S){case 1:case 2:case 3:var J=3;break;default:J=S}var ne=S;S=J;try{return L()}finally{S=ne}},a.unstable_requestPaint=function(){N=!0},a.unstable_runWithPriority=function(L,J){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var ne=S;S=L;try{return J()}finally{S=ne}},a.unstable_scheduleCallback=function(L,J,ne){var fe=a.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?fe+ne:fe):ne=fe,L){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=ne+I,L={id:x++,callback:J,priorityLevel:L,startTime:ne,expirationTime:I,sortIndex:-1},ne>fe?(L.sortIndex=ne,i(g,L),s(y)===null&&L===s(g)&&(w?(Y(Z),Z=-1):w=!0,te(q,ne-fe))):(L.sortIndex=I,i(y,L),T||E||(T=!0,X||(X=!0,se()))),L},a.unstable_shouldYield=Se,a.unstable_wrapCallback=function(L){var J=S;return function(){var ne=S;S=J;try{return L.apply(this,arguments)}finally{S=ne}}}})(Lu)),Lu}var Kp;function fx(){return Kp||(Kp=1,Ru.exports=dx()),Ru.exports}var Uu={exports:{}},ft={};var Gp;function hx(){if(Gp)return ft;Gp=1;var a=od();function i(y){var g="https://react.dev/errors/"+y;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+y+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var r={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},c=Symbol.for("react.portal");function d(y,g,x){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:b==null?null:""+b,children:y,containerInfo:g,implementation:x}}var h=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(y,g){if(y==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return ft.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ft.createPortal=function(y,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(i(299));return d(y,g,null,x)},ft.flushSync=function(y){var g=h.T,x=r.p;try{if(h.T=null,r.p=2,y)return y()}finally{h.T=g,r.p=x,r.d.f()}},ft.preconnect=function(y,g){typeof y=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(y,g))},ft.prefetchDNS=function(y){typeof y=="string"&&r.d.D(y)},ft.preinit=function(y,g){if(typeof y=="string"&&g&&typeof g.as=="string"){var x=g.as,b=m(x,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,E=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?r.d.S(y,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:b,integrity:S,fetchPriority:E}):x==="script"&&r.d.X(y,{crossOrigin:b,integrity:S,fetchPriority:E,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},ft.preinitModule=function(y,g){if(typeof y=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=m(g.as,g.crossOrigin);r.d.M(y,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(y)},ft.preload=function(y,g){if(typeof y=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,b=m(x,g.crossOrigin);r.d.L(y,x,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},ft.preloadModule=function(y,g){if(typeof y=="string")if(g){var x=m(g.as,g.crossOrigin);r.d.m(y,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(y)},ft.requestFormReset=function(y){r.d.r(y)},ft.unstable_batchedUpdates=function(y,g){return y(g)},ft.useFormState=function(y,g,x){return h.H.useFormState(y,g,x)},ft.useFormStatus=function(){return h.H.useHostTransitionStatus()},ft.version="19.2.4",ft}var Vp;function Lg(){if(Vp)return Uu.exports;Vp=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),Uu.exports=hx(),Uu.exports}var Qp;function mx(){if(Qp)return Qs;Qp=1;var a=fx(),i=od(),s=Lg();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(d(e)!==e)throw Error(r(188))}function g(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,l=t;;){var o=n.return;if(o===null)break;var f=o.alternate;if(f===null){if(l=o.return,l!==null){n=l;continue}break}if(o.child===f.child){for(f=o.child;f;){if(f===n)return y(o),e;if(f===l)return y(o),t;f=f.sibling}throw Error(r(188))}if(n.return!==l.return)n=o,l=f;else{for(var p=!1,v=o.child;v;){if(v===n){p=!0,n=o,l=f;break}if(v===l){p=!0,l=o,n=f;break}v=v.sibling}if(!p){for(v=f.child;v;){if(v===n){p=!0,n=f,l=o;break}if(v===l){p=!0,l=f,n=o;break}v=v.sibling}if(!p)throw Error(r(189))}}if(n.alternate!==l)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,S=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),M=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),Se=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var ue=Symbol.for("react.client.reference");function ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case z:return"Profiler";case N:return"StrictMode";case q:return"Suspense";case X:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case M:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:ge(e.type)||"Memo";case _:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var te=Array.isArray,L=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},fe=[],I=-1;function A(e){return{current:e}}function G(e){0>I||(e.current=fe[I],fe[I]=null,I--)}function ee(e,t){I++,fe[I]=e.current,e.current=t}var D=A(null),F=A(null),ie=A(null),pe=A(null);function $e(e,t){switch(ee(ie,t),ee(F,e),ee(D,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?rp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=rp(t),e=cp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(D),ee(D,e)}function ye(){G(D),G(F),G(ie)}function Pt(e){e.memoizedState!==null&&ee(pe,e);var t=D.current,n=cp(t,e.type);t!==n&&(ee(F,e),ee(D,n))}function Rt(e){F.current===e&&(G(D),G(F)),pe.current===e&&(G(pe),$s._currentValue=ne)}var Wt,gn;function yt(e){if(Wt===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Wt=t&&t[1]||"",gn=-1<n.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Wt+e+gn}var Qa=!1;function Xa(e,t){if(!e||Qa)return"";Qa=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch($){var B=$}Reflect.construct(e,[],Q)}else{try{Q.call()}catch($){B=$}e.call(Q.prototype)}}else{try{throw Error()}catch($){B=$}(Q=e())&&typeof Q.catch=="function"&&Q.catch(function(){})}}catch($){if($&&B&&typeof $.stack=="string")return[$.stack,B.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),p=f[0],v=f[1];if(p&&v){var C=p.split(`
4
- `),U=v.split(`
5
- `);for(o=l=0;l<C.length&&!C[l].includes("DetermineComponentFrameRoot");)l++;for(;o<U.length&&!U[o].includes("DetermineComponentFrameRoot");)o++;if(l===C.length||o===U.length)for(l=C.length-1,o=U.length-1;1<=l&&0<=o&&C[l]!==U[o];)o--;for(;1<=l&&0<=o;l--,o--)if(C[l]!==U[o]){if(l!==1||o!==1)do if(l--,o--,0>o||C[l]!==U[o]){var K=`
6
- `+C[l].replace(" at new "," at ");return e.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",e.displayName)),K}while(1<=l&&0<=o);break}}}finally{Qa=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?yt(n):""}function cl(e,t){switch(e.tag){case 26:case 27:case 5:return yt(e.type);case 16:return yt("Lazy");case 13:return e.child!==t&&t!==null?yt("Suspense Fallback"):yt("Suspense");case 19:return yt("SuspenseList");case 0:case 15:return Xa(e.type,!1);case 11:return Xa(e.type.render,!1);case 1:return Xa(e.type,!0);case 31:return yt("Activity");default:return""}}function Pi(e){try{var t="",n=null;do t+=cl(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
7
- Error generating stack: `+l.message+`
8
- `+l.stack}}var en=Object.prototype.hasOwnProperty,Lt=a.unstable_scheduleCallback,yn=a.unstable_cancelCallback,pc=a.unstable_shouldYield,gc=a.unstable_requestPaint,ht=a.unstable_now,yc=a.unstable_getCurrentPriorityLevel,ol=a.unstable_ImmediatePriority,ul=a.unstable_UserBlockingPriority,Ut=a.unstable_NormalPriority,vc=a.unstable_LowPriority,ae=a.unstable_IdlePriority,vn=a.log,Kv=a.unstable_setDisableYieldValue,Wi=null,Ct=null;function $n(e){if(typeof vn=="function"&&Kv(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(Wi,e)}catch{}}var Et=Math.clz32?Math.clz32:Qv,Gv=Math.log,Vv=Math.LN2;function Qv(e){return e>>>=0,e===0?32:31-(Gv(e)/Vv|0)|0}var dl=256,fl=262144,hl=4194304;function ba(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ml(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var o=0,f=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var v=l&134217727;return v!==0?(l=v&~f,l!==0?o=ba(l):(p&=v,p!==0?o=ba(p):n||(n=v&~e,n!==0&&(o=ba(n))))):(v=l&~f,v!==0?o=ba(v):p!==0?o=ba(p):n||(n=l&~e,n!==0&&(o=ba(n)))),o===0?0:t!==0&&t!==o&&(t&f)===0&&(f=o&-o,n=t&-t,f>=n||f===32&&(n&4194048)!==0)?t:o}function es(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xv(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $d(){var e=hl;return hl<<=1,(hl&62914560)===0&&(hl=4194304),e}function bc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ts(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Zv(e,t,n,l,o,f){var p=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var v=e.entanglements,C=e.expirationTimes,U=e.hiddenUpdates;for(n=p&~n;0<n;){var K=31-Et(n),Q=1<<K;v[K]=0,C[K]=-1;var B=U[K];if(B!==null)for(U[K]=null,K=0;K<B.length;K++){var $=B[K];$!==null&&($.lane&=-536870913)}n&=~Q}l!==0&&Yd(e,l,0),f!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=f&~(p&~t))}function Yd(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Et(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Kd(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-Et(n),o=1<<l;o&t|e[l]&t&&(e[l]|=t),n&=~o}}function Gd(e,t){var n=t&-t;return n=(n&42)!==0?1:xc(n),(n&(e.suspendedLanes|t))!==0?0:n}function xc(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 Sc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vd(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:zp(e.type))}function Qd(e,t){var n=J.p;try{return J.p=e,t()}finally{J.p=n}}var Yn=Math.random().toString(36).slice(2),rt="__reactFiber$"+Yn,vt="__reactProps$"+Yn,Za="__reactContainer$"+Yn,wc="__reactEvents$"+Yn,Iv="__reactListeners$"+Yn,Jv="__reactHandles$"+Yn,Xd="__reactResources$"+Yn,ns="__reactMarker$"+Yn;function jc(e){delete e[rt],delete e[vt],delete e[wc],delete e[Iv],delete e[Jv]}function Ia(e){var t=e[rt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Za]||n[rt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pp(e);e!==null;){if(n=e[rt])return n;e=pp(e)}return t}e=n,n=e.parentNode}return null}function Ja(e){if(e=e[rt]||e[Za]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function as(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Fa(e){var t=e[Xd];return t||(t=e[Xd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function st(e){e[ns]=!0}var Zd=new Set,Id={};function xa(e,t){Pa(e,t),Pa(e+"Capture",t)}function Pa(e,t){for(Id[e]=t,e=0;e<t.length;e++)Zd.add(t[e])}var Fv=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]*$"),Jd={},Fd={};function Pv(e){return en.call(Fd,e)?!0:en.call(Jd,e)?!1:Fv.test(e)?Fd[e]=!0:(Jd[e]=!0,!1)}function pl(e,t,n){if(Pv(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function gl(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function bn(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function Bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Wv(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,f=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){n=""+p,f.call(this,p)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(p){n=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nc(e){if(!e._valueTracker){var t=Pd(e)?"checked":"value";e._valueTracker=Wv(e,t,""+e[t])}}function Wd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=Pd(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function yl(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 eb=/[\n"\\]/g;function Ht(e){return e.replace(eb,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Cc(e,t,n,l,o,f,p,v){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Bt(t)):e.value!==""+Bt(t)&&(e.value=""+Bt(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?Ec(e,p,Bt(t)):n!=null?Ec(e,p,Bt(n)):l!=null&&e.removeAttribute("value"),o==null&&f!=null&&(e.defaultChecked=!!f),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+Bt(v):e.removeAttribute("name")}function ef(e,t,n,l,o,f,p,v){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||n!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){Nc(e);return}n=n!=null?""+Bt(n):"",t=t!=null?""+Bt(t):n,v||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=v?e.checked:!!l,e.defaultChecked=!!l,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),Nc(e)}function Ec(e,t,n){t==="number"&&yl(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Wa(e,t,n,l){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&l&&(e[n].defaultSelected=!0)}else{for(n=""+Bt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function tf(e,t,n){if(t!=null&&(t=""+Bt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Bt(n):""}function nf(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(r(92));if(te(l)){if(1<l.length)throw Error(r(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=Bt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),Nc(e)}function ei(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tb=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 af(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||tb.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function sf(e,t,n){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&n[o]!==l&&af(e,o,l)}else for(var f in t)t.hasOwnProperty(f)&&af(e,f,t[f])}function Ac(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 nb=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"]]),ab=/^[\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 vl(e){return ab.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function xn(){}var kc=null;function Tc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ti=null,ni=null;function lf(e){var t=Ja(e);if(t&&(e=t.stateNode)){var n=e[vt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Cc(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Ht(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var o=l[vt]||null;if(!o)throw Error(r(90));Cc(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&Wd(l)}break e;case"textarea":tf(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Wa(e,!!n.multiple,t,!1)}}}var Oc=!1;function rf(e,t,n){if(Oc)return e(t,n);Oc=!0;try{var l=e(t);return l}finally{if(Oc=!1,(ti!==null||ni!==null)&&(sr(),ti&&(t=ti,e=ni,ni=ti=null,lf(t),e)))for(t=0;t<e.length;t++)lf(e[t])}}function is(e,t){var n=e.stateNode;if(n===null)return null;var l=n[vt]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(r(231,t,typeof n));return n}var Sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zc=!1;if(Sn)try{var ss={};Object.defineProperty(ss,"passive",{get:function(){zc=!0}}),window.addEventListener("test",ss,ss),window.removeEventListener("test",ss,ss)}catch{zc=!1}var Kn=null,_c=null,bl=null;function cf(){if(bl)return bl;var e,t=_c,n=t.length,l,o="value"in Kn?Kn.value:Kn.textContent,f=o.length;for(e=0;e<n&&t[e]===o[e];e++);var p=n-e;for(l=1;l<=p&&t[n-l]===o[f-l];l++);return bl=o.slice(e,1<l?1-l:void 0)}function xl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Sl(){return!0}function of(){return!1}function bt(e){function t(n,l,o,f,p){this._reactName=n,this._targetInst=o,this.type=l,this.nativeEvent=f,this.target=p,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(n=e[v],this[v]=n?n(f):f[v]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Sl:of,this.isPropagationStopped=of,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Sl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Sl)},persist:function(){},isPersistent:Sl}),t}var Sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wl=bt(Sa),ls=b({},Sa,{view:0,detail:0}),ib=bt(ls),Dc,Mc,rs,jl=b({},ls,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lc,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!==rs&&(rs&&e.type==="mousemove"?(Dc=e.screenX-rs.screenX,Mc=e.screenY-rs.screenY):Mc=Dc=0,rs=e),Dc)},movementY:function(e){return"movementY"in e?e.movementY:Mc}}),uf=bt(jl),sb=b({},jl,{dataTransfer:0}),lb=bt(sb),rb=b({},ls,{relatedTarget:0}),Rc=bt(rb),cb=b({},Sa,{animationName:0,elapsedTime:0,pseudoElement:0}),ob=bt(cb),ub=b({},Sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),db=bt(ub),fb=b({},Sa,{data:0}),df=bt(fb),hb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mb={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"},pb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pb[e])?!!t[e]:!1}function Lc(){return gb}var yb=b({},ls,{key:function(e){if(e.key){var t=hb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=xl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?mb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lc,charCode:function(e){return e.type==="keypress"?xl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?xl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),vb=bt(yb),bb=b({},jl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ff=bt(bb),xb=b({},ls,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lc}),Sb=bt(xb),wb=b({},Sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),jb=bt(wb),Nb=b({},jl,{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}),Cb=bt(Nb),Eb=b({},Sa,{newState:0,oldState:0}),Ab=bt(Eb),kb=[9,13,27,32],Uc=Sn&&"CompositionEvent"in window,cs=null;Sn&&"documentMode"in document&&(cs=document.documentMode);var Tb=Sn&&"TextEvent"in window&&!cs,hf=Sn&&(!Uc||cs&&8<cs&&11>=cs),mf=" ",pf=!1;function gf(e,t){switch(e){case"keyup":return kb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ai=!1;function Ob(e,t){switch(e){case"compositionend":return yf(t);case"keypress":return t.which!==32?null:(pf=!0,mf);case"textInput":return e=t.data,e===mf&&pf?null:e;default:return null}}function zb(e,t){if(ai)return e==="compositionend"||!Uc&&gf(e,t)?(e=cf(),bl=_c=Kn=null,ai=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return hf&&t.locale!=="ko"?null:t.data;default:return null}}var _b={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 vf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!_b[e.type]:t==="textarea"}function bf(e,t,n,l){ti?ni?ni.push(l):ni=[l]:ti=l,t=fr(t,"onChange"),0<t.length&&(n=new wl("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var os=null,us=null;function Db(e){tp(e,0)}function Nl(e){var t=as(e);if(Wd(t))return e}function xf(e,t){if(e==="change")return t}var Sf=!1;if(Sn){var Bc;if(Sn){var Hc="oninput"in document;if(!Hc){var wf=document.createElement("div");wf.setAttribute("oninput","return;"),Hc=typeof wf.oninput=="function"}Bc=Hc}else Bc=!1;Sf=Bc&&(!document.documentMode||9<document.documentMode)}function jf(){os&&(os.detachEvent("onpropertychange",Nf),us=os=null)}function Nf(e){if(e.propertyName==="value"&&Nl(us)){var t=[];bf(t,us,e,Tc(e)),rf(Db,t)}}function Mb(e,t,n){e==="focusin"?(jf(),os=t,us=n,os.attachEvent("onpropertychange",Nf)):e==="focusout"&&jf()}function Rb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Nl(us)}function Lb(e,t){if(e==="click")return Nl(t)}function Ub(e,t){if(e==="input"||e==="change")return Nl(t)}function Bb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var At=typeof Object.is=="function"?Object.is:Bb;function ds(e,t){if(At(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var o=n[l];if(!en.call(t,o)||!At(e[o],t[o]))return!1}return!0}function Cf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ef(e,t){var n=Cf(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Cf(n)}}function Af(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Af(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=yl(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=yl(e.document)}return t}function qc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Hb=Sn&&"documentMode"in document&&11>=document.documentMode,ii=null,$c=null,fs=null,Yc=!1;function Tf(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Yc||ii==null||ii!==yl(l)||(l=ii,"selectionStart"in l&&qc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),fs&&ds(fs,l)||(fs=l,l=fr($c,"onSelect"),0<l.length&&(t=new wl("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=ii)))}function wa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var si={animationend:wa("Animation","AnimationEnd"),animationiteration:wa("Animation","AnimationIteration"),animationstart:wa("Animation","AnimationStart"),transitionrun:wa("Transition","TransitionRun"),transitionstart:wa("Transition","TransitionStart"),transitioncancel:wa("Transition","TransitionCancel"),transitionend:wa("Transition","TransitionEnd")},Kc={},Of={};Sn&&(Of=document.createElement("div").style,"AnimationEvent"in window||(delete si.animationend.animation,delete si.animationiteration.animation,delete si.animationstart.animation),"TransitionEvent"in window||delete si.transitionend.transition);function ja(e){if(Kc[e])return Kc[e];if(!si[e])return e;var t=si[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Of)return Kc[e]=t[n];return e}var zf=ja("animationend"),_f=ja("animationiteration"),Df=ja("animationstart"),qb=ja("transitionrun"),$b=ja("transitionstart"),Yb=ja("transitioncancel"),Mf=ja("transitionend"),Rf=new Map,Gc="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(" ");Gc.push("scrollEnd");function tn(e,t){Rf.set(e,t),xa(t,[e])}var Cl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},qt=[],li=0,Vc=0;function El(){for(var e=li,t=Vc=li=0;t<e;){var n=qt[t];qt[t++]=null;var l=qt[t];qt[t++]=null;var o=qt[t];qt[t++]=null;var f=qt[t];if(qt[t++]=null,l!==null&&o!==null){var p=l.pending;p===null?o.next=o:(o.next=p.next,p.next=o),l.pending=o}f!==0&&Lf(n,o,f)}}function Al(e,t,n,l){qt[li++]=e,qt[li++]=t,qt[li++]=n,qt[li++]=l,Vc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Qc(e,t,n,l){return Al(e,t,n,l),kl(e)}function Na(e,t){return Al(e,null,null,t),kl(e)}function Lf(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var o=!1,f=e.return;f!==null;)f.childLanes|=n,l=f.alternate,l!==null&&(l.childLanes|=n),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(o=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,o&&t!==null&&(o=31-Et(n),e=f.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=n|536870912),f):null}function kl(e){if(50<Ms)throw Ms=0,nu=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ri={};function Kb(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kt(e,t,n,l){return new Kb(e,t,n,l)}function Xc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wn(e,t){var n=e.alternate;return n===null?(n=kt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Uf(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Tl(e,t,n,l,o,f){var p=0;if(l=e,typeof e=="function")Xc(e)&&(p=1);else if(typeof e=="string")p=Z0(e,n,D.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=kt(31,n,t,o),e.elementType=P,e.lanes=f,e;case w:return Ca(n.children,o,f,t);case N:p=8,o|=24;break;case z:return e=kt(12,n,t,o|2),e.elementType=z,e.lanes=f,e;case q:return e=kt(13,n,t,o),e.elementType=q,e.lanes=f,e;case X:return e=kt(19,n,t,o),e.elementType=X,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:p=10;break e;case Y:p=9;break e;case H:p=11;break e;case Z:p=14;break e;case _:p=16,l=null;break e}p=29,n=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=kt(p,n,t,o),t.elementType=e,t.type=l,t.lanes=f,t}function Ca(e,t,n,l){return e=kt(7,e,l,t),e.lanes=n,e}function Zc(e,t,n){return e=kt(6,e,null,t),e.lanes=n,e}function Bf(e){var t=kt(18,null,null,0);return t.stateNode=e,t}function Ic(e,t,n){return t=kt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Hf=new WeakMap;function $t(e,t){if(typeof e=="object"&&e!==null){var n=Hf.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Pi(t)},Hf.set(e,t),t)}return{value:e,source:t,stack:Pi(t)}}var ci=[],oi=0,Ol=null,hs=0,Yt=[],Kt=0,Gn=null,un=1,dn="";function jn(e,t){ci[oi++]=hs,ci[oi++]=Ol,Ol=e,hs=t}function qf(e,t,n){Yt[Kt++]=un,Yt[Kt++]=dn,Yt[Kt++]=Gn,Gn=e;var l=un;e=dn;var o=32-Et(l)-1;l&=~(1<<o),n+=1;var f=32-Et(t)+o;if(30<f){var p=o-o%5;f=(l&(1<<p)-1).toString(32),l>>=p,o-=p,un=1<<32-Et(t)+o|n<<o|l,dn=f+e}else un=1<<f|n<<o|l,dn=e}function Jc(e){e.return!==null&&(jn(e,1),qf(e,1,0))}function Fc(e){for(;e===Ol;)Ol=ci[--oi],ci[oi]=null,hs=ci[--oi],ci[oi]=null;for(;e===Gn;)Gn=Yt[--Kt],Yt[Kt]=null,dn=Yt[--Kt],Yt[Kt]=null,un=Yt[--Kt],Yt[Kt]=null}function $f(e,t){Yt[Kt++]=un,Yt[Kt++]=dn,Yt[Kt++]=Gn,un=t.id,dn=t.overflow,Gn=e}var ct=null,He=null,ke=!1,Vn=null,Gt=!1,Pc=Error(r(519));function Qn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ms($t(t,e)),Pc}function Yf(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[rt]=e,t[vt]=l,n){case"dialog":Ce("cancel",t),Ce("close",t);break;case"iframe":case"object":case"embed":Ce("load",t);break;case"video":case"audio":for(n=0;n<Ls.length;n++)Ce(Ls[n],t);break;case"source":Ce("error",t);break;case"img":case"image":case"link":Ce("error",t),Ce("load",t);break;case"details":Ce("toggle",t);break;case"input":Ce("invalid",t),ef(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ce("invalid",t);break;case"textarea":Ce("invalid",t),nf(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||sp(t.textContent,n)?(l.popover!=null&&(Ce("beforetoggle",t),Ce("toggle",t)),l.onScroll!=null&&Ce("scroll",t),l.onScrollEnd!=null&&Ce("scrollend",t),l.onClick!=null&&(t.onclick=xn),t=!0):t=!1,t||Qn(e,!0)}function Kf(e){for(ct=e.return;ct;)switch(ct.tag){case 5:case 31:case 13:Gt=!1;return;case 27:case 3:Gt=!0;return;default:ct=ct.return}}function ui(e){if(e!==ct)return!1;if(!ke)return Kf(e),ke=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||yu(e.type,e.memoizedProps)),n=!n),n&&He&&Qn(e),Kf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));He=mp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));He=mp(e)}else t===27?(t=He,la(e.type)?(e=wu,wu=null,He=e):He=t):He=ct?Qt(e.stateNode.nextSibling):null;return!0}function Ea(){He=ct=null,ke=!1}function Wc(){var e=Vn;return e!==null&&(jt===null?jt=e:jt.push.apply(jt,e),Vn=null),e}function ms(e){Vn===null?Vn=[e]:Vn.push(e)}var eo=A(null),Aa=null,Nn=null;function Xn(e,t,n){ee(eo,t._currentValue),t._currentValue=n}function Cn(e){e._currentValue=eo.current,G(eo)}function to(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function no(e,t,n,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var f=o.dependencies;if(f!==null){var p=o.child;f=f.firstContext;e:for(;f!==null;){var v=f;f=o;for(var C=0;C<t.length;C++)if(v.context===t[C]){f.lanes|=n,v=f.alternate,v!==null&&(v.lanes|=n),to(f.return,n,e),l||(p=null);break e}f=v.next}}else if(o.tag===18){if(p=o.return,p===null)throw Error(r(341));p.lanes|=n,f=p.alternate,f!==null&&(f.lanes|=n),to(p,n,e),p=null}else p=o.child;if(p!==null)p.return=o;else for(p=o;p!==null;){if(p===e){p=null;break}if(o=p.sibling,o!==null){o.return=p.return,p=o;break}p=p.return}o=p}}function di(e,t,n,l){e=null;for(var o=t,f=!1;o!==null;){if(!f){if((o.flags&524288)!==0)f=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var p=o.alternate;if(p===null)throw Error(r(387));if(p=p.memoizedProps,p!==null){var v=o.type;At(o.pendingProps.value,p.value)||(e!==null?e.push(v):e=[v])}}else if(o===pe.current){if(p=o.alternate,p===null)throw Error(r(387));p.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push($s):e=[$s])}o=o.return}e!==null&&no(t,e,n,l),t.flags|=262144}function zl(e){for(e=e.firstContext;e!==null;){if(!At(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ka(e){Aa=e,Nn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ot(e){return Gf(Aa,e)}function _l(e,t){return Aa===null&&ka(e),Gf(e,t)}function Gf(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Nn===null){if(e===null)throw Error(r(308));Nn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Nn=Nn.next=t;return n}var Gb=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Vb=a.unstable_scheduleCallback,Qb=a.unstable_NormalPriority,Pe={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ao(){return{controller:new Gb,data:new Map,refCount:0}}function ps(e){e.refCount--,e.refCount===0&&Vb(Qb,function(){e.controller.abort()})}var gs=null,io=0,fi=0,hi=null;function Xb(e,t){if(gs===null){var n=gs=[];io=0,fi=cu(),hi={status:"pending",value:void 0,then:function(l){n.push(l)}}}return io++,t.then(Vf,Vf),t}function Vf(){if(--io===0&&gs!==null){hi!==null&&(hi.status="fulfilled");var e=gs;gs=null,fi=0,hi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Zb(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<n.length;o++)(0,n[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),l}var Qf=L.S;L.S=function(e,t){Tm=ht(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Xb(e,t),Qf!==null&&Qf(e,t)};var Ta=A(null);function so(){var e=Ta.current;return e!==null?e:Ue.pooledCache}function Dl(e,t){t===null?ee(Ta,Ta.current):ee(Ta,t.pool)}function Xf(){var e=so();return e===null?null:{parent:Pe._currentValue,pool:e}}var mi=Error(r(460)),lo=Error(r(474)),Ml=Error(r(542)),Rl={then:function(){}};function Zf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function If(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(xn,xn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ff(e),e;default:if(typeof t.status=="string")t.then(xn,xn);else{if(e=Ue,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ff(e),e}throw za=t,mi}}function Oa(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(za=n,mi):n}}var za=null;function Jf(){if(za===null)throw Error(r(459));var e=za;return za=null,e}function Ff(e){if(e===mi||e===Ml)throw Error(r(483))}var pi=null,ys=0;function Ll(e){var t=ys;return ys+=1,pi===null&&(pi=[]),If(pi,e,t)}function vs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ul(e,t){throw t.$$typeof===S?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Pf(e){function t(O,k){if(e){var R=O.deletions;R===null?(O.deletions=[k],O.flags|=16):R.push(k)}}function n(O,k){if(!e)return null;for(;k!==null;)t(O,k),k=k.sibling;return null}function l(O){for(var k=new Map;O!==null;)O.key!==null?k.set(O.key,O):k.set(O.index,O),O=O.sibling;return k}function o(O,k){return O=wn(O,k),O.index=0,O.sibling=null,O}function f(O,k,R){return O.index=R,e?(R=O.alternate,R!==null?(R=R.index,R<k?(O.flags|=67108866,k):R):(O.flags|=67108866,k)):(O.flags|=1048576,k)}function p(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function v(O,k,R,V){return k===null||k.tag!==6?(k=Zc(R,O.mode,V),k.return=O,k):(k=o(k,R),k.return=O,k)}function C(O,k,R,V){var de=R.type;return de===w?K(O,k,R.props.children,V,R.key):k!==null&&(k.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===_&&Oa(de)===k.type)?(k=o(k,R.props),vs(k,R),k.return=O,k):(k=Tl(R.type,R.key,R.props,null,O.mode,V),vs(k,R),k.return=O,k)}function U(O,k,R,V){return k===null||k.tag!==4||k.stateNode.containerInfo!==R.containerInfo||k.stateNode.implementation!==R.implementation?(k=Ic(R,O.mode,V),k.return=O,k):(k=o(k,R.children||[]),k.return=O,k)}function K(O,k,R,V,de){return k===null||k.tag!==7?(k=Ca(R,O.mode,V,de),k.return=O,k):(k=o(k,R),k.return=O,k)}function Q(O,k,R){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Zc(""+k,O.mode,R),k.return=O,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case E:return R=Tl(k.type,k.key,k.props,null,O.mode,R),vs(R,k),R.return=O,R;case T:return k=Ic(k,O.mode,R),k.return=O,k;case _:return k=Oa(k),Q(O,k,R)}if(te(k)||se(k))return k=Ca(k,O.mode,R,null),k.return=O,k;if(typeof k.then=="function")return Q(O,Ll(k),R);if(k.$$typeof===M)return Q(O,_l(O,k),R);Ul(O,k)}return null}function B(O,k,R,V){var de=k!==null?k.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return de!==null?null:v(O,k,""+R,V);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case E:return R.key===de?C(O,k,R,V):null;case T:return R.key===de?U(O,k,R,V):null;case _:return R=Oa(R),B(O,k,R,V)}if(te(R)||se(R))return de!==null?null:K(O,k,R,V,null);if(typeof R.then=="function")return B(O,k,Ll(R),V);if(R.$$typeof===M)return B(O,k,_l(O,R),V);Ul(O,R)}return null}function $(O,k,R,V,de){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return O=O.get(R)||null,v(k,O,""+V,de);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case E:return O=O.get(V.key===null?R:V.key)||null,C(k,O,V,de);case T:return O=O.get(V.key===null?R:V.key)||null,U(k,O,V,de);case _:return V=Oa(V),$(O,k,R,V,de)}if(te(V)||se(V))return O=O.get(R)||null,K(k,O,V,de,null);if(typeof V.then=="function")return $(O,k,R,Ll(V),de);if(V.$$typeof===M)return $(O,k,R,_l(k,V),de);Ul(k,V)}return null}function le(O,k,R,V){for(var de=null,Te=null,oe=k,we=k=0,Ae=null;oe!==null&&we<R.length;we++){oe.index>we?(Ae=oe,oe=null):Ae=oe.sibling;var Oe=B(O,oe,R[we],V);if(Oe===null){oe===null&&(oe=Ae);break}e&&oe&&Oe.alternate===null&&t(O,oe),k=f(Oe,k,we),Te===null?de=Oe:Te.sibling=Oe,Te=Oe,oe=Ae}if(we===R.length)return n(O,oe),ke&&jn(O,we),de;if(oe===null){for(;we<R.length;we++)oe=Q(O,R[we],V),oe!==null&&(k=f(oe,k,we),Te===null?de=oe:Te.sibling=oe,Te=oe);return ke&&jn(O,we),de}for(oe=l(oe);we<R.length;we++)Ae=$(oe,O,we,R[we],V),Ae!==null&&(e&&Ae.alternate!==null&&oe.delete(Ae.key===null?we:Ae.key),k=f(Ae,k,we),Te===null?de=Ae:Te.sibling=Ae,Te=Ae);return e&&oe.forEach(function(da){return t(O,da)}),ke&&jn(O,we),de}function he(O,k,R,V){if(R==null)throw Error(r(151));for(var de=null,Te=null,oe=k,we=k=0,Ae=null,Oe=R.next();oe!==null&&!Oe.done;we++,Oe=R.next()){oe.index>we?(Ae=oe,oe=null):Ae=oe.sibling;var da=B(O,oe,Oe.value,V);if(da===null){oe===null&&(oe=Ae);break}e&&oe&&da.alternate===null&&t(O,oe),k=f(da,k,we),Te===null?de=da:Te.sibling=da,Te=da,oe=Ae}if(Oe.done)return n(O,oe),ke&&jn(O,we),de;if(oe===null){for(;!Oe.done;we++,Oe=R.next())Oe=Q(O,Oe.value,V),Oe!==null&&(k=f(Oe,k,we),Te===null?de=Oe:Te.sibling=Oe,Te=Oe);return ke&&jn(O,we),de}for(oe=l(oe);!Oe.done;we++,Oe=R.next())Oe=$(oe,O,we,Oe.value,V),Oe!==null&&(e&&Oe.alternate!==null&&oe.delete(Oe.key===null?we:Oe.key),k=f(Oe,k,we),Te===null?de=Oe:Te.sibling=Oe,Te=Oe);return e&&oe.forEach(function(sx){return t(O,sx)}),ke&&jn(O,we),de}function Le(O,k,R,V){if(typeof R=="object"&&R!==null&&R.type===w&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case E:e:{for(var de=R.key;k!==null;){if(k.key===de){if(de=R.type,de===w){if(k.tag===7){n(O,k.sibling),V=o(k,R.props.children),V.return=O,O=V;break e}}else if(k.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===_&&Oa(de)===k.type){n(O,k.sibling),V=o(k,R.props),vs(V,R),V.return=O,O=V;break e}n(O,k);break}else t(O,k);k=k.sibling}R.type===w?(V=Ca(R.props.children,O.mode,V,R.key),V.return=O,O=V):(V=Tl(R.type,R.key,R.props,null,O.mode,V),vs(V,R),V.return=O,O=V)}return p(O);case T:e:{for(de=R.key;k!==null;){if(k.key===de)if(k.tag===4&&k.stateNode.containerInfo===R.containerInfo&&k.stateNode.implementation===R.implementation){n(O,k.sibling),V=o(k,R.children||[]),V.return=O,O=V;break e}else{n(O,k);break}else t(O,k);k=k.sibling}V=Ic(R,O.mode,V),V.return=O,O=V}return p(O);case _:return R=Oa(R),Le(O,k,R,V)}if(te(R))return le(O,k,R,V);if(se(R)){if(de=se(R),typeof de!="function")throw Error(r(150));return R=de.call(R),he(O,k,R,V)}if(typeof R.then=="function")return Le(O,k,Ll(R),V);if(R.$$typeof===M)return Le(O,k,_l(O,R),V);Ul(O,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,k!==null&&k.tag===6?(n(O,k.sibling),V=o(k,R),V.return=O,O=V):(n(O,k),V=Zc(R,O.mode,V),V.return=O,O=V),p(O)):n(O,k)}return function(O,k,R,V){try{ys=0;var de=Le(O,k,R,V);return pi=null,de}catch(oe){if(oe===mi||oe===Ml)throw oe;var Te=kt(29,oe,null,O.mode);return Te.lanes=V,Te.return=O,Te}}}var _a=Pf(!0),Wf=Pf(!1),Zn=!1;function ro(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function co(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function In(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Jn(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(ze&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=kl(e),Lf(e,null,n),t}return Al(e,l,t,n),kl(e)}function bs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Kd(e,n)}}function oo(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var o=null,f=null;if(n=n.firstBaseUpdate,n!==null){do{var p={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};f===null?o=f=p:f=f.next=p,n=n.next}while(n!==null);f===null?o=f=t:f=f.next=t}else o=f=t;n={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var uo=!1;function xs(){if(uo){var e=hi;if(e!==null)throw e}}function Ss(e,t,n,l){uo=!1;var o=e.updateQueue;Zn=!1;var f=o.firstBaseUpdate,p=o.lastBaseUpdate,v=o.shared.pending;if(v!==null){o.shared.pending=null;var C=v,U=C.next;C.next=null,p===null?f=U:p.next=U,p=C;var K=e.alternate;K!==null&&(K=K.updateQueue,v=K.lastBaseUpdate,v!==p&&(v===null?K.firstBaseUpdate=U:v.next=U,K.lastBaseUpdate=C))}if(f!==null){var Q=o.baseState;p=0,K=U=C=null,v=f;do{var B=v.lane&-536870913,$=B!==v.lane;if($?(Ee&B)===B:(l&B)===B){B!==0&&B===fi&&(uo=!0),K!==null&&(K=K.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var le=e,he=v;B=t;var Le=n;switch(he.tag){case 1:if(le=he.payload,typeof le=="function"){Q=le.call(Le,Q,B);break e}Q=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=he.payload,B=typeof le=="function"?le.call(Le,Q,B):le,B==null)break e;Q=b({},Q,B);break e;case 2:Zn=!0}}B=v.callback,B!==null&&(e.flags|=64,$&&(e.flags|=8192),$=o.callbacks,$===null?o.callbacks=[B]:$.push(B))}else $={lane:B,tag:v.tag,payload:v.payload,callback:v.callback,next:null},K===null?(U=K=$,C=Q):K=K.next=$,p|=B;if(v=v.next,v===null){if(v=o.shared.pending,v===null)break;$=v,v=$.next,$.next=null,o.lastBaseUpdate=$,o.shared.pending=null}}while(!0);K===null&&(C=Q),o.baseState=C,o.firstBaseUpdate=U,o.lastBaseUpdate=K,f===null&&(o.shared.lanes=0),ta|=p,e.lanes=p,e.memoizedState=Q}}function eh(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function th(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)eh(n[e],t)}var gi=A(null),Bl=A(0);function nh(e,t){e=Mn,ee(Bl,e),ee(gi,t),Mn=e|t.baseLanes}function fo(){ee(Bl,Mn),ee(gi,gi.current)}function ho(){Mn=Bl.current,G(gi),G(Bl)}var Tt=A(null),Vt=null;function Fn(e){var t=e.alternate;ee(Qe,Qe.current&1),ee(Tt,e),Vt===null&&(t===null||gi.current!==null||t.memoizedState!==null)&&(Vt=e)}function mo(e){ee(Qe,Qe.current),ee(Tt,e),Vt===null&&(Vt=e)}function ah(e){e.tag===22?(ee(Qe,Qe.current),ee(Tt,e),Vt===null&&(Vt=e)):Pn()}function Pn(){ee(Qe,Qe.current),ee(Tt,Tt.current)}function Ot(e){G(Tt),Vt===e&&(Vt=null),G(Qe)}var Qe=A(0);function Hl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||xu(n)||Su(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var En=0,xe=null,Me=null,We=null,ql=!1,yi=!1,Da=!1,$l=0,ws=0,vi=null,Ib=0;function Ge(){throw Error(r(321))}function po(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!At(e[n],t[n]))return!1;return!0}function go(e,t,n,l,o,f){return En=f,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?qh:zo,Da=!1,f=n(l,o),Da=!1,yi&&(f=sh(t,n,l,o)),ih(e),f}function ih(e){L.H=Cs;var t=Me!==null&&Me.next!==null;if(En=0,We=Me=xe=null,ql=!1,ws=0,vi=null,t)throw Error(r(300));e===null||et||(e=e.dependencies,e!==null&&zl(e)&&(et=!0))}function sh(e,t,n,l){xe=e;var o=0;do{if(yi&&(vi=null),ws=0,yi=!1,25<=o)throw Error(r(301));if(o+=1,We=Me=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}L.H=$h,f=t(n,l)}while(yi);return f}function Jb(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?js(t):t,e=e.useState()[0],(Me!==null?Me.memoizedState:null)!==e&&(xe.flags|=1024),t}function yo(){var e=$l!==0;return $l=0,e}function vo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function bo(e){if(ql){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ql=!1}En=0,We=Me=xe=null,yi=!1,ws=$l=0,vi=null}function mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?xe.memoizedState=We=e:We=We.next=e,We}function Xe(){if(Me===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=We===null?xe.memoizedState:We.next;if(t!==null)We=t,Me=e;else{if(e===null)throw xe.alternate===null?Error(r(467)):Error(r(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},We===null?xe.memoizedState=We=e:We=We.next=e}return We}function Yl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function js(e){var t=ws;return ws+=1,vi===null&&(vi=[]),e=If(vi,e,t),t=xe,(We===null?t.memoizedState:We.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?qh:zo),e}function Kl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return js(e);if(e.$$typeof===M)return ot(e)}throw Error(r(438,String(e)))}function xo(e){var t=null,n=xe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=xe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Yl(),xe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=Se;return t.index++,n}function An(e,t){return typeof t=="function"?t(e):t}function Gl(e){var t=Xe();return So(t,Me,e)}function So(e,t,n){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=n;var o=e.baseQueue,f=l.pending;if(f!==null){if(o!==null){var p=o.next;o.next=f.next,f.next=p}t.baseQueue=o=f,l.pending=null}if(f=e.baseState,o===null)e.memoizedState=f;else{t=o.next;var v=p=null,C=null,U=t,K=!1;do{var Q=U.lane&-536870913;if(Q!==U.lane?(Ee&Q)===Q:(En&Q)===Q){var B=U.revertLane;if(B===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),Q===fi&&(K=!0);else if((En&B)===B){U=U.next,B===fi&&(K=!0);continue}else Q={lane:0,revertLane:U.revertLane,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},C===null?(v=C=Q,p=f):C=C.next=Q,xe.lanes|=B,ta|=B;Q=U.action,Da&&n(f,Q),f=U.hasEagerState?U.eagerState:n(f,Q)}else B={lane:Q,revertLane:U.revertLane,gesture:U.gesture,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},C===null?(v=C=B,p=f):C=C.next=B,xe.lanes|=Q,ta|=Q;U=U.next}while(U!==null&&U!==t);if(C===null?p=f:C.next=v,!At(f,e.memoizedState)&&(et=!0,K&&(n=hi,n!==null)))throw n;e.memoizedState=f,e.baseState=p,e.baseQueue=C,l.lastRenderedState=f}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function wo(e){var t=Xe(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var l=n.dispatch,o=n.pending,f=t.memoizedState;if(o!==null){n.pending=null;var p=o=o.next;do f=e(f,p.action),p=p.next;while(p!==o);At(f,t.memoizedState)||(et=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),n.lastRenderedState=f}return[f,l]}function lh(e,t,n){var l=xe,o=Xe(),f=ke;if(f){if(n===void 0)throw Error(r(407));n=n()}else n=t();var p=!At((Me||o).memoizedState,n);if(p&&(o.memoizedState=n,et=!0),o=o.queue,Co(oh.bind(null,l,o,e),[e]),o.getSnapshot!==t||p||We!==null&&We.memoizedState.tag&1){if(l.flags|=2048,bi(9,{destroy:void 0},ch.bind(null,l,o,n,t),null),Ue===null)throw Error(r(349));f||(En&127)!==0||rh(l,t,n)}return n}function rh(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=xe.updateQueue,t===null?(t=Yl(),xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ch(e,t,n,l){t.value=n,t.getSnapshot=l,uh(t)&&dh(e)}function oh(e,t,n){return n(function(){uh(t)&&dh(e)})}function uh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!At(e,n)}catch{return!0}}function dh(e){var t=Na(e,2);t!==null&&Nt(t,e,2)}function jo(e){var t=mt();if(typeof e=="function"){var n=e;if(e=n(),Da){$n(!0);try{n()}finally{$n(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:e},t}function fh(e,t,n,l){return e.baseState=n,So(e,Me,typeof l=="function"?l:An)}function Fb(e,t,n,l,o){if(Xl(e))throw Error(r(485));if(e=t.action,e!==null){var f={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){f.listeners.push(p)}};L.T!==null?n(!0):f.isTransition=!1,l(f),n=t.pending,n===null?(f.next=t.pending=f,hh(t,f)):(f.next=n.next,t.pending=n.next=f)}}function hh(e,t){var n=t.action,l=t.payload,o=e.state;if(t.isTransition){var f=L.T,p={};L.T=p;try{var v=n(o,l),C=L.S;C!==null&&C(p,v),mh(e,t,v)}catch(U){No(e,t,U)}finally{f!==null&&p.types!==null&&(f.types=p.types),L.T=f}}else try{f=n(o,l),mh(e,t,f)}catch(U){No(e,t,U)}}function mh(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){ph(e,t,l)},function(l){return No(e,t,l)}):ph(e,t,n)}function ph(e,t,n){t.status="fulfilled",t.value=n,gh(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,hh(e,n)))}function No(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,gh(t),t=t.next;while(t!==l)}e.action=null}function gh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function yh(e,t){return t}function vh(e,t){if(ke){var n=Ue.formState;if(n!==null){e:{var l=xe;if(ke){if(He){t:{for(var o=He,f=Gt;o.nodeType!==8;){if(!f){o=null;break t}if(o=Qt(o.nextSibling),o===null){o=null;break t}}f=o.data,o=f==="F!"||f==="F"?o:null}if(o){He=Qt(o.nextSibling),l=o.data==="F!";break e}}Qn(l)}l=!1}l&&(t=n[0])}}return n=mt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yh,lastRenderedState:t},n.queue=l,n=Uh.bind(null,xe,l),l.dispatch=n,l=jo(!1),f=Oo.bind(null,xe,!1,l.queue),l=mt(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,n=Fb.bind(null,xe,o,f,n),o.dispatch=n,l.memoizedState=e,[t,n,!1]}function bh(e){var t=Xe();return xh(t,Me,e)}function xh(e,t,n){if(t=So(e,t,yh)[0],e=Gl(An)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=js(t)}catch(p){throw p===mi?Ml:p}else l=t;t=Xe();var o=t.queue,f=o.dispatch;return n!==t.memoizedState&&(xe.flags|=2048,bi(9,{destroy:void 0},Pb.bind(null,o,n),null)),[l,f,e]}function Pb(e,t){e.action=t}function Sh(e){var t=Xe(),n=Me;if(n!==null)return xh(t,n,e);Xe(),t=t.memoizedState,n=Xe();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function bi(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=xe.updateQueue,t===null&&(t=Yl(),xe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function wh(){return Xe().memoizedState}function Vl(e,t,n,l){var o=mt();xe.flags|=e,o.memoizedState=bi(1|t,{destroy:void 0},n,l===void 0?null:l)}function Ql(e,t,n,l){var o=Xe();l=l===void 0?null:l;var f=o.memoizedState.inst;Me!==null&&l!==null&&po(l,Me.memoizedState.deps)?o.memoizedState=bi(t,f,n,l):(xe.flags|=e,o.memoizedState=bi(1|t,f,n,l))}function jh(e,t){Vl(8390656,8,e,t)}function Co(e,t){Ql(2048,8,e,t)}function Wb(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=Yl(),xe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Nh(e){var t=Xe().memoizedState;return Wb({ref:t,nextImpl:e}),function(){if((ze&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Ch(e,t){return Ql(4,2,e,t)}function Eh(e,t){return Ql(4,4,e,t)}function Ah(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function kh(e,t,n){n=n!=null?n.concat([e]):null,Ql(4,4,Ah.bind(null,t,e),n)}function Eo(){}function Th(e,t){var n=Xe();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&po(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Oh(e,t){var n=Xe();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&po(t,l[1]))return l[0];if(l=e(),Da){$n(!0);try{e()}finally{$n(!1)}}return n.memoizedState=[l,t],l}function Ao(e,t,n){return n===void 0||(En&1073741824)!==0&&(Ee&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=zm(),xe.lanes|=e,ta|=e,n)}function zh(e,t,n,l){return At(n,t)?n:gi.current!==null?(e=Ao(e,n,l),At(e,t)||(et=!0),e):(En&42)===0||(En&1073741824)!==0&&(Ee&261930)===0?(et=!0,e.memoizedState=n):(e=zm(),xe.lanes|=e,ta|=e,t)}function _h(e,t,n,l,o){var f=J.p;J.p=f!==0&&8>f?f:8;var p=L.T,v={};L.T=v,Oo(e,!1,t,n);try{var C=o(),U=L.S;if(U!==null&&U(v,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var K=Zb(C,l);Ns(e,t,K,Dt(e))}else Ns(e,t,l,Dt(e))}catch(Q){Ns(e,t,{then:function(){},status:"rejected",reason:Q},Dt())}finally{J.p=f,p!==null&&v.types!==null&&(p.types=v.types),L.T=p}}function e0(){}function ko(e,t,n,l){if(e.tag!==5)throw Error(r(476));var o=Dh(e).queue;_h(e,o,t,ne,n===null?e0:function(){return Mh(e),n(l)})}function Dh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Mh(e){var t=Dh(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},Dt())}function To(){return ot($s)}function Rh(){return Xe().memoizedState}function Lh(){return Xe().memoizedState}function t0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Dt();e=In(n);var l=Jn(t,e,n);l!==null&&(Nt(l,t,n),bs(l,t,n)),t={cache:ao()},e.payload=t;return}t=t.return}}function n0(e,t,n){var l=Dt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Xl(e)?Bh(t,n):(n=Qc(e,t,n,l),n!==null&&(Nt(n,e,l),Hh(n,t,l)))}function Uh(e,t,n){var l=Dt();Ns(e,t,n,l)}function Ns(e,t,n,l){var o={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xl(e))Bh(t,o);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var p=t.lastRenderedState,v=f(p,n);if(o.hasEagerState=!0,o.eagerState=v,At(v,p))return Al(e,t,o,0),Ue===null&&El(),!1}catch{}if(n=Qc(e,t,o,l),n!==null)return Nt(n,e,l),Hh(n,t,l),!0}return!1}function Oo(e,t,n,l){if(l={lane:2,revertLane:cu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Xl(e)){if(t)throw Error(r(479))}else t=Qc(e,n,l,2),t!==null&&Nt(t,e,2)}function Xl(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Bh(e,t){yi=ql=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hh(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Kd(e,n)}}var Cs={readContext:ot,use:Kl,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};Cs.useEffectEvent=Ge;var qh={readContext:ot,use:Kl,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:jh,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Vl(4194308,4,Ah.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vl(4194308,4,e,t)},useInsertionEffect:function(e,t){Vl(4,2,e,t)},useMemo:function(e,t){var n=mt();t=t===void 0?null:t;var l=e();if(Da){$n(!0);try{e()}finally{$n(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=mt();if(n!==void 0){var o=n(t);if(Da){$n(!0);try{n(t)}finally{$n(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=n0.bind(null,xe,e),[l.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:function(e){e=jo(e);var t=e.queue,n=Uh.bind(null,xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Eo,useDeferredValue:function(e,t){var n=mt();return Ao(n,e,t)},useTransition:function(){var e=jo(!1);return e=_h.bind(null,xe,e.queue,!0,!1),mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=xe,o=mt();if(ke){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Ue===null)throw Error(r(349));(Ee&127)!==0||rh(l,t,n)}o.memoizedState=n;var f={value:n,getSnapshot:t};return o.queue=f,jh(oh.bind(null,l,f,e),[e]),l.flags|=2048,bi(9,{destroy:void 0},ch.bind(null,l,f,n,t),null),n},useId:function(){var e=mt(),t=Ue.identifierPrefix;if(ke){var n=dn,l=un;n=(l&~(1<<32-Et(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=$l++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Ib++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:To,useFormState:vh,useActionState:vh,useOptimistic:function(e){var t=mt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Oo.bind(null,xe,!0,n),n.dispatch=t,[e,t]},useMemoCache:xo,useCacheRefresh:function(){return mt().memoizedState=t0.bind(null,xe)},useEffectEvent:function(e){var t=mt(),n={impl:e};return t.memoizedState=n,function(){if((ze&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},zo={readContext:ot,use:Kl,useCallback:Th,useContext:ot,useEffect:Co,useImperativeHandle:kh,useInsertionEffect:Ch,useLayoutEffect:Eh,useMemo:Oh,useReducer:Gl,useRef:wh,useState:function(){return Gl(An)},useDebugValue:Eo,useDeferredValue:function(e,t){var n=Xe();return zh(n,Me.memoizedState,e,t)},useTransition:function(){var e=Gl(An)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:js(e),t]},useSyncExternalStore:lh,useId:Rh,useHostTransitionStatus:To,useFormState:bh,useActionState:bh,useOptimistic:function(e,t){var n=Xe();return fh(n,Me,e,t)},useMemoCache:xo,useCacheRefresh:Lh};zo.useEffectEvent=Nh;var $h={readContext:ot,use:Kl,useCallback:Th,useContext:ot,useEffect:Co,useImperativeHandle:kh,useInsertionEffect:Ch,useLayoutEffect:Eh,useMemo:Oh,useReducer:wo,useRef:wh,useState:function(){return wo(An)},useDebugValue:Eo,useDeferredValue:function(e,t){var n=Xe();return Me===null?Ao(n,e,t):zh(n,Me.memoizedState,e,t)},useTransition:function(){var e=wo(An)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:js(e),t]},useSyncExternalStore:lh,useId:Rh,useHostTransitionStatus:To,useFormState:Sh,useActionState:Sh,useOptimistic:function(e,t){var n=Xe();return Me!==null?fh(n,Me,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:xo,useCacheRefresh:Lh};$h.useEffectEvent=Nh;function _o(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:b({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Do={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=Dt(),o=In(l);o.payload=t,n!=null&&(o.callback=n),t=Jn(e,o,l),t!==null&&(Nt(t,e,l),bs(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=Dt(),o=In(l);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Jn(e,o,l),t!==null&&(Nt(t,e,l),bs(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Dt(),l=In(n);l.tag=2,t!=null&&(l.callback=t),t=Jn(e,l,n),t!==null&&(Nt(t,e,n),bs(t,e,n))}};function Yh(e,t,n,l,o,f,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,p):t.prototype&&t.prototype.isPureReactComponent?!ds(n,l)||!ds(o,f):!0}function Kh(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&Do.enqueueReplaceState(t,t.state,null)}function Ma(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=b({},n));for(var o in e)n[o]===void 0&&(n[o]=e[o])}return n}function Gh(e){Cl(e)}function Vh(e){console.error(e)}function Qh(e){Cl(e)}function Zl(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Xh(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Mo(e,t,n){return n=In(n),n.tag=3,n.payload={element:null},n.callback=function(){Zl(e,t)},n}function Zh(e){return e=In(e),e.tag=3,e}function Ih(e,t,n,l){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var f=l.value;e.payload=function(){return o(f)},e.callback=function(){Xh(t,n,l)}}var p=n.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Xh(t,n,l),typeof o!="function"&&(na===null?na=new Set([this]):na.add(this));var v=l.stack;this.componentDidCatch(l.value,{componentStack:v!==null?v:""})})}function a0(e,t,n,l,o){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&di(t,n,o,!0),n=Tt.current,n!==null){switch(n.tag){case 31:case 13:return Vt===null?lr():n.alternate===null&&Ve===0&&(Ve=3),n.flags&=-257,n.flags|=65536,n.lanes=o,l===Rl?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),su(e,l,o)),!1;case 22:return n.flags|=65536,l===Rl?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),su(e,l,o)),!1}throw Error(r(435,n.tag))}return su(e,l,o),lr(),!1}if(ke)return t=Tt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==Pc&&(e=Error(r(422),{cause:l}),ms($t(e,n)))):(l!==Pc&&(t=Error(r(423),{cause:l}),ms($t(t,n))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=$t(l,n),o=Mo(e.stateNode,l,o),oo(e,o),Ve!==4&&(Ve=2)),!1;var f=Error(r(520),{cause:l});if(f=$t(f,n),Ds===null?Ds=[f]:Ds.push(f),Ve!==4&&(Ve=2),t===null)return!0;l=$t(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,e=Mo(n.stateNode,l,e),oo(n,e),!1;case 1:if(t=n.type,f=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(na===null||!na.has(f))))return n.flags|=65536,o&=-o,n.lanes|=o,o=Zh(o),Ih(o,e,n,l),oo(n,o),!1}n=n.return}while(n!==null);return!1}var Ro=Error(r(461)),et=!1;function ut(e,t,n,l){t.child=e===null?Wf(t,null,n,l):_a(t,e.child,n,l)}function Jh(e,t,n,l,o){n=n.render;var f=t.ref;if("ref"in l){var p={};for(var v in l)v!=="ref"&&(p[v]=l[v])}else p=l;return ka(t),l=go(e,t,n,p,f,o),v=yo(),e!==null&&!et?(vo(e,t,o),kn(e,t,o)):(ke&&v&&Jc(t),t.flags|=1,ut(e,t,l,o),t.child)}function Fh(e,t,n,l,o){if(e===null){var f=n.type;return typeof f=="function"&&!Xc(f)&&f.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=f,Ph(e,t,f,l,o)):(e=Tl(n.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Ko(e,o)){var p=f.memoizedProps;if(n=n.compare,n=n!==null?n:ds,n(p,l)&&e.ref===t.ref)return kn(e,t,o)}return t.flags|=1,e=wn(f,l),e.ref=t.ref,e.return=t,t.child=e}function Ph(e,t,n,l,o){if(e!==null){var f=e.memoizedProps;if(ds(f,l)&&e.ref===t.ref)if(et=!1,t.pendingProps=l=f,Ko(e,o))(e.flags&131072)!==0&&(et=!0);else return t.lanes=e.lanes,kn(e,t,o)}return Lo(e,t,n,l,o)}function Wh(e,t,n,l){var o=l.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|n:n,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~f}else l=0,t.child=null;return em(e,t,f,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Dl(t,f!==null?f.cachePool:null),f!==null?nh(t,f):fo(),ah(t);else return l=t.lanes=536870912,em(e,t,f!==null?f.baseLanes|n:n,n,l)}else f!==null?(Dl(t,f.cachePool),nh(t,f),Pn(),t.memoizedState=null):(e!==null&&Dl(t,null),fo(),Pn());return ut(e,t,o,n),t.child}function Es(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function em(e,t,n,l,o){var f=so();return f=f===null?null:{parent:Pe._currentValue,pool:f},t.memoizedState={baseLanes:n,cachePool:f},e!==null&&Dl(t,null),fo(),ah(t),e!==null&&di(e,t,l,!0),t.childLanes=o,null}function Il(e,t){return t=Fl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function tm(e,t,n){return _a(t,e.child,null,n),e=Il(t,t.pendingProps),e.flags|=2,Ot(t),t.memoizedState=null,e}function i0(e,t,n){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ke){if(l.mode==="hidden")return e=Il(t,l),t.lanes=536870912,Es(null,e);if(mo(t),(e=He)?(e=hp(e,Gt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Gn!==null?{id:un,overflow:dn}:null,retryLane:536870912,hydrationErrors:null},n=Bf(e),n.return=t,t.child=n,ct=t,He=null)):e=null,e===null)throw Qn(t);return t.lanes=536870912,null}return Il(t,l)}var f=e.memoizedState;if(f!==null){var p=f.dehydrated;if(mo(t),o)if(t.flags&256)t.flags&=-257,t=tm(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(et||di(e,t,n,!1),o=(n&e.childLanes)!==0,et||o){if(l=Ue,l!==null&&(p=Gd(l,n),p!==0&&p!==f.retryLane))throw f.retryLane=p,Na(e,p),Nt(l,e,p),Ro;lr(),t=tm(e,t,n)}else e=f.treeContext,He=Qt(p.nextSibling),ct=t,ke=!0,Vn=null,Gt=!1,e!==null&&$f(t,e),t=Il(t,l),t.flags|=4096;return t}return e=wn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Jl(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Lo(e,t,n,l,o){return ka(t),n=go(e,t,n,l,void 0,o),l=yo(),e!==null&&!et?(vo(e,t,o),kn(e,t,o)):(ke&&l&&Jc(t),t.flags|=1,ut(e,t,n,o),t.child)}function nm(e,t,n,l,o,f){return ka(t),t.updateQueue=null,n=sh(t,l,n,o),ih(e),l=yo(),e!==null&&!et?(vo(e,t,f),kn(e,t,f)):(ke&&l&&Jc(t),t.flags|=1,ut(e,t,n,f),t.child)}function am(e,t,n,l,o){if(ka(t),t.stateNode===null){var f=ri,p=n.contextType;typeof p=="object"&&p!==null&&(f=ot(p)),f=new n(l,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Do,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=l,f.state=t.memoizedState,f.refs={},ro(t),p=n.contextType,f.context=typeof p=="object"&&p!==null?ot(p):ri,f.state=t.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(_o(t,n,p,l),f.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(p=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),p!==f.state&&Do.enqueueReplaceState(f,f.state,null),Ss(t,l,f,o),xs(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){f=t.stateNode;var v=t.memoizedProps,C=Ma(n,v);f.props=C;var U=f.context,K=n.contextType;p=ri,typeof K=="object"&&K!==null&&(p=ot(K));var Q=n.getDerivedStateFromProps;K=typeof Q=="function"||typeof f.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,K||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v||U!==p)&&Kh(t,f,l,p),Zn=!1;var B=t.memoizedState;f.state=B,Ss(t,l,f,o),xs(),U=t.memoizedState,v||B!==U||Zn?(typeof Q=="function"&&(_o(t,n,Q,l),U=t.memoizedState),(C=Zn||Yh(t,n,C,l,B,U,p))?(K||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=U),f.props=l,f.state=U,f.context=p,l=C):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{f=t.stateNode,co(e,t),p=t.memoizedProps,K=Ma(n,p),f.props=K,Q=t.pendingProps,B=f.context,U=n.contextType,C=ri,typeof U=="object"&&U!==null&&(C=ot(U)),v=n.getDerivedStateFromProps,(U=typeof v=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(p!==Q||B!==C)&&Kh(t,f,l,C),Zn=!1,B=t.memoizedState,f.state=B,Ss(t,l,f,o),xs();var $=t.memoizedState;p!==Q||B!==$||Zn||e!==null&&e.dependencies!==null&&zl(e.dependencies)?(typeof v=="function"&&(_o(t,n,v,l),$=t.memoizedState),(K=Zn||Yh(t,n,K,l,B,$,C)||e!==null&&e.dependencies!==null&&zl(e.dependencies))?(U||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,$,C),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,$,C)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=$),f.props=l,f.state=$,f.context=C,l=K):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),l=!1)}return f=l,Jl(e,t),l=(t.flags&128)!==0,f||l?(f=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&l?(t.child=_a(t,e.child,null,o),t.child=_a(t,null,n,o)):ut(e,t,n,o),t.memoizedState=f.state,e=t.child):e=kn(e,t,o),e}function im(e,t,n,l){return Ea(),t.flags|=256,ut(e,t,n,l),t.child}var Uo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bo(e){return{baseLanes:e,cachePool:Xf()}}function Ho(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=_t),e}function sm(e,t,n){var l=t.pendingProps,o=!1,f=(t.flags&128)!==0,p;if((p=f)||(p=e!==null&&e.memoizedState===null?!1:(Qe.current&2)!==0),p&&(o=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(ke){if(o?Fn(t):Pn(),(e=He)?(e=hp(e,Gt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Gn!==null?{id:un,overflow:dn}:null,retryLane:536870912,hydrationErrors:null},n=Bf(e),n.return=t,t.child=n,ct=t,He=null)):e=null,e===null)throw Qn(t);return Su(e)?t.lanes=32:t.lanes=536870912,null}var v=l.children;return l=l.fallback,o?(Pn(),o=t.mode,v=Fl({mode:"hidden",children:v},o),l=Ca(l,o,n,null),v.return=t,l.return=t,v.sibling=l,t.child=v,l=t.child,l.memoizedState=Bo(n),l.childLanes=Ho(e,p,n),t.memoizedState=Uo,Es(null,l)):(Fn(t),qo(t,v))}var C=e.memoizedState;if(C!==null&&(v=C.dehydrated,v!==null)){if(f)t.flags&256?(Fn(t),t.flags&=-257,t=$o(e,t,n)):t.memoizedState!==null?(Pn(),t.child=e.child,t.flags|=128,t=null):(Pn(),v=l.fallback,o=t.mode,l=Fl({mode:"visible",children:l.children},o),v=Ca(v,o,n,null),v.flags|=2,l.return=t,v.return=t,l.sibling=v,t.child=l,_a(t,e.child,null,n),l=t.child,l.memoizedState=Bo(n),l.childLanes=Ho(e,p,n),t.memoizedState=Uo,t=Es(null,l));else if(Fn(t),Su(v)){if(p=v.nextSibling&&v.nextSibling.dataset,p)var U=p.dgst;p=U,l=Error(r(419)),l.stack="",l.digest=p,ms({value:l,source:null,stack:null}),t=$o(e,t,n)}else if(et||di(e,t,n,!1),p=(n&e.childLanes)!==0,et||p){if(p=Ue,p!==null&&(l=Gd(p,n),l!==0&&l!==C.retryLane))throw C.retryLane=l,Na(e,l),Nt(p,e,l),Ro;xu(v)||lr(),t=$o(e,t,n)}else xu(v)?(t.flags|=192,t.child=e.child,t=null):(e=C.treeContext,He=Qt(v.nextSibling),ct=t,ke=!0,Vn=null,Gt=!1,e!==null&&$f(t,e),t=qo(t,l.children),t.flags|=4096);return t}return o?(Pn(),v=l.fallback,o=t.mode,C=e.child,U=C.sibling,l=wn(C,{mode:"hidden",children:l.children}),l.subtreeFlags=C.subtreeFlags&65011712,U!==null?v=wn(U,v):(v=Ca(v,o,n,null),v.flags|=2),v.return=t,l.return=t,l.sibling=v,t.child=l,Es(null,l),l=t.child,v=e.child.memoizedState,v===null?v=Bo(n):(o=v.cachePool,o!==null?(C=Pe._currentValue,o=o.parent!==C?{parent:C,pool:C}:o):o=Xf(),v={baseLanes:v.baseLanes|n,cachePool:o}),l.memoizedState=v,l.childLanes=Ho(e,p,n),t.memoizedState=Uo,Es(e.child,l)):(Fn(t),n=e.child,e=n.sibling,n=wn(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=n,t.memoizedState=null,n)}function qo(e,t){return t=Fl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Fl(e,t){return e=kt(22,e,null,t),e.lanes=0,e}function $o(e,t,n){return _a(t,e.child,null,n),e=qo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lm(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),to(e.return,t,n)}function Yo(e,t,n,l,o,f){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:o,treeForkCount:f}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=l,p.tail=n,p.tailMode=o,p.treeForkCount=f)}function rm(e,t,n){var l=t.pendingProps,o=l.revealOrder,f=l.tail;l=l.children;var p=Qe.current,v=(p&2)!==0;if(v?(p=p&1|2,t.flags|=128):p&=1,ee(Qe,p),ut(e,t,l,n),l=ke?hs:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lm(e,n,t);else if(e.tag===19)lm(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Hl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Yo(t,!1,o,n,f,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Hl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Yo(t,!0,n,null,f,l);break;case"together":Yo(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function kn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ta|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(di(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=wn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ko(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&zl(e)))}function s0(e,t,n){switch(t.tag){case 3:$e(t,t.stateNode.containerInfo),Xn(t,Pe,e.memoizedState.cache),Ea();break;case 27:case 5:Pt(t);break;case 4:$e(t,t.stateNode.containerInfo);break;case 10:Xn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,mo(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Fn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?sm(e,t,n):(Fn(t),e=kn(e,t,n),e!==null?e.sibling:null);Fn(t);break;case 19:var o=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(di(e,t,n,!1),l=(n&t.childLanes)!==0),o){if(l)return rm(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ee(Qe,Qe.current),l)break;return null;case 22:return t.lanes=0,Wh(e,t,n,t.pendingProps);case 24:Xn(t,Pe,e.memoizedState.cache)}return kn(e,t,n)}function cm(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)et=!0;else{if(!Ko(e,n)&&(t.flags&128)===0)return et=!1,s0(e,t,n);et=(e.flags&131072)!==0}else et=!1,ke&&(t.flags&1048576)!==0&&qf(t,hs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Oa(t.elementType),t.type=e,typeof e=="function")Xc(e)?(l=Ma(e,l),t.tag=1,t=am(null,t,e,l,n)):(t.tag=0,t=Lo(null,t,e,l,n));else{if(e!=null){var o=e.$$typeof;if(o===H){t.tag=11,t=Jh(null,t,e,l,n);break e}else if(o===Z){t.tag=14,t=Fh(null,t,e,l,n);break e}}throw t=ge(e)||e,Error(r(306,t,""))}}return t;case 0:return Lo(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,o=Ma(l,t.pendingProps),am(e,t,l,o,n);case 3:e:{if($e(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var f=t.memoizedState;o=f.element,co(e,t),Ss(t,l,null,n);var p=t.memoizedState;if(l=p.cache,Xn(t,Pe,l),l!==f.cache&&no(t,[Pe],n,!0),xs(),l=p.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=im(e,t,l,n);break e}else if(l!==o){o=$t(Error(r(424)),t),ms(o),t=im(e,t,l,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,He=Qt(e.firstChild),ct=t,ke=!0,Vn=null,Gt=!0,n=Wf(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ea(),l===o){t=kn(e,t,n);break e}ut(e,t,l,n)}t=t.child}return t;case 26:return Jl(e,t),e===null?(n=bp(t.type,null,t.pendingProps,null))?t.memoizedState=n:ke||(n=t.type,e=t.pendingProps,l=hr(ie.current).createElement(n),l[rt]=t,l[vt]=e,dt(l,n,e),st(l),t.stateNode=l):t.memoizedState=bp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Pt(t),e===null&&ke&&(l=t.stateNode=gp(t.type,t.pendingProps,ie.current),ct=t,Gt=!0,o=He,la(t.type)?(wu=o,He=Qt(l.firstChild)):He=o),ut(e,t,t.pendingProps.children,n),Jl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ke&&((o=l=He)&&(l=R0(l,t.type,t.pendingProps,Gt),l!==null?(t.stateNode=l,ct=t,He=Qt(l.firstChild),Gt=!1,o=!0):o=!1),o||Qn(t)),Pt(t),o=t.type,f=t.pendingProps,p=e!==null?e.memoizedProps:null,l=f.children,yu(o,f)?l=null:p!==null&&yu(o,p)&&(t.flags|=32),t.memoizedState!==null&&(o=go(e,t,Jb,null,null,n),$s._currentValue=o),Jl(e,t),ut(e,t,l,n),t.child;case 6:return e===null&&ke&&((e=n=He)&&(n=L0(n,t.pendingProps,Gt),n!==null?(t.stateNode=n,ct=t,He=null,e=!0):e=!1),e||Qn(t)),null;case 13:return sm(e,t,n);case 4:return $e(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=_a(t,null,l,n):ut(e,t,l,n),t.child;case 11:return Jh(e,t,t.type,t.pendingProps,n);case 7:return ut(e,t,t.pendingProps,n),t.child;case 8:return ut(e,t,t.pendingProps.children,n),t.child;case 12:return ut(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,Xn(t,t.type,l.value),ut(e,t,l.children,n),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,ka(t),o=ot(o),l=l(o),t.flags|=1,ut(e,t,l,n),t.child;case 14:return Fh(e,t,t.type,t.pendingProps,n);case 15:return Ph(e,t,t.type,t.pendingProps,n);case 19:return rm(e,t,n);case 31:return i0(e,t,n);case 22:return Wh(e,t,n,t.pendingProps);case 24:return ka(t),l=ot(Pe),e===null?(o=so(),o===null&&(o=Ue,f=ao(),o.pooledCache=f,f.refCount++,f!==null&&(o.pooledCacheLanes|=n),o=f),t.memoizedState={parent:l,cache:o},ro(t),Xn(t,Pe,o)):((e.lanes&n)!==0&&(co(e,t),Ss(t,null,null,n),xs()),o=e.memoizedState,f=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Xn(t,Pe,l)):(l=f.cache,Xn(t,Pe,l),l!==o.cache&&no(t,[Pe],n,!0))),ut(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Tn(e){e.flags|=4}function Go(e,t,n,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Rm())e.flags|=8192;else throw za=Rl,lo}else e.flags&=-16777217}function om(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Np(t))if(Rm())e.flags|=8192;else throw za=Rl,lo}function Pl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?$d():536870912,e.lanes|=t,ji|=t)}function As(e,t){if(!ke)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function l0(e,t,n){var l=t.pendingProps;switch(Fc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(t),null;case 1:return qe(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Cn(Pe),ye(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ui(t)?Tn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Wc())),qe(t),null;case 26:var o=t.type,f=t.memoizedState;return e===null?(Tn(t),f!==null?(qe(t),om(t,f)):(qe(t),Go(t,o,null,l,n))):f?f!==e.memoizedState?(Tn(t),qe(t),om(t,f)):(qe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Tn(t),qe(t),Go(t,o,e,l,n)),null;case 27:if(Rt(t),n=ie.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Tn(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return qe(t),null}e=D.current,ui(t)?Yf(t):(e=gp(o,l,n),t.stateNode=e,Tn(t))}return qe(t),null;case 5:if(Rt(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Tn(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return qe(t),null}if(f=D.current,ui(t))Yf(t);else{var p=hr(ie.current);switch(f){case 1:f=p.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:f=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":f=p.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":f=p.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":f=p.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?p.createElement("select",{is:l.is}):p.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?p.createElement(o,{is:l.is}):p.createElement(o)}}f[rt]=t,f[vt]=l;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)f.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=f;e:switch(dt(f,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Tn(t)}}return qe(t),Go(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Tn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=ie.current,ui(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,o=ct,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[rt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||sp(e.nodeValue,n)),e||Qn(t,!0)}else e=hr(e).createTextNode(l),e[rt]=t,t.stateNode=e}return qe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=ui(t),n!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[rt]=t}else Ea(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),e=!1}else n=Wc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ot(t),t):(Ot(t),null);if((t.flags&128)!==0)throw Error(r(558))}return qe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=ui(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[rt]=t}else Ea(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),o=!1}else o=Wc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Ot(t),t):(Ot(t),null)}return Ot(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==o&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Pl(t,t.updateQueue),qe(t),null);case 4:return ye(),e===null&&fu(t.stateNode.containerInfo),qe(t),null;case 10:return Cn(t.type),qe(t),null;case 19:if(G(Qe),l=t.memoizedState,l===null)return qe(t),null;if(o=(t.flags&128)!==0,f=l.rendering,f===null)if(o)As(l,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Hl(e),f!==null){for(t.flags|=128,As(l,!1),e=f.updateQueue,t.updateQueue=e,Pl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Uf(n,e),n=n.sibling;return ee(Qe,Qe.current&1|2),ke&&jn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ht()>ar&&(t.flags|=128,o=!0,As(l,!1),t.lanes=4194304)}else{if(!o)if(e=Hl(f),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Pl(t,e),As(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!ke)return qe(t),null}else 2*ht()-l.renderingStartTime>ar&&n!==536870912&&(t.flags|=128,o=!0,As(l,!1),t.lanes=4194304);l.isBackwards?(f.sibling=t.child,t.child=f):(e=l.last,e!==null?e.sibling=f:t.child=f,l.last=f)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ht(),e.sibling=null,n=Qe.current,ee(Qe,o?n&1|2:n&1),ke&&jn(t,l.treeForkCount),e):(qe(t),null);case 22:case 23:return Ot(t),ho(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),n=t.updateQueue,n!==null&&Pl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&G(Ta),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Cn(Pe),qe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function r0(e,t){switch(Fc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Cn(Pe),ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Rt(t),null;case 31:if(t.memoizedState!==null){if(Ot(t),t.alternate===null)throw Error(r(340));Ea()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ot(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ea()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Qe),null;case 4:return ye(),null;case 10:return Cn(t.type),null;case 22:case 23:return Ot(t),ho(),e!==null&&G(Ta),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Cn(Pe),null;case 25:return null;default:return null}}function um(e,t){switch(Fc(t),t.tag){case 3:Cn(Pe),ye();break;case 26:case 27:case 5:Rt(t);break;case 4:ye();break;case 31:t.memoizedState!==null&&Ot(t);break;case 13:Ot(t);break;case 19:G(Qe);break;case 10:Cn(t.type);break;case 22:case 23:Ot(t),ho(),e!==null&&G(Ta);break;case 24:Cn(Pe)}}function ks(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var o=l.next;n=o;do{if((n.tag&e)===e){l=void 0;var f=n.create,p=n.inst;l=f(),p.destroy=l}n=n.next}while(n!==o)}}catch(v){De(t,t.return,v)}}function Wn(e,t,n){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var f=o.next;l=f;do{if((l.tag&e)===e){var p=l.inst,v=p.destroy;if(v!==void 0){p.destroy=void 0,o=t;var C=n,U=v;try{U()}catch(K){De(o,C,K)}}}l=l.next}while(l!==f)}}catch(K){De(t,t.return,K)}}function dm(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{th(t,n)}catch(l){De(e,e.return,l)}}}function fm(e,t,n){n.props=Ma(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){De(e,t,l)}}function Ts(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(o){De(e,t,o)}}function fn(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(o){De(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){De(e,t,o)}else n.current=null}function hm(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(o){De(e,e.return,o)}}function Vo(e,t,n){try{var l=e.stateNode;T0(l,e.type,n,t),l[vt]=t}catch(o){De(e,e.return,o)}}function mm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&la(e.type)||e.tag===4}function Qo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mm(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&&la(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 Xo(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xn));else if(l!==4&&(l===27&&la(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Xo(e,t,n),e=e.sibling;e!==null;)Xo(e,t,n),e=e.sibling}function Wl(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&la(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Wl(e,t,n),e=e.sibling;e!==null;)Wl(e,t,n),e=e.sibling}function pm(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);dt(t,l,n),t[rt]=e,t[vt]=n}catch(f){De(e,e.return,f)}}var On=!1,tt=!1,Zo=!1,gm=typeof WeakSet=="function"?WeakSet:Set,lt=null;function c0(e,t){if(e=e.containerInfo,pu=xr,e=kf(e),qc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var o=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{n.nodeType,f.nodeType}catch{n=null;break e}var p=0,v=-1,C=-1,U=0,K=0,Q=e,B=null;t:for(;;){for(var $;Q!==n||o!==0&&Q.nodeType!==3||(v=p+o),Q!==f||l!==0&&Q.nodeType!==3||(C=p+l),Q.nodeType===3&&(p+=Q.nodeValue.length),($=Q.firstChild)!==null;)B=Q,Q=$;for(;;){if(Q===e)break t;if(B===n&&++U===o&&(v=p),B===f&&++K===l&&(C=p),($=Q.nextSibling)!==null)break;Q=B,B=Q.parentNode}Q=$}n=v===-1||C===-1?null:{start:v,end:C}}else n=null}n=n||{start:0,end:0}}else n=null;for(gu={focusedElem:e,selectionRange:n},xr=!1,lt=t;lt!==null;)if(t=lt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,lt=e;else for(;lt!==null;){switch(t=lt,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)o=e[n],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,n=t,o=f.memoizedProps,f=f.memoizedState,l=n.stateNode;try{var le=Ma(n.type,o);e=l.getSnapshotBeforeUpdate(le,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(he){De(n,n.return,he)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)bu(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":bu(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,lt=e;break}lt=t.return}}function ym(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:_n(e,n),l&4&&ks(5,n);break;case 1:if(_n(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(p){De(n,n.return,p)}else{var o=Ma(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){De(n,n.return,p)}}l&64&&dm(n),l&512&&Ts(n,n.return);break;case 3:if(_n(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{th(e,t)}catch(p){De(n,n.return,p)}}break;case 27:t===null&&l&4&&pm(n);case 26:case 5:_n(e,n),t===null&&l&4&&hm(n),l&512&&Ts(n,n.return);break;case 12:_n(e,n);break;case 31:_n(e,n),l&4&&xm(e,n);break;case 13:_n(e,n),l&4&&Sm(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=y0.bind(null,n),U0(e,n))));break;case 22:if(l=n.memoizedState!==null||On,!l){t=t!==null&&t.memoizedState!==null||tt,o=On;var f=tt;On=l,(tt=t)&&!f?Dn(e,n,(n.subtreeFlags&8772)!==0):_n(e,n),On=o,tt=f}break;case 30:break;default:_n(e,n)}}function vm(e){var t=e.alternate;t!==null&&(e.alternate=null,vm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&jc(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ye=null,xt=!1;function zn(e,t,n){for(n=n.child;n!==null;)bm(e,t,n),n=n.sibling}function bm(e,t,n){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(Wi,n)}catch{}switch(n.tag){case 26:tt||fn(n,t),zn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:tt||fn(n,t);var l=Ye,o=xt;la(n.type)&&(Ye=n.stateNode,xt=!1),zn(e,t,n),Bs(n.stateNode),Ye=l,xt=o;break;case 5:tt||fn(n,t);case 6:if(l=Ye,o=xt,Ye=null,zn(e,t,n),Ye=l,xt=o,Ye!==null)if(xt)try{(Ye.nodeType===9?Ye.body:Ye.nodeName==="HTML"?Ye.ownerDocument.body:Ye).removeChild(n.stateNode)}catch(f){De(n,t,f)}else try{Ye.removeChild(n.stateNode)}catch(f){De(n,t,f)}break;case 18:Ye!==null&&(xt?(e=Ye,dp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),zi(e)):dp(Ye,n.stateNode));break;case 4:l=Ye,o=xt,Ye=n.stateNode.containerInfo,xt=!0,zn(e,t,n),Ye=l,xt=o;break;case 0:case 11:case 14:case 15:Wn(2,n,t),tt||Wn(4,n,t),zn(e,t,n);break;case 1:tt||(fn(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&fm(n,t,l)),zn(e,t,n);break;case 21:zn(e,t,n);break;case 22:tt=(l=tt)||n.memoizedState!==null,zn(e,t,n),tt=l;break;default:zn(e,t,n)}}function xm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{zi(e)}catch(n){De(t,t.return,n)}}}function Sm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{zi(e)}catch(n){De(t,t.return,n)}}function o0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new gm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new gm),t;default:throw Error(r(435,e.tag))}}function er(e,t){var n=o0(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var o=v0.bind(null,e,l);l.then(o,o)}})}function St(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var o=n[l],f=e,p=t,v=p;e:for(;v!==null;){switch(v.tag){case 27:if(la(v.type)){Ye=v.stateNode,xt=!1;break e}break;case 5:Ye=v.stateNode,xt=!1;break e;case 3:case 4:Ye=v.stateNode.containerInfo,xt=!0;break e}v=v.return}if(Ye===null)throw Error(r(160));bm(f,p,o),Ye=null,xt=!1,f=o.alternate,f!==null&&(f.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wm(t,e),t=t.sibling}var nn=null;function wm(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:St(t,e),wt(e),l&4&&(Wn(3,e,e.return),ks(3,e),Wn(5,e,e.return));break;case 1:St(t,e),wt(e),l&512&&(tt||n===null||fn(n,n.return)),l&64&&On&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var o=nn;if(St(t,e),wt(e),l&512&&(tt||n===null||fn(n,n.return)),l&4){var f=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":f=o.getElementsByTagName("title")[0],(!f||f[ns]||f[rt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=o.createElement(l),o.head.insertBefore(f,o.querySelector("head > title"))),dt(f,l,n),f[rt]=e,st(f),l=f;break e;case"link":var p=wp("link","href",o).get(l+(n.href||""));if(p){for(var v=0;v<p.length;v++)if(f=p[v],f.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&f.getAttribute("rel")===(n.rel==null?null:n.rel)&&f.getAttribute("title")===(n.title==null?null:n.title)&&f.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){p.splice(v,1);break t}}f=o.createElement(l),dt(f,l,n),o.head.appendChild(f);break;case"meta":if(p=wp("meta","content",o).get(l+(n.content||""))){for(v=0;v<p.length;v++)if(f=p[v],f.getAttribute("content")===(n.content==null?null:""+n.content)&&f.getAttribute("name")===(n.name==null?null:n.name)&&f.getAttribute("property")===(n.property==null?null:n.property)&&f.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&f.getAttribute("charset")===(n.charSet==null?null:n.charSet)){p.splice(v,1);break t}}f=o.createElement(l),dt(f,l,n),o.head.appendChild(f);break;default:throw Error(r(468,l))}f[rt]=e,st(f),l=f}e.stateNode=l}else jp(o,e.type,e.stateNode);else e.stateNode=Sp(o,l,e.memoizedProps);else f!==l?(f===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):f.count--,l===null?jp(o,e.type,e.stateNode):Sp(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Vo(e,e.memoizedProps,n.memoizedProps)}break;case 27:St(t,e),wt(e),l&512&&(tt||n===null||fn(n,n.return)),n!==null&&l&4&&Vo(e,e.memoizedProps,n.memoizedProps);break;case 5:if(St(t,e),wt(e),l&512&&(tt||n===null||fn(n,n.return)),e.flags&32){o=e.stateNode;try{ei(o,"")}catch(le){De(e,e.return,le)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,Vo(e,o,n!==null?n.memoizedProps:o)),l&1024&&(Zo=!0);break;case 6:if(St(t,e),wt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(le){De(e,e.return,le)}}break;case 3:if(gr=null,o=nn,nn=mr(t.containerInfo),St(t,e),nn=o,wt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{zi(t.containerInfo)}catch(le){De(e,e.return,le)}Zo&&(Zo=!1,jm(e));break;case 4:l=nn,nn=mr(e.stateNode.containerInfo),St(t,e),wt(e),nn=l;break;case 12:St(t,e),wt(e);break;case 31:St(t,e),wt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,er(e,l)));break;case 13:St(t,e),wt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(nr=ht()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,er(e,l)));break;case 22:o=e.memoizedState!==null;var C=n!==null&&n.memoizedState!==null,U=On,K=tt;if(On=U||o,tt=K||C,St(t,e),tt=K,On=U,wt(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(n===null||C||On||tt||Ra(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){C=n=t;try{if(f=C.stateNode,o)p=f.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{v=C.stateNode;var Q=C.memoizedProps.style,B=Q!=null&&Q.hasOwnProperty("display")?Q.display:null;v.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(le){De(C,C.return,le)}}}else if(t.tag===6){if(n===null){C=t;try{C.stateNode.nodeValue=o?"":C.memoizedProps}catch(le){De(C,C.return,le)}}}else if(t.tag===18){if(n===null){C=t;try{var $=C.stateNode;o?fp($,!0):fp(C.stateNode,!1)}catch(le){De(C,C.return,le)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,er(e,n))));break;case 19:St(t,e),wt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,er(e,l)));break;case 30:break;case 21:break;default:St(t,e),wt(e)}}function wt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(mm(l)){n=l;break}l=l.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var o=n.stateNode,f=Qo(e);Wl(e,f,o);break;case 5:var p=n.stateNode;n.flags&32&&(ei(p,""),n.flags&=-33);var v=Qo(e);Wl(e,v,p);break;case 3:case 4:var C=n.stateNode.containerInfo,U=Qo(e);Xo(e,U,C);break;default:throw Error(r(161))}}catch(K){De(e,e.return,K)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _n(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ym(e,t.alternate,t),t=t.sibling}function Ra(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wn(4,t,t.return),Ra(t);break;case 1:fn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&fm(t,t.return,n),Ra(t);break;case 27:Bs(t.stateNode);case 26:case 5:fn(t,t.return),Ra(t);break;case 22:t.memoizedState===null&&Ra(t);break;case 30:Ra(t);break;default:Ra(t)}e=e.sibling}}function Dn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,f=t,p=f.flags;switch(f.tag){case 0:case 11:case 15:Dn(o,f,n),ks(4,f);break;case 1:if(Dn(o,f,n),l=f,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(U){De(l,l.return,U)}if(l=f,o=l.updateQueue,o!==null){var v=l.stateNode;try{var C=o.shared.hiddenCallbacks;if(C!==null)for(o.shared.hiddenCallbacks=null,o=0;o<C.length;o++)eh(C[o],v)}catch(U){De(l,l.return,U)}}n&&p&64&&dm(f),Ts(f,f.return);break;case 27:pm(f);case 26:case 5:Dn(o,f,n),n&&l===null&&p&4&&hm(f),Ts(f,f.return);break;case 12:Dn(o,f,n);break;case 31:Dn(o,f,n),n&&p&4&&xm(o,f);break;case 13:Dn(o,f,n),n&&p&4&&Sm(o,f);break;case 22:f.memoizedState===null&&Dn(o,f,n),Ts(f,f.return);break;case 30:break;default:Dn(o,f,n)}t=t.sibling}}function Io(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ps(n))}function Jo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ps(e))}function an(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nm(e,t,n,l),t=t.sibling}function Nm(e,t,n,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:an(e,t,n,l),o&2048&&ks(9,t);break;case 1:an(e,t,n,l);break;case 3:an(e,t,n,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ps(e)));break;case 12:if(o&2048){an(e,t,n,l),e=t.stateNode;try{var f=t.memoizedProps,p=f.id,v=f.onPostCommit;typeof v=="function"&&v(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){De(t,t.return,C)}}else an(e,t,n,l);break;case 31:an(e,t,n,l);break;case 13:an(e,t,n,l);break;case 23:break;case 22:f=t.stateNode,p=t.alternate,t.memoizedState!==null?f._visibility&2?an(e,t,n,l):Os(e,t):f._visibility&2?an(e,t,n,l):(f._visibility|=2,xi(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Io(p,t);break;case 24:an(e,t,n,l),o&2048&&Jo(t.alternate,t);break;default:an(e,t,n,l)}}function xi(e,t,n,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,p=t,v=n,C=l,U=p.flags;switch(p.tag){case 0:case 11:case 15:xi(f,p,v,C,o),ks(8,p);break;case 23:break;case 22:var K=p.stateNode;p.memoizedState!==null?K._visibility&2?xi(f,p,v,C,o):Os(f,p):(K._visibility|=2,xi(f,p,v,C,o)),o&&U&2048&&Io(p.alternate,p);break;case 24:xi(f,p,v,C,o),o&&U&2048&&Jo(p.alternate,p);break;default:xi(f,p,v,C,o)}t=t.sibling}}function Os(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,o=l.flags;switch(l.tag){case 22:Os(n,l),o&2048&&Io(l.alternate,l);break;case 24:Os(n,l),o&2048&&Jo(l.alternate,l);break;default:Os(n,l)}t=t.sibling}}var zs=8192;function Si(e,t,n){if(e.subtreeFlags&zs)for(e=e.child;e!==null;)Cm(e,t,n),e=e.sibling}function Cm(e,t,n){switch(e.tag){case 26:Si(e,t,n),e.flags&zs&&e.memoizedState!==null&&I0(n,nn,e.memoizedState,e.memoizedProps);break;case 5:Si(e,t,n);break;case 3:case 4:var l=nn;nn=mr(e.stateNode.containerInfo),Si(e,t,n),nn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=zs,zs=16777216,Si(e,t,n),zs=l):Si(e,t,n));break;default:Si(e,t,n)}}function Em(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function _s(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];lt=l,km(l,e)}Em(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Am(e),e=e.sibling}function Am(e){switch(e.tag){case 0:case 11:case 15:_s(e),e.flags&2048&&Wn(9,e,e.return);break;case 3:_s(e);break;case 12:_s(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,tr(e)):_s(e);break;default:_s(e)}}function tr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];lt=l,km(l,e)}Em(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wn(8,t,t.return),tr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,tr(t));break;default:tr(t)}e=e.sibling}}function km(e,t){for(;lt!==null;){var n=lt;switch(n.tag){case 0:case 11:case 15:Wn(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ps(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,lt=l;else e:for(n=e;lt!==null;){l=lt;var o=l.sibling,f=l.return;if(vm(l),l===n){lt=null;break e}if(o!==null){o.return=f,lt=o;break e}lt=f}}}var u0={getCacheForType:function(e){var t=ot(Pe),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ot(Pe).controller.signal}},d0=typeof WeakMap=="function"?WeakMap:Map,ze=0,Ue=null,Ne=null,Ee=0,_e=0,zt=null,ea=!1,wi=!1,Fo=!1,Mn=0,Ve=0,ta=0,La=0,Po=0,_t=0,ji=0,Ds=null,jt=null,Wo=!1,nr=0,Tm=0,ar=1/0,ir=null,na=null,at=0,aa=null,Ni=null,Rn=0,eu=0,tu=null,Om=null,Ms=0,nu=null;function Dt(){return(ze&2)!==0&&Ee!==0?Ee&-Ee:L.T!==null?cu():Vd()}function zm(){if(_t===0)if((Ee&536870912)===0||ke){var e=fl;fl<<=1,(fl&3932160)===0&&(fl=262144),_t=e}else _t=536870912;return e=Tt.current,e!==null&&(e.flags|=32),_t}function Nt(e,t,n){(e===Ue&&(_e===2||_e===9)||e.cancelPendingCommit!==null)&&(Ci(e,0),ia(e,Ee,_t,!1)),ts(e,n),((ze&2)===0||e!==Ue)&&(e===Ue&&((ze&2)===0&&(La|=n),Ve===4&&ia(e,Ee,_t,!1)),hn(e))}function _m(e,t,n){if((ze&6)!==0)throw Error(r(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||es(e,t),o=l?m0(e,t):iu(e,t,!0),f=l;do{if(o===0){wi&&!l&&ia(e,t,0,!1);break}else{if(n=e.current.alternate,f&&!f0(n)){o=iu(e,t,!1),f=!1;continue}if(o===2){if(f=t,e.errorRecoveryDisabledLanes&f)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var v=e;o=Ds;var C=v.current.memoizedState.isDehydrated;if(C&&(Ci(v,p).flags|=256),p=iu(v,p,!1),p!==2){if(Fo&&!C){v.errorRecoveryDisabledLanes|=f,La|=f,o=4;break e}f=jt,jt=o,f!==null&&(jt===null?jt=f:jt.push.apply(jt,f))}o=p}if(f=!1,o!==2)continue}}if(o===1){Ci(e,0),ia(e,t,0,!0);break}e:{switch(l=e,f=o,f){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:ia(l,t,_t,!ea);break e;case 2:jt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=nr+300-ht(),10<o)){if(ia(l,t,_t,!ea),ml(l,0,!0)!==0)break e;Rn=t,l.timeoutHandle=op(Dm.bind(null,l,n,jt,ir,Wo,t,_t,La,ji,ea,f,"Throttled",-0,0),o);break e}Dm(l,n,jt,ir,Wo,t,_t,La,ji,ea,f,null,-0,0)}}break}while(!0);hn(e)}function Dm(e,t,n,l,o,f,p,v,C,U,K,Q,B,$){if(e.timeoutHandle=-1,Q=t.subtreeFlags,Q&8192||(Q&16785408)===16785408){Q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xn},Cm(t,f,Q);var le=(f&62914560)===f?nr-ht():(f&4194048)===f?Tm-ht():0;if(le=J0(Q,le),le!==null){Rn=f,e.cancelPendingCommit=le($m.bind(null,e,t,f,n,l,o,p,v,C,K,Q,null,B,$)),ia(e,f,p,!U);return}}$m(e,t,f,n,l,o,p,v,C)}function f0(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var o=n[l],f=o.getSnapshot;o=o.value;try{if(!At(f(),o))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ia(e,t,n,l){t&=~Po,t&=~La,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var f=31-Et(o),p=1<<f;l[f]=-1,o&=~p}n!==0&&Yd(e,n,t)}function sr(){return(ze&6)===0?(Rs(0),!1):!0}function au(){if(Ne!==null){if(_e===0)var e=Ne.return;else e=Ne,Nn=Aa=null,bo(e),pi=null,ys=0,e=Ne;for(;e!==null;)um(e.alternate,e),e=e.return;Ne=null}}function Ci(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,_0(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Rn=0,au(),Ue=e,Ne=n=wn(e.current,null),Ee=t,_e=0,zt=null,ea=!1,wi=es(e,t),Fo=!1,ji=_t=Po=La=ta=Ve=0,jt=Ds=null,Wo=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-Et(l),f=1<<o;t|=e[o],l&=~f}return Mn=t,El(),n}function Mm(e,t){xe=null,L.H=Cs,t===mi||t===Ml?(t=Jf(),_e=3):t===lo?(t=Jf(),_e=4):_e=t===Ro?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,zt=t,Ne===null&&(Ve=1,Zl(e,$t(t,e.current)))}function Rm(){var e=Tt.current;return e===null?!0:(Ee&4194048)===Ee?Vt===null:(Ee&62914560)===Ee||(Ee&536870912)!==0?e===Vt:!1}function Lm(){var e=L.H;return L.H=Cs,e===null?Cs:e}function Um(){var e=L.A;return L.A=u0,e}function lr(){Ve=4,ea||(Ee&4194048)!==Ee&&Tt.current!==null||(wi=!0),(ta&134217727)===0&&(La&134217727)===0||Ue===null||ia(Ue,Ee,_t,!1)}function iu(e,t,n){var l=ze;ze|=2;var o=Lm(),f=Um();(Ue!==e||Ee!==t)&&(ir=null,Ci(e,t)),t=!1;var p=Ve;e:do try{if(_e!==0&&Ne!==null){var v=Ne,C=zt;switch(_e){case 8:au(),p=6;break e;case 3:case 2:case 9:case 6:Tt.current===null&&(t=!0);var U=_e;if(_e=0,zt=null,Ei(e,v,C,U),n&&wi){p=0;break e}break;default:U=_e,_e=0,zt=null,Ei(e,v,C,U)}}h0(),p=Ve;break}catch(K){Mm(e,K)}while(!0);return t&&e.shellSuspendCounter++,Nn=Aa=null,ze=l,L.H=o,L.A=f,Ne===null&&(Ue=null,Ee=0,El()),p}function h0(){for(;Ne!==null;)Bm(Ne)}function m0(e,t){var n=ze;ze|=2;var l=Lm(),o=Um();Ue!==e||Ee!==t?(ir=null,ar=ht()+500,Ci(e,t)):wi=es(e,t);e:do try{if(_e!==0&&Ne!==null){t=Ne;var f=zt;t:switch(_e){case 1:_e=0,zt=null,Ei(e,t,f,1);break;case 2:case 9:if(Zf(f)){_e=0,zt=null,Hm(t);break}t=function(){_e!==2&&_e!==9||Ue!==e||(_e=7),hn(e)},f.then(t,t);break e;case 3:_e=7;break e;case 4:_e=5;break e;case 7:Zf(f)?(_e=0,zt=null,Hm(t)):(_e=0,zt=null,Ei(e,t,f,7));break;case 5:var p=null;switch(Ne.tag){case 26:p=Ne.memoizedState;case 5:case 27:var v=Ne;if(p?Np(p):v.stateNode.complete){_e=0,zt=null;var C=v.sibling;if(C!==null)Ne=C;else{var U=v.return;U!==null?(Ne=U,rr(U)):Ne=null}break t}}_e=0,zt=null,Ei(e,t,f,5);break;case 6:_e=0,zt=null,Ei(e,t,f,6);break;case 8:au(),Ve=6;break e;default:throw Error(r(462))}}p0();break}catch(K){Mm(e,K)}while(!0);return Nn=Aa=null,L.H=l,L.A=o,ze=n,Ne!==null?0:(Ue=null,Ee=0,El(),Ve)}function p0(){for(;Ne!==null&&!pc();)Bm(Ne)}function Bm(e){var t=cm(e.alternate,e,Mn);e.memoizedProps=e.pendingProps,t===null?rr(e):Ne=t}function Hm(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=nm(n,t,t.pendingProps,t.type,void 0,Ee);break;case 11:t=nm(n,t,t.pendingProps,t.type.render,t.ref,Ee);break;case 5:bo(t);default:um(n,t),t=Ne=Uf(t,Mn),t=cm(n,t,Mn)}e.memoizedProps=e.pendingProps,t===null?rr(e):Ne=t}function Ei(e,t,n,l){Nn=Aa=null,bo(t),pi=null,ys=0;var o=t.return;try{if(a0(e,o,t,n,Ee)){Ve=1,Zl(e,$t(n,e.current)),Ne=null;return}}catch(f){if(o!==null)throw Ne=o,f;Ve=1,Zl(e,$t(n,e.current)),Ne=null;return}t.flags&32768?(ke||l===1?e=!0:wi||(Ee&536870912)!==0?e=!1:(ea=e=!0,(l===2||l===9||l===3||l===6)&&(l=Tt.current,l!==null&&l.tag===13&&(l.flags|=16384))),qm(t,e)):rr(t)}function rr(e){var t=e;do{if((t.flags&32768)!==0){qm(t,ea);return}e=t.return;var n=l0(t.alternate,t,Mn);if(n!==null){Ne=n;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);Ve===0&&(Ve=5)}function qm(e,t){do{var n=r0(e.alternate,e);if(n!==null){n.flags&=32767,Ne=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=n}while(e!==null);Ve=6,Ne=null}function $m(e,t,n,l,o,f,p,v,C){e.cancelPendingCommit=null;do cr();while(at!==0);if((ze&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(f=t.lanes|t.childLanes,f|=Vc,Zv(e,n,f,p,v,C),e===Ue&&(Ne=Ue=null,Ee=0),Ni=t,aa=e,Rn=n,eu=f,tu=o,Om=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,b0(Ut,function(){return Qm(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=L.T,L.T=null,o=J.p,J.p=2,p=ze,ze|=4;try{c0(e,t,n)}finally{ze=p,J.p=o,L.T=l}}at=1,Ym(),Km(),Gm()}}function Ym(){if(at===1){at=0;var e=aa,t=Ni,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=L.T,L.T=null;var l=J.p;J.p=2;var o=ze;ze|=4;try{wm(t,e);var f=gu,p=kf(e.containerInfo),v=f.focusedElem,C=f.selectionRange;if(p!==v&&v&&v.ownerDocument&&Af(v.ownerDocument.documentElement,v)){if(C!==null&&qc(v)){var U=C.start,K=C.end;if(K===void 0&&(K=U),"selectionStart"in v)v.selectionStart=U,v.selectionEnd=Math.min(K,v.value.length);else{var Q=v.ownerDocument||document,B=Q&&Q.defaultView||window;if(B.getSelection){var $=B.getSelection(),le=v.textContent.length,he=Math.min(C.start,le),Le=C.end===void 0?he:Math.min(C.end,le);!$.extend&&he>Le&&(p=Le,Le=he,he=p);var O=Ef(v,he),k=Ef(v,Le);if(O&&k&&($.rangeCount!==1||$.anchorNode!==O.node||$.anchorOffset!==O.offset||$.focusNode!==k.node||$.focusOffset!==k.offset)){var R=Q.createRange();R.setStart(O.node,O.offset),$.removeAllRanges(),he>Le?($.addRange(R),$.extend(k.node,k.offset)):(R.setEnd(k.node,k.offset),$.addRange(R))}}}}for(Q=[],$=v;$=$.parentNode;)$.nodeType===1&&Q.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<Q.length;v++){var V=Q[v];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}xr=!!pu,gu=pu=null}finally{ze=o,J.p=l,L.T=n}}e.current=t,at=2}}function Km(){if(at===2){at=0;var e=aa,t=Ni,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=L.T,L.T=null;var l=J.p;J.p=2;var o=ze;ze|=4;try{ym(e,t.alternate,t)}finally{ze=o,J.p=l,L.T=n}}at=3}}function Gm(){if(at===4||at===3){at=0,gc();var e=aa,t=Ni,n=Rn,l=Om;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?at=5:(at=0,Ni=aa=null,Vm(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(na=null),Sc(n),t=t.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(Wi,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=L.T,o=J.p,J.p=2,L.T=null;try{for(var f=e.onRecoverableError,p=0;p<l.length;p++){var v=l[p];f(v.value,{componentStack:v.stack})}}finally{L.T=t,J.p=o}}(Rn&3)!==0&&cr(),hn(e),o=e.pendingLanes,(n&261930)!==0&&(o&42)!==0?e===nu?Ms++:(Ms=0,nu=e):Ms=0,Rs(0)}}function Vm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ps(t)))}function cr(){return Ym(),Km(),Gm(),Qm()}function Qm(){if(at!==5)return!1;var e=aa,t=eu;eu=0;var n=Sc(Rn),l=L.T,o=J.p;try{J.p=32>n?32:n,L.T=null,n=tu,tu=null;var f=aa,p=Rn;if(at=0,Ni=aa=null,Rn=0,(ze&6)!==0)throw Error(r(331));var v=ze;if(ze|=4,Am(f.current),Nm(f,f.current,p,n),ze=v,Rs(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(Wi,f)}catch{}return!0}finally{J.p=o,L.T=l,Vm(e,t)}}function Xm(e,t,n){t=$t(n,t),t=Mo(e.stateNode,t,2),e=Jn(e,t,2),e!==null&&(ts(e,2),hn(e))}function De(e,t,n){if(e.tag===3)Xm(e,e,n);else for(;t!==null;){if(t.tag===3){Xm(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(na===null||!na.has(l))){e=$t(n,e),n=Zh(2),l=Jn(t,n,2),l!==null&&(Ih(n,l,t,e),ts(l,2),hn(l));break}}t=t.return}}function su(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new d0;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(n)||(Fo=!0,o.add(n),e=g0.bind(null,e,t,n),t.then(e,e))}function g0(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ue===e&&(Ee&n)===n&&(Ve===4||Ve===3&&(Ee&62914560)===Ee&&300>ht()-nr?(ze&2)===0&&Ci(e,0):Po|=n,ji===Ee&&(ji=0)),hn(e)}function Zm(e,t){t===0&&(t=$d()),e=Na(e,t),e!==null&&(ts(e,t),hn(e))}function y0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zm(e,n)}function v0(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),Zm(e,n)}function b0(e,t){return Lt(e,t)}var or=null,Ai=null,lu=!1,ur=!1,ru=!1,sa=0;function hn(e){e!==Ai&&e.next===null&&(Ai===null?or=Ai=e:Ai=Ai.next=e),ur=!0,lu||(lu=!0,S0())}function Rs(e,t){if(!ru&&ur){ru=!0;do for(var n=!1,l=or;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var f=0;else{var p=l.suspendedLanes,v=l.pingedLanes;f=(1<<31-Et(42|e)+1)-1,f&=o&~(p&~v),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(n=!0,Pm(l,f))}else f=Ee,f=ml(l,l===Ue?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||es(l,f)||(n=!0,Pm(l,f));l=l.next}while(n);ru=!1}}function x0(){Im()}function Im(){ur=lu=!1;var e=0;sa!==0&&z0()&&(e=sa);for(var t=ht(),n=null,l=or;l!==null;){var o=l.next,f=Jm(l,t);f===0?(l.next=null,n===null?or=o:n.next=o,o===null&&(Ai=n)):(n=l,(e!==0||(f&3)!==0)&&(ur=!0)),l=o}at!==0&&at!==5||Rs(e),sa!==0&&(sa=0)}function Jm(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var p=31-Et(f),v=1<<p,C=o[p];C===-1?((v&n)===0||(v&l)!==0)&&(o[p]=Xv(v,t)):C<=t&&(e.expiredLanes|=v),f&=~v}if(t=Ue,n=Ee,n=ml(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(_e===2||_e===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&yn(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||es(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&yn(l),Sc(n)){case 2:case 8:n=ul;break;case 32:n=Ut;break;case 268435456:n=ae;break;default:n=Ut}return l=Fm.bind(null,e),n=Lt(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&yn(l),e.callbackPriority=2,e.callbackNode=null,2}function Fm(e,t){if(at!==0&&at!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(cr()&&e.callbackNode!==n)return null;var l=Ee;return l=ml(e,e===Ue?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(_m(e,l,t),Jm(e,ht()),e.callbackNode!=null&&e.callbackNode===n?Fm.bind(null,e):null)}function Pm(e,t){if(cr())return null;_m(e,t,!0)}function S0(){D0(function(){(ze&6)!==0?Lt(ol,x0):Im()})}function cu(){if(sa===0){var e=fi;e===0&&(e=dl,dl<<=1,(dl&261888)===0&&(dl=256)),sa=e}return sa}function Wm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:vl(""+e)}function ep(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function w0(e,t,n,l,o){if(t==="submit"&&n&&n.stateNode===o){var f=Wm((o[vt]||null).action),p=l.submitter;p&&(t=(t=p[vt]||null)?Wm(t.formAction):p.getAttribute("formAction"),t!==null&&(f=t,p=null));var v=new wl("action","action",null,l,o);e.push({event:v,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(sa!==0){var C=p?ep(o,p):new FormData(o);ko(n,{pending:!0,data:C,method:o.method,action:f},null,C)}}else typeof f=="function"&&(v.preventDefault(),C=p?ep(o,p):new FormData(o),ko(n,{pending:!0,data:C,method:o.method,action:f},f,C))},currentTarget:o}]})}}for(var ou=0;ou<Gc.length;ou++){var uu=Gc[ou],j0=uu.toLowerCase(),N0=uu[0].toUpperCase()+uu.slice(1);tn(j0,"on"+N0)}tn(zf,"onAnimationEnd"),tn(_f,"onAnimationIteration"),tn(Df,"onAnimationStart"),tn("dblclick","onDoubleClick"),tn("focusin","onFocus"),tn("focusout","onBlur"),tn(qb,"onTransitionRun"),tn($b,"onTransitionStart"),tn(Yb,"onTransitionCancel"),tn(Mf,"onTransitionEnd"),Pa("onMouseEnter",["mouseout","mouseover"]),Pa("onMouseLeave",["mouseout","mouseover"]),Pa("onPointerEnter",["pointerout","pointerover"]),Pa("onPointerLeave",["pointerout","pointerover"]),xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xa("onBeforeInput",["compositionend","keypress","textInput","paste"]),xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ls="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(" "),C0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ls));function tp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],o=l.event;l=l.listeners;e:{var f=void 0;if(t)for(var p=l.length-1;0<=p;p--){var v=l[p],C=v.instance,U=v.currentTarget;if(v=v.listener,C!==f&&o.isPropagationStopped())break e;f=v,o.currentTarget=U;try{f(o)}catch(K){Cl(K)}o.currentTarget=null,f=C}else for(p=0;p<l.length;p++){if(v=l[p],C=v.instance,U=v.currentTarget,v=v.listener,C!==f&&o.isPropagationStopped())break e;f=v,o.currentTarget=U;try{f(o)}catch(K){Cl(K)}o.currentTarget=null,f=C}}}}function Ce(e,t){var n=t[wc];n===void 0&&(n=t[wc]=new Set);var l=e+"__bubble";n.has(l)||(np(t,e,2,!1),n.add(l))}function du(e,t,n){var l=0;t&&(l|=4),np(n,e,l,t)}var dr="_reactListening"+Math.random().toString(36).slice(2);function fu(e){if(!e[dr]){e[dr]=!0,Zd.forEach(function(n){n!=="selectionchange"&&(C0.has(n)||du(n,!1,e),du(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[dr]||(t[dr]=!0,du("selectionchange",!1,t))}}function np(e,t,n,l){switch(zp(t)){case 2:var o=W0;break;case 8:o=ex;break;default:o=Au}n=o.bind(null,t,n,e),o=void 0,!zc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function hu(e,t,n,l,o){var f=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var p=l.tag;if(p===3||p===4){var v=l.stateNode.containerInfo;if(v===o)break;if(p===4)for(p=l.return;p!==null;){var C=p.tag;if((C===3||C===4)&&p.stateNode.containerInfo===o)return;p=p.return}for(;v!==null;){if(p=Ia(v),p===null)return;if(C=p.tag,C===5||C===6||C===26||C===27){l=f=p;continue e}v=v.parentNode}}l=l.return}rf(function(){var U=f,K=Tc(n),Q=[];e:{var B=Rf.get(e);if(B!==void 0){var $=wl,le=e;switch(e){case"keypress":if(xl(n)===0)break e;case"keydown":case"keyup":$=vb;break;case"focusin":le="focus",$=Rc;break;case"focusout":le="blur",$=Rc;break;case"beforeblur":case"afterblur":$=Rc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":$=uf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=lb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=Sb;break;case zf:case _f:case Df:$=ob;break;case Mf:$=jb;break;case"scroll":case"scrollend":$=ib;break;case"wheel":$=Cb;break;case"copy":case"cut":case"paste":$=db;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=ff;break;case"toggle":case"beforetoggle":$=Ab}var he=(t&4)!==0,Le=!he&&(e==="scroll"||e==="scrollend"),O=he?B!==null?B+"Capture":null:B;he=[];for(var k=U,R;k!==null;){var V=k;if(R=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||R===null||O===null||(V=is(k,O),V!=null&&he.push(Us(k,V,R))),Le)break;k=k.return}0<he.length&&(B=new $(B,le,null,n,K),Q.push({event:B,listeners:he}))}}if((t&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",$=e==="mouseout"||e==="pointerout",B&&n!==kc&&(le=n.relatedTarget||n.fromElement)&&(Ia(le)||le[Za]))break e;if(($||B)&&(B=K.window===K?K:(B=K.ownerDocument)?B.defaultView||B.parentWindow:window,$?(le=n.relatedTarget||n.toElement,$=U,le=le?Ia(le):null,le!==null&&(Le=d(le),he=le.tag,le!==Le||he!==5&&he!==27&&he!==6)&&(le=null)):($=null,le=U),$!==le)){if(he=uf,V="onMouseLeave",O="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(he=ff,V="onPointerLeave",O="onPointerEnter",k="pointer"),Le=$==null?B:as($),R=le==null?B:as(le),B=new he(V,k+"leave",$,n,K),B.target=Le,B.relatedTarget=R,V=null,Ia(K)===U&&(he=new he(O,k+"enter",le,n,K),he.target=R,he.relatedTarget=Le,V=he),Le=V,$&&le)t:{for(he=E0,O=$,k=le,R=0,V=O;V;V=he(V))R++;V=0;for(var de=k;de;de=he(de))V++;for(;0<R-V;)O=he(O),R--;for(;0<V-R;)k=he(k),V--;for(;R--;){if(O===k||k!==null&&O===k.alternate){he=O;break t}O=he(O),k=he(k)}he=null}else he=null;$!==null&&ap(Q,B,$,he,!1),le!==null&&Le!==null&&ap(Q,Le,le,he,!0)}}e:{if(B=U?as(U):window,$=B.nodeName&&B.nodeName.toLowerCase(),$==="select"||$==="input"&&B.type==="file")var Te=xf;else if(vf(B))if(Sf)Te=Ub;else{Te=Rb;var oe=Mb}else $=B.nodeName,!$||$.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?U&&Ac(U.elementType)&&(Te=xf):Te=Lb;if(Te&&(Te=Te(e,U))){bf(Q,Te,n,K);break e}oe&&oe(e,B,U),e==="focusout"&&U&&B.type==="number"&&U.memoizedProps.value!=null&&Ec(B,"number",B.value)}switch(oe=U?as(U):window,e){case"focusin":(vf(oe)||oe.contentEditable==="true")&&(ii=oe,$c=U,fs=null);break;case"focusout":fs=$c=ii=null;break;case"mousedown":Yc=!0;break;case"contextmenu":case"mouseup":case"dragend":Yc=!1,Tf(Q,n,K);break;case"selectionchange":if(Hb)break;case"keydown":case"keyup":Tf(Q,n,K)}var we;if(Uc)e:{switch(e){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else ai?gf(e,n)&&(Ae="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ae="onCompositionStart");Ae&&(hf&&n.locale!=="ko"&&(ai||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&ai&&(we=cf()):(Kn=K,_c="value"in Kn?Kn.value:Kn.textContent,ai=!0)),oe=fr(U,Ae),0<oe.length&&(Ae=new df(Ae,e,null,n,K),Q.push({event:Ae,listeners:oe}),we?Ae.data=we:(we=yf(n),we!==null&&(Ae.data=we)))),(we=Tb?Ob(e,n):zb(e,n))&&(Ae=fr(U,"onBeforeInput"),0<Ae.length&&(oe=new df("onBeforeInput","beforeinput",null,n,K),Q.push({event:oe,listeners:Ae}),oe.data=we)),w0(Q,e,U,n,K)}tp(Q,t)})}function Us(e,t,n){return{instance:e,listener:t,currentTarget:n}}function fr(e,t){for(var n=t+"Capture",l=[];e!==null;){var o=e,f=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||f===null||(o=is(e,n),o!=null&&l.unshift(Us(e,o,f)),o=is(e,t),o!=null&&l.push(Us(e,o,f))),e.tag===3)return l;e=e.return}return[]}function E0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ap(e,t,n,l,o){for(var f=t._reactName,p=[];n!==null&&n!==l;){var v=n,C=v.alternate,U=v.stateNode;if(v=v.tag,C!==null&&C===l)break;v!==5&&v!==26&&v!==27||U===null||(C=U,o?(U=is(n,f),U!=null&&p.unshift(Us(n,U,C))):o||(U=is(n,f),U!=null&&p.push(Us(n,U,C)))),n=n.return}p.length!==0&&e.push({event:t,listeners:p})}var A0=/\r\n?/g,k0=/\u0000|\uFFFD/g;function ip(e){return(typeof e=="string"?e:""+e).replace(A0,`
9
- `).replace(k0,"")}function sp(e,t){return t=ip(t),ip(e)===t}function Re(e,t,n,l,o,f){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||ei(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&ei(e,""+l);break;case"className":gl(e,"class",l);break;case"tabIndex":gl(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":gl(e,n,l);break;case"style":sf(e,l,f);break;case"data":if(t!=="object"){gl(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=vl(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(n==="formAction"?(t!=="input"&&Re(e,t,"name",o.name,o,null),Re(e,t,"formEncType",o.formEncType,o,null),Re(e,t,"formMethod",o.formMethod,o,null),Re(e,t,"formTarget",o.formTarget,o,null)):(Re(e,t,"encType",o.encType,o,null),Re(e,t,"method",o.method,o,null),Re(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=vl(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=xn);break;case"onScroll":l!=null&&Ce("scroll",e);break;case"onScrollEnd":l!=null&&Ce("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=vl(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":Ce("beforetoggle",e),Ce("toggle",e),pl(e,"popover",l);break;case"xlinkActuate":bn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":bn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":bn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":bn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":bn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":bn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":bn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":bn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":bn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":pl(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=nb.get(n)||n,pl(e,n,l))}}function mu(e,t,n,l,o,f){switch(n){case"style":sf(e,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"children":typeof l=="string"?ei(e,l):(typeof l=="number"||typeof l=="bigint")&&ei(e,""+l);break;case"onScroll":l!=null&&Ce("scroll",e);break;case"onScrollEnd":l!=null&&Ce("scrollend",e);break;case"onClick":l!=null&&(e.onclick=xn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Id.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),f=e[vt]||null,f=f!=null?f[n]:null,typeof f=="function"&&e.removeEventListener(t,f,o),typeof l=="function")){typeof f!="function"&&f!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,o);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):pl(e,n,l)}}}function dt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ce("error",e),Ce("load",e);var l=!1,o=!1,f;for(f in n)if(n.hasOwnProperty(f)){var p=n[f];if(p!=null)switch(f){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Re(e,t,f,p,n,null)}}o&&Re(e,t,"srcSet",n.srcSet,n,null),l&&Re(e,t,"src",n.src,n,null);return;case"input":Ce("invalid",e);var v=f=p=o=null,C=null,U=null;for(l in n)if(n.hasOwnProperty(l)){var K=n[l];if(K!=null)switch(l){case"name":o=K;break;case"type":p=K;break;case"checked":C=K;break;case"defaultChecked":U=K;break;case"value":f=K;break;case"defaultValue":v=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(r(137,t));break;default:Re(e,t,l,K,n,null)}}ef(e,f,v,C,U,p,o,!1);return;case"select":Ce("invalid",e),l=p=f=null;for(o in n)if(n.hasOwnProperty(o)&&(v=n[o],v!=null))switch(o){case"value":f=v;break;case"defaultValue":p=v;break;case"multiple":l=v;default:Re(e,t,o,v,n,null)}t=f,n=p,e.multiple=!!l,t!=null?Wa(e,!!l,t,!1):n!=null&&Wa(e,!!l,n,!0);return;case"textarea":Ce("invalid",e),f=o=l=null;for(p in n)if(n.hasOwnProperty(p)&&(v=n[p],v!=null))switch(p){case"value":l=v;break;case"defaultValue":o=v;break;case"children":f=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:Re(e,t,p,v,n,null)}nf(e,l,o,f);return;case"option":for(C in n)n.hasOwnProperty(C)&&(l=n[C],l!=null)&&(C==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Re(e,t,C,l,n,null));return;case"dialog":Ce("beforetoggle",e),Ce("toggle",e),Ce("cancel",e),Ce("close",e);break;case"iframe":case"object":Ce("load",e);break;case"video":case"audio":for(l=0;l<Ls.length;l++)Ce(Ls[l],e);break;case"image":Ce("error",e),Ce("load",e);break;case"details":Ce("toggle",e);break;case"embed":case"source":case"link":Ce("error",e),Ce("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(U in n)if(n.hasOwnProperty(U)&&(l=n[U],l!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Re(e,t,U,l,n,null)}return;default:if(Ac(t)){for(K in n)n.hasOwnProperty(K)&&(l=n[K],l!==void 0&&mu(e,t,K,l,n,void 0));return}}for(v in n)n.hasOwnProperty(v)&&(l=n[v],l!=null&&Re(e,t,v,l,n,null))}function T0(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,f=null,p=null,v=null,C=null,U=null,K=null;for($ in n){var Q=n[$];if(n.hasOwnProperty($)&&Q!=null)switch($){case"checked":break;case"value":break;case"defaultValue":C=Q;default:l.hasOwnProperty($)||Re(e,t,$,null,l,Q)}}for(var B in l){var $=l[B];if(Q=n[B],l.hasOwnProperty(B)&&($!=null||Q!=null))switch(B){case"type":f=$;break;case"name":o=$;break;case"checked":U=$;break;case"defaultChecked":K=$;break;case"value":p=$;break;case"defaultValue":v=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(r(137,t));break;default:$!==Q&&Re(e,t,B,$,l,Q)}}Cc(e,p,v,C,U,K,f,o);return;case"select":$=p=v=B=null;for(f in n)if(C=n[f],n.hasOwnProperty(f)&&C!=null)switch(f){case"value":break;case"multiple":$=C;default:l.hasOwnProperty(f)||Re(e,t,f,null,l,C)}for(o in l)if(f=l[o],C=n[o],l.hasOwnProperty(o)&&(f!=null||C!=null))switch(o){case"value":B=f;break;case"defaultValue":v=f;break;case"multiple":p=f;default:f!==C&&Re(e,t,o,f,l,C)}t=v,n=p,l=$,B!=null?Wa(e,!!n,B,!1):!!l!=!!n&&(t!=null?Wa(e,!!n,t,!0):Wa(e,!!n,n?[]:"",!1));return;case"textarea":$=B=null;for(v in n)if(o=n[v],n.hasOwnProperty(v)&&o!=null&&!l.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Re(e,t,v,null,l,o)}for(p in l)if(o=l[p],f=n[p],l.hasOwnProperty(p)&&(o!=null||f!=null))switch(p){case"value":B=o;break;case"defaultValue":$=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==f&&Re(e,t,p,o,l,f)}tf(e,B,$);return;case"option":for(var le in n)B=n[le],n.hasOwnProperty(le)&&B!=null&&!l.hasOwnProperty(le)&&(le==="selected"?e.selected=!1:Re(e,t,le,null,l,B));for(C in l)B=l[C],$=n[C],l.hasOwnProperty(C)&&B!==$&&(B!=null||$!=null)&&(C==="selected"?e.selected=B&&typeof B!="function"&&typeof B!="symbol":Re(e,t,C,B,l,$));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 he in n)B=n[he],n.hasOwnProperty(he)&&B!=null&&!l.hasOwnProperty(he)&&Re(e,t,he,null,l,B);for(U in l)if(B=l[U],$=n[U],l.hasOwnProperty(U)&&B!==$&&(B!=null||$!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,t));break;default:Re(e,t,U,B,l,$)}return;default:if(Ac(t)){for(var Le in n)B=n[Le],n.hasOwnProperty(Le)&&B!==void 0&&!l.hasOwnProperty(Le)&&mu(e,t,Le,void 0,l,B);for(K in l)B=l[K],$=n[K],!l.hasOwnProperty(K)||B===$||B===void 0&&$===void 0||mu(e,t,K,B,l,$);return}}for(var O in n)B=n[O],n.hasOwnProperty(O)&&B!=null&&!l.hasOwnProperty(O)&&Re(e,t,O,null,l,B);for(Q in l)B=l[Q],$=n[Q],!l.hasOwnProperty(Q)||B===$||B==null&&$==null||Re(e,t,Q,B,l,$)}function lp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function O0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var o=n[l],f=o.transferSize,p=o.initiatorType,v=o.duration;if(f&&v&&lp(p)){for(p=0,v=o.responseEnd,l+=1;l<n.length;l++){var C=n[l],U=C.startTime;if(U>v)break;var K=C.transferSize,Q=C.initiatorType;K&&lp(Q)&&(C=C.responseEnd,p+=K*(C<v?1:(v-U)/(C-U)))}if(--l,t+=8*(f+p)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var pu=null,gu=null;function hr(e){return e.nodeType===9?e:e.ownerDocument}function rp(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 cp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function yu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var vu=null;function z0(){var e=window.event;return e&&e.type==="popstate"?e===vu?!1:(vu=e,!0):(vu=null,!1)}var op=typeof setTimeout=="function"?setTimeout:void 0,_0=typeof clearTimeout=="function"?clearTimeout:void 0,up=typeof Promise=="function"?Promise:void 0,D0=typeof queueMicrotask=="function"?queueMicrotask:typeof up<"u"?function(e){return up.resolve(null).then(e).catch(M0)}:op;function M0(e){setTimeout(function(){throw e})}function la(e){return e==="head"}function dp(e,t){var n=t,l=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(o),zi(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")Bs(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Bs(n);for(var f=n.firstChild;f;){var p=f.nextSibling,v=f.nodeName;f[ns]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&f.rel.toLowerCase()==="stylesheet"||n.removeChild(f),f=p}}else n==="body"&&Bs(e.ownerDocument.body);n=o}while(n);zi(t)}function fp(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function bu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":bu(n),jc(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function R0(e,t,n,l){for(;e.nodeType===1;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ns])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Qt(e.nextSibling),e===null)break}return null}function L0(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Qt(e.nextSibling),e===null))return null;return e}function hp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Qt(e.nextSibling),e===null))return null;return e}function xu(e){return e.data==="$?"||e.data==="$~"}function Su(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function U0(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Qt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var wu=null;function mp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Qt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function pp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function gp(e,t,n){switch(t=hr(n),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Bs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);jc(e)}var Xt=new Map,yp=new Set;function mr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ln=J.d;J.d={f:B0,r:H0,D:q0,C:$0,L:Y0,m:K0,X:V0,S:G0,M:Q0};function B0(){var e=Ln.f(),t=sr();return e||t}function H0(e){var t=Ja(e);t!==null&&t.tag===5&&t.type==="form"?Mh(t):Ln.r(e)}var ki=typeof document>"u"?null:document;function vp(e,t,n){var l=ki;if(l&&typeof t=="string"&&t){var o=Ht(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),yp.has(o)||(yp.add(o),e={rel:e,crossOrigin:n,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),dt(t,"link",e),st(t),l.head.appendChild(t)))}}function q0(e){Ln.D(e),vp("dns-prefetch",e,null)}function $0(e,t){Ln.C(e,t),vp("preconnect",e,t)}function Y0(e,t,n){Ln.L(e,t,n);var l=ki;if(l&&e&&t){var o='link[rel="preload"][as="'+Ht(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+Ht(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+Ht(n.imageSizes)+'"]')):o+='[href="'+Ht(e)+'"]';var f=o;switch(t){case"style":f=Ti(e);break;case"script":f=Oi(e)}Xt.has(f)||(e=b({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Xt.set(f,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(Hs(f))||t==="script"&&l.querySelector(qs(f))||(t=l.createElement("link"),dt(t,"link",e),st(t),l.head.appendChild(t)))}}function K0(e,t){Ln.m(e,t);var n=ki;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Ht(l)+'"][href="'+Ht(e)+'"]',f=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Oi(e)}if(!Xt.has(f)&&(e=b({rel:"modulepreload",href:e},t),Xt.set(f,e),n.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(qs(f)))return}l=n.createElement("link"),dt(l,"link",e),st(l),n.head.appendChild(l)}}}function G0(e,t,n){Ln.S(e,t,n);var l=ki;if(l&&e){var o=Fa(l).hoistableStyles,f=Ti(e);t=t||"default";var p=o.get(f);if(!p){var v={loading:0,preload:null};if(p=l.querySelector(Hs(f)))v.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Xt.get(f))&&ju(e,n);var C=p=l.createElement("link");st(C),dt(C,"link",e),C._p=new Promise(function(U,K){C.onload=U,C.onerror=K}),C.addEventListener("load",function(){v.loading|=1}),C.addEventListener("error",function(){v.loading|=2}),v.loading|=4,pr(p,t,l)}p={type:"stylesheet",instance:p,count:1,state:v},o.set(f,p)}}}function V0(e,t){Ln.X(e,t);var n=ki;if(n&&e){var l=Fa(n).hoistableScripts,o=Oi(e),f=l.get(o);f||(f=n.querySelector(qs(o)),f||(e=b({src:e,async:!0},t),(t=Xt.get(o))&&Nu(e,t),f=n.createElement("script"),st(f),dt(f,"link",e),n.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(o,f))}}function Q0(e,t){Ln.M(e,t);var n=ki;if(n&&e){var l=Fa(n).hoistableScripts,o=Oi(e),f=l.get(o);f||(f=n.querySelector(qs(o)),f||(e=b({src:e,async:!0,type:"module"},t),(t=Xt.get(o))&&Nu(e,t),f=n.createElement("script"),st(f),dt(f,"link",e),n.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(o,f))}}function bp(e,t,n,l){var o=(o=ie.current)?mr(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ti(n.href),n=Fa(o).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ti(n.href);var f=Fa(o).hoistableStyles,p=f.get(e);if(p||(o=o.ownerDocument||o,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,p),(f=o.querySelector(Hs(e)))&&!f._p&&(p.instance=f,p.state.loading=5),Xt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Xt.set(e,n),f||X0(o,e,n,p.state))),t&&l===null)throw Error(r(528,""));return p}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Oi(n),n=Fa(o).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ti(e){return'href="'+Ht(e)+'"'}function Hs(e){return'link[rel="stylesheet"]['+e+"]"}function xp(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function X0(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),dt(t,"link",n),st(t),e.head.appendChild(t))}function Oi(e){return'[src="'+Ht(e)+'"]'}function qs(e){return"script[async]"+e}function Sp(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Ht(n.href)+'"]');if(l)return t.instance=l,st(l),l;var o=b({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),st(l),dt(l,"style",o),pr(l,n.precedence,e),t.instance=l;case"stylesheet":o=Ti(n.href);var f=e.querySelector(Hs(o));if(f)return t.state.loading|=4,t.instance=f,st(f),f;l=xp(n),(o=Xt.get(o))&&ju(l,o),f=(e.ownerDocument||e).createElement("link"),st(f);var p=f;return p._p=new Promise(function(v,C){p.onload=v,p.onerror=C}),dt(f,"link",l),t.state.loading|=4,pr(f,n.precedence,e),t.instance=f;case"script":return f=Oi(n.src),(o=e.querySelector(qs(f)))?(t.instance=o,st(o),o):(l=n,(o=Xt.get(f))&&(l=b({},n),Nu(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),st(o),dt(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,pr(l,n.precedence,e));return t.instance}function pr(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,f=o,p=0;p<l.length;p++){var v=l[p];if(v.dataset.precedence===t)f=v;else if(f!==o)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function ju(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Nu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var gr=null;function wp(e,t,n){if(gr===null){var l=new Map,o=gr=new Map;o.set(n,l)}else o=gr,l=o.get(n),l||(l=new Map,o.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var f=n[o];if(!(f[ns]||f[rt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var p=f.getAttribute(t)||"";p=e+p;var v=l.get(p);v?v.push(f):l.set(p,[f])}}return l}function jp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Z0(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Np(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function I0(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var o=Ti(l.href),f=t.querySelector(Hs(o));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=yr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=f,st(f);return}f=t.ownerDocument||t,l=xp(l),(o=Xt.get(o))&&ju(l,o),f=f.createElement("link"),st(f);var p=f;p._p=new Promise(function(v,C){p.onload=v,p.onerror=C}),dt(f,"link",l),n.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=yr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Cu=0;function J0(e,t){return e.stylesheets&&e.count===0&&br(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&br(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&Cu===0&&(Cu=62500*O0());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&br(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Cu?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function yr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)br(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var vr=null;function br(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,vr=new Map,t.forEach(F0,e),vr=null,yr.call(e))}function F0(e,t){if(!(t.state.loading&4)){var n=vr.get(e);if(n)var l=n.get(null);else{n=new Map,vr.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<o.length;f++){var p=o[f];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(n.set(p.dataset.precedence,p),l=p)}l&&n.set(null,l)}o=t.instance,p=o.getAttribute("data-precedence"),f=n.get(p)||l,f===l&&n.set(null,o),n.set(p,o),this.count++,l=yr.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),f?f.parentNode.insertBefore(o,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var $s={$$typeof:M,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function P0(e,t,n,l,o,f,p,v,C){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=bc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bc(0),this.hiddenUpdates=bc(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=f,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Cp(e,t,n,l,o,f,p,v,C,U,K,Q){return e=new P0(e,t,n,p,C,U,K,Q,v),t=1,f===!0&&(t|=24),f=kt(3,null,null,t),e.current=f,f.stateNode=e,t=ao(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:l,isDehydrated:n,cache:t},ro(f),e}function Ep(e){return e?(e=ri,e):ri}function Ap(e,t,n,l,o,f){o=Ep(o),l.context===null?l.context=o:l.pendingContext=o,l=In(t),l.payload={element:n},f=f===void 0?null:f,f!==null&&(l.callback=f),n=Jn(e,l,t),n!==null&&(Nt(n,e,t),bs(n,e,t))}function kp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Eu(e,t){kp(e,t),(e=e.alternate)&&kp(e,t)}function Tp(e){if(e.tag===13||e.tag===31){var t=Na(e,67108864);t!==null&&Nt(t,e,67108864),Eu(e,67108864)}}function Op(e){if(e.tag===13||e.tag===31){var t=Dt();t=xc(t);var n=Na(e,t);n!==null&&Nt(n,e,t),Eu(e,t)}}var xr=!0;function W0(e,t,n,l){var o=L.T;L.T=null;var f=J.p;try{J.p=2,Au(e,t,n,l)}finally{J.p=f,L.T=o}}function ex(e,t,n,l){var o=L.T;L.T=null;var f=J.p;try{J.p=8,Au(e,t,n,l)}finally{J.p=f,L.T=o}}function Au(e,t,n,l){if(xr){var o=ku(l);if(o===null)hu(e,t,l,Sr,n),_p(e,l);else if(nx(o,e,t,n,l))l.stopPropagation();else if(_p(e,l),t&4&&-1<tx.indexOf(e)){for(;o!==null;){var f=Ja(o);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var p=ba(f.pendingLanes);if(p!==0){var v=f;for(v.pendingLanes|=2,v.entangledLanes|=2;p;){var C=1<<31-Et(p);v.entanglements[1]|=C,p&=~C}hn(f),(ze&6)===0&&(ar=ht()+500,Rs(0))}}break;case 31:case 13:v=Na(f,2),v!==null&&Nt(v,f,2),sr(),Eu(f,2)}if(f=ku(l),f===null&&hu(e,t,l,Sr,n),f===o)break;o=f}o!==null&&l.stopPropagation()}else hu(e,t,l,null,n)}}function ku(e){return e=Tc(e),Tu(e)}var Sr=null;function Tu(e){if(Sr=null,e=Ia(e),e!==null){var t=d(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=h(t),e!==null)return e;e=null}else if(n===31){if(e=m(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Sr=e,null}function zp(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(yc()){case ol:return 2;case ul:return 8;case Ut:case vc:return 32;case ae:return 268435456;default:return 32}default:return 32}}var Ou=!1,ra=null,ca=null,oa=null,Ys=new Map,Ks=new Map,ua=[],tx="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 _p(e,t){switch(e){case"focusin":case"focusout":ra=null;break;case"dragenter":case"dragleave":ca=null;break;case"mouseover":case"mouseout":oa=null;break;case"pointerover":case"pointerout":Ys.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ks.delete(t.pointerId)}}function Gs(e,t,n,l,o,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:f,targetContainers:[o]},t!==null&&(t=Ja(t),t!==null&&Tp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function nx(e,t,n,l,o){switch(t){case"focusin":return ra=Gs(ra,e,t,n,l,o),!0;case"dragenter":return ca=Gs(ca,e,t,n,l,o),!0;case"mouseover":return oa=Gs(oa,e,t,n,l,o),!0;case"pointerover":var f=o.pointerId;return Ys.set(f,Gs(Ys.get(f)||null,e,t,n,l,o)),!0;case"gotpointercapture":return f=o.pointerId,Ks.set(f,Gs(Ks.get(f)||null,e,t,n,l,o)),!0}return!1}function Dp(e){var t=Ia(e.target);if(t!==null){var n=d(t);if(n!==null){if(t=n.tag,t===13){if(t=h(n),t!==null){e.blockedOn=t,Qd(e.priority,function(){Op(n)});return}}else if(t===31){if(t=m(n),t!==null){e.blockedOn=t,Qd(e.priority,function(){Op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ku(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);kc=l,n.target.dispatchEvent(l),kc=null}else return t=Ja(n),t!==null&&Tp(t),e.blockedOn=n,!1;t.shift()}return!0}function Mp(e,t,n){wr(e)&&n.delete(t)}function ax(){Ou=!1,ra!==null&&wr(ra)&&(ra=null),ca!==null&&wr(ca)&&(ca=null),oa!==null&&wr(oa)&&(oa=null),Ys.forEach(Mp),Ks.forEach(Mp)}function jr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ou||(Ou=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,ax)))}var Nr=null;function Rp(e){Nr!==e&&(Nr=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){Nr===e&&(Nr=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(Tu(l||n)===null)continue;break}var f=Ja(n);f!==null&&(e.splice(t,3),t-=3,ko(f,{pending:!0,data:o,method:n.method,action:l},l,o))}}))}function zi(e){function t(C){return jr(C,e)}ra!==null&&jr(ra,e),ca!==null&&jr(ca,e),oa!==null&&jr(oa,e),Ys.forEach(t),Ks.forEach(t);for(var n=0;n<ua.length;n++){var l=ua[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<ua.length&&(n=ua[0],n.blockedOn===null);)Dp(n),n.blockedOn===null&&ua.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var o=n[l],f=n[l+1],p=o[vt]||null;if(typeof f=="function")p||Rp(n);else if(p){var v=null;if(f&&f.hasAttribute("formAction")){if(o=f,p=f[vt]||null)v=p.formAction;else if(Tu(o)!==null)continue}else v=p.action;typeof v=="function"?n[l+1]=v:(n.splice(l,3),l-=3),Rp(n)}}}function Lp(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(p){return o=p})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function zu(e){this._internalRoot=e}Cr.prototype.render=zu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,l=Dt();Ap(n,l,e,t,null,null)},Cr.prototype.unmount=zu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ap(e.current,2,null,e,null,null),sr(),t[Za]=null}};function Cr(e){this._internalRoot=e}Cr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vd();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ua.length&&t!==0&&t<ua[n].priority;n++);ua.splice(n,0,e),n===0&&Dp(e)}};var Up=i.version;if(Up!=="19.2.4")throw Error(r(527,Up,"19.2.4"));J.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=g(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var ix={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Er=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Er.isDisabled&&Er.supportsFiber)try{Wi=Er.inject(ix),Ct=Er}catch{}}return Qs.createRoot=function(e,t){if(!c(e))throw Error(r(299));var n=!1,l="",o=Gh,f=Vh,p=Qh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=Cp(e,1,!1,null,null,n,l,null,o,f,p,Lp),e[Za]=t.current,fu(e),new zu(t)},Qs.hydrateRoot=function(e,t,n){if(!c(e))throw Error(r(299));var l=!1,o="",f=Gh,p=Vh,v=Qh,C=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.formState!==void 0&&(C=n.formState)),t=Cp(e,1,!0,t,n??null,l,o,C,f,p,v,Lp),t.context=Ep(null),n=t.current,l=Dt(),l=xc(l),o=In(l),o.callback=null,Jn(n,o,l),n=l,t.current.lanes=n,ts(t,n),hn(t),e[Za]=t.current,fu(e),new Cr(t)},Qs.version="19.2.4",Qs}var Xp;function px(){if(Xp)return Mu.exports;Xp=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),Mu.exports=mx(),Mu.exports}var gx=px();const dd=Symbol.for("yaml.alias"),Wu=Symbol.for("yaml.document"),ga=Symbol.for("yaml.map"),Ug=Symbol.for("yaml.pair"),pn=Symbol.for("yaml.scalar"),Xi=Symbol.for("yaml.seq"),Jt=Symbol.for("yaml.node.type"),Ka=a=>!!a&&typeof a=="object"&&a[Jt]===dd,tc=a=>!!a&&typeof a=="object"&&a[Jt]===Wu,al=a=>!!a&&typeof a=="object"&&a[Jt]===ga,Fe=a=>!!a&&typeof a=="object"&&a[Jt]===Ug,Be=a=>!!a&&typeof a=="object"&&a[Jt]===pn,il=a=>!!a&&typeof a=="object"&&a[Jt]===Xi;function Ze(a){if(a&&typeof a=="object")switch(a[Jt]){case ga:case Xi:return!0}return!1}function Je(a){if(a&&typeof a=="object")switch(a[Jt]){case dd:case ga:case pn:case Xi:return!0}return!1}const Bg=a=>(Be(a)||Ze(a))&&!!a.anchor,Ba=Symbol("break visit"),yx=Symbol("skip children"),Fs=Symbol("remove node");function Zi(a,i){const s=vx(i);tc(a)?Ui(null,a.contents,s,Object.freeze([a]))===Fs&&(a.contents=null):Ui(null,a,s,Object.freeze([]))}Zi.BREAK=Ba;Zi.SKIP=yx;Zi.REMOVE=Fs;function Ui(a,i,s,r){const c=bx(a,i,s,r);if(Je(c)||Fe(c))return xx(a,r,c),Ui(a,c,s,r);if(typeof c!="symbol"){if(Ze(i)){r=Object.freeze(r.concat(i));for(let d=0;d<i.items.length;++d){const h=Ui(d,i.items[d],s,r);if(typeof h=="number")d=h-1;else{if(h===Ba)return Ba;h===Fs&&(i.items.splice(d,1),d-=1)}}}else if(Fe(i)){r=Object.freeze(r.concat(i));const d=Ui("key",i.key,s,r);if(d===Ba)return Ba;d===Fs&&(i.key=null);const h=Ui("value",i.value,s,r);if(h===Ba)return Ba;h===Fs&&(i.value=null)}}return c}function vx(a){return typeof a=="object"&&(a.Collection||a.Node||a.Value)?Object.assign({Alias:a.Node,Map:a.Node,Scalar:a.Node,Seq:a.Node},a.Value&&{Map:a.Value,Scalar:a.Value,Seq:a.Value},a.Collection&&{Map:a.Collection,Seq:a.Collection},a):a}function bx(a,i,s,r){if(typeof s=="function")return s(a,i,r);if(al(i))return s.Map?.(a,i,r);if(il(i))return s.Seq?.(a,i,r);if(Fe(i))return s.Pair?.(a,i,r);if(Be(i))return s.Scalar?.(a,i,r);if(Ka(i))return s.Alias?.(a,i,r)}function xx(a,i,s){const r=i[i.length-1];if(Ze(r))r.items[a]=s;else if(Fe(r))a==="key"?r.key=s:r.value=s;else if(tc(r))r.contents=s;else{const c=Ka(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${c} parent`)}}const Sx={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},wx=a=>a.replace(/[!,[\]{}]/g,i=>Sx[i]);class pt{constructor(i,s){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},pt.defaultYaml,i),this.tags=Object.assign({},pt.defaultTags,s)}clone(){const i=new pt(this.yaml,this.tags);return i.docStart=this.docStart,i}atDocument(){const i=new pt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:pt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},pt.defaultTags);break}return i}add(i,s){this.atNextDocument&&(this.yaml={explicit:pt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},pt.defaultTags),this.atNextDocument=!1);const r=i.trim().split(/[ \t]+/),c=r.shift();switch(c){case"%TAG":{if(r.length!==2&&(s(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[d,h]=r;return this.tags[d]=h,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return s(0,"%YAML directive should contain exactly one part"),!1;const[d]=r;if(d==="1.1"||d==="1.2")return this.yaml.version=d,!0;{const h=/^\d+\.\d+$/.test(d);return s(6,`Unsupported YAML version ${d}`,h),!1}}default:return s(0,`Unknown directive ${c}`,!0),!1}}tagName(i,s){if(i==="!")return"!";if(i[0]!=="!")return s(`Not a valid tag: ${i}`),null;if(i[1]==="<"){const h=i.slice(2,-1);return h==="!"||h==="!!"?(s(`Verbatim tags aren't resolved, so ${i} is invalid.`),null):(i[i.length-1]!==">"&&s("Verbatim tags must end with a >"),h)}const[,r,c]=i.match(/^(.*!)([^!]*)$/s);c||s(`The ${i} tag has no suffix`);const d=this.tags[r];if(d)try{return d+decodeURIComponent(c)}catch(h){return s(String(h)),null}return r==="!"?i:(s(`Could not resolve tag: ${i}`),null)}tagString(i){for(const[s,r]of Object.entries(this.tags))if(i.startsWith(r))return s+wx(i.substring(r.length));return i[0]==="!"?i:`!<${i}>`}toString(i){const s=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let c;if(i&&r.length>0&&Je(i.contents)){const d={};Zi(i.contents,(h,m)=>{Je(m)&&m.tag&&(d[m.tag]=!0)}),c=Object.keys(d)}else c=[];for(const[d,h]of r)d==="!!"&&h==="tag:yaml.org,2002:"||(!i||c.some(m=>m.startsWith(h)))&&s.push(`%TAG ${d} ${h}`);return s.join(`
10
- `)}}pt.defaultYaml={explicit:!1,version:"1.2"};pt.defaultTags={"!!":"tag:yaml.org,2002:"};function Hg(a){if(/[\x00-\x19\s,[\]{}]/.test(a)){const s=`Anchor must not contain whitespace or control characters: ${JSON.stringify(a)}`;throw new Error(s)}return!0}function qg(a){const i=new Set;return Zi(a,{Value(s,r){r.anchor&&i.add(r.anchor)}}),i}function $g(a,i){for(let s=1;;++s){const r=`${a}${s}`;if(!i.has(r))return r}}function jx(a,i){const s=[],r=new Map;let c=null;return{onAnchor:d=>{s.push(d),c??(c=qg(a));const h=$g(i,c);return c.add(h),h},setAnchors:()=>{for(const d of s){const h=r.get(d);if(typeof h=="object"&&h.anchor&&(Be(h.node)||Ze(h.node)))h.node.anchor=h.anchor;else{const m=new Error("Failed to resolve repeated object (this should not happen)");throw m.source=d,m}}},sourceObjects:r}}function Bi(a,i,s,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let c=0,d=r.length;c<d;++c){const h=r[c],m=Bi(a,r,String(c),h);m===void 0?delete r[c]:m!==h&&(r[c]=m)}else if(r instanceof Map)for(const c of Array.from(r.keys())){const d=r.get(c),h=Bi(a,r,c,d);h===void 0?r.delete(c):h!==d&&r.set(c,h)}else if(r instanceof Set)for(const c of Array.from(r)){const d=Bi(a,r,c,c);d===void 0?r.delete(c):d!==c&&(r.delete(c),r.add(d))}else for(const[c,d]of Object.entries(r)){const h=Bi(a,r,c,d);h===void 0?delete r[c]:h!==d&&(r[c]=h)}return a.call(i,s,r)}function It(a,i,s){if(Array.isArray(a))return a.map((r,c)=>It(r,String(c),s));if(a&&typeof a.toJSON=="function"){if(!s||!Bg(a))return a.toJSON(i,s);const r={aliasCount:0,count:1,res:void 0};s.anchors.set(a,r),s.onCreate=d=>{r.res=d,delete s.onCreate};const c=a.toJSON(i,s);return s.onCreate&&s.onCreate(c),c}return typeof a=="bigint"&&!s?.keep?Number(a):a}class fd{constructor(i){Object.defineProperty(this,Jt,{value:i})}clone(){const i=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(i.range=this.range.slice()),i}toJS(i,{mapAsMap:s,maxAliasCount:r,onAnchor:c,reviver:d}={}){if(!tc(i))throw new TypeError("A document argument is required");const h={anchors:new Map,doc:i,keep:!0,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},m=It(this,"",h);if(typeof c=="function")for(const{count:y,res:g}of h.anchors.values())c(g,y);return typeof d=="function"?Bi(d,{"":m},"",m):m}}class hd extends fd{constructor(i){super(dd),this.source=i,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(i,s){let r;s?.aliasResolveCache?r=s.aliasResolveCache:(r=[],Zi(i,{Node:(d,h)=>{(Ka(h)||Bg(h))&&r.push(h)}}),s&&(s.aliasResolveCache=r));let c;for(const d of r){if(d===this)break;d.anchor===this.source&&(c=d)}return c}toJSON(i,s){if(!s)return{source:this.source};const{anchors:r,doc:c,maxAliasCount:d}=s,h=this.resolve(c,s);if(!h){const y=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(y)}let m=r.get(h);if(m||(It(h,null,s),m=r.get(h)),m?.res===void 0){const y="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(y)}if(d>=0&&(m.count+=1,m.aliasCount===0&&(m.aliasCount=$r(c,h,r)),m.count*m.aliasCount>d)){const y="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(y)}return m.res}toString(i,s,r){const c=`*${this.source}`;if(i){if(Hg(this.source),i.options.verifyAliasOrder&&!i.anchors.has(this.source)){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(d)}if(i.implicitKey)return`${c} `}return c}}function $r(a,i,s){if(Ka(i)){const r=i.resolve(a),c=s&&r&&s.get(r);return c?c.count*c.aliasCount:0}else if(Ze(i)){let r=0;for(const c of i.items){const d=$r(a,c,s);d>r&&(r=d)}return r}else if(Fe(i)){const r=$r(a,i.key,s),c=$r(a,i.value,s);return Math.max(r,c)}return 1}const Yg=a=>!a||typeof a!="function"&&typeof a!="object";class be extends fd{constructor(i){super(pn),this.value=i}toJSON(i,s){return s?.keep?this.value:It(this.value,i,s)}toString(){return String(this.value)}}be.BLOCK_FOLDED="BLOCK_FOLDED";be.BLOCK_LITERAL="BLOCK_LITERAL";be.PLAIN="PLAIN";be.QUOTE_DOUBLE="QUOTE_DOUBLE";be.QUOTE_SINGLE="QUOTE_SINGLE";const Nx="tag:yaml.org,2002:";function Cx(a,i,s){if(i){const r=s.filter(d=>d.tag===i),c=r.find(d=>!d.format)??r[0];if(!c)throw new Error(`Tag ${i} not found`);return c}return s.find(r=>r.identify?.(a)&&!r.format)}function Ws(a,i,s){if(tc(a)&&(a=a.contents),Je(a))return a;if(Fe(a)){const b=s.schema[ga].createNode?.(s.schema,null,s);return b.items.push(a),b}(a instanceof String||a instanceof Number||a instanceof Boolean||typeof BigInt<"u"&&a instanceof BigInt)&&(a=a.valueOf());const{aliasDuplicateObjects:r,onAnchor:c,onTagObj:d,schema:h,sourceObjects:m}=s;let y;if(r&&a&&typeof a=="object"){if(y=m.get(a),y)return y.anchor??(y.anchor=c(a)),new hd(y.anchor);y={anchor:null,node:null},m.set(a,y)}i?.startsWith("!!")&&(i=Nx+i.slice(2));let g=Cx(a,i,h.tags);if(!g){if(a&&typeof a.toJSON=="function"&&(a=a.toJSON()),!a||typeof a!="object"){const b=new be(a);return y&&(y.node=b),b}g=a instanceof Map?h[ga]:Symbol.iterator in Object(a)?h[Xi]:h[ga]}d&&(d(g),delete s.onTagObj);const x=g?.createNode?g.createNode(s.schema,a,s):typeof g?.nodeClass?.from=="function"?g.nodeClass.from(s.schema,a,s):new be(a);return i?x.tag=i:g.default||(x.tag=g.tag),y&&(y.node=x),x}function Qr(a,i,s){let r=s;for(let c=i.length-1;c>=0;--c){const d=i[c];if(typeof d=="number"&&Number.isInteger(d)&&d>=0){const h=[];h[d]=r,r=h}else r=new Map([[d,r]])}return Ws(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:a,sourceObjects:new Map})}const Js=a=>a==null||typeof a=="object"&&!!a[Symbol.iterator]().next().done;class Kg extends fd{constructor(i,s){super(i),Object.defineProperty(this,"schema",{value:s,configurable:!0,enumerable:!1,writable:!0})}clone(i){const s=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return i&&(s.schema=i),s.items=s.items.map(r=>Je(r)||Fe(r)?r.clone(i):r),this.range&&(s.range=this.range.slice()),s}addIn(i,s){if(Js(i))this.add(s);else{const[r,...c]=i,d=this.get(r,!0);if(Ze(d))d.addIn(c,s);else if(d===void 0&&this.schema)this.set(r,Qr(this.schema,c,s));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${c}`)}}deleteIn(i){const[s,...r]=i;if(r.length===0)return this.delete(s);const c=this.get(s,!0);if(Ze(c))return c.deleteIn(r);throw new Error(`Expected YAML collection at ${s}. Remaining path: ${r}`)}getIn(i,s){const[r,...c]=i,d=this.get(r,!0);return c.length===0?!s&&Be(d)?d.value:d:Ze(d)?d.getIn(c,s):void 0}hasAllNullValues(i){return this.items.every(s=>{if(!Fe(s))return!1;const r=s.value;return r==null||i&&Be(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(i){const[s,...r]=i;if(r.length===0)return this.has(s);const c=this.get(s,!0);return Ze(c)?c.hasIn(r):!1}setIn(i,s){const[r,...c]=i;if(c.length===0)this.set(r,s);else{const d=this.get(r,!0);if(Ze(d))d.setIn(c,s);else if(d===void 0&&this.schema)this.set(r,Qr(this.schema,c,s));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${c}`)}}}const Ex=a=>a.replace(/^(?!$)(?: $)?/gm,"#");function Bn(a,i){return/^\n+$/.test(a)?a.substring(1):i?a.replace(/^(?! *$)/gm,i):a}const Ha=(a,i,s)=>a.endsWith(`
11
- `)?Bn(s,i):s.includes(`
12
- `)?`
13
- `+Bn(s,i):(a.endsWith(" ")?"":" ")+s,Gg="flow",ed="block",Yr="quoted";function nc(a,i,s="flow",{indentAtStart:r,lineWidth:c=80,minContentWidth:d=20,onFold:h,onOverflow:m}={}){if(!c||c<0)return a;c<d&&(d=0);const y=Math.max(1+d,1+c-i.length);if(a.length<=y)return a;const g=[],x={};let b=c-i.length;typeof r=="number"&&(r>c-Math.max(2,d)?g.push(0):b=c-r);let S,E,T=!1,w=-1,N=-1,z=-1;s===ed&&(w=Zp(a,w,i.length),w!==-1&&(b=w+y));for(let M;M=a[w+=1];){if(s===Yr&&M==="\\"){switch(N=w,a[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}z=w}if(M===`
14
- `)s===ed&&(w=Zp(a,w,i.length)),b=w+i.length+y,S=void 0;else{if(M===" "&&E&&E!==" "&&E!==`
15
- `&&E!==" "){const H=a[w+1];H&&H!==" "&&H!==`
16
- `&&H!==" "&&(S=w)}if(w>=b)if(S)g.push(S),b=S+y,S=void 0;else if(s===Yr){for(;E===" "||E===" ";)E=M,M=a[w+=1],T=!0;const H=w>z+1?w-2:N-1;if(x[H])return a;g.push(H),x[H]=!0,b=H+y,S=void 0}else T=!0}E=M}if(T&&m&&m(),g.length===0)return a;h&&h();let Y=a.slice(0,g[0]);for(let M=0;M<g.length;++M){const H=g[M],q=g[M+1]||a.length;H===0?Y=`
17
- ${i}${a.slice(0,q)}`:(s===Yr&&x[H]&&(Y+=`${a[H]}\\`),Y+=`
18
- ${i}${a.slice(H+1,q)}`)}return Y}function Zp(a,i,s){let r=i,c=i+1,d=a[c];for(;d===" "||d===" ";)if(i<c+s)d=a[++i];else{do d=a[++i];while(d&&d!==`
19
- `);r=i,c=i+1,d=a[c]}return r}const ac=(a,i)=>({indentAtStart:i?a.indent.length:a.indentAtStart,lineWidth:a.options.lineWidth,minContentWidth:a.options.minContentWidth}),ic=a=>/^(%|---|\.\.\.)/m.test(a);function Ax(a,i,s){if(!i||i<0)return!1;const r=i-s,c=a.length;if(c<=r)return!1;for(let d=0,h=0;d<c;++d)if(a[d]===`
20
- `){if(d-h>r)return!0;if(h=d+1,c-h<=r)return!1}return!0}function Ps(a,i){const s=JSON.stringify(a);if(i.options.doubleQuotedAsJSON)return s;const{implicitKey:r}=i,c=i.options.doubleQuotedMinMultiLineLength,d=i.indent||(ic(a)?" ":"");let h="",m=0;for(let y=0,g=s[y];g;g=s[++y])if(g===" "&&s[y+1]==="\\"&&s[y+2]==="n"&&(h+=s.slice(m,y)+"\\ ",y+=1,m=y,g="\\"),g==="\\")switch(s[y+1]){case"u":{h+=s.slice(m,y);const x=s.substr(y+2,4);switch(x){case"0000":h+="\\0";break;case"0007":h+="\\a";break;case"000b":h+="\\v";break;case"001b":h+="\\e";break;case"0085":h+="\\N";break;case"00a0":h+="\\_";break;case"2028":h+="\\L";break;case"2029":h+="\\P";break;default:x.substr(0,2)==="00"?h+="\\x"+x.substr(2):h+=s.substr(y,6)}y+=5,m=y+1}break;case"n":if(r||s[y+2]==='"'||s.length<c)y+=1;else{for(h+=s.slice(m,y)+`
21
-
22
- `;s[y+2]==="\\"&&s[y+3]==="n"&&s[y+4]!=='"';)h+=`
23
- `,y+=2;h+=d,s[y+2]===" "&&(h+="\\"),y+=1,m=y+1}break;default:y+=1}return h=m?h+s.slice(m):s,r?h:nc(h,d,Yr,ac(i,!1))}function td(a,i){if(i.options.singleQuote===!1||i.implicitKey&&a.includes(`
24
- `)||/[ \t]\n|\n[ \t]/.test(a))return Ps(a,i);const s=i.indent||(ic(a)?" ":""),r="'"+a.replace(/'/g,"''").replace(/\n+/g,`$&
25
- ${s}`)+"'";return i.implicitKey?r:nc(r,s,Gg,ac(i,!1))}function Hi(a,i){const{singleQuote:s}=i.options;let r;if(s===!1)r=Ps;else{const c=a.includes('"'),d=a.includes("'");c&&!d?r=td:d&&!c?r=Ps:r=s?td:Ps}return r(a,i)}let nd;try{nd=new RegExp(`(^|(?<!
26
- ))
27
- +(?!
28
- |$)`,"g")}catch{nd=/\n+(?!\n|$)/g}function Kr({comment:a,type:i,value:s},r,c,d){const{blockQuote:h,commentString:m,lineWidth:y}=r.options;if(!h||/\n[\t ]+$/.test(s))return Hi(s,r);const g=r.indent||(r.forceBlockIndent||ic(s)?" ":""),x=h==="literal"?!0:h==="folded"||i===be.BLOCK_FOLDED?!1:i===be.BLOCK_LITERAL?!0:!Ax(s,y,g.length);if(!s)return x?`|
29
- `:`>
30
- `;let b,S;for(S=s.length;S>0;--S){const q=s[S-1];if(q!==`
31
- `&&q!==" "&&q!==" ")break}let E=s.substring(S);const T=E.indexOf(`
32
- `);T===-1?b="-":s===E||T!==E.length-1?(b="+",d&&d()):b="",E&&(s=s.slice(0,-E.length),E[E.length-1]===`
33
- `&&(E=E.slice(0,-1)),E=E.replace(nd,`$&${g}`));let w=!1,N,z=-1;for(N=0;N<s.length;++N){const q=s[N];if(q===" ")w=!0;else if(q===`
34
- `)z=N;else break}let Y=s.substring(0,z<N?z+1:N);Y&&(s=s.substring(Y.length),Y=Y.replace(/\n+/g,`$&${g}`));let H=(w?g?"2":"1":"")+b;if(a&&(H+=" "+m(a.replace(/ ?[\r\n]+/g," ")),c&&c()),!x){const q=s.replace(/\n+/g,`
35
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${g}`);let X=!1;const Z=ac(r,!0);h!=="folded"&&i!==be.BLOCK_FOLDED&&(Z.onOverflow=()=>{X=!0});const _=nc(`${Y}${q}${E}`,g,ed,Z);if(!X)return`>${H}
36
- ${g}${_}`}return s=s.replace(/\n+/g,`$&${g}`),`|${H}
37
- ${g}${Y}${s}${E}`}function kx(a,i,s,r){const{type:c,value:d}=a,{actualString:h,implicitKey:m,indent:y,indentStep:g,inFlow:x}=i;if(m&&d.includes(`
38
- `)||x&&/[[\]{},]/.test(d))return Hi(d,i);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(d))return m||x||!d.includes(`
39
- `)?Hi(d,i):Kr(a,i,s,r);if(!m&&!x&&c!==be.PLAIN&&d.includes(`
40
- `))return Kr(a,i,s,r);if(ic(d)){if(y==="")return i.forceBlockIndent=!0,Kr(a,i,s,r);if(m&&y===g)return Hi(d,i)}const b=d.replace(/\n+/g,`$&
41
- ${y}`);if(h){const S=w=>w.default&&w.tag!=="tag:yaml.org,2002:str"&&w.test?.test(b),{compat:E,tags:T}=i.doc.schema;if(T.some(S)||E?.some(S))return Hi(d,i)}return m?b:nc(b,y,Gg,ac(i,!1))}function md(a,i,s,r){const{implicitKey:c,inFlow:d}=i,h=typeof a.value=="string"?a:Object.assign({},a,{value:String(a.value)});let{type:m}=a;m!==be.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(h.value)&&(m=be.QUOTE_DOUBLE);const y=x=>{switch(x){case be.BLOCK_FOLDED:case be.BLOCK_LITERAL:return c||d?Hi(h.value,i):Kr(h,i,s,r);case be.QUOTE_DOUBLE:return Ps(h.value,i);case be.QUOTE_SINGLE:return td(h.value,i);case be.PLAIN:return kx(h,i,s,r);default:return null}};let g=y(m);if(g===null){const{defaultKeyType:x,defaultStringType:b}=i.options,S=c&&x||b;if(g=y(S),g===null)throw new Error(`Unsupported default string type ${S}`)}return g}function Vg(a,i){const s=Object.assign({blockQuote:!0,commentString:Ex,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},a.schema.toStringOptions,i);let r;switch(s.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:a,flowCollectionPadding:s.flowCollectionPadding?" ":"",indent:"",indentStep:typeof s.indent=="number"?" ".repeat(s.indent):" ",inFlow:r,options:s}}function Tx(a,i){if(i.tag){const c=a.filter(d=>d.tag===i.tag);if(c.length>0)return c.find(d=>d.format===i.format)??c[0]}let s,r;if(Be(i)){r=i.value;let c=a.filter(d=>d.identify?.(r));if(c.length>1){const d=c.filter(h=>h.test);d.length>0&&(c=d)}s=c.find(d=>d.format===i.format)??c.find(d=>!d.format)}else r=i,s=a.find(c=>c.nodeClass&&r instanceof c.nodeClass);if(!s){const c=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${c} value`)}return s}function Ox(a,i,{anchors:s,doc:r}){if(!r.directives)return"";const c=[],d=(Be(a)||Ze(a))&&a.anchor;d&&Hg(d)&&(s.add(d),c.push(`&${d}`));const h=a.tag??(i.default?null:i.tag);return h&&c.push(r.directives.tagString(h)),c.join(" ")}function Vi(a,i,s,r){if(Fe(a))return a.toString(i,s,r);if(Ka(a)){if(i.doc.directives)return a.toString(i);if(i.resolvedAliases?.has(a))throw new TypeError("Cannot stringify circular structure without alias nodes");i.resolvedAliases?i.resolvedAliases.add(a):i.resolvedAliases=new Set([a]),a=a.resolve(i.doc)}let c;const d=Je(a)?a:i.doc.createNode(a,{onTagObj:y=>c=y});c??(c=Tx(i.doc.schema.tags,d));const h=Ox(d,c,i);h.length>0&&(i.indentAtStart=(i.indentAtStart??0)+h.length+1);const m=typeof c.stringify=="function"?c.stringify(d,i,s,r):Be(d)?md(d,i,s,r):d.toString(i,s,r);return h?Be(d)||m[0]==="{"||m[0]==="["?`${h} ${m}`:`${h}
42
- ${i.indent}${m}`:m}function zx({key:a,value:i},s,r,c){const{allNullValues:d,doc:h,indent:m,indentStep:y,options:{commentString:g,indentSeq:x,simpleKeys:b}}=s;let S=Je(a)&&a.comment||null;if(b){if(S)throw new Error("With simple keys, key nodes cannot have comments");if(Ze(a)||!Je(a)&&typeof a=="object"){const Z="With simple keys, collection cannot be used as a key value";throw new Error(Z)}}let E=!b&&(!a||S&&i==null&&!s.inFlow||Ze(a)||(Be(a)?a.type===be.BLOCK_FOLDED||a.type===be.BLOCK_LITERAL:typeof a=="object"));s=Object.assign({},s,{allNullValues:!1,implicitKey:!E&&(b||!d),indent:m+y});let T=!1,w=!1,N=Vi(a,s,()=>T=!0,()=>w=!0);if(!E&&!s.inFlow&&N.length>1024){if(b)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");E=!0}if(s.inFlow){if(d||i==null)return T&&r&&r(),N===""?"?":E?`? ${N}`:N}else if(d&&!b||i==null&&E)return N=`? ${N}`,S&&!T?N+=Ha(N,s.indent,g(S)):w&&c&&c(),N;T&&(S=null),E?(S&&(N+=Ha(N,s.indent,g(S))),N=`? ${N}
43
- ${m}:`):(N=`${N}:`,S&&(N+=Ha(N,s.indent,g(S))));let z,Y,M;Je(i)?(z=!!i.spaceBefore,Y=i.commentBefore,M=i.comment):(z=!1,Y=null,M=null,i&&typeof i=="object"&&(i=h.createNode(i))),s.implicitKey=!1,!E&&!S&&Be(i)&&(s.indentAtStart=N.length+1),w=!1,!x&&y.length>=2&&!s.inFlow&&!E&&il(i)&&!i.flow&&!i.tag&&!i.anchor&&(s.indent=s.indent.substring(2));let H=!1;const q=Vi(i,s,()=>H=!0,()=>w=!0);let X=" ";if(S||z||Y){if(X=z?`
44
- `:"",Y){const Z=g(Y);X+=`
45
- ${Bn(Z,s.indent)}`}q===""&&!s.inFlow?X===`
46
- `&&M&&(X=`
47
-
48
- `):X+=`
49
- ${s.indent}`}else if(!E&&Ze(i)){const Z=q[0],_=q.indexOf(`
50
- `),P=_!==-1,Se=s.inFlow??i.flow??i.items.length===0;if(P||!Se){let W=!1;if(P&&(Z==="&"||Z==="!")){let se=q.indexOf(" ");Z==="&"&&se!==-1&&se<_&&q[se+1]==="!"&&(se=q.indexOf(" ",se+1)),(se===-1||_<se)&&(W=!0)}W||(X=`
51
- ${s.indent}`)}}else(q===""||q[0]===`
52
- `)&&(X="");return N+=X+q,s.inFlow?H&&r&&r():M&&!H?N+=Ha(N,s.indent,g(M)):w&&c&&c(),N}function _x(a,i){(a==="debug"||a==="warn")&&console.warn(i)}const Ar="<<",Hn={identify:a=>a===Ar||typeof a=="symbol"&&a.description===Ar,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new be(Symbol(Ar)),{addToJSMap:Qg}),stringify:()=>Ar},Dx=(a,i)=>(Hn.identify(i)||Be(i)&&(!i.type||i.type===be.PLAIN)&&Hn.identify(i.value))&&a?.doc.schema.tags.some(s=>s.tag===Hn.tag&&s.default);function Qg(a,i,s){if(s=a&&Ka(s)?s.resolve(a.doc):s,il(s))for(const r of s.items)Bu(a,i,r);else if(Array.isArray(s))for(const r of s)Bu(a,i,r);else Bu(a,i,s)}function Bu(a,i,s){const r=a&&Ka(s)?s.resolve(a.doc):s;if(!al(r))throw new Error("Merge sources must be maps or map aliases");const c=r.toJSON(null,a,Map);for(const[d,h]of c)i instanceof Map?i.has(d)||i.set(d,h):i instanceof Set?i.add(d):Object.prototype.hasOwnProperty.call(i,d)||Object.defineProperty(i,d,{value:h,writable:!0,enumerable:!0,configurable:!0});return i}function Xg(a,i,{key:s,value:r}){if(Je(s)&&s.addToJSMap)s.addToJSMap(a,i,r);else if(Dx(a,s))Qg(a,i,r);else{const c=It(s,"",a);if(i instanceof Map)i.set(c,It(r,c,a));else if(i instanceof Set)i.add(c);else{const d=Mx(s,c,a),h=It(r,d,a);d in i?Object.defineProperty(i,d,{value:h,writable:!0,enumerable:!0,configurable:!0}):i[d]=h}}return i}function Mx(a,i,s){if(i===null)return"";if(typeof i!="object")return String(i);if(Je(a)&&s?.doc){const r=Vg(s.doc,{});r.anchors=new Set;for(const d of s.anchors.keys())r.anchors.add(d.anchor);r.inFlow=!0,r.inStringifyKey=!0;const c=a.toString(r);if(!s.mapKeyWarned){let d=JSON.stringify(c);d.length>40&&(d=d.substring(0,36)+'..."'),_x(s.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${d}. Set mapAsMap: true to use object keys.`),s.mapKeyWarned=!0}return c}return JSON.stringify(i)}function pd(a,i,s){const r=Ws(a,void 0,s),c=Ws(i,void 0,s);return new gt(r,c)}class gt{constructor(i,s=null){Object.defineProperty(this,Jt,{value:Ug}),this.key=i,this.value=s}clone(i){let{key:s,value:r}=this;return Je(s)&&(s=s.clone(i)),Je(r)&&(r=r.clone(i)),new gt(s,r)}toJSON(i,s){const r=s?.mapAsMap?new Map:{};return Xg(s,r,this)}toString(i,s,r){return i?.doc?zx(this,i,s,r):JSON.stringify(this)}}function Zg(a,i,s){return(i.inFlow??a.flow?Lx:Rx)(a,i,s)}function Rx({comment:a,items:i},s,{blockItemPrefix:r,flowChars:c,itemIndent:d,onChompKeep:h,onComment:m}){const{indent:y,options:{commentString:g}}=s,x=Object.assign({},s,{indent:d,type:null});let b=!1;const S=[];for(let T=0;T<i.length;++T){const w=i[T];let N=null;if(Je(w))!b&&w.spaceBefore&&S.push(""),Xr(s,S,w.commentBefore,b),w.comment&&(N=w.comment);else if(Fe(w)){const Y=Je(w.key)?w.key:null;Y&&(!b&&Y.spaceBefore&&S.push(""),Xr(s,S,Y.commentBefore,b))}b=!1;let z=Vi(w,x,()=>N=null,()=>b=!0);N&&(z+=Ha(z,d,g(N))),b&&N&&(b=!1),S.push(r+z)}let E;if(S.length===0)E=c.start+c.end;else{E=S[0];for(let T=1;T<S.length;++T){const w=S[T];E+=w?`
53
- ${y}${w}`:`
54
- `}}return a?(E+=`
55
- `+Bn(g(a),y),m&&m()):b&&h&&h(),E}function Lx({items:a},i,{flowChars:s,itemIndent:r}){const{indent:c,indentStep:d,flowCollectionPadding:h,options:{commentString:m}}=i;r+=d;const y=Object.assign({},i,{indent:r,inFlow:!0,type:null});let g=!1,x=0;const b=[];for(let T=0;T<a.length;++T){const w=a[T];let N=null;if(Je(w))w.spaceBefore&&b.push(""),Xr(i,b,w.commentBefore,!1),w.comment&&(N=w.comment);else if(Fe(w)){const Y=Je(w.key)?w.key:null;Y&&(Y.spaceBefore&&b.push(""),Xr(i,b,Y.commentBefore,!1),Y.comment&&(g=!0));const M=Je(w.value)?w.value:null;M?(M.comment&&(N=M.comment),M.commentBefore&&(g=!0)):w.value==null&&Y?.comment&&(N=Y.comment)}N&&(g=!0);let z=Vi(w,y,()=>N=null);T<a.length-1&&(z+=","),N&&(z+=Ha(z,r,m(N))),!g&&(b.length>x||z.includes(`
56
- `))&&(g=!0),b.push(z),x=b.length}const{start:S,end:E}=s;if(b.length===0)return S+E;if(!g){const T=b.reduce((w,N)=>w+N.length+2,2);g=i.options.lineWidth>0&&T>i.options.lineWidth}if(g){let T=S;for(const w of b)T+=w?`
57
- ${d}${c}${w}`:`
58
- `;return`${T}
59
- ${c}${E}`}else return`${S}${h}${b.join(" ")}${h}${E}`}function Xr({indent:a,options:{commentString:i}},s,r,c){if(r&&c&&(r=r.replace(/^\n+/,"")),r){const d=Bn(i(r),a);s.push(d.trimStart())}}function qa(a,i){const s=Be(i)?i.value:i;for(const r of a)if(Fe(r)&&(r.key===i||r.key===s||Be(r.key)&&r.key.value===s))return r}class Zt extends Kg{static get tagName(){return"tag:yaml.org,2002:map"}constructor(i){super(ga,i),this.items=[]}static from(i,s,r){const{keepUndefined:c,replacer:d}=r,h=new this(i),m=(y,g)=>{if(typeof d=="function")g=d.call(s,y,g);else if(Array.isArray(d)&&!d.includes(y))return;(g!==void 0||c)&&h.items.push(pd(y,g,r))};if(s instanceof Map)for(const[y,g]of s)m(y,g);else if(s&&typeof s=="object")for(const y of Object.keys(s))m(y,s[y]);return typeof i.sortMapEntries=="function"&&h.items.sort(i.sortMapEntries),h}add(i,s){let r;Fe(i)?r=i:!i||typeof i!="object"||!("key"in i)?r=new gt(i,i?.value):r=new gt(i.key,i.value);const c=qa(this.items,r.key),d=this.schema?.sortMapEntries;if(c){if(!s)throw new Error(`Key ${r.key} already set`);Be(c.value)&&Yg(r.value)?c.value.value=r.value:c.value=r.value}else if(d){const h=this.items.findIndex(m=>d(r,m)<0);h===-1?this.items.push(r):this.items.splice(h,0,r)}else this.items.push(r)}delete(i){const s=qa(this.items,i);return s?this.items.splice(this.items.indexOf(s),1).length>0:!1}get(i,s){const c=qa(this.items,i)?.value;return(!s&&Be(c)?c.value:c)??void 0}has(i){return!!qa(this.items,i)}set(i,s){this.add(new gt(i,s),!0)}toJSON(i,s,r){const c=r?new r:s?.mapAsMap?new Map:{};s?.onCreate&&s.onCreate(c);for(const d of this.items)Xg(s,c,d);return c}toString(i,s,r){if(!i)return JSON.stringify(this);for(const c of this.items)if(!Fe(c))throw new Error(`Map items must all be pairs; found ${JSON.stringify(c)} instead`);return!i.allNullValues&&this.hasAllNullValues(!1)&&(i=Object.assign({},i,{allNullValues:!0})),Zg(this,i,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:i.indent||"",onChompKeep:r,onComment:s})}}const Ii={collection:"map",default:!0,nodeClass:Zt,tag:"tag:yaml.org,2002:map",resolve(a,i){return al(a)||i("Expected a mapping for this tag"),a},createNode:(a,i,s)=>Zt.from(a,i,s)};class $a extends Kg{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(i){super(Xi,i),this.items=[]}add(i){this.items.push(i)}delete(i){const s=kr(i);return typeof s!="number"?!1:this.items.splice(s,1).length>0}get(i,s){const r=kr(i);if(typeof r!="number")return;const c=this.items[r];return!s&&Be(c)?c.value:c}has(i){const s=kr(i);return typeof s=="number"&&s<this.items.length}set(i,s){const r=kr(i);if(typeof r!="number")throw new Error(`Expected a valid index, not ${i}.`);const c=this.items[r];Be(c)&&Yg(s)?c.value=s:this.items[r]=s}toJSON(i,s){const r=[];s?.onCreate&&s.onCreate(r);let c=0;for(const d of this.items)r.push(It(d,String(c++),s));return r}toString(i,s,r){return i?Zg(this,i,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(i.indent||"")+" ",onChompKeep:r,onComment:s}):JSON.stringify(this)}static from(i,s,r){const{replacer:c}=r,d=new this(i);if(s&&Symbol.iterator in Object(s)){let h=0;for(let m of s){if(typeof c=="function"){const y=s instanceof Set?m:String(h++);m=c.call(s,y,m)}d.items.push(Ws(m,void 0,r))}}return d}}function kr(a){let i=Be(a)?a.value:a;return i&&typeof i=="string"&&(i=Number(i)),typeof i=="number"&&Number.isInteger(i)&&i>=0?i:null}const Ji={collection:"seq",default:!0,nodeClass:$a,tag:"tag:yaml.org,2002:seq",resolve(a,i){return il(a)||i("Expected a sequence for this tag"),a},createNode:(a,i,s)=>$a.from(a,i,s)},sc={identify:a=>typeof a=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:a=>a,stringify(a,i,s,r){return i=Object.assign({actualString:!0},i),md(a,i,s,r)}},lc={identify:a=>a==null,createNode:()=>new be(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new be(null),stringify:({source:a},i)=>typeof a=="string"&&lc.test.test(a)?a:i.options.nullStr},gd={identify:a=>typeof a=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:a=>new be(a[0]==="t"||a[0]==="T"),stringify({source:a,value:i},s){if(a&&gd.test.test(a)){const r=a[0]==="t"||a[0]==="T";if(i===r)return a}return i?s.options.trueStr:s.options.falseStr}};function rn({format:a,minFractionDigits:i,tag:s,value:r}){if(typeof r=="bigint")return String(r);const c=typeof r=="number"?r:Number(r);if(!isFinite(c))return isNaN(c)?".nan":c<0?"-.inf":".inf";let d=Object.is(r,-0)?"-0":JSON.stringify(r);if(!a&&i&&(!s||s==="tag:yaml.org,2002:float")&&/^\d/.test(d)){let h=d.indexOf(".");h<0&&(h=d.length,d+=".");let m=i-(d.length-h-1);for(;m-- >0;)d+="0"}return d}const Ig={identify:a=>typeof a=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:a=>a.slice(-3).toLowerCase()==="nan"?NaN:a[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:rn},Jg={identify:a=>typeof a=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:a=>parseFloat(a),stringify(a){const i=Number(a.value);return isFinite(i)?i.toExponential():rn(a)}},Fg={identify:a=>typeof a=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(a){const i=new be(parseFloat(a)),s=a.indexOf(".");return s!==-1&&a[a.length-1]==="0"&&(i.minFractionDigits=a.length-s-1),i},stringify:rn},rc=a=>typeof a=="bigint"||Number.isInteger(a),yd=(a,i,s,{intAsBigInt:r})=>r?BigInt(a):parseInt(a.substring(i),s);function Pg(a,i,s){const{value:r}=a;return rc(r)&&r>=0?s+r.toString(i):rn(a)}const Wg={identify:a=>rc(a)&&a>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(a,i,s)=>yd(a,2,8,s),stringify:a=>Pg(a,8,"0o")},ey={identify:rc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(a,i,s)=>yd(a,0,10,s),stringify:rn},ty={identify:a=>rc(a)&&a>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(a,i,s)=>yd(a,2,16,s),stringify:a=>Pg(a,16,"0x")},Ux=[Ii,Ji,sc,lc,gd,Wg,ey,ty,Ig,Jg,Fg];function Ip(a){return typeof a=="bigint"||Number.isInteger(a)}const Tr=({value:a})=>JSON.stringify(a),Bx=[{identify:a=>typeof a=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:a=>a,stringify:Tr},{identify:a=>a==null,createNode:()=>new be(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Tr},{identify:a=>typeof a=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:a=>a==="true",stringify:Tr},{identify:Ip,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(a,i,{intAsBigInt:s})=>s?BigInt(a):parseInt(a,10),stringify:({value:a})=>Ip(a)?a.toString():JSON.stringify(a)},{identify:a=>typeof a=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:a=>parseFloat(a),stringify:Tr}],Hx={default:!0,tag:"",test:/^/,resolve(a,i){return i(`Unresolved plain scalar ${JSON.stringify(a)}`),a}},qx=[Ii,Ji].concat(Bx,Hx),vd={identify:a=>a instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(a,i){if(typeof atob=="function"){const s=atob(a.replace(/[\n\r]/g,"")),r=new Uint8Array(s.length);for(let c=0;c<s.length;++c)r[c]=s.charCodeAt(c);return r}else return i("This environment does not support reading binary tags; either Buffer or atob is required"),a},stringify({comment:a,type:i,value:s},r,c,d){if(!s)return"";const h=s;let m;if(typeof btoa=="function"){let y="";for(let g=0;g<h.length;++g)y+=String.fromCharCode(h[g]);m=btoa(y)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(i??(i=be.BLOCK_LITERAL),i!==be.QUOTE_DOUBLE){const y=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),g=Math.ceil(m.length/y),x=new Array(g);for(let b=0,S=0;b<g;++b,S+=y)x[b]=m.substr(S,y);m=x.join(i===be.BLOCK_LITERAL?`
60
- `:" ")}return md({comment:a,type:i,value:m},r,c,d)}};function ny(a,i){if(il(a))for(let s=0;s<a.items.length;++s){let r=a.items[s];if(!Fe(r)){if(al(r)){r.items.length>1&&i("Each pair must have its own sequence indicator");const c=r.items[0]||new gt(new be(null));if(r.commentBefore&&(c.key.commentBefore=c.key.commentBefore?`${r.commentBefore}
61
- ${c.key.commentBefore}`:r.commentBefore),r.comment){const d=c.value??c.key;d.comment=d.comment?`${r.comment}
62
- ${d.comment}`:r.comment}r=c}a.items[s]=Fe(r)?r:new gt(r)}}else i("Expected a sequence for this tag");return a}function ay(a,i,s){const{replacer:r}=s,c=new $a(a);c.tag="tag:yaml.org,2002:pairs";let d=0;if(i&&Symbol.iterator in Object(i))for(let h of i){typeof r=="function"&&(h=r.call(i,String(d++),h));let m,y;if(Array.isArray(h))if(h.length===2)m=h[0],y=h[1];else throw new TypeError(`Expected [key, value] tuple: ${h}`);else if(h&&h instanceof Object){const g=Object.keys(h);if(g.length===1)m=g[0],y=h[m];else throw new TypeError(`Expected tuple with one key, not ${g.length} keys`)}else m=h;c.items.push(pd(m,y,s))}return c}const bd={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:ny,createNode:ay};class qi extends $a{constructor(){super(),this.add=Zt.prototype.add.bind(this),this.delete=Zt.prototype.delete.bind(this),this.get=Zt.prototype.get.bind(this),this.has=Zt.prototype.has.bind(this),this.set=Zt.prototype.set.bind(this),this.tag=qi.tag}toJSON(i,s){if(!s)return super.toJSON(i);const r=new Map;s?.onCreate&&s.onCreate(r);for(const c of this.items){let d,h;if(Fe(c)?(d=It(c.key,"",s),h=It(c.value,d,s)):d=It(c,"",s),r.has(d))throw new Error("Ordered maps must not include duplicate keys");r.set(d,h)}return r}static from(i,s,r){const c=ay(i,s,r),d=new this;return d.items=c.items,d}}qi.tag="tag:yaml.org,2002:omap";const xd={collection:"seq",identify:a=>a instanceof Map,nodeClass:qi,default:!1,tag:"tag:yaml.org,2002:omap",resolve(a,i){const s=ny(a,i),r=[];for(const{key:c}of s.items)Be(c)&&(r.includes(c.value)?i(`Ordered maps must not include duplicate keys: ${c.value}`):r.push(c.value));return Object.assign(new qi,s)},createNode:(a,i,s)=>qi.from(a,i,s)};function iy({value:a,source:i},s){return i&&(a?sy:ly).test.test(i)?i:a?s.options.trueStr:s.options.falseStr}const sy={identify:a=>a===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new be(!0),stringify:iy},ly={identify:a=>a===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new be(!1),stringify:iy},$x={identify:a=>typeof a=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:a=>a.slice(-3).toLowerCase()==="nan"?NaN:a[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:rn},Yx={identify:a=>typeof a=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:a=>parseFloat(a.replace(/_/g,"")),stringify(a){const i=Number(a.value);return isFinite(i)?i.toExponential():rn(a)}},Kx={identify:a=>typeof a=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(a){const i=new be(parseFloat(a.replace(/_/g,""))),s=a.indexOf(".");if(s!==-1){const r=a.substring(s+1).replace(/_/g,"");r[r.length-1]==="0"&&(i.minFractionDigits=r.length)}return i},stringify:rn},sl=a=>typeof a=="bigint"||Number.isInteger(a);function cc(a,i,s,{intAsBigInt:r}){const c=a[0];if((c==="-"||c==="+")&&(i+=1),a=a.substring(i).replace(/_/g,""),r){switch(s){case 2:a=`0b${a}`;break;case 8:a=`0o${a}`;break;case 16:a=`0x${a}`;break}const h=BigInt(a);return c==="-"?BigInt(-1)*h:h}const d=parseInt(a,s);return c==="-"?-1*d:d}function Sd(a,i,s){const{value:r}=a;if(sl(r)){const c=r.toString(i);return r<0?"-"+s+c.substr(1):s+c}return rn(a)}const Gx={identify:sl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(a,i,s)=>cc(a,2,2,s),stringify:a=>Sd(a,2,"0b")},Vx={identify:sl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(a,i,s)=>cc(a,1,8,s),stringify:a=>Sd(a,8,"0")},Qx={identify:sl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(a,i,s)=>cc(a,0,10,s),stringify:rn},Xx={identify:sl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(a,i,s)=>cc(a,2,16,s),stringify:a=>Sd(a,16,"0x")};class $i extends Zt{constructor(i){super(i),this.tag=$i.tag}add(i){let s;Fe(i)?s=i:i&&typeof i=="object"&&"key"in i&&"value"in i&&i.value===null?s=new gt(i.key,null):s=new gt(i,null),qa(this.items,s.key)||this.items.push(s)}get(i,s){const r=qa(this.items,i);return!s&&Fe(r)?Be(r.key)?r.key.value:r.key:r}set(i,s){if(typeof s!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof s}`);const r=qa(this.items,i);r&&!s?this.items.splice(this.items.indexOf(r),1):!r&&s&&this.items.push(new gt(i))}toJSON(i,s){return super.toJSON(i,s,Set)}toString(i,s,r){if(!i)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},i,{allNullValues:!0}),s,r);throw new Error("Set items must all have null values")}static from(i,s,r){const{replacer:c}=r,d=new this(i);if(s&&Symbol.iterator in Object(s))for(let h of s)typeof c=="function"&&(h=c.call(s,h,h)),d.items.push(pd(h,null,r));return d}}$i.tag="tag:yaml.org,2002:set";const wd={collection:"map",identify:a=>a instanceof Set,nodeClass:$i,default:!1,tag:"tag:yaml.org,2002:set",createNode:(a,i,s)=>$i.from(a,i,s),resolve(a,i){if(al(a)){if(a.hasAllNullValues(!0))return Object.assign(new $i,a);i("Set items must all have null values")}else i("Expected a mapping for this tag");return a}};function jd(a,i){const s=a[0],r=s==="-"||s==="+"?a.substring(1):a,c=h=>i?BigInt(h):Number(h),d=r.replace(/_/g,"").split(":").reduce((h,m)=>h*c(60)+c(m),c(0));return s==="-"?c(-1)*d:d}function ry(a){let{value:i}=a,s=h=>h;if(typeof i=="bigint")s=h=>BigInt(h);else if(isNaN(i)||!isFinite(i))return rn(a);let r="";i<0&&(r="-",i*=s(-1));const c=s(60),d=[i%c];return i<60?d.unshift(0):(i=(i-d[0])/c,d.unshift(i%c),i>=60&&(i=(i-d[0])/c,d.unshift(i))),r+d.map(h=>String(h).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const cy={identify:a=>typeof a=="bigint"||Number.isInteger(a),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(a,i,{intAsBigInt:s})=>jd(a,s),stringify:ry},oy={identify:a=>typeof a=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:a=>jd(a,!1),stringify:ry},oc={identify:a=>a 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(a){const i=a.match(oc.test);if(!i)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,s,r,c,d,h,m]=i.map(Number),y=i[7]?Number((i[7]+"00").substr(1,3)):0;let g=Date.UTC(s,r-1,c,d||0,h||0,m||0,y);const x=i[8];if(x&&x!=="Z"){let b=jd(x,!1);Math.abs(b)<30&&(b*=60),g-=6e4*b}return new Date(g)},stringify:({value:a})=>a?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},Jp=[Ii,Ji,sc,lc,sy,ly,Gx,Vx,Qx,Xx,$x,Yx,Kx,vd,Hn,xd,bd,wd,cy,oy,oc],Fp=new Map([["core",Ux],["failsafe",[Ii,Ji,sc]],["json",qx],["yaml11",Jp],["yaml-1.1",Jp]]),Pp={binary:vd,bool:gd,float:Fg,floatExp:Jg,floatNaN:Ig,floatTime:oy,int:ey,intHex:ty,intOct:Wg,intTime:cy,map:Ii,merge:Hn,null:lc,omap:xd,pairs:bd,seq:Ji,set:wd,timestamp:oc},Zx={"tag:yaml.org,2002:binary":vd,"tag:yaml.org,2002:merge":Hn,"tag:yaml.org,2002:omap":xd,"tag:yaml.org,2002:pairs":bd,"tag:yaml.org,2002:set":wd,"tag:yaml.org,2002:timestamp":oc};function Hu(a,i,s){const r=Fp.get(i);if(r&&!a)return s&&!r.includes(Hn)?r.concat(Hn):r.slice();let c=r;if(!c)if(Array.isArray(a))c=[];else{const d=Array.from(Fp.keys()).filter(h=>h!=="yaml11").map(h=>JSON.stringify(h)).join(", ");throw new Error(`Unknown schema "${i}"; use one of ${d} or define customTags array`)}if(Array.isArray(a))for(const d of a)c=c.concat(d);else typeof a=="function"&&(c=a(c.slice()));return s&&(c=c.concat(Hn)),c.reduce((d,h)=>{const m=typeof h=="string"?Pp[h]:h;if(!m){const y=JSON.stringify(h),g=Object.keys(Pp).map(x=>JSON.stringify(x)).join(", ");throw new Error(`Unknown custom tag ${y}; use one of ${g}`)}return d.includes(m)||d.push(m),d},[])}const Ix=(a,i)=>a.key<i.key?-1:a.key>i.key?1:0;class Nd{constructor({compat:i,customTags:s,merge:r,resolveKnownTags:c,schema:d,sortMapEntries:h,toStringDefaults:m}){this.compat=Array.isArray(i)?Hu(i,"compat"):i?Hu(null,i):null,this.name=typeof d=="string"&&d||"core",this.knownTags=c?Zx:{},this.tags=Hu(s,this.name,r),this.toStringOptions=m??null,Object.defineProperty(this,ga,{value:Ii}),Object.defineProperty(this,pn,{value:sc}),Object.defineProperty(this,Xi,{value:Ji}),this.sortMapEntries=typeof h=="function"?h:h===!0?Ix:null}clone(){const i=Object.create(Nd.prototype,Object.getOwnPropertyDescriptors(this));return i.tags=this.tags.slice(),i}}function Jx(a,i){const s=[];let r=i.directives===!0;if(i.directives!==!1&&a.directives){const y=a.directives.toString(a);y?(s.push(y),r=!0):a.directives.docStart&&(r=!0)}r&&s.push("---");const c=Vg(a,i),{commentString:d}=c.options;if(a.commentBefore){s.length!==1&&s.unshift("");const y=d(a.commentBefore);s.unshift(Bn(y,""))}let h=!1,m=null;if(a.contents){if(Je(a.contents)){if(a.contents.spaceBefore&&r&&s.push(""),a.contents.commentBefore){const x=d(a.contents.commentBefore);s.push(Bn(x,""))}c.forceBlockIndent=!!a.comment,m=a.contents.comment}const y=m?void 0:()=>h=!0;let g=Vi(a.contents,c,()=>m=null,y);m&&(g+=Ha(g,"",d(m))),(g[0]==="|"||g[0]===">")&&s[s.length-1]==="---"?s[s.length-1]=`--- ${g}`:s.push(g)}else s.push(Vi(a.contents,c));if(a.directives?.docEnd)if(a.comment){const y=d(a.comment);y.includes(`
63
- `)?(s.push("..."),s.push(Bn(y,""))):s.push(`... ${y}`)}else s.push("...");else{let y=a.comment;y&&h&&(y=y.replace(/^\n+/,"")),y&&((!h||m)&&s[s.length-1]!==""&&s.push(""),s.push(Bn(d(y),"")))}return s.join(`
64
- `)+`
65
- `}class uc{constructor(i,s,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Jt,{value:Wu});let c=null;typeof s=="function"||Array.isArray(s)?c=s:r===void 0&&s&&(r=s,s=void 0);const d=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=d;let{version:h}=d;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(h=this.directives.yaml.version)):this.directives=new pt({version:h}),this.setSchema(h,r),this.contents=i===void 0?null:this.createNode(i,c,r)}clone(){const i=Object.create(uc.prototype,{[Jt]:{value:Wu}});return i.commentBefore=this.commentBefore,i.comment=this.comment,i.errors=this.errors.slice(),i.warnings=this.warnings.slice(),i.options=Object.assign({},this.options),this.directives&&(i.directives=this.directives.clone()),i.schema=this.schema.clone(),i.contents=Je(this.contents)?this.contents.clone(i.schema):this.contents,this.range&&(i.range=this.range.slice()),i}add(i){_i(this.contents)&&this.contents.add(i)}addIn(i,s){_i(this.contents)&&this.contents.addIn(i,s)}createAlias(i,s){if(!i.anchor){const r=qg(this);i.anchor=!s||r.has(s)?$g(s||"a",r):s}return new hd(i.anchor)}createNode(i,s,r){let c;if(typeof s=="function")i=s.call({"":i},"",i),c=s;else if(Array.isArray(s)){const N=Y=>typeof Y=="number"||Y instanceof String||Y instanceof Number,z=s.filter(N).map(String);z.length>0&&(s=s.concat(z)),c=s}else r===void 0&&s&&(r=s,s=void 0);const{aliasDuplicateObjects:d,anchorPrefix:h,flow:m,keepUndefined:y,onTagObj:g,tag:x}=r??{},{onAnchor:b,setAnchors:S,sourceObjects:E}=jx(this,h||"a"),T={aliasDuplicateObjects:d??!0,keepUndefined:y??!1,onAnchor:b,onTagObj:g,replacer:c,schema:this.schema,sourceObjects:E},w=Ws(i,x,T);return m&&Ze(w)&&(w.flow=!0),S(),w}createPair(i,s,r={}){const c=this.createNode(i,null,r),d=this.createNode(s,null,r);return new gt(c,d)}delete(i){return _i(this.contents)?this.contents.delete(i):!1}deleteIn(i){return Js(i)?this.contents==null?!1:(this.contents=null,!0):_i(this.contents)?this.contents.deleteIn(i):!1}get(i,s){return Ze(this.contents)?this.contents.get(i,s):void 0}getIn(i,s){return Js(i)?!s&&Be(this.contents)?this.contents.value:this.contents:Ze(this.contents)?this.contents.getIn(i,s):void 0}has(i){return Ze(this.contents)?this.contents.has(i):!1}hasIn(i){return Js(i)?this.contents!==void 0:Ze(this.contents)?this.contents.hasIn(i):!1}set(i,s){this.contents==null?this.contents=Qr(this.schema,[i],s):_i(this.contents)&&this.contents.set(i,s)}setIn(i,s){Js(i)?this.contents=s:this.contents==null?this.contents=Qr(this.schema,Array.from(i),s):_i(this.contents)&&this.contents.setIn(i,s)}setSchema(i,s={}){typeof i=="number"&&(i=String(i));let r;switch(i){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new pt({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=i:this.directives=new pt({version:i}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const c=JSON.stringify(i);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${c}`)}}if(s.schema instanceof Object)this.schema=s.schema;else if(r)this.schema=new Nd(Object.assign(r,s));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:i,jsonArg:s,mapAsMap:r,maxAliasCount:c,onAnchor:d,reviver:h}={}){const m={anchors:new Map,doc:this,keep:!i,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof c=="number"?c:100},y=It(this.contents,s??"",m);if(typeof d=="function")for(const{count:g,res:x}of m.anchors.values())d(x,g);return typeof h=="function"?Bi(h,{"":y},"",y):y}toJSON(i,s){return this.toJS({json:!0,jsonArg:i,mapAsMap:!1,onAnchor:s})}toString(i={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in i&&(!Number.isInteger(i.indent)||Number(i.indent)<=0)){const s=JSON.stringify(i.indent);throw new Error(`"indent" option must be a positive integer, not ${s}`)}return Jx(this,i)}}function _i(a){if(Ze(a))return!0;throw new Error("Expected a YAML collection as document contents")}class uy extends Error{constructor(i,s,r,c){super(),this.name=i,this.code=r,this.message=c,this.pos=s}}class Or extends uy{constructor(i,s,r){super("YAMLParseError",i,s,r)}}class Fx extends uy{constructor(i,s,r){super("YAMLWarning",i,s,r)}}const Wp=(a,i)=>s=>{if(s.pos[0]===-1)return;s.linePos=s.pos.map(m=>i.linePos(m));const{line:r,col:c}=s.linePos[0];s.message+=` at line ${r}, column ${c}`;let d=c-1,h=a.substring(i.lineStarts[r-1],i.lineStarts[r]).replace(/[\n\r]+$/,"");if(d>=60&&h.length>80){const m=Math.min(d-39,h.length-79);h="…"+h.substring(m),d-=m-1}if(h.length>80&&(h=h.substring(0,79)+"…"),r>1&&/^ *$/.test(h.substring(0,d))){let m=a.substring(i.lineStarts[r-2],i.lineStarts[r-1]);m.length>80&&(m=m.substring(0,79)+`…
66
- `),h=m+h}if(/[^ ]/.test(h)){let m=1;const y=s.linePos[1];y?.line===r&&y.col>c&&(m=Math.max(1,Math.min(y.col-c,80-d)));const g=" ".repeat(d)+"^".repeat(m);s.message+=`:
67
-
68
- ${h}
69
- ${g}
70
- `}};function Qi(a,{flow:i,indicator:s,next:r,offset:c,onError:d,parentIndent:h,startOnNewline:m}){let y=!1,g=m,x=m,b="",S="",E=!1,T=!1,w=null,N=null,z=null,Y=null,M=null,H=null,q=null;for(const _ of a)switch(T&&(_.type!=="space"&&_.type!=="newline"&&_.type!=="comma"&&d(_.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),T=!1),w&&(g&&_.type!=="comment"&&_.type!=="newline"&&d(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),_.type){case"space":!i&&(s!=="doc-start"||r?.type!=="flow-collection")&&_.source.includes(" ")&&(w=_),x=!0;break;case"comment":{x||d(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const P=_.source.substring(1)||" ";b?b+=S+P:b=P,S="",g=!1;break}case"newline":g?b?b+=_.source:(!H||s!=="seq-item-ind")&&(y=!0):S+=_.source,g=!0,E=!0,(N||z)&&(Y=_),x=!0;break;case"anchor":N&&d(_,"MULTIPLE_ANCHORS","A node can have at most one anchor"),_.source.endsWith(":")&&d(_.offset+_.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),N=_,q??(q=_.offset),g=!1,x=!1,T=!0;break;case"tag":{z&&d(_,"MULTIPLE_TAGS","A node can have at most one tag"),z=_,q??(q=_.offset),g=!1,x=!1,T=!0;break}case s:(N||z)&&d(_,"BAD_PROP_ORDER",`Anchors and tags must be after the ${_.source} indicator`),H&&d(_,"UNEXPECTED_TOKEN",`Unexpected ${_.source} in ${i??"collection"}`),H=_,g=s==="seq-item-ind"||s==="explicit-key-ind",x=!1;break;case"comma":if(i){M&&d(_,"UNEXPECTED_TOKEN",`Unexpected , in ${i}`),M=_,g=!1,x=!1;break}default:d(_,"UNEXPECTED_TOKEN",`Unexpected ${_.type} token`),g=!1,x=!1}const X=a[a.length-1],Z=X?X.offset+X.source.length:c;return T&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&d(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w&&(g&&w.indent<=h||r?.type==="block-map"||r?.type==="block-seq")&&d(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:M,found:H,spaceBefore:y,comment:b,hasNewline:E,anchor:N,tag:z,newlineAfterProp:Y,end:Z,start:q??Z}}function el(a){if(!a)return null;switch(a.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(a.source.includes(`
71
- `))return!0;if(a.end){for(const i of a.end)if(i.type==="newline")return!0}return!1;case"flow-collection":for(const i of a.items){for(const s of i.start)if(s.type==="newline")return!0;if(i.sep){for(const s of i.sep)if(s.type==="newline")return!0}if(el(i.key)||el(i.value))return!0}return!1;default:return!0}}function ad(a,i,s){if(i?.type==="flow-collection"){const r=i.end[0];r.indent===a&&(r.source==="]"||r.source==="}")&&el(i)&&s(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function dy(a,i,s){const{uniqueKeys:r}=a.options;if(r===!1)return!1;const c=typeof r=="function"?r:(d,h)=>d===h||Be(d)&&Be(h)&&d.value===h.value;return i.some(d=>c(d.key,s))}const eg="All mapping items must start at the same column";function Px({composeNode:a,composeEmptyNode:i},s,r,c,d){const h=d?.nodeClass??Zt,m=new h(s.schema);s.atRoot&&(s.atRoot=!1);let y=r.offset,g=null;for(const x of r.items){const{start:b,key:S,sep:E,value:T}=x,w=Qi(b,{indicator:"explicit-key-ind",next:S??E?.[0],offset:y,onError:c,parentIndent:r.indent,startOnNewline:!0}),N=!w.found;if(N){if(S&&(S.type==="block-seq"?c(y,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in S&&S.indent!==r.indent&&c(y,"BAD_INDENT",eg)),!w.anchor&&!w.tag&&!E){g=w.end,w.comment&&(m.comment?m.comment+=`
72
- `+w.comment:m.comment=w.comment);continue}(w.newlineAfterProp||el(S))&&c(S??b[b.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else w.found?.indent!==r.indent&&c(y,"BAD_INDENT",eg);s.atKey=!0;const z=w.end,Y=S?a(s,S,w,c):i(s,z,b,null,w,c);s.schema.compat&&ad(r.indent,S,c),s.atKey=!1,dy(s,m.items,Y)&&c(z,"DUPLICATE_KEY","Map keys must be unique");const M=Qi(E??[],{indicator:"map-value-ind",next:T,offset:Y.range[2],onError:c,parentIndent:r.indent,startOnNewline:!S||S.type==="block-scalar"});if(y=M.end,M.found){N&&(T?.type==="block-map"&&!M.hasNewline&&c(y,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),s.options.strict&&w.start<M.found.offset-1024&&c(Y.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const H=T?a(s,T,M,c):i(s,y,E,null,M,c);s.schema.compat&&ad(r.indent,T,c),y=H.range[2];const q=new gt(Y,H);s.options.keepSourceTokens&&(q.srcToken=x),m.items.push(q)}else{N&&c(Y.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),M.comment&&(Y.comment?Y.comment+=`
73
- `+M.comment:Y.comment=M.comment);const H=new gt(Y);s.options.keepSourceTokens&&(H.srcToken=x),m.items.push(H)}}return g&&g<y&&c(g,"IMPOSSIBLE","Map comment with trailing content"),m.range=[r.offset,y,g??y],m}function Wx({composeNode:a,composeEmptyNode:i},s,r,c,d){const h=d?.nodeClass??$a,m=new h(s.schema);s.atRoot&&(s.atRoot=!1),s.atKey&&(s.atKey=!1);let y=r.offset,g=null;for(const{start:x,value:b}of r.items){const S=Qi(x,{indicator:"seq-item-ind",next:b,offset:y,onError:c,parentIndent:r.indent,startOnNewline:!0});if(!S.found)if(S.anchor||S.tag||b)b?.type==="block-seq"?c(S.end,"BAD_INDENT","All sequence items must start at the same column"):c(y,"MISSING_CHAR","Sequence item without - indicator");else{g=S.end,S.comment&&(m.comment=S.comment);continue}const E=b?a(s,b,S,c):i(s,S.end,x,null,S,c);s.schema.compat&&ad(r.indent,b,c),y=E.range[2],m.items.push(E)}return m.range=[r.offset,y,g??y],m}function ll(a,i,s,r){let c="";if(a){let d=!1,h="";for(const m of a){const{source:y,type:g}=m;switch(g){case"space":d=!0;break;case"comment":{s&&!d&&r(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const x=y.substring(1)||" ";c?c+=h+x:c=x,h="";break}case"newline":c&&(h+=y),d=!0;break;default:r(m,"UNEXPECTED_TOKEN",`Unexpected ${g} at node end`)}i+=y.length}}return{comment:c,offset:i}}const qu="Block collections are not allowed within flow collections",$u=a=>a&&(a.type==="block-map"||a.type==="block-seq");function eS({composeNode:a,composeEmptyNode:i},s,r,c,d){const h=r.start.source==="{",m=h?"flow map":"flow sequence",y=d?.nodeClass??(h?Zt:$a),g=new y(s.schema);g.flow=!0;const x=s.atRoot;x&&(s.atRoot=!1),s.atKey&&(s.atKey=!1);let b=r.offset+r.start.source.length;for(let N=0;N<r.items.length;++N){const z=r.items[N],{start:Y,key:M,sep:H,value:q}=z,X=Qi(Y,{flow:m,indicator:"explicit-key-ind",next:M??H?.[0],offset:b,onError:c,parentIndent:r.indent,startOnNewline:!1});if(!X.found){if(!X.anchor&&!X.tag&&!H&&!q){N===0&&X.comma?c(X.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`):N<r.items.length-1&&c(X.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${m}`),X.comment&&(g.comment?g.comment+=`
74
- `+X.comment:g.comment=X.comment),b=X.end;continue}!h&&s.options.strict&&el(M)&&c(M,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(N===0)X.comma&&c(X.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`);else if(X.comma||c(X.start,"MISSING_CHAR",`Missing , between ${m} items`),X.comment){let Z="";e:for(const _ of Y)switch(_.type){case"comma":case"space":break;case"comment":Z=_.source.substring(1);break e;default:break e}if(Z){let _=g.items[g.items.length-1];Fe(_)&&(_=_.value??_.key),_.comment?_.comment+=`
75
- `+Z:_.comment=Z,X.comment=X.comment.substring(Z.length+1)}}if(!h&&!H&&!X.found){const Z=q?a(s,q,X,c):i(s,X.end,H,null,X,c);g.items.push(Z),b=Z.range[2],$u(q)&&c(Z.range,"BLOCK_IN_FLOW",qu)}else{s.atKey=!0;const Z=X.end,_=M?a(s,M,X,c):i(s,Z,Y,null,X,c);$u(M)&&c(_.range,"BLOCK_IN_FLOW",qu),s.atKey=!1;const P=Qi(H??[],{flow:m,indicator:"map-value-ind",next:q,offset:_.range[2],onError:c,parentIndent:r.indent,startOnNewline:!1});if(P.found){if(!h&&!X.found&&s.options.strict){if(H)for(const se of H){if(se===P.found)break;if(se.type==="newline"){c(se,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}X.start<P.found.offset-1024&&c(P.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else q&&("source"in q&&q.source?.[0]===":"?c(q,"MISSING_CHAR",`Missing space after : in ${m}`):c(P.start,"MISSING_CHAR",`Missing , or : between ${m} items`));const Se=q?a(s,q,P,c):P.found?i(s,P.end,H,null,P,c):null;Se?$u(q)&&c(Se.range,"BLOCK_IN_FLOW",qu):P.comment&&(_.comment?_.comment+=`
76
- `+P.comment:_.comment=P.comment);const W=new gt(_,Se);if(s.options.keepSourceTokens&&(W.srcToken=z),h){const se=g;dy(s,se.items,_)&&c(Z,"DUPLICATE_KEY","Map keys must be unique"),se.items.push(W)}else{const se=new Zt(s.schema);se.flow=!0,se.items.push(W);const ue=(Se??_).range;se.range=[_.range[0],ue[1],ue[2]],g.items.push(se)}b=Se?Se.range[2]:P.end}}const S=h?"}":"]",[E,...T]=r.end;let w=b;if(E?.source===S)w=E.offset+E.source.length;else{const N=m[0].toUpperCase()+m.substring(1),z=x?`${N} must end with a ${S}`:`${N} in block collection must be sufficiently indented and end with a ${S}`;c(b,x?"MISSING_CHAR":"BAD_INDENT",z),E&&E.source.length!==1&&T.unshift(E)}if(T.length>0){const N=ll(T,w,s.options.strict,c);N.comment&&(g.comment?g.comment+=`
77
- `+N.comment:g.comment=N.comment),g.range=[r.offset,w,N.offset]}else g.range=[r.offset,w,w];return g}function Yu(a,i,s,r,c,d){const h=s.type==="block-map"?Px(a,i,s,r,d):s.type==="block-seq"?Wx(a,i,s,r,d):eS(a,i,s,r,d),m=h.constructor;return c==="!"||c===m.tagName?(h.tag=m.tagName,h):(c&&(h.tag=c),h)}function tS(a,i,s,r,c){const d=r.tag,h=d?i.directives.tagName(d.source,S=>c(d,"TAG_RESOLVE_FAILED",S)):null;if(s.type==="block-seq"){const{anchor:S,newlineAfterProp:E}=r,T=S&&d?S.offset>d.offset?S:d:S??d;T&&(!E||E.offset<T.offset)&&c(T,"MISSING_CHAR","Missing newline after block sequence props")}const m=s.type==="block-map"?"map":s.type==="block-seq"?"seq":s.start.source==="{"?"map":"seq";if(!d||!h||h==="!"||h===Zt.tagName&&m==="map"||h===$a.tagName&&m==="seq")return Yu(a,i,s,c,h);let y=i.schema.tags.find(S=>S.tag===h&&S.collection===m);if(!y){const S=i.schema.knownTags[h];if(S?.collection===m)i.schema.tags.push(Object.assign({},S,{default:!1})),y=S;else return S?c(d,"BAD_COLLECTION_TYPE",`${S.tag} used for ${m} collection, but expects ${S.collection??"scalar"}`,!0):c(d,"TAG_RESOLVE_FAILED",`Unresolved tag: ${h}`,!0),Yu(a,i,s,c,h)}const g=Yu(a,i,s,c,h,y),x=y.resolve?.(g,S=>c(d,"TAG_RESOLVE_FAILED",S),i.options)??g,b=Je(x)?x:new be(x);return b.range=g.range,b.tag=h,y?.format&&(b.format=y.format),b}function nS(a,i,s){const r=i.offset,c=aS(i,a.options.strict,s);if(!c)return{value:"",type:null,comment:"",range:[r,r,r]};const d=c.mode===">"?be.BLOCK_FOLDED:be.BLOCK_LITERAL,h=i.source?iS(i.source):[];let m=h.length;for(let w=h.length-1;w>=0;--w){const N=h[w][1];if(N===""||N==="\r")m=w;else break}if(m===0){const w=c.chomp==="+"&&h.length>0?`
78
- `.repeat(Math.max(1,h.length-1)):"";let N=r+c.length;return i.source&&(N+=i.source.length),{value:w,type:d,comment:c.comment,range:[r,N,N]}}let y=i.indent+c.indent,g=i.offset+c.length,x=0;for(let w=0;w<m;++w){const[N,z]=h[w];if(z===""||z==="\r")c.indent===0&&N.length>y&&(y=N.length);else{N.length<y&&s(g+N.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),c.indent===0&&(y=N.length),x=w,y===0&&!a.atRoot&&s(g,"BAD_INDENT","Block scalar values in collections must be indented");break}g+=N.length+z.length+1}for(let w=h.length-1;w>=m;--w)h[w][0].length>y&&(m=w+1);let b="",S="",E=!1;for(let w=0;w<x;++w)b+=h[w][0].slice(y)+`
79
- `;for(let w=x;w<m;++w){let[N,z]=h[w];g+=N.length+z.length+1;const Y=z[z.length-1]==="\r";if(Y&&(z=z.slice(0,-1)),z&&N.length<y){const H=`Block scalar lines must not be less indented than their ${c.indent?"explicit indentation indicator":"first line"}`;s(g-z.length-(Y?2:1),"BAD_INDENT",H),N=""}d===be.BLOCK_LITERAL?(b+=S+N.slice(y)+z,S=`
80
- `):N.length>y||z[0]===" "?(S===" "?S=`
81
- `:!E&&S===`
82
- `&&(S=`
83
-
84
- `),b+=S+N.slice(y)+z,S=`
85
- `,E=!0):z===""?S===`
86
- `?b+=`
87
- `:S=`
88
- `:(b+=S+z,S=" ",E=!1)}switch(c.chomp){case"-":break;case"+":for(let w=m;w<h.length;++w)b+=`
89
- `+h[w][0].slice(y);b[b.length-1]!==`
90
- `&&(b+=`
91
- `);break;default:b+=`
92
- `}const T=r+c.length+i.source.length;return{value:b,type:d,comment:c.comment,range:[r,T,T]}}function aS({offset:a,props:i},s,r){if(i[0].type!=="block-scalar-header")return r(i[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:c}=i[0],d=c[0];let h=0,m="",y=-1;for(let S=1;S<c.length;++S){const E=c[S];if(!m&&(E==="-"||E==="+"))m=E;else{const T=Number(E);!h&&T?h=T:y===-1&&(y=a+S)}}y!==-1&&r(y,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${c}`);let g=!1,x="",b=c.length;for(let S=1;S<i.length;++S){const E=i[S];switch(E.type){case"space":g=!0;case"newline":b+=E.source.length;break;case"comment":s&&!g&&r(E,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),b+=E.source.length,x=E.source.substring(1);break;case"error":r(E,"UNEXPECTED_TOKEN",E.message),b+=E.source.length;break;default:{const T=`Unexpected token in block scalar header: ${E.type}`;r(E,"UNEXPECTED_TOKEN",T);const w=E.source;w&&typeof w=="string"&&(b+=w.length)}}}return{mode:d,indent:h,chomp:m,comment:x,length:b}}function iS(a){const i=a.split(/\n( *)/),s=i[0],r=s.match(/^( *)/),d=[r?.[1]?[r[1],s.slice(r[1].length)]:["",s]];for(let h=1;h<i.length;h+=2)d.push([i[h],i[h+1]]);return d}function sS(a,i,s){const{offset:r,type:c,source:d,end:h}=a;let m,y;const g=(S,E,T)=>s(r+S,E,T);switch(c){case"scalar":m=be.PLAIN,y=lS(d,g);break;case"single-quoted-scalar":m=be.QUOTE_SINGLE,y=rS(d,g);break;case"double-quoted-scalar":m=be.QUOTE_DOUBLE,y=cS(d,g);break;default:return s(a,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${c}`),{value:"",type:null,comment:"",range:[r,r+d.length,r+d.length]}}const x=r+d.length,b=ll(h,x,i,s);return{value:y,type:m,comment:b.comment,range:[r,x,b.offset]}}function lS(a,i){let s="";switch(a[0]){case" ":s="a tab character";break;case",":s="flow indicator character ,";break;case"%":s="directive indicator character %";break;case"|":case">":{s=`block scalar indicator ${a[0]}`;break}case"@":case"`":{s=`reserved character ${a[0]}`;break}}return s&&i(0,"BAD_SCALAR_START",`Plain value cannot start with ${s}`),fy(a)}function rS(a,i){return(a[a.length-1]!=="'"||a.length===1)&&i(a.length,"MISSING_CHAR","Missing closing 'quote"),fy(a.slice(1,-1)).replace(/''/g,"'")}function fy(a){let i,s;try{i=new RegExp(`(.*?)(?<![ ])[ ]*\r?
93
- `,"sy"),s=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
94
- `,"sy")}catch{i=/(.*?)[ \t]*\r?\n/sy,s=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=i.exec(a);if(!r)return a;let c=r[1],d=" ",h=i.lastIndex;for(s.lastIndex=h;r=s.exec(a);)r[1]===""?d===`
95
- `?c+=d:d=`
96
- `:(c+=d+r[1],d=" "),h=s.lastIndex;const m=/[ \t]*(.*)/sy;return m.lastIndex=h,r=m.exec(a),c+d+(r?.[1]??"")}function cS(a,i){let s="";for(let r=1;r<a.length-1;++r){const c=a[r];if(!(c==="\r"&&a[r+1]===`
97
- `))if(c===`
98
- `){const{fold:d,offset:h}=oS(a,r);s+=d,r=h}else if(c==="\\"){let d=a[++r];const h=uS[d];if(h)s+=h;else if(d===`
99
- `)for(d=a[r+1];d===" "||d===" ";)d=a[++r+1];else if(d==="\r"&&a[r+1]===`
100
- `)for(d=a[++r+1];d===" "||d===" ";)d=a[++r+1];else if(d==="x"||d==="u"||d==="U"){const m={x:2,u:4,U:8}[d];s+=dS(a,r+1,m,i),r+=m}else{const m=a.substr(r-1,2);i(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${m}`),s+=m}}else if(c===" "||c===" "){const d=r;let h=a[r+1];for(;h===" "||h===" ";)h=a[++r+1];h!==`
101
- `&&!(h==="\r"&&a[r+2]===`
102
- `)&&(s+=r>d?a.slice(d,r+1):c)}else s+=c}return(a[a.length-1]!=='"'||a.length===1)&&i(a.length,"MISSING_CHAR",'Missing closing "quote'),s}function oS(a,i){let s="",r=a[i+1];for(;(r===" "||r===" "||r===`
103
- `||r==="\r")&&!(r==="\r"&&a[i+2]!==`
104
- `);)r===`
105
- `&&(s+=`
106
- `),i+=1,r=a[i+1];return s||(s=" "),{fold:s,offset:i}}const uS={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
107
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function dS(a,i,s,r){const c=a.substr(i,s),h=c.length===s&&/^[0-9a-fA-F]+$/.test(c)?parseInt(c,16):NaN;if(isNaN(h)){const m=a.substr(i-2,s+2);return r(i-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${m}`),m}return String.fromCodePoint(h)}function hy(a,i,s,r){const{value:c,type:d,comment:h,range:m}=i.type==="block-scalar"?nS(a,i,r):sS(i,a.options.strict,r),y=s?a.directives.tagName(s.source,b=>r(s,"TAG_RESOLVE_FAILED",b)):null;let g;a.options.stringKeys&&a.atKey?g=a.schema[pn]:y?g=fS(a.schema,c,y,s,r):i.type==="scalar"?g=hS(a,c,i,r):g=a.schema[pn];let x;try{const b=g.resolve(c,S=>r(s??i,"TAG_RESOLVE_FAILED",S),a.options);x=Be(b)?b:new be(b)}catch(b){const S=b instanceof Error?b.message:String(b);r(s??i,"TAG_RESOLVE_FAILED",S),x=new be(c)}return x.range=m,x.source=c,d&&(x.type=d),y&&(x.tag=y),g.format&&(x.format=g.format),h&&(x.comment=h),x}function fS(a,i,s,r,c){if(s==="!")return a[pn];const d=[];for(const m of a.tags)if(!m.collection&&m.tag===s)if(m.default&&m.test)d.push(m);else return m;for(const m of d)if(m.test?.test(i))return m;const h=a.knownTags[s];return h&&!h.collection?(a.tags.push(Object.assign({},h,{default:!1,test:void 0})),h):(c(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,s!=="tag:yaml.org,2002:str"),a[pn])}function hS({atKey:a,directives:i,schema:s},r,c,d){const h=s.tags.find(m=>(m.default===!0||a&&m.default==="key")&&m.test?.test(r))||s[pn];if(s.compat){const m=s.compat.find(y=>y.default&&y.test?.test(r))??s[pn];if(h.tag!==m.tag){const y=i.tagString(h.tag),g=i.tagString(m.tag),x=`Value may be parsed as either ${y} or ${g}`;d(c,"TAG_RESOLVE_FAILED",x,!0)}}return h}function mS(a,i,s){if(i){s??(s=i.length);for(let r=s-1;r>=0;--r){let c=i[r];switch(c.type){case"space":case"comment":case"newline":a-=c.source.length;continue}for(c=i[++r];c?.type==="space";)a+=c.source.length,c=i[++r];break}}return a}const pS={composeNode:my,composeEmptyNode:Cd};function my(a,i,s,r){const c=a.atKey,{spaceBefore:d,comment:h,anchor:m,tag:y}=s;let g,x=!0;switch(i.type){case"alias":g=gS(a,i,r),(m||y)&&r(i,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=hy(a,i,y,r),m&&(g.anchor=m.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=tS(pS,a,i,s,r),m&&(g.anchor=m.source.substring(1));break;default:{const b=i.type==="error"?i.message:`Unsupported token (type: ${i.type})`;r(i,"UNEXPECTED_TOKEN",b),g=Cd(a,i.offset,void 0,null,s,r),x=!1}}return m&&g.anchor===""&&r(m,"BAD_ALIAS","Anchor cannot be an empty string"),c&&a.options.stringKeys&&(!Be(g)||typeof g.value!="string"||g.tag&&g.tag!=="tag:yaml.org,2002:str")&&r(y??i,"NON_STRING_KEY","With stringKeys, all keys must be strings"),d&&(g.spaceBefore=!0),h&&(i.type==="scalar"&&i.source===""?g.comment=h:g.commentBefore=h),a.options.keepSourceTokens&&x&&(g.srcToken=i),g}function Cd(a,i,s,r,{spaceBefore:c,comment:d,anchor:h,tag:m,end:y},g){const x={type:"scalar",offset:mS(i,s,r),indent:-1,source:""},b=hy(a,x,m,g);return h&&(b.anchor=h.source.substring(1),b.anchor===""&&g(h,"BAD_ALIAS","Anchor cannot be an empty string")),c&&(b.spaceBefore=!0),d&&(b.comment=d,b.range[2]=y),b}function gS({options:a},{offset:i,source:s,end:r},c){const d=new hd(s.substring(1));d.source===""&&c(i,"BAD_ALIAS","Alias cannot be an empty string"),d.source.endsWith(":")&&c(i+s.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const h=i+s.length,m=ll(r,h,a.strict,c);return d.range=[i,h,m.offset],m.comment&&(d.comment=m.comment),d}function yS(a,i,{offset:s,start:r,value:c,end:d},h){const m=Object.assign({_directives:i},a),y=new uc(void 0,m),g={atKey:!1,atRoot:!0,directives:y.directives,options:y.options,schema:y.schema},x=Qi(r,{indicator:"doc-start",next:c??d?.[0],offset:s,onError:h,parentIndent:0,startOnNewline:!0});x.found&&(y.directives.docStart=!0,c&&(c.type==="block-map"||c.type==="block-seq")&&!x.hasNewline&&h(x.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),y.contents=c?my(g,c,x,h):Cd(g,x.end,r,null,x,h);const b=y.contents.range[2],S=ll(d,b,!1,h);return S.comment&&(y.comment=S.comment),y.range=[s,b,S.offset],y}function Xs(a){if(typeof a=="number")return[a,a+1];if(Array.isArray(a))return a.length===2?a:[a[0],a[1]];const{offset:i,source:s}=a;return[i,i+(typeof s=="string"?s.length:1)]}function tg(a){let i="",s=!1,r=!1;for(let c=0;c<a.length;++c){const d=a[c];switch(d[0]){case"#":i+=(i===""?"":r?`
108
-
109
- `:`
110
- `)+(d.substring(1)||" "),s=!0,r=!1;break;case"%":a[c+1]?.[0]!=="#"&&(c+=1),s=!1;break;default:s||(r=!0),s=!1}}return{comment:i,afterEmptyLine:r}}class vS{constructor(i={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(s,r,c,d)=>{const h=Xs(s);d?this.warnings.push(new Fx(h,r,c)):this.errors.push(new Or(h,r,c))},this.directives=new pt({version:i.version||"1.2"}),this.options=i}decorate(i,s){const{comment:r,afterEmptyLine:c}=tg(this.prelude);if(r){const d=i.contents;if(s)i.comment=i.comment?`${i.comment}
111
- ${r}`:r;else if(c||i.directives.docStart||!d)i.commentBefore=r;else if(Ze(d)&&!d.flow&&d.items.length>0){let h=d.items[0];Fe(h)&&(h=h.key);const m=h.commentBefore;h.commentBefore=m?`${r}
112
- ${m}`:r}else{const h=d.commentBefore;d.commentBefore=h?`${r}
113
- ${h}`:r}}s?(Array.prototype.push.apply(i.errors,this.errors),Array.prototype.push.apply(i.warnings,this.warnings)):(i.errors=this.errors,i.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:tg(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(i,s=!1,r=-1){for(const c of i)yield*this.next(c);yield*this.end(s,r)}*next(i){switch(i.type){case"directive":this.directives.add(i.source,(s,r,c)=>{const d=Xs(i);d[0]+=s,this.onError(d,"BAD_DIRECTIVE",r,c)}),this.prelude.push(i.source),this.atDirectives=!0;break;case"document":{const s=yS(this.options,this.directives,i,this.onError);this.atDirectives&&!s.directives.docStart&&this.onError(i,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(s,!1),this.doc&&(yield this.doc),this.doc=s,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(i.source);break;case"error":{const s=i.source?`${i.message}: ${JSON.stringify(i.source)}`:i.message,r=new Or(Xs(i),"UNEXPECTED_TOKEN",s);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new Or(Xs(i),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const s=ll(i.end,i.offset+i.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),s.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
114
- ${s.comment}`:s.comment}this.doc.range[2]=s.offset;break}default:this.errors.push(new Or(Xs(i),"UNEXPECTED_TOKEN",`Unsupported token ${i.type}`))}}*end(i=!1,s=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(i){const r=Object.assign({_directives:this.directives},this.options),c=new uc(void 0,r);this.atDirectives&&this.onError(s,"MISSING_CHAR","Missing directives-end indicator line"),c.range=[0,s,s],this.decorate(c,!1),yield c}}}const py="\uFEFF",gy="",yy="",id="";function bS(a){switch(a){case py:return"byte-order-mark";case gy:return"doc-mode";case yy:return"flow-error-end";case id: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(a[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 sn(a){switch(a){case void 0:case" ":case`
117
- `:case"\r":case" ":return!0;default:return!1}}const ng=new Set("0123456789ABCDEFabcdef"),xS=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),zr=new Set(",[]{}"),SS=new Set(` ,[]{}
118
- \r `),Ku=a=>!a||SS.has(a);class wS{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(i,s=!1){if(i){if(typeof i!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+i:i,this.lineEndPos=null}this.atEnd=!s;let r=this.next??"stream";for(;r&&(s||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let i=this.pos,s=this.buffer[i];for(;s===" "||s===" ";)s=this.buffer[++i];return!s||s==="#"||s===`
119
- `?!0:s==="\r"?this.buffer[i+1]===`
120
- `:!1}charAt(i){return this.buffer[this.pos+i]}continueScalar(i){let s=this.buffer[i];if(this.indentNext>0){let r=0;for(;s===" ";)s=this.buffer[++r+i];if(s==="\r"){const c=this.buffer[r+i+1];if(c===`
121
- `||!c&&!this.atEnd)return i+r+1}return s===`
122
- `||r>=this.indentNext||!s&&!this.atEnd?i+r:-1}if(s==="-"||s==="."){const r=this.buffer.substr(i,3);if((r==="---"||r==="...")&&sn(this.buffer[i+3]))return-1}return i}getLine(){let i=this.lineEndPos;return(typeof i!="number"||i!==-1&&i<this.pos)&&(i=this.buffer.indexOf(`
123
- `,this.pos),this.lineEndPos=i),i===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[i-1]==="\r"&&(i-=1),this.buffer.substring(this.pos,i))}hasChars(i){return this.pos+i<=this.buffer.length}setNext(i){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=i,null}peek(i){return this.buffer.substr(this.pos,i)}*parseNext(i){switch(i){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 i=this.getLine();if(i===null)return this.setNext("stream");if(i[0]===py&&(yield*this.pushCount(1),i=i.substring(1)),i[0]==="%"){let s=i.length,r=i.indexOf("#");for(;r!==-1;){const d=i[r-1];if(d===" "||d===" "){s=r-1;break}else r=i.indexOf("#",r+1)}for(;;){const d=i[s-1];if(d===" "||d===" ")s-=1;else break}const c=(yield*this.pushCount(s))+(yield*this.pushSpaces(!0));return yield*this.pushCount(i.length-c),this.pushNewline(),"stream"}if(this.atLineEnd()){const s=yield*this.pushSpaces(!0);return yield*this.pushCount(i.length-s),yield*this.pushNewline(),"stream"}return yield gy,yield*this.parseLineStart()}*parseLineStart(){const i=this.charAt(0);if(!i&&!this.atEnd)return this.setNext("line-start");if(i==="-"||i==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const s=this.peek(3);if((s==="---"||s==="...")&&sn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,s==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!sn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[i,s]=this.peek(2);if(!s&&!this.atEnd)return this.setNext("block-start");if((i==="-"||i==="?"||i===":")&&sn(s)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const i=this.getLine();if(i===null)return this.setNext("doc");let s=yield*this.pushIndicators();switch(i[s]){case"#":yield*this.pushCount(i.length-s);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(Ku),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return s+=yield*this.parseBlockScalarHeader(),s+=yield*this.pushSpaces(!0),yield*this.pushCount(i.length-s),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let i,s,r=-1;do i=yield*this.pushNewline(),i>0?(s=yield*this.pushSpaces(!1),this.indentValue=r=s):s=0,s+=yield*this.pushSpaces(!0);while(i+s>0);const c=this.getLine();if(c===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&c[0]!=="#"||r===0&&(c.startsWith("---")||c.startsWith("..."))&&sn(c[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(c[0]==="]"||c[0]==="}")))return this.flowLevel=0,yield yy,yield*this.parseLineStart();let d=0;for(;c[d]===",";)d+=yield*this.pushCount(1),d+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(d+=yield*this.pushIndicators(),c[d]){case void 0:return"flow";case"#":return yield*this.pushCount(c.length-d),"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(Ku),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const h=this.charAt(1);if(this.flowKey||sn(h)||h===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const i=this.charAt(0);let s=this.buffer.indexOf(i,this.pos+1);if(i==="'")for(;s!==-1&&this.buffer[s+1]==="'";)s=this.buffer.indexOf("'",s+2);else for(;s!==-1;){let d=0;for(;this.buffer[s-1-d]==="\\";)d+=1;if(d%2===0)break;s=this.buffer.indexOf('"',s+1)}const r=this.buffer.substring(0,s);let c=r.indexOf(`
124
- `,this.pos);if(c!==-1){for(;c!==-1;){const d=this.continueScalar(c+1);if(d===-1)break;c=r.indexOf(`
125
- `,d)}c!==-1&&(s=c-(r[c-1]==="\r"?2:1))}if(s===-1){if(!this.atEnd)return this.setNext("quoted-scalar");s=this.buffer.length}return yield*this.pushToIndex(s+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let i=this.pos;for(;;){const s=this.buffer[++i];if(s==="+")this.blockScalarKeep=!0;else if(s>"0"&&s<="9")this.blockScalarIndent=Number(s)-1;else if(s!=="-")break}return yield*this.pushUntil(s=>sn(s)||s==="#")}*parseBlockScalar(){let i=this.pos-1,s=0,r;e:for(let d=this.pos;r=this.buffer[d];++d)switch(r){case" ":s+=1;break;case`
126
- `:i=d,s=0;break;case"\r":{const h=this.buffer[d+1];if(!h&&!this.atEnd)return this.setNext("block-scalar");if(h===`
127
- `)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(s>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=s:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const d=this.continueScalar(i+1);if(d===-1)break;i=this.buffer.indexOf(`
128
- `,d)}while(i!==-1);if(i===-1){if(!this.atEnd)return this.setNext("block-scalar");i=this.buffer.length}}let c=i+1;for(r=this.buffer[c];r===" ";)r=this.buffer[++c];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
129
- `;)r=this.buffer[++c];i=c-1}else if(!this.blockScalarKeep)do{let d=i-1,h=this.buffer[d];h==="\r"&&(h=this.buffer[--d]);const m=d;for(;h===" ";)h=this.buffer[--d];if(h===`
130
- `&&d>=this.pos&&d+1+s>m)i=d;else break}while(!0);return yield id,yield*this.pushToIndex(i+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const i=this.flowLevel>0;let s=this.pos-1,r=this.pos-1,c;for(;c=this.buffer[++r];)if(c===":"){const d=this.buffer[r+1];if(sn(d)||i&&zr.has(d))break;s=r}else if(sn(c)){let d=this.buffer[r+1];if(c==="\r"&&(d===`
131
- `?(r+=1,c=`
132
- `,d=this.buffer[r+1]):s=r),d==="#"||i&&zr.has(d))break;if(c===`
133
- `){const h=this.continueScalar(r+1);if(h===-1)break;r=Math.max(r,h-2)}}else{if(i&&zr.has(c))break;s=r}return!c&&!this.atEnd?this.setNext("plain-scalar"):(yield id,yield*this.pushToIndex(s+1,!0),i?"flow":"doc")}*pushCount(i){return i>0?(yield this.buffer.substr(this.pos,i),this.pos+=i,i):0}*pushToIndex(i,s){const r=this.buffer.slice(this.pos,i);return r?(yield r,this.pos+=r.length,r.length):(s&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Ku))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const i=this.flowLevel>0,s=this.charAt(1);if(sn(s)||i&&zr.has(s))return i?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 i=this.pos+2,s=this.buffer[i];for(;!sn(s)&&s!==">";)s=this.buffer[++i];return yield*this.pushToIndex(s===">"?i+1:i,!1)}else{let i=this.pos+1,s=this.buffer[i];for(;s;)if(xS.has(s))s=this.buffer[++i];else if(s==="%"&&ng.has(this.buffer[i+1])&&ng.has(this.buffer[i+2]))s=this.buffer[i+=3];else break;return yield*this.pushToIndex(i,!1)}}*pushNewline(){const i=this.buffer[this.pos];return i===`
134
- `?yield*this.pushCount(1):i==="\r"&&this.charAt(1)===`
135
- `?yield*this.pushCount(2):0}*pushSpaces(i){let s=this.pos-1,r;do r=this.buffer[++s];while(r===" "||i&&r===" ");const c=s-this.pos;return c>0&&(yield this.buffer.substr(this.pos,c),this.pos=s),c}*pushUntil(i){let s=this.pos,r=this.buffer[s];for(;!i(r);)r=this.buffer[++s];return yield*this.pushToIndex(s,!1)}}class jS{constructor(){this.lineStarts=[],this.addNewLine=i=>this.lineStarts.push(i),this.linePos=i=>{let s=0,r=this.lineStarts.length;for(;s<r;){const d=s+r>>1;this.lineStarts[d]<i?s=d+1:r=d}if(this.lineStarts[s]===i)return{line:s+1,col:1};if(s===0)return{line:0,col:i};const c=this.lineStarts[s-1];return{line:s,col:i-c+1}}}}function pa(a,i){for(let s=0;s<a.length;++s)if(a[s].type===i)return!0;return!1}function ag(a){for(let i=0;i<a.length;++i)switch(a[i].type){case"space":case"comment":case"newline":break;default:return i}return-1}function vy(a){switch(a?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function _r(a){switch(a.type){case"document":return a.start;case"block-map":{const i=a.items[a.items.length-1];return i.sep??i.start}case"block-seq":return a.items[a.items.length-1].start;default:return[]}}function Di(a){if(a.length===0)return[];let i=a.length;e:for(;--i>=0;)switch(a[i].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;a[++i]?.type==="space";);return a.splice(i,a.length)}function ig(a){if(a.start.type==="flow-seq-start")for(const i of a.items)i.sep&&!i.value&&!pa(i.start,"explicit-key-ind")&&!pa(i.sep,"map-value-ind")&&(i.key&&(i.value=i.key),delete i.key,vy(i.value)?i.value.end?Array.prototype.push.apply(i.value.end,i.sep):i.value.end=i.sep:Array.prototype.push.apply(i.start,i.sep),delete i.sep)}class NS{constructor(i){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new wS,this.onNewLine=i}*parse(i,s=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(i,s))yield*this.next(r);s||(yield*this.end())}*next(i){if(this.source=i,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=i.length;return}const s=bS(i);if(s)if(s==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=s,yield*this.step(),s){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+i.length);break;case"space":this.atNewLine&&i[0]===" "&&(this.indent+=i.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=i.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=i.length}else{const r=`Not a YAML token: ${i}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:i}),this.offset+=i.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 i=this.peek(1);if(this.type==="doc-end"&&i?.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(!i)return yield*this.stream();switch(i.type){case"document":return yield*this.document(i);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(i);case"block-scalar":return yield*this.blockScalar(i);case"block-map":return yield*this.blockMap(i);case"block-seq":return yield*this.blockSequence(i);case"flow-collection":return yield*this.flowCollection(i);case"doc-end":return yield*this.documentEnd(i)}yield*this.pop()}peek(i){return this.stack[this.stack.length-i]}*pop(i){const s=i??this.stack.pop();if(!s)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield s;else{const r=this.peek(1);switch(s.type==="block-scalar"?s.indent="indent"in r?r.indent:0:s.type==="flow-collection"&&r.type==="document"&&(s.indent=0),s.type==="flow-collection"&&ig(s),r.type){case"document":r.value=s;break;case"block-scalar":r.props.push(s);break;case"block-map":{const c=r.items[r.items.length-1];if(c.value){r.items.push({start:[],key:s,sep:[]}),this.onKeyLine=!0;return}else if(c.sep)c.value=s;else{Object.assign(c,{key:s,sep:[]}),this.onKeyLine=!c.explicitKey;return}break}case"block-seq":{const c=r.items[r.items.length-1];c.value?r.items.push({start:[],value:s}):c.value=s;break}case"flow-collection":{const c=r.items[r.items.length-1];!c||c.value?r.items.push({start:[],key:s,sep:[]}):c.sep?c.value=s:Object.assign(c,{key:s,sep:[]});return}default:yield*this.pop(),yield*this.pop(s)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(s.type==="block-map"||s.type==="block-seq")){const c=s.items[s.items.length-1];c&&!c.sep&&!c.value&&c.start.length>0&&ag(c.start)===-1&&(s.indent===0||c.start.every(d=>d.type!=="comment"||d.indent<s.indent))&&(r.type==="document"?r.end=c.start:r.items.push({start:c.start}),s.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 i={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&i.start.push(this.sourceToken),this.stack.push(i);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(i){if(i.value)return yield*this.lineEnd(i);switch(this.type){case"doc-start":{ag(i.start)!==-1?(yield*this.pop(),yield*this.step()):i.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":i.start.push(this.sourceToken);return}const s=this.startBlockValue(i);s?this.stack.push(s):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(i){if(this.type==="map-value-ind"){const s=_r(this.peek(2)),r=Di(s);let c;i.end?(c=i.end,c.push(this.sourceToken),delete i.end):c=[this.sourceToken];const d={type:"block-map",offset:i.offset,indent:i.indent,items:[{start:r,key:i,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=d}else yield*this.lineEnd(i)}*blockScalar(i){switch(this.type){case"space":case"comment":case"newline":i.props.push(this.sourceToken);return;case"scalar":if(i.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let s=this.source.indexOf(`
136
- `)+1;for(;s!==0;)this.onNewLine(this.offset+s),s=this.source.indexOf(`
137
- `,s)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(i){const s=i.items[i.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,s.value){const r="end"in s.value?s.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):i.items.push({start:[this.sourceToken]})}else s.sep?s.sep.push(this.sourceToken):s.start.push(this.sourceToken);return;case"space":case"comment":if(s.value)i.items.push({start:[this.sourceToken]});else if(s.sep)s.sep.push(this.sourceToken);else{if(this.atIndentedComment(s.start,i.indent)){const c=i.items[i.items.length-2]?.value?.end;if(Array.isArray(c)){Array.prototype.push.apply(c,s.start),c.push(this.sourceToken),i.items.pop();return}}s.start.push(this.sourceToken)}return}if(this.indent>=i.indent){const r=!this.onKeyLine&&this.indent===i.indent,c=r&&(s.sep||s.explicitKey)&&this.type!=="seq-item-ind";let d=[];if(c&&s.sep&&!s.value){const h=[];for(let m=0;m<s.sep.length;++m){const y=s.sep[m];switch(y.type){case"newline":h.push(m);break;case"space":break;case"comment":y.indent>i.indent&&(h.length=0);break;default:h.length=0}}h.length>=2&&(d=s.sep.splice(h[1]))}switch(this.type){case"anchor":case"tag":c||s.value?(d.push(this.sourceToken),i.items.push({start:d}),this.onKeyLine=!0):s.sep?s.sep.push(this.sourceToken):s.start.push(this.sourceToken);return;case"explicit-key-ind":!s.sep&&!s.explicitKey?(s.start.push(this.sourceToken),s.explicitKey=!0):c||s.value?(d.push(this.sourceToken),i.items.push({start:d,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(s.explicitKey)if(s.sep)if(s.value)i.items.push({start:[],key:null,sep:[this.sourceToken]});else if(pa(s.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:null,sep:[this.sourceToken]}]});else if(vy(s.key)&&!pa(s.sep,"newline")){const h=Di(s.start),m=s.key,y=s.sep;y.push(this.sourceToken),delete s.key,delete s.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:h,key:m,sep:y}]})}else d.length>0?s.sep=s.sep.concat(d,this.sourceToken):s.sep.push(this.sourceToken);else if(pa(s.start,"newline"))Object.assign(s,{key:null,sep:[this.sourceToken]});else{const h=Di(s.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:h,key:null,sep:[this.sourceToken]}]})}else s.sep?s.value||c?i.items.push({start:d,key:null,sep:[this.sourceToken]}):pa(s.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):s.sep.push(this.sourceToken):Object.assign(s,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const h=this.flowScalar(this.type);c||s.value?(i.items.push({start:d,key:h,sep:[]}),this.onKeyLine=!0):s.sep?this.stack.push(h):(Object.assign(s,{key:h,sep:[]}),this.onKeyLine=!0);return}default:{const h=this.startBlockValue(i);if(h){if(h.type==="block-seq"){if(!s.explicitKey&&s.sep&&!pa(s.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 r&&i.items.push({start:d});this.stack.push(h);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(i){const s=i.items[i.items.length-1];switch(this.type){case"newline":if(s.value){const r="end"in s.value?s.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):i.items.push({start:[this.sourceToken]})}else s.start.push(this.sourceToken);return;case"space":case"comment":if(s.value)i.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(s.start,i.indent)){const c=i.items[i.items.length-2]?.value?.end;if(Array.isArray(c)){Array.prototype.push.apply(c,s.start),c.push(this.sourceToken),i.items.pop();return}}s.start.push(this.sourceToken)}return;case"anchor":case"tag":if(s.value||this.indent<=i.indent)break;s.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==i.indent)break;s.value||pa(s.start,"seq-item-ind")?i.items.push({start:[this.sourceToken]}):s.start.push(this.sourceToken);return}if(this.indent>i.indent){const r=this.startBlockValue(i);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(i){const s=i.items[i.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(i.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!s||s.sep?i.items.push({start:[this.sourceToken]}):s.start.push(this.sourceToken);return;case"map-value-ind":!s||s.value?i.items.push({start:[],key:null,sep:[this.sourceToken]}):s.sep?s.sep.push(this.sourceToken):Object.assign(s,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!s||s.value?i.items.push({start:[this.sourceToken]}):s.sep?s.sep.push(this.sourceToken):s.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const c=this.flowScalar(this.type);!s||s.value?i.items.push({start:[],key:c,sep:[]}):s.sep?this.stack.push(c):Object.assign(s,{key:c,sep:[]});return}case"flow-map-end":case"flow-seq-end":i.end.push(this.sourceToken);return}const r=this.startBlockValue(i);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===i.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const c=_r(r),d=Di(c);ig(i);const h=i.end.splice(1,i.end.length);h.push(this.sourceToken);const m={type:"block-map",offset:i.offset,indent:i.indent,items:[{start:d,key:i,sep:h}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=m}else yield*this.lineEnd(i)}}flowScalar(i){if(this.onNewLine){let s=this.source.indexOf(`
138
- `)+1;for(;s!==0;)this.onNewLine(this.offset+s),s=this.source.indexOf(`
139
- `,s)+1}return{type:i,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(i){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 s=_r(i),r=Di(s);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const s=_r(i),r=Di(s);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(i,s){return this.type!=="comment"||this.indent<=s?!1:i.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(i){this.type!=="doc-mode"&&(i.end?i.end.push(this.sourceToken):i.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(i){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:i.end?i.end.push(this.sourceToken):i.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function CS(a){const i=a.prettyErrors!==!1;return{lineCounter:a.lineCounter||i&&new jS||null,prettyErrors:i}}function ES(a,i={}){const{lineCounter:s,prettyErrors:r}=CS(i),c=new NS(s?.addNewLine),d=new vS(i),h=Array.from(d.compose(c.parse(a)));if(r&&s)for(const m of h)m.errors.forEach(Wp(a,s)),m.warnings.forEach(Wp(a,s));return h.length>0?h:Object.assign([],{empty:!0},d.streamInfo())}function ya(a,i,{checkForDefaultPrevented:s=!0}={}){return function(c){if(a?.(c),s===!1||!c.defaultPrevented)return i?.(c)}}function sg(a,i){if(typeof a=="function")return a(i);a!=null&&(a.current=i)}function Ed(...a){return i=>{let s=!1;const r=a.map(c=>{const d=sg(c,i);return!s&&typeof d=="function"&&(s=!0),d});if(s)return()=>{for(let c=0;c<r.length;c++){const d=r[c];typeof d=="function"?d():sg(a[c],null)}}}}function Ga(...a){return j.useCallback(Ed(...a),a)}function AS(a,i){const s=j.createContext(i),r=d=>{const{children:h,...m}=d,y=j.useMemo(()=>m,Object.values(m));return u.jsx(s.Provider,{value:y,children:h})};r.displayName=a+"Provider";function c(d){const h=j.useContext(s);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[r,c]}function kS(a,i=[]){let s=[];function r(d,h){const m=j.createContext(h),y=s.length;s=[...s,h];const g=b=>{const{scope:S,children:E,...T}=b,w=S?.[a]?.[y]||m,N=j.useMemo(()=>T,Object.values(T));return u.jsx(w.Provider,{value:N,children:E})};g.displayName=d+"Provider";function x(b,S){const E=S?.[a]?.[y]||m,T=j.useContext(E);if(T)return T;if(h!==void 0)return h;throw new Error(`\`${b}\` must be used within \`${d}\``)}return[g,x]}const c=()=>{const d=s.map(h=>j.createContext(h));return function(m){const y=m?.[a]||d;return j.useMemo(()=>({[`__scope${a}`]:{...m,[a]:y}}),[m,y])}};return c.scopeName=a,[r,TS(c,...i)]}function TS(...a){const i=a[0];if(a.length===1)return i;const s=()=>{const r=a.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(d){const h=r.reduce((m,{useScope:y,scopeName:g})=>{const b=y(d)[`__scope${g}`];return{...m,...b}},{});return j.useMemo(()=>({[`__scope${i.scopeName}`]:h}),[h])}};return s.scopeName=i.scopeName,s}var tl=globalThis?.document?j.useLayoutEffect:()=>{},OS=ud[" useId ".trim().toString()]||(()=>{}),zS=0;function Gu(a){const[i,s]=j.useState(OS());return tl(()=>{s(r=>r??String(zS++))},[a]),a||(i?`radix-${i}`:"")}var _S=ud[" useInsertionEffect ".trim().toString()]||tl;function DS({prop:a,defaultProp:i,onChange:s=()=>{},caller:r}){const[c,d,h]=MS({defaultProp:i,onChange:s}),m=a!==void 0,y=m?a:c;{const x=j.useRef(a!==void 0);j.useEffect(()=>{const b=x.current;b!==m&&console.warn(`${r} is changing from ${b?"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.`),x.current=m},[m,r])}const g=j.useCallback(x=>{if(m){const b=RS(x)?x(a):x;b!==a&&h.current?.(b)}else d(x)},[m,a,d,h]);return[y,g]}function MS({defaultProp:a,onChange:i}){const[s,r]=j.useState(a),c=j.useRef(s),d=j.useRef(i);return _S(()=>{d.current=i},[i]),j.useEffect(()=>{c.current!==s&&(d.current?.(s),c.current=s)},[s,c]),[s,r,d]}function RS(a){return typeof a=="function"}var by=Lg();const LS=Rg(by);function xy(a){const i=US(a),s=j.forwardRef((r,c)=>{const{children:d,...h}=r,m=j.Children.toArray(d),y=m.find(HS);if(y){const g=y.props.children,x=m.map(b=>b===y?j.Children.count(g)>1?j.Children.only(null):j.isValidElement(g)?g.props.children:null:b);return u.jsx(i,{...h,ref:c,children:j.isValidElement(g)?j.cloneElement(g,void 0,x):null})}return u.jsx(i,{...h,ref:c,children:d})});return s.displayName=`${a}.Slot`,s}function US(a){const i=j.forwardRef((s,r)=>{const{children:c,...d}=s;if(j.isValidElement(c)){const h=$S(c),m=qS(d,c.props);return c.type!==j.Fragment&&(m.ref=r?Ed(r,h):h),j.cloneElement(c,m)}return j.Children.count(c)>1?j.Children.only(null):null});return i.displayName=`${a}.SlotClone`,i}var BS=Symbol("radix.slottable");function HS(a){return j.isValidElement(a)&&typeof a.type=="function"&&"__radixId"in a.type&&a.type.__radixId===BS}function qS(a,i){const s={...i};for(const r in i){const c=a[r],d=i[r];/^on[A-Z]/.test(r)?c&&d?s[r]=(...m)=>{const y=d(...m);return c(...m),y}:c&&(s[r]=c):r==="style"?s[r]={...c,...d}:r==="className"&&(s[r]=[c,d].filter(Boolean).join(" "))}return{...a,...s}}function $S(a){let i=Object.getOwnPropertyDescriptor(a.props,"ref")?.get,s=i&&"isReactWarning"in i&&i.isReactWarning;return s?a.ref:(i=Object.getOwnPropertyDescriptor(a,"ref")?.get,s=i&&"isReactWarning"in i&&i.isReactWarning,s?a.props.ref:a.props.ref||a.ref)}var YS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qn=YS.reduce((a,i)=>{const s=xy(`Primitive.${i}`),r=j.forwardRef((c,d)=>{const{asChild:h,...m}=c,y=h?s:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(y,{...m,ref:d})});return r.displayName=`Primitive.${i}`,{...a,[i]:r}},{});function KS(a,i){a&&by.flushSync(()=>a.dispatchEvent(i))}function nl(a){const i=j.useRef(a);return j.useEffect(()=>{i.current=a}),j.useMemo(()=>(...s)=>i.current?.(...s),[])}function GS(a,i=globalThis?.document){const s=nl(a);j.useEffect(()=>{const r=c=>{c.key==="Escape"&&s(c)};return i.addEventListener("keydown",r,{capture:!0}),()=>i.removeEventListener("keydown",r,{capture:!0})},[s,i])}var VS="DismissableLayer",sd="dismissableLayer.update",QS="dismissableLayer.pointerDownOutside",XS="dismissableLayer.focusOutside",lg,Sy=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wy=j.forwardRef((a,i)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:r,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,onDismiss:m,...y}=a,g=j.useContext(Sy),[x,b]=j.useState(null),S=x?.ownerDocument??globalThis?.document,[,E]=j.useState({}),T=Ga(i,Z=>b(Z)),w=Array.from(g.layers),[N]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),z=w.indexOf(N),Y=x?w.indexOf(x):-1,M=g.layersWithOutsidePointerEventsDisabled.size>0,H=Y>=z,q=JS(Z=>{const _=Z.target,P=[...g.branches].some(Se=>Se.contains(_));!H||P||(c?.(Z),h?.(Z),Z.defaultPrevented||m?.())},S),X=FS(Z=>{const _=Z.target;[...g.branches].some(Se=>Se.contains(_))||(d?.(Z),h?.(Z),Z.defaultPrevented||m?.())},S);return GS(Z=>{Y===g.layers.size-1&&(r?.(Z),!Z.defaultPrevented&&m&&(Z.preventDefault(),m()))},S),j.useEffect(()=>{if(x)return s&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(lg=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(x)),g.layers.add(x),rg(),()=>{s&&g.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=lg)}},[x,S,s,g]),j.useEffect(()=>()=>{x&&(g.layers.delete(x),g.layersWithOutsidePointerEventsDisabled.delete(x),rg())},[x,g]),j.useEffect(()=>{const Z=()=>E({});return document.addEventListener(sd,Z),()=>document.removeEventListener(sd,Z)},[]),u.jsx(qn.div,{...y,ref:T,style:{pointerEvents:M?H?"auto":"none":void 0,...a.style},onFocusCapture:ya(a.onFocusCapture,X.onFocusCapture),onBlurCapture:ya(a.onBlurCapture,X.onBlurCapture),onPointerDownCapture:ya(a.onPointerDownCapture,q.onPointerDownCapture)})});wy.displayName=VS;var ZS="DismissableLayerBranch",IS=j.forwardRef((a,i)=>{const s=j.useContext(Sy),r=j.useRef(null),c=Ga(i,r);return j.useEffect(()=>{const d=r.current;if(d)return s.branches.add(d),()=>{s.branches.delete(d)}},[s.branches]),u.jsx(qn.div,{...a,ref:c})});IS.displayName=ZS;function JS(a,i=globalThis?.document){const s=nl(a),r=j.useRef(!1),c=j.useRef(()=>{});return j.useEffect(()=>{const d=m=>{if(m.target&&!r.current){let y=function(){jy(QS,s,g,{discrete:!0})};const g={originalEvent:m};m.pointerType==="touch"?(i.removeEventListener("click",c.current),c.current=y,i.addEventListener("click",c.current,{once:!0})):y()}else i.removeEventListener("click",c.current);r.current=!1},h=window.setTimeout(()=>{i.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(h),i.removeEventListener("pointerdown",d),i.removeEventListener("click",c.current)}},[i,s]),{onPointerDownCapture:()=>r.current=!0}}function FS(a,i=globalThis?.document){const s=nl(a),r=j.useRef(!1);return j.useEffect(()=>{const c=d=>{d.target&&!r.current&&jy(XS,s,{originalEvent:d},{discrete:!1})};return i.addEventListener("focusin",c),()=>i.removeEventListener("focusin",c)},[i,s]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function rg(){const a=new CustomEvent(sd);document.dispatchEvent(a)}function jy(a,i,s,{discrete:r}){const c=s.originalEvent.target,d=new CustomEvent(a,{bubbles:!1,cancelable:!0,detail:s});i&&c.addEventListener(a,i,{once:!0}),r?KS(c,d):c.dispatchEvent(d)}var Vu="focusScope.autoFocusOnMount",Qu="focusScope.autoFocusOnUnmount",cg={bubbles:!1,cancelable:!0},PS="FocusScope",Ny=j.forwardRef((a,i)=>{const{loop:s=!1,trapped:r=!1,onMountAutoFocus:c,onUnmountAutoFocus:d,...h}=a,[m,y]=j.useState(null),g=nl(c),x=nl(d),b=j.useRef(null),S=Ga(i,w=>y(w)),E=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(r){let w=function(M){if(E.paused||!m)return;const H=M.target;m.contains(H)?b.current=H:ma(b.current,{select:!0})},N=function(M){if(E.paused||!m)return;const H=M.relatedTarget;H!==null&&(m.contains(H)||ma(b.current,{select:!0}))},z=function(M){if(document.activeElement===document.body)for(const q of M)q.removedNodes.length>0&&ma(m)};document.addEventListener("focusin",w),document.addEventListener("focusout",N);const Y=new MutationObserver(z);return m&&Y.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",N),Y.disconnect()}}},[r,m,E.paused]),j.useEffect(()=>{if(m){ug.add(E);const w=document.activeElement;if(!m.contains(w)){const z=new CustomEvent(Vu,cg);m.addEventListener(Vu,g),m.dispatchEvent(z),z.defaultPrevented||(WS(i1(Cy(m)),{select:!0}),document.activeElement===w&&ma(m))}return()=>{m.removeEventListener(Vu,g),setTimeout(()=>{const z=new CustomEvent(Qu,cg);m.addEventListener(Qu,x),m.dispatchEvent(z),z.defaultPrevented||ma(w??document.body,{select:!0}),m.removeEventListener(Qu,x),ug.remove(E)},0)}}},[m,g,x,E]);const T=j.useCallback(w=>{if(!s&&!r||E.paused)return;const N=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,z=document.activeElement;if(N&&z){const Y=w.currentTarget,[M,H]=e1(Y);M&&H?!w.shiftKey&&z===H?(w.preventDefault(),s&&ma(M,{select:!0})):w.shiftKey&&z===M&&(w.preventDefault(),s&&ma(H,{select:!0})):z===Y&&w.preventDefault()}},[s,r,E.paused]);return u.jsx(qn.div,{tabIndex:-1,...h,ref:S,onKeyDown:T})});Ny.displayName=PS;function WS(a,{select:i=!1}={}){const s=document.activeElement;for(const r of a)if(ma(r,{select:i}),document.activeElement!==s)return}function e1(a){const i=Cy(a),s=og(i,a),r=og(i.reverse(),a);return[s,r]}function Cy(a){const i=[],s=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const c=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||c?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)i.push(s.currentNode);return i}function og(a,i){for(const s of a)if(!t1(s,{upTo:i}))return s}function t1(a,{upTo:i}){if(getComputedStyle(a).visibility==="hidden")return!0;for(;a;){if(i!==void 0&&a===i)return!1;if(getComputedStyle(a).display==="none")return!0;a=a.parentElement}return!1}function n1(a){return a instanceof HTMLInputElement&&"select"in a}function ma(a,{select:i=!1}={}){if(a&&a.focus){const s=document.activeElement;a.focus({preventScroll:!0}),a!==s&&n1(a)&&i&&a.select()}}var ug=a1();function a1(){let a=[];return{add(i){const s=a[0];i!==s&&s?.pause(),a=dg(a,i),a.unshift(i)},remove(i){a=dg(a,i),a[0]?.resume()}}}function dg(a,i){const s=[...a],r=s.indexOf(i);return r!==-1&&s.splice(r,1),s}function i1(a){return a.filter(i=>i.tagName!=="A")}var s1="Portal",Ey=j.forwardRef((a,i)=>{const{container:s,...r}=a,[c,d]=j.useState(!1);tl(()=>d(!0),[]);const h=s||c&&globalThis?.document?.body;return h?LS.createPortal(u.jsx(qn.div,{...r,ref:i}),h):null});Ey.displayName=s1;function l1(a,i){return j.useReducer((s,r)=>i[s][r]??s,a)}var dc=a=>{const{present:i,children:s}=a,r=r1(i),c=typeof s=="function"?s({present:r.isPresent}):j.Children.only(s),d=Ga(r.ref,c1(c));return typeof s=="function"||r.isPresent?j.cloneElement(c,{ref:d}):null};dc.displayName="Presence";function r1(a){const[i,s]=j.useState(),r=j.useRef(null),c=j.useRef(a),d=j.useRef("none"),h=a?"mounted":"unmounted",[m,y]=l1(h,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j.useEffect(()=>{const g=Dr(r.current);d.current=m==="mounted"?g:"none"},[m]),tl(()=>{const g=r.current,x=c.current;if(x!==a){const S=d.current,E=Dr(g);a?y("MOUNT"):E==="none"||g?.display==="none"?y("UNMOUNT"):y(x&&S!==E?"ANIMATION_OUT":"UNMOUNT"),c.current=a}},[a,y]),tl(()=>{if(i){let g;const x=i.ownerDocument.defaultView??window,b=E=>{const w=Dr(r.current).includes(CSS.escape(E.animationName));if(E.target===i&&w&&(y("ANIMATION_END"),!c.current)){const N=i.style.animationFillMode;i.style.animationFillMode="forwards",g=x.setTimeout(()=>{i.style.animationFillMode==="forwards"&&(i.style.animationFillMode=N)})}},S=E=>{E.target===i&&(d.current=Dr(r.current))};return i.addEventListener("animationstart",S),i.addEventListener("animationcancel",b),i.addEventListener("animationend",b),()=>{x.clearTimeout(g),i.removeEventListener("animationstart",S),i.removeEventListener("animationcancel",b),i.removeEventListener("animationend",b)}}else y("ANIMATION_END")},[i,y]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:j.useCallback(g=>{r.current=g?getComputedStyle(g):null,s(g)},[])}}function Dr(a){return a?.animationName||"none"}function c1(a){let i=Object.getOwnPropertyDescriptor(a.props,"ref")?.get,s=i&&"isReactWarning"in i&&i.isReactWarning;return s?a.ref:(i=Object.getOwnPropertyDescriptor(a,"ref")?.get,s=i&&"isReactWarning"in i&&i.isReactWarning,s?a.props.ref:a.props.ref||a.ref)}var Xu=0;function o1(){j.useEffect(()=>{const a=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",a[0]??fg()),document.body.insertAdjacentElement("beforeend",a[1]??fg()),Xu++,()=>{Xu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(i=>i.remove()),Xu--}},[])}function fg(){const a=document.createElement("span");return a.setAttribute("data-radix-focus-guard",""),a.tabIndex=0,a.style.outline="none",a.style.opacity="0",a.style.position="fixed",a.style.pointerEvents="none",a}var mn=function(){return mn=Object.assign||function(i){for(var s,r=1,c=arguments.length;r<c;r++){s=arguments[r];for(var d in s)Object.prototype.hasOwnProperty.call(s,d)&&(i[d]=s[d])}return i},mn.apply(this,arguments)};function Ay(a,i){var s={};for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&i.indexOf(r)<0&&(s[r]=a[r]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,r=Object.getOwnPropertySymbols(a);c<r.length;c++)i.indexOf(r[c])<0&&Object.prototype.propertyIsEnumerable.call(a,r[c])&&(s[r[c]]=a[r[c]]);return s}function u1(a,i,s){if(s||arguments.length===2)for(var r=0,c=i.length,d;r<c;r++)(d||!(r in i))&&(d||(d=Array.prototype.slice.call(i,0,r)),d[r]=i[r]);return a.concat(d||Array.prototype.slice.call(i))}var Gr="right-scroll-bar-position",Vr="width-before-scroll-bar",d1="with-scroll-bars-hidden",f1="--removed-body-scroll-bar-size";function Zu(a,i){return typeof a=="function"?a(i):a&&(a.current=i),a}function h1(a,i){var s=j.useState(function(){return{value:a,callback:i,facade:{get current(){return s.value},set current(r){var c=s.value;c!==r&&(s.value=r,s.callback(r,c))}}}})[0];return s.callback=i,s.facade}var m1=typeof window<"u"?j.useLayoutEffect:j.useEffect,hg=new WeakMap;function p1(a,i){var s=h1(null,function(r){return a.forEach(function(c){return Zu(c,r)})});return m1(function(){var r=hg.get(s);if(r){var c=new Set(r),d=new Set(a),h=s.current;c.forEach(function(m){d.has(m)||Zu(m,null)}),d.forEach(function(m){c.has(m)||Zu(m,h)})}hg.set(s,a)},[a]),s}function g1(a){return a}function y1(a,i){i===void 0&&(i=g1);var s=[],r=!1,c={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:a},useMedium:function(d){var h=i(d,r);return s.push(h),function(){s=s.filter(function(m){return m!==h})}},assignSyncMedium:function(d){for(r=!0;s.length;){var h=s;s=[],h.forEach(d)}s={push:function(m){return d(m)},filter:function(){return s}}},assignMedium:function(d){r=!0;var h=[];if(s.length){var m=s;s=[],m.forEach(d),h=s}var y=function(){var x=h;h=[],x.forEach(d)},g=function(){return Promise.resolve().then(y)};g(),s={push:function(x){h.push(x),g()},filter:function(x){return h=h.filter(x),s}}}};return c}function v1(a){a===void 0&&(a={});var i=y1(null);return i.options=mn({async:!0,ssr:!1},a),i}var ky=function(a){var i=a.sideCar,s=Ay(a,["sideCar"]);if(!i)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=i.read();if(!r)throw new Error("Sidecar medium not found");return j.createElement(r,mn({},s))};ky.isSideCarExport=!0;function b1(a,i){return a.useMedium(i),ky}var Ty=v1(),Iu=function(){},fc=j.forwardRef(function(a,i){var s=j.useRef(null),r=j.useState({onScrollCapture:Iu,onWheelCapture:Iu,onTouchMoveCapture:Iu}),c=r[0],d=r[1],h=a.forwardProps,m=a.children,y=a.className,g=a.removeScrollBar,x=a.enabled,b=a.shards,S=a.sideCar,E=a.noRelative,T=a.noIsolation,w=a.inert,N=a.allowPinchZoom,z=a.as,Y=z===void 0?"div":z,M=a.gapMode,H=Ay(a,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),q=S,X=p1([s,i]),Z=mn(mn({},H),c);return j.createElement(j.Fragment,null,x&&j.createElement(q,{sideCar:Ty,removeScrollBar:g,shards:b,noRelative:E,noIsolation:T,inert:w,setCallbacks:d,allowPinchZoom:!!N,lockRef:s,gapMode:M}),h?j.cloneElement(j.Children.only(m),mn(mn({},Z),{ref:X})):j.createElement(Y,mn({},Z,{className:y,ref:X}),m))});fc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fc.classNames={fullWidth:Vr,zeroRight:Gr};var x1=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function S1(){if(!document)return null;var a=document.createElement("style");a.type="text/css";var i=x1();return i&&a.setAttribute("nonce",i),a}function w1(a,i){a.styleSheet?a.styleSheet.cssText=i:a.appendChild(document.createTextNode(i))}function j1(a){var i=document.head||document.getElementsByTagName("head")[0];i.appendChild(a)}var N1=function(){var a=0,i=null;return{add:function(s){a==0&&(i=S1())&&(w1(i,s),j1(i)),a++},remove:function(){a--,!a&&i&&(i.parentNode&&i.parentNode.removeChild(i),i=null)}}},C1=function(){var a=N1();return function(i,s){j.useEffect(function(){return a.add(i),function(){a.remove()}},[i&&s])}},Oy=function(){var a=C1(),i=function(s){var r=s.styles,c=s.dynamic;return a(r,c),null};return i},E1={left:0,top:0,right:0,gap:0},Ju=function(a){return parseInt(a||"",10)||0},A1=function(a){var i=window.getComputedStyle(document.body),s=i[a==="padding"?"paddingLeft":"marginLeft"],r=i[a==="padding"?"paddingTop":"marginTop"],c=i[a==="padding"?"paddingRight":"marginRight"];return[Ju(s),Ju(r),Ju(c)]},k1=function(a){if(a===void 0&&(a="margin"),typeof window>"u")return E1;var i=A1(a),s=document.documentElement.clientWidth,r=window.innerWidth;return{left:i[0],top:i[1],right:i[2],gap:Math.max(0,r-s+i[2]-i[0])}},T1=Oy(),Yi="data-scroll-locked",O1=function(a,i,s,r){var c=a.left,d=a.top,h=a.right,m=a.gap;return s===void 0&&(s="margin"),`
140
- .`.concat(d1,` {
141
- overflow: hidden `).concat(r,`;
142
- padding-right: `).concat(m,"px ").concat(r,`;
143
- }
144
- body[`).concat(Yi,`] {
145
- overflow: hidden `).concat(r,`;
146
- overscroll-behavior: contain;
147
- `).concat([i&&"position: relative ".concat(r,";"),s==="margin"&&`
148
- padding-left: `.concat(c,`px;
149
- padding-top: `).concat(d,`px;
150
- padding-right: `).concat(h,`px;
151
- margin-left:0;
152
- margin-top:0;
153
- margin-right: `).concat(m,"px ").concat(r,`;
154
- `),s==="padding"&&"padding-right: ".concat(m,"px ").concat(r,";")].filter(Boolean).join(""),`
155
- }
156
-
157
- .`).concat(Gr,` {
158
- right: `).concat(m,"px ").concat(r,`;
159
- }
160
-
161
- .`).concat(Vr,` {
162
- margin-right: `).concat(m,"px ").concat(r,`;
163
- }
164
-
165
- .`).concat(Gr," .").concat(Gr,` {
166
- right: 0 `).concat(r,`;
167
- }
168
-
169
- .`).concat(Vr," .").concat(Vr,` {
170
- margin-right: 0 `).concat(r,`;
171
- }
172
-
173
- body[`).concat(Yi,`] {
174
- `).concat(f1,": ").concat(m,`px;
175
- }
176
- `)},mg=function(){var a=parseInt(document.body.getAttribute(Yi)||"0",10);return isFinite(a)?a:0},z1=function(){j.useEffect(function(){return document.body.setAttribute(Yi,(mg()+1).toString()),function(){var a=mg()-1;a<=0?document.body.removeAttribute(Yi):document.body.setAttribute(Yi,a.toString())}},[])},_1=function(a){var i=a.noRelative,s=a.noImportant,r=a.gapMode,c=r===void 0?"margin":r;z1();var d=j.useMemo(function(){return k1(c)},[c]);return j.createElement(T1,{styles:O1(d,!i,c,s?"":"!important")})},ld=!1;if(typeof window<"u")try{var Mr=Object.defineProperty({},"passive",{get:function(){return ld=!0,!0}});window.addEventListener("test",Mr,Mr),window.removeEventListener("test",Mr,Mr)}catch{ld=!1}var Mi=ld?{passive:!1}:!1,D1=function(a){return a.tagName==="TEXTAREA"},zy=function(a,i){if(!(a instanceof Element))return!1;var s=window.getComputedStyle(a);return s[i]!=="hidden"&&!(s.overflowY===s.overflowX&&!D1(a)&&s[i]==="visible")},M1=function(a){return zy(a,"overflowY")},R1=function(a){return zy(a,"overflowX")},pg=function(a,i){var s=i.ownerDocument,r=i;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var c=_y(a,r);if(c){var d=Dy(a,r),h=d[1],m=d[2];if(h>m)return!0}r=r.parentNode}while(r&&r!==s.body);return!1},L1=function(a){var i=a.scrollTop,s=a.scrollHeight,r=a.clientHeight;return[i,s,r]},U1=function(a){var i=a.scrollLeft,s=a.scrollWidth,r=a.clientWidth;return[i,s,r]},_y=function(a,i){return a==="v"?M1(i):R1(i)},Dy=function(a,i){return a==="v"?L1(i):U1(i)},B1=function(a,i){return a==="h"&&i==="rtl"?-1:1},H1=function(a,i,s,r,c){var d=B1(a,window.getComputedStyle(i).direction),h=d*r,m=s.target,y=i.contains(m),g=!1,x=h>0,b=0,S=0;do{if(!m)break;var E=Dy(a,m),T=E[0],w=E[1],N=E[2],z=w-N-d*T;(T||z)&&_y(a,m)&&(b+=z,S+=T);var Y=m.parentNode;m=Y&&Y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Y.host:Y}while(!y&&m!==document.body||y&&(i.contains(m)||i===m));return(x&&Math.abs(b)<1||!x&&Math.abs(S)<1)&&(g=!0),g},Rr=function(a){return"changedTouches"in a?[a.changedTouches[0].clientX,a.changedTouches[0].clientY]:[0,0]},gg=function(a){return[a.deltaX,a.deltaY]},yg=function(a){return a&&"current"in a?a.current:a},q1=function(a,i){return a[0]===i[0]&&a[1]===i[1]},$1=function(a){return`
177
- .block-interactivity-`.concat(a,` {pointer-events: none;}
178
- .allow-interactivity-`).concat(a,` {pointer-events: all;}
179
- `)},Y1=0,Ri=[];function K1(a){var i=j.useRef([]),s=j.useRef([0,0]),r=j.useRef(),c=j.useState(Y1++)[0],d=j.useState(Oy)[0],h=j.useRef(a);j.useEffect(function(){h.current=a},[a]),j.useEffect(function(){if(a.inert){document.body.classList.add("block-interactivity-".concat(c));var w=u1([a.lockRef.current],(a.shards||[]).map(yg),!0).filter(Boolean);return w.forEach(function(N){return N.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),w.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(c))})}}},[a.inert,a.lockRef.current,a.shards]);var m=j.useCallback(function(w,N){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!h.current.allowPinchZoom;var z=Rr(w),Y=s.current,M="deltaX"in w?w.deltaX:Y[0]-z[0],H="deltaY"in w?w.deltaY:Y[1]-z[1],q,X=w.target,Z=Math.abs(M)>Math.abs(H)?"h":"v";if("touches"in w&&Z==="h"&&X.type==="range")return!1;var _=window.getSelection(),P=_&&_.anchorNode,Se=P?P===X||P.contains(X):!1;if(Se)return!1;var W=pg(Z,X);if(!W)return!0;if(W?q=Z:(q=Z==="v"?"h":"v",W=pg(Z,X)),!W)return!1;if(!r.current&&"changedTouches"in w&&(M||H)&&(r.current=q),!q)return!0;var se=r.current||q;return H1(se,N,w,se==="h"?M:H)},[]),y=j.useCallback(function(w){var N=w;if(!(!Ri.length||Ri[Ri.length-1]!==d)){var z="deltaY"in N?gg(N):Rr(N),Y=i.current.filter(function(q){return q.name===N.type&&(q.target===N.target||N.target===q.shadowParent)&&q1(q.delta,z)})[0];if(Y&&Y.should){N.cancelable&&N.preventDefault();return}if(!Y){var M=(h.current.shards||[]).map(yg).filter(Boolean).filter(function(q){return q.contains(N.target)}),H=M.length>0?m(N,M[0]):!h.current.noIsolation;H&&N.cancelable&&N.preventDefault()}}},[]),g=j.useCallback(function(w,N,z,Y){var M={name:w,delta:N,target:z,should:Y,shadowParent:G1(z)};i.current.push(M),setTimeout(function(){i.current=i.current.filter(function(H){return H!==M})},1)},[]),x=j.useCallback(function(w){s.current=Rr(w),r.current=void 0},[]),b=j.useCallback(function(w){g(w.type,gg(w),w.target,m(w,a.lockRef.current))},[]),S=j.useCallback(function(w){g(w.type,Rr(w),w.target,m(w,a.lockRef.current))},[]);j.useEffect(function(){return Ri.push(d),a.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:S}),document.addEventListener("wheel",y,Mi),document.addEventListener("touchmove",y,Mi),document.addEventListener("touchstart",x,Mi),function(){Ri=Ri.filter(function(w){return w!==d}),document.removeEventListener("wheel",y,Mi),document.removeEventListener("touchmove",y,Mi),document.removeEventListener("touchstart",x,Mi)}},[]);var E=a.removeScrollBar,T=a.inert;return j.createElement(j.Fragment,null,T?j.createElement(d,{styles:$1(c)}):null,E?j.createElement(_1,{noRelative:a.noRelative,gapMode:a.gapMode}):null)}function G1(a){for(var i=null;a!==null;)a instanceof ShadowRoot&&(i=a.host,a=a.host),a=a.parentNode;return i}const V1=b1(Ty,K1);var My=j.forwardRef(function(a,i){return j.createElement(fc,mn({},a,{ref:i,sideCar:V1}))});My.classNames=fc.classNames;var Q1=function(a){if(typeof document>"u")return null;var i=Array.isArray(a)?a[0]:a;return i.ownerDocument.body},Li=new WeakMap,Lr=new WeakMap,Ur={},Fu=0,Ry=function(a){return a&&(a.host||Ry(a.parentNode))},X1=function(a,i){return i.map(function(s){if(a.contains(s))return s;var r=Ry(s);return r&&a.contains(r)?r:(console.error("aria-hidden",s,"in not contained inside",a,". Doing nothing"),null)}).filter(function(s){return!!s})},Z1=function(a,i,s,r){var c=X1(i,Array.isArray(a)?a:[a]);Ur[s]||(Ur[s]=new WeakMap);var d=Ur[s],h=[],m=new Set,y=new Set(c),g=function(b){!b||m.has(b)||(m.add(b),g(b.parentNode))};c.forEach(g);var x=function(b){!b||y.has(b)||Array.prototype.forEach.call(b.children,function(S){if(m.has(S))x(S);else try{var E=S.getAttribute(r),T=E!==null&&E!=="false",w=(Li.get(S)||0)+1,N=(d.get(S)||0)+1;Li.set(S,w),d.set(S,N),h.push(S),w===1&&T&&Lr.set(S,!0),N===1&&S.setAttribute(s,"true"),T||S.setAttribute(r,"true")}catch(z){console.error("aria-hidden: cannot operate on ",S,z)}})};return x(i),m.clear(),Fu++,function(){h.forEach(function(b){var S=Li.get(b)-1,E=d.get(b)-1;Li.set(b,S),d.set(b,E),S||(Lr.has(b)||b.removeAttribute(r),Lr.delete(b)),E||b.removeAttribute(s)}),Fu--,Fu||(Li=new WeakMap,Li=new WeakMap,Lr=new WeakMap,Ur={})}},I1=function(a,i,s){s===void 0&&(s="data-aria-hidden");var r=Array.from(Array.isArray(a)?a:[a]),c=Q1(a);return c?(r.push.apply(r,Array.from(c.querySelectorAll("[aria-live], script"))),Z1(r,c,s,"aria-hidden")):function(){return null}},hc="Dialog",[Ly]=kS(hc),[J1,cn]=Ly(hc),Uy=a=>{const{__scopeDialog:i,children:s,open:r,defaultOpen:c,onOpenChange:d,modal:h=!0}=a,m=j.useRef(null),y=j.useRef(null),[g,x]=DS({prop:r,defaultProp:c??!1,onChange:d,caller:hc});return u.jsx(J1,{scope:i,triggerRef:m,contentRef:y,contentId:Gu(),titleId:Gu(),descriptionId:Gu(),open:g,onOpenChange:x,onOpenToggle:j.useCallback(()=>x(b=>!b),[x]),modal:h,children:s})};Uy.displayName=hc;var By="DialogTrigger",F1=j.forwardRef((a,i)=>{const{__scopeDialog:s,...r}=a,c=cn(By,s),d=Ga(i,c.triggerRef);return u.jsx(qn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":Td(c.open),...r,ref:d,onClick:ya(a.onClick,c.onOpenToggle)})});F1.displayName=By;var Ad="DialogPortal",[P1,Hy]=Ly(Ad,{forceMount:void 0}),qy=a=>{const{__scopeDialog:i,forceMount:s,children:r,container:c}=a,d=cn(Ad,i);return u.jsx(P1,{scope:i,forceMount:s,children:j.Children.map(r,h=>u.jsx(dc,{present:s||d.open,children:u.jsx(Ey,{asChild:!0,container:c,children:h})}))})};qy.displayName=Ad;var Zr="DialogOverlay",$y=j.forwardRef((a,i)=>{const s=Hy(Zr,a.__scopeDialog),{forceMount:r=s.forceMount,...c}=a,d=cn(Zr,a.__scopeDialog);return d.modal?u.jsx(dc,{present:r||d.open,children:u.jsx(ew,{...c,ref:i})}):null});$y.displayName=Zr;var W1=xy("DialogOverlay.RemoveScroll"),ew=j.forwardRef((a,i)=>{const{__scopeDialog:s,...r}=a,c=cn(Zr,s);return u.jsx(My,{as:W1,allowPinchZoom:!0,shards:[c.contentRef],children:u.jsx(qn.div,{"data-state":Td(c.open),...r,ref:i,style:{pointerEvents:"auto",...r.style}})})}),Ya="DialogContent",Yy=j.forwardRef((a,i)=>{const s=Hy(Ya,a.__scopeDialog),{forceMount:r=s.forceMount,...c}=a,d=cn(Ya,a.__scopeDialog);return u.jsx(dc,{present:r||d.open,children:d.modal?u.jsx(tw,{...c,ref:i}):u.jsx(nw,{...c,ref:i})})});Yy.displayName=Ya;var tw=j.forwardRef((a,i)=>{const s=cn(Ya,a.__scopeDialog),r=j.useRef(null),c=Ga(i,s.contentRef,r);return j.useEffect(()=>{const d=r.current;if(d)return I1(d)},[]),u.jsx(Ky,{...a,ref:c,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ya(a.onCloseAutoFocus,d=>{d.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:ya(a.onPointerDownOutside,d=>{const h=d.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0;(h.button===2||m)&&d.preventDefault()}),onFocusOutside:ya(a.onFocusOutside,d=>d.preventDefault())})}),nw=j.forwardRef((a,i)=>{const s=cn(Ya,a.__scopeDialog),r=j.useRef(!1),c=j.useRef(!1);return u.jsx(Ky,{...a,ref:i,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{a.onCloseAutoFocus?.(d),d.defaultPrevented||(r.current||s.triggerRef.current?.focus(),d.preventDefault()),r.current=!1,c.current=!1},onInteractOutside:d=>{a.onInteractOutside?.(d),d.defaultPrevented||(r.current=!0,d.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const h=d.target;s.triggerRef.current?.contains(h)&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&c.current&&d.preventDefault()}})}),Ky=j.forwardRef((a,i)=>{const{__scopeDialog:s,trapFocus:r,onOpenAutoFocus:c,onCloseAutoFocus:d,...h}=a,m=cn(Ya,s),y=j.useRef(null),g=Ga(i,y);return o1(),u.jsxs(u.Fragment,{children:[u.jsx(Ny,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:c,onUnmountAutoFocus:d,children:u.jsx(wy,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Td(m.open),...h,ref:g,onDismiss:()=>m.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(aw,{titleId:m.titleId}),u.jsx(sw,{contentRef:y,descriptionId:m.descriptionId})]})]})}),kd="DialogTitle",Gy=j.forwardRef((a,i)=>{const{__scopeDialog:s,...r}=a,c=cn(kd,s);return u.jsx(qn.h2,{id:c.titleId,...r,ref:i})});Gy.displayName=kd;var Vy="DialogDescription",Qy=j.forwardRef((a,i)=>{const{__scopeDialog:s,...r}=a,c=cn(Vy,s);return u.jsx(qn.p,{id:c.descriptionId,...r,ref:i})});Qy.displayName=Vy;var Xy="DialogClose",Zy=j.forwardRef((a,i)=>{const{__scopeDialog:s,...r}=a,c=cn(Xy,s);return u.jsx(qn.button,{type:"button",...r,ref:i,onClick:ya(a.onClick,()=>c.onOpenChange(!1))})});Zy.displayName=Xy;function Td(a){return a?"open":"closed"}var Iy="DialogTitleWarning",[S2,Jy]=AS(Iy,{contentName:Ya,titleName:kd,docsSlug:"dialog"}),aw=({titleId:a})=>{const i=Jy(Iy),s=`\`${i.contentName}\` requires a \`${i.titleName}\` for the component to be accessible for screen reader users.
180
-
181
- If you want to hide the \`${i.titleName}\`, you can wrap it with our VisuallyHidden component.
182
-
183
- For more information, see https://radix-ui.com/primitives/docs/components/${i.docsSlug}`;return j.useEffect(()=>{a&&(document.getElementById(a)||console.error(s))},[s,a]),null},iw="DialogDescriptionWarning",sw=({contentRef:a,descriptionId:i})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Jy(iw).contentName}}.`;return j.useEffect(()=>{const c=a.current?.getAttribute("aria-describedby");i&&c&&(document.getElementById(i)||console.warn(r))},[r,a,i]),null},Fy=Uy,Py=qy,Od=$y,zd=Yy,_d=Gy,Wy=Qy,ev=Zy;const lw=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rw=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,s,r)=>r?r.toUpperCase():s.toLowerCase()),vg=a=>{const i=rw(a);return i.charAt(0).toUpperCase()+i.slice(1)},tv=(...a)=>a.filter((i,s,r)=>!!i&&i.trim()!==""&&r.indexOf(i)===s).join(" ").trim(),cw=a=>{for(const i in a)if(i.startsWith("aria-")||i==="role"||i==="title")return!0};var ow={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 uw=j.forwardRef(({color:a="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:c="",children:d,iconNode:h,...m},y)=>j.createElement("svg",{ref:y,...ow,width:i,height:i,stroke:a,strokeWidth:r?Number(s)*24/Number(i):s,className:tv("lucide",c),...!d&&!cw(m)&&{"aria-hidden":"true"},...m},[...h.map(([g,x])=>j.createElement(g,x)),...Array.isArray(d)?d:[d]]));const on=(a,i)=>{const s=j.forwardRef(({className:r,...c},d)=>j.createElement(uw,{ref:d,iconNode:i,className:tv(`lucide-${lw(vg(a))}`,`lucide-${a}`,r),...c}));return s.displayName=vg(a),s};const dw=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Dd=on("chevron-right",dw);const fw=[["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"}]],hw=on("download",fw);const mw=[["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"}]],pw=on("globe",mw);const gw=[["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"}]],yw=on("layout-dashboard",gw);const vw=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],bw=on("menu",vw);const xw=[["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"}]],Sw=on("play",xw);const ww=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],bg=on("plus",ww);const jw=[["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"}]],Nw=on("rocket",jw);const Cw=[["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"}]],Ew=on("settings",Cw);const Aw=[["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"}]],kw=on("trash-2",Aw);const Tw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Md=on("x",Tw);function nv(a){var i,s,r="";if(typeof a=="string"||typeof a=="number")r+=a;else if(typeof a=="object")if(Array.isArray(a)){var c=a.length;for(i=0;i<c;i++)a[i]&&(s=nv(a[i]))&&(r&&(r+=" "),r+=s)}else for(s in a)a[s]&&(r&&(r+=" "),r+=s);return r}function av(){for(var a,i,s=0,r="",c=arguments.length;s<c;s++)(a=arguments[s])&&(i=nv(a))&&(r&&(r+=" "),r+=i);return r}const xg=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,Sg=av,iv=(a,i)=>s=>{var r;if(i?.variants==null)return Sg(a,s?.class,s?.className);const{variants:c,defaultVariants:d}=i,h=Object.keys(c).map(g=>{const x=s?.[g],b=d?.[g];if(x===null)return null;const S=xg(x)||xg(b);return c[g][S]}),m=s&&Object.entries(s).reduce((g,x)=>{let[b,S]=x;return S===void 0||(g[b]=S),g},{}),y=i==null||(r=i.compoundVariants)===null||r===void 0?void 0:r.reduce((g,x)=>{let{class:b,className:S,...E}=x;return Object.entries(E).every(T=>{let[w,N]=T;return Array.isArray(N)?N.includes({...d,...m}[w]):{...d,...m}[w]===N})?[...g,b,S]:g},[]);return Sg(a,h,y,s?.class,s?.className)},Ow=(a,i)=>{const s=new Array(a.length+i.length);for(let r=0;r<a.length;r++)s[r]=a[r];for(let r=0;r<i.length;r++)s[a.length+r]=i[r];return s},zw=(a,i)=>({classGroupId:a,validator:i}),sv=(a=new Map,i=null,s)=>({nextPart:a,validators:i,classGroupId:s}),Ir="-",wg=[],_w="arbitrary..",Dw=a=>{const i=Rw(a),{conflictingClassGroups:s,conflictingClassGroupModifiers:r}=a;return{getClassGroupId:h=>{if(h.startsWith("[")&&h.endsWith("]"))return Mw(h);const m=h.split(Ir),y=m[0]===""&&m.length>1?1:0;return lv(m,y,i)},getConflictingClassGroupIds:(h,m)=>{if(m){const y=r[h],g=s[h];return y?g?Ow(g,y):y:g||wg}return s[h]||wg}}},lv=(a,i,s)=>{if(a.length-i===0)return s.classGroupId;const c=a[i],d=s.nextPart.get(c);if(d){const g=lv(a,i+1,d);if(g)return g}const h=s.validators;if(h===null)return;const m=i===0?a.join(Ir):a.slice(i).join(Ir),y=h.length;for(let g=0;g<y;g++){const x=h[g];if(x.validator(m))return x.classGroupId}},Mw=a=>a.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=a.slice(1,-1),s=i.indexOf(":"),r=i.slice(0,s);return r?_w+r:void 0})(),Rw=a=>{const{theme:i,classGroups:s}=a;return Lw(s,i)},Lw=(a,i)=>{const s=sv();for(const r in a){const c=a[r];Rd(c,s,r,i)}return s},Rd=(a,i,s,r)=>{const c=a.length;for(let d=0;d<c;d++){const h=a[d];Uw(h,i,s,r)}},Uw=(a,i,s,r)=>{if(typeof a=="string"){Bw(a,i,s);return}if(typeof a=="function"){Hw(a,i,s,r);return}qw(a,i,s,r)},Bw=(a,i,s)=>{const r=a===""?i:rv(i,a);r.classGroupId=s},Hw=(a,i,s,r)=>{if($w(a)){Rd(a(r),i,s,r);return}i.validators===null&&(i.validators=[]),i.validators.push(zw(s,a))},qw=(a,i,s,r)=>{const c=Object.entries(a),d=c.length;for(let h=0;h<d;h++){const[m,y]=c[h];Rd(y,rv(i,m),s,r)}},rv=(a,i)=>{let s=a;const r=i.split(Ir),c=r.length;for(let d=0;d<c;d++){const h=r[d];let m=s.nextPart.get(h);m||(m=sv(),s.nextPart.set(h,m)),s=m}return s},$w=a=>"isThemeGetter"in a&&a.isThemeGetter===!0,Yw=a=>{if(a<1)return{get:()=>{},set:()=>{}};let i=0,s=Object.create(null),r=Object.create(null);const c=(d,h)=>{s[d]=h,i++,i>a&&(i=0,r=s,s=Object.create(null))};return{get(d){let h=s[d];if(h!==void 0)return h;if((h=r[d])!==void 0)return c(d,h),h},set(d,h){d in s?s[d]=h:c(d,h)}}},rd="!",jg=":",Kw=[],Ng=(a,i,s,r,c)=>({modifiers:a,hasImportantModifier:i,baseClassName:s,maybePostfixModifierPosition:r,isExternal:c}),Gw=a=>{const{prefix:i,experimentalParseClassName:s}=a;let r=c=>{const d=[];let h=0,m=0,y=0,g;const x=c.length;for(let w=0;w<x;w++){const N=c[w];if(h===0&&m===0){if(N===jg){d.push(c.slice(y,w)),y=w+1;continue}if(N==="/"){g=w;continue}}N==="["?h++:N==="]"?h--:N==="("?m++:N===")"&&m--}const b=d.length===0?c:c.slice(y);let S=b,E=!1;b.endsWith(rd)?(S=b.slice(0,-1),E=!0):b.startsWith(rd)&&(S=b.slice(1),E=!0);const T=g&&g>y?g-y:void 0;return Ng(d,E,S,T)};if(i){const c=i+jg,d=r;r=h=>h.startsWith(c)?d(h.slice(c.length)):Ng(Kw,!1,h,void 0,!0)}if(s){const c=r;r=d=>s({className:d,parseClassName:c})}return r},Vw=a=>{const i=new Map;return a.orderSensitiveModifiers.forEach((s,r)=>{i.set(s,1e6+r)}),s=>{const r=[];let c=[];for(let d=0;d<s.length;d++){const h=s[d],m=h[0]==="[",y=i.has(h);m||y?(c.length>0&&(c.sort(),r.push(...c),c=[]),r.push(h)):c.push(h)}return c.length>0&&(c.sort(),r.push(...c)),r}},Qw=a=>({cache:Yw(a.cacheSize),parseClassName:Gw(a),sortModifiers:Vw(a),...Dw(a)}),Xw=/\s+/,Zw=(a,i)=>{const{parseClassName:s,getClassGroupId:r,getConflictingClassGroupIds:c,sortModifiers:d}=i,h=[],m=a.trim().split(Xw);let y="";for(let g=m.length-1;g>=0;g-=1){const x=m[g],{isExternal:b,modifiers:S,hasImportantModifier:E,baseClassName:T,maybePostfixModifierPosition:w}=s(x);if(b){y=x+(y.length>0?" "+y:y);continue}let N=!!w,z=r(N?T.substring(0,w):T);if(!z){if(!N){y=x+(y.length>0?" "+y:y);continue}if(z=r(T),!z){y=x+(y.length>0?" "+y:y);continue}N=!1}const Y=S.length===0?"":S.length===1?S[0]:d(S).join(":"),M=E?Y+rd:Y,H=M+z;if(h.indexOf(H)>-1)continue;h.push(H);const q=c(z,N);for(let X=0;X<q.length;++X){const Z=q[X];h.push(M+Z)}y=x+(y.length>0?" "+y:y)}return y},Iw=(...a)=>{let i=0,s,r,c="";for(;i<a.length;)(s=a[i++])&&(r=cv(s))&&(c&&(c+=" "),c+=r);return c},cv=a=>{if(typeof a=="string")return a;let i,s="";for(let r=0;r<a.length;r++)a[r]&&(i=cv(a[r]))&&(s&&(s+=" "),s+=i);return s},Jw=(a,...i)=>{let s,r,c,d;const h=y=>{const g=i.reduce((x,b)=>b(x),a());return s=Qw(g),r=s.cache.get,c=s.cache.set,d=m,m(y)},m=y=>{const g=r(y);if(g)return g;const x=Zw(y,s);return c(y,x),x};return d=h,(...y)=>d(Iw(...y))},Fw=[],it=a=>{const i=s=>s[a]||Fw;return i.isThemeGetter=!0,i},ov=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,uv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Pw=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ww=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ej=/\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$/,tj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,aj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fa=a=>Pw.test(a),je=a=>!!a&&!Number.isNaN(Number(a)),ha=a=>!!a&&Number.isInteger(Number(a)),Pu=a=>a.endsWith("%")&&je(a.slice(0,-1)),Un=a=>Ww.test(a),dv=()=>!0,ij=a=>ej.test(a)&&!tj.test(a),Ld=()=>!1,sj=a=>nj.test(a),lj=a=>aj.test(a),rj=a=>!re(a)&&!ce(a),cj=a=>va(a,mv,Ld),re=a=>ov.test(a),Ua=a=>va(a,pv,ij),Cg=a=>va(a,gj,je),oj=a=>va(a,yv,dv),uj=a=>va(a,gv,Ld),Eg=a=>va(a,fv,Ld),dj=a=>va(a,hv,lj),Br=a=>va(a,vv,sj),ce=a=>uv.test(a),Zs=a=>Va(a,pv),fj=a=>Va(a,gv),Ag=a=>Va(a,fv),hj=a=>Va(a,mv),mj=a=>Va(a,hv),Hr=a=>Va(a,vv,!0),pj=a=>Va(a,yv,!0),va=(a,i,s)=>{const r=ov.exec(a);return r?r[1]?i(r[1]):s(r[2]):!1},Va=(a,i,s=!1)=>{const r=uv.exec(a);return r?r[1]?i(r[1]):s:!1},fv=a=>a==="position"||a==="percentage",hv=a=>a==="image"||a==="url",mv=a=>a==="length"||a==="size"||a==="bg-size",pv=a=>a==="length",gj=a=>a==="number",gv=a=>a==="family-name",yv=a=>a==="number"||a==="weight",vv=a=>a==="shadow",yj=()=>{const a=it("color"),i=it("font"),s=it("text"),r=it("font-weight"),c=it("tracking"),d=it("leading"),h=it("breakpoint"),m=it("container"),y=it("spacing"),g=it("radius"),x=it("shadow"),b=it("inset-shadow"),S=it("text-shadow"),E=it("drop-shadow"),T=it("blur"),w=it("perspective"),N=it("aspect"),z=it("ease"),Y=it("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],q=()=>[...H(),ce,re],X=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto","contain","none"],_=()=>[ce,re,y],P=()=>[fa,"full","auto",..._()],Se=()=>[ha,"none","subgrid",ce,re],W=()=>["auto",{span:["full",ha,ce,re]},ha,ce,re],se=()=>[ha,"auto",ce,re],ue=()=>["auto","min","max","fr",ce,re],ge=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",..._()],J=()=>[fa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",..._()],ne=()=>[fa,"screen","full","dvw","lvw","svw","min","max","fit",..._()],fe=()=>[fa,"screen","full","lh","dvh","lvh","svh","min","max","fit",..._()],I=()=>[a,ce,re],A=()=>[...H(),Ag,Eg,{position:[ce,re]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",hj,cj,{size:[ce,re]}],D=()=>[Pu,Zs,Ua],F=()=>["","none","full",g,ce,re],ie=()=>["",je,Zs,Ua],pe=()=>["solid","dashed","dotted","double"],$e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[je,Pu,Ag,Eg],Pt=()=>["","none",T,ce,re],Rt=()=>["none",je,ce,re],Wt=()=>["none",je,ce,re],gn=()=>[je,ce,re],yt=()=>[fa,"full",..._()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Un],breakpoint:[Un],color:[dv],container:[Un],"drop-shadow":[Un],ease:["in","out","in-out"],font:[rj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Un],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Un],shadow:[Un],spacing:["px",je],text:[Un],"text-shadow":[Un],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fa,re,ce,N]}],container:["container"],columns:[{columns:[je,re,ce,m]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"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:q()}],overflow:[{overflow:X()}],"overflow-x":[{"overflow-x":X()}],"overflow-y":[{"overflow-y":X()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[ha,"auto",ce,re]}],basis:[{basis:[fa,"full","auto",m,..._()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,fa,"auto","initial","none",re]}],grow:[{grow:["",je,ce,re]}],shrink:[{shrink:["",je,ce,re]}],order:[{order:[ha,"first","last","none",ce,re]}],"grid-cols":[{"grid-cols":Se()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":se()}],"col-end":[{"col-end":se()}],"grid-rows":[{"grid-rows":Se()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":se()}],"row-end":[{"row-end":se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ue()}],"auto-rows":[{"auto-rows":ue()}],gap:[{gap:_()}],"gap-x":[{"gap-x":_()}],"gap-y":[{"gap-y":_()}],"justify-content":[{justify:[...ge(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...ge()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":ge()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:_()}],px:[{px:_()}],py:[{py:_()}],ps:[{ps:_()}],pe:[{pe:_()}],pbs:[{pbs:_()}],pbe:[{pbe:_()}],pt:[{pt:_()}],pr:[{pr:_()}],pb:[{pb:_()}],pl:[{pl:_()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mbs:[{mbs:L()}],mbe:[{mbe:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":_()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":_()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...ne()]}],"min-inline-size":[{"min-inline":["auto",...ne()]}],"max-inline-size":[{"max-inline":["none",...ne()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[m,"screen",...J()]}],"min-w":[{"min-w":[m,"screen","none",...J()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[h]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",s,Zs,Ua]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,pj,oj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Pu,re]}],"font-family":[{font:[fj,uj,i]}],"font-features":[{"font-features":[re]}],"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:[c,ce,re]}],"line-clamp":[{"line-clamp":[je,"none",ce,Cg]}],leading:[{leading:[d,..._()]}],"list-image":[{"list-image":["none",ce,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",ce,Ua]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[je,"auto",ce,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,re]}],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",ce,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:A()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ha,ce,re],radial:["",ce,re],conic:[ha,ce,re]},mj,dj]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:D()}],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-bs":[{"border-bs":ie()}],"border-w-be":[{"border-be":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,ce,re]}],"outline-w":[{outline:["",je,Zs,Ua]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",x,Hr,Br]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",b,Hr,Br]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[je,Ua]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",S,Hr,Br]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[je,ce,re]}],"mix-blend":[{"mix-blend":[...$e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$e()}],"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":[je]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[ce,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":H()}],"mask-image-conic-pos":[{"mask-conic":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,re]}],filter:[{filter:["","none",ce,re]}],blur:[{blur:Pt()}],brightness:[{brightness:[je,ce,re]}],contrast:[{contrast:[je,ce,re]}],"drop-shadow":[{"drop-shadow":["","none",E,Hr,Br]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",je,ce,re]}],"hue-rotate":[{"hue-rotate":[je,ce,re]}],invert:[{invert:["",je,ce,re]}],saturate:[{saturate:[je,ce,re]}],sepia:[{sepia:["",je,ce,re]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,re]}],"backdrop-blur":[{"backdrop-blur":Pt()}],"backdrop-brightness":[{"backdrop-brightness":[je,ce,re]}],"backdrop-contrast":[{"backdrop-contrast":[je,ce,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,ce,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,ce,re]}],"backdrop-invert":[{"backdrop-invert":["",je,ce,re]}],"backdrop-opacity":[{"backdrop-opacity":[je,ce,re]}],"backdrop-saturate":[{"backdrop-saturate":[je,ce,re]}],"backdrop-sepia":[{"backdrop-sepia":["",je,ce,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":_()}],"border-spacing-x":[{"border-spacing-x":_()}],"border-spacing-y":[{"border-spacing-y":_()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",ce,re]}],ease:[{ease:["linear","initial",z,ce,re]}],delay:[{delay:[je,ce,re]}],animate:[{animate:["none",Y,ce,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,ce,re]}],"perspective-origin":[{"perspective-origin":q()}],rotate:[{rotate:Rt()}],"rotate-x":[{"rotate-x":Rt()}],"rotate-y":[{"rotate-y":Rt()}],"rotate-z":[{"rotate-z":Rt()}],scale:[{scale:Wt()}],"scale-x":[{"scale-x":Wt()}],"scale-y":[{"scale-y":Wt()}],"scale-z":[{"scale-z":Wt()}],"scale-3d":["scale-3d"],skew:[{skew:gn()}],"skew-x":[{"skew-x":gn()}],"skew-y":[{"skew-y":gn()}],transform:[{transform:[ce,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:yt()}],"translate-x":[{"translate-x":yt()}],"translate-y":[{"translate-y":yt()}],"translate-z":[{"translate-z":yt()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"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",ce,re]}],"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":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mbs":[{"scroll-mbs":_()}],"scroll-mbe":[{"scroll-mbe":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pbs":[{"scroll-pbs":_()}],"scroll-pbe":[{"scroll-pbe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",ce,re]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[je,Zs,Ua,Cg]}],stroke:[{stroke:["none",...I()]}],"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"]}},vj=Jw(yj);function Ft(...a){return vj(av(a))}const bj=iv("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 bv({className:a,variant:i,...s}){return u.jsx("div",{className:Ft(bj({variant:i}),a),...s})}var xj=Symbol.for("react.lazy"),Jr=ud[" use ".trim().toString()];function Sj(a){return typeof a=="object"&&a!==null&&"then"in a}function xv(a){return a!=null&&typeof a=="object"&&"$$typeof"in a&&a.$$typeof===xj&&"_payload"in a&&Sj(a._payload)}function wj(a){const i=Nj(a),s=j.forwardRef((r,c)=>{let{children:d,...h}=r;xv(d)&&typeof Jr=="function"&&(d=Jr(d._payload));const m=j.Children.toArray(d),y=m.find(Ej);if(y){const g=y.props.children,x=m.map(b=>b===y?j.Children.count(g)>1?j.Children.only(null):j.isValidElement(g)?g.props.children:null:b);return u.jsx(i,{...h,ref:c,children:j.isValidElement(g)?j.cloneElement(g,void 0,x):null})}return u.jsx(i,{...h,ref:c,children:d})});return s.displayName=`${a}.Slot`,s}var jj=wj("Slot");function Nj(a){const i=j.forwardRef((s,r)=>{let{children:c,...d}=s;if(xv(c)&&typeof Jr=="function"&&(c=Jr(c._payload)),j.isValidElement(c)){const h=kj(c),m=Aj(d,c.props);return c.type!==j.Fragment&&(m.ref=r?Ed(r,h):h),j.cloneElement(c,m)}return j.Children.count(c)>1?j.Children.only(null):null});return i.displayName=`${a}.SlotClone`,i}var Cj=Symbol("radix.slottable");function Ej(a){return j.isValidElement(a)&&typeof a.type=="function"&&"__radixId"in a.type&&a.type.__radixId===Cj}function Aj(a,i){const s={...i};for(const r in i){const c=a[r],d=i[r];/^on[A-Z]/.test(r)?c&&d?s[r]=(...m)=>{const y=d(...m);return c(...m),y}:c&&(s[r]=c):r==="style"?s[r]={...c,...d}:r==="className"&&(s[r]=[c,d].filter(Boolean).join(" "))}return{...a,...s}}function kj(a){let i=Object.getOwnPropertyDescriptor(a.props,"ref")?.get,s=i&&"isReactWarning"in i&&i.isReactWarning;return s?a.ref:(i=Object.getOwnPropertyDescriptor(a,"ref")?.get,s=i&&"isReactWarning"in i&&i.isReactWarning,s?a.props.ref:a.props.ref||a.ref)}const Tj=iv("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"}}),me=j.forwardRef(({className:a,variant:i,size:s,asChild:r=!1,...c},d)=>{const h=r?jj:"button";return u.jsx(h,{ref:d,className:Ft(Tj({variant:i,size:s,className:a})),...c})});me.displayName="Button";const Ie=j.forwardRef(({className:a,...i},s)=>u.jsx("div",{ref:s,className:Ft("rounded-xl border border-zinc-800 bg-zinc-950/75 shadow-[0_0_0_1px_rgba(255,255,255,0.01)] backdrop-blur",a),...i}));Ie.displayName="Card";const Oj=j.forwardRef(({className:a,...i},s)=>u.jsx("div",{ref:s,className:Ft("flex flex-col gap-1.5 p-5",a),...i}));Oj.displayName="CardHeader";const zj=j.forwardRef(({className:a,...i},s)=>u.jsx("h3",{ref:s,className:Ft("font-medium tracking-tight text-zinc-50",a),...i}));zj.displayName="CardTitle";const _j=j.forwardRef(({className:a,...i},s)=>u.jsx("p",{ref:s,className:Ft("text-sm text-zinc-500",a),...i}));_j.displayName="CardDescription";const Dj=j.forwardRef(({className:a,...i},s)=>u.jsx("div",{ref:s,className:Ft("p-5 pt-0",a),...i}));Dj.displayName="CardContent";const Mj=Fy,Rj=Py,Sv=j.forwardRef(({className:a,...i},s)=>u.jsx(Od,{ref:s,className:Ft("fixed inset-0 z-50 bg-black/70 backdrop-blur-sm",a),...i}));Sv.displayName=Od.displayName;const Lj=400,Uj=1200,Bj=720,wv=j.forwardRef(({className:a,children:i,...s},r)=>{const[c,d]=j.useState(Bj),h=j.useRef(!1),m=j.useRef(0),y=j.useRef(0),g=j.useCallback(S=>{h.current=!0,m.current=S.clientX,y.current=c,S.target.setPointerCapture(S.pointerId),S.preventDefault()},[c]),x=j.useCallback(S=>{if(!h.current)return;const E=m.current-S.clientX,T=Math.min(Uj,Math.max(Lj,y.current+E));d(T)},[]),b=j.useCallback(()=>{h.current=!1},[]);return u.jsxs(Rj,{children:[u.jsx(Sv,{}),u.jsxs(zd,{ref:r,className:Ft("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",a),style:{width:`min(${c}px, 100vw)`},...s,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:g,onPointerMove:x,onPointerUp:b}),i,u.jsxs(ev,{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(Md,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});wv.displayName=zd.displayName;const Hj=({className:a,...i})=>u.jsx("div",{className:Ft("flex flex-col gap-1.5 pr-10",a),...i}),jv=j.forwardRef(({className:a,...i},s)=>u.jsx(_d,{ref:s,className:Ft("text-lg font-medium text-zinc-50",a),...i}));jv.displayName=_d.displayName;const Nv=j.forwardRef(({className:a,...i},s)=>u.jsx(Wy,{ref:s,className:Ft("text-sm text-zinc-500",a),...i}));Nv.displayName=Wy.displayName;function ln(a){const i=new Date("2026-02-20");return a.map((s,r)=>({runId:`run_mock_${r+1}`,citationState:s,createdAt:new Date(i.getTime()+r*2*24*60*60*1e3).toISOString()}))}const Ki=[{id:"project_citypoint",name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",country:"US",language:"en",tags:["local intent","priority"],labels:{},configSource:"cli",configRevision:1},{id:"project_harbor",name:"Harbor Legal Group",canonicalDomain:"harborlegal.com",country:"US",language:"en",tags:["lead gen"],labels:{},configSource:"cli",configRevision:1},{id:"project_northstar",name:"Northstar Orthopedics",canonicalDomain:"northstarortho.com",country:"US",language:"en",tags:["multi-location"],labels:{},configSource:"cli",configRevision:1}];function Fi(a){return{id:a.id,projectId:a.projectId,projectName:a.projectName,kind:a.kind,kindLabel:a.kindLabel,status:a.status,trigger:a.trigger??"manual",createdAt:a.createdAt,startedAt:a.startedAt,duration:a.duration,statusDetail:a.statusDetail,summary:a.summary,triggerLabel:a.triggerLabel}}const Cv=Fi({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"}),Fr=Fi({id:"run_citypoint_audit_20260308",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"site-audit",kindLabel:"Technical readiness audit",status:"partial",createdAt:"2026-03-08T09:20:00.000Z",startedAt:"Mar 8, 9:20 AM",duration:"14m 41s",statusDetail:"Sitemap fallback engaged; 461 of 500 pages analyzed and llms.txt was not found.",summary:"Fallback crawl completed with missing llms.txt",triggerLabel:"Manual"}),Ud=Fi({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"}),Bd=Fi({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"}),Ev=Fi({id:"run_harbor_audit_20260307",projectId:"project_harbor",projectName:"Harbor Legal Group",kind:"site-audit",kindLabel:"Technical readiness audit",status:"completed",createdAt:"2026-03-07T15:40:00.000Z",startedAt:"Mar 7, 3:40 PM",duration:"11m 33s",statusDetail:"Sitemap-first crawl completed with 99% success and no blocking readiness regressions.",summary:"Audit clean after service-page consolidation",triggerLabel:"Scheduled"}),Pr=Fi({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"}),qj=[Ud,Cv,Fr,Bd,Ev,Pr],$j=[{id:"evidence_citypoint_emergency_gemini",keyword:"emergency dentist brooklyn",provider:"gemini",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:ln(["cited","cited","cited","cited","cited","cited","cited","not-cited","not-cited"])},{id:"evidence_citypoint_emergency_openai",keyword:"emergency dentist brooklyn",provider:"openai",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:ln(["not-cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_emergency_claude",keyword:"emergency dentist brooklyn",provider:"claude",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:ln(["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",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:ln(["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",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:ln(["cited","cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_invisalign_claude",keyword:"best invisalign dentist downtown brooklyn",provider:"claude",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:ln(["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",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:ln(["not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_gemini",keyword:"pediatric dentist brooklyn heights",provider:"gemini",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:ln(["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",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:ln(["not-cited","not-cited","not-cited","not-cited","not-cited","cited"])}],Yj=[{project:Ki[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",score:55,cited:5,total:9},{provider:"openai",score:67,cited:6,total:9},{provider:"claude",score:44,cited:4,total:9}],readinessSummary:{label:"Technical Readiness",value:"78 / 100",delta:"+4 after schema fixes",tone:"positive",description:"Schema fixes landed, but sitemap fallback and missing llms.txt still reduce confidence.",trend:[71,72,73,76,78]},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 technical audit completed in fallback mode; next visibility 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",providers:["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",providers:["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",providers:["claude","gemini"],citationState:"not-cited"}]}],visibilityEvidence:$j,technicalFindings:[{id:"finding_citypoint_schema",severity:"high",title:"Emergency service page lost FAQ schema",detail:"The page most closely tied to high-intent emergency prompts is no longer exposing FAQPage markup.",impact:"Removes a strong grounding signal from the page that previously earned citations."},{id:"finding_citypoint_llms",severity:"medium",title:"llms.txt is still missing",detail:"The latest site audit could not fetch llms.txt or llms-full.txt.",impact:"Lowers crawler clarity and weakens the story when visibility drops."},{id:"finding_citypoint_internal_links",severity:"low",title:"Insurance and pediatric content sit too deep",detail:"Supporting pages needed for family and insurance prompts sit three clicks from the homepage.",impact:"Limits discovery for lower-volume but high-trust prompt variants."}],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:[Ud,Cv,Fr]},{project:Ki[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",score:75,cited:3,total:4},{provider:"openai",score:50,cited:2,total:4}],readinessSummary:{label:"Technical Readiness",value:"83 / 100",delta:"+1 this week",tone:"positive",description:"Service pages consolidated cleanly and structured data remains intact.",trend:[80,80,81,82,83]},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 and audit runs completed without fallback.",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",providers:["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",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:ln(["cited","cited","cited","cited","cited"])}],technicalFindings:[{id:"finding_harbor_faq",severity:"low",title:"FAQ answers could be more concise",detail:"Some FAQ answers are still long enough to reduce snippet clarity.",impact:"This is optimization, not a blocker."}],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:[Bd,Ev]},{project:Ki[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",score:58,cited:4,total:7}],readinessSummary:{label:"Technical Readiness",value:"76 / 100",delta:"+3 after template cleanup",tone:"positive",description:"Location templates are cleaner, but location-specific proof still needs depth.",trend:[69,71,72,74,76]},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",providers:["openai"],citationState:"emerging"}]}],visibilityEvidence:[{id:"evidence_northstar_knee",keyword:"knee replacement surgeon westchester",provider:"openai",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:ln(["not-cited","not-cited","not-cited","cited"])}],technicalFindings:[{id:"finding_northstar_proof",severity:"medium",title:"Location pages lack physician-specific proof",detail:"Treatment pages are structurally sound but still too generic for highly specific prompts.",impact:"Limits how often the provider is cited for local treatment questions."}],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:[Pr]}],Kj={portfolioOverview:{projects:[{project:Ki[0],visibilityScore:61,visibilityDelta:"-8 this week",readinessScore:78,readinessDelta:"+4 after schema fixes",lastRun:Fr,insight:"Lost emergency-intent citations after competitors refreshed availability pages.",trend:[73,71,69,66,61],competitorPressureLabel:"High"},{project:Ki[1],visibilityScore:74,visibilityDelta:"+2 this week",readinessScore:83,readinessDelta:"+1 this week",lastRun:Bd,insight:"Practice-area consolidation is stabilizing branded and informational prompts.",trend:[68,70,71,73,74],competitorPressureLabel:"Moderate"},{project:Ki[2],visibilityScore:58,visibilityDelta:"Run in progress",readinessScore:76,readinessDelta:"+3 after template cleanup",lastRun:Pr,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:[Ud,Pr,Fr],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:Yj,runs:qj,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 or site-audit 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-2.5-flash",state:"ready",detail:"API key detected and conservative quota defaults are active.",quota:{maxConcurrency:2,maxRequestsPerMinute:10,maxRequestsPerDay:1e3}},{name:"OpenAI",model:"gpt-4o",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."}},Gj={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 Vj(a={}){const i=structuredClone(Kj),s=structuredClone(Gj);if(a.emptyPortfolio&&(i.portfolioOverview.projects=[],i.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"}],i.portfolioOverview.recentRuns=[],i.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"}),a.runScenario==="partial"&&(i.runs[0].status="partial",i.runs[0].duration="7m 24s",i.runs[0].statusDetail="Quota window closed mid-run; 14 of 18 prompts completed before the worker paused.",i.runs[0].summary="Partial visibility sweep after quota cap",i.portfolioOverview.recentRuns[0]=i.runs[0]),a.runScenario==="failed"&&(i.runs[0].status="failed",i.runs[0].duration="1m 43s",i.runs[0].statusDetail="Worker could not reach the provider after repeated retry exhaustion.",i.runs[0].summary="Provider retries exhausted before results were captured",i.portfolioOverview.recentRuns[0]=i.runs[0],i.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"})),a.degradedWorker&&(s.workerStatus={label:"Worker",state:"error",detail:"heartbeat stale · last seen 12m ago",version:"phase-1",databaseConfigured:!0,lastHeartbeatAt:"2026-03-09T07:55:00.000Z"}),a.providerNeedsConfig&&(i.settings.providerStatuses=i.settings.providerStatuses.map(r=>({...r,state:"needs-config",detail:"API key is missing, so answer-visibility sweeps are blocked."}))),a.visibilityDropProjectId){const r=i.projects.find(d=>d.project.id===a.visibilityDropProjectId),c=i.portfolioOverview.projects.find(d=>d.project.id===a.visibilityDropProjectId);r&&(r.visibilitySummary.value="49 / 100",r.visibilitySummary.delta="-12 in 48h",r.visibilitySummary.tone="negative",r.visibilitySummary.description="A sharper drop than normal; citations slipped across both local and service-intent prompts.",r.insights.unshift({id:`${r.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:r.visibilityEvidence.filter(d=>d.citationState==="lost").slice(0,5).map(d=>({keyword:d.keyword,evidenceId:d.id,providers:[d.provider].filter(Boolean),citationState:d.citationState}))}),r.technicalFindings?.unshift({id:`${r.project.id}_drop_finding`,severity:"high",title:"Primary supporting page fell out of crawl emphasis",detail:"The drop correlates with weaker internal links and missing FAQ markup on the main conversion page.",impact:"Both citation share and trust signals deteriorated at the same time."})),c&&(c.visibilityScore=49,c.visibilityDelta="-12 in 48h",c.insight="Sharp citation drop detected; grounding now prefers competitors on multiple high-intent prompts.")}return{dashboard:i,health:s}}function Av(a,i){return a.projects.find(s=>s.project.id===i)}function Qj(a,i){return a.runs.find(s=>s.id===i)}function Xj(a,i){for(const s of a.projects){const r=s.visibilityEvidence.find(c=>c.id===i);if(r)return{project:s,evidence:r}}}const Zj="/api/v1";function Ij(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.apiKey?window.__CANONRY_CONFIG__.apiKey:""}async function Ke(a,i){const s=Ij(),r=await fetch(`${Zj}${a}`,{...i,headers:{"Content-Type":"application/json",...s?{Authorization:`Bearer ${s}`}:{},...i?.headers}});if(!r.ok)throw new Error(`API ${r.status}: ${r.statusText}`);if(r.status!==204)return r.json()}function Jj(){return Ke("/projects")}function Fj(){return Ke("/runs")}function Wr(a){return Ke(`/runs/${encodeURIComponent(a)}`)}function Pj(a){return Ke(`/projects/${encodeURIComponent(a)}/keywords`)}function kv(a){return Ke(`/projects/${encodeURIComponent(a)}/competitors`)}function Wj(a){return Ke(`/projects/${encodeURIComponent(a)}/timeline`)}function Tv(a,i){return Ke(`/projects/${encodeURIComponent(a)}`,{method:"PUT",body:JSON.stringify(i)})}function eN(a,i){return Ke(`/projects/${encodeURIComponent(a)}/keywords`,{method:"PUT",body:JSON.stringify({keywords:i})})}function tN(a,i){return Ke(`/projects/${encodeURIComponent(a)}/keywords`,{method:"POST",body:JSON.stringify({keywords:i})})}function Ov(a,i){return Ke(`/projects/${encodeURIComponent(a)}/competitors`,{method:"PUT",body:JSON.stringify({competitors:i})})}function zv(a){return Ke(`/projects/${encodeURIComponent(a)}/runs`,{method:"POST",body:"{}"})}async function nN(a){await Ke(`/projects/${encodeURIComponent(a)}`,{method:"DELETE",body:"{}"})}function aN(a){return Ke(`/projects/${encodeURIComponent(a)}/export`)}function iN(){return Ke("/settings")}function sN(a,i){return Ke(`/settings/providers/${encodeURIComponent(a)}`,{method:"PUT",body:JSON.stringify(i)})}async function lN(a){try{return await Ke(`/projects/${encodeURIComponent(a)}/schedule`)}catch(i){if(i instanceof Error&&i.message.includes("404"))return null;throw i}}function kg(a,i){return Ke(`/projects/${encodeURIComponent(a)}/schedule`,{method:"PUT",body:JSON.stringify(i)})}async function rN(a){await Ke(`/projects/${encodeURIComponent(a)}/schedule`,{method:"DELETE",body:"{}"})}function cN(a){return Ke(`/projects/${encodeURIComponent(a)}/notifications`)}function oN(a,i){return Ke(`/projects/${encodeURIComponent(a)}/notifications`,{method:"POST",body:JSON.stringify(i)})}async function uN(a,i){await Ke(`/projects/${encodeURIComponent(a)}/notifications/${encodeURIComponent(i)}`,{method:"DELETE",body:"{}"})}function dN(a,i){return Ke(`/projects/${encodeURIComponent(a)}/notifications/${encodeURIComponent(i)}/test`,{method:"POST",body:"{}"})}function fN(a,i,s){return Ke(`/projects/${encodeURIComponent(a)}/keywords/generate`,{method:"POST",body:JSON.stringify({provider:i,count:s})})}function hN(a){return Ke("/apply",{method:"POST",body:JSON.stringify(a)})}function _v(a){return{id:a.id,name:a.name,displayName:a.displayName,canonicalDomain:a.canonicalDomain,country:a.country,language:a.language,tags:a.tags,labels:a.labels,configSource:a.configSource,configRevision:a.configRevision,createdAt:a.createdAt,updatedAt:a.updatedAt}}function Tg(a){try{return new Date(a).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return a}}function mN(a,i){if(!a)return"Waiting";if(!i)return"Running";const s=new Date(i).getTime()-new Date(a).getTime();if(s<1e3)return"<1s";const r=Math.floor(s/1e3);if(r<60)return`${r}s`;const c=Math.floor(r/60),d=r%60;return`${c}m ${d}s`}function Dv(a){return a==="answer-visibility"?"Answer visibility sweep":a}function pN(a){return a==="manual"?"Manual":a==="scheduled"?"Scheduled":a==="config-apply"?"Config apply":a}function Hd(a,i){return{id:a.id,projectId:a.projectId,projectName:i,kind:a.kind,kindLabel:Dv(a.kind),status:a.status,trigger:a.trigger??"manual",createdAt:a.createdAt,startedAt:a.startedAt?Tg(a.startedAt):Tg(a.createdAt),duration:mN(a.startedAt,a.finishedAt),statusDetail:a.error?Mv(a.error):gN(a),summary:yN(a),triggerLabel:pN(a.trigger)}}function Mv(a){try{const s=JSON.parse(a);if(typeof s=="object"&&s!==null){const r=s.message??s.error?.message??s[0]?.error?.message;if(typeof r=="string"&&r.length>0)return r.length>200?r.slice(0,200)+"…":r}}catch{}const i=a.match(/\[.*?\]\s*(.+)/);if(i){const s=i[1];return s.length>200?s.slice(0,200)+"…":s}return a.length>200?a.slice(0,200)+"…":a}function gN(a){switch(a.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 a.error?Mv(a.error):"Run failed.";default:return""}}function yN(a){switch(a.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 a.status}}function Rv(a){if(a.length===0)return{score:0,citedCount:0,totalCount:0};const i=new Map;for(const d of a){const h=d.keyword??d.id;i.has(h)||i.set(h,!1),d.citationState==="cited"&&i.set(h,!0)}const s=i.size,r=[...i.values()].filter(Boolean).length;return{score:s>0?Math.round(r/s*100):0,citedCount:r,totalCount:s}}function vN(a){return a>=70?"positive":a>=40?"caution":"negative"}function bN(a){return a==="High"?"negative":a==="Moderate"?"caution":"neutral"}function Lv(a,i){if(a.length===0||i.length===0)return{label:"None",count:0};const s=new Set(i);let r=0;for(const d of a)d.competitorOverlap.some(h=>s.has(h))&&r++;const c=r/a.length;return c>=.5?{label:"High",count:r}:c>=.2?{label:"Moderate",count:r}:{label:"Low",count:r}}function xN(a,i,s,r){const c=[];let d=0;const h=new Set;if(s){const m=new Map;for(const g of s.snapshots)if(g.keyword){const x=`${g.keyword}::${g.provider}`;m.set(x,g)}const y=[...new Set(s.snapshots.map(g=>g.provider))].sort();y.length===0&&y.push("gemini");for(const g of i){if(g.runs.length===0)continue;h.add(g.keyword);const b=g.runs.at(-1)?.transition??"not-cited",S=b==="lost"?"lost":b==="emerging"?"emerging":b==="cited"?"cited":"not-cited";for(const E of y){const T=m.get(`${g.keyword}::${E}`);if(!T&&y.length>1)continue;const w=g.providerRuns?.[E],N=w&&w.length>0,z=N?w.at(-1).transition:b,Y=z==="lost"?"lost":z==="emerging"?"emerging":T?T.citationState==="cited"?"cited":"not-cited":S,M=Og(N?w:g.runs),H=(N?w:g.runs).map(q=>({runId:q.runId,citationState:q.citationState,createdAt:q.createdAt}));c.push({id:`evidence_${a}_${d++}`,keyword:g.keyword,provider:T?.provider??E,citationState:Y,changeLabel:SN(z,M),answerSnippet:T?.answerText??"",citedDomains:T?.citedDomains??[],evidenceUrls:[],competitorDomains:T?.competitorOverlap??[],relatedTechnicalSignals:[],groundingSources:T?.groundingSources??[],summary:wN(Y,g.keyword),runHistory:H})}}}for(const m of r)h.has(m.keyword)||c.push({id:`evidence_${a}_${d++}`,keyword:m.keyword,provider:"",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 c}function Og(a){if(a.length===0)return 0;const i=a[a.length-1].citationState;let s=0;for(let r=a.length-1;r>=0&&a[r].citationState===i;r--)s++;return s}function SN(a,i){switch(a){case"new":return"First observation";case"cited":return i<=1?"Cited in latest run":`Cited for ${i} runs`;case"lost":return"Lost since last run";case"emerging":return"First citation";case"not-cited":return i<=1?"Not cited in latest run":`Not cited across ${i} runs`;default:return a}}function wN(a,i){switch(a){case"cited":return`Your domain is cited in AI answers for "${i}".`;case"lost":return`Citation was lost for "${i}". Competitors may have gained ground.`;case"emerging":return`Your domain is starting to appear in answers for "${i}".`;case"not-cited":return`No citation detected for "${i}".`;case"pending":return`"${i}" has been added but no visibility run has been triggered yet.`}}function jN(a){const i=a.map(s=>s.citationState);return i.includes("cited")?"cited":i.includes("emerging")?"emerging":i.includes("lost")?"lost":i.includes("pending")?"pending":"not-cited"}function NN(a){const i=[],s=new Map;for(const m of a){const y=s.get(m.keyword)??[];s.set(m.keyword,[...y,m])}function r(m,y){return{keyword:m[0].keyword,evidenceId:m.find(g=>g.citationState===y)?.id??m[0].id,providers:m.map(g=>g.provider).filter(Boolean),citationState:y}}const c=[],d=[],h=[];for(const[,m]of s){const y=jN(m);y==="lost"?c.push(r(m,"lost")):y==="emerging"?d.push(r(m,"emerging")):y==="not-cited"&&h.push(r(m,"not-cited"))}return c.length>0&&i.push({id:"insight_lost",tone:"negative",title:`Lost citation on ${c.length} key phrase${c.length>1?"s":""}`,detail:"Citations dropped since the last run.",actionLabel:"Lost",affectedPhrases:c}),d.length>0&&i.push({id:"insight_emerging",tone:"positive",title:`New citation on ${d.length} key phrase${d.length>1?"s":""}`,detail:"Your domain started appearing in AI answers.",actionLabel:"Emerging",affectedPhrases:d}),h.length>0&&i.push({id:"insight_gap",tone:"caution",title:`${h.length} key phrase${h.length>1?"s":""} not cited by any provider`,detail:"No citations detected across all providers.",actionLabel:"Gap",affectedPhrases:h}),i.length===0&&i.push({id:"insight_stable",tone:"neutral",title:"No significant changes",detail:"Citation state is stable across all tracked key phrases.",actionLabel:"Stable",affectedPhrases:[]}),i}function CN(a){const i=a[0];if(!i)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 s=i.status==="completed"?"Healthy":i.status==="running"?"Running":i.status==="queued"?"Queued":i.status==="partial"?"Partial":"Failed",r=i.status==="completed"?"positive":i.status==="failed"?"negative":i.status==="partial"?"caution":"neutral";return{label:"Run Status",value:s,delta:`${a.length} total runs`,tone:r,description:`Latest: ${Dv(i.kind)} — ${i.status}`,tooltip:"Current execution state of visibility sweeps. Shows the status of the most recent run and total run count.",trend:[]}}function EN(a){const i=_v(a.project),s=xN(i.name,a.timeline,a.latestRunDetail,a.keywords),r=a.latestRunDetail?.snapshots??[],c=Rv(r),d=Lv(r,a.competitors.map(b=>b.domain)),h=NN(s),m=[...a.runs].sort((b,S)=>S.createdAt.localeCompare(b.createdAt)),y=m.map(b=>Hd(b,a.project.displayName||a.project.name)),g=new Map;for(const b of r){const S=b.provider||"gemini",E=g.get(S)??{cited:0,total:0};E.total++,b.citationState==="cited"&&E.cited++,g.set(S,E)}const x=[...g.entries()].sort(([b],[S])=>b.localeCompare(S)).map(([b,{cited:S,total:E}])=>({provider:b,score:E>0?Math.round(S/E*100):0,cited:S,total:E}));return{project:i,dateRangeLabel:"All time",contextLabel:`${i.country} / ${i.language.toUpperCase()}`,visibilitySummary:{label:"Answer Visibility",value:r.length>0?`${c.score}`:"No data",delta:r.length>0?`${c.citedCount} of ${c.totalCount} key phrases visible`:"Run a sweep first",tone:r.length>0?vN(c.score):"neutral",description:r.length>0?`${c.citedCount} of ${c.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:x,readinessSummary:void 0,competitorPressure:{label:"Competitor Pressure",value:d.label,delta:d.count>0?`${d.count} overlapping citations`:"No overlap detected",tone:bN(d.label),description:a.competitors.length>0?`${a.competitors.length} competitor${a.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:CN(m),insights:h,visibilityEvidence:s,technicalFindings:void 0,competitors:a.competitors.map((b,S)=>{const E=new Set;for(const Y of r)(Y.competitorOverlap.includes(b.domain)||Y.citedDomains.includes(b.domain))&&Y.keyword&&E.add(Y.keyword);const T=[...E],w=new Set(r.map(Y=>Y.keyword).filter(Boolean)),N=w.size>0?T.length/w.size:0,z=N>=.5?"High":N>=.2?"Moderate":T.length>0?"Low":"None";return{id:b.id||`comp_${S}`,domain:b.domain,citationCount:T.length,totalKeywords:w.size,pressureLabel:z,citedKeywords:T,movement:"",notes:""}}),recentRuns:y.slice(0,5)}}function AN(a){const i=_v(a.project),s=a.latestRunDetail?.snapshots??[],r=Rv(s),c=Lv(s,a.competitors.map(y=>y.domain)),h=[...a.runs].sort((y,g)=>g.createdAt.localeCompare(y.createdAt))[0],m=h?Hd(h,a.project.displayName||a.project.name):{id:"none",projectId:a.project.id,projectName:a.project.displayName||a.project.name,kind:"answer-visibility",kindLabel:"No runs yet",status:"queued",trigger:"manual",createdAt:"",startedAt:"",duration:"",statusDetail:"",summary:"No runs yet",triggerLabel:""};return{project:i,visibilityScore:r.score,visibilityDelta:s.length>0?`${r.citedCount} of ${r.totalCount} key phrases`:"No data",readinessScore:void 0,readinessDelta:void 0,lastRun:m,insight:s.length>0?`${r.citedCount} of ${r.totalCount} key phrases visible across ${new Set(s.map(y=>y.provider)).size} provider${new Set(s.map(y=>y.provider)).size>1?"s":""}.`:"No runs completed yet.",trend:[],competitorPressureLabel:c.label}}function kN(a,i){const s=[],r=[],c=[];for(const h of a){r.push(EN(h)),c.push(AN(h));const m=[...h.runs].sort((y,g)=>g.createdAt.localeCompare(y.createdAt));for(const y of m)s.push(Hd(y,h.project.displayName||h.project.name))}s.sort((h,m)=>m.createdAt.localeCompare(h.createdAt));const d=a.length>0;return{portfolioOverview:{projects:c,attentionItems:d?TN(r):[{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:s.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"}),...d?{}:{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:r,runs:s,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:d,ctaLabel:d?"Trigger run":"Create a project first",summary:d?"Ready to run.":"Create a project first to launch a run."}},settings:{providerStatuses:(i?.providers??[]).map(h=>({name:h.name,model:h.model,state:h.configured?"ready":"needs-config",detail:h.configured?"Provider is configured.":"API key is missing.",quota:h.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 TN(a){const i=[];for(const s of a){const r=s.visibilityEvidence.filter(d=>d.citationState==="lost");r.length>0&&i.push({id:`attention_${s.project.id}_lost`,tone:"negative",title:`${s.project.displayName||s.project.name} lost citations`,detail:`${r.length} key phrase${r.length>1?"s":""} lost citation.`,actionLabel:"Open project",href:`/projects/${s.project.id}`});const c=s.recentRuns.filter(d=>d.status==="running"||d.status==="queued");c.length>0&&i.push({id:`attention_${s.project.id}_active`,tone:"neutral",title:`${s.project.displayName||s.project.name} has active runs`,detail:`${c.length} run${c.length>1?"s":""} in progress.`,actionLabel:"View runs",href:"/runs"})}return i.length===0&&i.push({id:"attention_stable",tone:"positive",title:"All projects stable",detail:"No citation losses or active runs to flag.",actionLabel:"View portfolio",href:"/"}),i}const zg=[{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"}],ON=Vj(),_g=a=>({label:a,state:"checking",detail:"Checking service health"}),zN={apiStatus:_g("API"),workerStatus:_g("Worker")};async function _N(a,i){try{const s=await fetch(a);if(!s.ok)return{label:i,state:"error",detail:`HTTP ${s.status}`};const r=await s.json(),c=typeof r.version=="string"?r.version:"unknown",d=typeof r.databaseUrlConfigured=="boolean"?r.databaseUrlConfigured:void 0,h=typeof r.lastHeartbeatAt=="string"?r.lastHeartbeatAt:void 0,m=[c,d===!1?"database not configured":"database configured",h?`heartbeat ${h}`:void 0].filter(Boolean).join(" · ");return{label:i,state:"ok",detail:m,version:c,databaseConfigured:d,lastHeartbeatAt:h}}catch(s){return{label:i,state:"error",detail:s instanceof Error?s.message:"unreachable"}}}function Gi(a){if(!a)return"/";const i=a.split("?")[0]??"/";return i===""?"/":i.length>1&&i.endsWith("/")?i.slice(0,-1):i}function DN(a,i){const s=Gi(a);if(s==="/")return{kind:"overview",path:"/"};if(s==="/runs")return{kind:"runs",path:"/runs"};if(s==="/settings")return{kind:"settings",path:"/settings"};if(s==="/setup")return{kind:"setup",path:"/setup"};if(s==="/projects")return{kind:"projects",path:"/projects"};if(s.startsWith("/projects/")){const r=s.slice(10);return Av(i,r)?{kind:"project",path:s,projectId:r}:{kind:"not-found",path:s}}return{kind:"not-found",path:s}}function MN(a){return a?Gi(a):typeof window<"u"?Gi(window.location.pathname):"/"}function ec(a){return a.state==="ok"?"positive":a.state==="checking"?"neutral":"negative"}function Uv(a){switch(a){case"completed":return"positive";case"partial":return"caution";case"failed":return"negative";case"queued":case"running":return"neutral"}}function RN(a){switch(a){case"cited":return"positive";case"emerging":return"positive";case"not-cited":return"caution";case"lost":return"negative";case"pending":return"neutral"}}function LN(a){switch(a){case"high":return"negative";case"medium":return"caution";case"low":return"neutral"}}function UN(a){const i=a.match(/^(\[.*?\])\s*(.+)/);if(i){const s=i[1],r=i[2],c=r.indexOf("{");if(c>=0){const d=r.slice(0,c).trim(),h=r.slice(c);try{const m=JSON.parse(h);return`${s} ${d}
184
-
185
- ${JSON.stringify(m,null,2)}`}catch{}}return`${s}
186
- ${r}`}try{const s=JSON.parse(a);return JSON.stringify(s,null,2)}catch{return a}}function rl(a){return a.split("-").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" ")}function BN(a,i,s){return a.map(r=>{if(r.id==="api")return{...r,tone:ec(i.apiStatus),detail:i.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:i.apiStatus.detail};if(r.id==="worker")return{...r,tone:ec(i.workerStatus),detail:i.workerStatus.state==="ok"?"Healthy":"Needs attention",meta:i.workerStatus.detail};const c=s.providerStatuses.filter(y=>y.state==="ready").length,d=s.providerStatuses.length,h=c>0,m=s.providerStatuses.filter(y=>y.state==="ready").map(y=>$v[y.name]??y.name).join(" · ");return{...r,label:"Providers",tone:h?"positive":"caution",detail:`${c} of ${d} configured`,meta:m||"None configured"}})}function HN(a,i){if(a.apiStatus.state!=="ok")return"Launch is blocked until the API responds cleanly.";if(a.apiStatus.databaseConfigured===!1)return"Launch is blocked until the API has a database connection configured.";if(a.workerStatus.state!=="ok")return"Launch is blocked until the worker is healthy and heartbeats are current.";if(!i.providerStatuses.some(s=>s.state==="ready"))return"Launch is blocked until at least one provider is configured."}function qN(a,i,s){const r=HN(i,s),c=structuredClone(a);return c.healthChecks=c.healthChecks.map(d=>{if(d.id==="api")return{...d,detail:i.apiStatus.detail,state:i.apiStatus.state==="ok"?"ready":"attention"};if(d.id==="worker")return{...d,detail:i.workerStatus.detail,state:i.workerStatus.state==="ok"?"ready":"attention"};const h=s.providerStatuses.some(m=>m.state==="ready");return{...d,detail:h?"At least one provider configured.":"No providers configured.",state:h?"ready":"attention"}}),c.launchState.enabled=r===void 0,c.launchState.blockedReason=r,c.launchState.summary=r??"Queue a visibility sweep first, then follow with a site audit to explain movement.",c}function Mt(a,i){return s=>{s.preventDefault(),s.stopPropagation(),a(i)}}function qr(a,i){return i==="projects"?a.kind==="projects"||a.kind==="project":i==="project"?a.kind==="project":a.kind===i}function $N({points:a,tone:i}){const s=j.useId();if(a.length===0)return null;const r=42,c=132,d=5,h=Math.min(...a),y=Math.max(...a)-h||1,g=c-d*2,x=r-d*2,b=a.map((S,E)=>{const T=d+E/Math.max(a.length-1,1)*g,w=d+(1-(S-h)/y)*x;return`${T},${w}`}).join(" ");return u.jsxs("svg",{className:`sparkline sparkline-${i}`,viewBox:`0 0 ${c} ${r}`,"aria-hidden":"true",children:[u.jsx("defs",{children:u.jsx("clipPath",{id:s,children:u.jsx("rect",{x:d,y:d,width:g,height:x,rx:"8"})})}),u.jsx("line",{className:"sparkline-guide",x1:d,x2:c-d,y1:r-d,y2:r-d}),u.jsx("polyline",{clipPath:`url(#${s})`,points:b,vectorEffect:"non-scaling-stroke"})]})}function Bv({text:a}){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:a})]})}function Is({value:a,label:i,delta:s,tone:r,description:c,tooltip:d,isNumeric:h=!0}){const g=2*Math.PI*48,x=Number.parseInt(a,10),b=h&&!Number.isNaN(x)?Math.min(x/100,1):.5,S=g*(1-b);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-${r}`,cx:"60",cy:"60",r:48,strokeWidth:6,strokeDasharray:g,strokeDashoffset:S,transform:"rotate(-90 60 60)"})]}),u.jsx("div",{className:"gauge-center",children:u.jsx("span",{className:h?"gauge-value":"gauge-value-text",children:a.split(" / ")[0]})})]}),u.jsxs("p",{className:"gauge-label",children:[i,d&&u.jsx(Bv,{text:d})]}),u.jsx("p",{className:"gauge-delta",children:s}),u.jsx("p",{className:"gauge-description",children:c})]})}function nt({tone:a,children:i}){const s=a==="positive"?"success":a==="caution"?"warning":a==="negative"?"destructive":"neutral";return u.jsx(bv,{variant:s,children:i})}function mc({status:a}){return u.jsx(nt,{tone:Uv(a),children:rl(a)})}function Hv({state:a}){return u.jsx(nt,{tone:RN(a),children:rl(a)})}function qv({run:a,onOpen:i}){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:a.summary}),u.jsxs("p",{className:"run-row-subtitle",children:[a.projectName," · ",a.kindLabel]})]}),u.jsx(mc,{status:a.status})]}),u.jsx("p",{className:"run-row-detail",children:a.statusDetail})]}),u.jsxs("dl",{className:"run-row-meta",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Started"}),u.jsx("dd",{children:a.startedAt})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Duration"}),u.jsx("dd",{children:a.duration})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Trigger"}),u.jsx("dd",{children:a.triggerLabel})]})]}),u.jsx(me,{variant:"outline",size:"sm",type:"button",onClick:()=>i(a.id),children:"View run"})]})}function qd({provider:a}){const i={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 ${i[a]??"border-zinc-700 bg-zinc-800 text-zinc-300"}`,children:a})}function YN({insights:a,onOpenEvidence:i}){const[s,r]=j.useState(null);return u.jsx("div",{className:"insight-list",children:a.map(c=>{const d=s===c.id,h=c.affectedPhrases.length>0;return u.jsxs("div",{children:[u.jsxs("div",{className:`insight-row insight-row-${c.tone} ${h?"cursor-pointer":""}`,onClick:h?()=>r(d?null:c.id):void 0,children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[h&&u.jsx(Dd,{size:12,className:`shrink-0 text-zinc-500 transition-transform duration-150 ${d?"rotate-90":""}`}),u.jsx(nt,{tone:c.tone,children:c.actionLabel}),u.jsx("span",{className:"text-sm font-medium text-zinc-100 truncate",children:c.title}),u.jsx("span",{className:"hidden sm:inline text-xs text-zinc-500 truncate",children:c.detail})]}),h&&u.jsxs("span",{className:"text-[11px] text-zinc-600 whitespace-nowrap",children:[c.affectedPhrases.length," phrase",c.affectedPhrases.length>1?"s":""]})]}),d&&u.jsx("div",{className:"divide-y divide-zinc-800/20",children:c.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(Hv,{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.providers.map(y=>u.jsx(qd,{provider:y},y))})]}),u.jsx("button",{type:"button",className:"text-xs text-zinc-400 hover:text-zinc-200 whitespace-nowrap transition-colors",onClick:y=>{y.stopPropagation(),i(m.evidenceId)},children:"View →"})]},m.evidenceId))})]},c.id)})})}function KN({history:a,maxDots:i=12}){const s=a.slice(-i);if(s.length===0)return u.jsx("span",{className:"text-[11px] text-zinc-600",children:"No data"});const r={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:`${s.length} runs`,children:s.map((c,d)=>u.jsx("div",{className:`h-2.5 w-2.5 rounded-sm ${r[c.citationState]??"bg-zinc-700"}`,title:`${c.citationState} — ${new Date(c.createdAt).toLocaleDateString()}`},d))})}function GN(a){const i=new Map;for(const r of a)for(const c of r.runHistory){const d=i.get(c.createdAt);d?d.states.push(c.citationState):i.set(c.createdAt,{states:[c.citationState],runId:c.runId})}return[...i.entries()].sort(([r],[c])=>r.localeCompare(c)).map(([r,{states:c,runId:d}])=>({runId:d,createdAt:r,citationState:c.includes("cited")?"cited":c.includes("emerging")?"emerging":"not-cited"}))}function VN({phrase:a,items:i,onOpenEvidence:s}){const r=i.map(x=>x.citationState),c=r.includes("cited")?"cited":r.includes("emerging")?"emerging":r.includes("lost")?"lost":r.every(x=>x==="pending")?"pending":"not-cited",d=GN(i),h=i.filter(x=>x.citationState==="cited"||x.citationState==="emerging").length,m=(()=>{if(d.length<4)return"flat";const x=d.slice(-3),b=d.slice(-6,-3);if(b.length===0)return"flat";const S=x.filter(T=>T.citationState==="cited"||T.citationState==="emerging").length,E=b.filter(T=>T.citationState==="cited"||T.citationState==="emerging").length;return S>E?"up":S<E?"down":"flat"})(),y=(()=>{if(d.length===0)return"Awaiting first run";if(d.length===1)return"First observation";const x=d[d.length-1].citationState,b=d[d.length-2].citationState,S=x==="cited"||x==="emerging",E=b==="cited"||b==="emerging";if(!E&&S)return"Newly cited";if(E&&!S)return"Lost citation";let T=0;for(let w=d.length-1;w>=0;w--){const N=d[w].citationState;if((N==="cited"||N==="emerging")===S)T++;else break}return S?T<=1?"Cited in latest run":`Cited ${T} runs in a row`:T<=1?"Missed in latest run":`Missed for ${T} runs`})(),g=m==="up"?"↑":m==="down"?"↓":"→";return u.jsxs("div",{className:`evidence-phrase-card evidence-phrase-card--${c}`,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:a}),u.jsxs("div",{className:"evidence-card-status-row",children:[u.jsx(Hv,{state:c}),u.jsxs("span",{className:`evidence-card-trend evidence-card-trend--${m}`,children:[u.jsx("span",{"aria-hidden":"true",children:g}),u.jsx("span",{children:y})]})]})]})}),u.jsxs("div",{className:"evidence-card-timeline-row",children:[u.jsx(KN,{history:d,maxDots:14}),u.jsxs("span",{className:"evidence-card-ratio",children:[h,"/",i.length," provider",i.length!==1?"s":""]})]}),u.jsxs("div",{className:"evidence-card-providers",children:[i.filter(x=>x.citationState!=="pending").map(x=>u.jsxs("button",{type:"button",className:`evidence-provider-btn evidence-provider-btn--${x.citationState}`,onClick:()=>s(x.id),title:`View ${x.provider} evidence for "${a}"`,children:[u.jsx("span",{className:"capitalize",children:x.provider}),u.jsx("span",{"aria-hidden":"true",className:"font-bold",children:x.citationState==="cited"||x.citationState==="emerging"?"✓":x.citationState==="lost"?"✗":"–"}),u.jsx("span",{className:"opacity-50 text-[10px]",children:"View →"})]},x.id)),i.every(x=>x.citationState==="pending")&&u.jsx("span",{className:"text-xs text-zinc-500 italic py-1",children:"Awaiting first run"})]})]})}function QN({evidence:a,onOpenEvidence:i}){const s=j.useMemo(()=>{const r=new Map;for(const c of a){const d=r.get(c.keyword)??[];r.set(c.keyword,[...d,c])}return[...r.entries()].map(([c,d])=>({phrase:c,items:d}))},[a]);return s.length===0?u.jsx("p",{className:"supporting-copy",children:"No key phrases tracked yet."}):u.jsx("div",{className:"evidence-card-grid",children:s.map(({phrase:r,items:c})=>u.jsx(VN,{phrase:r,items:c,onOpenEvidence:i},r))})}function XN({findings:a}){return u.jsx("div",{className:"findings-table-wrap",children:u.jsxs("table",{className:"findings-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Severity"}),u.jsx("th",{children:"Finding"}),u.jsx("th",{children:"Detail"}),u.jsx("th",{children:"Impact"})]})}),u.jsx("tbody",{children:a.map(i=>u.jsxs("tr",{children:[u.jsx("td",{children:u.jsx(nt,{tone:LN(i.severity),children:rl(i.severity)})}),u.jsx("td",{className:"font-medium text-zinc-100",children:i.title}),u.jsx("td",{className:"text-zinc-400",children:i.detail}),u.jsx("td",{className:"text-zinc-500",children:i.impact})]},i.id))})]})})}function ZN(a){return a==="High"?"negative":a==="Moderate"?"caution":"neutral"}function IN({competitors:a}){return a.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:a.map(i=>u.jsxs("tr",{children:[u.jsx("td",{className:"font-medium text-zinc-100",children:i.domain}),u.jsx("td",{children:u.jsx(nt,{tone:ZN(i.pressureLabel),children:i.pressureLabel})}),u.jsx("td",{className:"text-zinc-300 tabular-nums",children:i.totalKeywords>0?`${i.citationCount} / ${i.totalKeywords}`:"—"}),u.jsx("td",{className:"text-zinc-500 text-xs",children:i.citedKeywords.length>0?i.citedKeywords.join(", "):"Not cited"})]},i.id))})]})})}function JN({project:a,onNavigate:i}){const s=`/projects/${a.project.id}`;return u.jsxs("a",{className:"project-row cursor-pointer",href:s,onClick:Mt(i,s),children:[u.jsxs("div",{className:"project-row-primary",children:[u.jsxs("div",{children:[u.jsx("p",{className:"project-name",children:a.project.name}),u.jsx("p",{className:"project-domain",children:a.project.canonicalDomain})]}),u.jsx("p",{className:"project-insight",children:a.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:a.visibilityScore}),u.jsx("p",{className:"metric-inline-delta",children:a.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:"Technical Readiness"}),u.jsx("p",{className:"metric-inline-value text-zinc-500",children:a.readinessScore??"—"}),u.jsx("p",{className:"metric-inline-delta",children:a.readinessDelta??"Coming soon"})]})}),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:a.competitorPressureLabel}),u.jsxs("p",{className:"metric-inline-delta",children:[a.lastRun.kindLabel," · ",rl(a.lastRun.status)]})]})}),u.jsx("div",{className:"project-row-chart",children:u.jsx($N,{points:a.trend,tone:Uv(a.lastRun.status)})}),u.jsx("span",{className:"project-row-link",children:u.jsx(Dd,{className:"h-4 w-4 text-zinc-500"})})]})}function FN({model:a,systemHealth:i,onNavigate:s,onOpenRun:r}){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:a.lastUpdatedAt})})]}),a.projects.length>0?u.jsx("div",{className:"project-list project-list-scrollable",children:a.projects.map(c=>u.jsx(JN,{project:c,onNavigate:s},c.project.id))}):u.jsxs(Ie,{className:"surface-card empty-card",children:[u.jsx("h3",{children:a.emptyState?.title??"No projects yet"}),u.jsx("p",{className:"supporting-copy",children:a.emptyState?.detail}),u.jsx(me,{size:"sm",asChild:!0,children:u.jsx("a",{href:a.emptyState?.ctaHref??"/setup",onClick:Mt(s,a.emptyState?.ctaHref??"/setup"),children:a.emptyState?.ctaLabel??"Launch setup"})})]}),u.jsxs("div",{className:"overview-secondary-grid",children:[a.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:a.attentionItems.map(c=>u.jsxs("a",{className:`attention-item attention-item-${c.tone}`,href:c.href,onClick:Mt(s,c.href),children:[u.jsxs("div",{children:[u.jsx("p",{className:"attention-title",children:c.title}),u.jsx("p",{className:"attention-detail",children:c.detail})]}),u.jsx("span",{className:"attention-action",children:c.actionLabel})]},c.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:a.recentRuns.length>0?a.recentRuns.map(c=>u.jsxs("button",{className:"compact-run",type:"button",onClick:()=>r(c.id),children:[u.jsxs("div",{children:[u.jsx("p",{className:"compact-run-title",children:c.projectName}),u.jsx("p",{className:"compact-run-detail",children:c.summary})]}),u.jsx(mc,{status:c.status})]},c.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:i.map(c=>u.jsxs(Ie,{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:c.label}),u.jsx("h3",{children:c.detail})]}),u.jsx(nt,{tone:c.tone,children:c.label})]}),u.jsx("p",{className:"supporting-copy",children:c.meta})]},c.id))})]})]})}function PN({projects:a,onNavigate:i,onProjectCreated:s}){const[r,c]=j.useState(!1),[d,h]=j.useState(""),[m,y]=j.useState(""),[g,x]=j.useState(""),[b,S]=j.useState("US"),[E,T]=j.useState("en"),[w,N]=j.useState(!1),[z,Y]=j.useState(null),M=d.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),H=async()=>{if(!(!M||!g)){N(!0),Y(null);try{const q=await Tv(M,{displayName:m||d,canonicalDomain:g,country:b,language:E});s(),h(""),y(""),x(""),S("US"),T("en"),c(!1),i(`/projects/${q.id}`)}catch(q){Y(q instanceof Error?q.message:"Failed to create project")}finally{N(!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:[a.length," project",a.length!==1?"s":""," tracked"]})]}),u.jsx("div",{className:"page-header-right",children:u.jsxs(me,{type:"button",onClick:()=>c(q=>!q),children:[u.jsx(bg,{className:"size-4 mr-1.5"}),"Add project"]})})]}),r?u.jsxs(Ie,{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:d,onChange:q=>h(q.target.value)}),M&&M!==d?u.jsxs("p",{className:"supporting-copy",children:["Slug: ",M]}):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:q=>y(q.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:g,onChange:q=>x(q.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:b,onChange:q=>S(q.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:E,onChange:q=>T(q.target.value.toLowerCase())})]})]})]}),z?u.jsx("p",{className:"text-rose-400 text-sm mt-3",children:z}):null,u.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[u.jsx(me,{type:"button",disabled:!M||!g||w,onClick:H,children:w?"Creating...":"Create project"}),u.jsx(me,{type:"button",variant:"ghost",onClick:()=>c(!1),children:"Cancel"})]})]}):null,a.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:a.map(q=>{const X=`/projects/${q.project.id}`,Z=q.recentRuns[0];return u.jsxs("tr",{className:"cursor-pointer",onClick:()=>i(X),children:[u.jsxs("td",{children:[u.jsx("a",{className:"text-zinc-100 font-medium hover:underline",href:X,onClick:Mt(i,X),children:q.project.displayName||q.project.name}),u.jsx("p",{className:"text-[11px] text-zinc-500",children:q.project.name})]}),u.jsx("td",{className:"text-zinc-400",children:q.project.canonicalDomain}),u.jsx("td",{children:u.jsx(nt,{tone:q.visibilitySummary.tone,children:q.visibilitySummary.value})}),u.jsx("td",{className:"text-zinc-500 text-sm",children:Z?u.jsx(mc,{status:Z.status}):u.jsx("span",{className:"text-zinc-600",children:"No runs"})}),u.jsx("td",{className:"text-right text-zinc-500",children:q.project.country})]},q.project.id)})})]})}):r?null:u.jsxs(Ie,{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(me,{type:"button",onClick:()=>c(!0),children:[u.jsx(bg,{className:"size-4 mr-1.5"}),"Add project"]})]}),u.jsx(WN,{onApplied:s})]})}function WN({onApplied:a}){const[i,s]=j.useState(""),[r,c]=j.useState(!1),[d,h]=j.useState([]),[m,y]=j.useState([]),g=async()=>{if(!i.trim())return;c(!0),h([]),y([]);const x=ES(i),b=[],S=[];for(let E=0;E<x.length;E++){const T=x[E];if(T.errors.length>0){b.push(`Document ${E+1}: ${T.errors[0]?.message}`);continue}const w=T.toJSON();if(!(!w||typeof w!="object"))try{const N=await hN(w);S.push(`Applied "${N.displayName||N.name}" (revision ${N.configRevision})`)}catch(N){b.push(`Document ${E+1}: ${N instanceof Error?N.message:String(N)}`)}}h(S),y(b),c(!1),S.length>0&&a()};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
187
- kind: Project
188
- metadata:
189
- name: my-project
190
- spec:
191
- canonicalDomain: example.com
192
- country: US
193
- language: en
194
- keywords: []`,value:i,onChange:x=>s(x.target.value)}),d.length>0&&u.jsx("ul",{className:"mt-2 space-y-1",children:d.map((x,b)=>u.jsx("li",{className:"text-emerald-400 text-sm",children:x},b))}),m.length>0&&u.jsx("ul",{className:"mt-2 space-y-1",children:m.map((x,b)=>u.jsx("li",{className:"text-rose-400 text-sm",children:x},b))}),u.jsx("div",{className:"mt-3",children:u.jsx(me,{type:"button",disabled:!i.trim()||r,onClick:g,children:r?"Applying...":"Apply"})})]})}function e2({model:a,onOpenEvidence:i,onOpenRun:s,onTriggerRun:r,onDeleteProject:c,onAddKeywords:d,onAddCompetitors:h}){const[m,y]=j.useState(!1),[g,x]=j.useState(!1),[b,S]=j.useState(!1),[E,T]=j.useState(null),[w,N]=j.useState(!1),[z,Y]=j.useState(""),[M,H]=j.useState(!1),[q,X]=j.useState(!1),[Z,_]=j.useState(""),[P,Se]=j.useState(!1);async function W(){const te=await aN(a.project.name),L=typeof te=="string"?te:JSON.stringify(te,null,2),J=new Blob([L],{type:"text/yaml"}),ne=URL.createObjectURL(J),fe=document.createElement("a");fe.href=ne,fe.download=`${a.project.name}.yaml`,fe.click(),URL.revokeObjectURL(ne)}async function se(){const te=z.split(`
195
- `).map(L=>L.trim()).filter(Boolean);if(te.length!==0){H(!0);try{await d(a.project.name,te),Y(""),N(!1)}finally{H(!1)}}}async function ue(){const te=Z.trim();if(te){Se(!0);try{await h(a.project.name,[te]),_(""),X(!1)}finally{Se(!1)}}}const ge=te=>!Number.isNaN(Number.parseInt(te,10));return u.jsxs("div",{className:"page-container",children:[m?u.jsxs(Ie,{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:a.project.displayName||a.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(me,{type:"button",variant:"destructive",disabled:g,onClick:async()=>{x(!0),c(a.project.name)},children:g?"Deleting...":"Yes, delete project"}),u.jsx(me,{type:"button",variant:"outline",disabled:g,onClick:()=>y(!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:a.project.displayName||a.project.name}),u.jsxs("p",{className:"page-subtitle",children:[a.project.canonicalDomain," · ",a.contextLabel]}),u.jsxs("div",{className:"tag-row",children:[u.jsx("span",{className:"tag",children:a.project.country}),u.jsx("span",{className:"tag",children:a.project.language.toUpperCase()}),a.project.tags.map(te=>u.jsx("span",{className:"tag",children:te},te))]})]}),u.jsxs("div",{className:"page-header-right",children:[u.jsx("p",{className:"text-sm text-zinc-500",children:a.dateRangeLabel}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(me,{type:"button",variant:"outline",size:"icon",onClick:W,"aria-label":"Export project as YAML",children:u.jsx(hw,{className:"h-4 w-4 text-zinc-400"})}),u.jsx(me,{type:"button",variant:"outline",size:"icon",onClick:()=>y(!0),"aria-label":"Delete project",children:u.jsx(kw,{className:"h-4 w-4 text-zinc-400"})}),u.jsx(me,{type:"button",disabled:b,onClick:async()=>{S(!0),T(null);try{await r(a.project.name)}catch(te){T(te instanceof Error?te.message:"Failed to trigger run")}finally{S(!1)}},children:b?"Starting...":"Run now"})]})]})]}),E&&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:[E,u.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>T(null),children:"×"})]}),u.jsxs("section",{className:"gauge-row",children:[u.jsx(Is,{value:a.visibilitySummary.value,label:a.visibilitySummary.label,delta:a.visibilitySummary.delta,tone:a.visibilitySummary.tone,description:a.visibilitySummary.description,tooltip:a.visibilitySummary.tooltip,isNumeric:ge(a.visibilitySummary.value)}),a.readinessSummary?u.jsx(Is,{value:a.readinessSummary.value,label:a.readinessSummary.label,delta:a.readinessSummary.delta,tone:a.readinessSummary.tone,description:a.readinessSummary.description,tooltip:a.readinessSummary.tooltip,isNumeric:ge(a.readinessSummary.value)}):u.jsx(Is,{value:"N/A",label:"Technical Readiness",delta:"Coming soon",tone:"neutral",description:"Enable with site audits in a future release.",tooltip:"Site audit scores for technical SEO signals. Coming in a future release.",isNumeric:!1}),u.jsx(Is,{value:a.competitorPressure.value,label:a.competitorPressure.label,delta:a.competitorPressure.delta,tone:a.competitorPressure.tone,description:a.competitorPressure.description,tooltip:a.competitorPressure.tooltip,isNumeric:ge(a.competitorPressure.value)}),u.jsx(Is,{value:a.runStatus.value,label:a.runStatus.label,delta:a.runStatus.delta,tone:a.runStatus.tone,description:a.runStatus.description,tooltip:a.runStatus.tooltip,isNumeric:ge(a.runStatus.value)})]}),a.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:"Provider breakdown"}),u.jsxs("h2",{children:["Visibility by provider ",u.jsx(Bv,{text:"Per-provider citation rate. Shows how often each AI engine cites your domain across all tracked key phrases. Useful for identifying which engines favor your content."})]})]})}),u.jsx("div",{className:"grid grid-cols-3 gap-3",children:a.providerScores.map(te=>u.jsxs(Ie,{className:"surface-card compact-card",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(qd,{provider:te.provider}),u.jsxs("span",{className:`text-lg font-semibold ${te.score>=70?"text-emerald-400":te.score>=40?"text-amber-400":"text-rose-400"}`,children:[te.score,"%"]})]}),u.jsxs("p",{className:"mt-1 text-xs text-zinc-500",children:[te.cited," of ",te.total," key phrases cited"]})]},te.provider))})]}),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(YN,{insights:a.insights,onOpenEvidence:i})]}),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(a.visibilityEvidence.map(te=>te.keyword)).size," key phrases tracked"]}),u.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>N(!w),children:w?"Cancel":"+ Add key phrases"})]})]}),w&&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:z,onChange:te=>Y(te.target.value)}),u.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[u.jsxs("p",{className:"text-xs text-zinc-500",children:[z.split(`
196
- `).filter(te=>te.trim()).length," key phrases"]}),u.jsx(me,{type:"button",size:"sm",disabled:!z.trim()||M,onClick:se,children:M?"Adding...":"Add key phrases"})]})]}),u.jsx(QN,{evidence:a.visibilityEvidence,onOpenEvidence:i})]}),a.technicalFindings&&a.technicalFindings.length>0?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:"Technical findings"}),u.jsx("h2",{children:"Readiness signals"})]}),u.jsxs("p",{className:"supporting-copy",children:[a.technicalFindings.length," findings"]})]}),u.jsx(XN,{findings:a.technicalFindings})]}):u.jsx("section",{className:"page-section-divider",children:u.jsxs(Ie,{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:"Technical findings"}),u.jsx("h2",{className:"text-zinc-500",children:"Unavailable"})]}),u.jsx(nt,{tone:"neutral",children:"Coming soon"})]}),u.jsx("p",{className:"supporting-copy",children:"Technical readiness findings require site audits, which are planned for a future release."})]})}),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:[a.competitors.length," tracked"]}),u.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>X(!q),children:q?"Cancel":"+ Add competitor"})]})]}),q&&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:Z,onChange:te=>_(te.target.value),onKeyDown:te=>te.key==="Enter"&&ue()}),u.jsx(me,{type:"button",size:"sm",disabled:!Z.trim()||P,onClick:ue,children:P?"Adding...":"Add"})]}),u.jsx(IN,{competitors:a.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:a.recentRuns.map(te=>u.jsx(qv,{run:te,onOpen:s},te.id))})]}),u.jsx(s2,{projectName:a.project.name}),u.jsx(r2,{projectName:a.project.name})]})}const t2=[{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"}],Dg=["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 cd(a){return a===0?"12:00 AM":a<12?`${a}:00 AM`:a===12?"12:00 PM":`${a-12}:00 PM`}function n2(a,i){return a==="twice-daily"?"twice-daily":a.startsWith("weekly@")?`${a}@${i}`:`daily@${i}`}function a2(a,i){if(!a)return{freq:"custom",hour:6,customCron:i};if(a==="twice-daily")return{freq:"twice-daily",hour:6,customCron:""};const s=a.match(/^daily(?:@(\d+))?$/);if(s)return{freq:"daily",hour:s[1]?parseInt(s[1]):6,customCron:""};const r=a.match(/^(weekly@(?:mon|tue|wed|thu|fri|sat|sun))(?:@(\d+))?$/);return r?{freq:r[1],hour:r[2]?parseInt(r[2]):6,customCron:""}:{freq:"custom",hour:6,customCron:i}}function i2(a,i,s){const r=s==="UTC"?"UTC":s.split("/").pop()?.replace(/_/g," ")??s;if(!a)return`Custom: ${i} · ${r}`;if(a==="twice-daily")return`Twice a day (6am & 6pm) · ${r}`;const c=a.match(/^daily(?:@(\d+))?$/);if(c){const h=c[1]?parseInt(c[1]):6;return`Every day at ${cd(h)} · ${r}`}const d=a.match(/^weekly@(mon|tue|wed|thu|fri|sat|sun)(?:@(\d+))?$/);if(d){const h={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"},m=d[2]?parseInt(d[2]):6;return`Every ${h[d[1]]} at ${cd(m)} · ${r}`}return`${a} · ${r}`}function s2({projectName:a}){const[i,s]=j.useState("loading"),[r,c]=j.useState(!1),[d,h]=j.useState("daily"),[m,y]=j.useState(6),[g,x]=j.useState(""),[b,S]=j.useState("UTC"),[E,T]=j.useState(!1),[w,N]=j.useState(""),[z,Y]=j.useState(!1),[M,H]=j.useState(!1),[q,X]=j.useState(null);j.useEffect(()=>{lN(a).then(s).catch(()=>s(null))},[a]);const Z=()=>{if(i&&i!=="loading"){const W=a2(i.preset??null,i.cronExpr);h(W.freq),y(W.hour),x(W.customCron);const se=Dg.includes(i.timezone);S(se?i.timezone:"Other"),T(!se),N(se?"":i.timezone)}else h("daily"),y(6),x(""),S("UTC"),T(!1),N("");X(null),c(!0)},_=async()=>{Y(!0),X(null);try{const se={timezone:E?w.trim()||"UTC":b};d==="custom"?se.cron=g.trim():se.preset=n2(d,m);const ue=await kg(a,se);s(ue),c(!1)}catch(W){X(W instanceof Error?W.message:"Failed to save schedule")}finally{Y(!1)}},P=async()=>{if(!(!i||i==="loading")){Y(!0),X(null);try{const W={timezone:i.timezone,enabled:!i.enabled};i.preset?W.preset=i.preset:W.cron=i.cronExpr,s(await kg(a,W))}catch(W){X(W instanceof Error?W.message:"Failed to update schedule")}finally{Y(!1)}}},Se=async()=>{H(!0),X(null);try{await rN(a),s(null),c(!1)}catch(W){X(W instanceof Error?W.message:"Failed to remove schedule")}finally{H(!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"})]}),i!=="loading"&&!r&&u.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:Z,children:i?"Edit schedule":"+ Set schedule"})]}),i==="loading"&&u.jsx("p",{className:"supporting-copy",children:"Loading..."}),i!=="loading"&&!r&&i===null&&u.jsx(Ie,{className:"surface-card compact-card",children:u.jsx("p",{className:"supporting-copy",children:"No schedule configured. Set one to automatically trigger visibility sweeps."})}),i!=="loading"&&!r&&i!==null&&u.jsxs(Ie,{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:i2(i.preset??null,i.cronExpr,i.timezone)}),u.jsxs("p",{className:"text-xs text-zinc-500",children:["Cron: ",u.jsx("span",{className:"font-mono",children:i.cronExpr})]}),i.nextRunAt&&u.jsxs("p",{className:"text-xs text-zinc-500",children:["Next run: ",new Date(i.nextRunAt).toLocaleString()]}),i.lastRunAt&&u.jsxs("p",{className:"text-xs text-zinc-500",children:["Last run: ",new Date(i.lastRunAt).toLocaleString()]})]}),u.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[u.jsx(nt,{tone:i.enabled?"positive":"neutral",children:i.enabled?"Active":"Paused"}),u.jsx(me,{type:"button",variant:"outline",size:"sm",disabled:z,onClick:P,children:i.enabled?"Pause":"Resume"}),u.jsx(me,{type:"button",variant:"ghost",size:"sm",disabled:M,onClick:Se,children:M?"Removing...":"Remove"})]})]}),q&&u.jsx("p",{className:"text-rose-400 text-sm mt-2",children:q})]}),r&&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:d,onChange:W=>h(W.target.value),children:t2.map(W=>u.jsx("option",{value:W.value,children:W.label},W.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:d==="twice-daily"||d==="custom",onChange:W=>y(parseInt(W.target.value)),children:Array.from({length:24},(W,se)=>u.jsx("option",{value:se,children:cd(se)},se))})]})]}),d==="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:g,onChange:W=>x(W.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:E?"Other":b,onChange:W=>{W.target.value==="Other"?(T(!0),S("Other")):(T(!1),S(W.target.value))},children:[Dg.map(W=>u.jsx("option",{value:W,children:W},W)),u.jsx("option",{value:"Other",children:"Other (enter manually)…"})]}),E&&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:W=>N(W.target.value)})]}),q&&u.jsx("p",{className:"text-rose-400 text-sm",children:q}),u.jsxs("div",{className:"flex gap-2 justify-end",children:[u.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>{c(!1),X(null)},children:"Cancel"}),u.jsx(me,{type:"button",size:"sm",disabled:z||d==="custom"&&!g.trim(),onClick:_,children:z?"Saving...":"Save schedule"})]})]})]})}const l2=[{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 r2({projectName:a}){const[i,s]=j.useState("loading"),[r,c]=j.useState(!1),[d,h]=j.useState(""),[m,y]=j.useState(["citation.lost","citation.gained"]),[g,x]=j.useState(!1),[b,S]=j.useState(null),[E,T]=j.useState({});j.useEffect(()=>{cN(a).then(s).catch(()=>s([]))},[a]);const w=M=>{y(H=>H.includes(M)?H.filter(q=>q!==M):[...H,M])},N=async()=>{if(!(!d.trim()||m.length===0)){x(!0),S(null);try{const M=await oN(a,{channel:"webhook",url:d.trim(),events:m});s(H=>H==="loading"?[M]:[...H,M]),h(""),y(["citation.lost","citation.gained"]),c(!1)}catch(M){S(M instanceof Error?M.message:"Failed to add webhook")}finally{x(!1)}}},z=async M=>{try{await uN(a,M),s(H=>H==="loading"?H:H.filter(q=>q.id!==M))}catch(H){S(H instanceof Error?H.message:"Failed to remove webhook")}},Y=async M=>{T(H=>({...H,[M]:{state:"testing"}}));try{const H=await dN(a,M);T(q=>({...q,[M]:{state:H.ok?"ok":"fail",status:H.status}}))}catch{T(H=>({...H,[M]:{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"})]}),i!=="loading"&&u.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>{c(!r),S(null)},children:r?"Cancel":"+ Add webhook"})]}),r&&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:d,onChange:M=>h(M.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:l2.map(M=>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(M.value),onChange:()=>w(M.value)}),u.jsx("span",{className:"text-sm text-zinc-300",children:M.label})]},M.value))})]}),b&&u.jsx("p",{className:"text-rose-400 text-sm",children:b}),u.jsxs("div",{className:"flex gap-2 justify-end",children:[u.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>{c(!1),S(null)},children:"Cancel"}),u.jsx(me,{type:"button",size:"sm",disabled:g||!d.trim()||m.length===0,onClick:N,children:g?"Adding...":"Add webhook"})]})]}),i==="loading"&&u.jsx("p",{className:"supporting-copy",children:"Loading..."}),i!=="loading"&&i.length===0&&!r&&u.jsx(Ie,{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."})}),i!=="loading"&&i.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:i.map(M=>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:M.url})}),u.jsx("td",{children:u.jsx("div",{className:"flex flex-wrap gap-1",children:M.events.map(H=>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:H.replace("."," ")},H))})}),u.jsx("td",{children:u.jsx(nt,{tone:M.enabled?"positive":"neutral",children:M.enabled?"Active":"Paused"})}),u.jsx("td",{children:u.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[E[M.id]&&(()=>{const H=E[M.id],q=H.state==="testing"?"Sending…":H.state==="ok"?`Delivered${H.status?` (${H.status})`:""}`:`Failed${H.status?` (${H.status})`:""}`;return u.jsx(nt,{tone:H.state==="ok"?"positive":H.state==="fail"?"negative":"neutral",children:q})})(),u.jsx(me,{variant:"ghost",size:"sm",type:"button",disabled:E[M.id]?.state==="testing",onClick:()=>Y(M.id),children:"Test"}),u.jsx(me,{variant:"ghost",size:"sm",type:"button",onClick:()=>z(M.id),children:"Remove"})]})})]},M.id))})]}),b&&u.jsx("p",{className:"text-rose-400 text-sm mt-2",children:b})]})]})}function c2({runs:a,onOpenRun:i}){const[s,r]=j.useState("all"),c=s==="all"?a:a.filter(d=>d.status===s);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:"Runs"}),u.jsx("p",{className:"page-subtitle",children:"Status, type, project, duration, and the shortest explanation that makes the outcome trustworthy."})]})}),u.jsxs("section",{children:[u.jsx("div",{className:"filter-row",role:"toolbar","aria-label":"Run filters",children:["all","queued","running","completed","partial","failed"].map(d=>u.jsx("button",{className:`filter-chip ${s===d?"filter-chip-active":""}`,type:"button","aria-pressed":s===d,onClick:()=>r(d),children:d==="all"?"All runs":rl(d)},d))}),u.jsx("div",{className:"run-list",children:c.length>0?c.map(d=>u.jsx(qv,{run:d,onOpen:i},d.id)):u.jsxs(Ie,{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 o2={openai:"https://platform.openai.com/api-keys",claude:"https://platform.claude.com/settings/keys"},$v={gemini:"Gemini",openai:"OpenAI",claude:"Claude",local:"Local"},u2={gemini:"e.g. gemini-2.5-flash",openai:"e.g. gpt-4o",claude:"e.g. claude-sonnet-4-6",local:"e.g. llama3, mistral"};function d2({providerName:a,onSaved:i}){const s=a.toLowerCase()==="local",[r,c]=j.useState(""),[d,h]=j.useState(""),[m,y]=j.useState(""),[g,x]=j.useState(!1),[b,S]=j.useState(null),[E,T]=j.useState(!1),w=s?d.trim().length>0:r.trim().length>0;async function N(){if(w){x(!0),S(null),T(!1);try{await sN(a.toLowerCase(),{...r.trim()?{apiKey:r.trim()}:{},...d.trim()?{baseUrl:d.trim()}:{},...m.trim()?{model:m.trim()}:{}}),c(""),h(""),y(""),T(!0),i()}catch(M){S(M instanceof Error?M.message:"Failed to update provider")}finally{x(!1)}}}const z=o2[a.toLowerCase()],Y=u2[a.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:[s&&u.jsxs("div",{children:[u.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`base-url-${a}`,children:"Base URL"}),u.jsx("input",{id:`base-url-${a}`,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:d,onChange:M=>h(M.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-${a}`,children:["API Key",s?" (optional)":""]}),z&&u.jsx("a",{href:z,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-${a}`,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:s?"Optional — most local servers don't need one":`Enter ${a} API key`,value:r,onChange:M=>c(M.target.value)})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`model-${a}`,children:"Model (optional)"}),u.jsx("input",{id:`model-${a}`,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:Y,value:m,onChange:M=>y(M.target.value)})]}),b&&u.jsx("p",{className:"text-xs text-rose-400",children:b}),E&&u.jsx("p",{className:"text-xs text-emerald-400",children:"Provider updated."}),u.jsx(me,{type:"button",size:"sm",disabled:!w||g,onClick:N,children:g?"Saving...":"Save"})]})}function f2({settings:a,healthSnapshot:i,onSettingsChanged:s}){const[r,c]=j.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:[a.providerStatuses.map(d=>u.jsxs(Ie,{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:d.name})]}),u.jsx(nt,{tone:d.state==="ready"?"positive":"caution",children:d.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:d.model})]}),d.quota&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Concurrency"}),u.jsx("dd",{children:d.quota.maxConcurrency})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Rate limit"}),u.jsxs("dd",{children:[d.quota.maxRequestsPerMinute,"/min · ",d.quota.maxRequestsPerDay,"/day"]})]})]})]}),u.jsx("p",{className:"mt-2 text-sm text-zinc-500",children:d.detail}),u.jsx("div",{className:"mt-2",children:u.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>c(r===d.name?null:d.name),children:r===d.name?"Cancel":d.state==="ready"?d.name.toLowerCase()==="local"?"Update config":"Update key":"Configure"})}),r===d.name&&u.jsx(d2,{providerName:d.name,onSaved:()=>{c(null),s?.()}})]},d.name)),u.jsxs(Ie,{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:i.apiStatus.detail})]}),u.jsx(nt,{tone:ec(i.apiStatus),children:i.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:i.workerStatus.detail})]}),u.jsx(nt,{tone:ec(i.workerStatus),children:i.workerStatus.state==="ok"?"Healthy":"Attention"})]})]})]})]}),u.jsx("section",{className:"page-section",children:u.jsxs(Ie,{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:a.selfHostNotes.map(d=>u.jsx("li",{children:d},d))}),u.jsx("p",{className:"supporting-copy",children:a.bootstrapNote})]})})]})}const h2=[{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 m2({current:a,labels:i}){return u.jsx("div",{className:"setup-steps",role:"list","aria-label":"Setup progress",children:i.map((s,r)=>{const c=r<a,d=r===a;return u.jsxs("div",{className:`setup-step ${c?"setup-step-done":""} ${d?"setup-step-active":""}`,role:"listitem","aria-current":d?"step":void 0,children:[u.jsx("span",{className:"setup-step-number",children:c?"✓":r+1}),u.jsx("span",{className:"setup-step-label",children:s.label})]},s.label)})})}function p2({model:a,settings:i,onProjectCreated:s,onNavigate:r}){const[c,d]=j.useState(0),[h,m]=j.useState(""),[y,g]=j.useState(""),[x,b]=j.useState(""),[S,E]=j.useState("US"),[T,w]=j.useState("en"),[N,z]=j.useState(null),[Y,M]=j.useState(null),[H,q]=j.useState(null),[X,Z]=j.useState(!1),[_,P]=j.useState(""),[Se,W]=j.useState(!1),[se,ue]=j.useState(null),[ge,te]=j.useState(!1),L=i.providerStatuses.filter(ae=>ae.state==="ready"),[J,ne]=j.useState(L[0]?.name??""),[fe,I]=j.useState(5),[A,G]=j.useState(!1),[ee,D]=j.useState(null),[F,ie]=j.useState(""),[pe,$e]=j.useState(!1),[ye,Pt]=j.useState(null),[Rt,Wt]=j.useState(!1),[gn,yt]=j.useState(!1),[Qa,Xa]=j.useState(null),[cl,Pi]=j.useState(!1),en=h.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Lt=_.split(`
197
- `).map(ae=>ae.trim()).filter(Boolean),yn=F.split(`
198
- `).map(ae=>ae.trim()).filter(Boolean),pc=a.healthChecks.some(ae=>ae.id==="api"&&ae.state==="ready"),gc=async()=>{if(!(!en||!x)){Z(!0),q(null);try{const ae=await Tv(en,{displayName:y||h,canonicalDomain:x,country:S,language:T});z(en),M(ae.id),s(),d(2)}catch(ae){q(ae instanceof Error?ae.message:"Failed to create project")}finally{Z(!1)}}},ht=async()=>{if(!N)return;const ae=Lt;if(ae.length!==0){te(!0),ue(null);try{await eN(N,ae),W(!0),s(),d(3)}catch(vn){ue(vn instanceof Error?vn.message:"Failed to save key phrases")}finally{te(!1)}}},yc=async()=>{if(!(!N||!J)){G(!0),D(null);try{const ae=await fN(N,J,fe);if(ae.keywords.length>0){const vn=_?_.trimEnd()+`
199
- `+ae.keywords.join(`
200
- `):ae.keywords.join(`
201
- `);P(vn)}}catch(ae){D(ae instanceof Error?ae.message:"Failed to generate key phrases")}finally{G(!1)}}},ol=async()=>{if(!N)return;const ae=yn;if(ae.length!==0){Wt(!0),Pt(null);try{await Ov(N,ae),$e(!0),s(),d(4)}catch(vn){Pt(vn instanceof Error?vn.message:"Failed to save competitors")}finally{Wt(!1)}}},ul=async()=>{if(N){Pi(!0),Xa(null);try{await zv(N),yt(!0),s()}catch(ae){Xa(ae instanceof Error?ae.message:"Failed to trigger run")}finally{Pi(!1)}}},Ut=()=>d(ae=>Math.max(0,ae-1)),vc=(()=>{switch(c){case 0:return u.jsxs(Ie,{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:a.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:()=>r("/settings"),children:"Configure providers"})]}),u.jsx(nt,{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(me,{type:"button",disabled:!pc,onClick:()=>d(1),children:"Continue"})]})]});case 1:return u.jsxs(Ie,{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"})]}),N?u.jsx(nt,{tone:"positive",children:"Created"}):null]}),N?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:N})," created successfully."]}),u.jsxs("div",{className:"setup-nav",children:[u.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),u.jsx(me,{type:"button",onClick:()=>d(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:h,onChange:ae=>m(ae.target.value)}),en&&en!==h?u.jsxs("p",{className:"supporting-copy",children:["Slug: ",en]}):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:y,onChange:ae=>g(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:x,onChange:ae=>b(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:S,onChange:ae=>E(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:T,onChange:ae=>w(ae.target.value.toLowerCase())})]})]}),H?u.jsx("p",{className:"text-rose-400 text-sm",children:H}):null,u.jsxs("div",{className:"setup-nav",children:[u.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),u.jsx(me,{type:"button",disabled:!en||!x||X,onClick:gc,children:X?"Creating...":"Create project"})]})]})]});case 2:return u.jsxs(Ie,{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"})]}),Se?u.jsxs(nt,{tone:"positive",children:[Lt.length," saved"]}):u.jsxs(nt,{tone:"neutral",children:[Lt.length," key phrase",Lt.length!==1?"s":""]})]}),u.jsx("p",{className:"supporting-copy",children:"Enter the search queries you want to track. One per line."}),Se?u.jsxs("div",{className:"compact-stack",children:[u.jsx("ul",{className:"detail-list",children:Lt.map(ae=>u.jsx("li",{children:ae},ae))}),u.jsxs("div",{className:"setup-nav",children:[u.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),u.jsx(me,{type:"button",onClick:()=>d(3),children:"Continue"})]})]}):u.jsxs("div",{className:"compact-stack",children:[L.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:J,onChange:ae=>ne(ae.target.value),children:L.map(ae=>u.jsxs("option",{value:ae.name,children:[$v[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:fe,onChange:ae=>I(Number(ae.target.value)),children:[3,5,10,15,20].map(ae=>u.jsx("option",{value:ae,children:ae},ae))})]}),u.jsx(me,{type:"button",variant:"outline",disabled:A||!J,onClick:yc,children:A?"Analyzing site...":"Generate"})]}),ee?u.jsx("p",{className:"text-rose-400 text-sm",children:ee}):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
202
- best invisalign downtown brooklyn
203
- pediatric dentist brooklyn heights`,value:_,onChange:ae=>P(ae.target.value)})]}),se?u.jsx("p",{className:"text-rose-400 text-sm",children:se}):null,u.jsxs("div",{className:"setup-nav",children:[u.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),u.jsx(me,{type:"button",disabled:Lt.length===0||ge,onClick:ht,children:ge?"Saving...":`Save ${Lt.length} key phrase${Lt.length!==1?"s":""}`})]})]})]});case 3:return u.jsxs(Ie,{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"})]}),pe?u.jsx(nt,{tone:"positive",children:"Saved"}):null]}),u.jsx("p",{className:"supporting-copy",children:"Domains that compete for the same key phrases. One per line."}),pe?u.jsxs("div",{className:"compact-stack",children:[u.jsx("ul",{className:"detail-list",children:yn.map(ae=>u.jsx("li",{children:ae},ae))}),u.jsxs("div",{className:"setup-nav",children:[u.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),u.jsx(me,{type:"button",onClick:()=>d(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
204
- competitor2.com`,value:F,onChange:ae=>ie(ae.target.value)})]}),ye?u.jsx("p",{className:"text-rose-400 text-sm",children:ye}):null,u.jsxs("div",{className:"setup-nav",children:[u.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(me,{type:"button",variant:"outline",onClick:()=>d(4),children:"Skip"}),u.jsx(me,{type:"button",disabled:yn.length===0||Rt,onClick:ol,children:Rt?"Saving...":`Save ${yn.length} competitor${yn.length!==1?"s":""}`})]})]})]})]});case 4:return u.jsxs(Ie,{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"})]}),gn?u.jsx(nt,{tone:"positive",children:"Queued"}):null]}),gn?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(me,{type:"button",onClick:()=>r(Y?`/projects/${Y}`:"/"),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:N}),"."]}),Qa?u.jsx("p",{className:"text-rose-400 text-sm",children:Qa}):null,u.jsxs("div",{className:"setup-nav",children:[u.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),u.jsx(me,{type:"button",disabled:cl,onClick:ul,children:cl?"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(m2,{current:c,labels:h2}),u.jsx("section",{className:"setup-wizard",children:vc})]})}function g2({onNavigate:a}){return u.jsx("div",{className:"page-container",children:u.jsx("section",{className:"page-section",children:u.jsxs(Ie,{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(me,{asChild:!0,children:u.jsx("a",{href:"/",onClick:Mt(a,"/"),children:"Return to overview"})})]})})})}function y2({title:a,subtitle:i,children:s,open:r,onClose:c}){return u.jsx(Mj,{open:r,onOpenChange:d=>d?void 0:c(),children:u.jsxs(wv,{children:[u.jsxs(Hj,{className:"drawer-head",children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:i}),u.jsx(jv,{id:"drawer-title",children:a}),u.jsx(Nv,{className:"sr-only",children:i})]}),u.jsx("div",{className:"drawer-body",children:s})]})})}function Mg(a,i){const s=i.filter(h=>h.trim().length>1),r=a.split(/(\*\*[^*]+\*\*)/).filter(Boolean).map(h=>h.startsWith("**")&&h.endsWith("**")?{type:"bold",value:h.slice(2,-2)}:{type:"text",value:h});if(s.length===0)return r.map((h,m)=>h.type==="bold"?u.jsx("strong",{className:"text-zinc-200 font-semibold",children:h.value},`b-${m}`):h.value).filter(Boolean);const c=s.map(h=>h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),d=new RegExp(`(${c.join("|")})`,"gi");return r.flatMap((h,m)=>h.value.split(d).map((g,x)=>g?x%2===1?h.type==="bold"?u.jsx("mark",{className:"answer-highlight",children:u.jsx("strong",{className:"text-zinc-200 font-semibold",children:g})},`hl-${m}-${x}`):u.jsx("mark",{className:"answer-highlight",children:g},`hl-${m}-${x}`):h.type==="bold"?u.jsx("strong",{className:"text-zinc-200 font-semibold",children:g},`b-${m}-${x}`):g:null)).filter(Boolean)}function v2({evidence:a,project:i,onClose:s}){const[r,c]=j.useState(!1),[d,h]=j.useState(-1),[m,y]=j.useState(null),[g,x]=j.useState(!1),[b,S]=j.useState({}),E=i.project.canonicalDomain.toLowerCase().replace(/^www\./,""),T=a.runHistory,w=T.length>1,N=d>=0&&m!==null,z=N?m:{citationState:a.citationState,provider:a.provider,answerSnippet:a.answerSnippet,citedDomains:a.citedDomains,competitorDomains:a.competitorDomains,groundingSources:a.groundingSources,evidenceUrls:a.evidenceUrls,changeLabel:a.changeLabel,summary:a.summary},Y=z.citationState==="cited"||z.citationState==="emerging",H=z.citedDomains.findIndex(ue=>ue.toLowerCase().replace(/^www\./,"")===E)+1,q=z.citedDomains.length,X=i.project.displayName||i.project.name,Z=[i.project.canonicalDomain.replace(/^www\./,""),X,X.split(" ").slice(0,2).join(" ")].filter(ue=>ue.trim().length>2),_=Y?"cited":z.citationState==="lost"?"lost":z.citationState==="pending"?"pending":"not-cited",P=j.useRef(0),Se=j.useCallback(async ue=>{const ge=++P.current;if(ue===-1||ue===T.length-1){h(-1),y(null),c(!1);return}h(ue),c(!1);const te=T[ue],L=`${te.runId}::${a.keyword}::${a.provider}`;if(b[L]){y(b[L]);return}x(!0);try{const J=await Wr(te.runId);if(ge!==P.current)return;const ne=J.snapshots.find(I=>I.keyword===a.keyword&&I.provider===a.provider)??J.snapshots.find(I=>I.keyword===a.keyword),fe=ne?{citationState:ne.citationState,provider:ne.provider,answerSnippet:ne.answerText??"",citedDomains:ne.citedDomains,competitorDomains:ne.competitorOverlap,groundingSources:ne.groundingSources,evidenceUrls:[],changeLabel:te.citationState,summary:""}:{citationState:te.citationState,provider:a.provider,answerSnippet:"",citedDomains:[],competitorDomains:[],groundingSources:[],evidenceUrls:[],changeLabel:te.citationState,summary:"Snapshot data not available for this run."};S(I=>({...I,[L]:fe})),y(fe)}catch{if(ge!==P.current)return;y({citationState:te.citationState,provider:a.provider,answerSnippet:"",citedDomains:[],competitorDomains:[],groundingSources:[],evidenceUrls:[],changeLabel:te.citationState,summary:"Failed to load historical run data."})}finally{ge===P.current&&x(!1)}},[T,a.keyword,a.provider,b]),W=Y&&H>0?{label:"Citation confirmed",title:`Cited #${H} of ${q} domain${q!==1?"s":""}`,meta:`${z.provider} · ${z.changeLabel.toLowerCase()}`}:Y?{label:"Citation confirmed",title:"Cited in this answer",meta:`${z.provider} · ${z.changeLabel.toLowerCase()}`}:z.citationState==="lost"?{label:"Citation lost",title:q>0?`${q} domain${q!==1?"s":""} cited instead`:"No longer appearing in this answer",meta:`${z.provider} · ${z.changeLabel.toLowerCase()}`}:z.citationState==="pending"?{label:"Pending",title:"Awaiting first visibility run",meta:"No provider data yet"}:{label:"Not in this answer",title:q>0?`${q} domain${q!==1?"s":""} cited instead`:"No domains cited for this query",meta:`${z.provider} · ${z.changeLabel.toLowerCase()}`},se=()=>{if(!z.answerSnippet)return null;const ue=z.answerSnippet.split(`
205
- `),ge=[];let te=[],L=0;const J=()=>{if(te.length===0)return;const ne=te.join(" ").trim();ne&&ge.push(u.jsx("p",{className:ge.length>0?"mt-2.5":"",children:Mg(ne,Z)},L++)),te=[]};for(const ne of ue){const fe=ne.trim();if(/^[-–—]{3,}$/.test(fe)){J(),ge.push(u.jsx("hr",{className:"border-zinc-800/60 my-3"},L++));continue}const I=fe.match(/^(#{1,3})\s+(.+)$/);if(I){J();const A=I[1].length,G=I[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s#]+/u,"").trim()||I[2],ee=A===1?"text-[13px] font-semibold text-zinc-100 mt-4 mb-1":A===2?"text-xs font-semibold text-zinc-200 mt-3 mb-0.5":"text-xs font-medium text-zinc-300 mt-2";ge.push(u.jsx("p",{className:ee,children:Mg(G,Z)},L++));continue}if(fe===""){J();continue}te.push(fe)}return J(),ge};return u.jsx(Fy,{open:!0,onOpenChange:ue=>{ue||s()},children:u.jsxs(Py,{children:[u.jsx(Od,{className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm"}),u.jsxs(zd,{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:[i.project.name," · ",z.provider||"All providers"]}),u.jsx(_d,{className:"text-lg font-semibold text-zinc-50 truncate",children:a.keyword})]}),u.jsxs(ev,{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(Md,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]}),w&&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:T.map((ue,ge)=>{const te=d===-1&&ge===T.length-1||d===ge,L=ue.citationState==="cited"||ue.citationState==="emerging"?"bg-emerald-400":ue.citationState==="lost"?"bg-rose-400":"bg-zinc-600",ne=new Date(ue.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"});return u.jsxs("button",{type:"button",className:`evidence-run-dot ${te?"evidence-run-dot--selected":""}`,onClick:()=>Se(ge===T.length-1?-1:ge),"aria-label":`Run ${ne}: ${ue.citationState}`,"aria-pressed":te,children:[u.jsx("span",{className:`size-2 rounded-full ${L}`,"aria-hidden":"true"}),u.jsx("span",{className:"text-[10px] text-zinc-500",children:ne})]},ge)})}),d>=0&&d<T.length&&u.jsxs("p",{className:"text-[11px] text-zinc-500 mt-1",children:["Viewing run from ",new Date(T[d].createdAt).toLocaleString()," — ",u.jsx("span",{className:"capitalize",children:T[d].citationState}),u.jsx("button",{type:"button",className:"text-zinc-400 hover:text-zinc-200 ml-2",onClick:()=>Se(-1),children:"← Back to latest"})]})]}),u.jsxs("div",{className:"evidence-modal-body",children:[g&&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…"}),!g&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"evidence-modal-main",children:[u.jsxs("div",{className:`evidence-position-hero evidence-position-hero--${_}`,children:[u.jsx("p",{className:`evidence-position-label evidence-position-label--${_}`,children:W.label}),u.jsx("p",{className:`evidence-position-title evidence-position-title--${_}`,children:W.title}),u.jsx("p",{className:"evidence-position-meta",children:W.meta})]}),z.answerSnippet&&u.jsxs("div",{children:[u.jsx("p",{className:"drawer-section-label",children:"What the AI said"}),u.jsx("div",{className:`answer-snippet-block ${r?"evidence-answer-expanded":"evidence-answer-collapsed"}`,children:se()}),z.answerSnippet.length>280&&u.jsx("button",{type:"button",className:"mt-1.5 text-xs text-zinc-500 hover:text-zinc-300 transition-colors",onClick:()=>c(!r),children:r?"↑ Collapse":"↓ Show full answer"})]}),!z.answerSnippet&&!g&&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"}),!N&&a.relatedTechnicalSignals.length>0&&u.jsxs("div",{children:[u.jsx("p",{className:"drawer-section-label",children:Y?"Why you're cited":"What to fix"}),u.jsx("div",{className:"action-items-list",children:a.relatedTechnicalSignals.map((ue,ge)=>u.jsxs("div",{className:"action-item",children:[u.jsx("svg",{className:`action-item-icon ${Y?"text-emerald-400":"text-amber-400"}`,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:Y?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:ue})]},ge))})]}),z.summary&&u.jsx("p",{className:"text-xs text-zinc-600 border-t border-zinc-800/40 pt-3 mt-1",children:z.summary})]}),u.jsxs("div",{className:"evidence-modal-sidebar",children:[z.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:[z.citedDomains.map((ue,ge)=>{const te=ue.toLowerCase().replace(/^www\./,""),L=te===E,J=!L&&z.competitorDomains.some(fe=>fe.toLowerCase().replace(/^www\./,"")===te),ne=L?"you":J?"competitor":"other";return u.jsxs("div",{className:`citation-leaderboard-item citation-leaderboard-item--${ne}`,children:[u.jsxs("span",{className:"citation-leaderboard-rank",children:["#",ge+1]}),u.jsx("span",{className:"citation-leaderboard-domain",children:ue}),L&&u.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),J&&u.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},ue)}),!Y&&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:i.project.canonicalDomain}),u.jsx("span",{className:"citation-leaderboard-tag text-zinc-600",children:"Not cited"})]})]})]}),z.groundingSources.length>0&&u.jsxs("div",{children:[u.jsxs("p",{className:"drawer-section-label",children:["Grounding sources (",z.groundingSources.length,")"]}),u.jsx("ul",{className:"grid gap-0.5",children:z.groundingSources.map((ue,ge)=>u.jsx("li",{className:"truncate text-sm",children:u.jsx("a",{href:ue.uri,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:ue.title||ue.uri})},ge))})]}),z.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:z.evidenceUrls.map(ue=>u.jsx("li",{className:"truncate text-sm",children:u.jsx("a",{href:ue,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:ue})},ue))})]}),z.citedDomains.length===0&&z.groundingSources.length===0&&z.evidenceUrls.length===0&&u.jsxs("div",{className:"flex items-center justify-center h-24 text-zinc-600 text-sm",children:["No citation data ",N?"for this run":"yet"]})]})]})]})]})]})})}async function b2(){try{const[a,i,s]=await Promise.all([Jj(),Fj(),iN().catch(()=>null)]),r=await Promise.all(a.map(async c=>{const d=i.filter(b=>b.projectId===c.id),h=d.filter(b=>b.status==="completed"||b.status==="partial").sort((b,S)=>S.createdAt.localeCompare(b.createdAt)),[m,y,g,x]=await Promise.all([Pj(c.name).catch(()=>[]),kv(c.name).catch(()=>[]),Wj(c.name).catch(()=>[]),h[0]?Wr(h[0].id).catch(()=>null):Promise.resolve(null)]);return{project:c,runs:d,keywords:m,competitors:y,timeline:g,latestRunDetail:x}}));return kN(r,s)}catch{return null}}function x2({initialPathname:a,initialDashboard:i,initialHealthSnapshot:s,enableLiveStatus:r=!0}){const[c,d]=j.useState(i??null),[h,m]=j.useState(!i),[y,g]=j.useState(i?!0:null),[x,b]=j.useState(()=>MN(a)),[S,E]=j.useState(!1),[T,w]=j.useState(null),[N,z]=j.useState(null),[Y,M]=j.useState(!1),[H,q]=j.useState(s??zN),X=j.useCallback(async()=>{const D=await b2();D?(d(D),g(!0)):g(!1),m(!1)},[]);j.useEffect(()=>{i||X()},[i,X]);const Z=c?.runs.some(D=>D.status==="running"||D.status==="queued")??!1;if(j.useEffect(()=>{if(!Z)return;const D=setInterval(()=>{X()},3e3);return()=>clearInterval(D)},[Z,X]),j.useEffect(()=>{if(typeof window>"u")return;const D=()=>{b(Gi(window.location.pathname))};return window.addEventListener("popstate",D),()=>{window.removeEventListener("popstate",D)}},[]),j.useEffect(()=>{E(!1),w(null)},[x]),j.useEffect(()=>{if(typeof window>"u"||T===null)return;const D=F=>{F.key==="Escape"&&w(null)};return window.addEventListener("keydown",D),()=>{window.removeEventListener("keydown",D)}},[T]),j.useEffect(()=>{if(!r||typeof window>"u")return;let D=!0;const F=async()=>{const pe=await _N("/health","API"),$e=pe.state==="ok"?{label:"Runner",state:"ok",detail:"In-process job runner"}:{label:"Runner",state:pe.state,detail:"Depends on API"};D&&q({apiStatus:pe,workerStatus:$e})};F();const ie=window.setInterval(()=>{F()},15e3);return()=>{D=!1,window.clearInterval(ie)}},[r]),!h&&!c&&y===!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(me,{type:"button",onClick:()=>{m(!0),X()},children:"Retry connection"})]})})})});const _=c??ON.dashboard,P=DN(x,_),Se=P.kind==="project"?Av(_,P.projectId):void 0,W=D=>{const F=Gi(D);if(typeof window>"u"){b(F);return}Gi(window.location.pathname)!==F&&window.history.pushState({},"",F),b(F)},se=D=>{if(!D)return;w({kind:"run",runId:D}),z(null),M(!0);const F=D;Wr(D).then(ie=>{w(pe=>(pe?.kind==="run"&&pe.runId===F&&z(ie),pe))}).catch(()=>{w(ie=>(ie?.kind==="run"&&ie.runId===F&&z(null),ie))}).finally(()=>M(!1))};j.useEffect(()=>{if(T?.kind!=="run"||!N||N.status!=="running"&&N.status!=="queued")return;const D=setInterval(()=>{Wr(T.runId).then(F=>{z(F),F.status!=="running"&&F.status!=="queued"&&X()}).catch(()=>{})},3e3);return()=>clearInterval(D)},[T,N?.status,N?.snapshots.length,X]);const ue=D=>{w({kind:"evidence",evidenceId:D})},ge=async D=>{await zv(D),X()},te=async D=>{try{await nN(D),W("/"),X()}catch(F){console.error("Failed to delete project:",F)}},L=async(D,F)=>{await tN(D,F),await X()},J=async(D,F)=>{const pe=(await kv(D)).map(ye=>ye.domain),$e=[...new Set([...pe,...F])];await Ov(D,$e),await X()},ne=BN(_.portfolioOverview.systemHealth,H,_.settings),fe=qN(_.setup,H,_.settings),I=T?.kind==="run"?Qj(_,T.runId):void 0,A=T?.kind==="evidence"?Xj(_,T.evidenceId):void 0,G=[{label:"Overview",href:"/",icon:yw,active:qr(P,"overview")},{label:"Projects",href:"/projects",icon:pw,active:qr(P,"projects")},{label:"Runs",href:"/runs",icon:Sw,active:qr(P,"runs")},{label:"Settings",href:"/settings",icon:Ew,active:qr(P,"settings")}],ee=P.kind==="overview"?"Portfolio":P.kind==="projects"?"Projects":P.kind==="project"&&Se?Se.project.name:P.kind==="runs"?"Runs":P.kind==="settings"?"Settings":P.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:Mt(W,"/"),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:[G.map(D=>u.jsxs("a",{className:`sidebar-link ${D.active?"sidebar-link-active":""}`,href:D.href,"aria-current":D.active?"page":void 0,onClick:Mt(W,D.href),children:[u.jsx(D.icon,{className:"sidebar-icon"}),u.jsx("span",{children:D.label})]},D.label)),_.projects.length>0?u.jsxs(u.Fragment,{children:[u.jsx("p",{className:"sidebar-section-title",children:"Projects"}),_.projects.map(D=>{const F=P.kind==="project"&&Se?.project.id===D.project.id,ie=D.visibilitySummary.tone;return u.jsxs("a",{className:`sidebar-project ${F?"sidebar-project-active":""}`,href:`/projects/${D.project.id}`,onClick:Mt(W,`/projects/${D.project.id}`),children:[u.jsx("span",{className:`sidebar-dot sidebar-dot-${ie}`}),u.jsx("span",{children:D.project.name})]},D.project.id)})]}):null,u.jsx("p",{className:"sidebar-section-title",children:"Resources"}),u.jsxs("a",{className:"sidebar-link",href:"/setup","aria-current":P.kind==="setup"?"page":void 0,onClick:Mt(W,"/setup"),children:[u.jsx(Nw,{className:"sidebar-icon"}),u.jsx("span",{children:"Setup"})]})]}),u.jsx("div",{className:"sidebar-footer",children:zg.map(D=>u.jsx("a",{className:"sidebar-footer-link",href:D.href,target:"_blank",rel:"noreferrer",children:D.label},D.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:Mt(W,"/"),children:"Canonry"})}),u.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[u.jsx("a",{href:"/",onClick:Mt(W,"/"),children:"Home"}),u.jsx(Dd,{className:"breadcrumb-sep size-3"}),u.jsx("span",{className:"breadcrumb-current",children:ee})]})]}),u.jsxs("div",{className:"topbar-actions",children:[u.jsxs("div",{className:"health-pill-row",children:[u.jsxs("span",{className:`health-pill health-pill-${H.apiStatus.state}`,children:["API ",H.apiStatus.state==="ok"?"ok":H.apiStatus.state]}),u.jsxs("span",{className:`health-pill health-pill-${H.workerStatus.state}`,children:["Worker ",H.workerStatus.state==="ok"?"ok":H.workerStatus.state]})]}),u.jsxs(me,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":S,"aria-controls":"mobile-nav",onClick:()=>E(D=>!D),children:[u.jsx(bw,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),u.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${S?"mobile-nav-open":""}`,children:[u.jsxs(me,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>E(!1),children:[u.jsx(Md,{className:"size-5"}),u.jsx("span",{className:"sr-only",children:"Close navigation"})]}),G.map(D=>u.jsx("a",{className:`mobile-nav-link ${D.active?"mobile-nav-link-active":""}`,href:D.href,"aria-current":D.active?"page":void 0,onClick:Mt(W,D.href),children:D.label},D.label)),_.projects.length>0?u.jsxs("div",{className:"mobile-nav-section",children:[u.jsx("p",{className:"mobile-nav-section-title",children:"Projects"}),_.projects.map(D=>u.jsx("a",{className:"mobile-nav-link",href:`/projects/${D.project.id}`,onClick:Mt(W,`/projects/${D.project.id}`),children:D.project.name},D.project.id))]}):null]}),u.jsx("main",{id:"content",className:"page-shell",children:h?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:[P.kind==="overview"?u.jsx(FN,{model:_.portfolioOverview,systemHealth:ne,onNavigate:W,onOpenRun:se}):null,P.kind==="projects"?u.jsx(PN,{projects:_.projects,onNavigate:W,onProjectCreated:X}):null,P.kind==="project"&&Se?u.jsx(e2,{model:Se,onOpenEvidence:ue,onOpenRun:se,onTriggerRun:ge,onDeleteProject:te,onAddKeywords:L,onAddCompetitors:J}):null,P.kind==="runs"?u.jsx(c2,{runs:_.runs,onOpenRun:se}):null,P.kind==="settings"?u.jsx(f2,{settings:_.settings,healthSnapshot:H,onSettingsChanged:X}):null,P.kind==="setup"?u.jsx(p2,{model:fe,settings:_.settings,onProjectCreated:X,onNavigate:W}):null,P.kind==="not-found"?u.jsx(g2,{onNavigate:W}):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:zg.map(D=>u.jsx("a",{href:D.href,target:"_blank",rel:"noreferrer",children:D.label},D.href))})]})]}),I?u.jsxs(y2,{open:I!==void 0,title:I.summary,subtitle:`${I.projectName} · ${I.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(mc,{status:I.status}),u.jsx("span",{className:"text-zinc-400",children:I.startedAt}),u.jsx("span",{className:"text-zinc-500",children:I.duration}),u.jsx("span",{className:"text-zinc-600",children:I.triggerLabel})]}),I.status==="failed"&&I.statusDetail&&u.jsx("p",{className:"text-sm text-rose-300/80 mt-2",children:I.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"}),Y?u.jsx("p",{className:"text-sm text-zinc-500",children:"Loading run details..."}):N&&N.snapshots.length>0?u.jsxs("div",{className:"space-y-2",children:[N.snapshots.map(D=>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:D.keyword??"Unknown key phrase"}),u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(qd,{provider:D.provider}),u.jsx(bv,{variant:D.citationState==="cited"?"success":"neutral",children:D.citationState})]})]}),D.citedDomains.length>0&&u.jsxs("p",{className:"text-xs text-zinc-500 mt-1",children:[u.jsx("span",{className:"text-zinc-400",children:"Sources:"})," ",D.citedDomains.join(", ")]}),D.competitorOverlap.length>0&&u.jsxs("p",{className:"text-xs text-rose-400/80 mt-0.5",children:["Competitor cited: ",D.competitorOverlap.join(", ")]}),D.groundingSources&&D.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:[D.groundingSources.length," grounding source",D.groundingSources.length!==1?"s":""]}),u.jsx("ul",{className:"mt-1 space-y-0.5",children:D.groundingSources.map((F,ie)=>u.jsx("li",{className:"text-xs text-zinc-500 truncate",children:u.jsx("a",{href:F.uri,target:"_blank",rel:"noreferrer",className:"hover:text-zinc-300",children:F.title||F.uri})},ie))})]}),D.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:D.answerText})]})]},D.id)),N.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..."]})]}):N&&N.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..."]}):N&&N.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..."]}):N&&N.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:UN(N.error)})]}):u.jsx("p",{className:"text-sm text-zinc-500",children:"No snapshot data available."}),N?.snapshots?.[0]?.model&&u.jsxs("p",{className:"mt-3 text-[10px] text-zinc-600",children:["Model: ",N.snapshots[0].model]})]})]}):null,A?u.jsx(v2,{evidence:A.evidence,project:A.project,onClose:()=>w(null)}):null]})}const Yv=document.getElementById("root");if(!Yv)throw new Error("Expected #root element for web app bootstrap.");gx.createRoot(Yv).render(u.jsx(j.StrictMode,{children:u.jsx(x2,{})}));