@ainyc/canonry 1.5.1 → 1.6.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-DRl58GLy.js +205 -0
- package/assets/index.html +1 -1
- package/package.json +4 -4
- package/assets/assets/index-OtrziEv9.js +0 -205
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
function ox(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 d=Object.getOwnPropertyDescriptor(r,o);d&&Object.defineProperty(a,o,d.get?d:{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 d of o)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function s(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(o){if(o.ep)return;o.ep=!0;const d=s(o);fetch(o.href,d)}})();function Ug(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var zu={exports:{}},Vs={};var qp;function cx(){if(qp)return Vs;qp=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(r,o,d){var h=null;if(d!==void 0&&(h=""+d),o.key!==void 0&&(h=""+o.key),"key"in o){d={};for(var m in o)m!=="key"&&(d[m]=o[m])}else d=o;return o=d.ref,{$$typeof:a,type:r,key:h,ref:o!==void 0?o:null,props:d}}return Vs.Fragment=i,Vs.jsx=s,Vs.jsxs=s,Vs}var $p;function ux(){return $p||($p=1,zu.exports=cx()),zu.exports}var u=ux(),Du={exports:{}},ve={};var Kp;function dx(){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"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),S=Symbol.iterator;function E(A){return A===null||typeof A!="object"?null:(A=S&&A[S]||A["@@iterator"],typeof A=="function"?A:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,N={};function k(A,V,ee){this.props=A,this.context=V,this.refs=N,this.updater=ee||O}k.prototype.isReactComponent={},k.prototype.setState=function(A,V){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,V,"setState")},k.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function $(){}$.prototype=k.prototype;function z(A,V,ee){this.props=A,this.context=V,this.refs=N,this.updater=ee||O}var M=z.prototype=new $;M.constructor=z,w(M,k.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(A,V,ee){var R=ee.ref;return{$$typeof:a,type:A,key:V,ref:R!==void 0?R:null,props:ee}}function Se(A,V){return P(A.type,V,A.props)}function W(A){return typeof A=="object"&&A!==null&&A.$$typeof===a}function se(A){var V={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(ee){return V[ee]})}var ue=/\/+/g;function ge(A,V){return typeof A=="object"&&A!==null&&A.key!=null?se(""+A.key):V.toString(36)}function te(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(G,G):(A.status="pending",A.then(function(V){A.status==="pending"&&(A.status="fulfilled",A.value=V)},function(V){A.status==="pending"&&(A.status="rejected",A.reason=V)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function B(A,V,ee,R,F){var ie=typeof A;(ie==="undefined"||ie==="boolean")&&(A=null);var pe=!1;if(A===null)pe=!0;else switch(ie){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(A.$$typeof){case a:case i:pe=!0;break;case x:return pe=A._init,B(pe(A._payload),V,ee,R,F)}}if(pe)return F=F(A),pe=R===""?"."+ge(A,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||A&&A.key===F.key?"":(""+F.key).replace(ue,"$&/")+"/")+pe)),V.push(F)),1;pe=0;var $e=R===""?".":R+":";if(L(A))for(var ye=0;ye<A.length;ye++)R=A[ye],ie=$e+ge(R,ye),pe+=B(R,V,ee,ie,F);else if(ye=E(A),typeof ye=="function")for(A=ye.call(A),ye=0;!(R=A.next()).done;)R=R.value,ie=$e+ge(R,ye++),pe+=B(R,V,ee,ie,F);else if(ie==="object"){if(typeof A.then=="function")return B(te(A),V,ee,R,F);throw V=String(A),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return pe}function J(A,V,ee){if(A==null)return A;var R=[],F=0;return B(A,R,"","",function(ie){return V.call(ee,ie,F++)}),R}function ne(A){if(A._status===-1){var V=A._result;V=V(),V.then(function(ee){(A._status===0||A._status===-1)&&(A._status=1,A._result=ee)},function(ee){(A._status===0||A._status===-1)&&(A._status=2,A._result=ee)}),A._status===-1&&(A._status=0,A._result=V)}if(A._status===1)return A._result.default;throw A._result}var fe=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},I={map:J,forEach:function(A,V,ee){J(A,function(){V.apply(this,arguments)},ee)},count:function(A){var V=0;return J(A,function(){V++}),V},toArray:function(A){return J(A,function(V){return V})||[]},only:function(A){if(!W(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return ve.Activity=b,ve.Children=I,ve.Component=k,ve.Fragment=s,ve.Profiler=o,ve.PureComponent=z,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(A){return X.H.useMemoCache(A)}},ve.cache=function(A){return function(){return A.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(A,V,ee){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var R=w({},A.props),F=A.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(A.type,F,R)},ve.createContext=function(A){return A={$$typeof:h,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:d,_context:A},A},ve.createElement=function(A,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),ye=0;ye<pe;ye++)$e[ye]=arguments[ye+2];F.children=$e}if(A&&A.defaultProps)for(R in pe=A.defaultProps,pe)F[R]===void 0&&(F[R]=pe[R]);return P(A,ie,F)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(A){return{$$typeof:m,render:A}},ve.isValidElement=W,ve.lazy=function(A){return{$$typeof:x,_payload:{_status:-1,_result:A},_init:ne}},ve.memo=function(A,V){return{$$typeof:g,type:A,compare:V===void 0?null:V}},ve.startTransition=function(A){var V=X.T,ee={};X.T=ee;try{var R=A(),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(A){return X.H.use(A)},ve.useActionState=function(A,V,ee){return X.H.useActionState(A,V,ee)},ve.useCallback=function(A,V){return X.H.useCallback(A,V)},ve.useContext=function(A){return X.H.useContext(A)},ve.useDebugValue=function(){},ve.useDeferredValue=function(A,V){return X.H.useDeferredValue(A,V)},ve.useEffect=function(A,V){return X.H.useEffect(A,V)},ve.useEffectEvent=function(A){return X.H.useEffectEvent(A)},ve.useId=function(){return X.H.useId()},ve.useImperativeHandle=function(A,V,ee){return X.H.useImperativeHandle(A,V,ee)},ve.useInsertionEffect=function(A,V){return X.H.useInsertionEffect(A,V)},ve.useLayoutEffect=function(A,V){return X.H.useLayoutEffect(A,V)},ve.useMemo=function(A,V){return X.H.useMemo(A,V)},ve.useOptimistic=function(A,V){return X.H.useOptimistic(A,V)},ve.useReducer=function(A,V,ee){return X.H.useReducer(A,V,ee)},ve.useRef=function(A){return X.H.useRef(A)},ve.useState=function(A){return X.H.useState(A)},ve.useSyncExternalStore=function(A,V,ee){return X.H.useSyncExternalStore(A,V,ee)},ve.useTransition=function(){return X.H.useTransition()},ve.version="19.2.4",ve}var Yp;function dd(){return Yp||(Yp=1,Du.exports=dx()),Du.exports}var j=dd();const fx=Ug(j),fd=ox({__proto__:null,default:fx},[j]);var Mu={exports:{}},Qs={},Ru={exports:{}},Lu={};var Gp;function hx(){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,A=I>>>1;fe<A;){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 d=performance;a.unstable_now=function(){return d.now()}}else{var h=Date,m=h.now();a.unstable_now=function(){return h.now()-m}}var y=[],g=[],x=1,b=null,S=3,E=!1,O=!1,w=!1,N=!1,k=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,z=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),E=!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 A=s(g);A!==null&&te(L,A.startTime-B),J=!1}}break e}finally{b=null,S=ne,E=!1}J=void 0}}finally{J?se():G=!1}}}var se;if(typeof z=="function")se=function(){z(W)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,ge=ue.port2;ue.port1.onmessage=W,se=function(){ge.postMessage(null)}}else se=function(){k(W,0)};function te(B,J){X=k(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||E||(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}}}})(Lu)),Lu}var Vp;function mx(){return Vp||(Vp=1,Ru.exports=hx()),Ru.exports}var Uu={exports:{}},ft={};var Qp;function px(){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 d(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 d(y,g,null,x)},ft.flushSync=function(y){var g=h.T,x=r.p;try{if(h.T=null,r.p=2,y)return y()}finally{h.T=g,r.p=x,r.d.f()}},ft.preconnect=function(y,g){typeof y=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(y,g))},ft.prefetchDNS=function(y){typeof y=="string"&&r.d.D(y)},ft.preinit=function(y,g){if(typeof y=="string"&&g&&typeof g.as=="string"){var x=g.as,b=m(x,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,E=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?r.d.S(y,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:b,integrity:S,fetchPriority:E}):x==="script"&&r.d.X(y,{crossOrigin:b,integrity:S,fetchPriority:E,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},ft.preinitModule=function(y,g){if(typeof y=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=m(g.as,g.crossOrigin);r.d.M(y,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(y)},ft.preload=function(y,g){if(typeof y=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,b=m(x,g.crossOrigin);r.d.L(y,x,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},ft.preloadModule=function(y,g){if(typeof y=="string")if(g){var x=m(g.as,g.crossOrigin);r.d.m(y,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(y)},ft.requestFormReset=function(y){r.d.r(y)},ft.unstable_batchedUpdates=function(y,g){return y(g)},ft.useFormState=function(y,g,x){return h.H.useFormState(y,g,x)},ft.useFormStatus=function(){return h.H.useHostTransitionStatus()},ft.version="19.2.4",ft}var Xp;function Bg(){if(Xp)return Uu.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(),Uu.exports=px(),Uu.exports}var Zp;function gx(){if(Zp)return Qs;Zp=1;var a=mx(),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 d(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(d(e)!==e)throw Error(r(188))}function g(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,l=t;;){var 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"),E=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),z=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 ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case k: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 z: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:ge(e.type)||"Memo";case D:t=e._payload,e=e._init;try{return ge(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 A(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=A(null),F=A(null),ie=A(null),pe=A(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 ye(){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),$s._currentValue=ne)}var Wt,gn;function yt(e){if(Wt===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Wt=t&&t[1]||"",gn=-1<n.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+Wt+e+gn}var Qa=!1;function Xa(e,t){if(!e||Qa)return"";Qa=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var 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 cl(e,t){switch(e.tag){case 26:case 27:case 5:return yt(e.type);case 16:return yt("Lazy");case 13:return e.child!==t&&t!==null?yt("Suspense Fallback"):yt("Suspense");case 19:return yt("SuspenseList");case 0:case 15:return Xa(e.type,!1);case 11:return Xa(e.type.render,!1);case 1:return Xa(e.type,!0);case 31:return yt("Activity");default:return""}}function Pi(e){try{var t="",n=null;do t+=cl(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
|
7
|
+
Error generating stack: `+l.message+`
|
|
8
|
+
`+l.stack}}var en=Object.prototype.hasOwnProperty,Lt=a.unstable_scheduleCallback,yn=a.unstable_cancelCallback,go=a.unstable_shouldYield,yo=a.unstable_requestPaint,ht=a.unstable_now,vo=a.unstable_getCurrentPriorityLevel,ul=a.unstable_ImmediatePriority,dl=a.unstable_UserBlockingPriority,Ut=a.unstable_NormalPriority,bo=a.unstable_LowPriority,ae=a.unstable_IdlePriority,vn=a.log,Vv=a.unstable_setDisableYieldValue,Wi=null,Ct=null;function $n(e){if(typeof vn=="function"&&Vv(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(Wi,e)}catch{}}var kt=Math.clz32?Math.clz32:Zv,Qv=Math.log,Xv=Math.LN2;function Zv(e){return e>>>=0,e===0?32:31-(Qv(e)/Xv|0)|0}var fl=256,hl=262144,ml=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 pl(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 es(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Iv(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=ml;return ml<<=1,(ml&62914560)===0&&(ml=4194304),e}function xo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ts(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Jv(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-kt(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-kt(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-kt(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:So(n),(n&(e.suspendedLanes|t))!==0?0:n}function So(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 wo(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,jo="__reactEvents$"+Kn,Fv="__reactListeners$"+Kn,Pv="__reactHandles$"+Kn,Id="__reactResources$"+Kn,ns="__reactMarker$"+Kn;function No(e){delete e[rt],delete e[vt],delete e[jo],delete e[Fv],delete e[Pv]}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 as(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Fa(e){var t=e[Id];return t||(t=e[Id]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function st(e){e[ns]=!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 Wv=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 eb(e){return en.call(Wd,e)?!0:en.call(Pd,e)?!1:Wv.test(e)?Wd[e]=!0:(Pd[e]=!0,!1)}function gl(e,t,n){if(eb(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 yl(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 tb(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 Co(e){if(!e._valueTracker){var t=ef(e)?"checked":"value";e._valueTracker=tb(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 vl(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 nb=/[\n"\\]/g;function Ht(e){return e.replace(nb,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ko(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)){Co(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),Co(e)}function Eo(e,t,n){t==="number"&&vl(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),Co(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 ab=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||ab.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 ib=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"]]),sb=/^[\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 bl(e){return sb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function xn(){}var To=null;function Oo(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(ko(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));ko(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 _o=!1;function cf(e,t,n){if(_o)return e(t,n);_o=!0;try{var l=e(t);return l}finally{if(_o=!1,(ti!==null||ni!==null)&&(lr(),ti&&(t=ti,e=ni,ni=ti=null,of(t),e)))for(t=0;t<e.length;t++)of(e[t])}}function is(e,t){var n=e.stateNode;if(n===null)return null;var l=n[vt]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(r(231,t,typeof n));return n}var Sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zo=!1;if(Sn)try{var ss={};Object.defineProperty(ss,"passive",{get:function(){zo=!0}}),window.addEventListener("test",ss,ss),window.removeEventListener("test",ss,ss)}catch{zo=!1}var Yn=null,Do=null,xl=null;function uf(){if(xl)return xl;var e,t=Do,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 xl=c.slice(e,1<l?1-l:void 0)}function Sl(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 wl(){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)?wl: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=wl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=wl)},persist:function(){},isPersistent:wl}),t}var Sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jl=bt(Sa),ls=b({},Sa,{view:0,detail:0}),lb=bt(ls),Mo,Ro,rs,Nl=b({},ls,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uo,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==rs&&(rs&&e.type==="mousemove"?(Mo=e.screenX-rs.screenX,Ro=e.screenY-rs.screenY):Ro=Mo=0,rs=e),Mo)},movementY:function(e){return"movementY"in e?e.movementY:Ro}}),ff=bt(Nl),rb=b({},Nl,{dataTransfer:0}),ob=bt(rb),cb=b({},ls,{relatedTarget:0}),Lo=bt(cb),ub=b({},Sa,{animationName:0,elapsedTime:0,pseudoElement:0}),db=bt(ub),fb=b({},Sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),hb=bt(fb),mb=b({},Sa,{data:0}),hf=bt(mb),pb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gb={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"},yb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=yb[e])?!!t[e]:!1}function Uo(){return vb}var bb=b({},ls,{key:function(e){if(e.key){var t=pb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Sl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?gb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uo,charCode:function(e){return e.type==="keypress"?Sl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Sl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xb=bt(bb),Sb=b({},Nl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mf=bt(Sb),wb=b({},ls,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uo}),jb=bt(wb),Nb=b({},Sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),Cb=bt(Nb),kb=b({},Nl,{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}),Eb=bt(kb),Ab=b({},Sa,{newState:0,oldState:0}),Tb=bt(Ab),Ob=[9,13,27,32],Bo=Sn&&"CompositionEvent"in window,os=null;Sn&&"documentMode"in document&&(os=document.documentMode);var _b=Sn&&"TextEvent"in window&&!os,pf=Sn&&(!Bo||os&&8<os&&11>=os),gf=" ",yf=!1;function vf(e,t){switch(e){case"keyup":return Ob.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 zb(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 Db(e,t){if(ai)return e==="compositionend"||!Bo&&vf(e,t)?(e=uf(),xl=Do=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 Mb={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"?!!Mb[e.type]:t==="textarea"}function Sf(e,t,n,l){ti?ni?ni.push(l):ni=[l]:ti=l,t=hr(t,"onChange"),0<t.length&&(n=new jl("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var cs=null,us=null;function Rb(e){ap(e,0)}function Cl(e){var t=as(e);if(tf(t))return e}function wf(e,t){if(e==="change")return t}var jf=!1;if(Sn){var Ho;if(Sn){var qo="oninput"in document;if(!qo){var Nf=document.createElement("div");Nf.setAttribute("oninput","return;"),qo=typeof Nf.oninput=="function"}Ho=qo}else Ho=!1;jf=Ho&&(!document.documentMode||9<document.documentMode)}function Cf(){cs&&(cs.detachEvent("onpropertychange",kf),us=cs=null)}function kf(e){if(e.propertyName==="value"&&Cl(us)){var t=[];Sf(t,us,e,Oo(e)),cf(Rb,t)}}function Lb(e,t,n){e==="focusin"?(Cf(),cs=t,us=n,cs.attachEvent("onpropertychange",kf)):e==="focusout"&&Cf()}function Ub(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Cl(us)}function Bb(e,t){if(e==="click")return Cl(t)}function Hb(e,t){if(e==="input"||e==="change")return Cl(t)}function qb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Et=typeof Object.is=="function"?Object.is:qb;function ds(e,t){if(Et(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)||!Et(e[c],t[c]))return!1}return!0}function Ef(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Af(e,t){var n=Ef(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=Ef(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=vl(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=vl(e.document)}return t}function $o(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 $b=Sn&&"documentMode"in document&&11>=document.documentMode,ii=null,Ko=null,fs=null,Yo=!1;function _f(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Yo||ii==null||ii!==vl(l)||(l=ii,"selectionStart"in l&&$o(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),fs&&ds(fs,l)||(fs=l,l=hr(Ko,"onSelect"),0<l.length&&(t=new jl("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")},Go={},zf={};Sn&&(zf=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(Go[e])return Go[e];if(!si[e])return e;var t=si[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in zf)return Go[e]=t[n];return e}var Df=ja("animationend"),Mf=ja("animationiteration"),Rf=ja("animationstart"),Kb=ja("transitionrun"),Yb=ja("transitionstart"),Gb=ja("transitioncancel"),Lf=ja("transitionend"),Uf=new Map,Vo="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(" ");Vo.push("scrollEnd");function tn(e,t){Uf.set(e,t),xa(t,[e])}var kl=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,Qo=0;function El(){for(var e=li,t=Qo=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 Al(e,t,n,l){qt[li++]=e,qt[li++]=t,qt[li++]=n,qt[li++]=l,Qo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Xo(e,t,n,l){return Al(e,t,n,l),Tl(e)}function Na(e,t){return Al(e,null,null,t),Tl(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-kt(n),e=f.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=n|536870912),f):null}function Tl(e){if(50<Ms)throw Ms=0,nu=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ri={};function Vb(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 At(e,t,n,l){return new Vb(e,t,n,l)}function Zo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wn(e,t){var n=e.alternate;return n===null?(n=At(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 Ol(e,t,n,l,c,f){var p=0;if(l=e,typeof e=="function")Zo(e)&&(p=1);else if(typeof e=="string")p=J0(e,n,R.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=At(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 k:return e=At(12,n,t,c|2),e.elementType=k,e.lanes=f,e;case L:return e=At(13,n,t,c),e.elementType=L,e.lanes=f,e;case G:return e=At(19,n,t,c),e.elementType=G,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z: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=At(p,n,t,c),t.elementType=e,t.type=l,t.lanes=f,t}function Ca(e,t,n,l){return e=At(7,e,l,t),e.lanes=n,e}function Io(e,t,n){return e=At(6,e,null,t),e.lanes=n,e}function qf(e){var t=At(18,null,null,0);return t.stateNode=e,t}function Jo(e,t,n){return t=At(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:Pi(t)},$f.set(e,t),t)}return{value:e,source:t,stack:Pi(t)}}var oi=[],ci=0,_l=null,hs=0,Kt=[],Yt=0,Gn=null,un=1,dn="";function jn(e,t){oi[ci++]=hs,oi[ci++]=_l,_l=e,hs=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-kt(l)-1;l&=~(1<<c),n+=1;var f=32-kt(t)+c;if(30<f){var p=c-c%5;f=(l&(1<<p)-1).toString(32),l>>=p,c-=p,un=1<<32-kt(t)+c|n<<c|l,dn=f+e}else un=1<<f|n<<c|l,dn=e}function Fo(e){e.return!==null&&(jn(e,1),Kf(e,1,0))}function Po(e){for(;e===_l;)_l=oi[--ci],oi[ci]=null,hs=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,Ae=!1,Vn=null,Gt=!1,Wo=Error(r(519));function Qn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ms($t(t,e)),Wo}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<Ls.length;n++)Ce(Ls[n],t);break;case"source":Ce("error",t);break;case"img":case"image":case"link":Ce("error",t),Ce("load",t);break;case"details":Ce("toggle",t);break;case"input":Ce("invalid",t),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(!Ae)return Vf(e),Ae=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||yu(e.type,e.memoizedProps)),n=!n),n&&He&&Qn(e),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=wu,wu=null,He=e):He=t):He=ot?Qt(e.stateNode.nextSibling):null;return!0}function ka(){He=ot=null,Ae=!1}function ec(){var e=Vn;return e!==null&&(jt===null?jt=e:jt.push.apply(jt,e),Vn=null),e}function ms(e){Vn===null?Vn=[e]:Vn.push(e)}var tc=A(null),Ea=null,Nn=null;function Xn(e,t,n){ee(tc,t._currentValue),t._currentValue=n}function Cn(e){e._currentValue=tc.current,V(tc)}function nc(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 ac(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),nc(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),nc(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;Et(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($s):e=[$s])}c=c.return}e!==null&&ac(t,e,n,l),t.flags|=262144}function zl(e){for(e=e.firstContext;e!==null;){if(!Et(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Aa(e){Ea=e,Nn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ct(e){return Qf(Ea,e)}function Dl(e,t){return Ea===null&&Aa(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 Qb=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()})}},Xb=a.unstable_scheduleCallback,Zb=a.unstable_NormalPriority,Pe={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ic(){return{controller:new Qb,data:new Map,refCount:0}}function ps(e){e.refCount--,e.refCount===0&&Xb(Zb,function(){e.controller.abort()})}var gs=null,sc=0,fi=0,hi=null;function Ib(e,t){if(gs===null){var n=gs=[];sc=0,fi=ou(),hi={status:"pending",value:void 0,then:function(l){n.push(l)}}}return sc++,t.then(Xf,Xf),t}function Xf(){if(--sc===0&&gs!==null){hi!==null&&(hi.status="fulfilled");var e=gs;gs=null,fi=0,hi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Jb(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){_m=ht(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ib(e,t),Zf!==null&&Zf(e,t)};var Ta=A(null);function lc(){var e=Ta.current;return e!==null?e:Ue.pooledCache}function Ml(e,t){t===null?ee(Ta,Ta.current):ee(Ta,t.pool)}function If(){var e=lc();return e===null?null:{parent:Pe._currentValue,pool:e}}var mi=Error(r(460)),rc=Error(r(474)),Rl=Error(r(542)),Ll={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 _a=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"?(_a=n,mi):n}}var _a=null;function Pf(){if(_a===null)throw Error(r(459));var e=_a;return _a=null,e}function Wf(e){if(e===mi||e===Rl)throw Error(r(483))}var pi=null,ys=0;function Ul(e){var t=ys;return ys+=1,pi===null&&(pi=[]),Ff(pi,e,t)}function vs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Bl(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(_,T){if(e){var U=_.deletions;U===null?(_.deletions=[T],_.flags|=16):U.push(T)}}function n(_,T){if(!e)return null;for(;T!==null;)t(_,T),T=T.sibling;return null}function l(_){for(var T=new Map;_!==null;)_.key!==null?T.set(_.key,_):T.set(_.index,_),_=_.sibling;return T}function c(_,T){return _=wn(_,T),_.index=0,_.sibling=null,_}function f(_,T,U){return _.index=U,e?(U=_.alternate,U!==null?(U=U.index,U<T?(_.flags|=67108866,T):U):(_.flags|=67108866,T)):(_.flags|=1048576,T)}function p(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function v(_,T,U,Q){return T===null||T.tag!==6?(T=Io(U,_.mode,Q),T.return=_,T):(T=c(T,U),T.return=_,T)}function C(_,T,U,Q){var de=U.type;return de===w?Y(_,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),vs(T,U),T.return=_,T):(T=Ol(U.type,U.key,U.props,null,_.mode,Q),vs(T,U),T.return=_,T)}function H(_,T,U,Q){return T===null||T.tag!==4||T.stateNode.containerInfo!==U.containerInfo||T.stateNode.implementation!==U.implementation?(T=Jo(U,_.mode,Q),T.return=_,T):(T=c(T,U.children||[]),T.return=_,T)}function Y(_,T,U,Q,de){return T===null||T.tag!==7?(T=Ca(U,_.mode,Q,de),T.return=_,T):(T=c(T,U),T.return=_,T)}function Z(_,T,U){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=Io(""+T,_.mode,U),T.return=_,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case E:return U=Ol(T.type,T.key,T.props,null,_.mode,U),vs(U,T),U.return=_,U;case O:return T=Jo(T,_.mode,U),T.return=_,T;case D:return T=Oa(T),Z(_,T,U)}if(te(T)||se(T))return T=Ca(T,_.mode,U,null),T.return=_,T;if(typeof T.then=="function")return Z(_,Ul(T),U);if(T.$$typeof===z)return Z(_,Dl(_,T),U);Bl(_,T)}return null}function q(_,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(_,T,""+U,Q);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case E:return U.key===de?C(_,T,U,Q):null;case O:return U.key===de?H(_,T,U,Q):null;case D:return U=Oa(U),q(_,T,U,Q)}if(te(U)||se(U))return de!==null?null:Y(_,T,U,Q,null);if(typeof U.then=="function")return q(_,T,Ul(U),Q);if(U.$$typeof===z)return q(_,T,Dl(_,U),Q);Bl(_,U)}return null}function K(_,T,U,Q,de){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return _=_.get(U)||null,v(T,_,""+Q,de);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case E:return _=_.get(Q.key===null?U:Q.key)||null,C(T,_,Q,de);case O:return _=_.get(Q.key===null?U:Q.key)||null,H(T,_,Q,de);case D:return Q=Oa(Q),K(_,T,U,Q,de)}if(te(Q)||se(Q))return _=_.get(U)||null,Y(T,_,Q,de,null);if(typeof Q.then=="function")return K(_,T,U,Ul(Q),de);if(Q.$$typeof===z)return K(_,T,U,Dl(T,Q),de);Bl(T,Q)}return null}function le(_,T,U,Q){for(var de=null,Te=null,ce=T,we=T=0,Ee=null;ce!==null&&we<U.length;we++){ce.index>we?(Ee=ce,ce=null):Ee=ce.sibling;var Oe=q(_,ce,U[we],Q);if(Oe===null){ce===null&&(ce=Ee);break}e&&ce&&Oe.alternate===null&&t(_,ce),T=f(Oe,T,we),Te===null?de=Oe:Te.sibling=Oe,Te=Oe,ce=Ee}if(we===U.length)return n(_,ce),Ae&&jn(_,we),de;if(ce===null){for(;we<U.length;we++)ce=Z(_,U[we],Q),ce!==null&&(T=f(ce,T,we),Te===null?de=ce:Te.sibling=ce,Te=ce);return Ae&&jn(_,we),de}for(ce=l(ce);we<U.length;we++)Ee=K(ce,_,we,U[we],Q),Ee!==null&&(e&&Ee.alternate!==null&&ce.delete(Ee.key===null?we:Ee.key),T=f(Ee,T,we),Te===null?de=Ee:Te.sibling=Ee,Te=Ee);return e&&ce.forEach(function(da){return t(_,da)}),Ae&&jn(_,we),de}function he(_,T,U,Q){if(U==null)throw Error(r(151));for(var de=null,Te=null,ce=T,we=T=0,Ee=null,Oe=U.next();ce!==null&&!Oe.done;we++,Oe=U.next()){ce.index>we?(Ee=ce,ce=null):Ee=ce.sibling;var da=q(_,ce,Oe.value,Q);if(da===null){ce===null&&(ce=Ee);break}e&&ce&&da.alternate===null&&t(_,ce),T=f(da,T,we),Te===null?de=da:Te.sibling=da,Te=da,ce=Ee}if(Oe.done)return n(_,ce),Ae&&jn(_,we),de;if(ce===null){for(;!Oe.done;we++,Oe=U.next())Oe=Z(_,Oe.value,Q),Oe!==null&&(T=f(Oe,T,we),Te===null?de=Oe:Te.sibling=Oe,Te=Oe);return Ae&&jn(_,we),de}for(ce=l(ce);!Oe.done;we++,Oe=U.next())Oe=K(ce,_,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(rx){return t(_,rx)}),Ae&&jn(_,we),de}function Le(_,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 E:e:{for(var de=U.key;T!==null;){if(T.key===de){if(de=U.type,de===w){if(T.tag===7){n(_,T.sibling),Q=c(T,U.props.children),Q.return=_,_=Q;break e}}else if(T.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===D&&Oa(de)===T.type){n(_,T.sibling),Q=c(T,U.props),vs(Q,U),Q.return=_,_=Q;break e}n(_,T);break}else t(_,T);T=T.sibling}U.type===w?(Q=Ca(U.props.children,_.mode,Q,U.key),Q.return=_,_=Q):(Q=Ol(U.type,U.key,U.props,null,_.mode,Q),vs(Q,U),Q.return=_,_=Q)}return p(_);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(_,T.sibling),Q=c(T,U.children||[]),Q.return=_,_=Q;break e}else{n(_,T);break}else t(_,T);T=T.sibling}Q=Jo(U,_.mode,Q),Q.return=_,_=Q}return p(_);case D:return U=Oa(U),Le(_,T,U,Q)}if(te(U))return le(_,T,U,Q);if(se(U)){if(de=se(U),typeof de!="function")throw Error(r(150));return U=de.call(U),he(_,T,U,Q)}if(typeof U.then=="function")return Le(_,T,Ul(U),Q);if(U.$$typeof===z)return Le(_,T,Dl(_,U),Q);Bl(_,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,T!==null&&T.tag===6?(n(_,T.sibling),Q=c(T,U),Q.return=_,_=Q):(n(_,T),Q=Io(U,_.mode,Q),Q.return=_,_=Q),p(_)):n(_,T)}return function(_,T,U,Q){try{ys=0;var de=Le(_,T,U,Q);return pi=null,de}catch(ce){if(ce===mi||ce===Rl)throw ce;var Te=At(29,ce,null,_.mode);return Te.lanes=Q,Te.return=_,Te}}}var za=eh(!0),th=eh(!1),Zn=!1;function oc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cc(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,(_e&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=Tl(e),Bf(e,null,n),t}return Al(e,l,t,n),Tl(e)}function bs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Vd(e,n)}}function uc(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 dc=!1;function xs(){if(dc){var e=hi;if(e!==null)throw e}}function Ss(e,t,n,l){dc=!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?(ke&q)===q:(l&q)===q){q!==0&&q===fi&&(dc=!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=A(null),Hl=A(0);function ih(e,t){e=Mn,ee(Hl,e),ee(gi,t),Mn=e|t.baseLanes}function fc(){ee(Hl,Mn),ee(gi,gi.current)}function hc(){Mn=Hl.current,V(gi),V(Hl)}var Tt=A(null),Vt=null;function Fn(e){var t=e.alternate;ee(Qe,Qe.current&1),ee(Tt,e),Vt===null&&(t===null||gi.current!==null||t.memoizedState!==null)&&(Vt=e)}function mc(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=A(0);function ql(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||xu(n)||Su(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var kn=0,xe=null,Me=null,We=null,$l=!1,yi=!1,Da=!1,Kl=0,ws=0,vi=null,Fb=0;function Ge(){throw Error(r(321))}function pc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Et(e[n],t[n]))return!1;return!0}function gc(e,t,n,l,c,f){return kn=f,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?Kh:_c,Da=!1,f=n(l,c),Da=!1,yi&&(f=rh(t,n,l,c)),lh(e),f}function lh(e){B.H=Cs;var t=Me!==null&&Me.next!==null;if(kn=0,We=Me=xe=null,$l=!1,ws=0,vi=null,t)throw Error(r(300));e===null||et||(e=e.dependencies,e!==null&&zl(e)&&(et=!0))}function rh(e,t,n,l){xe=e;var c=0;do{if(yi&&(vi=null),ws=0,yi=!1,25<=c)throw Error(r(301));if(c+=1,We=Me=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}B.H=Yh,f=t(n,l)}while(yi);return f}function Pb(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?js(t):t,e=e.useState()[0],(Me!==null?Me.memoizedState:null)!==e&&(xe.flags|=1024),t}function yc(){var e=Kl!==0;return Kl=0,e}function vc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function bc(e){if($l){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}$l=!1}kn=0,We=Me=xe=null,yi=!1,ws=Kl=0,vi=null}function mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?xe.memoizedState=We=e:We=We.next=e,We}function Xe(){if(Me===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=We===null?xe.memoizedState:We.next;if(t!==null)We=t,Me=e;else{if(e===null)throw xe.alternate===null?Error(r(467)):Error(r(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},We===null?xe.memoizedState=We=e:We=We.next=e}return We}function Yl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function js(e){var t=ws;return ws+=1,vi===null&&(vi=[]),e=Ff(vi,e,t),t=xe,(We===null?t.memoizedState:We.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?Kh:_c),e}function Gl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return js(e);if(e.$$typeof===z)return ct(e)}throw Error(r(438,String(e)))}function xc(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=Yl(),xe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=Se;return t.index++,n}function En(e,t){return typeof t=="function"?t(e):t}function Vl(e){var t=Xe();return Sc(t,Me,e)}function Sc(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?(ke&Z)===Z:(kn&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((kn&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,!Et(f,e.memoizedState)&&(et=!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 wc(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);Et(f,t.memoizedState)||(et=!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=Ae;if(f){if(n===void 0)throw Error(r(407));n=n()}else n=t();var p=!Et((Me||c).memoizedState,n);if(p&&(c.memoizedState=n,et=!0),c=c.queue,Cc(dh.bind(null,l,c,e),[e]),c.getSnapshot!==t||p||We!==null&&We.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||(kn&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=Yl(),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!Et(e,n)}catch{return!0}}function hh(e){var t=Na(e,2);t!==null&&Nt(t,e,2)}function jc(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:En,lastRenderedState:e},t}function mh(e,t,n,l){return e.baseState=n,Sc(e,Me,typeof l=="function"?l:En)}function Wb(e,t,n,l,c){if(Zl(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){Nc(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){Nc(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 Nc(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 Nc(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(Ae){var n=Ue.formState;if(n!==null){e:{var l=xe;if(Ae){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=jc(!1),f=Oc.bind(null,xe,!1,l.queue),l=mt(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,n=Wb.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=Sc(e,t,bh)[0],e=Vl(En)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=js(t)}catch(p){throw p===mi?Rl: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},e0.bind(null,c,n),null)),[l,f,e]}function e0(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=Yl(),xe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Nh(){return Xe().memoizedState}function Ql(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 Xl(e,t,n,l){var c=Xe();l=l===void 0?null:l;var f=c.memoizedState.inst;Me!==null&&l!==null&&pc(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){Ql(8390656,8,e,t)}function Cc(e,t){Xl(2048,8,e,t)}function t0(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=Yl(),xe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function kh(e){var t=Xe().memoizedState;return t0({ref:t,nextImpl:e}),function(){if((_e&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Eh(e,t){return Xl(4,2,e,t)}function Ah(e,t){return Xl(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,Xl(4,4,Th.bind(null,t,e),n)}function kc(){}function _h(e,t){var n=Xe();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&pc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function zh(e,t){var n=Xe();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&pc(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||(kn&1073741824)!==0&&(ke&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Dm(),xe.lanes|=e,ta|=e,n)}function Dh(e,t,n,l){return Et(n,t)?n:gi.current!==null?(e=Ec(e,n,l),Et(e,t)||(et=!0),e):(kn&42)===0||(kn&1073741824)!==0&&(ke&261930)===0?(et=!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,Oc(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=Jb(C,l);Ns(e,t,Y,Dt(e))}else Ns(e,t,l,Dt(e))}catch(Z){Ns(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 n0(){}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?n0: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:En,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:En,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),Ns(e,t.next.queue,{},Dt())}function Tc(){return ct($s)}function Uh(){return Xe().memoizedState}function Bh(){return Xe().memoizedState}function a0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Dt();e=In(n);var l=Jn(t,e,n);l!==null&&(Nt(l,t,n),bs(l,t,n)),t={cache:ic()},e.payload=t;return}t=t.return}}function i0(e,t,n){var l=Dt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Zl(e)?qh(t,n):(n=Xo(e,t,n,l),n!==null&&(Nt(n,e,l),$h(n,t,l)))}function Hh(e,t,n){var l=Dt();Ns(e,t,n,l)}function Ns(e,t,n,l){var c={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zl(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,Et(v,p))return Al(e,t,c,0),Ue===null&&El(),!1}catch{}if(n=Xo(e,t,c,l),n!==null)return Nt(n,e,l),$h(n,t,l),!0}return!1}function Oc(e,t,n,l){if(l={lane:2,revertLane:ou(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Zl(e)){if(t)throw Error(r(479))}else t=Xo(e,n,l,2),t!==null&&Nt(t,e,2)}function Zl(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function qh(e,t){yi=$l=!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 Cs={readContext:ct,use:Gl,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};Cs.useEffectEvent=Ge;var Kh={readContext:ct,use:Gl,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,Ql(4194308,4,Th.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ql(4194308,4,e,t)},useInsertionEffect:function(e,t){Ql(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=i0.bind(null,xe,e),[l.memoizedState,e]},useRef:function(e){var t=mt();return e={current:e},t.memoizedState=e},useState:function(e){e=jc(e);var t=e.queue,n=Hh.bind(null,xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:kc,useDeferredValue:function(e,t){var n=mt();return Ec(n,e,t)},useTransition:function(){var e=jc(!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(Ae){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Ue===null)throw Error(r(349));(ke&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(Ae){var n=dn,l=un;n=(l&~(1<<32-kt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Kl++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Fb++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Tc,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=Oc.bind(null,xe,!0,n),n.dispatch=t,[e,t]},useMemoCache:xc,useCacheRefresh:function(){return mt().memoizedState=a0.bind(null,xe)},useEffectEvent:function(e){var t=mt(),n={impl:e};return t.memoizedState=n,function(){if((_e&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},_c={readContext:ct,use:Gl,useCallback:_h,useContext:ct,useEffect:Cc,useImperativeHandle:Oh,useInsertionEffect:Eh,useLayoutEffect:Ah,useMemo:zh,useReducer:Vl,useRef:Nh,useState:function(){return Vl(En)},useDebugValue:kc,useDeferredValue:function(e,t){var n=Xe();return Dh(n,Me.memoizedState,e,t)},useTransition:function(){var e=Vl(En)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:js(e),t]},useSyncExternalStore:oh,useId:Uh,useHostTransitionStatus:Tc,useFormState:Sh,useActionState:Sh,useOptimistic:function(e,t){var n=Xe();return mh(n,Me,e,t)},useMemoCache:xc,useCacheRefresh:Bh};_c.useEffectEvent=kh;var Yh={readContext:ct,use:Gl,useCallback:_h,useContext:ct,useEffect:Cc,useImperativeHandle:Oh,useInsertionEffect:Eh,useLayoutEffect:Ah,useMemo:zh,useReducer:wc,useRef:Nh,useState:function(){return wc(En)},useDebugValue:kc,useDeferredValue:function(e,t){var n=Xe();return Me===null?Ec(n,e,t):Dh(n,Me.memoizedState,e,t)},useTransition:function(){var e=wc(En)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:js(e),t]},useSyncExternalStore:oh,useId:Uh,useHostTransitionStatus:Tc,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:xc,useCacheRefresh:Bh};Yh.useEffectEvent=kh;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 Dc={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),bs(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),bs(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Dt(),l=In(n);l.tag=2,t!=null&&(l.callback=t),t=Jn(e,l,n),t!==null&&(Nt(t,e,n),bs(t,e,n))}};function 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?!ds(n,l)||!ds(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&&Dc.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){kl(e)}function Xh(e){console.error(e)}function Zh(e){kl(e)}function Il(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 Mc(e,t,n){return n=In(n),n.tag=3,n.payload={element:null},n.callback=function(){Il(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 s0(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?rr():n.alternate===null&&Ve===0&&(Ve=3),n.flags&=-257,n.flags|=65536,n.lanes=c,l===Ll?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),su(e,l,c)),!1;case 22:return n.flags|=65536,l===Ll?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),su(e,l,c)),!1}throw Error(r(435,n.tag))}return su(e,l,c),rr(),!1}if(Ae)return t=Tt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Wo&&(e=Error(r(422),{cause:l}),ms($t(e,n)))):(l!==Wo&&(t=Error(r(423),{cause:l}),ms($t(t,n))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=$t(l,n),c=Mc(e.stateNode,l,c),uc(e,c),Ve!==4&&(Ve=2)),!1;var f=Error(r(520),{cause:l});if(f=$t(f,n),Ds===null?Ds=[f]:Ds.push(f),Ve!==4&&(Ve=2),t===null)return!0;l=$t(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=c&-c,n.lanes|=e,e=Mc(n.stateNode,l,e),uc(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),uc(n,c),!1}n=n.return}while(n!==null);return!1}var Rc=Error(r(461)),et=!1;function ut(e,t,n,l){t.child=e===null?th(t,null,n,l):za(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 Aa(t),l=gc(e,t,n,p,f,c),v=yc(),e!==null&&!et?(vc(e,t,c),An(e,t,c)):(Ae&&v&&Fo(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"&&!Zo(f)&&f.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=f,em(e,t,f,l,c)):(e=Ol(n.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Yc(e,c)){var p=f.memoizedProps;if(n=n.compare,n=n!==null?n:ds,n(p,l)&&e.ref===t.ref)return An(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(ds(f,l)&&e.ref===t.ref)if(et=!1,t.pendingProps=l=f,Yc(e,c))(e.flags&131072)!==0&&(et=!0);else return t.lanes=e.lanes,An(e,t,c)}return Lc(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&&Ml(t,f!==null?f.cachePool:null),f!==null?ih(t,f):fc(),sh(t);else return l=t.lanes=536870912,nm(e,t,f!==null?f.baseLanes|n:n,n,l)}else f!==null?(Ml(t,f.cachePool),ih(t,f),Pn(),t.memoizedState=null):(e!==null&&Ml(t,null),fc(),Pn());return ut(e,t,c,n),t.child}function ks(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=lc();return f=f===null?null:{parent:Pe._currentValue,pool:f},t.memoizedState={baseLanes:n,cachePool:f},e!==null&&Ml(t,null),fc(),sh(t),e!==null&&di(e,t,l,!0),t.childLanes=c,null}function Jl(e,t){return t=Pl({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 za(t,e.child,null,n),e=Jl(t,t.pendingProps),e.flags|=2,Ot(t),t.memoizedState=null,e}function l0(e,t,n){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ae){if(l.mode==="hidden")return e=Jl(t,l),t.lanes=536870912,ks(null,e);if(mc(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 Jl(t,l)}var f=e.memoizedState;if(f!==null){var p=f.dehydrated;if(mc(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(et||di(e,t,n,!1),c=(n&e.childLanes)!==0,et||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),Rc;rr(),t=am(e,t,n)}else e=f.treeContext,He=Qt(p.nextSibling),ot=t,Ae=!0,Vn=null,Gt=!1,e!==null&&Yf(t,e),t=Jl(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 Fl(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 Lc(e,t,n,l,c){return Aa(t),n=gc(e,t,n,l,void 0,c),l=yc(),e!==null&&!et?(vc(e,t,c),An(e,t,c)):(Ae&&l&&Fo(t),t.flags|=1,ut(e,t,n,c),t.child)}function im(e,t,n,l,c,f){return Aa(t),t.updateQueue=null,n=rh(t,l,n,c),lh(e),l=yc(),e!==null&&!et?(vc(e,t,f),An(e,t,f)):(Ae&&l&&Fo(t),t.flags|=1,ut(e,t,n,f),t.child)}function sm(e,t,n,l,c){if(Aa(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=Dc,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=l,f.state=t.memoizedState,f.refs={},oc(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&&Dc.enqueueReplaceState(f,f.state,null),Ss(t,l,f,c),xs(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){f=t.stateNode;var v=t.memoizedProps,C=Ma(n,v);f.props=C;var 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,Ss(t,l,f,c),xs(),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,cc(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,Ss(t,l,f,c),xs();var K=t.memoizedState;p!==Z||q!==K||Zn||e!==null&&e.dependencies!==null&&zl(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&&zl(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,Fl(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=za(t,e.child,null,c),t.child=za(t,null,n,c)):ut(e,t,n,c),t.memoizedState=f.state,e=t.child):e=An(e,t,c),e}function lm(e,t,n,l){return ka(),t.flags|=256,ut(e,t,n,l),t.child}var Uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bc(e){return{baseLanes:e,cachePool:If()}}function Hc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=zt),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(Ae){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 Su(e)?t.lanes=32:t.lanes=536870912,null}var v=l.children;return l=l.fallback,c?(Pn(),c=t.mode,v=Pl({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=Bc(n),l.childLanes=Hc(e,p,n),t.memoizedState=Uc,ks(null,l)):(Fn(t),qc(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=$c(e,t,n)):t.memoizedState!==null?(Pn(),t.child=e.child,t.flags|=128,t=null):(Pn(),v=l.fallback,c=t.mode,l=Pl({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,za(t,e.child,null,n),l=t.child,l.memoizedState=Bc(n),l.childLanes=Hc(e,p,n),t.memoizedState=Uc,t=ks(null,l));else if(Fn(t),Su(v)){if(p=v.nextSibling&&v.nextSibling.dataset,p)var H=p.dgst;p=H,l=Error(r(419)),l.stack="",l.digest=p,ms({value:l,source:null,stack:null}),t=$c(e,t,n)}else if(et||di(e,t,n,!1),p=(n&e.childLanes)!==0,et||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),Rc;xu(v)||rr(),t=$c(e,t,n)}else xu(v)?(t.flags|=192,t.child=e.child,t=null):(e=C.treeContext,He=Qt(v.nextSibling),ot=t,Ae=!0,Vn=null,Gt=!1,e!==null&&Yf(t,e),t=qc(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,ks(null,l),l=t.child,v=e.child.memoizedState,v===null?v=Bc(n):(c=v.cachePool,c!==null?(C=Pe._currentValue,c=c.parent!==C?{parent:C,pool:C}:c):c=If(),v={baseLanes:v.baseLanes|n,cachePool:c}),l.memoizedState=v,l.childLanes=Hc(e,p,n),t.memoizedState=Uc,ks(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 qc(e,t){return t=Pl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Pl(e,t){return e=At(22,e,null,t),e.lanes=0,e}function $c(e,t,n){return za(t,e.child,null,n),e=qc(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),nc(e.return,t,n)}function Kc(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=Ae?hs: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&&ql(e)===null&&(c=n),n=n.sibling;n=c,n===null?(c=t.child,t.child=null):(c=n.sibling,n.sibling=null),Kc(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&&ql(e)===null){t.child=c;break}e=c.sibling,c.sibling=n,n=c,c=e}Kc(t,!0,n,null,f,l);break;case"together":Kc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function An(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 Yc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&zl(e)))}function r0(e,t,n){switch(t.tag){case 3:$e(t,t.stateNode.containerInfo),Xn(t,Pe,e.memoizedState.cache),ka();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,mc(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=An(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,Pe,e.memoizedState.cache)}return An(e,t,n)}function um(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)et=!0;else{if(!Yc(e,n)&&(t.flags&128)===0)return et=!1,r0(e,t,n);et=(e.flags&131072)!==0}else et=!1,Ae&&(t.flags&1048576)!==0&&Kf(t,hs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Oa(t.elementType),t.type=e,typeof e=="function")Zo(e)?(l=Ma(e,l),t.tag=1,t=sm(null,t,e,l,n)):(t.tag=0,t=Lc(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=ge(e)||e,Error(r(306,t,""))}}return t;case 0:return Lc(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,cc(e,t),Ss(t,l,null,n);var p=t.memoizedState;if(l=p.cache,Xn(t,Pe,l),l!==f.cache&&ac(t,[Pe],n,!0),xs(),l=p.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=lm(e,t,l,n);break e}else if(l!==c){c=$t(Error(r(424)),t),ms(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,Ae=!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(ka(),l===c){t=An(e,t,n);break e}ut(e,t,l,n)}t=t.child}return t;case 26:return Fl(e,t),e===null?(n=Sp(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ae||(n=t.type,e=t.pendingProps,l=mr(ie.current).createElement(n),l[rt]=t,l[vt]=e,dt(l,n,e),st(l),t.stateNode=l):t.memoizedState=Sp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Pt(t),e===null&&Ae&&(l=t.stateNode=vp(t.type,t.pendingProps,ie.current),ot=t,Gt=!0,c=He,la(t.type)?(wu=c,He=Qt(l.firstChild)):He=c),ut(e,t,t.pendingProps.children,n),Fl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ae&&((c=l=He)&&(l=U0(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,yu(c,f)?l=null:p!==null&&yu(c,p)&&(t.flags|=32),t.memoizedState!==null&&(c=gc(e,t,Pb,null,null,n),$s._currentValue=c),Fl(e,t),ut(e,t,l,n),t.child;case 6:return e===null&&Ae&&((e=n=He)&&(n=B0(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=za(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,Aa(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 l0(e,t,n);case 22:return tm(e,t,n,t.pendingProps);case 24:return Aa(t),l=ct(Pe),e===null?(c=lc(),c===null&&(c=Ue,f=ic(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=n),c=f),t.memoizedState={parent:l,cache:c},oc(t),Xn(t,Pe,c)):((e.lanes&n)!==0&&(cc(e,t),Ss(t,null,null,n),xs()),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,Pe,l)):(l=f.cache,Xn(t,Pe,l),l!==c.cache&&ac(t,[Pe],n,!0))),ut(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Tn(e){e.flags|=4}function Gc(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 _a=Ll,rc}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,!kp(t))if(Um())e.flags|=8192;else throw _a=Ll,rc}function Wl(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(!Ae)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 o0(e,t,n){var l=t.pendingProps;switch(Po(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(t),null;case 1:return qe(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Cn(Pe),ye(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ui(t)?Tn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ec())),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),Gc(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),Gc(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=mr(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),Gc(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=mr(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 ka(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),e=!1}else n=ec(),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 ka(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),c=!1}else c=ec(),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),Wl(t,t.updateQueue),qe(t),null);case 4:return ye(),e===null&&fu(t.stateNode.containerInfo),qe(t),null;case 10:return Cn(t.type),qe(t),null;case 19:if(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=ql(e),f!==null){for(t.flags|=128,Es(l,!1),e=f.updateQueue,t.updateQueue=e,Wl(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),Ae&&jn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ht()>ir&&(t.flags|=128,c=!0,Es(l,!1),t.lanes=4194304)}else{if(!c)if(e=ql(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Wl(t,e),Es(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Ae)return qe(t),null}else 2*ht()-l.renderingStartTime>ir&&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),Ae&&jn(t,l.treeForkCount),e):(qe(t),null);case 22:case 23:return Ot(t),hc(),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&&Wl(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(Pe),qe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function c0(e,t){switch(Po(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Cn(Pe),ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Rt(t),null;case 31:if(t.memoizedState!==null){if(Ot(t),t.alternate===null)throw Error(r(340));ka()}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));ka()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(Qe),null;case 4:return ye(),null;case 10:return Cn(t.type),null;case 22:case 23:return Ot(t),hc(),e!==null&&V(Ta),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Cn(Pe),null;case 25:return null;default:return null}}function fm(e,t){switch(Po(t),t.tag){case 3:Cn(Pe),ye();break;case 26:case 27:case 5:Rt(t);break;case 4:ye();break;case 31:t.memoizedState!==null&&Ot(t);break;case 13:Ot(t);break;case 19:V(Qe);break;case 10:Cn(t.type);break;case 22:case 23:Ot(t),hc(),e!==null&&V(Ta);break;case 24:Cn(Pe)}}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 Ts(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(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 Vc(e,t,n){try{var l=e.stateNode;_0(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 Qc(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 Xc(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(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function er(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(er(e,t,n),e=e.sibling;e!==null;)er(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,tt=!1,Zc=!1,vm=typeof WeakSet=="function"?WeakSet:Set,lt=null;function u0(e,t){if(e=e.containerInfo,pu=Sr,e=Of(e),$o(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(gu={focusedElem:e,selectionRange:n},Sr=!1,lt=t;lt!==null;)if(t=lt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,lt=e;else for(;lt!==null;){switch(t=lt,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)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)bu(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":bu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,lt=e;break}lt=t.return}}function bm(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:zn(e,n),l&4&&As(5,n);break;case 1:if(zn(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&&Ts(n,n.return);break;case 3:if(zn(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:zn(e,n),t===null&&l&4&&pm(n),l&512&&Ts(n,n.return);break;case 12:zn(e,n);break;case 31:zn(e,n),l&4&&wm(e,n);break;case 13:zn(e,n),l&4&&jm(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=b0.bind(null,n),H0(e,n))));break;case 22:if(l=n.memoizedState!==null||On,!l){t=t!==null&&t.memoizedState!==null||tt,c=On;var f=tt;On=l,(tt=t)&&!f?Dn(e,n,(n.subtreeFlags&8772)!==0):zn(e,n),On=c,tt=f}break;case 30:break;default:zn(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&&No(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 _n(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(Wi,n)}catch{}switch(n.tag){case 26:tt||fn(n,t),_n(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:tt||fn(n,t);var l=Ke,c=xt;la(n.type)&&(Ke=n.stateNode,xt=!1),_n(e,t,n),Bs(n.stateNode),Ke=l,xt=c;break;case 5:tt||fn(n,t);case 6:if(l=Ke,c=xt,Ke=null,_n(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),_i(e)):hp(Ke,n.stateNode));break;case 4:l=Ke,c=xt,Ke=n.stateNode.containerInfo,xt=!0,_n(e,t,n),Ke=l,xt=c;break;case 0:case 11:case 14:case 15:Wn(2,n,t),tt||Wn(4,n,t),_n(e,t,n);break;case 1:tt||(fn(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&mm(n,t,l)),_n(e,t,n);break;case 21:_n(e,t,n);break;case 22:tt=(l=tt)||n.memoizedState!==null,_n(e,t,n),tt=l;break;default:_n(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{_i(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{_i(e)}catch(n){De(t,t.return,n)}}function d0(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 tr(e,t){var n=d0(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var c=x0.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&&(tt||n===null||fn(n,n.return)),l&64&&On&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var c=nn;if(St(t,e),wt(e),l&512&&(tt||n===null||fn(n,n.return)),l&4){var f=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":f=c.getElementsByTagName("title")[0],(!f||f[ns]||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,st(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,st(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&&Vc(e,e.memoizedProps,n.memoizedProps)}break;case 27:St(t,e),wt(e),l&512&&(tt||n===null||fn(n,n.return)),n!==null&&l&4&&Vc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(St(t,e),wt(e),l&512&&(tt||n===null||fn(n,n.return)),e.flags&32){c=e.stateNode;try{ei(c,"")}catch(le){De(e,e.return,le)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,Vc(e,c,n!==null?n.memoizedProps:c)),l&1024&&(Zc=!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(yr=null,c=nn,nn=pr(t.containerInfo),St(t,e),nn=c,wt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{_i(t.containerInfo)}catch(le){De(e,e.return,le)}Zc&&(Zc=!1,Cm(e));break;case 4:l=nn,nn=pr(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,tr(e,l)));break;case 13:St(t,e),wt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ar=ht()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,tr(e,l)));break;case 22:c=e.memoizedState!==null;var C=n!==null&&n.memoizedState!==null,H=On,Y=tt;if(On=H||c,tt=Y||C,St(t,e),tt=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||tt||Ra(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){C=n=t;try{if(f=C.stateNode,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,tr(e,n))));break;case 19:St(t,e),wt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,tr(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=Qc(e);er(e,f,c);break;case 5:var p=n.stateNode;n.flags&32&&(ei(p,""),n.flags&=-33);var v=Qc(e);er(e,v,p);break;case 3:case 4:var C=n.stateNode.containerInfo,H=Qc(e);Xc(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 zn(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:Bs(t.stateNode);case 26:case 5:fn(t,t.return),Ra(t);break;case 22:t.memoizedState===null&&Ra(t);break;case 30:Ra(t);break;default:Ra(t)}e=e.sibling}}function Dn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,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),Ts(f,f.return);break;case 27:ym(f);case 26:case 5:Dn(c,f,n),n&&l===null&&p&4&&pm(f),Ts(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),Ts(f,f.return);break;case 30:break;default:Dn(c,f,n)}t=t.sibling}}function Ic(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ps(n))}function Jc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ps(e))}function an(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)km(e,t,n,l),t=t.sibling}function km(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&&ps(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):Os(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&&Ic(p,t);break;case 24:an(e,t,n,l),c&2048&&Jc(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):Os(f,p):(Y._visibility|=2,xi(f,p,v,C,c)),c&&H&2048&&Ic(p.alternate,p);break;case 24:xi(f,p,v,C,c),c&&H&2048&&Jc(p.alternate,p);break;default:xi(f,p,v,C,c)}t=t.sibling}}function Os(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:Os(n,l),c&2048&&Ic(l.alternate,l);break;case 24:Os(n,l),c&2048&&Jc(l.alternate,l);break;default:Os(n,l)}t=t.sibling}}var _s=8192;function Si(e,t,n){if(e.subtreeFlags&_s)for(e=e.child;e!==null;)Em(e,t,n),e=e.sibling}function Em(e,t,n){switch(e.tag){case 26:Si(e,t,n),e.flags&_s&&e.memoizedState!==null&&F0(n,nn,e.memoizedState,e.memoizedProps);break;case 5:Si(e,t,n);break;case 3:case 4:var l=nn;nn=pr(e.stateNode.containerInfo),Si(e,t,n),nn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=_s,_s=16777216,Si(e,t,n),_s=l):Si(e,t,n));break;default:Si(e,t,n)}}function Am(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];lt=l,Om(l,e)}Am(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,nr(e)):zs(e);break;default:zs(e)}}function nr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];lt=l,Om(l,e)}Am(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wn(8,t,t.return),nr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,nr(t));break;default:nr(t)}e=e.sibling}}function Om(e,t){for(;lt!==null;){var n=lt;switch(n.tag){case 0:case 11:case 15:Wn(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ps(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,lt=l;else e:for(n=e;lt!==null;){l=lt;var c=l.sibling,f=l.return;if(xm(l),l===n){lt=null;break e}if(c!==null){c.return=f,lt=c;break e}lt=f}}}var f0={getCacheForType:function(e){var t=ct(Pe),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ct(Pe).controller.signal}},h0=typeof WeakMap=="function"?WeakMap:Map,_e=0,Ue=null,Ne=null,ke=0,ze=0,_t=null,ea=!1,wi=!1,Fc=!1,Mn=0,Ve=0,ta=0,La=0,Pc=0,zt=0,ji=0,Ds=null,jt=null,Wc=!1,ar=0,_m=0,ir=1/0,sr=null,na=null,at=0,aa=null,Ni=null,Rn=0,eu=0,tu=null,zm=null,Ms=0,nu=null;function Dt(){return(_e&2)!==0&&ke!==0?ke&-ke:B.T!==null?ou():Xd()}function Dm(){if(zt===0)if((ke&536870912)===0||Ae){var e=hl;hl<<=1,(hl&3932160)===0&&(hl=262144),zt=e}else zt=536870912;return e=Tt.current,e!==null&&(e.flags|=32),zt}function Nt(e,t,n){(e===Ue&&(ze===2||ze===9)||e.cancelPendingCommit!==null)&&(Ci(e,0),ia(e,ke,zt,!1)),ts(e,n),((_e&2)===0||e!==Ue)&&(e===Ue&&((_e&2)===0&&(La|=n),Ve===4&&ia(e,ke,zt,!1)),hn(e))}function Mm(e,t,n){if((_e&6)!==0)throw Error(r(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||es(e,t),c=l?g0(e,t):iu(e,t,!0),f=l;do{if(c===0){wi&&!l&&ia(e,t,0,!1);break}else{if(n=e.current.alternate,f&&!m0(n)){c=iu(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=Ds;var C=v.current.memoizedState.isDehydrated;if(C&&(Ci(v,p).flags|=256),p=iu(v,p,!1),p!==2){if(Fc&&!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,zt,!ea);break e;case 2:jt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(c=ar+300-ht(),10<c)){if(ia(l,t,zt,!ea),pl(l,0,!0)!==0)break e;Rn=t,l.timeoutHandle=dp(Rm.bind(null,l,n,jt,sr,Wc,t,zt,La,ji,ea,f,"Throttled",-0,0),c);break e}Rm(l,n,jt,sr,Wc,t,zt,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},Em(t,f,Z);var le=(f&62914560)===f?ar-ht():(f&4194048)===f?_m-ht():0;if(le=P0(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 m0(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(!Et(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&=~Pc,t&=~La,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var f=31-kt(c),p=1<<f;l[f]=-1,c&=~p}n!==0&&Gd(e,n,t)}function lr(){return(_e&6)===0?(Rs(0),!1):!0}function au(){if(Ne!==null){if(ze===0)var e=Ne.return;else e=Ne,Nn=Ea=null,bc(e),pi=null,ys=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,M0(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Rn=0,au(),Ue=e,Ne=n=wn(e.current,null),ke=t,ze=0,_t=null,ea=!1,wi=es(e,t),Fc=!1,ji=zt=Pc=La=ta=Ve=0,jt=Ds=null,Wc=!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-kt(l),f=1<<c;t|=e[c],l&=~f}return Mn=t,El(),n}function Lm(e,t){xe=null,B.H=Cs,t===mi||t===Rl?(t=Pf(),ze=3):t===rc?(t=Pf(),ze=4):ze=t===Rc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,_t=t,Ne===null&&(Ve=1,Il(e,$t(t,e.current)))}function Um(){var e=Tt.current;return e===null?!0:(ke&4194048)===ke?Vt===null:(ke&62914560)===ke||(ke&536870912)!==0?e===Vt:!1}function Bm(){var e=B.H;return B.H=Cs,e===null?Cs:e}function Hm(){var e=B.A;return B.A=f0,e}function rr(){Ve=4,ea||(ke&4194048)!==ke&&Tt.current!==null||(wi=!0),(ta&134217727)===0&&(La&134217727)===0||Ue===null||ia(Ue,ke,zt,!1)}function iu(e,t,n){var l=_e;_e|=2;var c=Bm(),f=Hm();(Ue!==e||ke!==t)&&(sr=null,Ci(e,t)),t=!1;var p=Ve;e:do try{if(ze!==0&&Ne!==null){var v=Ne,C=_t;switch(ze){case 8:au(),p=6;break e;case 3:case 2:case 9:case 6:Tt.current===null&&(t=!0);var H=ze;if(ze=0,_t=null,ki(e,v,C,H),n&&wi){p=0;break e}break;default:H=ze,ze=0,_t=null,ki(e,v,C,H)}}p0(),p=Ve;break}catch(Y){Lm(e,Y)}while(!0);return t&&e.shellSuspendCounter++,Nn=Ea=null,_e=l,B.H=c,B.A=f,Ne===null&&(Ue=null,ke=0,El()),p}function p0(){for(;Ne!==null;)qm(Ne)}function g0(e,t){var n=_e;_e|=2;var l=Bm(),c=Hm();Ue!==e||ke!==t?(sr=null,ir=ht()+500,Ci(e,t)):wi=es(e,t);e:do try{if(ze!==0&&Ne!==null){t=Ne;var f=_t;t:switch(ze){case 1:ze=0,_t=null,ki(e,t,f,1);break;case 2:case 9:if(Jf(f)){ze=0,_t=null,$m(t);break}t=function(){ze!==2&&ze!==9||Ue!==e||(ze=7),hn(e)},f.then(t,t);break e;case 3:ze=7;break e;case 4:ze=5;break e;case 7:Jf(f)?(ze=0,_t=null,$m(t)):(ze=0,_t=null,ki(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?kp(p):v.stateNode.complete){ze=0,_t=null;var C=v.sibling;if(C!==null)Ne=C;else{var H=v.return;H!==null?(Ne=H,or(H)):Ne=null}break t}}ze=0,_t=null,ki(e,t,f,5);break;case 6:ze=0,_t=null,ki(e,t,f,6);break;case 8:au(),Ve=6;break e;default:throw Error(r(462))}}y0();break}catch(Y){Lm(e,Y)}while(!0);return Nn=Ea=null,B.H=l,B.A=c,_e=n,Ne!==null?0:(Ue=null,ke=0,El(),Ve)}function y0(){for(;Ne!==null&&!go();)qm(Ne)}function qm(e){var t=um(e.alternate,e,Mn);e.memoizedProps=e.pendingProps,t===null?or(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,ke);break;case 11:t=im(n,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:bc(t);default:fm(n,t),t=Ne=Hf(t,Mn),t=um(n,t,Mn)}e.memoizedProps=e.pendingProps,t===null?or(e):Ne=t}function ki(e,t,n,l){Nn=Ea=null,bc(t),pi=null,ys=0;var c=t.return;try{if(s0(e,c,t,n,ke)){Ve=1,Il(e,$t(n,e.current)),Ne=null;return}}catch(f){if(c!==null)throw Ne=c,f;Ve=1,Il(e,$t(n,e.current)),Ne=null;return}t.flags&32768?(Ae||l===1?e=!0:wi||(ke&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)):or(t)}function or(e){var t=e;do{if((t.flags&32768)!==0){Km(t,ea);return}e=t.return;var n=o0(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=c0(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 cr();while(at!==0);if((_e&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(f=t.lanes|t.childLanes,f|=Qo,Jv(e,n,f,p,v,C),e===Ue&&(Ne=Ue=null,ke=0),Ni=t,aa=e,Rn=n,eu=f,tu=c,zm=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,S0(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=_e,_e|=4;try{u0(e,t,n)}finally{_e=p,J.p=c,B.T=l}}at=1,Gm(),Vm(),Qm()}}function Gm(){if(at===1){at=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=_e;_e|=4;try{Nm(t,e);var f=gu,p=Of(e.containerInfo),v=f.focusedElem,C=f.selectionRange;if(p!==v&&v&&v.ownerDocument&&Tf(v.ownerDocument.documentElement,v)){if(C!==null&&$o(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 _=Af(v,he),T=Af(v,Le);if(_&&T&&(K.rangeCount!==1||K.anchorNode!==_.node||K.anchorOffset!==_.offset||K.focusNode!==T.node||K.focusOffset!==T.offset)){var U=Z.createRange();U.setStart(_.node,_.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}}Sr=!!pu,gu=pu=null}finally{_e=c,J.p=l,B.T=n}}e.current=t,at=2}}function Vm(){if(at===2){at=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=_e;_e|=4;try{bm(e,t.alternate,t)}finally{_e=c,J.p=l,B.T=n}}at=3}}function Qm(){if(at===4||at===3){at=0,yo();var e=aa,t=Ni,n=Rn,l=zm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?at=5:(at=0,Ni=aa=null,Xm(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(na=null),wo(n),t=t.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(Wi,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=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&&cr(),hn(e),c=e.pendingLanes,(n&261930)!==0&&(c&42)!==0?e===nu?Ms++:(Ms=0,nu=e):Ms=0,Rs(0)}}function Xm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ps(t)))}function cr(){return Gm(),Vm(),Qm(),Zm()}function Zm(){if(at!==5)return!1;var e=aa,t=eu;eu=0;var n=wo(Rn),l=B.T,c=J.p;try{J.p=32>n?32:n,B.T=null,n=tu,tu=null;var f=aa,p=Rn;if(at=0,Ni=aa=null,Rn=0,(_e&6)!==0)throw Error(r(331));var v=_e;if(_e|=4,Tm(f.current),km(f,f.current,p,n),_e=v,Rs(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(Wi,f)}catch{}return!0}finally{J.p=c,B.T=l,Xm(e,t)}}function Im(e,t,n){t=$t(n,t),t=Mc(e.stateNode,t,2),e=Jn(e,t,2),e!==null&&(ts(e,2),hn(e))}function De(e,t,n){if(e.tag===3)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),ts(l,2),hn(l));break}}t=t.return}}function su(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new h0;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)||(Fc=!0,c.add(n),e=v0.bind(null,e,t,n),t.then(e,e))}function v0(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ue===e&&(ke&n)===n&&(Ve===4||Ve===3&&(ke&62914560)===ke&&300>ht()-ar?(_e&2)===0&&Ci(e,0):Pc|=n,ji===ke&&(ji=0)),hn(e)}function Jm(e,t){t===0&&(t=Yd()),e=Na(e,t),e!==null&&(ts(e,t),hn(e))}function b0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Jm(e,n)}function x0(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 S0(e,t){return Lt(e,t)}var ur=null,Ei=null,lu=!1,dr=!1,ru=!1,sa=0;function hn(e){e!==Ei&&e.next===null&&(Ei===null?ur=Ei=e:Ei=Ei.next=e),dr=!0,lu||(lu=!0,j0())}function Rs(e,t){if(!ru&&dr){ru=!0;do for(var n=!1,l=ur;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-kt(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=ke,f=pl(l,l===Ue?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||es(l,f)||(n=!0,ep(l,f));l=l.next}while(n);ru=!1}}function w0(){Fm()}function Fm(){dr=lu=!1;var e=0;sa!==0&&D0()&&(e=sa);for(var t=ht(),n=null,l=ur;l!==null;){var c=l.next,f=Pm(l,t);f===0?(l.next=null,n===null?ur=c:n.next=c,c===null&&(Ei=n)):(n=l,(e!==0||(f&3)!==0)&&(dr=!0)),l=c}at!==0&&at!==5||Rs(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-kt(f),v=1<<p,C=c[p];C===-1?((v&n)===0||(v&l)!==0)&&(c[p]=Iv(v,t)):C<=t&&(e.expiredLanes|=v),f&=~v}if(t=Ue,n=ke,n=pl(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(ze===2||ze===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&yn(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||es(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&yn(l),wo(n)){case 2:case 8:n=dl;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(at!==0&&at!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(cr()&&e.callbackNode!==n)return null;var l=ke;return l=pl(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(cr())return null;Mm(e,t,!0)}function j0(){R0(function(){(_e&6)!==0?Lt(ul,w0):Fm()})}function ou(){if(sa===0){var e=fi;e===0&&(e=fl,fl<<=1,(fl&261888)===0&&(fl=256)),sa=e}return sa}function tp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:bl(""+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 N0(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 jl("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 cu=0;cu<Vo.length;cu++){var uu=Vo[cu],C0=uu.toLowerCase(),k0=uu[0].toUpperCase()+uu.slice(1);tn(C0,"on"+k0)}tn(Df,"onAnimationEnd"),tn(Mf,"onAnimationIteration"),tn(Rf,"onAnimationStart"),tn("dblclick","onDoubleClick"),tn("focusin","onFocus"),tn("focusout","onBlur"),tn(Kb,"onTransitionRun"),tn(Yb,"onTransitionStart"),tn(Gb,"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 Ls="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),E0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ls));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){kl(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){kl(Y)}c.currentTarget=null,f=C}}}}function Ce(e,t){var n=t[jo];n===void 0&&(n=t[jo]=new Set);var l=e+"__bubble";n.has(l)||(ip(t,e,2,!1),n.add(l))}function du(e,t,n){var l=0;t&&(l|=4),ip(n,e,l,t)}var fr="_reactListening"+Math.random().toString(36).slice(2);function fu(e){if(!e[fr]){e[fr]=!0,Jd.forEach(function(n){n!=="selectionchange"&&(E0.has(n)||du(n,!1,e),du(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fr]||(t[fr]=!0,du("selectionchange",!1,t))}}function ip(e,t,n,l){switch(Dp(t)){case 2:var c=tx;break;case 8:c=nx;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 hu(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=Oo(n),Z=[];e:{var q=Uf.get(e);if(q!==void 0){var K=jl,le=e;switch(e){case"keypress":if(Sl(n)===0)break e;case"keydown":case"keyup":K=xb;break;case"focusin":le="focus",K=Lo;break;case"focusout":le="blur",K=Lo;break;case"beforeblur":case"afterblur":K=Lo;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=ob;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=jb;break;case Df:case Mf:case Rf:K=db;break;case Lf:K=Cb;break;case"scroll":case"scrollend":K=lb;break;case"wheel":K=Eb;break;case"copy":case"cut":case"paste":K=hb;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=Tb}var he=(t&4)!==0,Le=!he&&(e==="scroll"||e==="scrollend"),_=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||_===null||(Q=is(T,_),Q!=null&&he.push(Us(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!==To&&(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=d(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",_="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(he=mf,Q="onPointerLeave",_="onPointerEnter",T="pointer"),Le=K==null?q:as(K),U=le==null?q:as(le),q=new he(Q,T+"leave",K,n,Y),q.target=Le,q.relatedTarget=U,Q=null,Ia(Y)===H&&(he=new he(_,T+"enter",le,n,Y),he.target=U,he.relatedTarget=Le,Q=he),Le=Q,K&&le)t:{for(he=A0,_=K,T=le,U=0,Q=_;Q;Q=he(Q))U++;Q=0;for(var de=T;de;de=he(de))Q++;for(;0<U-Q;)_=he(_),U--;for(;0<Q-U;)T=he(T),Q--;for(;U--;){if(_===T||T!==null&&_===T.alternate){he=_;break t}_=he(_),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?as(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=Hb;else{Te=Ub;var ce=Lb}else K=q.nodeName,!K||K.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?H&&Ao(H.elementType)&&(Te=wf):Te=Bb;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?as(H):window,e){case"focusin":(xf(ce)||ce.contentEditable==="true")&&(ii=ce,Ko=H,fs=null);break;case"focusout":fs=Ko=ii=null;break;case"mousedown":Yo=!0;break;case"contextmenu":case"mouseup":case"dragend":Yo=!1,_f(Z,n,Y);break;case"selectionchange":if($b)break;case"keydown":case"keyup":_f(Z,n,Y)}var we;if(Bo)e:{switch(e){case"compositionstart":var Ee="onCompositionStart";break e;case"compositionend":Ee="onCompositionEnd";break e;case"compositionupdate":Ee="onCompositionUpdate";break e}Ee=void 0}else ai?vf(e,n)&&(Ee="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ee="onCompositionStart");Ee&&(pf&&n.locale!=="ko"&&(ai||Ee!=="onCompositionStart"?Ee==="onCompositionEnd"&&ai&&(we=uf()):(Yn=Y,Do="value"in Yn?Yn.value:Yn.textContent,ai=!0)),ce=hr(H,Ee),0<ce.length&&(Ee=new hf(Ee,e,null,n,Y),Z.push({event:Ee,listeners:ce}),we?Ee.data=we:(we=bf(n),we!==null&&(Ee.data=we)))),(we=_b?zb(e,n):Db(e,n))&&(Ee=hr(H,"onBeforeInput"),0<Ee.length&&(ce=new hf("onBeforeInput","beforeinput",null,n,Y),Z.push({event:ce,listeners:Ee}),ce.data=we)),N0(Z,e,H,n,Y)}ap(Z,t)})}function Us(e,t,n){return{instance:e,listener:t,currentTarget:n}}function hr(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=is(e,n),c!=null&&l.unshift(Us(e,c,f)),c=is(e,t),c!=null&&l.push(Us(e,c,f))),e.tag===3)return l;e=e.return}return[]}function A0(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=is(n,f),H!=null&&p.unshift(Us(n,H,C))):c||(H=is(n,f),H!=null&&p.push(Us(n,H,C)))),n=n.return}p.length!==0&&e.push({event:t,listeners:p})}var T0=/\r\n?/g,O0=/\u0000|\uFFFD/g;function lp(e){return(typeof e=="string"?e:""+e).replace(T0,`
|
|
9
|
+
`).replace(O0,"")}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":yl(e,"class",l);break;case"tabIndex":yl(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":yl(e,n,l);break;case"style":rf(e,l,f);break;case"data":if(t!=="object"){yl(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=bl(""+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=bl(""+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=bl(""+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),gl(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":gl(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=ib.get(n)||n,gl(e,n,l))}}function mu(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,""):gl(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<Ls.length;l++)Ce(Ls[l],e);break;case"image":Ce("error",e),Ce("load",e);break;case"details":Ce("toggle",e);break;case"embed":case"source":case"link":Ce("error",e),Ce("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(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&&mu(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 _0(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)}}ko(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)&&mu(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||mu(e,t,Y,q,l,K);return}}for(var _ in n)q=n[_],n.hasOwnProperty(_)&&q!=null&&!l.hasOwnProperty(_)&&Re(e,t,_,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 z0(){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 pu=null,gu=null;function mr(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 yu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var vu=null;function D0(){var e=window.event;return e&&e.type==="popstate"?e===vu?!1:(vu=e,!0):(vu=null,!1)}var dp=typeof setTimeout=="function"?setTimeout:void 0,M0=typeof clearTimeout=="function"?clearTimeout:void 0,fp=typeof Promise=="function"?Promise:void 0,R0=typeof queueMicrotask=="function"?queueMicrotask:typeof fp<"u"?function(e){return fp.resolve(null).then(e).catch(L0)}:dp;function L0(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),_i(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")Bs(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Bs(n);for(var f=n.firstChild;f;){var p=f.nextSibling,v=f.nodeName;f[ns]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&f.rel.toLowerCase()==="stylesheet"||n.removeChild(f),f=p}}else n==="body"&&Bs(e.ownerDocument.body);n=c}while(n);_i(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 bu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":bu(n),No(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function U0(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[ns])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==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 B0(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 xu(e){return e.data==="$?"||e.data==="$~"}function Su(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function H0(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Qt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var wu=null;function 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=mr(n),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Bs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);No(e)}var Xt=new Map,bp=new Set;function pr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ln=J.d;J.d={f:q0,r:$0,D:K0,C:Y0,L:G0,m:V0,X:X0,S:Q0,M:Z0};function q0(){var e=Ln.f(),t=lr();return e||t}function $0(e){var t=Ja(e);t!==null&&t.tag===5&&t.type==="form"?Lh(t):Ln.r(e)}var Ai=typeof document>"u"?null:document;function xp(e,t,n){var l=Ai;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),st(t),l.head.appendChild(t)))}}function K0(e){Ln.D(e),xp("dns-prefetch",e,null)}function Y0(e,t){Ln.C(e,t),xp("preconnect",e,t)}function G0(e,t,n){Ln.L(e,t,n);var l=Ai;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(Hs(f))||t==="script"&&l.querySelector(qs(f))||(t=l.createElement("link"),dt(t,"link",e),st(t),l.head.appendChild(t)))}}function V0(e,t){Ln.m(e,t);var n=Ai;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(qs(f)))return}l=n.createElement("link"),dt(l,"link",e),st(l),n.head.appendChild(l)}}}function Q0(e,t,n){Ln.S(e,t,n);var l=Ai;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(Hs(f)))v.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Xt.get(f))&&ju(e,n);var C=p=l.createElement("link");st(C),dt(C,"link",e),C._p=new Promise(function(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,gr(p,t,l)}p={type:"stylesheet",instance:p,count:1,state:v},c.set(f,p)}}}function X0(e,t){Ln.X(e,t);var n=Ai;if(n&&e){var l=Fa(n).hoistableScripts,c=Oi(e),f=l.get(c);f||(f=n.querySelector(qs(c)),f||(e=b({src:e,async:!0},t),(t=Xt.get(c))&&Nu(e,t),f=n.createElement("script"),st(f),dt(f,"link",e),n.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function Z0(e,t){Ln.M(e,t);var n=Ai;if(n&&e){var l=Fa(n).hoistableScripts,c=Oi(e),f=l.get(c);f||(f=n.querySelector(qs(c)),f||(e=b({src:e,async:!0,type:"module"},t),(t=Xt.get(c))&&Nu(e,t),f=n.createElement("script"),st(f),dt(f,"link",e),n.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function Sp(e,t,n,l){var c=(c=ie.current)?pr(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(Hs(e)))&&!f._p&&(p.instance=f,p.state.loading=5),Xt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Xt.set(e,n),f||I0(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 Hs(e){return'link[rel="stylesheet"]['+e+"]"}function wp(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function I0(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),dt(t,"link",n),st(t),e.head.appendChild(t))}function Oi(e){return'[src="'+Ht(e)+'"]'}function qs(e){return"script[async]"+e}function 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,st(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"),st(l),dt(l,"style",c),gr(l,n.precedence,e),t.instance=l;case"stylesheet":c=Ti(n.href);var f=e.querySelector(Hs(c));if(f)return t.state.loading|=4,t.instance=f,st(f),f;l=wp(n),(c=Xt.get(c))&&ju(l,c),f=(e.ownerDocument||e).createElement("link"),st(f);var p=f;return p._p=new Promise(function(v,C){p.onload=v,p.onerror=C}),dt(f,"link",l),t.state.loading|=4,gr(f,n.precedence,e),t.instance=f;case"script":return f=Oi(n.src),(c=e.querySelector(qs(f)))?(t.instance=c,st(c),c):(l=n,(c=Xt.get(f))&&(l=b({},n),Nu(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),st(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,gr(l,n.precedence,e));return t.instance}function gr(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 ju(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Nu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var yr=null;function Np(e,t,n){if(yr===null){var l=new Map,c=yr=new Map;c.set(n,l)}else c=yr,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[ns]||f[rt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var p=f.getAttribute(t)||"";p=e+p;var v=l.get(p);v?v.push(f):l.set(p,[f])}}return l}function Cp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function J0(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 kp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function F0(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(Hs(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=vr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=f,st(f);return}f=t.ownerDocument||t,l=wp(l),(c=Xt.get(c))&&ju(l,c),f=f.createElement("link"),st(f);var p=f;p._p=new Promise(function(v,C){p.onload=v,p.onerror=C}),dt(f,"link",l),n.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=vr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Cu=0;function P0(e,t){return e.stylesheets&&e.count===0&&xr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&xr(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&Cu===0&&(Cu=62500*z0());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&xr(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Cu?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function vr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var br=null;function xr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,br=new Map,t.forEach(W0,e),br=null,vr.call(e))}function W0(e,t){if(!(t.state.loading&4)){var n=br.get(e);if(n)var l=n.get(null);else{n=new Map,br.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=vr.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 $s={$$typeof:z,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function ex(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=xo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xo(0),this.hiddenUpdates=xo(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 Ep(e,t,n,l,c,f,p,v,C,H,Y,Z){return e=new ex(e,t,n,p,C,H,Y,Z,v),t=1,f===!0&&(t|=24),f=At(3,null,null,t),e.current=f,f.stateNode=e,t=ic(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:l,isDehydrated:n,cache:t},oc(f),e}function Ap(e){return e?(e=ri,e):ri}function Tp(e,t,n,l,c,f){c=Ap(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),bs(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 ku(e,t){Op(e,t),(e=e.alternate)&&Op(e,t)}function _p(e){if(e.tag===13||e.tag===31){var t=Na(e,67108864);t!==null&&Nt(t,e,67108864),ku(e,67108864)}}function zp(e){if(e.tag===13||e.tag===31){var t=Dt();t=So(t);var n=Na(e,t);n!==null&&Nt(n,e,t),ku(e,t)}}var Sr=!0;function tx(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 nx(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(Sr){var c=Au(l);if(c===null)hu(e,t,l,wr,n),Mp(e,l);else if(ix(c,e,t,n,l))l.stopPropagation();else if(Mp(e,l),t&4&&-1<ax.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-kt(p);v.entanglements[1]|=C,p&=~C}hn(f),(_e&6)===0&&(ir=ht()+500,Rs(0))}}break;case 31:case 13:v=Na(f,2),v!==null&&Nt(v,f,2),lr(),ku(f,2)}if(f=Au(l),f===null&&hu(e,t,l,wr,n),f===c)break;c=f}c!==null&&l.stopPropagation()}else hu(e,t,l,null,n)}}function Au(e){return e=Oo(e),Tu(e)}var wr=null;function Tu(e){if(wr=null,e=Ia(e),e!==null){var t=d(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=h(t),e!==null)return e;e=null}else if(n===31){if(e=m(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wr=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(vo()){case ul:return 2;case dl:return 8;case Ut:case bo:return 32;case ae:return 268435456;default:return 32}default:return 32}}var Ou=!1,ra=null,oa=null,ca=null,Ks=new Map,Ys=new Map,ua=[],ax="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":Ks.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ys.delete(t.pointerId)}}function Gs(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&&_p(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function ix(e,t,n,l,c){switch(t){case"focusin":return ra=Gs(ra,e,t,n,l,c),!0;case"dragenter":return oa=Gs(oa,e,t,n,l,c),!0;case"mouseover":return ca=Gs(ca,e,t,n,l,c),!0;case"pointerover":var f=c.pointerId;return Ks.set(f,Gs(Ks.get(f)||null,e,t,n,l,c)),!0;case"gotpointercapture":return f=c.pointerId,Ys.set(f,Gs(Ys.get(f)||null,e,t,n,l,c)),!0}return!1}function Rp(e){var t=Ia(e.target);if(t!==null){var n=d(t);if(n!==null){if(t=n.tag,t===13){if(t=h(n),t!==null){e.blockedOn=t,Zd(e.priority,function(){zp(n)});return}}else if(t===31){if(t=m(n),t!==null){e.blockedOn=t,Zd(e.priority,function(){zp(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 jr(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);To=l,n.target.dispatchEvent(l),To=null}else return t=Ja(n),t!==null&&_p(t),e.blockedOn=n,!1;t.shift()}return!0}function Lp(e,t,n){jr(e)&&n.delete(t)}function sx(){Ou=!1,ra!==null&&jr(ra)&&(ra=null),oa!==null&&jr(oa)&&(oa=null),ca!==null&&jr(ca)&&(ca=null),Ks.forEach(Lp),Ys.forEach(Lp)}function Nr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ou||(Ou=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,sx)))}var Cr=null;function Up(e){Cr!==e&&(Cr=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){Cr===e&&(Cr=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(Tu(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 _i(e){function t(C){return Nr(C,e)}ra!==null&&Nr(ra,e),oa!==null&&Nr(oa,e),ca!==null&&Nr(ca,e),Ks.forEach(t),Ys.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(Tu(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 _u(e){this._internalRoot=e}kr.prototype.render=_u.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)},kr.prototype.unmount=_u.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),lr(),t[Za]=null}};function kr(e){this._internalRoot=e}kr.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 lx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Er=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Er.isDisabled&&Er.supportsFiber)try{Wi=Er.inject(lx),Ct=Er}catch{}}return Qs.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=Ep(e,1,!1,null,null,n,l,null,c,f,p,Bp),e[Za]=t.current,fu(e),new _u(t)},Qs.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=Ep(e,1,!0,t,n??null,l,c,C,f,p,v,Bp),t.context=Ap(null),n=t.current,l=Dt(),l=So(l),c=In(l),c.callback=null,Jn(n,c,l),n=l,t.current.lanes=n,ts(t,n),hn(t),e[Za]=t.current,fu(e),new kr(t)},Qs.version="19.2.4",Qs}var Ip;function yx(){if(Ip)return Mu.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(),Mu.exports=gx(),Mu.exports}var vx=yx();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,to=a=>!!a&&typeof a=="object"&&a[Jt]===ed,il=a=>!!a&&typeof a=="object"&&a[Jt]===ga,Fe=a=>!!a&&typeof a=="object"&&a[Jt]===Hg,Be=a=>!!a&&typeof a=="object"&&a[Jt]===pn,sl=a=>!!a&&typeof a=="object"&&a[Jt]===Xi;function Ze(a){if(a&&typeof a=="object")switch(a[Jt]){case ga:case Xi:return!0}return!1}function Je(a){if(a&&typeof a=="object")switch(a[Jt]){case hd:case ga:case pn:case Xi:return!0}return!1}const qg=a=>(Be(a)||Ze(a))&&!!a.anchor,Ba=Symbol("break visit"),bx=Symbol("skip children"),Fs=Symbol("remove node");function Zi(a,i){const s=xx(i);to(a)?Ui(null,a.contents,s,Object.freeze([a]))===Fs&&(a.contents=null):Ui(null,a,s,Object.freeze([]))}Zi.BREAK=Ba;Zi.SKIP=bx;Zi.REMOVE=Fs;function Ui(a,i,s,r){const o=Sx(a,i,s,r);if(Je(o)||Fe(o))return wx(a,r,o),Ui(a,o,s,r);if(typeof o!="symbol"){if(Ze(i)){r=Object.freeze(r.concat(i));for(let d=0;d<i.items.length;++d){const h=Ui(d,i.items[d],s,r);if(typeof h=="number")d=h-1;else{if(h===Ba)return Ba;h===Fs&&(i.items.splice(d,1),d-=1)}}}else if(Fe(i)){r=Object.freeze(r.concat(i));const d=Ui("key",i.key,s,r);if(d===Ba)return Ba;d===Fs&&(i.key=null);const h=Ui("value",i.value,s,r);if(h===Ba)return Ba;h===Fs&&(i.value=null)}}return o}function xx(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 Sx(a,i,s,r){if(typeof s=="function")return s(a,i,r);if(il(i))return s.Map?.(a,i,r);if(sl(i))return s.Seq?.(a,i,r);if(Fe(i))return s.Pair?.(a,i,r);if(Be(i))return s.Scalar?.(a,i,r);if(Ya(i))return s.Alias?.(a,i,r)}function wx(a,i,s){const r=i[i.length-1];if(Ze(r))r.items[a]=s;else if(Fe(r))a==="key"?r.key=s:r.value=s;else if(to(r))r.contents=s;else{const o=Ya(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}}const jx={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Nx=a=>a.replace(/[!,[\]{}]/g,i=>jx[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[d,h]=r;return this.tags[d]=h,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return s(0,"%YAML directive should contain exactly one part"),!1;const[d]=r;if(d==="1.1"||d==="1.2")return this.yaml.version=d,!0;{const h=/^\d+\.\d+$/.test(d);return s(6,`Unsupported YAML version ${d}`,h),!1}}default:return s(0,`Unknown directive ${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 d=this.tags[r];if(d)try{return d+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+Nx(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&&Je(i.contents)){const d={};Zi(i.contents,(h,m)=>{Je(m)&&m.tag&&(d[m.tag]=!0)}),o=Object.keys(d)}else o=[];for(const[d,h]of r)d==="!!"&&h==="tag:yaml.org,2002:"||(!i||o.some(m=>m.startsWith(h)))&&s.push(`%TAG ${d} ${h}`);return s.join(`
|
|
10
|
+
`)}}pt.defaultYaml={explicit:!1,version:"1.2"};pt.defaultTags={"!!":"tag:yaml.org,2002:"};function $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 Cx(a,i){const s=[],r=new Map;let o=null;return{onAnchor:d=>{s.push(d),o??(o=Kg(a));const h=Yg(i,o);return o.add(h),h},setAnchors:()=>{for(const d of s){const h=r.get(d);if(typeof h=="object"&&h.anchor&&(Be(h.node)||Ze(h.node)))h.node.anchor=h.anchor;else{const m=new Error("Failed to resolve repeated object (this should not happen)");throw m.source=d,m}}},sourceObjects:r}}function Bi(a,i,s,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let o=0,d=r.length;o<d;++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 d=r.get(o),h=Bi(a,r,o,d);h===void 0?r.delete(o):h!==d&&r.set(o,h)}else if(r instanceof Set)for(const o of Array.from(r)){const d=Bi(a,r,o,o);d===void 0?r.delete(o):d!==o&&(r.delete(o),r.add(d))}else for(const[o,d]of Object.entries(r)){const h=Bi(a,r,o,d);h===void 0?delete r[o]:h!==d&&(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=d=>{r.res=d,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:d}={}){if(!to(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 d=="function"?Bi(d,{"":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:(d,h)=>{(Ya(h)||qg(h))&&r.push(h)}}),s&&(s.aliasResolveCache=r));let o;for(const d of r){if(d===this)break;d.anchor===this.source&&(o=d)}return o}toJSON(i,s){if(!s)return{source:this.source};const{anchors:r,doc:o,maxAliasCount:d}=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(d>=0&&(m.count+=1,m.aliasCount===0&&(m.aliasCount=Kr(o,h,r)),m.count*m.aliasCount>d)){const y="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(y)}return m.res}toString(i,s,r){const o=`*${this.source}`;if(i){if($g(this.source),i.options.verifyAliasOrder&&!i.anchors.has(this.source)){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(d)}if(i.implicitKey)return`${o} `}return o}}function Kr(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 d=Kr(a,o,s);d>r&&(r=d)}return r}else if(Fe(i)){const r=Kr(a,i.key,s),o=Kr(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 kx="tag:yaml.org,2002:";function Ex(a,i,s){if(i){const r=s.filter(d=>d.tag===i),o=r.find(d=>!d.format)??r[0];if(!o)throw new Error(`Tag ${i} not found`);return o}return s.find(r=>r.identify?.(a)&&!r.format)}function Ws(a,i,s){if(to(a)&&(a=a.contents),Je(a))return a;if(Fe(a)){const b=s.schema[ga].createNode?.(s.schema,null,s);return b.items.push(a),b}(a instanceof String||a instanceof Number||a instanceof Boolean||typeof BigInt<"u"&&a instanceof BigInt)&&(a=a.valueOf());const{aliasDuplicateObjects:r,onAnchor:o,onTagObj:d,schema:h,sourceObjects:m}=s;let y;if(r&&a&&typeof a=="object"){if(y=m.get(a),y)return y.anchor??(y.anchor=o(a)),new pd(y.anchor);y={anchor:null,node:null},m.set(a,y)}i?.startsWith("!!")&&(i=kx+i.slice(2));let g=Ex(a,i,h.tags);if(!g){if(a&&typeof a.toJSON=="function"&&(a=a.toJSON()),!a||typeof a!="object"){const b=new be(a);return y&&(y.node=b),b}g=a instanceof Map?h[ga]:Symbol.iterator in Object(a)?h[Xi]:h[ga]}d&&(d(g),delete s.onTagObj);const x=g?.createNode?g.createNode(s.schema,a,s):typeof g?.nodeClass?.from=="function"?g.nodeClass.from(s.schema,a,s):new be(a);return i?x.tag=i:g.default||(x.tag=g.tag),y&&(y.node=x),x}function Xr(a,i,s){let r=s;for(let o=i.length-1;o>=0;--o){const d=i[o];if(typeof d=="number"&&Number.isInteger(d)&&d>=0){const h=[];h[d]=r,r=h}else r=new Map([[d,r]])}return Ws(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:a,sourceObjects:new Map})}const Js=a=>a==null||typeof a=="object"&&!!a[Symbol.iterator]().next().done;class 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=>Je(r)||Fe(r)?r.clone(i):r),this.range&&(s.range=this.range.slice()),s}addIn(i,s){if(Js(i))this.add(s);else{const[r,...o]=i,d=this.get(r,!0);if(Ze(d))d.addIn(o,s);else if(d===void 0&&this.schema)this.set(r,Xr(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,d=this.get(r,!0);return o.length===0?!s&&Be(d)?d.value:d:Ze(d)?d.getIn(o,s):void 0}hasAllNullValues(i){return this.items.every(s=>{if(!Fe(s))return!1;const r=s.value;return r==null||i&&Be(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(i){const[s,...r]=i;if(r.length===0)return this.has(s);const 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 d=this.get(r,!0);if(Ze(d))d.setIn(o,s);else if(d===void 0&&this.schema)this.set(r,Xr(this.schema,o,s));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${o}`)}}}const Ax=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",Yr="quoted";function no(a,i,s="flow",{indentAtStart:r,lineWidth:o=80,minContentWidth:d=20,onFold:h,onOverflow:m}={}){if(!o||o<0)return a;o<d&&(d=0);const y=Math.max(1+d,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,d)?g.push(0):b=o-r);let S,E,O=!1,w=-1,N=-1,k=-1;s===td&&(w=Jp(a,w,i.length),w!==-1&&(b=w+y));for(let z;z=a[w+=1];){if(s===Yr&&z==="\\"){switch(N=w,a[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}k=w}if(z===`
|
|
14
|
+
`)s===td&&(w=Jp(a,w,i.length)),b=w+i.length+y,S=void 0;else{if(z===" "&&E&&E!==" "&&E!==`
|
|
15
|
+
`&&E!==" "){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===Yr){for(;E===" "||E===" ";)E=z,z=a[w+=1],O=!0;const M=w>k+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}E=z}if(O&&m&&m(),g.length===0)return a;h&&h();let $=a.slice(0,g[0]);for(let z=0;z<g.length;++z){const M=g[z],L=g[z+1]||a.length;M===0?$=`
|
|
17
|
+
${i}${a.slice(0,L)}`:(s===Yr&&x[M]&&($+=`${a[M]}\\`),$+=`
|
|
18
|
+
${i}${a.slice(M+1,L)}`)}return $}function Jp(a,i,s){let r=i,o=i+1,d=a[o];for(;d===" "||d===" ";)if(i<o+s)d=a[++i];else{do d=a[++i];while(d&&d!==`
|
|
19
|
+
`);r=i,o=i+1,d=a[o]}return r}const ao=(a,i)=>({indentAtStart:i?a.indent.length:a.indentAtStart,lineWidth:a.options.lineWidth,minContentWidth:a.options.minContentWidth}),io=a=>/^(%|---|\.\.\.)/m.test(a);function Tx(a,i,s){if(!i||i<0)return!1;const r=i-s,o=a.length;if(o<=r)return!1;for(let d=0,h=0;d<o;++d)if(a[d]===`
|
|
20
|
+
`){if(d-h>r)return!0;if(h=d+1,o-h<=r)return!1}return!0}function Ps(a,i){const s=JSON.stringify(a);if(i.options.doubleQuotedAsJSON)return s;const{implicitKey:r}=i,o=i.options.doubleQuotedMinMultiLineLength,d=i.indent||(io(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+=d,s[y+2]===" "&&(h+="\\"),y+=1,m=y+1}break;default:y+=1}return h=m?h+s.slice(m):s,r?h:no(h,d,Yr,ao(i,!1))}function nd(a,i){if(i.options.singleQuote===!1||i.implicitKey&&a.includes(`
|
|
24
|
+
`)||/[ \t]\n|\n[ \t]/.test(a))return Ps(a,i);const s=i.indent||(io(a)?" ":""),r="'"+a.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
25
|
+
${s}`)+"'";return i.implicitKey?r:no(r,s,Qg,ao(i,!1))}function Hi(a,i){const{singleQuote:s}=i.options;let r;if(s===!1)r=Ps;else{const o=a.includes('"'),d=a.includes("'");o&&!d?r=nd:d&&!o?r=Ps:r=s?nd:Ps}return r(a,i)}let ad;try{ad=new RegExp(`(^|(?<!
|
|
26
|
+
))
|
|
27
|
+
+(?!
|
|
28
|
+
|$)`,"g")}catch{ad=/\n+(?!\n|$)/g}function Gr({comment:a,type:i,value:s},r,o,d){const{blockQuote:h,commentString:m,lineWidth:y}=r.options;if(!h||/\n[\t ]+$/.test(s))return Hi(s,r);const g=r.indent||(r.forceBlockIndent||io(s)?" ":""),x=h==="literal"?!0:h==="folded"||i===be.BLOCK_FOLDED?!1:i===be.BLOCK_LITERAL?!0:!Tx(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 E=s.substring(S);const O=E.indexOf(`
|
|
32
|
+
`);O===-1?b="-":s===E||O!==E.length-1?(b="+",d&&d()):b="",E&&(s=s.slice(0,-E.length),E[E.length-1]===`
|
|
33
|
+
`&&(E=E.slice(0,-1)),E=E.replace(ad,`$&${g}`));let w=!1,N,k=-1;for(N=0;N<s.length;++N){const L=s[N];if(L===" ")w=!0;else if(L===`
|
|
34
|
+
`)k=N;else break}let $=s.substring(0,k<N?k+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=ao(r,!0);h!=="folded"&&i!==be.BLOCK_FOLDED&&(X.onOverflow=()=>{G=!0});const D=no(`${$}${L}${E}`,g,td,X);if(!G)return`>${M}
|
|
36
|
+
${g}${D}`}return s=s.replace(/\n+/g,`$&${g}`),`|${M}
|
|
37
|
+
${g}${$}${s}${E}`}function Ox(a,i,s,r){const{type:o,value:d}=a,{actualString:h,implicitKey:m,indent:y,indentStep:g,inFlow:x}=i;if(m&&d.includes(`
|
|
38
|
+
`)||x&&/[[\]{},]/.test(d))return Hi(d,i);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(d))return m||x||!d.includes(`
|
|
39
|
+
`)?Hi(d,i):Gr(a,i,s,r);if(!m&&!x&&o!==be.PLAIN&&d.includes(`
|
|
40
|
+
`))return Gr(a,i,s,r);if(io(d)){if(y==="")return i.forceBlockIndent=!0,Gr(a,i,s,r);if(m&&y===g)return Hi(d,i)}const b=d.replace(/\n+/g,`$&
|
|
41
|
+
${y}`);if(h){const S=w=>w.default&&w.tag!=="tag:yaml.org,2002:str"&&w.test?.test(b),{compat:E,tags:O}=i.doc.schema;if(O.some(S)||E?.some(S))return Hi(d,i)}return m?b:no(b,y,Qg,ao(i,!1))}function gd(a,i,s,r){const{implicitKey:o,inFlow:d}=i,h=typeof a.value=="string"?a:Object.assign({},a,{value:String(a.value)});let{type:m}=a;m!==be.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(h.value)&&(m=be.QUOTE_DOUBLE);const y=x=>{switch(x){case be.BLOCK_FOLDED:case be.BLOCK_LITERAL:return o||d?Hi(h.value,i):Gr(h,i,s,r);case be.QUOTE_DOUBLE:return Ps(h.value,i);case be.QUOTE_SINGLE:return nd(h.value,i);case be.PLAIN:return Ox(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:Ax,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 _x(a,i){if(i.tag){const o=a.filter(d=>d.tag===i.tag);if(o.length>0)return o.find(d=>d.format===i.format)??o[0]}let s,r;if(Be(i)){r=i.value;let o=a.filter(d=>d.identify?.(r));if(o.length>1){const d=o.filter(h=>h.test);d.length>0&&(o=d)}s=o.find(d=>d.format===i.format)??o.find(d=>!d.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 zx(a,i,{anchors:s,doc:r}){if(!r.directives)return"";const o=[],d=(Be(a)||Ze(a))&&a.anchor;d&&$g(d)&&(s.add(d),o.push(`&${d}`));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(Fe(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 d=Je(a)?a:i.doc.createNode(a,{onTagObj:y=>o=y});o??(o=_x(i.doc.schema.tags,d));const h=zx(d,o,i);h.length>0&&(i.indentAtStart=(i.indentAtStart??0)+h.length+1);const m=typeof o.stringify=="function"?o.stringify(d,i,s,r):Be(d)?gd(d,i,s,r):d.toString(i,s,r);return h?Be(d)||m[0]==="{"||m[0]==="["?`${h} ${m}`:`${h}
|
|
42
|
+
${i.indent}${m}`:m}function Dx({key:a,value:i},s,r,o){const{allNullValues:d,doc:h,indent:m,indentStep:y,options:{commentString:g,indentSeq:x,simpleKeys:b}}=s;let S=Je(a)&&a.comment||null;if(b){if(S)throw new Error("With simple keys, key nodes cannot have comments");if(Ze(a)||!Je(a)&&typeof a=="object"){const X="With simple keys, collection cannot be used as a key value";throw new Error(X)}}let E=!b&&(!a||S&&i==null&&!s.inFlow||Ze(a)||(Be(a)?a.type===be.BLOCK_FOLDED||a.type===be.BLOCK_LITERAL:typeof a=="object"));s=Object.assign({},s,{allNullValues:!1,implicitKey:!E&&(b||!d),indent:m+y});let O=!1,w=!1,N=Vi(a,s,()=>O=!0,()=>w=!0);if(!E&&!s.inFlow&&N.length>1024){if(b)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");E=!0}if(s.inFlow){if(d||i==null)return O&&r&&r(),N===""?"?":E?`? ${N}`:N}else if(d&&!b||i==null&&E)return N=`? ${N}`,S&&!O?N+=Ha(N,s.indent,g(S)):w&&o&&o(),N;O&&(S=null),E?(S&&(N+=Ha(N,s.indent,g(S))),N=`? ${N}
|
|
43
|
+
${m}:`):(N=`${N}:`,S&&(N+=Ha(N,s.indent,g(S))));let k,$,z;Je(i)?(k=!!i.spaceBefore,$=i.commentBefore,z=i.comment):(k=!1,$=null,z=null,i&&typeof i=="object"&&(i=h.createNode(i))),s.implicitKey=!1,!E&&!S&&Be(i)&&(s.indentAtStart=N.length+1),w=!1,!x&&y.length>=2&&!s.inFlow&&!E&&sl(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||k||$){if(G=k?`
|
|
44
|
+
`:"",$){const X=g($);G+=`
|
|
45
|
+
${Bn(X,s.indent)}`}L===""&&!s.inFlow?G===`
|
|
46
|
+
`&&z&&(G=`
|
|
47
|
+
|
|
48
|
+
`):G+=`
|
|
49
|
+
${s.indent}`}else if(!E&&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():z&&!M?N+=Ha(N,s.indent,g(z)):w&&o&&o(),N}function Mx(a,i){(a==="debug"||a==="warn")&&console.warn(i)}const Ar="<<",Hn={identify:a=>a===Ar||typeof a=="symbol"&&a.description===Ar,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new be(Symbol(Ar)),{addToJSMap:Zg}),stringify:()=>Ar},Rx=(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,sl(s))for(const r of s.items)Bu(a,i,r);else if(Array.isArray(s))for(const r of s)Bu(a,i,r);else Bu(a,i,s)}function Bu(a,i,s){const r=a&&Ya(s)?s.resolve(a.doc):s;if(!il(r))throw new Error("Merge sources must be maps or map aliases");const o=r.toJSON(null,a,Map);for(const[d,h]of o)i instanceof Map?i.has(d)||i.set(d,h):i instanceof Set?i.add(d):Object.prototype.hasOwnProperty.call(i,d)||Object.defineProperty(i,d,{value:h,writable:!0,enumerable:!0,configurable:!0});return i}function Ig(a,i,{key:s,value:r}){if(Je(s)&&s.addToJSMap)s.addToJSMap(a,i,r);else if(Rx(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 d=Lx(s,o,a),h=It(r,d,a);d in i?Object.defineProperty(i,d,{value:h,writable:!0,enumerable:!0,configurable:!0}):i[d]=h}}return i}function Lx(a,i,s){if(i===null)return"";if(typeof i!="object")return String(i);if(Je(a)&&s?.doc){const r=Xg(s.doc,{});r.anchors=new Set;for(const d of s.anchors.keys())r.anchors.add(d.anchor);r.inFlow=!0,r.inStringifyKey=!0;const o=a.toString(r);if(!s.mapKeyWarned){let d=JSON.stringify(o);d.length>40&&(d=d.substring(0,36)+'..."'),Mx(s.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${d}. Set mapAsMap: true to use object keys.`),s.mapKeyWarned=!0}return o}return JSON.stringify(i)}function yd(a,i,s){const r=Ws(a,void 0,s),o=Ws(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 Je(s)&&(s=s.clone(i)),Je(r)&&(r=r.clone(i)),new gt(s,r)}toJSON(i,s){const r=s?.mapAsMap?new Map:{};return Ig(s,r,this)}toString(i,s,r){return i?.doc?Dx(this,i,s,r):JSON.stringify(this)}}function Jg(a,i,s){return(i.inFlow??a.flow?Bx:Ux)(a,i,s)}function Ux({comment:a,items:i},s,{blockItemPrefix:r,flowChars:o,itemIndent:d,onChompKeep:h,onComment:m}){const{indent:y,options:{commentString:g}}=s,x=Object.assign({},s,{indent:d,type:null});let b=!1;const S=[];for(let O=0;O<i.length;++O){const w=i[O];let N=null;if(Je(w))!b&&w.spaceBefore&&S.push(""),Zr(s,S,w.commentBefore,b),w.comment&&(N=w.comment);else if(Fe(w)){const $=Je(w.key)?w.key:null;$&&(!b&&$.spaceBefore&&S.push(""),Zr(s,S,$.commentBefore,b))}b=!1;let k=Vi(w,x,()=>N=null,()=>b=!0);N&&(k+=Ha(k,d,g(N))),b&&N&&(b=!1),S.push(r+k)}let E;if(S.length===0)E=o.start+o.end;else{E=S[0];for(let O=1;O<S.length;++O){const w=S[O];E+=w?`
|
|
53
|
+
${y}${w}`:`
|
|
54
|
+
`}}return a?(E+=`
|
|
55
|
+
`+Bn(g(a),y),m&&m()):b&&h&&h(),E}function Bx({items:a},i,{flowChars:s,itemIndent:r}){const{indent:o,indentStep:d,flowCollectionPadding:h,options:{commentString:m}}=i;r+=d;const y=Object.assign({},i,{indent:r,inFlow:!0,type:null});let g=!1,x=0;const b=[];for(let O=0;O<a.length;++O){const w=a[O];let N=null;if(Je(w))w.spaceBefore&&b.push(""),Zr(i,b,w.commentBefore,!1),w.comment&&(N=w.comment);else if(Fe(w)){const $=Je(w.key)?w.key:null;$&&($.spaceBefore&&b.push(""),Zr(i,b,$.commentBefore,!1),$.comment&&(g=!0));const z=Je(w.value)?w.value:null;z?(z.comment&&(N=z.comment),z.commentBefore&&(g=!0)):w.value==null&&$?.comment&&(N=$.comment)}N&&(g=!0);let k=Vi(w,y,()=>N=null);O<a.length-1&&(k+=","),N&&(k+=Ha(k,r,m(N))),!g&&(b.length>x||k.includes(`
|
|
56
|
+
`))&&(g=!0),b.push(k),x=b.length}const{start:S,end:E}=s;if(b.length===0)return S+E;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
|
+
${d}${o}${w}`:`
|
|
58
|
+
`;return`${O}
|
|
59
|
+
${o}${E}`}else return`${S}${h}${b.join(" ")}${h}${E}`}function Zr({indent:a,options:{commentString:i}},s,r,o){if(r&&o&&(r=r.replace(/^\n+/,"")),r){const d=Bn(i(r),a);s.push(d.trimStart())}}function qa(a,i){const s=Be(i)?i.value:i;for(const r of a)if(Fe(r)&&(r.key===i||r.key===s||Be(r.key)&&r.key.value===s))return r}class Zt extends 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:d}=r,h=new this(i),m=(y,g)=>{if(typeof d=="function")g=d.call(s,y,g);else if(Array.isArray(d)&&!d.includes(y))return;(g!==void 0||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;Fe(i)?r=i:!i||typeof i!="object"||!("key"in i)?r=new gt(i,i?.value):r=new gt(i.key,i.value);const o=qa(this.items,r.key),d=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(d){const h=this.items.findIndex(m=>d(r,m)<0);h===-1?this.items.push(r):this.items.splice(h,0,r)}else this.items.push(r)}delete(i){const s=qa(this.items,i);return s?this.items.splice(this.items.indexOf(s),1).length>0:!1}get(i,s){const 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 d of this.items)Ig(s,o,d);return o}toString(i,s,r){if(!i)return JSON.stringify(this);for(const o of this.items)if(!Fe(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 il(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=Tr(i);return typeof s!="number"?!1:this.items.splice(s,1).length>0}get(i,s){const r=Tr(i);if(typeof r!="number")return;const o=this.items[r];return!s&&Be(o)?o.value:o}has(i){const s=Tr(i);return typeof s=="number"&&s<this.items.length}set(i,s){const r=Tr(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 d of this.items)r.push(It(d,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,d=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)}d.items.push(Ws(m,void 0,r))}}return d}}function Tr(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 sl(a)||i("Expected a sequence for this tag"),a},createNode:(a,i,s)=>$a.from(a,i,s)},so={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)}},lo={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"&&lo.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 d=Object.is(r,-0)?"-0":JSON.stringify(r);if(!a&&i&&(!s||s==="tag:yaml.org,2002:float")&&/^\d/.test(d)){let h=d.indexOf(".");h<0&&(h=d.length,d+=".");let m=i-(d.length-h-1);for(;m-- >0;)d+="0"}return d}const 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},ro=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 ro(r)&&r>=0?s+r.toString(i):rn(a)}const ty={identify:a=>ro(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:ro,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=>ro(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")},Hx=[Ii,Ji,so,lo,vd,ty,ny,ay,Fg,Pg,Wg];function Fp(a){return typeof a=="bigint"||Number.isInteger(a)}const Or=({value:a})=>JSON.stringify(a),qx=[{identify:a=>typeof a=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:a=>a,stringify:Or},{identify:a=>a==null,createNode:()=>new be(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Or},{identify:a=>typeof a=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:a=>a==="true",stringify:Or},{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:Or}],$x={default:!0,tag:"",test:/^/,resolve(a,i){return i(`Unresolved plain scalar ${JSON.stringify(a)}`),a}},Kx=[Ii,Ji].concat(qx,$x),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,d){if(!s)return"";const h=s;let m;if(typeof btoa=="function"){let y="";for(let g=0;g<h.length;++g)y+=String.fromCharCode(h[g]);m=btoa(y)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(i??(i=be.BLOCK_LITERAL),i!==be.QUOTE_DOUBLE){const y=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),g=Math.ceil(m.length/y),x=new Array(g);for(let b=0,S=0;b<g;++b,S+=y)x[b]=m.substr(S,y);m=x.join(i===be.BLOCK_LITERAL?`
|
|
60
|
+
`:" ")}return gd({comment:a,type:i,value:m},r,o,d)}};function iy(a,i){if(sl(a))for(let s=0;s<a.items.length;++s){let r=a.items[s];if(!Fe(r)){if(il(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 d=o.value??o.key;d.comment=d.comment?`${r.comment}
|
|
62
|
+
${d.comment}`:r.comment}r=o}a.items[s]=Fe(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 d=0;if(i&&Symbol.iterator in Object(i))for(let h of i){typeof r=="function"&&(h=r.call(i,String(d++),h));let m,y;if(Array.isArray(h))if(h.length===2)m=h[0],y=h[1];else throw new TypeError(`Expected [key, value] tuple: ${h}`);else if(h&&h instanceof Object){const g=Object.keys(h);if(g.length===1)m=g[0],y=h[m];else throw new TypeError(`Expected tuple with one key, not ${g.length} keys`)}else m=h;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 d,h;if(Fe(o)?(d=It(o.key,"",s),h=It(o.value,d,s)):d=It(o,"",s),r.has(d))throw new Error("Ordered maps must not include duplicate keys");r.set(d,h)}return r}static from(i,s,r){const o=sy(i,s,r),d=new this;return d.items=o.items,d}}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},Yx={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},Gx={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)}},Vx={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},ll=a=>typeof a=="bigint"||Number.isInteger(a);function oo(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 d=parseInt(a,s);return o==="-"?-1*d:d}function jd(a,i,s){const{value:r}=a;if(ll(r)){const o=r.toString(i);return r<0?"-"+s+o.substr(1):s+o}return rn(a)}const Qx={identify:ll,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(a,i,s)=>oo(a,2,2,s),stringify:a=>jd(a,2,"0b")},Xx={identify:ll,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(a,i,s)=>oo(a,1,8,s),stringify:a=>jd(a,8,"0")},Zx={identify:ll,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(a,i,s)=>oo(a,0,10,s),stringify:rn},Ix={identify:ll,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(a,i,s)=>oo(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;Fe(i)?s=i:i&&typeof i=="object"&&"key"in i&&"value"in i&&i.value===null?s=new gt(i.key,null):s=new gt(i,null),qa(this.items,s.key)||this.items.push(s)}get(i,s){const r=qa(this.items,i);return!s&&Fe(r)?Be(r.key)?r.key.value:r.key:r}set(i,s){if(typeof s!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof s}`);const r=qa(this.items,i);r&&!s?this.items.splice(this.items.indexOf(r),1):!r&&s&&this.items.push(new gt(i))}toJSON(i,s){return super.toJSON(i,s,Set)}toString(i,s,r){if(!i)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},i,{allNullValues:!0}),s,r);throw new Error("Set items must all have null values")}static from(i,s,r){const{replacer:o}=r,d=new this(i);if(s&&Symbol.iterator in Object(s))for(let h of s)typeof o=="function"&&(h=o.call(s,h,h)),d.items.push(yd(h,null,r));return d}}$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(il(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),d=r.replace(/_/g,"").split(":").reduce((h,m)=>h*o(60)+o(m),o(0));return s==="-"?o(-1)*d:d}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),d=[i%o];return i<60?d.unshift(0):(i=(i-d[0])/o,d.unshift(i%o),i>=60&&(i=(i-d[0])/o,d.unshift(i))),r+d.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},co={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(co.test);if(!i)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,s,r,o,d,h,m]=i.map(Number),y=i[7]?Number((i[7]+"00").substr(1,3)):0;let g=Date.UTC(s,r-1,o,d||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,so,lo,ry,oy,Qx,Xx,Zx,Ix,Yx,Gx,Vx,xd,Hn,wd,Sd,Nd,uy,dy,co],Wp=new Map([["core",Hx],["failsafe",[Ii,Ji,so]],["json",Kx],["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:lo,omap:wd,pairs:Sd,seq:Ji,set:Nd,timestamp:co},Jx={"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":co};function Hu(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 d=Array.from(Wp.keys()).filter(h=>h!=="yaml11").map(h=>JSON.stringify(h)).join(", ");throw new Error(`Unknown schema "${i}"; use one of ${d} or define customTags array`)}if(Array.isArray(a))for(const d of a)o=o.concat(d);else typeof a=="function"&&(o=a(o.slice()));return s&&(o=o.concat(Hn)),o.reduce((d,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 d.includes(m)||d.push(m),d},[])}const Fx=(a,i)=>a.key<i.key?-1:a.key>i.key?1:0;class kd{constructor({compat:i,customTags:s,merge:r,resolveKnownTags:o,schema:d,sortMapEntries:h,toStringDefaults:m}){this.compat=Array.isArray(i)?Hu(i,"compat"):i?Hu(null,i):null,this.name=typeof d=="string"&&d||"core",this.knownTags=o?Jx:{},this.tags=Hu(s,this.name,r),this.toStringOptions=m??null,Object.defineProperty(this,ga,{value:Ii}),Object.defineProperty(this,pn,{value:so}),Object.defineProperty(this,Xi,{value:Ji}),this.sortMapEntries=typeof h=="function"?h:h===!0?Fx:null}clone(){const i=Object.create(kd.prototype,Object.getOwnPropertyDescriptors(this));return i.tags=this.tags.slice(),i}}function Px(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:d}=o.options;if(a.commentBefore){s.length!==1&&s.unshift("");const y=d(a.commentBefore);s.unshift(Bn(y,""))}let h=!1,m=null;if(a.contents){if(Je(a.contents)){if(a.contents.spaceBefore&&r&&s.push(""),a.contents.commentBefore){const x=d(a.contents.commentBefore);s.push(Bn(x,""))}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,"",d(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=d(a.comment);y.includes(`
|
|
63
|
+
`)?(s.push("..."),s.push(Bn(y,""))):s.push(`... ${y}`)}else s.push("...");else{let y=a.comment;y&&h&&(y=y.replace(/^\n+/,"")),y&&((!h||m)&&s[s.length-1]!==""&&s.push(""),s.push(Bn(d(y),"")))}return s.join(`
|
|
64
|
+
`)+`
|
|
65
|
+
`}class uo{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 d=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=d;let{version:h}=d;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(h=this.directives.yaml.version)):this.directives=new pt({version:h}),this.setSchema(h,r),this.contents=i===void 0?null:this.createNode(i,o,r)}clone(){const i=Object.create(uo.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=Je(this.contents)?this.contents.clone(i.schema):this.contents,this.range&&(i.range=this.range.slice()),i}add(i){zi(this.contents)&&this.contents.add(i)}addIn(i,s){zi(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,k=s.filter(N).map(String);k.length>0&&(s=s.concat(k)),o=s}else r===void 0&&s&&(r=s,s=void 0);const{aliasDuplicateObjects:d,anchorPrefix:h,flow:m,keepUndefined:y,onTagObj:g,tag:x}=r??{},{onAnchor:b,setAnchors:S,sourceObjects:E}=Cx(this,h||"a"),O={aliasDuplicateObjects:d??!0,keepUndefined:y??!1,onAnchor:b,onTagObj:g,replacer:o,schema:this.schema,sourceObjects:E},w=Ws(i,x,O);return m&&Ze(w)&&(w.flow=!0),S(),w}createPair(i,s,r={}){const o=this.createNode(i,null,r),d=this.createNode(s,null,r);return new gt(o,d)}delete(i){return zi(this.contents)?this.contents.delete(i):!1}deleteIn(i){return Js(i)?this.contents==null?!1:(this.contents=null,!0):zi(this.contents)?this.contents.deleteIn(i):!1}get(i,s){return Ze(this.contents)?this.contents.get(i,s):void 0}getIn(i,s){return Js(i)?!s&&Be(this.contents)?this.contents.value:this.contents:Ze(this.contents)?this.contents.getIn(i,s):void 0}has(i){return Ze(this.contents)?this.contents.has(i):!1}hasIn(i){return Js(i)?this.contents!==void 0:Ze(this.contents)?this.contents.hasIn(i):!1}set(i,s){this.contents==null?this.contents=Xr(this.schema,[i],s):zi(this.contents)&&this.contents.set(i,s)}setIn(i,s){Js(i)?this.contents=s:this.contents==null?this.contents=Xr(this.schema,Array.from(i),s):zi(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 kd(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:d,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 d=="function")for(const{count:g,res:x}of m.anchors.values())d(x,g);return typeof h=="function"?Bi(h,{"":y},"",y):y}toJSON(i,s){return this.toJS({json:!0,jsonArg:i,mapAsMap:!1,onAnchor:s})}toString(i={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in i&&(!Number.isInteger(i.indent)||Number(i.indent)<=0)){const s=JSON.stringify(i.indent);throw new Error(`"indent" option must be a positive integer, not ${s}`)}return Px(this,i)}}function zi(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 _r extends fy{constructor(i,s,r){super("YAMLParseError",i,s,r)}}class Wx 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 d=o-1,h=a.substring(i.lineStarts[r-1],i.lineStarts[r]).replace(/[\n\r]+$/,"");if(d>=60&&h.length>80){const m=Math.min(d-39,h.length-79);h="…"+h.substring(m),d-=m-1}if(h.length>80&&(h=h.substring(0,79)+"…"),r>1&&/^ *$/.test(h.substring(0,d))){let m=a.substring(i.lineStarts[r-2],i.lineStarts[r-1]);m.length>80&&(m=m.substring(0,79)+`…
|
|
66
|
+
`),h=m+h}if(/[^ ]/.test(h)){let m=1;const y=s.linePos[1];y?.line===r&&y.col>o&&(m=Math.max(1,Math.min(y.col-o,80-d)));const g=" ".repeat(d)+"^".repeat(m);s.message+=`:
|
|
67
|
+
|
|
68
|
+
${h}
|
|
69
|
+
${g}
|
|
70
|
+
`}};function Qi(a,{flow:i,indicator:s,next:r,offset:o,onError:d,parentIndent:h,startOnNewline:m}){let y=!1,g=m,x=m,b="",S="",E=!1,O=!1,w=null,N=null,k=null,$=null,z=null,M=null,L=null;for(const D of a)switch(O&&(D.type!=="space"&&D.type!=="newline"&&D.type!=="comma"&&d(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"&&d(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||d(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,E=!0,(N||k)&&($=D),x=!0;break;case"anchor":N&&d(D,"MULTIPLE_ANCHORS","A node can have at most one anchor"),D.source.endsWith(":")&&d(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":{k&&d(D,"MULTIPLE_TAGS","A node can have at most one tag"),k=D,L??(L=D.offset),g=!1,x=!1,O=!0;break}case s:(N||k)&&d(D,"BAD_PROP_ORDER",`Anchors and tags must be after the ${D.source} indicator`),M&&d(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){z&&d(D,"UNEXPECTED_TOKEN",`Unexpected , in ${i}`),z=D,g=!1,x=!1;break}default:d(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!=="")&&d(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w&&(g&&w.indent<=h||r?.type==="block-map"||r?.type==="block-seq")&&d(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:z,found:M,spaceBefore:y,comment:b,hasNewline:E,anchor:N,tag:k,newlineAfterProp:$,end:X,start:L??X}}function el(a){if(!a)return null;switch(a.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(a.source.includes(`
|
|
71
|
+
`))return!0;if(a.end){for(const i of a.end)if(i.type==="newline")return!0}return!1;case"flow-collection":for(const i of a.items){for(const s of i.start)if(s.type==="newline")return!0;if(i.sep){for(const s of i.sep)if(s.type==="newline")return!0}if(el(i.key)||el(i.value))return!0}return!1;default:return!0}}function id(a,i,s){if(i?.type==="flow-collection"){const r=i.end[0];r.indent===a&&(r.source==="]"||r.source==="}")&&el(i)&&s(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function hy(a,i,s){const{uniqueKeys:r}=a.options;if(r===!1)return!1;const o=typeof r=="function"?r:(d,h)=>d===h||Be(d)&&Be(h)&&d.value===h.value;return i.some(d=>o(d.key,s))}const ng="All mapping items must start at the same column";function eS({composeNode:a,composeEmptyNode:i},s,r,o,d){const h=d?.nodeClass??Zt,m=new h(s.schema);s.atRoot&&(s.atRoot=!1);let y=r.offset,g=null;for(const x of r.items){const{start:b,key:S,sep:E,value:O}=x,w=Qi(b,{indicator:"explicit-key-ind",next:S??E?.[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&&!E){g=w.end,w.comment&&(m.comment?m.comment+=`
|
|
72
|
+
`+w.comment:m.comment=w.comment);continue}(w.newlineAfterProp||el(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 k=w.end,$=S?a(s,S,w,o):i(s,k,b,null,w,o);s.schema.compat&&id(r.indent,S,o),s.atKey=!1,hy(s,m.items,$)&&o(k,"DUPLICATE_KEY","Map keys must be unique");const z=Qi(E??[],{indicator:"map-value-ind",next:O,offset:$.range[2],onError:o,parentIndent:r.indent,startOnNewline:!S||S.type==="block-scalar"});if(y=z.end,z.found){N&&(O?.type==="block-map"&&!z.hasNewline&&o(y,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),s.options.strict&&w.start<z.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,z,o):i(s,y,E,null,z,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"),z.comment&&($.comment?$.comment+=`
|
|
73
|
+
`+z.comment:$.comment=z.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 tS({composeNode:a,composeEmptyNode:i},s,r,o,d){const h=d?.nodeClass??$a,m=new h(s.schema);s.atRoot&&(s.atRoot=!1),s.atKey&&(s.atKey=!1);let y=r.offset,g=null;for(const{start:x,value:b}of r.items){const S=Qi(x,{indicator:"seq-item-ind",next:b,offset:y,onError: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 E=b?a(s,b,S,o):i(s,S.end,x,null,S,o);s.schema.compat&&id(r.indent,b,o),y=E.range[2],m.items.push(E)}return m.range=[r.offset,y,g??y],m}function rl(a,i,s,r){let o="";if(a){let d=!1,h="";for(const m of a){const{source:y,type:g}=m;switch(g){case"space":d=!0;break;case"comment":{s&&!d&&r(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const x=y.substring(1)||" ";o?o+=h+x:o=x,h="";break}case"newline":o&&(h+=y),d=!0;break;default:r(m,"UNEXPECTED_TOKEN",`Unexpected ${g} at node end`)}i+=y.length}}return{comment:o,offset:i}}const qu="Block collections are not allowed within flow collections",$u=a=>a&&(a.type==="block-map"||a.type==="block-seq");function nS({composeNode:a,composeEmptyNode:i},s,r,o,d){const h=r.start.source==="{",m=h?"flow map":"flow sequence",y=d?.nodeClass??(h?Zt:$a),g=new y(s.schema);g.flow=!0;const x=s.atRoot;x&&(s.atRoot=!1),s.atKey&&(s.atKey=!1);let b=r.offset+r.start.source.length;for(let N=0;N<r.items.length;++N){const k=r.items[N],{start:$,key:z,sep:M,value:L}=k,G=Qi($,{flow:m,indicator:"explicit-key-ind",next:z??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&&el(z)&&o(z,"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];Fe(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],$u(L)&&o(X.range,"BLOCK_IN_FLOW",qu)}else{s.atKey=!0;const X=G.end,D=z?a(s,z,G,o):i(s,X,$,null,G,o);$u(z)&&o(D.range,"BLOCK_IN_FLOW",qu),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?$u(L)&&o(Se.range,"BLOCK_IN_FLOW",qu):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=k),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?"}":"]",[E,...O]=r.end;let w=b;if(E?.source===S)w=E.offset+E.source.length;else{const N=m[0].toUpperCase()+m.substring(1),k=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",k),E&&E.source.length!==1&&O.unshift(E)}if(O.length>0){const N=rl(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 Ku(a,i,s,r,o,d){const h=s.type==="block-map"?eS(a,i,s,r,d):s.type==="block-seq"?tS(a,i,s,r,d):nS(a,i,s,r,d),m=h.constructor;return o==="!"||o===m.tagName?(h.tag=m.tagName,h):(o&&(h.tag=o),h)}function aS(a,i,s,r,o){const d=r.tag,h=d?i.directives.tagName(d.source,S=>o(d,"TAG_RESOLVE_FAILED",S)):null;if(s.type==="block-seq"){const{anchor:S,newlineAfterProp:E}=r,O=S&&d?S.offset>d.offset?S:d:S??d;O&&(!E||E.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(!d||!h||h==="!"||h===Zt.tagName&&m==="map"||h===$a.tagName&&m==="seq")return Ku(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(d,"BAD_COLLECTION_TYPE",`${S.tag} used for ${m} collection, but expects ${S.collection??"scalar"}`,!0):o(d,"TAG_RESOLVE_FAILED",`Unresolved tag: ${h}`,!0),Ku(a,i,s,o,h)}const g=Ku(a,i,s,o,h,y),x=y.resolve?.(g,S=>o(d,"TAG_RESOLVE_FAILED",S),i.options)??g,b=Je(x)?x:new be(x);return b.range=g.range,b.tag=h,y?.format&&(b.format=y.format),b}function iS(a,i,s){const r=i.offset,o=sS(i,a.options.strict,s);if(!o)return{value:"",type:null,comment:"",range:[r,r,r]};const d=o.mode===">"?be.BLOCK_FOLDED:be.BLOCK_LITERAL,h=i.source?lS(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:d,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,k]=h[w];if(k===""||k==="\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+k.length+1}for(let w=h.length-1;w>=m;--w)h[w][0].length>y&&(m=w+1);let b="",S="",E=!1;for(let w=0;w<x;++w)b+=h[w][0].slice(y)+`
|
|
79
|
+
`;for(let w=x;w<m;++w){let[N,k]=h[w];g+=N.length+k.length+1;const $=k[k.length-1]==="\r";if($&&(k=k.slice(0,-1)),k&&N.length<y){const M=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;s(g-k.length-($?2:1),"BAD_INDENT",M),N=""}d===be.BLOCK_LITERAL?(b+=S+N.slice(y)+k,S=`
|
|
80
|
+
`):N.length>y||k[0]===" "?(S===" "?S=`
|
|
81
|
+
`:!E&&S===`
|
|
82
|
+
`&&(S=`
|
|
83
|
+
|
|
84
|
+
`),b+=S+N.slice(y)+k,S=`
|
|
85
|
+
`,E=!0):k===""?S===`
|
|
86
|
+
`?b+=`
|
|
87
|
+
`:S=`
|
|
88
|
+
`:(b+=S+k,S=" ",E=!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:d,comment:o.comment,range:[r,O,O]}}function sS({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],d=o[0];let h=0,m="",y=-1;for(let S=1;S<o.length;++S){const E=o[S];if(!m&&(E==="-"||E==="+"))m=E;else{const O=Number(E);!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 E=i[S];switch(E.type){case"space":g=!0;case"newline":b+=E.source.length;break;case"comment":s&&!g&&r(E,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),b+=E.source.length,x=E.source.substring(1);break;case"error":r(E,"UNEXPECTED_TOKEN",E.message),b+=E.source.length;break;default:{const O=`Unexpected token in block scalar header: ${E.type}`;r(E,"UNEXPECTED_TOKEN",O);const w=E.source;w&&typeof w=="string"&&(b+=w.length)}}}return{mode:d,indent:h,chomp:m,comment:x,length:b}}function lS(a){const i=a.split(/\n( *)/),s=i[0],r=s.match(/^( *)/),d=[r?.[1]?[r[1],s.slice(r[1].length)]:["",s]];for(let h=1;h<i.length;h+=2)d.push([i[h],i[h+1]]);return d}function rS(a,i,s){const{offset:r,type:o,source:d,end:h}=a;let m,y;const g=(S,E,O)=>s(r+S,E,O);switch(o){case"scalar":m=be.PLAIN,y=oS(d,g);break;case"single-quoted-scalar":m=be.QUOTE_SINGLE,y=cS(d,g);break;case"double-quoted-scalar":m=be.QUOTE_DOUBLE,y=uS(d,g);break;default:return s(a,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[r,r+d.length,r+d.length]}}const x=r+d.length,b=rl(h,x,i,s);return{value:y,type:m,comment:b.comment,range:[r,x,b.offset]}}function oS(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 cS(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],d=" ",h=i.lastIndex;for(s.lastIndex=h;r=s.exec(a);)r[1]===""?d===`
|
|
95
|
+
`?o+=d:d=`
|
|
96
|
+
`:(o+=d+r[1],d=" "),h=s.lastIndex;const m=/[ \t]*(.*)/sy;return m.lastIndex=h,r=m.exec(a),o+d+(r?.[1]??"")}function uS(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:d,offset:h}=dS(a,r);s+=d,r=h}else if(o==="\\"){let d=a[++r];const h=fS[d];if(h)s+=h;else if(d===`
|
|
99
|
+
`)for(d=a[r+1];d===" "||d===" ";)d=a[++r+1];else if(d==="\r"&&a[r+1]===`
|
|
100
|
+
`)for(d=a[++r+1];d===" "||d===" ";)d=a[++r+1];else if(d==="x"||d==="u"||d==="U"){const m={x:2,u:4,U:8}[d];s+=hS(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 d=r;let h=a[r+1];for(;h===" "||h===" ";)h=a[++r+1];h!==`
|
|
101
|
+
`&&!(h==="\r"&&a[r+2]===`
|
|
102
|
+
`)&&(s+=r>d?a.slice(d,r+1):o)}else s+=o}return(a[a.length-1]!=='"'||a.length===1)&&i(a.length,"MISSING_CHAR",'Missing closing "quote'),s}function dS(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 fS={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
107
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function hS(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:d,comment:h,range:m}=i.type==="block-scalar"?iS(a,i,r):rS(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=mS(a.schema,o,y,s,r):i.type==="scalar"?g=pS(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,d&&(x.type=d),y&&(x.tag=y),g.format&&(x.format=g.format),h&&(x.comment=h),x}function mS(a,i,s,r,o){if(s==="!")return a[pn];const d=[];for(const m of a.tags)if(!m.collection&&m.tag===s)if(m.default&&m.test)d.push(m);else return m;for(const m of d)if(m.test?.test(i))return m;const h=a.knownTags[s];return h&&!h.collection?(a.tags.push(Object.assign({},h,{default:!1,test:void 0})),h):(o(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,s!=="tag:yaml.org,2002:str"),a[pn])}function pS({atKey:a,directives:i,schema:s},r,o,d){const h=s.tags.find(m=>(m.default===!0||a&&m.default==="key")&&m.test?.test(r))||s[pn];if(s.compat){const m=s.compat.find(y=>y.default&&y.test?.test(r))??s[pn];if(h.tag!==m.tag){const y=i.tagString(h.tag),g=i.tagString(m.tag),x=`Value may be parsed as either ${y} or ${g}`;d(o,"TAG_RESOLVE_FAILED",x,!0)}}return h}function gS(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 yS={composeNode:gy,composeEmptyNode:Ed};function gy(a,i,s,r){const o=a.atKey,{spaceBefore:d,comment:h,anchor:m,tag:y}=s;let g,x=!0;switch(i.type){case"alias":g=vS(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=aS(yS,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=Ed(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"),d&&(g.spaceBefore=!0),h&&(i.type==="scalar"&&i.source===""?g.comment=h:g.commentBefore=h),a.options.keepSourceTokens&&x&&(g.srcToken=i),g}function Ed(a,i,s,r,{spaceBefore:o,comment:d,anchor:h,tag:m,end:y},g){const x={type:"scalar",offset:gS(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),d&&(b.comment=d,b.range[2]=y),b}function vS({options:a},{offset:i,source:s,end:r},o){const d=new pd(s.substring(1));d.source===""&&o(i,"BAD_ALIAS","Alias cannot be an empty string"),d.source.endsWith(":")&&o(i+s.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const h=i+s.length,m=rl(r,h,a.strict,o);return d.range=[i,h,m.offset],m.comment&&(d.comment=m.comment),d}function bS(a,i,{offset:s,start:r,value:o,end:d},h){const m=Object.assign({_directives:i},a),y=new uo(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??d?.[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):Ed(g,x.end,r,null,x,h);const b=y.contents.range[2],S=rl(d,b,!1,h);return S.comment&&(y.comment=S.comment),y.range=[s,b,S.offset],y}function Xs(a){if(typeof a=="number")return[a,a+1];if(Array.isArray(a))return a.length===2?a:[a[0],a[1]];const{offset:i,source:s}=a;return[i,i+(typeof s=="string"?s.length:1)]}function ag(a){let i="",s=!1,r=!1;for(let o=0;o<a.length;++o){const d=a[o];switch(d[0]){case"#":i+=(i===""?"":r?`
|
|
108
|
+
|
|
109
|
+
`:`
|
|
110
|
+
`)+(d.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 xS{constructor(i={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(s,r,o,d)=>{const h=Xs(s);d?this.warnings.push(new Wx(h,r,o)):this.errors.push(new _r(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 d=i.contents;if(s)i.comment=i.comment?`${i.comment}
|
|
111
|
+
${r}`:r;else if(o||i.directives.docStart||!d)i.commentBefore=r;else if(Ze(d)&&!d.flow&&d.items.length>0){let h=d.items[0];Fe(h)&&(h=h.key);const m=h.commentBefore;h.commentBefore=m?`${r}
|
|
112
|
+
${m}`:r}else{const h=d.commentBefore;d.commentBefore=h?`${r}
|
|
113
|
+
${h}`:r}}s?(Array.prototype.push.apply(i.errors,this.errors),Array.prototype.push.apply(i.warnings,this.warnings)):(i.errors=this.errors,i.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment: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 d=Xs(i);d[0]+=s,this.onError(d,"BAD_DIRECTIVE",r,o)}),this.prelude.push(i.source),this.atDirectives=!0;break;case"document":{const s=bS(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 _r(Xs(i),"UNEXPECTED_TOKEN",s);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new _r(Xs(i),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const s=rl(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 _r(Xs(i),"UNEXPECTED_TOKEN",`Unsupported token ${i.type}`))}}*end(i=!1,s=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(i){const r=Object.assign({_directives:this.directives},this.options),o=new uo(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 SS(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"),wS=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),zr=new Set(",[]{}"),jS=new Set(` ,[]{}
|
|
118
|
+
\r `),Yu=a=>!a||jS.has(a);class NS{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 d=i[r-1];if(d===" "||d===" "){s=r-1;break}else r=i.indexOf("#",r+1)}for(;;){const d=i[s-1];if(d===" "||d===" ")s-=1;else break}const 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(Yu),"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 d=0;for(;o[d]===",";)d+=yield*this.pushCount(1),d+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(d+=yield*this.pushIndicators(),o[d]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-d),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Yu),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const h=this.charAt(1);if(this.flowKey||sn(h)||h===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const i=this.charAt(0);let s=this.buffer.indexOf(i,this.pos+1);if(i==="'")for(;s!==-1&&this.buffer[s+1]==="'";)s=this.buffer.indexOf("'",s+2);else for(;s!==-1;){let d=0;for(;this.buffer[s-1-d]==="\\";)d+=1;if(d%2===0)break;s=this.buffer.indexOf('"',s+1)}const r=this.buffer.substring(0,s);let o=r.indexOf(`
|
|
124
|
+
`,this.pos);if(o!==-1){for(;o!==-1;){const d=this.continueScalar(o+1);if(d===-1)break;o=r.indexOf(`
|
|
125
|
+
`,d)}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 d=this.pos;r=this.buffer[d];++d)switch(r){case" ":s+=1;break;case`
|
|
126
|
+
`:i=d,s=0;break;case"\r":{const h=this.buffer[d+1];if(!h&&!this.atEnd)return this.setNext("block-scalar");if(h===`
|
|
127
|
+
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(s>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=s:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const d=this.continueScalar(i+1);if(d===-1)break;i=this.buffer.indexOf(`
|
|
128
|
+
`,d)}while(i!==-1);if(i===-1){if(!this.atEnd)return this.setNext("block-scalar");i=this.buffer.length}}let 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 d=i-1,h=this.buffer[d];h==="\r"&&(h=this.buffer[--d]);const m=d;for(;h===" ";)h=this.buffer[--d];if(h===`
|
|
130
|
+
`&&d>=this.pos&&d+1+s>m)i=d;else break}while(!0);return yield 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 d=this.buffer[r+1];if(sn(d)||i&&zr.has(d))break;s=r}else if(sn(o)){let d=this.buffer[r+1];if(o==="\r"&&(d===`
|
|
131
|
+
`?(r+=1,o=`
|
|
132
|
+
`,d=this.buffer[r+1]):s=r),d==="#"||i&&zr.has(d))break;if(o===`
|
|
133
|
+
`){const h=this.continueScalar(r+1);if(h===-1)break;r=Math.max(r,h-2)}}else{if(i&&zr.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(Yu))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const i=this.flowLevel>0,s=this.charAt(1);if(sn(s)||i&&zr.has(s))return i?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let i=this.pos+2,s=this.buffer[i];for(;!sn(s)&&s!==">";)s=this.buffer[++i];return yield*this.pushToIndex(s===">"?i+1:i,!1)}else{let i=this.pos+1,s=this.buffer[i];for(;s;)if(wS.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 CS{constructor(){this.lineStarts=[],this.addNewLine=i=>this.lineStarts.push(i),this.linePos=i=>{let s=0,r=this.lineStarts.length;for(;s<r;){const d=s+r>>1;this.lineStarts[d]<i?s=d+1:r=d}if(this.lineStarts[s]===i)return{line:s+1,col:1};if(s===0)return{line:0,col:i};const 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 Dr(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 kS{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 NS,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=SS(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(d=>d.type!=="comment"||d.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=Dr(this.peek(2)),r=Di(s);let o;i.end?(o=i.end,o.push(this.sourceToken),delete i.end):o=[this.sourceToken];const d={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]=d}else yield*this.lineEnd(i)}*blockScalar(i){switch(this.type){case"space":case"comment":case"newline":i.props.push(this.sourceToken);return;case"scalar":if(i.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let s=this.source.indexOf(`
|
|
136
|
+
`)+1;for(;s!==0;)this.onNewLine(this.offset+s),s=this.source.indexOf(`
|
|
137
|
+
`,s)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(i){const s=i.items[i.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,s.value){const r="end"in s.value?s.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):i.items.push({start:[this.sourceToken]})}else s.sep?s.sep.push(this.sourceToken):s.start.push(this.sourceToken);return;case"space":case"comment":if(s.value)i.items.push({start:[this.sourceToken]});else if(s.sep)s.sep.push(this.sourceToken);else{if(this.atIndentedComment(s.start,i.indent)){const 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 d=[];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&&(d=s.sep.splice(h[1]))}switch(this.type){case"anchor":case"tag":o||s.value?(d.push(this.sourceToken),i.items.push({start:d}),this.onKeyLine=!0):s.sep?s.sep.push(this.sourceToken):s.start.push(this.sourceToken);return;case"explicit-key-ind":!s.sep&&!s.explicitKey?(s.start.push(this.sourceToken),s.explicitKey=!0):o||s.value?(d.push(this.sourceToken),i.items.push({start:d,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(s.explicitKey)if(s.sep)if(s.value)i.items.push({start:[],key:null,sep:[this.sourceToken]});else if(pa(s.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:null,sep:[this.sourceToken]}]});else if(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 d.length>0?s.sep=s.sep.concat(d,this.sourceToken):s.sep.push(this.sourceToken);else if(pa(s.start,"newline"))Object.assign(s,{key:null,sep:[this.sourceToken]});else{const h=Di(s.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:h,key:null,sep:[this.sourceToken]}]})}else s.sep?s.value||o?i.items.push({start:d,key:null,sep:[this.sourceToken]}):pa(s.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):s.sep.push(this.sourceToken):Object.assign(s,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const h=this.flowScalar(this.type);o||s.value?(i.items.push({start:d,key:h,sep:[]}),this.onKeyLine=!0):s.sep?this.stack.push(h):(Object.assign(s,{key:h,sep:[]}),this.onKeyLine=!0);return}default:{const h=this.startBlockValue(i);if(h){if(h.type==="block-seq"){if(!s.explicitKey&&s.sep&&!pa(s.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&i.items.push({start:d});this.stack.push(h);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(i){const s=i.items[i.items.length-1];switch(this.type){case"newline":if(s.value){const r="end"in s.value?s.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):i.items.push({start:[this.sourceToken]})}else s.start.push(this.sourceToken);return;case"space":case"comment":if(s.value)i.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(s.start,i.indent)){const 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=Dr(r),d=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:d,key:i,sep:h}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=m}else yield*this.lineEnd(i)}}flowScalar(i){if(this.onNewLine){let s=this.source.indexOf(`
|
|
138
|
+
`)+1;for(;s!==0;)this.onNewLine(this.offset+s),s=this.source.indexOf(`
|
|
139
|
+
`,s)+1}return{type:i,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(i){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const s=Dr(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=Dr(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 ES(a){const i=a.prettyErrors!==!1;return{lineCounter:a.lineCounter||i&&new CS||null,prettyErrors:i}}function AS(a,i={}){const{lineCounter:s,prettyErrors:r}=ES(i),o=new kS(s?.addNewLine),d=new xS(i),h=Array.from(d.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},d.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 Ad(...a){return i=>{let s=!1;const r=a.map(o=>{const d=rg(o,i);return!s&&typeof d=="function"&&(s=!0),d});if(s)return()=>{for(let o=0;o<r.length;o++){const d=r[o];typeof d=="function"?d():rg(a[o],null)}}}}function Ga(...a){return j.useCallback(Ad(...a),a)}function TS(a,i){const s=j.createContext(i),r=d=>{const{children:h,...m}=d,y=j.useMemo(()=>m,Object.values(m));return u.jsx(s.Provider,{value:y,children:h})};r.displayName=a+"Provider";function o(d){const h=j.useContext(s);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[r,o]}function OS(a,i=[]){let s=[];function r(d,h){const m=j.createContext(h),y=s.length;s=[...s,h];const g=b=>{const{scope:S,children:E,...O}=b,w=S?.[a]?.[y]||m,N=j.useMemo(()=>O,Object.values(O));return u.jsx(w.Provider,{value:N,children:E})};g.displayName=d+"Provider";function x(b,S){const E=S?.[a]?.[y]||m,O=j.useContext(E);if(O)return O;if(h!==void 0)return h;throw new Error(`\`${b}\` must be used within \`${d}\``)}return[g,x]}const o=()=>{const d=s.map(h=>j.createContext(h));return function(m){const y=m?.[a]||d;return j.useMemo(()=>({[`__scope${a}`]:{...m,[a]:y}}),[m,y])}};return o.scopeName=a,[r,_S(o,...i)]}function _S(...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(d){const h=r.reduce((m,{useScope:y,scopeName:g})=>{const b=y(d)[`__scope${g}`];return{...m,...b}},{});return j.useMemo(()=>({[`__scope${i.scopeName}`]:h}),[h])}};return s.scopeName=i.scopeName,s}var tl=globalThis?.document?j.useLayoutEffect:()=>{},zS=fd[" useId ".trim().toString()]||(()=>{}),DS=0;function Gu(a){const[i,s]=j.useState(zS());return tl(()=>{s(r=>r??String(DS++))},[a]),a||(i?`radix-${i}`:"")}var MS=fd[" useInsertionEffect ".trim().toString()]||tl;function RS({prop:a,defaultProp:i,onChange:s=()=>{},caller:r}){const[o,d,h]=LS({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=US(x)?x(a):x;b!==a&&h.current?.(b)}else d(x)},[m,a,d,h]);return[y,g]}function LS({defaultProp:a,onChange:i}){const[s,r]=j.useState(a),o=j.useRef(s),d=j.useRef(i);return MS(()=>{d.current=i},[i]),j.useEffect(()=>{o.current!==s&&(d.current?.(s),o.current=s)},[s,o]),[s,r,d]}function US(a){return typeof a=="function"}var Sy=Bg();const BS=Ug(Sy);function wy(a){const i=HS(a),s=j.forwardRef((r,o)=>{const{children:d,...h}=r,m=j.Children.toArray(d),y=m.find($S);if(y){const g=y.props.children,x=m.map(b=>b===y?j.Children.count(g)>1?j.Children.only(null):j.isValidElement(g)?g.props.children:null:b);return u.jsx(i,{...h,ref:o,children:j.isValidElement(g)?j.cloneElement(g,void 0,x):null})}return u.jsx(i,{...h,ref:o,children:d})});return s.displayName=`${a}.Slot`,s}function HS(a){const i=j.forwardRef((s,r)=>{const{children:o,...d}=s;if(j.isValidElement(o)){const h=YS(o),m=KS(d,o.props);return o.type!==j.Fragment&&(m.ref=r?Ad(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 qS=Symbol("radix.slottable");function $S(a){return j.isValidElement(a)&&typeof a.type=="function"&&"__radixId"in a.type&&a.type.__radixId===qS}function KS(a,i){const s={...i};for(const r in i){const o=a[r],d=i[r];/^on[A-Z]/.test(r)?o&&d?s[r]=(...m)=>{const y=d(...m);return o(...m),y}:o&&(s[r]=o):r==="style"?s[r]={...o,...d}:r==="className"&&(s[r]=[o,d].filter(Boolean).join(" "))}return{...a,...s}}function YS(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 GS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qn=GS.reduce((a,i)=>{const s=wy(`Primitive.${i}`),r=j.forwardRef((o,d)=>{const{asChild:h,...m}=o,y=h?s:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(y,{...m,ref:d})});return r.displayName=`Primitive.${i}`,{...a,[i]:r}},{});function VS(a,i){a&&Sy.flushSync(()=>a.dispatchEvent(i))}function nl(a){const i=j.useRef(a);return j.useEffect(()=>{i.current=a}),j.useMemo(()=>(...s)=>i.current?.(...s),[])}function QS(a,i=globalThis?.document){const s=nl(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 XS="DismissableLayer",ld="dismissableLayer.update",ZS="dismissableLayer.pointerDownOutside",IS="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:d,onInteractOutside:h,onDismiss:m,...y}=a,g=j.useContext(jy),[x,b]=j.useState(null),S=x?.ownerDocument??globalThis?.document,[,E]=j.useState({}),O=Ga(i,X=>b(X)),w=Array.from(g.layers),[N]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),k=w.indexOf(N),$=x?w.indexOf(x):-1,z=g.layersWithOutsidePointerEventsDisabled.size>0,M=$>=k,L=PS(X=>{const D=X.target,P=[...g.branches].some(Se=>Se.contains(D));!M||P||(o?.(X),h?.(X),X.defaultPrevented||m?.())},S),G=WS(X=>{const D=X.target;[...g.branches].some(Se=>Se.contains(D))||(d?.(X),h?.(X),X.defaultPrevented||m?.())},S);return QS(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=()=>E({});return document.addEventListener(ld,X),()=>document.removeEventListener(ld,X)},[]),u.jsx(qn.div,{...y,ref:O,style:{pointerEvents:z?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=XS;var JS="DismissableLayerBranch",FS=j.forwardRef((a,i)=>{const s=j.useContext(jy),r=j.useRef(null),o=Ga(i,r);return j.useEffect(()=>{const d=r.current;if(d)return s.branches.add(d),()=>{s.branches.delete(d)}},[s.branches]),u.jsx(qn.div,{...a,ref:o})});FS.displayName=JS;function PS(a,i=globalThis?.document){const s=nl(a),r=j.useRef(!1),o=j.useRef(()=>{});return j.useEffect(()=>{const d=m=>{if(m.target&&!r.current){let y=function(){Cy(ZS,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",d)},0);return()=>{window.clearTimeout(h),i.removeEventListener("pointerdown",d),i.removeEventListener("click",o.current)}},[i,s]),{onPointerDownCapture:()=>r.current=!0}}function WS(a,i=globalThis?.document){const s=nl(a),r=j.useRef(!1);return j.useEffect(()=>{const o=d=>{d.target&&!r.current&&Cy(IS,s,{originalEvent:d},{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,d=new CustomEvent(a,{bubbles:!1,cancelable:!0,detail:s});i&&o.addEventListener(a,i,{once:!0}),r?VS(o,d):o.dispatchEvent(d)}var Vu="focusScope.autoFocusOnMount",Qu="focusScope.autoFocusOnUnmount",ug={bubbles:!1,cancelable:!0},e1="FocusScope",ky=j.forwardRef((a,i)=>{const{loop:s=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:d,...h}=a,[m,y]=j.useState(null),g=nl(o),x=nl(d),b=j.useRef(null),S=Ga(i,w=>y(w)),E=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(r){let w=function(z){if(E.paused||!m)return;const M=z.target;m.contains(M)?b.current=M:ma(b.current,{select:!0})},N=function(z){if(E.paused||!m)return;const M=z.relatedTarget;M!==null&&(m.contains(M)||ma(b.current,{select:!0}))},k=function(z){if(document.activeElement===document.body)for(const L of z)L.removedNodes.length>0&&ma(m)};document.addEventListener("focusin",w),document.addEventListener("focusout",N);const $=new MutationObserver(k);return m&&$.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",N),$.disconnect()}}},[r,m,E.paused]),j.useEffect(()=>{if(m){fg.add(E);const w=document.activeElement;if(!m.contains(w)){const k=new CustomEvent(Vu,ug);m.addEventListener(Vu,g),m.dispatchEvent(k),k.defaultPrevented||(t1(l1(Ey(m)),{select:!0}),document.activeElement===w&&ma(m))}return()=>{m.removeEventListener(Vu,g),setTimeout(()=>{const k=new CustomEvent(Qu,ug);m.addEventListener(Qu,x),m.dispatchEvent(k),k.defaultPrevented||ma(w??document.body,{select:!0}),m.removeEventListener(Qu,x),fg.remove(E)},0)}}},[m,g,x,E]);const O=j.useCallback(w=>{if(!s&&!r||E.paused)return;const N=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,k=document.activeElement;if(N&&k){const $=w.currentTarget,[z,M]=n1($);z&&M?!w.shiftKey&&k===M?(w.preventDefault(),s&&ma(z,{select:!0})):w.shiftKey&&k===z&&(w.preventDefault(),s&&ma(M,{select:!0})):k===$&&w.preventDefault()}},[s,r,E.paused]);return u.jsx(qn.div,{tabIndex:-1,...h,ref:S,onKeyDown:O})});ky.displayName=e1;function t1(a,{select:i=!1}={}){const s=document.activeElement;for(const r of a)if(ma(r,{select:i}),document.activeElement!==s)return}function n1(a){const i=Ey(a),s=dg(i,a),r=dg(i.reverse(),a);return[s,r]}function Ey(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(!a1(s,{upTo:i}))return s}function a1(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 i1(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&&i1(a)&&i&&a.select()}}var fg=s1();function s1(){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 l1(a){return a.filter(i=>i.tagName!=="A")}var r1="Portal",Ay=j.forwardRef((a,i)=>{const{container:s,...r}=a,[o,d]=j.useState(!1);tl(()=>d(!0),[]);const h=s||o&&globalThis?.document?.body;return h?BS.createPortal(u.jsx(qn.div,{...r,ref:i}),h):null});Ay.displayName=r1;function o1(a,i){return j.useReducer((s,r)=>i[s][r]??s,a)}var fo=a=>{const{present:i,children:s}=a,r=c1(i),o=typeof s=="function"?s({present:r.isPresent}):j.Children.only(s),d=Ga(r.ref,u1(o));return typeof s=="function"||r.isPresent?j.cloneElement(o,{ref:d}):null};fo.displayName="Presence";function c1(a){const[i,s]=j.useState(),r=j.useRef(null),o=j.useRef(a),d=j.useRef("none"),h=a?"mounted":"unmounted",[m,y]=o1(h,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j.useEffect(()=>{const g=Mr(r.current);d.current=m==="mounted"?g:"none"},[m]),tl(()=>{const g=r.current,x=o.current;if(x!==a){const S=d.current,E=Mr(g);a?y("MOUNT"):E==="none"||g?.display==="none"?y("UNMOUNT"):y(x&&S!==E?"ANIMATION_OUT":"UNMOUNT"),o.current=a}},[a,y]),tl(()=>{if(i){let g;const x=i.ownerDocument.defaultView??window,b=E=>{const w=Mr(r.current).includes(CSS.escape(E.animationName));if(E.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=E=>{E.target===i&&(d.current=Mr(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 Mr(a){return a?.animationName||"none"}function u1(a){let i=Object.getOwnPropertyDescriptor(a.props,"ref")?.get,s=i&&"isReactWarning"in i&&i.isReactWarning;return s?a.ref:(i=Object.getOwnPropertyDescriptor(a,"ref")?.get,s=i&&"isReactWarning"in i&&i.isReactWarning,s?a.props.ref:a.props.ref||a.ref)}var Xu=0;function d1(){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()),Xu++,()=>{Xu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(i=>i.remove()),Xu--}},[])}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 d in s)Object.prototype.hasOwnProperty.call(s,d)&&(i[d]=s[d])}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 f1(a,i,s){if(s||arguments.length===2)for(var r=0,o=i.length,d;r<o;r++)(d||!(r in i))&&(d||(d=Array.prototype.slice.call(i,0,r)),d[r]=i[r]);return a.concat(d||Array.prototype.slice.call(i))}var Vr="right-scroll-bar-position",Qr="width-before-scroll-bar",h1="with-scroll-bars-hidden",m1="--removed-body-scroll-bar-size";function Zu(a,i){return typeof a=="function"?a(i):a&&(a.current=i),a}function p1(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 g1=typeof window<"u"?j.useLayoutEffect:j.useEffect,pg=new WeakMap;function y1(a,i){var s=p1(null,function(r){return a.forEach(function(o){return Zu(o,r)})});return g1(function(){var r=pg.get(s);if(r){var o=new Set(r),d=new Set(a),h=s.current;o.forEach(function(m){d.has(m)||Zu(m,null)}),d.forEach(function(m){o.has(m)||Zu(m,h)})}pg.set(s,a)},[a]),s}function v1(a){return a}function b1(a,i){i===void 0&&(i=v1);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(d){var h=i(d,r);return s.push(h),function(){s=s.filter(function(m){return m!==h})}},assignSyncMedium:function(d){for(r=!0;s.length;){var h=s;s=[],h.forEach(d)}s={push:function(m){return d(m)},filter:function(){return s}}},assignMedium:function(d){r=!0;var h=[];if(s.length){var m=s;s=[],m.forEach(d),h=s}var y=function(){var x=h;h=[],x.forEach(d)},g=function(){return Promise.resolve().then(y)};g(),s={push:function(x){h.push(x),g()},filter:function(x){return h=h.filter(x),s}}}};return o}function x1(a){a===void 0&&(a={});var i=b1(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 S1(a,i){return a.useMedium(i),Oy}var _y=x1(),Iu=function(){},ho=j.forwardRef(function(a,i){var s=j.useRef(null),r=j.useState({onScrollCapture:Iu,onWheelCapture:Iu,onTouchMoveCapture:Iu}),o=r[0],d=r[1],h=a.forwardProps,m=a.children,y=a.className,g=a.removeScrollBar,x=a.enabled,b=a.shards,S=a.sideCar,E=a.noRelative,O=a.noIsolation,w=a.inert,N=a.allowPinchZoom,k=a.as,$=k===void 0?"div":k,z=a.gapMode,M=Ty(a,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=S,G=y1([s,i]),X=mn(mn({},M),o);return j.createElement(j.Fragment,null,x&&j.createElement(L,{sideCar:_y,removeScrollBar:g,shards:b,noRelative:E,noIsolation:O,inert:w,setCallbacks:d,allowPinchZoom:!!N,lockRef:s,gapMode:z}),h?j.cloneElement(j.Children.only(m),mn(mn({},X),{ref:G})):j.createElement($,mn({},X,{className:y,ref:G}),m))});ho.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ho.classNames={fullWidth:Qr,zeroRight:Vr};var w1=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function j1(){if(!document)return null;var a=document.createElement("style");a.type="text/css";var i=w1();return i&&a.setAttribute("nonce",i),a}function N1(a,i){a.styleSheet?a.styleSheet.cssText=i:a.appendChild(document.createTextNode(i))}function C1(a){var i=document.head||document.getElementsByTagName("head")[0];i.appendChild(a)}var k1=function(){var a=0,i=null;return{add:function(s){a==0&&(i=j1())&&(N1(i,s),C1(i)),a++},remove:function(){a--,!a&&i&&(i.parentNode&&i.parentNode.removeChild(i),i=null)}}},E1=function(){var a=k1();return function(i,s){j.useEffect(function(){return a.add(i),function(){a.remove()}},[i&&s])}},zy=function(){var a=E1(),i=function(s){var r=s.styles,o=s.dynamic;return a(r,o),null};return i},A1={left:0,top:0,right:0,gap:0},Ju=function(a){return parseInt(a||"",10)||0},T1=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[Ju(s),Ju(r),Ju(o)]},O1=function(a){if(a===void 0&&(a="margin"),typeof window>"u")return A1;var i=T1(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])}},_1=zy(),Ki="data-scroll-locked",z1=function(a,i,s,r){var o=a.left,d=a.top,h=a.right,m=a.gap;return s===void 0&&(s="margin"),`
|
|
140
|
+
.`.concat(h1,` {
|
|
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(d,`px;
|
|
150
|
+
padding-right: `).concat(h,`px;
|
|
151
|
+
margin-left:0;
|
|
152
|
+
margin-top:0;
|
|
153
|
+
margin-right: `).concat(m,"px ").concat(r,`;
|
|
154
|
+
`),s==="padding"&&"padding-right: ".concat(m,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.`).concat(Vr,` {
|
|
158
|
+
right: `).concat(m,"px ").concat(r,`;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.`).concat(Qr,` {
|
|
162
|
+
margin-right: `).concat(m,"px ").concat(r,`;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.`).concat(Vr," .").concat(Vr,` {
|
|
166
|
+
right: 0 `).concat(r,`;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.`).concat(Qr," .").concat(Qr,` {
|
|
170
|
+
margin-right: 0 `).concat(r,`;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
body[`).concat(Ki,`] {
|
|
174
|
+
`).concat(m1,": ").concat(m,`px;
|
|
175
|
+
}
|
|
176
|
+
`)},gg=function(){var a=parseInt(document.body.getAttribute(Ki)||"0",10);return isFinite(a)?a:0},D1=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())}},[])},M1=function(a){var i=a.noRelative,s=a.noImportant,r=a.gapMode,o=r===void 0?"margin":r;D1();var d=j.useMemo(function(){return O1(o)},[o]);return j.createElement(_1,{styles:z1(d,!i,o,s?"":"!important")})},rd=!1;if(typeof window<"u")try{var Rr=Object.defineProperty({},"passive",{get:function(){return rd=!0,!0}});window.addEventListener("test",Rr,Rr),window.removeEventListener("test",Rr,Rr)}catch{rd=!1}var Mi=rd?{passive:!1}:!1,R1=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&&!R1(a)&&s[i]==="visible")},L1=function(a){return Dy(a,"overflowY")},U1=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 d=Ry(a,r),h=d[1],m=d[2];if(h>m)return!0}r=r.parentNode}while(r&&r!==s.body);return!1},B1=function(a){var i=a.scrollTop,s=a.scrollHeight,r=a.clientHeight;return[i,s,r]},H1=function(a){var i=a.scrollLeft,s=a.scrollWidth,r=a.clientWidth;return[i,s,r]},My=function(a,i){return a==="v"?L1(i):U1(i)},Ry=function(a,i){return a==="v"?B1(i):H1(i)},q1=function(a,i){return a==="h"&&i==="rtl"?-1:1},$1=function(a,i,s,r,o){var d=q1(a,window.getComputedStyle(i).direction),h=d*r,m=s.target,y=i.contains(m),g=!1,x=h>0,b=0,S=0;do{if(!m)break;var E=Ry(a,m),O=E[0],w=E[1],N=E[2],k=w-N-d*O;(O||k)&&My(a,m)&&(b+=k,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},Lr=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},K1=function(a,i){return a[0]===i[0]&&a[1]===i[1]},Y1=function(a){return`
|
|
177
|
+
.block-interactivity-`.concat(a,` {pointer-events: none;}
|
|
178
|
+
.allow-interactivity-`).concat(a,` {pointer-events: all;}
|
|
179
|
+
`)},G1=0,Ri=[];function V1(a){var i=j.useRef([]),s=j.useRef([0,0]),r=j.useRef(),o=j.useState(G1++)[0],d=j.useState(zy)[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=f1([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 k=Lr(w),$=s.current,z="deltaX"in w?w.deltaX:$[0]-k[0],M="deltaY"in w?w.deltaY:$[1]-k[1],L,G=w.target,X=Math.abs(z)>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&&(z||M)&&(r.current=L),!L)return!0;var se=r.current||L;return $1(se,N,w,se==="h"?z:M)},[]),y=j.useCallback(function(w){var N=w;if(!(!Ri.length||Ri[Ri.length-1]!==d)){var k="deltaY"in N?vg(N):Lr(N),$=i.current.filter(function(L){return L.name===N.type&&(L.target===N.target||N.target===L.shadowParent)&&K1(L.delta,k)})[0];if($&&$.should){N.cancelable&&N.preventDefault();return}if(!$){var z=(h.current.shards||[]).map(bg).filter(Boolean).filter(function(L){return L.contains(N.target)}),M=z.length>0?m(N,z[0]):!h.current.noIsolation;M&&N.cancelable&&N.preventDefault()}}},[]),g=j.useCallback(function(w,N,k,$){var z={name:w,delta:N,target:k,should:$,shadowParent:Q1(k)};i.current.push(z),setTimeout(function(){i.current=i.current.filter(function(M){return M!==z})},1)},[]),x=j.useCallback(function(w){s.current=Lr(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,Lr(w),w.target,m(w,a.lockRef.current))},[]);j.useEffect(function(){return Ri.push(d),a.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:S}),document.addEventListener("wheel",y,Mi),document.addEventListener("touchmove",y,Mi),document.addEventListener("touchstart",x,Mi),function(){Ri=Ri.filter(function(w){return w!==d}),document.removeEventListener("wheel",y,Mi),document.removeEventListener("touchmove",y,Mi),document.removeEventListener("touchstart",x,Mi)}},[]);var E=a.removeScrollBar,O=a.inert;return j.createElement(j.Fragment,null,O?j.createElement(d,{styles:Y1(o)}):null,E?j.createElement(M1,{noRelative:a.noRelative,gapMode:a.gapMode}):null)}function Q1(a){for(var i=null;a!==null;)a instanceof ShadowRoot&&(i=a.host,a=a.host),a=a.parentNode;return i}const X1=S1(_y,V1);var Ly=j.forwardRef(function(a,i){return j.createElement(ho,mn({},a,{ref:i,sideCar:X1}))});Ly.classNames=ho.classNames;var Z1=function(a){if(typeof document>"u")return null;var i=Array.isArray(a)?a[0]:a;return i.ownerDocument.body},Li=new WeakMap,Ur=new WeakMap,Br={},Fu=0,Uy=function(a){return a&&(a.host||Uy(a.parentNode))},I1=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})},J1=function(a,i,s,r){var o=I1(i,Array.isArray(a)?a:[a]);Br[s]||(Br[s]=new WeakMap);var d=Br[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 E=S.getAttribute(r),O=E!==null&&E!=="false",w=(Li.get(S)||0)+1,N=(d.get(S)||0)+1;Li.set(S,w),d.set(S,N),h.push(S),w===1&&O&&Ur.set(S,!0),N===1&&S.setAttribute(s,"true"),O||S.setAttribute(r,"true")}catch(k){console.error("aria-hidden: cannot operate on ",S,k)}})};return x(i),m.clear(),Fu++,function(){h.forEach(function(b){var S=Li.get(b)-1,E=d.get(b)-1;Li.set(b,S),d.set(b,E),S||(Ur.has(b)||b.removeAttribute(r),Ur.delete(b)),E||b.removeAttribute(s)}),Fu--,Fu||(Li=new WeakMap,Li=new WeakMap,Ur=new WeakMap,Br={})}},F1=function(a,i,s){s===void 0&&(s="data-aria-hidden");var r=Array.from(Array.isArray(a)?a:[a]),o=Z1(a);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),J1(r,o,s,"aria-hidden")):function(){return null}},mo="Dialog",[By]=OS(mo),[P1,on]=By(mo),Hy=a=>{const{__scopeDialog:i,children:s,open:r,defaultOpen:o,onOpenChange:d,modal:h=!0}=a,m=j.useRef(null),y=j.useRef(null),[g,x]=RS({prop:r,defaultProp:o??!1,onChange:d,caller:mo});return u.jsx(P1,{scope:i,triggerRef:m,contentRef:y,contentId:Gu(),titleId:Gu(),descriptionId:Gu(),open:g,onOpenChange:x,onOpenToggle:j.useCallback(()=>x(b=>!b),[x]),modal:h,children:s})};Hy.displayName=mo;var qy="DialogTrigger",W1=j.forwardRef((a,i)=>{const{__scopeDialog:s,...r}=a,o=on(qy,s),d=Ga(i,o.triggerRef);return u.jsx(qn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":_d(o.open),...r,ref:d,onClick:ya(a.onClick,o.onOpenToggle)})});W1.displayName=qy;var Td="DialogPortal",[ew,$y]=By(Td,{forceMount:void 0}),Ky=a=>{const{__scopeDialog:i,forceMount:s,children:r,container:o}=a,d=on(Td,i);return u.jsx(ew,{scope:i,forceMount:s,children:j.Children.map(r,h=>u.jsx(fo,{present:s||d.open,children:u.jsx(Ay,{asChild:!0,container:o,children:h})}))})};Ky.displayName=Td;var Ir="DialogOverlay",Yy=j.forwardRef((a,i)=>{const s=$y(Ir,a.__scopeDialog),{forceMount:r=s.forceMount,...o}=a,d=on(Ir,a.__scopeDialog);return d.modal?u.jsx(fo,{present:r||d.open,children:u.jsx(nw,{...o,ref:i})}):null});Yy.displayName=Ir;var tw=wy("DialogOverlay.RemoveScroll"),nw=j.forwardRef((a,i)=>{const{__scopeDialog:s,...r}=a,o=on(Ir,s);return u.jsx(Ly,{as:tw,allowPinchZoom:!0,shards:[o.contentRef],children:u.jsx(qn.div,{"data-state":_d(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,d=on(Ka,a.__scopeDialog);return u.jsx(fo,{present:r||d.open,children:d.modal?u.jsx(aw,{...o,ref:i}):u.jsx(iw,{...o,ref:i})})});Gy.displayName=Ka;var aw=j.forwardRef((a,i)=>{const s=on(Ka,a.__scopeDialog),r=j.useRef(null),o=Ga(i,s.contentRef,r);return j.useEffect(()=>{const d=r.current;if(d)return F1(d)},[]),u.jsx(Vy,{...a,ref:o,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ya(a.onCloseAutoFocus,d=>{d.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:ya(a.onPointerDownOutside,d=>{const h=d.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0;(h.button===2||m)&&d.preventDefault()}),onFocusOutside:ya(a.onFocusOutside,d=>d.preventDefault())})}),iw=j.forwardRef((a,i)=>{const s=on(Ka,a.__scopeDialog),r=j.useRef(!1),o=j.useRef(!1);return u.jsx(Vy,{...a,ref:i,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{a.onCloseAutoFocus?.(d),d.defaultPrevented||(r.current||s.triggerRef.current?.focus(),d.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:d=>{a.onInteractOutside?.(d),d.defaultPrevented||(r.current=!0,d.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const h=d.target;s.triggerRef.current?.contains(h)&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&o.current&&d.preventDefault()}})}),Vy=j.forwardRef((a,i)=>{const{__scopeDialog:s,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:d,...h}=a,m=on(Ka,s),y=j.useRef(null),g=Ga(i,y);return d1(),u.jsxs(u.Fragment,{children:[u.jsx(ky,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:d,children:u.jsx(Ny,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":_d(m.open),...h,ref:g,onDismiss:()=>m.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(sw,{titleId:m.titleId}),u.jsx(rw,{contentRef:y,descriptionId:m.descriptionId})]})]})}),Od="DialogTitle",Qy=j.forwardRef((a,i)=>{const{__scopeDialog:s,...r}=a,o=on(Od,s);return u.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 u.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 u.jsx(qn.button,{type:"button",...r,ref:i,onClick:ya(a.onClick,()=>o.onOpenChange(!1))})});Jy.displayName=Iy;function _d(a){return a?"open":"closed"}var Fy="DialogTitleWarning",[w2,Py]=TS(Fy,{contentName:Ka,titleName:Od,docsSlug:"dialog"}),sw=({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},lw="DialogDescriptionWarning",rw=({contentRef:a,descriptionId:i})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Py(lw).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,zd=Yy,Dd=Gy,Md=Qy,tv=Zy,nv=Jy;const ow=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cw=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,s,r)=>r?r.toUpperCase():s.toLowerCase()),xg=a=>{const i=cw(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(),uw=a=>{for(const i in a)if(i.startsWith("aria-")||i==="role"||i==="title")return!0};var dw={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 fw=j.forwardRef(({color:a="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:o="",children:d,iconNode:h,...m},y)=>j.createElement("svg",{ref:y,...dw,width:i,height:i,stroke:a,strokeWidth:r?Number(s)*24/Number(i):s,className:av("lucide",o),...!d&&!uw(m)&&{"aria-hidden":"true"},...m},[...h.map(([g,x])=>j.createElement(g,x)),...Array.isArray(d)?d:[d]]));const cn=(a,i)=>{const s=j.forwardRef(({className:r,...o},d)=>j.createElement(fw,{ref:d,iconNode:i,className:av(`lucide-${ow(xg(a))}`,`lucide-${a}`,r),...o}));return s.displayName=xg(a),s};const hw=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Rd=cn("chevron-right",hw);const mw=[["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"}]],pw=cn("download",mw);const gw=[["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"}]],yw=cn("globe",gw);const vw=[["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"}]],bw=cn("layout-dashboard",vw);const xw=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],Sw=cn("menu",xw);const ww=[["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"}]],jw=cn("play",ww);const Nw=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Sg=cn("plus",Nw);const Cw=[["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"}]],kw=cn("rocket",Cw);const Ew=[["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"}]],Aw=cn("settings",Ew);const Tw=[["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"}]],Ow=cn("trash-2",Tw);const _w=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ld=cn("x",_w);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:d}=i,h=Object.keys(o).map(g=>{const x=s?.[g],b=d?.[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,...E}=x;return Object.entries(E).every(O=>{let[w,N]=O;return Array.isArray(N)?N.includes({...d,...m}[w]):{...d,...m}[w]===N})?[...g,b,S]:g},[]);return jg(a,h,y,s?.class,s?.className)},zw=(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},Dw=(a,i)=>({classGroupId:a,validator:i}),rv=(a=new Map,i=null,s)=>({nextPart:a,validators:i,classGroupId:s}),Jr="-",Ng=[],Mw="arbitrary..",Rw=a=>{const i=Uw(a),{conflictingClassGroups:s,conflictingClassGroupModifiers:r}=a;return{getClassGroupId:h=>{if(h.startsWith("[")&&h.endsWith("]"))return Lw(h);const m=h.split(Jr),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?zw(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],d=s.nextPart.get(o);if(d){const g=ov(a,i+1,d);if(g)return g}const h=s.validators;if(h===null)return;const m=i===0?a.join(Jr):a.slice(i).join(Jr),y=h.length;for(let g=0;g<y;g++){const x=h[g];if(x.validator(m))return x.classGroupId}},Lw=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?Mw+r:void 0})(),Uw=a=>{const{theme:i,classGroups:s}=a;return Bw(s,i)},Bw=(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 d=0;d<o;d++){const h=a[d];Hw(h,i,s,r)}},Hw=(a,i,s,r)=>{if(typeof a=="string"){qw(a,i,s);return}if(typeof a=="function"){$w(a,i,s,r);return}Kw(a,i,s,r)},qw=(a,i,s)=>{const r=a===""?i:cv(i,a);r.classGroupId=s},$w=(a,i,s,r)=>{if(Yw(a)){Ud(a(r),i,s,r);return}i.validators===null&&(i.validators=[]),i.validators.push(Dw(s,a))},Kw=(a,i,s,r)=>{const o=Object.entries(a),d=o.length;for(let h=0;h<d;h++){const[m,y]=o[h];Ud(y,cv(i,m),s,r)}},cv=(a,i)=>{let s=a;const r=i.split(Jr),o=r.length;for(let d=0;d<o;d++){const h=r[d];let m=s.nextPart.get(h);m||(m=rv(),s.nextPart.set(h,m)),s=m}return s},Yw=a=>"isThemeGetter"in a&&a.isThemeGetter===!0,Gw=a=>{if(a<1)return{get:()=>{},set:()=>{}};let i=0,s=Object.create(null),r=Object.create(null);const o=(d,h)=>{s[d]=h,i++,i>a&&(i=0,r=s,s=Object.create(null))};return{get(d){let h=s[d];if(h!==void 0)return h;if((h=r[d])!==void 0)return o(d,h),h},set(d,h){d in s?s[d]=h:o(d,h)}}},od="!",Cg=":",Vw=[],kg=(a,i,s,r,o)=>({modifiers:a,hasImportantModifier:i,baseClassName:s,maybePostfixModifierPosition:r,isExternal:o}),Qw=a=>{const{prefix:i,experimentalParseClassName:s}=a;let r=o=>{const d=[];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){d.push(o.slice(y,w)),y=w+1;continue}if(N==="/"){g=w;continue}}N==="["?h++:N==="]"?h--:N==="("?m++:N===")"&&m--}const b=d.length===0?o:o.slice(y);let S=b,E=!1;b.endsWith(od)?(S=b.slice(0,-1),E=!0):b.startsWith(od)&&(S=b.slice(1),E=!0);const O=g&&g>y?g-y:void 0;return kg(d,E,S,O)};if(i){const o=i+Cg,d=r;r=h=>h.startsWith(o)?d(h.slice(o.length)):kg(Vw,!1,h,void 0,!0)}if(s){const o=r;r=d=>s({className:d,parseClassName:o})}return r},Xw=a=>{const i=new Map;return a.orderSensitiveModifiers.forEach((s,r)=>{i.set(s,1e6+r)}),s=>{const r=[];let o=[];for(let d=0;d<s.length;d++){const h=s[d],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}},Zw=a=>({cache:Gw(a.cacheSize),parseClassName:Qw(a),sortModifiers:Xw(a),...Rw(a)}),Iw=/\s+/,Jw=(a,i)=>{const{parseClassName:s,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:d}=i,h=[],m=a.trim().split(Iw);let y="";for(let g=m.length-1;g>=0;g-=1){const x=m[g],{isExternal:b,modifiers:S,hasImportantModifier:E,baseClassName:O,maybePostfixModifierPosition:w}=s(x);if(b){y=x+(y.length>0?" "+y:y);continue}let N=!!w,k=r(N?O.substring(0,w):O);if(!k){if(!N){y=x+(y.length>0?" "+y:y);continue}if(k=r(O),!k){y=x+(y.length>0?" "+y:y);continue}N=!1}const $=S.length===0?"":S.length===1?S[0]:d(S).join(":"),z=E?$+od:$,M=z+k;if(h.indexOf(M)>-1)continue;h.push(M);const L=o(k,N);for(let G=0;G<L.length;++G){const X=L[G];h.push(z+X)}y=x+(y.length>0?" "+y:y)}return y},Fw=(...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},Pw=(a,...i)=>{let s,r,o,d;const h=y=>{const g=i.reduce((x,b)=>b(x),a());return s=Zw(g),r=s.cache.get,o=s.cache.set,d=m,m(y)},m=y=>{const g=r(y);if(g)return g;const x=Jw(y,s);return o(y,x),x};return d=h,(...y)=>d(Fw(...y))},Ww=[],it=a=>{const i=s=>s[a]||Ww;return i.isThemeGetter=!0,i},dv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ej=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,tj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nj=/\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$/,aj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ij=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fa=a=>ej.test(a),je=a=>!!a&&!Number.isNaN(Number(a)),ha=a=>!!a&&Number.isInteger(Number(a)),Pu=a=>a.endsWith("%")&&je(a.slice(0,-1)),Un=a=>tj.test(a),hv=()=>!0,lj=a=>nj.test(a)&&!aj.test(a),Bd=()=>!1,rj=a=>ij.test(a),oj=a=>sj.test(a),cj=a=>!re(a)&&!oe(a),uj=a=>va(a,gv,Bd),re=a=>dv.test(a),Ua=a=>va(a,yv,lj),Eg=a=>va(a,vj,je),dj=a=>va(a,bv,hv),fj=a=>va(a,vv,Bd),Ag=a=>va(a,mv,Bd),hj=a=>va(a,pv,oj),Hr=a=>va(a,xv,rj),oe=a=>fv.test(a),Zs=a=>Va(a,yv),mj=a=>Va(a,vv),Tg=a=>Va(a,mv),pj=a=>Va(a,gv),gj=a=>Va(a,pv),qr=a=>Va(a,xv,!0),yj=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",vj=a=>a==="number",vv=a=>a==="family-name",bv=a=>a==="number"||a==="weight",xv=a=>a==="shadow",bj=()=>{const a=it("color"),i=it("font"),s=it("text"),r=it("font-weight"),o=it("tracking"),d=it("leading"),h=it("breakpoint"),m=it("container"),y=it("spacing"),g=it("radius"),x=it("shadow"),b=it("inset-shadow"),S=it("text-shadow"),E=it("drop-shadow"),O=it("blur"),w=it("perspective"),N=it("aspect"),k=it("ease"),$=it("animate"),z=()=>["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],ge=()=>["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],A=()=>[...M(),Tg,Ag,{position:[oe,re]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",pj,uj,{size:[oe,re]}],R=()=>[Pu,Zs,Ua],F=()=>["","none","full",g,oe,re],ie=()=>["",je,Zs,Ua],pe=()=>["solid","dashed","dotted","double"],$e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[je,Pu,Tg,Ag],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:[cj],"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":z()}],"break-before":[{"break-before":z()}],"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:[...ge(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...ge()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":ge()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p: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,Zs,Ua]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,yj,dj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Pu,re]}],"font-family":[{font:[mj,fj,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,Eg]}],leading:[{leading:[d,...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:A()}],"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]},gj,hj]}],"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,Zs,Ua]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",x,qr,Hr]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",b,qr,Hr]}],"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,qr,Hr]}],"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":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[oe,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask: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",E,qr,Hr]}],"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",k,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,Zs,Ua,Eg]}],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"]}},xj=Pw(bj);function Ft(...a){return xj(sv(a))}const Sj=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 u.jsx("div",{className:Ft(Sj({variant:i}),a),...s})}var wj=Symbol.for("react.lazy"),Fr=fd[" use ".trim().toString()];function jj(a){return typeof a=="object"&&a!==null&&"then"in a}function wv(a){return a!=null&&typeof a=="object"&&"$$typeof"in a&&a.$$typeof===wj&&"_payload"in a&&jj(a._payload)}function Nj(a){const i=kj(a),s=j.forwardRef((r,o)=>{let{children:d,...h}=r;wv(d)&&typeof Fr=="function"&&(d=Fr(d._payload));const m=j.Children.toArray(d),y=m.find(Aj);if(y){const g=y.props.children,x=m.map(b=>b===y?j.Children.count(g)>1?j.Children.only(null):j.isValidElement(g)?g.props.children:null:b);return u.jsx(i,{...h,ref:o,children:j.isValidElement(g)?j.cloneElement(g,void 0,x):null})}return u.jsx(i,{...h,ref:o,children:d})});return s.displayName=`${a}.Slot`,s}var Cj=Nj("Slot");function kj(a){const i=j.forwardRef((s,r)=>{let{children:o,...d}=s;if(wv(o)&&typeof Fr=="function"&&(o=Fr(o._payload)),j.isValidElement(o)){const h=Oj(o),m=Tj(d,o.props);return o.type!==j.Fragment&&(m.ref=r?Ad(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 Ej=Symbol("radix.slottable");function Aj(a){return j.isValidElement(a)&&typeof a.type=="function"&&"__radixId"in a.type&&a.type.__radixId===Ej}function Tj(a,i){const s={...i};for(const r in i){const o=a[r],d=i[r];/^on[A-Z]/.test(r)?o&&d?s[r]=(...m)=>{const y=d(...m);return o(...m),y}:o&&(s[r]=o):r==="style"?s[r]={...o,...d}:r==="className"&&(s[r]=[o,d].filter(Boolean).join(" "))}return{...a,...s}}function Oj(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 _j=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},d)=>{const h=r?Cj:"button";return u.jsx(h,{ref:d,className:Ft(_j({variant:i,size:s,className:a})),...o})});me.displayName="Button";const Ie=j.forwardRef(({className:a,...i},s)=>u.jsx("div",{ref:s,className:Ft("rounded-xl border border-zinc-800 bg-zinc-950/75 shadow-[0_0_0_1px_rgba(255,255,255,0.01)] backdrop-blur",a),...i}));Ie.displayName="Card";const zj=j.forwardRef(({className:a,...i},s)=>u.jsx("div",{ref:s,className:Ft("flex flex-col gap-1.5 p-5",a),...i}));zj.displayName="CardHeader";const Dj=j.forwardRef(({className:a,...i},s)=>u.jsx("h3",{ref:s,className:Ft("font-medium tracking-tight text-zinc-50",a),...i}));Dj.displayName="CardTitle";const Mj=j.forwardRef(({className:a,...i},s)=>u.jsx("p",{ref:s,className:Ft("text-sm text-zinc-500",a),...i}));Mj.displayName="CardDescription";const Rj=j.forwardRef(({className:a,...i},s)=>u.jsx("div",{ref:s,className:Ft("p-5 pt-0",a),...i}));Rj.displayName="CardContent";const Lj=Wy,Uj=ev,jv=j.forwardRef(({className:a,...i},s)=>u.jsx(zd,{ref:s,className:Ft("fixed inset-0 z-50 bg-black/70 backdrop-blur-sm",a),...i}));jv.displayName=zd.displayName;const Bj=400,Hj=1200,qj=720,Nv=j.forwardRef(({className:a,children:i,...s},r)=>{const[o,d]=j.useState(qj),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 E=m.current-S.clientX,O=Math.min(Hj,Math.max(Bj,y.current+E));d(O)},[]),b=j.useCallback(()=>{h.current=!1},[]);return u.jsxs(Uj,{children:[u.jsx(jv,{}),u.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:[u.jsx("div",{className:"absolute inset-y-0 left-0 w-1.5 cursor-col-resize hover:bg-zinc-700/50 active:bg-zinc-600/50 transition-colors max-md:hidden",onPointerDown:g,onPointerMove:x,onPointerUp:b}),i,u.jsxs(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:[u.jsx(Ld,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});Nv.displayName=Dd.displayName;const $j=({className:a,...i})=>u.jsx("div",{className:Ft("flex flex-col gap-1.5 pr-10",a),...i}),Cv=j.forwardRef(({className:a,...i},s)=>u.jsx(Md,{ref:s,className:Ft("text-lg font-medium text-zinc-50",a),...i}));Cv.displayName=Md.displayName;const kv=j.forwardRef(({className:a,...i},s)=>u.jsx(tv,{ref:s,className:Ft("text-sm text-zinc-500",a),...i}));kv.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 Fi(a){return{id:a.id,projectId:a.projectId,projectName:a.projectName,kind:a.kind,kindLabel:a.kindLabel,status:a.status,trigger:a.trigger??"manual",createdAt:a.createdAt,startedAt:a.startedAt,duration:a.duration,statusDetail:a.statusDetail,summary:a.summary,triggerLabel:a.triggerLabel}}const Ev=Fi({id:"run_citypoint_visibility_20260308",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"completed",createdAt:"2026-03-08T12:15:00.000Z",startedAt:"Mar 8, 12:15 PM",duration:"6m 12s",statusDetail:"18 tracked queries checked; 3 citation losses detected on emergency-intent prompts.",summary:"Citation losses on emergency-intent prompts",triggerLabel:"Scheduled"}),Pr=Fi({id:"run_citypoint_audit_20260308",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"site-audit",kindLabel:"Technical readiness audit",status:"partial",createdAt:"2026-03-08T09:20:00.000Z",startedAt:"Mar 8, 9:20 AM",duration:"14m 41s",statusDetail:"Sitemap fallback engaged; 461 of 500 pages analyzed and llms.txt was not found.",summary:"Fallback crawl completed with missing llms.txt",triggerLabel:"Manual"}),Hd=Fi({id:"run_citypoint_queued_20260309",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"queued",createdAt:"2026-03-09T08:05:00.000Z",startedAt:"Mar 9, 8:05 AM",duration:"Waiting for slot",statusDetail:"Ready to enqueue after the next provider rate window clears.",summary:"Queued follow-up after local ranking movement",triggerLabel:"Manual"}),qd=Fi({id:"run_harbor_visibility_20260308",projectId:"project_harbor",projectName:"Harbor Legal Group",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"completed",createdAt:"2026-03-08T11:05:00.000Z",startedAt:"Mar 8, 11:05 AM",duration:"5m 07s",statusDetail:"12 tracked queries checked; local-intent visibility held steady across branded prompts.",summary:"Branded prompts remain stable",triggerLabel:"Scheduled"}),Av=Fi({id:"run_harbor_audit_20260307",projectId:"project_harbor",projectName:"Harbor Legal Group",kind:"site-audit",kindLabel:"Technical readiness audit",status:"completed",createdAt:"2026-03-07T15:40:00.000Z",startedAt:"Mar 7, 3:40 PM",duration:"11m 33s",statusDetail:"Sitemap-first crawl completed with 99% success and no blocking readiness regressions.",summary:"Audit clean after service-page consolidation",triggerLabel:"Scheduled"}),Wr=Fi({id:"run_northstar_visibility_20260308",projectId:"project_northstar",projectName:"Northstar Orthopedics",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"running",createdAt:"2026-03-08T13:40:00.000Z",startedAt:"Mar 8, 1:40 PM",duration:"3m 10s",statusDetail:"Provider responses still in flight for 9 multi-location prompts.",summary:"Mid-run on treatment-location prompts",triggerLabel:"Manual"}),Kj=[Hd,Ev,Pr,qd,Av,Wr],Yj=[{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"])}],Gj=[{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}],readinessSummary:{label:"Technical Readiness",value:"78 / 100",delta:"+4 after schema fixes",tone:"positive",description:"Schema fixes landed, but sitemap fallback and missing llms.txt still reduce confidence.",trend:[71,72,73,76,78]},competitorPressure:{label:"Competitor Pressure",value:"High",delta:"2 rivals moved up",tone:"negative",description:"Downtown Smiles and Harbor Dental now own the highest-intent local prompts.",trend:[54,58,61,65,69]},runStatus:{label:"Run Status",value:"Partial",delta:"1 queued follow-up",tone:"caution",description:"Latest technical audit completed in fallback mode; next visibility sweep is queued.",trend:[76,74,72,68,67]},insights:[{id:"insight_citypoint_lost_citations",tone:"negative",title:"Lost citation on 1 key phrase",detail:"Emergency-intent prompts stopped grounding Citypoint after competitors refreshed.",actionLabel:"Lost",affectedPhrases:[{keyword:"emergency dentist brooklyn",evidenceId:"evidence_citypoint_emergency_gemini",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:Yj,technicalFindings:[{id:"finding_citypoint_schema",severity:"high",title:"Emergency service page lost FAQ schema",detail:"The page most closely tied to high-intent emergency prompts is no longer exposing FAQPage markup.",impact:"Removes a strong grounding signal from the page that previously earned citations."},{id:"finding_citypoint_llms",severity:"medium",title:"llms.txt is still missing",detail:"The latest site audit could not fetch llms.txt or llms-full.txt.",impact:"Lowers crawler clarity and weakens the story when visibility drops."},{id:"finding_citypoint_internal_links",severity:"low",title:"Insurance and pediatric content sit too deep",detail:"Supporting pages needed for family and insurance prompts sit three clicks from the homepage.",impact:"Limits discovery for lower-volume but high-trust prompt variants."}],competitors:[{id:"competitor_citypoint_downtown",domain:"downtownsmiles.com",citationCount:4,totalKeywords:8,pressureLabel:"High",citedKeywords:["emergency dentist","same-day dental","walk-in dentist","tooth pain"],movement:"Up on emergency and availability prompts",notes:"Recently added same-day booking proof and FAQ content."},{id:"competitor_citypoint_harbor",domain:"harbordental.com",citationCount:2,totalKeywords:8,pressureLabel:"Moderate",citedKeywords:["family dentist","emergency dentist"],movement:"Holding citations on family and emergency intents",notes:"Strong appointment and insurance content keeps answers grounded."},{id:"competitor_citypoint_clearline",domain:"clearlineortho.com",citationCount:1,totalKeywords:8,pressureLabel:"Low",citedKeywords:["invisalign near me"],movement:"Softening on Invisalign prompts",notes:"Case-study content is aging, opening room for Citypoint."}],recentRuns:[Hd,Ev,Pr]},{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}],readinessSummary:{label:"Technical Readiness",value:"83 / 100",delta:"+1 this week",tone:"positive",description:"Service pages consolidated cleanly and structured data remains intact.",trend:[80,80,81,82,83]},competitorPressure:{label:"Competitor Pressure",value:"Moderate",delta:"Steady",tone:"neutral",description:"Competitors are stable; no new citation displacement was detected.",trend:[44,46,45,46,46]},runStatus:{label:"Run Status",value:"Healthy",delta:"No failures in 14 days",tone:"positive",description:"Latest visibility and audit runs completed without fallback.",trend:[88,89,90,90,91]},insights:[{id:"insight_harbor_cluster",tone:"positive",title:"Practice-area clustering is paying off",detail:"Merged legal service pages now ground broader informational prompts.",actionLabel:"Cited",affectedPhrases:[{keyword:"brooklyn personal injury lawyer",evidenceId:"evidence_harbor_personal_injury",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"])}],technicalFindings:[{id:"finding_harbor_faq",severity:"low",title:"FAQ answers could be more concise",detail:"Some FAQ answers are still long enough to reduce snippet clarity.",impact:"This is optimization, not a blocker."}],competitors:[{id:"competitor_harbor_shoreline",domain:"shorelineinjury.com",citationCount:2,totalKeywords:6,pressureLabel:"Moderate",citedKeywords:["personal injury lawyer","car accident attorney"],movement:"Stable",notes:"Strong case-result pages keep it in rotation."}],recentRuns:[qd,Av]},{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}],readinessSummary:{label:"Technical Readiness",value:"76 / 100",delta:"+3 after template cleanup",tone:"positive",description:"Location templates are cleaner, but location-specific proof still needs depth.",trend:[69,71,72,74,76]},competitorPressure:{label:"Competitor Pressure",value:"Moderate",delta:"Watching 1 chain",tone:"caution",description:"Regional chain competitors are winning on broad treatment questions.",trend:[49,51,52,54,56]},runStatus:{label:"Run Status",value:"Running",delta:"9 prompts remaining",tone:"neutral",description:"Current answer-visibility sweep is still collecting provider responses.",trend:[63,64,65,67,68]},insights:[{id:"insight_northstar_location_depth",tone:"caution",title:"Location pages need stronger proof",detail:"Answers prefer competitors with physician-specific evidence.",actionLabel:"Gap",affectedPhrases:[{keyword:"knee replacement surgeon westchester",evidenceId:"evidence_northstar_knee",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"])}],technicalFindings:[{id:"finding_northstar_proof",severity:"medium",title:"Location pages lack physician-specific proof",detail:"Treatment pages are structurally sound but still too generic for highly specific prompts.",impact:"Limits how often the provider is cited for local treatment questions."}],competitors:[{id:"competitor_northstar_regional",domain:"regionaljointcare.com",citationCount:5,totalKeywords:7,pressureLabel:"High",citedKeywords:["knee replacement","hip surgery","joint pain treatment","orthopedic surgeon","sports medicine"],movement:"Winning broad treatment prompts",notes:"Heavy physician proof and patient-story content."}],recentRuns:[Wr]}],Vj={portfolioOverview:{projects:[{project:Yi[0],visibilityScore:61,visibilityDelta:"-8 this week",readinessScore:78,readinessDelta:"+4 after schema fixes",lastRun:Pr,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",readinessScore:83,readinessDelta:"+1 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",readinessScore:76,readinessDelta:"+3 after template cleanup",lastRun:Wr,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,Wr,Pr],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:Gj,runs:Kj,setup:{healthChecks:[{id:"api",label:"API reachable",detail:"Primary control plane is responding.",state:"ready",guidance:"Required for project creation and run history."},{id:"worker",label:"Worker heartbeats received",detail:"Background execution loop is alive.",state:"ready",guidance:"Required before any answer-visibility or site-audit run can start."},{id:"provider",label:"Provider configured",detail:"Gemini key and quota defaults are present.",state:"ready",guidance:"Required for answer-visibility sweeps."}],projectDraft:{name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",country:"US",language:"en"},keywordImportState:{mode:"paste",keywordCount:18,preview:["emergency dentist brooklyn","best invisalign dentist downtown brooklyn","pediatric dentist brooklyn heights"]},competitorDraft:{domains:["downtownsmiles.com","harbordental.com","clearlineortho.com"],notes:"Start with the domains that already displace the project on money prompts."},launchState:{enabled:!0,ctaLabel:"Launch first run",summary:"Queue a visibility sweep first, then follow with a site audit to explain movement."}},settings:{providerStatuses:[{name:"Gemini",model:"gemini-2.5-flash",state:"ready",detail:"API key detected and conservative quota defaults are active.",quota:{maxConcurrency:2,maxRequestsPerMinute:10,maxRequestsPerDay:1e3}},{name:"OpenAI",model:"gpt-4o",state:"ready",detail:"API key configured.",quota:{maxConcurrency:2,maxRequestsPerMinute:10,maxRequestsPerDay:1e3}},{name:"Claude",model:"claude-sonnet-4-6",state:"needs-config",detail:"API key is missing."}],selfHostNotes:["Run behind a reverse proxy before exposing the dashboard outside a trusted network.","Keep bootstrap and provider secrets out of source control.","Use persistent Postgres storage before treating run history as durable."],bootstrapNote:"Bootstrap/admin secrets stay in the environment; they do not belong in the UI."}},Qj={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 Xj(a={}){const i=structuredClone(Vj),s=structuredClone(Qj);if(a.emptyPortfolio&&(i.portfolioOverview.projects=[],i.portfolioOverview.attentionItems=[{id:"attention_setup",tone:"neutral",title:"No projects yet",detail:"Start the guided setup flow to add a domain, import keywords, and launch the first run.",actionLabel:"Open setup",href:"/setup"}],i.portfolioOverview.recentRuns=[],i.portfolioOverview.emptyState={title:"No projects yet",detail:"Canonry becomes useful after one project, a small keyword set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}),a.runScenario==="partial"&&(i.runs[0].status="partial",i.runs[0].duration="7m 24s",i.runs[0].statusDetail="Quota window closed mid-run; 14 of 18 prompts completed before the worker paused.",i.runs[0].summary="Partial visibility sweep after quota cap",i.portfolioOverview.recentRuns[0]=i.runs[0]),a.runScenario==="failed"&&(i.runs[0].status="failed",i.runs[0].duration="1m 43s",i.runs[0].statusDetail="Worker could not reach the provider after repeated retry exhaustion.",i.runs[0].summary="Provider retries exhausted before results were captured",i.portfolioOverview.recentRuns[0]=i.runs[0],i.portfolioOverview.attentionItems.unshift({id:"attention_failed_run",tone:"negative",title:"One queued follow-up failed to start cleanly",detail:"Worker retries exhausted before the provider returned a response.",actionLabel:"Open runs",href:"/runs"})),a.degradedWorker&&(s.workerStatus={label:"Worker",state:"error",detail:"heartbeat stale · last seen 12m ago",version:"phase-1",databaseConfigured:!0,lastHeartbeatAt:"2026-03-09T07:55:00.000Z"}),a.providerNeedsConfig&&(i.settings.providerStatuses=i.settings.providerStatuses.map(r=>({...r,state:"needs-config",detail:"API key is missing, so answer-visibility sweeps are blocked."}))),a.visibilityDropProjectId){const r=i.projects.find(d=>d.project.id===a.visibilityDropProjectId),o=i.portfolioOverview.projects.find(d=>d.project.id===a.visibilityDropProjectId);r&&(r.visibilitySummary.value="49 / 100",r.visibilitySummary.delta="-12 in 48h",r.visibilitySummary.tone="negative",r.visibilitySummary.description="A sharper drop than normal; citations slipped across both local and service-intent prompts.",r.insights.unshift({id:`${r.project.id}_drop`,tone:"negative",title:"Sharp citation drop detected",detail:"Answers that previously cited the domain now ground competitors on both local and service-intent prompts.",actionLabel:"Lost",affectedPhrases:r.visibilityEvidence.filter(d=>d.citationState==="lost").slice(0,5).map(d=>({keyword:d.keyword,evidenceId:d.id,provider:d.provider||void 0,citationState:d.citationState}))}),r.technicalFindings?.unshift({id:`${r.project.id}_drop_finding`,severity:"high",title:"Primary supporting page fell out of crawl emphasis",detail:"The drop correlates with weaker internal links and missing FAQ markup on the main conversion page.",impact:"Both citation share and trust signals deteriorated at the same time."})),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 Tv(a,i){return a.projects.find(s=>s.project.id===i)}function Zj(a,i){return a.runs.find(s=>s.id===i)}function Ij(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 Jj="/api/v1";function Fj(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.apiKey?window.__CANONRY_CONFIG__.apiKey:""}async function Ye(a,i){const s=Fj(),r=await fetch(`${Jj}${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 Pj(){return Ye("/projects")}function Wj(){return Ye("/runs")}function al(a){return Ye(`/runs/${encodeURIComponent(a)}`)}function eN(a){return Ye(`/projects/${encodeURIComponent(a)}/keywords`)}function Ov(a){return Ye(`/projects/${encodeURIComponent(a)}/competitors`)}function tN(a){return Ye(`/projects/${encodeURIComponent(a)}/timeline`)}function _v(a,i){return Ye(`/projects/${encodeURIComponent(a)}`,{method:"PUT",body:JSON.stringify(i)})}function nN(a,i){return Ye(`/projects/${encodeURIComponent(a)}/keywords`,{method:"PUT",body:JSON.stringify({keywords:i})})}function aN(a,i){return Ye(`/projects/${encodeURIComponent(a)}/keywords`,{method:"POST",body:JSON.stringify({keywords:i})})}function zv(a,i){return Ye(`/projects/${encodeURIComponent(a)}/competitors`,{method:"PUT",body:JSON.stringify({competitors:i})})}function Dv(a){return Ye(`/projects/${encodeURIComponent(a)}/runs`,{method:"POST",body:"{}"})}async function iN(a){await Ye(`/projects/${encodeURIComponent(a)}`,{method:"DELETE",body:"{}"})}function sN(a){return Ye(`/projects/${encodeURIComponent(a)}/export`)}function lN(){return Ye("/settings")}function rN(a,i){return Ye(`/settings/providers/${encodeURIComponent(a)}`,{method:"PUT",body:JSON.stringify(i)})}async function oN(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 cN(a){await Ye(`/projects/${encodeURIComponent(a)}/schedule`,{method:"DELETE",body:"{}"})}function uN(a){return Ye(`/projects/${encodeURIComponent(a)}/notifications`)}function dN(a,i){return Ye(`/projects/${encodeURIComponent(a)}/notifications`,{method:"POST",body:JSON.stringify(i)})}async function fN(a,i){await Ye(`/projects/${encodeURIComponent(a)}/notifications/${encodeURIComponent(i)}`,{method:"DELETE",body:"{}"})}function hN(a,i){return Ye(`/projects/${encodeURIComponent(a)}/notifications/${encodeURIComponent(i)}/test`,{method:"POST",body:"{}"})}function mN(a,i,s){return Ye(`/projects/${encodeURIComponent(a)}/keywords/generate`,{method:"POST",body:JSON.stringify({provider:i,count:s})})}function pN(a){return Ye("/apply",{method:"POST",body:JSON.stringify(a)})}function Mv(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 _g(a){try{return new Date(a).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return a}}function gN(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),d=r%60;return`${o}m ${d}s`}function Rv(a){return a==="answer-visibility"?"Answer visibility sweep":a}function yN(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:Rv(a.kind),status:a.status,trigger:a.trigger??"manual",createdAt:a.createdAt,startedAt:a.startedAt?_g(a.startedAt):_g(a.createdAt),duration:gN(a.startedAt,a.finishedAt),statusDetail:a.error?Lv(a.error):vN(a),summary:bN(a),triggerLabel:yN(a.trigger)}}function Lv(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 vN(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?Lv(a.error):"Run failed.";default:return""}}function bN(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 Uv(a){if(a.length===0)return{score:0,citedCount:0,totalCount:0};const i=new Map;for(const d of a){const h=d.keyword??d.id;i.has(h)||i.set(h,!1),d.citationState==="cited"&&i.set(h,!0)}const s=i.size,r=[...i.values()].filter(Boolean).length;return{score:s>0?Math.round(r/s*100):0,citedCount:r,totalCount:s}}function xN(a){return a>=70?"positive":a>=40?"caution":"negative"}function SN(a){return a==="High"?"negative":a==="Moderate"?"caution":"neutral"}function Bv(a,i){if(a.length===0||i.length===0)return{label:"None",count:0};const s=new Set(i);let r=0;for(const d of a)d.competitorOverlap.some(h=>s.has(h))&&r++;const o=r/a.length;return o>=.5?{label:"High",count:r}:o>=.2?{label:"Moderate",count:r}:{label:"Low",count:r}}function wN(a,i,s,r){const o=[];let d=0;const h=new Set;if(s){const m=new Map;for(const g of s.snapshots)if(g.keyword){const x=`${g.keyword}::${g.provider}`;m.set(x,g)}const y=[...new Set(s.snapshots.map(g=>g.provider))].sort();y.length===0&&y.push("gemini");for(const g of i){if(g.runs.length===0)continue;h.add(g.keyword);const b=g.runs.at(-1)?.transition??"not-cited",S=b==="lost"?"lost":b==="emerging"?"emerging":b==="cited"?"cited":"not-cited";for(const E of y){const O=m.get(`${g.keyword}::${E}`);if(!O&&y.length>1)continue;const w=g.providerRuns?.[E],N=w&&w.length>0,k=N?w.at(-1).transition:b,$=k==="lost"?"lost":k==="emerging"?"emerging":O?O.citationState==="cited"?"cited":"not-cited":S,z=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}_${d++}`,keyword:g.keyword,provider:O?.provider??E,citationState:$,changeLabel:jN(k,z),answerSnippet:O?.answerText??"",citedDomains:O?.citedDomains??[],evidenceUrls:[],competitorDomains:O?.competitorOverlap??[],relatedTechnicalSignals:[],groundingSources:O?.groundingSources??[],summary:NN($,g.keyword),runHistory:M})}}}for(const m of r)h.has(m.keyword)||o.push({id:`evidence_${a}_${d++}`,keyword:m.keyword,provider:"",citationState:"pending",changeLabel:"Awaiting first run",answerSnippet:"",citedDomains:[],evidenceUrls:[],competitorDomains:[],relatedTechnicalSignals:[],groundingSources:[],summary:`"${m.keyword}" has been added but no visibility run has been triggered yet.`,runHistory:[]});return 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 jN(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 NN(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 zg(a,i){const s=new Set(i),r=new Map;for(const o of a)if(o.keyword)for(const d of o.competitorOverlap){if(!s.has(d))continue;const h=r.get(d)??new Set;h.add(o.keyword),r.set(d,h)}return r}const Wu=3;function CN(a){const{evidence:i,timeline:s,latestSnapshots:r,previousSnapshots:o,trackedCompetitors:d}=a,h=[],m=[],y=new Set;for(const k of i)k.citationState==="lost"&&(y.has(k.keyword)||(y.add(k.keyword),m.push({keyword:k.keyword,evidenceId:k.id,provider:k.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=zg(r,d),x=zg(o,d);for(const k of d){const $=g.get(k)??new Set,z=x.get(k)??new Set,M=[...$].filter(L=>!z.has(L));M.length>0&&h.push({id:`insight_comp_gained_${k}`,tone:"negative",title:`${k} 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 k of s){const $=k.runs.at(-1);$&&b.set(k.keyword,{transition:$.transition,citationState:$.citationState})}const S=[],E=[],O=new Set;for(const[k,{transition:$,citationState:z}]of b){if(!($==="emerging"||$==="new"&&z==="cited"))continue;O.add(k);const L=i.find(G=>G.keyword===k&&(G.citationState==="emerging"||G.citationState==="cited"));S.push({keyword:k,evidenceId:L?.id??"",provider:L?.provider,citationState:"emerging"})}for(const k of i)k.citationState==="emerging"&&(O.has(k.keyword)||E.push({keyword:k.keyword,evidenceId:k.id,provider:k.provider,citationState:"emerging"}));if(E.length>0){const k=new Set(E.map($=>$.keyword)).size;h.push({id:"insight_provider_pickup",tone:"positive",title:`Picked up by new provider on ${k} keyword${k>1?"s":""}`,detail:"Your domain started appearing on additional providers.",actionLabel:"Pickup",affectedPhrases:E})}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(k=>k.keyword)),N=[];for(const k of s){if(!w.has(k.keyword)||k.runs.length<Wu||k.runs.at(-1)?.citationState!=="not-cited")continue;if(cd(k.runs)>=Wu){const M=i.find(L=>L.keyword===k.keyword);N.push({keyword:k.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 ${Wu}+ runs`,detail:"These keywords have not been cited by any provider across multiple consecutive runs.",actionLabel:"Gap",affectedPhrases:N});for(const k of d){const $=g.get(k)??new Set,M=[...x.get(k)??new Set].filter(L=>!$.has(L));M.length>0&&h.push({id:`insight_comp_lost_${k}`,tone:"neutral",title:`${k} 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 kN(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: ${Rv(i.kind)} — ${i.status}`,tooltip:"Current execution state of visibility sweeps. Shows the status of the most recent run and total run count.",trend:[]}}function EN(a){const i=Mv(a.project),s=wN(i.name,a.timeline,a.latestRunDetail,a.keywords),r=a.latestRunDetail?.snapshots??[],o=Uv(r),d=Bv(r,a.competitors.map(b=>b.domain)),h=CN({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",E=g.get(S)??{cited:0,total:0};E.total++,b.citationState==="cited"&&E.cited++,g.set(S,E)}const x=[...g.entries()].sort(([b],[S])=>b.localeCompare(S)).map(([b,{cited:S,total:E}])=>({provider:b,score:E>0?Math.round(S/E*100):0,cited:S,total:E}));return{project:i,dateRangeLabel:"All time",contextLabel:`${i.country} / ${i.language.toUpperCase()}`,visibilitySummary:{label:"Answer Visibility",value:r.length>0?`${o.score}`:"No data",delta:r.length>0?`${o.citedCount} of ${o.totalCount} key phrases visible`:"Run a sweep first",tone:r.length>0?xN(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,readinessSummary:void 0,competitorPressure:{label:"Competitor Pressure",value:d.label,delta:d.count>0?`${d.count} overlapping citations`:"No overlap detected",tone:SN(d.label),description:a.competitors.length>0?`${a.competitors.length} competitor${a.competitors.length>1?"s":""} tracked.`:"No competitors configured.",tooltip:"How often competitor domains appear alongside yours in AI answers. High pressure means competitors are frequently cited for the same key phrases.",trend:[]},runStatus:kN(m),insights:h,visibilityEvidence:s,technicalFindings:void 0,competitors:a.competitors.map((b,S)=>{const E=new Set;for(const $ of r)($.competitorOverlap.includes(b.domain)||$.citedDomains.includes(b.domain))&&$.keyword&&E.add($.keyword);const O=[...E],w=new Set(r.map($=>$.keyword).filter(Boolean)),N=w.size>0?O.length/w.size:0,k=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:k,citedKeywords:O,movement:"",notes:""}}),recentRuns:y.slice(0,5)}}function AN(a){const i=Mv(a.project),s=a.latestRunDetail?.snapshots??[],r=Uv(s),o=Bv(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",readinessScore:void 0,readinessDelta:void 0,lastRun:m,insight:s.length>0?`${r.citedCount} of ${r.totalCount} key phrases visible across ${new Set(s.map(y=>y.provider)).size} provider${new Set(s.map(y=>y.provider)).size>1?"s":""}.`:"No runs completed yet.",trend:[],competitorPressureLabel:o.label}}function TN(a,i){const s=[],r=[],o=[];for(const h of a){r.push(EN(h)),o.push(AN(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 d=a.length>0;return{portfolioOverview:{projects:o,attentionItems:d?ON(r):[{id:"attention_setup",tone:"neutral",title:"No projects yet",detail:"Create your first project using the setup wizard, CLI, or API.",actionLabel:"Open setup",href:"/setup"}],recentRuns:s.slice(0,5),systemHealth:[{id:"api",label:"API",tone:"positive",detail:"Connected",meta:"Real-time data"},{id:"provider",label:"Gemini",tone:"positive",detail:"Configured",meta:"Provider active"}],lastUpdatedAt:new Date().toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}),...d?{}:{emptyState:{title:"No projects yet",detail:"Canonry becomes useful after one project, a small key phrase set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}}},projects:r,runs:s,setup:{healthChecks:[{id:"api",label:"API reachable",detail:"API is responding.",state:"ready",guidance:"Required for project creation and run history."},{id:"provider",label:"Provider configured",detail:"Gemini key is configured.",state:"ready",guidance:"Required for answer-visibility sweeps."}],projectDraft:{name:"",canonicalDomain:"",country:"US",language:"en"},keywordImportState:{mode:"paste",keywordCount:0,preview:[]},competitorDraft:{domains:[],notes:"Use the CLI to add competitors."},launchState:{enabled:d,ctaLabel:d?"Trigger run":"Create a project first",summary:d?"Ready to run.":"Create a project first to launch a run."}},settings:{providerStatuses:(i?.providers??[]).map(h=>({name:h.name,model:h.model,state:h.configured?"ready":"needs-config",detail:h.configured?"Provider is configured.":"API key is missing.",quota:h.quota})),selfHostNotes:["Configuration is stored in ~/.canonry/config.yaml.","Database is SQLite at ~/.canonry/data.db.","API key was auto-generated during canonry init."],bootstrapNote:"Manage settings via ~/.canonry/config.yaml and restart the server."}}}function ON(a){const i=[];for(const s of a){const r=s.visibilityEvidence.filter(d=>d.citationState==="lost");r.length>0&&i.push({id:`attention_${s.project.id}_lost`,tone:"negative",title:`${s.project.displayName||s.project.name} lost citations`,detail:`${r.length} key phrase${r.length>1?"s":""} lost citation.`,actionLabel:"Open project",href:`/projects/${s.project.id}`});const o=s.recentRuns.filter(d=>d.status==="running"||d.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"}],_N=Xj(),Mg=a=>({label:a,state:"checking",detail:"Checking service health"}),zN={apiStatus:Mg("API"),workerStatus:Mg("Worker")};async function DN(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",d=typeof r.databaseUrlConfigured=="boolean"?r.databaseUrlConfigured:void 0,h=typeof r.lastHeartbeatAt=="string"?r.lastHeartbeatAt:void 0,m=[o,d===!1?"database not configured":"database configured",h?`heartbeat ${h}`:void 0].filter(Boolean).join(" · ");return{label:i,state:"ok",detail:m,version:o,databaseConfigured:d,lastHeartbeatAt:h}}catch(s){return{label:i,state:"error",detail:s instanceof Error?s.message:"unreachable"}}}function Gi(a){if(!a)return"/";const i=a.split("?")[0]??"/";return i===""?"/":i.length>1&&i.endsWith("/")?i.slice(0,-1):i}function MN(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 Tv(i,r)?{kind:"project",path:s,projectId:r}:{kind:"not-found",path:s}}return{kind:"not-found",path:s}}function RN(a){return a?Gi(a):typeof window<"u"?Gi(window.location.pathname):"/"}function eo(a){return a.state==="ok"?"positive":a.state==="checking"?"neutral":"negative"}function Hv(a){switch(a){case"completed":return"positive";case"partial":return"caution";case"failed":return"negative";case"queued":case"running":return"neutral"}}function LN(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 UN(a){switch(a){case"high":return"negative";case"medium":return"caution";case"low":return"neutral"}}function BN(a){const i=a.match(/^(\[.*?\])\s*(.+)/);if(i){const s=i[1],r=i[2],o=r.indexOf("{");if(o>=0){const d=r.slice(0,o).trim(),h=r.slice(o);try{const m=JSON.parse(h);return`${s} ${d}
|
|
184
|
+
|
|
185
|
+
${JSON.stringify(m,null,2)}`}catch{}}return`${s}
|
|
186
|
+
${r}`}try{const s=JSON.parse(a);return JSON.stringify(s,null,2)}catch{return a}}function ol(a){return a.split("-").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" ")}function HN(a,i,s){return a.map(r=>{if(r.id==="api")return{...r,tone:eo(i.apiStatus),detail:i.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:i.apiStatus.detail};if(r.id==="worker")return{...r,tone:eo(i.workerStatus),detail:i.workerStatus.state==="ok"?"Healthy":"Needs attention",meta:i.workerStatus.detail};const o=s.providerStatuses.filter(y=>y.state==="ready").length,d=s.providerStatuses.length,h=o>0,m=s.providerStatuses.filter(y=>y.state==="ready").map(y=>Yv[y.name]??y.name).join(" · ");return{...r,label:"Providers",tone:h?"positive":"caution",detail:`${o} of ${d} configured`,meta:m||"None configured"}})}function qN(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 $N(a,i,s){const r=qN(i,s),o=structuredClone(a);return o.healthChecks=o.healthChecks.map(d=>{if(d.id==="api")return{...d,detail:i.apiStatus.detail,state:i.apiStatus.state==="ok"?"ready":"attention"};if(d.id==="worker")return{...d,detail:i.workerStatus.detail,state:i.workerStatus.state==="ok"?"ready":"attention"};const h=s.providerStatuses.some(m=>m.state==="ready");return{...d,detail:h?"At least one provider configured.":"No providers configured.",state:h?"ready":"attention"}}),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 $r(a,i){return i==="projects"?a.kind==="projects"||a.kind==="project":i==="project"?a.kind==="project":a.kind===i}function KN({points:a,tone:i}){const s=j.useId();if(a.length===0)return null;const r=42,o=132,d=5,h=Math.min(...a),y=Math.max(...a)-h||1,g=o-d*2,x=r-d*2,b=a.map((S,E)=>{const O=d+E/Math.max(a.length-1,1)*g,w=d+(1-(S-h)/y)*x;return`${O},${w}`}).join(" ");return u.jsxs("svg",{className:`sparkline sparkline-${i}`,viewBox:`0 0 ${o} ${r}`,"aria-hidden":"true",children:[u.jsx("defs",{children:u.jsx("clipPath",{id:s,children:u.jsx("rect",{x:d,y:d,width:g,height:x,rx:"8"})})}),u.jsx("line",{className:"sparkline-guide",x1:d,x2:o-d,y1:r-d,y2:r-d}),u.jsx("polyline",{clipPath:`url(#${s})`,points:b,vectorEffect:"non-scaling-stroke"})]})}function qv({text:a}){return u.jsxs("span",{className:"info-tooltip-wrapper",children:[u.jsxs("svg",{className:"info-tooltip-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[u.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),u.jsx("path",{d:"M8 7v4M8 5.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),u.jsx("span",{className:"info-tooltip-bubble",role:"tooltip",children:a})]})}function Is({value:a,label:i,delta:s,tone:r,description:o,tooltip:d,isNumeric:h=!0}){const g=2*Math.PI*48,x=Number.parseInt(a,10),b=h&&!Number.isNaN(x)?Math.min(x/100,1):.5,S=g*(1-b);return u.jsxs("div",{className:"score-gauge",children:[u.jsxs("div",{className:"gauge-ring-wrapper",children:[u.jsxs("svg",{className:"gauge-ring",viewBox:"0 0 120 120","aria-hidden":"true",children:[u.jsx("circle",{className:"gauge-bg",cx:"60",cy:"60",r:48,strokeWidth:6}),u.jsx("circle",{className:`gauge-fill gauge-fill-${r}`,cx:"60",cy:"60",r:48,strokeWidth:6,strokeDasharray:g,strokeDashoffset:S,transform:"rotate(-90 60 60)"})]}),u.jsx("div",{className:"gauge-center",children:u.jsx("span",{className:h?"gauge-value":"gauge-value-text",children:a.split(" / ")[0]})})]}),u.jsxs("p",{className:"gauge-label",children:[i,d&&u.jsx(qv,{text:d})]}),u.jsx("p",{className:"gauge-delta",children:s}),u.jsx("p",{className:"gauge-description",children:o})]})}function nt({tone:a,children:i}){const s=a==="positive"?"success":a==="caution"?"warning":a==="negative"?"destructive":"neutral";return u.jsx(Sv,{variant:s,children:i})}function po({status:a}){return u.jsx(nt,{tone:Hv(a),children:ol(a)})}function $v({state:a}){return u.jsx(nt,{tone:LN(a),children:ol(a)})}function Kv({run:a,onOpen:i}){return u.jsxs("article",{className:"run-row",children:[u.jsxs("div",{className:"run-row-main",children:[u.jsxs("div",{className:"run-row-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"run-row-title",children:a.summary}),u.jsxs("p",{className:"run-row-subtitle",children:[a.projectName," · ",a.kindLabel]})]}),u.jsx(po,{status:a.status})]}),u.jsx("p",{className:"run-row-detail",children:a.statusDetail})]}),u.jsxs("dl",{className:"run-row-meta",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Started"}),u.jsx("dd",{children:a.startedAt})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Duration"}),u.jsx("dd",{children:a.duration})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Trigger"}),u.jsx("dd",{children:a.triggerLabel})]})]}),u.jsx(me,{variant:"outline",size:"sm",type:"button",onClick:()=>i(a.id),children:"View run"})]})}function 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 u.jsx("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide ${i[a]??"border-zinc-700 bg-zinc-800 text-zinc-300"}`,children:a})}function YN({insights:a,onOpenEvidence:i}){const[s,r]=j.useState(null);return u.jsx("div",{className:"insight-list",children:a.map(o=>{const d=s===o.id,h=o.affectedPhrases.length>0;return u.jsxs("div",{children:[u.jsxs("div",{className:`insight-row insight-row-${o.tone} ${h?"cursor-pointer":""}`,onClick:h?()=>r(d?null:o.id):void 0,children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[h&&u.jsx(Rd,{size:12,className:`shrink-0 text-zinc-500 transition-transform duration-150 ${d?"rotate-90":""}`}),u.jsx(nt,{tone:o.tone,children:o.actionLabel}),u.jsx("span",{className:"text-sm font-medium text-zinc-100 truncate",children:o.title}),u.jsx("span",{className:"hidden sm:inline text-xs text-zinc-500 truncate",children:o.detail})]}),h&&u.jsxs("span",{className:"text-[11px] text-zinc-600 whitespace-nowrap",children:[o.affectedPhrases.length," phrase",o.affectedPhrases.length>1?"s":""]})]}),d&&u.jsx("div",{className:"divide-y divide-zinc-800/20",children:o.affectedPhrases.map(m=>u.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2 pl-9 bg-zinc-900/40",children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[u.jsx($v,{state:m.citationState}),u.jsx("span",{className:"text-sm text-zinc-200 truncate",children:m.keyword}),u.jsx("div",{className:"hidden sm:flex gap-1",children:m.provider&&u.jsx(Kd,{provider:m.provider})})]}),u.jsx("button",{type:"button",className:"text-xs text-zinc-400 hover:text-zinc-200 whitespace-nowrap transition-colors",onClick:y=>{y.stopPropagation(),i(m.evidenceId)},children:"View →"})]},m.evidenceId))})]},o.id)})})}function GN({history:a,maxDots:i=12}){const s=a.slice(-i);if(s.length===0)return u.jsx("span",{className:"text-[11px] text-zinc-600",children:"No data"});const r={cited:"bg-emerald-400","not-cited":"bg-zinc-600",lost:"bg-rose-400",emerging:"bg-emerald-400 ring-1 ring-emerald-300/60"};return u.jsx("div",{className:"flex items-center gap-[3px]",title:`${s.length} runs`,children:s.map((o,d)=>u.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()}`},d))})}function VN(a){const i=new Map;for(const r of a)for(const o of r.runHistory){const d=i.get(o.createdAt);d?d.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:d}])=>({runId:d,createdAt:r,citationState:o.includes("cited")?"cited":o.includes("emerging")?"emerging":"not-cited"}))}function QN({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",d=VN(i),h=i.filter(x=>x.citationState==="cited"||x.citationState==="emerging").length,m=(()=>{if(d.length<4)return"flat";const x=d.slice(-3),b=d.slice(-6,-3);if(b.length===0)return"flat";const S=x.filter(O=>O.citationState==="cited"||O.citationState==="emerging").length,E=b.filter(O=>O.citationState==="cited"||O.citationState==="emerging").length;return S>E?"up":S<E?"down":"flat"})(),y=(()=>{if(d.length===0)return"Awaiting first run";if(d.length===1)return"First observation";const x=d[d.length-1].citationState,b=d[d.length-2].citationState,S=x==="cited"||x==="emerging",E=b==="cited"||b==="emerging";if(!E&&S)return"Newly cited";if(E&&!S)return"Lost citation";let O=0;for(let w=d.length-1;w>=0;w--){const N=d[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 u.jsxs("div",{className:`evidence-phrase-card evidence-phrase-card--${o}`,children:[u.jsx("div",{className:"evidence-card-header",children:u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("p",{className:"evidence-card-keyword",children:a}),u.jsxs("div",{className:"evidence-card-status-row",children:[u.jsx($v,{state:o}),u.jsxs("span",{className:`evidence-card-trend evidence-card-trend--${m}`,children:[u.jsx("span",{"aria-hidden":"true",children:g}),u.jsx("span",{children:y})]})]})]})}),u.jsxs("div",{className:"evidence-card-timeline-row",children:[u.jsx(GN,{history:d,maxDots:14}),u.jsxs("span",{className:"evidence-card-ratio",children:[h,"/",i.length," provider",i.length!==1?"s":""]})]}),u.jsxs("div",{className:"evidence-card-providers",children:[i.filter(x=>x.citationState!=="pending").map(x=>u.jsxs("button",{type:"button",className:`evidence-provider-btn evidence-provider-btn--${x.citationState}`,onClick:()=>s(x.id),title:`View ${x.provider} evidence for "${a}"`,children:[u.jsx("span",{className:"capitalize",children:x.provider}),u.jsx("span",{"aria-hidden":"true",className:"font-bold",children:x.citationState==="cited"||x.citationState==="emerging"?"✓":x.citationState==="lost"?"✗":"–"}),u.jsx("span",{className:"opacity-50 text-[10px]",children:"View →"})]},x.id)),i.every(x=>x.citationState==="pending")&&u.jsx("span",{className:"text-xs text-zinc-500 italic py-1",children:"Awaiting first run"})]})]})}function XN({evidence:a,onOpenEvidence:i}){const s=j.useMemo(()=>{const r=new Map;for(const o of a){const d=r.get(o.keyword)??[];r.set(o.keyword,[...d,o])}return[...r.entries()].map(([o,d])=>({phrase:o,items:d}))},[a]);return s.length===0?u.jsx("p",{className:"supporting-copy",children:"No key phrases tracked yet."}):u.jsx("div",{className:"evidence-card-grid",children:s.map(({phrase:r,items:o})=>u.jsx(QN,{phrase:r,items:o,onOpenEvidence:i},r))})}function ZN({findings:a}){return u.jsx("div",{className:"findings-table-wrap",children:u.jsxs("table",{className:"findings-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Severity"}),u.jsx("th",{children:"Finding"}),u.jsx("th",{children:"Detail"}),u.jsx("th",{children:"Impact"})]})}),u.jsx("tbody",{children:a.map(i=>u.jsxs("tr",{children:[u.jsx("td",{children:u.jsx(nt,{tone:UN(i.severity),children:ol(i.severity)})}),u.jsx("td",{className:"font-medium text-zinc-100",children:i.title}),u.jsx("td",{className:"text-zinc-400",children:i.detail}),u.jsx("td",{className:"text-zinc-500",children:i.impact})]},i.id))})]})})}function IN(a){return a==="High"?"negative":a==="Moderate"?"caution":"neutral"}function JN({competitors:a}){return a.length===0?u.jsx("p",{className:"text-sm text-zinc-500",children:"No competitors configured. Add competitors to track overlap."}):u.jsx("div",{className:"competitor-table-wrap",children:u.jsxs("table",{className:"competitor-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Domain"}),u.jsx("th",{children:"Pressure"}),u.jsx("th",{children:"Citations"}),u.jsx("th",{children:"Key Phrases"})]})}),u.jsx("tbody",{children:a.map(i=>u.jsxs("tr",{children:[u.jsx("td",{className:"font-medium text-zinc-100",children:i.domain}),u.jsx("td",{children:u.jsx(nt,{tone:IN(i.pressureLabel),children:i.pressureLabel})}),u.jsx("td",{className:"text-zinc-300 tabular-nums",children:i.totalKeywords>0?`${i.citationCount} / ${i.totalKeywords}`:"—"}),u.jsx("td",{className:"text-zinc-500 text-xs",children:i.citedKeywords.length>0?i.citedKeywords.join(", "):"Not cited"})]},i.id))})]})})}function FN({project:a,onNavigate:i}){const s=`/projects/${a.project.id}`;return u.jsxs("a",{className:"project-row cursor-pointer",href:s,onClick:Mt(i,s),children:[u.jsxs("div",{className:"project-row-primary",children:[u.jsxs("div",{children:[u.jsx("p",{className:"project-name",children:a.project.name}),u.jsx("p",{className:"project-domain",children:a.project.canonicalDomain})]}),u.jsx("p",{className:"project-insight",children:a.insight})]}),u.jsx("div",{className:"project-row-stat",children:u.jsxs("div",{className:"metric-inline-block",children:[u.jsx("p",{className:"metric-inline-label",children:"Answer Visibility"}),u.jsx("p",{className:"metric-inline-value",children:a.visibilityScore}),u.jsx("p",{className:"metric-inline-delta",children:a.visibilityDelta})]})}),u.jsx("div",{className:"project-row-stat",children:u.jsxs("div",{className:"metric-inline-block",children:[u.jsx("p",{className:"metric-inline-label",children:"Technical Readiness"}),u.jsx("p",{className:"metric-inline-value text-zinc-500",children:a.readinessScore??"—"}),u.jsx("p",{className:"metric-inline-delta",children:a.readinessDelta??"Coming soon"})]})}),u.jsx("div",{className:"project-row-stat",children:u.jsxs("div",{className:"metric-inline-block",children:[u.jsx("p",{className:"metric-inline-label",children:"Competitor Pressure"}),u.jsx("p",{className:"metric-inline-value",children:a.competitorPressureLabel}),u.jsxs("p",{className:"metric-inline-delta",children:[a.lastRun.kindLabel," · ",ol(a.lastRun.status)]})]})}),u.jsx("div",{className:"project-row-chart",children:u.jsx(KN,{points:a.trend,tone:Hv(a.lastRun.status)})}),u.jsx("span",{className:"project-row-link",children:u.jsx(Rd,{className:"h-4 w-4 text-zinc-500"})})]})}function PN({model:a,systemHealth:i,onNavigate:s,onOpenRun:r}){return u.jsxs("div",{className:"page-container",children:[u.jsxs("div",{className:"page-header",children:[u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Portfolio"}),u.jsx("p",{className:"page-subtitle",children:"Visibility and execution state across all projects"})]}),u.jsx("div",{className:"page-header-right",children:u.jsx("p",{className:"text-[11px] text-zinc-600",children:a.lastUpdatedAt})})]}),a.projects.length>0?u.jsx("div",{className:"project-list project-list-scrollable",children:a.projects.map(o=>u.jsx(FN,{project:o,onNavigate:s},o.project.id))}):u.jsxs(Ie,{className:"surface-card empty-card",children:[u.jsx("h3",{children:a.emptyState?.title??"No projects yet"}),u.jsx("p",{className:"supporting-copy",children:a.emptyState?.detail}),u.jsx(me,{size:"sm",asChild:!0,children:u.jsx("a",{href:a.emptyState?.ctaHref??"/setup",onClick:Mt(s,a.emptyState?.ctaHref??"/setup"),children:a.emptyState?.ctaLabel??"Launch setup"})})]}),u.jsxs("div",{className:"overview-secondary-grid",children:[a.attentionItems.length>0&&u.jsxs("section",{className:"overview-secondary-section",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Needs attention"}),u.jsx("h2",{className:"section-title-sm",children:"What changed"})]})}),u.jsx("div",{className:"attention-list attention-list-scrollable",children:a.attentionItems.map(o=>u.jsxs("a",{className:`attention-item attention-item-${o.tone}`,href:o.href,onClick:Mt(s,o.href),children:[u.jsxs("div",{children:[u.jsx("p",{className:"attention-title",children:o.title}),u.jsx("p",{className:"attention-detail",children:o.detail})]}),u.jsx("span",{className:"attention-action",children:o.actionLabel})]},o.id))})]}),u.jsxs("section",{className:"overview-secondary-section",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Recent runs"}),u.jsx("h2",{className:"section-title-sm",children:"Activity"})]})}),u.jsx("div",{className:"compact-stack compact-stack-scrollable",children:a.recentRuns.length>0?a.recentRuns.map(o=>u.jsxs("button",{className:"compact-run",type:"button",onClick:()=>r(o.id),children:[u.jsxs("div",{children:[u.jsx("p",{className:"compact-run-title",children:o.projectName}),u.jsx("p",{className:"compact-run-detail",children:o.summary})]}),u.jsx(po,{status:o.status})]},o.id)):u.jsx("p",{className:"supporting-copy",children:"Run history appears here after the first launch."})})]})]}),u.jsxs("section",{className:"page-section",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"System health"}),u.jsx("h2",{className:"section-title-sm",children:"Infrastructure"})]})}),u.jsx("div",{className:"health-grid",children:i.map(o=>u.jsxs(Ie,{className:"surface-card compact-card",children:[u.jsxs("div",{className:"section-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:o.label}),u.jsx("h3",{children:o.detail})]}),u.jsx(nt,{tone:o.tone,children:o.label})]}),u.jsx("p",{className:"supporting-copy",children:o.meta})]},o.id))})]})]})}function WN({projects:a,onNavigate:i,onProjectCreated:s}){const[r,o]=j.useState(!1),[d,h]=j.useState(""),[m,y]=j.useState(""),[g,x]=j.useState(""),[b,S]=j.useState("US"),[E,O]=j.useState("en"),[w,N]=j.useState(!1),[k,$]=j.useState(null),z=d.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),M=async()=>{if(!(!z||!g)){N(!0),$(null);try{const L=await _v(z,{displayName:m||d,canonicalDomain:g,country:b,language:E});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 u.jsxs("div",{className:"page-container",children:[u.jsxs("div",{className:"page-header",children:[u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Projects"}),u.jsxs("p",{className:"page-subtitle",children:[a.length," project",a.length!==1?"s":""," tracked"]})]}),u.jsx("div",{className:"page-header-right",children:u.jsxs(me,{type:"button",onClick:()=>o(L=>!L),children:[u.jsx(Sg,{className:"size-4 mr-1.5"}),"Add project"]})})]}),r?u.jsxs(Ie,{className:"surface-card mb-6",children:[u.jsx("div",{className:"section-head",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"New project"}),u.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Create a new monitoring project"})]})}),u.jsxs("div",{className:"compact-stack mt-4",children:[u.jsxs("div",{className:"setup-field-row",children:[u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-project-name",children:"Project name"}),u.jsx("input",{id:"new-project-name",className:"setup-input",type:"text",placeholder:"my-project",value:d,onChange:L=>h(L.target.value)}),z&&z!==d?u.jsxs("p",{className:"supporting-copy",children:["Slug: ",z]}):null]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-display-name",children:"Display name"}),u.jsx("input",{id:"new-display-name",className:"setup-input",type:"text",placeholder:"My Project",value:m,onChange:L=>y(L.target.value)})]})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-domain",children:"Canonical domain"}),u.jsx("input",{id:"new-domain",className:"setup-input",type:"text",placeholder:"example.com",value:g,onChange:L=>x(L.target.value)})]}),u.jsxs("div",{className:"setup-field-row",children:[u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-country",children:"Country"}),u.jsx("input",{id:"new-country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:b,onChange:L=>S(L.target.value.toUpperCase())})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-language",children:"Language"}),u.jsx("input",{id:"new-language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:E,onChange:L=>O(L.target.value.toLowerCase())})]})]})]}),k?u.jsx("p",{className:"text-rose-400 text-sm mt-3",children:k}):null,u.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[u.jsx(me,{type:"button",disabled:!z||!g||w,onClick:M,children:w?"Creating...":"Create project"}),u.jsx(me,{type:"button",variant:"ghost",onClick:()=>o(!1),children:"Cancel"})]})]}):null,a.length>0?u.jsx("div",{className:"data-table-wrapper",children:u.jsxs("table",{className:"data-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Name"}),u.jsx("th",{children:"Domain"}),u.jsx("th",{children:"Visibility"}),u.jsx("th",{children:"Last run"}),u.jsx("th",{className:"text-right",children:"Country"})]})}),u.jsx("tbody",{children:a.map(L=>{const G=`/projects/${L.project.id}`,X=L.recentRuns[0];return u.jsxs("tr",{className:"cursor-pointer",onClick:()=>i(G),children:[u.jsxs("td",{children:[u.jsx("a",{className:"text-zinc-100 font-medium hover:underline",href:G,onClick:Mt(i,G),children:L.project.displayName||L.project.name}),u.jsx("p",{className:"text-[11px] text-zinc-500",children:L.project.name})]}),u.jsx("td",{className:"text-zinc-400",children:L.project.canonicalDomain}),u.jsx("td",{children:u.jsx(nt,{tone:L.visibilitySummary.tone,children:L.visibilitySummary.value})}),u.jsx("td",{className:"text-zinc-500 text-sm",children:X?u.jsx(po,{status:X.status}):u.jsx("span",{className:"text-zinc-600",children:"No runs"})}),u.jsx("td",{className:"text-right text-zinc-500",children:L.project.country})]},L.project.id)})})]})}):r?null:u.jsxs(Ie,{className:"surface-card empty-card",children:[u.jsx("h3",{children:"No projects yet"}),u.jsx("p",{className:"supporting-copy",children:"Create your first monitoring project to start tracking AI visibility."}),u.jsxs(me,{type:"button",onClick:()=>o(!0),children:[u.jsx(Sg,{className:"size-4 mr-1.5"}),"Add project"]})]}),u.jsx(e2,{onApplied:s})]})}function e2({onApplied:a}){const[i,s]=j.useState(""),[r,o]=j.useState(!1),[d,h]=j.useState([]),[m,y]=j.useState([]),g=async()=>{if(!i.trim())return;o(!0),h([]),y([]);const x=AS(i),b=[],S=[];for(let E=0;E<x.length;E++){const O=x[E];if(O.errors.length>0){b.push(`Document ${E+1}: ${O.errors[0]?.message}`);continue}const w=O.toJSON();if(!(!w||typeof w!="object"))try{const N=await pN(w);S.push(`Applied "${N.displayName||N.name}" (revision ${N.configRevision})`)}catch(N){b.push(`Document ${E+1}: ${N instanceof Error?N.message:String(N)}`)}}h(S),y(b),o(!1),S.length>0&&a()};return u.jsxs("section",{className:"mt-8",children:[u.jsx("div",{className:"page-section-divider"}),u.jsx("div",{className:"section-head mt-6",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Config as code"}),u.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Apply YAML"})]})}),u.jsxs("p",{className:"text-zinc-500 text-sm mb-3",children:["Paste a ",u.jsx("code",{className:"text-zinc-400",children:"canonry.yaml"})," config (multi-document YAML with ",u.jsx("code",{className:"text-zinc-400",children:"---"})," separators supported)."]}),u.jsx("textarea",{className:"setup-input w-full font-mono text-xs",rows:10,placeholder:`apiVersion: canonry/v1
|
|
187
|
+
kind: Project
|
|
188
|
+
metadata:
|
|
189
|
+
name: my-project
|
|
190
|
+
spec:
|
|
191
|
+
canonicalDomain: example.com
|
|
192
|
+
country: US
|
|
193
|
+
language: en
|
|
194
|
+
keywords: []`,value:i,onChange:x=>s(x.target.value)}),d.length>0&&u.jsx("ul",{className:"mt-2 space-y-1",children:d.map((x,b)=>u.jsx("li",{className:"text-emerald-400 text-sm",children:x},b))}),m.length>0&&u.jsx("ul",{className:"mt-2 space-y-1",children:m.map((x,b)=>u.jsx("li",{className:"text-rose-400 text-sm",children:x},b))}),u.jsx("div",{className:"mt-3",children:u.jsx(me,{type:"button",disabled:!i.trim()||r,onClick:g,children:r?"Applying...":"Apply"})})]})}function t2({model:a,onOpenEvidence:i,onOpenRun:s,onTriggerRun:r,onDeleteProject:o,onAddKeywords:d,onAddCompetitors:h}){const[m,y]=j.useState(!1),[g,x]=j.useState(!1),[b,S]=j.useState(!1),[E,O]=j.useState(null),[w,N]=j.useState(!1),[k,$]=j.useState(""),[z,M]=j.useState(!1),[L,G]=j.useState(!1),[X,D]=j.useState(""),[P,Se]=j.useState(!1);async function W(){const te=await sN(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=k.split(`
|
|
195
|
+
`).map(B=>B.trim()).filter(Boolean);if(te.length!==0){M(!0);try{await d(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 ge=te=>!Number.isNaN(Number.parseInt(te,10));return u.jsxs("div",{className:"page-container",children:[m?u.jsxs(Ie,{className:"surface-card p-6 mb-6 border-rose-800/60",children:[u.jsx("h3",{className:"text-base font-semibold text-rose-400 mb-2",children:"Delete project?"}),u.jsxs("p",{className:"text-sm text-zinc-400 mb-4",children:["This will permanently delete ",u.jsx("strong",{className:"text-zinc-200",children:a.project.displayName||a.project.name})," and all its key phrases, competitors, runs, and snapshots. This cannot be undone."]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(me,{type:"button",variant:"destructive",disabled:g,onClick:async()=>{x(!0),o(a.project.name)},children:g?"Deleting...":"Yes, delete project"}),u.jsx(me,{type:"button",variant:"outline",disabled:g,onClick:()=>y(!1),children:"Cancel"})]})]}):null,u.jsxs("div",{className:"page-header",children:[u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:a.project.displayName||a.project.name}),u.jsxs("p",{className:"page-subtitle",children:[a.project.canonicalDomain," · ",a.contextLabel]}),u.jsxs("div",{className:"tag-row",children:[u.jsx("span",{className:"tag",children:a.project.country}),u.jsx("span",{className:"tag",children:a.project.language.toUpperCase()}),a.project.tags.map(te=>u.jsx("span",{className:"tag",children:te},te))]})]}),u.jsxs("div",{className:"page-header-right",children:[u.jsx("p",{className:"text-sm text-zinc-500",children:a.dateRangeLabel}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(me,{type:"button",variant:"outline",size:"icon",onClick:W,"aria-label":"Export project as YAML",children:u.jsx(pw,{className:"h-4 w-4 text-zinc-400"})}),u.jsx(me,{type:"button",variant:"outline",size:"icon",onClick:()=>y(!0),"aria-label":"Delete project",children:u.jsx(Ow,{className:"h-4 w-4 text-zinc-400"})}),u.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"})]})]})]}),E&&u.jsxs("div",{className:"mb-3 rounded-lg border border-rose-800/40 bg-rose-950/20 px-3 py-2 text-sm text-rose-300",children:[E,u.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>O(null),children:"×"})]}),u.jsxs("section",{className:"gauge-row",children:[u.jsx(Is,{value:a.visibilitySummary.value,label:a.visibilitySummary.label,delta:a.visibilitySummary.delta,tone:a.visibilitySummary.tone,description:a.visibilitySummary.description,tooltip:a.visibilitySummary.tooltip,isNumeric:ge(a.visibilitySummary.value)}),a.readinessSummary?u.jsx(Is,{value:a.readinessSummary.value,label:a.readinessSummary.label,delta:a.readinessSummary.delta,tone:a.readinessSummary.tone,description:a.readinessSummary.description,tooltip:a.readinessSummary.tooltip,isNumeric:ge(a.readinessSummary.value)}):u.jsx(Is,{value:"N/A",label:"Technical Readiness",delta:"Coming soon",tone:"neutral",description:"Enable with site audits in a future release.",tooltip:"Site audit scores for technical SEO signals. Coming in a future release.",isNumeric:!1}),u.jsx(Is,{value:a.competitorPressure.value,label:a.competitorPressure.label,delta:a.competitorPressure.delta,tone:a.competitorPressure.tone,description:a.competitorPressure.description,tooltip:a.competitorPressure.tooltip,isNumeric:ge(a.competitorPressure.value)}),u.jsx(Is,{value:a.runStatus.value,label:a.runStatus.label,delta:a.runStatus.delta,tone:a.runStatus.tone,description:a.runStatus.description,tooltip:a.runStatus.tooltip,isNumeric:ge(a.runStatus.value)})]}),a.providerScores.length>1&&u.jsxs("section",{className:"page-section-divider",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Provider breakdown"}),u.jsxs("h2",{children:["Visibility by provider ",u.jsx(qv,{text:"Per-provider citation rate. Shows how often each AI engine cites your domain across all tracked key phrases. Useful for identifying which engines favor your content."})]})]})}),u.jsx("div",{className:"grid grid-cols-3 gap-3",children:a.providerScores.map(te=>u.jsxs(Ie,{className:"surface-card compact-card",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(Kd,{provider:te.provider}),u.jsxs("span",{className:`text-lg font-semibold ${te.score>=70?"text-emerald-400":te.score>=40?"text-amber-400":"text-rose-400"}`,children:[te.score,"%"]})]}),u.jsxs("p",{className:"mt-1 text-xs text-zinc-500",children:[te.cited," of ",te.total," key phrases cited"]})]},te.provider))})]}),u.jsxs("section",{className:"page-section-divider",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"What changed"}),u.jsx("h2",{children:"Citation signals"})]})}),u.jsx(YN,{insights:a.insights,onOpenEvidence:i})]}),u.jsxs("section",{className:"page-section-divider",children:[u.jsxs("div",{className:"section-head section-head-inline",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Visibility evidence"}),u.jsx("h2",{children:"Key phrase citation tracking"})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("p",{className:"supporting-copy",children:[new Set(a.visibilityEvidence.map(te=>te.keyword)).size," key phrases tracked"]}),u.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>N(!w),children:w?"Cancel":"+ Add key phrases"})]})]}),w&&u.jsxs("div",{className:"mb-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3",children:[u.jsx("textarea",{className:"w-full resize-none rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",rows:3,placeholder:"Enter key phrases, one per line",value:k,onChange:te=>$(te.target.value)}),u.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[u.jsxs("p",{className:"text-xs text-zinc-500",children:[k.split(`
|
|
196
|
+
`).filter(te=>te.trim()).length," key phrases"]}),u.jsx(me,{type:"button",size:"sm",disabled:!k.trim()||z,onClick:se,children:z?"Adding...":"Add key phrases"})]})]}),u.jsx(XN,{evidence:a.visibilityEvidence,onOpenEvidence:i})]}),a.technicalFindings&&a.technicalFindings.length>0?u.jsxs("section",{className:"page-section-divider",children:[u.jsxs("div",{className:"section-head section-head-inline",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Technical findings"}),u.jsx("h2",{children:"Readiness signals"})]}),u.jsxs("p",{className:"supporting-copy",children:[a.technicalFindings.length," findings"]})]}),u.jsx(ZN,{findings:a.technicalFindings})]}):u.jsx("section",{className:"page-section-divider",children:u.jsxs(Ie,{className:"surface-card compact-card",children:[u.jsxs("div",{className:"section-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Technical findings"}),u.jsx("h2",{className:"text-zinc-500",children:"Unavailable"})]}),u.jsx(nt,{tone:"neutral",children:"Coming soon"})]}),u.jsx("p",{className:"supporting-copy",children:"Technical readiness findings require site audits, which are planned for a future release."})]})}),u.jsxs("section",{className:"page-section-divider",children:[u.jsxs("div",{className:"section-head section-head-inline",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Competitors"}),u.jsx("h2",{children:"Competitive landscape"})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("p",{className:"supporting-copy",children:[a.competitors.length," tracked"]}),u.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>G(!L),children:L?"Cancel":"+ Add competitor"})]})]}),L&&u.jsxs("div",{className:"mb-3 flex gap-2 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3",children:[u.jsx("input",{className:"flex-1 rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"competitor.com",value:X,onChange:te=>D(te.target.value),onKeyDown:te=>te.key==="Enter"&&ue()}),u.jsx(me,{type:"button",size:"sm",disabled:!X.trim()||P,onClick:ue,children:P?"Adding...":"Add"})]}),u.jsx(JN,{competitors:a.competitors})]}),u.jsxs("section",{className:"page-section-divider",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Run timeline"}),u.jsx("h2",{children:"Recent execution history"})]})}),u.jsx("div",{className:"run-list",children:a.recentRuns.map(te=>u.jsx(Kv,{run:te,onOpen:s},te.id))})]}),u.jsx(l2,{projectName:a.project.name}),u.jsx(o2,{projectName:a.project.name})]})}const n2=[{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 a2(a,i){return a==="twice-daily"?"twice-daily":a.startsWith("weekly@")?`${a}@${i}`:`daily@${i}`}function i2(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 s2(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 d=a.match(/^weekly@(mon|tue|wed|thu|fri|sat|sun)(?:@(\d+))?$/);if(d){const h={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"},m=d[2]?parseInt(d[2]):6;return`Every ${h[d[1]]} at ${ud(m)} · ${r}`}return`${a} · ${r}`}function l2({projectName:a}){const[i,s]=j.useState("loading"),[r,o]=j.useState(!1),[d,h]=j.useState("daily"),[m,y]=j.useState(6),[g,x]=j.useState(""),[b,S]=j.useState("UTC"),[E,O]=j.useState(!1),[w,N]=j.useState(""),[k,$]=j.useState(!1),[z,M]=j.useState(!1),[L,G]=j.useState(null);j.useEffect(()=>{oN(a).then(s).catch(()=>s(null))},[a]);const X=()=>{if(i&&i!=="loading"){const W=i2(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:E?w.trim()||"UTC":b};d==="custom"?se.cron=g.trim():se.preset=a2(d,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 cN(a),s(null),o(!1)}catch(W){G(W instanceof Error?W.message:"Failed to remove schedule")}finally{M(!1)}};return u.jsxs("section",{className:"page-section-divider",children:[u.jsxs("div",{className:"section-head section-head-inline",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Automation"}),u.jsx("h2",{children:"Scheduled runs"})]}),i!=="loading"&&!r&&u.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:X,children:i?"Edit schedule":"+ Set schedule"})]}),i==="loading"&&u.jsx("p",{className:"supporting-copy",children:"Loading..."}),i!=="loading"&&!r&&i===null&&u.jsx(Ie,{className:"surface-card compact-card",children:u.jsx("p",{className:"supporting-copy",children:"No schedule configured. Set one to automatically trigger visibility sweeps."})}),i!=="loading"&&!r&&i!==null&&u.jsxs(Ie,{className:"surface-card compact-card",children:[u.jsxs("div",{className:"flex items-start justify-between gap-4",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-medium text-zinc-200",children:s2(i.preset??null,i.cronExpr,i.timezone)}),u.jsxs("p",{className:"text-xs text-zinc-500",children:["Cron: ",u.jsx("span",{className:"font-mono",children:i.cronExpr})]}),i.nextRunAt&&u.jsxs("p",{className:"text-xs text-zinc-500",children:["Next run: ",new Date(i.nextRunAt).toLocaleString()]}),i.lastRunAt&&u.jsxs("p",{className:"text-xs text-zinc-500",children:["Last run: ",new Date(i.lastRunAt).toLocaleString()]})]}),u.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[u.jsx(nt,{tone:i.enabled?"positive":"neutral",children:i.enabled?"Active":"Paused"}),u.jsx(me,{type:"button",variant:"outline",size:"sm",disabled:k,onClick:P,children:i.enabled?"Pause":"Resume"}),u.jsx(me,{type:"button",variant:"ghost",size:"sm",disabled:z,onClick:Se,children:z?"Removing...":"Remove"})]})]}),L&&u.jsx("p",{className:"text-rose-400 text-sm mt-2",children:L})]}),r&&u.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-3",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Frequency"}),u.jsx("select",{className:"w-full rounded border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none",value:d,onChange:W=>h(W.target.value),children:n2.map(W=>u.jsx("option",{value:W.value,children:W.label},W.value))})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Time"}),u.jsx("select",{className:"w-full rounded border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none disabled:opacity-40",value:m,disabled:d==="twice-daily"||d==="custom",onChange:W=>y(parseInt(W.target.value)),children:Array.from({length:24},(W,se)=>u.jsx("option",{value:se,children:ud(se)},se))})]})]}),d==="custom"&&u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Cron expression"}),u.jsx("input",{className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 font-mono focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"0 9 * * 1-5",value:g,onChange:W=>x(W.target.value)})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Timezone"}),u.jsxs("select",{className:"w-full rounded border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none",value:E?"Other":b,onChange:W=>{W.target.value==="Other"?(O(!0),S("Other")):(O(!1),S(W.target.value))},children:[Rg.map(W=>u.jsx("option",{value:W,children:W},W)),u.jsx("option",{value:"Other",children:"Other (enter manually)…"})]}),E&&u.jsx("input",{className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"e.g. America/New_York",value:w,onChange:W=>N(W.target.value)})]}),L&&u.jsx("p",{className:"text-rose-400 text-sm",children:L}),u.jsxs("div",{className:"flex gap-2 justify-end",children:[u.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!1),G(null)},children:"Cancel"}),u.jsx(me,{type:"button",size:"sm",disabled:k||d==="custom"&&!g.trim(),onClick:D,children:k?"Saving...":"Save schedule"})]})]})]})}const r2=[{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 o2({projectName:a}){const[i,s]=j.useState("loading"),[r,o]=j.useState(!1),[d,h]=j.useState(""),[m,y]=j.useState(["citation.lost","citation.gained"]),[g,x]=j.useState(!1),[b,S]=j.useState(null),[E,O]=j.useState({});j.useEffect(()=>{uN(a).then(s).catch(()=>s([]))},[a]);const w=z=>{y(M=>M.includes(z)?M.filter(L=>L!==z):[...M,z])},N=async()=>{if(!(!d.trim()||m.length===0)){x(!0),S(null);try{const z=await dN(a,{channel:"webhook",url:d.trim(),events:m});s(M=>M==="loading"?[z]:[...M,z]),h(""),y(["citation.lost","citation.gained"]),o(!1)}catch(z){S(z instanceof Error?z.message:"Failed to add webhook")}finally{x(!1)}}},k=async z=>{try{await fN(a,z),s(M=>M==="loading"?M:M.filter(L=>L.id!==z))}catch(M){S(M instanceof Error?M.message:"Failed to remove webhook")}},$=async z=>{O(M=>({...M,[z]:{state:"testing"}}));try{const M=await hN(a,z);O(L=>({...L,[z]:{state:M.ok?"ok":"fail",status:M.status}}))}catch{O(M=>({...M,[z]:{state:"fail"}}))}};return u.jsxs("section",{className:"page-section-divider",children:[u.jsxs("div",{className:"section-head section-head-inline",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Automation"}),u.jsx("h2",{children:"Notifications"})]}),i!=="loading"&&u.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!r),S(null)},children:r?"Cancel":"+ Add webhook"})]}),r&&u.jsxs("div",{className:"mb-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Webhook URL"}),u.jsx("input",{className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"url",placeholder:"https://hooks.example.com/canonry",value:d,onChange:z=>h(z.target.value)})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Trigger on"}),u.jsx("div",{className:"flex flex-wrap gap-3",children:r2.map(z=>u.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[u.jsx("input",{type:"checkbox",className:"rounded border-zinc-600 bg-zinc-800",checked:m.includes(z.value),onChange:()=>w(z.value)}),u.jsx("span",{className:"text-sm text-zinc-300",children:z.label})]},z.value))})]}),b&&u.jsx("p",{className:"text-rose-400 text-sm",children:b}),u.jsxs("div",{className:"flex gap-2 justify-end",children:[u.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!1),S(null)},children:"Cancel"}),u.jsx(me,{type:"button",size:"sm",disabled:g||!d.trim()||m.length===0,onClick:N,children:g?"Adding...":"Add webhook"})]})]}),i==="loading"&&u.jsx("p",{className:"supporting-copy",children:"Loading..."}),i!=="loading"&&i.length===0&&!r&&u.jsx(Ie,{className:"surface-card compact-card",children:u.jsx("p",{className:"supporting-copy",children:"No webhooks configured. Add one to get alerted when citations change or runs complete."})}),i!=="loading"&&i.length>0&&u.jsxs("div",{className:"evidence-table-wrap",children:[u.jsxs("table",{className:"evidence-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"URL"}),u.jsx("th",{children:"Events"}),u.jsx("th",{children:"Status"}),u.jsx("th",{})]})}),u.jsx("tbody",{children:i.map(z=>u.jsxs("tr",{children:[u.jsx("td",{className:"evidence-keyword-cell",children:u.jsx("span",{className:"font-mono text-xs text-zinc-300 break-all",children:z.url})}),u.jsx("td",{children:u.jsx("div",{className:"flex flex-wrap gap-1",children:z.events.map(M=>u.jsx("span",{className:"inline-flex items-center rounded-full border border-zinc-700 bg-zinc-800/60 px-2 py-0.5 text-[10px] font-medium text-zinc-400 uppercase tracking-wide",children:M.replace("."," ")},M))})}),u.jsx("td",{children:u.jsx(nt,{tone:z.enabled?"positive":"neutral",children:z.enabled?"Active":"Paused"})}),u.jsx("td",{children:u.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[E[z.id]&&(()=>{const M=E[z.id],L=M.state==="testing"?"Sending…":M.state==="ok"?`Delivered${M.status?` (${M.status})`:""}`:`Failed${M.status?` (${M.status})`:""}`;return u.jsx(nt,{tone:M.state==="ok"?"positive":M.state==="fail"?"negative":"neutral",children:L})})(),u.jsx(me,{variant:"ghost",size:"sm",type:"button",disabled:E[z.id]?.state==="testing",onClick:()=>$(z.id),children:"Test"}),u.jsx(me,{variant:"ghost",size:"sm",type:"button",onClick:()=>k(z.id),children:"Remove"})]})})]},z.id))})]}),b&&u.jsx("p",{className:"text-rose-400 text-sm mt-2",children:b})]})]})}function c2({runs:a,onOpenRun:i}){const[s,r]=j.useState("all"),o=s==="all"?a:a.filter(d=>d.status===s);return u.jsxs("div",{className:"page-container",children:[u.jsx("div",{className:"page-header",children:u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Runs"}),u.jsx("p",{className:"page-subtitle",children:"Status, type, project, duration, and the shortest explanation that makes the outcome trustworthy."})]})}),u.jsxs("section",{children:[u.jsx("div",{className:"filter-row",role:"toolbar","aria-label":"Run filters",children:["all","queued","running","completed","partial","failed"].map(d=>u.jsx("button",{className:`filter-chip ${s===d?"filter-chip-active":""}`,type:"button","aria-pressed":s===d,onClick:()=>r(d),children:d==="all"?"All runs":ol(d)},d))}),u.jsx("div",{className:"run-list",children:o.length>0?o.map(d=>u.jsx(Kv,{run:d,onOpen:i},d.id)):u.jsxs(Ie,{className:"surface-card empty-card",children:[u.jsx("h2",{children:"No runs match this filter"}),u.jsx("p",{children:"Try another status filter or queue a new run from a project command center."})]})})]})]})}const u2={openai:"https://platform.openai.com/api-keys",claude:"https://platform.claude.com/settings/keys"},Yv={gemini:"Gemini",openai:"OpenAI",claude:"Claude",local:"Local"},d2={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 f2({providerName:a,onSaved:i}){const s=a.toLowerCase()==="local",[r,o]=j.useState(""),[d,h]=j.useState(""),[m,y]=j.useState(""),[g,x]=j.useState(!1),[b,S]=j.useState(null),[E,O]=j.useState(!1),w=s?d.trim().length>0:r.trim().length>0;async function N(){if(w){x(!0),S(null),O(!1);try{await rN(a.toLowerCase(),{...r.trim()?{apiKey:r.trim()}:{},...d.trim()?{baseUrl:d.trim()}:{},...m.trim()?{model:m.trim()}:{}}),o(""),h(""),y(""),O(!0),i()}catch(z){S(z instanceof Error?z.message:"Failed to update provider")}finally{x(!1)}}}const k=u2[a.toLowerCase()],$=d2[a.toLowerCase()]??"Use default model";return u.jsxs("div",{className:"mt-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3 space-y-2",children:[s&&u.jsxs("div",{children:[u.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`base-url-${a}`,children:"Base URL"}),u.jsx("input",{id:`base-url-${a}`,type:"text",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"http://localhost:11434/v1",value:d,onChange:z=>h(z.target.value)}),u.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Any OpenAI-compatible endpoint — Ollama, LM Studio, llama.cpp, vLLM"})]}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("label",{className:"text-xs text-zinc-500",htmlFor:`api-key-${a}`,children:["API Key",s?" (optional)":""]}),k&&u.jsx("a",{href:k,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-zinc-500 hover:text-zinc-300 underline underline-offset-2",children:"Get API key ↗"})]}),u.jsx("input",{id:`api-key-${a}`,type:"password",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:s?"Optional — most local servers don't need one":`Enter ${a} API key`,value:r,onChange:z=>o(z.target.value)})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`model-${a}`,children:"Model (optional)"}),u.jsx("input",{id:`model-${a}`,type:"text",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:$,value:m,onChange:z=>y(z.target.value)})]}),b&&u.jsx("p",{className:"text-xs text-rose-400",children:b}),E&&u.jsx("p",{className:"text-xs text-emerald-400",children:"Provider updated."}),u.jsx(me,{type:"button",size:"sm",disabled:!w||g,onClick:N,children:g?"Saving...":"Save"})]})}function h2({settings:a,healthSnapshot:i,onSettingsChanged:s}){const[r,o]=j.useState(null);return u.jsxs("div",{className:"page-container",children:[u.jsx("div",{className:"page-header",children:u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Settings"}),u.jsx("p",{className:"page-subtitle",children:"Provider state, quotas, and service health."})]})}),u.jsxs("section",{className:"settings-grid",children:[a.providerStatuses.map(d=>u.jsxs(Ie,{className:"surface-card",children:[u.jsxs("div",{className:"section-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Provider"}),u.jsx("h2",{children:d.name})]}),u.jsx(nt,{tone:d.state==="ready"?"positive":"caution",children:d.state==="ready"?"Ready":"Needs config"})]}),u.jsxs("dl",{className:"definition-list mt-3",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Model"}),u.jsx("dd",{className:"font-mono text-xs",children:d.model})]}),d.quota&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Concurrency"}),u.jsx("dd",{children:d.quota.maxConcurrency})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Rate limit"}),u.jsxs("dd",{children:[d.quota.maxRequestsPerMinute,"/min · ",d.quota.maxRequestsPerDay,"/day"]})]})]})]}),u.jsx("p",{className:"mt-2 text-sm text-zinc-500",children:d.detail}),u.jsx("div",{className:"mt-2",children:u.jsx(me,{type:"button",variant:"outline",size:"sm",onClick:()=>o(r===d.name?null:d.name),children:r===d.name?"Cancel":d.state==="ready"?d.name.toLowerCase()==="local"?"Update config":"Update key":"Configure"})}),r===d.name&&u.jsx(f2,{providerName:d.name,onSaved:()=>{o(null),s?.()}})]},d.name)),u.jsxs(Ie,{className:"surface-card",children:[u.jsx("div",{className:"section-head",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Service health"}),u.jsx("h2",{children:"API and worker"})]})}),u.jsxs("div",{className:"compact-stack",children:[u.jsxs("div",{className:"health-row",children:[u.jsxs("div",{children:[u.jsx("p",{className:"run-row-title",children:"API"}),u.jsx("p",{className:"supporting-copy",children:i.apiStatus.detail})]}),u.jsx(nt,{tone:eo(i.apiStatus),children:i.apiStatus.state==="ok"?"Healthy":"Attention"})]}),u.jsxs("div",{className:"health-row",children:[u.jsxs("div",{children:[u.jsx("p",{className:"run-row-title",children:"Worker"}),u.jsx("p",{className:"supporting-copy",children:i.workerStatus.detail})]}),u.jsx(nt,{tone:eo(i.workerStatus),children:i.workerStatus.state==="ok"?"Healthy":"Attention"})]})]})]})]}),u.jsx("section",{className:"page-section",children:u.jsxs(Ie,{className:"surface-card",children:[u.jsx("div",{className:"section-head",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Self-host notes"}),u.jsx("h2",{children:"Operational guidance"})]})}),u.jsx("ul",{className:"detail-list",children:a.selfHostNotes.map(d=>u.jsx("li",{children:d},d))}),u.jsx("p",{className:"supporting-copy",children:a.bootstrapNote})]})})]})}const m2=[{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 p2({current:a,labels:i}){return u.jsx("div",{className:"setup-steps",role:"list","aria-label":"Setup progress",children:i.map((s,r)=>{const o=r<a,d=r===a;return u.jsxs("div",{className:`setup-step ${o?"setup-step-done":""} ${d?"setup-step-active":""}`,role:"listitem","aria-current":d?"step":void 0,children:[u.jsx("span",{className:"setup-step-number",children:o?"✓":r+1}),u.jsx("span",{className:"setup-step-label",children:s.label})]},s.label)})})}function g2({model:a,settings:i,onProjectCreated:s,onNavigate:r}){const[o,d]=j.useState(0),[h,m]=j.useState(""),[y,g]=j.useState(""),[x,b]=j.useState(""),[S,E]=j.useState("US"),[O,w]=j.useState("en"),[N,k]=j.useState(null),[$,z]=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),[ge,te]=j.useState(!1),B=i.providerStatuses.filter(ae=>ae.state==="ready"),[J,ne]=j.useState(B[0]?.name??""),[fe,I]=j.useState(5),[A,V]=j.useState(!1),[ee,R]=j.useState(null),[F,ie]=j.useState(""),[pe,$e]=j.useState(!1),[ye,Pt]=j.useState(null),[Rt,Wt]=j.useState(!1),[gn,yt]=j.useState(!1),[Qa,Xa]=j.useState(null),[cl,Pi]=j.useState(!1),en=h.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Lt=D.split(`
|
|
197
|
+
`).map(ae=>ae.trim()).filter(Boolean),yn=F.split(`
|
|
198
|
+
`).map(ae=>ae.trim()).filter(Boolean),go=a.healthChecks.some(ae=>ae.id==="api"&&ae.state==="ready"),yo=async()=>{if(!(!en||!x)){X(!0),L(null);try{const ae=await _v(en,{displayName:y||h,canonicalDomain:x,country:S,language:O});k(en),z(ae.id),s(),d(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 nN(N,ae),W(!0),s(),d(3)}catch(vn){ue(vn instanceof Error?vn.message:"Failed to save key phrases")}finally{te(!1)}}},vo=async()=>{if(!(!N||!J)){V(!0),R(null);try{const ae=await mN(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)}}},ul=async()=>{if(!N)return;const ae=yn;if(ae.length!==0){Wt(!0),Pt(null);try{await zv(N,ae),$e(!0),s(),d(4)}catch(vn){Pt(vn instanceof Error?vn.message:"Failed to save competitors")}finally{Wt(!1)}}},dl=async()=>{if(N){Pi(!0),Xa(null);try{await Dv(N),yt(!0),s()}catch(ae){Xa(ae instanceof Error?ae.message:"Failed to trigger run")}finally{Pi(!1)}}},Ut=()=>d(ae=>Math.max(0,ae-1)),bo=(()=>{switch(o){case 0:return u.jsxs(Ie,{className:"surface-card step-card",children:[u.jsx("div",{className:"section-head",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 1 of 5"}),u.jsx("h2",{children:"System ready"})]})}),u.jsx("p",{className:"supporting-copy",children:"Checking that your Canonry instance is configured and reachable."}),u.jsx("div",{className:"compact-stack",children:a.healthChecks.map(ae=>u.jsxs("div",{className:"health-check-row",children:[u.jsxs("div",{children:[u.jsx("p",{className:"run-row-title",children:ae.label}),u.jsx("p",{className:"supporting-copy",children:ae.detail}),ae.id==="provider"&&ae.state!=="ready"&&u.jsx("button",{type:"button",className:"text-emerald-400 hover:text-emerald-300 text-sm mt-1 underline underline-offset-2 cursor-pointer bg-transparent border-none p-0",onClick:()=>r("/settings"),children:"Configure providers"})]}),u.jsx(nt,{tone:ae.state==="ready"?"positive":"caution",children:ae.state==="ready"?"Ready":"Attention"})]},ae.id))}),u.jsxs("div",{className:"setup-nav",children:[u.jsx("span",{}),u.jsx(me,{type:"button",disabled:!go,onClick:()=>d(1),children:"Continue"})]})]});case 1:return u.jsxs(Ie,{className:"surface-card step-card",children:[u.jsxs("div",{className:"section-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 2 of 5"}),u.jsx("h2",{children:"Create project"})]}),N?u.jsx(nt,{tone:"positive",children:"Created"}):null]}),N?u.jsxs("div",{className:"compact-stack",children:[u.jsxs("p",{className:"text-zinc-300",children:["Project ",u.jsx("span",{className:"text-zinc-100 font-medium",children:N})," created successfully."]}),u.jsxs("div",{className:"setup-nav",children:[u.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),u.jsx(me,{type:"button",onClick:()=>d(2),children:"Continue"})]})]}):u.jsxs("div",{className:"compact-stack",children:[u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"project-name",children:"Project name"}),u.jsx("input",{id:"project-name",className:"setup-input",type:"text",placeholder:"my-website",value:h,onChange:ae=>m(ae.target.value)}),en&&en!==h?u.jsxs("p",{className:"supporting-copy",children:["Slug: ",en]}):null]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"display-name",children:"Display name (optional)"}),u.jsx("input",{id:"display-name",className:"setup-input",type:"text",placeholder:"My Website",value:y,onChange:ae=>g(ae.target.value)})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"domain",children:"Canonical domain"}),u.jsx("input",{id:"domain",className:"setup-input",type:"text",placeholder:"example.com",value:x,onChange:ae=>b(ae.target.value)})]}),u.jsxs("div",{className:"setup-field-row",children:[u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"country",children:"Country"}),u.jsx("input",{id:"country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:S,onChange:ae=>E(ae.target.value.toUpperCase())})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"language",children:"Language"}),u.jsx("input",{id:"language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:O,onChange:ae=>w(ae.target.value.toLowerCase())})]})]}),M?u.jsx("p",{className:"text-rose-400 text-sm",children:M}):null,u.jsxs("div",{className:"setup-nav",children:[u.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),u.jsx(me,{type:"button",disabled:!en||!x||G,onClick:yo,children:G?"Creating...":"Create project"})]})]})]});case 2:return u.jsxs(Ie,{className:"surface-card step-card",children:[u.jsxs("div",{className:"section-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 3 of 5"}),u.jsx("h2",{children:"Add key phrases"})]}),Se?u.jsxs(nt,{tone:"positive",children:[Lt.length," saved"]}):u.jsxs(nt,{tone:"neutral",children:[Lt.length," key phrase",Lt.length!==1?"s":""]})]}),u.jsx("p",{className:"supporting-copy",children:"Enter the search queries you want to track. One per line."}),Se?u.jsxs("div",{className:"compact-stack",children:[u.jsx("ul",{className:"detail-list",children:Lt.map(ae=>u.jsx("li",{children:ae},ae))}),u.jsxs("div",{className:"setup-nav",children:[u.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),u.jsx(me,{type:"button",onClick:()=>d(3),children:"Continue"})]})]}):u.jsxs("div",{className:"compact-stack",children:[B.length>0?u.jsxs("div",{className:"compact-stack",children:[u.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[u.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"auto-generate",u.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),u.jsxs("div",{className:"flex items-end gap-2",children:[u.jsxs("div",{className:"setup-field flex-1",children:[u.jsx("label",{className:"setup-label",htmlFor:"gen-provider",children:"Provider"}),u.jsx("select",{id:"gen-provider",className:"setup-input",value:J,onChange:ae=>ne(ae.target.value),children:B.map(ae=>u.jsxs("option",{value:ae.name,children:[Yv[ae.name]??ae.name,ae.model?` (${ae.model})`:""]},ae.name))})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"gen-count",children:"Count"}),u.jsx("select",{id:"gen-count",className:"setup-input",value:fe,onChange:ae=>I(Number(ae.target.value)),children:[3,5,10,15,20].map(ae=>u.jsx("option",{value:ae,children:ae},ae))})]}),u.jsx(me,{type:"button",variant:"outline",disabled:A||!J,onClick:vo,children:A?"Analyzing site...":"Generate"})]}),ee?u.jsx("p",{className:"text-rose-400 text-sm",children:ee}):null]}):null,u.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[u.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"or type manually",u.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"keywords",children:"Key phrases (one per line)"}),u.jsx("textarea",{id:"keywords",className:"setup-textarea",rows:6,placeholder:`emergency dentist brooklyn
|
|
202
|
+
best invisalign downtown brooklyn
|
|
203
|
+
pediatric dentist brooklyn heights`,value:D,onChange:ae=>P(ae.target.value)})]}),se?u.jsx("p",{className:"text-rose-400 text-sm",children:se}):null,u.jsxs("div",{className:"setup-nav",children:[u.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),u.jsx(me,{type:"button",disabled:Lt.length===0||ge,onClick:ht,children:ge?"Saving...":`Save ${Lt.length} key phrase${Lt.length!==1?"s":""}`})]})]})]});case 3:return u.jsxs(Ie,{className:"surface-card step-card",children:[u.jsxs("div",{className:"section-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 4 of 5"}),u.jsx("h2",{children:"Add competitors"})]}),pe?u.jsx(nt,{tone:"positive",children:"Saved"}):null]}),u.jsx("p",{className:"supporting-copy",children:"Domains that compete for the same key phrases. One per line."}),pe?u.jsxs("div",{className:"compact-stack",children:[u.jsx("ul",{className:"detail-list",children:yn.map(ae=>u.jsx("li",{children:ae},ae))}),u.jsxs("div",{className:"setup-nav",children:[u.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),u.jsx(me,{type:"button",onClick:()=>d(4),children:"Continue"})]})]}):u.jsxs("div",{className:"compact-stack",children:[u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"competitors",children:"Competitor domains (one per line)"}),u.jsx("textarea",{id:"competitors",className:"setup-textarea",rows:4,placeholder:`competitor1.com
|
|
204
|
+
competitor2.com`,value:F,onChange:ae=>ie(ae.target.value)})]}),ye?u.jsx("p",{className:"text-rose-400 text-sm",children:ye}):null,u.jsxs("div",{className:"setup-nav",children:[u.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(me,{type:"button",variant:"outline",onClick:()=>d(4),children:"Skip"}),u.jsx(me,{type:"button",disabled:yn.length===0||Rt,onClick:ul,children:Rt?"Saving...":`Save ${yn.length} competitor${yn.length!==1?"s":""}`})]})]})]})]});case 4:return u.jsxs(Ie,{className:"surface-card step-card",children:[u.jsxs("div",{className:"section-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 5 of 5"}),u.jsx("h2",{children:"Launch first run"})]}),gn?u.jsx(nt,{tone:"positive",children:"Queued"}):null]}),gn?u.jsxs("div",{className:"compact-stack",children:[u.jsx("p",{className:"text-zinc-300",children:"Visibility sweep has been queued. View progress on the project page."}),u.jsxs("div",{className:"setup-nav",children:[u.jsx("span",{}),u.jsx(me,{type:"button",onClick:()=>r($?`/projects/${$}`:"/"),children:"Open project"})]})]}):u.jsxs("div",{className:"compact-stack",children:[u.jsxs("p",{className:"supporting-copy",children:["Everything is configured. Launch an answer-visibility sweep to start tracking citations for ",u.jsx("span",{className:"text-zinc-100 font-medium",children:N}),"."]}),Qa?u.jsx("p",{className:"text-rose-400 text-sm",children:Qa}):null,u.jsxs("div",{className:"setup-nav",children:[u.jsx(me,{type:"button",variant:"outline",onClick:Ut,children:"Back"}),u.jsx(me,{type:"button",disabled:cl,onClick:dl,children:cl?"Launching...":"Launch visibility sweep"})]})]})]});default:return null}})();return u.jsxs("div",{className:"page-container",children:[u.jsx("div",{className:"page-header",children:u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Setup"}),u.jsx("p",{className:"page-subtitle",children:"Create a project, add key phrases, add competitors, and launch the first run."})]})}),u.jsx(p2,{current:o,labels:m2}),u.jsx("section",{className:"setup-wizard",children:bo})]})}function y2({onNavigate:a}){return u.jsx("div",{className:"page-container",children:u.jsx("section",{className:"page-section",children:u.jsxs(Ie,{className:"surface-card empty-card",children:[u.jsx("h1",{children:"Route not found"}),u.jsx("p",{children:"The current path does not map to a dashboard view."}),u.jsx(me,{asChild:!0,children:u.jsx("a",{href:"/",onClick:Mt(a,"/"),children:"Return to overview"})})]})})})}function v2({title:a,subtitle:i,children:s,open:r,onClose:o}){return u.jsx(Lj,{open:r,onOpenChange:d=>d?void 0:o(),children:u.jsxs(Nv,{children:[u.jsxs($j,{className:"drawer-head",children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:i}),u.jsx(Cv,{id:"drawer-title",children:a}),u.jsx(kv,{className:"sr-only",children:i})]}),u.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"?u.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,"\\$&")),d=new RegExp(`(${o.join("|")})`,"gi");return r.flatMap((h,m)=>h.value.split(d).map((g,x)=>g?x%2===1?h.type==="bold"?u.jsx("mark",{className:"answer-highlight",children:u.jsx("strong",{className:"text-zinc-200 font-semibold",children:g})},`hl-${m}-${x}`):u.jsx("mark",{className:"answer-highlight",children:g},`hl-${m}-${x}`):h.type==="bold"?u.jsx("strong",{className:"text-zinc-200 font-semibold",children:g},`b-${m}-${x}`):g:null)).filter(Boolean)}function b2({evidence:a,project:i,onClose:s}){const[r,o]=j.useState(!1),[d,h]=j.useState(-1),[m,y]=j.useState(null),[g,x]=j.useState(!1),[b,S]=j.useState({}),E=i.project.canonicalDomain.toLowerCase().replace(/^www\./,""),O=a.runHistory,w=O.length>1,N=d>=0&&m!==null,k=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},$=k.citationState==="cited"||k.citationState==="emerging",M=k.citedDomains.findIndex(ue=>ue.toLowerCase().replace(/^www\./,"")===E)+1,L=k.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":k.citationState==="lost"?"lost":k.citationState==="pending"?"pending":"not-cited",P=j.useRef(0),Se=j.useCallback(async ue=>{const ge=++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 al(te.runId);if(ge!==P.current)return;const ne=J.snapshots.find(I=>I.keyword===a.keyword&&I.provider===a.provider)??J.snapshots.find(I=>I.keyword===a.keyword),fe=ne?{citationState:ne.citationState,provider:ne.provider,answerSnippet:ne.answerText??"",citedDomains:ne.citedDomains,competitorDomains:ne.competitorOverlap,groundingSources:ne.groundingSources,evidenceUrls:[],changeLabel:te.citationState,summary:""}:{citationState:te.citationState,provider:a.provider,answerSnippet:"",citedDomains:[],competitorDomains:[],groundingSources:[],evidenceUrls:[],changeLabel:te.citationState,summary:"Snapshot data not available for this run."};S(I=>({...I,[B]:fe})),y(fe)}catch{if(ge!==P.current)return;y({citationState:te.citationState,provider:a.provider,answerSnippet:"",citedDomains:[],competitorDomains:[],groundingSources:[],evidenceUrls:[],changeLabel:te.citationState,summary:"Failed to load historical run data."})}finally{ge===P.current&&x(!1)}},[O,a.keyword,a.provider,b]),W=$&&M>0?{label:"Citation confirmed",title:`Cited #${M} of ${L} domain${L!==1?"s":""}`,meta:`${k.provider} · ${k.changeLabel.toLowerCase()}`}:$?{label:"Citation confirmed",title:"Cited in this answer",meta:`${k.provider} · ${k.changeLabel.toLowerCase()}`}:k.citationState==="lost"?{label:"Citation lost",title:L>0?`${L} domain${L!==1?"s":""} cited instead`:"No longer appearing in this answer",meta:`${k.provider} · ${k.changeLabel.toLowerCase()}`}:k.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:`${k.provider} · ${k.changeLabel.toLowerCase()}`},se=()=>{if(!k.answerSnippet)return null;const ue=k.answerSnippet.split(`
|
|
205
|
+
`),ge=[];let te=[],B=0;const J=()=>{if(te.length===0)return;const ne=te.join(" ").trim();ne&&ge.push(u.jsx("p",{className:ge.length>0?"mt-2.5":"",children:Lg(ne,X)},B++)),te=[]};for(const ne of ue){const fe=ne.trim();if(/^[-–—]{3,}$/.test(fe)){J(),ge.push(u.jsx("hr",{className:"border-zinc-800/60 my-3"},B++));continue}const I=fe.match(/^(#{1,3})\s+(.+)$/);if(I){J();const A=I[1].length,V=I[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s#]+/u,"").trim()||I[2],ee=A===1?"text-[13px] font-semibold text-zinc-100 mt-4 mb-1":A===2?"text-xs font-semibold text-zinc-200 mt-3 mb-0.5":"text-xs font-medium text-zinc-300 mt-2";ge.push(u.jsx("p",{className:ee,children:Lg(V,X)},B++));continue}if(fe===""){J();continue}te.push(fe)}return J(),ge};return u.jsx(Wy,{open:!0,onOpenChange:ue=>{ue||s()},children:u.jsxs(ev,{children:[u.jsx(zd,{className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm"}),u.jsxs(Dd,{className:"evidence-modal","aria-describedby":void 0,children:[u.jsxs("div",{className:"evidence-modal-header",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("p",{className:"eyebrow eyebrow-soft",children:[i.project.name," · ",k.provider||"All providers"]}),u.jsx(Md,{className:"text-lg font-semibold text-zinc-50 truncate",children:a.keyword})]}),u.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:[u.jsx(Ld,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]}),w&&u.jsxs("div",{className:"evidence-modal-timeline",children:[u.jsx("p",{className:"drawer-section-label mb-1.5",children:"Run history"}),u.jsx("div",{className:"flex items-center gap-1 overflow-x-auto pb-1",children:O.map((ue,ge)=>{const te=d===-1&&ge===O.length-1||d===ge,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 u.jsxs("button",{type:"button",className:`evidence-run-dot ${te?"evidence-run-dot--selected":""}`,onClick:()=>Se(ge===O.length-1?-1:ge),"aria-label":`Run ${ne}: ${ue.citationState}`,"aria-pressed":te,children:[u.jsx("span",{className:`size-2 rounded-full ${B}`,"aria-hidden":"true"}),u.jsx("span",{className:"text-[10px] text-zinc-500",children:ne})]},ge)})}),d>=0&&d<O.length&&u.jsxs("p",{className:"text-[11px] text-zinc-500 mt-1",children:["Viewing run from ",new Date(O[d].createdAt).toLocaleString()," — ",u.jsx("span",{className:"capitalize",children:O[d].citationState}),u.jsx("button",{type:"button",className:"text-zinc-400 hover:text-zinc-200 ml-2",onClick:()=>Se(-1),children:"← Back to latest"})]})]}),u.jsxs("div",{className:"evidence-modal-body",children:[g&&u.jsx("div",{className:"md:col-span-2 flex items-center justify-center py-12 text-zinc-500 text-sm",children:"Loading historical run data…"}),!g&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"evidence-modal-main",children:[u.jsxs("div",{className:`evidence-position-hero evidence-position-hero--${D}`,children:[u.jsx("p",{className:`evidence-position-label evidence-position-label--${D}`,children:W.label}),u.jsx("p",{className:`evidence-position-title evidence-position-title--${D}`,children:W.title}),u.jsx("p",{className:"evidence-position-meta",children:W.meta})]}),k.answerSnippet&&u.jsxs("div",{children:[u.jsx("p",{className:"drawer-section-label",children:"What the AI said"}),u.jsx("div",{className:`answer-snippet-block ${r?"evidence-answer-expanded":"evidence-answer-collapsed"}`,children:se()}),k.answerSnippet.length>280&&u.jsx("button",{type:"button",className:"mt-1.5 text-xs text-zinc-500 hover:text-zinc-300 transition-colors",onClick:()=>o(!r),children:r?"↑ Collapse":"↓ Show full answer"})]}),!k.answerSnippet&&!g&&u.jsx("div",{className:"rounded-lg border border-zinc-800/40 bg-zinc-900/20 px-4 py-8 text-center text-zinc-600 text-sm",children:"No answer text recorded for this run"}),!N&&a.relatedTechnicalSignals.length>0&&u.jsxs("div",{children:[u.jsx("p",{className:"drawer-section-label",children:$?"Why you're cited":"What to fix"}),u.jsx("div",{className:"action-items-list",children:a.relatedTechnicalSignals.map((ue,ge)=>u.jsxs("div",{className:"action-item",children:[u.jsx("svg",{className:`action-item-icon ${$?"text-emerald-400":"text-amber-400"}`,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:$?u.jsx("path",{d:"M3 8l3.5 3.5L13 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}):u.jsxs(u.Fragment,{children:[u.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),u.jsx("path",{d:"M8 5v3.5M8 10.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),u.jsx("span",{className:"action-item-text",children:ue})]},ge))})]}),k.summary&&u.jsx("p",{className:"text-xs text-zinc-600 border-t border-zinc-800/40 pt-3 mt-1",children:k.summary})]}),u.jsxs("div",{className:"evidence-modal-sidebar",children:[k.citedDomains.length>0&&u.jsxs("div",{children:[u.jsx("p",{className:"drawer-section-label",children:"Who was cited — in order"}),u.jsxs("div",{className:"citation-leaderboard",children:[k.citedDomains.map((ue,ge)=>{const te=ue.toLowerCase().replace(/^www\./,""),B=te===E,J=!B&&k.competitorDomains.some(fe=>fe.toLowerCase().replace(/^www\./,"")===te),ne=B?"you":J?"competitor":"other";return u.jsxs("div",{className:`citation-leaderboard-item citation-leaderboard-item--${ne}`,children:[u.jsxs("span",{className:"citation-leaderboard-rank",children:["#",ge+1]}),u.jsx("span",{className:"citation-leaderboard-domain",children:ue}),B&&u.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),J&&u.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},ue)}),!$&&u.jsxs("div",{className:"citation-leaderboard-item citation-leaderboard-item--not-cited border-dashed",children:[u.jsx("span",{className:"citation-leaderboard-rank text-zinc-600",children:"—"}),u.jsx("span",{className:"citation-leaderboard-domain text-zinc-600",children:i.project.canonicalDomain}),u.jsx("span",{className:"citation-leaderboard-tag text-zinc-600",children:"Not cited"})]})]})]}),k.groundingSources.length>0&&u.jsxs("div",{children:[u.jsxs("p",{className:"drawer-section-label",children:["Grounding sources (",k.groundingSources.length,")"]}),u.jsx("ul",{className:"grid gap-0.5",children:k.groundingSources.map((ue,ge)=>u.jsx("li",{className:"truncate text-sm",children:u.jsx("a",{href:ue.uri,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:ue.title||ue.uri})},ge))})]}),k.evidenceUrls.length>0&&u.jsxs("div",{children:[u.jsx("p",{className:"drawer-section-label",children:"Evidence URLs"}),u.jsx("ul",{className:"grid gap-1",children:k.evidenceUrls.map(ue=>u.jsx("li",{className:"truncate text-sm",children:u.jsx("a",{href:ue,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:ue})},ue))})]}),k.citedDomains.length===0&&k.groundingSources.length===0&&k.evidenceUrls.length===0&&u.jsxs("div",{className:"flex items-center justify-center h-24 text-zinc-600 text-sm",children:["No citation data ",N?"for this run":"yet"]})]})]})]})]})]})})}async function x2(){try{const[a,i,s]=await Promise.all([Pj(),Wj(),lN().catch(()=>null)]),r=await Promise.all(a.map(async o=>{const d=i.filter(S=>S.projectId===o.id),h=d.filter(S=>S.status==="completed"||S.status==="partial").sort((S,E)=>E.createdAt.localeCompare(S.createdAt)),[m,y,g,x,b]=await Promise.all([eN(o.name).catch(()=>[]),Ov(o.name).catch(()=>[]),tN(o.name).catch(()=>[]),h[0]?al(h[0].id).catch(()=>null):Promise.resolve(null),h[1]?al(h[1].id).catch(()=>null):Promise.resolve(null)]);return{project:o,runs:d,keywords:m,competitors:y,timeline:g,latestRunDetail:x,previousRunDetail:b}}));return TN(r,s)}catch{return null}}function S2({initialPathname:a,initialDashboard:i,initialHealthSnapshot:s,enableLiveStatus:r=!0}){const[o,d]=j.useState(i??null),[h,m]=j.useState(!i),[y,g]=j.useState(i?!0:null),[x,b]=j.useState(()=>RN(a)),[S,E]=j.useState(!1),[O,w]=j.useState(null),[N,k]=j.useState(null),[$,z]=j.useState(!1),[M,L]=j.useState(s??zN),G=j.useCallback(async()=>{const R=await x2();R?(d(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(()=>{E(!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 DN("/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 u.jsx("div",{className:"app-shell",children:u.jsx("div",{className:"main-area",style:{gridColumn:"1 / -1"},children:u.jsx("main",{id:"content",className:"page-shell",children:u.jsxs("div",{className:"page-container",children:[u.jsx("div",{className:"page-header",children:u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Cannot connect to API"}),u.jsxs("p",{className:"page-subtitle",children:["The dashboard could not reach the Canonry API. Make sure ",u.jsx("code",{children:"canonry serve"})," is running and try refreshing the page."]})]})}),u.jsx(me,{type:"button",onClick:()=>{m(!0),G()},children:"Retry connection"})]})})})});const D=o??_N.dashboard,P=MN(x,D),Se=P.kind==="project"?Tv(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}),k(null),z(!0);const F=R;al(R).then(ie=>{w(pe=>(pe?.kind==="run"&&pe.runId===F&&k(ie),pe))}).catch(()=>{w(ie=>(ie?.kind==="run"&&ie.runId===F&&k(null),ie))}).finally(()=>z(!1))};j.useEffect(()=>{if(O?.kind!=="run"||!N||N.status!=="running"&&N.status!=="queued")return;const R=setInterval(()=>{al(O.runId).then(F=>{k(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})},ge=async R=>{await Dv(R),G()},te=async R=>{try{await iN(R),W("/"),G()}catch(F){console.error("Failed to delete project:",F)}},B=async(R,F)=>{await aN(R,F),await G()},J=async(R,F)=>{const pe=(await Ov(R)).map(ye=>ye.domain),$e=[...new Set([...pe,...F])];await zv(R,$e),await G()},ne=HN(D.portfolioOverview.systemHealth,M,D.settings),fe=$N(D.setup,M,D.settings),I=O?.kind==="run"?Zj(D,O.runId):void 0,A=O?.kind==="evidence"?Ij(D,O.evidenceId):void 0,V=[{label:"Overview",href:"/",icon:bw,active:$r(P,"overview")},{label:"Projects",href:"/projects",icon:yw,active:$r(P,"projects")},{label:"Runs",href:"/runs",icon:jw,active:$r(P,"runs")},{label:"Settings",href:"/settings",icon:Aw,active:$r(P,"settings")}],ee=P.kind==="overview"?"Portfolio":P.kind==="projects"?"Projects":P.kind==="project"&&Se?Se.project.name:P.kind==="runs"?"Runs":P.kind==="settings"?"Settings":P.kind==="setup"?"Setup":"Not found";return u.jsxs("div",{className:"app-shell",children:[u.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),u.jsxs("aside",{className:"sidebar","aria-label":"Primary navigation",children:[u.jsx("div",{className:"sidebar-brand",children:u.jsxs("a",{href:"/",onClick:Mt(W,"/"),children:[u.jsx("span",{className:"brand-mark",children:"Canonry"}),u.jsx("p",{className:"brand-subtitle",children:"AEO Monitor"})]})}),u.jsxs("nav",{className:"sidebar-nav",children:[V.map(R=>u.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:[u.jsx(R.icon,{className:"sidebar-icon"}),u.jsx("span",{children:R.label})]},R.label)),D.projects.length>0?u.jsxs(u.Fragment,{children:[u.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 u.jsxs("a",{className:`sidebar-project ${F?"sidebar-project-active":""}`,href:`/projects/${R.project.id}`,onClick:Mt(W,`/projects/${R.project.id}`),children:[u.jsx("span",{className:`sidebar-dot sidebar-dot-${ie}`}),u.jsx("span",{children:R.project.name})]},R.project.id)})]}):null,u.jsx("p",{className:"sidebar-section-title",children:"Resources"}),u.jsxs("a",{className:"sidebar-link",href:"/setup","aria-current":P.kind==="setup"?"page":void 0,onClick:Mt(W,"/setup"),children:[u.jsx(kw,{className:"sidebar-icon"}),u.jsx("span",{children:"Setup"})]})]}),u.jsx("div",{className:"sidebar-footer",children:Dg.map(R=>u.jsx("a",{className:"sidebar-footer-link",href:R.href,target:"_blank",rel:"noreferrer",children:R.label},R.href))})]}),u.jsxs("div",{className:"main-area",children:[u.jsxs("header",{className:"topbar",children:[u.jsxs("div",{className:"topbar-left",children:[u.jsx("div",{className:"topbar-brand-mobile",children:u.jsx("a",{className:"brand-mark",href:"/",onClick:Mt(W,"/"),children:"Canonry"})}),u.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[u.jsx("a",{href:"/",onClick:Mt(W,"/"),children:"Home"}),u.jsx(Rd,{className:"breadcrumb-sep size-3"}),u.jsx("span",{className:"breadcrumb-current",children:ee})]})]}),u.jsxs("div",{className:"topbar-actions",children:[u.jsxs("div",{className:"health-pill-row",children:[u.jsxs("span",{className:`health-pill health-pill-${M.apiStatus.state}`,children:["API ",M.apiStatus.state==="ok"?"ok":M.apiStatus.state]}),u.jsxs("span",{className:`health-pill health-pill-${M.workerStatus.state}`,children:["Worker ",M.workerStatus.state==="ok"?"ok":M.workerStatus.state]})]}),u.jsxs(me,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":S,"aria-controls":"mobile-nav",onClick:()=>E(R=>!R),children:[u.jsx(Sw,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),u.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${S?"mobile-nav-open":""}`,children:[u.jsxs(me,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>E(!1),children:[u.jsx(Ld,{className:"size-5"}),u.jsx("span",{className:"sr-only",children:"Close navigation"})]}),V.map(R=>u.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?u.jsxs("div",{className:"mobile-nav-section",children:[u.jsx("p",{className:"mobile-nav-section-title",children:"Projects"}),D.projects.map(R=>u.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]}),u.jsx("main",{id:"content",className:"page-shell",children:h?u.jsx("div",{className:"page-container",children:u.jsx("div",{className:"page-header",children:u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Loading"}),u.jsx("p",{className:"page-subtitle",children:"Connecting to API and loading dashboard data..."})]})})}):u.jsxs(u.Fragment,{children:[P.kind==="overview"?u.jsx(PN,{model:D.portfolioOverview,systemHealth:ne,onNavigate:W,onOpenRun:se}):null,P.kind==="projects"?u.jsx(WN,{projects:D.projects,onNavigate:W,onProjectCreated:G}):null,P.kind==="project"&&Se?u.jsx(t2,{model:Se,onOpenEvidence:ue,onOpenRun:se,onTriggerRun:ge,onDeleteProject:te,onAddKeywords:B,onAddCompetitors:J}):null,P.kind==="runs"?u.jsx(c2,{runs:D.runs,onOpenRun:se}):null,P.kind==="settings"?u.jsx(h2,{settings:D.settings,healthSnapshot:M,onSettingsChanged:G}):null,P.kind==="setup"?u.jsx(g2,{model:fe,settings:D.settings,onProjectCreated:G,onNavigate:W}):null,P.kind==="not-found"?u.jsx(y2,{onNavigate:W}):null]})}),u.jsxs("footer",{className:"footer",children:[u.jsx("p",{className:"supporting-copy",children:"Technical readiness and answer visibility stay separate."}),u.jsx("div",{className:"footer-links",children:Dg.map(R=>u.jsx("a",{href:R.href,target:"_blank",rel:"noreferrer",children:R.label},R.href))})]})]}),I?u.jsxs(v2,{open:I!==void 0,title:I.summary,subtitle:`${I.projectName} · ${I.kindLabel}`,onClose:()=>w(null),children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-sm",children:[u.jsx(po,{status:I.status}),u.jsx("span",{className:"text-zinc-400",children:I.startedAt}),u.jsx("span",{className:"text-zinc-500",children:I.duration}),u.jsx("span",{className:"text-zinc-600",children:I.triggerLabel})]}),I.status==="failed"&&I.statusDetail&&u.jsx("p",{className:"text-sm text-rose-300/80 mt-2",children:I.statusDetail}),u.jsxs("div",{className:"mt-4",children:[u.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500 mb-2",children:"Activity Log"}),$?u.jsx("p",{className:"text-sm text-zinc-500",children:"Loading run details..."}):N&&N.snapshots.length>0?u.jsxs("div",{className:"space-y-2",children:[N.snapshots.map(R=>u.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 p-3",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[u.jsx("p",{className:"text-sm font-medium text-zinc-200 truncate",children:R.keyword??"Unknown key phrase"}),u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(Kd,{provider:R.provider}),u.jsx(Sv,{variant:R.citationState==="cited"?"success":"neutral",children:R.citationState})]})]}),R.citedDomains.length>0&&u.jsxs("p",{className:"text-xs text-zinc-500 mt-1",children:[u.jsx("span",{className:"text-zinc-400",children:"Sources:"})," ",R.citedDomains.join(", ")]}),R.competitorOverlap.length>0&&u.jsxs("p",{className:"text-xs text-rose-400/80 mt-0.5",children:["Competitor cited: ",R.competitorOverlap.join(", ")]}),R.groundingSources&&R.groundingSources.length>0&&u.jsxs("details",{className:"mt-2",children:[u.jsxs("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:[R.groundingSources.length," grounding source",R.groundingSources.length!==1?"s":""]}),u.jsx("ul",{className:"mt-1 space-y-0.5",children:R.groundingSources.map((F,ie)=>u.jsx("li",{className:"text-xs text-zinc-500 truncate",children:u.jsx("a",{href:F.uri,target:"_blank",rel:"noreferrer",className:"hover:text-zinc-300",children:F.title||F.uri})},ie))})]}),R.answerText&&u.jsxs("details",{className:"mt-1",children:[u.jsx("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:"Answer preview"}),u.jsx("p",{className:"mt-1 text-xs text-zinc-400 leading-relaxed whitespace-pre-wrap",children:R.answerText})]})]},R.id)),N.status==="running"&&u.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[u.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),"Querying remaining key phrases..."]})]}):N&&N.status==="running"?u.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[u.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),"Waiting for first key phrase result..."]}):N&&N.status==="queued"?u.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[u.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-zinc-500 animate-pulse"}),"Run queued, waiting for execution slot..."]}):N&&N.error?u.jsxs("div",{className:"rounded-lg border border-rose-800/40 bg-rose-950/20 p-3",children:[u.jsx("p",{className:"text-sm font-medium text-rose-300 mb-2",children:"Run failed"}),u.jsx("pre",{className:"text-xs text-rose-300/80 whitespace-pre-wrap break-words max-h-48 overflow-y-auto font-mono leading-5",children:BN(N.error)})]}):u.jsx("p",{className:"text-sm text-zinc-500",children:"No snapshot data available."}),N?.snapshots?.[0]?.model&&u.jsxs("p",{className:"mt-3 text-[10px] text-zinc-600",children:["Model: ",N.snapshots[0].model]})]})]}):null,A?u.jsx(b2,{evidence:A.evidence,project:A.project,onClose:()=>w(null)}):null]})}const Gv=document.getElementById("root");if(!Gv)throw new Error("Expected #root element for web app bootstrap.");vx.createRoot(Gv).render(u.jsx(j.StrictMode,{children:u.jsx(S2,{})}));
|