@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.
- package/assets/assets/index-Cgb-VMub.js +205 -0
- package/assets/index.html +1 -1
- package/dist/{chunk-CKC26GOH.js → chunk-2QG7TZ4A.js} +11 -2
- package/dist/cli.js +88 -33
- package/dist/index.js +1 -1
- package/package.json +4 -4
- package/assets/assets/index-OtrziEv9.js +0 -205
|
@@ -0,0 +1,205 @@
|
|
|
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 o in r)if(o!=="default"&&!(o in a)){const u=Object.getOwnPropertyDescriptor(r,o);u&&Object.defineProperty(a,o,u.get?u:{enumerable:!0,get:()=>r[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const h of u.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function s(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(o){if(o.ep)return;o.ep=!0;const u=s(o);fetch(o.href,u)}})();function Ug(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var zu={exports:{}},Gs={};var qp;function rx(){if(qp)return Gs;qp=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(r,o,u){var h=null;if(u!==void 0&&(h=""+u),o.key!==void 0&&(h=""+o.key),"key"in o){u={};for(var m in o)m!=="key"&&(u[m]=o[m])}else u=o;return o=u.ref,{$$typeof:a,type:r,key:h,ref:o!==void 0?o:null,props:u}}return Gs.Fragment=i,Gs.jsx=s,Gs.jsxs=s,Gs}var $p;function ox(){return $p||($p=1,zu.exports=rx()),zu.exports}var d=ox(),_u={exports:{}},ve={};var Kp;function cx(){if(Kp)return ve;Kp=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=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 A(k){return k===null||typeof k!="object"?null:(k=S&&k[S]||k["@@iterator"],typeof k=="function"?k:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,N={};function E(k,V,ee){this.props=k,this.context=V,this.refs=N,this.updater=ee||O}E.prototype.isReactComponent={},E.prototype.setState=function(k,V){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,V,"setState")},E.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function $(){}$.prototype=E.prototype;function _(k,V,ee){this.props=k,this.context=V,this.refs=N,this.updater=ee||O}var M=_.prototype=new $;M.constructor=_,w(M,E.prototype),M.isPureReactComponent=!0;var L=Array.isArray;function G(){}var X={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function P(k,V,ee){var R=ee.ref;return{$$typeof:a,type:k,key:V,ref:R!==void 0?R:null,props:ee}}function Se(k,V){return P(k.type,V,k.props)}function W(k){return typeof k=="object"&&k!==null&&k.$$typeof===a}function se(k){var V={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(ee){return V[ee]})}var ue=/\/+/g;function ye(k,V){return typeof k=="object"&&k!==null&&k.key!=null?se(""+k.key):V.toString(36)}function te(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(G,G):(k.status="pending",k.then(function(V){k.status==="pending"&&(k.status="fulfilled",k.value=V)},function(V){k.status==="pending"&&(k.status="rejected",k.reason=V)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function B(k,V,ee,R,F){var ie=typeof k;(ie==="undefined"||ie==="boolean")&&(k=null);var pe=!1;if(k===null)pe=!0;else switch(ie){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(k.$$typeof){case a:case i:pe=!0;break;case x:return pe=k._init,B(pe(k._payload),V,ee,R,F)}}if(pe)return F=F(k),pe=R===""?"."+ye(k,0):R,L(F)?(ee="",pe!=null&&(ee=pe.replace(ue,"$&/")+"/"),B(F,V,ee,"",function(Pt){return Pt})):F!=null&&(W(F)&&(F=Se(F,ee+(F.key==null||k&&k.key===F.key?"":(""+F.key).replace(ue,"$&/")+"/")+pe)),V.push(F)),1;pe=0;var $e=R===""?".":R+":";if(L(k))for(var ge=0;ge<k.length;ge++)R=k[ge],ie=$e+ye(R,ge),pe+=B(R,V,ee,ie,F);else if(ge=A(k),typeof ge=="function")for(k=ge.call(k),ge=0;!(R=k.next()).done;)R=R.value,ie=$e+ye(R,ge++),pe+=B(R,V,ee,ie,F);else if(ie==="object"){if(typeof k.then=="function")return B(te(k),V,ee,R,F);throw V=String(k),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return pe}function J(k,V,ee){if(k==null)return k;var R=[],F=0;return B(k,R,"","",function(ie){return V.call(ee,ie,F++)}),R}function ne(k){if(k._status===-1){var V=k._result;V=V(),V.then(function(ee){(k._status===0||k._status===-1)&&(k._status=1,k._result=ee)},function(ee){(k._status===0||k._status===-1)&&(k._status=2,k._result=ee)}),k._status===-1&&(k._status=0,k._result=V)}if(k._status===1)return k._result.default;throw k._result}var fe=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},I={map:J,forEach:function(k,V,ee){J(k,function(){V.apply(this,arguments)},ee)},count:function(k){var V=0;return J(k,function(){V++}),V},toArray:function(k){return J(k,function(V){return V})||[]},only:function(k){if(!W(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return ve.Activity=b,ve.Children=I,ve.Component=E,ve.Fragment=s,ve.Profiler=o,ve.PureComponent=_,ve.StrictMode=r,ve.Suspense=y,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=X,ve.__COMPILER_RUNTIME={__proto__:null,c:function(k){return X.H.useMemoCache(k)}},ve.cache=function(k){return function(){return k.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(k,V,ee){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var R=w({},k.props),F=k.key;if(V!=null)for(ie in V.key!==void 0&&(F=""+V.key),V)!D.call(V,ie)||ie==="key"||ie==="__self"||ie==="__source"||ie==="ref"&&V.ref===void 0||(R[ie]=V[ie]);var ie=arguments.length-2;if(ie===1)R.children=ee;else if(1<ie){for(var pe=Array(ie),$e=0;$e<ie;$e++)pe[$e]=arguments[$e+2];R.children=pe}return P(k.type,F,R)},ve.createContext=function(k){return k={$$typeof:h,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:u,_context:k},k},ve.createElement=function(k,V,ee){var R,F={},ie=null;if(V!=null)for(R in V.key!==void 0&&(ie=""+V.key),V)D.call(V,R)&&R!=="key"&&R!=="__self"&&R!=="__source"&&(F[R]=V[R]);var pe=arguments.length-2;if(pe===1)F.children=ee;else if(1<pe){for(var $e=Array(pe),ge=0;ge<pe;ge++)$e[ge]=arguments[ge+2];F.children=$e}if(k&&k.defaultProps)for(R in pe=k.defaultProps,pe)F[R]===void 0&&(F[R]=pe[R]);return P(k,ie,F)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(k){return{$$typeof:m,render:k}},ve.isValidElement=W,ve.lazy=function(k){return{$$typeof:x,_payload:{_status:-1,_result:k},_init:ne}},ve.memo=function(k,V){return{$$typeof:g,type:k,compare:V===void 0?null:V}},ve.startTransition=function(k){var V=X.T,ee={};X.T=ee;try{var R=k(),F=X.S;F!==null&&F(ee,R),typeof R=="object"&&R!==null&&typeof R.then=="function"&&R.then(G,fe)}catch(ie){fe(ie)}finally{V!==null&&ee.types!==null&&(V.types=ee.types),X.T=V}},ve.unstable_useCacheRefresh=function(){return X.H.useCacheRefresh()},ve.use=function(k){return X.H.use(k)},ve.useActionState=function(k,V,ee){return X.H.useActionState(k,V,ee)},ve.useCallback=function(k,V){return X.H.useCallback(k,V)},ve.useContext=function(k){return X.H.useContext(k)},ve.useDebugValue=function(){},ve.useDeferredValue=function(k,V){return X.H.useDeferredValue(k,V)},ve.useEffect=function(k,V){return X.H.useEffect(k,V)},ve.useEffectEvent=function(k){return X.H.useEffectEvent(k)},ve.useId=function(){return X.H.useId()},ve.useImperativeHandle=function(k,V,ee){return X.H.useImperativeHandle(k,V,ee)},ve.useInsertionEffect=function(k,V){return X.H.useInsertionEffect(k,V)},ve.useLayoutEffect=function(k,V){return X.H.useLayoutEffect(k,V)},ve.useMemo=function(k,V){return X.H.useMemo(k,V)},ve.useOptimistic=function(k,V){return X.H.useOptimistic(k,V)},ve.useReducer=function(k,V,ee){return X.H.useReducer(k,V,ee)},ve.useRef=function(k){return X.H.useRef(k)},ve.useState=function(k){return X.H.useState(k)},ve.useSyncExternalStore=function(k,V,ee){return X.H.useSyncExternalStore(k,V,ee)},ve.useTransition=function(){return X.H.useTransition()},ve.version="19.2.4",ve}var Yp;function dd(){return Yp||(Yp=1,_u.exports=cx()),_u.exports}var j=dd();const ux=Ug(j),fd=lx({__proto__:null,default:ux},[j]);var Du={exports:{}},Vs={},Mu={exports:{}},Ru={};var Gp;function dx(){return Gp||(Gp=1,(function(a){function i(B,J){var ne=B.length;B.push(J);e:for(;0<ne;){var fe=ne-1>>>1,I=B[fe];if(0<o(I,J))B[fe]=J,B[ne]=I,ne=fe;else break e}}function s(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var J=B[0],ne=B.pop();if(ne!==J){B[0]=ne;e:for(var fe=0,I=B.length,k=I>>>1;fe<k;){var V=2*(fe+1)-1,ee=B[V],R=V+1,F=B[R];if(0>o(ee,ne))R<I&&0>o(F,ee)?(B[fe]=F,B[R]=ne,fe=R):(B[fe]=ee,B[V]=ne,fe=V);else if(R<I&&0>o(F,ne))B[fe]=F,B[R]=ne,fe=R;else break e}}return J}function o(B,J){var ne=B.sortIndex-J.sortIndex;return ne!==0?ne:B.id-J.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;a.unstable_now=function(){return u.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,A=!1,O=!1,w=!1,N=!1,E=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function M(B){for(var J=s(g);J!==null;){if(J.callback===null)r(g);else if(J.startTime<=B)r(g),J.sortIndex=J.expirationTime,i(y,J);else break;J=s(g)}}function L(B){if(w=!1,M(B),!O)if(s(y)!==null)O=!0,G||(G=!0,se());else{var J=s(g);J!==null&&te(L,J.startTime-B)}}var G=!1,X=-1,D=5,P=-1;function Se(){return N?!0:!(a.unstable_now()-P<D)}function W(){if(N=!1,G){var B=a.unstable_now();P=B;var J=!0;try{e:{O=!1,w&&(w=!1,$(X),X=-1),A=!0;var ne=S;try{t:{for(M(B),b=s(y);b!==null&&!(b.expirationTime>B&&Se());){var fe=b.callback;if(typeof fe=="function"){b.callback=null,S=b.priorityLevel;var I=fe(b.expirationTime<=B);if(B=a.unstable_now(),typeof I=="function"){b.callback=I,M(B),J=!0;break t}b===s(y)&&r(y),M(B)}else r(y);b=s(y)}if(b!==null)J=!0;else{var k=s(g);k!==null&&te(L,k.startTime-B),J=!1}}break e}finally{b=null,S=ne,A=!1}J=void 0}}finally{J?se():G=!1}}}var se;if(typeof _=="function")se=function(){_(W)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,ye=ue.port2;ue.port1.onmessage=W,se=function(){ye.postMessage(null)}}else se=function(){E(W,0)};function te(B,J){X=E(function(){B(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(B){B.callback=null},a.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<B?Math.floor(1e3/B):5},a.unstable_getCurrentPriorityLevel=function(){return S},a.unstable_next=function(B){switch(S){case 1:case 2:case 3:var J=3;break;default:J=S}var ne=S;S=J;try{return B()}finally{S=ne}},a.unstable_requestPaint=function(){N=!0},a.unstable_runWithPriority=function(B,J){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ne=S;S=B;try{return J()}finally{S=ne}},a.unstable_scheduleCallback=function(B,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,B){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,B={id:x++,callback:J,priorityLevel:B,startTime:ne,expirationTime:I,sortIndex:-1},ne>fe?(B.sortIndex=ne,i(g,B),s(y)===null&&B===s(g)&&(w?($(X),X=-1):w=!0,te(L,ne-fe))):(B.sortIndex=I,i(y,B),O||A||(O=!0,G||(G=!0,se()))),B},a.unstable_shouldYield=Se,a.unstable_wrapCallback=function(B){var J=S;return function(){var ne=S;S=J;try{return B.apply(this,arguments)}finally{S=ne}}}})(Ru)),Ru}var Vp;function fx(){return Vp||(Vp=1,Mu.exports=dx()),Mu.exports}var Lu={exports:{}},ft={};var Qp;function hx(){if(Qp)return ft;Qp=1;var a=dd();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},o=Symbol.for("react.portal");function u(y,g,x){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,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 u(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,A=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:A}):x==="script"&&r.d.X(y,{crossOrigin:b,integrity:S,fetchPriority:A,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 Xp;function Bg(){if(Xp)return Lu.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(),Lu.exports=hx(),Lu.exports}var Zp;function mx(){if(Zp)return Vs;Zp=1;var a=fx(),i=dd(),s=Bg();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 o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(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(u(e)!==e)throw Error(r(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,l=t;;){var c=n.return;if(c===null)break;var f=c.alternate;if(f===null){if(l=c.return,l!==null){n=l;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===n)return y(c),e;if(f===l)return y(c),t;f=f.sibling}throw Error(r(188))}if(n.return!==l.return)n=c,l=f;else{for(var p=!1,v=c.child;v;){if(v===n){p=!0,n=c,l=f;break}if(v===l){p=!0,l=c,n=f;break}v=v.sibling}if(!p){for(v=f.child;v;){if(v===n){p=!0,n=f,l=c;break}if(v===l){p=!0,l=f,n=c;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"),A=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),_=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),D=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 ye(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 E:return"Profiler";case N:return"StrictMode";case L:return"Suspense";case G:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case O:return"Portal";case _:return e.displayName||"Context";case $:return(e._context.displayName||"Context")+".Consumer";case M:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case X:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case D:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var te=Array.isArray,B=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 k(e){return{current:e}}function V(e){0>I||(e.current=fe[I],fe[I]=null,I--)}function ee(e,t){I++,fe[I]=e.current,e.current=t}var R=k(null),F=k(null),ie=k(null),pe=k(null);function $e(e,t){switch(ee(ie,t),ee(F,e),ee(R,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?cp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=cp(t),e=up(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(R),ee(R,e)}function ge(){V(R),V(F),V(ie)}function Pt(e){e.memoizedState!==null&&ee(pe,e);var t=R.current,n=up(t,e.type);t!==n&&(ee(F,e),ee(R,n))}function Rt(e){F.current===e&&(V(R),V(F)),pe.current===e&&(V(pe),qs._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 Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(K){var q=K}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(K){q=K}e.call(Z.prototype)}}else{try{throw Error()}catch(K){q=K}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(K){if(K&&q&&typeof K.stack=="string")return[K.stack,q.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.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
|
+
`),H=v.split(`
|
|
5
|
+
`);for(c=l=0;l<C.length&&!C[l].includes("DetermineComponentFrameRoot");)l++;for(;c<H.length&&!H[c].includes("DetermineComponentFrameRoot");)c++;if(l===C.length||c===H.length)for(l=C.length-1,c=H.length-1;1<=l&&0<=c&&C[l]!==H[c];)c--;for(;1<=l&&0<=c;l--,c--)if(C[l]!==H[c]){if(l!==1||c!==1)do if(l--,c--,0>c||C[l]!==H[c]){var Y=`
|
|
6
|
+
`+C[l].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=l&&0<=c);break}}}finally{Qa=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?yt(n):""}function ll(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 Fi(e){try{var t="",n=null;do t+=ll(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,po=a.unstable_shouldYield,go=a.unstable_requestPaint,ht=a.unstable_now,yo=a.unstable_getCurrentPriorityLevel,rl=a.unstable_ImmediatePriority,ol=a.unstable_UserBlockingPriority,Ut=a.unstable_NormalPriority,vo=a.unstable_LowPriority,ae=a.unstable_IdlePriority,vn=a.log,Yv=a.unstable_setDisableYieldValue,Pi=null,Ct=null;function $n(e){if(typeof vn=="function"&&Yv(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(Pi,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 cl=256,ul=262144,dl=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 fl(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var c=0,f=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var v=l&134217727;return v!==0?(l=v&~f,l!==0?c=ba(l):(p&=v,p!==0?c=ba(p):n||(n=v&~e,n!==0&&(c=ba(n))))):(v=l&~f,v!==0?c=ba(v):p!==0?c=ba(p):n||(n=l&~e,n!==0&&(c=ba(n)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,n=t&-t,f>=n||f===32&&(n&4194048)!==0)?t:c}function Wi(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 Yd(){var e=dl;return dl<<=1,(dl&62914560)===0&&(dl=4194304),e}function bo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function es(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Zv(e,t,n,l,c,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,H=e.hiddenUpdates;for(n=p&~n;0<n;){var Y=31-Et(n),Z=1<<Y;v[Y]=0,C[Y]=-1;var q=H[Y];if(q!==null)for(H[Y]=null,Y=0;Y<q.length;Y++){var K=q[Y];K!==null&&(K.lane&=-536870913)}n&=~Z}l!==0&&Gd(e,l,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(p&~t))}function Gd(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 Vd(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-Et(n),c=1<<l;c&t|e[l]&t&&(e[l]|=t),n&=~c}}function Qd(e,t){var n=t&-t;return n=(n&42)!==0?1:xo(n),(n&(e.suspendedLanes|t))!==0?0:n}function xo(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 So(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Xd(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Dp(e.type))}function Zd(e,t){var n=J.p;try{return J.p=e,t()}finally{J.p=n}}var Kn=Math.random().toString(36).slice(2),rt="__reactFiber$"+Kn,vt="__reactProps$"+Kn,Za="__reactContainer$"+Kn,wo="__reactEvents$"+Kn,Iv="__reactListeners$"+Kn,Jv="__reactHandles$"+Kn,Id="__reactResources$"+Kn,ts="__reactMarker$"+Kn;function jo(e){delete e[rt],delete e[vt],delete e[wo],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=yp(e);e!==null;){if(n=e[rt])return n;e=yp(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 ns(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[Id];return t||(t=e[Id]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function it(e){e[ts]=!0}var Jd=new Set,Fd={};function xa(e,t){Pa(e,t),Pa(e+"Capture",t)}function Pa(e,t){for(Fd[e]=t,e=0;e<t.length;e++)Jd.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]*$"),Pd={},Wd={};function Pv(e){return en.call(Wd,e)?!0:en.call(Pd,e)?!1:Fv.test(e)?Wd[e]=!0:(Pd[e]=!0,!1)}function hl(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 ml(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 ef(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 c=l.get,f=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.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 No(e){if(!e._valueTracker){var t=ef(e)?"checked":"value";e._valueTracker=Wv(e,t,""+e[t])}}function tf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=ef(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function pl(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 Co(e,t,n,l,c,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?Eo(e,p,Bt(t)):n!=null?Eo(e,p,Bt(n)):l!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+Bt(v):e.removeAttribute("name")}function nf(e,t,n,l,c,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)){No(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??c,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),No(e)}function Eo(e,t,n){t==="number"&&pl(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Wa(e,t,n,l){if(e=e.options,t){t={};for(var c=0;c<n.length;c++)t["$"+n[c]]=!0;for(n=0;n<e.length;n++)c=t.hasOwnProperty("$"+e[n].value),e[n].selected!==c&&(e[n].selected=c),c&&l&&(e[n].defaultSelected=!0)}else{for(n=""+Bt(n),t=null,c=0;c<e.length;c++){if(e[c].value===n){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function af(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 sf(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),No(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 lf(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 rf(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 c in t)l=t[c],t.hasOwnProperty(c)&&n[c]!==l&&lf(e,c,l)}else for(var f in t)t.hasOwnProperty(f)&&lf(e,f,t[f])}function Ao(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 gl(e){return ab.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function xn(){}var ko=null;function To(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 of(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(Co(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 c=l[vt]||null;if(!c)throw Error(r(90));Co(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&tf(l)}break e;case"textarea":af(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Wa(e,!!n.multiple,t,!1)}}}var Oo=!1;function cf(e,t,n){if(Oo)return e(t,n);Oo=!0;try{var l=e(t);return l}finally{if(Oo=!1,(ti!==null||ni!==null)&&(ar(),ti&&(t=ti,e=ni,ni=ti=null,of(t),e)))for(t=0;t<e.length;t++)of(e[t])}}function as(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"),zo=!1;if(Sn)try{var is={};Object.defineProperty(is,"passive",{get:function(){zo=!0}}),window.addEventListener("test",is,is),window.removeEventListener("test",is,is)}catch{zo=!1}var Yn=null,_o=null,yl=null;function uf(){if(yl)return yl;var e,t=_o,n=t.length,l,c="value"in Yn?Yn.value:Yn.textContent,f=c.length;for(e=0;e<n&&t[e]===c[e];e++);var p=n-e;for(l=1;l<=p&&t[n-l]===c[f-l];l++);return yl=c.slice(e,1<l?1-l:void 0)}function vl(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 bl(){return!0}function df(){return!1}function bt(e){function t(n,l,c,f,p){this._reactName=n,this._targetInst=c,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)?bl:df,this.isPropagationStopped=df,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=bl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=bl)},persist:function(){},isPersistent:bl}),t}var Sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xl=bt(Sa),ss=b({},Sa,{view:0,detail:0}),ib=bt(ss),Do,Mo,ls,Sl=b({},ss,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lo,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!==ls&&(ls&&e.type==="mousemove"?(Do=e.screenX-ls.screenX,Mo=e.screenY-ls.screenY):Mo=Do=0,ls=e),Do)},movementY:function(e){return"movementY"in e?e.movementY:Mo}}),ff=bt(Sl),sb=b({},Sl,{dataTransfer:0}),lb=bt(sb),rb=b({},ss,{relatedTarget:0}),Ro=bt(rb),ob=b({},Sa,{animationName:0,elapsedTime:0,pseudoElement:0}),cb=bt(ob),ub=b({},Sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),db=bt(ub),fb=b({},Sa,{data:0}),hf=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 Lo(){return gb}var yb=b({},ss,{key:function(e){if(e.key){var t=hb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=vl(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:Lo,charCode:function(e){return e.type==="keypress"?vl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?vl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),vb=bt(yb),bb=b({},Sl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mf=bt(bb),xb=b({},ss,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lo}),Sb=bt(xb),wb=b({},Sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),jb=bt(wb),Nb=b({},Sl,{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],Uo=Sn&&"CompositionEvent"in window,rs=null;Sn&&"documentMode"in document&&(rs=document.documentMode);var Tb=Sn&&"TextEvent"in window&&!rs,pf=Sn&&(!Uo||rs&&8<rs&&11>=rs),gf=" ",yf=!1;function vf(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 bf(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 bf(t);case"keypress":return t.which!==32?null:(yf=!0,gf);case"textInput":return e=t.data,e===gf&&yf?null:e;default:return null}}function zb(e,t){if(ai)return e==="compositionend"||!Uo&&vf(e,t)?(e=uf(),yl=_o=Yn=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 pf&&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 xf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!_b[e.type]:t==="textarea"}function Sf(e,t,n,l){ti?ni?ni.push(l):ni=[l]:ti=l,t=ur(t,"onChange"),0<t.length&&(n=new xl("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var os=null,cs=null;function Db(e){ap(e,0)}function wl(e){var t=ns(e);if(tf(t))return e}function wf(e,t){if(e==="change")return t}var jf=!1;if(Sn){var Bo;if(Sn){var Ho="oninput"in document;if(!Ho){var Nf=document.createElement("div");Nf.setAttribute("oninput","return;"),Ho=typeof Nf.oninput=="function"}Bo=Ho}else Bo=!1;jf=Bo&&(!document.documentMode||9<document.documentMode)}function Cf(){os&&(os.detachEvent("onpropertychange",Ef),cs=os=null)}function Ef(e){if(e.propertyName==="value"&&wl(cs)){var t=[];Sf(t,cs,e,To(e)),cf(Db,t)}}function Mb(e,t,n){e==="focusin"?(Cf(),os=t,cs=n,os.attachEvent("onpropertychange",Ef)):e==="focusout"&&Cf()}function Rb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return wl(cs)}function Lb(e,t){if(e==="click")return wl(t)}function Ub(e,t){if(e==="input"||e==="change")return wl(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 us(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 c=n[l];if(!en.call(t,c)||!At(e[c],t[c]))return!1}return!0}function Af(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kf(e,t){var n=Af(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=Af(n)}}function Tf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Of(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=pl(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=pl(e.document)}return t}function qo(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,$o=null,ds=null,Ko=!1;function zf(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ko||ii==null||ii!==pl(l)||(l=ii,"selectionStart"in l&&qo(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}),ds&&us(ds,l)||(ds=l,l=ur($o,"onSelect"),0<l.length&&(t=new xl("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")},Yo={},_f={};Sn&&(_f=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(Yo[e])return Yo[e];if(!si[e])return e;var t=si[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in _f)return Yo[e]=t[n];return e}var Df=ja("animationend"),Mf=ja("animationiteration"),Rf=ja("animationstart"),qb=ja("transitionrun"),$b=ja("transitionstart"),Kb=ja("transitioncancel"),Lf=ja("transitionend"),Uf=new Map,Go="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(" ");Go.push("scrollEnd");function tn(e,t){Uf.set(e,t),xa(t,[e])}var jl=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,Vo=0;function Nl(){for(var e=li,t=Vo=li=0;t<e;){var n=qt[t];qt[t++]=null;var l=qt[t];qt[t++]=null;var c=qt[t];qt[t++]=null;var f=qt[t];if(qt[t++]=null,l!==null&&c!==null){var p=l.pending;p===null?c.next=c:(c.next=p.next,p.next=c),l.pending=c}f!==0&&Bf(n,c,f)}}function Cl(e,t,n,l){qt[li++]=e,qt[li++]=t,qt[li++]=n,qt[li++]=l,Vo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Qo(e,t,n,l){return Cl(e,t,n,l),El(e)}function Na(e,t){return Cl(e,null,null,t),El(e)}function Bf(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var c=!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||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-Et(n),e=f.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=n|536870912),f):null}function El(e){if(50<Ds)throw Ds=0,tu=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 Yb(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 Yb(e,t,n,l)}function Xo(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 Hf(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 Al(e,t,n,l,c,f){var p=0;if(l=e,typeof e=="function")Xo(e)&&(p=1);else if(typeof e=="string")p=Z0(e,n,R.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=kt(31,n,t,c),e.elementType=P,e.lanes=f,e;case w:return Ca(n.children,c,f,t);case N:p=8,c|=24;break;case E:return e=kt(12,n,t,c|2),e.elementType=E,e.lanes=f,e;case L:return e=kt(13,n,t,c),e.elementType=L,e.lanes=f,e;case G:return e=kt(19,n,t,c),e.elementType=G,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _:p=10;break e;case $:p=9;break e;case M:p=11;break e;case X:p=14;break e;case D: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,c),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 Zo(e,t,n){return e=kt(6,e,null,t),e.lanes=n,e}function qf(e){var t=kt(18,null,null,0);return t.stateNode=e,t}function Io(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 $f=new WeakMap;function $t(e,t){if(typeof e=="object"&&e!==null){var n=$f.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Fi(t)},$f.set(e,t),t)}return{value:e,source:t,stack:Fi(t)}}var oi=[],ci=0,kl=null,fs=0,Kt=[],Yt=0,Gn=null,un=1,dn="";function jn(e,t){oi[ci++]=fs,oi[ci++]=kl,kl=e,fs=t}function Kf(e,t,n){Kt[Yt++]=un,Kt[Yt++]=dn,Kt[Yt++]=Gn,Gn=e;var l=un;e=dn;var c=32-Et(l)-1;l&=~(1<<c),n+=1;var f=32-Et(t)+c;if(30<f){var p=c-c%5;f=(l&(1<<p)-1).toString(32),l>>=p,c-=p,un=1<<32-Et(t)+c|n<<c|l,dn=f+e}else un=1<<f|n<<c|l,dn=e}function Jo(e){e.return!==null&&(jn(e,1),Kf(e,1,0))}function Fo(e){for(;e===kl;)kl=oi[--ci],oi[ci]=null,fs=oi[--ci],oi[ci]=null;for(;e===Gn;)Gn=Kt[--Yt],Kt[Yt]=null,dn=Kt[--Yt],Kt[Yt]=null,un=Kt[--Yt],Kt[Yt]=null}function Yf(e,t){Kt[Yt++]=un,Kt[Yt++]=dn,Kt[Yt++]=Gn,un=t.id,dn=t.overflow,Gn=e}var ot=null,He=null,ke=!1,Vn=null,Gt=!1,Po=Error(r(519));function Qn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hs($t(t,e)),Po}function Gf(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<Rs.length;n++)Ce(Rs[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),nf(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),sf(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||rp(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 Vf(e){for(ot=e.return;ot;)switch(ot.tag){case 5:case 31:case 13:Gt=!1;return;case 27:case 3:Gt=!0;return;default:ot=ot.return}}function ui(e){if(e!==ot)return!1;if(!ke)return Vf(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")||gu(e.type,e.memoizedProps)),n=!n),n&&He&&Qn(e),Vf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));He=gp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));He=gp(e)}else t===27?(t=He,la(e.type)?(e=Su,Su=null,He=e):He=t):He=ot?Qt(e.stateNode.nextSibling):null;return!0}function Ea(){He=ot=null,ke=!1}function Wo(){var e=Vn;return e!==null&&(jt===null?jt=e:jt.push.apply(jt,e),Vn=null),e}function hs(e){Vn===null?Vn=[e]:Vn.push(e)}var ec=k(null),Aa=null,Nn=null;function Xn(e,t,n){ee(ec,t._currentValue),t._currentValue=n}function Cn(e){e._currentValue=ec.current,V(ec)}function tc(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 nc(e,t,n,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var p=c.child;f=f.firstContext;e:for(;f!==null;){var v=f;f=c;for(var C=0;C<t.length;C++)if(v.context===t[C]){f.lanes|=n,v=f.alternate,v!==null&&(v.lanes|=n),tc(f.return,n,e),l||(p=null);break e}f=v.next}}else if(c.tag===18){if(p=c.return,p===null)throw Error(r(341));p.lanes|=n,f=p.alternate,f!==null&&(f.lanes|=n),tc(p,n,e),p=null}else p=c.child;if(p!==null)p.return=c;else for(p=c;p!==null;){if(p===e){p=null;break}if(c=p.sibling,c!==null){c.return=p.return,p=c;break}p=p.return}c=p}}function di(e,t,n,l){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var p=c.alternate;if(p===null)throw Error(r(387));if(p=p.memoizedProps,p!==null){var v=c.type;At(c.pendingProps.value,p.value)||(e!==null?e.push(v):e=[v])}}else if(c===pe.current){if(p=c.alternate,p===null)throw Error(r(387));p.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(qs):e=[qs])}c=c.return}e!==null&&nc(t,e,n,l),t.flags|=262144}function Tl(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 ct(e){return Qf(Aa,e)}function Ol(e,t){return Aa===null&&ka(e),Qf(e,t)}function Qf(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,Fe={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ac(){return{controller:new Gb,data:new Map,refCount:0}}function ms(e){e.refCount--,e.refCount===0&&Vb(Qb,function(){e.controller.abort()})}var ps=null,ic=0,fi=0,hi=null;function Xb(e,t){if(ps===null){var n=ps=[];ic=0,fi=ru(),hi={status:"pending",value:void 0,then:function(l){n.push(l)}}}return ic++,t.then(Xf,Xf),t}function Xf(){if(--ic===0&&ps!==null){hi!==null&&(hi.status="fulfilled");var e=ps;ps=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(c){n.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<n.length;c++)(0,n[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<n.length;c++)(0,n[c])(void 0)}),l}var Zf=B.S;B.S=function(e,t){zm=ht(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Xb(e,t),Zf!==null&&Zf(e,t)};var Ta=k(null);function sc(){var e=Ta.current;return e!==null?e:Ue.pooledCache}function zl(e,t){t===null?ee(Ta,Ta.current):ee(Ta,t.pool)}function If(){var e=sc();return e===null?null:{parent:Fe._currentValue,pool:e}}var mi=Error(r(460)),lc=Error(r(474)),_l=Error(r(542)),Dl={then:function(){}};function Jf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ff(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,Wf(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 c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Wf(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 Pf(){if(za===null)throw Error(r(459));var e=za;return za=null,e}function Wf(e){if(e===mi||e===_l)throw Error(r(483))}var pi=null,gs=0;function Ml(e){var t=gs;return gs+=1,pi===null&&(pi=[]),Ff(pi,e,t)}function ys(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Rl(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 eh(e){function t(z,T){if(e){var U=z.deletions;U===null?(z.deletions=[T],z.flags|=16):U.push(T)}}function n(z,T){if(!e)return null;for(;T!==null;)t(z,T),T=T.sibling;return null}function l(z){for(var T=new Map;z!==null;)z.key!==null?T.set(z.key,z):T.set(z.index,z),z=z.sibling;return T}function c(z,T){return z=wn(z,T),z.index=0,z.sibling=null,z}function f(z,T,U){return z.index=U,e?(U=z.alternate,U!==null?(U=U.index,U<T?(z.flags|=67108866,T):U):(z.flags|=67108866,T)):(z.flags|=1048576,T)}function p(z){return e&&z.alternate===null&&(z.flags|=67108866),z}function v(z,T,U,Q){return T===null||T.tag!==6?(T=Zo(U,z.mode,Q),T.return=z,T):(T=c(T,U),T.return=z,T)}function C(z,T,U,Q){var de=U.type;return de===w?Y(z,T,U.props.children,Q,U.key):T!==null&&(T.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===D&&Oa(de)===T.type)?(T=c(T,U.props),ys(T,U),T.return=z,T):(T=Al(U.type,U.key,U.props,null,z.mode,Q),ys(T,U),T.return=z,T)}function H(z,T,U,Q){return T===null||T.tag!==4||T.stateNode.containerInfo!==U.containerInfo||T.stateNode.implementation!==U.implementation?(T=Io(U,z.mode,Q),T.return=z,T):(T=c(T,U.children||[]),T.return=z,T)}function Y(z,T,U,Q,de){return T===null||T.tag!==7?(T=Ca(U,z.mode,Q,de),T.return=z,T):(T=c(T,U),T.return=z,T)}function Z(z,T,U){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=Zo(""+T,z.mode,U),T.return=z,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case A:return U=Al(T.type,T.key,T.props,null,z.mode,U),ys(U,T),U.return=z,U;case O:return T=Io(T,z.mode,U),T.return=z,T;case D:return T=Oa(T),Z(z,T,U)}if(te(T)||se(T))return T=Ca(T,z.mode,U,null),T.return=z,T;if(typeof T.then=="function")return Z(z,Ml(T),U);if(T.$$typeof===_)return Z(z,Ol(z,T),U);Rl(z,T)}return null}function q(z,T,U,Q){var de=T!==null?T.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return de!==null?null:v(z,T,""+U,Q);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case A:return U.key===de?C(z,T,U,Q):null;case O:return U.key===de?H(z,T,U,Q):null;case D:return U=Oa(U),q(z,T,U,Q)}if(te(U)||se(U))return de!==null?null:Y(z,T,U,Q,null);if(typeof U.then=="function")return q(z,T,Ml(U),Q);if(U.$$typeof===_)return q(z,T,Ol(z,U),Q);Rl(z,U)}return null}function K(z,T,U,Q,de){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return z=z.get(U)||null,v(T,z,""+Q,de);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case A:return z=z.get(Q.key===null?U:Q.key)||null,C(T,z,Q,de);case O:return z=z.get(Q.key===null?U:Q.key)||null,H(T,z,Q,de);case D:return Q=Oa(Q),K(z,T,U,Q,de)}if(te(Q)||se(Q))return z=z.get(U)||null,Y(T,z,Q,de,null);if(typeof Q.then=="function")return K(z,T,U,Ml(Q),de);if(Q.$$typeof===_)return K(z,T,U,Ol(T,Q),de);Rl(T,Q)}return null}function le(z,T,U,Q){for(var de=null,Te=null,ce=T,we=T=0,Ae=null;ce!==null&&we<U.length;we++){ce.index>we?(Ae=ce,ce=null):Ae=ce.sibling;var Oe=q(z,ce,U[we],Q);if(Oe===null){ce===null&&(ce=Ae);break}e&&ce&&Oe.alternate===null&&t(z,ce),T=f(Oe,T,we),Te===null?de=Oe:Te.sibling=Oe,Te=Oe,ce=Ae}if(we===U.length)return n(z,ce),ke&&jn(z,we),de;if(ce===null){for(;we<U.length;we++)ce=Z(z,U[we],Q),ce!==null&&(T=f(ce,T,we),Te===null?de=ce:Te.sibling=ce,Te=ce);return ke&&jn(z,we),de}for(ce=l(ce);we<U.length;we++)Ae=K(ce,z,we,U[we],Q),Ae!==null&&(e&&Ae.alternate!==null&&ce.delete(Ae.key===null?we:Ae.key),T=f(Ae,T,we),Te===null?de=Ae:Te.sibling=Ae,Te=Ae);return e&&ce.forEach(function(da){return t(z,da)}),ke&&jn(z,we),de}function he(z,T,U,Q){if(U==null)throw Error(r(151));for(var de=null,Te=null,ce=T,we=T=0,Ae=null,Oe=U.next();ce!==null&&!Oe.done;we++,Oe=U.next()){ce.index>we?(Ae=ce,ce=null):Ae=ce.sibling;var da=q(z,ce,Oe.value,Q);if(da===null){ce===null&&(ce=Ae);break}e&&ce&&da.alternate===null&&t(z,ce),T=f(da,T,we),Te===null?de=da:Te.sibling=da,Te=da,ce=Ae}if(Oe.done)return n(z,ce),ke&&jn(z,we),de;if(ce===null){for(;!Oe.done;we++,Oe=U.next())Oe=Z(z,Oe.value,Q),Oe!==null&&(T=f(Oe,T,we),Te===null?de=Oe:Te.sibling=Oe,Te=Oe);return ke&&jn(z,we),de}for(ce=l(ce);!Oe.done;we++,Oe=U.next())Oe=K(ce,z,we,Oe.value,Q),Oe!==null&&(e&&Oe.alternate!==null&&ce.delete(Oe.key===null?we:Oe.key),T=f(Oe,T,we),Te===null?de=Oe:Te.sibling=Oe,Te=Oe);return e&&ce.forEach(function(sx){return t(z,sx)}),ke&&jn(z,we),de}function Le(z,T,U,Q){if(typeof U=="object"&&U!==null&&U.type===w&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case A:e:{for(var de=U.key;T!==null;){if(T.key===de){if(de=U.type,de===w){if(T.tag===7){n(z,T.sibling),Q=c(T,U.props.children),Q.return=z,z=Q;break e}}else if(T.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===D&&Oa(de)===T.type){n(z,T.sibling),Q=c(T,U.props),ys(Q,U),Q.return=z,z=Q;break e}n(z,T);break}else t(z,T);T=T.sibling}U.type===w?(Q=Ca(U.props.children,z.mode,Q,U.key),Q.return=z,z=Q):(Q=Al(U.type,U.key,U.props,null,z.mode,Q),ys(Q,U),Q.return=z,z=Q)}return p(z);case O:e:{for(de=U.key;T!==null;){if(T.key===de)if(T.tag===4&&T.stateNode.containerInfo===U.containerInfo&&T.stateNode.implementation===U.implementation){n(z,T.sibling),Q=c(T,U.children||[]),Q.return=z,z=Q;break e}else{n(z,T);break}else t(z,T);T=T.sibling}Q=Io(U,z.mode,Q),Q.return=z,z=Q}return p(z);case D:return U=Oa(U),Le(z,T,U,Q)}if(te(U))return le(z,T,U,Q);if(se(U)){if(de=se(U),typeof de!="function")throw Error(r(150));return U=de.call(U),he(z,T,U,Q)}if(typeof U.then=="function")return Le(z,T,Ml(U),Q);if(U.$$typeof===_)return Le(z,T,Ol(z,U),Q);Rl(z,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,T!==null&&T.tag===6?(n(z,T.sibling),Q=c(T,U),Q.return=z,z=Q):(n(z,T),Q=Zo(U,z.mode,Q),Q.return=z,z=Q),p(z)):n(z,T)}return function(z,T,U,Q){try{gs=0;var de=Le(z,T,U,Q);return pi=null,de}catch(ce){if(ce===mi||ce===_l)throw ce;var Te=kt(29,ce,null,z.mode);return Te.lanes=Q,Te.return=z,Te}}}var _a=eh(!0),th=eh(!1),Zn=!1;function rc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oc(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 c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=El(e),Bf(e,null,n),t}return Cl(e,l,t,n),El(e)}function vs(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,Vd(e,n)}}function cc(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var c=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?c=f=p:f=f.next=p,n=n.next}while(n!==null);f===null?c=f=t:f=f.next=t}else c=f=t;n={baseState:l.baseState,firstBaseUpdate:c,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 uc=!1;function bs(){if(uc){var e=hi;if(e!==null)throw e}}function xs(e,t,n,l){uc=!1;var c=e.updateQueue;Zn=!1;var f=c.firstBaseUpdate,p=c.lastBaseUpdate,v=c.shared.pending;if(v!==null){c.shared.pending=null;var C=v,H=C.next;C.next=null,p===null?f=H:p.next=H,p=C;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,v=Y.lastBaseUpdate,v!==p&&(v===null?Y.firstBaseUpdate=H:v.next=H,Y.lastBaseUpdate=C))}if(f!==null){var Z=c.baseState;p=0,Y=H=C=null,v=f;do{var q=v.lane&-536870913,K=q!==v.lane;if(K?(Ee&q)===q:(l&q)===q){q!==0&&q===fi&&(uc=!0),Y!==null&&(Y=Y.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var le=e,he=v;q=t;var Le=n;switch(he.tag){case 1:if(le=he.payload,typeof le=="function"){Z=le.call(Le,Z,q);break e}Z=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=he.payload,q=typeof le=="function"?le.call(Le,Z,q):le,q==null)break e;Z=b({},Z,q);break e;case 2:Zn=!0}}q=v.callback,q!==null&&(e.flags|=64,K&&(e.flags|=8192),K=c.callbacks,K===null?c.callbacks=[q]:K.push(q))}else K={lane:q,tag:v.tag,payload:v.payload,callback:v.callback,next:null},Y===null?(H=Y=K,C=Z):Y=Y.next=K,p|=q;if(v=v.next,v===null){if(v=c.shared.pending,v===null)break;K=v,v=K.next,K.next=null,c.lastBaseUpdate=K,c.shared.pending=null}}while(!0);Y===null&&(C=Z),c.baseState=C,c.firstBaseUpdate=H,c.lastBaseUpdate=Y,f===null&&(c.shared.lanes=0),ta|=p,e.lanes=p,e.memoizedState=Z}}function nh(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function ah(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)nh(n[e],t)}var gi=k(null),Ll=k(0);function ih(e,t){e=Mn,ee(Ll,e),ee(gi,t),Mn=e|t.baseLanes}function dc(){ee(Ll,Mn),ee(gi,gi.current)}function fc(){Mn=Ll.current,V(gi),V(Ll)}var Tt=k(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 hc(e){ee(Qe,Qe.current),ee(Tt,e),Vt===null&&(Vt=e)}function sh(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){V(Tt),Vt===e&&(Vt=null),V(Qe)}var Qe=k(0);function Ul(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||bu(n)||xu(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,Pe=null,Bl=!1,yi=!1,Da=!1,Hl=0,Ss=0,vi=null,Ib=0;function Ge(){throw Error(r(321))}function mc(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 pc(e,t,n,l,c,f){return En=f,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?Kh:Oc,Da=!1,f=n(l,c),Da=!1,yi&&(f=rh(t,n,l,c)),lh(e),f}function lh(e){B.H=Ns;var t=Me!==null&&Me.next!==null;if(En=0,Pe=Me=xe=null,Bl=!1,Ss=0,vi=null,t)throw Error(r(300));e===null||We||(e=e.dependencies,e!==null&&Tl(e)&&(We=!0))}function rh(e,t,n,l){xe=e;var c=0;do{if(yi&&(vi=null),Ss=0,yi=!1,25<=c)throw Error(r(301));if(c+=1,Pe=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)}B.H=Yh,f=t(n,l)}while(yi);return f}function Jb(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?ws(t):t,e=e.useState()[0],(Me!==null?Me.memoizedState:null)!==e&&(xe.flags|=1024),t}function gc(){var e=Hl!==0;return Hl=0,e}function yc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function vc(e){if(Bl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Bl=!1}En=0,Pe=Me=xe=null,yi=!1,Ss=Hl=0,vi=null}function mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?xe.memoizedState=Pe=e:Pe=Pe.next=e,Pe}function Xe(){if(Me===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=Pe===null?xe.memoizedState:Pe.next;if(t!==null)Pe=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},Pe===null?xe.memoizedState=Pe=e:Pe=Pe.next=e}return Pe}function ql(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ws(e){var t=Ss;return Ss+=1,vi===null&&(vi=[]),e=Ff(vi,e,t),t=xe,(Pe===null?t.memoizedState:Pe.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?Kh:Oc),e}function $l(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ws(e);if(e.$$typeof===_)return ct(e)}throw Error(r(438,String(e)))}function bc(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(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=ql(),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 Kl(e){var t=Xe();return xc(t,Me,e)}function xc(e,t,n){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=n;var c=e.baseQueue,f=l.pending;if(f!==null){if(c!==null){var p=c.next;c.next=f.next,f.next=p}t.baseQueue=c=f,l.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var v=p=null,C=null,H=t,Y=!1;do{var Z=H.lane&-536870913;if(Z!==H.lane?(Ee&Z)===Z:(En&Z)===Z){var q=H.revertLane;if(q===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),Z===fi&&(Y=!0);else if((En&q)===q){H=H.next,q===fi&&(Y=!0);continue}else Z={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},C===null?(v=C=Z,p=f):C=C.next=Z,xe.lanes|=q,ta|=q;Z=H.action,Da&&n(f,Z),f=H.hasEagerState?H.eagerState:n(f,Z)}else q={lane:Z,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},C===null?(v=C=q,p=f):C=C.next=q,xe.lanes|=Z,ta|=Z;H=H.next}while(H!==null&&H!==t);if(C===null?p=f:C.next=v,!At(f,e.memoizedState)&&(We=!0,Y&&(n=hi,n!==null)))throw n;e.memoizedState=f,e.baseState=p,e.baseQueue=C,l.lastRenderedState=f}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Sc(e){var t=Xe(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var l=n.dispatch,c=n.pending,f=t.memoizedState;if(c!==null){n.pending=null;var p=c=c.next;do f=e(f,p.action),p=p.next;while(p!==c);At(f,t.memoizedState)||(We=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),n.lastRenderedState=f}return[f,l]}function oh(e,t,n){var l=xe,c=Xe(),f=ke;if(f){if(n===void 0)throw Error(r(407));n=n()}else n=t();var p=!At((Me||c).memoizedState,n);if(p&&(c.memoizedState=n,We=!0),c=c.queue,Nc(dh.bind(null,l,c,e),[e]),c.getSnapshot!==t||p||Pe!==null&&Pe.memoizedState.tag&1){if(l.flags|=2048,bi(9,{destroy:void 0},uh.bind(null,l,c,n,t),null),Ue===null)throw Error(r(349));f||(En&127)!==0||ch(l,t,n)}return n}function ch(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=xe.updateQueue,t===null?(t=ql(),xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function uh(e,t,n,l){t.value=n,t.getSnapshot=l,fh(t)&&hh(e)}function dh(e,t,n){return n(function(){fh(t)&&hh(e)})}function fh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!At(e,n)}catch{return!0}}function hh(e){var t=Na(e,2);t!==null&&Nt(t,e,2)}function wc(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 mh(e,t,n,l){return e.baseState=n,xc(e,Me,typeof l=="function"?l:An)}function Fb(e,t,n,l,c){if(Vl(e))throw Error(r(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){f.listeners.push(p)}};B.T!==null?n(!0):f.isTransition=!1,l(f),n=t.pending,n===null?(f.next=t.pending=f,ph(t,f)):(f.next=n.next,t.pending=n.next=f)}}function ph(e,t){var n=t.action,l=t.payload,c=e.state;if(t.isTransition){var f=B.T,p={};B.T=p;try{var v=n(c,l),C=B.S;C!==null&&C(p,v),gh(e,t,v)}catch(H){jc(e,t,H)}finally{f!==null&&p.types!==null&&(f.types=p.types),B.T=f}}else try{f=n(c,l),gh(e,t,f)}catch(H){jc(e,t,H)}}function gh(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){yh(e,t,l)},function(l){return jc(e,t,l)}):yh(e,t,n)}function yh(e,t,n){t.status="fulfilled",t.value=n,vh(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ph(e,n)))}function jc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,vh(t),t=t.next;while(t!==l)}e.action=null}function vh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function bh(e,t){return t}function xh(e,t){if(ke){var n=Ue.formState;if(n!==null){e:{var l=xe;if(ke){if(He){t:{for(var c=He,f=Gt;c.nodeType!==8;){if(!f){c=null;break t}if(c=Qt(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){He=Qt(c.nextSibling),l=c.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:bh,lastRenderedState:t},n.queue=l,n=Hh.bind(null,xe,l),l.dispatch=n,l=wc(!1),f=Tc.bind(null,xe,!1,l.queue),l=mt(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,n=Fb.bind(null,xe,c,f,n),c.dispatch=n,l.memoizedState=e,[t,n,!1]}function Sh(e){var t=Xe();return wh(t,Me,e)}function wh(e,t,n){if(t=xc(e,t,bh)[0],e=Kl(An)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ws(t)}catch(p){throw p===mi?_l:p}else l=t;t=Xe();var c=t.queue,f=c.dispatch;return n!==t.memoizedState&&(xe.flags|=2048,bi(9,{destroy:void 0},Pb.bind(null,c,n),null)),[l,f,e]}function Pb(e,t){e.action=t}function jh(e){var t=Xe(),n=Me;if(n!==null)return wh(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=ql(),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 Nh(){return Xe().memoizedState}function Yl(e,t,n,l){var c=mt();xe.flags|=e,c.memoizedState=bi(1|t,{destroy:void 0},n,l===void 0?null:l)}function Gl(e,t,n,l){var c=Xe();l=l===void 0?null:l;var f=c.memoizedState.inst;Me!==null&&l!==null&&mc(l,Me.memoizedState.deps)?c.memoizedState=bi(t,f,n,l):(xe.flags|=e,c.memoizedState=bi(1|t,f,n,l))}function Ch(e,t){Yl(8390656,8,e,t)}function Nc(e,t){Gl(2048,8,e,t)}function Wb(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=ql(),xe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Eh(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 Ah(e,t){return Gl(4,2,e,t)}function kh(e,t){return Gl(4,4,e,t)}function Th(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 Oh(e,t,n){n=n!=null?n.concat([e]):null,Gl(4,4,Th.bind(null,t,e),n)}function Cc(){}function zh(e,t){var n=Xe();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&mc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function _h(e,t){var n=Xe();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&mc(t,l[1]))return l[0];if(l=e(),Da){$n(!0);try{e()}finally{$n(!1)}}return n.memoizedState=[l,t],l}function Ec(e,t,n){return n===void 0||(En&1073741824)!==0&&(Ee&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Dm(),xe.lanes|=e,ta|=e,n)}function Dh(e,t,n,l){return At(n,t)?n:gi.current!==null?(e=Ec(e,n,l),At(e,t)||(We=!0),e):(En&42)===0||(En&1073741824)!==0&&(Ee&261930)===0?(We=!0,e.memoizedState=n):(e=Dm(),xe.lanes|=e,ta|=e,t)}function Mh(e,t,n,l,c){var f=J.p;J.p=f!==0&&8>f?f:8;var p=B.T,v={};B.T=v,Tc(e,!1,t,n);try{var C=c(),H=B.S;if(H!==null&&H(v,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var Y=Zb(C,l);js(e,t,Y,Dt(e))}else js(e,t,l,Dt(e))}catch(Z){js(e,t,{then:function(){},status:"rejected",reason:Z},Dt())}finally{J.p=f,p!==null&&v.types!==null&&(p.types=v.types),B.T=p}}function e0(){}function Ac(e,t,n,l){if(e.tag!==5)throw Error(r(476));var c=Rh(e).queue;Mh(e,c,t,ne,n===null?e0:function(){return Lh(e),n(l)})}function Rh(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 Lh(e){var t=Rh(e);t.next===null&&(t=e.alternate.memoizedState),js(e,t.next.queue,{},Dt())}function kc(){return ct(qs)}function Uh(){return Xe().memoizedState}function Bh(){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),vs(l,t,n)),t={cache:ac()},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},Vl(e)?qh(t,n):(n=Qo(e,t,n,l),n!==null&&(Nt(n,e,l),$h(n,t,l)))}function Hh(e,t,n){var l=Dt();js(e,t,n,l)}function js(e,t,n,l){var c={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vl(e))qh(t,c);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(c.hasEagerState=!0,c.eagerState=v,At(v,p))return Cl(e,t,c,0),Ue===null&&Nl(),!1}catch{}if(n=Qo(e,t,c,l),n!==null)return Nt(n,e,l),$h(n,t,l),!0}return!1}function Tc(e,t,n,l){if(l={lane:2,revertLane:ru(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Vl(e)){if(t)throw Error(r(479))}else t=Qo(e,n,l,2),t!==null&&Nt(t,e,2)}function Vl(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function qh(e,t){yi=Bl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $h(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Vd(e,n)}}var Ns={readContext:ct,use:$l,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};Ns.useEffectEvent=Ge;var Kh={readContext:ct,use:$l,useCallback:function(e,t){return mt().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:Ch,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Yl(4194308,4,Th.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yl(4194308,4,e,t)},useInsertionEffect:function(e,t){Yl(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 c=n(t);if(Da){$n(!0);try{n(t)}finally{$n(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},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=wc(e);var t=e.queue,n=Hh.bind(null,xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Cc,useDeferredValue:function(e,t){var n=mt();return Ec(n,e,t)},useTransition:function(){var e=wc(!1);return e=Mh.bind(null,xe,e.queue,!0,!1),mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=xe,c=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||ch(l,t,n)}c.memoizedState=n;var f={value:n,getSnapshot:t};return c.queue=f,Ch(dh.bind(null,l,f,e),[e]),l.flags|=2048,bi(9,{destroy:void 0},uh.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=Hl++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Ib++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:kc,useFormState:xh,useActionState:xh,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=Tc.bind(null,xe,!0,n),n.dispatch=t,[e,t]},useMemoCache:bc,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)}}},Oc={readContext:ct,use:$l,useCallback:zh,useContext:ct,useEffect:Nc,useImperativeHandle:Oh,useInsertionEffect:Ah,useLayoutEffect:kh,useMemo:_h,useReducer:Kl,useRef:Nh,useState:function(){return Kl(An)},useDebugValue:Cc,useDeferredValue:function(e,t){var n=Xe();return Dh(n,Me.memoizedState,e,t)},useTransition:function(){var e=Kl(An)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:ws(e),t]},useSyncExternalStore:oh,useId:Uh,useHostTransitionStatus:kc,useFormState:Sh,useActionState:Sh,useOptimistic:function(e,t){var n=Xe();return mh(n,Me,e,t)},useMemoCache:bc,useCacheRefresh:Bh};Oc.useEffectEvent=Eh;var Yh={readContext:ct,use:$l,useCallback:zh,useContext:ct,useEffect:Nc,useImperativeHandle:Oh,useInsertionEffect:Ah,useLayoutEffect:kh,useMemo:_h,useReducer:Sc,useRef:Nh,useState:function(){return Sc(An)},useDebugValue:Cc,useDeferredValue:function(e,t){var n=Xe();return Me===null?Ec(n,e,t):Dh(n,Me.memoizedState,e,t)},useTransition:function(){var e=Sc(An)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:ws(e),t]},useSyncExternalStore:oh,useId:Uh,useHostTransitionStatus:kc,useFormState:jh,useActionState:jh,useOptimistic:function(e,t){var n=Xe();return Me!==null?mh(n,Me,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:bc,useCacheRefresh:Bh};Yh.useEffectEvent=Eh;function zc(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 _c={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=Dt(),c=In(l);c.payload=t,n!=null&&(c.callback=n),t=Jn(e,c,l),t!==null&&(Nt(t,e,l),vs(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=Dt(),c=In(l);c.tag=1,c.payload=t,n!=null&&(c.callback=n),t=Jn(e,c,l),t!==null&&(Nt(t,e,l),vs(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),vs(t,e,n))}};function Gh(e,t,n,l,c,f,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,p):t.prototype&&t.prototype.isPureReactComponent?!us(n,l)||!us(c,f):!0}function Vh(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&&_c.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 c in e)n[c]===void 0&&(n[c]=e[c])}return n}function Qh(e){jl(e)}function Xh(e){console.error(e)}function Zh(e){jl(e)}function Ql(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Ih(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Dc(e,t,n){return n=In(n),n.tag=3,n.payload={element:null},n.callback=function(){Ql(e,t)},n}function Jh(e){return e=In(e),e.tag=3,e}function Fh(e,t,n,l){var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var f=l.value;e.payload=function(){return c(f)},e.callback=function(){Ih(t,n,l)}}var p=n.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Ih(t,n,l),typeof c!="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,c){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&di(t,n,c,!0),n=Tt.current,n!==null){switch(n.tag){case 31:case 13:return Vt===null?ir():n.alternate===null&&Ve===0&&(Ve=3),n.flags&=-257,n.flags|=65536,n.lanes=c,l===Dl?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),iu(e,l,c)),!1;case 22:return n.flags|=65536,l===Dl?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)),iu(e,l,c)),!1}throw Error(r(435,n.tag))}return iu(e,l,c),ir(),!1}if(ke)return t=Tt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Po&&(e=Error(r(422),{cause:l}),hs($t(e,n)))):(l!==Po&&(t=Error(r(423),{cause:l}),hs($t(t,n))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=$t(l,n),c=Dc(e.stateNode,l,c),cc(e,c),Ve!==4&&(Ve=2)),!1;var f=Error(r(520),{cause:l});if(f=$t(f,n),_s===null?_s=[f]:_s.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=c&-c,n.lanes|=e,e=Dc(n.stateNode,l,e),cc(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,c&=-c,n.lanes|=c,c=Jh(c),Fh(c,e,n,l),cc(n,c),!1}n=n.return}while(n!==null);return!1}var Mc=Error(r(461)),We=!1;function ut(e,t,n,l){t.child=e===null?th(t,null,n,l):_a(t,e.child,n,l)}function Ph(e,t,n,l,c){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=pc(e,t,n,p,f,c),v=gc(),e!==null&&!We?(yc(e,t,c),kn(e,t,c)):(ke&&v&&Jo(t),t.flags|=1,ut(e,t,l,c),t.child)}function Wh(e,t,n,l,c){if(e===null){var f=n.type;return typeof f=="function"&&!Xo(f)&&f.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=f,em(e,t,f,l,c)):(e=Al(n.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Kc(e,c)){var p=f.memoizedProps;if(n=n.compare,n=n!==null?n:us,n(p,l)&&e.ref===t.ref)return kn(e,t,c)}return t.flags|=1,e=wn(f,l),e.ref=t.ref,e.return=t,t.child=e}function em(e,t,n,l,c){if(e!==null){var f=e.memoizedProps;if(us(f,l)&&e.ref===t.ref)if(We=!1,t.pendingProps=l=f,Kc(e,c))(e.flags&131072)!==0&&(We=!0);else return t.lanes=e.lanes,kn(e,t,c)}return Rc(e,t,n,l,c)}function tm(e,t,n,l){var c=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,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~f}else l=0,t.child=null;return nm(e,t,f,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&zl(t,f!==null?f.cachePool:null),f!==null?ih(t,f):dc(),sh(t);else return l=t.lanes=536870912,nm(e,t,f!==null?f.baseLanes|n:n,n,l)}else f!==null?(zl(t,f.cachePool),ih(t,f),Pn(),t.memoizedState=null):(e!==null&&zl(t,null),dc(),Pn());return ut(e,t,c,n),t.child}function Cs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function nm(e,t,n,l,c){var f=sc();return f=f===null?null:{parent:Fe._currentValue,pool:f},t.memoizedState={baseLanes:n,cachePool:f},e!==null&&zl(t,null),dc(),sh(t),e!==null&&di(e,t,l,!0),t.childLanes=c,null}function Xl(e,t){return t=Il({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function am(e,t,n){return _a(t,e.child,null,n),e=Xl(t,t.pendingProps),e.flags|=2,Ot(t),t.memoizedState=null,e}function i0(e,t,n){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ke){if(l.mode==="hidden")return e=Xl(t,l),t.lanes=536870912,Cs(null,e);if(hc(t),(e=He)?(e=pp(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=qf(e),n.return=t,t.child=n,ot=t,He=null)):e=null,e===null)throw Qn(t);return t.lanes=536870912,null}return Xl(t,l)}var f=e.memoizedState;if(f!==null){var p=f.dehydrated;if(hc(t),c)if(t.flags&256)t.flags&=-257,t=am(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(We||di(e,t,n,!1),c=(n&e.childLanes)!==0,We||c){if(l=Ue,l!==null&&(p=Qd(l,n),p!==0&&p!==f.retryLane))throw f.retryLane=p,Na(e,p),Nt(l,e,p),Mc;ir(),t=am(e,t,n)}else e=f.treeContext,He=Qt(p.nextSibling),ot=t,ke=!0,Vn=null,Gt=!1,e!==null&&Yf(t,e),t=Xl(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 Zl(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 Rc(e,t,n,l,c){return ka(t),n=pc(e,t,n,l,void 0,c),l=gc(),e!==null&&!We?(yc(e,t,c),kn(e,t,c)):(ke&&l&&Jo(t),t.flags|=1,ut(e,t,n,c),t.child)}function im(e,t,n,l,c,f){return ka(t),t.updateQueue=null,n=rh(t,l,n,c),lh(e),l=gc(),e!==null&&!We?(yc(e,t,f),kn(e,t,f)):(ke&&l&&Jo(t),t.flags|=1,ut(e,t,n,f),t.child)}function sm(e,t,n,l,c){if(ka(t),t.stateNode===null){var f=ri,p=n.contextType;typeof p=="object"&&p!==null&&(f=ct(p)),f=new n(l,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=_c,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=l,f.state=t.memoizedState,f.refs={},rc(t),p=n.contextType,f.context=typeof p=="object"&&p!==null?ct(p):ri,f.state=t.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(zc(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&&_c.enqueueReplaceState(f,f.state,null),xs(t,l,f,c),bs(),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 H=f.context,Y=n.contextType;p=ri,typeof Y=="object"&&Y!==null&&(p=ct(Y));var Z=n.getDerivedStateFromProps;Y=typeof Z=="function"||typeof f.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,Y||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v||H!==p)&&Vh(t,f,l,p),Zn=!1;var q=t.memoizedState;f.state=q,xs(t,l,f,c),bs(),H=t.memoizedState,v||q!==H||Zn?(typeof Z=="function"&&(zc(t,n,Z,l),H=t.memoizedState),(C=Zn||Gh(t,n,C,l,q,H,p))?(Y||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=H),f.props=l,f.state=H,f.context=p,l=C):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{f=t.stateNode,oc(e,t),p=t.memoizedProps,Y=Ma(n,p),f.props=Y,Z=t.pendingProps,q=f.context,H=n.contextType,C=ri,typeof H=="object"&&H!==null&&(C=ct(H)),v=n.getDerivedStateFromProps,(H=typeof v=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(p!==Z||q!==C)&&Vh(t,f,l,C),Zn=!1,q=t.memoizedState,f.state=q,xs(t,l,f,c),bs();var K=t.memoizedState;p!==Z||q!==K||Zn||e!==null&&e.dependencies!==null&&Tl(e.dependencies)?(typeof v=="function"&&(zc(t,n,v,l),K=t.memoizedState),(Y=Zn||Gh(t,n,Y,l,q,K,C)||e!==null&&e.dependencies!==null&&Tl(e.dependencies))?(H||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,K,C),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,K,C)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=K),f.props=l,f.state=K,f.context=C,l=Y):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&q===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&q===e.memoizedState||(t.flags|=1024),l=!1)}return f=l,Zl(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,c),t.child=_a(t,null,n,c)):ut(e,t,n,c),t.memoizedState=f.state,e=t.child):e=kn(e,t,c),e}function lm(e,t,n,l){return Ea(),t.flags|=256,ut(e,t,n,l),t.child}var Lc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Uc(e){return{baseLanes:e,cachePool:If()}}function Bc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=_t),e}function rm(e,t,n){var l=t.pendingProps,c=!1,f=(t.flags&128)!==0,p;if((p=f)||(p=e!==null&&e.memoizedState===null?!1:(Qe.current&2)!==0),p&&(c=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(ke){if(c?Fn(t):Pn(),(e=He)?(e=pp(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=qf(e),n.return=t,t.child=n,ot=t,He=null)):e=null,e===null)throw Qn(t);return xu(e)?t.lanes=32:t.lanes=536870912,null}var v=l.children;return l=l.fallback,c?(Pn(),c=t.mode,v=Il({mode:"hidden",children:v},c),l=Ca(l,c,n,null),v.return=t,l.return=t,v.sibling=l,t.child=v,l=t.child,l.memoizedState=Uc(n),l.childLanes=Bc(e,p,n),t.memoizedState=Lc,Cs(null,l)):(Fn(t),Hc(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=qc(e,t,n)):t.memoizedState!==null?(Pn(),t.child=e.child,t.flags|=128,t=null):(Pn(),v=l.fallback,c=t.mode,l=Il({mode:"visible",children:l.children},c),v=Ca(v,c,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=Uc(n),l.childLanes=Bc(e,p,n),t.memoizedState=Lc,t=Cs(null,l));else if(Fn(t),xu(v)){if(p=v.nextSibling&&v.nextSibling.dataset,p)var H=p.dgst;p=H,l=Error(r(419)),l.stack="",l.digest=p,hs({value:l,source:null,stack:null}),t=qc(e,t,n)}else if(We||di(e,t,n,!1),p=(n&e.childLanes)!==0,We||p){if(p=Ue,p!==null&&(l=Qd(p,n),l!==0&&l!==C.retryLane))throw C.retryLane=l,Na(e,l),Nt(p,e,l),Mc;bu(v)||ir(),t=qc(e,t,n)}else bu(v)?(t.flags|=192,t.child=e.child,t=null):(e=C.treeContext,He=Qt(v.nextSibling),ot=t,ke=!0,Vn=null,Gt=!1,e!==null&&Yf(t,e),t=Hc(t,l.children),t.flags|=4096);return t}return c?(Pn(),v=l.fallback,c=t.mode,C=e.child,H=C.sibling,l=wn(C,{mode:"hidden",children:l.children}),l.subtreeFlags=C.subtreeFlags&65011712,H!==null?v=wn(H,v):(v=Ca(v,c,n,null),v.flags|=2),v.return=t,l.return=t,l.sibling=v,t.child=l,Cs(null,l),l=t.child,v=e.child.memoizedState,v===null?v=Uc(n):(c=v.cachePool,c!==null?(C=Fe._currentValue,c=c.parent!==C?{parent:C,pool:C}:c):c=If(),v={baseLanes:v.baseLanes|n,cachePool:c}),l.memoizedState=v,l.childLanes=Bc(e,p,n),t.memoizedState=Lc,Cs(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 Hc(e,t){return t=Il({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Il(e,t){return e=kt(22,e,null,t),e.lanes=0,e}function qc(e,t,n){return _a(t,e.child,null,n),e=Hc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function om(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),tc(e.return,t,n)}function $c(e,t,n,l,c,f){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:c,treeForkCount:f}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=l,p.tail=n,p.tailMode=c,p.treeForkCount=f)}function cm(e,t,n){var l=t.pendingProps,c=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?fs:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&om(e,n,t);else if(e.tag===19)om(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(c){case"forwards":for(n=t.child,c=null;n!==null;)e=n.alternate,e!==null&&Ul(e)===null&&(c=n),n=n.sibling;n=c,n===null?(c=t.child,t.child=null):(c=n.sibling,n.sibling=null),$c(t,!1,c,n,f,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Ul(e)===null){t.child=c;break}e=c.sibling,c.sibling=n,n=c,c=e}$c(t,!0,n,null,f,l);break;case"together":$c(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 Kc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Tl(e)))}function s0(e,t,n){switch(t.tag){case 3:$e(t,t.stateNode.containerInfo),Xn(t,Fe,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,hc(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?rm(e,t,n):(Fn(t),e=kn(e,t,n),e!==null?e.sibling:null);Fn(t);break;case 19:var c=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(di(e,t,n,!1),l=(n&t.childLanes)!==0),c){if(l)return cm(e,t,n);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),ee(Qe,Qe.current),l)break;return null;case 22:return t.lanes=0,tm(e,t,n,t.pendingProps);case 24:Xn(t,Fe,e.memoizedState.cache)}return kn(e,t,n)}function um(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)We=!0;else{if(!Kc(e,n)&&(t.flags&128)===0)return We=!1,s0(e,t,n);We=(e.flags&131072)!==0}else We=!1,ke&&(t.flags&1048576)!==0&&Kf(t,fs,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")Xo(e)?(l=Ma(e,l),t.tag=1,t=sm(null,t,e,l,n)):(t.tag=0,t=Rc(null,t,e,l,n));else{if(e!=null){var c=e.$$typeof;if(c===M){t.tag=11,t=Ph(null,t,e,l,n);break e}else if(c===X){t.tag=14,t=Wh(null,t,e,l,n);break e}}throw t=ye(e)||e,Error(r(306,t,""))}}return t;case 0:return Rc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,c=Ma(l,t.pendingProps),sm(e,t,l,c,n);case 3:e:{if($e(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var f=t.memoizedState;c=f.element,oc(e,t),xs(t,l,null,n);var p=t.memoizedState;if(l=p.cache,Xn(t,Fe,l),l!==f.cache&&nc(t,[Fe],n,!0),bs(),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=lm(e,t,l,n);break e}else if(l!==c){c=$t(Error(r(424)),t),hs(c),t=lm(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),ot=t,ke=!0,Vn=null,Gt=!0,n=th(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ea(),l===c){t=kn(e,t,n);break e}ut(e,t,l,n)}t=t.child}return t;case 26:return Zl(e,t),e===null?(n=Sp(t.type,null,t.pendingProps,null))?t.memoizedState=n:ke||(n=t.type,e=t.pendingProps,l=dr(ie.current).createElement(n),l[rt]=t,l[vt]=e,dt(l,n,e),it(l),t.stateNode=l):t.memoizedState=Sp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Pt(t),e===null&&ke&&(l=t.stateNode=vp(t.type,t.pendingProps,ie.current),ot=t,Gt=!0,c=He,la(t.type)?(Su=c,He=Qt(l.firstChild)):He=c),ut(e,t,t.pendingProps.children,n),Zl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ke&&((c=l=He)&&(l=R0(l,t.type,t.pendingProps,Gt),l!==null?(t.stateNode=l,ot=t,He=Qt(l.firstChild),Gt=!1,c=!0):c=!1),c||Qn(t)),Pt(t),c=t.type,f=t.pendingProps,p=e!==null?e.memoizedProps:null,l=f.children,gu(c,f)?l=null:p!==null&&gu(c,p)&&(t.flags|=32),t.memoizedState!==null&&(c=pc(e,t,Jb,null,null,n),qs._currentValue=c),Zl(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,ot=t,He=null,e=!0):e=!1),e||Qn(t)),null;case 13:return rm(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 Ph(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 c=t.type._context,l=t.pendingProps.children,ka(t),c=ct(c),l=l(c),t.flags|=1,ut(e,t,l,n),t.child;case 14:return Wh(e,t,t.type,t.pendingProps,n);case 15:return em(e,t,t.type,t.pendingProps,n);case 19:return cm(e,t,n);case 31:return i0(e,t,n);case 22:return tm(e,t,n,t.pendingProps);case 24:return ka(t),l=ct(Fe),e===null?(c=sc(),c===null&&(c=Ue,f=ac(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=n),c=f),t.memoizedState={parent:l,cache:c},rc(t),Xn(t,Fe,c)):((e.lanes&n)!==0&&(oc(e,t),xs(t,null,null,n),bs()),c=e.memoizedState,f=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Xn(t,Fe,l)):(l=f.cache,Xn(t,Fe,l),l!==c.cache&&nc(t,[Fe],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 Yc(e,t,n,l,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Um())e.flags|=8192;else throw za=Dl,lc}else e.flags&=-16777217}function dm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ep(t))if(Um())e.flags|=8192;else throw za=Dl,lc}function Jl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Yd():536870912,e.lanes|=t,ji|=t)}function Es(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 c=e.child;c!==null;)n|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)n|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function l0(e,t,n){var l=t.pendingProps;switch(Fo(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(Fe),ge(),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,Wo())),qe(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(Tn(t),f!==null?(qe(t),dm(t,f)):(qe(t),Yc(t,c,null,l,n))):f?f!==e.memoizedState?(Tn(t),qe(t),dm(t,f)):(qe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Tn(t),qe(t),Yc(t,c,e,l,n)),null;case 27:if(Rt(t),n=ie.current,c=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=R.current,ui(t)?Gf(t):(e=vp(c,l,n),t.stateNode=e,Tn(t))}return qe(t),null;case 5:if(Rt(t),c=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=R.current,ui(t))Gf(t);else{var p=dr(ie.current);switch(f){case 1:f=p.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=p.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);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(c,{is:l.is}):p.createElement(c)}}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,c,l),c){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),Yc(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,c=ot,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[rt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||rp(e.nodeValue,n)),e||Qn(t,!0)}else e=dr(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=Wo(),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(c=ui(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[rt]=t}else Ea(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),c=!1}else c=Wo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)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,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==c&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Jl(t,t.updateQueue),qe(t),null);case 4:return ge(),e===null&&du(t.stateNode.containerInfo),qe(t),null;case 10:return Cn(t.type),qe(t),null;case 19:if(V(Qe),l=t.memoizedState,l===null)return qe(t),null;if(c=(t.flags&128)!==0,f=l.rendering,f===null)if(c)Es(l,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Ul(e),f!==null){for(t.flags|=128,Es(l,!1),e=f.updateQueue,t.updateQueue=e,Jl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Hf(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()>tr&&(t.flags|=128,c=!0,Es(l,!1),t.lanes=4194304)}else{if(!c)if(e=Ul(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Jl(t,e),Es(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!ke)return qe(t),null}else 2*ht()-l.renderingStartTime>tr&&n!==536870912&&(t.flags|=128,c=!0,Es(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,c?n&1|2:n&1),ke&&jn(t,l.treeForkCount),e):(qe(t),null);case 22:case 23:return Ot(t),fc(),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&&Jl(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&&V(Ta),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Cn(Fe),qe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function r0(e,t){switch(Fo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Cn(Fe),ge(),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 V(Qe),null;case 4:return ge(),null;case 10:return Cn(t.type),null;case 22:case 23:return Ot(t),fc(),e!==null&&V(Ta),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Cn(Fe),null;case 25:return null;default:return null}}function fm(e,t){switch(Fo(t),t.tag){case 3:Cn(Fe),ge();break;case 26:case 27:case 5:Rt(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&Ot(t);break;case 13:Ot(t);break;case 19:V(Qe);break;case 10:Cn(t.type);break;case 22:case 23:Ot(t),fc(),e!==null&&V(Ta);break;case 24:Cn(Fe)}}function As(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var c=l.next;n=c;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!==c)}}catch(v){De(t,t.return,v)}}function Wn(e,t,n){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var f=c.next;l=f;do{if((l.tag&e)===e){var p=l.inst,v=p.destroy;if(v!==void 0){p.destroy=void 0,c=t;var C=n,H=v;try{H()}catch(Y){De(c,C,Y)}}}l=l.next}while(l!==f)}}catch(Y){De(t,t.return,Y)}}function hm(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ah(t,n)}catch(l){De(e,e.return,l)}}}function mm(e,t,n){n.props=Ma(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){De(e,t,l)}}function ks(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(c){De(e,t,c)}}function fn(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(c){De(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(c){De(e,t,c)}else n.current=null}function pm(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(c){De(e,e.return,c)}}function Gc(e,t,n){try{var l=e.stateNode;T0(l,e.type,n,t),l[vt]=t}catch(c){De(e,e.return,c)}}function gm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&la(e.type)||e.tag===4}function Vc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gm(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 Qc(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(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function Fl(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(Fl(e,t,n),e=e.sibling;e!==null;)Fl(e,t,n),e=e.sibling}function ym(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);dt(t,l,n),t[rt]=e,t[vt]=n}catch(f){De(e,e.return,f)}}var On=!1,et=!1,Xc=!1,vm=typeof WeakSet=="function"?WeakSet:Set,st=null;function o0(e,t){if(e=e.containerInfo,mu=vr,e=Of(e),qo(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 c=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,H=0,Y=0,Z=e,q=null;t:for(;;){for(var K;Z!==n||c!==0&&Z.nodeType!==3||(v=p+c),Z!==f||l!==0&&Z.nodeType!==3||(C=p+l),Z.nodeType===3&&(p+=Z.nodeValue.length),(K=Z.firstChild)!==null;)q=Z,Z=K;for(;;){if(Z===e)break t;if(q===n&&++H===c&&(v=p),q===f&&++Y===l&&(C=p),(K=Z.nextSibling)!==null)break;Z=q,q=Z.parentNode}Z=K}n=v===-1||C===-1?null:{start:v,end:C}}else n=null}n=n||{start:0,end:0}}else n=null;for(pu={focusedElem:e,selectionRange:n},vr=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){switch(t=st,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++)c=e[n],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,n=t,c=f.memoizedProps,f=f.memoizedState,l=n.stateNode;try{var le=Ma(n.type,c);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)vu(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":vu(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,st=e;break}st=t.return}}function bm(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:_n(e,n),l&4&&As(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 c=Ma(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){De(n,n.return,p)}}l&64&&hm(n),l&512&&ks(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{ah(e,t)}catch(p){De(n,n.return,p)}}break;case 27:t===null&&l&4&&ym(n);case 26:case 5:_n(e,n),t===null&&l&4&&pm(n),l&512&&ks(n,n.return);break;case 12:_n(e,n);break;case 31:_n(e,n),l&4&&wm(e,n);break;case 13:_n(e,n),l&4&&jm(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||et,c=On;var f=et;On=l,(et=t)&&!f?Dn(e,n,(n.subtreeFlags&8772)!==0):_n(e,n),On=c,et=f}break;case 30:break;default:_n(e,n)}}function xm(e){var t=e.alternate;t!==null&&(e.alternate=null,xm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&jo(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 Ke=null,xt=!1;function zn(e,t,n){for(n=n.child;n!==null;)Sm(e,t,n),n=n.sibling}function Sm(e,t,n){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(Pi,n)}catch{}switch(n.tag){case 26:et||fn(n,t),zn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:et||fn(n,t);var l=Ke,c=xt;la(n.type)&&(Ke=n.stateNode,xt=!1),zn(e,t,n),Us(n.stateNode),Ke=l,xt=c;break;case 5:et||fn(n,t);case 6:if(l=Ke,c=xt,Ke=null,zn(e,t,n),Ke=l,xt=c,Ke!==null)if(xt)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(n.stateNode)}catch(f){De(n,t,f)}else try{Ke.removeChild(n.stateNode)}catch(f){De(n,t,f)}break;case 18:Ke!==null&&(xt?(e=Ke,hp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),zi(e)):hp(Ke,n.stateNode));break;case 4:l=Ke,c=xt,Ke=n.stateNode.containerInfo,xt=!0,zn(e,t,n),Ke=l,xt=c;break;case 0:case 11:case 14:case 15:Wn(2,n,t),et||Wn(4,n,t),zn(e,t,n);break;case 1:et||(fn(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&mm(n,t,l)),zn(e,t,n);break;case 21:zn(e,t,n);break;case 22:et=(l=et)||n.memoizedState!==null,zn(e,t,n),et=l;break;default:zn(e,t,n)}}function wm(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 jm(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 c0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new vm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new vm),t;default:throw Error(r(435,e.tag))}}function Pl(e,t){var n=c0(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var c=v0.bind(null,e,l);l.then(c,c)}})}function St(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var c=n[l],f=e,p=t,v=p;e:for(;v!==null;){switch(v.tag){case 27:if(la(v.type)){Ke=v.stateNode,xt=!1;break e}break;case 5:Ke=v.stateNode,xt=!1;break e;case 3:case 4:Ke=v.stateNode.containerInfo,xt=!0;break e}v=v.return}if(Ke===null)throw Error(r(160));Sm(f,p,c),Ke=null,xt=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Nm(t,e),t=t.sibling}var nn=null;function Nm(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),As(3,e),Wn(5,e,e.return));break;case 1:St(t,e),wt(e),l&512&&(et||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 c=nn;if(St(t,e),wt(e),l&512&&(et||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,c=c.ownerDocument||c;t:switch(l){case"title":f=c.getElementsByTagName("title")[0],(!f||f[ts]||f[rt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(l),c.head.insertBefore(f,c.querySelector("head > title"))),dt(f,l,n),f[rt]=e,it(f),l=f;break e;case"link":var p=Np("link","href",c).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=c.createElement(l),dt(f,l,n),c.head.appendChild(f);break;case"meta":if(p=Np("meta","content",c).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=c.createElement(l),dt(f,l,n),c.head.appendChild(f);break;default:throw Error(r(468,l))}f[rt]=e,it(f),l=f}e.stateNode=l}else Cp(c,e.type,e.stateNode);else e.stateNode=jp(c,l,e.memoizedProps);else f!==l?(f===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):f.count--,l===null?Cp(c,e.type,e.stateNode):jp(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Gc(e,e.memoizedProps,n.memoizedProps)}break;case 27:St(t,e),wt(e),l&512&&(et||n===null||fn(n,n.return)),n!==null&&l&4&&Gc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(St(t,e),wt(e),l&512&&(et||n===null||fn(n,n.return)),e.flags&32){c=e.stateNode;try{ei(c,"")}catch(le){De(e,e.return,le)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,Gc(e,c,n!==null?n.memoizedProps:c)),l&1024&&(Xc=!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(mr=null,c=nn,nn=fr(t.containerInfo),St(t,e),nn=c,wt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{zi(t.containerInfo)}catch(le){De(e,e.return,le)}Xc&&(Xc=!1,Cm(e));break;case 4:l=nn,nn=fr(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,Pl(e,l)));break;case 13:St(t,e),wt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(er=ht()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Pl(e,l)));break;case 22:c=e.memoizedState!==null;var C=n!==null&&n.memoizedState!==null,H=On,Y=et;if(On=H||c,et=Y||C,St(t,e),et=Y,On=H,wt(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(n===null||C||On||et||Ra(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){C=n=t;try{if(f=C.stateNode,c)p=f.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{v=C.stateNode;var Z=C.memoizedProps.style,q=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;v.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(le){De(C,C.return,le)}}}else if(t.tag===6){if(n===null){C=t;try{C.stateNode.nodeValue=c?"":C.memoizedProps}catch(le){De(C,C.return,le)}}}else if(t.tag===18){if(n===null){C=t;try{var K=C.stateNode;c?mp(K,!0):mp(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,Pl(e,n))));break;case 19:St(t,e),wt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Pl(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(gm(l)){n=l;break}l=l.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var c=n.stateNode,f=Vc(e);Fl(e,f,c);break;case 5:var p=n.stateNode;n.flags&32&&(ei(p,""),n.flags&=-33);var v=Vc(e);Fl(e,v,p);break;case 3:case 4:var C=n.stateNode.containerInfo,H=Vc(e);Qc(e,H,C);break;default:throw Error(r(161))}}catch(Y){De(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Cm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Cm(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;)bm(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"&&mm(t,t.return,n),Ra(t);break;case 27:Us(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,c=e,f=t,p=f.flags;switch(f.tag){case 0:case 11:case 15:Dn(c,f,n),As(4,f);break;case 1:if(Dn(c,f,n),l=f,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(H){De(l,l.return,H)}if(l=f,c=l.updateQueue,c!==null){var v=l.stateNode;try{var C=c.shared.hiddenCallbacks;if(C!==null)for(c.shared.hiddenCallbacks=null,c=0;c<C.length;c++)nh(C[c],v)}catch(H){De(l,l.return,H)}}n&&p&64&&hm(f),ks(f,f.return);break;case 27:ym(f);case 26:case 5:Dn(c,f,n),n&&l===null&&p&4&&pm(f),ks(f,f.return);break;case 12:Dn(c,f,n);break;case 31:Dn(c,f,n),n&&p&4&&wm(c,f);break;case 13:Dn(c,f,n),n&&p&4&&jm(c,f);break;case 22:f.memoizedState===null&&Dn(c,f,n),ks(f,f.return);break;case 30:break;default:Dn(c,f,n)}t=t.sibling}}function Zc(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&&ms(n))}function Ic(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ms(e))}function an(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Em(e,t,n,l),t=t.sibling}function Em(e,t,n,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:an(e,t,n,l),c&2048&&As(9,t);break;case 1:an(e,t,n,l);break;case 3:an(e,t,n,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ms(e)));break;case 12:if(c&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):Ts(e,t):f._visibility&2?an(e,t,n,l):(f._visibility|=2,xi(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Zc(p,t);break;case 24:an(e,t,n,l),c&2048&&Ic(t.alternate,t);break;default:an(e,t,n,l)}}function xi(e,t,n,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,p=t,v=n,C=l,H=p.flags;switch(p.tag){case 0:case 11:case 15:xi(f,p,v,C,c),As(8,p);break;case 23:break;case 22:var Y=p.stateNode;p.memoizedState!==null?Y._visibility&2?xi(f,p,v,C,c):Ts(f,p):(Y._visibility|=2,xi(f,p,v,C,c)),c&&H&2048&&Zc(p.alternate,p);break;case 24:xi(f,p,v,C,c),c&&H&2048&&Ic(p.alternate,p);break;default:xi(f,p,v,C,c)}t=t.sibling}}function Ts(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,c=l.flags;switch(l.tag){case 22:Ts(n,l),c&2048&&Zc(l.alternate,l);break;case 24:Ts(n,l),c&2048&&Ic(l.alternate,l);break;default:Ts(n,l)}t=t.sibling}}var Os=8192;function Si(e,t,n){if(e.subtreeFlags&Os)for(e=e.child;e!==null;)Am(e,t,n),e=e.sibling}function Am(e,t,n){switch(e.tag){case 26:Si(e,t,n),e.flags&Os&&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=fr(e.stateNode.containerInfo),Si(e,t,n),nn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Os,Os=16777216,Si(e,t,n),Os=l):Si(e,t,n));break;default:Si(e,t,n)}}function km(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 zs(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];st=l,Om(l,e)}km(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Tm(e),e=e.sibling}function Tm(e){switch(e.tag){case 0:case 11:case 15:zs(e),e.flags&2048&&Wn(9,e,e.return);break;case 3:zs(e);break;case 12:zs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wl(e)):zs(e);break;default:zs(e)}}function Wl(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];st=l,Om(l,e)}km(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wn(8,t,t.return),Wl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Wl(t));break;default:Wl(t)}e=e.sibling}}function Om(e,t){for(;st!==null;){var n=st;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:ms(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,st=l;else e:for(n=e;st!==null;){l=st;var c=l.sibling,f=l.return;if(xm(l),l===n){st=null;break e}if(c!==null){c.return=f,st=c;break e}st=f}}}var u0={getCacheForType:function(e){var t=ct(Fe),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ct(Fe).controller.signal}},d0=typeof WeakMap=="function"?WeakMap:Map,ze=0,Ue=null,Ne=null,Ee=0,_e=0,zt=null,ea=!1,wi=!1,Jc=!1,Mn=0,Ve=0,ta=0,La=0,Fc=0,_t=0,ji=0,_s=null,jt=null,Pc=!1,er=0,zm=0,tr=1/0,nr=null,na=null,nt=0,aa=null,Ni=null,Rn=0,Wc=0,eu=null,_m=null,Ds=0,tu=null;function Dt(){return(ze&2)!==0&&Ee!==0?Ee&-Ee:B.T!==null?ru():Xd()}function Dm(){if(_t===0)if((Ee&536870912)===0||ke){var e=ul;ul<<=1,(ul&3932160)===0&&(ul=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)),es(e,n),((ze&2)===0||e!==Ue)&&(e===Ue&&((ze&2)===0&&(La|=n),Ve===4&&ia(e,Ee,_t,!1)),hn(e))}function Mm(e,t,n){if((ze&6)!==0)throw Error(r(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Wi(e,t),c=l?m0(e,t):au(e,t,!0),f=l;do{if(c===0){wi&&!l&&ia(e,t,0,!1);break}else{if(n=e.current.alternate,f&&!f0(n)){c=au(e,t,!1),f=!1;continue}if(c===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;c=_s;var C=v.current.memoizedState.isDehydrated;if(C&&(Ci(v,p).flags|=256),p=au(v,p,!1),p!==2){if(Jc&&!C){v.errorRecoveryDisabledLanes|=f,La|=f,c=4;break e}f=jt,jt=c,f!==null&&(jt===null?jt=f:jt.push.apply(jt,f))}c=p}if(f=!1,c!==2)continue}}if(c===1){Ci(e,0),ia(e,t,0,!0);break}e:{switch(l=e,f=c,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&&(c=er+300-ht(),10<c)){if(ia(l,t,_t,!ea),fl(l,0,!0)!==0)break e;Rn=t,l.timeoutHandle=dp(Rm.bind(null,l,n,jt,nr,Pc,t,_t,La,ji,ea,f,"Throttled",-0,0),c);break e}Rm(l,n,jt,nr,Pc,t,_t,La,ji,ea,f,null,-0,0)}}break}while(!0);hn(e)}function Rm(e,t,n,l,c,f,p,v,C,H,Y,Z,q,K){if(e.timeoutHandle=-1,Z=t.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xn},Am(t,f,Z);var le=(f&62914560)===f?er-ht():(f&4194048)===f?zm-ht():0;if(le=J0(Z,le),le!==null){Rn=f,e.cancelPendingCommit=le(Ym.bind(null,e,t,f,n,l,c,p,v,C,Y,Z,null,q,K)),ia(e,f,p,!H);return}}Ym(e,t,f,n,l,c,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 c=n[l],f=c.getSnapshot;c=c.value;try{if(!At(f(),c))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&=~Fc,t&=~La,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var f=31-Et(c),p=1<<f;l[f]=-1,c&=~p}n!==0&&Gd(e,n,t)}function ar(){return(ze&6)===0?(Ms(0),!1):!0}function nu(){if(Ne!==null){if(_e===0)var e=Ne.return;else e=Ne,Nn=Aa=null,vc(e),pi=null,gs=0,e=Ne;for(;e!==null;)fm(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,nu(),Ue=e,Ne=n=wn(e.current,null),Ee=t,_e=0,zt=null,ea=!1,wi=Wi(e,t),Jc=!1,ji=_t=Fc=La=ta=Ve=0,jt=_s=null,Pc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-Et(l),f=1<<c;t|=e[c],l&=~f}return Mn=t,Nl(),n}function Lm(e,t){xe=null,B.H=Ns,t===mi||t===_l?(t=Pf(),_e=3):t===lc?(t=Pf(),_e=4):_e=t===Mc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,zt=t,Ne===null&&(Ve=1,Ql(e,$t(t,e.current)))}function Um(){var e=Tt.current;return e===null?!0:(Ee&4194048)===Ee?Vt===null:(Ee&62914560)===Ee||(Ee&536870912)!==0?e===Vt:!1}function Bm(){var e=B.H;return B.H=Ns,e===null?Ns:e}function Hm(){var e=B.A;return B.A=u0,e}function ir(){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 au(e,t,n){var l=ze;ze|=2;var c=Bm(),f=Hm();(Ue!==e||Ee!==t)&&(nr=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:nu(),p=6;break e;case 3:case 2:case 9:case 6:Tt.current===null&&(t=!0);var H=_e;if(_e=0,zt=null,Ei(e,v,C,H),n&&wi){p=0;break e}break;default:H=_e,_e=0,zt=null,Ei(e,v,C,H)}}h0(),p=Ve;break}catch(Y){Lm(e,Y)}while(!0);return t&&e.shellSuspendCounter++,Nn=Aa=null,ze=l,B.H=c,B.A=f,Ne===null&&(Ue=null,Ee=0,Nl()),p}function h0(){for(;Ne!==null;)qm(Ne)}function m0(e,t){var n=ze;ze|=2;var l=Bm(),c=Hm();Ue!==e||Ee!==t?(nr=null,tr=ht()+500,Ci(e,t)):wi=Wi(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(Jf(f)){_e=0,zt=null,$m(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:Jf(f)?(_e=0,zt=null,$m(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?Ep(p):v.stateNode.complete){_e=0,zt=null;var C=v.sibling;if(C!==null)Ne=C;else{var H=v.return;H!==null?(Ne=H,sr(H)):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:nu(),Ve=6;break e;default:throw Error(r(462))}}p0();break}catch(Y){Lm(e,Y)}while(!0);return Nn=Aa=null,B.H=l,B.A=c,ze=n,Ne!==null?0:(Ue=null,Ee=0,Nl(),Ve)}function p0(){for(;Ne!==null&&!po();)qm(Ne)}function qm(e){var t=um(e.alternate,e,Mn);e.memoizedProps=e.pendingProps,t===null?sr(e):Ne=t}function $m(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=im(n,t,t.pendingProps,t.type,void 0,Ee);break;case 11:t=im(n,t,t.pendingProps,t.type.render,t.ref,Ee);break;case 5:vc(t);default:fm(n,t),t=Ne=Hf(t,Mn),t=um(n,t,Mn)}e.memoizedProps=e.pendingProps,t===null?sr(e):Ne=t}function Ei(e,t,n,l){Nn=Aa=null,vc(t),pi=null,gs=0;var c=t.return;try{if(a0(e,c,t,n,Ee)){Ve=1,Ql(e,$t(n,e.current)),Ne=null;return}}catch(f){if(c!==null)throw Ne=c,f;Ve=1,Ql(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))),Km(t,e)):sr(t)}function sr(e){var t=e;do{if((t.flags&32768)!==0){Km(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 Km(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 Ym(e,t,n,l,c,f,p,v,C){e.cancelPendingCommit=null;do lr();while(nt!==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|=Vo,Zv(e,n,f,p,v,C),e===Ue&&(Ne=Ue=null,Ee=0),Ni=t,aa=e,Rn=n,Wc=f,eu=c,_m=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,b0(Ut,function(){return Zm(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=B.T,B.T=null,c=J.p,J.p=2,p=ze,ze|=4;try{o0(e,t,n)}finally{ze=p,J.p=c,B.T=l}}nt=1,Gm(),Vm(),Qm()}}function Gm(){if(nt===1){nt=0;var e=aa,t=Ni,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=B.T,B.T=null;var l=J.p;J.p=2;var c=ze;ze|=4;try{Nm(t,e);var f=pu,p=Of(e.containerInfo),v=f.focusedElem,C=f.selectionRange;if(p!==v&&v&&v.ownerDocument&&Tf(v.ownerDocument.documentElement,v)){if(C!==null&&qo(v)){var H=C.start,Y=C.end;if(Y===void 0&&(Y=H),"selectionStart"in v)v.selectionStart=H,v.selectionEnd=Math.min(Y,v.value.length);else{var Z=v.ownerDocument||document,q=Z&&Z.defaultView||window;if(q.getSelection){var K=q.getSelection(),le=v.textContent.length,he=Math.min(C.start,le),Le=C.end===void 0?he:Math.min(C.end,le);!K.extend&&he>Le&&(p=Le,Le=he,he=p);var z=kf(v,he),T=kf(v,Le);if(z&&T&&(K.rangeCount!==1||K.anchorNode!==z.node||K.anchorOffset!==z.offset||K.focusNode!==T.node||K.focusOffset!==T.offset)){var U=Z.createRange();U.setStart(z.node,z.offset),K.removeAllRanges(),he>Le?(K.addRange(U),K.extend(T.node,T.offset)):(U.setEnd(T.node,T.offset),K.addRange(U))}}}}for(Z=[],K=v;K=K.parentNode;)K.nodeType===1&&Z.push({element:K,left:K.scrollLeft,top:K.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<Z.length;v++){var Q=Z[v];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}vr=!!mu,pu=mu=null}finally{ze=c,J.p=l,B.T=n}}e.current=t,nt=2}}function Vm(){if(nt===2){nt=0;var e=aa,t=Ni,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=B.T,B.T=null;var l=J.p;J.p=2;var c=ze;ze|=4;try{bm(e,t.alternate,t)}finally{ze=c,J.p=l,B.T=n}}nt=3}}function Qm(){if(nt===4||nt===3){nt=0,go();var e=aa,t=Ni,n=Rn,l=_m;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?nt=5:(nt=0,Ni=aa=null,Xm(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(na=null),So(n),t=t.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(Pi,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=B.T,c=J.p,J.p=2,B.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{B.T=t,J.p=c}}(Rn&3)!==0&&lr(),hn(e),c=e.pendingLanes,(n&261930)!==0&&(c&42)!==0?e===tu?Ds++:(Ds=0,tu=e):Ds=0,Ms(0)}}function Xm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ms(t)))}function lr(){return Gm(),Vm(),Qm(),Zm()}function Zm(){if(nt!==5)return!1;var e=aa,t=Wc;Wc=0;var n=So(Rn),l=B.T,c=J.p;try{J.p=32>n?32:n,B.T=null,n=eu,eu=null;var f=aa,p=Rn;if(nt=0,Ni=aa=null,Rn=0,(ze&6)!==0)throw Error(r(331));var v=ze;if(ze|=4,Tm(f.current),Em(f,f.current,p,n),ze=v,Ms(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(Pi,f)}catch{}return!0}finally{J.p=c,B.T=l,Xm(e,t)}}function Im(e,t,n){t=$t(n,t),t=Dc(e.stateNode,t,2),e=Jn(e,t,2),e!==null&&(es(e,2),hn(e))}function De(e,t,n){if(e.tag===3)Im(e,e,n);else for(;t!==null;){if(t.tag===3){Im(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=Jh(2),l=Jn(t,n,2),l!==null&&(Fh(n,l,t,e),es(l,2),hn(l));break}}t=t.return}}function iu(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new d0;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(n)||(Jc=!0,c.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()-er?(ze&2)===0&&Ci(e,0):Fc|=n,ji===Ee&&(ji=0)),hn(e)}function Jm(e,t){t===0&&(t=Yd()),e=Na(e,t),e!==null&&(es(e,t),hn(e))}function y0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Jm(e,n)}function v0(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(n=c.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),Jm(e,n)}function b0(e,t){return Lt(e,t)}var rr=null,Ai=null,su=!1,or=!1,lu=!1,sa=0;function hn(e){e!==Ai&&e.next===null&&(Ai===null?rr=Ai=e:Ai=Ai.next=e),or=!0,su||(su=!0,S0())}function Ms(e,t){if(!lu&&or){lu=!0;do for(var n=!1,l=rr;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var f=0;else{var p=l.suspendedLanes,v=l.pingedLanes;f=(1<<31-Et(42|e)+1)-1,f&=c&~(p&~v),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(n=!0,ep(l,f))}else f=Ee,f=fl(l,l===Ue?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||Wi(l,f)||(n=!0,ep(l,f));l=l.next}while(n);lu=!1}}function x0(){Fm()}function Fm(){or=su=!1;var e=0;sa!==0&&z0()&&(e=sa);for(var t=ht(),n=null,l=rr;l!==null;){var c=l.next,f=Pm(l,t);f===0?(l.next=null,n===null?rr=c:n.next=c,c===null&&(Ai=n)):(n=l,(e!==0||(f&3)!==0)&&(or=!0)),l=c}nt!==0&&nt!==5||Ms(e),sa!==0&&(sa=0)}function Pm(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var p=31-Et(f),v=1<<p,C=c[p];C===-1?((v&n)===0||(v&l)!==0)&&(c[p]=Xv(v,t)):C<=t&&(e.expiredLanes|=v),f&=~v}if(t=Ue,n=Ee,n=fl(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||Wi(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&yn(l),So(n)){case 2:case 8:n=ol;break;case 32:n=Ut;break;case 268435456:n=ae;break;default:n=Ut}return l=Wm.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 Wm(e,t){if(nt!==0&&nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(lr()&&e.callbackNode!==n)return null;var l=Ee;return l=fl(e,e===Ue?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Mm(e,l,t),Pm(e,ht()),e.callbackNode!=null&&e.callbackNode===n?Wm.bind(null,e):null)}function ep(e,t){if(lr())return null;Mm(e,t,!0)}function S0(){D0(function(){(ze&6)!==0?Lt(rl,x0):Fm()})}function ru(){if(sa===0){var e=fi;e===0&&(e=cl,cl<<=1,(cl&261888)===0&&(cl=256)),sa=e}return sa}function tp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:gl(""+e)}function np(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,c){if(t==="submit"&&n&&n.stateNode===c){var f=tp((c[vt]||null).action),p=l.submitter;p&&(t=(t=p[vt]||null)?tp(t.formAction):p.getAttribute("formAction"),t!==null&&(f=t,p=null));var v=new xl("action","action",null,l,c);e.push({event:v,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(sa!==0){var C=p?np(c,p):new FormData(c);Ac(n,{pending:!0,data:C,method:c.method,action:f},null,C)}}else typeof f=="function"&&(v.preventDefault(),C=p?np(c,p):new FormData(c),Ac(n,{pending:!0,data:C,method:c.method,action:f},f,C))},currentTarget:c}]})}}for(var ou=0;ou<Go.length;ou++){var cu=Go[ou],j0=cu.toLowerCase(),N0=cu[0].toUpperCase()+cu.slice(1);tn(j0,"on"+N0)}tn(Df,"onAnimationEnd"),tn(Mf,"onAnimationIteration"),tn(Rf,"onAnimationStart"),tn("dblclick","onDoubleClick"),tn("focusin","onFocus"),tn("focusout","onBlur"),tn(qb,"onTransitionRun"),tn($b,"onTransitionStart"),tn(Kb,"onTransitionCancel"),tn(Lf,"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 Rs="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(Rs));function ap(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],c=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,H=v.currentTarget;if(v=v.listener,C!==f&&c.isPropagationStopped())break e;f=v,c.currentTarget=H;try{f(c)}catch(Y){jl(Y)}c.currentTarget=null,f=C}else for(p=0;p<l.length;p++){if(v=l[p],C=v.instance,H=v.currentTarget,v=v.listener,C!==f&&c.isPropagationStopped())break e;f=v,c.currentTarget=H;try{f(c)}catch(Y){jl(Y)}c.currentTarget=null,f=C}}}}function Ce(e,t){var n=t[wo];n===void 0&&(n=t[wo]=new Set);var l=e+"__bubble";n.has(l)||(ip(t,e,2,!1),n.add(l))}function uu(e,t,n){var l=0;t&&(l|=4),ip(n,e,l,t)}var cr="_reactListening"+Math.random().toString(36).slice(2);function du(e){if(!e[cr]){e[cr]=!0,Jd.forEach(function(n){n!=="selectionchange"&&(C0.has(n)||uu(n,!1,e),uu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[cr]||(t[cr]=!0,uu("selectionchange",!1,t))}}function ip(e,t,n,l){switch(Dp(t)){case 2:var c=W0;break;case 8:c=ex;break;default:c=Eu}n=c.bind(null,t,n,e),c=void 0,!zo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,n,{capture:!0,passive:c}):e.addEventListener(t,n,!0):c!==void 0?e.addEventListener(t,n,{passive:c}):e.addEventListener(t,n,!1)}function fu(e,t,n,l,c){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===c)break;if(p===4)for(p=l.return;p!==null;){var C=p.tag;if((C===3||C===4)&&p.stateNode.containerInfo===c)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}cf(function(){var H=f,Y=To(n),Z=[];e:{var q=Uf.get(e);if(q!==void 0){var K=xl,le=e;switch(e){case"keypress":if(vl(n)===0)break e;case"keydown":case"keyup":K=vb;break;case"focusin":le="focus",K=Ro;break;case"focusout":le="blur",K=Ro;break;case"beforeblur":case"afterblur":K=Ro;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":K=ff;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=lb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=Sb;break;case Df:case Mf:case Rf:K=cb;break;case Lf:K=jb;break;case"scroll":case"scrollend":K=ib;break;case"wheel":K=Cb;break;case"copy":case"cut":case"paste":K=db;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=mf;break;case"toggle":case"beforetoggle":K=Ab}var he=(t&4)!==0,Le=!he&&(e==="scroll"||e==="scrollend"),z=he?q!==null?q+"Capture":null:q;he=[];for(var T=H,U;T!==null;){var Q=T;if(U=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||U===null||z===null||(Q=as(T,z),Q!=null&&he.push(Ls(T,Q,U))),Le)break;T=T.return}0<he.length&&(q=new K(q,le,null,n,Y),Z.push({event:q,listeners:he}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",K=e==="mouseout"||e==="pointerout",q&&n!==ko&&(le=n.relatedTarget||n.fromElement)&&(Ia(le)||le[Za]))break e;if((K||q)&&(q=Y.window===Y?Y:(q=Y.ownerDocument)?q.defaultView||q.parentWindow:window,K?(le=n.relatedTarget||n.toElement,K=H,le=le?Ia(le):null,le!==null&&(Le=u(le),he=le.tag,le!==Le||he!==5&&he!==27&&he!==6)&&(le=null)):(K=null,le=H),K!==le)){if(he=ff,Q="onMouseLeave",z="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(he=mf,Q="onPointerLeave",z="onPointerEnter",T="pointer"),Le=K==null?q:ns(K),U=le==null?q:ns(le),q=new he(Q,T+"leave",K,n,Y),q.target=Le,q.relatedTarget=U,Q=null,Ia(Y)===H&&(he=new he(z,T+"enter",le,n,Y),he.target=U,he.relatedTarget=Le,Q=he),Le=Q,K&&le)t:{for(he=E0,z=K,T=le,U=0,Q=z;Q;Q=he(Q))U++;Q=0;for(var de=T;de;de=he(de))Q++;for(;0<U-Q;)z=he(z),U--;for(;0<Q-U;)T=he(T),Q--;for(;U--;){if(z===T||T!==null&&z===T.alternate){he=z;break t}z=he(z),T=he(T)}he=null}else he=null;K!==null&&sp(Z,q,K,he,!1),le!==null&&Le!==null&&sp(Z,Le,le,he,!0)}}e:{if(q=H?ns(H):window,K=q.nodeName&&q.nodeName.toLowerCase(),K==="select"||K==="input"&&q.type==="file")var Te=wf;else if(xf(q))if(jf)Te=Ub;else{Te=Rb;var ce=Mb}else K=q.nodeName,!K||K.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?H&&Ao(H.elementType)&&(Te=wf):Te=Lb;if(Te&&(Te=Te(e,H))){Sf(Z,Te,n,Y);break e}ce&&ce(e,q,H),e==="focusout"&&H&&q.type==="number"&&H.memoizedProps.value!=null&&Eo(q,"number",q.value)}switch(ce=H?ns(H):window,e){case"focusin":(xf(ce)||ce.contentEditable==="true")&&(ii=ce,$o=H,ds=null);break;case"focusout":ds=$o=ii=null;break;case"mousedown":Ko=!0;break;case"contextmenu":case"mouseup":case"dragend":Ko=!1,zf(Z,n,Y);break;case"selectionchange":if(Hb)break;case"keydown":case"keyup":zf(Z,n,Y)}var we;if(Uo)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?vf(e,n)&&(Ae="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ae="onCompositionStart");Ae&&(pf&&n.locale!=="ko"&&(ai||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&ai&&(we=uf()):(Yn=Y,_o="value"in Yn?Yn.value:Yn.textContent,ai=!0)),ce=ur(H,Ae),0<ce.length&&(Ae=new hf(Ae,e,null,n,Y),Z.push({event:Ae,listeners:ce}),we?Ae.data=we:(we=bf(n),we!==null&&(Ae.data=we)))),(we=Tb?Ob(e,n):zb(e,n))&&(Ae=ur(H,"onBeforeInput"),0<Ae.length&&(ce=new hf("onBeforeInput","beforeinput",null,n,Y),Z.push({event:ce,listeners:Ae}),ce.data=we)),w0(Z,e,H,n,Y)}ap(Z,t)})}function Ls(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ur(e,t){for(var n=t+"Capture",l=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=as(e,n),c!=null&&l.unshift(Ls(e,c,f)),c=as(e,t),c!=null&&l.push(Ls(e,c,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 sp(e,t,n,l,c){for(var f=t._reactName,p=[];n!==null&&n!==l;){var v=n,C=v.alternate,H=v.stateNode;if(v=v.tag,C!==null&&C===l)break;v!==5&&v!==26&&v!==27||H===null||(C=H,c?(H=as(n,f),H!=null&&p.unshift(Ls(n,H,C))):c||(H=as(n,f),H!=null&&p.push(Ls(n,H,C)))),n=n.return}p.length!==0&&e.push({event:t,listeners:p})}var A0=/\r\n?/g,k0=/\u0000|\uFFFD/g;function lp(e){return(typeof e=="string"?e:""+e).replace(A0,`
|
|
9
|
+
`).replace(k0,"")}function rp(e,t){return t=lp(t),lp(e)===t}function Re(e,t,n,l,c,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":ml(e,"class",l);break;case"tabIndex":ml(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ml(e,n,l);break;case"style":rf(e,l,f);break;case"data":if(t!=="object"){ml(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=gl(""+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",c.name,c,null),Re(e,t,"formEncType",c.formEncType,c,null),Re(e,t,"formMethod",c.formMethod,c,null),Re(e,t,"formTarget",c.formTarget,c,null)):(Re(e,t,"encType",c.encType,c,null),Re(e,t,"method",c.method,c,null),Re(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=gl(""+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(c.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=gl(""+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),hl(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":hl(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,hl(e,n,l))}}function hu(e,t,n,l,c,f){switch(n){case"style":rf(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(c.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(!Fd.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(c=n.endsWith("Capture"),t=n.slice(2,c?n.length-7:void 0),f=e[vt]||null,f=f!=null?f[n]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof l=="function")){typeof f!="function"&&f!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,c);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):hl(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,c=!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":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Re(e,t,f,p,n,null)}}c&&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=c=null,C=null,H=null;for(l in n)if(n.hasOwnProperty(l)){var Y=n[l];if(Y!=null)switch(l){case"name":c=Y;break;case"type":p=Y;break;case"checked":C=Y;break;case"defaultChecked":H=Y;break;case"value":f=Y;break;case"defaultValue":v=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(r(137,t));break;default:Re(e,t,l,Y,n,null)}}nf(e,f,v,C,H,p,c,!1);return;case"select":Ce("invalid",e),l=p=f=null;for(c in n)if(n.hasOwnProperty(c)&&(v=n[c],v!=null))switch(c){case"value":f=v;break;case"defaultValue":p=v;break;case"multiple":l=v;default:Re(e,t,c,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=c=l=null;for(p in n)if(n.hasOwnProperty(p)&&(v=n[p],v!=null))switch(p){case"value":l=v;break;case"defaultValue":c=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)}sf(e,l,c,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<Rs.length;l++)Ce(Rs[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(H in n)if(n.hasOwnProperty(H)&&(l=n[H],l!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Re(e,t,H,l,n,null)}return;default:if(Ao(t)){for(Y in n)n.hasOwnProperty(Y)&&(l=n[Y],l!==void 0&&hu(e,t,Y,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 c=null,f=null,p=null,v=null,C=null,H=null,Y=null;for(K in n){var Z=n[K];if(n.hasOwnProperty(K)&&Z!=null)switch(K){case"checked":break;case"value":break;case"defaultValue":C=Z;default:l.hasOwnProperty(K)||Re(e,t,K,null,l,Z)}}for(var q in l){var K=l[q];if(Z=n[q],l.hasOwnProperty(q)&&(K!=null||Z!=null))switch(q){case"type":f=K;break;case"name":c=K;break;case"checked":H=K;break;case"defaultChecked":Y=K;break;case"value":p=K;break;case"defaultValue":v=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(r(137,t));break;default:K!==Z&&Re(e,t,q,K,l,Z)}}Co(e,p,v,C,H,Y,f,c);return;case"select":K=p=v=q=null;for(f in n)if(C=n[f],n.hasOwnProperty(f)&&C!=null)switch(f){case"value":break;case"multiple":K=C;default:l.hasOwnProperty(f)||Re(e,t,f,null,l,C)}for(c in l)if(f=l[c],C=n[c],l.hasOwnProperty(c)&&(f!=null||C!=null))switch(c){case"value":q=f;break;case"defaultValue":v=f;break;case"multiple":p=f;default:f!==C&&Re(e,t,c,f,l,C)}t=v,n=p,l=K,q!=null?Wa(e,!!n,q,!1):!!l!=!!n&&(t!=null?Wa(e,!!n,t,!0):Wa(e,!!n,n?[]:"",!1));return;case"textarea":K=q=null;for(v in n)if(c=n[v],n.hasOwnProperty(v)&&c!=null&&!l.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Re(e,t,v,null,l,c)}for(p in l)if(c=l[p],f=n[p],l.hasOwnProperty(p)&&(c!=null||f!=null))switch(p){case"value":q=c;break;case"defaultValue":K=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:c!==f&&Re(e,t,p,c,l,f)}af(e,q,K);return;case"option":for(var le in n)q=n[le],n.hasOwnProperty(le)&&q!=null&&!l.hasOwnProperty(le)&&(le==="selected"?e.selected=!1:Re(e,t,le,null,l,q));for(C in l)q=l[C],K=n[C],l.hasOwnProperty(C)&&q!==K&&(q!=null||K!=null)&&(C==="selected"?e.selected=q&&typeof q!="function"&&typeof q!="symbol":Re(e,t,C,q,l,K));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)q=n[he],n.hasOwnProperty(he)&&q!=null&&!l.hasOwnProperty(he)&&Re(e,t,he,null,l,q);for(H in l)if(q=l[H],K=n[H],l.hasOwnProperty(H)&&q!==K&&(q!=null||K!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,t));break;default:Re(e,t,H,q,l,K)}return;default:if(Ao(t)){for(var Le in n)q=n[Le],n.hasOwnProperty(Le)&&q!==void 0&&!l.hasOwnProperty(Le)&&hu(e,t,Le,void 0,l,q);for(Y in l)q=l[Y],K=n[Y],!l.hasOwnProperty(Y)||q===K||q===void 0&&K===void 0||hu(e,t,Y,q,l,K);return}}for(var z in n)q=n[z],n.hasOwnProperty(z)&&q!=null&&!l.hasOwnProperty(z)&&Re(e,t,z,null,l,q);for(Z in l)q=l[Z],K=n[Z],!l.hasOwnProperty(Z)||q===K||q==null&&K==null||Re(e,t,Z,q,l,K)}function op(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 c=n[l],f=c.transferSize,p=c.initiatorType,v=c.duration;if(f&&v&&op(p)){for(p=0,v=c.responseEnd,l+=1;l<n.length;l++){var C=n[l],H=C.startTime;if(H>v)break;var Y=C.transferSize,Z=C.initiatorType;Y&&op(Z)&&(C=C.responseEnd,p+=Y*(C<v?1:(v-H)/(C-H)))}if(--l,t+=8*(f+p)/(c.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 mu=null,pu=null;function dr(e){return e.nodeType===9?e:e.ownerDocument}function cp(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 up(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 gu(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 yu=null;function z0(){var e=window.event;return e&&e.type==="popstate"?e===yu?!1:(yu=e,!0):(yu=null,!1)}var dp=typeof setTimeout=="function"?setTimeout:void 0,_0=typeof clearTimeout=="function"?clearTimeout:void 0,fp=typeof Promise=="function"?Promise:void 0,D0=typeof queueMicrotask=="function"?queueMicrotask:typeof fp<"u"?function(e){return fp.resolve(null).then(e).catch(M0)}:dp;function M0(e){setTimeout(function(){throw e})}function la(e){return e==="head"}function hp(e,t){var n=t,l=0;do{var c=n.nextSibling;if(e.removeChild(n),c&&c.nodeType===8)if(n=c.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(c),zi(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")Us(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Us(n);for(var f=n.firstChild;f;){var p=f.nextSibling,v=f.nodeName;f[ts]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&f.rel.toLowerCase()==="stylesheet"||n.removeChild(f),f=p}}else n==="body"&&Us(e.ownerDocument.body);n=c}while(n);zi(t)}function mp(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 vu(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":vu(n),jo(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 c=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ts])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!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.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 pp(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 bu(e){return e.data==="$?"||e.data==="$~"}function xu(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 Su=null;function gp(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 yp(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 vp(e,t,n){switch(t=dr(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 Us(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);jo(e)}var Xt=new Map,bp=new Set;function fr(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:K0,m:Y0,X:V0,S:G0,M:Q0};function B0(){var e=Ln.f(),t=ar();return e||t}function H0(e){var t=Ja(e);t!==null&&t.tag===5&&t.type==="form"?Lh(t):Ln.r(e)}var ki=typeof document>"u"?null:document;function xp(e,t,n){var l=ki;if(l&&typeof t=="string"&&t){var c=Ht(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof n=="string"&&(c+='[crossorigin="'+n+'"]'),bp.has(c)||(bp.add(c),e={rel:e,crossOrigin:n,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),dt(t,"link",e),it(t),l.head.appendChild(t)))}}function q0(e){Ln.D(e),xp("dns-prefetch",e,null)}function $0(e,t){Ln.C(e,t),xp("preconnect",e,t)}function K0(e,t,n){Ln.L(e,t,n);var l=ki;if(l&&e&&t){var c='link[rel="preload"][as="'+Ht(t)+'"]';t==="image"&&n&&n.imageSrcSet?(c+='[imagesrcset="'+Ht(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(c+='[imagesizes="'+Ht(n.imageSizes)+'"]')):c+='[href="'+Ht(e)+'"]';var f=c;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(c)!==null||t==="style"&&l.querySelector(Bs(f))||t==="script"&&l.querySelector(Hs(f))||(t=l.createElement("link"),dt(t,"link",e),it(t),l.head.appendChild(t)))}}function Y0(e,t){Ln.m(e,t);var n=ki;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Ht(l)+'"][href="'+Ht(e)+'"]',f=c;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(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Hs(f)))return}l=n.createElement("link"),dt(l,"link",e),it(l),n.head.appendChild(l)}}}function G0(e,t,n){Ln.S(e,t,n);var l=ki;if(l&&e){var c=Fa(l).hoistableStyles,f=Ti(e);t=t||"default";var p=c.get(f);if(!p){var v={loading:0,preload:null};if(p=l.querySelector(Bs(f)))v.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Xt.get(f))&&wu(e,n);var C=p=l.createElement("link");it(C),dt(C,"link",e),C._p=new Promise(function(H,Y){C.onload=H,C.onerror=Y}),C.addEventListener("load",function(){v.loading|=1}),C.addEventListener("error",function(){v.loading|=2}),v.loading|=4,hr(p,t,l)}p={type:"stylesheet",instance:p,count:1,state:v},c.set(f,p)}}}function V0(e,t){Ln.X(e,t);var n=ki;if(n&&e){var l=Fa(n).hoistableScripts,c=Oi(e),f=l.get(c);f||(f=n.querySelector(Hs(c)),f||(e=b({src:e,async:!0},t),(t=Xt.get(c))&&ju(e,t),f=n.createElement("script"),it(f),dt(f,"link",e),n.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function Q0(e,t){Ln.M(e,t);var n=ki;if(n&&e){var l=Fa(n).hoistableScripts,c=Oi(e),f=l.get(c);f||(f=n.querySelector(Hs(c)),f||(e=b({src:e,async:!0,type:"module"},t),(t=Xt.get(c))&&ju(e,t),f=n.createElement("script"),it(f),dt(f,"link",e),n.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function Sp(e,t,n,l){var c=(c=ie.current)?fr(c):null;if(!c)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(c).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(c).hoistableStyles,p=f.get(e);if(p||(c=c.ownerDocument||c,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,p),(f=c.querySelector(Bs(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(c,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(c).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 Bs(e){return'link[rel="stylesheet"]['+e+"]"}function wp(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),it(t),e.head.appendChild(t))}function Oi(e){return'[src="'+Ht(e)+'"]'}function Hs(e){return"script[async]"+e}function jp(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,it(l),l;var c=b({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),it(l),dt(l,"style",c),hr(l,n.precedence,e),t.instance=l;case"stylesheet":c=Ti(n.href);var f=e.querySelector(Bs(c));if(f)return t.state.loading|=4,t.instance=f,it(f),f;l=wp(n),(c=Xt.get(c))&&wu(l,c),f=(e.ownerDocument||e).createElement("link"),it(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,hr(f,n.precedence,e),t.instance=f;case"script":return f=Oi(n.src),(c=e.querySelector(Hs(f)))?(t.instance=c,it(c),c):(l=n,(c=Xt.get(f))&&(l=b({},n),ju(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),it(c),dt(c,"link",l),e.head.appendChild(c),t.instance=c);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,hr(l,n.precedence,e));return t.instance}function hr(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,f=c,p=0;p<l.length;p++){var v=l[p];if(v.dataset.precedence===t)f=v;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function wu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ju(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var mr=null;function Np(e,t,n){if(mr===null){var l=new Map,c=mr=new Map;c.set(n,l)}else c=mr,l=c.get(n),l||(l=new Map,c.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),c=0;c<n.length;c++){var f=n[c];if(!(f[ts]||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 Cp(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 Ep(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 c=Ti(l.href),f=t.querySelector(Bs(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=pr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=f,it(f);return}f=t.ownerDocument||t,l=wp(l),(c=Xt.get(c))&&wu(l,c),f=f.createElement("link"),it(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=pr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Nu=0;function J0(e,t){return e.stylesheets&&e.count===0&&yr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&yr(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&Nu===0&&(Nu=62500*O0());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&yr(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Nu?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function pr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)yr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var gr=null;function yr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,gr=new Map,t.forEach(F0,e),gr=null,pr.call(e))}function F0(e,t){if(!(t.state.loading&4)){var n=gr.get(e);if(n)var l=n.get(null);else{n=new Map,gr.set(e,n);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var p=c[f];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(n.set(p.dataset.precedence,p),l=p)}l&&n.set(null,l)}c=t.instance,p=c.getAttribute("data-precedence"),f=n.get(p)||l,f===l&&n.set(null,c),n.set(p,c),this.count++,l=pr.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var qs={$$typeof:_,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function P0(e,t,n,l,c,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=bo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bo(0),this.hiddenUpdates=bo(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Ap(e,t,n,l,c,f,p,v,C,H,Y,Z){return e=new P0(e,t,n,p,C,H,Y,Z,v),t=1,f===!0&&(t|=24),f=kt(3,null,null,t),e.current=f,f.stateNode=e,t=ac(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:l,isDehydrated:n,cache:t},rc(f),e}function kp(e){return e?(e=ri,e):ri}function Tp(e,t,n,l,c,f){c=kp(c),l.context===null?l.context=c:l.pendingContext=c,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),vs(n,e,t))}function Op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Cu(e,t){Op(e,t),(e=e.alternate)&&Op(e,t)}function zp(e){if(e.tag===13||e.tag===31){var t=Na(e,67108864);t!==null&&Nt(t,e,67108864),Cu(e,67108864)}}function _p(e){if(e.tag===13||e.tag===31){var t=Dt();t=xo(t);var n=Na(e,t);n!==null&&Nt(n,e,t),Cu(e,t)}}var vr=!0;function W0(e,t,n,l){var c=B.T;B.T=null;var f=J.p;try{J.p=2,Eu(e,t,n,l)}finally{J.p=f,B.T=c}}function ex(e,t,n,l){var c=B.T;B.T=null;var f=J.p;try{J.p=8,Eu(e,t,n,l)}finally{J.p=f,B.T=c}}function Eu(e,t,n,l){if(vr){var c=Au(l);if(c===null)fu(e,t,l,br,n),Mp(e,l);else if(nx(c,e,t,n,l))l.stopPropagation();else if(Mp(e,l),t&4&&-1<tx.indexOf(e)){for(;c!==null;){var f=Ja(c);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&&(tr=ht()+500,Ms(0))}}break;case 31:case 13:v=Na(f,2),v!==null&&Nt(v,f,2),ar(),Cu(f,2)}if(f=Au(l),f===null&&fu(e,t,l,br,n),f===c)break;c=f}c!==null&&l.stopPropagation()}else fu(e,t,l,null,n)}}function Au(e){return e=To(e),ku(e)}var br=null;function ku(e){if(br=null,e=Ia(e),e!==null){var t=u(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 br=e,null}function Dp(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(yo()){case rl:return 2;case ol:return 8;case Ut:case vo:return 32;case ae:return 268435456;default:return 32}default:return 32}}var Tu=!1,ra=null,oa=null,ca=null,$s=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 Mp(e,t){switch(e){case"focusin":case"focusout":ra=null;break;case"dragenter":case"dragleave":oa=null;break;case"mouseover":case"mouseout":ca=null;break;case"pointerover":case"pointerout":$s.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ks.delete(t.pointerId)}}function Ys(e,t,n,l,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:f,targetContainers:[c]},t!==null&&(t=Ja(t),t!==null&&zp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function nx(e,t,n,l,c){switch(t){case"focusin":return ra=Ys(ra,e,t,n,l,c),!0;case"dragenter":return oa=Ys(oa,e,t,n,l,c),!0;case"mouseover":return ca=Ys(ca,e,t,n,l,c),!0;case"pointerover":var f=c.pointerId;return $s.set(f,Ys($s.get(f)||null,e,t,n,l,c)),!0;case"gotpointercapture":return f=c.pointerId,Ks.set(f,Ys(Ks.get(f)||null,e,t,n,l,c)),!0}return!1}function Rp(e){var t=Ia(e.target);if(t!==null){var n=u(t);if(n!==null){if(t=n.tag,t===13){if(t=h(n),t!==null){e.blockedOn=t,Zd(e.priority,function(){_p(n)});return}}else if(t===31){if(t=m(n),t!==null){e.blockedOn=t,Zd(e.priority,function(){_p(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 xr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Au(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);ko=l,n.target.dispatchEvent(l),ko=null}else return t=Ja(n),t!==null&&zp(t),e.blockedOn=n,!1;t.shift()}return!0}function Lp(e,t,n){xr(e)&&n.delete(t)}function ax(){Tu=!1,ra!==null&&xr(ra)&&(ra=null),oa!==null&&xr(oa)&&(oa=null),ca!==null&&xr(ca)&&(ca=null),$s.forEach(Lp),Ks.forEach(Lp)}function Sr(e,t){e.blockedOn===t&&(e.blockedOn=null,Tu||(Tu=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,ax)))}var wr=null;function Up(e){wr!==e&&(wr=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){wr===e&&(wr=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(ku(l||n)===null)continue;break}var f=Ja(n);f!==null&&(e.splice(t,3),t-=3,Ac(f,{pending:!0,data:c,method:n.method,action:l},l,c))}}))}function zi(e){function t(C){return Sr(C,e)}ra!==null&&Sr(ra,e),oa!==null&&Sr(oa,e),ca!==null&&Sr(ca,e),$s.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);)Rp(n),n.blockedOn===null&&ua.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var c=n[l],f=n[l+1],p=c[vt]||null;if(typeof f=="function")p||Up(n);else if(p){var v=null;if(f&&f.hasAttribute("formAction")){if(c=f,p=f[vt]||null)v=p.formAction;else if(ku(c)!==null)continue}else v=p.action;typeof v=="function"?n[l+1]=v:(n.splice(l,3),l-=3),Up(n)}}}function Bp(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(p){return c=p})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=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,c=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),c!==null&&(c(),c=null)}}}function Ou(e){this._internalRoot=e}jr.prototype.render=Ou.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,l=Dt();Tp(n,l,e,t,null,null)},jr.prototype.unmount=Ou.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Tp(e.current,2,null,e,null,null),ar(),t[Za]=null}};function jr(e){this._internalRoot=e}jr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xd();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&&Rp(e)}};var Hp=i.version;if(Hp!=="19.2.4")throw Error(r(527,Hp,"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:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Nr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nr.isDisabled&&Nr.supportsFiber)try{Pi=Nr.inject(ix),Ct=Nr}catch{}}return Vs.createRoot=function(e,t){if(!o(e))throw Error(r(299));var n=!1,l="",c=Qh,f=Xh,p=Zh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=Ap(e,1,!1,null,null,n,l,null,c,f,p,Bp),e[Za]=t.current,du(e),new Ou(t)},Vs.hydrateRoot=function(e,t,n){if(!o(e))throw Error(r(299));var l=!1,c="",f=Qh,p=Xh,v=Zh,C=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(c=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=Ap(e,1,!0,t,n??null,l,c,C,f,p,v,Bp),t.context=kp(null),n=t.current,l=Dt(),l=xo(l),c=In(l),c.callback=null,Jn(n,c,l),n=l,t.current.lanes=n,es(t,n),hn(t),e[Za]=t.current,du(e),new jr(t)},Vs.version="19.2.4",Vs}var Ip;function px(){if(Ip)return Du.exports;Ip=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(),Du.exports=mx(),Du.exports}var gx=px();const hd=Symbol.for("yaml.alias"),ed=Symbol.for("yaml.document"),ga=Symbol.for("yaml.map"),Hg=Symbol.for("yaml.pair"),pn=Symbol.for("yaml.scalar"),Xi=Symbol.for("yaml.seq"),Jt=Symbol.for("yaml.node.type"),Ya=a=>!!a&&typeof a=="object"&&a[Jt]===hd,Pr=a=>!!a&&typeof a=="object"&&a[Jt]===ed,nl=a=>!!a&&typeof a=="object"&&a[Jt]===ga,Je=a=>!!a&&typeof a=="object"&&a[Jt]===Hg,Be=a=>!!a&&typeof a=="object"&&a[Jt]===pn,al=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 Ie(a){if(a&&typeof a=="object")switch(a[Jt]){case hd:case ga:case pn:case Xi:return!0}return!1}const qg=a=>(Be(a)||Ze(a))&&!!a.anchor,Ba=Symbol("break visit"),yx=Symbol("skip children"),Is=Symbol("remove node");function Zi(a,i){const s=vx(i);Pr(a)?Ui(null,a.contents,s,Object.freeze([a]))===Is&&(a.contents=null):Ui(null,a,s,Object.freeze([]))}Zi.BREAK=Ba;Zi.SKIP=yx;Zi.REMOVE=Is;function Ui(a,i,s,r){const o=bx(a,i,s,r);if(Ie(o)||Je(o))return xx(a,r,o),Ui(a,o,s,r);if(typeof o!="symbol"){if(Ze(i)){r=Object.freeze(r.concat(i));for(let u=0;u<i.items.length;++u){const h=Ui(u,i.items[u],s,r);if(typeof h=="number")u=h-1;else{if(h===Ba)return Ba;h===Is&&(i.items.splice(u,1),u-=1)}}}else if(Je(i)){r=Object.freeze(r.concat(i));const u=Ui("key",i.key,s,r);if(u===Ba)return Ba;u===Is&&(i.key=null);const h=Ui("value",i.value,s,r);if(h===Ba)return Ba;h===Is&&(i.value=null)}}return o}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(nl(i))return s.Map?.(a,i,r);if(al(i))return s.Seq?.(a,i,r);if(Je(i))return s.Pair?.(a,i,r);if(Be(i))return s.Scalar?.(a,i,r);if(Ya(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(Je(r))a==="key"?r.key=s:r.value=s;else if(Pr(r))r.contents=s;else{const o=Ya(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} 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]+/),o=r.shift();switch(o){case"%TAG":{if(r.length!==2&&(s(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[u,h]=r;return this.tags[u]=h,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return s(0,"%YAML directive should contain exactly one part"),!1;const[u]=r;if(u==="1.1"||u==="1.2")return this.yaml.version=u,!0;{const h=/^\d+\.\d+$/.test(u);return s(6,`Unsupported YAML version ${u}`,h),!1}}default:return s(0,`Unknown directive ${o}`,!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,o]=i.match(/^(.*!)([^!]*)$/s);o||s(`The ${i} tag has no suffix`);const u=this.tags[r];if(u)try{return u+decodeURIComponent(o)}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 o;if(i&&r.length>0&&Ie(i.contents)){const u={};Zi(i.contents,(h,m)=>{Ie(m)&&m.tag&&(u[m.tag]=!0)}),o=Object.keys(u)}else o=[];for(const[u,h]of r)u==="!!"&&h==="tag:yaml.org,2002:"||(!i||o.some(m=>m.startsWith(h)))&&s.push(`%TAG ${u} ${h}`);return s.join(`
|
|
10
|
+
`)}}pt.defaultYaml={explicit:!1,version:"1.2"};pt.defaultTags={"!!":"tag:yaml.org,2002:"};function $g(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 Kg(a){const i=new Set;return Zi(a,{Value(s,r){r.anchor&&i.add(r.anchor)}}),i}function Yg(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 o=null;return{onAnchor:u=>{s.push(u),o??(o=Kg(a));const h=Yg(i,o);return o.add(h),h},setAnchors:()=>{for(const u of s){const h=r.get(u);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=u,m}}},sourceObjects:r}}function Bi(a,i,s,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let o=0,u=r.length;o<u;++o){const h=r[o],m=Bi(a,r,String(o),h);m===void 0?delete r[o]:m!==h&&(r[o]=m)}else if(r instanceof Map)for(const o of Array.from(r.keys())){const u=r.get(o),h=Bi(a,r,o,u);h===void 0?r.delete(o):h!==u&&r.set(o,h)}else if(r instanceof Set)for(const o of Array.from(r)){const u=Bi(a,r,o,o);u===void 0?r.delete(o):u!==o&&(r.delete(o),r.add(u))}else for(const[o,u]of Object.entries(r)){const h=Bi(a,r,o,u);h===void 0?delete r[o]:h!==u&&(r[o]=h)}return a.call(i,s,r)}function It(a,i,s){if(Array.isArray(a))return a.map((r,o)=>It(r,String(o),s));if(a&&typeof a.toJSON=="function"){if(!s||!qg(a))return a.toJSON(i,s);const r={aliasCount:0,count:1,res:void 0};s.anchors.set(a,r),s.onCreate=u=>{r.res=u,delete s.onCreate};const o=a.toJSON(i,s);return s.onCreate&&s.onCreate(o),o}return typeof a=="bigint"&&!s?.keep?Number(a):a}class md{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:o,reviver:u}={}){if(!Pr(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 o=="function")for(const{count:y,res:g}of h.anchors.values())o(g,y);return typeof u=="function"?Bi(u,{"":m},"",m):m}}class pd extends md{constructor(i){super(hd),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:(u,h)=>{(Ya(h)||qg(h))&&r.push(h)}}),s&&(s.aliasResolveCache=r));let o;for(const u of r){if(u===this)break;u.anchor===this.source&&(o=u)}return o}toJSON(i,s){if(!s)return{source:this.source};const{anchors:r,doc:o,maxAliasCount:u}=s,h=this.resolve(o,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(u>=0&&(m.count+=1,m.aliasCount===0&&(m.aliasCount=Hr(o,h,r)),m.count*m.aliasCount>u)){const y="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(y)}return m.res}toString(i,s,r){const o=`*${this.source}`;if(i){if($g(this.source),i.options.verifyAliasOrder&&!i.anchors.has(this.source)){const u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(u)}if(i.implicitKey)return`${o} `}return o}}function Hr(a,i,s){if(Ya(i)){const r=i.resolve(a),o=s&&r&&s.get(r);return o?o.count*o.aliasCount:0}else if(Ze(i)){let r=0;for(const o of i.items){const u=Hr(a,o,s);u>r&&(r=u)}return r}else if(Je(i)){const r=Hr(a,i.key,s),o=Hr(a,i.value,s);return Math.max(r,o)}return 1}const Gg=a=>!a||typeof a!="function"&&typeof a!="object";class be extends md{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(u=>u.tag===i),o=r.find(u=>!u.format)??r[0];if(!o)throw new Error(`Tag ${i} not found`);return o}return s.find(r=>r.identify?.(a)&&!r.format)}function Fs(a,i,s){if(Pr(a)&&(a=a.contents),Ie(a))return a;if(Je(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:o,onTagObj:u,schema:h,sourceObjects:m}=s;let y;if(r&&a&&typeof a=="object"){if(y=m.get(a),y)return y.anchor??(y.anchor=o(a)),new pd(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]}u&&(u(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 Gr(a,i,s){let r=s;for(let o=i.length-1;o>=0;--o){const u=i[o];if(typeof u=="number"&&Number.isInteger(u)&&u>=0){const h=[];h[u]=r,r=h}else r=new Map([[u,r]])}return Fs(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 Zs=a=>a==null||typeof a=="object"&&!!a[Symbol.iterator]().next().done;class Vg extends md{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=>Ie(r)||Je(r)?r.clone(i):r),this.range&&(s.range=this.range.slice()),s}addIn(i,s){if(Zs(i))this.add(s);else{const[r,...o]=i,u=this.get(r,!0);if(Ze(u))u.addIn(o,s);else if(u===void 0&&this.schema)this.set(r,Gr(this.schema,o,s));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${o}`)}}deleteIn(i){const[s,...r]=i;if(r.length===0)return this.delete(s);const o=this.get(s,!0);if(Ze(o))return o.deleteIn(r);throw new Error(`Expected YAML collection at ${s}. Remaining path: ${r}`)}getIn(i,s){const[r,...o]=i,u=this.get(r,!0);return o.length===0?!s&&Be(u)?u.value:u:Ze(u)?u.getIn(o,s):void 0}hasAllNullValues(i){return this.items.every(s=>{if(!Je(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 o=this.get(s,!0);return Ze(o)?o.hasIn(r):!1}setIn(i,s){const[r,...o]=i;if(o.length===0)this.set(r,s);else{const u=this.get(r,!0);if(Ze(u))u.setIn(o,s);else if(u===void 0&&this.schema)this.set(r,Gr(this.schema,o,s));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${o}`)}}}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,Qg="flow",td="block",qr="quoted";function Wr(a,i,s="flow",{indentAtStart:r,lineWidth:o=80,minContentWidth:u=20,onFold:h,onOverflow:m}={}){if(!o||o<0)return a;o<u&&(u=0);const y=Math.max(1+u,1+o-i.length);if(a.length<=y)return a;const g=[],x={};let b=o-i.length;typeof r=="number"&&(r>o-Math.max(2,u)?g.push(0):b=o-r);let S,A,O=!1,w=-1,N=-1,E=-1;s===td&&(w=Jp(a,w,i.length),w!==-1&&(b=w+y));for(let _;_=a[w+=1];){if(s===qr&&_==="\\"){switch(N=w,a[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}E=w}if(_===`
|
|
14
|
+
`)s===td&&(w=Jp(a,w,i.length)),b=w+i.length+y,S=void 0;else{if(_===" "&&A&&A!==" "&&A!==`
|
|
15
|
+
`&&A!==" "){const M=a[w+1];M&&M!==" "&&M!==`
|
|
16
|
+
`&&M!==" "&&(S=w)}if(w>=b)if(S)g.push(S),b=S+y,S=void 0;else if(s===qr){for(;A===" "||A===" ";)A=_,_=a[w+=1],O=!0;const M=w>E+1?w-2:N-1;if(x[M])return a;g.push(M),x[M]=!0,b=M+y,S=void 0}else O=!0}A=_}if(O&&m&&m(),g.length===0)return a;h&&h();let $=a.slice(0,g[0]);for(let _=0;_<g.length;++_){const M=g[_],L=g[_+1]||a.length;M===0?$=`
|
|
17
|
+
${i}${a.slice(0,L)}`:(s===qr&&x[M]&&($+=`${a[M]}\\`),$+=`
|
|
18
|
+
${i}${a.slice(M+1,L)}`)}return $}function Jp(a,i,s){let r=i,o=i+1,u=a[o];for(;u===" "||u===" ";)if(i<o+s)u=a[++i];else{do u=a[++i];while(u&&u!==`
|
|
19
|
+
`);r=i,o=i+1,u=a[o]}return r}const eo=(a,i)=>({indentAtStart:i?a.indent.length:a.indentAtStart,lineWidth:a.options.lineWidth,minContentWidth:a.options.minContentWidth}),to=a=>/^(%|---|\.\.\.)/m.test(a);function Ax(a,i,s){if(!i||i<0)return!1;const r=i-s,o=a.length;if(o<=r)return!1;for(let u=0,h=0;u<o;++u)if(a[u]===`
|
|
20
|
+
`){if(u-h>r)return!0;if(h=u+1,o-h<=r)return!1}return!0}function Js(a,i){const s=JSON.stringify(a);if(i.options.doubleQuotedAsJSON)return s;const{implicitKey:r}=i,o=i.options.doubleQuotedMinMultiLineLength,u=i.indent||(to(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<o)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+=u,s[y+2]===" "&&(h+="\\"),y+=1,m=y+1}break;default:y+=1}return h=m?h+s.slice(m):s,r?h:Wr(h,u,qr,eo(i,!1))}function nd(a,i){if(i.options.singleQuote===!1||i.implicitKey&&a.includes(`
|
|
24
|
+
`)||/[ \t]\n|\n[ \t]/.test(a))return Js(a,i);const s=i.indent||(to(a)?" ":""),r="'"+a.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
25
|
+
${s}`)+"'";return i.implicitKey?r:Wr(r,s,Qg,eo(i,!1))}function Hi(a,i){const{singleQuote:s}=i.options;let r;if(s===!1)r=Js;else{const o=a.includes('"'),u=a.includes("'");o&&!u?r=nd:u&&!o?r=Js:r=s?nd:Js}return r(a,i)}let ad;try{ad=new RegExp(`(^|(?<!
|
|
26
|
+
))
|
|
27
|
+
+(?!
|
|
28
|
+
|$)`,"g")}catch{ad=/\n+(?!\n|$)/g}function $r({comment:a,type:i,value:s},r,o,u){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||to(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 L=s[S-1];if(L!==`
|
|
31
|
+
`&&L!==" "&&L!==" ")break}let A=s.substring(S);const O=A.indexOf(`
|
|
32
|
+
`);O===-1?b="-":s===A||O!==A.length-1?(b="+",u&&u()):b="",A&&(s=s.slice(0,-A.length),A[A.length-1]===`
|
|
33
|
+
`&&(A=A.slice(0,-1)),A=A.replace(ad,`$&${g}`));let w=!1,N,E=-1;for(N=0;N<s.length;++N){const L=s[N];if(L===" ")w=!0;else if(L===`
|
|
34
|
+
`)E=N;else break}let $=s.substring(0,E<N?E+1:N);$&&(s=s.substring($.length),$=$.replace(/\n+/g,`$&${g}`));let M=(w?g?"2":"1":"")+b;if(a&&(M+=" "+m(a.replace(/ ?[\r\n]+/g," ")),o&&o()),!x){const L=s.replace(/\n+/g,`
|
|
35
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${g}`);let G=!1;const X=eo(r,!0);h!=="folded"&&i!==be.BLOCK_FOLDED&&(X.onOverflow=()=>{G=!0});const D=Wr(`${$}${L}${A}`,g,td,X);if(!G)return`>${M}
|
|
36
|
+
${g}${D}`}return s=s.replace(/\n+/g,`$&${g}`),`|${M}
|
|
37
|
+
${g}${$}${s}${A}`}function kx(a,i,s,r){const{type:o,value:u}=a,{actualString:h,implicitKey:m,indent:y,indentStep:g,inFlow:x}=i;if(m&&u.includes(`
|
|
38
|
+
`)||x&&/[[\]{},]/.test(u))return Hi(u,i);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return m||x||!u.includes(`
|
|
39
|
+
`)?Hi(u,i):$r(a,i,s,r);if(!m&&!x&&o!==be.PLAIN&&u.includes(`
|
|
40
|
+
`))return $r(a,i,s,r);if(to(u)){if(y==="")return i.forceBlockIndent=!0,$r(a,i,s,r);if(m&&y===g)return Hi(u,i)}const b=u.replace(/\n+/g,`$&
|
|
41
|
+
${y}`);if(h){const S=w=>w.default&&w.tag!=="tag:yaml.org,2002:str"&&w.test?.test(b),{compat:A,tags:O}=i.doc.schema;if(O.some(S)||A?.some(S))return Hi(u,i)}return m?b:Wr(b,y,Qg,eo(i,!1))}function gd(a,i,s,r){const{implicitKey:o,inFlow:u}=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 o||u?Hi(h.value,i):$r(h,i,s,r);case be.QUOTE_DOUBLE:return Js(h.value,i);case be.QUOTE_SINGLE:return nd(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=o&&x||b;if(g=y(S),g===null)throw new Error(`Unsupported default string type ${S}`)}return g}function Xg(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 o=a.filter(u=>u.tag===i.tag);if(o.length>0)return o.find(u=>u.format===i.format)??o[0]}let s,r;if(Be(i)){r=i.value;let o=a.filter(u=>u.identify?.(r));if(o.length>1){const u=o.filter(h=>h.test);u.length>0&&(o=u)}s=o.find(u=>u.format===i.format)??o.find(u=>!u.format)}else r=i,s=a.find(o=>o.nodeClass&&r instanceof o.nodeClass);if(!s){const o=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${o} value`)}return s}function Ox(a,i,{anchors:s,doc:r}){if(!r.directives)return"";const o=[],u=(Be(a)||Ze(a))&&a.anchor;u&&$g(u)&&(s.add(u),o.push(`&${u}`));const h=a.tag??(i.default?null:i.tag);return h&&o.push(r.directives.tagString(h)),o.join(" ")}function Vi(a,i,s,r){if(Je(a))return a.toString(i,s,r);if(Ya(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 o;const u=Ie(a)?a:i.doc.createNode(a,{onTagObj:y=>o=y});o??(o=Tx(i.doc.schema.tags,u));const h=Ox(u,o,i);h.length>0&&(i.indentAtStart=(i.indentAtStart??0)+h.length+1);const m=typeof o.stringify=="function"?o.stringify(u,i,s,r):Be(u)?gd(u,i,s,r):u.toString(i,s,r);return h?Be(u)||m[0]==="{"||m[0]==="["?`${h} ${m}`:`${h}
|
|
42
|
+
${i.indent}${m}`:m}function zx({key:a,value:i},s,r,o){const{allNullValues:u,doc:h,indent:m,indentStep:y,options:{commentString:g,indentSeq:x,simpleKeys:b}}=s;let S=Ie(a)&&a.comment||null;if(b){if(S)throw new Error("With simple keys, key nodes cannot have comments");if(Ze(a)||!Ie(a)&&typeof a=="object"){const X="With simple keys, collection cannot be used as a key value";throw new Error(X)}}let A=!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:!A&&(b||!u),indent:m+y});let O=!1,w=!1,N=Vi(a,s,()=>O=!0,()=>w=!0);if(!A&&!s.inFlow&&N.length>1024){if(b)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");A=!0}if(s.inFlow){if(u||i==null)return O&&r&&r(),N===""?"?":A?`? ${N}`:N}else if(u&&!b||i==null&&A)return N=`? ${N}`,S&&!O?N+=Ha(N,s.indent,g(S)):w&&o&&o(),N;O&&(S=null),A?(S&&(N+=Ha(N,s.indent,g(S))),N=`? ${N}
|
|
43
|
+
${m}:`):(N=`${N}:`,S&&(N+=Ha(N,s.indent,g(S))));let E,$,_;Ie(i)?(E=!!i.spaceBefore,$=i.commentBefore,_=i.comment):(E=!1,$=null,_=null,i&&typeof i=="object"&&(i=h.createNode(i))),s.implicitKey=!1,!A&&!S&&Be(i)&&(s.indentAtStart=N.length+1),w=!1,!x&&y.length>=2&&!s.inFlow&&!A&&al(i)&&!i.flow&&!i.tag&&!i.anchor&&(s.indent=s.indent.substring(2));let M=!1;const L=Vi(i,s,()=>M=!0,()=>w=!0);let G=" ";if(S||E||$){if(G=E?`
|
|
44
|
+
`:"",$){const X=g($);G+=`
|
|
45
|
+
${Bn(X,s.indent)}`}L===""&&!s.inFlow?G===`
|
|
46
|
+
`&&_&&(G=`
|
|
47
|
+
|
|
48
|
+
`):G+=`
|
|
49
|
+
${s.indent}`}else if(!A&&Ze(i)){const X=L[0],D=L.indexOf(`
|
|
50
|
+
`),P=D!==-1,Se=s.inFlow??i.flow??i.items.length===0;if(P||!Se){let W=!1;if(P&&(X==="&"||X==="!")){let se=L.indexOf(" ");X==="&"&&se!==-1&&se<D&&L[se+1]==="!"&&(se=L.indexOf(" ",se+1)),(se===-1||D<se)&&(W=!0)}W||(G=`
|
|
51
|
+
${s.indent}`)}}else(L===""||L[0]===`
|
|
52
|
+
`)&&(G="");return N+=G+L,s.inFlow?M&&r&&r():_&&!M?N+=Ha(N,s.indent,g(_)):w&&o&&o(),N}function _x(a,i){(a==="debug"||a==="warn")&&console.warn(i)}const Cr="<<",Hn={identify:a=>a===Cr||typeof a=="symbol"&&a.description===Cr,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new be(Symbol(Cr)),{addToJSMap:Zg}),stringify:()=>Cr},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 Zg(a,i,s){if(s=a&&Ya(s)?s.resolve(a.doc):s,al(s))for(const r of s.items)Uu(a,i,r);else if(Array.isArray(s))for(const r of s)Uu(a,i,r);else Uu(a,i,s)}function Uu(a,i,s){const r=a&&Ya(s)?s.resolve(a.doc):s;if(!nl(r))throw new Error("Merge sources must be maps or map aliases");const o=r.toJSON(null,a,Map);for(const[u,h]of o)i instanceof Map?i.has(u)||i.set(u,h):i instanceof Set?i.add(u):Object.prototype.hasOwnProperty.call(i,u)||Object.defineProperty(i,u,{value:h,writable:!0,enumerable:!0,configurable:!0});return i}function Ig(a,i,{key:s,value:r}){if(Ie(s)&&s.addToJSMap)s.addToJSMap(a,i,r);else if(Dx(a,s))Zg(a,i,r);else{const o=It(s,"",a);if(i instanceof Map)i.set(o,It(r,o,a));else if(i instanceof Set)i.add(o);else{const u=Mx(s,o,a),h=It(r,u,a);u in i?Object.defineProperty(i,u,{value:h,writable:!0,enumerable:!0,configurable:!0}):i[u]=h}}return i}function Mx(a,i,s){if(i===null)return"";if(typeof i!="object")return String(i);if(Ie(a)&&s?.doc){const r=Xg(s.doc,{});r.anchors=new Set;for(const u of s.anchors.keys())r.anchors.add(u.anchor);r.inFlow=!0,r.inStringifyKey=!0;const o=a.toString(r);if(!s.mapKeyWarned){let u=JSON.stringify(o);u.length>40&&(u=u.substring(0,36)+'..."'),_x(s.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${u}. Set mapAsMap: true to use object keys.`),s.mapKeyWarned=!0}return o}return JSON.stringify(i)}function yd(a,i,s){const r=Fs(a,void 0,s),o=Fs(i,void 0,s);return new gt(r,o)}class gt{constructor(i,s=null){Object.defineProperty(this,Jt,{value:Hg}),this.key=i,this.value=s}clone(i){let{key:s,value:r}=this;return Ie(s)&&(s=s.clone(i)),Ie(r)&&(r=r.clone(i)),new gt(s,r)}toJSON(i,s){const r=s?.mapAsMap?new Map:{};return Ig(s,r,this)}toString(i,s,r){return i?.doc?zx(this,i,s,r):JSON.stringify(this)}}function Jg(a,i,s){return(i.inFlow??a.flow?Lx:Rx)(a,i,s)}function Rx({comment:a,items:i},s,{blockItemPrefix:r,flowChars:o,itemIndent:u,onChompKeep:h,onComment:m}){const{indent:y,options:{commentString:g}}=s,x=Object.assign({},s,{indent:u,type:null});let b=!1;const S=[];for(let O=0;O<i.length;++O){const w=i[O];let N=null;if(Ie(w))!b&&w.spaceBefore&&S.push(""),Vr(s,S,w.commentBefore,b),w.comment&&(N=w.comment);else if(Je(w)){const $=Ie(w.key)?w.key:null;$&&(!b&&$.spaceBefore&&S.push(""),Vr(s,S,$.commentBefore,b))}b=!1;let E=Vi(w,x,()=>N=null,()=>b=!0);N&&(E+=Ha(E,u,g(N))),b&&N&&(b=!1),S.push(r+E)}let A;if(S.length===0)A=o.start+o.end;else{A=S[0];for(let O=1;O<S.length;++O){const w=S[O];A+=w?`
|
|
53
|
+
${y}${w}`:`
|
|
54
|
+
`}}return a?(A+=`
|
|
55
|
+
`+Bn(g(a),y),m&&m()):b&&h&&h(),A}function Lx({items:a},i,{flowChars:s,itemIndent:r}){const{indent:o,indentStep:u,flowCollectionPadding:h,options:{commentString:m}}=i;r+=u;const y=Object.assign({},i,{indent:r,inFlow:!0,type:null});let g=!1,x=0;const b=[];for(let O=0;O<a.length;++O){const w=a[O];let N=null;if(Ie(w))w.spaceBefore&&b.push(""),Vr(i,b,w.commentBefore,!1),w.comment&&(N=w.comment);else if(Je(w)){const $=Ie(w.key)?w.key:null;$&&($.spaceBefore&&b.push(""),Vr(i,b,$.commentBefore,!1),$.comment&&(g=!0));const _=Ie(w.value)?w.value:null;_?(_.comment&&(N=_.comment),_.commentBefore&&(g=!0)):w.value==null&&$?.comment&&(N=$.comment)}N&&(g=!0);let E=Vi(w,y,()=>N=null);O<a.length-1&&(E+=","),N&&(E+=Ha(E,r,m(N))),!g&&(b.length>x||E.includes(`
|
|
56
|
+
`))&&(g=!0),b.push(E),x=b.length}const{start:S,end:A}=s;if(b.length===0)return S+A;if(!g){const O=b.reduce((w,N)=>w+N.length+2,2);g=i.options.lineWidth>0&&O>i.options.lineWidth}if(g){let O=S;for(const w of b)O+=w?`
|
|
57
|
+
${u}${o}${w}`:`
|
|
58
|
+
`;return`${O}
|
|
59
|
+
${o}${A}`}else return`${S}${h}${b.join(" ")}${h}${A}`}function Vr({indent:a,options:{commentString:i}},s,r,o){if(r&&o&&(r=r.replace(/^\n+/,"")),r){const u=Bn(i(r),a);s.push(u.trimStart())}}function qa(a,i){const s=Be(i)?i.value:i;for(const r of a)if(Je(r)&&(r.key===i||r.key===s||Be(r.key)&&r.key.value===s))return r}class Zt extends Vg{static get tagName(){return"tag:yaml.org,2002:map"}constructor(i){super(ga,i),this.items=[]}static from(i,s,r){const{keepUndefined:o,replacer:u}=r,h=new this(i),m=(y,g)=>{if(typeof u=="function")g=u.call(s,y,g);else if(Array.isArray(u)&&!u.includes(y))return;(g!==void 0||o)&&h.items.push(yd(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;Je(i)?r=i:!i||typeof i!="object"||!("key"in i)?r=new gt(i,i?.value):r=new gt(i.key,i.value);const o=qa(this.items,r.key),u=this.schema?.sortMapEntries;if(o){if(!s)throw new Error(`Key ${r.key} already set`);Be(o.value)&&Gg(r.value)?o.value.value=r.value:o.value=r.value}else if(u){const h=this.items.findIndex(m=>u(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 o=qa(this.items,i)?.value;return(!s&&Be(o)?o.value:o)??void 0}has(i){return!!qa(this.items,i)}set(i,s){this.add(new gt(i,s),!0)}toJSON(i,s,r){const o=r?new r:s?.mapAsMap?new Map:{};s?.onCreate&&s.onCreate(o);for(const u of this.items)Ig(s,o,u);return o}toString(i,s,r){if(!i)return JSON.stringify(this);for(const o of this.items)if(!Je(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!i.allNullValues&&this.hasAllNullValues(!1)&&(i=Object.assign({},i,{allNullValues:!0})),Jg(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 nl(a)||i("Expected a mapping for this tag"),a},createNode:(a,i,s)=>Zt.from(a,i,s)};class $a extends Vg{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=Er(i);return typeof s!="number"?!1:this.items.splice(s,1).length>0}get(i,s){const r=Er(i);if(typeof r!="number")return;const o=this.items[r];return!s&&Be(o)?o.value:o}has(i){const s=Er(i);return typeof s=="number"&&s<this.items.length}set(i,s){const r=Er(i);if(typeof r!="number")throw new Error(`Expected a valid index, not ${i}.`);const o=this.items[r];Be(o)&&Gg(s)?o.value=s:this.items[r]=s}toJSON(i,s){const r=[];s?.onCreate&&s.onCreate(r);let o=0;for(const u of this.items)r.push(It(u,String(o++),s));return r}toString(i,s,r){return i?Jg(this,i,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(i.indent||"")+" ",onChompKeep:r,onComment:s}):JSON.stringify(this)}static from(i,s,r){const{replacer:o}=r,u=new this(i);if(s&&Symbol.iterator in Object(s)){let h=0;for(let m of s){if(typeof o=="function"){const y=s instanceof Set?m:String(h++);m=o.call(s,y,m)}u.items.push(Fs(m,void 0,r))}}return u}}function Er(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 al(a)||i("Expected a sequence for this tag"),a},createNode:(a,i,s)=>$a.from(a,i,s)},no={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),gd(a,i,s,r)}},ao={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"&&ao.test.test(a)?a:i.options.nullStr},vd={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&&vd.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 o=typeof r=="number"?r:Number(r);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let u=Object.is(r,-0)?"-0":JSON.stringify(r);if(!a&&i&&(!s||s==="tag:yaml.org,2002:float")&&/^\d/.test(u)){let h=u.indexOf(".");h<0&&(h=u.length,u+=".");let m=i-(u.length-h-1);for(;m-- >0;)u+="0"}return u}const Fg={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},Pg={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)}},Wg={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},io=a=>typeof a=="bigint"||Number.isInteger(a),bd=(a,i,s,{intAsBigInt:r})=>r?BigInt(a):parseInt(a.substring(i),s);function ey(a,i,s){const{value:r}=a;return io(r)&&r>=0?s+r.toString(i):rn(a)}const ty={identify:a=>io(a)&&a>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(a,i,s)=>bd(a,2,8,s),stringify:a=>ey(a,8,"0o")},ny={identify:io,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(a,i,s)=>bd(a,0,10,s),stringify:rn},ay={identify:a=>io(a)&&a>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(a,i,s)=>bd(a,2,16,s),stringify:a=>ey(a,16,"0x")},Ux=[Ii,Ji,no,ao,vd,ty,ny,ay,Fg,Pg,Wg];function Fp(a){return typeof a=="bigint"||Number.isInteger(a)}const Ar=({value:a})=>JSON.stringify(a),Bx=[{identify:a=>typeof a=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:a=>a,stringify:Ar},{identify:a=>a==null,createNode:()=>new be(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Ar},{identify:a=>typeof a=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:a=>a==="true",stringify:Ar},{identify:Fp,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})=>Fp(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:Ar}],Hx={default:!0,tag:"",test:/^/,resolve(a,i){return i(`Unresolved plain scalar ${JSON.stringify(a)}`),a}},qx=[Ii,Ji].concat(Bx,Hx),xd={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 o=0;o<s.length;++o)r[o]=s.charCodeAt(o);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,o,u){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 gd({comment:a,type:i,value:m},r,o,u)}};function iy(a,i){if(al(a))for(let s=0;s<a.items.length;++s){let r=a.items[s];if(!Je(r)){if(nl(r)){r.items.length>1&&i("Each pair must have its own sequence indicator");const o=r.items[0]||new gt(new be(null));if(r.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${r.commentBefore}
|
|
61
|
+
${o.key.commentBefore}`:r.commentBefore),r.comment){const u=o.value??o.key;u.comment=u.comment?`${r.comment}
|
|
62
|
+
${u.comment}`:r.comment}r=o}a.items[s]=Je(r)?r:new gt(r)}}else i("Expected a sequence for this tag");return a}function sy(a,i,s){const{replacer:r}=s,o=new $a(a);o.tag="tag:yaml.org,2002:pairs";let u=0;if(i&&Symbol.iterator in Object(i))for(let h of i){typeof r=="function"&&(h=r.call(i,String(u++),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;o.items.push(yd(m,y,s))}return o}const Sd={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:iy,createNode:sy};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 o of this.items){let u,h;if(Je(o)?(u=It(o.key,"",s),h=It(o.value,u,s)):u=It(o,"",s),r.has(u))throw new Error("Ordered maps must not include duplicate keys");r.set(u,h)}return r}static from(i,s,r){const o=sy(i,s,r),u=new this;return u.items=o.items,u}}qi.tag="tag:yaml.org,2002:omap";const wd={collection:"seq",identify:a=>a instanceof Map,nodeClass:qi,default:!1,tag:"tag:yaml.org,2002:omap",resolve(a,i){const s=iy(a,i),r=[];for(const{key:o}of s.items)Be(o)&&(r.includes(o.value)?i(`Ordered maps must not include duplicate keys: ${o.value}`):r.push(o.value));return Object.assign(new qi,s)},createNode:(a,i,s)=>qi.from(a,i,s)};function ly({value:a,source:i},s){return i&&(a?ry:oy).test.test(i)?i:a?s.options.trueStr:s.options.falseStr}const ry={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:ly},oy={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:ly},$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},Kx={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)}},Yx={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},il=a=>typeof a=="bigint"||Number.isInteger(a);function so(a,i,s,{intAsBigInt:r}){const o=a[0];if((o==="-"||o==="+")&&(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 o==="-"?BigInt(-1)*h:h}const u=parseInt(a,s);return o==="-"?-1*u:u}function jd(a,i,s){const{value:r}=a;if(il(r)){const o=r.toString(i);return r<0?"-"+s+o.substr(1):s+o}return rn(a)}const Gx={identify:il,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(a,i,s)=>so(a,2,2,s),stringify:a=>jd(a,2,"0b")},Vx={identify:il,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(a,i,s)=>so(a,1,8,s),stringify:a=>jd(a,8,"0")},Qx={identify:il,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(a,i,s)=>so(a,0,10,s),stringify:rn},Xx={identify:il,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(a,i,s)=>so(a,2,16,s),stringify:a=>jd(a,16,"0x")};class $i extends Zt{constructor(i){super(i),this.tag=$i.tag}add(i){let s;Je(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&&Je(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:o}=r,u=new this(i);if(s&&Symbol.iterator in Object(s))for(let h of s)typeof o=="function"&&(h=o.call(s,h,h)),u.items.push(yd(h,null,r));return u}}$i.tag="tag:yaml.org,2002:set";const Nd={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(nl(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 Cd(a,i){const s=a[0],r=s==="-"||s==="+"?a.substring(1):a,o=h=>i?BigInt(h):Number(h),u=r.replace(/_/g,"").split(":").reduce((h,m)=>h*o(60)+o(m),o(0));return s==="-"?o(-1)*u:u}function cy(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 o=s(60),u=[i%o];return i<60?u.unshift(0):(i=(i-u[0])/o,u.unshift(i%o),i>=60&&(i=(i-u[0])/o,u.unshift(i))),r+u.map(h=>String(h).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const uy={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})=>Cd(a,s),stringify:cy},dy={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=>Cd(a,!1),stringify:cy},lo={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(lo.test);if(!i)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,s,r,o,u,h,m]=i.map(Number),y=i[7]?Number((i[7]+"00").substr(1,3)):0;let g=Date.UTC(s,r-1,o,u||0,h||0,m||0,y);const x=i[8];if(x&&x!=="Z"){let b=Cd(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$/,"")??""},Pp=[Ii,Ji,no,ao,ry,oy,Gx,Vx,Qx,Xx,$x,Kx,Yx,xd,Hn,wd,Sd,Nd,uy,dy,lo],Wp=new Map([["core",Ux],["failsafe",[Ii,Ji,no]],["json",qx],["yaml11",Pp],["yaml-1.1",Pp]]),eg={binary:xd,bool:vd,float:Wg,floatExp:Pg,floatNaN:Fg,floatTime:dy,int:ny,intHex:ay,intOct:ty,intTime:uy,map:Ii,merge:Hn,null:ao,omap:wd,pairs:Sd,seq:Ji,set:Nd,timestamp:lo},Zx={"tag:yaml.org,2002:binary":xd,"tag:yaml.org,2002:merge":Hn,"tag:yaml.org,2002:omap":wd,"tag:yaml.org,2002:pairs":Sd,"tag:yaml.org,2002:set":Nd,"tag:yaml.org,2002:timestamp":lo};function Bu(a,i,s){const r=Wp.get(i);if(r&&!a)return s&&!r.includes(Hn)?r.concat(Hn):r.slice();let o=r;if(!o)if(Array.isArray(a))o=[];else{const u=Array.from(Wp.keys()).filter(h=>h!=="yaml11").map(h=>JSON.stringify(h)).join(", ");throw new Error(`Unknown schema "${i}"; use one of ${u} or define customTags array`)}if(Array.isArray(a))for(const u of a)o=o.concat(u);else typeof a=="function"&&(o=a(o.slice()));return s&&(o=o.concat(Hn)),o.reduce((u,h)=>{const m=typeof h=="string"?eg[h]:h;if(!m){const y=JSON.stringify(h),g=Object.keys(eg).map(x=>JSON.stringify(x)).join(", ");throw new Error(`Unknown custom tag ${y}; use one of ${g}`)}return u.includes(m)||u.push(m),u},[])}const Ix=(a,i)=>a.key<i.key?-1:a.key>i.key?1:0;class Ed{constructor({compat:i,customTags:s,merge:r,resolveKnownTags:o,schema:u,sortMapEntries:h,toStringDefaults:m}){this.compat=Array.isArray(i)?Bu(i,"compat"):i?Bu(null,i):null,this.name=typeof u=="string"&&u||"core",this.knownTags=o?Zx:{},this.tags=Bu(s,this.name,r),this.toStringOptions=m??null,Object.defineProperty(this,ga,{value:Ii}),Object.defineProperty(this,pn,{value:no}),Object.defineProperty(this,Xi,{value:Ji}),this.sortMapEntries=typeof h=="function"?h:h===!0?Ix:null}clone(){const i=Object.create(Ed.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 o=Xg(a,i),{commentString:u}=o.options;if(a.commentBefore){s.length!==1&&s.unshift("");const y=u(a.commentBefore);s.unshift(Bn(y,""))}let h=!1,m=null;if(a.contents){if(Ie(a.contents)){if(a.contents.spaceBefore&&r&&s.push(""),a.contents.commentBefore){const x=u(a.contents.commentBefore);s.push(Bn(x,""))}o.forceBlockIndent=!!a.comment,m=a.contents.comment}const y=m?void 0:()=>h=!0;let g=Vi(a.contents,o,()=>m=null,y);m&&(g+=Ha(g,"",u(m))),(g[0]==="|"||g[0]===">")&&s[s.length-1]==="---"?s[s.length-1]=`--- ${g}`:s.push(g)}else s.push(Vi(a.contents,o));if(a.directives?.docEnd)if(a.comment){const y=u(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(u(y),"")))}return s.join(`
|
|
64
|
+
`)+`
|
|
65
|
+
`}class ro{constructor(i,s,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Jt,{value:ed});let o=null;typeof s=="function"||Array.isArray(s)?o=s:r===void 0&&s&&(r=s,s=void 0);const u=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=u;let{version:h}=u;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,o,r)}clone(){const i=Object.create(ro.prototype,{[Jt]:{value:ed}});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=Ie(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=Kg(this);i.anchor=!s||r.has(s)?Yg(s||"a",r):s}return new pd(i.anchor)}createNode(i,s,r){let o;if(typeof s=="function")i=s.call({"":i},"",i),o=s;else if(Array.isArray(s)){const N=$=>typeof $=="number"||$ instanceof String||$ instanceof Number,E=s.filter(N).map(String);E.length>0&&(s=s.concat(E)),o=s}else r===void 0&&s&&(r=s,s=void 0);const{aliasDuplicateObjects:u,anchorPrefix:h,flow:m,keepUndefined:y,onTagObj:g,tag:x}=r??{},{onAnchor:b,setAnchors:S,sourceObjects:A}=jx(this,h||"a"),O={aliasDuplicateObjects:u??!0,keepUndefined:y??!1,onAnchor:b,onTagObj:g,replacer:o,schema:this.schema,sourceObjects:A},w=Fs(i,x,O);return m&&Ze(w)&&(w.flow=!0),S(),w}createPair(i,s,r={}){const o=this.createNode(i,null,r),u=this.createNode(s,null,r);return new gt(o,u)}delete(i){return _i(this.contents)?this.contents.delete(i):!1}deleteIn(i){return Zs(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 Zs(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 Zs(i)?this.contents!==void 0:Ze(this.contents)?this.contents.hasIn(i):!1}set(i,s){this.contents==null?this.contents=Gr(this.schema,[i],s):_i(this.contents)&&this.contents.set(i,s)}setIn(i,s){Zs(i)?this.contents=s:this.contents==null?this.contents=Gr(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 o=JSON.stringify(i);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(s.schema instanceof Object)this.schema=s.schema;else if(r)this.schema=new Ed(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:o,onAnchor:u,reviver:h}={}){const m={anchors:new Map,doc:this,keep:!i,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},y=It(this.contents,s??"",m);if(typeof u=="function")for(const{count:g,res:x}of m.anchors.values())u(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 fy extends Error{constructor(i,s,r,o){super(),this.name=i,this.code=r,this.message=o,this.pos=s}}class kr extends fy{constructor(i,s,r){super("YAMLParseError",i,s,r)}}class Fx extends fy{constructor(i,s,r){super("YAMLWarning",i,s,r)}}const tg=(a,i)=>s=>{if(s.pos[0]===-1)return;s.linePos=s.pos.map(m=>i.linePos(m));const{line:r,col:o}=s.linePos[0];s.message+=` at line ${r}, column ${o}`;let u=o-1,h=a.substring(i.lineStarts[r-1],i.lineStarts[r]).replace(/[\n\r]+$/,"");if(u>=60&&h.length>80){const m=Math.min(u-39,h.length-79);h="…"+h.substring(m),u-=m-1}if(h.length>80&&(h=h.substring(0,79)+"…"),r>1&&/^ *$/.test(h.substring(0,u))){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>o&&(m=Math.max(1,Math.min(y.col-o,80-u)));const g=" ".repeat(u)+"^".repeat(m);s.message+=`:
|
|
67
|
+
|
|
68
|
+
${h}
|
|
69
|
+
${g}
|
|
70
|
+
`}};function Qi(a,{flow:i,indicator:s,next:r,offset:o,onError:u,parentIndent:h,startOnNewline:m}){let y=!1,g=m,x=m,b="",S="",A=!1,O=!1,w=null,N=null,E=null,$=null,_=null,M=null,L=null;for(const D of a)switch(O&&(D.type!=="space"&&D.type!=="newline"&&D.type!=="comma"&&u(D.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),O=!1),w&&(g&&D.type!=="comment"&&D.type!=="newline"&&u(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),D.type){case"space":!i&&(s!=="doc-start"||r?.type!=="flow-collection")&&D.source.includes(" ")&&(w=D),x=!0;break;case"comment":{x||u(D,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const P=D.source.substring(1)||" ";b?b+=S+P:b=P,S="",g=!1;break}case"newline":g?b?b+=D.source:(!M||s!=="seq-item-ind")&&(y=!0):S+=D.source,g=!0,A=!0,(N||E)&&($=D),x=!0;break;case"anchor":N&&u(D,"MULTIPLE_ANCHORS","A node can have at most one anchor"),D.source.endsWith(":")&&u(D.offset+D.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),N=D,L??(L=D.offset),g=!1,x=!1,O=!0;break;case"tag":{E&&u(D,"MULTIPLE_TAGS","A node can have at most one tag"),E=D,L??(L=D.offset),g=!1,x=!1,O=!0;break}case s:(N||E)&&u(D,"BAD_PROP_ORDER",`Anchors and tags must be after the ${D.source} indicator`),M&&u(D,"UNEXPECTED_TOKEN",`Unexpected ${D.source} in ${i??"collection"}`),M=D,g=s==="seq-item-ind"||s==="explicit-key-ind",x=!1;break;case"comma":if(i){_&&u(D,"UNEXPECTED_TOKEN",`Unexpected , in ${i}`),_=D,g=!1,x=!1;break}default:u(D,"UNEXPECTED_TOKEN",`Unexpected ${D.type} token`),g=!1,x=!1}const G=a[a.length-1],X=G?G.offset+G.source.length:o;return O&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&u(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")&&u(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:_,found:M,spaceBefore:y,comment:b,hasNewline:A,anchor:N,tag:E,newlineAfterProp:$,end:X,start:L??X}}function Ps(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(Ps(i.key)||Ps(i.value))return!0}return!1;default:return!0}}function id(a,i,s){if(i?.type==="flow-collection"){const r=i.end[0];r.indent===a&&(r.source==="]"||r.source==="}")&&Ps(i)&&s(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function hy(a,i,s){const{uniqueKeys:r}=a.options;if(r===!1)return!1;const o=typeof r=="function"?r:(u,h)=>u===h||Be(u)&&Be(h)&&u.value===h.value;return i.some(u=>o(u.key,s))}const ng="All mapping items must start at the same column";function Px({composeNode:a,composeEmptyNode:i},s,r,o,u){const h=u?.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:A,value:O}=x,w=Qi(b,{indicator:"explicit-key-ind",next:S??A?.[0],offset:y,onError:o,parentIndent:r.indent,startOnNewline:!0}),N=!w.found;if(N){if(S&&(S.type==="block-seq"?o(y,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in S&&S.indent!==r.indent&&o(y,"BAD_INDENT",ng)),!w.anchor&&!w.tag&&!A){g=w.end,w.comment&&(m.comment?m.comment+=`
|
|
72
|
+
`+w.comment:m.comment=w.comment);continue}(w.newlineAfterProp||Ps(S))&&o(S??b[b.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else w.found?.indent!==r.indent&&o(y,"BAD_INDENT",ng);s.atKey=!0;const E=w.end,$=S?a(s,S,w,o):i(s,E,b,null,w,o);s.schema.compat&&id(r.indent,S,o),s.atKey=!1,hy(s,m.items,$)&&o(E,"DUPLICATE_KEY","Map keys must be unique");const _=Qi(A??[],{indicator:"map-value-ind",next:O,offset:$.range[2],onError:o,parentIndent:r.indent,startOnNewline:!S||S.type==="block-scalar"});if(y=_.end,_.found){N&&(O?.type==="block-map"&&!_.hasNewline&&o(y,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),s.options.strict&&w.start<_.found.offset-1024&&o($.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const M=O?a(s,O,_,o):i(s,y,A,null,_,o);s.schema.compat&&id(r.indent,O,o),y=M.range[2];const L=new gt($,M);s.options.keepSourceTokens&&(L.srcToken=x),m.items.push(L)}else{N&&o($.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),_.comment&&($.comment?$.comment+=`
|
|
73
|
+
`+_.comment:$.comment=_.comment);const M=new gt($);s.options.keepSourceTokens&&(M.srcToken=x),m.items.push(M)}}return g&&g<y&&o(g,"IMPOSSIBLE","Map comment with trailing content"),m.range=[r.offset,y,g??y],m}function Wx({composeNode:a,composeEmptyNode:i},s,r,o,u){const h=u?.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:o,parentIndent:r.indent,startOnNewline:!0});if(!S.found)if(S.anchor||S.tag||b)b?.type==="block-seq"?o(S.end,"BAD_INDENT","All sequence items must start at the same column"):o(y,"MISSING_CHAR","Sequence item without - indicator");else{g=S.end,S.comment&&(m.comment=S.comment);continue}const A=b?a(s,b,S,o):i(s,S.end,x,null,S,o);s.schema.compat&&id(r.indent,b,o),y=A.range[2],m.items.push(A)}return m.range=[r.offset,y,g??y],m}function sl(a,i,s,r){let o="";if(a){let u=!1,h="";for(const m of a){const{source:y,type:g}=m;switch(g){case"space":u=!0;break;case"comment":{s&&!u&&r(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const x=y.substring(1)||" ";o?o+=h+x:o=x,h="";break}case"newline":o&&(h+=y),u=!0;break;default:r(m,"UNEXPECTED_TOKEN",`Unexpected ${g} at node end`)}i+=y.length}}return{comment:o,offset:i}}const Hu="Block collections are not allowed within flow collections",qu=a=>a&&(a.type==="block-map"||a.type==="block-seq");function eS({composeNode:a,composeEmptyNode:i},s,r,o,u){const h=r.start.source==="{",m=h?"flow map":"flow sequence",y=u?.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 E=r.items[N],{start:$,key:_,sep:M,value:L}=E,G=Qi($,{flow:m,indicator:"explicit-key-ind",next:_??M?.[0],offset:b,onError:o,parentIndent:r.indent,startOnNewline:!1});if(!G.found){if(!G.anchor&&!G.tag&&!M&&!L){N===0&&G.comma?o(G.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`):N<r.items.length-1&&o(G.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${m}`),G.comment&&(g.comment?g.comment+=`
|
|
74
|
+
`+G.comment:g.comment=G.comment),b=G.end;continue}!h&&s.options.strict&&Ps(_)&&o(_,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(N===0)G.comma&&o(G.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`);else if(G.comma||o(G.start,"MISSING_CHAR",`Missing , between ${m} items`),G.comment){let X="";e:for(const D of $)switch(D.type){case"comma":case"space":break;case"comment":X=D.source.substring(1);break e;default:break e}if(X){let D=g.items[g.items.length-1];Je(D)&&(D=D.value??D.key),D.comment?D.comment+=`
|
|
75
|
+
`+X:D.comment=X,G.comment=G.comment.substring(X.length+1)}}if(!h&&!M&&!G.found){const X=L?a(s,L,G,o):i(s,G.end,M,null,G,o);g.items.push(X),b=X.range[2],qu(L)&&o(X.range,"BLOCK_IN_FLOW",Hu)}else{s.atKey=!0;const X=G.end,D=_?a(s,_,G,o):i(s,X,$,null,G,o);qu(_)&&o(D.range,"BLOCK_IN_FLOW",Hu),s.atKey=!1;const P=Qi(M??[],{flow:m,indicator:"map-value-ind",next:L,offset:D.range[2],onError:o,parentIndent:r.indent,startOnNewline:!1});if(P.found){if(!h&&!G.found&&s.options.strict){if(M)for(const se of M){if(se===P.found)break;if(se.type==="newline"){o(se,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}G.start<P.found.offset-1024&&o(P.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else L&&("source"in L&&L.source?.[0]===":"?o(L,"MISSING_CHAR",`Missing space after : in ${m}`):o(P.start,"MISSING_CHAR",`Missing , or : between ${m} items`));const Se=L?a(s,L,P,o):P.found?i(s,P.end,M,null,P,o):null;Se?qu(L)&&o(Se.range,"BLOCK_IN_FLOW",Hu):P.comment&&(D.comment?D.comment+=`
|
|
76
|
+
`+P.comment:D.comment=P.comment);const W=new gt(D,Se);if(s.options.keepSourceTokens&&(W.srcToken=E),h){const se=g;hy(s,se.items,D)&&o(X,"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??D).range;se.range=[D.range[0],ue[1],ue[2]],g.items.push(se)}b=Se?Se.range[2]:P.end}}const S=h?"}":"]",[A,...O]=r.end;let w=b;if(A?.source===S)w=A.offset+A.source.length;else{const N=m[0].toUpperCase()+m.substring(1),E=x?`${N} must end with a ${S}`:`${N} in block collection must be sufficiently indented and end with a ${S}`;o(b,x?"MISSING_CHAR":"BAD_INDENT",E),A&&A.source.length!==1&&O.unshift(A)}if(O.length>0){const N=sl(O,w,s.options.strict,o);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 $u(a,i,s,r,o,u){const h=s.type==="block-map"?Px(a,i,s,r,u):s.type==="block-seq"?Wx(a,i,s,r,u):eS(a,i,s,r,u),m=h.constructor;return o==="!"||o===m.tagName?(h.tag=m.tagName,h):(o&&(h.tag=o),h)}function tS(a,i,s,r,o){const u=r.tag,h=u?i.directives.tagName(u.source,S=>o(u,"TAG_RESOLVE_FAILED",S)):null;if(s.type==="block-seq"){const{anchor:S,newlineAfterProp:A}=r,O=S&&u?S.offset>u.offset?S:u:S??u;O&&(!A||A.offset<O.offset)&&o(O,"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(!u||!h||h==="!"||h===Zt.tagName&&m==="map"||h===$a.tagName&&m==="seq")return $u(a,i,s,o,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?o(u,"BAD_COLLECTION_TYPE",`${S.tag} used for ${m} collection, but expects ${S.collection??"scalar"}`,!0):o(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${h}`,!0),$u(a,i,s,o,h)}const g=$u(a,i,s,o,h,y),x=y.resolve?.(g,S=>o(u,"TAG_RESOLVE_FAILED",S),i.options)??g,b=Ie(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,o=aS(i,a.options.strict,s);if(!o)return{value:"",type:null,comment:"",range:[r,r,r]};const u=o.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=o.chomp==="+"&&h.length>0?`
|
|
78
|
+
`.repeat(Math.max(1,h.length-1)):"";let N=r+o.length;return i.source&&(N+=i.source.length),{value:w,type:u,comment:o.comment,range:[r,N,N]}}let y=i.indent+o.indent,g=i.offset+o.length,x=0;for(let w=0;w<m;++w){const[N,E]=h[w];if(E===""||E==="\r")o.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"),o.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+E.length+1}for(let w=h.length-1;w>=m;--w)h[w][0].length>y&&(m=w+1);let b="",S="",A=!1;for(let w=0;w<x;++w)b+=h[w][0].slice(y)+`
|
|
79
|
+
`;for(let w=x;w<m;++w){let[N,E]=h[w];g+=N.length+E.length+1;const $=E[E.length-1]==="\r";if($&&(E=E.slice(0,-1)),E&&N.length<y){const M=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;s(g-E.length-($?2:1),"BAD_INDENT",M),N=""}u===be.BLOCK_LITERAL?(b+=S+N.slice(y)+E,S=`
|
|
80
|
+
`):N.length>y||E[0]===" "?(S===" "?S=`
|
|
81
|
+
`:!A&&S===`
|
|
82
|
+
`&&(S=`
|
|
83
|
+
|
|
84
|
+
`),b+=S+N.slice(y)+E,S=`
|
|
85
|
+
`,A=!0):E===""?S===`
|
|
86
|
+
`?b+=`
|
|
87
|
+
`:S=`
|
|
88
|
+
`:(b+=S+E,S=" ",A=!1)}switch(o.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 O=r+o.length+i.source.length;return{value:b,type:u,comment:o.comment,range:[r,O,O]}}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:o}=i[0],u=o[0];let h=0,m="",y=-1;for(let S=1;S<o.length;++S){const A=o[S];if(!m&&(A==="-"||A==="+"))m=A;else{const O=Number(A);!h&&O?h=O:y===-1&&(y=a+S)}}y!==-1&&r(y,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let g=!1,x="",b=o.length;for(let S=1;S<i.length;++S){const A=i[S];switch(A.type){case"space":g=!0;case"newline":b+=A.source.length;break;case"comment":s&&!g&&r(A,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),b+=A.source.length,x=A.source.substring(1);break;case"error":r(A,"UNEXPECTED_TOKEN",A.message),b+=A.source.length;break;default:{const O=`Unexpected token in block scalar header: ${A.type}`;r(A,"UNEXPECTED_TOKEN",O);const w=A.source;w&&typeof w=="string"&&(b+=w.length)}}}return{mode:u,indent:h,chomp:m,comment:x,length:b}}function iS(a){const i=a.split(/\n( *)/),s=i[0],r=s.match(/^( *)/),u=[r?.[1]?[r[1],s.slice(r[1].length)]:["",s]];for(let h=1;h<i.length;h+=2)u.push([i[h],i[h+1]]);return u}function sS(a,i,s){const{offset:r,type:o,source:u,end:h}=a;let m,y;const g=(S,A,O)=>s(r+S,A,O);switch(o){case"scalar":m=be.PLAIN,y=lS(u,g);break;case"single-quoted-scalar":m=be.QUOTE_SINGLE,y=rS(u,g);break;case"double-quoted-scalar":m=be.QUOTE_DOUBLE,y=oS(u,g);break;default:return s(a,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[r,r+u.length,r+u.length]}}const x=r+u.length,b=sl(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}`),my(a)}function rS(a,i){return(a[a.length-1]!=="'"||a.length===1)&&i(a.length,"MISSING_CHAR","Missing closing 'quote"),my(a.slice(1,-1)).replace(/''/g,"'")}function my(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 o=r[1],u=" ",h=i.lastIndex;for(s.lastIndex=h;r=s.exec(a);)r[1]===""?u===`
|
|
95
|
+
`?o+=u:u=`
|
|
96
|
+
`:(o+=u+r[1],u=" "),h=s.lastIndex;const m=/[ \t]*(.*)/sy;return m.lastIndex=h,r=m.exec(a),o+u+(r?.[1]??"")}function oS(a,i){let s="";for(let r=1;r<a.length-1;++r){const o=a[r];if(!(o==="\r"&&a[r+1]===`
|
|
97
|
+
`))if(o===`
|
|
98
|
+
`){const{fold:u,offset:h}=cS(a,r);s+=u,r=h}else if(o==="\\"){let u=a[++r];const h=uS[u];if(h)s+=h;else if(u===`
|
|
99
|
+
`)for(u=a[r+1];u===" "||u===" ";)u=a[++r+1];else if(u==="\r"&&a[r+1]===`
|
|
100
|
+
`)for(u=a[++r+1];u===" "||u===" ";)u=a[++r+1];else if(u==="x"||u==="u"||u==="U"){const m={x:2,u:4,U:8}[u];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(o===" "||o===" "){const u=r;let h=a[r+1];for(;h===" "||h===" ";)h=a[++r+1];h!==`
|
|
101
|
+
`&&!(h==="\r"&&a[r+2]===`
|
|
102
|
+
`)&&(s+=r>u?a.slice(u,r+1):o)}else s+=o}return(a[a.length-1]!=='"'||a.length===1)&&i(a.length,"MISSING_CHAR",'Missing closing "quote'),s}function cS(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 o=a.substr(i,s),h=o.length===s&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,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 py(a,i,s,r){const{value:o,type:u,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,o,y,s,r):i.type==="scalar"?g=hS(a,o,i,r):g=a.schema[pn];let x;try{const b=g.resolve(o,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(o)}return x.range=m,x.source=o,u&&(x.type=u),y&&(x.tag=y),g.format&&(x.format=g.format),h&&(x.comment=h),x}function fS(a,i,s,r,o){if(s==="!")return a[pn];const u=[];for(const m of a.tags)if(!m.collection&&m.tag===s)if(m.default&&m.test)u.push(m);else return m;for(const m of u)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):(o(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,s!=="tag:yaml.org,2002:str"),a[pn])}function hS({atKey:a,directives:i,schema:s},r,o,u){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}`;u(o,"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 o=i[r];switch(o.type){case"space":case"comment":case"newline":a-=o.source.length;continue}for(o=i[++r];o?.type==="space";)a+=o.source.length,o=i[++r];break}}return a}const pS={composeNode:gy,composeEmptyNode:Ad};function gy(a,i,s,r){const o=a.atKey,{spaceBefore:u,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=py(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=Ad(a,i.offset,void 0,null,s,r),x=!1}}return m&&g.anchor===""&&r(m,"BAD_ALIAS","Anchor cannot be an empty string"),o&&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"),u&&(g.spaceBefore=!0),h&&(i.type==="scalar"&&i.source===""?g.comment=h:g.commentBefore=h),a.options.keepSourceTokens&&x&&(g.srcToken=i),g}function Ad(a,i,s,r,{spaceBefore:o,comment:u,anchor:h,tag:m,end:y},g){const x={type:"scalar",offset:mS(i,s,r),indent:-1,source:""},b=py(a,x,m,g);return h&&(b.anchor=h.source.substring(1),b.anchor===""&&g(h,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(b.spaceBefore=!0),u&&(b.comment=u,b.range[2]=y),b}function gS({options:a},{offset:i,source:s,end:r},o){const u=new pd(s.substring(1));u.source===""&&o(i,"BAD_ALIAS","Alias cannot be an empty string"),u.source.endsWith(":")&&o(i+s.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const h=i+s.length,m=sl(r,h,a.strict,o);return u.range=[i,h,m.offset],m.comment&&(u.comment=m.comment),u}function yS(a,i,{offset:s,start:r,value:o,end:u},h){const m=Object.assign({_directives:i},a),y=new ro(void 0,m),g={atKey:!1,atRoot:!0,directives:y.directives,options:y.options,schema:y.schema},x=Qi(r,{indicator:"doc-start",next:o??u?.[0],offset:s,onError:h,parentIndent:0,startOnNewline:!0});x.found&&(y.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!x.hasNewline&&h(x.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),y.contents=o?gy(g,o,x,h):Ad(g,x.end,r,null,x,h);const b=y.contents.range[2],S=sl(u,b,!1,h);return S.comment&&(y.comment=S.comment),y.range=[s,b,S.offset],y}function Qs(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 ag(a){let i="",s=!1,r=!1;for(let o=0;o<a.length;++o){const u=a[o];switch(u[0]){case"#":i+=(i===""?"":r?`
|
|
108
|
+
|
|
109
|
+
`:`
|
|
110
|
+
`)+(u.substring(1)||" "),s=!0,r=!1;break;case"%":a[o+1]?.[0]!=="#"&&(o+=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,o,u)=>{const h=Qs(s);u?this.warnings.push(new Fx(h,r,o)):this.errors.push(new kr(h,r,o))},this.directives=new pt({version:i.version||"1.2"}),this.options=i}decorate(i,s){const{comment:r,afterEmptyLine:o}=ag(this.prelude);if(r){const u=i.contents;if(s)i.comment=i.comment?`${i.comment}
|
|
111
|
+
${r}`:r;else if(o||i.directives.docStart||!u)i.commentBefore=r;else if(Ze(u)&&!u.flow&&u.items.length>0){let h=u.items[0];Je(h)&&(h=h.key);const m=h.commentBefore;h.commentBefore=m?`${r}
|
|
112
|
+
${m}`:r}else{const h=u.commentBefore;u.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:ag(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(i,s=!1,r=-1){for(const o of i)yield*this.next(o);yield*this.end(s,r)}*next(i){switch(i.type){case"directive":this.directives.add(i.source,(s,r,o)=>{const u=Qs(i);u[0]+=s,this.onError(u,"BAD_DIRECTIVE",r,o)}),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 kr(Qs(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 kr(Qs(i),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const s=sl(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 kr(Qs(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),o=new ro(void 0,r);this.atDirectives&&this.onError(s,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,s,s],this.decorate(o,!1),yield o}}}const yy="\uFEFF",vy="",by="",sd="";function bS(a){switch(a){case yy:return"byte-order-mark";case vy:return"doc-mode";case by:return"flow-error-end";case sd: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 ig=new Set("0123456789ABCDEFabcdef"),xS=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Tr=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 o=this.buffer[r+i+1];if(o===`
|
|
121
|
+
`||!o&&!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]===yy&&(yield*this.pushCount(1),i=i.substring(1)),i[0]==="%"){let s=i.length,r=i.indexOf("#");for(;r!==-1;){const u=i[r-1];if(u===" "||u===" "){s=r-1;break}else r=i.indexOf("#",r+1)}for(;;){const u=i[s-1];if(u===" "||u===" ")s-=1;else break}const o=(yield*this.pushCount(s))+(yield*this.pushSpaces(!0));return yield*this.pushCount(i.length-o),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 vy,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 o=this.getLine();if(o===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&o[0]!=="#"||r===0&&(o.startsWith("---")||o.startsWith("..."))&&sn(o[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield by,yield*this.parseLineStart();let u=0;for(;o[u]===",";)u+=yield*this.pushCount(1),u+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(u+=yield*this.pushIndicators(),o[u]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-u),"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 u=0;for(;this.buffer[s-1-u]==="\\";)u+=1;if(u%2===0)break;s=this.buffer.indexOf('"',s+1)}const r=this.buffer.substring(0,s);let o=r.indexOf(`
|
|
124
|
+
`,this.pos);if(o!==-1){for(;o!==-1;){const u=this.continueScalar(o+1);if(u===-1)break;o=r.indexOf(`
|
|
125
|
+
`,u)}o!==-1&&(s=o-(r[o-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 u=this.pos;r=this.buffer[u];++u)switch(r){case" ":s+=1;break;case`
|
|
126
|
+
`:i=u,s=0;break;case"\r":{const h=this.buffer[u+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 u=this.continueScalar(i+1);if(u===-1)break;i=this.buffer.indexOf(`
|
|
128
|
+
`,u)}while(i!==-1);if(i===-1){if(!this.atEnd)return this.setNext("block-scalar");i=this.buffer.length}}let o=i+1;for(r=this.buffer[o];r===" ";)r=this.buffer[++o];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|
129
|
+
`;)r=this.buffer[++o];i=o-1}else if(!this.blockScalarKeep)do{let u=i-1,h=this.buffer[u];h==="\r"&&(h=this.buffer[--u]);const m=u;for(;h===" ";)h=this.buffer[--u];if(h===`
|
|
130
|
+
`&&u>=this.pos&&u+1+s>m)i=u;else break}while(!0);return yield sd,yield*this.pushToIndex(i+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const i=this.flowLevel>0;let s=this.pos-1,r=this.pos-1,o;for(;o=this.buffer[++r];)if(o===":"){const u=this.buffer[r+1];if(sn(u)||i&&Tr.has(u))break;s=r}else if(sn(o)){let u=this.buffer[r+1];if(o==="\r"&&(u===`
|
|
131
|
+
`?(r+=1,o=`
|
|
132
|
+
`,u=this.buffer[r+1]):s=r),u==="#"||i&&Tr.has(u))break;if(o===`
|
|
133
|
+
`){const h=this.continueScalar(r+1);if(h===-1)break;r=Math.max(r,h-2)}}else{if(i&&Tr.has(o))break;s=r}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield sd,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&&Tr.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==="%"&&ig.has(this.buffer[i+1])&&ig.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 o=s-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=s),o}*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 u=s+r>>1;this.lineStarts[u]<i?s=u+1:r=u}if(this.lineStarts[s]===i)return{line:s+1,col:1};if(s===0)return{line:0,col:i};const o=this.lineStarts[s-1];return{line:s,col:i-o+1}}}}function pa(a,i){for(let s=0;s<a.length;++s)if(a[s].type===i)return!0;return!1}function sg(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 xy(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 Or(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 lg(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,xy(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"&&lg(s),r.type){case"document":r.value=s;break;case"block-scalar":r.props.push(s);break;case"block-map":{const o=r.items[r.items.length-1];if(o.value){r.items.push({start:[],key:s,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=s;else{Object.assign(o,{key:s,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{const o=r.items[r.items.length-1];o.value?r.items.push({start:[],value:s}):o.value=s;break}case"flow-collection":{const o=r.items[r.items.length-1];!o||o.value?r.items.push({start:[],key:s,sep:[]}):o.sep?o.value=s:Object.assign(o,{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 o=s.items[s.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&sg(o.start)===-1&&(s.indent===0||o.start.every(u=>u.type!=="comment"||u.indent<s.indent))&&(r.type==="document"?r.end=o.start:r.items.push({start:o.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":{sg(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=Or(this.peek(2)),r=Di(s);let o;i.end?(o=i.end,o.push(this.sourceToken),delete i.end):o=[this.sourceToken];const u={type:"block-map",offset:i.offset,indent:i.indent,items:[{start:r,key:i,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}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 o=i.items[i.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,s.start),o.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,o=r&&(s.sep||s.explicitKey)&&this.type!=="seq-item-ind";let u=[];if(o&&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&&(u=s.sep.splice(h[1]))}switch(this.type){case"anchor":case"tag":o||s.value?(u.push(this.sourceToken),i.items.push({start:u}),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):o||s.value?(u.push(this.sourceToken),i.items.push({start:u,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:u,key:null,sep:[this.sourceToken]}]});else if(xy(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 u.length>0?s.sep=s.sep.concat(u,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||o?i.items.push({start:u,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);o||s.value?(i.items.push({start:u,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:u});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 o=i.items[i.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,s.start),o.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 o=this.flowScalar(this.type);!s||s.value?i.items.push({start:[],key:o,sep:[]}):s.sep?this.stack.push(o):Object.assign(s,{key:o,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 o=Or(r),u=Di(o);lg(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:u,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=Or(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=Or(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),o=new NS(s?.addNewLine),u=new vS(i),h=Array.from(u.compose(o.parse(a)));if(r&&s)for(const m of h)m.errors.forEach(tg(a,s)),m.warnings.forEach(tg(a,s));return h.length>0?h:Object.assign([],{empty:!0},u.streamInfo())}function ya(a,i,{checkForDefaultPrevented:s=!0}={}){return function(o){if(a?.(o),s===!1||!o.defaultPrevented)return i?.(o)}}function rg(a,i){if(typeof a=="function")return a(i);a!=null&&(a.current=i)}function kd(...a){return i=>{let s=!1;const r=a.map(o=>{const u=rg(o,i);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let o=0;o<r.length;o++){const u=r[o];typeof u=="function"?u():rg(a[o],null)}}}}function Ga(...a){return j.useCallback(kd(...a),a)}function AS(a,i){const s=j.createContext(i),r=u=>{const{children:h,...m}=u,y=j.useMemo(()=>m,Object.values(m));return d.jsx(s.Provider,{value:y,children:h})};r.displayName=a+"Provider";function o(u){const h=j.useContext(s);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[r,o]}function kS(a,i=[]){let s=[];function r(u,h){const m=j.createContext(h),y=s.length;s=[...s,h];const g=b=>{const{scope:S,children:A,...O}=b,w=S?.[a]?.[y]||m,N=j.useMemo(()=>O,Object.values(O));return d.jsx(w.Provider,{value:N,children:A})};g.displayName=u+"Provider";function x(b,S){const A=S?.[a]?.[y]||m,O=j.useContext(A);if(O)return O;if(h!==void 0)return h;throw new Error(`\`${b}\` must be used within \`${u}\``)}return[g,x]}const o=()=>{const u=s.map(h=>j.createContext(h));return function(m){const y=m?.[a]||u;return j.useMemo(()=>({[`__scope${a}`]:{...m,[a]:y}}),[m,y])}};return o.scopeName=a,[r,TS(o,...i)]}function TS(...a){const i=a[0];if(a.length===1)return i;const s=()=>{const r=a.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(u){const h=r.reduce((m,{useScope:y,scopeName:g})=>{const b=y(u)[`__scope${g}`];return{...m,...b}},{});return j.useMemo(()=>({[`__scope${i.scopeName}`]:h}),[h])}};return s.scopeName=i.scopeName,s}var Ws=globalThis?.document?j.useLayoutEffect:()=>{},OS=fd[" useId ".trim().toString()]||(()=>{}),zS=0;function Yu(a){const[i,s]=j.useState(OS());return Ws(()=>{s(r=>r??String(zS++))},[a]),a||(i?`radix-${i}`:"")}var _S=fd[" useInsertionEffect ".trim().toString()]||Ws;function DS({prop:a,defaultProp:i,onChange:s=()=>{},caller:r}){const[o,u,h]=MS({defaultProp:i,onChange:s}),m=a!==void 0,y=m?a:o;{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 u(x)},[m,a,u,h]);return[y,g]}function MS({defaultProp:a,onChange:i}){const[s,r]=j.useState(a),o=j.useRef(s),u=j.useRef(i);return _S(()=>{u.current=i},[i]),j.useEffect(()=>{o.current!==s&&(u.current?.(s),o.current=s)},[s,o]),[s,r,u]}function RS(a){return typeof a=="function"}var Sy=Bg();const LS=Ug(Sy);function wy(a){const i=US(a),s=j.forwardRef((r,o)=>{const{children:u,...h}=r,m=j.Children.toArray(u),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 d.jsx(i,{...h,ref:o,children:j.isValidElement(g)?j.cloneElement(g,void 0,x):null})}return d.jsx(i,{...h,ref:o,children:u})});return s.displayName=`${a}.Slot`,s}function US(a){const i=j.forwardRef((s,r)=>{const{children:o,...u}=s;if(j.isValidElement(o)){const h=$S(o),m=qS(u,o.props);return o.type!==j.Fragment&&(m.ref=r?kd(r,h):h),j.cloneElement(o,m)}return j.Children.count(o)>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 o=a[r],u=i[r];/^on[A-Z]/.test(r)?o&&u?s[r]=(...m)=>{const y=u(...m);return o(...m),y}:o&&(s[r]=o):r==="style"?s[r]={...o,...u}:r==="className"&&(s[r]=[o,u].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 KS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qn=KS.reduce((a,i)=>{const s=wy(`Primitive.${i}`),r=j.forwardRef((o,u)=>{const{asChild:h,...m}=o,y=h?s:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(y,{...m,ref:u})});return r.displayName=`Primitive.${i}`,{...a,[i]:r}},{});function YS(a,i){a&&Sy.flushSync(()=>a.dispatchEvent(i))}function el(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=el(a);j.useEffect(()=>{const r=o=>{o.key==="Escape"&&s(o)};return i.addEventListener("keydown",r,{capture:!0}),()=>i.removeEventListener("keydown",r,{capture:!0})},[s,i])}var VS="DismissableLayer",ld="dismissableLayer.update",QS="dismissableLayer.pointerDownOutside",XS="dismissableLayer.focusOutside",og,jy=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ny=j.forwardRef((a,i)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:h,onDismiss:m,...y}=a,g=j.useContext(jy),[x,b]=j.useState(null),S=x?.ownerDocument??globalThis?.document,[,A]=j.useState({}),O=Ga(i,X=>b(X)),w=Array.from(g.layers),[N]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),E=w.indexOf(N),$=x?w.indexOf(x):-1,_=g.layersWithOutsidePointerEventsDisabled.size>0,M=$>=E,L=JS(X=>{const D=X.target,P=[...g.branches].some(Se=>Se.contains(D));!M||P||(o?.(X),h?.(X),X.defaultPrevented||m?.())},S),G=FS(X=>{const D=X.target;[...g.branches].some(Se=>Se.contains(D))||(u?.(X),h?.(X),X.defaultPrevented||m?.())},S);return GS(X=>{$===g.layers.size-1&&(r?.(X),!X.defaultPrevented&&m&&(X.preventDefault(),m()))},S),j.useEffect(()=>{if(x)return s&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(og=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(x)),g.layers.add(x),cg(),()=>{s&&g.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=og)}},[x,S,s,g]),j.useEffect(()=>()=>{x&&(g.layers.delete(x),g.layersWithOutsidePointerEventsDisabled.delete(x),cg())},[x,g]),j.useEffect(()=>{const X=()=>A({});return document.addEventListener(ld,X),()=>document.removeEventListener(ld,X)},[]),d.jsx(qn.div,{...y,ref:O,style:{pointerEvents:_?M?"auto":"none":void 0,...a.style},onFocusCapture:ya(a.onFocusCapture,G.onFocusCapture),onBlurCapture:ya(a.onBlurCapture,G.onBlurCapture),onPointerDownCapture:ya(a.onPointerDownCapture,L.onPointerDownCapture)})});Ny.displayName=VS;var ZS="DismissableLayerBranch",IS=j.forwardRef((a,i)=>{const s=j.useContext(jy),r=j.useRef(null),o=Ga(i,r);return j.useEffect(()=>{const u=r.current;if(u)return s.branches.add(u),()=>{s.branches.delete(u)}},[s.branches]),d.jsx(qn.div,{...a,ref:o})});IS.displayName=ZS;function JS(a,i=globalThis?.document){const s=el(a),r=j.useRef(!1),o=j.useRef(()=>{});return j.useEffect(()=>{const u=m=>{if(m.target&&!r.current){let y=function(){Cy(QS,s,g,{discrete:!0})};const g={originalEvent:m};m.pointerType==="touch"?(i.removeEventListener("click",o.current),o.current=y,i.addEventListener("click",o.current,{once:!0})):y()}else i.removeEventListener("click",o.current);r.current=!1},h=window.setTimeout(()=>{i.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(h),i.removeEventListener("pointerdown",u),i.removeEventListener("click",o.current)}},[i,s]),{onPointerDownCapture:()=>r.current=!0}}function FS(a,i=globalThis?.document){const s=el(a),r=j.useRef(!1);return j.useEffect(()=>{const o=u=>{u.target&&!r.current&&Cy(XS,s,{originalEvent:u},{discrete:!1})};return i.addEventListener("focusin",o),()=>i.removeEventListener("focusin",o)},[i,s]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function cg(){const a=new CustomEvent(ld);document.dispatchEvent(a)}function Cy(a,i,s,{discrete:r}){const o=s.originalEvent.target,u=new CustomEvent(a,{bubbles:!1,cancelable:!0,detail:s});i&&o.addEventListener(a,i,{once:!0}),r?YS(o,u):o.dispatchEvent(u)}var Gu="focusScope.autoFocusOnMount",Vu="focusScope.autoFocusOnUnmount",ug={bubbles:!1,cancelable:!0},PS="FocusScope",Ey=j.forwardRef((a,i)=>{const{loop:s=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:u,...h}=a,[m,y]=j.useState(null),g=el(o),x=el(u),b=j.useRef(null),S=Ga(i,w=>y(w)),A=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(r){let w=function(_){if(A.paused||!m)return;const M=_.target;m.contains(M)?b.current=M:ma(b.current,{select:!0})},N=function(_){if(A.paused||!m)return;const M=_.relatedTarget;M!==null&&(m.contains(M)||ma(b.current,{select:!0}))},E=function(_){if(document.activeElement===document.body)for(const L of _)L.removedNodes.length>0&&ma(m)};document.addEventListener("focusin",w),document.addEventListener("focusout",N);const $=new MutationObserver(E);return m&&$.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",N),$.disconnect()}}},[r,m,A.paused]),j.useEffect(()=>{if(m){fg.add(A);const w=document.activeElement;if(!m.contains(w)){const E=new CustomEvent(Gu,ug);m.addEventListener(Gu,g),m.dispatchEvent(E),E.defaultPrevented||(WS(i1(Ay(m)),{select:!0}),document.activeElement===w&&ma(m))}return()=>{m.removeEventListener(Gu,g),setTimeout(()=>{const E=new CustomEvent(Vu,ug);m.addEventListener(Vu,x),m.dispatchEvent(E),E.defaultPrevented||ma(w??document.body,{select:!0}),m.removeEventListener(Vu,x),fg.remove(A)},0)}}},[m,g,x,A]);const O=j.useCallback(w=>{if(!s&&!r||A.paused)return;const N=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(N&&E){const $=w.currentTarget,[_,M]=e1($);_&&M?!w.shiftKey&&E===M?(w.preventDefault(),s&&ma(_,{select:!0})):w.shiftKey&&E===_&&(w.preventDefault(),s&&ma(M,{select:!0})):E===$&&w.preventDefault()}},[s,r,A.paused]);return d.jsx(qn.div,{tabIndex:-1,...h,ref:S,onKeyDown:O})});Ey.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=Ay(a),s=dg(i,a),r=dg(i.reverse(),a);return[s,r]}function Ay(a){const i=[],s=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)i.push(s.currentNode);return i}function dg(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 fg=a1();function a1(){let a=[];return{add(i){const s=a[0];i!==s&&s?.pause(),a=hg(a,i),a.unshift(i)},remove(i){a=hg(a,i),a[0]?.resume()}}}function hg(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",ky=j.forwardRef((a,i)=>{const{container:s,...r}=a,[o,u]=j.useState(!1);Ws(()=>u(!0),[]);const h=s||o&&globalThis?.document?.body;return h?LS.createPortal(d.jsx(qn.div,{...r,ref:i}),h):null});ky.displayName=s1;function l1(a,i){return j.useReducer((s,r)=>i[s][r]??s,a)}var oo=a=>{const{present:i,children:s}=a,r=r1(i),o=typeof s=="function"?s({present:r.isPresent}):j.Children.only(s),u=Ga(r.ref,o1(o));return typeof s=="function"||r.isPresent?j.cloneElement(o,{ref:u}):null};oo.displayName="Presence";function r1(a){const[i,s]=j.useState(),r=j.useRef(null),o=j.useRef(a),u=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=zr(r.current);u.current=m==="mounted"?g:"none"},[m]),Ws(()=>{const g=r.current,x=o.current;if(x!==a){const S=u.current,A=zr(g);a?y("MOUNT"):A==="none"||g?.display==="none"?y("UNMOUNT"):y(x&&S!==A?"ANIMATION_OUT":"UNMOUNT"),o.current=a}},[a,y]),Ws(()=>{if(i){let g;const x=i.ownerDocument.defaultView??window,b=A=>{const w=zr(r.current).includes(CSS.escape(A.animationName));if(A.target===i&&w&&(y("ANIMATION_END"),!o.current)){const N=i.style.animationFillMode;i.style.animationFillMode="forwards",g=x.setTimeout(()=>{i.style.animationFillMode==="forwards"&&(i.style.animationFillMode=N)})}},S=A=>{A.target===i&&(u.current=zr(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 zr(a){return a?.animationName||"none"}function o1(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 Qu=0;function c1(){j.useEffect(()=>{const a=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",a[0]??mg()),document.body.insertAdjacentElement("beforeend",a[1]??mg()),Qu++,()=>{Qu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(i=>i.remove()),Qu--}},[])}function mg(){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,o=arguments.length;r<o;r++){s=arguments[r];for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(i[u]=s[u])}return i},mn.apply(this,arguments)};function Ty(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 o=0,r=Object.getOwnPropertySymbols(a);o<r.length;o++)i.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(a,r[o])&&(s[r[o]]=a[r[o]]);return s}function u1(a,i,s){if(s||arguments.length===2)for(var r=0,o=i.length,u;r<o;r++)(u||!(r in i))&&(u||(u=Array.prototype.slice.call(i,0,r)),u[r]=i[r]);return a.concat(u||Array.prototype.slice.call(i))}var Kr="right-scroll-bar-position",Yr="width-before-scroll-bar",d1="with-scroll-bars-hidden",f1="--removed-body-scroll-bar-size";function Xu(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 o=s.value;o!==r&&(s.value=r,s.callback(r,o))}}}})[0];return s.callback=i,s.facade}var m1=typeof window<"u"?j.useLayoutEffect:j.useEffect,pg=new WeakMap;function p1(a,i){var s=h1(null,function(r){return a.forEach(function(o){return Xu(o,r)})});return m1(function(){var r=pg.get(s);if(r){var o=new Set(r),u=new Set(a),h=s.current;o.forEach(function(m){u.has(m)||Xu(m,null)}),u.forEach(function(m){o.has(m)||Xu(m,h)})}pg.set(s,a)},[a]),s}function g1(a){return a}function y1(a,i){i===void 0&&(i=g1);var s=[],r=!1,o={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(u){var h=i(u,r);return s.push(h),function(){s=s.filter(function(m){return m!==h})}},assignSyncMedium:function(u){for(r=!0;s.length;){var h=s;s=[],h.forEach(u)}s={push:function(m){return u(m)},filter:function(){return s}}},assignMedium:function(u){r=!0;var h=[];if(s.length){var m=s;s=[],m.forEach(u),h=s}var y=function(){var x=h;h=[],x.forEach(u)},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 o}function v1(a){a===void 0&&(a={});var i=y1(null);return i.options=mn({async:!0,ssr:!1},a),i}var Oy=function(a){var i=a.sideCar,s=Ty(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))};Oy.isSideCarExport=!0;function b1(a,i){return a.useMedium(i),Oy}var zy=v1(),Zu=function(){},co=j.forwardRef(function(a,i){var s=j.useRef(null),r=j.useState({onScrollCapture:Zu,onWheelCapture:Zu,onTouchMoveCapture:Zu}),o=r[0],u=r[1],h=a.forwardProps,m=a.children,y=a.className,g=a.removeScrollBar,x=a.enabled,b=a.shards,S=a.sideCar,A=a.noRelative,O=a.noIsolation,w=a.inert,N=a.allowPinchZoom,E=a.as,$=E===void 0?"div":E,_=a.gapMode,M=Ty(a,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=S,G=p1([s,i]),X=mn(mn({},M),o);return j.createElement(j.Fragment,null,x&&j.createElement(L,{sideCar:zy,removeScrollBar:g,shards:b,noRelative:A,noIsolation:O,inert:w,setCallbacks:u,allowPinchZoom:!!N,lockRef:s,gapMode:_}),h?j.cloneElement(j.Children.only(m),mn(mn({},X),{ref:G})):j.createElement($,mn({},X,{className:y,ref:G}),m))});co.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};co.classNames={fullWidth:Yr,zeroRight:Kr};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])}},_y=function(){var a=C1(),i=function(s){var r=s.styles,o=s.dynamic;return a(r,o),null};return i},E1={left:0,top:0,right:0,gap:0},Iu=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"],o=i[a==="padding"?"paddingRight":"marginRight"];return[Iu(s),Iu(r),Iu(o)]},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=_y(),Ki="data-scroll-locked",O1=function(a,i,s,r){var o=a.left,u=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(Ki,`] {
|
|
145
|
+
overflow: hidden `).concat(r,`;
|
|
146
|
+
overscroll-behavior: contain;
|
|
147
|
+
`).concat([i&&"position: relative ".concat(r,";"),s==="margin"&&`
|
|
148
|
+
padding-left: `.concat(o,`px;
|
|
149
|
+
padding-top: `).concat(u,`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(Kr,` {
|
|
158
|
+
right: `).concat(m,"px ").concat(r,`;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.`).concat(Yr,` {
|
|
162
|
+
margin-right: `).concat(m,"px ").concat(r,`;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.`).concat(Kr," .").concat(Kr,` {
|
|
166
|
+
right: 0 `).concat(r,`;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.`).concat(Yr," .").concat(Yr,` {
|
|
170
|
+
margin-right: 0 `).concat(r,`;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
body[`).concat(Ki,`] {
|
|
174
|
+
`).concat(f1,": ").concat(m,`px;
|
|
175
|
+
}
|
|
176
|
+
`)},gg=function(){var a=parseInt(document.body.getAttribute(Ki)||"0",10);return isFinite(a)?a:0},z1=function(){j.useEffect(function(){return document.body.setAttribute(Ki,(gg()+1).toString()),function(){var a=gg()-1;a<=0?document.body.removeAttribute(Ki):document.body.setAttribute(Ki,a.toString())}},[])},_1=function(a){var i=a.noRelative,s=a.noImportant,r=a.gapMode,o=r===void 0?"margin":r;z1();var u=j.useMemo(function(){return k1(o)},[o]);return j.createElement(T1,{styles:O1(u,!i,o,s?"":"!important")})},rd=!1;if(typeof window<"u")try{var _r=Object.defineProperty({},"passive",{get:function(){return rd=!0,!0}});window.addEventListener("test",_r,_r),window.removeEventListener("test",_r,_r)}catch{rd=!1}var Mi=rd?{passive:!1}:!1,D1=function(a){return a.tagName==="TEXTAREA"},Dy=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 Dy(a,"overflowY")},R1=function(a){return Dy(a,"overflowX")},yg=function(a,i){var s=i.ownerDocument,r=i;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=My(a,r);if(o){var u=Ry(a,r),h=u[1],m=u[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]},My=function(a,i){return a==="v"?M1(i):R1(i)},Ry=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,o){var u=B1(a,window.getComputedStyle(i).direction),h=u*r,m=s.target,y=i.contains(m),g=!1,x=h>0,b=0,S=0;do{if(!m)break;var A=Ry(a,m),O=A[0],w=A[1],N=A[2],E=w-N-u*O;(O||E)&&My(a,m)&&(b+=E,S+=O);var $=m.parentNode;m=$&&$.nodeType===Node.DOCUMENT_FRAGMENT_NODE?$.host:$}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},Dr=function(a){return"changedTouches"in a?[a.changedTouches[0].clientX,a.changedTouches[0].clientY]:[0,0]},vg=function(a){return[a.deltaX,a.deltaY]},bg=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
|
+
`)},K1=0,Ri=[];function Y1(a){var i=j.useRef([]),s=j.useRef([0,0]),r=j.useRef(),o=j.useState(K1++)[0],u=j.useState(_y)[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(o));var w=u1([a.lockRef.current],(a.shards||[]).map(bg),!0).filter(Boolean);return w.forEach(function(N){return N.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(o))})}}},[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 E=Dr(w),$=s.current,_="deltaX"in w?w.deltaX:$[0]-E[0],M="deltaY"in w?w.deltaY:$[1]-E[1],L,G=w.target,X=Math.abs(_)>Math.abs(M)?"h":"v";if("touches"in w&&X==="h"&&G.type==="range")return!1;var D=window.getSelection(),P=D&&D.anchorNode,Se=P?P===G||P.contains(G):!1;if(Se)return!1;var W=yg(X,G);if(!W)return!0;if(W?L=X:(L=X==="v"?"h":"v",W=yg(X,G)),!W)return!1;if(!r.current&&"changedTouches"in w&&(_||M)&&(r.current=L),!L)return!0;var se=r.current||L;return H1(se,N,w,se==="h"?_:M)},[]),y=j.useCallback(function(w){var N=w;if(!(!Ri.length||Ri[Ri.length-1]!==u)){var E="deltaY"in N?vg(N):Dr(N),$=i.current.filter(function(L){return L.name===N.type&&(L.target===N.target||N.target===L.shadowParent)&&q1(L.delta,E)})[0];if($&&$.should){N.cancelable&&N.preventDefault();return}if(!$){var _=(h.current.shards||[]).map(bg).filter(Boolean).filter(function(L){return L.contains(N.target)}),M=_.length>0?m(N,_[0]):!h.current.noIsolation;M&&N.cancelable&&N.preventDefault()}}},[]),g=j.useCallback(function(w,N,E,$){var _={name:w,delta:N,target:E,should:$,shadowParent:G1(E)};i.current.push(_),setTimeout(function(){i.current=i.current.filter(function(M){return M!==_})},1)},[]),x=j.useCallback(function(w){s.current=Dr(w),r.current=void 0},[]),b=j.useCallback(function(w){g(w.type,vg(w),w.target,m(w,a.lockRef.current))},[]),S=j.useCallback(function(w){g(w.type,Dr(w),w.target,m(w,a.lockRef.current))},[]);j.useEffect(function(){return Ri.push(u),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!==u}),document.removeEventListener("wheel",y,Mi),document.removeEventListener("touchmove",y,Mi),document.removeEventListener("touchstart",x,Mi)}},[]);var A=a.removeScrollBar,O=a.inert;return j.createElement(j.Fragment,null,O?j.createElement(u,{styles:$1(o)}):null,A?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(zy,Y1);var Ly=j.forwardRef(function(a,i){return j.createElement(co,mn({},a,{ref:i,sideCar:V1}))});Ly.classNames=co.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,Mr=new WeakMap,Rr={},Ju=0,Uy=function(a){return a&&(a.host||Uy(a.parentNode))},X1=function(a,i){return i.map(function(s){if(a.contains(s))return s;var r=Uy(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 o=X1(i,Array.isArray(a)?a:[a]);Rr[s]||(Rr[s]=new WeakMap);var u=Rr[s],h=[],m=new Set,y=new Set(o),g=function(b){!b||m.has(b)||(m.add(b),g(b.parentNode))};o.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 A=S.getAttribute(r),O=A!==null&&A!=="false",w=(Li.get(S)||0)+1,N=(u.get(S)||0)+1;Li.set(S,w),u.set(S,N),h.push(S),w===1&&O&&Mr.set(S,!0),N===1&&S.setAttribute(s,"true"),O||S.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",S,E)}})};return x(i),m.clear(),Ju++,function(){h.forEach(function(b){var S=Li.get(b)-1,A=u.get(b)-1;Li.set(b,S),u.set(b,A),S||(Mr.has(b)||b.removeAttribute(r),Mr.delete(b)),A||b.removeAttribute(s)}),Ju--,Ju||(Li=new WeakMap,Li=new WeakMap,Mr=new WeakMap,Rr={})}},I1=function(a,i,s){s===void 0&&(s="data-aria-hidden");var r=Array.from(Array.isArray(a)?a:[a]),o=Q1(a);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Z1(r,o,s,"aria-hidden")):function(){return null}},uo="Dialog",[By]=kS(uo),[J1,on]=By(uo),Hy=a=>{const{__scopeDialog:i,children:s,open:r,defaultOpen:o,onOpenChange:u,modal:h=!0}=a,m=j.useRef(null),y=j.useRef(null),[g,x]=DS({prop:r,defaultProp:o??!1,onChange:u,caller:uo});return d.jsx(J1,{scope:i,triggerRef:m,contentRef:y,contentId:Yu(),titleId:Yu(),descriptionId:Yu(),open:g,onOpenChange:x,onOpenToggle:j.useCallback(()=>x(b=>!b),[x]),modal:h,children:s})};Hy.displayName=uo;var qy="DialogTrigger",F1=j.forwardRef((a,i)=>{const{__scopeDialog:s,...r}=a,o=on(qy,s),u=Ga(i,o.triggerRef);return d.jsx(qn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":zd(o.open),...r,ref:u,onClick:ya(a.onClick,o.onOpenToggle)})});F1.displayName=qy;var Td="DialogPortal",[P1,$y]=By(Td,{forceMount:void 0}),Ky=a=>{const{__scopeDialog:i,forceMount:s,children:r,container:o}=a,u=on(Td,i);return d.jsx(P1,{scope:i,forceMount:s,children:j.Children.map(r,h=>d.jsx(oo,{present:s||u.open,children:d.jsx(ky,{asChild:!0,container:o,children:h})}))})};Ky.displayName=Td;var Qr="DialogOverlay",Yy=j.forwardRef((a,i)=>{const s=$y(Qr,a.__scopeDialog),{forceMount:r=s.forceMount,...o}=a,u=on(Qr,a.__scopeDialog);return u.modal?d.jsx(oo,{present:r||u.open,children:d.jsx(ew,{...o,ref:i})}):null});Yy.displayName=Qr;var W1=wy("DialogOverlay.RemoveScroll"),ew=j.forwardRef((a,i)=>{const{__scopeDialog:s,...r}=a,o=on(Qr,s);return d.jsx(Ly,{as:W1,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(qn.div,{"data-state":zd(o.open),...r,ref:i,style:{pointerEvents:"auto",...r.style}})})}),Ka="DialogContent",Gy=j.forwardRef((a,i)=>{const s=$y(Ka,a.__scopeDialog),{forceMount:r=s.forceMount,...o}=a,u=on(Ka,a.__scopeDialog);return d.jsx(oo,{present:r||u.open,children:u.modal?d.jsx(tw,{...o,ref:i}):d.jsx(nw,{...o,ref:i})})});Gy.displayName=Ka;var tw=j.forwardRef((a,i)=>{const s=on(Ka,a.__scopeDialog),r=j.useRef(null),o=Ga(i,s.contentRef,r);return j.useEffect(()=>{const u=r.current;if(u)return I1(u)},[]),d.jsx(Vy,{...a,ref:o,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ya(a.onCloseAutoFocus,u=>{u.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:ya(a.onPointerDownOutside,u=>{const h=u.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0;(h.button===2||m)&&u.preventDefault()}),onFocusOutside:ya(a.onFocusOutside,u=>u.preventDefault())})}),nw=j.forwardRef((a,i)=>{const s=on(Ka,a.__scopeDialog),r=j.useRef(!1),o=j.useRef(!1);return d.jsx(Vy,{...a,ref:i,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{a.onCloseAutoFocus?.(u),u.defaultPrevented||(r.current||s.triggerRef.current?.focus(),u.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:u=>{a.onInteractOutside?.(u),u.defaultPrevented||(r.current=!0,u.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const h=u.target;s.triggerRef.current?.contains(h)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&o.current&&u.preventDefault()}})}),Vy=j.forwardRef((a,i)=>{const{__scopeDialog:s,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:u,...h}=a,m=on(Ka,s),y=j.useRef(null),g=Ga(i,y);return c1(),d.jsxs(d.Fragment,{children:[d.jsx(Ey,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:u,children:d.jsx(Ny,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":zd(m.open),...h,ref:g,onDismiss:()=>m.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(aw,{titleId:m.titleId}),d.jsx(sw,{contentRef:y,descriptionId:m.descriptionId})]})]})}),Od="DialogTitle",Qy=j.forwardRef((a,i)=>{const{__scopeDialog:s,...r}=a,o=on(Od,s);return d.jsx(qn.h2,{id:o.titleId,...r,ref:i})});Qy.displayName=Od;var Xy="DialogDescription",Zy=j.forwardRef((a,i)=>{const{__scopeDialog:s,...r}=a,o=on(Xy,s);return d.jsx(qn.p,{id:o.descriptionId,...r,ref:i})});Zy.displayName=Xy;var Iy="DialogClose",Jy=j.forwardRef((a,i)=>{const{__scopeDialog:s,...r}=a,o=on(Iy,s);return d.jsx(qn.button,{type:"button",...r,ref:i,onClick:ya(a.onClick,()=>o.onOpenChange(!1))})});Jy.displayName=Iy;function zd(a){return a?"open":"closed"}var Fy="DialogTitleWarning",[v2,Py]=AS(Fy,{contentName:Ka,titleName:Od,docsSlug:"dialog"}),aw=({titleId:a})=>{const i=Py(Fy),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 {${Py(iw).contentName}}.`;return j.useEffect(()=>{const o=a.current?.getAttribute("aria-describedby");i&&o&&(document.getElementById(i)||console.warn(r))},[r,a,i]),null},Wy=Hy,ev=Ky,_d=Yy,Dd=Gy,Md=Qy,tv=Zy,nv=Jy;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()),xg=a=>{const i=rw(a);return i.charAt(0).toUpperCase()+i.slice(1)},av=(...a)=>a.filter((i,s,r)=>!!i&&i.trim()!==""&&r.indexOf(i)===s).join(" ").trim(),ow=a=>{for(const i in a)if(i.startsWith("aria-")||i==="role"||i==="title")return!0};var cw={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:o="",children:u,iconNode:h,...m},y)=>j.createElement("svg",{ref:y,...cw,width:i,height:i,stroke:a,strokeWidth:r?Number(s)*24/Number(i):s,className:av("lucide",o),...!u&&!ow(m)&&{"aria-hidden":"true"},...m},[...h.map(([g,x])=>j.createElement(g,x)),...Array.isArray(u)?u:[u]]));const cn=(a,i)=>{const s=j.forwardRef(({className:r,...o},u)=>j.createElement(uw,{ref:u,iconNode:i,className:av(`lucide-${lw(xg(a))}`,`lucide-${a}`,r),...o}));return s.displayName=xg(a),s};const dw=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Rd=cn("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=cn("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=cn("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=cn("layout-dashboard",gw);const vw=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],bw=cn("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=cn("play",xw);const ww=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Sg=cn("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=cn("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=cn("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=cn("trash-2",Aw);const Tw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ld=cn("x",Tw);function iv(a){var i,s,r="";if(typeof a=="string"||typeof a=="number")r+=a;else if(typeof a=="object")if(Array.isArray(a)){var o=a.length;for(i=0;i<o;i++)a[i]&&(s=iv(a[i]))&&(r&&(r+=" "),r+=s)}else for(s in a)a[s]&&(r&&(r+=" "),r+=s);return r}function sv(){for(var a,i,s=0,r="",o=arguments.length;s<o;s++)(a=arguments[s])&&(i=iv(a))&&(r&&(r+=" "),r+=i);return r}const wg=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,jg=sv,lv=(a,i)=>s=>{var r;if(i?.variants==null)return jg(a,s?.class,s?.className);const{variants:o,defaultVariants:u}=i,h=Object.keys(o).map(g=>{const x=s?.[g],b=u?.[g];if(x===null)return null;const S=wg(x)||wg(b);return o[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,...A}=x;return Object.entries(A).every(O=>{let[w,N]=O;return Array.isArray(N)?N.includes({...u,...m}[w]):{...u,...m}[w]===N})?[...g,b,S]:g},[]);return jg(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}),rv=(a=new Map,i=null,s)=>({nextPart:a,validators:i,classGroupId:s}),Xr="-",Ng=[],_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(Xr),y=m[0]===""&&m.length>1?1:0;return ov(m,y,i)},getConflictingClassGroupIds:(h,m)=>{if(m){const y=r[h],g=s[h];return y?g?Ow(g,y):y:g||Ng}return s[h]||Ng}}},ov=(a,i,s)=>{if(a.length-i===0)return s.classGroupId;const o=a[i],u=s.nextPart.get(o);if(u){const g=ov(a,i+1,u);if(g)return g}const h=s.validators;if(h===null)return;const m=i===0?a.join(Xr):a.slice(i).join(Xr),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=rv();for(const r in a){const o=a[r];Ud(o,s,r,i)}return s},Ud=(a,i,s,r)=>{const o=a.length;for(let u=0;u<o;u++){const h=a[u];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:cv(i,a);r.classGroupId=s},Hw=(a,i,s,r)=>{if($w(a)){Ud(a(r),i,s,r);return}i.validators===null&&(i.validators=[]),i.validators.push(zw(s,a))},qw=(a,i,s,r)=>{const o=Object.entries(a),u=o.length;for(let h=0;h<u;h++){const[m,y]=o[h];Ud(y,cv(i,m),s,r)}},cv=(a,i)=>{let s=a;const r=i.split(Xr),o=r.length;for(let u=0;u<o;u++){const h=r[u];let m=s.nextPart.get(h);m||(m=rv(),s.nextPart.set(h,m)),s=m}return s},$w=a=>"isThemeGetter"in a&&a.isThemeGetter===!0,Kw=a=>{if(a<1)return{get:()=>{},set:()=>{}};let i=0,s=Object.create(null),r=Object.create(null);const o=(u,h)=>{s[u]=h,i++,i>a&&(i=0,r=s,s=Object.create(null))};return{get(u){let h=s[u];if(h!==void 0)return h;if((h=r[u])!==void 0)return o(u,h),h},set(u,h){u in s?s[u]=h:o(u,h)}}},od="!",Cg=":",Yw=[],Eg=(a,i,s,r,o)=>({modifiers:a,hasImportantModifier:i,baseClassName:s,maybePostfixModifierPosition:r,isExternal:o}),Gw=a=>{const{prefix:i,experimentalParseClassName:s}=a;let r=o=>{const u=[];let h=0,m=0,y=0,g;const x=o.length;for(let w=0;w<x;w++){const N=o[w];if(h===0&&m===0){if(N===Cg){u.push(o.slice(y,w)),y=w+1;continue}if(N==="/"){g=w;continue}}N==="["?h++:N==="]"?h--:N==="("?m++:N===")"&&m--}const b=u.length===0?o:o.slice(y);let S=b,A=!1;b.endsWith(od)?(S=b.slice(0,-1),A=!0):b.startsWith(od)&&(S=b.slice(1),A=!0);const O=g&&g>y?g-y:void 0;return Eg(u,A,S,O)};if(i){const o=i+Cg,u=r;r=h=>h.startsWith(o)?u(h.slice(o.length)):Eg(Yw,!1,h,void 0,!0)}if(s){const o=r;r=u=>s({className:u,parseClassName:o})}return r},Vw=a=>{const i=new Map;return a.orderSensitiveModifiers.forEach((s,r)=>{i.set(s,1e6+r)}),s=>{const r=[];let o=[];for(let u=0;u<s.length;u++){const h=s[u],m=h[0]==="[",y=i.has(h);m||y?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(h)):o.push(h)}return o.length>0&&(o.sort(),r.push(...o)),r}},Qw=a=>({cache:Kw(a.cacheSize),parseClassName:Gw(a),sortModifiers:Vw(a),...Dw(a)}),Xw=/\s+/,Zw=(a,i)=>{const{parseClassName:s,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:u}=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:A,baseClassName:O,maybePostfixModifierPosition:w}=s(x);if(b){y=x+(y.length>0?" "+y:y);continue}let N=!!w,E=r(N?O.substring(0,w):O);if(!E){if(!N){y=x+(y.length>0?" "+y:y);continue}if(E=r(O),!E){y=x+(y.length>0?" "+y:y);continue}N=!1}const $=S.length===0?"":S.length===1?S[0]:u(S).join(":"),_=A?$+od:$,M=_+E;if(h.indexOf(M)>-1)continue;h.push(M);const L=o(E,N);for(let G=0;G<L.length;++G){const X=L[G];h.push(_+X)}y=x+(y.length>0?" "+y:y)}return y},Iw=(...a)=>{let i=0,s,r,o="";for(;i<a.length;)(s=a[i++])&&(r=uv(s))&&(o&&(o+=" "),o+=r);return o},uv=a=>{if(typeof a=="string")return a;let i,s="";for(let r=0;r<a.length;r++)a[r]&&(i=uv(a[r]))&&(s&&(s+=" "),s+=i);return s},Jw=(a,...i)=>{let s,r,o,u;const h=y=>{const g=i.reduce((x,b)=>b(x),a());return s=Qw(g),r=s.cache.get,o=s.cache.set,u=m,m(y)},m=y=>{const g=r(y);if(g)return g;const x=Zw(y,s);return o(y,x),x};return u=h,(...y)=>u(Iw(...y))},Fw=[],at=a=>{const i=s=>s[a]||Fw;return i.isThemeGetter=!0,i},dv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fv=/^\((?:(\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)),Fu=a=>a.endsWith("%")&&je(a.slice(0,-1)),Un=a=>Ww.test(a),hv=()=>!0,ij=a=>ej.test(a)&&!tj.test(a),Bd=()=>!1,sj=a=>nj.test(a),lj=a=>aj.test(a),rj=a=>!re(a)&&!oe(a),oj=a=>va(a,gv,Bd),re=a=>dv.test(a),Ua=a=>va(a,yv,ij),Ag=a=>va(a,gj,je),cj=a=>va(a,bv,hv),uj=a=>va(a,vv,Bd),kg=a=>va(a,mv,Bd),dj=a=>va(a,pv,lj),Lr=a=>va(a,xv,sj),oe=a=>fv.test(a),Xs=a=>Va(a,yv),fj=a=>Va(a,vv),Tg=a=>Va(a,mv),hj=a=>Va(a,gv),mj=a=>Va(a,pv),Ur=a=>Va(a,xv,!0),pj=a=>Va(a,bv,!0),va=(a,i,s)=>{const r=dv.exec(a);return r?r[1]?i(r[1]):s(r[2]):!1},Va=(a,i,s=!1)=>{const r=fv.exec(a);return r?r[1]?i(r[1]):s:!1},mv=a=>a==="position"||a==="percentage",pv=a=>a==="image"||a==="url",gv=a=>a==="length"||a==="size"||a==="bg-size",yv=a=>a==="length",gj=a=>a==="number",vv=a=>a==="family-name",bv=a=>a==="number"||a==="weight",xv=a=>a==="shadow",yj=()=>{const a=at("color"),i=at("font"),s=at("text"),r=at("font-weight"),o=at("tracking"),u=at("leading"),h=at("breakpoint"),m=at("container"),y=at("spacing"),g=at("radius"),x=at("shadow"),b=at("inset-shadow"),S=at("text-shadow"),A=at("drop-shadow"),O=at("blur"),w=at("perspective"),N=at("aspect"),E=at("ease"),$=at("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...M(),oe,re],G=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto","contain","none"],D=()=>[oe,re,y],P=()=>[fa,"full","auto",...D()],Se=()=>[ha,"none","subgrid",oe,re],W=()=>["auto",{span:["full",ha,oe,re]},ha,oe,re],se=()=>[ha,"auto",oe,re],ue=()=>["auto","min","max","fr",oe,re],ye=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...D()],J=()=>[fa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],ne=()=>[fa,"screen","full","dvw","lvw","svw","min","max","fit",...D()],fe=()=>[fa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...D()],I=()=>[a,oe,re],k=()=>[...M(),Tg,kg,{position:[oe,re]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",hj,oj,{size:[oe,re]}],R=()=>[Fu,Xs,Ua],F=()=>["","none","full",g,oe,re],ie=()=>["",je,Xs,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"],ge=()=>[je,Fu,Tg,kg],Pt=()=>["","none",O,oe,re],Rt=()=>["none",je,oe,re],Wt=()=>["none",je,oe,re],gn=()=>[je,oe,re],yt=()=>[fa,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Un],breakpoint:[Un],color:[hv],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,oe,N]}],container:["container"],columns:[{columns:[je,re,oe,m]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:X()}],"overscroll-x":[{"overscroll-x":X()}],"overscroll-y":[{"overscroll-y":X()}],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",oe,re]}],basis:[{basis:[fa,"full","auto",m,...D()]}],"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,oe,re]}],shrink:[{shrink:["",je,oe,re]}],order:[{order:[ha,"first","last","none",oe,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:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...ye(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...ye()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":ye()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pbs:[{pbs:D()}],pbe:[{pbe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"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,Xs,Ua]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,pj,cj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Fu,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:[o,oe,re]}],"line-clamp":[{"line-clamp":[je,"none",oe,Ag]}],leading:[{leading:[u,...D()]}],"list-image":[{"list-image":["none",oe,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,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",oe,Ua]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[je,"auto",oe,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe,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",oe,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:k()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ha,oe,re],radial:["",oe,re],conic:[ha,oe,re]},mj,dj]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:R()}],"gradient-via-pos":[{via:R()}],"gradient-to-pos":[{to:R()}],"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,oe,re]}],"outline-w":[{outline:["",je,Xs,Ua]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",x,Ur,Lr]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",b,Ur,Lr]}],"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,Ur,Lr]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[je,oe,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":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"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":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"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":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"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":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"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":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"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":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"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":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[oe,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"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":M()}],"mask-image-conic-pos":[{"mask-conic":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"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:k()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,re]}],filter:[{filter:["","none",oe,re]}],blur:[{blur:Pt()}],brightness:[{brightness:[je,oe,re]}],contrast:[{contrast:[je,oe,re]}],"drop-shadow":[{"drop-shadow":["","none",A,Ur,Lr]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",je,oe,re]}],"hue-rotate":[{"hue-rotate":[je,oe,re]}],invert:[{invert:["",je,oe,re]}],saturate:[{saturate:[je,oe,re]}],sepia:[{sepia:["",je,oe,re]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,re]}],"backdrop-blur":[{"backdrop-blur":Pt()}],"backdrop-brightness":[{"backdrop-brightness":[je,oe,re]}],"backdrop-contrast":[{"backdrop-contrast":[je,oe,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,oe,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,oe,re]}],"backdrop-invert":[{"backdrop-invert":["",je,oe,re]}],"backdrop-opacity":[{"backdrop-opacity":[je,oe,re]}],"backdrop-saturate":[{"backdrop-saturate":[je,oe,re]}],"backdrop-sepia":[{"backdrop-sepia":["",je,oe,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",oe,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",oe,re]}],ease:[{ease:["linear","initial",E,oe,re]}],delay:[{delay:[je,oe,re]}],animate:[{animate:["none",$,oe,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,oe,re]}],"perspective-origin":[{"perspective-origin":L()}],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:[oe,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"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",oe,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":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mbs":[{"scroll-mbs":D()}],"scroll-mbe":[{"scroll-mbe":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pbs":[{"scroll-pbs":D()}],"scroll-pbe":[{"scroll-pbe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",oe,re]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[je,Xs,Ua,Ag]}],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(sv(a))}const bj=lv("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 Sv({className:a,variant:i,...s}){return d.jsx("div",{className:Ft(bj({variant:i}),a),...s})}var xj=Symbol.for("react.lazy"),Zr=fd[" use ".trim().toString()];function Sj(a){return typeof a=="object"&&a!==null&&"then"in a}function wv(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,o)=>{let{children:u,...h}=r;wv(u)&&typeof Zr=="function"&&(u=Zr(u._payload));const m=j.Children.toArray(u),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 d.jsx(i,{...h,ref:o,children:j.isValidElement(g)?j.cloneElement(g,void 0,x):null})}return d.jsx(i,{...h,ref:o,children:u})});return s.displayName=`${a}.Slot`,s}var jj=wj("Slot");function Nj(a){const i=j.forwardRef((s,r)=>{let{children:o,...u}=s;if(wv(o)&&typeof Zr=="function"&&(o=Zr(o._payload)),j.isValidElement(o)){const h=kj(o),m=Aj(u,o.props);return o.type!==j.Fragment&&(m.ref=r?kd(r,h):h),j.cloneElement(o,m)}return j.Children.count(o)>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 o=a[r],u=i[r];/^on[A-Z]/.test(r)?o&&u?s[r]=(...m)=>{const y=u(...m);return o(...m),y}:o&&(s[r]=o):r==="style"?s[r]={...o,...u}:r==="className"&&(s[r]=[o,u].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=lv("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,...o},u)=>{const h=r?jj:"button";return d.jsx(h,{ref:u,className:Ft(Tj({variant:i,size:s,className:a})),...o})});me.displayName="Button";const tt=j.forwardRef(({className:a,...i},s)=>d.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}));tt.displayName="Card";const Oj=j.forwardRef(({className:a,...i},s)=>d.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)=>d.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)=>d.jsx("p",{ref:s,className:Ft("text-sm text-zinc-500",a),...i}));_j.displayName="CardDescription";const Dj=j.forwardRef(({className:a,...i},s)=>d.jsx("div",{ref:s,className:Ft("p-5 pt-0",a),...i}));Dj.displayName="CardContent";const Mj=Wy,Rj=ev,jv=j.forwardRef(({className:a,...i},s)=>d.jsx(_d,{ref:s,className:Ft("fixed inset-0 z-50 bg-black/70 backdrop-blur-sm",a),...i}));jv.displayName=_d.displayName;const Lj=400,Uj=1200,Bj=720,Nv=j.forwardRef(({className:a,children:i,...s},r)=>{const[o,u]=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=o,S.target.setPointerCapture(S.pointerId),S.preventDefault()},[o]),x=j.useCallback(S=>{if(!h.current)return;const A=m.current-S.clientX,O=Math.min(Uj,Math.max(Lj,y.current+A));u(O)},[]),b=j.useCallback(()=>{h.current=!1},[]);return d.jsxs(Rj,{children:[d.jsx(jv,{}),d.jsxs(Dd,{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(${o}px, 100vw)`},...s,children:[d.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,d.jsxs(nv,{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:[d.jsx(Ld,{className:"size-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});Nv.displayName=Dd.displayName;const Hj=({className:a,...i})=>d.jsx("div",{className:Ft("flex flex-col gap-1.5 pr-10",a),...i}),Cv=j.forwardRef(({className:a,...i},s)=>d.jsx(Md,{ref:s,className:Ft("text-lg font-medium text-zinc-50",a),...i}));Cv.displayName=Md.displayName;const Ev=j.forwardRef(({className:a,...i},s)=>d.jsx(tv,{ref:s,className:Ft("text-sm text-zinc-500",a),...i}));Ev.displayName=tv.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 Yi=[{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 fo(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 Ir=fo({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"}),Hd=fo({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"}),qd=fo({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"}),Jr=fo({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=[Hd,Ir,qd,Jr],$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"])}],Kj=[{project:Yi[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}],competitorPressure:{label:"Competitor Pressure",value:"High",delta:"2 rivals moved up",tone:"negative",description:"Downtown Smiles and Harbor Dental now own the highest-intent local prompts.",trend:[54,58,61,65,69]},runStatus:{label:"Run Status",value:"Partial",delta:"1 queued follow-up",tone:"caution",description:"Latest visibility sweep completed; next sweep is queued.",trend:[76,74,72,68,67]},insights:[{id:"insight_citypoint_lost_citations",tone:"negative",title:"Lost citation on 1 key phrase",detail:"Emergency-intent prompts stopped grounding Citypoint after competitors refreshed.",actionLabel:"Lost",affectedPhrases:[{keyword:"emergency dentist brooklyn",evidenceId:"evidence_citypoint_emergency_gemini",provider:"gemini",citationState:"lost"}]},{id:"insight_citypoint_emerging",tone:"positive",title:"New citation on 1 key phrase",detail:"Case-study content is earning citations on Invisalign prompts.",actionLabel:"Emerging",affectedPhrases:[{keyword:"best invisalign dentist downtown brooklyn",evidenceId:"evidence_citypoint_invisalign_openai",provider:"openai",citationState:"emerging"}]},{id:"insight_citypoint_content_gap",tone:"caution",title:"1 key phrase not cited by any provider",detail:"No dedicated neighborhood page to support pediatric queries.",actionLabel:"Gap",affectedPhrases:[{keyword:"pediatric dentist brooklyn heights",evidenceId:"evidence_citypoint_children_claude",provider:"claude",citationState:"not-cited"}]}],visibilityEvidence:$j,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:[Hd,Ir]},{project:Yi[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}],competitorPressure:{label:"Competitor Pressure",value:"Moderate",delta:"Steady",tone:"neutral",description:"Competitors are stable; no new citation displacement was detected.",trend:[44,46,45,46,46]},runStatus:{label:"Run Status",value:"Healthy",delta:"No failures in 14 days",tone:"positive",description:"Latest visibility runs completed without issues.",trend:[88,89,90,90,91]},insights:[{id:"insight_harbor_cluster",tone:"positive",title:"Practice-area clustering is paying off",detail:"Merged legal service pages now ground broader informational prompts.",actionLabel:"Cited",affectedPhrases:[{keyword:"brooklyn personal injury lawyer",evidenceId:"evidence_harbor_personal_injury",provider:"gemini",citationState:"cited"}]},{id:"insight_harbor_local",tone:"neutral",title:"No significant changes",detail:"No new displacement on borough-specific injury prompts this week.",actionLabel:"Stable",affectedPhrases:[]}],visibilityEvidence:[{id:"evidence_harbor_personal_injury",keyword:"brooklyn personal injury lawyer",provider:"gemini",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"])}],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:[qd]},{project:Yi[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}],competitorPressure:{label:"Competitor Pressure",value:"Moderate",delta:"Watching 1 chain",tone:"caution",description:"Regional chain competitors are winning on broad treatment questions.",trend:[49,51,52,54,56]},runStatus:{label:"Run Status",value:"Running",delta:"9 prompts remaining",tone:"neutral",description:"Current answer-visibility sweep is still collecting provider responses.",trend:[63,64,65,67,68]},insights:[{id:"insight_northstar_location_depth",tone:"caution",title:"Location pages need stronger proof",detail:"Answers prefer competitors with physician-specific evidence.",actionLabel:"Gap",affectedPhrases:[{keyword:"knee replacement surgeon westchester",evidenceId:"evidence_northstar_knee",provider:"openai",citationState:"emerging"}]}],visibilityEvidence:[{id:"evidence_northstar_knee",keyword:"knee replacement surgeon westchester",provider:"openai",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"])}],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:[Jr]}],Yj={portfolioOverview:{projects:[{project:Yi[0],visibilityScore:61,visibilityDelta:"-8 this week",lastRun:Ir,insight:"Lost emergency-intent citations after competitors refreshed availability pages.",trend:[73,71,69,66,61],competitorPressureLabel:"High"},{project:Yi[1],visibilityScore:74,visibilityDelta:"+2 this week",lastRun:qd,insight:"Practice-area consolidation is stabilizing branded and informational prompts.",trend:[68,70,71,73,74],competitorPressureLabel:"Moderate"},{project:Yi[2],visibilityScore:58,visibilityDelta:"Run in progress",lastRun:Jr,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:[Hd,Jr,Ir],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:Kj,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 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(Yj),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(u=>u.project.id===a.visibilityDropProjectId),o=i.portfolioOverview.projects.find(u=>u.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(u=>u.citationState==="lost").slice(0,5).map(u=>({keyword:u.keyword,evidenceId:u.id,provider:u.provider||void 0,citationState:u.citationState}))})),o&&(o.visibilityScore=49,o.visibilityDelta="-12 in 48h",o.insight="Sharp citation drop detected; grounding now prefers competitors on multiple high-intent prompts.")}return{dashboard: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(o=>o.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 Ye(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 Ye("/projects")}function Fj(){return Ye("/runs")}function tl(a){return Ye(`/runs/${encodeURIComponent(a)}`)}function Pj(a){return Ye(`/projects/${encodeURIComponent(a)}/keywords`)}function kv(a){return Ye(`/projects/${encodeURIComponent(a)}/competitors`)}function Wj(a){return Ye(`/projects/${encodeURIComponent(a)}/timeline`)}function Tv(a,i){return Ye(`/projects/${encodeURIComponent(a)}`,{method:"PUT",body:JSON.stringify(i)})}function eN(a,i){return Ye(`/projects/${encodeURIComponent(a)}/keywords`,{method:"PUT",body:JSON.stringify({keywords:i})})}function tN(a,i){return Ye(`/projects/${encodeURIComponent(a)}/keywords`,{method:"POST",body:JSON.stringify({keywords:i})})}function Ov(a,i){return Ye(`/projects/${encodeURIComponent(a)}/competitors`,{method:"PUT",body:JSON.stringify({competitors:i})})}function zv(a){return Ye(`/projects/${encodeURIComponent(a)}/runs`,{method:"POST",body:"{}"})}async function nN(a){await Ye(`/projects/${encodeURIComponent(a)}`,{method:"DELETE",body:"{}"})}function aN(a){return Ye(`/projects/${encodeURIComponent(a)}/export`)}function iN(){return Ye("/settings")}function sN(a,i){return Ye(`/settings/providers/${encodeURIComponent(a)}`,{method:"PUT",body:JSON.stringify(i)})}async function lN(a){try{return await Ye(`/projects/${encodeURIComponent(a)}/schedule`)}catch(i){if(i instanceof Error&&i.message.includes("404"))return null;throw i}}function Og(a,i){return Ye(`/projects/${encodeURIComponent(a)}/schedule`,{method:"PUT",body:JSON.stringify(i)})}async function rN(a){await Ye(`/projects/${encodeURIComponent(a)}/schedule`,{method:"DELETE",body:"{}"})}function oN(a){return Ye(`/projects/${encodeURIComponent(a)}/notifications`)}function cN(a,i){return Ye(`/projects/${encodeURIComponent(a)}/notifications`,{method:"POST",body:JSON.stringify(i)})}async function uN(a,i){await Ye(`/projects/${encodeURIComponent(a)}/notifications/${encodeURIComponent(i)}`,{method:"DELETE",body:"{}"})}function dN(a,i){return Ye(`/projects/${encodeURIComponent(a)}/notifications/${encodeURIComponent(i)}/test`,{method:"POST",body:"{}"})}function fN(a,i,s){return Ye(`/projects/${encodeURIComponent(a)}/keywords/generate`,{method:"POST",body:JSON.stringify({provider:i,count:s})})}function hN(a){return Ye("/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 zg(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 o=Math.floor(r/60),u=r%60;return`${o}m ${u}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 $d(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?zg(a.startedAt):zg(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 u of a){const h=u.keyword??u.id;i.has(h)||i.set(h,!1),u.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 u of a)u.competitorOverlap.some(h=>s.has(h))&&r++;const o=r/a.length;return o>=.5?{label:"High",count:r}:o>=.2?{label:"Moderate",count:r}:{label:"Low",count:r}}function xN(a,i,s,r){const o=[];let u=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 A of y){const O=m.get(`${g.keyword}::${A}`);if(!O&&y.length>1)continue;const w=g.providerRuns?.[A],N=w&&w.length>0,E=N?w.at(-1).transition:b,$=E==="lost"?"lost":E==="emerging"?"emerging":O?O.citationState==="cited"?"cited":"not-cited":S,_=cd(N?w:g.runs),M=(N?w:g.runs).map(L=>({runId:L.runId,citationState:L.citationState,createdAt:L.createdAt}));o.push({id:`evidence_${a}_${u++}`,keyword:g.keyword,provider:O?.provider??A,citationState:$,changeLabel:SN(E,_),answerSnippet:O?.answerText??"",citedDomains:O?.citedDomains??[],evidenceUrls:[],competitorDomains:O?.competitorOverlap??[],relatedTechnicalSignals:[],groundingSources:O?.groundingSources??[],summary:wN($,g.keyword),runHistory:M})}}}for(const m of r)h.has(m.keyword)||o.push({id:`evidence_${a}_${u++}`,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 o}function cd(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 _g(a,i){const s=new Set(i),r=new Map;for(const o of a)if(o.keyword)for(const u of o.competitorOverlap){if(!s.has(u))continue;const h=r.get(u)??new Set;h.add(o.keyword),r.set(u,h)}return r}const Pu=3;function jN(a){const{evidence:i,timeline:s,latestSnapshots:r,previousSnapshots:o,trackedCompetitors:u}=a,h=[],m=[],y=new Set;for(const E of i)E.citationState==="lost"&&(y.has(E.keyword)||(y.add(E.keyword),m.push({keyword:E.keyword,evidenceId:E.id,provider:E.provider,citationState:"lost"})));m.length>0&&h.push({id:"insight_lost",tone:"negative",title:`Lost citation on ${m.length} keyword${m.length>1?"s":""}`,detail:"Citations dropped since the last run.",actionLabel:"Lost",affectedPhrases:m});const g=_g(r,u),x=_g(o,u);for(const E of u){const $=g.get(E)??new Set,_=x.get(E)??new Set,M=[...$].filter(L=>!_.has(L));M.length>0&&h.push({id:`insight_comp_gained_${E}`,tone:"negative",title:`${E} appeared on ${M.length} keyword${M.length>1?"s":""}`,detail:"A tracked competitor gained new citations.",actionLabel:"Competitor",affectedPhrases:M.map(L=>{const G=i.find(X=>X.keyword===L);return{keyword:L,evidenceId:G?.id??"",citationState:"cited"}})})}const b=new Map;for(const E of s){const $=E.runs.at(-1);$&&b.set(E.keyword,{transition:$.transition,citationState:$.citationState})}const S=[],A=[],O=new Set;for(const[E,{transition:$,citationState:_}]of b){if(!($==="emerging"||$==="new"&&_==="cited"))continue;O.add(E);const L=i.find(G=>G.keyword===E&&(G.citationState==="emerging"||G.citationState==="cited"));S.push({keyword:E,evidenceId:L?.id??"",provider:L?.provider,citationState:"emerging"})}for(const E of i)E.citationState==="emerging"&&(O.has(E.keyword)||A.push({keyword:E.keyword,evidenceId:E.id,provider:E.provider,citationState:"emerging"}));if(A.length>0){const E=new Set(A.map($=>$.keyword)).size;h.push({id:"insight_provider_pickup",tone:"positive",title:`Picked up by new provider on ${E} keyword${E>1?"s":""}`,detail:"Your domain started appearing on additional providers.",actionLabel:"Pickup",affectedPhrases:A})}S.length>0&&h.push({id:"insight_first_citation",tone:"positive",title:`First citation on ${O.size} keyword${O.size>1?"s":""}`,detail:"Your domain appeared in AI answers for the first time.",actionLabel:"New",affectedPhrases:S});const w=new Set(i.map(E=>E.keyword)),N=[];for(const E of s){if(!w.has(E.keyword)||E.runs.length<Pu||E.runs.at(-1)?.citationState!=="not-cited")continue;if(cd(E.runs)>=Pu){const M=i.find(L=>L.keyword===E.keyword);N.push({keyword:E.keyword,evidenceId:M?.id??"",citationState:"not-cited"})}}N.length>0&&h.push({id:"insight_persistent_gap",tone:"caution",title:`${N.length} keyword${N.length>1?"s":""} uncited for ${Pu}+ runs`,detail:"These keywords have not been cited by any provider across multiple consecutive runs.",actionLabel:"Gap",affectedPhrases:N});for(const E of u){const $=g.get(E)??new Set,M=[...x.get(E)??new Set].filter(L=>!$.has(L));M.length>0&&h.push({id:`insight_comp_lost_${E}`,tone:"neutral",title:`${E} dropped from ${M.length} keyword${M.length>1?"s":""}`,detail:"A tracked competitor lost citations.",actionLabel:"Competitor",affectedPhrases:M.map(L=>{const G=i.find(X=>X.keyword===L);return{keyword:L,evidenceId:G?.id??"",citationState:"not-cited"}})})}return h.length===0&&h.push({id:"insight_stable",tone:"neutral",title:"No significant changes",detail:"Citation state is stable across all tracked key phrases.",actionLabel:"Stable",affectedPhrases:[]}),h}function NN(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 CN(a){const i=_v(a.project),s=xN(i.name,a.timeline,a.latestRunDetail,a.keywords),r=a.latestRunDetail?.snapshots??[],o=Rv(r),u=Lv(r,a.competitors.map(b=>b.domain)),h=jN({evidence:s,timeline:a.timeline,latestSnapshots:a.latestRunDetail?.snapshots??[],previousSnapshots:a.previousRunDetail?.snapshots??[],trackedCompetitors:a.competitors.map(b=>b.domain)}),m=[...a.runs].sort((b,S)=>S.createdAt.localeCompare(b.createdAt)),y=m.map(b=>$d(b,a.project.displayName||a.project.name)),g=new Map;for(const b of r){const S=b.provider||"gemini",A=g.get(S)??{cited:0,total:0};A.total++,b.citationState==="cited"&&A.cited++,g.set(S,A)}const x=[...g.entries()].sort(([b],[S])=>b.localeCompare(S)).map(([b,{cited:S,total:A}])=>({provider:b,score:A>0?Math.round(S/A*100):0,cited:S,total:A}));return{project:i,dateRangeLabel:"All time",contextLabel:`${i.country} / ${i.language.toUpperCase()}`,visibilitySummary:{label:"Answer Visibility",value:r.length>0?`${o.score}`:"No data",delta:r.length>0?`${o.citedCount} of ${o.totalCount} key phrases visible`:"Run a sweep first",tone:r.length>0?vN(o.score):"neutral",description:r.length>0?`${o.citedCount} of ${o.totalCount} tracked key phrases found your domain in at least one AI answer engine.`:"No visibility data yet. Trigger a run to start tracking.",tooltip:'Percentage of tracked key phrases where your domain is cited by at least one AI answer engine. A key phrase is "visible" if any configured provider includes your site in its response.',trend:[]},providerScores:x,competitorPressure:{label:"Competitor Pressure",value:u.label,delta:u.count>0?`${u.count} overlapping citations`:"No overlap detected",tone:bN(u.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:NN(m),insights:h,visibilityEvidence:s,competitors:a.competitors.map((b,S)=>{const A=new Set;for(const $ of r)($.competitorOverlap.includes(b.domain)||$.citedDomains.includes(b.domain))&&$.keyword&&A.add($.keyword);const O=[...A],w=new Set(r.map($=>$.keyword).filter(Boolean)),N=w.size>0?O.length/w.size:0,E=N>=.5?"High":N>=.2?"Moderate":O.length>0?"Low":"None";return{id:b.id||`comp_${S}`,domain:b.domain,citationCount:O.length,totalKeywords:w.size,pressureLabel:E,citedKeywords:O,movement:"",notes:""}}),recentRuns:y.slice(0,5)}}function EN(a){const i=_v(a.project),s=a.latestRunDetail?.snapshots??[],r=Rv(s),o=Lv(s,a.competitors.map(y=>y.domain)),h=[...a.runs].sort((y,g)=>g.createdAt.localeCompare(y.createdAt))[0],m=h?$d(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",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:o.label}}function AN(a,i){const s=[],r=[],o=[];for(const h of a){r.push(CN(h)),o.push(EN(h));const m=[...h.runs].sort((y,g)=>g.createdAt.localeCompare(y.createdAt));for(const y of m)s.push($d(y,h.project.displayName||h.project.name))}s.sort((h,m)=>m.createdAt.localeCompare(h.createdAt));const u=a.length>0;return{portfolioOverview:{projects:o,attentionItems:u?kN(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"}),...u?{}:{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:u,ctaLabel:u?"Trigger run":"Create a project first",summary:u?"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 kN(a){const i=[];for(const s of a){const r=s.visibilityEvidence.filter(u=>u.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 o=s.recentRuns.filter(u=>u.status==="running"||u.status==="queued");o.length>0&&i.push({id:`attention_${s.project.id}_active`,tone:"neutral",title:`${s.project.displayName||s.project.name} has active runs`,detail:`${o.length} run${o.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 Dg=[{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"}],TN=Vj(),Mg=a=>({label:a,state:"checking",detail:"Checking service health"}),ON={apiStatus:Mg("API"),workerStatus:Mg("Worker")};async function zN(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(),o=typeof r.version=="string"?r.version:"unknown",u=typeof r.databaseUrlConfigured=="boolean"?r.databaseUrlConfigured:void 0,h=typeof r.lastHeartbeatAt=="string"?r.lastHeartbeatAt:void 0,m=[o,u===!1?"database not configured":"database configured",h?`heartbeat ${h}`:void 0].filter(Boolean).join(" · ");return{label:i,state:"ok",detail:m,version:o,databaseConfigured:u,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 _N(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 DN(a){return a?Gi(a):typeof window<"u"?Gi(window.location.pathname):"/"}function Fr(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 MN(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 RN(a){const i=a.match(/^(\[.*?\])\s*(.+)/);if(i){const s=i[1],r=i[2],o=r.indexOf("{");if(o>=0){const u=r.slice(0,o).trim(),h=r.slice(o);try{const m=JSON.parse(h);return`${s} ${u}
|
|
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 ho(a){return a.split("-").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" ")}function LN(a,i,s){return a.map(r=>{if(r.id==="api")return{...r,tone:Fr(i.apiStatus),detail:i.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:i.apiStatus.detail};if(r.id==="worker")return{...r,tone:Fr(i.workerStatus),detail:i.workerStatus.state==="ok"?"Healthy":"Needs attention",meta:i.workerStatus.detail};const o=s.providerStatuses.filter(y=>y.state==="ready").length,u=s.providerStatuses.length,h=o>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:`${o} of ${u} configured`,meta:m||"None configured"}})}function UN(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 BN(a,i,s){const r=UN(i,s),o=structuredClone(a);return o.healthChecks=o.healthChecks.map(u=>{if(u.id==="api")return{...u,detail:i.apiStatus.detail,state:i.apiStatus.state==="ok"?"ready":"attention"};if(u.id==="worker")return{...u,detail:i.workerStatus.detail,state:i.workerStatus.state==="ok"?"ready":"attention"};const h=s.providerStatuses.some(m=>m.state==="ready");return{...u,detail:h?"At least one provider configured.":"No providers configured.",state:h?"ready":"attention"}}),o.launchState.enabled=r===void 0,o.launchState.blockedReason=r,o.launchState.summary=r??"Queue a visibility sweep first, then follow with a site audit to explain movement.",o}function Mt(a,i){return s=>{s.preventDefault(),s.stopPropagation(),a(i)}}function Br(a,i){return i==="projects"?a.kind==="projects"||a.kind==="project":i==="project"?a.kind==="project":a.kind===i}function HN({points:a,tone:i}){const s=j.useId();if(a.length===0)return null;const r=42,o=132,u=5,h=Math.min(...a),y=Math.max(...a)-h||1,g=o-u*2,x=r-u*2,b=a.map((S,A)=>{const O=u+A/Math.max(a.length-1,1)*g,w=u+(1-(S-h)/y)*x;return`${O},${w}`}).join(" ");return d.jsxs("svg",{className:`sparkline sparkline-${i}`,viewBox:`0 0 ${o} ${r}`,"aria-hidden":"true",children:[d.jsx("defs",{children:d.jsx("clipPath",{id:s,children:d.jsx("rect",{x:u,y:u,width:g,height:x,rx:"8"})})}),d.jsx("line",{className:"sparkline-guide",x1:u,x2:o-u,y1:r-u,y2:r-u}),d.jsx("polyline",{clipPath:`url(#${s})`,points:b,vectorEffect:"non-scaling-stroke"})]})}function Bv({text:a}){return d.jsxs("span",{className:"info-tooltip-wrapper",children:[d.jsxs("svg",{className:"info-tooltip-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[d.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),d.jsx("path",{d:"M8 7v4M8 5.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),d.jsx("span",{className:"info-tooltip-bubble",role:"tooltip",children:a})]})}function Wu({value:a,label:i,delta:s,tone:r,description:o,tooltip:u,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 d.jsxs("div",{className:"score-gauge",children:[d.jsxs("div",{className:"gauge-ring-wrapper",children:[d.jsxs("svg",{className:"gauge-ring",viewBox:"0 0 120 120","aria-hidden":"true",children:[d.jsx("circle",{className:"gauge-bg",cx:"60",cy:"60",r:48,strokeWidth:6}),d.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)"})]}),d.jsx("div",{className:"gauge-center",children:d.jsx("span",{className:h?"gauge-value":"gauge-value-text",children:a.split(" / ")[0]})})]}),d.jsxs("p",{className:"gauge-label",children:[i,u&&d.jsx(Bv,{text:u})]}),d.jsx("p",{className:"gauge-delta",children:s}),d.jsx("p",{className:"gauge-description",children:o})]})}function lt({tone:a,children:i}){const s=a==="positive"?"success":a==="caution"?"warning":a==="negative"?"destructive":"neutral";return d.jsx(Sv,{variant:s,children:i})}function mo({status:a}){return d.jsx(lt,{tone:Uv(a),children:ho(a)})}function Hv({state:a}){return d.jsx(lt,{tone:MN(a),children:ho(a)})}function qv({run:a,onOpen:i}){return d.jsxs("article",{className:"run-row",children:[d.jsxs("div",{className:"run-row-main",children:[d.jsxs("div",{className:"run-row-head",children:[d.jsxs("div",{children:[d.jsx("p",{className:"run-row-title",children:a.summary}),d.jsxs("p",{className:"run-row-subtitle",children:[a.projectName," · ",a.kindLabel]})]}),d.jsx(mo,{status:a.status})]}),d.jsx("p",{className:"run-row-detail",children:a.statusDetail})]}),d.jsxs("dl",{className:"run-row-meta",children:[d.jsxs("div",{children:[d.jsx("dt",{children:"Started"}),d.jsx("dd",{children:a.startedAt})]}),d.jsxs("div",{children:[d.jsx("dt",{children:"Duration"}),d.jsx("dd",{children:a.duration})]}),d.jsxs("div",{children:[d.jsx("dt",{children:"Trigger"}),d.jsx("dd",{children:a.triggerLabel})]})]}),d.jsx(me,{variant:"outline",size:"sm",type:"button",onClick:()=>i(a.id),children:"View run"})]})}function Kd({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 d.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 qN({insights:a,onOpenEvidence:i}){const[s,r]=j.useState(null);return d.jsx("div",{className:"insight-list",children:a.map(o=>{const u=s===o.id,h=o.affectedPhrases.length>0;return d.jsxs("div",{children:[d.jsxs("div",{className:`insight-row insight-row-${o.tone} ${h?"cursor-pointer":""}`,onClick:h?()=>r(u?null:o.id):void 0,children:[d.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[h&&d.jsx(Rd,{size:12,className:`shrink-0 text-zinc-500 transition-transform duration-150 ${u?"rotate-90":""}`}),d.jsx(lt,{tone:o.tone,children:o.actionLabel}),d.jsx("span",{className:"text-sm font-medium text-zinc-100 truncate",children:o.title}),d.jsx("span",{className:"hidden sm:inline text-xs text-zinc-500 truncate",children:o.detail})]}),h&&d.jsxs("span",{className:"text-[11px] text-zinc-600 whitespace-nowrap",children:[o.affectedPhrases.length," phrase",o.affectedPhrases.length>1?"s":""]})]}),u&&d.jsx("div",{className:"divide-y divide-zinc-800/20",children:o.affectedPhrases.map(m=>d.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2 pl-9 bg-zinc-900/40",children:[d.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d.jsx(Hv,{state:m.citationState}),d.jsx("span",{className:"text-sm text-zinc-200 truncate",children:m.keyword}),d.jsx("div",{className:"hidden sm:flex gap-1",children:m.provider&&d.jsx(Kd,{provider:m.provider})})]}),d.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))})]},o.id)})})}function $N({history:a,maxDots:i=12}){const s=a.slice(-i);if(s.length===0)return d.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 d.jsx("div",{className:"flex items-center gap-[3px]",title:`${s.length} runs`,children:s.map((o,u)=>d.jsx("div",{className:`h-2.5 w-2.5 rounded-sm ${r[o.citationState]??"bg-zinc-700"}`,title:`${o.citationState} — ${new Date(o.createdAt).toLocaleDateString()}`},u))})}function KN(a){const i=new Map;for(const r of a)for(const o of r.runHistory){const u=i.get(o.createdAt);u?u.states.push(o.citationState):i.set(o.createdAt,{states:[o.citationState],runId:o.runId})}return[...i.entries()].sort(([r],[o])=>r.localeCompare(o)).map(([r,{states:o,runId:u}])=>({runId:u,createdAt:r,citationState:o.includes("cited")?"cited":o.includes("emerging")?"emerging":"not-cited"}))}function YN({phrase:a,items:i,onOpenEvidence:s}){const r=i.map(x=>x.citationState),o=r.includes("cited")?"cited":r.includes("emerging")?"emerging":r.includes("lost")?"lost":r.every(x=>x==="pending")?"pending":"not-cited",u=KN(i),h=i.filter(x=>x.citationState==="cited"||x.citationState==="emerging").length,m=(()=>{if(u.length<4)return"flat";const x=u.slice(-3),b=u.slice(-6,-3);if(b.length===0)return"flat";const S=x.filter(O=>O.citationState==="cited"||O.citationState==="emerging").length,A=b.filter(O=>O.citationState==="cited"||O.citationState==="emerging").length;return S>A?"up":S<A?"down":"flat"})(),y=(()=>{if(u.length===0)return"Awaiting first run";if(u.length===1)return"First observation";const x=u[u.length-1].citationState,b=u[u.length-2].citationState,S=x==="cited"||x==="emerging",A=b==="cited"||b==="emerging";if(!A&&S)return"Newly cited";if(A&&!S)return"Lost citation";let O=0;for(let w=u.length-1;w>=0;w--){const N=u[w].citationState;if((N==="cited"||N==="emerging")===S)O++;else break}return S?O<=1?"Cited in latest run":`Cited ${O} runs in a row`:O<=1?"Missed in latest run":`Missed for ${O} runs`})(),g=m==="up"?"↑":m==="down"?"↓":"→";return d.jsxs("div",{className:`evidence-phrase-card evidence-phrase-card--${o}`,children:[d.jsx("div",{className:"evidence-card-header",children:d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("p",{className:"evidence-card-keyword",children:a}),d.jsxs("div",{className:"evidence-card-status-row",children:[d.jsx(Hv,{state:o}),d.jsxs("span",{className:`evidence-card-trend evidence-card-trend--${m}`,children:[d.jsx("span",{"aria-hidden":"true",children:g}),d.jsx("span",{children:y})]})]})]})}),d.jsxs("div",{className:"evidence-card-timeline-row",children:[d.jsx($N,{history:u,maxDots:14}),d.jsxs("span",{className:"evidence-card-ratio",children:[h,"/",i.length," provider",i.length!==1?"s":""]})]}),d.jsxs("div",{className:"evidence-card-providers",children:[i.filter(x=>x.citationState!=="pending").map(x=>d.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:[d.jsx("span",{className:"capitalize",children:x.provider}),d.jsx("span",{"aria-hidden":"true",className:"font-bold",children:x.citationState==="cited"||x.citationState==="emerging"?"✓":x.citationState==="lost"?"✗":"–"}),d.jsx("span",{className:"opacity-50 text-[10px]",children:"View →"})]},x.id)),i.every(x=>x.citationState==="pending")&&d.jsx("span",{className:"text-xs text-zinc-500 italic py-1",children:"Awaiting first run"})]})]})}function GN({evidence:a,onOpenEvidence:i}){const s=j.useMemo(()=>{const r=new Map;for(const o of a){const u=r.get(o.keyword)??[];r.set(o.keyword,[...u,o])}return[...r.entries()].map(([o,u])=>({phrase:o,items:u}))},[a]);return s.length===0?d.jsx("p",{className:"supporting-copy",children:"No key phrases tracked yet."}):d.jsx("div",{className:"evidence-card-grid",children:s.map(({phrase:r,items:o})=>d.jsx(YN,{phrase:r,items:o,onOpenEvidence:i},r))})}function VN(a){return a==="High"?"negative":a==="Moderate"?"caution":"neutral"}function QN({competitors:a}){return a.length===0?d.jsx("p",{className:"text-sm text-zinc-500",children:"No competitors configured. Add competitors to track overlap."}):d.jsx("div",{className:"competitor-table-wrap",children:d.jsxs("table",{className:"competitor-table",children:[d.jsx("thead",{children:d.jsxs("tr",{children:[d.jsx("th",{children:"Domain"}),d.jsx("th",{children:"Pressure"}),d.jsx("th",{children:"Citations"}),d.jsx("th",{children:"Key Phrases"})]})}),d.jsx("tbody",{children:a.map(i=>d.jsxs("tr",{children:[d.jsx("td",{className:"font-medium text-zinc-100",children:i.domain}),d.jsx("td",{children:d.jsx(lt,{tone:VN(i.pressureLabel),children:i.pressureLabel})}),d.jsx("td",{className:"text-zinc-300 tabular-nums",children:i.totalKeywords>0?`${i.citationCount} / ${i.totalKeywords}`:"—"}),d.jsx("td",{className:"text-zinc-500 text-xs",children:i.citedKeywords.length>0?i.citedKeywords.join(", "):"Not cited"})]},i.id))})]})})}function XN({project:a,onNavigate:i}){const s=`/projects/${a.project.id}`;return d.jsxs("a",{className:"project-row cursor-pointer",href:s,onClick:Mt(i,s),children:[d.jsxs("div",{className:"project-row-primary",children:[d.jsxs("div",{children:[d.jsx("p",{className:"project-name",children:a.project.name}),d.jsx("p",{className:"project-domain",children:a.project.canonicalDomain})]}),d.jsx("p",{className:"project-insight",children:a.insight})]}),d.jsx("div",{className:"project-row-stat",children:d.jsxs("div",{className:"metric-inline-block",children:[d.jsx("p",{className:"metric-inline-label",children:"Answer Visibility"}),d.jsx("p",{className:"metric-inline-value",children:a.visibilityScore}),d.jsx("p",{className:"metric-inline-delta",children:a.visibilityDelta})]})}),d.jsx("div",{className:"project-row-stat",children:d.jsxs("div",{className:"metric-inline-block",children:[d.jsx("p",{className:"metric-inline-label",children:"Competitor Pressure"}),d.jsx("p",{className:"metric-inline-value",children:a.competitorPressureLabel}),d.jsxs("p",{className:"metric-inline-delta",children:[a.lastRun.kindLabel," · ",ho(a.lastRun.status)]})]})}),d.jsx("div",{className:"project-row-chart",children:d.jsx(HN,{points:a.trend,tone:Uv(a.lastRun.status)})}),d.jsx("span",{className:"project-row-link",children:d.jsx(Rd,{className:"h-4 w-4 text-zinc-500"})})]})}function ZN({model:a,systemHealth:i,onNavigate:s,onOpenRun:r}){return d.jsxs("div",{className:"page-container",children:[d.jsxs("div",{className:"page-header",children:[d.jsxs("div",{className:"page-header-left",children:[d.jsx("h1",{className:"page-title",children:"Portfolio"}),d.jsx("p",{className:"page-subtitle",children:"Visibility and execution state across all projects"})]}),d.jsx("div",{className:"page-header-right",children:d.jsx("p",{className:"text-[11px] text-zinc-600",children:a.lastUpdatedAt})})]}),a.projects.length>0?d.jsx("div",{className:"project-list project-list-scrollable",children:a.projects.map(o=>d.jsx(XN,{project:o,onNavigate:s},o.project.id))}):d.jsxs(tt,{className:"surface-card empty-card",children:[d.jsx("h3",{children:a.emptyState?.title??"No projects yet"}),d.jsx("p",{className:"supporting-copy",children:a.emptyState?.detail}),d.jsx(me,{size:"sm",asChild:!0,children:d.jsx("a",{href:a.emptyState?.ctaHref??"/setup",onClick:Mt(s,a.emptyState?.ctaHref??"/setup"),children:a.emptyState?.ctaLabel??"Launch setup"})})]}),d.jsxs("div",{className:"overview-secondary-grid",children:[a.attentionItems.length>0&&d.jsxs("section",{className:"overview-secondary-section",children:[d.jsx("div",{className:"section-head section-head-inline",children:d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Needs attention"}),d.jsx("h2",{className:"section-title-sm",children:"What changed"})]})}),d.jsx("div",{className:"attention-list attention-list-scrollable",children:a.attentionItems.map(o=>d.jsxs("a",{className:`attention-item attention-item-${o.tone}`,href:o.href,onClick:Mt(s,o.href),children:[d.jsxs("div",{children:[d.jsx("p",{className:"attention-title",children:o.title}),d.jsx("p",{className:"attention-detail",children:o.detail})]}),d.jsx("span",{className:"attention-action",children:o.actionLabel})]},o.id))})]}),d.jsxs("section",{className:"overview-secondary-section",children:[d.jsx("div",{className:"section-head section-head-inline",children:d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Recent runs"}),d.jsx("h2",{className:"section-title-sm",children:"Activity"})]})}),d.jsx("div",{className:"compact-stack compact-stack-scrollable",children:a.recentRuns.length>0?a.recentRuns.map(o=>d.jsxs("button",{className:"compact-run",type:"button",onClick:()=>r(o.id),children:[d.jsxs("div",{children:[d.jsx("p",{className:"compact-run-title",children:o.projectName}),d.jsx("p",{className:"compact-run-detail",children:o.summary})]}),d.jsx(mo,{status:o.status})]},o.id)):d.jsx("p",{className:"supporting-copy",children:"Run history appears here after the first launch."})})]})]}),d.jsxs("section",{className:"page-section",children:[d.jsx("div",{className:"section-head section-head-inline",children:d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"System health"}),d.jsx("h2",{className:"section-title-sm",children:"Infrastructure"})]})}),d.jsx("div",{className:"health-grid",children:i.map(o=>d.jsxs(tt,{className:"surface-card compact-card",children:[d.jsxs("div",{className:"section-head",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:o.label}),d.jsx("h3",{children:o.detail})]}),d.jsx(lt,{tone:o.tone,children:o.label})]}),d.jsx("p",{className:"supporting-copy",children:o.meta})]},o.id))})]})]})}function IN({projects:a,onNavigate:i,onProjectCreated:s}){const[r,o]=j.useState(!1),[u,h]=j.useState(""),[m,y]=j.useState(""),[g,x]=j.useState(""),[b,S]=j.useState("US"),[A,O]=j.useState("en"),[w,N]=j.useState(!1),[E,$]=j.useState(null),_=u.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),M=async()=>{if(!(!_||!g)){N(!0),$(null);try{const L=await Tv(_,{displayName:m||u,canonicalDomain:g,country:b,language:A});s(),h(""),y(""),x(""),S("US"),O("en"),o(!1),i(`/projects/${L.id}`)}catch(L){$(L instanceof Error?L.message:"Failed to create project")}finally{N(!1)}}};return d.jsxs("div",{className:"page-container",children:[d.jsxs("div",{className:"page-header",children:[d.jsxs("div",{className:"page-header-left",children:[d.jsx("h1",{className:"page-title",children:"Projects"}),d.jsxs("p",{className:"page-subtitle",children:[a.length," project",a.length!==1?"s":""," tracked"]})]}),d.jsx("div",{className:"page-header-right",children:d.jsxs(me,{type:"button",onClick:()=>o(L=>!L),children:[d.jsx(Sg,{className:"size-4 mr-1.5"}),"Add project"]})})]}),r?d.jsxs(tt,{className:"surface-card mb-6",children:[d.jsx("div",{className:"section-head",children:d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"New project"}),d.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Create a new monitoring project"})]})}),d.jsxs("div",{className:"compact-stack mt-4",children:[d.jsxs("div",{className:"setup-field-row",children:[d.jsxs("div",{className:"setup-field",children:[d.jsx("label",{className:"setup-label",htmlFor:"new-project-name",children:"Project name"}),d.jsx("input",{id:"new-project-name",className:"setup-input",type:"text",placeholder:"my-project",value:u,onChange:L=>h(L.target.value)}),_&&_!==u?d.jsxs("p",{className:"supporting-copy",children:["Slug: ",_]}):null]}),d.jsxs("div",{className:"setup-field",children:[d.jsx("label",{className:"setup-label",htmlFor:"new-display-name",children:"Display name"}),d.jsx("input",{id:"new-display-name",className:"setup-input",type:"text",placeholder:"My Project",value:m,onChange:L=>y(L.target.value)})]})]}),d.jsxs("div",{className:"setup-field",children:[d.jsx("label",{className:"setup-label",htmlFor:"new-domain",children:"Canonical domain"}),d.jsx("input",{id:"new-domain",className:"setup-input",type:"text",placeholder:"example.com",value:g,onChange:L=>x(L.target.value)})]}),d.jsxs("div",{className:"setup-field-row",children:[d.jsxs("div",{className:"setup-field",children:[d.jsx("label",{className:"setup-label",htmlFor:"new-country",children:"Country"}),d.jsx("input",{id:"new-country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:b,onChange:L=>S(L.target.value.toUpperCase())})]}),d.jsxs("div",{className:"setup-field",children:[d.jsx("label",{className:"setup-label",htmlFor:"new-language",children:"Language"}),d.jsx("input",{id:"new-language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:A,onChange:L=>O(L.target.value.toLowerCase())})]})]})]}),E?d.jsx("p",{className:"text-rose-400 text-sm mt-3",children:E}):null,d.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[d.jsx(me,{type:"button",disabled:!_||!g||w,onClick:M,children:w?"Creating...":"Create project"}),d.jsx(me,{type:"button",variant:"ghost",onClick:()=>o(!1),children:"Cancel"})]})]}):null,a.length>0?d.jsx("div",{className:"data-table-wrapper",children:d.jsxs("table",{className:"data-table",children:[d.jsx("thead",{children:d.jsxs("tr",{children:[d.jsx("th",{children:"Name"}),d.jsx("th",{children:"Domain"}),d.jsx("th",{children:"Visibility"}),d.jsx("th",{children:"Last run"}),d.jsx("th",{className:"text-right",children:"Country"})]})}),d.jsx("tbody",{children:a.map(L=>{const G=`/projects/${L.project.id}`,X=L.recentRuns[0];return d.jsxs("tr",{className:"cursor-pointer",onClick:()=>i(G),children:[d.jsxs("td",{children:[d.jsx("a",{className:"text-zinc-100 font-medium hover:underline",href:G,onClick:Mt(i,G),children:L.project.displayName||L.project.name}),d.jsx("p",{className:"text-[11px] text-zinc-500",children:L.project.name})]}),d.jsx("td",{className:"text-zinc-400",children:L.project.canonicalDomain}),d.jsx("td",{children:d.jsx(lt,{tone:L.visibilitySummary.tone,children:L.visibilitySummary.value})}),d.jsx("td",{className:"text-zinc-500 text-sm",children:X?d.jsx(mo,{status:X.status}):d.jsx("span",{className:"text-zinc-600",children:"No runs"})}),d.jsx("td",{className:"text-right text-zinc-500",children:L.project.country})]},L.project.id)})})]})}):r?null:d.jsxs(tt,{className:"surface-card empty-card",children:[d.jsx("h3",{children:"No projects yet"}),d.jsx("p",{className:"supporting-copy",children:"Create your first monitoring project to start tracking AI visibility."}),d.jsxs(me,{type:"button",onClick:()=>o(!0),children:[d.jsx(Sg,{className:"size-4 mr-1.5"}),"Add project"]})]}),d.jsx(JN,{onApplied:s})]})}function JN({onApplied:a}){const[i,s]=j.useState(""),[r,o]=j.useState(!1),[u,h]=j.useState([]),[m,y]=j.useState([]),g=async()=>{if(!i.trim())return;o(!0),h([]),y([]);const x=ES(i),b=[],S=[];for(let A=0;A<x.length;A++){const O=x[A];if(O.errors.length>0){b.push(`Document ${A+1}: ${O.errors[0]?.message}`);continue}const w=O.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 ${A+1}: ${N instanceof Error?N.message:String(N)}`)}}h(S),y(b),o(!1),S.length>0&&a()};return d.jsxs("section",{className:"mt-8",children:[d.jsx("div",{className:"page-section-divider"}),d.jsx("div",{className:"section-head mt-6",children:d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Config as code"}),d.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Apply YAML"})]})}),d.jsxs("p",{className:"text-zinc-500 text-sm mb-3",children:["Paste a ",d.jsx("code",{className:"text-zinc-400",children:"canonry.yaml"})," config (multi-document YAML with ",d.jsx("code",{className:"text-zinc-400",children:"---"})," separators supported)."]}),d.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)}),u.length>0&&d.jsx("ul",{className:"mt-2 space-y-1",children:u.map((x,b)=>d.jsx("li",{className:"text-emerald-400 text-sm",children:x},b))}),m.length>0&&d.jsx("ul",{className:"mt-2 space-y-1",children:m.map((x,b)=>d.jsx("li",{className:"text-rose-400 text-sm",children:x},b))}),d.jsx("div",{className:"mt-3",children:d.jsx(me,{type:"button",disabled:!i.trim()||r,onClick:g,children:r?"Applying...":"Apply"})})]})}function FN({model:a,onOpenEvidence:i,onOpenRun:s,onTriggerRun:r,onDeleteProject:o,onAddKeywords:u,onAddCompetitors:h}){const[m,y]=j.useState(!1),[g,x]=j.useState(!1),[b,S]=j.useState(!1),[A,O]=j.useState(null),[w,N]=j.useState(!1),[E,$]=j.useState(""),[_,M]=j.useState(!1),[L,G]=j.useState(!1),[X,D]=j.useState(""),[P,Se]=j.useState(!1);async function W(){const te=await aN(a.project.name),B=typeof te=="string"?te:JSON.stringify(te,null,2),J=new Blob([B],{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=E.split(`
|
|
195
|
+
`).map(B=>B.trim()).filter(Boolean);if(te.length!==0){M(!0);try{await u(a.project.name,te),$(""),N(!1)}finally{M(!1)}}}async function ue(){const te=X.trim();if(te){Se(!0);try{await h(a.project.name,[te]),D(""),G(!1)}finally{Se(!1)}}}const ye=te=>!Number.isNaN(Number.parseInt(te,10));return d.jsxs("div",{className:"page-container",children:[m?d.jsxs(tt,{className:"surface-card p-6 mb-6 border-rose-800/60",children:[d.jsx("h3",{className:"text-base font-semibold text-rose-400 mb-2",children:"Delete project?"}),d.jsxs("p",{className:"text-sm text-zinc-400 mb-4",children:["This will permanently delete ",d.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."]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(me,{type:"button",variant:"destructive",disabled:g,onClick:async()=>{x(!0),o(a.project.name)},children:g?"Deleting...":"Yes, delete project"}),d.jsx(me,{type:"button",variant:"outline",disabled:g,onClick:()=>y(!1),children:"Cancel"})]})]}):null,d.jsxs("div",{className:"page-header",children:[d.jsxs("div",{className:"page-header-left",children:[d.jsx("h1",{className:"page-title",children:a.project.displayName||a.project.name}),d.jsxs("p",{className:"page-subtitle",children:[a.project.canonicalDomain," · ",a.contextLabel]}),d.jsxs("div",{className:"tag-row",children:[d.jsx("span",{className:"tag",children:a.project.country}),d.jsx("span",{className:"tag",children:a.project.language.toUpperCase()}),a.project.tags.map(te=>d.jsx("span",{className:"tag",children:te},te))]})]}),d.jsxs("div",{className:"page-header-right",children:[d.jsx("p",{className:"text-sm text-zinc-500",children:a.dateRangeLabel}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(me,{type:"button",variant:"outline",size:"icon",onClick:W,"aria-label":"Export project as YAML",children:d.jsx(hw,{className:"h-4 w-4 text-zinc-400"})}),d.jsx(me,{type:"button",variant:"outline",size:"icon",onClick:()=>y(!0),"aria-label":"Delete project",children:d.jsx(kw,{className:"h-4 w-4 text-zinc-400"})}),d.jsx(me,{type:"button",disabled:b,onClick:async()=>{S(!0),O(null);try{await r(a.project.name)}catch(te){O(te instanceof Error?te.message:"Failed to trigger run")}finally{S(!1)}},children:b?"Starting...":"Run now"})]})]})]}),A&&d.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:[A,d.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>O(null),children:"×"})]}),d.jsxs("section",{className:"gauge-row",children:[d.jsx(Wu,{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:ye(a.visibilitySummary.value)}),d.jsx(Wu,{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:ye(a.competitorPressure.value)}),d.jsx(Wu,{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:ye(a.runStatus.value)})]}),a.providerScores.length>1&&d.jsxs("section",{className:"page-section-divider",children:[d.jsx("div",{className:"section-head section-head-inline",children:d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Provider breakdown"}),d.jsxs("h2",{children:["Visibility by provider ",d.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."})]})]})}),d.jsx("div",{className:"grid grid-cols-3 gap-3",children:a.providerScores.map(te=>d.jsxs(tt,{className:"surface-card compact-card",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx(Kd,{provider:te.provider}),d.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,"%"]})]}),d.jsxs("p",{className:"mt-1 text-xs text-zinc-500",children:[te.cited," of ",te.total," key phrases cited"]})]},te.provider))})]}),d.jsxs("section",{className:"page-section-divider",children:[d.jsx("div",{className:"section-head section-head-inline",children:d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"What changed"}),d.jsx("h2",{children:"Citation signals"})]})}),d.jsx(qN,{insights:a.insights,onOpenEvidence:i})]}),d.jsxs("section",{className:"page-section-divider",children:[d.jsxs("div",{className:"section-head section-head-inline",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Visibility evidence"}),d.jsx("h2",{children:"Key phrase citation tracking"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("p",{className:"supporting-copy",children:[new Set(a.visibilityEvidence.map(te=>te.keyword)).size," key phrases tracked"]}),d.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>N(!w),children:w?"Cancel":"+ Add key phrases"})]})]}),w&&d.jsxs("div",{className:"mb-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3",children:[d.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:E,onChange:te=>$(te.target.value)}),d.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[d.jsxs("p",{className:"text-xs text-zinc-500",children:[E.split(`
|
|
196
|
+
`).filter(te=>te.trim()).length," key phrases"]}),d.jsx(me,{type:"button",size:"sm",disabled:!E.trim()||_,onClick:se,children:_?"Adding...":"Add key phrases"})]})]}),d.jsx(GN,{evidence:a.visibilityEvidence,onOpenEvidence:i})]}),d.jsxs("section",{className:"page-section-divider",children:[d.jsxs("div",{className:"section-head section-head-inline",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Competitors"}),d.jsx("h2",{children:"Competitive landscape"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("p",{className:"supporting-copy",children:[a.competitors.length," tracked"]}),d.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>G(!L),children:L?"Cancel":"+ Add competitor"})]})]}),L&&d.jsxs("div",{className:"mb-3 flex gap-2 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3",children:[d.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:X,onChange:te=>D(te.target.value),onKeyDown:te=>te.key==="Enter"&&ue()}),d.jsx(me,{type:"button",size:"sm",disabled:!X.trim()||P,onClick:ue,children:P?"Adding...":"Add"})]}),d.jsx(QN,{competitors:a.competitors})]}),d.jsxs("section",{className:"page-section-divider",children:[d.jsx("div",{className:"section-head section-head-inline",children:d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Run timeline"}),d.jsx("h2",{children:"Recent execution history"})]})}),d.jsx("div",{className:"run-list",children:a.recentRuns.map(te=>d.jsx(qv,{run:te,onOpen:s},te.id))})]}),d.jsx(n2,{projectName:a.project.name}),d.jsx(i2,{projectName:a.project.name})]})}const PN=[{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"}],Rg=["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 ud(a){return a===0?"12:00 AM":a<12?`${a}:00 AM`:a===12?"12:00 PM":`${a-12}:00 PM`}function WN(a,i){return a==="twice-daily"?"twice-daily":a.startsWith("weekly@")?`${a}@${i}`:`daily@${i}`}function e2(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 t2(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 o=a.match(/^daily(?:@(\d+))?$/);if(o){const h=o[1]?parseInt(o[1]):6;return`Every day at ${ud(h)} · ${r}`}const u=a.match(/^weekly@(mon|tue|wed|thu|fri|sat|sun)(?:@(\d+))?$/);if(u){const h={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"},m=u[2]?parseInt(u[2]):6;return`Every ${h[u[1]]} at ${ud(m)} · ${r}`}return`${a} · ${r}`}function n2({projectName:a}){const[i,s]=j.useState("loading"),[r,o]=j.useState(!1),[u,h]=j.useState("daily"),[m,y]=j.useState(6),[g,x]=j.useState(""),[b,S]=j.useState("UTC"),[A,O]=j.useState(!1),[w,N]=j.useState(""),[E,$]=j.useState(!1),[_,M]=j.useState(!1),[L,G]=j.useState(null);j.useEffect(()=>{lN(a).then(s).catch(()=>s(null))},[a]);const X=()=>{if(i&&i!=="loading"){const W=e2(i.preset??null,i.cronExpr);h(W.freq),y(W.hour),x(W.customCron);const se=Rg.includes(i.timezone);S(se?i.timezone:"Other"),O(!se),N(se?"":i.timezone)}else h("daily"),y(6),x(""),S("UTC"),O(!1),N("");G(null),o(!0)},D=async()=>{$(!0),G(null);try{const se={timezone:A?w.trim()||"UTC":b};u==="custom"?se.cron=g.trim():se.preset=WN(u,m);const ue=await Og(a,se);s(ue),o(!1)}catch(W){G(W instanceof Error?W.message:"Failed to save schedule")}finally{$(!1)}},P=async()=>{if(!(!i||i==="loading")){$(!0),G(null);try{const W={timezone:i.timezone,enabled:!i.enabled};i.preset?W.preset=i.preset:W.cron=i.cronExpr,s(await Og(a,W))}catch(W){G(W instanceof Error?W.message:"Failed to update schedule")}finally{$(!1)}}},Se=async()=>{M(!0),G(null);try{await rN(a),s(null),o(!1)}catch(W){G(W instanceof Error?W.message:"Failed to remove schedule")}finally{M(!1)}};return d.jsxs("section",{className:"page-section-divider",children:[d.jsxs("div",{className:"section-head section-head-inline",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Automation"}),d.jsx("h2",{children:"Scheduled runs"})]}),i!=="loading"&&!r&&d.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:X,children:i?"Edit schedule":"+ Set schedule"})]}),i==="loading"&&d.jsx("p",{className:"supporting-copy",children:"Loading..."}),i!=="loading"&&!r&&i===null&&d.jsx(tt,{className:"surface-card compact-card",children:d.jsx("p",{className:"supporting-copy",children:"No schedule configured. Set one to automatically trigger visibility sweeps."})}),i!=="loading"&&!r&&i!==null&&d.jsxs(tt,{className:"surface-card compact-card",children:[d.jsxs("div",{className:"flex items-start justify-between gap-4",children:[d.jsxs("div",{className:"space-y-1",children:[d.jsx("p",{className:"text-sm font-medium text-zinc-200",children:t2(i.preset??null,i.cronExpr,i.timezone)}),d.jsxs("p",{className:"text-xs text-zinc-500",children:["Cron: ",d.jsx("span",{className:"font-mono",children:i.cronExpr})]}),i.nextRunAt&&d.jsxs("p",{className:"text-xs text-zinc-500",children:["Next run: ",new Date(i.nextRunAt).toLocaleString()]}),i.lastRunAt&&d.jsxs("p",{className:"text-xs text-zinc-500",children:["Last run: ",new Date(i.lastRunAt).toLocaleString()]})]}),d.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[d.jsx(lt,{tone:i.enabled?"positive":"neutral",children:i.enabled?"Active":"Paused"}),d.jsx(me,{type:"button",variant:"outline",size:"sm",disabled:E,onClick:P,children:i.enabled?"Pause":"Resume"}),d.jsx(me,{type:"button",variant:"ghost",size:"sm",disabled:_,onClick:Se,children:_?"Removing...":"Remove"})]})]}),L&&d.jsx("p",{className:"text-rose-400 text-sm mt-2",children:L})]}),r&&d.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-3",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Frequency"}),d.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:u,onChange:W=>h(W.target.value),children:PN.map(W=>d.jsx("option",{value:W.value,children:W.label},W.value))})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Time"}),d.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:u==="twice-daily"||u==="custom",onChange:W=>y(parseInt(W.target.value)),children:Array.from({length:24},(W,se)=>d.jsx("option",{value:se,children:ud(se)},se))})]})]}),u==="custom"&&d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Cron expression"}),d.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)})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Timezone"}),d.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:A?"Other":b,onChange:W=>{W.target.value==="Other"?(O(!0),S("Other")):(O(!1),S(W.target.value))},children:[Rg.map(W=>d.jsx("option",{value:W,children:W},W)),d.jsx("option",{value:"Other",children:"Other (enter manually)…"})]}),A&&d.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)})]}),L&&d.jsx("p",{className:"text-rose-400 text-sm",children:L}),d.jsxs("div",{className:"flex gap-2 justify-end",children:[d.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!1),G(null)},children:"Cancel"}),d.jsx(me,{type:"button",size:"sm",disabled:E||u==="custom"&&!g.trim(),onClick:D,children:E?"Saving...":"Save schedule"})]})]})]})}const a2=[{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 i2({projectName:a}){const[i,s]=j.useState("loading"),[r,o]=j.useState(!1),[u,h]=j.useState(""),[m,y]=j.useState(["citation.lost","citation.gained"]),[g,x]=j.useState(!1),[b,S]=j.useState(null),[A,O]=j.useState({});j.useEffect(()=>{oN(a).then(s).catch(()=>s([]))},[a]);const w=_=>{y(M=>M.includes(_)?M.filter(L=>L!==_):[...M,_])},N=async()=>{if(!(!u.trim()||m.length===0)){x(!0),S(null);try{const _=await cN(a,{channel:"webhook",url:u.trim(),events:m});s(M=>M==="loading"?[_]:[...M,_]),h(""),y(["citation.lost","citation.gained"]),o(!1)}catch(_){S(_ instanceof Error?_.message:"Failed to add webhook")}finally{x(!1)}}},E=async _=>{try{await uN(a,_),s(M=>M==="loading"?M:M.filter(L=>L.id!==_))}catch(M){S(M instanceof Error?M.message:"Failed to remove webhook")}},$=async _=>{O(M=>({...M,[_]:{state:"testing"}}));try{const M=await dN(a,_);O(L=>({...L,[_]:{state:M.ok?"ok":"fail",status:M.status}}))}catch{O(M=>({...M,[_]:{state:"fail"}}))}};return d.jsxs("section",{className:"page-section-divider",children:[d.jsxs("div",{className:"section-head section-head-inline",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Automation"}),d.jsx("h2",{children:"Notifications"})]}),i!=="loading"&&d.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!r),S(null)},children:r?"Cancel":"+ Add webhook"})]}),r&&d.jsxs("div",{className:"mb-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-3",children:[d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Webhook URL"}),d.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:u,onChange:_=>h(_.target.value)})]}),d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Trigger on"}),d.jsx("div",{className:"flex flex-wrap gap-3",children:a2.map(_=>d.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[d.jsx("input",{type:"checkbox",className:"rounded border-zinc-600 bg-zinc-800",checked:m.includes(_.value),onChange:()=>w(_.value)}),d.jsx("span",{className:"text-sm text-zinc-300",children:_.label})]},_.value))})]}),b&&d.jsx("p",{className:"text-rose-400 text-sm",children:b}),d.jsxs("div",{className:"flex gap-2 justify-end",children:[d.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!1),S(null)},children:"Cancel"}),d.jsx(me,{type:"button",size:"sm",disabled:g||!u.trim()||m.length===0,onClick:N,children:g?"Adding...":"Add webhook"})]})]}),i==="loading"&&d.jsx("p",{className:"supporting-copy",children:"Loading..."}),i!=="loading"&&i.length===0&&!r&&d.jsx(tt,{className:"surface-card compact-card",children:d.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&&d.jsxs("div",{className:"evidence-table-wrap",children:[d.jsxs("table",{className:"evidence-table",children:[d.jsx("thead",{children:d.jsxs("tr",{children:[d.jsx("th",{children:"URL"}),d.jsx("th",{children:"Events"}),d.jsx("th",{children:"Status"}),d.jsx("th",{})]})}),d.jsx("tbody",{children:i.map(_=>d.jsxs("tr",{children:[d.jsx("td",{className:"evidence-keyword-cell",children:d.jsx("span",{className:"font-mono text-xs text-zinc-300 break-all",children:_.url})}),d.jsx("td",{children:d.jsx("div",{className:"flex flex-wrap gap-1",children:_.events.map(M=>d.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:M.replace("."," ")},M))})}),d.jsx("td",{children:d.jsx(lt,{tone:_.enabled?"positive":"neutral",children:_.enabled?"Active":"Paused"})}),d.jsx("td",{children:d.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[A[_.id]&&(()=>{const M=A[_.id],L=M.state==="testing"?"Sending…":M.state==="ok"?`Delivered${M.status?` (${M.status})`:""}`:`Failed${M.status?` (${M.status})`:""}`;return d.jsx(lt,{tone:M.state==="ok"?"positive":M.state==="fail"?"negative":"neutral",children:L})})(),d.jsx(me,{variant:"ghost",size:"sm",type:"button",disabled:A[_.id]?.state==="testing",onClick:()=>$(_.id),children:"Test"}),d.jsx(me,{variant:"ghost",size:"sm",type:"button",onClick:()=>E(_.id),children:"Remove"})]})})]},_.id))})]}),b&&d.jsx("p",{className:"text-rose-400 text-sm mt-2",children:b})]})]})}function s2({runs:a,onOpenRun:i}){const[s,r]=j.useState("all"),o=s==="all"?a:a.filter(u=>u.status===s);return d.jsxs("div",{className:"page-container",children:[d.jsx("div",{className:"page-header",children:d.jsxs("div",{className:"page-header-left",children:[d.jsx("h1",{className:"page-title",children:"Runs"}),d.jsx("p",{className:"page-subtitle",children:"Status, type, project, duration, and the shortest explanation that makes the outcome trustworthy."})]})}),d.jsxs("section",{children:[d.jsx("div",{className:"filter-row",role:"toolbar","aria-label":"Run filters",children:["all","queued","running","completed","partial","failed"].map(u=>d.jsx("button",{className:`filter-chip ${s===u?"filter-chip-active":""}`,type:"button","aria-pressed":s===u,onClick:()=>r(u),children:u==="all"?"All runs":ho(u)},u))}),d.jsx("div",{className:"run-list",children:o.length>0?o.map(u=>d.jsx(qv,{run:u,onOpen:i},u.id)):d.jsxs(tt,{className:"surface-card empty-card",children:[d.jsx("h2",{children:"No runs match this filter"}),d.jsx("p",{children:"Try another status filter or queue a new run from a project command center."})]})})]})]})}const l2={openai:"https://platform.openai.com/api-keys",claude:"https://platform.claude.com/settings/keys"},$v={gemini:"Gemini",openai:"OpenAI",claude:"Claude",local:"Local"},r2={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 o2({providerName:a,onSaved:i}){const s=a.toLowerCase()==="local",[r,o]=j.useState(""),[u,h]=j.useState(""),[m,y]=j.useState(""),[g,x]=j.useState(!1),[b,S]=j.useState(null),[A,O]=j.useState(!1),w=s?u.trim().length>0:r.trim().length>0;async function N(){if(w){x(!0),S(null),O(!1);try{await sN(a.toLowerCase(),{...r.trim()?{apiKey:r.trim()}:{},...u.trim()?{baseUrl:u.trim()}:{},...m.trim()?{model:m.trim()}:{}}),o(""),h(""),y(""),O(!0),i()}catch(_){S(_ instanceof Error?_.message:"Failed to update provider")}finally{x(!1)}}}const E=l2[a.toLowerCase()],$=r2[a.toLowerCase()]??"Use default model";return d.jsxs("div",{className:"mt-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3 space-y-2",children:[s&&d.jsxs("div",{children:[d.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`base-url-${a}`,children:"Base URL"}),d.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:u,onChange:_=>h(_.target.value)}),d.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Any OpenAI-compatible endpoint — Ollama, LM Studio, llama.cpp, vLLM"})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("label",{className:"text-xs text-zinc-500",htmlFor:`api-key-${a}`,children:["API Key",s?" (optional)":""]}),E&&d.jsx("a",{href:E,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-zinc-500 hover:text-zinc-300 underline underline-offset-2",children:"Get API key ↗"})]}),d.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:_=>o(_.target.value)})]}),d.jsxs("div",{children:[d.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`model-${a}`,children:"Model (optional)"}),d.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:$,value:m,onChange:_=>y(_.target.value)})]}),b&&d.jsx("p",{className:"text-xs text-rose-400",children:b}),A&&d.jsx("p",{className:"text-xs text-emerald-400",children:"Provider updated."}),d.jsx(me,{type:"button",size:"sm",disabled:!w||g,onClick:N,children:g?"Saving...":"Save"})]})}function c2({settings:a,healthSnapshot:i,onSettingsChanged:s}){const[r,o]=j.useState(null);return d.jsxs("div",{className:"page-container",children:[d.jsx("div",{className:"page-header",children:d.jsxs("div",{className:"page-header-left",children:[d.jsx("h1",{className:"page-title",children:"Settings"}),d.jsx("p",{className:"page-subtitle",children:"Provider state, quotas, and service health."})]})}),d.jsxs("section",{className:"settings-grid",children:[a.providerStatuses.map(u=>d.jsxs(tt,{className:"surface-card",children:[d.jsxs("div",{className:"section-head",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Provider"}),d.jsx("h2",{children:u.name})]}),d.jsx(lt,{tone:u.state==="ready"?"positive":"caution",children:u.state==="ready"?"Ready":"Needs config"})]}),d.jsxs("dl",{className:"definition-list mt-3",children:[d.jsxs("div",{children:[d.jsx("dt",{children:"Model"}),d.jsx("dd",{className:"font-mono text-xs",children:u.model})]}),u.quota&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{children:[d.jsx("dt",{children:"Concurrency"}),d.jsx("dd",{children:u.quota.maxConcurrency})]}),d.jsxs("div",{children:[d.jsx("dt",{children:"Rate limit"}),d.jsxs("dd",{children:[u.quota.maxRequestsPerMinute,"/min · ",u.quota.maxRequestsPerDay,"/day"]})]})]})]}),d.jsx("p",{className:"mt-2 text-sm text-zinc-500",children:u.detail}),d.jsx("div",{className:"mt-2",children:d.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>o(r===u.name?null:u.name),children:r===u.name?"Cancel":u.state==="ready"?u.name.toLowerCase()==="local"?"Update config":"Update key":"Configure"})}),r===u.name&&d.jsx(o2,{providerName:u.name,onSaved:()=>{o(null),s?.()}})]},u.name)),d.jsxs(tt,{className:"surface-card",children:[d.jsx("div",{className:"section-head",children:d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Service health"}),d.jsx("h2",{children:"API and worker"})]})}),d.jsxs("div",{className:"compact-stack",children:[d.jsxs("div",{className:"health-row",children:[d.jsxs("div",{children:[d.jsx("p",{className:"run-row-title",children:"API"}),d.jsx("p",{className:"supporting-copy",children:i.apiStatus.detail})]}),d.jsx(lt,{tone:Fr(i.apiStatus),children:i.apiStatus.state==="ok"?"Healthy":"Attention"})]}),d.jsxs("div",{className:"health-row",children:[d.jsxs("div",{children:[d.jsx("p",{className:"run-row-title",children:"Worker"}),d.jsx("p",{className:"supporting-copy",children:i.workerStatus.detail})]}),d.jsx(lt,{tone:Fr(i.workerStatus),children:i.workerStatus.state==="ok"?"Healthy":"Attention"})]})]})]})]}),d.jsx("section",{className:"page-section",children:d.jsxs(tt,{className:"surface-card",children:[d.jsx("div",{className:"section-head",children:d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Self-host notes"}),d.jsx("h2",{children:"Operational guidance"})]})}),d.jsx("ul",{className:"detail-list",children:a.selfHostNotes.map(u=>d.jsx("li",{children:u},u))}),d.jsx("p",{className:"supporting-copy",children:a.bootstrapNote})]})})]})}const u2=[{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 d2({current:a,labels:i}){return d.jsx("div",{className:"setup-steps",role:"list","aria-label":"Setup progress",children:i.map((s,r)=>{const o=r<a,u=r===a;return d.jsxs("div",{className:`setup-step ${o?"setup-step-done":""} ${u?"setup-step-active":""}`,role:"listitem","aria-current":u?"step":void 0,children:[d.jsx("span",{className:"setup-step-number",children:o?"✓":r+1}),d.jsx("span",{className:"setup-step-label",children:s.label})]},s.label)})})}function f2({model:a,settings:i,onProjectCreated:s,onNavigate:r}){const[o,u]=j.useState(0),[h,m]=j.useState(""),[y,g]=j.useState(""),[x,b]=j.useState(""),[S,A]=j.useState("US"),[O,w]=j.useState("en"),[N,E]=j.useState(null),[$,_]=j.useState(null),[M,L]=j.useState(null),[G,X]=j.useState(!1),[D,P]=j.useState(""),[Se,W]=j.useState(!1),[se,ue]=j.useState(null),[ye,te]=j.useState(!1),B=i.providerStatuses.filter(ae=>ae.state==="ready"),[J,ne]=j.useState(B[0]?.name??""),[fe,I]=j.useState(5),[k,V]=j.useState(!1),[ee,R]=j.useState(null),[F,ie]=j.useState(""),[pe,$e]=j.useState(!1),[ge,Pt]=j.useState(null),[Rt,Wt]=j.useState(!1),[gn,yt]=j.useState(!1),[Qa,Xa]=j.useState(null),[ll,Fi]=j.useState(!1),en=h.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Lt=D.split(`
|
|
197
|
+
`).map(ae=>ae.trim()).filter(Boolean),yn=F.split(`
|
|
198
|
+
`).map(ae=>ae.trim()).filter(Boolean),po=a.healthChecks.some(ae=>ae.id==="api"&&ae.state==="ready"),go=async()=>{if(!(!en||!x)){X(!0),L(null);try{const ae=await Tv(en,{displayName:y||h,canonicalDomain:x,country:S,language:O});E(en),_(ae.id),s(),u(2)}catch(ae){L(ae instanceof Error?ae.message:"Failed to create project")}finally{X(!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(),u(3)}catch(vn){ue(vn instanceof Error?vn.message:"Failed to save key phrases")}finally{te(!1)}}},yo=async()=>{if(!(!N||!J)){V(!0),R(null);try{const ae=await fN(N,J,fe);if(ae.keywords.length>0){const vn=D?D.trimEnd()+`
|
|
199
|
+
`+ae.keywords.join(`
|
|
200
|
+
`):ae.keywords.join(`
|
|
201
|
+
`);P(vn)}}catch(ae){R(ae instanceof Error?ae.message:"Failed to generate key phrases")}finally{V(!1)}}},rl=async()=>{if(!N)return;const ae=yn;if(ae.length!==0){Wt(!0),Pt(null);try{await Ov(N,ae),$e(!0),s(),u(4)}catch(vn){Pt(vn instanceof Error?vn.message:"Failed to save competitors")}finally{Wt(!1)}}},ol=async()=>{if(N){Fi(!0),Xa(null);try{await zv(N),yt(!0),s()}catch(ae){Xa(ae instanceof Error?ae.message:"Failed to trigger run")}finally{Fi(!1)}}},Ut=()=>u(ae=>Math.max(0,ae-1)),vo=(()=>{switch(o){case 0:return d.jsxs(tt,{className:"surface-card step-card",children:[d.jsx("div",{className:"section-head",children:d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 1 of 5"}),d.jsx("h2",{children:"System ready"})]})}),d.jsx("p",{className:"supporting-copy",children:"Checking that your Canonry instance is configured and reachable."}),d.jsx("div",{className:"compact-stack",children:a.healthChecks.map(ae=>d.jsxs("div",{className:"health-check-row",children:[d.jsxs("div",{children:[d.jsx("p",{className:"run-row-title",children:ae.label}),d.jsx("p",{className:"supporting-copy",children:ae.detail}),ae.id==="provider"&&ae.state!=="ready"&&d.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"})]}),d.jsx(lt,{tone:ae.state==="ready"?"positive":"caution",children:ae.state==="ready"?"Ready":"Attention"})]},ae.id))}),d.jsxs("div",{className:"setup-nav",children:[d.jsx("span",{}),d.jsx(me,{type:"button",disabled:!po,onClick:()=>u(1),children:"Continue"})]})]});case 1:return d.jsxs(tt,{className:"surface-card step-card",children:[d.jsxs("div",{className:"section-head",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 2 of 5"}),d.jsx("h2",{children:"Create project"})]}),N?d.jsx(lt,{tone:"positive",children:"Created"}):null]}),N?d.jsxs("div",{className:"compact-stack",children:[d.jsxs("p",{className:"text-zinc-300",children:["Project ",d.jsx("span",{className:"text-zinc-100 font-medium",children:N})," created successfully."]}),d.jsxs("div",{className:"setup-nav",children:[d.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),d.jsx(me,{type:"button",onClick:()=>u(2),children:"Continue"})]})]}):d.jsxs("div",{className:"compact-stack",children:[d.jsxs("div",{className:"setup-field",children:[d.jsx("label",{className:"setup-label",htmlFor:"project-name",children:"Project name"}),d.jsx("input",{id:"project-name",className:"setup-input",type:"text",placeholder:"my-website",value:h,onChange:ae=>m(ae.target.value)}),en&&en!==h?d.jsxs("p",{className:"supporting-copy",children:["Slug: ",en]}):null]}),d.jsxs("div",{className:"setup-field",children:[d.jsx("label",{className:"setup-label",htmlFor:"display-name",children:"Display name (optional)"}),d.jsx("input",{id:"display-name",className:"setup-input",type:"text",placeholder:"My Website",value:y,onChange:ae=>g(ae.target.value)})]}),d.jsxs("div",{className:"setup-field",children:[d.jsx("label",{className:"setup-label",htmlFor:"domain",children:"Canonical domain"}),d.jsx("input",{id:"domain",className:"setup-input",type:"text",placeholder:"example.com",value:x,onChange:ae=>b(ae.target.value)})]}),d.jsxs("div",{className:"setup-field-row",children:[d.jsxs("div",{className:"setup-field",children:[d.jsx("label",{className:"setup-label",htmlFor:"country",children:"Country"}),d.jsx("input",{id:"country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:S,onChange:ae=>A(ae.target.value.toUpperCase())})]}),d.jsxs("div",{className:"setup-field",children:[d.jsx("label",{className:"setup-label",htmlFor:"language",children:"Language"}),d.jsx("input",{id:"language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:O,onChange:ae=>w(ae.target.value.toLowerCase())})]})]}),M?d.jsx("p",{className:"text-rose-400 text-sm",children:M}):null,d.jsxs("div",{className:"setup-nav",children:[d.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),d.jsx(me,{type:"button",disabled:!en||!x||G,onClick:go,children:G?"Creating...":"Create project"})]})]})]});case 2:return d.jsxs(tt,{className:"surface-card step-card",children:[d.jsxs("div",{className:"section-head",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 3 of 5"}),d.jsx("h2",{children:"Add key phrases"})]}),Se?d.jsxs(lt,{tone:"positive",children:[Lt.length," saved"]}):d.jsxs(lt,{tone:"neutral",children:[Lt.length," key phrase",Lt.length!==1?"s":""]})]}),d.jsx("p",{className:"supporting-copy",children:"Enter the search queries you want to track. One per line."}),Se?d.jsxs("div",{className:"compact-stack",children:[d.jsx("ul",{className:"detail-list",children:Lt.map(ae=>d.jsx("li",{children:ae},ae))}),d.jsxs("div",{className:"setup-nav",children:[d.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),d.jsx(me,{type:"button",onClick:()=>u(3),children:"Continue"})]})]}):d.jsxs("div",{className:"compact-stack",children:[B.length>0?d.jsxs("div",{className:"compact-stack",children:[d.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[d.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"auto-generate",d.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),d.jsxs("div",{className:"flex items-end gap-2",children:[d.jsxs("div",{className:"setup-field flex-1",children:[d.jsx("label",{className:"setup-label",htmlFor:"gen-provider",children:"Provider"}),d.jsx("select",{id:"gen-provider",className:"setup-input",value:J,onChange:ae=>ne(ae.target.value),children:B.map(ae=>d.jsxs("option",{value:ae.name,children:[$v[ae.name]??ae.name,ae.model?` (${ae.model})`:""]},ae.name))})]}),d.jsxs("div",{className:"setup-field",children:[d.jsx("label",{className:"setup-label",htmlFor:"gen-count",children:"Count"}),d.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=>d.jsx("option",{value:ae,children:ae},ae))})]}),d.jsx(me,{type:"button",variant:"outline",disabled:k||!J,onClick:yo,children:k?"Analyzing site...":"Generate"})]}),ee?d.jsx("p",{className:"text-rose-400 text-sm",children:ee}):null]}):null,d.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[d.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"or type manually",d.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),d.jsxs("div",{className:"setup-field",children:[d.jsx("label",{className:"setup-label",htmlFor:"keywords",children:"Key phrases (one per line)"}),d.jsx("textarea",{id:"keywords",className:"setup-textarea",rows:6,placeholder:`emergency dentist brooklyn
|
|
202
|
+
best invisalign downtown brooklyn
|
|
203
|
+
pediatric dentist brooklyn heights`,value:D,onChange:ae=>P(ae.target.value)})]}),se?d.jsx("p",{className:"text-rose-400 text-sm",children:se}):null,d.jsxs("div",{className:"setup-nav",children:[d.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),d.jsx(me,{type:"button",disabled:Lt.length===0||ye,onClick:ht,children:ye?"Saving...":`Save ${Lt.length} key phrase${Lt.length!==1?"s":""}`})]})]})]});case 3:return d.jsxs(tt,{className:"surface-card step-card",children:[d.jsxs("div",{className:"section-head",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 4 of 5"}),d.jsx("h2",{children:"Add competitors"})]}),pe?d.jsx(lt,{tone:"positive",children:"Saved"}):null]}),d.jsx("p",{className:"supporting-copy",children:"Domains that compete for the same key phrases. One per line."}),pe?d.jsxs("div",{className:"compact-stack",children:[d.jsx("ul",{className:"detail-list",children:yn.map(ae=>d.jsx("li",{children:ae},ae))}),d.jsxs("div",{className:"setup-nav",children:[d.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),d.jsx(me,{type:"button",onClick:()=>u(4),children:"Continue"})]})]}):d.jsxs("div",{className:"compact-stack",children:[d.jsxs("div",{className:"setup-field",children:[d.jsx("label",{className:"setup-label",htmlFor:"competitors",children:"Competitor domains (one per line)"}),d.jsx("textarea",{id:"competitors",className:"setup-textarea",rows:4,placeholder:`competitor1.com
|
|
204
|
+
competitor2.com`,value:F,onChange:ae=>ie(ae.target.value)})]}),ge?d.jsx("p",{className:"text-rose-400 text-sm",children:ge}):null,d.jsxs("div",{className:"setup-nav",children:[d.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx(me,{type:"button",variant:"outline",onClick:()=>u(4),children:"Skip"}),d.jsx(me,{type:"button",disabled:yn.length===0||Rt,onClick:rl,children:Rt?"Saving...":`Save ${yn.length} competitor${yn.length!==1?"s":""}`})]})]})]})]});case 4:return d.jsxs(tt,{className:"surface-card step-card",children:[d.jsxs("div",{className:"section-head",children:[d.jsxs("div",{children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 5 of 5"}),d.jsx("h2",{children:"Launch first run"})]}),gn?d.jsx(lt,{tone:"positive",children:"Queued"}):null]}),gn?d.jsxs("div",{className:"compact-stack",children:[d.jsx("p",{className:"text-zinc-300",children:"Visibility sweep has been queued. View progress on the project page."}),d.jsxs("div",{className:"setup-nav",children:[d.jsx("span",{}),d.jsx(me,{type:"button",onClick:()=>r($?`/projects/${$}`:"/"),children:"Open project"})]})]}):d.jsxs("div",{className:"compact-stack",children:[d.jsxs("p",{className:"supporting-copy",children:["Everything is configured. Launch an answer-visibility sweep to start tracking citations for ",d.jsx("span",{className:"text-zinc-100 font-medium",children:N}),"."]}),Qa?d.jsx("p",{className:"text-rose-400 text-sm",children:Qa}):null,d.jsxs("div",{className:"setup-nav",children:[d.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),d.jsx(me,{type:"button",disabled:ll,onClick:ol,children:ll?"Launching...":"Launch visibility sweep"})]})]})]});default:return null}})();return d.jsxs("div",{className:"page-container",children:[d.jsx("div",{className:"page-header",children:d.jsxs("div",{className:"page-header-left",children:[d.jsx("h1",{className:"page-title",children:"Setup"}),d.jsx("p",{className:"page-subtitle",children:"Create a project, add key phrases, add competitors, and launch the first run."})]})}),d.jsx(d2,{current:o,labels:u2}),d.jsx("section",{className:"setup-wizard",children:vo})]})}function h2({onNavigate:a}){return d.jsx("div",{className:"page-container",children:d.jsx("section",{className:"page-section",children:d.jsxs(tt,{className:"surface-card empty-card",children:[d.jsx("h1",{children:"Route not found"}),d.jsx("p",{children:"The current path does not map to a dashboard view."}),d.jsx(me,{asChild:!0,children:d.jsx("a",{href:"/",onClick:Mt(a,"/"),children:"Return to overview"})})]})})})}function m2({title:a,subtitle:i,children:s,open:r,onClose:o}){return d.jsx(Mj,{open:r,onOpenChange:u=>u?void 0:o(),children:d.jsxs(Nv,{children:[d.jsxs(Hj,{className:"drawer-head",children:[d.jsx("p",{className:"eyebrow eyebrow-soft",children:i}),d.jsx(Cv,{id:"drawer-title",children:a}),d.jsx(Ev,{className:"sr-only",children:i})]}),d.jsx("div",{className:"drawer-body",children:s})]})})}function Lg(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"?d.jsx("strong",{className:"text-zinc-200 font-semibold",children:h.value},`b-${m}`):h.value).filter(Boolean);const o=s.map(h=>h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),u=new RegExp(`(${o.join("|")})`,"gi");return r.flatMap((h,m)=>h.value.split(u).map((g,x)=>g?x%2===1?h.type==="bold"?d.jsx("mark",{className:"answer-highlight",children:d.jsx("strong",{className:"text-zinc-200 font-semibold",children:g})},`hl-${m}-${x}`):d.jsx("mark",{className:"answer-highlight",children:g},`hl-${m}-${x}`):h.type==="bold"?d.jsx("strong",{className:"text-zinc-200 font-semibold",children:g},`b-${m}-${x}`):g:null)).filter(Boolean)}function p2({evidence:a,project:i,onClose:s}){const[r,o]=j.useState(!1),[u,h]=j.useState(-1),[m,y]=j.useState(null),[g,x]=j.useState(!1),[b,S]=j.useState({}),A=i.project.canonicalDomain.toLowerCase().replace(/^www\./,""),O=a.runHistory,w=O.length>1,N=u>=0&&m!==null,E=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},$=E.citationState==="cited"||E.citationState==="emerging",M=E.citedDomains.findIndex(ue=>ue.toLowerCase().replace(/^www\./,"")===A)+1,L=E.citedDomains.length,G=i.project.displayName||i.project.name,X=[i.project.canonicalDomain.replace(/^www\./,""),G,G.split(" ").slice(0,2).join(" ")].filter(ue=>ue.trim().length>2),D=$?"cited":E.citationState==="lost"?"lost":E.citationState==="pending"?"pending":"not-cited",P=j.useRef(0),Se=j.useCallback(async ue=>{const ye=++P.current;if(ue===-1||ue===O.length-1){h(-1),y(null),o(!1);return}h(ue),o(!1);const te=O[ue],B=`${te.runId}::${a.keyword}::${a.provider}`;if(b[B]){y(b[B]);return}x(!0);try{const J=await tl(te.runId);if(ye!==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,[B]:fe})),y(fe)}catch{if(ye!==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{ye===P.current&&x(!1)}},[O,a.keyword,a.provider,b]),W=$&&M>0?{label:"Citation confirmed",title:`Cited #${M} of ${L} domain${L!==1?"s":""}`,meta:`${E.provider} · ${E.changeLabel.toLowerCase()}`}:$?{label:"Citation confirmed",title:"Cited in this answer",meta:`${E.provider} · ${E.changeLabel.toLowerCase()}`}:E.citationState==="lost"?{label:"Citation lost",title:L>0?`${L} domain${L!==1?"s":""} cited instead`:"No longer appearing in this answer",meta:`${E.provider} · ${E.changeLabel.toLowerCase()}`}:E.citationState==="pending"?{label:"Pending",title:"Awaiting first visibility run",meta:"No provider data yet"}:{label:"Not in this answer",title:L>0?`${L} domain${L!==1?"s":""} cited instead`:"No domains cited for this query",meta:`${E.provider} · ${E.changeLabel.toLowerCase()}`},se=()=>{if(!E.answerSnippet)return null;const ue=E.answerSnippet.split(`
|
|
205
|
+
`),ye=[];let te=[],B=0;const J=()=>{if(te.length===0)return;const ne=te.join(" ").trim();ne&&ye.push(d.jsx("p",{className:ye.length>0?"mt-2.5":"",children:Lg(ne,X)},B++)),te=[]};for(const ne of ue){const fe=ne.trim();if(/^[-–—]{3,}$/.test(fe)){J(),ye.push(d.jsx("hr",{className:"border-zinc-800/60 my-3"},B++));continue}const I=fe.match(/^(#{1,3})\s+(.+)$/);if(I){J();const k=I[1].length,V=I[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s#]+/u,"").trim()||I[2],ee=k===1?"text-[13px] font-semibold text-zinc-100 mt-4 mb-1":k===2?"text-xs font-semibold text-zinc-200 mt-3 mb-0.5":"text-xs font-medium text-zinc-300 mt-2";ye.push(d.jsx("p",{className:ee,children:Lg(V,X)},B++));continue}if(fe===""){J();continue}te.push(fe)}return J(),ye};return d.jsx(Wy,{open:!0,onOpenChange:ue=>{ue||s()},children:d.jsxs(ev,{children:[d.jsx(_d,{className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm"}),d.jsxs(Dd,{className:"evidence-modal","aria-describedby":void 0,children:[d.jsxs("div",{className:"evidence-modal-header",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("p",{className:"eyebrow eyebrow-soft",children:[i.project.name," · ",E.provider||"All providers"]}),d.jsx(Md,{className:"text-lg font-semibold text-zinc-50 truncate",children:a.keyword})]}),d.jsxs(nv,{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:[d.jsx(Ld,{className:"size-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]}),w&&d.jsxs("div",{className:"evidence-modal-timeline",children:[d.jsx("p",{className:"drawer-section-label mb-1.5",children:"Run history"}),d.jsx("div",{className:"flex items-center gap-1 overflow-x-auto pb-1",children:O.map((ue,ye)=>{const te=u===-1&&ye===O.length-1||u===ye,B=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 d.jsxs("button",{type:"button",className:`evidence-run-dot ${te?"evidence-run-dot--selected":""}`,onClick:()=>Se(ye===O.length-1?-1:ye),"aria-label":`Run ${ne}: ${ue.citationState}`,"aria-pressed":te,children:[d.jsx("span",{className:`size-2 rounded-full ${B}`,"aria-hidden":"true"}),d.jsx("span",{className:"text-[10px] text-zinc-500",children:ne})]},ye)})}),u>=0&&u<O.length&&d.jsxs("p",{className:"text-[11px] text-zinc-500 mt-1",children:["Viewing run from ",new Date(O[u].createdAt).toLocaleString()," — ",d.jsx("span",{className:"capitalize",children:O[u].citationState}),d.jsx("button",{type:"button",className:"text-zinc-400 hover:text-zinc-200 ml-2",onClick:()=>Se(-1),children:"← Back to latest"})]})]}),d.jsxs("div",{className:"evidence-modal-body",children:[g&&d.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&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"evidence-modal-main",children:[d.jsxs("div",{className:`evidence-position-hero evidence-position-hero--${D}`,children:[d.jsx("p",{className:`evidence-position-label evidence-position-label--${D}`,children:W.label}),d.jsx("p",{className:`evidence-position-title evidence-position-title--${D}`,children:W.title}),d.jsx("p",{className:"evidence-position-meta",children:W.meta})]}),E.answerSnippet&&d.jsxs("div",{children:[d.jsx("p",{className:"drawer-section-label",children:"What the AI said"}),d.jsx("div",{className:`answer-snippet-block ${r?"evidence-answer-expanded":"evidence-answer-collapsed"}`,children:se()}),E.answerSnippet.length>280&&d.jsx("button",{type:"button",className:"mt-1.5 text-xs text-zinc-500 hover:text-zinc-300 transition-colors",onClick:()=>o(!r),children:r?"↑ Collapse":"↓ Show full answer"})]}),!E.answerSnippet&&!g&&d.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&&d.jsxs("div",{children:[d.jsx("p",{className:"drawer-section-label",children:$?"Why you're cited":"What to fix"}),d.jsx("div",{className:"action-items-list",children:a.relatedTechnicalSignals.map((ue,ye)=>d.jsxs("div",{className:"action-item",children:[d.jsx("svg",{className:`action-item-icon ${$?"text-emerald-400":"text-amber-400"}`,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:$?d.jsx("path",{d:"M3 8l3.5 3.5L13 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}):d.jsxs(d.Fragment,{children:[d.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),d.jsx("path",{d:"M8 5v3.5M8 10.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),d.jsx("span",{className:"action-item-text",children:ue})]},ye))})]}),E.summary&&d.jsx("p",{className:"text-xs text-zinc-600 border-t border-zinc-800/40 pt-3 mt-1",children:E.summary})]}),d.jsxs("div",{className:"evidence-modal-sidebar",children:[E.citedDomains.length>0&&d.jsxs("div",{children:[d.jsx("p",{className:"drawer-section-label",children:"Who was cited — in order"}),d.jsxs("div",{className:"citation-leaderboard",children:[E.citedDomains.map((ue,ye)=>{const te=ue.toLowerCase().replace(/^www\./,""),B=te===A,J=!B&&E.competitorDomains.some(fe=>fe.toLowerCase().replace(/^www\./,"")===te),ne=B?"you":J?"competitor":"other";return d.jsxs("div",{className:`citation-leaderboard-item citation-leaderboard-item--${ne}`,children:[d.jsxs("span",{className:"citation-leaderboard-rank",children:["#",ye+1]}),d.jsx("span",{className:"citation-leaderboard-domain",children:ue}),B&&d.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),J&&d.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},ue)}),!$&&d.jsxs("div",{className:"citation-leaderboard-item citation-leaderboard-item--not-cited border-dashed",children:[d.jsx("span",{className:"citation-leaderboard-rank text-zinc-600",children:"—"}),d.jsx("span",{className:"citation-leaderboard-domain text-zinc-600",children:i.project.canonicalDomain}),d.jsx("span",{className:"citation-leaderboard-tag text-zinc-600",children:"Not cited"})]})]})]}),E.groundingSources.length>0&&d.jsxs("div",{children:[d.jsxs("p",{className:"drawer-section-label",children:["Grounding sources (",E.groundingSources.length,")"]}),d.jsx("ul",{className:"grid gap-0.5",children:E.groundingSources.map((ue,ye)=>d.jsx("li",{className:"truncate text-sm",children:d.jsx("a",{href:ue.uri,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:ue.title||ue.uri})},ye))})]}),E.evidenceUrls.length>0&&d.jsxs("div",{children:[d.jsx("p",{className:"drawer-section-label",children:"Evidence URLs"}),d.jsx("ul",{className:"grid gap-1",children:E.evidenceUrls.map(ue=>d.jsx("li",{className:"truncate text-sm",children:d.jsx("a",{href:ue,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:ue})},ue))})]}),E.citedDomains.length===0&&E.groundingSources.length===0&&E.evidenceUrls.length===0&&d.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 g2(){try{const[a,i,s]=await Promise.all([Jj(),Fj(),iN().catch(()=>null)]),r=await Promise.all(a.map(async o=>{const u=i.filter(S=>S.projectId===o.id),h=u.filter(S=>S.status==="completed"||S.status==="partial").sort((S,A)=>A.createdAt.localeCompare(S.createdAt)),[m,y,g,x,b]=await Promise.all([Pj(o.name).catch(()=>[]),kv(o.name).catch(()=>[]),Wj(o.name).catch(()=>[]),h[0]?tl(h[0].id).catch(()=>null):Promise.resolve(null),h[1]?tl(h[1].id).catch(()=>null):Promise.resolve(null)]);return{project:o,runs:u,keywords:m,competitors:y,timeline:g,latestRunDetail:x,previousRunDetail:b}}));return AN(r,s)}catch{return null}}function y2({initialPathname:a,initialDashboard:i,initialHealthSnapshot:s,enableLiveStatus:r=!0}){const[o,u]=j.useState(i??null),[h,m]=j.useState(!i),[y,g]=j.useState(i?!0:null),[x,b]=j.useState(()=>DN(a)),[S,A]=j.useState(!1),[O,w]=j.useState(null),[N,E]=j.useState(null),[$,_]=j.useState(!1),[M,L]=j.useState(s??ON),G=j.useCallback(async()=>{const R=await g2();R?(u(R),g(!0)):g(!1),m(!1)},[]);j.useEffect(()=>{i||G()},[i,G]);const X=o?.runs.some(R=>R.status==="running"||R.status==="queued")??!1;if(j.useEffect(()=>{if(!X)return;const R=setInterval(()=>{G()},3e3);return()=>clearInterval(R)},[X,G]),j.useEffect(()=>{if(typeof window>"u")return;const R=()=>{b(Gi(window.location.pathname))};return window.addEventListener("popstate",R),()=>{window.removeEventListener("popstate",R)}},[]),j.useEffect(()=>{A(!1),w(null)},[x]),j.useEffect(()=>{if(typeof window>"u"||O===null)return;const R=F=>{F.key==="Escape"&&w(null)};return window.addEventListener("keydown",R),()=>{window.removeEventListener("keydown",R)}},[O]),j.useEffect(()=>{if(!r||typeof window>"u")return;let R=!0;const F=async()=>{const pe=await zN("/health","API"),$e=pe.state==="ok"?{label:"Runner",state:"ok",detail:"In-process job runner"}:{label:"Runner",state:pe.state,detail:"Depends on API"};R&&L({apiStatus:pe,workerStatus:$e})};F();const ie=window.setInterval(()=>{F()},15e3);return()=>{R=!1,window.clearInterval(ie)}},[r]),!h&&!o&&y===!1)return d.jsx("div",{className:"app-shell",children:d.jsx("div",{className:"main-area",style:{gridColumn:"1 / -1"},children:d.jsx("main",{id:"content",className:"page-shell",children:d.jsxs("div",{className:"page-container",children:[d.jsx("div",{className:"page-header",children:d.jsxs("div",{className:"page-header-left",children:[d.jsx("h1",{className:"page-title",children:"Cannot connect to API"}),d.jsxs("p",{className:"page-subtitle",children:["The dashboard could not reach the Canonry API. Make sure ",d.jsx("code",{children:"canonry serve"})," is running and try refreshing the page."]})]})}),d.jsx(me,{type:"button",onClick:()=>{m(!0),G()},children:"Retry connection"})]})})})});const D=o??TN.dashboard,P=_N(x,D),Se=P.kind==="project"?Av(D,P.projectId):void 0,W=R=>{const F=Gi(R);if(typeof window>"u"){b(F);return}Gi(window.location.pathname)!==F&&window.history.pushState({},"",F),b(F)},se=R=>{if(!R)return;w({kind:"run",runId:R}),E(null),_(!0);const F=R;tl(R).then(ie=>{w(pe=>(pe?.kind==="run"&&pe.runId===F&&E(ie),pe))}).catch(()=>{w(ie=>(ie?.kind==="run"&&ie.runId===F&&E(null),ie))}).finally(()=>_(!1))};j.useEffect(()=>{if(O?.kind!=="run"||!N||N.status!=="running"&&N.status!=="queued")return;const R=setInterval(()=>{tl(O.runId).then(F=>{E(F),F.status!=="running"&&F.status!=="queued"&&G()}).catch(()=>{})},3e3);return()=>clearInterval(R)},[O,N?.status,N?.snapshots.length,G]);const ue=R=>{w({kind:"evidence",evidenceId:R})},ye=async R=>{await zv(R),G()},te=async R=>{try{await nN(R),W("/"),G()}catch(F){console.error("Failed to delete project:",F)}},B=async(R,F)=>{await tN(R,F),await G()},J=async(R,F)=>{const pe=(await kv(R)).map(ge=>ge.domain),$e=[...new Set([...pe,...F])];await Ov(R,$e),await G()},ne=LN(D.portfolioOverview.systemHealth,M,D.settings),fe=BN(D.setup,M,D.settings),I=O?.kind==="run"?Qj(D,O.runId):void 0,k=O?.kind==="evidence"?Xj(D,O.evidenceId):void 0,V=[{label:"Overview",href:"/",icon:yw,active:Br(P,"overview")},{label:"Projects",href:"/projects",icon:pw,active:Br(P,"projects")},{label:"Runs",href:"/runs",icon:Sw,active:Br(P,"runs")},{label:"Settings",href:"/settings",icon:Ew,active:Br(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 d.jsxs("div",{className:"app-shell",children:[d.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),d.jsxs("aside",{className:"sidebar","aria-label":"Primary navigation",children:[d.jsx("div",{className:"sidebar-brand",children:d.jsxs("a",{href:"/",onClick:Mt(W,"/"),children:[d.jsx("span",{className:"brand-mark",children:"Canonry"}),d.jsx("p",{className:"brand-subtitle",children:"AEO Monitor"})]})}),d.jsxs("nav",{className:"sidebar-nav",children:[V.map(R=>d.jsxs("a",{className:`sidebar-link ${R.active?"sidebar-link-active":""}`,href:R.href,"aria-current":R.active?"page":void 0,onClick:Mt(W,R.href),children:[d.jsx(R.icon,{className:"sidebar-icon"}),d.jsx("span",{children:R.label})]},R.label)),D.projects.length>0?d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"sidebar-section-title",children:"Projects"}),D.projects.map(R=>{const F=P.kind==="project"&&Se?.project.id===R.project.id,ie=R.visibilitySummary.tone;return d.jsxs("a",{className:`sidebar-project ${F?"sidebar-project-active":""}`,href:`/projects/${R.project.id}`,onClick:Mt(W,`/projects/${R.project.id}`),children:[d.jsx("span",{className:`sidebar-dot sidebar-dot-${ie}`}),d.jsx("span",{children:R.project.name})]},R.project.id)})]}):null,d.jsx("p",{className:"sidebar-section-title",children:"Resources"}),d.jsxs("a",{className:"sidebar-link",href:"/setup","aria-current":P.kind==="setup"?"page":void 0,onClick:Mt(W,"/setup"),children:[d.jsx(Nw,{className:"sidebar-icon"}),d.jsx("span",{children:"Setup"})]})]}),d.jsx("div",{className:"sidebar-footer",children:Dg.map(R=>d.jsx("a",{className:"sidebar-footer-link",href:R.href,target:"_blank",rel:"noreferrer",children:R.label},R.href))})]}),d.jsxs("div",{className:"main-area",children:[d.jsxs("header",{className:"topbar",children:[d.jsxs("div",{className:"topbar-left",children:[d.jsx("div",{className:"topbar-brand-mobile",children:d.jsx("a",{className:"brand-mark",href:"/",onClick:Mt(W,"/"),children:"Canonry"})}),d.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[d.jsx("a",{href:"/",onClick:Mt(W,"/"),children:"Home"}),d.jsx(Rd,{className:"breadcrumb-sep size-3"}),d.jsx("span",{className:"breadcrumb-current",children:ee})]})]}),d.jsxs("div",{className:"topbar-actions",children:[d.jsxs("div",{className:"health-pill-row",children:[d.jsxs("span",{className:`health-pill health-pill-${M.apiStatus.state}`,children:["API ",M.apiStatus.state==="ok"?"ok":M.apiStatus.state]}),d.jsxs("span",{className:`health-pill health-pill-${M.workerStatus.state}`,children:["Worker ",M.workerStatus.state==="ok"?"ok":M.workerStatus.state]})]}),d.jsxs(me,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":S,"aria-controls":"mobile-nav",onClick:()=>A(R=>!R),children:[d.jsx(bw,{className:"size-4"}),d.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),d.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${S?"mobile-nav-open":""}`,children:[d.jsxs(me,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>A(!1),children:[d.jsx(Ld,{className:"size-5"}),d.jsx("span",{className:"sr-only",children:"Close navigation"})]}),V.map(R=>d.jsx("a",{className:`mobile-nav-link ${R.active?"mobile-nav-link-active":""}`,href:R.href,"aria-current":R.active?"page":void 0,onClick:Mt(W,R.href),children:R.label},R.label)),D.projects.length>0?d.jsxs("div",{className:"mobile-nav-section",children:[d.jsx("p",{className:"mobile-nav-section-title",children:"Projects"}),D.projects.map(R=>d.jsx("a",{className:"mobile-nav-link",href:`/projects/${R.project.id}`,onClick:Mt(W,`/projects/${R.project.id}`),children:R.project.name},R.project.id))]}):null]}),d.jsx("main",{id:"content",className:"page-shell",children:h?d.jsx("div",{className:"page-container",children:d.jsx("div",{className:"page-header",children:d.jsxs("div",{className:"page-header-left",children:[d.jsx("h1",{className:"page-title",children:"Loading"}),d.jsx("p",{className:"page-subtitle",children:"Connecting to API and loading dashboard data..."})]})})}):d.jsxs(d.Fragment,{children:[P.kind==="overview"?d.jsx(ZN,{model:D.portfolioOverview,systemHealth:ne,onNavigate:W,onOpenRun:se}):null,P.kind==="projects"?d.jsx(IN,{projects:D.projects,onNavigate:W,onProjectCreated:G}):null,P.kind==="project"&&Se?d.jsx(FN,{model:Se,onOpenEvidence:ue,onOpenRun:se,onTriggerRun:ye,onDeleteProject:te,onAddKeywords:B,onAddCompetitors:J}):null,P.kind==="runs"?d.jsx(s2,{runs:D.runs,onOpenRun:se}):null,P.kind==="settings"?d.jsx(c2,{settings:D.settings,healthSnapshot:M,onSettingsChanged:G}):null,P.kind==="setup"?d.jsx(f2,{model:fe,settings:D.settings,onProjectCreated:G,onNavigate:W}):null,P.kind==="not-found"?d.jsx(h2,{onNavigate:W}):null]})}),d.jsxs("footer",{className:"footer",children:[d.jsx("p",{className:"supporting-copy",children:"Technical readiness and answer visibility stay separate."}),d.jsx("div",{className:"footer-links",children:Dg.map(R=>d.jsx("a",{href:R.href,target:"_blank",rel:"noreferrer",children:R.label},R.href))})]})]}),I?d.jsxs(m2,{open:I!==void 0,title:I.summary,subtitle:`${I.projectName} · ${I.kindLabel}`,onClose:()=>w(null),children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-sm",children:[d.jsx(mo,{status:I.status}),d.jsx("span",{className:"text-zinc-400",children:I.startedAt}),d.jsx("span",{className:"text-zinc-500",children:I.duration}),d.jsx("span",{className:"text-zinc-600",children:I.triggerLabel})]}),I.status==="failed"&&I.statusDetail&&d.jsx("p",{className:"text-sm text-rose-300/80 mt-2",children:I.statusDetail}),d.jsxs("div",{className:"mt-4",children:[d.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500 mb-2",children:"Activity Log"}),$?d.jsx("p",{className:"text-sm text-zinc-500",children:"Loading run details..."}):N&&N.snapshots.length>0?d.jsxs("div",{className:"space-y-2",children:[N.snapshots.map(R=>d.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 p-3",children:[d.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[d.jsx("p",{className:"text-sm font-medium text-zinc-200 truncate",children:R.keyword??"Unknown key phrase"}),d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx(Kd,{provider:R.provider}),d.jsx(Sv,{variant:R.citationState==="cited"?"success":"neutral",children:R.citationState})]})]}),R.citedDomains.length>0&&d.jsxs("p",{className:"text-xs text-zinc-500 mt-1",children:[d.jsx("span",{className:"text-zinc-400",children:"Sources:"})," ",R.citedDomains.join(", ")]}),R.competitorOverlap.length>0&&d.jsxs("p",{className:"text-xs text-rose-400/80 mt-0.5",children:["Competitor cited: ",R.competitorOverlap.join(", ")]}),R.groundingSources&&R.groundingSources.length>0&&d.jsxs("details",{className:"mt-2",children:[d.jsxs("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:[R.groundingSources.length," grounding source",R.groundingSources.length!==1?"s":""]}),d.jsx("ul",{className:"mt-1 space-y-0.5",children:R.groundingSources.map((F,ie)=>d.jsx("li",{className:"text-xs text-zinc-500 truncate",children:d.jsx("a",{href:F.uri,target:"_blank",rel:"noreferrer",className:"hover:text-zinc-300",children:F.title||F.uri})},ie))})]}),R.answerText&&d.jsxs("details",{className:"mt-1",children:[d.jsx("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:"Answer preview"}),d.jsx("p",{className:"mt-1 text-xs text-zinc-400 leading-relaxed whitespace-pre-wrap",children:R.answerText})]})]},R.id)),N.status==="running"&&d.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[d.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),"Querying remaining key phrases..."]})]}):N&&N.status==="running"?d.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[d.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"?d.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[d.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?d.jsxs("div",{className:"rounded-lg border border-rose-800/40 bg-rose-950/20 p-3",children:[d.jsx("p",{className:"text-sm font-medium text-rose-300 mb-2",children:"Run failed"}),d.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:RN(N.error)})]}):d.jsx("p",{className:"text-sm text-zinc-500",children:"No snapshot data available."}),N?.snapshots?.[0]?.model&&d.jsxs("p",{className:"mt-3 text-[10px] text-zinc-600",children:["Model: ",N.snapshots[0].model]})]})]}):null,k?d.jsx(p2,{evidence:k.evidence,project:k.project,onClose:()=>w(null)}):null]})}const Kv=document.getElementById("root");if(!Kv)throw new Error("Expected #root element for web app bootstrap.");gx.createRoot(Kv).render(d.jsx(j.StrictMode,{children:d.jsx(y2,{})}));
|