@ainyc/canonry 1.12.0 → 1.13.3
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-BUh6m3HV.css +1 -0
- package/assets/assets/index-DOhW7c21.js +245 -0
- package/assets/index.html +2 -2
- package/dist/{chunk-O4HLQBL7.js → chunk-JKIWFSYI.js} +836 -78
- package/dist/cli.js +384 -8
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/assets/assets/index-BEsueXzg.css +0 -1
- package/assets/assets/index-Bol7Z6qk.js +0 -243
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
function fw(t,n){for(var a=0;a<n.length;a++){const l=n[a];if(typeof l!="string"&&!Array.isArray(l)){for(const o in l)if(o!=="default"&&!(o in t)){const u=Object.getOwnPropertyDescriptor(l,o);u&&Object.defineProperty(t,o,u.get?u:{enumerable:!0,get:()=>l[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function a(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(o){if(o.ep)return;o.ep=!0;const u=a(o);fetch(o.href,u)}})();function uv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xd={exports:{}},wl={};var Gg;function hw(){if(Gg)return wl;Gg=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(l,o,u){var d=null;if(u!==void 0&&(d=""+u),o.key!==void 0&&(d=""+o.key),"key"in o){u={};for(var m in o)m!=="key"&&(u[m]=o[m])}else u=o;return o=u.ref,{$$typeof:t,type:l,key:d,ref:o!==void 0?o:null,props:u}}return wl.Fragment=n,wl.jsx=a,wl.jsxs=a,wl}var Kg;function mw(){return Kg||(Kg=1,xd.exports=hw()),xd.exports}var c=mw(),Sd={exports:{}},je={};var Yg;function pw(){if(Yg)return je;Yg=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function N(C){return C===null||typeof C!="object"?null:(C=x&&C[x]||C["@@iterator"],typeof C=="function"?C:null)}var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,k={};function A(C,G,te){this.props=C,this.context=G,this.refs=k,this.updater=te||z}A.prototype.isReactComponent={},A.prototype.setState=function(C,G){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,G,"setState")},A.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function T(){}T.prototype=A.prototype;function O(C,G,te){this.props=C,this.context=G,this.refs=k,this.updater=te||z}var R=O.prototype=new T;R.constructor=O,j(R,A.prototype),R.isPureReactComponent=!0;var L=Array.isArray;function H(){}var K={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function P(C,G,te){var ae=te.ref;return{$$typeof:t,type:C,key:G,ref:ae!==void 0?ae:null,props:te}}function xe(C,G){return P(C.type,G,C.props)}function Q(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function oe(C){var G={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(te){return G[te]})}var $e=/\/+/g;function Qe(C,G){return typeof C=="object"&&C!==null&&C.key!=null?oe(""+C.key):G.toString(36)}function me(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(H,H):(C.status="pending",C.then(function(G){C.status==="pending"&&(C.status="fulfilled",C.value=G)},function(G){C.status==="pending"&&(C.status="rejected",C.reason=G)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function U(C,G,te,ae,ce){var fe=typeof C;(fe==="undefined"||fe==="boolean")&&(C=null);var q=!1;if(C===null)q=!0;else switch(fe){case"bigint":case"string":case"number":q=!0;break;case"object":switch(C.$$typeof){case t:case n:q=!0;break;case b:return q=C._init,U(q(C._payload),G,te,ae,ce)}}if(q)return ce=ce(C),q=ae===""?"."+Qe(C,0):ae,L(ce)?(te="",q!=null&&(te=q.replace($e,"$&/")+"/"),U(ce,G,te,"",function(Ie){return Ie})):ce!=null&&(Q(ce)&&(ce=xe(ce,te+(ce.key==null||C&&C.key===ce.key?"":(""+ce.key).replace($e,"$&/")+"/")+q)),G.push(ce)),1;q=0;var V=ae===""?".":ae+":";if(L(C))for(var se=0;se<C.length;se++)ae=C[se],fe=V+Qe(ae,se),q+=U(ae,G,te,fe,ce);else if(se=N(C),typeof se=="function")for(C=se.call(C),se=0;!(ae=C.next()).done;)ae=ae.value,fe=V+Qe(ae,se++),q+=U(ae,G,te,fe,ce);else if(fe==="object"){if(typeof C.then=="function")return U(me(C),G,te,ae,ce);throw G=String(C),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return q}function F(C,G,te){if(C==null)return C;var ae=[],ce=0;return U(C,ae,"","",function(fe){return G.call(te,fe,ce++)}),ae}function le(C){if(C._status===-1){var G=C._result;G=G(),G.then(function(te){(C._status===0||C._status===-1)&&(C._status=1,C._result=te)},function(te){(C._status===0||C._status===-1)&&(C._status=2,C._result=te)}),C._status===-1&&(C._status=0,C._result=G)}if(C._status===1)return C._result.default;throw C._result}var ye=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},ee={map:F,forEach:function(C,G,te){F(C,function(){G.apply(this,arguments)},te)},count:function(C){var G=0;return F(C,function(){G++}),G},toArray:function(C){return F(C,function(G){return G})||[]},only:function(C){if(!Q(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return je.Activity=v,je.Children=ee,je.Component=A,je.Fragment=a,je.Profiler=o,je.PureComponent=O,je.StrictMode=l,je.Suspense=g,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,je.__COMPILER_RUNTIME={__proto__:null,c:function(C){return K.H.useMemoCache(C)}},je.cache=function(C){return function(){return C.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(C,G,te){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var ae=j({},C.props),ce=C.key;if(G!=null)for(fe in G.key!==void 0&&(ce=""+G.key),G)!D.call(G,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&G.ref===void 0||(ae[fe]=G[fe]);var fe=arguments.length-2;if(fe===1)ae.children=te;else if(1<fe){for(var q=Array(fe),V=0;V<fe;V++)q[V]=arguments[V+2];ae.children=q}return P(C.type,ce,ae)},je.createContext=function(C){return C={$$typeof:d,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:u,_context:C},C},je.createElement=function(C,G,te){var ae,ce={},fe=null;if(G!=null)for(ae in G.key!==void 0&&(fe=""+G.key),G)D.call(G,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(ce[ae]=G[ae]);var q=arguments.length-2;if(q===1)ce.children=te;else if(1<q){for(var V=Array(q),se=0;se<q;se++)V[se]=arguments[se+2];ce.children=V}if(C&&C.defaultProps)for(ae in q=C.defaultProps,q)ce[ae]===void 0&&(ce[ae]=q[ae]);return P(C,fe,ce)},je.createRef=function(){return{current:null}},je.forwardRef=function(C){return{$$typeof:m,render:C}},je.isValidElement=Q,je.lazy=function(C){return{$$typeof:b,_payload:{_status:-1,_result:C},_init:le}},je.memo=function(C,G){return{$$typeof:p,type:C,compare:G===void 0?null:G}},je.startTransition=function(C){var G=K.T,te={};K.T=te;try{var ae=C(),ce=K.S;ce!==null&&ce(te,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(H,ye)}catch(fe){ye(fe)}finally{G!==null&&te.types!==null&&(G.types=te.types),K.T=G}},je.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},je.use=function(C){return K.H.use(C)},je.useActionState=function(C,G,te){return K.H.useActionState(C,G,te)},je.useCallback=function(C,G){return K.H.useCallback(C,G)},je.useContext=function(C){return K.H.useContext(C)},je.useDebugValue=function(){},je.useDeferredValue=function(C,G){return K.H.useDeferredValue(C,G)},je.useEffect=function(C,G){return K.H.useEffect(C,G)},je.useEffectEvent=function(C){return K.H.useEffectEvent(C)},je.useId=function(){return K.H.useId()},je.useImperativeHandle=function(C,G,te){return K.H.useImperativeHandle(C,G,te)},je.useInsertionEffect=function(C,G){return K.H.useInsertionEffect(C,G)},je.useLayoutEffect=function(C,G){return K.H.useLayoutEffect(C,G)},je.useMemo=function(C,G){return K.H.useMemo(C,G)},je.useOptimistic=function(C,G){return K.H.useOptimistic(C,G)},je.useReducer=function(C,G,te){return K.H.useReducer(C,G,te)},je.useRef=function(C){return K.H.useRef(C)},je.useState=function(C){return K.H.useState(C)},je.useSyncExternalStore=function(C,G,te){return K.H.useSyncExternalStore(C,G,te)},je.useTransition=function(){return K.H.useTransition()},je.version="19.2.4",je}var Vg;function of(){return Vg||(Vg=1,Sd.exports=pw()),Sd.exports}var w=of();const gw=uv(w),cf=fw({__proto__:null,default:gw},[w]);var wd={exports:{}},jl={},jd={exports:{}},Nd={};var Pg;function yw(){return Pg||(Pg=1,(function(t){function n(U,F){var le=U.length;U.push(F);e:for(;0<le;){var ye=le-1>>>1,ee=U[ye];if(0<o(ee,F))U[ye]=F,U[le]=ee,le=ye;else break e}}function a(U){return U.length===0?null:U[0]}function l(U){if(U.length===0)return null;var F=U[0],le=U.pop();if(le!==F){U[0]=le;e:for(var ye=0,ee=U.length,C=ee>>>1;ye<C;){var G=2*(ye+1)-1,te=U[G],ae=G+1,ce=U[ae];if(0>o(te,le))ae<ee&&0>o(ce,te)?(U[ye]=ce,U[ae]=le,ye=ae):(U[ye]=te,U[G]=le,ye=G);else if(ae<ee&&0>o(ce,le))U[ye]=ce,U[ae]=le,ye=ae;else break e}}return F}function o(U,F){var le=U.sortIndex-F.sortIndex;return le!==0?le:U.id-F.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var d=Date,m=d.now();t.unstable_now=function(){return d.now()-m}}var g=[],p=[],b=1,v=null,x=3,N=!1,z=!1,j=!1,k=!1,A=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function R(U){for(var F=a(p);F!==null;){if(F.callback===null)l(p);else if(F.startTime<=U)l(p),F.sortIndex=F.expirationTime,n(g,F);else break;F=a(p)}}function L(U){if(j=!1,R(U),!z)if(a(g)!==null)z=!0,H||(H=!0,oe());else{var F=a(p);F!==null&&me(L,F.startTime-U)}}var H=!1,K=-1,D=5,P=-1;function xe(){return k?!0:!(t.unstable_now()-P<D)}function Q(){if(k=!1,H){var U=t.unstable_now();P=U;var F=!0;try{e:{z=!1,j&&(j=!1,T(K),K=-1),N=!0;var le=x;try{t:{for(R(U),v=a(g);v!==null&&!(v.expirationTime>U&&xe());){var ye=v.callback;if(typeof ye=="function"){v.callback=null,x=v.priorityLevel;var ee=ye(v.expirationTime<=U);if(U=t.unstable_now(),typeof ee=="function"){v.callback=ee,R(U),F=!0;break t}v===a(g)&&l(g),R(U)}else l(g);v=a(g)}if(v!==null)F=!0;else{var C=a(p);C!==null&&me(L,C.startTime-U),F=!1}}break e}finally{v=null,x=le,N=!1}F=void 0}}finally{F?oe():H=!1}}}var oe;if(typeof O=="function")oe=function(){O(Q)};else if(typeof MessageChannel<"u"){var $e=new MessageChannel,Qe=$e.port2;$e.port1.onmessage=Q,oe=function(){Qe.postMessage(null)}}else oe=function(){A(Q,0)};function me(U,F){K=A(function(){U(t.unstable_now())},F)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(U){U.callback=null},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(U){switch(x){case 1:case 2:case 3:var F=3;break;default:F=x}var le=x;x=F;try{return U()}finally{x=le}},t.unstable_requestPaint=function(){k=!0},t.unstable_runWithPriority=function(U,F){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var le=x;x=U;try{return F()}finally{x=le}},t.unstable_scheduleCallback=function(U,F,le){var ye=t.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?ye+le:ye):le=ye,U){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=le+ee,U={id:b++,callback:F,priorityLevel:U,startTime:le,expirationTime:ee,sortIndex:-1},le>ye?(U.sortIndex=le,n(p,U),a(g)===null&&U===a(p)&&(j?(T(K),K=-1):j=!0,me(L,le-ye))):(U.sortIndex=ee,n(g,U),z||N||(z=!0,H||(H=!0,oe()))),U},t.unstable_shouldYield=xe,t.unstable_wrapCallback=function(U){var F=x;return function(){var le=x;x=F;try{return U.apply(this,arguments)}finally{x=le}}}})(Nd)),Nd}var Qg;function vw(){return Qg||(Qg=1,jd.exports=yw()),jd.exports}var kd={exports:{}},Et={};var Xg;function bw(){if(Xg)return Et;Xg=1;var t=of();function n(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var l={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(g,p,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:g,containerInfo:p,implementation:b}}var d=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Et.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Et.createPortal=function(g,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(n(299));return u(g,p,null,b)},Et.flushSync=function(g){var p=d.T,b=l.p;try{if(d.T=null,l.p=2,g)return g()}finally{d.T=p,l.p=b,l.d.f()}},Et.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,l.d.C(g,p))},Et.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},Et.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var b=p.as,v=m(b,p.crossOrigin),x=typeof p.integrity=="string"?p.integrity:void 0,N=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?l.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:N}):b==="script"&&l.d.X(g,{crossOrigin:v,integrity:x,fetchPriority:N,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Et.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=m(p.as,p.crossOrigin);l.d.M(g,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&l.d.M(g)},Et.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,v=m(b,p.crossOrigin);l.d.L(g,b,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Et.preloadModule=function(g,p){if(typeof g=="string")if(p){var b=m(p.as,p.crossOrigin);l.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else l.d.m(g)},Et.requestFormReset=function(g){l.d.r(g)},Et.unstable_batchedUpdates=function(g,p){return g(p)},Et.useFormState=function(g,p,b){return d.H.useFormState(g,p,b)},Et.useFormStatus=function(){return d.H.useHostTransitionStatus()},Et.version="19.2.4",Et}var Jg;function dv(){if(Jg)return kd.exports;Jg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),kd.exports=bw(),kd.exports}var Fg;function xw(){if(Fg)return jl;Fg=1;var t=vw(),n=of(),a=dv();function l(e){var i="https://react.dev/errors/"+e;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var i=e,s=e;if(e.alternate)for(;i.return;)i=i.return;else{e=i;do i=e,(i.flags&4098)!==0&&(s=i.return),e=i.return;while(e)}return i.tag===3?s:null}function d(e){if(e.tag===13){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function m(e){if(e.tag===31){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function g(e){if(u(e)!==e)throw Error(l(188))}function p(e){var i=e.alternate;if(!i){if(i=u(e),i===null)throw Error(l(188));return i!==e?null:e}for(var s=e,r=i;;){var f=s.return;if(f===null)break;var h=f.alternate;if(h===null){if(r=f.return,r!==null){s=r;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===s)return g(f),e;if(h===r)return g(f),i;h=h.sibling}throw Error(l(188))}if(s.return!==r.return)s=f,r=h;else{for(var y=!1,S=f.child;S;){if(S===s){y=!0,s=f,r=h;break}if(S===r){y=!0,r=f,s=h;break}S=S.sibling}if(!y){for(S=h.child;S;){if(S===s){y=!0,s=h,r=f;break}if(S===r){y=!0,r=h,s=f;break}S=S.sibling}if(!y)throw Error(l(189))}}if(s.alternate!==r)throw Error(l(190))}if(s.tag!==3)throw Error(l(188));return s.stateNode.current===s?e:i}function b(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e;for(e=e.child;e!==null;){if(i=b(e),i!==null)return i;e=e.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),O=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),xe=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function oe(e){return e===null||typeof e!="object"?null:(e=Q&&e[Q]||e["@@iterator"],typeof e=="function"?e:null)}var $e=Symbol.for("react.client.reference");function Qe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===$e?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case A:return"Profiler";case k:return"StrictMode";case L:return"Suspense";case H:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case z:return"Portal";case O:return e.displayName||"Context";case T:return(e._context.displayName||"Context")+".Consumer";case R:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return i=e.displayName||null,i!==null?i:Qe(e.type)||"Memo";case D:i=e._payload,e=e._init;try{return Qe(e(i))}catch{}}return null}var me=Array.isArray,U=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},ye=[],ee=-1;function C(e){return{current:e}}function G(e){0>ee||(e.current=ye[ee],ye[ee]=null,ee--)}function te(e,i){ee++,ye[ee]=e.current,e.current=i}var ae=C(null),ce=C(null),fe=C(null),q=C(null);function V(e,i){switch(te(fe,i),te(ce,e),te(ae,null),i.nodeType){case 9:case 11:e=(e=i.documentElement)&&(e=e.namespaceURI)?hg(e):0;break;default:if(e=i.tagName,i=i.namespaceURI)i=hg(i),e=mg(i,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(ae),te(ae,e)}function se(){G(ae),G(ce),G(fe)}function Ie(e){e.memoizedState!==null&&te(q,e);var i=ae.current,s=mg(i,e.type);i!==s&&(te(ce,e),te(ae,s))}function Be(e){ce.current===e&&(G(ae),G(ce)),q.current===e&&(G(q),vl._currentValue=le)}var Re,yn;function jt(e){if(Re===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);Re=i&&i[1]||"",yn=-1<s.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+Re+e+yn}var En=!1;function vn(e,i){if(!e||En)return"";En=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(i){var W=function(){throw Error()};if(Object.defineProperty(W.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(W,[])}catch(I){var Z=I}Reflect.construct(e,[],W)}else{try{W.call()}catch(I){Z=I}e.call(W.prototype)}}else{try{throw Error()}catch(I){Z=I}(W=e())&&typeof W.catch=="function"&&W.catch(function(){})}}catch(I){if(I&&Z&&typeof I.stack=="string")return[I.stack,Z.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=r.DetermineComponentFrameRoot(),y=h[0],S=h[1];if(y&&S){var _=y.split(`
|
|
4
|
-
`),B=S.split(`
|
|
5
|
-
`);for(f=r=0;r<_.length&&!_[r].includes("DetermineComponentFrameRoot");)r++;for(;f<B.length&&!B[f].includes("DetermineComponentFrameRoot");)f++;if(r===_.length||f===B.length)for(r=_.length-1,f=B.length-1;1<=r&&0<=f&&_[r]!==B[f];)f--;for(;1<=r&&0<=f;r--,f--)if(_[r]!==B[f]){if(r!==1||f!==1)do if(r--,f--,0>f||_[r]!==B[f]){var Y=`
|
|
6
|
-
`+_[r].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=r&&0<=f);break}}}finally{En=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?jt(s):""}function Ii(e,i){switch(e.tag){case 26:case 27:case 5:return jt(e.type);case 16:return jt("Lazy");case 13:return e.child!==i&&i!==null?jt("Suspense Fallback"):jt("Suspense");case 19:return jt("SuspenseList");case 0:case 15:return vn(e.type,!1);case 11:return vn(e.type.render,!1);case 1:return vn(e.type,!0);case 31:return jt("Activity");default:return""}}function Gi(e){try{var i="",s=null;do i+=Ii(e,s),s=e,e=e.return;while(e);return i}catch(r){return`
|
|
7
|
-
Error generating stack: `+r.message+`
|
|
8
|
-
`+r.stack}}var It=Object.prototype.hasOwnProperty,Rt=t.unstable_scheduleCallback,bn=t.unstable_cancelCallback,xa=t.unstable_shouldYield,ne=t.unstable_requestPaint,we=t.unstable_now,Ki=t.unstable_getCurrentPriorityLevel,Sa=t.unstable_ImmediatePriority,Zl=t.unstable_UserBlockingPriority,en=t.unstable_NormalPriority,rc=t.unstable_LowPriority,re=t.unstable_IdlePriority,Ln=t.log,Qb=t.unstable_setDisableYieldValue,As=null,Gt=null;function si(e){if(typeof Ln=="function"&&Qb(e),Gt&&typeof Gt.setStrictMode=="function")try{Gt.setStrictMode(As,e)}catch{}}var Kt=Math.clz32?Math.clz32:Fb,Xb=Math.log,Jb=Math.LN2;function Fb(e){return e>>>=0,e===0?32:31-(Xb(e)/Jb|0)|0}var ql=256,Hl=262144,Il=4194304;function Yi(e){var i=e&42;if(i!==0)return i;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Gl(e,i,s){var r=e.pendingLanes;if(r===0)return 0;var f=0,h=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var S=r&134217727;return S!==0?(r=S&~h,r!==0?f=Yi(r):(y&=S,y!==0?f=Yi(y):s||(s=S&~e,s!==0&&(f=Yi(s))))):(S=r&~h,S!==0?f=Yi(S):y!==0?f=Yi(y):s||(s=r&~e,s!==0&&(f=Yi(s)))),f===0?0:i!==0&&i!==f&&(i&h)===0&&(h=f&-f,s=i&-i,h>=s||h===32&&(s&4194048)!==0)?i:f}function Os(e,i){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&i)===0}function Wb(e,i){switch(e){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Pf(){var e=Il;return Il<<=1,(Il&62914560)===0&&(Il=4194304),e}function oc(e){for(var i=[],s=0;31>s;s++)i.push(e);return i}function Ts(e,i){e.pendingLanes|=i,i!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ex(e,i,s,r,f,h){var y=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var S=e.entanglements,_=e.expirationTimes,B=e.hiddenUpdates;for(s=y&~s;0<s;){var Y=31-Kt(s),W=1<<Y;S[Y]=0,_[Y]=-1;var Z=B[Y];if(Z!==null)for(B[Y]=null,Y=0;Y<Z.length;Y++){var I=Z[Y];I!==null&&(I.lane&=-536870913)}s&=~W}r!==0&&Qf(e,r,0),h!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=h&~(y&~i))}function Qf(e,i,s){e.pendingLanes|=i,e.suspendedLanes&=~i;var r=31-Kt(i);e.entangledLanes|=i,e.entanglements[r]=e.entanglements[r]|1073741824|s&261930}function Xf(e,i){var s=e.entangledLanes|=i;for(e=e.entanglements;s;){var r=31-Kt(s),f=1<<r;f&i|e[r]&i&&(e[r]|=i),s&=~f}}function Jf(e,i){var s=i&-i;return s=(s&42)!==0?1:cc(s),(s&(e.suspendedLanes|i))!==0?0:s}function cc(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 uc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ff(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:Ug(e.type))}function Wf(e,i){var s=F.p;try{return F.p=e,i()}finally{F.p=s}}var li=Math.random().toString(36).slice(2),Nt="__reactFiber$"+li,Mt="__reactProps$"+li,wa="__reactContainer$"+li,dc="__reactEvents$"+li,tx="__reactListeners$"+li,nx="__reactHandles$"+li,eh="__reactResources$"+li,Ds="__reactMarker$"+li;function fc(e){delete e[Nt],delete e[Mt],delete e[dc],delete e[tx],delete e[nx]}function ja(e){var i=e[Nt];if(i)return i;for(var s=e.parentNode;s;){if(i=s[wa]||s[Nt]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(e=Sg(e);e!==null;){if(s=e[Nt])return s;e=Sg(e)}return i}e=s,s=e.parentNode}return null}function Na(e){if(e=e[Nt]||e[wa]){var i=e.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return e}return null}function Rs(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e.stateNode;throw Error(l(33))}function ka(e){var i=e[eh];return i||(i=e[eh]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function xt(e){e[Ds]=!0}var th=new Set,nh={};function Vi(e,i){_a(e,i),_a(e+"Capture",i)}function _a(e,i){for(nh[e]=i,e=0;e<i.length;e++)th.add(i[e])}var ix=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]*$"),ih={},ah={};function ax(e){return It.call(ah,e)?!0:It.call(ih,e)?!1:ix.test(e)?ah[e]=!0:(ih[e]=!0,!1)}function Kl(e,i,s){if(ax(i))if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(i);return;case"boolean":var r=i.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(i);return}}e.setAttribute(i,""+s)}}function Yl(e,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttribute(i,""+s)}}function Un(e,i,s,r){if(r===null)e.removeAttribute(s);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(i,s,""+r)}}function tn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sh(e){var i=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function sx(e,i,s){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);if(!e.hasOwnProperty(i)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var f=r.get,h=r.set;return Object.defineProperty(e,i,{configurable:!0,get:function(){return f.call(this)},set:function(y){s=""+y,h.call(this,y)}}),Object.defineProperty(e,i,{enumerable:r.enumerable}),{getValue:function(){return s},setValue:function(y){s=""+y},stopTracking:function(){e._valueTracker=null,delete e[i]}}}}function hc(e){if(!e._valueTracker){var i=sh(e)?"checked":"value";e._valueTracker=sx(e,i,""+e[i])}}function lh(e){if(!e)return!1;var i=e._valueTracker;if(!i)return!0;var s=i.getValue(),r="";return e&&(r=sh(e)?e.checked?"true":"false":e.value),e=r,e!==s?(i.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 lx=/[\n"\\]/g;function nn(e){return e.replace(lx,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function mc(e,i,s,r,f,h,y,S){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),i!=null?y==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+tn(i)):e.value!==""+tn(i)&&(e.value=""+tn(i)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),i!=null?pc(e,y,tn(i)):s!=null?pc(e,y,tn(s)):r!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+tn(S):e.removeAttribute("name")}function rh(e,i,s,r,f,h,y,S){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),i!=null||s!=null){if(!(h!=="submit"&&h!=="reset"||i!=null)){hc(e);return}s=s!=null?""+tn(s):"",i=i!=null?""+tn(i):s,S||i===e.value||(e.value=i),e.defaultValue=i}r=r??f,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=S?e.checked:!!r,e.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),hc(e)}function pc(e,i,s){i==="number"&&Vl(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function za(e,i,s,r){if(e=e.options,i){i={};for(var f=0;f<s.length;f++)i["$"+s[f]]=!0;for(s=0;s<e.length;s++)f=i.hasOwnProperty("$"+e[s].value),e[s].selected!==f&&(e[s].selected=f),f&&r&&(e[s].defaultSelected=!0)}else{for(s=""+tn(s),i=null,f=0;f<e.length;f++){if(e[f].value===s){e[f].selected=!0,r&&(e[f].defaultSelected=!0);return}i!==null||e[f].disabled||(i=e[f])}i!==null&&(i.selected=!0)}}function oh(e,i,s){if(i!=null&&(i=""+tn(i),i!==e.value&&(e.value=i),s==null)){e.defaultValue!==i&&(e.defaultValue=i);return}e.defaultValue=s!=null?""+tn(s):""}function ch(e,i,s,r){if(i==null){if(r!=null){if(s!=null)throw Error(l(92));if(me(r)){if(1<r.length)throw Error(l(93));r=r[0]}s=r}s==null&&(s=""),i=s}s=tn(i),e.defaultValue=s,r=e.textContent,r===s&&r!==""&&r!==null&&(e.value=r),hc(e)}function Ca(e,i){if(i){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=i;return}}e.textContent=i}var rx=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 uh(e,i,s){var r=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?r?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="":r?e.setProperty(i,s):typeof s!="number"||s===0||rx.has(i)?i==="float"?e.cssFloat=s:e[i]=(""+s).trim():e[i]=s+"px"}function dh(e,i,s){if(i!=null&&typeof i!="object")throw Error(l(62));if(e=e.style,s!=null){for(var r in s)!s.hasOwnProperty(r)||i!=null&&i.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var f in i)r=i[f],i.hasOwnProperty(f)&&s[f]!==r&&uh(e,f,r)}else for(var h in i)i.hasOwnProperty(h)&&uh(e,h,i[h])}function gc(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 ox=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"]]),cx=/^[\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 Pl(e){return cx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function $n(){}var yc=null;function vc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ea=null,Aa=null;function fh(e){var i=Na(e);if(i&&(e=i.stateNode)){var s=e[Mt]||null;e:switch(e=i.stateNode,i.type){case"input":if(mc(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+nn(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var r=s[i];if(r!==e&&r.form===e.form){var f=r[Mt]||null;if(!f)throw Error(l(90));mc(r,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(i=0;i<s.length;i++)r=s[i],r.form===e.form&&lh(r)}break e;case"textarea":oh(e,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&za(e,!!s.multiple,i,!1)}}}var bc=!1;function hh(e,i,s){if(bc)return e(i,s);bc=!0;try{var r=e(i);return r}finally{if(bc=!1,(Ea!==null||Aa!==null)&&(Mr(),Ea&&(i=Ea,e=Aa,Aa=Ea=null,fh(i),e)))for(i=0;i<e.length;i++)fh(e[i])}}function Ms(e,i){var s=e.stateNode;if(s===null)return null;var r=s[Mt]||null;if(r===null)return null;s=r[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(l(231,i,typeof s));return s}var Bn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xc=!1;if(Bn)try{var Ls={};Object.defineProperty(Ls,"passive",{get:function(){xc=!0}}),window.addEventListener("test",Ls,Ls),window.removeEventListener("test",Ls,Ls)}catch{xc=!1}var ri=null,Sc=null,Ql=null;function mh(){if(Ql)return Ql;var e,i=Sc,s=i.length,r,f="value"in ri?ri.value:ri.textContent,h=f.length;for(e=0;e<s&&i[e]===f[e];e++);var y=s-e;for(r=1;r<=y&&i[s-r]===f[h-r];r++);return Ql=f.slice(e,1<r?1-r:void 0)}function Xl(e){var i=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&i===13&&(e=13)):e=i,e===10&&(e=13),32<=e||e===13?e:0}function Jl(){return!0}function ph(){return!1}function Lt(e){function i(s,r,f,h,y){this._reactName=s,this._targetInst=f,this.type=r,this.nativeEvent=h,this.target=y,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(s=e[S],this[S]=s?s(h):h[S]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Jl:ph,this.isPropagationStopped=ph,this}return v(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Jl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Jl)},persist:function(){},isPersistent:Jl}),i}var Pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fl=Lt(Pi),Us=v({},Pi,{view:0,detail:0}),ux=Lt(Us),wc,jc,$s,Wl=v({},Us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kc,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!==$s&&($s&&e.type==="mousemove"?(wc=e.screenX-$s.screenX,jc=e.screenY-$s.screenY):jc=wc=0,$s=e),wc)},movementY:function(e){return"movementY"in e?e.movementY:jc}}),gh=Lt(Wl),dx=v({},Wl,{dataTransfer:0}),fx=Lt(dx),hx=v({},Us,{relatedTarget:0}),Nc=Lt(hx),mx=v({},Pi,{animationName:0,elapsedTime:0,pseudoElement:0}),px=Lt(mx),gx=v({},Pi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yx=Lt(gx),vx=v({},Pi,{data:0}),yh=Lt(vx),bx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xx={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"},Sx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wx(e){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(e):(e=Sx[e])?!!i[e]:!1}function kc(){return wx}var jx=v({},Us,{key:function(e){if(e.key){var i=bx[e.key]||e.key;if(i!=="Unidentified")return i}return e.type==="keypress"?(e=Xl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kc,charCode:function(e){return e.type==="keypress"?Xl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Xl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Nx=Lt(jx),kx=v({},Wl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vh=Lt(kx),_x=v({},Us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kc}),zx=Lt(_x),Cx=v({},Pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ex=Lt(Cx),Ax=v({},Wl,{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}),Ox=Lt(Ax),Tx=v({},Pi,{newState:0,oldState:0}),Dx=Lt(Tx),Rx=[9,13,27,32],_c=Bn&&"CompositionEvent"in window,Bs=null;Bn&&"documentMode"in document&&(Bs=document.documentMode);var Mx=Bn&&"TextEvent"in window&&!Bs,bh=Bn&&(!_c||Bs&&8<Bs&&11>=Bs),xh=" ",Sh=!1;function wh(e,i){switch(e){case"keyup":return Rx.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Oa=!1;function Lx(e,i){switch(e){case"compositionend":return jh(i);case"keypress":return i.which!==32?null:(Sh=!0,xh);case"textInput":return e=i.data,e===xh&&Sh?null:e;default:return null}}function Ux(e,i){if(Oa)return e==="compositionend"||!_c&&wh(e,i)?(e=mh(),Ql=Sc=ri=null,Oa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return bh&&i.locale!=="ko"?null:i.data;default:return null}}var $x={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Nh(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i==="input"?!!$x[e.type]:i==="textarea"}function kh(e,i,s,r){Ea?Aa?Aa.push(r):Aa=[r]:Ea=r,i=Hr(i,"onChange"),0<i.length&&(s=new Fl("onChange","change",null,s,r),e.push({event:s,listeners:i}))}var Zs=null,qs=null;function Bx(e){rg(e,0)}function er(e){var i=Rs(e);if(lh(i))return e}function _h(e,i){if(e==="change")return i}var zh=!1;if(Bn){var zc;if(Bn){var Cc="oninput"in document;if(!Cc){var Ch=document.createElement("div");Ch.setAttribute("oninput","return;"),Cc=typeof Ch.oninput=="function"}zc=Cc}else zc=!1;zh=zc&&(!document.documentMode||9<document.documentMode)}function Eh(){Zs&&(Zs.detachEvent("onpropertychange",Ah),qs=Zs=null)}function Ah(e){if(e.propertyName==="value"&&er(qs)){var i=[];kh(i,qs,e,vc(e)),hh(Bx,i)}}function Zx(e,i,s){e==="focusin"?(Eh(),Zs=i,qs=s,Zs.attachEvent("onpropertychange",Ah)):e==="focusout"&&Eh()}function qx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return er(qs)}function Hx(e,i){if(e==="click")return er(i)}function Ix(e,i){if(e==="input"||e==="change")return er(i)}function Gx(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}var Yt=typeof Object.is=="function"?Object.is:Gx;function Hs(e,i){if(Yt(e,i))return!0;if(typeof e!="object"||e===null||typeof i!="object"||i===null)return!1;var s=Object.keys(e),r=Object.keys(i);if(s.length!==r.length)return!1;for(r=0;r<s.length;r++){var f=s[r];if(!It.call(i,f)||!Yt(e[f],i[f]))return!1}return!0}function Oh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Th(e,i){var s=Oh(e);e=0;for(var r;s;){if(s.nodeType===3){if(r=e+s.textContent.length,e<=i&&r>=i)return{node:s,offset:i-e};e=r}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Oh(s)}}function Dh(e,i){return e&&i?e===i?!0:e&&e.nodeType===3?!1:i&&i.nodeType===3?Dh(e,i.parentNode):"contains"in e?e.contains(i):e.compareDocumentPosition?!!(e.compareDocumentPosition(i)&16):!1:!1}function Rh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var i=Vl(e.document);i instanceof e.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)e=i.contentWindow;else break;i=Vl(e.document)}return i}function Ec(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i&&(i==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||i==="textarea"||e.contentEditable==="true")}var Kx=Bn&&"documentMode"in document&&11>=document.documentMode,Ta=null,Ac=null,Is=null,Oc=!1;function Mh(e,i,s){var r=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Oc||Ta==null||Ta!==Vl(r)||(r=Ta,"selectionStart"in r&&Ec(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Is&&Hs(Is,r)||(Is=r,r=Hr(Ac,"onSelect"),0<r.length&&(i=new Fl("onSelect","select",null,i,s),e.push({event:i,listeners:r}),i.target=Ta)))}function Qi(e,i){var s={};return s[e.toLowerCase()]=i.toLowerCase(),s["Webkit"+e]="webkit"+i,s["Moz"+e]="moz"+i,s}var Da={animationend:Qi("Animation","AnimationEnd"),animationiteration:Qi("Animation","AnimationIteration"),animationstart:Qi("Animation","AnimationStart"),transitionrun:Qi("Transition","TransitionRun"),transitionstart:Qi("Transition","TransitionStart"),transitioncancel:Qi("Transition","TransitionCancel"),transitionend:Qi("Transition","TransitionEnd")},Tc={},Lh={};Bn&&(Lh=document.createElement("div").style,"AnimationEvent"in window||(delete Da.animationend.animation,delete Da.animationiteration.animation,delete Da.animationstart.animation),"TransitionEvent"in window||delete Da.transitionend.transition);function Xi(e){if(Tc[e])return Tc[e];if(!Da[e])return e;var i=Da[e],s;for(s in i)if(i.hasOwnProperty(s)&&s in Lh)return Tc[e]=i[s];return e}var Uh=Xi("animationend"),$h=Xi("animationiteration"),Bh=Xi("animationstart"),Yx=Xi("transitionrun"),Vx=Xi("transitionstart"),Px=Xi("transitioncancel"),Zh=Xi("transitionend"),qh=new Map,Dc="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(" ");Dc.push("scrollEnd");function xn(e,i){qh.set(e,i),Vi(i,[e])}var tr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},an=[],Ra=0,Rc=0;function nr(){for(var e=Ra,i=Rc=Ra=0;i<e;){var s=an[i];an[i++]=null;var r=an[i];an[i++]=null;var f=an[i];an[i++]=null;var h=an[i];if(an[i++]=null,r!==null&&f!==null){var y=r.pending;y===null?f.next=f:(f.next=y.next,y.next=f),r.pending=f}h!==0&&Hh(s,f,h)}}function ir(e,i,s,r){an[Ra++]=e,an[Ra++]=i,an[Ra++]=s,an[Ra++]=r,Rc|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Mc(e,i,s,r){return ir(e,i,s,r),ar(e)}function Ji(e,i){return ir(e,null,null,i),ar(e)}function Hh(e,i,s){e.lanes|=s;var r=e.alternate;r!==null&&(r.lanes|=s);for(var f=!1,h=e.return;h!==null;)h.childLanes|=s,r=h.alternate,r!==null&&(r.childLanes|=s),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(f=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,f&&i!==null&&(f=31-Kt(s),e=h.hiddenUpdates,r=e[f],r===null?e[f]=[i]:r.push(i),i.lane=s|536870912),h):null}function ar(e){if(50<dl)throw dl=0,Gu=null,Error(l(185));for(var i=e.return;i!==null;)e=i,i=e.return;return e.tag===3?e.stateNode:null}var Ma={};function Qx(e,i,s,r){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(e,i,s,r){return new Qx(e,i,s,r)}function Lc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zn(e,i){var s=e.alternate;return s===null?(s=Vt(e.tag,i,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=i,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,i=e.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function Ih(e,i){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=i,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,i=s.dependencies,e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),e}function sr(e,i,s,r,f,h){var y=0;if(r=e,typeof e=="function")Lc(e)&&(y=1);else if(typeof e=="string")y=ew(e,s,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=Vt(31,s,i,f),e.elementType=P,e.lanes=h,e;case j:return Fi(s.children,f,h,i);case k:y=8,f|=24;break;case A:return e=Vt(12,s,i,f|2),e.elementType=A,e.lanes=h,e;case L:return e=Vt(13,s,i,f),e.elementType=L,e.lanes=h,e;case H:return e=Vt(19,s,i,f),e.elementType=H,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O:y=10;break e;case T:y=9;break e;case R:y=11;break e;case K:y=14;break e;case D:y=16,r=null;break e}y=29,s=Error(l(130,e===null?"null":typeof e,"")),r=null}return i=Vt(y,s,i,f),i.elementType=e,i.type=r,i.lanes=h,i}function Fi(e,i,s,r){return e=Vt(7,e,r,i),e.lanes=s,e}function Uc(e,i,s){return e=Vt(6,e,null,i),e.lanes=s,e}function Gh(e){var i=Vt(18,null,null,0);return i.stateNode=e,i}function $c(e,i,s){return i=Vt(4,e.children!==null?e.children:[],e.key,i),i.lanes=s,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}var Kh=new WeakMap;function sn(e,i){if(typeof e=="object"&&e!==null){var s=Kh.get(e);return s!==void 0?s:(i={value:e,source:i,stack:Gi(i)},Kh.set(e,i),i)}return{value:e,source:i,stack:Gi(i)}}var La=[],Ua=0,lr=null,Gs=0,ln=[],rn=0,oi=null,An=1,On="";function qn(e,i){La[Ua++]=Gs,La[Ua++]=lr,lr=e,Gs=i}function Yh(e,i,s){ln[rn++]=An,ln[rn++]=On,ln[rn++]=oi,oi=e;var r=An;e=On;var f=32-Kt(r)-1;r&=~(1<<f),s+=1;var h=32-Kt(i)+f;if(30<h){var y=f-f%5;h=(r&(1<<y)-1).toString(32),r>>=y,f-=y,An=1<<32-Kt(i)+f|s<<f|r,On=h+e}else An=1<<h|s<<f|r,On=e}function Bc(e){e.return!==null&&(qn(e,1),Yh(e,1,0))}function Zc(e){for(;e===lr;)lr=La[--Ua],La[Ua]=null,Gs=La[--Ua],La[Ua]=null;for(;e===oi;)oi=ln[--rn],ln[rn]=null,On=ln[--rn],ln[rn]=null,An=ln[--rn],ln[rn]=null}function Vh(e,i){ln[rn++]=An,ln[rn++]=On,ln[rn++]=oi,An=i.id,On=i.overflow,oi=e}var kt=null,Je=null,De=!1,ci=null,on=!1,qc=Error(l(519));function ui(e){var i=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ks(sn(i,e)),qc}function Ph(e){var i=e.stateNode,s=e.type,r=e.memoizedProps;switch(i[Nt]=e,i[Mt]=r,s){case"dialog":Ee("cancel",i),Ee("close",i);break;case"iframe":case"object":case"embed":Ee("load",i);break;case"video":case"audio":for(s=0;s<hl.length;s++)Ee(hl[s],i);break;case"source":Ee("error",i);break;case"img":case"image":case"link":Ee("error",i),Ee("load",i);break;case"details":Ee("toggle",i);break;case"input":Ee("invalid",i),rh(i,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Ee("invalid",i);break;case"textarea":Ee("invalid",i),ch(i,r.value,r.defaultValue,r.children)}s=r.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||r.suppressHydrationWarning===!0||dg(i.textContent,s)?(r.popover!=null&&(Ee("beforetoggle",i),Ee("toggle",i)),r.onScroll!=null&&Ee("scroll",i),r.onScrollEnd!=null&&Ee("scrollend",i),r.onClick!=null&&(i.onclick=$n),i=!0):i=!1,i||ui(e,!0)}function Qh(e){for(kt=e.return;kt;)switch(kt.tag){case 5:case 31:case 13:on=!1;return;case 27:case 3:on=!0;return;default:kt=kt.return}}function $a(e){if(e!==kt)return!1;if(!De)return Qh(e),De=!0,!1;var i=e.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||sd(e.type,e.memoizedProps)),s=!s),s&&Je&&ui(e),Qh(e),i===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Je=xg(e)}else if(i===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Je=xg(e)}else i===27?(i=Je,Ni(e.type)?(e=ud,ud=null,Je=e):Je=i):Je=kt?un(e.stateNode.nextSibling):null;return!0}function Wi(){Je=kt=null,De=!1}function Hc(){var e=ci;return e!==null&&(Zt===null?Zt=e:Zt.push.apply(Zt,e),ci=null),e}function Ks(e){ci===null?ci=[e]:ci.push(e)}var Ic=C(null),ea=null,Hn=null;function di(e,i,s){te(Ic,i._currentValue),i._currentValue=s}function In(e){e._currentValue=Ic.current,G(Ic)}function Gc(e,i,s){for(;e!==null;){var r=e.alternate;if((e.childLanes&i)!==i?(e.childLanes|=i,r!==null&&(r.childLanes|=i)):r!==null&&(r.childLanes&i)!==i&&(r.childLanes|=i),e===s)break;e=e.return}}function Kc(e,i,s,r){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var h=f.dependencies;if(h!==null){var y=f.child;h=h.firstContext;e:for(;h!==null;){var S=h;h=f;for(var _=0;_<i.length;_++)if(S.context===i[_]){h.lanes|=s,S=h.alternate,S!==null&&(S.lanes|=s),Gc(h.return,s,e),r||(y=null);break e}h=S.next}}else if(f.tag===18){if(y=f.return,y===null)throw Error(l(341));y.lanes|=s,h=y.alternate,h!==null&&(h.lanes|=s),Gc(y,s,e),y=null}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===e){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}}function Ba(e,i,s,r){e=null;for(var f=i,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var y=f.alternate;if(y===null)throw Error(l(387));if(y=y.memoizedProps,y!==null){var S=f.type;Yt(f.pendingProps.value,y.value)||(e!==null?e.push(S):e=[S])}}else if(f===q.current){if(y=f.alternate,y===null)throw Error(l(387));y.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(vl):e=[vl])}f=f.return}e!==null&&Kc(i,e,s,r),i.flags|=262144}function rr(e){for(e=e.firstContext;e!==null;){if(!Yt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ta(e){ea=e,Hn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _t(e){return Xh(ea,e)}function or(e,i){return ea===null&&ta(e),Xh(e,i)}function Xh(e,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},Hn===null){if(e===null)throw Error(l(308));Hn=i,e.dependencies={lanes:0,firstContext:i},e.flags|=524288}else Hn=Hn.next=i;return s}var Xx=typeof AbortController<"u"?AbortController:function(){var e=[],i=this.signal={aborted:!1,addEventListener:function(s,r){e.push(r)}};this.abort=function(){i.aborted=!0,e.forEach(function(s){return s()})}},Jx=t.unstable_scheduleCallback,Fx=t.unstable_NormalPriority,dt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Yc(){return{controller:new Xx,data:new Map,refCount:0}}function Ys(e){e.refCount--,e.refCount===0&&Jx(Fx,function(){e.controller.abort()})}var Vs=null,Vc=0,Za=0,qa=null;function Wx(e,i){if(Vs===null){var s=Vs=[];Vc=0,Za=Xu(),qa={status:"pending",value:void 0,then:function(r){s.push(r)}}}return Vc++,i.then(Jh,Jh),i}function Jh(){if(--Vc===0&&Vs!==null){qa!==null&&(qa.status="fulfilled");var e=Vs;Vs=null,Za=0,qa=null;for(var i=0;i<e.length;i++)(0,e[i])()}}function eS(e,i){var s=[],r={status:"pending",value:null,reason:null,then:function(f){s.push(f)}};return e.then(function(){r.status="fulfilled",r.value=i;for(var f=0;f<s.length;f++)(0,s[f])(i)},function(f){for(r.status="rejected",r.reason=f,f=0;f<s.length;f++)(0,s[f])(void 0)}),r}var Fh=U.S;U.S=function(e,i){Mp=we(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Wx(e,i),Fh!==null&&Fh(e,i)};var na=C(null);function Pc(){var e=na.current;return e!==null?e:Pe.pooledCache}function cr(e,i){i===null?te(na,na.current):te(na,i.pool)}function Wh(){var e=Pc();return e===null?null:{parent:dt._currentValue,pool:e}}var Ha=Error(l(460)),Qc=Error(l(474)),ur=Error(l(542)),dr={then:function(){}};function em(e){return e=e.status,e==="fulfilled"||e==="rejected"}function tm(e,i,s){switch(s=e[s],s===void 0?e.push(i):s!==i&&(i.then($n,$n),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,im(e),e;default:if(typeof i.status=="string")i.then($n,$n);else{if(e=Pe,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=i,e.status="pending",e.then(function(r){if(i.status==="pending"){var f=i;f.status="fulfilled",f.value=r}},function(r){if(i.status==="pending"){var f=i;f.status="rejected",f.reason=r}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,im(e),e}throw aa=i,Ha}}function ia(e){try{var i=e._init;return i(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(aa=s,Ha):s}}var aa=null;function nm(){if(aa===null)throw Error(l(459));var e=aa;return aa=null,e}function im(e){if(e===Ha||e===ur)throw Error(l(483))}var Ia=null,Ps=0;function fr(e){var i=Ps;return Ps+=1,Ia===null&&(Ia=[]),tm(Ia,e,i)}function Qs(e,i){i=i.props.ref,e.ref=i!==void 0?i:null}function hr(e,i){throw i.$$typeof===x?Error(l(525)):(e=Object.prototype.toString.call(i),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)))}function am(e){function i(M,E){if(e){var $=M.deletions;$===null?(M.deletions=[E],M.flags|=16):$.push(E)}}function s(M,E){if(!e)return null;for(;E!==null;)i(M,E),E=E.sibling;return null}function r(M){for(var E=new Map;M!==null;)M.key!==null?E.set(M.key,M):E.set(M.index,M),M=M.sibling;return E}function f(M,E){return M=Zn(M,E),M.index=0,M.sibling=null,M}function h(M,E,$){return M.index=$,e?($=M.alternate,$!==null?($=$.index,$<E?(M.flags|=67108866,E):$):(M.flags|=67108866,E)):(M.flags|=1048576,E)}function y(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function S(M,E,$,X){return E===null||E.tag!==6?(E=Uc($,M.mode,X),E.return=M,E):(E=f(E,$),E.return=M,E)}function _(M,E,$,X){var be=$.type;return be===j?Y(M,E,$.props.children,X,$.key):E!==null&&(E.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===D&&ia(be)===E.type)?(E=f(E,$.props),Qs(E,$),E.return=M,E):(E=sr($.type,$.key,$.props,null,M.mode,X),Qs(E,$),E.return=M,E)}function B(M,E,$,X){return E===null||E.tag!==4||E.stateNode.containerInfo!==$.containerInfo||E.stateNode.implementation!==$.implementation?(E=$c($,M.mode,X),E.return=M,E):(E=f(E,$.children||[]),E.return=M,E)}function Y(M,E,$,X,be){return E===null||E.tag!==7?(E=Fi($,M.mode,X,be),E.return=M,E):(E=f(E,$),E.return=M,E)}function W(M,E,$){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=Uc(""+E,M.mode,$),E.return=M,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case N:return $=sr(E.type,E.key,E.props,null,M.mode,$),Qs($,E),$.return=M,$;case z:return E=$c(E,M.mode,$),E.return=M,E;case D:return E=ia(E),W(M,E,$)}if(me(E)||oe(E))return E=Fi(E,M.mode,$,null),E.return=M,E;if(typeof E.then=="function")return W(M,fr(E),$);if(E.$$typeof===O)return W(M,or(M,E),$);hr(M,E)}return null}function Z(M,E,$,X){var be=E!==null?E.key:null;if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return be!==null?null:S(M,E,""+$,X);if(typeof $=="object"&&$!==null){switch($.$$typeof){case N:return $.key===be?_(M,E,$,X):null;case z:return $.key===be?B(M,E,$,X):null;case D:return $=ia($),Z(M,E,$,X)}if(me($)||oe($))return be!==null?null:Y(M,E,$,X,null);if(typeof $.then=="function")return Z(M,E,fr($),X);if($.$$typeof===O)return Z(M,E,or(M,$),X);hr(M,$)}return null}function I(M,E,$,X,be){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return M=M.get($)||null,S(E,M,""+X,be);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case N:return M=M.get(X.key===null?$:X.key)||null,_(E,M,X,be);case z:return M=M.get(X.key===null?$:X.key)||null,B(E,M,X,be);case D:return X=ia(X),I(M,E,$,X,be)}if(me(X)||oe(X))return M=M.get($)||null,Y(E,M,X,be,null);if(typeof X.then=="function")return I(M,E,$,fr(X),be);if(X.$$typeof===O)return I(M,E,$,or(E,X),be);hr(E,X)}return null}function de(M,E,$,X){for(var be=null,Me=null,ge=E,_e=E=0,Te=null;ge!==null&&_e<$.length;_e++){ge.index>_e?(Te=ge,ge=null):Te=ge.sibling;var Le=Z(M,ge,$[_e],X);if(Le===null){ge===null&&(ge=Te);break}e&&ge&&Le.alternate===null&&i(M,ge),E=h(Le,E,_e),Me===null?be=Le:Me.sibling=Le,Me=Le,ge=Te}if(_e===$.length)return s(M,ge),De&&qn(M,_e),be;if(ge===null){for(;_e<$.length;_e++)ge=W(M,$[_e],X),ge!==null&&(E=h(ge,E,_e),Me===null?be=ge:Me.sibling=ge,Me=ge);return De&&qn(M,_e),be}for(ge=r(ge);_e<$.length;_e++)Te=I(ge,M,_e,$[_e],X),Te!==null&&(e&&Te.alternate!==null&&ge.delete(Te.key===null?_e:Te.key),E=h(Te,E,_e),Me===null?be=Te:Me.sibling=Te,Me=Te);return e&&ge.forEach(function(Ei){return i(M,Ei)}),De&&qn(M,_e),be}function Se(M,E,$,X){if($==null)throw Error(l(151));for(var be=null,Me=null,ge=E,_e=E=0,Te=null,Le=$.next();ge!==null&&!Le.done;_e++,Le=$.next()){ge.index>_e?(Te=ge,ge=null):Te=ge.sibling;var Ei=Z(M,ge,Le.value,X);if(Ei===null){ge===null&&(ge=Te);break}e&&ge&&Ei.alternate===null&&i(M,ge),E=h(Ei,E,_e),Me===null?be=Ei:Me.sibling=Ei,Me=Ei,ge=Te}if(Le.done)return s(M,ge),De&&qn(M,_e),be;if(ge===null){for(;!Le.done;_e++,Le=$.next())Le=W(M,Le.value,X),Le!==null&&(E=h(Le,E,_e),Me===null?be=Le:Me.sibling=Le,Me=Le);return De&&qn(M,_e),be}for(ge=r(ge);!Le.done;_e++,Le=$.next())Le=I(ge,M,_e,Le.value,X),Le!==null&&(e&&Le.alternate!==null&&ge.delete(Le.key===null?_e:Le.key),E=h(Le,E,_e),Me===null?be=Le:Me.sibling=Le,Me=Le);return e&&ge.forEach(function(dw){return i(M,dw)}),De&&qn(M,_e),be}function Ye(M,E,$,X){if(typeof $=="object"&&$!==null&&$.type===j&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case N:e:{for(var be=$.key;E!==null;){if(E.key===be){if(be=$.type,be===j){if(E.tag===7){s(M,E.sibling),X=f(E,$.props.children),X.return=M,M=X;break e}}else if(E.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===D&&ia(be)===E.type){s(M,E.sibling),X=f(E,$.props),Qs(X,$),X.return=M,M=X;break e}s(M,E);break}else i(M,E);E=E.sibling}$.type===j?(X=Fi($.props.children,M.mode,X,$.key),X.return=M,M=X):(X=sr($.type,$.key,$.props,null,M.mode,X),Qs(X,$),X.return=M,M=X)}return y(M);case z:e:{for(be=$.key;E!==null;){if(E.key===be)if(E.tag===4&&E.stateNode.containerInfo===$.containerInfo&&E.stateNode.implementation===$.implementation){s(M,E.sibling),X=f(E,$.children||[]),X.return=M,M=X;break e}else{s(M,E);break}else i(M,E);E=E.sibling}X=$c($,M.mode,X),X.return=M,M=X}return y(M);case D:return $=ia($),Ye(M,E,$,X)}if(me($))return de(M,E,$,X);if(oe($)){if(be=oe($),typeof be!="function")throw Error(l(150));return $=be.call($),Se(M,E,$,X)}if(typeof $.then=="function")return Ye(M,E,fr($),X);if($.$$typeof===O)return Ye(M,E,or(M,$),X);hr(M,$)}return typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint"?($=""+$,E!==null&&E.tag===6?(s(M,E.sibling),X=f(E,$),X.return=M,M=X):(s(M,E),X=Uc($,M.mode,X),X.return=M,M=X),y(M)):s(M,E)}return function(M,E,$,X){try{Ps=0;var be=Ye(M,E,$,X);return Ia=null,be}catch(ge){if(ge===Ha||ge===ur)throw ge;var Me=Vt(29,ge,null,M.mode);return Me.lanes=X,Me.return=M,Me}}}var sa=am(!0),sm=am(!1),fi=!1;function Xc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jc(e,i){e=e.updateQueue,i.updateQueue===e&&(i.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function hi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function mi(e,i,s){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ue&2)!==0){var f=r.pending;return f===null?i.next=i:(i.next=f.next,f.next=i),r.pending=i,i=ar(e),Hh(e,null,s),i}return ir(e,r,i,s),ar(e)}function Xs(e,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var r=i.lanes;r&=e.pendingLanes,s|=r,i.lanes=s,Xf(e,s)}}function Fc(e,i){var s=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,s===r)){var f=null,h=null;if(s=s.firstBaseUpdate,s!==null){do{var y={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};h===null?f=h=y:h=h.next=y,s=s.next}while(s!==null);h===null?f=h=i:h=h.next=i}else f=h=i;s={baseState:r.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:r.shared,callbacks:r.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=i:e.next=i,s.lastBaseUpdate=i}var Wc=!1;function Js(){if(Wc){var e=qa;if(e!==null)throw e}}function Fs(e,i,s,r){Wc=!1;var f=e.updateQueue;fi=!1;var h=f.firstBaseUpdate,y=f.lastBaseUpdate,S=f.shared.pending;if(S!==null){f.shared.pending=null;var _=S,B=_.next;_.next=null,y===null?h=B:y.next=B,y=_;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,S=Y.lastBaseUpdate,S!==y&&(S===null?Y.firstBaseUpdate=B:S.next=B,Y.lastBaseUpdate=_))}if(h!==null){var W=f.baseState;y=0,Y=B=_=null,S=h;do{var Z=S.lane&-536870913,I=Z!==S.lane;if(I?(Oe&Z)===Z:(r&Z)===Z){Z!==0&&Z===Za&&(Wc=!0),Y!==null&&(Y=Y.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var de=e,Se=S;Z=i;var Ye=s;switch(Se.tag){case 1:if(de=Se.payload,typeof de=="function"){W=de.call(Ye,W,Z);break e}W=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=Se.payload,Z=typeof de=="function"?de.call(Ye,W,Z):de,Z==null)break e;W=v({},W,Z);break e;case 2:fi=!0}}Z=S.callback,Z!==null&&(e.flags|=64,I&&(e.flags|=8192),I=f.callbacks,I===null?f.callbacks=[Z]:I.push(Z))}else I={lane:Z,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Y===null?(B=Y=I,_=W):Y=Y.next=I,y|=Z;if(S=S.next,S===null){if(S=f.shared.pending,S===null)break;I=S,S=I.next,I.next=null,f.lastBaseUpdate=I,f.shared.pending=null}}while(!0);Y===null&&(_=W),f.baseState=_,f.firstBaseUpdate=B,f.lastBaseUpdate=Y,h===null&&(f.shared.lanes=0),bi|=y,e.lanes=y,e.memoizedState=W}}function lm(e,i){if(typeof e!="function")throw Error(l(191,e));e.call(i)}function rm(e,i){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)lm(s[e],i)}var Ga=C(null),mr=C(0);function om(e,i){e=Fn,te(mr,e),te(Ga,i),Fn=e|i.baseLanes}function eu(){te(mr,Fn),te(Ga,Ga.current)}function tu(){Fn=mr.current,G(Ga),G(mr)}var Pt=C(null),cn=null;function pi(e){var i=e.alternate;te(lt,lt.current&1),te(Pt,e),cn===null&&(i===null||Ga.current!==null||i.memoizedState!==null)&&(cn=e)}function nu(e){te(lt,lt.current),te(Pt,e),cn===null&&(cn=e)}function cm(e){e.tag===22?(te(lt,lt.current),te(Pt,e),cn===null&&(cn=e)):gi()}function gi(){te(lt,lt.current),te(Pt,Pt.current)}function Qt(e){G(Pt),cn===e&&(cn=null),G(lt)}var lt=C(0);function pr(e){for(var i=e;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||od(s)||cd(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Gn=0,ke=null,Ge=null,ft=null,gr=!1,Ka=!1,la=!1,yr=0,Ws=0,Ya=null,tS=0;function at(){throw Error(l(321))}function iu(e,i){if(i===null)return!1;for(var s=0;s<i.length&&s<e.length;s++)if(!Yt(e[s],i[s]))return!1;return!0}function au(e,i,s,r,f,h){return Gn=h,ke=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,U.H=e===null||e.memoizedState===null?Ym:bu,la=!1,h=s(r,f),la=!1,Ka&&(h=dm(i,s,r,f)),um(e),h}function um(e){U.H=nl;var i=Ge!==null&&Ge.next!==null;if(Gn=0,ft=Ge=ke=null,gr=!1,Ws=0,Ya=null,i)throw Error(l(300));e===null||ht||(e=e.dependencies,e!==null&&rr(e)&&(ht=!0))}function dm(e,i,s,r){ke=e;var f=0;do{if(Ka&&(Ya=null),Ws=0,Ka=!1,25<=f)throw Error(l(301));if(f+=1,ft=Ge=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}U.H=Vm,h=i(s,r)}while(Ka);return h}function nS(){var e=U.H,i=e.useState()[0];return i=typeof i.then=="function"?el(i):i,e=e.useState()[0],(Ge!==null?Ge.memoizedState:null)!==e&&(ke.flags|=1024),i}function su(){var e=yr!==0;return yr=0,e}function lu(e,i,s){i.updateQueue=e.updateQueue,i.flags&=-2053,e.lanes&=~s}function ru(e){if(gr){for(e=e.memoizedState;e!==null;){var i=e.queue;i!==null&&(i.pending=null),e=e.next}gr=!1}Gn=0,ft=Ge=ke=null,Ka=!1,Ws=yr=0,Ya=null}function At(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?ke.memoizedState=ft=e:ft=ft.next=e,ft}function rt(){if(Ge===null){var e=ke.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var i=ft===null?ke.memoizedState:ft.next;if(i!==null)ft=i,Ge=e;else{if(e===null)throw ke.alternate===null?Error(l(467)):Error(l(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},ft===null?ke.memoizedState=ft=e:ft=ft.next=e}return ft}function vr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function el(e){var i=Ws;return Ws+=1,Ya===null&&(Ya=[]),e=tm(Ya,e,i),i=ke,(ft===null?i.memoizedState:ft.next)===null&&(i=i.alternate,U.H=i===null||i.memoizedState===null?Ym:bu),e}function br(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return el(e);if(e.$$typeof===O)return _t(e)}throw Error(l(438,String(e)))}function ou(e){var i=null,s=ke.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var r=ke.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(i={data:r.data.map(function(f){return f.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=vr(),ke.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(e),r=0;r<e;r++)s[r]=xe;return i.index++,s}function Kn(e,i){return typeof i=="function"?i(e):i}function xr(e){var i=rt();return cu(i,Ge,e)}function cu(e,i,s){var r=e.queue;if(r===null)throw Error(l(311));r.lastRenderedReducer=s;var f=e.baseQueue,h=r.pending;if(h!==null){if(f!==null){var y=f.next;f.next=h.next,h.next=y}i.baseQueue=f=h,r.pending=null}if(h=e.baseState,f===null)e.memoizedState=h;else{i=f.next;var S=y=null,_=null,B=i,Y=!1;do{var W=B.lane&-536870913;if(W!==B.lane?(Oe&W)===W:(Gn&W)===W){var Z=B.revertLane;if(Z===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),W===Za&&(Y=!0);else if((Gn&Z)===Z){B=B.next,Z===Za&&(Y=!0);continue}else W={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},_===null?(S=_=W,y=h):_=_.next=W,ke.lanes|=Z,bi|=Z;W=B.action,la&&s(h,W),h=B.hasEagerState?B.eagerState:s(h,W)}else Z={lane:W,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},_===null?(S=_=Z,y=h):_=_.next=Z,ke.lanes|=W,bi|=W;B=B.next}while(B!==null&&B!==i);if(_===null?y=h:_.next=S,!Yt(h,e.memoizedState)&&(ht=!0,Y&&(s=qa,s!==null)))throw s;e.memoizedState=h,e.baseState=y,e.baseQueue=_,r.lastRenderedState=h}return f===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function uu(e){var i=rt(),s=i.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=e;var r=s.dispatch,f=s.pending,h=i.memoizedState;if(f!==null){s.pending=null;var y=f=f.next;do h=e(h,y.action),y=y.next;while(y!==f);Yt(h,i.memoizedState)||(ht=!0),i.memoizedState=h,i.baseQueue===null&&(i.baseState=h),s.lastRenderedState=h}return[h,r]}function fm(e,i,s){var r=ke,f=rt(),h=De;if(h){if(s===void 0)throw Error(l(407));s=s()}else s=i();var y=!Yt((Ge||f).memoizedState,s);if(y&&(f.memoizedState=s,ht=!0),f=f.queue,hu(pm.bind(null,r,f,e),[e]),f.getSnapshot!==i||y||ft!==null&&ft.memoizedState.tag&1){if(r.flags|=2048,Va(9,{destroy:void 0},mm.bind(null,r,f,s,i),null),Pe===null)throw Error(l(349));h||(Gn&127)!==0||hm(r,i,s)}return s}function hm(e,i,s){e.flags|=16384,e={getSnapshot:i,value:s},i=ke.updateQueue,i===null?(i=vr(),ke.updateQueue=i,i.stores=[e]):(s=i.stores,s===null?i.stores=[e]:s.push(e))}function mm(e,i,s,r){i.value=s,i.getSnapshot=r,gm(i)&&ym(e)}function pm(e,i,s){return s(function(){gm(i)&&ym(e)})}function gm(e){var i=e.getSnapshot;e=e.value;try{var s=i();return!Yt(e,s)}catch{return!0}}function ym(e){var i=Ji(e,2);i!==null&&qt(i,e,2)}function du(e){var i=At();if(typeof e=="function"){var s=e;if(e=s(),la){si(!0);try{s()}finally{si(!1)}}}return i.memoizedState=i.baseState=e,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:e},i}function vm(e,i,s,r){return e.baseState=s,cu(e,Ge,typeof r=="function"?r:Kn)}function iS(e,i,s,r,f){if(jr(e))throw Error(l(485));if(e=i.action,e!==null){var h={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){h.listeners.push(y)}};U.T!==null?s(!0):h.isTransition=!1,r(h),s=i.pending,s===null?(h.next=i.pending=h,bm(i,h)):(h.next=s.next,i.pending=s.next=h)}}function bm(e,i){var s=i.action,r=i.payload,f=e.state;if(i.isTransition){var h=U.T,y={};U.T=y;try{var S=s(f,r),_=U.S;_!==null&&_(y,S),xm(e,i,S)}catch(B){fu(e,i,B)}finally{h!==null&&y.types!==null&&(h.types=y.types),U.T=h}}else try{h=s(f,r),xm(e,i,h)}catch(B){fu(e,i,B)}}function xm(e,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(r){Sm(e,i,r)},function(r){return fu(e,i,r)}):Sm(e,i,s)}function Sm(e,i,s){i.status="fulfilled",i.value=s,wm(i),e.state=s,i=e.pending,i!==null&&(s=i.next,s===i?e.pending=null:(s=s.next,i.next=s,bm(e,s)))}function fu(e,i,s){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do i.status="rejected",i.reason=s,wm(i),i=i.next;while(i!==r)}e.action=null}function wm(e){e=e.listeners;for(var i=0;i<e.length;i++)(0,e[i])()}function jm(e,i){return i}function Nm(e,i){if(De){var s=Pe.formState;if(s!==null){e:{var r=ke;if(De){if(Je){t:{for(var f=Je,h=on;f.nodeType!==8;){if(!h){f=null;break t}if(f=un(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){Je=un(f.nextSibling),r=f.data==="F!";break e}}ui(r)}r=!1}r&&(i=s[0])}}return s=At(),s.memoizedState=s.baseState=i,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jm,lastRenderedState:i},s.queue=r,s=Im.bind(null,ke,r),r.dispatch=s,r=du(!1),h=vu.bind(null,ke,!1,r.queue),r=At(),f={state:i,dispatch:null,action:e,pending:null},r.queue=f,s=iS.bind(null,ke,f,h,s),f.dispatch=s,r.memoizedState=e,[i,s,!1]}function km(e){var i=rt();return _m(i,Ge,e)}function _m(e,i,s){if(i=cu(e,i,jm)[0],e=xr(Kn)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var r=el(i)}catch(y){throw y===Ha?ur:y}else r=i;i=rt();var f=i.queue,h=f.dispatch;return s!==i.memoizedState&&(ke.flags|=2048,Va(9,{destroy:void 0},aS.bind(null,f,s),null)),[r,h,e]}function aS(e,i){e.action=i}function zm(e){var i=rt(),s=Ge;if(s!==null)return _m(i,s,e);rt(),i=i.memoizedState,s=rt();var r=s.queue.dispatch;return s.memoizedState=e,[i,r,!1]}function Va(e,i,s,r){return e={tag:e,create:s,deps:r,inst:i,next:null},i=ke.updateQueue,i===null&&(i=vr(),ke.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=e.next=e:(r=s.next,s.next=e,e.next=r,i.lastEffect=e),e}function Cm(){return rt().memoizedState}function Sr(e,i,s,r){var f=At();ke.flags|=e,f.memoizedState=Va(1|i,{destroy:void 0},s,r===void 0?null:r)}function wr(e,i,s,r){var f=rt();r=r===void 0?null:r;var h=f.memoizedState.inst;Ge!==null&&r!==null&&iu(r,Ge.memoizedState.deps)?f.memoizedState=Va(i,h,s,r):(ke.flags|=e,f.memoizedState=Va(1|i,h,s,r))}function Em(e,i){Sr(8390656,8,e,i)}function hu(e,i){wr(2048,8,e,i)}function sS(e){ke.flags|=4;var i=ke.updateQueue;if(i===null)i=vr(),ke.updateQueue=i,i.events=[e];else{var s=i.events;s===null?i.events=[e]:s.push(e)}}function Am(e){var i=rt().memoizedState;return sS({ref:i,nextImpl:e}),function(){if((Ue&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}function Om(e,i){return wr(4,2,e,i)}function Tm(e,i){return wr(4,4,e,i)}function Dm(e,i){if(typeof i=="function"){e=e();var s=i(e);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return e=e(),i.current=e,function(){i.current=null}}function Rm(e,i,s){s=s!=null?s.concat([e]):null,wr(4,4,Dm.bind(null,i,e),s)}function mu(){}function Mm(e,i){var s=rt();i=i===void 0?null:i;var r=s.memoizedState;return i!==null&&iu(i,r[1])?r[0]:(s.memoizedState=[e,i],e)}function Lm(e,i){var s=rt();i=i===void 0?null:i;var r=s.memoizedState;if(i!==null&&iu(i,r[1]))return r[0];if(r=e(),la){si(!0);try{e()}finally{si(!1)}}return s.memoizedState=[r,i],r}function pu(e,i,s){return s===void 0||(Gn&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=i:(e.memoizedState=s,e=Up(),ke.lanes|=e,bi|=e,s)}function Um(e,i,s,r){return Yt(s,i)?s:Ga.current!==null?(e=pu(e,s,r),Yt(e,i)||(ht=!0),e):(Gn&42)===0||(Gn&1073741824)!==0&&(Oe&261930)===0?(ht=!0,e.memoizedState=s):(e=Up(),ke.lanes|=e,bi|=e,i)}function $m(e,i,s,r,f){var h=F.p;F.p=h!==0&&8>h?h:8;var y=U.T,S={};U.T=S,vu(e,!1,i,s);try{var _=f(),B=U.S;if(B!==null&&B(S,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var Y=eS(_,r);tl(e,i,Y,Ft(e))}else tl(e,i,r,Ft(e))}catch(W){tl(e,i,{then:function(){},status:"rejected",reason:W},Ft())}finally{F.p=h,y!==null&&S.types!==null&&(y.types=S.types),U.T=y}}function lS(){}function gu(e,i,s,r){if(e.tag!==5)throw Error(l(476));var f=Bm(e).queue;$m(e,f,i,le,s===null?lS:function(){return Zm(e),s(r)})}function Bm(e){var i=e.memoizedState;if(i!==null)return i;i={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:le},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:s},next:null},e.memoizedState=i,e=e.alternate,e!==null&&(e.memoizedState=i),i}function Zm(e){var i=Bm(e);i.next===null&&(i=e.alternate.memoizedState),tl(e,i.next.queue,{},Ft())}function yu(){return _t(vl)}function qm(){return rt().memoizedState}function Hm(){return rt().memoizedState}function rS(e){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var s=Ft();e=hi(s);var r=mi(i,e,s);r!==null&&(qt(r,i,s),Xs(r,i,s)),i={cache:Yc()},e.payload=i;return}i=i.return}}function oS(e,i,s){var r=Ft();s={lane:r,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},jr(e)?Gm(i,s):(s=Mc(e,i,s,r),s!==null&&(qt(s,e,r),Km(s,i,r)))}function Im(e,i,s){var r=Ft();tl(e,i,s,r)}function tl(e,i,s,r){var f={lane:r,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(jr(e))Gm(i,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=i.lastRenderedReducer,h!==null))try{var y=i.lastRenderedState,S=h(y,s);if(f.hasEagerState=!0,f.eagerState=S,Yt(S,y))return ir(e,i,f,0),Pe===null&&nr(),!1}catch{}if(s=Mc(e,i,f,r),s!==null)return qt(s,e,r),Km(s,i,r),!0}return!1}function vu(e,i,s,r){if(r={lane:2,revertLane:Xu(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},jr(e)){if(i)throw Error(l(479))}else i=Mc(e,s,r,2),i!==null&&qt(i,e,2)}function jr(e){var i=e.alternate;return e===ke||i!==null&&i===ke}function Gm(e,i){Ka=gr=!0;var s=e.pending;s===null?i.next=i:(i.next=s.next,s.next=i),e.pending=i}function Km(e,i,s){if((s&4194048)!==0){var r=i.lanes;r&=e.pendingLanes,s|=r,i.lanes=s,Xf(e,s)}}var nl={readContext:_t,use:br,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useLayoutEffect:at,useInsertionEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useSyncExternalStore:at,useId:at,useHostTransitionStatus:at,useFormState:at,useActionState:at,useOptimistic:at,useMemoCache:at,useCacheRefresh:at};nl.useEffectEvent=at;var Ym={readContext:_t,use:br,useCallback:function(e,i){return At().memoizedState=[e,i===void 0?null:i],e},useContext:_t,useEffect:Em,useImperativeHandle:function(e,i,s){s=s!=null?s.concat([e]):null,Sr(4194308,4,Dm.bind(null,i,e),s)},useLayoutEffect:function(e,i){return Sr(4194308,4,e,i)},useInsertionEffect:function(e,i){Sr(4,2,e,i)},useMemo:function(e,i){var s=At();i=i===void 0?null:i;var r=e();if(la){si(!0);try{e()}finally{si(!1)}}return s.memoizedState=[r,i],r},useReducer:function(e,i,s){var r=At();if(s!==void 0){var f=s(i);if(la){si(!0);try{s(i)}finally{si(!1)}}}else f=i;return r.memoizedState=r.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},r.queue=e,e=e.dispatch=oS.bind(null,ke,e),[r.memoizedState,e]},useRef:function(e){var i=At();return e={current:e},i.memoizedState=e},useState:function(e){e=du(e);var i=e.queue,s=Im.bind(null,ke,i);return i.dispatch=s,[e.memoizedState,s]},useDebugValue:mu,useDeferredValue:function(e,i){var s=At();return pu(s,e,i)},useTransition:function(){var e=du(!1);return e=$m.bind(null,ke,e.queue,!0,!1),At().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,i,s){var r=ke,f=At();if(De){if(s===void 0)throw Error(l(407));s=s()}else{if(s=i(),Pe===null)throw Error(l(349));(Oe&127)!==0||hm(r,i,s)}f.memoizedState=s;var h={value:s,getSnapshot:i};return f.queue=h,Em(pm.bind(null,r,h,e),[e]),r.flags|=2048,Va(9,{destroy:void 0},mm.bind(null,r,h,s,i),null),s},useId:function(){var e=At(),i=Pe.identifierPrefix;if(De){var s=On,r=An;s=(r&~(1<<32-Kt(r)-1)).toString(32)+s,i="_"+i+"R_"+s,s=yr++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=tS++,i="_"+i+"r_"+s.toString(32)+"_";return e.memoizedState=i},useHostTransitionStatus:yu,useFormState:Nm,useActionState:Nm,useOptimistic:function(e){var i=At();i.memoizedState=i.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=vu.bind(null,ke,!0,s),s.dispatch=i,[e,i]},useMemoCache:ou,useCacheRefresh:function(){return At().memoizedState=rS.bind(null,ke)},useEffectEvent:function(e){var i=At(),s={impl:e};return i.memoizedState=s,function(){if((Ue&2)!==0)throw Error(l(440));return s.impl.apply(void 0,arguments)}}},bu={readContext:_t,use:br,useCallback:Mm,useContext:_t,useEffect:hu,useImperativeHandle:Rm,useInsertionEffect:Om,useLayoutEffect:Tm,useMemo:Lm,useReducer:xr,useRef:Cm,useState:function(){return xr(Kn)},useDebugValue:mu,useDeferredValue:function(e,i){var s=rt();return Um(s,Ge.memoizedState,e,i)},useTransition:function(){var e=xr(Kn)[0],i=rt().memoizedState;return[typeof e=="boolean"?e:el(e),i]},useSyncExternalStore:fm,useId:qm,useHostTransitionStatus:yu,useFormState:km,useActionState:km,useOptimistic:function(e,i){var s=rt();return vm(s,Ge,e,i)},useMemoCache:ou,useCacheRefresh:Hm};bu.useEffectEvent=Am;var Vm={readContext:_t,use:br,useCallback:Mm,useContext:_t,useEffect:hu,useImperativeHandle:Rm,useInsertionEffect:Om,useLayoutEffect:Tm,useMemo:Lm,useReducer:uu,useRef:Cm,useState:function(){return uu(Kn)},useDebugValue:mu,useDeferredValue:function(e,i){var s=rt();return Ge===null?pu(s,e,i):Um(s,Ge.memoizedState,e,i)},useTransition:function(){var e=uu(Kn)[0],i=rt().memoizedState;return[typeof e=="boolean"?e:el(e),i]},useSyncExternalStore:fm,useId:qm,useHostTransitionStatus:yu,useFormState:zm,useActionState:zm,useOptimistic:function(e,i){var s=rt();return Ge!==null?vm(s,Ge,e,i):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:ou,useCacheRefresh:Hm};Vm.useEffectEvent=Am;function xu(e,i,s,r){i=e.memoizedState,s=s(r,i),s=s==null?i:v({},i,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Su={enqueueSetState:function(e,i,s){e=e._reactInternals;var r=Ft(),f=hi(r);f.payload=i,s!=null&&(f.callback=s),i=mi(e,f,r),i!==null&&(qt(i,e,r),Xs(i,e,r))},enqueueReplaceState:function(e,i,s){e=e._reactInternals;var r=Ft(),f=hi(r);f.tag=1,f.payload=i,s!=null&&(f.callback=s),i=mi(e,f,r),i!==null&&(qt(i,e,r),Xs(i,e,r))},enqueueForceUpdate:function(e,i){e=e._reactInternals;var s=Ft(),r=hi(s);r.tag=2,i!=null&&(r.callback=i),i=mi(e,r,s),i!==null&&(qt(i,e,s),Xs(i,e,s))}};function Pm(e,i,s,r,f,h,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,h,y):i.prototype&&i.prototype.isPureReactComponent?!Hs(s,r)||!Hs(f,h):!0}function Qm(e,i,s,r){e=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,r),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,r),i.state!==e&&Su.enqueueReplaceState(i,i.state,null)}function ra(e,i){var s=i;if("ref"in i){s={};for(var r in i)r!=="ref"&&(s[r]=i[r])}if(e=e.defaultProps){s===i&&(s=v({},s));for(var f in e)s[f]===void 0&&(s[f]=e[f])}return s}function Xm(e){tr(e)}function Jm(e){console.error(e)}function Fm(e){tr(e)}function Nr(e,i){try{var s=e.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(r){setTimeout(function(){throw r})}}function Wm(e,i,s){try{var r=e.onCaughtError;r(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function wu(e,i,s){return s=hi(s),s.tag=3,s.payload={element:null},s.callback=function(){Nr(e,i)},s}function ep(e){return e=hi(e),e.tag=3,e}function tp(e,i,s,r){var f=s.type.getDerivedStateFromError;if(typeof f=="function"){var h=r.value;e.payload=function(){return f(h)},e.callback=function(){Wm(i,s,r)}}var y=s.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Wm(i,s,r),typeof f!="function"&&(xi===null?xi=new Set([this]):xi.add(this));var S=r.stack;this.componentDidCatch(r.value,{componentStack:S!==null?S:""})})}function cS(e,i,s,r,f){if(s.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(i=s.alternate,i!==null&&Ba(i,s,f,!0),s=Pt.current,s!==null){switch(s.tag){case 31:case 13:return cn===null?Lr():s.alternate===null&&st===0&&(st=3),s.flags&=-257,s.flags|=65536,s.lanes=f,r===dr?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([r]):i.add(r),Vu(e,r,f)),!1;case 22:return s.flags|=65536,r===dr?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([r])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([r]):s.add(r)),Vu(e,r,f)),!1}throw Error(l(435,s.tag))}return Vu(e,r,f),Lr(),!1}if(De)return i=Pt.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=f,r!==qc&&(e=Error(l(422),{cause:r}),Ks(sn(e,s)))):(r!==qc&&(i=Error(l(423),{cause:r}),Ks(sn(i,s))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,r=sn(r,s),f=wu(e.stateNode,r,f),Fc(e,f),st!==4&&(st=2)),!1;var h=Error(l(520),{cause:r});if(h=sn(h,s),ul===null?ul=[h]:ul.push(h),st!==4&&(st=2),i===null)return!0;r=sn(r,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,e=f&-f,s.lanes|=e,e=wu(s.stateNode,r,e),Fc(s,e),!1;case 1:if(i=s.type,h=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(xi===null||!xi.has(h))))return s.flags|=65536,f&=-f,s.lanes|=f,f=ep(f),tp(f,e,s,r),Fc(s,f),!1}s=s.return}while(s!==null);return!1}var ju=Error(l(461)),ht=!1;function zt(e,i,s,r){i.child=e===null?sm(i,null,s,r):sa(i,e.child,s,r)}function np(e,i,s,r,f){s=s.render;var h=i.ref;if("ref"in r){var y={};for(var S in r)S!=="ref"&&(y[S]=r[S])}else y=r;return ta(i),r=au(e,i,s,y,h,f),S=su(),e!==null&&!ht?(lu(e,i,f),Yn(e,i,f)):(De&&S&&Bc(i),i.flags|=1,zt(e,i,r,f),i.child)}function ip(e,i,s,r,f){if(e===null){var h=s.type;return typeof h=="function"&&!Lc(h)&&h.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=h,ap(e,i,h,r,f)):(e=sr(s.type,null,r,i,i.mode,f),e.ref=i.ref,e.return=i,i.child=e)}if(h=e.child,!Ou(e,f)){var y=h.memoizedProps;if(s=s.compare,s=s!==null?s:Hs,s(y,r)&&e.ref===i.ref)return Yn(e,i,f)}return i.flags|=1,e=Zn(h,r),e.ref=i.ref,e.return=i,i.child=e}function ap(e,i,s,r,f){if(e!==null){var h=e.memoizedProps;if(Hs(h,r)&&e.ref===i.ref)if(ht=!1,i.pendingProps=r=h,Ou(e,f))(e.flags&131072)!==0&&(ht=!0);else return i.lanes=e.lanes,Yn(e,i,f)}return Nu(e,i,s,r,f)}function sp(e,i,s,r){var f=r.children,h=e!==null?e.memoizedState:null;if(e===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((i.flags&128)!==0){if(h=h!==null?h.baseLanes|s:s,e!==null){for(r=i.child=e.child,f=0;r!==null;)f=f|r.lanes|r.childLanes,r=r.sibling;r=f&~h}else r=0,i.child=null;return lp(e,i,h,s,r)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},e!==null&&cr(i,h!==null?h.cachePool:null),h!==null?om(i,h):eu(),cm(i);else return r=i.lanes=536870912,lp(e,i,h!==null?h.baseLanes|s:s,s,r)}else h!==null?(cr(i,h.cachePool),om(i,h),gi(),i.memoizedState=null):(e!==null&&cr(i,null),eu(),gi());return zt(e,i,f,s),i.child}function il(e,i){return e!==null&&e.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function lp(e,i,s,r,f){var h=Pc();return h=h===null?null:{parent:dt._currentValue,pool:h},i.memoizedState={baseLanes:s,cachePool:h},e!==null&&cr(i,null),eu(),cm(i),e!==null&&Ba(e,i,r,!0),i.childLanes=f,null}function kr(e,i){return i=zr({mode:i.mode,children:i.children},e.mode),i.ref=e.ref,e.child=i,i.return=e,i}function rp(e,i,s){return sa(i,e.child,null,s),e=kr(i,i.pendingProps),e.flags|=2,Qt(i),i.memoizedState=null,e}function uS(e,i,s){var r=i.pendingProps,f=(i.flags&128)!==0;if(i.flags&=-129,e===null){if(De){if(r.mode==="hidden")return e=kr(i,r),i.lanes=536870912,il(null,e);if(nu(i),(e=Je)?(e=bg(e,on),e=e!==null&&e.data==="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:oi!==null?{id:An,overflow:On}:null,retryLane:536870912,hydrationErrors:null},s=Gh(e),s.return=i,i.child=s,kt=i,Je=null)):e=null,e===null)throw ui(i);return i.lanes=536870912,null}return kr(i,r)}var h=e.memoizedState;if(h!==null){var y=h.dehydrated;if(nu(i),f)if(i.flags&256)i.flags&=-257,i=rp(e,i,s);else if(i.memoizedState!==null)i.child=e.child,i.flags|=128,i=null;else throw Error(l(558));else if(ht||Ba(e,i,s,!1),f=(s&e.childLanes)!==0,ht||f){if(r=Pe,r!==null&&(y=Jf(r,s),y!==0&&y!==h.retryLane))throw h.retryLane=y,Ji(e,y),qt(r,e,y),ju;Lr(),i=rp(e,i,s)}else e=h.treeContext,Je=un(y.nextSibling),kt=i,De=!0,ci=null,on=!1,e!==null&&Vh(i,e),i=kr(i,r),i.flags|=4096;return i}return e=Zn(e.child,{mode:r.mode,children:r.children}),e.ref=i.ref,i.child=e,e.return=i,e}function _r(e,i){var s=i.ref;if(s===null)e!==null&&e.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(l(284));(e===null||e.ref!==s)&&(i.flags|=4194816)}}function Nu(e,i,s,r,f){return ta(i),s=au(e,i,s,r,void 0,f),r=su(),e!==null&&!ht?(lu(e,i,f),Yn(e,i,f)):(De&&r&&Bc(i),i.flags|=1,zt(e,i,s,f),i.child)}function op(e,i,s,r,f,h){return ta(i),i.updateQueue=null,s=dm(i,r,s,f),um(e),r=su(),e!==null&&!ht?(lu(e,i,h),Yn(e,i,h)):(De&&r&&Bc(i),i.flags|=1,zt(e,i,s,h),i.child)}function cp(e,i,s,r,f){if(ta(i),i.stateNode===null){var h=Ma,y=s.contextType;typeof y=="object"&&y!==null&&(h=_t(y)),h=new s(r,h),i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Su,i.stateNode=h,h._reactInternals=i,h=i.stateNode,h.props=r,h.state=i.memoizedState,h.refs={},Xc(i),y=s.contextType,h.context=typeof y=="object"&&y!==null?_t(y):Ma,h.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(xu(i,s,y,r),h.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(y=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),y!==h.state&&Su.enqueueReplaceState(h,h.state,null),Fs(i,r,h,f),Js(),h.state=i.memoizedState),typeof h.componentDidMount=="function"&&(i.flags|=4194308),r=!0}else if(e===null){h=i.stateNode;var S=i.memoizedProps,_=ra(s,S);h.props=_;var B=h.context,Y=s.contextType;y=Ma,typeof Y=="object"&&Y!==null&&(y=_t(Y));var W=s.getDerivedStateFromProps;Y=typeof W=="function"||typeof h.getSnapshotBeforeUpdate=="function",S=i.pendingProps!==S,Y||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(S||B!==y)&&Qm(i,h,r,y),fi=!1;var Z=i.memoizedState;h.state=Z,Fs(i,r,h,f),Js(),B=i.memoizedState,S||Z!==B||fi?(typeof W=="function"&&(xu(i,s,W,r),B=i.memoizedState),(_=fi||Pm(i,s,_,r,Z,B,y))?(Y||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(i.flags|=4194308)):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=r,i.memoizedState=B),h.props=r,h.state=B,h.context=y,r=_):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),r=!1)}else{h=i.stateNode,Jc(e,i),y=i.memoizedProps,Y=ra(s,y),h.props=Y,W=i.pendingProps,Z=h.context,B=s.contextType,_=Ma,typeof B=="object"&&B!==null&&(_=_t(B)),S=s.getDerivedStateFromProps,(B=typeof S=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==W||Z!==_)&&Qm(i,h,r,_),fi=!1,Z=i.memoizedState,h.state=Z,Fs(i,r,h,f),Js();var I=i.memoizedState;y!==W||Z!==I||fi||e!==null&&e.dependencies!==null&&rr(e.dependencies)?(typeof S=="function"&&(xu(i,s,S,r),I=i.memoizedState),(Y=fi||Pm(i,s,Y,r,Z,I,_)||e!==null&&e.dependencies!==null&&rr(e.dependencies))?(B||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(r,I,_),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(r,I,_)),typeof h.componentDidUpdate=="function"&&(i.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&Z===e.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&Z===e.memoizedState||(i.flags|=1024),i.memoizedProps=r,i.memoizedState=I),h.props=r,h.state=I,h.context=_,r=Y):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&Z===e.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&Z===e.memoizedState||(i.flags|=1024),r=!1)}return h=r,_r(e,i),r=(i.flags&128)!==0,h||r?(h=i.stateNode,s=r&&typeof s.getDerivedStateFromError!="function"?null:h.render(),i.flags|=1,e!==null&&r?(i.child=sa(i,e.child,null,f),i.child=sa(i,null,s,f)):zt(e,i,s,f),i.memoizedState=h.state,e=i.child):e=Yn(e,i,f),e}function up(e,i,s,r){return Wi(),i.flags|=256,zt(e,i,s,r),i.child}var ku={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _u(e){return{baseLanes:e,cachePool:Wh()}}function zu(e,i,s){return e=e!==null?e.childLanes&~s:0,i&&(e|=Jt),e}function dp(e,i,s){var r=i.pendingProps,f=!1,h=(i.flags&128)!==0,y;if((y=h)||(y=e!==null&&e.memoizedState===null?!1:(lt.current&2)!==0),y&&(f=!0,i.flags&=-129),y=(i.flags&32)!==0,i.flags&=-33,e===null){if(De){if(f?pi(i):gi(),(e=Je)?(e=bg(e,on),e=e!==null&&e.data!=="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:oi!==null?{id:An,overflow:On}:null,retryLane:536870912,hydrationErrors:null},s=Gh(e),s.return=i,i.child=s,kt=i,Je=null)):e=null,e===null)throw ui(i);return cd(e)?i.lanes=32:i.lanes=536870912,null}var S=r.children;return r=r.fallback,f?(gi(),f=i.mode,S=zr({mode:"hidden",children:S},f),r=Fi(r,f,s,null),S.return=i,r.return=i,S.sibling=r,i.child=S,r=i.child,r.memoizedState=_u(s),r.childLanes=zu(e,y,s),i.memoizedState=ku,il(null,r)):(pi(i),Cu(i,S))}var _=e.memoizedState;if(_!==null&&(S=_.dehydrated,S!==null)){if(h)i.flags&256?(pi(i),i.flags&=-257,i=Eu(e,i,s)):i.memoizedState!==null?(gi(),i.child=e.child,i.flags|=128,i=null):(gi(),S=r.fallback,f=i.mode,r=zr({mode:"visible",children:r.children},f),S=Fi(S,f,s,null),S.flags|=2,r.return=i,S.return=i,r.sibling=S,i.child=r,sa(i,e.child,null,s),r=i.child,r.memoizedState=_u(s),r.childLanes=zu(e,y,s),i.memoizedState=ku,i=il(null,r));else if(pi(i),cd(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var B=y.dgst;y=B,r=Error(l(419)),r.stack="",r.digest=y,Ks({value:r,source:null,stack:null}),i=Eu(e,i,s)}else if(ht||Ba(e,i,s,!1),y=(s&e.childLanes)!==0,ht||y){if(y=Pe,y!==null&&(r=Jf(y,s),r!==0&&r!==_.retryLane))throw _.retryLane=r,Ji(e,r),qt(y,e,r),ju;od(S)||Lr(),i=Eu(e,i,s)}else od(S)?(i.flags|=192,i.child=e.child,i=null):(e=_.treeContext,Je=un(S.nextSibling),kt=i,De=!0,ci=null,on=!1,e!==null&&Vh(i,e),i=Cu(i,r.children),i.flags|=4096);return i}return f?(gi(),S=r.fallback,f=i.mode,_=e.child,B=_.sibling,r=Zn(_,{mode:"hidden",children:r.children}),r.subtreeFlags=_.subtreeFlags&65011712,B!==null?S=Zn(B,S):(S=Fi(S,f,s,null),S.flags|=2),S.return=i,r.return=i,r.sibling=S,i.child=r,il(null,r),r=i.child,S=e.child.memoizedState,S===null?S=_u(s):(f=S.cachePool,f!==null?(_=dt._currentValue,f=f.parent!==_?{parent:_,pool:_}:f):f=Wh(),S={baseLanes:S.baseLanes|s,cachePool:f}),r.memoizedState=S,r.childLanes=zu(e,y,s),i.memoizedState=ku,il(e.child,r)):(pi(i),s=e.child,e=s.sibling,s=Zn(s,{mode:"visible",children:r.children}),s.return=i,s.sibling=null,e!==null&&(y=i.deletions,y===null?(i.deletions=[e],i.flags|=16):y.push(e)),i.child=s,i.memoizedState=null,s)}function Cu(e,i){return i=zr({mode:"visible",children:i},e.mode),i.return=e,e.child=i}function zr(e,i){return e=Vt(22,e,null,i),e.lanes=0,e}function Eu(e,i,s){return sa(i,e.child,null,s),e=Cu(i,i.pendingProps.children),e.flags|=2,i.memoizedState=null,e}function fp(e,i,s){e.lanes|=i;var r=e.alternate;r!==null&&(r.lanes|=i),Gc(e.return,i,s)}function Au(e,i,s,r,f,h){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:r,tail:s,tailMode:f,treeForkCount:h}:(y.isBackwards=i,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=s,y.tailMode=f,y.treeForkCount=h)}function hp(e,i,s){var r=i.pendingProps,f=r.revealOrder,h=r.tail;r=r.children;var y=lt.current,S=(y&2)!==0;if(S?(y=y&1|2,i.flags|=128):y&=1,te(lt,y),zt(e,i,r,s),r=De?Gs:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=i.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&fp(e,s,i);else if(e.tag===19)fp(e,s,i);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break e;for(;e.sibling===null;){if(e.return===null||e.return===i)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(s=i.child,f=null;s!==null;)e=s.alternate,e!==null&&pr(e)===null&&(f=s),s=s.sibling;s=f,s===null?(f=i.child,i.child=null):(f=s.sibling,s.sibling=null),Au(i,!1,f,s,h,r);break;case"backwards":case"unstable_legacy-backwards":for(s=null,f=i.child,i.child=null;f!==null;){if(e=f.alternate,e!==null&&pr(e)===null){i.child=f;break}e=f.sibling,f.sibling=s,s=f,f=e}Au(i,!0,s,null,h,r);break;case"together":Au(i,!1,null,null,void 0,r);break;default:i.memoizedState=null}return i.child}function Yn(e,i,s){if(e!==null&&(i.dependencies=e.dependencies),bi|=i.lanes,(s&i.childLanes)===0)if(e!==null){if(Ba(e,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(e!==null&&i.child!==e.child)throw Error(l(153));if(i.child!==null){for(e=i.child,s=Zn(e,e.pendingProps),i.child=s,s.return=i;e.sibling!==null;)e=e.sibling,s=s.sibling=Zn(e,e.pendingProps),s.return=i;s.sibling=null}return i.child}function Ou(e,i){return(e.lanes&i)!==0?!0:(e=e.dependencies,!!(e!==null&&rr(e)))}function dS(e,i,s){switch(i.tag){case 3:V(i,i.stateNode.containerInfo),di(i,dt,e.memoizedState.cache),Wi();break;case 27:case 5:Ie(i);break;case 4:V(i,i.stateNode.containerInfo);break;case 10:di(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,nu(i),null;break;case 13:var r=i.memoizedState;if(r!==null)return r.dehydrated!==null?(pi(i),i.flags|=128,null):(s&i.child.childLanes)!==0?dp(e,i,s):(pi(i),e=Yn(e,i,s),e!==null?e.sibling:null);pi(i);break;case 19:var f=(e.flags&128)!==0;if(r=(s&i.childLanes)!==0,r||(Ba(e,i,s,!1),r=(s&i.childLanes)!==0),f){if(r)return hp(e,i,s);i.flags|=128}if(f=i.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),te(lt,lt.current),r)break;return null;case 22:return i.lanes=0,sp(e,i,s,i.pendingProps);case 24:di(i,dt,e.memoizedState.cache)}return Yn(e,i,s)}function mp(e,i,s){if(e!==null)if(e.memoizedProps!==i.pendingProps)ht=!0;else{if(!Ou(e,s)&&(i.flags&128)===0)return ht=!1,dS(e,i,s);ht=(e.flags&131072)!==0}else ht=!1,De&&(i.flags&1048576)!==0&&Yh(i,Gs,i.index);switch(i.lanes=0,i.tag){case 16:e:{var r=i.pendingProps;if(e=ia(i.elementType),i.type=e,typeof e=="function")Lc(e)?(r=ra(e,r),i.tag=1,i=cp(null,i,e,r,s)):(i.tag=0,i=Nu(null,i,e,r,s));else{if(e!=null){var f=e.$$typeof;if(f===R){i.tag=11,i=np(null,i,e,r,s);break e}else if(f===K){i.tag=14,i=ip(null,i,e,r,s);break e}}throw i=Qe(e)||e,Error(l(306,i,""))}}return i;case 0:return Nu(e,i,i.type,i.pendingProps,s);case 1:return r=i.type,f=ra(r,i.pendingProps),cp(e,i,r,f,s);case 3:e:{if(V(i,i.stateNode.containerInfo),e===null)throw Error(l(387));r=i.pendingProps;var h=i.memoizedState;f=h.element,Jc(e,i),Fs(i,r,null,s);var y=i.memoizedState;if(r=y.cache,di(i,dt,r),r!==h.cache&&Kc(i,[dt],s,!0),Js(),r=y.element,h.isDehydrated)if(h={element:r,isDehydrated:!1,cache:y.cache},i.updateQueue.baseState=h,i.memoizedState=h,i.flags&256){i=up(e,i,r,s);break e}else if(r!==f){f=sn(Error(l(424)),i),Ks(f),i=up(e,i,r,s);break e}else for(e=i.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Je=un(e.firstChild),kt=i,De=!0,ci=null,on=!0,s=sm(i,null,r,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Wi(),r===f){i=Yn(e,i,s);break e}zt(e,i,r,s)}i=i.child}return i;case 26:return _r(e,i),e===null?(s=kg(i.type,null,i.pendingProps,null))?i.memoizedState=s:De||(s=i.type,e=i.pendingProps,r=Ir(fe.current).createElement(s),r[Nt]=i,r[Mt]=e,Ct(r,s,e),xt(r),i.stateNode=r):i.memoizedState=kg(i.type,e.memoizedProps,i.pendingProps,e.memoizedState),null;case 27:return Ie(i),e===null&&De&&(r=i.stateNode=wg(i.type,i.pendingProps,fe.current),kt=i,on=!0,f=Je,Ni(i.type)?(ud=f,Je=un(r.firstChild)):Je=f),zt(e,i,i.pendingProps.children,s),_r(e,i),e===null&&(i.flags|=4194304),i.child;case 5:return e===null&&De&&((f=r=Je)&&(r=qS(r,i.type,i.pendingProps,on),r!==null?(i.stateNode=r,kt=i,Je=un(r.firstChild),on=!1,f=!0):f=!1),f||ui(i)),Ie(i),f=i.type,h=i.pendingProps,y=e!==null?e.memoizedProps:null,r=h.children,sd(f,h)?r=null:y!==null&&sd(f,y)&&(i.flags|=32),i.memoizedState!==null&&(f=au(e,i,nS,null,null,s),vl._currentValue=f),_r(e,i),zt(e,i,r,s),i.child;case 6:return e===null&&De&&((e=s=Je)&&(s=HS(s,i.pendingProps,on),s!==null?(i.stateNode=s,kt=i,Je=null,e=!0):e=!1),e||ui(i)),null;case 13:return dp(e,i,s);case 4:return V(i,i.stateNode.containerInfo),r=i.pendingProps,e===null?i.child=sa(i,null,r,s):zt(e,i,r,s),i.child;case 11:return np(e,i,i.type,i.pendingProps,s);case 7:return zt(e,i,i.pendingProps,s),i.child;case 8:return zt(e,i,i.pendingProps.children,s),i.child;case 12:return zt(e,i,i.pendingProps.children,s),i.child;case 10:return r=i.pendingProps,di(i,i.type,r.value),zt(e,i,r.children,s),i.child;case 9:return f=i.type._context,r=i.pendingProps.children,ta(i),f=_t(f),r=r(f),i.flags|=1,zt(e,i,r,s),i.child;case 14:return ip(e,i,i.type,i.pendingProps,s);case 15:return ap(e,i,i.type,i.pendingProps,s);case 19:return hp(e,i,s);case 31:return uS(e,i,s);case 22:return sp(e,i,s,i.pendingProps);case 24:return ta(i),r=_t(dt),e===null?(f=Pc(),f===null&&(f=Pe,h=Yc(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=s),f=h),i.memoizedState={parent:r,cache:f},Xc(i),di(i,dt,f)):((e.lanes&s)!==0&&(Jc(e,i),Fs(i,null,null,s),Js()),f=e.memoizedState,h=i.memoizedState,f.parent!==r?(f={parent:r,cache:r},i.memoizedState=f,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=f),di(i,dt,r)):(r=h.cache,di(i,dt,r),r!==f.cache&&Kc(i,[dt],s,!0))),zt(e,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(l(156,i.tag))}function Vn(e){e.flags|=4}function Tu(e,i,s,r,f){if((i=(e.mode&32)!==0)&&(i=!1),i){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(qp())e.flags|=8192;else throw aa=dr,Qc}else e.flags&=-16777217}function pp(e,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ag(i))if(qp())e.flags|=8192;else throw aa=dr,Qc}function Cr(e,i){i!==null&&(e.flags|=4),e.flags&16384&&(i=e.tag!==22?Pf():536870912,e.lanes|=i,Ja|=i)}function al(e,i){if(!De)switch(e.tailMode){case"hidden":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var r=null;s!==null;)s.alternate!==null&&(r=s),s=s.sibling;r===null?i||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Fe(e){var i=e.alternate!==null&&e.alternate.child===e.child,s=0,r=0;if(i)for(var f=e.child;f!==null;)s|=f.lanes|f.childLanes,r|=f.subtreeFlags&65011712,r|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)s|=f.lanes|f.childLanes,r|=f.subtreeFlags,r|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=r,e.childLanes=s,i}function fS(e,i,s){var r=i.pendingProps;switch(Zc(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(i),null;case 1:return Fe(i),null;case 3:return s=i.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),i.memoizedState.cache!==r&&(i.flags|=2048),In(dt),se(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&($a(i)?Vn(i):e===null||e.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Hc())),Fe(i),null;case 26:var f=i.type,h=i.memoizedState;return e===null?(Vn(i),h!==null?(Fe(i),pp(i,h)):(Fe(i),Tu(i,f,null,r,s))):h?h!==e.memoizedState?(Vn(i),Fe(i),pp(i,h)):(Fe(i),i.flags&=-16777217):(e=e.memoizedProps,e!==r&&Vn(i),Fe(i),Tu(i,f,e,r,s)),null;case 27:if(Be(i),s=fe.current,f=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==r&&Vn(i);else{if(!r){if(i.stateNode===null)throw Error(l(166));return Fe(i),null}e=ae.current,$a(i)?Ph(i):(e=wg(f,r,s),i.stateNode=e,Vn(i))}return Fe(i),null;case 5:if(Be(i),f=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==r&&Vn(i);else{if(!r){if(i.stateNode===null)throw Error(l(166));return Fe(i),null}if(h=ae.current,$a(i))Ph(i);else{var y=Ir(fe.current);switch(h){case 1:h=y.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=y.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=y.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=y.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=y.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?h.multiple=!0:r.size&&(h.size=r.size);break;default:h=typeof r.is=="string"?y.createElement(f,{is:r.is}):y.createElement(f)}}h[Nt]=i,h[Mt]=r;e:for(y=i.child;y!==null;){if(y.tag===5||y.tag===6)h.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===i)break e;for(;y.sibling===null;){if(y.return===null||y.return===i)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}i.stateNode=h;e:switch(Ct(h,f,r),f){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Vn(i)}}return Fe(i),Tu(i,i.type,e===null?null:e.memoizedProps,i.pendingProps,s),null;case 6:if(e&&i.stateNode!=null)e.memoizedProps!==r&&Vn(i);else{if(typeof r!="string"&&i.stateNode===null)throw Error(l(166));if(e=fe.current,$a(i)){if(e=i.stateNode,s=i.memoizedProps,r=null,f=kt,f!==null)switch(f.tag){case 27:case 5:r=f.memoizedProps}e[Nt]=i,e=!!(e.nodeValue===s||r!==null&&r.suppressHydrationWarning===!0||dg(e.nodeValue,s)),e||ui(i,!0)}else e=Ir(e).createTextNode(r),e[Nt]=i,i.stateNode=e}return Fe(i),null;case 31:if(s=i.memoizedState,e===null||e.memoizedState!==null){if(r=$a(i),s!==null){if(e===null){if(!r)throw Error(l(318));if(e=i.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[Nt]=i}else Wi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Fe(i),e=!1}else s=Hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return i.flags&256?(Qt(i),i):(Qt(i),null);if((i.flags&128)!==0)throw Error(l(558))}return Fe(i),null;case 13:if(r=i.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=$a(i),r!==null&&r.dehydrated!==null){if(e===null){if(!f)throw Error(l(318));if(f=i.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(l(317));f[Nt]=i}else Wi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Fe(i),f=!1}else f=Hc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return i.flags&256?(Qt(i),i):(Qt(i),null)}return Qt(i),(i.flags&128)!==0?(i.lanes=s,i):(s=r!==null,e=e!==null&&e.memoizedState!==null,s&&(r=i.child,f=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(f=r.alternate.memoizedState.cachePool.pool),h=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(h=r.memoizedState.cachePool.pool),h!==f&&(r.flags|=2048)),s!==e&&s&&(i.child.flags|=8192),Cr(i,i.updateQueue),Fe(i),null);case 4:return se(),e===null&&ed(i.stateNode.containerInfo),Fe(i),null;case 10:return In(i.type),Fe(i),null;case 19:if(G(lt),r=i.memoizedState,r===null)return Fe(i),null;if(f=(i.flags&128)!==0,h=r.rendering,h===null)if(f)al(r,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=i.child;e!==null;){if(h=pr(e),h!==null){for(i.flags|=128,al(r,!1),e=h.updateQueue,i.updateQueue=e,Cr(i,e),i.subtreeFlags=0,e=s,s=i.child;s!==null;)Ih(s,e),s=s.sibling;return te(lt,lt.current&1|2),De&&qn(i,r.treeForkCount),i.child}e=e.sibling}r.tail!==null&&we()>Dr&&(i.flags|=128,f=!0,al(r,!1),i.lanes=4194304)}else{if(!f)if(e=pr(h),e!==null){if(i.flags|=128,f=!0,e=e.updateQueue,i.updateQueue=e,Cr(i,e),al(r,!0),r.tail===null&&r.tailMode==="hidden"&&!h.alternate&&!De)return Fe(i),null}else 2*we()-r.renderingStartTime>Dr&&s!==536870912&&(i.flags|=128,f=!0,al(r,!1),i.lanes=4194304);r.isBackwards?(h.sibling=i.child,i.child=h):(e=r.last,e!==null?e.sibling=h:i.child=h,r.last=h)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=we(),e.sibling=null,s=lt.current,te(lt,f?s&1|2:s&1),De&&qn(i,r.treeForkCount),e):(Fe(i),null);case 22:case 23:return Qt(i),tu(),r=i.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(i.flags|=8192):r&&(i.flags|=8192),r?(s&536870912)!==0&&(i.flags&128)===0&&(Fe(i),i.subtreeFlags&6&&(i.flags|=8192)):Fe(i),s=i.updateQueue,s!==null&&Cr(i,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==s&&(i.flags|=2048),e!==null&&G(na),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),In(dt),Fe(i),null;case 25:return null;case 30:return null}throw Error(l(156,i.tag))}function hS(e,i){switch(Zc(i),i.tag){case 1:return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 3:return In(dt),se(),e=i.flags,(e&65536)!==0&&(e&128)===0?(i.flags=e&-65537|128,i):null;case 26:case 27:case 5:return Be(i),null;case 31:if(i.memoizedState!==null){if(Qt(i),i.alternate===null)throw Error(l(340));Wi()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 13:if(Qt(i),e=i.memoizedState,e!==null&&e.dehydrated!==null){if(i.alternate===null)throw Error(l(340));Wi()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 19:return G(lt),null;case 4:return se(),null;case 10:return In(i.type),null;case 22:case 23:return Qt(i),tu(),e!==null&&G(na),e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 24:return In(dt),null;case 25:return null;default:return null}}function gp(e,i){switch(Zc(i),i.tag){case 3:In(dt),se();break;case 26:case 27:case 5:Be(i);break;case 4:se();break;case 31:i.memoizedState!==null&&Qt(i);break;case 13:Qt(i);break;case 19:G(lt);break;case 10:In(i.type);break;case 22:case 23:Qt(i),tu(),e!==null&&G(na);break;case 24:In(dt)}}function sl(e,i){try{var s=i.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var f=r.next;s=f;do{if((s.tag&e)===e){r=void 0;var h=s.create,y=s.inst;r=h(),y.destroy=r}s=s.next}while(s!==f)}}catch(S){qe(i,i.return,S)}}function yi(e,i,s){try{var r=i.updateQueue,f=r!==null?r.lastEffect:null;if(f!==null){var h=f.next;r=h;do{if((r.tag&e)===e){var y=r.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,f=i;var _=s,B=S;try{B()}catch(Y){qe(f,_,Y)}}}r=r.next}while(r!==h)}}catch(Y){qe(i,i.return,Y)}}function yp(e){var i=e.updateQueue;if(i!==null){var s=e.stateNode;try{rm(i,s)}catch(r){qe(e,e.return,r)}}}function vp(e,i,s){s.props=ra(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(r){qe(e,i,r)}}function ll(e,i){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof s=="function"?e.refCleanup=s(r):s.current=r}}catch(f){qe(e,i,f)}}function Tn(e,i){var s=e.ref,r=e.refCleanup;if(s!==null)if(typeof r=="function")try{r()}catch(f){qe(e,i,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(f){qe(e,i,f)}else s.current=null}function bp(e){var i=e.type,s=e.memoizedProps,r=e.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&r.focus();break e;case"img":s.src?r.src=s.src:s.srcSet&&(r.srcset=s.srcSet)}}catch(f){qe(e,e.return,f)}}function Du(e,i,s){try{var r=e.stateNode;MS(r,e.type,s,i),r[Mt]=i}catch(f){qe(e,e.return,f)}}function xp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ni(e.type)||e.tag===4}function Ru(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xp(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&&Ni(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 Mu(e,i,s){var r=e.tag;if(r===5||r===6)e=e.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(e),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=$n));else if(r!==4&&(r===27&&Ni(e.type)&&(s=e.stateNode,i=null),e=e.child,e!==null))for(Mu(e,i,s),e=e.sibling;e!==null;)Mu(e,i,s),e=e.sibling}function Er(e,i,s){var r=e.tag;if(r===5||r===6)e=e.stateNode,i?s.insertBefore(e,i):s.appendChild(e);else if(r!==4&&(r===27&&Ni(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Er(e,i,s),e=e.sibling;e!==null;)Er(e,i,s),e=e.sibling}function Sp(e){var i=e.stateNode,s=e.memoizedProps;try{for(var r=e.type,f=i.attributes;f.length;)i.removeAttributeNode(f[0]);Ct(i,r,s),i[Nt]=e,i[Mt]=s}catch(h){qe(e,e.return,h)}}var Pn=!1,mt=!1,Lu=!1,wp=typeof WeakSet=="function"?WeakSet:Set,St=null;function mS(e,i){if(e=e.containerInfo,id=Xr,e=Rh(e),Ec(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var r=s.getSelection&&s.getSelection();if(r&&r.rangeCount!==0){s=r.anchorNode;var f=r.anchorOffset,h=r.focusNode;r=r.focusOffset;try{s.nodeType,h.nodeType}catch{s=null;break e}var y=0,S=-1,_=-1,B=0,Y=0,W=e,Z=null;t:for(;;){for(var I;W!==s||f!==0&&W.nodeType!==3||(S=y+f),W!==h||r!==0&&W.nodeType!==3||(_=y+r),W.nodeType===3&&(y+=W.nodeValue.length),(I=W.firstChild)!==null;)Z=W,W=I;for(;;){if(W===e)break t;if(Z===s&&++B===f&&(S=y),Z===h&&++Y===r&&(_=y),(I=W.nextSibling)!==null)break;W=Z,Z=W.parentNode}W=I}s=S===-1||_===-1?null:{start:S,end:_}}else s=null}s=s||{start:0,end:0}}else s=null;for(ad={focusedElem:e,selectionRange:s},Xr=!1,St=i;St!==null;)if(i=St,e=i.child,(i.subtreeFlags&1028)!==0&&e!==null)e.return=i,St=e;else for(;St!==null;){switch(i=St,h=i.alternate,e=i.flags,i.tag){case 0:if((e&4)!==0&&(e=i.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)f=e[s],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,s=i,f=h.memoizedProps,h=h.memoizedState,r=s.stateNode;try{var de=ra(s.type,f);e=r.getSnapshotBeforeUpdate(de,h),r.__reactInternalSnapshotBeforeUpdate=e}catch(Se){qe(s,s.return,Se)}}break;case 3:if((e&1024)!==0){if(e=i.stateNode.containerInfo,s=e.nodeType,s===9)rd(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":rd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=i.sibling,e!==null){e.return=i.return,St=e;break}St=i.return}}function jp(e,i,s){var r=s.flags;switch(s.tag){case 0:case 11:case 15:Xn(e,s),r&4&&sl(5,s);break;case 1:if(Xn(e,s),r&4)if(e=s.stateNode,i===null)try{e.componentDidMount()}catch(y){qe(s,s.return,y)}else{var f=ra(s.type,i.memoizedProps);i=i.memoizedState;try{e.componentDidUpdate(f,i,e.__reactInternalSnapshotBeforeUpdate)}catch(y){qe(s,s.return,y)}}r&64&&yp(s),r&512&&ll(s,s.return);break;case 3:if(Xn(e,s),r&64&&(e=s.updateQueue,e!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{rm(e,i)}catch(y){qe(s,s.return,y)}}break;case 27:i===null&&r&4&&Sp(s);case 26:case 5:Xn(e,s),i===null&&r&4&&bp(s),r&512&&ll(s,s.return);break;case 12:Xn(e,s);break;case 31:Xn(e,s),r&4&&_p(e,s);break;case 13:Xn(e,s),r&4&&zp(e,s),r&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=jS.bind(null,s),IS(e,s))));break;case 22:if(r=s.memoizedState!==null||Pn,!r){i=i!==null&&i.memoizedState!==null||mt,f=Pn;var h=mt;Pn=r,(mt=i)&&!h?Jn(e,s,(s.subtreeFlags&8772)!==0):Xn(e,s),Pn=f,mt=h}break;case 30:break;default:Xn(e,s)}}function Np(e){var i=e.alternate;i!==null&&(e.alternate=null,Np(i)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(i=e.stateNode,i!==null&&fc(i)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var We=null,Ut=!1;function Qn(e,i,s){for(s=s.child;s!==null;)kp(e,i,s),s=s.sibling}function kp(e,i,s){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(As,s)}catch{}switch(s.tag){case 26:mt||Tn(s,i),Qn(e,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:mt||Tn(s,i);var r=We,f=Ut;Ni(s.type)&&(We=s.stateNode,Ut=!1),Qn(e,i,s),pl(s.stateNode),We=r,Ut=f;break;case 5:mt||Tn(s,i);case 6:if(r=We,f=Ut,We=null,Qn(e,i,s),We=r,Ut=f,We!==null)if(Ut)try{(We.nodeType===9?We.body:We.nodeName==="HTML"?We.ownerDocument.body:We).removeChild(s.stateNode)}catch(h){qe(s,i,h)}else try{We.removeChild(s.stateNode)}catch(h){qe(s,i,h)}break;case 18:We!==null&&(Ut?(e=We,yg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),ss(e)):yg(We,s.stateNode));break;case 4:r=We,f=Ut,We=s.stateNode.containerInfo,Ut=!0,Qn(e,i,s),We=r,Ut=f;break;case 0:case 11:case 14:case 15:yi(2,s,i),mt||yi(4,s,i),Qn(e,i,s);break;case 1:mt||(Tn(s,i),r=s.stateNode,typeof r.componentWillUnmount=="function"&&vp(s,i,r)),Qn(e,i,s);break;case 21:Qn(e,i,s);break;case 22:mt=(r=mt)||s.memoizedState!==null,Qn(e,i,s),mt=r;break;default:Qn(e,i,s)}}function _p(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ss(e)}catch(s){qe(i,i.return,s)}}}function zp(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ss(e)}catch(s){qe(i,i.return,s)}}function pS(e){switch(e.tag){case 31:case 13:case 19:var i=e.stateNode;return i===null&&(i=e.stateNode=new wp),i;case 22:return e=e.stateNode,i=e._retryCache,i===null&&(i=e._retryCache=new wp),i;default:throw Error(l(435,e.tag))}}function Ar(e,i){var s=pS(e);i.forEach(function(r){if(!s.has(r)){s.add(r);var f=NS.bind(null,e,r);r.then(f,f)}})}function $t(e,i){var s=i.deletions;if(s!==null)for(var r=0;r<s.length;r++){var f=s[r],h=e,y=i,S=y;e:for(;S!==null;){switch(S.tag){case 27:if(Ni(S.type)){We=S.stateNode,Ut=!1;break e}break;case 5:We=S.stateNode,Ut=!1;break e;case 3:case 4:We=S.stateNode.containerInfo,Ut=!0;break e}S=S.return}if(We===null)throw Error(l(160));kp(h,y,f),We=null,Ut=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Cp(i,e),i=i.sibling}var Sn=null;function Cp(e,i){var s=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:$t(i,e),Bt(e),r&4&&(yi(3,e,e.return),sl(3,e),yi(5,e,e.return));break;case 1:$t(i,e),Bt(e),r&512&&(mt||s===null||Tn(s,s.return)),r&64&&Pn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?r:s.concat(r))));break;case 26:var f=Sn;if($t(i,e),Bt(e),r&512&&(mt||s===null||Tn(s,s.return)),r&4){var h=s!==null?s.memoizedState:null;if(r=e.memoizedState,s===null)if(r===null)if(e.stateNode===null){e:{r=e.type,s=e.memoizedProps,f=f.ownerDocument||f;t:switch(r){case"title":h=f.getElementsByTagName("title")[0],(!h||h[Ds]||h[Nt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(r),f.head.insertBefore(h,f.querySelector("head > title"))),Ct(h,r,s),h[Nt]=e,xt(h),r=h;break e;case"link":var y=Cg("link","href",f).get(r+(s.href||""));if(y){for(var S=0;S<y.length;S++)if(h=y[S],h.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&h.getAttribute("rel")===(s.rel==null?null:s.rel)&&h.getAttribute("title")===(s.title==null?null:s.title)&&h.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){y.splice(S,1);break t}}h=f.createElement(r),Ct(h,r,s),f.head.appendChild(h);break;case"meta":if(y=Cg("meta","content",f).get(r+(s.content||""))){for(S=0;S<y.length;S++)if(h=y[S],h.getAttribute("content")===(s.content==null?null:""+s.content)&&h.getAttribute("name")===(s.name==null?null:s.name)&&h.getAttribute("property")===(s.property==null?null:s.property)&&h.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&h.getAttribute("charset")===(s.charSet==null?null:s.charSet)){y.splice(S,1);break t}}h=f.createElement(r),Ct(h,r,s),f.head.appendChild(h);break;default:throw Error(l(468,r))}h[Nt]=e,xt(h),r=h}e.stateNode=r}else Eg(f,e.type,e.stateNode);else e.stateNode=zg(f,r,e.memoizedProps);else h!==r?(h===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):h.count--,r===null?Eg(f,e.type,e.stateNode):zg(f,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Du(e,e.memoizedProps,s.memoizedProps)}break;case 27:$t(i,e),Bt(e),r&512&&(mt||s===null||Tn(s,s.return)),s!==null&&r&4&&Du(e,e.memoizedProps,s.memoizedProps);break;case 5:if($t(i,e),Bt(e),r&512&&(mt||s===null||Tn(s,s.return)),e.flags&32){f=e.stateNode;try{Ca(f,"")}catch(de){qe(e,e.return,de)}}r&4&&e.stateNode!=null&&(f=e.memoizedProps,Du(e,f,s!==null?s.memoizedProps:f)),r&1024&&(Lu=!0);break;case 6:if($t(i,e),Bt(e),r&4){if(e.stateNode===null)throw Error(l(162));r=e.memoizedProps,s=e.stateNode;try{s.nodeValue=r}catch(de){qe(e,e.return,de)}}break;case 3:if(Yr=null,f=Sn,Sn=Gr(i.containerInfo),$t(i,e),Sn=f,Bt(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{ss(i.containerInfo)}catch(de){qe(e,e.return,de)}Lu&&(Lu=!1,Ep(e));break;case 4:r=Sn,Sn=Gr(e.stateNode.containerInfo),$t(i,e),Bt(e),Sn=r;break;case 12:$t(i,e),Bt(e);break;case 31:$t(i,e),Bt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Ar(e,r)));break;case 13:$t(i,e),Bt(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Tr=we()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Ar(e,r)));break;case 22:f=e.memoizedState!==null;var _=s!==null&&s.memoizedState!==null,B=Pn,Y=mt;if(Pn=B||f,mt=Y||_,$t(i,e),mt=Y,Pn=B,Bt(e),r&8192)e:for(i=e.stateNode,i._visibility=f?i._visibility&-2:i._visibility|1,f&&(s===null||_||Pn||mt||oa(e)),s=null,i=e;;){if(i.tag===5||i.tag===26){if(s===null){_=s=i;try{if(h=_.stateNode,f)y=h.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{S=_.stateNode;var W=_.memoizedProps.style,Z=W!=null&&W.hasOwnProperty("display")?W.display:null;S.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(de){qe(_,_.return,de)}}}else if(i.tag===6){if(s===null){_=i;try{_.stateNode.nodeValue=f?"":_.memoizedProps}catch(de){qe(_,_.return,de)}}}else if(i.tag===18){if(s===null){_=i;try{var I=_.stateNode;f?vg(I,!0):vg(_.stateNode,!1)}catch(de){qe(_,_.return,de)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===e)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break e;for(;i.sibling===null;){if(i.return===null||i.return===e)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}r&4&&(r=e.updateQueue,r!==null&&(s=r.retryQueue,s!==null&&(r.retryQueue=null,Ar(e,s))));break;case 19:$t(i,e),Bt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Ar(e,r)));break;case 30:break;case 21:break;default:$t(i,e),Bt(e)}}function Bt(e){var i=e.flags;if(i&2){try{for(var s,r=e.return;r!==null;){if(xp(r)){s=r;break}r=r.return}if(s==null)throw Error(l(160));switch(s.tag){case 27:var f=s.stateNode,h=Ru(e);Er(e,h,f);break;case 5:var y=s.stateNode;s.flags&32&&(Ca(y,""),s.flags&=-33);var S=Ru(e);Er(e,S,y);break;case 3:case 4:var _=s.stateNode.containerInfo,B=Ru(e);Mu(e,B,_);break;default:throw Error(l(161))}}catch(Y){qe(e,e.return,Y)}e.flags&=-3}i&4096&&(e.flags&=-4097)}function Ep(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var i=e;Ep(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),e=e.sibling}}function Xn(e,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)jp(e,i.alternate,i),i=i.sibling}function oa(e){for(e=e.child;e!==null;){var i=e;switch(i.tag){case 0:case 11:case 14:case 15:yi(4,i,i.return),oa(i);break;case 1:Tn(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&vp(i,i.return,s),oa(i);break;case 27:pl(i.stateNode);case 26:case 5:Tn(i,i.return),oa(i);break;case 22:i.memoizedState===null&&oa(i);break;case 30:oa(i);break;default:oa(i)}e=e.sibling}}function Jn(e,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var r=i.alternate,f=e,h=i,y=h.flags;switch(h.tag){case 0:case 11:case 15:Jn(f,h,s),sl(4,h);break;case 1:if(Jn(f,h,s),r=h,f=r.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(B){qe(r,r.return,B)}if(r=h,f=r.updateQueue,f!==null){var S=r.stateNode;try{var _=f.shared.hiddenCallbacks;if(_!==null)for(f.shared.hiddenCallbacks=null,f=0;f<_.length;f++)lm(_[f],S)}catch(B){qe(r,r.return,B)}}s&&y&64&&yp(h),ll(h,h.return);break;case 27:Sp(h);case 26:case 5:Jn(f,h,s),s&&r===null&&y&4&&bp(h),ll(h,h.return);break;case 12:Jn(f,h,s);break;case 31:Jn(f,h,s),s&&y&4&&_p(f,h);break;case 13:Jn(f,h,s),s&&y&4&&zp(f,h);break;case 22:h.memoizedState===null&&Jn(f,h,s),ll(h,h.return);break;case 30:break;default:Jn(f,h,s)}i=i.sibling}}function Uu(e,i){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(e=i.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&Ys(s))}function $u(e,i){e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&Ys(e))}function wn(e,i,s,r){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Ap(e,i,s,r),i=i.sibling}function Ap(e,i,s,r){var f=i.flags;switch(i.tag){case 0:case 11:case 15:wn(e,i,s,r),f&2048&&sl(9,i);break;case 1:wn(e,i,s,r);break;case 3:wn(e,i,s,r),f&2048&&(e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&Ys(e)));break;case 12:if(f&2048){wn(e,i,s,r),e=i.stateNode;try{var h=i.memoizedProps,y=h.id,S=h.onPostCommit;typeof S=="function"&&S(y,i.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(_){qe(i,i.return,_)}}else wn(e,i,s,r);break;case 31:wn(e,i,s,r);break;case 13:wn(e,i,s,r);break;case 23:break;case 22:h=i.stateNode,y=i.alternate,i.memoizedState!==null?h._visibility&2?wn(e,i,s,r):rl(e,i):h._visibility&2?wn(e,i,s,r):(h._visibility|=2,Pa(e,i,s,r,(i.subtreeFlags&10256)!==0||!1)),f&2048&&Uu(y,i);break;case 24:wn(e,i,s,r),f&2048&&$u(i.alternate,i);break;default:wn(e,i,s,r)}}function Pa(e,i,s,r,f){for(f=f&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var h=e,y=i,S=s,_=r,B=y.flags;switch(y.tag){case 0:case 11:case 15:Pa(h,y,S,_,f),sl(8,y);break;case 23:break;case 22:var Y=y.stateNode;y.memoizedState!==null?Y._visibility&2?Pa(h,y,S,_,f):rl(h,y):(Y._visibility|=2,Pa(h,y,S,_,f)),f&&B&2048&&Uu(y.alternate,y);break;case 24:Pa(h,y,S,_,f),f&&B&2048&&$u(y.alternate,y);break;default:Pa(h,y,S,_,f)}i=i.sibling}}function rl(e,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=e,r=i,f=r.flags;switch(r.tag){case 22:rl(s,r),f&2048&&Uu(r.alternate,r);break;case 24:rl(s,r),f&2048&&$u(r.alternate,r);break;default:rl(s,r)}i=i.sibling}}var ol=8192;function Qa(e,i,s){if(e.subtreeFlags&ol)for(e=e.child;e!==null;)Op(e,i,s),e=e.sibling}function Op(e,i,s){switch(e.tag){case 26:Qa(e,i,s),e.flags&ol&&e.memoizedState!==null&&tw(s,Sn,e.memoizedState,e.memoizedProps);break;case 5:Qa(e,i,s);break;case 3:case 4:var r=Sn;Sn=Gr(e.stateNode.containerInfo),Qa(e,i,s),Sn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=ol,ol=16777216,Qa(e,i,s),ol=r):Qa(e,i,s));break;default:Qa(e,i,s)}}function Tp(e){var i=e.alternate;if(i!==null&&(e=i.child,e!==null)){i.child=null;do i=e.sibling,e.sibling=null,e=i;while(e!==null)}}function cl(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var r=i[s];St=r,Rp(r,e)}Tp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Dp(e),e=e.sibling}function Dp(e){switch(e.tag){case 0:case 11:case 15:cl(e),e.flags&2048&&yi(9,e,e.return);break;case 3:cl(e);break;case 12:cl(e);break;case 22:var i=e.stateNode;e.memoizedState!==null&&i._visibility&2&&(e.return===null||e.return.tag!==13)?(i._visibility&=-3,Or(e)):cl(e);break;default:cl(e)}}function Or(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var r=i[s];St=r,Rp(r,e)}Tp(e)}for(e=e.child;e!==null;){switch(i=e,i.tag){case 0:case 11:case 15:yi(8,i,i.return),Or(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,Or(i));break;default:Or(i)}e=e.sibling}}function Rp(e,i){for(;St!==null;){var s=St;switch(s.tag){case 0:case 11:case 15:yi(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var r=s.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ys(s.memoizedState.cache)}if(r=s.child,r!==null)r.return=s,St=r;else e:for(s=e;St!==null;){r=St;var f=r.sibling,h=r.return;if(Np(r),r===s){St=null;break e}if(f!==null){f.return=h,St=f;break e}St=h}}}var gS={getCacheForType:function(e){var i=_t(dt),s=i.data.get(e);return s===void 0&&(s=e(),i.data.set(e,s)),s},cacheSignal:function(){return _t(dt).controller.signal}},yS=typeof WeakMap=="function"?WeakMap:Map,Ue=0,Pe=null,Ce=null,Oe=0,Ze=0,Xt=null,vi=!1,Xa=!1,Bu=!1,Fn=0,st=0,bi=0,ca=0,Zu=0,Jt=0,Ja=0,ul=null,Zt=null,qu=!1,Tr=0,Mp=0,Dr=1/0,Rr=null,xi=null,yt=0,Si=null,Fa=null,Wn=0,Hu=0,Iu=null,Lp=null,dl=0,Gu=null;function Ft(){return(Ue&2)!==0&&Oe!==0?Oe&-Oe:U.T!==null?Xu():Ff()}function Up(){if(Jt===0)if((Oe&536870912)===0||De){var e=Hl;Hl<<=1,(Hl&3932160)===0&&(Hl=262144),Jt=e}else Jt=536870912;return e=Pt.current,e!==null&&(e.flags|=32),Jt}function qt(e,i,s){(e===Pe&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)&&(Wa(e,0),wi(e,Oe,Jt,!1)),Ts(e,s),((Ue&2)===0||e!==Pe)&&(e===Pe&&((Ue&2)===0&&(ca|=s),st===4&&wi(e,Oe,Jt,!1)),Dn(e))}function $p(e,i,s){if((Ue&6)!==0)throw Error(l(327));var r=!s&&(i&127)===0&&(i&e.expiredLanes)===0||Os(e,i),f=r?xS(e,i):Yu(e,i,!0),h=r;do{if(f===0){Xa&&!r&&wi(e,i,0,!1);break}else{if(s=e.current.alternate,h&&!vS(s)){f=Yu(e,i,!1),h=!1;continue}if(f===2){if(h=i,e.errorRecoveryDisabledLanes&h)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){i=y;e:{var S=e;f=ul;var _=S.current.memoizedState.isDehydrated;if(_&&(Wa(S,y).flags|=256),y=Yu(S,y,!1),y!==2){if(Bu&&!_){S.errorRecoveryDisabledLanes|=h,ca|=h,f=4;break e}h=Zt,Zt=f,h!==null&&(Zt===null?Zt=h:Zt.push.apply(Zt,h))}f=y}if(h=!1,f!==2)continue}}if(f===1){Wa(e,0),wi(e,i,0,!0);break}e:{switch(r=e,h=f,h){case 0:case 1:throw Error(l(345));case 4:if((i&4194048)!==i)break;case 6:wi(r,i,Jt,!vi);break e;case 2:Zt=null;break;case 3:case 5:break;default:throw Error(l(329))}if((i&62914560)===i&&(f=Tr+300-we(),10<f)){if(wi(r,i,Jt,!vi),Gl(r,0,!0)!==0)break e;Wn=i,r.timeoutHandle=pg(Bp.bind(null,r,s,Zt,Rr,qu,i,Jt,ca,Ja,vi,h,"Throttled",-0,0),f);break e}Bp(r,s,Zt,Rr,qu,i,Jt,ca,Ja,vi,h,null,-0,0)}}break}while(!0);Dn(e)}function Bp(e,i,s,r,f,h,y,S,_,B,Y,W,Z,I){if(e.timeoutHandle=-1,W=i.subtreeFlags,W&8192||(W&16785408)===16785408){W={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$n},Op(i,h,W);var de=(h&62914560)===h?Tr-we():(h&4194048)===h?Mp-we():0;if(de=nw(W,de),de!==null){Wn=h,e.cancelPendingCommit=de(Vp.bind(null,e,i,h,s,r,f,y,S,_,Y,W,null,Z,I)),wi(e,h,y,!B);return}}Vp(e,i,h,s,r,f,y,S,_)}function vS(e){for(var i=e;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var r=0;r<s.length;r++){var f=s[r],h=f.getSnapshot;f=f.value;try{if(!Yt(h(),f))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function wi(e,i,s,r){i&=~Zu,i&=~ca,e.suspendedLanes|=i,e.pingedLanes&=~i,r&&(e.warmLanes|=i),r=e.expirationTimes;for(var f=i;0<f;){var h=31-Kt(f),y=1<<h;r[h]=-1,f&=~y}s!==0&&Qf(e,s,i)}function Mr(){return(Ue&6)===0?(fl(0),!1):!0}function Ku(){if(Ce!==null){if(Ze===0)var e=Ce.return;else e=Ce,Hn=ea=null,ru(e),Ia=null,Ps=0,e=Ce;for(;e!==null;)gp(e.alternate,e),e=e.return;Ce=null}}function Wa(e,i){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,$S(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Wn=0,Ku(),Pe=e,Ce=s=Zn(e.current,null),Oe=i,Ze=0,Xt=null,vi=!1,Xa=Os(e,i),Bu=!1,Ja=Jt=Zu=ca=bi=st=0,Zt=ul=null,qu=!1,(i&8)!==0&&(i|=i&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=i;0<r;){var f=31-Kt(r),h=1<<f;i|=e[f],r&=~h}return Fn=i,nr(),s}function Zp(e,i){ke=null,U.H=nl,i===Ha||i===ur?(i=nm(),Ze=3):i===Qc?(i=nm(),Ze=4):Ze=i===ju?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Xt=i,Ce===null&&(st=1,Nr(e,sn(i,e.current)))}function qp(){var e=Pt.current;return e===null?!0:(Oe&4194048)===Oe?cn===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===cn:!1}function Hp(){var e=U.H;return U.H=nl,e===null?nl:e}function Ip(){var e=U.A;return U.A=gS,e}function Lr(){st=4,vi||(Oe&4194048)!==Oe&&Pt.current!==null||(Xa=!0),(bi&134217727)===0&&(ca&134217727)===0||Pe===null||wi(Pe,Oe,Jt,!1)}function Yu(e,i,s){var r=Ue;Ue|=2;var f=Hp(),h=Ip();(Pe!==e||Oe!==i)&&(Rr=null,Wa(e,i)),i=!1;var y=st;e:do try{if(Ze!==0&&Ce!==null){var S=Ce,_=Xt;switch(Ze){case 8:Ku(),y=6;break e;case 3:case 2:case 9:case 6:Pt.current===null&&(i=!0);var B=Ze;if(Ze=0,Xt=null,es(e,S,_,B),s&&Xa){y=0;break e}break;default:B=Ze,Ze=0,Xt=null,es(e,S,_,B)}}bS(),y=st;break}catch(Y){Zp(e,Y)}while(!0);return i&&e.shellSuspendCounter++,Hn=ea=null,Ue=r,U.H=f,U.A=h,Ce===null&&(Pe=null,Oe=0,nr()),y}function bS(){for(;Ce!==null;)Gp(Ce)}function xS(e,i){var s=Ue;Ue|=2;var r=Hp(),f=Ip();Pe!==e||Oe!==i?(Rr=null,Dr=we()+500,Wa(e,i)):Xa=Os(e,i);e:do try{if(Ze!==0&&Ce!==null){i=Ce;var h=Xt;t:switch(Ze){case 1:Ze=0,Xt=null,es(e,i,h,1);break;case 2:case 9:if(em(h)){Ze=0,Xt=null,Kp(i);break}i=function(){Ze!==2&&Ze!==9||Pe!==e||(Ze=7),Dn(e)},h.then(i,i);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:em(h)?(Ze=0,Xt=null,Kp(i)):(Ze=0,Xt=null,es(e,i,h,7));break;case 5:var y=null;switch(Ce.tag){case 26:y=Ce.memoizedState;case 5:case 27:var S=Ce;if(y?Ag(y):S.stateNode.complete){Ze=0,Xt=null;var _=S.sibling;if(_!==null)Ce=_;else{var B=S.return;B!==null?(Ce=B,Ur(B)):Ce=null}break t}}Ze=0,Xt=null,es(e,i,h,5);break;case 6:Ze=0,Xt=null,es(e,i,h,6);break;case 8:Ku(),st=6;break e;default:throw Error(l(462))}}SS();break}catch(Y){Zp(e,Y)}while(!0);return Hn=ea=null,U.H=r,U.A=f,Ue=s,Ce!==null?0:(Pe=null,Oe=0,nr(),st)}function SS(){for(;Ce!==null&&!xa();)Gp(Ce)}function Gp(e){var i=mp(e.alternate,e,Fn);e.memoizedProps=e.pendingProps,i===null?Ur(e):Ce=i}function Kp(e){var i=e,s=i.alternate;switch(i.tag){case 15:case 0:i=op(s,i,i.pendingProps,i.type,void 0,Oe);break;case 11:i=op(s,i,i.pendingProps,i.type.render,i.ref,Oe);break;case 5:ru(i);default:gp(s,i),i=Ce=Ih(i,Fn),i=mp(s,i,Fn)}e.memoizedProps=e.pendingProps,i===null?Ur(e):Ce=i}function es(e,i,s,r){Hn=ea=null,ru(i),Ia=null,Ps=0;var f=i.return;try{if(cS(e,f,i,s,Oe)){st=1,Nr(e,sn(s,e.current)),Ce=null;return}}catch(h){if(f!==null)throw Ce=f,h;st=1,Nr(e,sn(s,e.current)),Ce=null;return}i.flags&32768?(De||r===1?e=!0:Xa||(Oe&536870912)!==0?e=!1:(vi=e=!0,(r===2||r===9||r===3||r===6)&&(r=Pt.current,r!==null&&r.tag===13&&(r.flags|=16384))),Yp(i,e)):Ur(i)}function Ur(e){var i=e;do{if((i.flags&32768)!==0){Yp(i,vi);return}e=i.return;var s=fS(i.alternate,i,Fn);if(s!==null){Ce=s;return}if(i=i.sibling,i!==null){Ce=i;return}Ce=i=e}while(i!==null);st===0&&(st=5)}function Yp(e,i){do{var s=hS(e.alternate,e);if(s!==null){s.flags&=32767,Ce=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(e=e.sibling,e!==null)){Ce=e;return}Ce=e=s}while(e!==null);st=6,Ce=null}function Vp(e,i,s,r,f,h,y,S,_){e.cancelPendingCommit=null;do $r();while(yt!==0);if((Ue&6)!==0)throw Error(l(327));if(i!==null){if(i===e.current)throw Error(l(177));if(h=i.lanes|i.childLanes,h|=Rc,ex(e,s,h,y,S,_),e===Pe&&(Ce=Pe=null,Oe=0),Fa=i,Si=e,Wn=s,Hu=h,Iu=f,Lp=r,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,kS(en,function(){return Fp(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||r){r=U.T,U.T=null,f=F.p,F.p=2,y=Ue,Ue|=4;try{mS(e,i,s)}finally{Ue=y,F.p=f,U.T=r}}yt=1,Pp(),Qp(),Xp()}}function Pp(){if(yt===1){yt=0;var e=Si,i=Fa,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=U.T,U.T=null;var r=F.p;F.p=2;var f=Ue;Ue|=4;try{Cp(i,e);var h=ad,y=Rh(e.containerInfo),S=h.focusedElem,_=h.selectionRange;if(y!==S&&S&&S.ownerDocument&&Dh(S.ownerDocument.documentElement,S)){if(_!==null&&Ec(S)){var B=_.start,Y=_.end;if(Y===void 0&&(Y=B),"selectionStart"in S)S.selectionStart=B,S.selectionEnd=Math.min(Y,S.value.length);else{var W=S.ownerDocument||document,Z=W&&W.defaultView||window;if(Z.getSelection){var I=Z.getSelection(),de=S.textContent.length,Se=Math.min(_.start,de),Ye=_.end===void 0?Se:Math.min(_.end,de);!I.extend&&Se>Ye&&(y=Ye,Ye=Se,Se=y);var M=Th(S,Se),E=Th(S,Ye);if(M&&E&&(I.rangeCount!==1||I.anchorNode!==M.node||I.anchorOffset!==M.offset||I.focusNode!==E.node||I.focusOffset!==E.offset)){var $=W.createRange();$.setStart(M.node,M.offset),I.removeAllRanges(),Se>Ye?(I.addRange($),I.extend(E.node,E.offset)):($.setEnd(E.node,E.offset),I.addRange($))}}}}for(W=[],I=S;I=I.parentNode;)I.nodeType===1&&W.push({element:I,left:I.scrollLeft,top:I.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<W.length;S++){var X=W[S];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}Xr=!!id,ad=id=null}finally{Ue=f,F.p=r,U.T=s}}e.current=i,yt=2}}function Qp(){if(yt===2){yt=0;var e=Si,i=Fa,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=U.T,U.T=null;var r=F.p;F.p=2;var f=Ue;Ue|=4;try{jp(e,i.alternate,i)}finally{Ue=f,F.p=r,U.T=s}}yt=3}}function Xp(){if(yt===4||yt===3){yt=0,ne();var e=Si,i=Fa,s=Wn,r=Lp;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?yt=5:(yt=0,Fa=Si=null,Jp(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(xi=null),uc(s),i=i.stateNode,Gt&&typeof Gt.onCommitFiberRoot=="function")try{Gt.onCommitFiberRoot(As,i,void 0,(i.current.flags&128)===128)}catch{}if(r!==null){i=U.T,f=F.p,F.p=2,U.T=null;try{for(var h=e.onRecoverableError,y=0;y<r.length;y++){var S=r[y];h(S.value,{componentStack:S.stack})}}finally{U.T=i,F.p=f}}(Wn&3)!==0&&$r(),Dn(e),f=e.pendingLanes,(s&261930)!==0&&(f&42)!==0?e===Gu?dl++:(dl=0,Gu=e):dl=0,fl(0)}}function Jp(e,i){(e.pooledCacheLanes&=i)===0&&(i=e.pooledCache,i!=null&&(e.pooledCache=null,Ys(i)))}function $r(){return Pp(),Qp(),Xp(),Fp()}function Fp(){if(yt!==5)return!1;var e=Si,i=Hu;Hu=0;var s=uc(Wn),r=U.T,f=F.p;try{F.p=32>s?32:s,U.T=null,s=Iu,Iu=null;var h=Si,y=Wn;if(yt=0,Fa=Si=null,Wn=0,(Ue&6)!==0)throw Error(l(331));var S=Ue;if(Ue|=4,Dp(h.current),Ap(h,h.current,y,s),Ue=S,fl(0,!1),Gt&&typeof Gt.onPostCommitFiberRoot=="function")try{Gt.onPostCommitFiberRoot(As,h)}catch{}return!0}finally{F.p=f,U.T=r,Jp(e,i)}}function Wp(e,i,s){i=sn(s,i),i=wu(e.stateNode,i,2),e=mi(e,i,2),e!==null&&(Ts(e,2),Dn(e))}function qe(e,i,s){if(e.tag===3)Wp(e,e,s);else for(;i!==null;){if(i.tag===3){Wp(i,e,s);break}else if(i.tag===1){var r=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(xi===null||!xi.has(r))){e=sn(s,e),s=ep(2),r=mi(i,s,2),r!==null&&(tp(s,r,i,e),Ts(r,2),Dn(r));break}}i=i.return}}function Vu(e,i,s){var r=e.pingCache;if(r===null){r=e.pingCache=new yS;var f=new Set;r.set(i,f)}else f=r.get(i),f===void 0&&(f=new Set,r.set(i,f));f.has(s)||(Bu=!0,f.add(s),e=wS.bind(null,e,i,s),i.then(e,e))}function wS(e,i,s){var r=e.pingCache;r!==null&&r.delete(i),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,Pe===e&&(Oe&s)===s&&(st===4||st===3&&(Oe&62914560)===Oe&&300>we()-Tr?(Ue&2)===0&&Wa(e,0):Zu|=s,Ja===Oe&&(Ja=0)),Dn(e)}function eg(e,i){i===0&&(i=Pf()),e=Ji(e,i),e!==null&&(Ts(e,i),Dn(e))}function jS(e){var i=e.memoizedState,s=0;i!==null&&(s=i.retryLane),eg(e,s)}function NS(e,i){var s=0;switch(e.tag){case 31:case 13:var r=e.stateNode,f=e.memoizedState;f!==null&&(s=f.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(l(314))}r!==null&&r.delete(i),eg(e,s)}function kS(e,i){return Rt(e,i)}var Br=null,ts=null,Pu=!1,Zr=!1,Qu=!1,ji=0;function Dn(e){e!==ts&&e.next===null&&(ts===null?Br=ts=e:ts=ts.next=e),Zr=!0,Pu||(Pu=!0,zS())}function fl(e,i){if(!Qu&&Zr){Qu=!0;do for(var s=!1,r=Br;r!==null;){if(e!==0){var f=r.pendingLanes;if(f===0)var h=0;else{var y=r.suspendedLanes,S=r.pingedLanes;h=(1<<31-Kt(42|e)+1)-1,h&=f&~(y&~S),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(s=!0,ag(r,h))}else h=Oe,h=Gl(r,r===Pe?h:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(h&3)===0||Os(r,h)||(s=!0,ag(r,h));r=r.next}while(s);Qu=!1}}function _S(){tg()}function tg(){Zr=Pu=!1;var e=0;ji!==0&&US()&&(e=ji);for(var i=we(),s=null,r=Br;r!==null;){var f=r.next,h=ng(r,i);h===0?(r.next=null,s===null?Br=f:s.next=f,f===null&&(ts=s)):(s=r,(e!==0||(h&3)!==0)&&(Zr=!0)),r=f}yt!==0&&yt!==5||fl(e),ji!==0&&(ji=0)}function ng(e,i){for(var s=e.suspendedLanes,r=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var y=31-Kt(h),S=1<<y,_=f[y];_===-1?((S&s)===0||(S&r)!==0)&&(f[y]=Wb(S,i)):_<=i&&(e.expiredLanes|=S),h&=~S}if(i=Pe,s=Oe,s=Gl(e,e===i?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,s===0||e===i&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&bn(r),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||Os(e,s)){if(i=s&-s,i===e.callbackPriority)return i;switch(r!==null&&bn(r),uc(s)){case 2:case 8:s=Zl;break;case 32:s=en;break;case 268435456:s=re;break;default:s=en}return r=ig.bind(null,e),s=Rt(s,r),e.callbackPriority=i,e.callbackNode=s,i}return r!==null&&r!==null&&bn(r),e.callbackPriority=2,e.callbackNode=null,2}function ig(e,i){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if($r()&&e.callbackNode!==s)return null;var r=Oe;return r=Gl(e,e===Pe?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:($p(e,r,i),ng(e,we()),e.callbackNode!=null&&e.callbackNode===s?ig.bind(null,e):null)}function ag(e,i){if($r())return null;$p(e,i,!0)}function zS(){BS(function(){(Ue&6)!==0?Rt(Sa,_S):tg()})}function Xu(){if(ji===0){var e=Za;e===0&&(e=ql,ql<<=1,(ql&261888)===0&&(ql=256)),ji=e}return ji}function sg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Pl(""+e)}function lg(e,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,e.id&&s.setAttribute("form",e.id),i.parentNode.insertBefore(s,i),e=new FormData(e),s.parentNode.removeChild(s),e}function CS(e,i,s,r,f){if(i==="submit"&&s&&s.stateNode===f){var h=sg((f[Mt]||null).action),y=r.submitter;y&&(i=(i=y[Mt]||null)?sg(i.formAction):y.getAttribute("formAction"),i!==null&&(h=i,y=null));var S=new Fl("action","action",null,r,f);e.push({event:S,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ji!==0){var _=y?lg(f,y):new FormData(f);gu(s,{pending:!0,data:_,method:f.method,action:h},null,_)}}else typeof h=="function"&&(S.preventDefault(),_=y?lg(f,y):new FormData(f),gu(s,{pending:!0,data:_,method:f.method,action:h},h,_))},currentTarget:f}]})}}for(var Ju=0;Ju<Dc.length;Ju++){var Fu=Dc[Ju],ES=Fu.toLowerCase(),AS=Fu[0].toUpperCase()+Fu.slice(1);xn(ES,"on"+AS)}xn(Uh,"onAnimationEnd"),xn($h,"onAnimationIteration"),xn(Bh,"onAnimationStart"),xn("dblclick","onDoubleClick"),xn("focusin","onFocus"),xn("focusout","onBlur"),xn(Yx,"onTransitionRun"),xn(Vx,"onTransitionStart"),xn(Px,"onTransitionCancel"),xn(Zh,"onTransitionEnd"),_a("onMouseEnter",["mouseout","mouseover"]),_a("onMouseLeave",["mouseout","mouseover"]),_a("onPointerEnter",["pointerout","pointerover"]),_a("onPointerLeave",["pointerout","pointerover"]),Vi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hl="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(" "),OS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hl));function rg(e,i){i=(i&4)!==0;for(var s=0;s<e.length;s++){var r=e[s],f=r.event;r=r.listeners;e:{var h=void 0;if(i)for(var y=r.length-1;0<=y;y--){var S=r[y],_=S.instance,B=S.currentTarget;if(S=S.listener,_!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=B;try{h(f)}catch(Y){tr(Y)}f.currentTarget=null,h=_}else for(y=0;y<r.length;y++){if(S=r[y],_=S.instance,B=S.currentTarget,S=S.listener,_!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=B;try{h(f)}catch(Y){tr(Y)}f.currentTarget=null,h=_}}}}function Ee(e,i){var s=i[dc];s===void 0&&(s=i[dc]=new Set);var r=e+"__bubble";s.has(r)||(og(i,e,2,!1),s.add(r))}function Wu(e,i,s){var r=0;i&&(r|=4),og(s,e,r,i)}var qr="_reactListening"+Math.random().toString(36).slice(2);function ed(e){if(!e[qr]){e[qr]=!0,th.forEach(function(s){s!=="selectionchange"&&(OS.has(s)||Wu(s,!1,e),Wu(s,!0,e))});var i=e.nodeType===9?e:e.ownerDocument;i===null||i[qr]||(i[qr]=!0,Wu("selectionchange",!1,i))}}function og(e,i,s,r){switch(Ug(i)){case 2:var f=sw;break;case 8:f=lw;break;default:f=pd}s=f.bind(null,i,s,e),f=void 0,!xc||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(f=!0),r?f!==void 0?e.addEventListener(i,s,{capture:!0,passive:f}):e.addEventListener(i,s,!0):f!==void 0?e.addEventListener(i,s,{passive:f}):e.addEventListener(i,s,!1)}function td(e,i,s,r,f){var h=r;if((i&1)===0&&(i&2)===0&&r!==null)e:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var S=r.stateNode.containerInfo;if(S===f)break;if(y===4)for(y=r.return;y!==null;){var _=y.tag;if((_===3||_===4)&&y.stateNode.containerInfo===f)return;y=y.return}for(;S!==null;){if(y=ja(S),y===null)return;if(_=y.tag,_===5||_===6||_===26||_===27){r=h=y;continue e}S=S.parentNode}}r=r.return}hh(function(){var B=h,Y=vc(s),W=[];e:{var Z=qh.get(e);if(Z!==void 0){var I=Fl,de=e;switch(e){case"keypress":if(Xl(s)===0)break e;case"keydown":case"keyup":I=Nx;break;case"focusin":de="focus",I=Nc;break;case"focusout":de="blur",I=Nc;break;case"beforeblur":case"afterblur":I=Nc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":I=gh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":I=fx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":I=zx;break;case Uh:case $h:case Bh:I=px;break;case Zh:I=Ex;break;case"scroll":case"scrollend":I=ux;break;case"wheel":I=Ox;break;case"copy":case"cut":case"paste":I=yx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":I=vh;break;case"toggle":case"beforetoggle":I=Dx}var Se=(i&4)!==0,Ye=!Se&&(e==="scroll"||e==="scrollend"),M=Se?Z!==null?Z+"Capture":null:Z;Se=[];for(var E=B,$;E!==null;){var X=E;if($=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||$===null||M===null||(X=Ms(E,M),X!=null&&Se.push(ml(E,X,$))),Ye)break;E=E.return}0<Se.length&&(Z=new I(Z,de,null,s,Y),W.push({event:Z,listeners:Se}))}}if((i&7)===0){e:{if(Z=e==="mouseover"||e==="pointerover",I=e==="mouseout"||e==="pointerout",Z&&s!==yc&&(de=s.relatedTarget||s.fromElement)&&(ja(de)||de[wa]))break e;if((I||Z)&&(Z=Y.window===Y?Y:(Z=Y.ownerDocument)?Z.defaultView||Z.parentWindow:window,I?(de=s.relatedTarget||s.toElement,I=B,de=de?ja(de):null,de!==null&&(Ye=u(de),Se=de.tag,de!==Ye||Se!==5&&Se!==27&&Se!==6)&&(de=null)):(I=null,de=B),I!==de)){if(Se=gh,X="onMouseLeave",M="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(Se=vh,X="onPointerLeave",M="onPointerEnter",E="pointer"),Ye=I==null?Z:Rs(I),$=de==null?Z:Rs(de),Z=new Se(X,E+"leave",I,s,Y),Z.target=Ye,Z.relatedTarget=$,X=null,ja(Y)===B&&(Se=new Se(M,E+"enter",de,s,Y),Se.target=$,Se.relatedTarget=Ye,X=Se),Ye=X,I&&de)t:{for(Se=TS,M=I,E=de,$=0,X=M;X;X=Se(X))$++;X=0;for(var be=E;be;be=Se(be))X++;for(;0<$-X;)M=Se(M),$--;for(;0<X-$;)E=Se(E),X--;for(;$--;){if(M===E||E!==null&&M===E.alternate){Se=M;break t}M=Se(M),E=Se(E)}Se=null}else Se=null;I!==null&&cg(W,Z,I,Se,!1),de!==null&&Ye!==null&&cg(W,Ye,de,Se,!0)}}e:{if(Z=B?Rs(B):window,I=Z.nodeName&&Z.nodeName.toLowerCase(),I==="select"||I==="input"&&Z.type==="file")var Me=_h;else if(Nh(Z))if(zh)Me=Ix;else{Me=qx;var ge=Zx}else I=Z.nodeName,!I||I.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?B&&gc(B.elementType)&&(Me=_h):Me=Hx;if(Me&&(Me=Me(e,B))){kh(W,Me,s,Y);break e}ge&&ge(e,Z,B),e==="focusout"&&B&&Z.type==="number"&&B.memoizedProps.value!=null&&pc(Z,"number",Z.value)}switch(ge=B?Rs(B):window,e){case"focusin":(Nh(ge)||ge.contentEditable==="true")&&(Ta=ge,Ac=B,Is=null);break;case"focusout":Is=Ac=Ta=null;break;case"mousedown":Oc=!0;break;case"contextmenu":case"mouseup":case"dragend":Oc=!1,Mh(W,s,Y);break;case"selectionchange":if(Kx)break;case"keydown":case"keyup":Mh(W,s,Y)}var _e;if(_c)e:{switch(e){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else Oa?wh(e,s)&&(Te="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Te="onCompositionStart");Te&&(bh&&s.locale!=="ko"&&(Oa||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&Oa&&(_e=mh()):(ri=Y,Sc="value"in ri?ri.value:ri.textContent,Oa=!0)),ge=Hr(B,Te),0<ge.length&&(Te=new yh(Te,e,null,s,Y),W.push({event:Te,listeners:ge}),_e?Te.data=_e:(_e=jh(s),_e!==null&&(Te.data=_e)))),(_e=Mx?Lx(e,s):Ux(e,s))&&(Te=Hr(B,"onBeforeInput"),0<Te.length&&(ge=new yh("onBeforeInput","beforeinput",null,s,Y),W.push({event:ge,listeners:Te}),ge.data=_e)),CS(W,e,B,s,Y)}rg(W,i)})}function ml(e,i,s){return{instance:e,listener:i,currentTarget:s}}function Hr(e,i){for(var s=i+"Capture",r=[];e!==null;){var f=e,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=Ms(e,s),f!=null&&r.unshift(ml(e,f,h)),f=Ms(e,i),f!=null&&r.push(ml(e,f,h))),e.tag===3)return r;e=e.return}return[]}function TS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function cg(e,i,s,r,f){for(var h=i._reactName,y=[];s!==null&&s!==r;){var S=s,_=S.alternate,B=S.stateNode;if(S=S.tag,_!==null&&_===r)break;S!==5&&S!==26&&S!==27||B===null||(_=B,f?(B=Ms(s,h),B!=null&&y.unshift(ml(s,B,_))):f||(B=Ms(s,h),B!=null&&y.push(ml(s,B,_)))),s=s.return}y.length!==0&&e.push({event:i,listeners:y})}var DS=/\r\n?/g,RS=/\u0000|\uFFFD/g;function ug(e){return(typeof e=="string"?e:""+e).replace(DS,`
|
|
9
|
-
`).replace(RS,"")}function dg(e,i){return i=ug(i),ug(e)===i}function Ke(e,i,s,r,f,h){switch(s){case"children":typeof r=="string"?i==="body"||i==="textarea"&&r===""||Ca(e,r):(typeof r=="number"||typeof r=="bigint")&&i!=="body"&&Ca(e,""+r);break;case"className":Yl(e,"class",r);break;case"tabIndex":Yl(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Yl(e,s,r);break;case"style":dh(e,r,h);break;case"data":if(i!=="object"){Yl(e,"data",r);break}case"src":case"href":if(r===""&&(i!=="a"||s!=="href")){e.removeAttribute(s);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(s);break}r=Pl(""+r),e.setAttribute(s,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(s==="formAction"?(i!=="input"&&Ke(e,i,"name",f.name,f,null),Ke(e,i,"formEncType",f.formEncType,f,null),Ke(e,i,"formMethod",f.formMethod,f,null),Ke(e,i,"formTarget",f.formTarget,f,null)):(Ke(e,i,"encType",f.encType,f,null),Ke(e,i,"method",f.method,f,null),Ke(e,i,"target",f.target,f,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(s);break}r=Pl(""+r),e.setAttribute(s,r);break;case"onClick":r!=null&&(e.onclick=$n);break;case"onScroll":r!=null&&Ee("scroll",e);break;case"onScrollEnd":r!=null&&Ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(l(61));if(s=r.__html,s!=null){if(f.children!=null)throw Error(l(60));e.innerHTML=s}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}s=Pl(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(s,""+r):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":r===!0?e.setAttribute(s,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(s,r):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(s,r):e.removeAttribute(s);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(s):e.setAttribute(s,r);break;case"popover":Ee("beforetoggle",e),Ee("toggle",e),Kl(e,"popover",r);break;case"xlinkActuate":Un(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Un(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Un(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Un(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Un(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Un(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Un(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Un(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Un(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Kl(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=ox.get(s)||s,Kl(e,s,r))}}function nd(e,i,s,r,f,h){switch(s){case"style":dh(e,r,h);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(l(61));if(s=r.__html,s!=null){if(f.children!=null)throw Error(l(60));e.innerHTML=s}}break;case"children":typeof r=="string"?Ca(e,r):(typeof r=="number"||typeof r=="bigint")&&Ca(e,""+r);break;case"onScroll":r!=null&&Ee("scroll",e);break;case"onScrollEnd":r!=null&&Ee("scrollend",e);break;case"onClick":r!=null&&(e.onclick=$n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!nh.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(f=s.endsWith("Capture"),i=s.slice(2,f?s.length-7:void 0),h=e[Mt]||null,h=h!=null?h[s]:null,typeof h=="function"&&e.removeEventListener(i,h,f),typeof r=="function")){typeof h!="function"&&h!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(i,r,f);break e}s in e?e[s]=r:r===!0?e.setAttribute(s,""):Kl(e,s,r)}}}function Ct(e,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var r=!1,f=!1,h;for(h in s)if(s.hasOwnProperty(h)){var y=s[h];if(y!=null)switch(h){case"src":r=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:Ke(e,i,h,y,s,null)}}f&&Ke(e,i,"srcSet",s.srcSet,s,null),r&&Ke(e,i,"src",s.src,s,null);return;case"input":Ee("invalid",e);var S=h=y=f=null,_=null,B=null;for(r in s)if(s.hasOwnProperty(r)){var Y=s[r];if(Y!=null)switch(r){case"name":f=Y;break;case"type":y=Y;break;case"checked":_=Y;break;case"defaultChecked":B=Y;break;case"value":h=Y;break;case"defaultValue":S=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(l(137,i));break;default:Ke(e,i,r,Y,s,null)}}rh(e,h,S,_,B,y,f,!1);return;case"select":Ee("invalid",e),r=y=h=null;for(f in s)if(s.hasOwnProperty(f)&&(S=s[f],S!=null))switch(f){case"value":h=S;break;case"defaultValue":y=S;break;case"multiple":r=S;default:Ke(e,i,f,S,s,null)}i=h,s=y,e.multiple=!!r,i!=null?za(e,!!r,i,!1):s!=null&&za(e,!!r,s,!0);return;case"textarea":Ee("invalid",e),h=f=r=null;for(y in s)if(s.hasOwnProperty(y)&&(S=s[y],S!=null))switch(y){case"value":r=S;break;case"defaultValue":f=S;break;case"children":h=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(l(91));break;default:Ke(e,i,y,S,s,null)}ch(e,r,f,h);return;case"option":for(_ in s)s.hasOwnProperty(_)&&(r=s[_],r!=null)&&(_==="selected"?e.selected=r&&typeof r!="function"&&typeof r!="symbol":Ke(e,i,_,r,s,null));return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(r=0;r<hl.length;r++)Ee(hl[r],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(B in s)if(s.hasOwnProperty(B)&&(r=s[B],r!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:Ke(e,i,B,r,s,null)}return;default:if(gc(i)){for(Y in s)s.hasOwnProperty(Y)&&(r=s[Y],r!==void 0&&nd(e,i,Y,r,s,void 0));return}}for(S in s)s.hasOwnProperty(S)&&(r=s[S],r!=null&&Ke(e,i,S,r,s,null))}function MS(e,i,s,r){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,h=null,y=null,S=null,_=null,B=null,Y=null;for(I in s){var W=s[I];if(s.hasOwnProperty(I)&&W!=null)switch(I){case"checked":break;case"value":break;case"defaultValue":_=W;default:r.hasOwnProperty(I)||Ke(e,i,I,null,r,W)}}for(var Z in r){var I=r[Z];if(W=s[Z],r.hasOwnProperty(Z)&&(I!=null||W!=null))switch(Z){case"type":h=I;break;case"name":f=I;break;case"checked":B=I;break;case"defaultChecked":Y=I;break;case"value":y=I;break;case"defaultValue":S=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(l(137,i));break;default:I!==W&&Ke(e,i,Z,I,r,W)}}mc(e,y,S,_,B,Y,h,f);return;case"select":I=y=S=Z=null;for(h in s)if(_=s[h],s.hasOwnProperty(h)&&_!=null)switch(h){case"value":break;case"multiple":I=_;default:r.hasOwnProperty(h)||Ke(e,i,h,null,r,_)}for(f in r)if(h=r[f],_=s[f],r.hasOwnProperty(f)&&(h!=null||_!=null))switch(f){case"value":Z=h;break;case"defaultValue":S=h;break;case"multiple":y=h;default:h!==_&&Ke(e,i,f,h,r,_)}i=S,s=y,r=I,Z!=null?za(e,!!s,Z,!1):!!r!=!!s&&(i!=null?za(e,!!s,i,!0):za(e,!!s,s?[]:"",!1));return;case"textarea":I=Z=null;for(S in s)if(f=s[S],s.hasOwnProperty(S)&&f!=null&&!r.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Ke(e,i,S,null,r,f)}for(y in r)if(f=r[y],h=s[y],r.hasOwnProperty(y)&&(f!=null||h!=null))switch(y){case"value":Z=f;break;case"defaultValue":I=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(l(91));break;default:f!==h&&Ke(e,i,y,f,r,h)}oh(e,Z,I);return;case"option":for(var de in s)Z=s[de],s.hasOwnProperty(de)&&Z!=null&&!r.hasOwnProperty(de)&&(de==="selected"?e.selected=!1:Ke(e,i,de,null,r,Z));for(_ in r)Z=r[_],I=s[_],r.hasOwnProperty(_)&&Z!==I&&(Z!=null||I!=null)&&(_==="selected"?e.selected=Z&&typeof Z!="function"&&typeof Z!="symbol":Ke(e,i,_,Z,r,I));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 Se in s)Z=s[Se],s.hasOwnProperty(Se)&&Z!=null&&!r.hasOwnProperty(Se)&&Ke(e,i,Se,null,r,Z);for(B in r)if(Z=r[B],I=s[B],r.hasOwnProperty(B)&&Z!==I&&(Z!=null||I!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(l(137,i));break;default:Ke(e,i,B,Z,r,I)}return;default:if(gc(i)){for(var Ye in s)Z=s[Ye],s.hasOwnProperty(Ye)&&Z!==void 0&&!r.hasOwnProperty(Ye)&&nd(e,i,Ye,void 0,r,Z);for(Y in r)Z=r[Y],I=s[Y],!r.hasOwnProperty(Y)||Z===I||Z===void 0&&I===void 0||nd(e,i,Y,Z,r,I);return}}for(var M in s)Z=s[M],s.hasOwnProperty(M)&&Z!=null&&!r.hasOwnProperty(M)&&Ke(e,i,M,null,r,Z);for(W in r)Z=r[W],I=s[W],!r.hasOwnProperty(W)||Z===I||Z==null&&I==null||Ke(e,i,W,Z,r,I)}function fg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function LS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,i=0,s=performance.getEntriesByType("resource"),r=0;r<s.length;r++){var f=s[r],h=f.transferSize,y=f.initiatorType,S=f.duration;if(h&&S&&fg(y)){for(y=0,S=f.responseEnd,r+=1;r<s.length;r++){var _=s[r],B=_.startTime;if(B>S)break;var Y=_.transferSize,W=_.initiatorType;Y&&fg(W)&&(_=_.responseEnd,y+=Y*(_<S?1:(S-B)/(_-B)))}if(--r,i+=8*(h+y)/(f.duration/1e3),e++,10<e)break}}if(0<e)return i/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var id=null,ad=null;function Ir(e){return e.nodeType===9?e:e.ownerDocument}function hg(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 mg(e,i){if(e===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&i==="foreignObject"?0:e}function sd(e,i){return e==="textarea"||e==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var ld=null;function US(){var e=window.event;return e&&e.type==="popstate"?e===ld?!1:(ld=e,!0):(ld=null,!1)}var pg=typeof setTimeout=="function"?setTimeout:void 0,$S=typeof clearTimeout=="function"?clearTimeout:void 0,gg=typeof Promise=="function"?Promise:void 0,BS=typeof queueMicrotask=="function"?queueMicrotask:typeof gg<"u"?function(e){return gg.resolve(null).then(e).catch(ZS)}:pg;function ZS(e){setTimeout(function(){throw e})}function Ni(e){return e==="head"}function yg(e,i){var s=i,r=0;do{var f=s.nextSibling;if(e.removeChild(s),f&&f.nodeType===8)if(s=f.data,s==="/$"||s==="/&"){if(r===0){e.removeChild(f),ss(i);return}r--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")r++;else if(s==="html")pl(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,pl(s);for(var h=s.firstChild;h;){var y=h.nextSibling,S=h.nodeName;h[Ds]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&h.rel.toLowerCase()==="stylesheet"||s.removeChild(h),h=y}}else s==="body"&&pl(e.ownerDocument.body);s=f}while(s);ss(i)}function vg(e,i){var s=e;e=0;do{var r=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),r&&r.nodeType===8)if(s=r.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=r}while(s)}function rd(e){var i=e.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":rd(s),fc(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function qS(e,i,s,r){for(;e.nodeType===1;){var f=s;if(e.nodeName.toLowerCase()!==i.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Ds])switch(i){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(i==="input"&&e.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=un(e.nextSibling),e===null)break}return null}function HS(e,i,s){if(i==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=un(e.nextSibling),e===null))return null;return e}function bg(e,i){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=un(e.nextSibling),e===null))return null;return e}function od(e){return e.data==="$?"||e.data==="$~"}function cd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function IS(e,i){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=i;else if(e.data!=="$?"||s.readyState!=="loading")i();else{var r=function(){i(),s.removeEventListener("DOMContentLoaded",r)};s.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function un(e){for(;e!=null;e=e.nextSibling){var i=e.nodeType;if(i===1||i===3)break;if(i===8){if(i=e.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return e}var ud=null;function xg(e){e=e.nextSibling;for(var i=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(i===0)return un(e.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}e=e.nextSibling}return null}function Sg(e){e=e.previousSibling;for(var i=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return e;i--}else s!=="/$"&&s!=="/&"||i++}e=e.previousSibling}return null}function wg(e,i,s){switch(i=Ir(s),e){case"html":if(e=i.documentElement,!e)throw Error(l(452));return e;case"head":if(e=i.head,!e)throw Error(l(453));return e;case"body":if(e=i.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function pl(e){for(var i=e.attributes;i.length;)e.removeAttributeNode(i[0]);fc(e)}var dn=new Map,jg=new Set;function Gr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ei=F.d;F.d={f:GS,r:KS,D:YS,C:VS,L:PS,m:QS,X:JS,S:XS,M:FS};function GS(){var e=ei.f(),i=Mr();return e||i}function KS(e){var i=Na(e);i!==null&&i.tag===5&&i.type==="form"?Zm(i):ei.r(e)}var ns=typeof document>"u"?null:document;function Ng(e,i,s){var r=ns;if(r&&typeof i=="string"&&i){var f=nn(i);f='link[rel="'+e+'"][href="'+f+'"]',typeof s=="string"&&(f+='[crossorigin="'+s+'"]'),jg.has(f)||(jg.add(f),e={rel:e,crossOrigin:s,href:i},r.querySelector(f)===null&&(i=r.createElement("link"),Ct(i,"link",e),xt(i),r.head.appendChild(i)))}}function YS(e){ei.D(e),Ng("dns-prefetch",e,null)}function VS(e,i){ei.C(e,i),Ng("preconnect",e,i)}function PS(e,i,s){ei.L(e,i,s);var r=ns;if(r&&e&&i){var f='link[rel="preload"][as="'+nn(i)+'"]';i==="image"&&s&&s.imageSrcSet?(f+='[imagesrcset="'+nn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(f+='[imagesizes="'+nn(s.imageSizes)+'"]')):f+='[href="'+nn(e)+'"]';var h=f;switch(i){case"style":h=is(e);break;case"script":h=as(e)}dn.has(h)||(e=v({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:e,as:i},s),dn.set(h,e),r.querySelector(f)!==null||i==="style"&&r.querySelector(gl(h))||i==="script"&&r.querySelector(yl(h))||(i=r.createElement("link"),Ct(i,"link",e),xt(i),r.head.appendChild(i)))}}function QS(e,i){ei.m(e,i);var s=ns;if(s&&e){var r=i&&typeof i.as=="string"?i.as:"script",f='link[rel="modulepreload"][as="'+nn(r)+'"][href="'+nn(e)+'"]',h=f;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=as(e)}if(!dn.has(h)&&(e=v({rel:"modulepreload",href:e},i),dn.set(h,e),s.querySelector(f)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(yl(h)))return}r=s.createElement("link"),Ct(r,"link",e),xt(r),s.head.appendChild(r)}}}function XS(e,i,s){ei.S(e,i,s);var r=ns;if(r&&e){var f=ka(r).hoistableStyles,h=is(e);i=i||"default";var y=f.get(h);if(!y){var S={loading:0,preload:null};if(y=r.querySelector(gl(h)))S.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":i},s),(s=dn.get(h))&&dd(e,s);var _=y=r.createElement("link");xt(_),Ct(_,"link",e),_._p=new Promise(function(B,Y){_.onload=B,_.onerror=Y}),_.addEventListener("load",function(){S.loading|=1}),_.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Kr(y,i,r)}y={type:"stylesheet",instance:y,count:1,state:S},f.set(h,y)}}}function JS(e,i){ei.X(e,i);var s=ns;if(s&&e){var r=ka(s).hoistableScripts,f=as(e),h=r.get(f);h||(h=s.querySelector(yl(f)),h||(e=v({src:e,async:!0},i),(i=dn.get(f))&&fd(e,i),h=s.createElement("script"),xt(h),Ct(h,"link",e),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(f,h))}}function FS(e,i){ei.M(e,i);var s=ns;if(s&&e){var r=ka(s).hoistableScripts,f=as(e),h=r.get(f);h||(h=s.querySelector(yl(f)),h||(e=v({src:e,async:!0,type:"module"},i),(i=dn.get(f))&&fd(e,i),h=s.createElement("script"),xt(h),Ct(h,"link",e),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(f,h))}}function kg(e,i,s,r){var f=(f=fe.current)?Gr(f):null;if(!f)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=is(s.href),s=ka(f).hoistableStyles,r=s.get(i),r||(r={type:"style",instance:null,count:0,state:null},s.set(i,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=is(s.href);var h=ka(f).hoistableStyles,y=h.get(e);if(y||(f=f.ownerDocument||f,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,y),(h=f.querySelector(gl(e)))&&!h._p&&(y.instance=h,y.state.loading=5),dn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},dn.set(e,s),h||WS(f,e,s,y.state))),i&&r===null)throw Error(l(528,""));return y}if(i&&r!==null)throw Error(l(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=as(s),s=ka(f).hoistableScripts,r=s.get(i),r||(r={type:"script",instance:null,count:0,state:null},s.set(i,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function is(e){return'href="'+nn(e)+'"'}function gl(e){return'link[rel="stylesheet"]['+e+"]"}function _g(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function WS(e,i,s,r){e.querySelector('link[rel="preload"][as="style"]['+i+"]")?r.loading=1:(i=e.createElement("link"),r.preload=i,i.addEventListener("load",function(){return r.loading|=1}),i.addEventListener("error",function(){return r.loading|=2}),Ct(i,"link",s),xt(i),e.head.appendChild(i))}function as(e){return'[src="'+nn(e)+'"]'}function yl(e){return"script[async]"+e}function zg(e,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var r=e.querySelector('style[data-href~="'+nn(s.href)+'"]');if(r)return i.instance=r,xt(r),r;var f=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),xt(r),Ct(r,"style",f),Kr(r,s.precedence,e),i.instance=r;case"stylesheet":f=is(s.href);var h=e.querySelector(gl(f));if(h)return i.state.loading|=4,i.instance=h,xt(h),h;r=_g(s),(f=dn.get(f))&&dd(r,f),h=(e.ownerDocument||e).createElement("link"),xt(h);var y=h;return y._p=new Promise(function(S,_){y.onload=S,y.onerror=_}),Ct(h,"link",r),i.state.loading|=4,Kr(h,s.precedence,e),i.instance=h;case"script":return h=as(s.src),(f=e.querySelector(yl(h)))?(i.instance=f,xt(f),f):(r=s,(f=dn.get(h))&&(r=v({},s),fd(r,f)),e=e.ownerDocument||e,f=e.createElement("script"),xt(f),Ct(f,"link",r),e.head.appendChild(f),i.instance=f);case"void":return null;default:throw Error(l(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(r=i.instance,i.state.loading|=4,Kr(r,s.precedence,e));return i.instance}function Kr(e,i,s){for(var r=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=r.length?r[r.length-1]:null,h=f,y=0;y<r.length;y++){var S=r[y];if(S.dataset.precedence===i)h=S;else if(h!==f)break}h?h.parentNode.insertBefore(e,h.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(e,i.firstChild))}function dd(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.title==null&&(e.title=i.title)}function fd(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.integrity==null&&(e.integrity=i.integrity)}var Yr=null;function Cg(e,i,s){if(Yr===null){var r=new Map,f=Yr=new Map;f.set(s,r)}else f=Yr,r=f.get(s),r||(r=new Map,f.set(s,r));if(r.has(e))return r;for(r.set(e,null),s=s.getElementsByTagName(e),f=0;f<s.length;f++){var h=s[f];if(!(h[Ds]||h[Nt]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var y=h.getAttribute(i)||"";y=e+y;var S=r.get(y);S?S.push(h):r.set(y,[h])}}return r}function Eg(e,i,s){e=e.ownerDocument||e,e.head.insertBefore(s,i==="title"?e.querySelector("head > title"):null)}function ew(e,i,s){if(s===1||i.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(e=i.disabled,typeof i.precedence=="string"&&e==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Ag(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function tw(e,i,s,r){if(s.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var f=is(r.href),h=i.querySelector(gl(f));if(h){i=h._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(e.count++,e=Vr.bind(e),i.then(e,e)),s.state.loading|=4,s.instance=h,xt(h);return}h=i.ownerDocument||i,r=_g(r),(f=dn.get(f))&&dd(r,f),h=h.createElement("link"),xt(h);var y=h;y._p=new Promise(function(S,_){y.onload=S,y.onerror=_}),Ct(h,"link",r),s.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=Vr.bind(e),i.addEventListener("load",s),i.addEventListener("error",s))}}var hd=0;function nw(e,i){return e.stylesheets&&e.count===0&&Qr(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var r=setTimeout(function(){if(e.stylesheets&&Qr(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+i);0<e.imgBytes&&hd===0&&(hd=62500*LS());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Qr(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>hd?50:800)+i);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(f)}}:null}function Vr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Pr=null;function Qr(e,i){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Pr=new Map,i.forEach(iw,e),Pr=null,Vr.call(e))}function iw(e,i){if(!(i.state.loading&4)){var s=Pr.get(e);if(s)var r=s.get(null);else{s=new Map,Pr.set(e,s);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var y=f[h];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(s.set(y.dataset.precedence,y),r=y)}r&&s.set(null,r)}f=i.instance,y=f.getAttribute("data-precedence"),h=s.get(y)||r,h===r&&s.set(null,f),s.set(y,f),this.count++,r=Vr.bind(this),f.addEventListener("load",r),f.addEventListener("error",r),h?h.parentNode.insertBefore(f,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),i.state.loading|=4}}var vl={$$typeof:O,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function aw(e,i,s,r,f,h,y,S,_){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=oc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oc(0),this.hiddenUpdates=oc(null),this.identifierPrefix=r,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function Og(e,i,s,r,f,h,y,S,_,B,Y,W){return e=new aw(e,i,s,y,_,B,Y,W,S),i=1,h===!0&&(i|=24),h=Vt(3,null,null,i),e.current=h,h.stateNode=e,i=Yc(),i.refCount++,e.pooledCache=i,i.refCount++,h.memoizedState={element:r,isDehydrated:s,cache:i},Xc(h),e}function Tg(e){return e?(e=Ma,e):Ma}function Dg(e,i,s,r,f,h){f=Tg(f),r.context===null?r.context=f:r.pendingContext=f,r=hi(i),r.payload={element:s},h=h===void 0?null:h,h!==null&&(r.callback=h),s=mi(e,r,i),s!==null&&(qt(s,e,i),Xs(s,e,i))}function Rg(e,i){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<i?s:i}}function md(e,i){Rg(e,i),(e=e.alternate)&&Rg(e,i)}function Mg(e){if(e.tag===13||e.tag===31){var i=Ji(e,67108864);i!==null&&qt(i,e,67108864),md(e,67108864)}}function Lg(e){if(e.tag===13||e.tag===31){var i=Ft();i=cc(i);var s=Ji(e,i);s!==null&&qt(s,e,i),md(e,i)}}var Xr=!0;function sw(e,i,s,r){var f=U.T;U.T=null;var h=F.p;try{F.p=2,pd(e,i,s,r)}finally{F.p=h,U.T=f}}function lw(e,i,s,r){var f=U.T;U.T=null;var h=F.p;try{F.p=8,pd(e,i,s,r)}finally{F.p=h,U.T=f}}function pd(e,i,s,r){if(Xr){var f=gd(r);if(f===null)td(e,i,r,Jr,s),$g(e,r);else if(ow(f,e,i,s,r))r.stopPropagation();else if($g(e,r),i&4&&-1<rw.indexOf(e)){for(;f!==null;){var h=Na(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var y=Yi(h.pendingLanes);if(y!==0){var S=h;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var _=1<<31-Kt(y);S.entanglements[1]|=_,y&=~_}Dn(h),(Ue&6)===0&&(Dr=we()+500,fl(0))}}break;case 31:case 13:S=Ji(h,2),S!==null&&qt(S,h,2),Mr(),md(h,2)}if(h=gd(r),h===null&&td(e,i,r,Jr,s),h===f)break;f=h}f!==null&&r.stopPropagation()}else td(e,i,r,null,s)}}function gd(e){return e=vc(e),yd(e)}var Jr=null;function yd(e){if(Jr=null,e=ja(e),e!==null){var i=u(e);if(i===null)e=null;else{var s=i.tag;if(s===13){if(e=d(i),e!==null)return e;e=null}else if(s===31){if(e=m(i),e!==null)return e;e=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;e=null}else i!==e&&(e=null)}}return Jr=e,null}function Ug(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(Ki()){case Sa:return 2;case Zl:return 8;case en:case rc:return 32;case re:return 268435456;default:return 32}default:return 32}}var vd=!1,ki=null,_i=null,zi=null,bl=new Map,xl=new Map,Ci=[],rw="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 $g(e,i){switch(e){case"focusin":case"focusout":ki=null;break;case"dragenter":case"dragleave":_i=null;break;case"mouseover":case"mouseout":zi=null;break;case"pointerover":case"pointerout":bl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":xl.delete(i.pointerId)}}function Sl(e,i,s,r,f,h){return e===null||e.nativeEvent!==h?(e={blockedOn:i,domEventName:s,eventSystemFlags:r,nativeEvent:h,targetContainers:[f]},i!==null&&(i=Na(i),i!==null&&Mg(i)),e):(e.eventSystemFlags|=r,i=e.targetContainers,f!==null&&i.indexOf(f)===-1&&i.push(f),e)}function ow(e,i,s,r,f){switch(i){case"focusin":return ki=Sl(ki,e,i,s,r,f),!0;case"dragenter":return _i=Sl(_i,e,i,s,r,f),!0;case"mouseover":return zi=Sl(zi,e,i,s,r,f),!0;case"pointerover":var h=f.pointerId;return bl.set(h,Sl(bl.get(h)||null,e,i,s,r,f)),!0;case"gotpointercapture":return h=f.pointerId,xl.set(h,Sl(xl.get(h)||null,e,i,s,r,f)),!0}return!1}function Bg(e){var i=ja(e.target);if(i!==null){var s=u(i);if(s!==null){if(i=s.tag,i===13){if(i=d(s),i!==null){e.blockedOn=i,Wf(e.priority,function(){Lg(s)});return}}else if(i===31){if(i=m(s),i!==null){e.blockedOn=i,Wf(e.priority,function(){Lg(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fr(e){if(e.blockedOn!==null)return!1;for(var i=e.targetContainers;0<i.length;){var s=gd(e.nativeEvent);if(s===null){s=e.nativeEvent;var r=new s.constructor(s.type,s);yc=r,s.target.dispatchEvent(r),yc=null}else return i=Na(s),i!==null&&Mg(i),e.blockedOn=s,!1;i.shift()}return!0}function Zg(e,i,s){Fr(e)&&s.delete(i)}function cw(){vd=!1,ki!==null&&Fr(ki)&&(ki=null),_i!==null&&Fr(_i)&&(_i=null),zi!==null&&Fr(zi)&&(zi=null),bl.forEach(Zg),xl.forEach(Zg)}function Wr(e,i){e.blockedOn===i&&(e.blockedOn=null,vd||(vd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,cw)))}var eo=null;function qg(e){eo!==e&&(eo=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){eo===e&&(eo=null);for(var i=0;i<e.length;i+=3){var s=e[i],r=e[i+1],f=e[i+2];if(typeof r!="function"){if(yd(r||s)===null)continue;break}var h=Na(s);h!==null&&(e.splice(i,3),i-=3,gu(h,{pending:!0,data:f,method:s.method,action:r},r,f))}}))}function ss(e){function i(_){return Wr(_,e)}ki!==null&&Wr(ki,e),_i!==null&&Wr(_i,e),zi!==null&&Wr(zi,e),bl.forEach(i),xl.forEach(i);for(var s=0;s<Ci.length;s++){var r=Ci[s];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ci.length&&(s=Ci[0],s.blockedOn===null);)Bg(s),s.blockedOn===null&&Ci.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(r=0;r<s.length;r+=3){var f=s[r],h=s[r+1],y=f[Mt]||null;if(typeof h=="function")y||qg(s);else if(y){var S=null;if(h&&h.hasAttribute("formAction")){if(f=h,y=h[Mt]||null)S=y.formAction;else if(yd(f)!==null)continue}else S=y.action;typeof S=="function"?s[r+1]=S:(s.splice(r,3),r-=3),qg(s)}}}function Hg(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(y){return f=y})},focusReset:"manual",scroll:"manual"})}function i(){f!==null&&(f(),f=null),r||setTimeout(s,20)}function s(){if(!r&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),f!==null&&(f(),f=null)}}}function bd(e){this._internalRoot=e}to.prototype.render=bd.prototype.render=function(e){var i=this._internalRoot;if(i===null)throw Error(l(409));var s=i.current,r=Ft();Dg(s,r,e,i,null,null)},to.prototype.unmount=bd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var i=e.containerInfo;Dg(e.current,2,null,e,null,null),Mr(),i[wa]=null}};function to(e){this._internalRoot=e}to.prototype.unstable_scheduleHydration=function(e){if(e){var i=Ff();e={blockedOn:null,target:e,priority:i};for(var s=0;s<Ci.length&&i!==0&&i<Ci[s].priority;s++);Ci.splice(s,0,e),s===0&&Bg(e)}};var Ig=n.version;if(Ig!=="19.2.4")throw Error(l(527,Ig,"19.2.4"));F.findDOMNode=function(e){var i=e._reactInternals;if(i===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=p(i),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var uw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var no=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!no.isDisabled&&no.supportsFiber)try{As=no.inject(uw),Gt=no}catch{}}return jl.createRoot=function(e,i){if(!o(e))throw Error(l(299));var s=!1,r="",f=Xm,h=Jm,y=Fm;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(h=i.onCaughtError),i.onRecoverableError!==void 0&&(y=i.onRecoverableError)),i=Og(e,1,!1,null,null,s,r,null,f,h,y,Hg),e[wa]=i.current,ed(e),new bd(i)},jl.hydrateRoot=function(e,i,s){if(!o(e))throw Error(l(299));var r=!1,f="",h=Xm,y=Jm,S=Fm,_=null;return s!=null&&(s.unstable_strictMode===!0&&(r=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onUncaughtError!==void 0&&(h=s.onUncaughtError),s.onCaughtError!==void 0&&(y=s.onCaughtError),s.onRecoverableError!==void 0&&(S=s.onRecoverableError),s.formState!==void 0&&(_=s.formState)),i=Og(e,1,!0,i,s??null,r,f,_,h,y,S,Hg),i.context=Tg(null),s=i.current,r=Ft(),r=cc(r),f=hi(r),f.callback=null,mi(s,f,r),s=r,i.current.lanes=s,Ts(i,s),Dn(i),e[wa]=i.current,ed(e),new to(i)},jl.version="19.2.4",jl}var Wg;function Sw(){if(Wg)return wd.exports;Wg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),wd.exports=xw(),wd.exports}var ww=Sw();const uf=Symbol.for("yaml.alias"),Kd=Symbol.for("yaml.document"),Li=Symbol.for("yaml.map"),fv=Symbol.for("yaml.pair"),Mn=Symbol.for("yaml.scalar"),ks=Symbol.for("yaml.seq"),mn=Symbol.for("yaml.node.type"),ga=t=>!!t&&typeof t=="object"&&t[mn]===uf,Zo=t=>!!t&&typeof t=="object"&&t[mn]===Kd,Ll=t=>!!t&&typeof t=="object"&&t[mn]===Li,ut=t=>!!t&&typeof t=="object"&&t[mn]===fv,Xe=t=>!!t&&typeof t=="object"&&t[mn]===Mn,Ul=t=>!!t&&typeof t=="object"&&t[mn]===ks;function ot(t){if(t&&typeof t=="object")switch(t[mn]){case Li:case ks:return!0}return!1}function ct(t){if(t&&typeof t=="object")switch(t[mn]){case uf:case Li:case Mn:case ks:return!0}return!1}const hv=t=>(Xe(t)||ot(t))&&!!t.anchor,da=Symbol("break visit"),jw=Symbol("skip children"),Cl=Symbol("remove node");function _s(t,n){const a=Nw(n);Zo(t)?ds(null,t.contents,a,Object.freeze([t]))===Cl&&(t.contents=null):ds(null,t,a,Object.freeze([]))}_s.BREAK=da;_s.SKIP=jw;_s.REMOVE=Cl;function ds(t,n,a,l){const o=kw(t,n,a,l);if(ct(o)||ut(o))return _w(t,l,o),ds(t,o,a,l);if(typeof o!="symbol"){if(ot(n)){l=Object.freeze(l.concat(n));for(let u=0;u<n.items.length;++u){const d=ds(u,n.items[u],a,l);if(typeof d=="number")u=d-1;else{if(d===da)return da;d===Cl&&(n.items.splice(u,1),u-=1)}}}else if(ut(n)){l=Object.freeze(l.concat(n));const u=ds("key",n.key,a,l);if(u===da)return da;u===Cl&&(n.key=null);const d=ds("value",n.value,a,l);if(d===da)return da;d===Cl&&(n.value=null)}}return o}function Nw(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function kw(t,n,a,l){if(typeof a=="function")return a(t,n,l);if(Ll(n))return a.Map?.(t,n,l);if(Ul(n))return a.Seq?.(t,n,l);if(ut(n))return a.Pair?.(t,n,l);if(Xe(n))return a.Scalar?.(t,n,l);if(ga(n))return a.Alias?.(t,n,l)}function _w(t,n,a){const l=n[n.length-1];if(ot(l))l.items[t]=a;else if(ut(l))t==="key"?l.key=a:l.value=a;else if(Zo(l))l.contents=a;else{const o=ga(l)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}}const zw={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Cw=t=>t.replace(/[!,[\]{}]/g,n=>zw[n]);class Tt{constructor(n,a){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Tt.defaultYaml,n),this.tags=Object.assign({},Tt.defaultTags,a)}clone(){const n=new Tt(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){const n=new Tt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Tt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Tt.defaultTags);break}return n}add(n,a){this.atNextDocument&&(this.yaml={explicit:Tt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Tt.defaultTags),this.atNextDocument=!1);const l=n.trim().split(/[ \t]+/),o=l.shift();switch(o){case"%TAG":{if(l.length!==2&&(a(0,"%TAG directive should contain exactly two parts"),l.length<2))return!1;const[u,d]=l;return this.tags[u]=d,!0}case"%YAML":{if(this.yaml.explicit=!0,l.length!==1)return a(0,"%YAML directive should contain exactly one part"),!1;const[u]=l;if(u==="1.1"||u==="1.2")return this.yaml.version=u,!0;{const d=/^\d+\.\d+$/.test(u);return a(6,`Unsupported YAML version ${u}`,d),!1}}default:return a(0,`Unknown directive ${o}`,!0),!1}}tagName(n,a){if(n==="!")return"!";if(n[0]!=="!")return a(`Not a valid tag: ${n}`),null;if(n[1]==="<"){const d=n.slice(2,-1);return d==="!"||d==="!!"?(a(`Verbatim tags aren't resolved, so ${n} is invalid.`),null):(n[n.length-1]!==">"&&a("Verbatim tags must end with a >"),d)}const[,l,o]=n.match(/^(.*!)([^!]*)$/s);o||a(`The ${n} tag has no suffix`);const u=this.tags[l];if(u)try{return u+decodeURIComponent(o)}catch(d){return a(String(d)),null}return l==="!"?n:(a(`Could not resolve tag: ${n}`),null)}tagString(n){for(const[a,l]of Object.entries(this.tags))if(n.startsWith(l))return a+Cw(n.substring(l.length));return n[0]==="!"?n:`!<${n}>`}toString(n){const a=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],l=Object.entries(this.tags);let o;if(n&&l.length>0&&ct(n.contents)){const u={};_s(n.contents,(d,m)=>{ct(m)&&m.tag&&(u[m.tag]=!0)}),o=Object.keys(u)}else o=[];for(const[u,d]of l)u==="!!"&&d==="tag:yaml.org,2002:"||(!n||o.some(m=>m.startsWith(d)))&&a.push(`%TAG ${u} ${d}`);return a.join(`
|
|
10
|
-
`)}}Tt.defaultYaml={explicit:!1,version:"1.2"};Tt.defaultTags={"!!":"tag:yaml.org,2002:"};function mv(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const a=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(a)}return!0}function pv(t){const n=new Set;return _s(t,{Value(a,l){l.anchor&&n.add(l.anchor)}}),n}function gv(t,n){for(let a=1;;++a){const l=`${t}${a}`;if(!n.has(l))return l}}function Ew(t,n){const a=[],l=new Map;let o=null;return{onAnchor:u=>{a.push(u),o??(o=pv(t));const d=gv(n,o);return o.add(d),d},setAnchors:()=>{for(const u of a){const d=l.get(u);if(typeof d=="object"&&d.anchor&&(Xe(d.node)||ot(d.node)))d.node.anchor=d.anchor;else{const m=new Error("Failed to resolve repeated object (this should not happen)");throw m.source=u,m}}},sourceObjects:l}}function fs(t,n,a,l){if(l&&typeof l=="object")if(Array.isArray(l))for(let o=0,u=l.length;o<u;++o){const d=l[o],m=fs(t,l,String(o),d);m===void 0?delete l[o]:m!==d&&(l[o]=m)}else if(l instanceof Map)for(const o of Array.from(l.keys())){const u=l.get(o),d=fs(t,l,o,u);d===void 0?l.delete(o):d!==u&&l.set(o,d)}else if(l instanceof Set)for(const o of Array.from(l)){const u=fs(t,l,o,o);u===void 0?l.delete(o):u!==o&&(l.delete(o),l.add(u))}else for(const[o,u]of Object.entries(l)){const d=fs(t,l,o,u);d===void 0?delete l[o]:d!==u&&(l[o]=d)}return t.call(n,a,l)}function hn(t,n,a){if(Array.isArray(t))return t.map((l,o)=>hn(l,String(o),a));if(t&&typeof t.toJSON=="function"){if(!a||!hv(t))return t.toJSON(n,a);const l={aliasCount:0,count:1,res:void 0};a.anchors.set(t,l),a.onCreate=u=>{l.res=u,delete a.onCreate};const o=t.toJSON(n,a);return a.onCreate&&a.onCreate(o),o}return typeof t=="bigint"&&!a?.keep?Number(t):t}class df{constructor(n){Object.defineProperty(this,mn,{value:n})}clone(){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(n.range=this.range.slice()),n}toJS(n,{mapAsMap:a,maxAliasCount:l,onAnchor:o,reviver:u}={}){if(!Zo(n))throw new TypeError("A document argument is required");const d={anchors:new Map,doc:n,keep:!0,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},m=hn(this,"",d);if(typeof o=="function")for(const{count:g,res:p}of d.anchors.values())o(p,g);return typeof u=="function"?fs(u,{"":m},"",m):m}}class ff extends df{constructor(n){super(uf),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n,a){let l;a?.aliasResolveCache?l=a.aliasResolveCache:(l=[],_s(n,{Node:(u,d)=>{(ga(d)||hv(d))&&l.push(d)}}),a&&(a.aliasResolveCache=l));let o;for(const u of l){if(u===this)break;u.anchor===this.source&&(o=u)}return o}toJSON(n,a){if(!a)return{source:this.source};const{anchors:l,doc:o,maxAliasCount:u}=a,d=this.resolve(o,a);if(!d){const g=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(g)}let m=l.get(d);if(m||(hn(d,null,a),m=l.get(d)),m?.res===void 0){const g="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(g)}if(u>=0&&(m.count+=1,m.aliasCount===0&&(m.aliasCount=wo(o,d,l)),m.count*m.aliasCount>u)){const g="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(g)}return m.res}toString(n,a,l){const o=`*${this.source}`;if(n){if(mv(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){const u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(u)}if(n.implicitKey)return`${o} `}return o}}function wo(t,n,a){if(ga(n)){const l=n.resolve(t),o=a&&l&&a.get(l);return o?o.count*o.aliasCount:0}else if(ot(n)){let l=0;for(const o of n.items){const u=wo(t,o,a);u>l&&(l=u)}return l}else if(ut(n)){const l=wo(t,n.key,a),o=wo(t,n.value,a);return Math.max(l,o)}return 1}const yv=t=>!t||typeof t!="function"&&typeof t!="object";class Ne extends df{constructor(n){super(Mn),this.value=n}toJSON(n,a){return a?.keep?this.value:hn(this.value,n,a)}toString(){return String(this.value)}}Ne.BLOCK_FOLDED="BLOCK_FOLDED";Ne.BLOCK_LITERAL="BLOCK_LITERAL";Ne.PLAIN="PLAIN";Ne.QUOTE_DOUBLE="QUOTE_DOUBLE";Ne.QUOTE_SINGLE="QUOTE_SINGLE";const Aw="tag:yaml.org,2002:";function Ow(t,n,a){if(n){const l=a.filter(u=>u.tag===n),o=l.find(u=>!u.format)??l[0];if(!o)throw new Error(`Tag ${n} not found`);return o}return a.find(l=>l.identify?.(t)&&!l.format)}function Al(t,n,a){if(Zo(t)&&(t=t.contents),ct(t))return t;if(ut(t)){const v=a.schema[Li].createNode?.(a.schema,null,a);return v.items.push(t),v}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:l,onAnchor:o,onTagObj:u,schema:d,sourceObjects:m}=a;let g;if(l&&t&&typeof t=="object"){if(g=m.get(t),g)return g.anchor??(g.anchor=o(t)),new ff(g.anchor);g={anchor:null,node:null},m.set(t,g)}n?.startsWith("!!")&&(n=Aw+n.slice(2));let p=Ow(t,n,d.tags);if(!p){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const v=new Ne(t);return g&&(g.node=v),v}p=t instanceof Map?d[Li]:Symbol.iterator in Object(t)?d[ks]:d[Li]}u&&(u(p),delete a.onTagObj);const b=p?.createNode?p.createNode(a.schema,t,a):typeof p?.nodeClass?.from=="function"?p.nodeClass.from(a.schema,t,a):new Ne(t);return n?b.tag=n:p.default||(b.tag=p.tag),g&&(g.node=b),b}function zo(t,n,a){let l=a;for(let o=n.length-1;o>=0;--o){const u=n[o];if(typeof u=="number"&&Number.isInteger(u)&&u>=0){const d=[];d[u]=l,l=d}else l=new Map([[u,l]])}return Al(l,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const _l=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class vv extends df{constructor(n,a){super(n),Object.defineProperty(this,"schema",{value:a,configurable:!0,enumerable:!1,writable:!0})}clone(n){const a=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return n&&(a.schema=n),a.items=a.items.map(l=>ct(l)||ut(l)?l.clone(n):l),this.range&&(a.range=this.range.slice()),a}addIn(n,a){if(_l(n))this.add(a);else{const[l,...o]=n,u=this.get(l,!0);if(ot(u))u.addIn(o,a);else if(u===void 0&&this.schema)this.set(l,zo(this.schema,o,a));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${o}`)}}deleteIn(n){const[a,...l]=n;if(l.length===0)return this.delete(a);const o=this.get(a,!0);if(ot(o))return o.deleteIn(l);throw new Error(`Expected YAML collection at ${a}. Remaining path: ${l}`)}getIn(n,a){const[l,...o]=n,u=this.get(l,!0);return o.length===0?!a&&Xe(u)?u.value:u:ot(u)?u.getIn(o,a):void 0}hasAllNullValues(n){return this.items.every(a=>{if(!ut(a))return!1;const l=a.value;return l==null||n&&Xe(l)&&l.value==null&&!l.commentBefore&&!l.comment&&!l.tag})}hasIn(n){const[a,...l]=n;if(l.length===0)return this.has(a);const o=this.get(a,!0);return ot(o)?o.hasIn(l):!1}setIn(n,a){const[l,...o]=n;if(o.length===0)this.set(l,a);else{const u=this.get(l,!0);if(ot(u))u.setIn(o,a);else if(u===void 0&&this.schema)this.set(l,zo(this.schema,o,a));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${o}`)}}}const Tw=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function ni(t,n){return/^\n+$/.test(t)?t.substring(1):n?t.replace(/^(?! *$)/gm,n):t}const fa=(t,n,a)=>t.endsWith(`
|
|
11
|
-
`)?ni(a,n):a.includes(`
|
|
12
|
-
`)?`
|
|
13
|
-
`+ni(a,n):(t.endsWith(" ")?"":" ")+a,bv="flow",Yd="block",jo="quoted";function qo(t,n,a="flow",{indentAtStart:l,lineWidth:o=80,minContentWidth:u=20,onFold:d,onOverflow:m}={}){if(!o||o<0)return t;o<u&&(u=0);const g=Math.max(1+u,1+o-n.length);if(t.length<=g)return t;const p=[],b={};let v=o-n.length;typeof l=="number"&&(l>o-Math.max(2,u)?p.push(0):v=o-l);let x,N,z=!1,j=-1,k=-1,A=-1;a===Yd&&(j=ey(t,j,n.length),j!==-1&&(v=j+g));for(let O;O=t[j+=1];){if(a===jo&&O==="\\"){switch(k=j,t[j+1]){case"x":j+=3;break;case"u":j+=5;break;case"U":j+=9;break;default:j+=1}A=j}if(O===`
|
|
14
|
-
`)a===Yd&&(j=ey(t,j,n.length)),v=j+n.length+g,x=void 0;else{if(O===" "&&N&&N!==" "&&N!==`
|
|
15
|
-
`&&N!==" "){const R=t[j+1];R&&R!==" "&&R!==`
|
|
16
|
-
`&&R!==" "&&(x=j)}if(j>=v)if(x)p.push(x),v=x+g,x=void 0;else if(a===jo){for(;N===" "||N===" ";)N=O,O=t[j+=1],z=!0;const R=j>A+1?j-2:k-1;if(b[R])return t;p.push(R),b[R]=!0,v=R+g,x=void 0}else z=!0}N=O}if(z&&m&&m(),p.length===0)return t;d&&d();let T=t.slice(0,p[0]);for(let O=0;O<p.length;++O){const R=p[O],L=p[O+1]||t.length;R===0?T=`
|
|
17
|
-
${n}${t.slice(0,L)}`:(a===jo&&b[R]&&(T+=`${t[R]}\\`),T+=`
|
|
18
|
-
${n}${t.slice(R+1,L)}`)}return T}function ey(t,n,a){let l=n,o=n+1,u=t[o];for(;u===" "||u===" ";)if(n<o+a)u=t[++n];else{do u=t[++n];while(u&&u!==`
|
|
19
|
-
`);l=n,o=n+1,u=t[o]}return l}const Ho=(t,n)=>({indentAtStart:n?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Io=t=>/^(%|---|\.\.\.)/m.test(t);function Dw(t,n,a){if(!n||n<0)return!1;const l=n-a,o=t.length;if(o<=l)return!1;for(let u=0,d=0;u<o;++u)if(t[u]===`
|
|
20
|
-
`){if(u-d>l)return!0;if(d=u+1,o-d<=l)return!1}return!0}function El(t,n){const a=JSON.stringify(t);if(n.options.doubleQuotedAsJSON)return a;const{implicitKey:l}=n,o=n.options.doubleQuotedMinMultiLineLength,u=n.indent||(Io(t)?" ":"");let d="",m=0;for(let g=0,p=a[g];p;p=a[++g])if(p===" "&&a[g+1]==="\\"&&a[g+2]==="n"&&(d+=a.slice(m,g)+"\\ ",g+=1,m=g,p="\\"),p==="\\")switch(a[g+1]){case"u":{d+=a.slice(m,g);const b=a.substr(g+2,4);switch(b){case"0000":d+="\\0";break;case"0007":d+="\\a";break;case"000b":d+="\\v";break;case"001b":d+="\\e";break;case"0085":d+="\\N";break;case"00a0":d+="\\_";break;case"2028":d+="\\L";break;case"2029":d+="\\P";break;default:b.substr(0,2)==="00"?d+="\\x"+b.substr(2):d+=a.substr(g,6)}g+=5,m=g+1}break;case"n":if(l||a[g+2]==='"'||a.length<o)g+=1;else{for(d+=a.slice(m,g)+`
|
|
21
|
-
|
|
22
|
-
`;a[g+2]==="\\"&&a[g+3]==="n"&&a[g+4]!=='"';)d+=`
|
|
23
|
-
`,g+=2;d+=u,a[g+2]===" "&&(d+="\\"),g+=1,m=g+1}break;default:g+=1}return d=m?d+a.slice(m):a,l?d:qo(d,u,jo,Ho(n,!1))}function Vd(t,n){if(n.options.singleQuote===!1||n.implicitKey&&t.includes(`
|
|
24
|
-
`)||/[ \t]\n|\n[ \t]/.test(t))return El(t,n);const a=n.indent||(Io(t)?" ":""),l="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
25
|
-
${a}`)+"'";return n.implicitKey?l:qo(l,a,bv,Ho(n,!1))}function hs(t,n){const{singleQuote:a}=n.options;let l;if(a===!1)l=El;else{const o=t.includes('"'),u=t.includes("'");o&&!u?l=Vd:u&&!o?l=El:l=a?Vd:El}return l(t,n)}let Pd;try{Pd=new RegExp(`(^|(?<!
|
|
26
|
-
))
|
|
27
|
-
+(?!
|
|
28
|
-
|$)`,"g")}catch{Pd=/\n+(?!\n|$)/g}function No({comment:t,type:n,value:a},l,o,u){const{blockQuote:d,commentString:m,lineWidth:g}=l.options;if(!d||/\n[\t ]+$/.test(a))return hs(a,l);const p=l.indent||(l.forceBlockIndent||Io(a)?" ":""),b=d==="literal"?!0:d==="folded"||n===Ne.BLOCK_FOLDED?!1:n===Ne.BLOCK_LITERAL?!0:!Dw(a,g,p.length);if(!a)return b?`|
|
|
29
|
-
`:`>
|
|
30
|
-
`;let v,x;for(x=a.length;x>0;--x){const L=a[x-1];if(L!==`
|
|
31
|
-
`&&L!==" "&&L!==" ")break}let N=a.substring(x);const z=N.indexOf(`
|
|
32
|
-
`);z===-1?v="-":a===N||z!==N.length-1?(v="+",u&&u()):v="",N&&(a=a.slice(0,-N.length),N[N.length-1]===`
|
|
33
|
-
`&&(N=N.slice(0,-1)),N=N.replace(Pd,`$&${p}`));let j=!1,k,A=-1;for(k=0;k<a.length;++k){const L=a[k];if(L===" ")j=!0;else if(L===`
|
|
34
|
-
`)A=k;else break}let T=a.substring(0,A<k?A+1:k);T&&(a=a.substring(T.length),T=T.replace(/\n+/g,`$&${p}`));let R=(j?p?"2":"1":"")+v;if(t&&(R+=" "+m(t.replace(/ ?[\r\n]+/g," ")),o&&o()),!b){const L=a.replace(/\n+/g,`
|
|
35
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);let H=!1;const K=Ho(l,!0);d!=="folded"&&n!==Ne.BLOCK_FOLDED&&(K.onOverflow=()=>{H=!0});const D=qo(`${T}${L}${N}`,p,Yd,K);if(!H)return`>${R}
|
|
36
|
-
${p}${D}`}return a=a.replace(/\n+/g,`$&${p}`),`|${R}
|
|
37
|
-
${p}${T}${a}${N}`}function Rw(t,n,a,l){const{type:o,value:u}=t,{actualString:d,implicitKey:m,indent:g,indentStep:p,inFlow:b}=n;if(m&&u.includes(`
|
|
38
|
-
`)||b&&/[[\]{},]/.test(u))return hs(u,n);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return m||b||!u.includes(`
|
|
39
|
-
`)?hs(u,n):No(t,n,a,l);if(!m&&!b&&o!==Ne.PLAIN&&u.includes(`
|
|
40
|
-
`))return No(t,n,a,l);if(Io(u)){if(g==="")return n.forceBlockIndent=!0,No(t,n,a,l);if(m&&g===p)return hs(u,n)}const v=u.replace(/\n+/g,`$&
|
|
41
|
-
${g}`);if(d){const x=j=>j.default&&j.tag!=="tag:yaml.org,2002:str"&&j.test?.test(v),{compat:N,tags:z}=n.doc.schema;if(z.some(x)||N?.some(x))return hs(u,n)}return m?v:qo(v,g,bv,Ho(n,!1))}function hf(t,n,a,l){const{implicitKey:o,inFlow:u}=n,d=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:m}=t;m!==Ne.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(d.value)&&(m=Ne.QUOTE_DOUBLE);const g=b=>{switch(b){case Ne.BLOCK_FOLDED:case Ne.BLOCK_LITERAL:return o||u?hs(d.value,n):No(d,n,a,l);case Ne.QUOTE_DOUBLE:return El(d.value,n);case Ne.QUOTE_SINGLE:return Vd(d.value,n);case Ne.PLAIN:return Rw(d,n,a,l);default:return null}};let p=g(m);if(p===null){const{defaultKeyType:b,defaultStringType:v}=n.options,x=o&&b||v;if(p=g(x),p===null)throw new Error(`Unsupported default string type ${x}`)}return p}function xv(t,n){const a=Object.assign({blockQuote:!0,commentString:Tw,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,n);let l;switch(a.collectionStyle){case"block":l=!1;break;case"flow":l=!0;break;default:l=null}return{anchors:new Set,doc:t,flowCollectionPadding:a.flowCollectionPadding?" ":"",indent:"",indentStep:typeof a.indent=="number"?" ".repeat(a.indent):" ",inFlow:l,options:a}}function Mw(t,n){if(n.tag){const o=t.filter(u=>u.tag===n.tag);if(o.length>0)return o.find(u=>u.format===n.format)??o[0]}let a,l;if(Xe(n)){l=n.value;let o=t.filter(u=>u.identify?.(l));if(o.length>1){const u=o.filter(d=>d.test);u.length>0&&(o=u)}a=o.find(u=>u.format===n.format)??o.find(u=>!u.format)}else l=n,a=t.find(o=>o.nodeClass&&l instanceof o.nodeClass);if(!a){const o=l?.constructor?.name??(l===null?"null":typeof l);throw new Error(`Tag not resolved for ${o} value`)}return a}function Lw(t,n,{anchors:a,doc:l}){if(!l.directives)return"";const o=[],u=(Xe(t)||ot(t))&&t.anchor;u&&mv(u)&&(a.add(u),o.push(`&${u}`));const d=t.tag??(n.default?null:n.tag);return d&&o.push(l.directives.tagString(d)),o.join(" ")}function Ss(t,n,a,l){if(ut(t))return t.toString(n,a,l);if(ga(t)){if(n.doc.directives)return t.toString(n);if(n.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");n.resolvedAliases?n.resolvedAliases.add(t):n.resolvedAliases=new Set([t]),t=t.resolve(n.doc)}let o;const u=ct(t)?t:n.doc.createNode(t,{onTagObj:g=>o=g});o??(o=Mw(n.doc.schema.tags,u));const d=Lw(u,o,n);d.length>0&&(n.indentAtStart=(n.indentAtStart??0)+d.length+1);const m=typeof o.stringify=="function"?o.stringify(u,n,a,l):Xe(u)?hf(u,n,a,l):u.toString(n,a,l);return d?Xe(u)||m[0]==="{"||m[0]==="["?`${d} ${m}`:`${d}
|
|
42
|
-
${n.indent}${m}`:m}function Uw({key:t,value:n},a,l,o){const{allNullValues:u,doc:d,indent:m,indentStep:g,options:{commentString:p,indentSeq:b,simpleKeys:v}}=a;let x=ct(t)&&t.comment||null;if(v){if(x)throw new Error("With simple keys, key nodes cannot have comments");if(ot(t)||!ct(t)&&typeof t=="object"){const K="With simple keys, collection cannot be used as a key value";throw new Error(K)}}let N=!v&&(!t||x&&n==null&&!a.inFlow||ot(t)||(Xe(t)?t.type===Ne.BLOCK_FOLDED||t.type===Ne.BLOCK_LITERAL:typeof t=="object"));a=Object.assign({},a,{allNullValues:!1,implicitKey:!N&&(v||!u),indent:m+g});let z=!1,j=!1,k=Ss(t,a,()=>z=!0,()=>j=!0);if(!N&&!a.inFlow&&k.length>1024){if(v)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");N=!0}if(a.inFlow){if(u||n==null)return z&&l&&l(),k===""?"?":N?`? ${k}`:k}else if(u&&!v||n==null&&N)return k=`? ${k}`,x&&!z?k+=fa(k,a.indent,p(x)):j&&o&&o(),k;z&&(x=null),N?(x&&(k+=fa(k,a.indent,p(x))),k=`? ${k}
|
|
43
|
-
${m}:`):(k=`${k}:`,x&&(k+=fa(k,a.indent,p(x))));let A,T,O;ct(n)?(A=!!n.spaceBefore,T=n.commentBefore,O=n.comment):(A=!1,T=null,O=null,n&&typeof n=="object"&&(n=d.createNode(n))),a.implicitKey=!1,!N&&!x&&Xe(n)&&(a.indentAtStart=k.length+1),j=!1,!b&&g.length>=2&&!a.inFlow&&!N&&Ul(n)&&!n.flow&&!n.tag&&!n.anchor&&(a.indent=a.indent.substring(2));let R=!1;const L=Ss(n,a,()=>R=!0,()=>j=!0);let H=" ";if(x||A||T){if(H=A?`
|
|
44
|
-
`:"",T){const K=p(T);H+=`
|
|
45
|
-
${ni(K,a.indent)}`}L===""&&!a.inFlow?H===`
|
|
46
|
-
`&&O&&(H=`
|
|
47
|
-
|
|
48
|
-
`):H+=`
|
|
49
|
-
${a.indent}`}else if(!N&&ot(n)){const K=L[0],D=L.indexOf(`
|
|
50
|
-
`),P=D!==-1,xe=a.inFlow??n.flow??n.items.length===0;if(P||!xe){let Q=!1;if(P&&(K==="&"||K==="!")){let oe=L.indexOf(" ");K==="&"&&oe!==-1&&oe<D&&L[oe+1]==="!"&&(oe=L.indexOf(" ",oe+1)),(oe===-1||D<oe)&&(Q=!0)}Q||(H=`
|
|
51
|
-
${a.indent}`)}}else(L===""||L[0]===`
|
|
52
|
-
`)&&(H="");return k+=H+L,a.inFlow?R&&l&&l():O&&!R?k+=fa(k,a.indent,p(O)):j&&o&&o(),k}function $w(t,n){(t==="debug"||t==="warn")&&console.warn(n)}const io="<<",ii={identify:t=>t===io||typeof t=="symbol"&&t.description===io,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Ne(Symbol(io)),{addToJSMap:Sv}),stringify:()=>io},Bw=(t,n)=>(ii.identify(n)||Xe(n)&&(!n.type||n.type===Ne.PLAIN)&&ii.identify(n.value))&&t?.doc.schema.tags.some(a=>a.tag===ii.tag&&a.default);function Sv(t,n,a){if(a=t&&ga(a)?a.resolve(t.doc):a,Ul(a))for(const l of a.items)_d(t,n,l);else if(Array.isArray(a))for(const l of a)_d(t,n,l);else _d(t,n,a)}function _d(t,n,a){const l=t&&ga(a)?a.resolve(t.doc):a;if(!Ll(l))throw new Error("Merge sources must be maps or map aliases");const o=l.toJSON(null,t,Map);for(const[u,d]of o)n instanceof Map?n.has(u)||n.set(u,d):n instanceof Set?n.add(u):Object.prototype.hasOwnProperty.call(n,u)||Object.defineProperty(n,u,{value:d,writable:!0,enumerable:!0,configurable:!0});return n}function wv(t,n,{key:a,value:l}){if(ct(a)&&a.addToJSMap)a.addToJSMap(t,n,l);else if(Bw(t,a))Sv(t,n,l);else{const o=hn(a,"",t);if(n instanceof Map)n.set(o,hn(l,o,t));else if(n instanceof Set)n.add(o);else{const u=Zw(a,o,t),d=hn(l,u,t);u in n?Object.defineProperty(n,u,{value:d,writable:!0,enumerable:!0,configurable:!0}):n[u]=d}}return n}function Zw(t,n,a){if(n===null)return"";if(typeof n!="object")return String(n);if(ct(t)&&a?.doc){const l=xv(a.doc,{});l.anchors=new Set;for(const u of a.anchors.keys())l.anchors.add(u.anchor);l.inFlow=!0,l.inStringifyKey=!0;const o=t.toString(l);if(!a.mapKeyWarned){let u=JSON.stringify(o);u.length>40&&(u=u.substring(0,36)+'..."'),$w(a.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${u}. Set mapAsMap: true to use object keys.`),a.mapKeyWarned=!0}return o}return JSON.stringify(n)}function mf(t,n,a){const l=Al(t,void 0,a),o=Al(n,void 0,a);return new Dt(l,o)}class Dt{constructor(n,a=null){Object.defineProperty(this,mn,{value:fv}),this.key=n,this.value=a}clone(n){let{key:a,value:l}=this;return ct(a)&&(a=a.clone(n)),ct(l)&&(l=l.clone(n)),new Dt(a,l)}toJSON(n,a){const l=a?.mapAsMap?new Map:{};return wv(a,l,this)}toString(n,a,l){return n?.doc?Uw(this,n,a,l):JSON.stringify(this)}}function jv(t,n,a){return(n.inFlow??t.flow?Hw:qw)(t,n,a)}function qw({comment:t,items:n},a,{blockItemPrefix:l,flowChars:o,itemIndent:u,onChompKeep:d,onComment:m}){const{indent:g,options:{commentString:p}}=a,b=Object.assign({},a,{indent:u,type:null});let v=!1;const x=[];for(let z=0;z<n.length;++z){const j=n[z];let k=null;if(ct(j))!v&&j.spaceBefore&&x.push(""),Co(a,x,j.commentBefore,v),j.comment&&(k=j.comment);else if(ut(j)){const T=ct(j.key)?j.key:null;T&&(!v&&T.spaceBefore&&x.push(""),Co(a,x,T.commentBefore,v))}v=!1;let A=Ss(j,b,()=>k=null,()=>v=!0);k&&(A+=fa(A,u,p(k))),v&&k&&(v=!1),x.push(l+A)}let N;if(x.length===0)N=o.start+o.end;else{N=x[0];for(let z=1;z<x.length;++z){const j=x[z];N+=j?`
|
|
53
|
-
${g}${j}`:`
|
|
54
|
-
`}}return t?(N+=`
|
|
55
|
-
`+ni(p(t),g),m&&m()):v&&d&&d(),N}function Hw({items:t},n,{flowChars:a,itemIndent:l}){const{indent:o,indentStep:u,flowCollectionPadding:d,options:{commentString:m}}=n;l+=u;const g=Object.assign({},n,{indent:l,inFlow:!0,type:null});let p=!1,b=0;const v=[];for(let z=0;z<t.length;++z){const j=t[z];let k=null;if(ct(j))j.spaceBefore&&v.push(""),Co(n,v,j.commentBefore,!1),j.comment&&(k=j.comment);else if(ut(j)){const T=ct(j.key)?j.key:null;T&&(T.spaceBefore&&v.push(""),Co(n,v,T.commentBefore,!1),T.comment&&(p=!0));const O=ct(j.value)?j.value:null;O?(O.comment&&(k=O.comment),O.commentBefore&&(p=!0)):j.value==null&&T?.comment&&(k=T.comment)}k&&(p=!0);let A=Ss(j,g,()=>k=null);z<t.length-1&&(A+=","),k&&(A+=fa(A,l,m(k))),!p&&(v.length>b||A.includes(`
|
|
56
|
-
`))&&(p=!0),v.push(A),b=v.length}const{start:x,end:N}=a;if(v.length===0)return x+N;if(!p){const z=v.reduce((j,k)=>j+k.length+2,2);p=n.options.lineWidth>0&&z>n.options.lineWidth}if(p){let z=x;for(const j of v)z+=j?`
|
|
57
|
-
${u}${o}${j}`:`
|
|
58
|
-
`;return`${z}
|
|
59
|
-
${o}${N}`}else return`${x}${d}${v.join(" ")}${d}${N}`}function Co({indent:t,options:{commentString:n}},a,l,o){if(l&&o&&(l=l.replace(/^\n+/,"")),l){const u=ni(n(l),t);a.push(u.trimStart())}}function ha(t,n){const a=Xe(n)?n.value:n;for(const l of t)if(ut(l)&&(l.key===n||l.key===a||Xe(l.key)&&l.key.value===a))return l}class fn extends vv{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(Li,n),this.items=[]}static from(n,a,l){const{keepUndefined:o,replacer:u}=l,d=new this(n),m=(g,p)=>{if(typeof u=="function")p=u.call(a,g,p);else if(Array.isArray(u)&&!u.includes(g))return;(p!==void 0||o)&&d.items.push(mf(g,p,l))};if(a instanceof Map)for(const[g,p]of a)m(g,p);else if(a&&typeof a=="object")for(const g of Object.keys(a))m(g,a[g]);return typeof n.sortMapEntries=="function"&&d.items.sort(n.sortMapEntries),d}add(n,a){let l;ut(n)?l=n:!n||typeof n!="object"||!("key"in n)?l=new Dt(n,n?.value):l=new Dt(n.key,n.value);const o=ha(this.items,l.key),u=this.schema?.sortMapEntries;if(o){if(!a)throw new Error(`Key ${l.key} already set`);Xe(o.value)&&yv(l.value)?o.value.value=l.value:o.value=l.value}else if(u){const d=this.items.findIndex(m=>u(l,m)<0);d===-1?this.items.push(l):this.items.splice(d,0,l)}else this.items.push(l)}delete(n){const a=ha(this.items,n);return a?this.items.splice(this.items.indexOf(a),1).length>0:!1}get(n,a){const o=ha(this.items,n)?.value;return(!a&&Xe(o)?o.value:o)??void 0}has(n){return!!ha(this.items,n)}set(n,a){this.add(new Dt(n,a),!0)}toJSON(n,a,l){const o=l?new l:a?.mapAsMap?new Map:{};a?.onCreate&&a.onCreate(o);for(const u of this.items)wv(a,o,u);return o}toString(n,a,l){if(!n)return JSON.stringify(this);for(const o of this.items)if(!ut(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),jv(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:l,onComment:a})}}const zs={collection:"map",default:!0,nodeClass:fn,tag:"tag:yaml.org,2002:map",resolve(t,n){return Ll(t)||n("Expected a mapping for this tag"),t},createNode:(t,n,a)=>fn.from(t,n,a)};class ma extends vv{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(ks,n),this.items=[]}add(n){this.items.push(n)}delete(n){const a=ao(n);return typeof a!="number"?!1:this.items.splice(a,1).length>0}get(n,a){const l=ao(n);if(typeof l!="number")return;const o=this.items[l];return!a&&Xe(o)?o.value:o}has(n){const a=ao(n);return typeof a=="number"&&a<this.items.length}set(n,a){const l=ao(n);if(typeof l!="number")throw new Error(`Expected a valid index, not ${n}.`);const o=this.items[l];Xe(o)&&yv(a)?o.value=a:this.items[l]=a}toJSON(n,a){const l=[];a?.onCreate&&a.onCreate(l);let o=0;for(const u of this.items)l.push(hn(u,String(o++),a));return l}toString(n,a,l){return n?jv(this,n,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(n.indent||"")+" ",onChompKeep:l,onComment:a}):JSON.stringify(this)}static from(n,a,l){const{replacer:o}=l,u=new this(n);if(a&&Symbol.iterator in Object(a)){let d=0;for(let m of a){if(typeof o=="function"){const g=a instanceof Set?m:String(d++);m=o.call(a,g,m)}u.items.push(Al(m,void 0,l))}}return u}}function ao(t){let n=Xe(t)?t.value:t;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}const Cs={collection:"seq",default:!0,nodeClass:ma,tag:"tag:yaml.org,2002:seq",resolve(t,n){return Ul(t)||n("Expected a sequence for this tag"),t},createNode:(t,n,a)=>ma.from(t,n,a)},Go={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,n,a,l){return n=Object.assign({actualString:!0},n),hf(t,n,a,l)}},Ko={identify:t=>t==null,createNode:()=>new Ne(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Ne(null),stringify:({source:t},n)=>typeof t=="string"&&Ko.test.test(t)?t:n.options.nullStr},pf={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new Ne(t[0]==="t"||t[0]==="T"),stringify({source:t,value:n},a){if(t&&pf.test.test(t)){const l=t[0]==="t"||t[0]==="T";if(n===l)return t}return n?a.options.trueStr:a.options.falseStr}};function kn({format:t,minFractionDigits:n,tag:a,value:l}){if(typeof l=="bigint")return String(l);const o=typeof l=="number"?l:Number(l);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let u=Object.is(l,-0)?"-0":JSON.stringify(l);if(!t&&n&&(!a||a==="tag:yaml.org,2002:float")&&/^\d/.test(u)){let d=u.indexOf(".");d<0&&(d=u.length,u+=".");let m=n-(u.length-d-1);for(;m-- >0;)u+="0"}return u}const Nv={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:kn},kv={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const n=Number(t.value);return isFinite(n)?n.toExponential():kn(t)}},_v={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const n=new Ne(parseFloat(t)),a=t.indexOf(".");return a!==-1&&t[t.length-1]==="0"&&(n.minFractionDigits=t.length-a-1),n},stringify:kn},Yo=t=>typeof t=="bigint"||Number.isInteger(t),gf=(t,n,a,{intAsBigInt:l})=>l?BigInt(t):parseInt(t.substring(n),a);function zv(t,n,a){const{value:l}=t;return Yo(l)&&l>=0?a+l.toString(n):kn(t)}const Cv={identify:t=>Yo(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,n,a)=>gf(t,2,8,a),stringify:t=>zv(t,8,"0o")},Ev={identify:Yo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,n,a)=>gf(t,0,10,a),stringify:kn},Av={identify:t=>Yo(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,n,a)=>gf(t,2,16,a),stringify:t=>zv(t,16,"0x")},Iw=[zs,Cs,Go,Ko,pf,Cv,Ev,Av,Nv,kv,_v];function ty(t){return typeof t=="bigint"||Number.isInteger(t)}const so=({value:t})=>JSON.stringify(t),Gw=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:so},{identify:t=>t==null,createNode:()=>new Ne(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:so},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:so},{identify:ty,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,n,{intAsBigInt:a})=>a?BigInt(t):parseInt(t,10),stringify:({value:t})=>ty(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:so}],Kw={default:!0,tag:"",test:/^/,resolve(t,n){return n(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Yw=[zs,Cs].concat(Gw,Kw),yf={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,n){if(typeof atob=="function"){const a=atob(t.replace(/[\n\r]/g,"")),l=new Uint8Array(a.length);for(let o=0;o<a.length;++o)l[o]=a.charCodeAt(o);return l}else return n("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:n,value:a},l,o,u){if(!a)return"";const d=a;let m;if(typeof btoa=="function"){let g="";for(let p=0;p<d.length;++p)g+=String.fromCharCode(d[p]);m=btoa(g)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(n??(n=Ne.BLOCK_LITERAL),n!==Ne.QUOTE_DOUBLE){const g=Math.max(l.options.lineWidth-l.indent.length,l.options.minContentWidth),p=Math.ceil(m.length/g),b=new Array(p);for(let v=0,x=0;v<p;++v,x+=g)b[v]=m.substr(x,g);m=b.join(n===Ne.BLOCK_LITERAL?`
|
|
60
|
-
`:" ")}return hf({comment:t,type:n,value:m},l,o,u)}};function Ov(t,n){if(Ul(t))for(let a=0;a<t.items.length;++a){let l=t.items[a];if(!ut(l)){if(Ll(l)){l.items.length>1&&n("Each pair must have its own sequence indicator");const o=l.items[0]||new Dt(new Ne(null));if(l.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${l.commentBefore}
|
|
61
|
-
${o.key.commentBefore}`:l.commentBefore),l.comment){const u=o.value??o.key;u.comment=u.comment?`${l.comment}
|
|
62
|
-
${u.comment}`:l.comment}l=o}t.items[a]=ut(l)?l:new Dt(l)}}else n("Expected a sequence for this tag");return t}function Tv(t,n,a){const{replacer:l}=a,o=new ma(t);o.tag="tag:yaml.org,2002:pairs";let u=0;if(n&&Symbol.iterator in Object(n))for(let d of n){typeof l=="function"&&(d=l.call(n,String(u++),d));let m,g;if(Array.isArray(d))if(d.length===2)m=d[0],g=d[1];else throw new TypeError(`Expected [key, value] tuple: ${d}`);else if(d&&d instanceof Object){const p=Object.keys(d);if(p.length===1)m=p[0],g=d[m];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else m=d;o.items.push(mf(m,g,a))}return o}const vf={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ov,createNode:Tv};class gs extends ma{constructor(){super(),this.add=fn.prototype.add.bind(this),this.delete=fn.prototype.delete.bind(this),this.get=fn.prototype.get.bind(this),this.has=fn.prototype.has.bind(this),this.set=fn.prototype.set.bind(this),this.tag=gs.tag}toJSON(n,a){if(!a)return super.toJSON(n);const l=new Map;a?.onCreate&&a.onCreate(l);for(const o of this.items){let u,d;if(ut(o)?(u=hn(o.key,"",a),d=hn(o.value,u,a)):u=hn(o,"",a),l.has(u))throw new Error("Ordered maps must not include duplicate keys");l.set(u,d)}return l}static from(n,a,l){const o=Tv(n,a,l),u=new this;return u.items=o.items,u}}gs.tag="tag:yaml.org,2002:omap";const bf={collection:"seq",identify:t=>t instanceof Map,nodeClass:gs,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,n){const a=Ov(t,n),l=[];for(const{key:o}of a.items)Xe(o)&&(l.includes(o.value)?n(`Ordered maps must not include duplicate keys: ${o.value}`):l.push(o.value));return Object.assign(new gs,a)},createNode:(t,n,a)=>gs.from(t,n,a)};function Dv({value:t,source:n},a){return n&&(t?Rv:Mv).test.test(n)?n:t?a.options.trueStr:a.options.falseStr}const Rv={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Ne(!0),stringify:Dv},Mv={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Ne(!1),stringify:Dv},Vw={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:kn},Pw={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const n=Number(t.value);return isFinite(n)?n.toExponential():kn(t)}},Qw={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const n=new Ne(parseFloat(t.replace(/_/g,""))),a=t.indexOf(".");if(a!==-1){const l=t.substring(a+1).replace(/_/g,"");l[l.length-1]==="0"&&(n.minFractionDigits=l.length)}return n},stringify:kn},$l=t=>typeof t=="bigint"||Number.isInteger(t);function Vo(t,n,a,{intAsBigInt:l}){const o=t[0];if((o==="-"||o==="+")&&(n+=1),t=t.substring(n).replace(/_/g,""),l){switch(a){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const d=BigInt(t);return o==="-"?BigInt(-1)*d:d}const u=parseInt(t,a);return o==="-"?-1*u:u}function xf(t,n,a){const{value:l}=t;if($l(l)){const o=l.toString(n);return l<0?"-"+a+o.substr(1):a+o}return kn(t)}const Xw={identify:$l,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,n,a)=>Vo(t,2,2,a),stringify:t=>xf(t,2,"0b")},Jw={identify:$l,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,n,a)=>Vo(t,1,8,a),stringify:t=>xf(t,8,"0")},Fw={identify:$l,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,n,a)=>Vo(t,0,10,a),stringify:kn},Ww={identify:$l,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,n,a)=>Vo(t,2,16,a),stringify:t=>xf(t,16,"0x")};class ys extends fn{constructor(n){super(n),this.tag=ys.tag}add(n){let a;ut(n)?a=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?a=new Dt(n.key,null):a=new Dt(n,null),ha(this.items,a.key)||this.items.push(a)}get(n,a){const l=ha(this.items,n);return!a&&ut(l)?Xe(l.key)?l.key.value:l.key:l}set(n,a){if(typeof a!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof a}`);const l=ha(this.items,n);l&&!a?this.items.splice(this.items.indexOf(l),1):!l&&a&&this.items.push(new Dt(n))}toJSON(n,a){return super.toJSON(n,a,Set)}toString(n,a,l){if(!n)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},n,{allNullValues:!0}),a,l);throw new Error("Set items must all have null values")}static from(n,a,l){const{replacer:o}=l,u=new this(n);if(a&&Symbol.iterator in Object(a))for(let d of a)typeof o=="function"&&(d=o.call(a,d,d)),u.items.push(mf(d,null,l));return u}}ys.tag="tag:yaml.org,2002:set";const Sf={collection:"map",identify:t=>t instanceof Set,nodeClass:ys,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,n,a)=>ys.from(t,n,a),resolve(t,n){if(Ll(t)){if(t.hasAllNullValues(!0))return Object.assign(new ys,t);n("Set items must all have null values")}else n("Expected a mapping for this tag");return t}};function wf(t,n){const a=t[0],l=a==="-"||a==="+"?t.substring(1):t,o=d=>n?BigInt(d):Number(d),u=l.replace(/_/g,"").split(":").reduce((d,m)=>d*o(60)+o(m),o(0));return a==="-"?o(-1)*u:u}function Lv(t){let{value:n}=t,a=d=>d;if(typeof n=="bigint")a=d=>BigInt(d);else if(isNaN(n)||!isFinite(n))return kn(t);let l="";n<0&&(l="-",n*=a(-1));const o=a(60),u=[n%o];return n<60?u.unshift(0):(n=(n-u[0])/o,u.unshift(n%o),n>=60&&(n=(n-u[0])/o,u.unshift(n))),l+u.map(d=>String(d).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Uv={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,n,{intAsBigInt:a})=>wf(t,a),stringify:Lv},$v={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>wf(t,!1),stringify:Lv},Po={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const n=t.match(Po.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,a,l,o,u,d,m]=n.map(Number),g=n[7]?Number((n[7]+"00").substr(1,3)):0;let p=Date.UTC(a,l-1,o,u||0,d||0,m||0,g);const b=n[8];if(b&&b!=="Z"){let v=wf(b,!1);Math.abs(v)<30&&(v*=60),p-=6e4*v}return new Date(p)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},ny=[zs,Cs,Go,Ko,Rv,Mv,Xw,Jw,Fw,Ww,Vw,Pw,Qw,yf,ii,bf,vf,Sf,Uv,$v,Po],iy=new Map([["core",Iw],["failsafe",[zs,Cs,Go]],["json",Yw],["yaml11",ny],["yaml-1.1",ny]]),ay={binary:yf,bool:pf,float:_v,floatExp:kv,floatNaN:Nv,floatTime:$v,int:Ev,intHex:Av,intOct:Cv,intTime:Uv,map:zs,merge:ii,null:Ko,omap:bf,pairs:vf,seq:Cs,set:Sf,timestamp:Po},ej={"tag:yaml.org,2002:binary":yf,"tag:yaml.org,2002:merge":ii,"tag:yaml.org,2002:omap":bf,"tag:yaml.org,2002:pairs":vf,"tag:yaml.org,2002:set":Sf,"tag:yaml.org,2002:timestamp":Po};function zd(t,n,a){const l=iy.get(n);if(l&&!t)return a&&!l.includes(ii)?l.concat(ii):l.slice();let o=l;if(!o)if(Array.isArray(t))o=[];else{const u=Array.from(iy.keys()).filter(d=>d!=="yaml11").map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown schema "${n}"; use one of ${u} or define customTags array`)}if(Array.isArray(t))for(const u of t)o=o.concat(u);else typeof t=="function"&&(o=t(o.slice()));return a&&(o=o.concat(ii)),o.reduce((u,d)=>{const m=typeof d=="string"?ay[d]:d;if(!m){const g=JSON.stringify(d),p=Object.keys(ay).map(b=>JSON.stringify(b)).join(", ");throw new Error(`Unknown custom tag ${g}; use one of ${p}`)}return u.includes(m)||u.push(m),u},[])}const tj=(t,n)=>t.key<n.key?-1:t.key>n.key?1:0;class jf{constructor({compat:n,customTags:a,merge:l,resolveKnownTags:o,schema:u,sortMapEntries:d,toStringDefaults:m}){this.compat=Array.isArray(n)?zd(n,"compat"):n?zd(null,n):null,this.name=typeof u=="string"&&u||"core",this.knownTags=o?ej:{},this.tags=zd(a,this.name,l),this.toStringOptions=m??null,Object.defineProperty(this,Li,{value:zs}),Object.defineProperty(this,Mn,{value:Go}),Object.defineProperty(this,ks,{value:Cs}),this.sortMapEntries=typeof d=="function"?d:d===!0?tj:null}clone(){const n=Object.create(jf.prototype,Object.getOwnPropertyDescriptors(this));return n.tags=this.tags.slice(),n}}function nj(t,n){const a=[];let l=n.directives===!0;if(n.directives!==!1&&t.directives){const g=t.directives.toString(t);g?(a.push(g),l=!0):t.directives.docStart&&(l=!0)}l&&a.push("---");const o=xv(t,n),{commentString:u}=o.options;if(t.commentBefore){a.length!==1&&a.unshift("");const g=u(t.commentBefore);a.unshift(ni(g,""))}let d=!1,m=null;if(t.contents){if(ct(t.contents)){if(t.contents.spaceBefore&&l&&a.push(""),t.contents.commentBefore){const b=u(t.contents.commentBefore);a.push(ni(b,""))}o.forceBlockIndent=!!t.comment,m=t.contents.comment}const g=m?void 0:()=>d=!0;let p=Ss(t.contents,o,()=>m=null,g);m&&(p+=fa(p,"",u(m))),(p[0]==="|"||p[0]===">")&&a[a.length-1]==="---"?a[a.length-1]=`--- ${p}`:a.push(p)}else a.push(Ss(t.contents,o));if(t.directives?.docEnd)if(t.comment){const g=u(t.comment);g.includes(`
|
|
63
|
-
`)?(a.push("..."),a.push(ni(g,""))):a.push(`... ${g}`)}else a.push("...");else{let g=t.comment;g&&d&&(g=g.replace(/^\n+/,"")),g&&((!d||m)&&a[a.length-1]!==""&&a.push(""),a.push(ni(u(g),"")))}return a.join(`
|
|
64
|
-
`)+`
|
|
65
|
-
`}class Qo{constructor(n,a,l){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,mn,{value:Kd});let o=null;typeof a=="function"||Array.isArray(a)?o=a:l===void 0&&a&&(l=a,a=void 0);const u=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},l);this.options=u;let{version:d}=u;l?._directives?(this.directives=l._directives.atDocument(),this.directives.yaml.explicit&&(d=this.directives.yaml.version)):this.directives=new Tt({version:d}),this.setSchema(d,l),this.contents=n===void 0?null:this.createNode(n,o,l)}clone(){const n=Object.create(Qo.prototype,{[mn]:{value:Kd}});return n.commentBefore=this.commentBefore,n.comment=this.comment,n.errors=this.errors.slice(),n.warnings=this.warnings.slice(),n.options=Object.assign({},this.options),this.directives&&(n.directives=this.directives.clone()),n.schema=this.schema.clone(),n.contents=ct(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){ls(this.contents)&&this.contents.add(n)}addIn(n,a){ls(this.contents)&&this.contents.addIn(n,a)}createAlias(n,a){if(!n.anchor){const l=pv(this);n.anchor=!a||l.has(a)?gv(a||"a",l):a}return new ff(n.anchor)}createNode(n,a,l){let o;if(typeof a=="function")n=a.call({"":n},"",n),o=a;else if(Array.isArray(a)){const k=T=>typeof T=="number"||T instanceof String||T instanceof Number,A=a.filter(k).map(String);A.length>0&&(a=a.concat(A)),o=a}else l===void 0&&a&&(l=a,a=void 0);const{aliasDuplicateObjects:u,anchorPrefix:d,flow:m,keepUndefined:g,onTagObj:p,tag:b}=l??{},{onAnchor:v,setAnchors:x,sourceObjects:N}=Ew(this,d||"a"),z={aliasDuplicateObjects:u??!0,keepUndefined:g??!1,onAnchor:v,onTagObj:p,replacer:o,schema:this.schema,sourceObjects:N},j=Al(n,b,z);return m&&ot(j)&&(j.flow=!0),x(),j}createPair(n,a,l={}){const o=this.createNode(n,null,l),u=this.createNode(a,null,l);return new Dt(o,u)}delete(n){return ls(this.contents)?this.contents.delete(n):!1}deleteIn(n){return _l(n)?this.contents==null?!1:(this.contents=null,!0):ls(this.contents)?this.contents.deleteIn(n):!1}get(n,a){return ot(this.contents)?this.contents.get(n,a):void 0}getIn(n,a){return _l(n)?!a&&Xe(this.contents)?this.contents.value:this.contents:ot(this.contents)?this.contents.getIn(n,a):void 0}has(n){return ot(this.contents)?this.contents.has(n):!1}hasIn(n){return _l(n)?this.contents!==void 0:ot(this.contents)?this.contents.hasIn(n):!1}set(n,a){this.contents==null?this.contents=zo(this.schema,[n],a):ls(this.contents)&&this.contents.set(n,a)}setIn(n,a){_l(n)?this.contents=a:this.contents==null?this.contents=zo(this.schema,Array.from(n),a):ls(this.contents)&&this.contents.setIn(n,a)}setSchema(n,a={}){typeof n=="number"&&(n=String(n));let l;switch(n){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Tt({version:"1.1"}),l={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=n:this.directives=new Tt({version:n}),l={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,l=null;break;default:{const o=JSON.stringify(n);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(a.schema instanceof Object)this.schema=a.schema;else if(l)this.schema=new jf(Object.assign(l,a));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:n,jsonArg:a,mapAsMap:l,maxAliasCount:o,onAnchor:u,reviver:d}={}){const m={anchors:new Map,doc:this,keep:!n,mapAsMap:l===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},g=hn(this.contents,a??"",m);if(typeof u=="function")for(const{count:p,res:b}of m.anchors.values())u(b,p);return typeof d=="function"?fs(d,{"":g},"",g):g}toJSON(n,a){return this.toJS({json:!0,jsonArg:n,mapAsMap:!1,onAnchor:a})}toString(n={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in n&&(!Number.isInteger(n.indent)||Number(n.indent)<=0)){const a=JSON.stringify(n.indent);throw new Error(`"indent" option must be a positive integer, not ${a}`)}return nj(this,n)}}function ls(t){if(ot(t))return!0;throw new Error("Expected a YAML collection as document contents")}class Bv extends Error{constructor(n,a,l,o){super(),this.name=n,this.code=l,this.message=o,this.pos=a}}class lo extends Bv{constructor(n,a,l){super("YAMLParseError",n,a,l)}}class ij extends Bv{constructor(n,a,l){super("YAMLWarning",n,a,l)}}const sy=(t,n)=>a=>{if(a.pos[0]===-1)return;a.linePos=a.pos.map(m=>n.linePos(m));const{line:l,col:o}=a.linePos[0];a.message+=` at line ${l}, column ${o}`;let u=o-1,d=t.substring(n.lineStarts[l-1],n.lineStarts[l]).replace(/[\n\r]+$/,"");if(u>=60&&d.length>80){const m=Math.min(u-39,d.length-79);d="…"+d.substring(m),u-=m-1}if(d.length>80&&(d=d.substring(0,79)+"…"),l>1&&/^ *$/.test(d.substring(0,u))){let m=t.substring(n.lineStarts[l-2],n.lineStarts[l-1]);m.length>80&&(m=m.substring(0,79)+`…
|
|
66
|
-
`),d=m+d}if(/[^ ]/.test(d)){let m=1;const g=a.linePos[1];g?.line===l&&g.col>o&&(m=Math.max(1,Math.min(g.col-o,80-u)));const p=" ".repeat(u)+"^".repeat(m);a.message+=`:
|
|
67
|
-
|
|
68
|
-
${d}
|
|
69
|
-
${p}
|
|
70
|
-
`}};function ws(t,{flow:n,indicator:a,next:l,offset:o,onError:u,parentIndent:d,startOnNewline:m}){let g=!1,p=m,b=m,v="",x="",N=!1,z=!1,j=null,k=null,A=null,T=null,O=null,R=null,L=null;for(const D of t)switch(z&&(D.type!=="space"&&D.type!=="newline"&&D.type!=="comma"&&u(D.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),z=!1),j&&(p&&D.type!=="comment"&&D.type!=="newline"&&u(j,"TAB_AS_INDENT","Tabs are not allowed as indentation"),j=null),D.type){case"space":!n&&(a!=="doc-start"||l?.type!=="flow-collection")&&D.source.includes(" ")&&(j=D),b=!0;break;case"comment":{b||u(D,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const P=D.source.substring(1)||" ";v?v+=x+P:v=P,x="",p=!1;break}case"newline":p?v?v+=D.source:(!R||a!=="seq-item-ind")&&(g=!0):x+=D.source,p=!0,N=!0,(k||A)&&(T=D),b=!0;break;case"anchor":k&&u(D,"MULTIPLE_ANCHORS","A node can have at most one anchor"),D.source.endsWith(":")&&u(D.offset+D.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),k=D,L??(L=D.offset),p=!1,b=!1,z=!0;break;case"tag":{A&&u(D,"MULTIPLE_TAGS","A node can have at most one tag"),A=D,L??(L=D.offset),p=!1,b=!1,z=!0;break}case a:(k||A)&&u(D,"BAD_PROP_ORDER",`Anchors and tags must be after the ${D.source} indicator`),R&&u(D,"UNEXPECTED_TOKEN",`Unexpected ${D.source} in ${n??"collection"}`),R=D,p=a==="seq-item-ind"||a==="explicit-key-ind",b=!1;break;case"comma":if(n){O&&u(D,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),O=D,p=!1,b=!1;break}default:u(D,"UNEXPECTED_TOKEN",`Unexpected ${D.type} token`),p=!1,b=!1}const H=t[t.length-1],K=H?H.offset+H.source.length:o;return z&&l&&l.type!=="space"&&l.type!=="newline"&&l.type!=="comma"&&(l.type!=="scalar"||l.source!=="")&&u(l.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),j&&(p&&j.indent<=d||l?.type==="block-map"||l?.type==="block-seq")&&u(j,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:O,found:R,spaceBefore:g,comment:v,hasNewline:N,anchor:k,tag:A,newlineAfterProp:T,end:K,start:L??K}}function Ol(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
|
71
|
-
`))return!0;if(t.end){for(const n of t.end)if(n.type==="newline")return!0}return!1;case"flow-collection":for(const n of t.items){for(const a of n.start)if(a.type==="newline")return!0;if(n.sep){for(const a of n.sep)if(a.type==="newline")return!0}if(Ol(n.key)||Ol(n.value))return!0}return!1;default:return!0}}function Qd(t,n,a){if(n?.type==="flow-collection"){const l=n.end[0];l.indent===t&&(l.source==="]"||l.source==="}")&&Ol(n)&&a(l,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Zv(t,n,a){const{uniqueKeys:l}=t.options;if(l===!1)return!1;const o=typeof l=="function"?l:(u,d)=>u===d||Xe(u)&&Xe(d)&&u.value===d.value;return n.some(u=>o(u.key,a))}const ly="All mapping items must start at the same column";function aj({composeNode:t,composeEmptyNode:n},a,l,o,u){const d=u?.nodeClass??fn,m=new d(a.schema);a.atRoot&&(a.atRoot=!1);let g=l.offset,p=null;for(const b of l.items){const{start:v,key:x,sep:N,value:z}=b,j=ws(v,{indicator:"explicit-key-ind",next:x??N?.[0],offset:g,onError:o,parentIndent:l.indent,startOnNewline:!0}),k=!j.found;if(k){if(x&&(x.type==="block-seq"?o(g,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in x&&x.indent!==l.indent&&o(g,"BAD_INDENT",ly)),!j.anchor&&!j.tag&&!N){p=j.end,j.comment&&(m.comment?m.comment+=`
|
|
72
|
-
`+j.comment:m.comment=j.comment);continue}(j.newlineAfterProp||Ol(x))&&o(x??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else j.found?.indent!==l.indent&&o(g,"BAD_INDENT",ly);a.atKey=!0;const A=j.end,T=x?t(a,x,j,o):n(a,A,v,null,j,o);a.schema.compat&&Qd(l.indent,x,o),a.atKey=!1,Zv(a,m.items,T)&&o(A,"DUPLICATE_KEY","Map keys must be unique");const O=ws(N??[],{indicator:"map-value-ind",next:z,offset:T.range[2],onError:o,parentIndent:l.indent,startOnNewline:!x||x.type==="block-scalar"});if(g=O.end,O.found){k&&(z?.type==="block-map"&&!O.hasNewline&&o(g,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),a.options.strict&&j.start<O.found.offset-1024&&o(T.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const R=z?t(a,z,O,o):n(a,g,N,null,O,o);a.schema.compat&&Qd(l.indent,z,o),g=R.range[2];const L=new Dt(T,R);a.options.keepSourceTokens&&(L.srcToken=b),m.items.push(L)}else{k&&o(T.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),O.comment&&(T.comment?T.comment+=`
|
|
73
|
-
`+O.comment:T.comment=O.comment);const R=new Dt(T);a.options.keepSourceTokens&&(R.srcToken=b),m.items.push(R)}}return p&&p<g&&o(p,"IMPOSSIBLE","Map comment with trailing content"),m.range=[l.offset,g,p??g],m}function sj({composeNode:t,composeEmptyNode:n},a,l,o,u){const d=u?.nodeClass??ma,m=new d(a.schema);a.atRoot&&(a.atRoot=!1),a.atKey&&(a.atKey=!1);let g=l.offset,p=null;for(const{start:b,value:v}of l.items){const x=ws(b,{indicator:"seq-item-ind",next:v,offset:g,onError:o,parentIndent:l.indent,startOnNewline:!0});if(!x.found)if(x.anchor||x.tag||v)v?.type==="block-seq"?o(x.end,"BAD_INDENT","All sequence items must start at the same column"):o(g,"MISSING_CHAR","Sequence item without - indicator");else{p=x.end,x.comment&&(m.comment=x.comment);continue}const N=v?t(a,v,x,o):n(a,x.end,b,null,x,o);a.schema.compat&&Qd(l.indent,v,o),g=N.range[2],m.items.push(N)}return m.range=[l.offset,g,p??g],m}function Bl(t,n,a,l){let o="";if(t){let u=!1,d="";for(const m of t){const{source:g,type:p}=m;switch(p){case"space":u=!0;break;case"comment":{a&&!u&&l(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const b=g.substring(1)||" ";o?o+=d+b:o=b,d="";break}case"newline":o&&(d+=g),u=!0;break;default:l(m,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}n+=g.length}}return{comment:o,offset:n}}const Cd="Block collections are not allowed within flow collections",Ed=t=>t&&(t.type==="block-map"||t.type==="block-seq");function lj({composeNode:t,composeEmptyNode:n},a,l,o,u){const d=l.start.source==="{",m=d?"flow map":"flow sequence",g=u?.nodeClass??(d?fn:ma),p=new g(a.schema);p.flow=!0;const b=a.atRoot;b&&(a.atRoot=!1),a.atKey&&(a.atKey=!1);let v=l.offset+l.start.source.length;for(let k=0;k<l.items.length;++k){const A=l.items[k],{start:T,key:O,sep:R,value:L}=A,H=ws(T,{flow:m,indicator:"explicit-key-ind",next:O??R?.[0],offset:v,onError:o,parentIndent:l.indent,startOnNewline:!1});if(!H.found){if(!H.anchor&&!H.tag&&!R&&!L){k===0&&H.comma?o(H.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`):k<l.items.length-1&&o(H.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${m}`),H.comment&&(p.comment?p.comment+=`
|
|
74
|
-
`+H.comment:p.comment=H.comment),v=H.end;continue}!d&&a.options.strict&&Ol(O)&&o(O,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(k===0)H.comma&&o(H.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`);else if(H.comma||o(H.start,"MISSING_CHAR",`Missing , between ${m} items`),H.comment){let K="";e:for(const D of T)switch(D.type){case"comma":case"space":break;case"comment":K=D.source.substring(1);break e;default:break e}if(K){let D=p.items[p.items.length-1];ut(D)&&(D=D.value??D.key),D.comment?D.comment+=`
|
|
75
|
-
`+K:D.comment=K,H.comment=H.comment.substring(K.length+1)}}if(!d&&!R&&!H.found){const K=L?t(a,L,H,o):n(a,H.end,R,null,H,o);p.items.push(K),v=K.range[2],Ed(L)&&o(K.range,"BLOCK_IN_FLOW",Cd)}else{a.atKey=!0;const K=H.end,D=O?t(a,O,H,o):n(a,K,T,null,H,o);Ed(O)&&o(D.range,"BLOCK_IN_FLOW",Cd),a.atKey=!1;const P=ws(R??[],{flow:m,indicator:"map-value-ind",next:L,offset:D.range[2],onError:o,parentIndent:l.indent,startOnNewline:!1});if(P.found){if(!d&&!H.found&&a.options.strict){if(R)for(const oe of R){if(oe===P.found)break;if(oe.type==="newline"){o(oe,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}H.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 xe=L?t(a,L,P,o):P.found?n(a,P.end,R,null,P,o):null;xe?Ed(L)&&o(xe.range,"BLOCK_IN_FLOW",Cd):P.comment&&(D.comment?D.comment+=`
|
|
76
|
-
`+P.comment:D.comment=P.comment);const Q=new Dt(D,xe);if(a.options.keepSourceTokens&&(Q.srcToken=A),d){const oe=p;Zv(a,oe.items,D)&&o(K,"DUPLICATE_KEY","Map keys must be unique"),oe.items.push(Q)}else{const oe=new fn(a.schema);oe.flow=!0,oe.items.push(Q);const $e=(xe??D).range;oe.range=[D.range[0],$e[1],$e[2]],p.items.push(oe)}v=xe?xe.range[2]:P.end}}const x=d?"}":"]",[N,...z]=l.end;let j=v;if(N?.source===x)j=N.offset+N.source.length;else{const k=m[0].toUpperCase()+m.substring(1),A=b?`${k} must end with a ${x}`:`${k} in block collection must be sufficiently indented and end with a ${x}`;o(v,b?"MISSING_CHAR":"BAD_INDENT",A),N&&N.source.length!==1&&z.unshift(N)}if(z.length>0){const k=Bl(z,j,a.options.strict,o);k.comment&&(p.comment?p.comment+=`
|
|
77
|
-
`+k.comment:p.comment=k.comment),p.range=[l.offset,j,k.offset]}else p.range=[l.offset,j,j];return p}function Ad(t,n,a,l,o,u){const d=a.type==="block-map"?aj(t,n,a,l,u):a.type==="block-seq"?sj(t,n,a,l,u):lj(t,n,a,l,u),m=d.constructor;return o==="!"||o===m.tagName?(d.tag=m.tagName,d):(o&&(d.tag=o),d)}function rj(t,n,a,l,o){const u=l.tag,d=u?n.directives.tagName(u.source,x=>o(u,"TAG_RESOLVE_FAILED",x)):null;if(a.type==="block-seq"){const{anchor:x,newlineAfterProp:N}=l,z=x&&u?x.offset>u.offset?x:u:x??u;z&&(!N||N.offset<z.offset)&&o(z,"MISSING_CHAR","Missing newline after block sequence props")}const m=a.type==="block-map"?"map":a.type==="block-seq"?"seq":a.start.source==="{"?"map":"seq";if(!u||!d||d==="!"||d===fn.tagName&&m==="map"||d===ma.tagName&&m==="seq")return Ad(t,n,a,o,d);let g=n.schema.tags.find(x=>x.tag===d&&x.collection===m);if(!g){const x=n.schema.knownTags[d];if(x?.collection===m)n.schema.tags.push(Object.assign({},x,{default:!1})),g=x;else return x?o(u,"BAD_COLLECTION_TYPE",`${x.tag} used for ${m} collection, but expects ${x.collection??"scalar"}`,!0):o(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${d}`,!0),Ad(t,n,a,o,d)}const p=Ad(t,n,a,o,d,g),b=g.resolve?.(p,x=>o(u,"TAG_RESOLVE_FAILED",x),n.options)??p,v=ct(b)?b:new Ne(b);return v.range=p.range,v.tag=d,g?.format&&(v.format=g.format),v}function oj(t,n,a){const l=n.offset,o=cj(n,t.options.strict,a);if(!o)return{value:"",type:null,comment:"",range:[l,l,l]};const u=o.mode===">"?Ne.BLOCK_FOLDED:Ne.BLOCK_LITERAL,d=n.source?uj(n.source):[];let m=d.length;for(let j=d.length-1;j>=0;--j){const k=d[j][1];if(k===""||k==="\r")m=j;else break}if(m===0){const j=o.chomp==="+"&&d.length>0?`
|
|
78
|
-
`.repeat(Math.max(1,d.length-1)):"";let k=l+o.length;return n.source&&(k+=n.source.length),{value:j,type:u,comment:o.comment,range:[l,k,k]}}let g=n.indent+o.indent,p=n.offset+o.length,b=0;for(let j=0;j<m;++j){const[k,A]=d[j];if(A===""||A==="\r")o.indent===0&&k.length>g&&(g=k.length);else{k.length<g&&a(p+k.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),o.indent===0&&(g=k.length),b=j,g===0&&!t.atRoot&&a(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=k.length+A.length+1}for(let j=d.length-1;j>=m;--j)d[j][0].length>g&&(m=j+1);let v="",x="",N=!1;for(let j=0;j<b;++j)v+=d[j][0].slice(g)+`
|
|
79
|
-
`;for(let j=b;j<m;++j){let[k,A]=d[j];p+=k.length+A.length+1;const T=A[A.length-1]==="\r";if(T&&(A=A.slice(0,-1)),A&&k.length<g){const R=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;a(p-A.length-(T?2:1),"BAD_INDENT",R),k=""}u===Ne.BLOCK_LITERAL?(v+=x+k.slice(g)+A,x=`
|
|
80
|
-
`):k.length>g||A[0]===" "?(x===" "?x=`
|
|
81
|
-
`:!N&&x===`
|
|
82
|
-
`&&(x=`
|
|
83
|
-
|
|
84
|
-
`),v+=x+k.slice(g)+A,x=`
|
|
85
|
-
`,N=!0):A===""?x===`
|
|
86
|
-
`?v+=`
|
|
87
|
-
`:x=`
|
|
88
|
-
`:(v+=x+A,x=" ",N=!1)}switch(o.chomp){case"-":break;case"+":for(let j=m;j<d.length;++j)v+=`
|
|
89
|
-
`+d[j][0].slice(g);v[v.length-1]!==`
|
|
90
|
-
`&&(v+=`
|
|
91
|
-
`);break;default:v+=`
|
|
92
|
-
`}const z=l+o.length+n.source.length;return{value:v,type:u,comment:o.comment,range:[l,z,z]}}function cj({offset:t,props:n},a,l){if(n[0].type!=="block-scalar-header")return l(n[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=n[0],u=o[0];let d=0,m="",g=-1;for(let x=1;x<o.length;++x){const N=o[x];if(!m&&(N==="-"||N==="+"))m=N;else{const z=Number(N);!d&&z?d=z:g===-1&&(g=t+x)}}g!==-1&&l(g,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let p=!1,b="",v=o.length;for(let x=1;x<n.length;++x){const N=n[x];switch(N.type){case"space":p=!0;case"newline":v+=N.source.length;break;case"comment":a&&!p&&l(N,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),v+=N.source.length,b=N.source.substring(1);break;case"error":l(N,"UNEXPECTED_TOKEN",N.message),v+=N.source.length;break;default:{const z=`Unexpected token in block scalar header: ${N.type}`;l(N,"UNEXPECTED_TOKEN",z);const j=N.source;j&&typeof j=="string"&&(v+=j.length)}}}return{mode:u,indent:d,chomp:m,comment:b,length:v}}function uj(t){const n=t.split(/\n( *)/),a=n[0],l=a.match(/^( *)/),u=[l?.[1]?[l[1],a.slice(l[1].length)]:["",a]];for(let d=1;d<n.length;d+=2)u.push([n[d],n[d+1]]);return u}function dj(t,n,a){const{offset:l,type:o,source:u,end:d}=t;let m,g;const p=(x,N,z)=>a(l+x,N,z);switch(o){case"scalar":m=Ne.PLAIN,g=fj(u,p);break;case"single-quoted-scalar":m=Ne.QUOTE_SINGLE,g=hj(u,p);break;case"double-quoted-scalar":m=Ne.QUOTE_DOUBLE,g=mj(u,p);break;default:return a(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[l,l+u.length,l+u.length]}}const b=l+u.length,v=Bl(d,b,n,a);return{value:g,type:m,comment:v.comment,range:[l,b,v.offset]}}function fj(t,n){let a="";switch(t[0]){case" ":a="a tab character";break;case",":a="flow indicator character ,";break;case"%":a="directive indicator character %";break;case"|":case">":{a=`block scalar indicator ${t[0]}`;break}case"@":case"`":{a=`reserved character ${t[0]}`;break}}return a&&n(0,"BAD_SCALAR_START",`Plain value cannot start with ${a}`),qv(t)}function hj(t,n){return(t[t.length-1]!=="'"||t.length===1)&&n(t.length,"MISSING_CHAR","Missing closing 'quote"),qv(t.slice(1,-1)).replace(/''/g,"'")}function qv(t){let n,a;try{n=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
93
|
-
`,"sy"),a=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
94
|
-
`,"sy")}catch{n=/(.*?)[ \t]*\r?\n/sy,a=/[ \t]*(.*?)[ \t]*\r?\n/sy}let l=n.exec(t);if(!l)return t;let o=l[1],u=" ",d=n.lastIndex;for(a.lastIndex=d;l=a.exec(t);)l[1]===""?u===`
|
|
95
|
-
`?o+=u:u=`
|
|
96
|
-
`:(o+=u+l[1],u=" "),d=a.lastIndex;const m=/[ \t]*(.*)/sy;return m.lastIndex=d,l=m.exec(t),o+u+(l?.[1]??"")}function mj(t,n){let a="";for(let l=1;l<t.length-1;++l){const o=t[l];if(!(o==="\r"&&t[l+1]===`
|
|
97
|
-
`))if(o===`
|
|
98
|
-
`){const{fold:u,offset:d}=pj(t,l);a+=u,l=d}else if(o==="\\"){let u=t[++l];const d=gj[u];if(d)a+=d;else if(u===`
|
|
99
|
-
`)for(u=t[l+1];u===" "||u===" ";)u=t[++l+1];else if(u==="\r"&&t[l+1]===`
|
|
100
|
-
`)for(u=t[++l+1];u===" "||u===" ";)u=t[++l+1];else if(u==="x"||u==="u"||u==="U"){const m={x:2,u:4,U:8}[u];a+=yj(t,l+1,m,n),l+=m}else{const m=t.substr(l-1,2);n(l-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${m}`),a+=m}}else if(o===" "||o===" "){const u=l;let d=t[l+1];for(;d===" "||d===" ";)d=t[++l+1];d!==`
|
|
101
|
-
`&&!(d==="\r"&&t[l+2]===`
|
|
102
|
-
`)&&(a+=l>u?t.slice(u,l+1):o)}else a+=o}return(t[t.length-1]!=='"'||t.length===1)&&n(t.length,"MISSING_CHAR",'Missing closing "quote'),a}function pj(t,n){let a="",l=t[n+1];for(;(l===" "||l===" "||l===`
|
|
103
|
-
`||l==="\r")&&!(l==="\r"&&t[n+2]!==`
|
|
104
|
-
`);)l===`
|
|
105
|
-
`&&(a+=`
|
|
106
|
-
`),n+=1,l=t[n+1];return a||(a=" "),{fold:a,offset:n}}const gj={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
107
|
-
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function yj(t,n,a,l){const o=t.substr(n,a),d=o.length===a&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(d)){const m=t.substr(n-2,a+2);return l(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${m}`),m}return String.fromCodePoint(d)}function Hv(t,n,a,l){const{value:o,type:u,comment:d,range:m}=n.type==="block-scalar"?oj(t,n,l):dj(n,t.options.strict,l),g=a?t.directives.tagName(a.source,v=>l(a,"TAG_RESOLVE_FAILED",v)):null;let p;t.options.stringKeys&&t.atKey?p=t.schema[Mn]:g?p=vj(t.schema,o,g,a,l):n.type==="scalar"?p=bj(t,o,n,l):p=t.schema[Mn];let b;try{const v=p.resolve(o,x=>l(a??n,"TAG_RESOLVE_FAILED",x),t.options);b=Xe(v)?v:new Ne(v)}catch(v){const x=v instanceof Error?v.message:String(v);l(a??n,"TAG_RESOLVE_FAILED",x),b=new Ne(o)}return b.range=m,b.source=o,u&&(b.type=u),g&&(b.tag=g),p.format&&(b.format=p.format),d&&(b.comment=d),b}function vj(t,n,a,l,o){if(a==="!")return t[Mn];const u=[];for(const m of t.tags)if(!m.collection&&m.tag===a)if(m.default&&m.test)u.push(m);else return m;for(const m of u)if(m.test?.test(n))return m;const d=t.knownTags[a];return d&&!d.collection?(t.tags.push(Object.assign({},d,{default:!1,test:void 0})),d):(o(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,a!=="tag:yaml.org,2002:str"),t[Mn])}function bj({atKey:t,directives:n,schema:a},l,o,u){const d=a.tags.find(m=>(m.default===!0||t&&m.default==="key")&&m.test?.test(l))||a[Mn];if(a.compat){const m=a.compat.find(g=>g.default&&g.test?.test(l))??a[Mn];if(d.tag!==m.tag){const g=n.tagString(d.tag),p=n.tagString(m.tag),b=`Value may be parsed as either ${g} or ${p}`;u(o,"TAG_RESOLVE_FAILED",b,!0)}}return d}function xj(t,n,a){if(n){a??(a=n.length);for(let l=a-1;l>=0;--l){let o=n[l];switch(o.type){case"space":case"comment":case"newline":t-=o.source.length;continue}for(o=n[++l];o?.type==="space";)t+=o.source.length,o=n[++l];break}}return t}const Sj={composeNode:Iv,composeEmptyNode:Nf};function Iv(t,n,a,l){const o=t.atKey,{spaceBefore:u,comment:d,anchor:m,tag:g}=a;let p,b=!0;switch(n.type){case"alias":p=wj(t,n,l),(m||g)&&l(n,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=Hv(t,n,g,l),m&&(p.anchor=m.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=rj(Sj,t,n,a,l),m&&(p.anchor=m.source.substring(1));break;default:{const v=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;l(n,"UNEXPECTED_TOKEN",v),p=Nf(t,n.offset,void 0,null,a,l),b=!1}}return m&&p.anchor===""&&l(m,"BAD_ALIAS","Anchor cannot be an empty string"),o&&t.options.stringKeys&&(!Xe(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&l(g??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),u&&(p.spaceBefore=!0),d&&(n.type==="scalar"&&n.source===""?p.comment=d:p.commentBefore=d),t.options.keepSourceTokens&&b&&(p.srcToken=n),p}function Nf(t,n,a,l,{spaceBefore:o,comment:u,anchor:d,tag:m,end:g},p){const b={type:"scalar",offset:xj(n,a,l),indent:-1,source:""},v=Hv(t,b,m,p);return d&&(v.anchor=d.source.substring(1),v.anchor===""&&p(d,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(v.spaceBefore=!0),u&&(v.comment=u,v.range[2]=g),v}function wj({options:t},{offset:n,source:a,end:l},o){const u=new ff(a.substring(1));u.source===""&&o(n,"BAD_ALIAS","Alias cannot be an empty string"),u.source.endsWith(":")&&o(n+a.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const d=n+a.length,m=Bl(l,d,t.strict,o);return u.range=[n,d,m.offset],m.comment&&(u.comment=m.comment),u}function jj(t,n,{offset:a,start:l,value:o,end:u},d){const m=Object.assign({_directives:n},t),g=new Qo(void 0,m),p={atKey:!1,atRoot:!0,directives:g.directives,options:g.options,schema:g.schema},b=ws(l,{indicator:"doc-start",next:o??u?.[0],offset:a,onError:d,parentIndent:0,startOnNewline:!0});b.found&&(g.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!b.hasNewline&&d(b.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),g.contents=o?Iv(p,o,b,d):Nf(p,b.end,l,null,b,d);const v=g.contents.range[2],x=Bl(u,v,!1,d);return x.comment&&(g.comment=x.comment),g.range=[a,v,x.offset],g}function Nl(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:n,source:a}=t;return[n,n+(typeof a=="string"?a.length:1)]}function ry(t){let n="",a=!1,l=!1;for(let o=0;o<t.length;++o){const u=t[o];switch(u[0]){case"#":n+=(n===""?"":l?`
|
|
108
|
-
|
|
109
|
-
`:`
|
|
110
|
-
`)+(u.substring(1)||" "),a=!0,l=!1;break;case"%":t[o+1]?.[0]!=="#"&&(o+=1),a=!1;break;default:a||(l=!0),a=!1}}return{comment:n,afterEmptyLine:l}}class Nj{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(a,l,o,u)=>{const d=Nl(a);u?this.warnings.push(new ij(d,l,o)):this.errors.push(new lo(d,l,o))},this.directives=new Tt({version:n.version||"1.2"}),this.options=n}decorate(n,a){const{comment:l,afterEmptyLine:o}=ry(this.prelude);if(l){const u=n.contents;if(a)n.comment=n.comment?`${n.comment}
|
|
111
|
-
${l}`:l;else if(o||n.directives.docStart||!u)n.commentBefore=l;else if(ot(u)&&!u.flow&&u.items.length>0){let d=u.items[0];ut(d)&&(d=d.key);const m=d.commentBefore;d.commentBefore=m?`${l}
|
|
112
|
-
${m}`:l}else{const d=u.commentBefore;u.commentBefore=d?`${l}
|
|
113
|
-
${d}`:l}}a?(Array.prototype.push.apply(n.errors,this.errors),Array.prototype.push.apply(n.warnings,this.warnings)):(n.errors=this.errors,n.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:ry(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(n,a=!1,l=-1){for(const o of n)yield*this.next(o);yield*this.end(a,l)}*next(n){switch(n.type){case"directive":this.directives.add(n.source,(a,l,o)=>{const u=Nl(n);u[0]+=a,this.onError(u,"BAD_DIRECTIVE",l,o)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{const a=jj(this.options,this.directives,n,this.onError);this.atDirectives&&!a.directives.docStart&&this.onError(n,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(a,!1),this.doc&&(yield this.doc),this.doc=a,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(n.source);break;case"error":{const a=n.source?`${n.message}: ${JSON.stringify(n.source)}`:n.message,l=new lo(Nl(n),"UNEXPECTED_TOKEN",a);this.atDirectives||!this.doc?this.errors.push(l):this.doc.errors.push(l);break}case"doc-end":{if(!this.doc){const l="Unexpected doc-end without preceding document";this.errors.push(new lo(Nl(n),"UNEXPECTED_TOKEN",l));break}this.doc.directives.docEnd=!0;const a=Bl(n.end,n.offset+n.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),a.comment){const l=this.doc.comment;this.doc.comment=l?`${l}
|
|
114
|
-
${a.comment}`:a.comment}this.doc.range[2]=a.offset;break}default:this.errors.push(new lo(Nl(n),"UNEXPECTED_TOKEN",`Unsupported token ${n.type}`))}}*end(n=!1,a=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(n){const l=Object.assign({_directives:this.directives},this.options),o=new Qo(void 0,l);this.atDirectives&&this.onError(a,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,a,a],this.decorate(o,!1),yield o}}}const Gv="\uFEFF",Kv="",Yv="",Xd="";function kj(t){switch(t){case Gv:return"byte-order-mark";case Kv:return"doc-mode";case Yv:return"flow-error-end";case Xd:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
115
|
-
`:case`\r
|
|
116
|
-
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function jn(t){switch(t){case void 0:case" ":case`
|
|
117
|
-
`:case"\r":case" ":return!0;default:return!1}}const oy=new Set("0123456789ABCDEFabcdef"),_j=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ro=new Set(",[]{}"),zj=new Set(` ,[]{}
|
|
118
|
-
\r `),Od=t=>!t||zj.has(t);class Cj{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(n,a=!1){if(n){if(typeof n!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+n:n,this.lineEndPos=null}this.atEnd=!a;let l=this.next??"stream";for(;l&&(a||this.hasChars(1));)l=yield*this.parseNext(l)}atLineEnd(){let n=this.pos,a=this.buffer[n];for(;a===" "||a===" ";)a=this.buffer[++n];return!a||a==="#"||a===`
|
|
119
|
-
`?!0:a==="\r"?this.buffer[n+1]===`
|
|
120
|
-
`:!1}charAt(n){return this.buffer[this.pos+n]}continueScalar(n){let a=this.buffer[n];if(this.indentNext>0){let l=0;for(;a===" ";)a=this.buffer[++l+n];if(a==="\r"){const o=this.buffer[l+n+1];if(o===`
|
|
121
|
-
`||!o&&!this.atEnd)return n+l+1}return a===`
|
|
122
|
-
`||l>=this.indentNext||!a&&!this.atEnd?n+l:-1}if(a==="-"||a==="."){const l=this.buffer.substr(n,3);if((l==="---"||l==="...")&&jn(this.buffer[n+3]))return-1}return n}getLine(){let n=this.lineEndPos;return(typeof n!="number"||n!==-1&&n<this.pos)&&(n=this.buffer.indexOf(`
|
|
123
|
-
`,this.pos),this.lineEndPos=n),n===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[n-1]==="\r"&&(n-=1),this.buffer.substring(this.pos,n))}hasChars(n){return this.pos+n<=this.buffer.length}setNext(n){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=n,null}peek(n){return this.buffer.substr(this.pos,n)}*parseNext(n){switch(n){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let n=this.getLine();if(n===null)return this.setNext("stream");if(n[0]===Gv&&(yield*this.pushCount(1),n=n.substring(1)),n[0]==="%"){let a=n.length,l=n.indexOf("#");for(;l!==-1;){const u=n[l-1];if(u===" "||u===" "){a=l-1;break}else l=n.indexOf("#",l+1)}for(;;){const u=n[a-1];if(u===" "||u===" ")a-=1;else break}const o=(yield*this.pushCount(a))+(yield*this.pushSpaces(!0));return yield*this.pushCount(n.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){const a=yield*this.pushSpaces(!0);return yield*this.pushCount(n.length-a),yield*this.pushNewline(),"stream"}return yield Kv,yield*this.parseLineStart()}*parseLineStart(){const n=this.charAt(0);if(!n&&!this.atEnd)return this.setNext("line-start");if(n==="-"||n==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const a=this.peek(3);if((a==="---"||a==="...")&&jn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,a==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!jn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[n,a]=this.peek(2);if(!a&&!this.atEnd)return this.setNext("block-start");if((n==="-"||n==="?"||n===":")&&jn(a)){const l=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=l,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const n=this.getLine();if(n===null)return this.setNext("doc");let a=yield*this.pushIndicators();switch(n[a]){case"#":yield*this.pushCount(n.length-a);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Od),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return a+=yield*this.parseBlockScalarHeader(),a+=yield*this.pushSpaces(!0),yield*this.pushCount(n.length-a),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,a,l=-1;do n=yield*this.pushNewline(),n>0?(a=yield*this.pushSpaces(!1),this.indentValue=l=a):a=0,a+=yield*this.pushSpaces(!0);while(n+a>0);const o=this.getLine();if(o===null)return this.setNext("flow");if((l!==-1&&l<this.indentNext&&o[0]!=="#"||l===0&&(o.startsWith("---")||o.startsWith("..."))&&jn(o[3]))&&!(l===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield Yv,yield*this.parseLineStart();let u=0;for(;o[u]===",";)u+=yield*this.pushCount(1),u+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(u+=yield*this.pushIndicators(),o[u]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-u),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Od),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const d=this.charAt(1);if(this.flowKey||jn(d)||d===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const n=this.charAt(0);let a=this.buffer.indexOf(n,this.pos+1);if(n==="'")for(;a!==-1&&this.buffer[a+1]==="'";)a=this.buffer.indexOf("'",a+2);else for(;a!==-1;){let u=0;for(;this.buffer[a-1-u]==="\\";)u+=1;if(u%2===0)break;a=this.buffer.indexOf('"',a+1)}const l=this.buffer.substring(0,a);let o=l.indexOf(`
|
|
124
|
-
`,this.pos);if(o!==-1){for(;o!==-1;){const u=this.continueScalar(o+1);if(u===-1)break;o=l.indexOf(`
|
|
125
|
-
`,u)}o!==-1&&(a=o-(l[o-1]==="\r"?2:1))}if(a===-1){if(!this.atEnd)return this.setNext("quoted-scalar");a=this.buffer.length}return yield*this.pushToIndex(a+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let n=this.pos;for(;;){const a=this.buffer[++n];if(a==="+")this.blockScalarKeep=!0;else if(a>"0"&&a<="9")this.blockScalarIndent=Number(a)-1;else if(a!=="-")break}return yield*this.pushUntil(a=>jn(a)||a==="#")}*parseBlockScalar(){let n=this.pos-1,a=0,l;e:for(let u=this.pos;l=this.buffer[u];++u)switch(l){case" ":a+=1;break;case`
|
|
126
|
-
`:n=u,a=0;break;case"\r":{const d=this.buffer[u+1];if(!d&&!this.atEnd)return this.setNext("block-scalar");if(d===`
|
|
127
|
-
`)break}default:break e}if(!l&&!this.atEnd)return this.setNext("block-scalar");if(a>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=a:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const u=this.continueScalar(n+1);if(u===-1)break;n=this.buffer.indexOf(`
|
|
128
|
-
`,u)}while(n!==-1);if(n===-1){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let o=n+1;for(l=this.buffer[o];l===" ";)l=this.buffer[++o];if(l===" "){for(;l===" "||l===" "||l==="\r"||l===`
|
|
129
|
-
`;)l=this.buffer[++o];n=o-1}else if(!this.blockScalarKeep)do{let u=n-1,d=this.buffer[u];d==="\r"&&(d=this.buffer[--u]);const m=u;for(;d===" ";)d=this.buffer[--u];if(d===`
|
|
130
|
-
`&&u>=this.pos&&u+1+a>m)n=u;else break}while(!0);return yield Xd,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let a=this.pos-1,l=this.pos-1,o;for(;o=this.buffer[++l];)if(o===":"){const u=this.buffer[l+1];if(jn(u)||n&&ro.has(u))break;a=l}else if(jn(o)){let u=this.buffer[l+1];if(o==="\r"&&(u===`
|
|
131
|
-
`?(l+=1,o=`
|
|
132
|
-
`,u=this.buffer[l+1]):a=l),u==="#"||n&&ro.has(u))break;if(o===`
|
|
133
|
-
`){const d=this.continueScalar(l+1);if(d===-1)break;l=Math.max(l,d-2)}}else{if(n&&ro.has(o))break;a=l}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield Xd,yield*this.pushToIndex(a+1,!0),n?"flow":"doc")}*pushCount(n){return n>0?(yield this.buffer.substr(this.pos,n),this.pos+=n,n):0}*pushToIndex(n,a){const l=this.buffer.slice(this.pos,n);return l?(yield l,this.pos+=l.length,l.length):(a&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Od))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const n=this.flowLevel>0,a=this.charAt(1);if(jn(a)||n&&ro.has(a))return n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let n=this.pos+2,a=this.buffer[n];for(;!jn(a)&&a!==">";)a=this.buffer[++n];return yield*this.pushToIndex(a===">"?n+1:n,!1)}else{let n=this.pos+1,a=this.buffer[n];for(;a;)if(_j.has(a))a=this.buffer[++n];else if(a==="%"&&oy.has(this.buffer[n+1])&&oy.has(this.buffer[n+2]))a=this.buffer[n+=3];else break;return yield*this.pushToIndex(n,!1)}}*pushNewline(){const n=this.buffer[this.pos];return n===`
|
|
134
|
-
`?yield*this.pushCount(1):n==="\r"&&this.charAt(1)===`
|
|
135
|
-
`?yield*this.pushCount(2):0}*pushSpaces(n){let a=this.pos-1,l;do l=this.buffer[++a];while(l===" "||n&&l===" ");const o=a-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=a),o}*pushUntil(n){let a=this.pos,l=this.buffer[a];for(;!n(l);)l=this.buffer[++a];return yield*this.pushToIndex(a,!1)}}class Ej{constructor(){this.lineStarts=[],this.addNewLine=n=>this.lineStarts.push(n),this.linePos=n=>{let a=0,l=this.lineStarts.length;for(;a<l;){const u=a+l>>1;this.lineStarts[u]<n?a=u+1:l=u}if(this.lineStarts[a]===n)return{line:a+1,col:1};if(a===0)return{line:0,col:n};const o=this.lineStarts[a-1];return{line:a,col:n-o+1}}}}function Di(t,n){for(let a=0;a<t.length;++a)if(t[a].type===n)return!0;return!1}function cy(t){for(let n=0;n<t.length;++n)switch(t[n].type){case"space":case"comment":case"newline":break;default:return n}return-1}function Vv(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function oo(t){switch(t.type){case"document":return t.start;case"block-map":{const n=t.items[t.items.length-1];return n.sep??n.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function rs(t){if(t.length===0)return[];let n=t.length;e:for(;--n>=0;)switch(t[n].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++n]?.type==="space";);return t.splice(n,t.length)}function uy(t){if(t.start.type==="flow-seq-start")for(const n of t.items)n.sep&&!n.value&&!Di(n.start,"explicit-key-ind")&&!Di(n.sep,"map-value-ind")&&(n.key&&(n.value=n.key),delete n.key,Vv(n.value)?n.value.end?Array.prototype.push.apply(n.value.end,n.sep):n.value.end=n.sep:Array.prototype.push.apply(n.start,n.sep),delete n.sep)}class Aj{constructor(n){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Cj,this.onNewLine=n}*parse(n,a=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const l of this.lexer.lex(n,a))yield*this.next(l);a||(yield*this.end())}*next(n){if(this.source=n,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=n.length;return}const a=kj(n);if(a)if(a==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=a,yield*this.step(),a){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&n[0]===" "&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const l=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:l,source:n}),this.offset+=n.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const n=this.peek(1);if(this.type==="doc-end"&&n?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!n)return yield*this.stream();switch(n.type){case"document":return yield*this.document(n);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(n);case"block-scalar":return yield*this.blockScalar(n);case"block-map":return yield*this.blockMap(n);case"block-seq":return yield*this.blockSequence(n);case"flow-collection":return yield*this.flowCollection(n);case"doc-end":return yield*this.documentEnd(n)}yield*this.pop()}peek(n){return this.stack[this.stack.length-n]}*pop(n){const a=n??this.stack.pop();if(!a)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield a;else{const l=this.peek(1);switch(a.type==="block-scalar"?a.indent="indent"in l?l.indent:0:a.type==="flow-collection"&&l.type==="document"&&(a.indent=0),a.type==="flow-collection"&&uy(a),l.type){case"document":l.value=a;break;case"block-scalar":l.props.push(a);break;case"block-map":{const o=l.items[l.items.length-1];if(o.value){l.items.push({start:[],key:a,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=a;else{Object.assign(o,{key:a,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{const o=l.items[l.items.length-1];o.value?l.items.push({start:[],value:a}):o.value=a;break}case"flow-collection":{const o=l.items[l.items.length-1];!o||o.value?l.items.push({start:[],key:a,sep:[]}):o.sep?o.value=a:Object.assign(o,{key:a,sep:[]});return}default:yield*this.pop(),yield*this.pop(a)}if((l.type==="document"||l.type==="block-map"||l.type==="block-seq")&&(a.type==="block-map"||a.type==="block-seq")){const o=a.items[a.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&cy(o.start)===-1&&(a.indent===0||o.start.every(u=>u.type!=="comment"||u.indent<a.indent))&&(l.type==="document"?l.end=o.start:l.items.push({start:o.start}),a.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const n={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&n.start.push(this.sourceToken),this.stack.push(n);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(n){if(n.value)return yield*this.lineEnd(n);switch(this.type){case"doc-start":{cy(n.start)!==-1?(yield*this.pop(),yield*this.step()):n.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":n.start.push(this.sourceToken);return}const a=this.startBlockValue(n);a?this.stack.push(a):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(n){if(this.type==="map-value-ind"){const a=oo(this.peek(2)),l=rs(a);let o;n.end?(o=n.end,o.push(this.sourceToken),delete n.end):o=[this.sourceToken];const u={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:l,key:n,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(n)}*blockScalar(n){switch(this.type){case"space":case"comment":case"newline":n.props.push(this.sourceToken);return;case"scalar":if(n.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let a=this.source.indexOf(`
|
|
136
|
-
`)+1;for(;a!==0;)this.onNewLine(this.offset+a),a=this.source.indexOf(`
|
|
137
|
-
`,a)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(n){const a=n.items[n.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,a.value){const l="end"in a.value?a.value.end:void 0;(Array.isArray(l)?l[l.length-1]:void 0)?.type==="comment"?l?.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else a.sep?a.sep.push(this.sourceToken):a.start.push(this.sourceToken);return;case"space":case"comment":if(a.value)n.items.push({start:[this.sourceToken]});else if(a.sep)a.sep.push(this.sourceToken);else{if(this.atIndentedComment(a.start,n.indent)){const o=n.items[n.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,a.start),o.push(this.sourceToken),n.items.pop();return}}a.start.push(this.sourceToken)}return}if(this.indent>=n.indent){const l=!this.onKeyLine&&this.indent===n.indent,o=l&&(a.sep||a.explicitKey)&&this.type!=="seq-item-ind";let u=[];if(o&&a.sep&&!a.value){const d=[];for(let m=0;m<a.sep.length;++m){const g=a.sep[m];switch(g.type){case"newline":d.push(m);break;case"space":break;case"comment":g.indent>n.indent&&(d.length=0);break;default:d.length=0}}d.length>=2&&(u=a.sep.splice(d[1]))}switch(this.type){case"anchor":case"tag":o||a.value?(u.push(this.sourceToken),n.items.push({start:u}),this.onKeyLine=!0):a.sep?a.sep.push(this.sourceToken):a.start.push(this.sourceToken);return;case"explicit-key-ind":!a.sep&&!a.explicitKey?(a.start.push(this.sourceToken),a.explicitKey=!0):o||a.value?(u.push(this.sourceToken),n.items.push({start:u,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(a.explicitKey)if(a.sep)if(a.value)n.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Di(a.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]});else if(Vv(a.key)&&!Di(a.sep,"newline")){const d=rs(a.start),m=a.key,g=a.sep;g.push(this.sourceToken),delete a.key,delete a.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:m,sep:g}]})}else u.length>0?a.sep=a.sep.concat(u,this.sourceToken):a.sep.push(this.sourceToken);else if(Di(a.start,"newline"))Object.assign(a,{key:null,sep:[this.sourceToken]});else{const d=rs(a.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:null,sep:[this.sourceToken]}]})}else a.sep?a.value||o?n.items.push({start:u,key:null,sep:[this.sourceToken]}):Di(a.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):a.sep.push(this.sourceToken):Object.assign(a,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const d=this.flowScalar(this.type);o||a.value?(n.items.push({start:u,key:d,sep:[]}),this.onKeyLine=!0):a.sep?this.stack.push(d):(Object.assign(a,{key:d,sep:[]}),this.onKeyLine=!0);return}default:{const d=this.startBlockValue(n);if(d){if(d.type==="block-seq"){if(!a.explicitKey&&a.sep&&!Di(a.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else l&&n.items.push({start:u});this.stack.push(d);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(n){const a=n.items[n.items.length-1];switch(this.type){case"newline":if(a.value){const l="end"in a.value?a.value.end:void 0;(Array.isArray(l)?l[l.length-1]:void 0)?.type==="comment"?l?.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else a.start.push(this.sourceToken);return;case"space":case"comment":if(a.value)n.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(a.start,n.indent)){const o=n.items[n.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,a.start),o.push(this.sourceToken),n.items.pop();return}}a.start.push(this.sourceToken)}return;case"anchor":case"tag":if(a.value||this.indent<=n.indent)break;a.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==n.indent)break;a.value||Di(a.start,"seq-item-ind")?n.items.push({start:[this.sourceToken]}):a.start.push(this.sourceToken);return}if(this.indent>n.indent){const l=this.startBlockValue(n);if(l){this.stack.push(l);return}}yield*this.pop(),yield*this.step()}*flowCollection(n){const a=n.items[n.items.length-1];if(this.type==="flow-error-end"){let l;do yield*this.pop(),l=this.peek(1);while(l?.type==="flow-collection")}else if(n.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!a||a.sep?n.items.push({start:[this.sourceToken]}):a.start.push(this.sourceToken);return;case"map-value-ind":!a||a.value?n.items.push({start:[],key:null,sep:[this.sourceToken]}):a.sep?a.sep.push(this.sourceToken):Object.assign(a,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!a||a.value?n.items.push({start:[this.sourceToken]}):a.sep?a.sep.push(this.sourceToken):a.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);!a||a.value?n.items.push({start:[],key:o,sep:[]}):a.sep?this.stack.push(o):Object.assign(a,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":n.end.push(this.sourceToken);return}const l=this.startBlockValue(n);l?this.stack.push(l):(yield*this.pop(),yield*this.step())}else{const l=this.peek(2);if(l.type==="block-map"&&(this.type==="map-value-ind"&&l.indent===n.indent||this.type==="newline"&&!l.items[l.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&l.type!=="flow-collection"){const o=oo(l),u=rs(o);uy(n);const d=n.end.splice(1,n.end.length);d.push(this.sourceToken);const m={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:u,key:n,sep:d}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=m}else yield*this.lineEnd(n)}}flowScalar(n){if(this.onNewLine){let a=this.source.indexOf(`
|
|
138
|
-
`)+1;for(;a!==0;)this.onNewLine(this.offset+a),a=this.source.indexOf(`
|
|
139
|
-
`,a)+1}return{type:n,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(n){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const a=oo(n),l=rs(a);return l.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const a=oo(n),l=rs(a);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,a){return this.type!=="comment"||this.indent<=a?!1:n.every(l=>l.type==="newline"||l.type==="space")}*documentEnd(n){this.type!=="doc-mode"&&(n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(n){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Oj(t){const n=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||n&&new Ej||null,prettyErrors:n}}function Tj(t,n={}){const{lineCounter:a,prettyErrors:l}=Oj(n),o=new Aj(a?.addNewLine),u=new Nj(n),d=Array.from(u.compose(o.parse(t)));if(l&&a)for(const m of d)m.errors.forEach(sy(t,a)),m.warnings.forEach(sy(t,a));return d.length>0?d:Object.assign([],{empty:!0},u.streamInfo())}function Ui(t,n,{checkForDefaultPrevented:a=!0}={}){return function(o){if(t?.(o),a===!1||!o.defaultPrevented)return n?.(o)}}function dy(t,n){if(typeof t=="function")return t(n);t!=null&&(t.current=n)}function kf(...t){return n=>{let a=!1;const l=t.map(o=>{const u=dy(o,n);return!a&&typeof u=="function"&&(a=!0),u});if(a)return()=>{for(let o=0;o<l.length;o++){const u=l[o];typeof u=="function"?u():dy(t[o],null)}}}}function ya(...t){return w.useCallback(kf(...t),t)}function Dj(t,n){const a=w.createContext(n),l=u=>{const{children:d,...m}=u,g=w.useMemo(()=>m,Object.values(m));return c.jsx(a.Provider,{value:g,children:d})};l.displayName=t+"Provider";function o(u){const d=w.useContext(a);if(d)return d;if(n!==void 0)return n;throw new Error(`\`${u}\` must be used within \`${t}\``)}return[l,o]}function Rj(t,n=[]){let a=[];function l(u,d){const m=w.createContext(d),g=a.length;a=[...a,d];const p=v=>{const{scope:x,children:N,...z}=v,j=x?.[t]?.[g]||m,k=w.useMemo(()=>z,Object.values(z));return c.jsx(j.Provider,{value:k,children:N})};p.displayName=u+"Provider";function b(v,x){const N=x?.[t]?.[g]||m,z=w.useContext(N);if(z)return z;if(d!==void 0)return d;throw new Error(`\`${v}\` must be used within \`${u}\``)}return[p,b]}const o=()=>{const u=a.map(d=>w.createContext(d));return function(m){const g=m?.[t]||u;return w.useMemo(()=>({[`__scope${t}`]:{...m,[t]:g}}),[m,g])}};return o.scopeName=t,[l,Mj(o,...n)]}function Mj(...t){const n=t[0];if(t.length===1)return n;const a=()=>{const l=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(u){const d=l.reduce((m,{useScope:g,scopeName:p})=>{const v=g(u)[`__scope${p}`];return{...m,...v}},{});return w.useMemo(()=>({[`__scope${n.scopeName}`]:d}),[d])}};return a.scopeName=n.scopeName,a}var Tl=globalThis?.document?w.useLayoutEffect:()=>{},Lj=cf[" useId ".trim().toString()]||(()=>{}),Uj=0;function Td(t){const[n,a]=w.useState(Lj());return Tl(()=>{a(l=>l??String(Uj++))},[t]),t||(n?`radix-${n}`:"")}var $j=cf[" useInsertionEffect ".trim().toString()]||Tl;function Bj({prop:t,defaultProp:n,onChange:a=()=>{},caller:l}){const[o,u,d]=Zj({defaultProp:n,onChange:a}),m=t!==void 0,g=m?t:o;{const b=w.useRef(t!==void 0);w.useEffect(()=>{const v=b.current;v!==m&&console.warn(`${l} is changing from ${v?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),b.current=m},[m,l])}const p=w.useCallback(b=>{if(m){const v=qj(b)?b(t):b;v!==t&&d.current?.(v)}else u(b)},[m,t,u,d]);return[g,p]}function Zj({defaultProp:t,onChange:n}){const[a,l]=w.useState(t),o=w.useRef(a),u=w.useRef(n);return $j(()=>{u.current=n},[n]),w.useEffect(()=>{o.current!==a&&(u.current?.(a),o.current=a)},[a,o]),[a,l,u]}function qj(t){return typeof t=="function"}var Pv=dv();const Hj=uv(Pv);function Qv(t){const n=Ij(t),a=w.forwardRef((l,o)=>{const{children:u,...d}=l,m=w.Children.toArray(u),g=m.find(Kj);if(g){const p=g.props.children,b=m.map(v=>v===g?w.Children.count(p)>1?w.Children.only(null):w.isValidElement(p)?p.props.children:null:v);return c.jsx(n,{...d,ref:o,children:w.isValidElement(p)?w.cloneElement(p,void 0,b):null})}return c.jsx(n,{...d,ref:o,children:u})});return a.displayName=`${t}.Slot`,a}function Ij(t){const n=w.forwardRef((a,l)=>{const{children:o,...u}=a;if(w.isValidElement(o)){const d=Vj(o),m=Yj(u,o.props);return o.type!==w.Fragment&&(m.ref=l?kf(l,d):d),w.cloneElement(o,m)}return w.Children.count(o)>1?w.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var Gj=Symbol("radix.slottable");function Kj(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Gj}function Yj(t,n){const a={...n};for(const l in n){const o=t[l],u=n[l];/^on[A-Z]/.test(l)?o&&u?a[l]=(...m)=>{const g=u(...m);return o(...m),g}:o&&(a[l]=o):l==="style"?a[l]={...o,...u}:l==="className"&&(a[l]=[o,u].filter(Boolean).join(" "))}return{...t,...a}}function Vj(t){let n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?t.ref:(n=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var Pj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ai=Pj.reduce((t,n)=>{const a=Qv(`Primitive.${n}`),l=w.forwardRef((o,u)=>{const{asChild:d,...m}=o,g=d?a:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(g,{...m,ref:u})});return l.displayName=`Primitive.${n}`,{...t,[n]:l}},{});function Qj(t,n){t&&Pv.flushSync(()=>t.dispatchEvent(n))}function Dl(t){const n=w.useRef(t);return w.useEffect(()=>{n.current=t}),w.useMemo(()=>(...a)=>n.current?.(...a),[])}function Xj(t,n=globalThis?.document){const a=Dl(t);w.useEffect(()=>{const l=o=>{o.key==="Escape"&&a(o)};return n.addEventListener("keydown",l,{capture:!0}),()=>n.removeEventListener("keydown",l,{capture:!0})},[a,n])}var Jj="DismissableLayer",Jd="dismissableLayer.update",Fj="dismissableLayer.pointerDownOutside",Wj="dismissableLayer.focusOutside",fy,Xv=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jv=w.forwardRef((t,n)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:l,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:d,onDismiss:m,...g}=t,p=w.useContext(Xv),[b,v]=w.useState(null),x=b?.ownerDocument??globalThis?.document,[,N]=w.useState({}),z=ya(n,K=>v(K)),j=Array.from(p.layers),[k]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),A=j.indexOf(k),T=b?j.indexOf(b):-1,O=p.layersWithOutsidePointerEventsDisabled.size>0,R=T>=A,L=n1(K=>{const D=K.target,P=[...p.branches].some(xe=>xe.contains(D));!R||P||(o?.(K),d?.(K),K.defaultPrevented||m?.())},x),H=i1(K=>{const D=K.target;[...p.branches].some(xe=>xe.contains(D))||(u?.(K),d?.(K),K.defaultPrevented||m?.())},x);return Xj(K=>{T===p.layers.size-1&&(l?.(K),!K.defaultPrevented&&m&&(K.preventDefault(),m()))},x),w.useEffect(()=>{if(b)return a&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(fy=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(b)),p.layers.add(b),hy(),()=>{a&&p.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=fy)}},[b,x,a,p]),w.useEffect(()=>()=>{b&&(p.layers.delete(b),p.layersWithOutsidePointerEventsDisabled.delete(b),hy())},[b,p]),w.useEffect(()=>{const K=()=>N({});return document.addEventListener(Jd,K),()=>document.removeEventListener(Jd,K)},[]),c.jsx(ai.div,{...g,ref:z,style:{pointerEvents:O?R?"auto":"none":void 0,...t.style},onFocusCapture:Ui(t.onFocusCapture,H.onFocusCapture),onBlurCapture:Ui(t.onBlurCapture,H.onBlurCapture),onPointerDownCapture:Ui(t.onPointerDownCapture,L.onPointerDownCapture)})});Jv.displayName=Jj;var e1="DismissableLayerBranch",t1=w.forwardRef((t,n)=>{const a=w.useContext(Xv),l=w.useRef(null),o=ya(n,l);return w.useEffect(()=>{const u=l.current;if(u)return a.branches.add(u),()=>{a.branches.delete(u)}},[a.branches]),c.jsx(ai.div,{...t,ref:o})});t1.displayName=e1;function n1(t,n=globalThis?.document){const a=Dl(t),l=w.useRef(!1),o=w.useRef(()=>{});return w.useEffect(()=>{const u=m=>{if(m.target&&!l.current){let g=function(){Fv(Fj,a,p,{discrete:!0})};const p={originalEvent:m};m.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=g,n.addEventListener("click",o.current,{once:!0})):g()}else n.removeEventListener("click",o.current);l.current=!1},d=window.setTimeout(()=>{n.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),n.removeEventListener("pointerdown",u),n.removeEventListener("click",o.current)}},[n,a]),{onPointerDownCapture:()=>l.current=!0}}function i1(t,n=globalThis?.document){const a=Dl(t),l=w.useRef(!1);return w.useEffect(()=>{const o=u=>{u.target&&!l.current&&Fv(Wj,a,{originalEvent:u},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,a]),{onFocusCapture:()=>l.current=!0,onBlurCapture:()=>l.current=!1}}function hy(){const t=new CustomEvent(Jd);document.dispatchEvent(t)}function Fv(t,n,a,{discrete:l}){const o=a.originalEvent.target,u=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:a});n&&o.addEventListener(t,n,{once:!0}),l?Qj(o,u):o.dispatchEvent(u)}var Dd="focusScope.autoFocusOnMount",Rd="focusScope.autoFocusOnUnmount",my={bubbles:!1,cancelable:!0},a1="FocusScope",Wv=w.forwardRef((t,n)=>{const{loop:a=!1,trapped:l=!1,onMountAutoFocus:o,onUnmountAutoFocus:u,...d}=t,[m,g]=w.useState(null),p=Dl(o),b=Dl(u),v=w.useRef(null),x=ya(n,j=>g(j)),N=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(l){let j=function(O){if(N.paused||!m)return;const R=O.target;m.contains(R)?v.current=R:Ti(v.current,{select:!0})},k=function(O){if(N.paused||!m)return;const R=O.relatedTarget;R!==null&&(m.contains(R)||Ti(v.current,{select:!0}))},A=function(O){if(document.activeElement===document.body)for(const L of O)L.removedNodes.length>0&&Ti(m)};document.addEventListener("focusin",j),document.addEventListener("focusout",k);const T=new MutationObserver(A);return m&&T.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",j),document.removeEventListener("focusout",k),T.disconnect()}}},[l,m,N.paused]),w.useEffect(()=>{if(m){gy.add(N);const j=document.activeElement;if(!m.contains(j)){const A=new CustomEvent(Dd,my);m.addEventListener(Dd,p),m.dispatchEvent(A),A.defaultPrevented||(s1(u1(e0(m)),{select:!0}),document.activeElement===j&&Ti(m))}return()=>{m.removeEventListener(Dd,p),setTimeout(()=>{const A=new CustomEvent(Rd,my);m.addEventListener(Rd,b),m.dispatchEvent(A),A.defaultPrevented||Ti(j??document.body,{select:!0}),m.removeEventListener(Rd,b),gy.remove(N)},0)}}},[m,p,b,N]);const z=w.useCallback(j=>{if(!a&&!l||N.paused)return;const k=j.key==="Tab"&&!j.altKey&&!j.ctrlKey&&!j.metaKey,A=document.activeElement;if(k&&A){const T=j.currentTarget,[O,R]=l1(T);O&&R?!j.shiftKey&&A===R?(j.preventDefault(),a&&Ti(O,{select:!0})):j.shiftKey&&A===O&&(j.preventDefault(),a&&Ti(R,{select:!0})):A===T&&j.preventDefault()}},[a,l,N.paused]);return c.jsx(ai.div,{tabIndex:-1,...d,ref:x,onKeyDown:z})});Wv.displayName=a1;function s1(t,{select:n=!1}={}){const a=document.activeElement;for(const l of t)if(Ti(l,{select:n}),document.activeElement!==a)return}function l1(t){const n=e0(t),a=py(n,t),l=py(n.reverse(),t);return[a,l]}function e0(t){const n=[],a=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:l=>{const o=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||o?NodeFilter.FILTER_SKIP:l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)n.push(a.currentNode);return n}function py(t,n){for(const a of t)if(!r1(a,{upTo:n}))return a}function r1(t,{upTo:n}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(n!==void 0&&t===n)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function o1(t){return t instanceof HTMLInputElement&&"select"in t}function Ti(t,{select:n=!1}={}){if(t&&t.focus){const a=document.activeElement;t.focus({preventScroll:!0}),t!==a&&o1(t)&&n&&t.select()}}var gy=c1();function c1(){let t=[];return{add(n){const a=t[0];n!==a&&a?.pause(),t=yy(t,n),t.unshift(n)},remove(n){t=yy(t,n),t[0]?.resume()}}}function yy(t,n){const a=[...t],l=a.indexOf(n);return l!==-1&&a.splice(l,1),a}function u1(t){return t.filter(n=>n.tagName!=="A")}var d1="Portal",t0=w.forwardRef((t,n)=>{const{container:a,...l}=t,[o,u]=w.useState(!1);Tl(()=>u(!0),[]);const d=a||o&&globalThis?.document?.body;return d?Hj.createPortal(c.jsx(ai.div,{...l,ref:n}),d):null});t0.displayName=d1;function f1(t,n){return w.useReducer((a,l)=>n[a][l]??a,t)}var Xo=t=>{const{present:n,children:a}=t,l=h1(n),o=typeof a=="function"?a({present:l.isPresent}):w.Children.only(a),u=ya(l.ref,m1(o));return typeof a=="function"||l.isPresent?w.cloneElement(o,{ref:u}):null};Xo.displayName="Presence";function h1(t){const[n,a]=w.useState(),l=w.useRef(null),o=w.useRef(t),u=w.useRef("none"),d=t?"mounted":"unmounted",[m,g]=f1(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const p=co(l.current);u.current=m==="mounted"?p:"none"},[m]),Tl(()=>{const p=l.current,b=o.current;if(b!==t){const x=u.current,N=co(p);t?g("MOUNT"):N==="none"||p?.display==="none"?g("UNMOUNT"):g(b&&x!==N?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,g]),Tl(()=>{if(n){let p;const b=n.ownerDocument.defaultView??window,v=N=>{const j=co(l.current).includes(CSS.escape(N.animationName));if(N.target===n&&j&&(g("ANIMATION_END"),!o.current)){const k=n.style.animationFillMode;n.style.animationFillMode="forwards",p=b.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=k)})}},x=N=>{N.target===n&&(u.current=co(l.current))};return n.addEventListener("animationstart",x),n.addEventListener("animationcancel",v),n.addEventListener("animationend",v),()=>{b.clearTimeout(p),n.removeEventListener("animationstart",x),n.removeEventListener("animationcancel",v),n.removeEventListener("animationend",v)}}else g("ANIMATION_END")},[n,g]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:w.useCallback(p=>{l.current=p?getComputedStyle(p):null,a(p)},[])}}function co(t){return t?.animationName||"none"}function m1(t){let n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?t.ref:(n=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var Md=0;function p1(){w.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??vy()),document.body.insertAdjacentElement("beforeend",t[1]??vy()),Md++,()=>{Md===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Md--}},[])}function vy(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Rn=function(){return Rn=Object.assign||function(n){for(var a,l=1,o=arguments.length;l<o;l++){a=arguments[l];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(n[u]=a[u])}return n},Rn.apply(this,arguments)};function n0(t,n){var a={};for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&n.indexOf(l)<0&&(a[l]=t[l]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,l=Object.getOwnPropertySymbols(t);o<l.length;o++)n.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(t,l[o])&&(a[l[o]]=t[l[o]]);return a}function g1(t,n,a){if(a||arguments.length===2)for(var l=0,o=n.length,u;l<o;l++)(u||!(l in n))&&(u||(u=Array.prototype.slice.call(n,0,l)),u[l]=n[l]);return t.concat(u||Array.prototype.slice.call(n))}var ko="right-scroll-bar-position",_o="width-before-scroll-bar",y1="with-scroll-bars-hidden",v1="--removed-body-scroll-bar-size";function Ld(t,n){return typeof t=="function"?t(n):t&&(t.current=n),t}function b1(t,n){var a=w.useState(function(){return{value:t,callback:n,facade:{get current(){return a.value},set current(l){var o=a.value;o!==l&&(a.value=l,a.callback(l,o))}}}})[0];return a.callback=n,a.facade}var x1=typeof window<"u"?w.useLayoutEffect:w.useEffect,by=new WeakMap;function S1(t,n){var a=b1(null,function(l){return t.forEach(function(o){return Ld(o,l)})});return x1(function(){var l=by.get(a);if(l){var o=new Set(l),u=new Set(t),d=a.current;o.forEach(function(m){u.has(m)||Ld(m,null)}),u.forEach(function(m){o.has(m)||Ld(m,d)})}by.set(a,t)},[t]),a}function w1(t){return t}function j1(t,n){n===void 0&&(n=w1);var a=[],l=!1,o={read:function(){if(l)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:t},useMedium:function(u){var d=n(u,l);return a.push(d),function(){a=a.filter(function(m){return m!==d})}},assignSyncMedium:function(u){for(l=!0;a.length;){var d=a;a=[],d.forEach(u)}a={push:function(m){return u(m)},filter:function(){return a}}},assignMedium:function(u){l=!0;var d=[];if(a.length){var m=a;a=[],m.forEach(u),d=a}var g=function(){var b=d;d=[],b.forEach(u)},p=function(){return Promise.resolve().then(g)};p(),a={push:function(b){d.push(b),p()},filter:function(b){return d=d.filter(b),a}}}};return o}function N1(t){t===void 0&&(t={});var n=j1(null);return n.options=Rn({async:!0,ssr:!1},t),n}var i0=function(t){var n=t.sideCar,a=n0(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var l=n.read();if(!l)throw new Error("Sidecar medium not found");return w.createElement(l,Rn({},a))};i0.isSideCarExport=!0;function k1(t,n){return t.useMedium(n),i0}var a0=N1(),Ud=function(){},Jo=w.forwardRef(function(t,n){var a=w.useRef(null),l=w.useState({onScrollCapture:Ud,onWheelCapture:Ud,onTouchMoveCapture:Ud}),o=l[0],u=l[1],d=t.forwardProps,m=t.children,g=t.className,p=t.removeScrollBar,b=t.enabled,v=t.shards,x=t.sideCar,N=t.noRelative,z=t.noIsolation,j=t.inert,k=t.allowPinchZoom,A=t.as,T=A===void 0?"div":A,O=t.gapMode,R=n0(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=x,H=S1([a,n]),K=Rn(Rn({},R),o);return w.createElement(w.Fragment,null,b&&w.createElement(L,{sideCar:a0,removeScrollBar:p,shards:v,noRelative:N,noIsolation:z,inert:j,setCallbacks:u,allowPinchZoom:!!k,lockRef:a,gapMode:O}),d?w.cloneElement(w.Children.only(m),Rn(Rn({},K),{ref:H})):w.createElement(T,Rn({},K,{className:g,ref:H}),m))});Jo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Jo.classNames={fullWidth:_o,zeroRight:ko};var _1=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function z1(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var n=_1();return n&&t.setAttribute("nonce",n),t}function C1(t,n){t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n))}function E1(t){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(t)}var A1=function(){var t=0,n=null;return{add:function(a){t==0&&(n=z1())&&(C1(n,a),E1(n)),t++},remove:function(){t--,!t&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},O1=function(){var t=A1();return function(n,a){w.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&a])}},s0=function(){var t=O1(),n=function(a){var l=a.styles,o=a.dynamic;return t(l,o),null};return n},T1={left:0,top:0,right:0,gap:0},$d=function(t){return parseInt(t||"",10)||0},D1=function(t){var n=window.getComputedStyle(document.body),a=n[t==="padding"?"paddingLeft":"marginLeft"],l=n[t==="padding"?"paddingTop":"marginTop"],o=n[t==="padding"?"paddingRight":"marginRight"];return[$d(a),$d(l),$d(o)]},R1=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return T1;var n=D1(t),a=document.documentElement.clientWidth,l=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,l-a+n[2]-n[0])}},M1=s0(),vs="data-scroll-locked",L1=function(t,n,a,l){var o=t.left,u=t.top,d=t.right,m=t.gap;return a===void 0&&(a="margin"),`
|
|
140
|
-
.`.concat(y1,` {
|
|
141
|
-
overflow: hidden `).concat(l,`;
|
|
142
|
-
padding-right: `).concat(m,"px ").concat(l,`;
|
|
143
|
-
}
|
|
144
|
-
body[`).concat(vs,`] {
|
|
145
|
-
overflow: hidden `).concat(l,`;
|
|
146
|
-
overscroll-behavior: contain;
|
|
147
|
-
`).concat([n&&"position: relative ".concat(l,";"),a==="margin"&&`
|
|
148
|
-
padding-left: `.concat(o,`px;
|
|
149
|
-
padding-top: `).concat(u,`px;
|
|
150
|
-
padding-right: `).concat(d,`px;
|
|
151
|
-
margin-left:0;
|
|
152
|
-
margin-top:0;
|
|
153
|
-
margin-right: `).concat(m,"px ").concat(l,`;
|
|
154
|
-
`),a==="padding"&&"padding-right: ".concat(m,"px ").concat(l,";")].filter(Boolean).join(""),`
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.`).concat(ko,` {
|
|
158
|
-
right: `).concat(m,"px ").concat(l,`;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.`).concat(_o,` {
|
|
162
|
-
margin-right: `).concat(m,"px ").concat(l,`;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.`).concat(ko," .").concat(ko,` {
|
|
166
|
-
right: 0 `).concat(l,`;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.`).concat(_o," .").concat(_o,` {
|
|
170
|
-
margin-right: 0 `).concat(l,`;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
body[`).concat(vs,`] {
|
|
174
|
-
`).concat(v1,": ").concat(m,`px;
|
|
175
|
-
}
|
|
176
|
-
`)},xy=function(){var t=parseInt(document.body.getAttribute(vs)||"0",10);return isFinite(t)?t:0},U1=function(){w.useEffect(function(){return document.body.setAttribute(vs,(xy()+1).toString()),function(){var t=xy()-1;t<=0?document.body.removeAttribute(vs):document.body.setAttribute(vs,t.toString())}},[])},$1=function(t){var n=t.noRelative,a=t.noImportant,l=t.gapMode,o=l===void 0?"margin":l;U1();var u=w.useMemo(function(){return R1(o)},[o]);return w.createElement(M1,{styles:L1(u,!n,o,a?"":"!important")})},Fd=!1;if(typeof window<"u")try{var uo=Object.defineProperty({},"passive",{get:function(){return Fd=!0,!0}});window.addEventListener("test",uo,uo),window.removeEventListener("test",uo,uo)}catch{Fd=!1}var os=Fd?{passive:!1}:!1,B1=function(t){return t.tagName==="TEXTAREA"},l0=function(t,n){if(!(t instanceof Element))return!1;var a=window.getComputedStyle(t);return a[n]!=="hidden"&&!(a.overflowY===a.overflowX&&!B1(t)&&a[n]==="visible")},Z1=function(t){return l0(t,"overflowY")},q1=function(t){return l0(t,"overflowX")},Sy=function(t,n){var a=n.ownerDocument,l=n;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var o=r0(t,l);if(o){var u=o0(t,l),d=u[1],m=u[2];if(d>m)return!0}l=l.parentNode}while(l&&l!==a.body);return!1},H1=function(t){var n=t.scrollTop,a=t.scrollHeight,l=t.clientHeight;return[n,a,l]},I1=function(t){var n=t.scrollLeft,a=t.scrollWidth,l=t.clientWidth;return[n,a,l]},r0=function(t,n){return t==="v"?Z1(n):q1(n)},o0=function(t,n){return t==="v"?H1(n):I1(n)},G1=function(t,n){return t==="h"&&n==="rtl"?-1:1},K1=function(t,n,a,l,o){var u=G1(t,window.getComputedStyle(n).direction),d=u*l,m=a.target,g=n.contains(m),p=!1,b=d>0,v=0,x=0;do{if(!m)break;var N=o0(t,m),z=N[0],j=N[1],k=N[2],A=j-k-u*z;(z||A)&&r0(t,m)&&(v+=A,x+=z);var T=m.parentNode;m=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!g&&m!==document.body||g&&(n.contains(m)||n===m));return(b&&Math.abs(v)<1||!b&&Math.abs(x)<1)&&(p=!0),p},fo=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},wy=function(t){return[t.deltaX,t.deltaY]},jy=function(t){return t&&"current"in t?t.current:t},Y1=function(t,n){return t[0]===n[0]&&t[1]===n[1]},V1=function(t){return`
|
|
177
|
-
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
178
|
-
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
179
|
-
`)},P1=0,cs=[];function Q1(t){var n=w.useRef([]),a=w.useRef([0,0]),l=w.useRef(),o=w.useState(P1++)[0],u=w.useState(s0)[0],d=w.useRef(t);w.useEffect(function(){d.current=t},[t]),w.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var j=g1([t.lockRef.current],(t.shards||[]).map(jy),!0).filter(Boolean);return j.forEach(function(k){return k.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),j.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var m=w.useCallback(function(j,k){if("touches"in j&&j.touches.length===2||j.type==="wheel"&&j.ctrlKey)return!d.current.allowPinchZoom;var A=fo(j),T=a.current,O="deltaX"in j?j.deltaX:T[0]-A[0],R="deltaY"in j?j.deltaY:T[1]-A[1],L,H=j.target,K=Math.abs(O)>Math.abs(R)?"h":"v";if("touches"in j&&K==="h"&&H.type==="range")return!1;var D=window.getSelection(),P=D&&D.anchorNode,xe=P?P===H||P.contains(H):!1;if(xe)return!1;var Q=Sy(K,H);if(!Q)return!0;if(Q?L=K:(L=K==="v"?"h":"v",Q=Sy(K,H)),!Q)return!1;if(!l.current&&"changedTouches"in j&&(O||R)&&(l.current=L),!L)return!0;var oe=l.current||L;return K1(oe,k,j,oe==="h"?O:R)},[]),g=w.useCallback(function(j){var k=j;if(!(!cs.length||cs[cs.length-1]!==u)){var A="deltaY"in k?wy(k):fo(k),T=n.current.filter(function(L){return L.name===k.type&&(L.target===k.target||k.target===L.shadowParent)&&Y1(L.delta,A)})[0];if(T&&T.should){k.cancelable&&k.preventDefault();return}if(!T){var O=(d.current.shards||[]).map(jy).filter(Boolean).filter(function(L){return L.contains(k.target)}),R=O.length>0?m(k,O[0]):!d.current.noIsolation;R&&k.cancelable&&k.preventDefault()}}},[]),p=w.useCallback(function(j,k,A,T){var O={name:j,delta:k,target:A,should:T,shadowParent:X1(A)};n.current.push(O),setTimeout(function(){n.current=n.current.filter(function(R){return R!==O})},1)},[]),b=w.useCallback(function(j){a.current=fo(j),l.current=void 0},[]),v=w.useCallback(function(j){p(j.type,wy(j),j.target,m(j,t.lockRef.current))},[]),x=w.useCallback(function(j){p(j.type,fo(j),j.target,m(j,t.lockRef.current))},[]);w.useEffect(function(){return cs.push(u),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:x}),document.addEventListener("wheel",g,os),document.addEventListener("touchmove",g,os),document.addEventListener("touchstart",b,os),function(){cs=cs.filter(function(j){return j!==u}),document.removeEventListener("wheel",g,os),document.removeEventListener("touchmove",g,os),document.removeEventListener("touchstart",b,os)}},[]);var N=t.removeScrollBar,z=t.inert;return w.createElement(w.Fragment,null,z?w.createElement(u,{styles:V1(o)}):null,N?w.createElement($1,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function X1(t){for(var n=null;t!==null;)t instanceof ShadowRoot&&(n=t.host,t=t.host),t=t.parentNode;return n}const J1=k1(a0,Q1);var c0=w.forwardRef(function(t,n){return w.createElement(Jo,Rn({},t,{ref:n,sideCar:J1}))});c0.classNames=Jo.classNames;var F1=function(t){if(typeof document>"u")return null;var n=Array.isArray(t)?t[0]:t;return n.ownerDocument.body},us=new WeakMap,ho=new WeakMap,mo={},Bd=0,u0=function(t){return t&&(t.host||u0(t.parentNode))},W1=function(t,n){return n.map(function(a){if(t.contains(a))return a;var l=u0(a);return l&&t.contains(l)?l:(console.error("aria-hidden",a,"in not contained inside",t,". Doing nothing"),null)}).filter(function(a){return!!a})},eN=function(t,n,a,l){var o=W1(n,Array.isArray(t)?t:[t]);mo[a]||(mo[a]=new WeakMap);var u=mo[a],d=[],m=new Set,g=new Set(o),p=function(v){!v||m.has(v)||(m.add(v),p(v.parentNode))};o.forEach(p);var b=function(v){!v||g.has(v)||Array.prototype.forEach.call(v.children,function(x){if(m.has(x))b(x);else try{var N=x.getAttribute(l),z=N!==null&&N!=="false",j=(us.get(x)||0)+1,k=(u.get(x)||0)+1;us.set(x,j),u.set(x,k),d.push(x),j===1&&z&&ho.set(x,!0),k===1&&x.setAttribute(a,"true"),z||x.setAttribute(l,"true")}catch(A){console.error("aria-hidden: cannot operate on ",x,A)}})};return b(n),m.clear(),Bd++,function(){d.forEach(function(v){var x=us.get(v)-1,N=u.get(v)-1;us.set(v,x),u.set(v,N),x||(ho.has(v)||v.removeAttribute(l),ho.delete(v)),N||v.removeAttribute(a)}),Bd--,Bd||(us=new WeakMap,us=new WeakMap,ho=new WeakMap,mo={})}},tN=function(t,n,a){a===void 0&&(a="data-aria-hidden");var l=Array.from(Array.isArray(t)?t:[t]),o=F1(t);return o?(l.push.apply(l,Array.from(o.querySelectorAll("[aria-live], script"))),eN(l,o,a,"aria-hidden")):function(){return null}},Fo="Dialog",[d0]=Rj(Fo),[nN,_n]=d0(Fo),f0=t=>{const{__scopeDialog:n,children:a,open:l,defaultOpen:o,onOpenChange:u,modal:d=!0}=t,m=w.useRef(null),g=w.useRef(null),[p,b]=Bj({prop:l,defaultProp:o??!1,onChange:u,caller:Fo});return c.jsx(nN,{scope:n,triggerRef:m,contentRef:g,contentId:Td(),titleId:Td(),descriptionId:Td(),open:p,onOpenChange:b,onOpenToggle:w.useCallback(()=>b(v=>!v),[b]),modal:d,children:a})};f0.displayName=Fo;var h0="DialogTrigger",iN=w.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=_n(h0,a),u=ya(n,o.triggerRef);return c.jsx(ai.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Cf(o.open),...l,ref:u,onClick:Ui(t.onClick,o.onOpenToggle)})});iN.displayName=h0;var _f="DialogPortal",[aN,m0]=d0(_f,{forceMount:void 0}),p0=t=>{const{__scopeDialog:n,forceMount:a,children:l,container:o}=t,u=_n(_f,n);return c.jsx(aN,{scope:n,forceMount:a,children:w.Children.map(l,d=>c.jsx(Xo,{present:a||u.open,children:c.jsx(t0,{asChild:!0,container:o,children:d})}))})};p0.displayName=_f;var Eo="DialogOverlay",g0=w.forwardRef((t,n)=>{const a=m0(Eo,t.__scopeDialog),{forceMount:l=a.forceMount,...o}=t,u=_n(Eo,t.__scopeDialog);return u.modal?c.jsx(Xo,{present:l||u.open,children:c.jsx(lN,{...o,ref:n})}):null});g0.displayName=Eo;var sN=Qv("DialogOverlay.RemoveScroll"),lN=w.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=_n(Eo,a);return c.jsx(c0,{as:sN,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsx(ai.div,{"data-state":Cf(o.open),...l,ref:n,style:{pointerEvents:"auto",...l.style}})})}),pa="DialogContent",y0=w.forwardRef((t,n)=>{const a=m0(pa,t.__scopeDialog),{forceMount:l=a.forceMount,...o}=t,u=_n(pa,t.__scopeDialog);return c.jsx(Xo,{present:l||u.open,children:u.modal?c.jsx(rN,{...o,ref:n}):c.jsx(oN,{...o,ref:n})})});y0.displayName=pa;var rN=w.forwardRef((t,n)=>{const a=_n(pa,t.__scopeDialog),l=w.useRef(null),o=ya(n,a.contentRef,l);return w.useEffect(()=>{const u=l.current;if(u)return tN(u)},[]),c.jsx(v0,{...t,ref:o,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ui(t.onCloseAutoFocus,u=>{u.preventDefault(),a.triggerRef.current?.focus()}),onPointerDownOutside:Ui(t.onPointerDownOutside,u=>{const d=u.detail.originalEvent,m=d.button===0&&d.ctrlKey===!0;(d.button===2||m)&&u.preventDefault()}),onFocusOutside:Ui(t.onFocusOutside,u=>u.preventDefault())})}),oN=w.forwardRef((t,n)=>{const a=_n(pa,t.__scopeDialog),l=w.useRef(!1),o=w.useRef(!1);return c.jsx(v0,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{t.onCloseAutoFocus?.(u),u.defaultPrevented||(l.current||a.triggerRef.current?.focus(),u.preventDefault()),l.current=!1,o.current=!1},onInteractOutside:u=>{t.onInteractOutside?.(u),u.defaultPrevented||(l.current=!0,u.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const d=u.target;a.triggerRef.current?.contains(d)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&o.current&&u.preventDefault()}})}),v0=w.forwardRef((t,n)=>{const{__scopeDialog:a,trapFocus:l,onOpenAutoFocus:o,onCloseAutoFocus:u,...d}=t,m=_n(pa,a),g=w.useRef(null),p=ya(n,g);return p1(),c.jsxs(c.Fragment,{children:[c.jsx(Wv,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:o,onUnmountAutoFocus:u,children:c.jsx(Jv,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Cf(m.open),...d,ref:p,onDismiss:()=>m.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(cN,{titleId:m.titleId}),c.jsx(dN,{contentRef:g,descriptionId:m.descriptionId})]})]})}),zf="DialogTitle",b0=w.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=_n(zf,a);return c.jsx(ai.h2,{id:o.titleId,...l,ref:n})});b0.displayName=zf;var x0="DialogDescription",S0=w.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=_n(x0,a);return c.jsx(ai.p,{id:o.descriptionId,...l,ref:n})});S0.displayName=x0;var w0="DialogClose",j0=w.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=_n(w0,a);return c.jsx(ai.button,{type:"button",...l,ref:n,onClick:Ui(t.onClick,()=>o.onOpenChange(!1))})});j0.displayName=w0;function Cf(t){return t?"open":"closed"}var N0="DialogTitleWarning",[UO,k0]=Dj(N0,{contentName:pa,titleName:zf,docsSlug:"dialog"}),cN=({titleId:t})=>{const n=k0(N0),a=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
|
|
180
|
-
|
|
181
|
-
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
182
|
-
|
|
183
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return w.useEffect(()=>{t&&(document.getElementById(t)||console.error(a))},[a,t]),null},uN="DialogDescriptionWarning",dN=({contentRef:t,descriptionId:n})=>{const l=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${k0(uN).contentName}}.`;return w.useEffect(()=>{const o=t.current?.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(l))},[l,t,n]),null},_0=f0,z0=p0,Ef=g0,Af=y0,Of=b0,C0=S0,E0=j0;const fN=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),hN=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,a,l)=>l?l.toUpperCase():a.toLowerCase()),Ny=t=>{const n=hN(t);return n.charAt(0).toUpperCase()+n.slice(1)},A0=(...t)=>t.filter((n,a,l)=>!!n&&n.trim()!==""&&l.indexOf(n)===a).join(" ").trim(),mN=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var pN={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 gN=w.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:o="",children:u,iconNode:d,...m},g)=>w.createElement("svg",{ref:g,...pN,width:n,height:n,stroke:t,strokeWidth:l?Number(a)*24/Number(n):a,className:A0("lucide",o),...!u&&!mN(m)&&{"aria-hidden":"true"},...m},[...d.map(([p,b])=>w.createElement(p,b)),...Array.isArray(u)?u:[u]]));const zn=(t,n)=>{const a=w.forwardRef(({className:l,...o},u)=>w.createElement(gN,{ref:u,iconNode:n,className:A0(`lucide-${fN(Ny(t))}`,`lucide-${t}`,l),...o}));return a.displayName=Ny(t),a};const yN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Tf=zn("chevron-right",yN);const vN=[["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"}]],bN=zn("download",vN);const xN=[["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"}]],SN=zn("globe",xN);const wN=[["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"}]],jN=zn("layout-dashboard",wN);const NN=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],kN=zn("menu",NN);const _N=[["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"}]],zN=zn("play",_N);const CN=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ky=zn("plus",CN);const EN=[["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"}]],AN=zn("rocket",EN);const ON=[["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"}]],TN=zn("settings",ON);const DN=[["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"}]],RN=zn("trash-2",DN);const MN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Df=zn("x",MN);function J(t,n,a){function l(m,g){if(m._zod||Object.defineProperty(m,"_zod",{value:{def:g,constr:d,traits:new Set},enumerable:!1}),m._zod.traits.has(t))return;m._zod.traits.add(t),n(m,g);const p=d.prototype,b=Object.keys(p);for(let v=0;v<b.length;v++){const x=b[v];x in m||(m[x]=p[x].bind(m))}}const o=a?.Parent??Object;class u extends o{}Object.defineProperty(u,"name",{value:t});function d(m){var g;const p=a?.Parent?new u:this;l(p,m),(g=p._zod).deferred??(g.deferred=[]);for(const b of p._zod.deferred)b();return p}return Object.defineProperty(d,"init",{value:l}),Object.defineProperty(d,Symbol.hasInstance,{value:m=>a?.Parent&&m instanceof a.Parent?!0:m?._zod?.traits?.has(t)}),Object.defineProperty(d,"name",{value:t}),d}class bs extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class O0 extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const T0={};function $i(t){return T0}function D0(t){const n=Object.values(t).filter(l=>typeof l=="number");return Object.entries(t).filter(([l,o])=>n.indexOf(+l)===-1).map(([l,o])=>o)}function Wd(t,n){return typeof n=="bigint"?n.toString():n}function Rf(t){return{get value(){{const n=t();return Object.defineProperty(this,"value",{value:n}),n}}}}function Mf(t){return t==null}function Lf(t){const n=t.startsWith("^")?1:0,a=t.endsWith("$")?t.length-1:t.length;return t.slice(n,a)}function LN(t,n){const a=(t.toString().split(".")[1]||"").length,l=n.toString();let o=(l.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(l)){const g=l.match(/\d?e-(\d?)/);g?.[1]&&(o=Number.parseInt(g[1]))}const u=a>o?a:o,d=Number.parseInt(t.toFixed(u).replace(".","")),m=Number.parseInt(n.toFixed(u).replace(".",""));return d%m/10**u}const _y=Symbol("evaluating");function He(t,n,a){let l;Object.defineProperty(t,n,{get(){if(l!==_y)return l===void 0&&(l=_y,l=a()),l},set(o){Object.defineProperty(t,n,{value:o})},configurable:!0})}function va(t,n,a){Object.defineProperty(t,n,{value:a,writable:!0,enumerable:!0,configurable:!0})}function Zi(...t){const n={};for(const a of t){const l=Object.getOwnPropertyDescriptors(a);Object.assign(n,l)}return Object.defineProperties({},n)}function zy(t){return JSON.stringify(t)}function UN(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const R0="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Ao(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const $N=Rf(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function js(t){if(Ao(t)===!1)return!1;const n=t.constructor;if(n===void 0||typeof n!="function")return!0;const a=n.prototype;return!(Ao(a)===!1||Object.prototype.hasOwnProperty.call(a,"isPrototypeOf")===!1)}function M0(t){return js(t)?{...t}:Array.isArray(t)?[...t]:t}const BN=new Set(["string","number","symbol"]);function Ns(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function qi(t,n,a){const l=new t._zod.constr(n??t._zod.def);return(!n||a?.parent)&&(l._zod.parent=t),l}function ve(t){const n=t;if(!n)return{};if(typeof n=="string")return{error:()=>n};if(n?.message!==void 0){if(n?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function ZN(t){return Object.keys(t).filter(n=>t[n]._zod.optin==="optional"&&t[n]._zod.optout==="optional")}const qN={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function HN(t,n){const a=t._zod.def,l=a.checks;if(l&&l.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=Zi(t._zod.def,{get shape(){const d={};for(const m in n){if(!(m in a.shape))throw new Error(`Unrecognized key: "${m}"`);n[m]&&(d[m]=a.shape[m])}return va(this,"shape",d),d},checks:[]});return qi(t,u)}function IN(t,n){const a=t._zod.def,l=a.checks;if(l&&l.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=Zi(t._zod.def,{get shape(){const d={...t._zod.def.shape};for(const m in n){if(!(m in a.shape))throw new Error(`Unrecognized key: "${m}"`);n[m]&&delete d[m]}return va(this,"shape",d),d},checks:[]});return qi(t,u)}function GN(t,n){if(!js(n))throw new Error("Invalid input to extend: expected a plain object");const a=t._zod.def.checks;if(a&&a.length>0){const u=t._zod.def.shape;for(const d in n)if(Object.getOwnPropertyDescriptor(u,d)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=Zi(t._zod.def,{get shape(){const u={...t._zod.def.shape,...n};return va(this,"shape",u),u}});return qi(t,o)}function KN(t,n){if(!js(n))throw new Error("Invalid input to safeExtend: expected a plain object");const a=Zi(t._zod.def,{get shape(){const l={...t._zod.def.shape,...n};return va(this,"shape",l),l}});return qi(t,a)}function YN(t,n){const a=Zi(t._zod.def,{get shape(){const l={...t._zod.def.shape,...n._zod.def.shape};return va(this,"shape",l),l},get catchall(){return n._zod.def.catchall},checks:[]});return qi(t,a)}function VN(t,n,a){const o=n._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const d=Zi(n._zod.def,{get shape(){const m=n._zod.def.shape,g={...m};if(a)for(const p in a){if(!(p in m))throw new Error(`Unrecognized key: "${p}"`);a[p]&&(g[p]=t?new t({type:"optional",innerType:m[p]}):m[p])}else for(const p in m)g[p]=t?new t({type:"optional",innerType:m[p]}):m[p];return va(this,"shape",g),g},checks:[]});return qi(n,d)}function PN(t,n,a){const l=Zi(n._zod.def,{get shape(){const o=n._zod.def.shape,u={...o};if(a)for(const d in a){if(!(d in u))throw new Error(`Unrecognized key: "${d}"`);a[d]&&(u[d]=new t({type:"nonoptional",innerType:o[d]}))}else for(const d in o)u[d]=new t({type:"nonoptional",innerType:o[d]});return va(this,"shape",u),u}});return qi(n,l)}function ms(t,n=0){if(t.aborted===!0)return!0;for(let a=n;a<t.issues.length;a++)if(t.issues[a]?.continue!==!0)return!0;return!1}function ps(t,n){return n.map(a=>{var l;return(l=a).path??(l.path=[]),a.path.unshift(t),a})}function po(t){return typeof t=="string"?t:t?.message}function Bi(t,n,a){const l={...t,path:t.path??[]};if(!t.message){const o=po(t.inst?._zod.def?.error?.(t))??po(n?.error?.(t))??po(a.customError?.(t))??po(a.localeError?.(t))??"Invalid input";l.message=o}return delete l.inst,delete l.continue,n?.reportInput||delete l.input,l}function Uf(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Rl(...t){const[n,a,l]=t;return typeof n=="string"?{message:n,code:"custom",input:a,inst:l}:{...n}}const L0=(t,n)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:n,enumerable:!1}),t.message=JSON.stringify(n,Wd,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},U0=J("$ZodError",L0),$0=J("$ZodError",L0,{Parent:Error});function QN(t,n=a=>a.message){const a={},l=[];for(const o of t.issues)o.path.length>0?(a[o.path[0]]=a[o.path[0]]||[],a[o.path[0]].push(n(o))):l.push(n(o));return{formErrors:l,fieldErrors:a}}function XN(t,n=a=>a.message){const a={_errors:[]},l=o=>{for(const u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(d=>l({issues:d}));else if(u.code==="invalid_key")l({issues:u.issues});else if(u.code==="invalid_element")l({issues:u.issues});else if(u.path.length===0)a._errors.push(n(u));else{let d=a,m=0;for(;m<u.path.length;){const g=u.path[m];m===u.path.length-1?(d[g]=d[g]||{_errors:[]},d[g]._errors.push(n(u))):d[g]=d[g]||{_errors:[]},d=d[g],m++}}};return l(t),a}const $f=t=>(n,a,l,o)=>{const u=l?Object.assign(l,{async:!1}):{async:!1},d=n._zod.run({value:a,issues:[]},u);if(d instanceof Promise)throw new bs;if(d.issues.length){const m=new(o?.Err??t)(d.issues.map(g=>Bi(g,u,$i())));throw R0(m,o?.callee),m}return d.value},Bf=t=>async(n,a,l,o)=>{const u=l?Object.assign(l,{async:!0}):{async:!0};let d=n._zod.run({value:a,issues:[]},u);if(d instanceof Promise&&(d=await d),d.issues.length){const m=new(o?.Err??t)(d.issues.map(g=>Bi(g,u,$i())));throw R0(m,o?.callee),m}return d.value},Wo=t=>(n,a,l)=>{const o=l?{...l,async:!1}:{async:!1},u=n._zod.run({value:a,issues:[]},o);if(u instanceof Promise)throw new bs;return u.issues.length?{success:!1,error:new(t??U0)(u.issues.map(d=>Bi(d,o,$i())))}:{success:!0,data:u.value}},JN=Wo($0),ec=t=>async(n,a,l)=>{const o=l?Object.assign(l,{async:!0}):{async:!0};let u=n._zod.run({value:a,issues:[]},o);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new t(u.issues.map(d=>Bi(d,o,$i())))}:{success:!0,data:u.value}},FN=ec($0),WN=t=>(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return $f(t)(n,a,o)},ek=t=>(n,a,l)=>$f(t)(n,a,l),tk=t=>async(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return Bf(t)(n,a,o)},nk=t=>async(n,a,l)=>Bf(t)(n,a,l),ik=t=>(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return Wo(t)(n,a,o)},ak=t=>(n,a,l)=>Wo(t)(n,a,l),sk=t=>async(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return ec(t)(n,a,o)},lk=t=>async(n,a,l)=>ec(t)(n,a,l),rk=/^[cC][^\s-]{8,}$/,ok=/^[0-9a-z]+$/,ck=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,uk=/^[0-9a-vA-V]{20}$/,dk=/^[A-Za-z0-9]{27}$/,fk=/^[a-zA-Z0-9_-]{21}$/,hk=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,mk=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Cy=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,pk=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,gk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function yk(){return new RegExp(gk,"u")}const vk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,bk=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,xk=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Sk=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wk=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,B0=/^[A-Za-z0-9_-]*$/,jk=/^\+[1-9]\d{6,14}$/,Z0="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Nk=new RegExp(`^${Z0}$`);function q0(t){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${n}`:t.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${t.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function kk(t){return new RegExp(`^${q0(t)}$`)}function _k(t){const n=q0({precision:t.precision}),a=["Z"];t.local&&a.push(""),t.offset&&a.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const l=`${n}(?:${a.join("|")})`;return new RegExp(`^${Z0}T(?:${l})$`)}const zk=t=>{const n=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},Ck=/^-?\d+$/,H0=/^-?\d+(?:\.\d+)?$/,Ek=/^(?:true|false)$/i,Ak=/^[^A-Z]*$/,Ok=/^[^a-z]*$/,Ht=J("$ZodCheck",(t,n)=>{var a;t._zod??(t._zod={}),t._zod.def=n,(a=t._zod).onattach??(a.onattach=[])}),I0={number:"number",bigint:"bigint",object:"date"},G0=J("$ZodCheckLessThan",(t,n)=>{Ht.init(t,n);const a=I0[typeof n.value];t._zod.onattach.push(l=>{const o=l._zod.bag,u=(n.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<u&&(n.inclusive?o.maximum=n.value:o.exclusiveMaximum=n.value)}),t._zod.check=l=>{(n.inclusive?l.value<=n.value:l.value<n.value)||l.issues.push({origin:a,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:l.value,inclusive:n.inclusive,inst:t,continue:!n.abort})}}),K0=J("$ZodCheckGreaterThan",(t,n)=>{Ht.init(t,n);const a=I0[typeof n.value];t._zod.onattach.push(l=>{const o=l._zod.bag,u=(n.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>u&&(n.inclusive?o.minimum=n.value:o.exclusiveMinimum=n.value)}),t._zod.check=l=>{(n.inclusive?l.value>=n.value:l.value>n.value)||l.issues.push({origin:a,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:l.value,inclusive:n.inclusive,inst:t,continue:!n.abort})}}),Tk=J("$ZodCheckMultipleOf",(t,n)=>{Ht.init(t,n),t._zod.onattach.push(a=>{var l;(l=a._zod.bag).multipleOf??(l.multipleOf=n.value)}),t._zod.check=a=>{if(typeof a.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof a.value=="bigint"?a.value%n.value===BigInt(0):LN(a.value,n.value)===0)||a.issues.push({origin:typeof a.value,code:"not_multiple_of",divisor:n.value,input:a.value,inst:t,continue:!n.abort})}}),Dk=J("$ZodCheckNumberFormat",(t,n)=>{Ht.init(t,n),n.format=n.format||"float64";const a=n.format?.includes("int"),l=a?"int":"number",[o,u]=qN[n.format];t._zod.onattach.push(d=>{const m=d._zod.bag;m.format=n.format,m.minimum=o,m.maximum=u,a&&(m.pattern=Ck)}),t._zod.check=d=>{const m=d.value;if(a){if(!Number.isInteger(m)){d.issues.push({expected:l,format:n.format,code:"invalid_type",continue:!1,input:m,inst:t});return}if(!Number.isSafeInteger(m)){m>0?d.issues.push({input:m,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:l,inclusive:!0,continue:!n.abort}):d.issues.push({input:m,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:l,inclusive:!0,continue:!n.abort});return}}m<o&&d.issues.push({origin:"number",input:m,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!n.abort}),m>u&&d.issues.push({origin:"number",input:m,code:"too_big",maximum:u,inclusive:!0,inst:t,continue:!n.abort})}}),Rk=J("$ZodCheckMaxLength",(t,n)=>{var a;Ht.init(t,n),(a=t._zod.def).when??(a.when=l=>{const o=l.value;return!Mf(o)&&o.length!==void 0}),t._zod.onattach.push(l=>{const o=l._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<o&&(l._zod.bag.maximum=n.maximum)}),t._zod.check=l=>{const o=l.value;if(o.length<=n.maximum)return;const d=Uf(o);l.issues.push({origin:d,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:t,continue:!n.abort})}}),Mk=J("$ZodCheckMinLength",(t,n)=>{var a;Ht.init(t,n),(a=t._zod.def).when??(a.when=l=>{const o=l.value;return!Mf(o)&&o.length!==void 0}),t._zod.onattach.push(l=>{const o=l._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>o&&(l._zod.bag.minimum=n.minimum)}),t._zod.check=l=>{const o=l.value;if(o.length>=n.minimum)return;const d=Uf(o);l.issues.push({origin:d,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:t,continue:!n.abort})}}),Lk=J("$ZodCheckLengthEquals",(t,n)=>{var a;Ht.init(t,n),(a=t._zod.def).when??(a.when=l=>{const o=l.value;return!Mf(o)&&o.length!==void 0}),t._zod.onattach.push(l=>{const o=l._zod.bag;o.minimum=n.length,o.maximum=n.length,o.length=n.length}),t._zod.check=l=>{const o=l.value,u=o.length;if(u===n.length)return;const d=Uf(o),m=u>n.length;l.issues.push({origin:d,...m?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:l.value,inst:t,continue:!n.abort})}}),tc=J("$ZodCheckStringFormat",(t,n)=>{var a,l;Ht.init(t,n),t._zod.onattach.push(o=>{const u=o._zod.bag;u.format=n.format,n.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(n.pattern))}),n.pattern?(a=t._zod).check??(a.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:n.format,input:o.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:t,continue:!n.abort})}):(l=t._zod).check??(l.check=()=>{})}),Uk=J("$ZodCheckRegex",(t,n)=>{tc.init(t,n),t._zod.check=a=>{n.pattern.lastIndex=0,!n.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:"regex",input:a.value,pattern:n.pattern.toString(),inst:t,continue:!n.abort})}}),$k=J("$ZodCheckLowerCase",(t,n)=>{n.pattern??(n.pattern=Ak),tc.init(t,n)}),Bk=J("$ZodCheckUpperCase",(t,n)=>{n.pattern??(n.pattern=Ok),tc.init(t,n)}),Zk=J("$ZodCheckIncludes",(t,n)=>{Ht.init(t,n);const a=Ns(n.includes),l=new RegExp(typeof n.position=="number"?`^.{${n.position}}${a}`:a);n.pattern=l,t._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(l)}),t._zod.check=o=>{o.value.includes(n.includes,n.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:o.value,inst:t,continue:!n.abort})}}),qk=J("$ZodCheckStartsWith",(t,n)=>{Ht.init(t,n);const a=new RegExp(`^${Ns(n.prefix)}.*`);n.pattern??(n.pattern=a),t._zod.onattach.push(l=>{const o=l._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(a)}),t._zod.check=l=>{l.value.startsWith(n.prefix)||l.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:l.value,inst:t,continue:!n.abort})}}),Hk=J("$ZodCheckEndsWith",(t,n)=>{Ht.init(t,n);const a=new RegExp(`.*${Ns(n.suffix)}$`);n.pattern??(n.pattern=a),t._zod.onattach.push(l=>{const o=l._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(a)}),t._zod.check=l=>{l.value.endsWith(n.suffix)||l.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:l.value,inst:t,continue:!n.abort})}}),Ik=J("$ZodCheckOverwrite",(t,n)=>{Ht.init(t,n),t._zod.check=a=>{a.value=n.tx(a.value)}});class Gk{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const l=n.split(`
|
|
184
|
-
`).filter(d=>d),o=Math.min(...l.map(d=>d.length-d.trimStart().length)),u=l.map(d=>d.slice(o)).map(d=>" ".repeat(this.indent*2)+d);for(const d of u)this.content.push(d)}compile(){const n=Function,a=this?.args,o=[...(this?.content??[""]).map(u=>` ${u}`)];return new n(...a,o.join(`
|
|
185
|
-
`))}}const Kk={major:4,minor:3,patch:6},tt=J("$ZodType",(t,n)=>{var a;t??(t={}),t._zod.def=n,t._zod.bag=t._zod.bag||{},t._zod.version=Kk;const l=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&l.unshift(t);for(const o of l)for(const u of o._zod.onattach)u(t);if(l.length===0)(a=t._zod).deferred??(a.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const o=(d,m,g)=>{let p=ms(d),b;for(const v of m){if(v._zod.def.when){if(!v._zod.def.when(d))continue}else if(p)continue;const x=d.issues.length,N=v._zod.check(d);if(N instanceof Promise&&g?.async===!1)throw new bs;if(b||N instanceof Promise)b=(b??Promise.resolve()).then(async()=>{await N,d.issues.length!==x&&(p||(p=ms(d,x)))});else{if(d.issues.length===x)continue;p||(p=ms(d,x))}}return b?b.then(()=>d):d},u=(d,m,g)=>{if(ms(d))return d.aborted=!0,d;const p=o(m,l,g);if(p instanceof Promise){if(g.async===!1)throw new bs;return p.then(b=>t._zod.parse(b,g))}return t._zod.parse(p,g)};t._zod.run=(d,m)=>{if(m.skipChecks)return t._zod.parse(d,m);if(m.direction==="backward"){const p=t._zod.parse({value:d.value,issues:[]},{...m,skipChecks:!0});return p instanceof Promise?p.then(b=>u(b,d,m)):u(p,d,m)}const g=t._zod.parse(d,m);if(g instanceof Promise){if(m.async===!1)throw new bs;return g.then(p=>o(p,l,m))}return o(g,l,m)}}He(t,"~standard",()=>({validate:o=>{try{const u=JN(t,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return FN(t,o).then(d=>d.success?{value:d.data}:{issues:d.error?.issues})}},vendor:"zod",version:1}))}),Zf=J("$ZodString",(t,n)=>{tt.init(t,n),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??zk(t._zod.bag),t._zod.parse=(a,l)=>{if(n.coerce)try{a.value=String(a.value)}catch{}return typeof a.value=="string"||a.issues.push({expected:"string",code:"invalid_type",input:a.value,inst:t}),a}}),et=J("$ZodStringFormat",(t,n)=>{tc.init(t,n),Zf.init(t,n)}),Yk=J("$ZodGUID",(t,n)=>{n.pattern??(n.pattern=mk),et.init(t,n)}),Vk=J("$ZodUUID",(t,n)=>{if(n.version){const l={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(l===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=Cy(l))}else n.pattern??(n.pattern=Cy());et.init(t,n)}),Pk=J("$ZodEmail",(t,n)=>{n.pattern??(n.pattern=pk),et.init(t,n)}),Qk=J("$ZodURL",(t,n)=>{et.init(t,n),t._zod.check=a=>{try{const l=a.value.trim(),o=new URL(l);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(o.hostname)||a.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:a.value,inst:t,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||a.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:a.value,inst:t,continue:!n.abort})),n.normalize?a.value=o.href:a.value=l;return}catch{a.issues.push({code:"invalid_format",format:"url",input:a.value,inst:t,continue:!n.abort})}}}),Xk=J("$ZodEmoji",(t,n)=>{n.pattern??(n.pattern=yk()),et.init(t,n)}),Jk=J("$ZodNanoID",(t,n)=>{n.pattern??(n.pattern=fk),et.init(t,n)}),Fk=J("$ZodCUID",(t,n)=>{n.pattern??(n.pattern=rk),et.init(t,n)}),Wk=J("$ZodCUID2",(t,n)=>{n.pattern??(n.pattern=ok),et.init(t,n)}),e_=J("$ZodULID",(t,n)=>{n.pattern??(n.pattern=ck),et.init(t,n)}),t_=J("$ZodXID",(t,n)=>{n.pattern??(n.pattern=uk),et.init(t,n)}),n_=J("$ZodKSUID",(t,n)=>{n.pattern??(n.pattern=dk),et.init(t,n)}),i_=J("$ZodISODateTime",(t,n)=>{n.pattern??(n.pattern=_k(n)),et.init(t,n)}),a_=J("$ZodISODate",(t,n)=>{n.pattern??(n.pattern=Nk),et.init(t,n)}),s_=J("$ZodISOTime",(t,n)=>{n.pattern??(n.pattern=kk(n)),et.init(t,n)}),l_=J("$ZodISODuration",(t,n)=>{n.pattern??(n.pattern=hk),et.init(t,n)}),r_=J("$ZodIPv4",(t,n)=>{n.pattern??(n.pattern=vk),et.init(t,n),t._zod.bag.format="ipv4"}),o_=J("$ZodIPv6",(t,n)=>{n.pattern??(n.pattern=bk),et.init(t,n),t._zod.bag.format="ipv6",t._zod.check=a=>{try{new URL(`http://[${a.value}]`)}catch{a.issues.push({code:"invalid_format",format:"ipv6",input:a.value,inst:t,continue:!n.abort})}}}),c_=J("$ZodCIDRv4",(t,n)=>{n.pattern??(n.pattern=xk),et.init(t,n)}),u_=J("$ZodCIDRv6",(t,n)=>{n.pattern??(n.pattern=Sk),et.init(t,n),t._zod.check=a=>{const l=a.value.split("/");try{if(l.length!==2)throw new Error;const[o,u]=l;if(!u)throw new Error;const d=Number(u);if(`${d}`!==u)throw new Error;if(d<0||d>128)throw new Error;new URL(`http://[${o}]`)}catch{a.issues.push({code:"invalid_format",format:"cidrv6",input:a.value,inst:t,continue:!n.abort})}}});function Y0(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const d_=J("$ZodBase64",(t,n)=>{n.pattern??(n.pattern=wk),et.init(t,n),t._zod.bag.contentEncoding="base64",t._zod.check=a=>{Y0(a.value)||a.issues.push({code:"invalid_format",format:"base64",input:a.value,inst:t,continue:!n.abort})}});function f_(t){if(!B0.test(t))return!1;const n=t.replace(/[-_]/g,l=>l==="-"?"+":"/"),a=n.padEnd(Math.ceil(n.length/4)*4,"=");return Y0(a)}const h_=J("$ZodBase64URL",(t,n)=>{n.pattern??(n.pattern=B0),et.init(t,n),t._zod.bag.contentEncoding="base64url",t._zod.check=a=>{f_(a.value)||a.issues.push({code:"invalid_format",format:"base64url",input:a.value,inst:t,continue:!n.abort})}}),m_=J("$ZodE164",(t,n)=>{n.pattern??(n.pattern=jk),et.init(t,n)});function p_(t,n=null){try{const a=t.split(".");if(a.length!==3)return!1;const[l]=a;if(!l)return!1;const o=JSON.parse(atob(l));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||n&&(!("alg"in o)||o.alg!==n))}catch{return!1}}const g_=J("$ZodJWT",(t,n)=>{et.init(t,n),t._zod.check=a=>{p_(a.value,n.alg)||a.issues.push({code:"invalid_format",format:"jwt",input:a.value,inst:t,continue:!n.abort})}}),V0=J("$ZodNumber",(t,n)=>{tt.init(t,n),t._zod.pattern=t._zod.bag.pattern??H0,t._zod.parse=(a,l)=>{if(n.coerce)try{a.value=Number(a.value)}catch{}const o=a.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return a;const u=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return a.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...u?{received:u}:{}}),a}}),y_=J("$ZodNumberFormat",(t,n)=>{Dk.init(t,n),V0.init(t,n)}),v_=J("$ZodBoolean",(t,n)=>{tt.init(t,n),t._zod.pattern=Ek,t._zod.parse=(a,l)=>{if(n.coerce)try{a.value=!!a.value}catch{}const o=a.value;return typeof o=="boolean"||a.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),a}}),b_=J("$ZodUnknown",(t,n)=>{tt.init(t,n),t._zod.parse=a=>a}),x_=J("$ZodNever",(t,n)=>{tt.init(t,n),t._zod.parse=(a,l)=>(a.issues.push({expected:"never",code:"invalid_type",input:a.value,inst:t}),a)});function Ey(t,n,a){t.issues.length&&n.issues.push(...ps(a,t.issues)),n.value[a]=t.value}const S_=J("$ZodArray",(t,n)=>{tt.init(t,n),t._zod.parse=(a,l)=>{const o=a.value;if(!Array.isArray(o))return a.issues.push({expected:"array",code:"invalid_type",input:o,inst:t}),a;a.value=Array(o.length);const u=[];for(let d=0;d<o.length;d++){const m=o[d],g=n.element._zod.run({value:m,issues:[]},l);g instanceof Promise?u.push(g.then(p=>Ey(p,a,d))):Ey(g,a,d)}return u.length?Promise.all(u).then(()=>a):a}});function Oo(t,n,a,l,o){if(t.issues.length){if(o&&!(a in l))return;n.issues.push(...ps(a,t.issues))}t.value===void 0?a in l&&(n.value[a]=void 0):n.value[a]=t.value}function P0(t){const n=Object.keys(t.shape);for(const l of n)if(!t.shape?.[l]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${l}": expected a Zod schema`);const a=ZN(t.shape);return{...t,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(a)}}function Q0(t,n,a,l,o,u){const d=[],m=o.keySet,g=o.catchall._zod,p=g.def.type,b=g.optout==="optional";for(const v in n){if(m.has(v))continue;if(p==="never"){d.push(v);continue}const x=g.run({value:n[v],issues:[]},l);x instanceof Promise?t.push(x.then(N=>Oo(N,a,v,n,b))):Oo(x,a,v,n,b)}return d.length&&a.issues.push({code:"unrecognized_keys",keys:d,input:n,inst:u}),t.length?Promise.all(t).then(()=>a):a}const w_=J("$ZodObject",(t,n)=>{if(tt.init(t,n),!Object.getOwnPropertyDescriptor(n,"shape")?.get){const m=n.shape;Object.defineProperty(n,"shape",{get:()=>{const g={...m};return Object.defineProperty(n,"shape",{value:g}),g}})}const l=Rf(()=>P0(n));He(t._zod,"propValues",()=>{const m=n.shape,g={};for(const p in m){const b=m[p]._zod;if(b.values){g[p]??(g[p]=new Set);for(const v of b.values)g[p].add(v)}}return g});const o=Ao,u=n.catchall;let d;t._zod.parse=(m,g)=>{d??(d=l.value);const p=m.value;if(!o(p))return m.issues.push({expected:"object",code:"invalid_type",input:p,inst:t}),m;m.value={};const b=[],v=d.shape;for(const x of d.keys){const N=v[x],z=N._zod.optout==="optional",j=N._zod.run({value:p[x],issues:[]},g);j instanceof Promise?b.push(j.then(k=>Oo(k,m,x,p,z))):Oo(j,m,x,p,z)}return u?Q0(b,p,m,g,l.value,t):b.length?Promise.all(b).then(()=>m):m}}),j_=J("$ZodObjectJIT",(t,n)=>{w_.init(t,n);const a=t._zod.parse,l=Rf(()=>P0(n)),o=x=>{const N=new Gk(["shape","payload","ctx"]),z=l.value,j=O=>{const R=zy(O);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};N.write("const input = payload.value;");const k=Object.create(null);let A=0;for(const O of z.keys)k[O]=`key_${A++}`;N.write("const newResult = {};");for(const O of z.keys){const R=k[O],L=zy(O),K=x[O]?._zod?.optout==="optional";N.write(`const ${R} = ${j(O)};`),K?N.write(`
|
|
186
|
-
if (${R}.issues.length) {
|
|
187
|
-
if (${L} in input) {
|
|
188
|
-
payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
|
|
189
|
-
...iss,
|
|
190
|
-
path: iss.path ? [${L}, ...iss.path] : [${L}]
|
|
191
|
-
})));
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
if (${R}.value === undefined) {
|
|
196
|
-
if (${L} in input) {
|
|
197
|
-
newResult[${L}] = undefined;
|
|
198
|
-
}
|
|
199
|
-
} else {
|
|
200
|
-
newResult[${L}] = ${R}.value;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
`):N.write(`
|
|
204
|
-
if (${R}.issues.length) {
|
|
205
|
-
payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
|
|
206
|
-
...iss,
|
|
207
|
-
path: iss.path ? [${L}, ...iss.path] : [${L}]
|
|
208
|
-
})));
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
if (${R}.value === undefined) {
|
|
212
|
-
if (${L} in input) {
|
|
213
|
-
newResult[${L}] = undefined;
|
|
214
|
-
}
|
|
215
|
-
} else {
|
|
216
|
-
newResult[${L}] = ${R}.value;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
`)}N.write("payload.value = newResult;"),N.write("return payload;");const T=N.compile();return(O,R)=>T(x,O,R)};let u;const d=Ao,m=!T0.jitless,p=m&&$N.value,b=n.catchall;let v;t._zod.parse=(x,N)=>{v??(v=l.value);const z=x.value;return d(z)?m&&p&&N?.async===!1&&N.jitless!==!0?(u||(u=o(n.shape)),x=u(x,N),b?Q0([],z,x,N,v,t):x):a(x,N):(x.issues.push({expected:"object",code:"invalid_type",input:z,inst:t}),x)}});function Ay(t,n,a,l){for(const u of t)if(u.issues.length===0)return n.value=u.value,n;const o=t.filter(u=>!ms(u));return o.length===1?(n.value=o[0].value,o[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:a,errors:t.map(u=>u.issues.map(d=>Bi(d,l,$i())))}),n)}const N_=J("$ZodUnion",(t,n)=>{tt.init(t,n),He(t._zod,"optin",()=>n.options.some(o=>o._zod.optin==="optional")?"optional":void 0),He(t._zod,"optout",()=>n.options.some(o=>o._zod.optout==="optional")?"optional":void 0),He(t._zod,"values",()=>{if(n.options.every(o=>o._zod.values))return new Set(n.options.flatMap(o=>Array.from(o._zod.values)))}),He(t._zod,"pattern",()=>{if(n.options.every(o=>o._zod.pattern)){const o=n.options.map(u=>u._zod.pattern);return new RegExp(`^(${o.map(u=>Lf(u.source)).join("|")})$`)}});const a=n.options.length===1,l=n.options[0]._zod.run;t._zod.parse=(o,u)=>{if(a)return l(o,u);let d=!1;const m=[];for(const g of n.options){const p=g._zod.run({value:o.value,issues:[]},u);if(p instanceof Promise)m.push(p),d=!0;else{if(p.issues.length===0)return p;m.push(p)}}return d?Promise.all(m).then(g=>Ay(g,o,t,u)):Ay(m,o,t,u)}}),k_=J("$ZodIntersection",(t,n)=>{tt.init(t,n),t._zod.parse=(a,l)=>{const o=a.value,u=n.left._zod.run({value:o,issues:[]},l),d=n.right._zod.run({value:o,issues:[]},l);return u instanceof Promise||d instanceof Promise?Promise.all([u,d]).then(([g,p])=>Oy(a,g,p)):Oy(a,u,d)}});function ef(t,n){if(t===n)return{valid:!0,data:t};if(t instanceof Date&&n instanceof Date&&+t==+n)return{valid:!0,data:t};if(js(t)&&js(n)){const a=Object.keys(n),l=Object.keys(t).filter(u=>a.indexOf(u)!==-1),o={...t,...n};for(const u of l){const d=ef(t[u],n[u]);if(!d.valid)return{valid:!1,mergeErrorPath:[u,...d.mergeErrorPath]};o[u]=d.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return{valid:!1,mergeErrorPath:[]};const a=[];for(let l=0;l<t.length;l++){const o=t[l],u=n[l],d=ef(o,u);if(!d.valid)return{valid:!1,mergeErrorPath:[l,...d.mergeErrorPath]};a.push(d.data)}return{valid:!0,data:a}}return{valid:!1,mergeErrorPath:[]}}function Oy(t,n,a){const l=new Map;let o;for(const m of n.issues)if(m.code==="unrecognized_keys"){o??(o=m);for(const g of m.keys)l.has(g)||l.set(g,{}),l.get(g).l=!0}else t.issues.push(m);for(const m of a.issues)if(m.code==="unrecognized_keys")for(const g of m.keys)l.has(g)||l.set(g,{}),l.get(g).r=!0;else t.issues.push(m);const u=[...l].filter(([,m])=>m.l&&m.r).map(([m])=>m);if(u.length&&o&&t.issues.push({...o,keys:u}),ms(t))return t;const d=ef(n.value,a.value);if(!d.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(d.mergeErrorPath)}`);return t.value=d.data,t}const __=J("$ZodRecord",(t,n)=>{tt.init(t,n),t._zod.parse=(a,l)=>{const o=a.value;if(!js(o))return a.issues.push({expected:"record",code:"invalid_type",input:o,inst:t}),a;const u=[],d=n.keyType._zod.values;if(d){a.value={};const m=new Set;for(const p of d)if(typeof p=="string"||typeof p=="number"||typeof p=="symbol"){m.add(typeof p=="number"?p.toString():p);const b=n.valueType._zod.run({value:o[p],issues:[]},l);b instanceof Promise?u.push(b.then(v=>{v.issues.length&&a.issues.push(...ps(p,v.issues)),a.value[p]=v.value})):(b.issues.length&&a.issues.push(...ps(p,b.issues)),a.value[p]=b.value)}let g;for(const p in o)m.has(p)||(g=g??[],g.push(p));g&&g.length>0&&a.issues.push({code:"unrecognized_keys",input:o,inst:t,keys:g})}else{a.value={};for(const m of Reflect.ownKeys(o)){if(m==="__proto__")continue;let g=n.keyType._zod.run({value:m,issues:[]},l);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof m=="string"&&H0.test(m)&&g.issues.length){const v=n.keyType._zod.run({value:Number(m),issues:[]},l);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");v.issues.length===0&&(g=v)}if(g.issues.length){n.mode==="loose"?a.value[m]=o[m]:a.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(v=>Bi(v,l,$i())),input:m,path:[m],inst:t});continue}const b=n.valueType._zod.run({value:o[m],issues:[]},l);b instanceof Promise?u.push(b.then(v=>{v.issues.length&&a.issues.push(...ps(m,v.issues)),a.value[g.value]=v.value})):(b.issues.length&&a.issues.push(...ps(m,b.issues)),a.value[g.value]=b.value)}}return u.length?Promise.all(u).then(()=>a):a}}),z_=J("$ZodEnum",(t,n)=>{tt.init(t,n);const a=D0(n.entries),l=new Set(a);t._zod.values=l,t._zod.pattern=new RegExp(`^(${a.filter(o=>BN.has(typeof o)).map(o=>typeof o=="string"?Ns(o):o.toString()).join("|")})$`),t._zod.parse=(o,u)=>{const d=o.value;return l.has(d)||o.issues.push({code:"invalid_value",values:a,input:d,inst:t}),o}}),C_=J("$ZodLiteral",(t,n)=>{if(tt.init(t,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");const a=new Set(n.values);t._zod.values=a,t._zod.pattern=new RegExp(`^(${n.values.map(l=>typeof l=="string"?Ns(l):l?Ns(l.toString()):String(l)).join("|")})$`),t._zod.parse=(l,o)=>{const u=l.value;return a.has(u)||l.issues.push({code:"invalid_value",values:n.values,input:u,inst:t}),l}}),E_=J("$ZodTransform",(t,n)=>{tt.init(t,n),t._zod.parse=(a,l)=>{if(l.direction==="backward")throw new O0(t.constructor.name);const o=n.transform(a.value,a);if(l.async)return(o instanceof Promise?o:Promise.resolve(o)).then(d=>(a.value=d,a));if(o instanceof Promise)throw new bs;return a.value=o,a}});function Ty(t,n){return t.issues.length&&n===void 0?{issues:[],value:void 0}:t}const X0=J("$ZodOptional",(t,n)=>{tt.init(t,n),t._zod.optin="optional",t._zod.optout="optional",He(t._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),He(t._zod,"pattern",()=>{const a=n.innerType._zod.pattern;return a?new RegExp(`^(${Lf(a.source)})?$`):void 0}),t._zod.parse=(a,l)=>{if(n.innerType._zod.optin==="optional"){const o=n.innerType._zod.run(a,l);return o instanceof Promise?o.then(u=>Ty(u,a.value)):Ty(o,a.value)}return a.value===void 0?a:n.innerType._zod.run(a,l)}}),A_=J("$ZodExactOptional",(t,n)=>{X0.init(t,n),He(t._zod,"values",()=>n.innerType._zod.values),He(t._zod,"pattern",()=>n.innerType._zod.pattern),t._zod.parse=(a,l)=>n.innerType._zod.run(a,l)}),O_=J("$ZodNullable",(t,n)=>{tt.init(t,n),He(t._zod,"optin",()=>n.innerType._zod.optin),He(t._zod,"optout",()=>n.innerType._zod.optout),He(t._zod,"pattern",()=>{const a=n.innerType._zod.pattern;return a?new RegExp(`^(${Lf(a.source)}|null)$`):void 0}),He(t._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),t._zod.parse=(a,l)=>a.value===null?a:n.innerType._zod.run(a,l)}),T_=J("$ZodDefault",(t,n)=>{tt.init(t,n),t._zod.optin="optional",He(t._zod,"values",()=>n.innerType._zod.values),t._zod.parse=(a,l)=>{if(l.direction==="backward")return n.innerType._zod.run(a,l);if(a.value===void 0)return a.value=n.defaultValue,a;const o=n.innerType._zod.run(a,l);return o instanceof Promise?o.then(u=>Dy(u,n)):Dy(o,n)}});function Dy(t,n){return t.value===void 0&&(t.value=n.defaultValue),t}const D_=J("$ZodPrefault",(t,n)=>{tt.init(t,n),t._zod.optin="optional",He(t._zod,"values",()=>n.innerType._zod.values),t._zod.parse=(a,l)=>(l.direction==="backward"||a.value===void 0&&(a.value=n.defaultValue),n.innerType._zod.run(a,l))}),R_=J("$ZodNonOptional",(t,n)=>{tt.init(t,n),He(t._zod,"values",()=>{const a=n.innerType._zod.values;return a?new Set([...a].filter(l=>l!==void 0)):void 0}),t._zod.parse=(a,l)=>{const o=n.innerType._zod.run(a,l);return o instanceof Promise?o.then(u=>Ry(u,t)):Ry(o,t)}});function Ry(t,n){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:n}),t}const M_=J("$ZodCatch",(t,n)=>{tt.init(t,n),He(t._zod,"optin",()=>n.innerType._zod.optin),He(t._zod,"optout",()=>n.innerType._zod.optout),He(t._zod,"values",()=>n.innerType._zod.values),t._zod.parse=(a,l)=>{if(l.direction==="backward")return n.innerType._zod.run(a,l);const o=n.innerType._zod.run(a,l);return o instanceof Promise?o.then(u=>(a.value=u.value,u.issues.length&&(a.value=n.catchValue({...a,error:{issues:u.issues.map(d=>Bi(d,l,$i()))},input:a.value}),a.issues=[]),a)):(a.value=o.value,o.issues.length&&(a.value=n.catchValue({...a,error:{issues:o.issues.map(u=>Bi(u,l,$i()))},input:a.value}),a.issues=[]),a)}}),L_=J("$ZodPipe",(t,n)=>{tt.init(t,n),He(t._zod,"values",()=>n.in._zod.values),He(t._zod,"optin",()=>n.in._zod.optin),He(t._zod,"optout",()=>n.out._zod.optout),He(t._zod,"propValues",()=>n.in._zod.propValues),t._zod.parse=(a,l)=>{if(l.direction==="backward"){const u=n.out._zod.run(a,l);return u instanceof Promise?u.then(d=>go(d,n.in,l)):go(u,n.in,l)}const o=n.in._zod.run(a,l);return o instanceof Promise?o.then(u=>go(u,n.out,l)):go(o,n.out,l)}});function go(t,n,a){return t.issues.length?(t.aborted=!0,t):n._zod.run({value:t.value,issues:t.issues},a)}const U_=J("$ZodReadonly",(t,n)=>{tt.init(t,n),He(t._zod,"propValues",()=>n.innerType._zod.propValues),He(t._zod,"values",()=>n.innerType._zod.values),He(t._zod,"optin",()=>n.innerType?._zod?.optin),He(t._zod,"optout",()=>n.innerType?._zod?.optout),t._zod.parse=(a,l)=>{if(l.direction==="backward")return n.innerType._zod.run(a,l);const o=n.innerType._zod.run(a,l);return o instanceof Promise?o.then(My):My(o)}});function My(t){return t.value=Object.freeze(t.value),t}const $_=J("$ZodCustom",(t,n)=>{Ht.init(t,n),tt.init(t,n),t._zod.parse=(a,l)=>a,t._zod.check=a=>{const l=a.value,o=n.fn(l);if(o instanceof Promise)return o.then(u=>Ly(u,a,l,t));Ly(o,a,l,t)}});function Ly(t,n,a,l){if(!t){const o={code:"custom",input:a,inst:l,path:[...l._zod.def.path??[]],continue:!l._zod.def.abort};l._zod.def.params&&(o.params=l._zod.def.params),n.issues.push(Rl(o))}}var Uy;class B_{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...a){const l=a[0];return this._map.set(n,l),l&&typeof l=="object"&&"id"in l&&this._idmap.set(l.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const a=this._map.get(n);return a&&typeof a=="object"&&"id"in a&&this._idmap.delete(a.id),this._map.delete(n),this}get(n){const a=n._zod.parent;if(a){const l={...this.get(a)??{}};delete l.id;const o={...l,...this._map.get(n)};return Object.keys(o).length?o:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function Z_(){return new B_}(Uy=globalThis).__zod_globalRegistry??(Uy.__zod_globalRegistry=Z_());const zl=globalThis.__zod_globalRegistry;function q_(t,n){return new t({type:"string",...ve(n)})}function H_(t,n){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ve(n)})}function $y(t,n){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ve(n)})}function I_(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ve(n)})}function G_(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ve(n)})}function K_(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ve(n)})}function Y_(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ve(n)})}function V_(t,n){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ve(n)})}function P_(t,n){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ve(n)})}function Q_(t,n){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ve(n)})}function X_(t,n){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ve(n)})}function J_(t,n){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ve(n)})}function F_(t,n){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ve(n)})}function W_(t,n){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ve(n)})}function e2(t,n){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ve(n)})}function t2(t,n){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ve(n)})}function n2(t,n){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ve(n)})}function i2(t,n){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ve(n)})}function a2(t,n){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ve(n)})}function s2(t,n){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ve(n)})}function l2(t,n){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ve(n)})}function r2(t,n){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ve(n)})}function o2(t,n){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ve(n)})}function c2(t,n){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ve(n)})}function u2(t,n){return new t({type:"string",format:"date",check:"string_format",...ve(n)})}function d2(t,n){return new t({type:"string",format:"time",check:"string_format",precision:null,...ve(n)})}function f2(t,n){return new t({type:"string",format:"duration",check:"string_format",...ve(n)})}function h2(t,n){return new t({type:"number",checks:[],...ve(n)})}function m2(t,n){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ve(n)})}function p2(t,n){return new t({type:"boolean",...ve(n)})}function g2(t){return new t({type:"unknown"})}function y2(t,n){return new t({type:"never",...ve(n)})}function By(t,n){return new G0({check:"less_than",...ve(n),value:t,inclusive:!1})}function Zd(t,n){return new G0({check:"less_than",...ve(n),value:t,inclusive:!0})}function Zy(t,n){return new K0({check:"greater_than",...ve(n),value:t,inclusive:!1})}function qd(t,n){return new K0({check:"greater_than",...ve(n),value:t,inclusive:!0})}function qy(t,n){return new Tk({check:"multiple_of",...ve(n),value:t})}function J0(t,n){return new Rk({check:"max_length",...ve(n),maximum:t})}function To(t,n){return new Mk({check:"min_length",...ve(n),minimum:t})}function F0(t,n){return new Lk({check:"length_equals",...ve(n),length:t})}function v2(t,n){return new Uk({check:"string_format",format:"regex",...ve(n),pattern:t})}function b2(t){return new $k({check:"string_format",format:"lowercase",...ve(t)})}function x2(t){return new Bk({check:"string_format",format:"uppercase",...ve(t)})}function S2(t,n){return new Zk({check:"string_format",format:"includes",...ve(n),includes:t})}function w2(t,n){return new qk({check:"string_format",format:"starts_with",...ve(n),prefix:t})}function j2(t,n){return new Hk({check:"string_format",format:"ends_with",...ve(n),suffix:t})}function Es(t){return new Ik({check:"overwrite",tx:t})}function N2(t){return Es(n=>n.normalize(t))}function k2(){return Es(t=>t.trim())}function _2(){return Es(t=>t.toLowerCase())}function z2(){return Es(t=>t.toUpperCase())}function C2(){return Es(t=>UN(t))}function E2(t,n,a){return new t({type:"array",element:n,...ve(a)})}function A2(t,n,a){return new t({type:"custom",check:"custom",fn:n,...ve(a)})}function O2(t){const n=T2(a=>(a.addIssue=l=>{if(typeof l=="string")a.issues.push(Rl(l,a.value,n._zod.def));else{const o=l;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=a.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),a.issues.push(Rl(o))}},t(a.value,a)));return n}function T2(t,n){const a=new Ht({check:"custom",...ve(n)});return a._zod.check=t,a}function W0(t){let n=t?.target??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??zl,target:n,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function gt(t,n,a={path:[],schemaPath:[]}){var l;const o=t._zod.def,u=n.seen.get(t);if(u)return u.count++,a.schemaPath.includes(t)&&(u.cycle=a.path),u.schema;const d={schema:{},count:1,cycle:void 0,path:a.path};n.seen.set(t,d);const m=t._zod.toJSONSchema?.();if(m)d.schema=m;else{const b={...a,schemaPath:[...a.schemaPath,t],path:a.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(n,d.schema,b);else{const x=d.schema,N=n.processors[o.type];if(!N)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);N(t,n,x,b)}const v=t._zod.parent;v&&(d.ref||(d.ref=v),gt(v,n,b),n.seen.get(v).isParent=!0)}const g=n.metadataRegistry.get(t);return g&&Object.assign(d.schema,g),n.io==="input"&&Ot(t)&&(delete d.schema.examples,delete d.schema.default),n.io==="input"&&d.schema._prefault&&((l=d.schema).default??(l.default=d.schema._prefault)),delete d.schema._prefault,n.seen.get(t).schema}function eb(t,n){const a=t.seen.get(n);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=new Map;for(const d of t.seen.entries()){const m=t.metadataRegistry.get(d[0])?.id;if(m){const g=l.get(m);if(g&&g!==d[0])throw new Error(`Duplicate schema id "${m}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);l.set(m,d[0])}}const o=d=>{const m=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const v=t.external.registry.get(d[0])?.id,x=t.external.uri??(z=>z);if(v)return{ref:x(v)};const N=d[1].defId??d[1].schema.id??`schema${t.counter++}`;return d[1].defId=N,{defId:N,ref:`${x("__shared")}#/${m}/${N}`}}if(d[1]===a)return{ref:"#"};const p=`#/${m}/`,b=d[1].schema.id??`__schema${t.counter++}`;return{defId:b,ref:p+b}},u=d=>{if(d[1].schema.$ref)return;const m=d[1],{ref:g,defId:p}=o(d);m.def={...m.schema},p&&(m.defId=p);const b=m.schema;for(const v in b)delete b[v];b.$ref=g};if(t.cycles==="throw")for(const d of t.seen.entries()){const m=d[1];if(m.cycle)throw new Error(`Cycle detected: #/${m.cycle?.join("/")}/<root>
|
|
220
|
-
|
|
221
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of t.seen.entries()){const m=d[1];if(n===d[0]){u(d);continue}if(t.external){const p=t.external.registry.get(d[0])?.id;if(n!==d[0]&&p){u(d);continue}}if(t.metadataRegistry.get(d[0])?.id){u(d);continue}if(m.cycle){u(d);continue}if(m.count>1&&t.reused==="ref"){u(d);continue}}}function tb(t,n){const a=t.seen.get(n);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=d=>{const m=t.seen.get(d);if(m.ref===null)return;const g=m.def??m.schema,p={...g},b=m.ref;if(m.ref=null,b){l(b);const x=t.seen.get(b),N=x.schema;if(N.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(g.allOf=g.allOf??[],g.allOf.push(N)):Object.assign(g,N),Object.assign(g,p),d._zod.parent===b)for(const j in g)j==="$ref"||j==="allOf"||j in p||delete g[j];if(N.$ref&&x.def)for(const j in g)j==="$ref"||j==="allOf"||j in x.def&&JSON.stringify(g[j])===JSON.stringify(x.def[j])&&delete g[j]}const v=d._zod.parent;if(v&&v!==b){l(v);const x=t.seen.get(v);if(x?.schema.$ref&&(g.$ref=x.schema.$ref,x.def))for(const N in g)N==="$ref"||N==="allOf"||N in x.def&&JSON.stringify(g[N])===JSON.stringify(x.def[N])&&delete g[N]}t.override({zodSchema:d,jsonSchema:g,path:m.path??[]})};for(const d of[...t.seen.entries()].reverse())l(d[0]);const o={};if(t.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){const d=t.external.registry.get(n)?.id;if(!d)throw new Error("Schema is missing an `id` property");o.$id=t.external.uri(d)}Object.assign(o,a.def??a.schema);const u=t.external?.defs??{};for(const d of t.seen.entries()){const m=d[1];m.def&&m.defId&&(u[m.defId]=m.def)}t.external||Object.keys(u).length>0&&(t.target==="draft-2020-12"?o.$defs=u:o.definitions=u);try{const d=JSON.parse(JSON.stringify(o));return Object.defineProperty(d,"~standard",{value:{...n["~standard"],jsonSchema:{input:Do(n,"input",t.processors),output:Do(n,"output",t.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function Ot(t,n){const a=n??{seen:new Set};if(a.seen.has(t))return!1;a.seen.add(t);const l=t._zod.def;if(l.type==="transform")return!0;if(l.type==="array")return Ot(l.element,a);if(l.type==="set")return Ot(l.valueType,a);if(l.type==="lazy")return Ot(l.getter(),a);if(l.type==="promise"||l.type==="optional"||l.type==="nonoptional"||l.type==="nullable"||l.type==="readonly"||l.type==="default"||l.type==="prefault")return Ot(l.innerType,a);if(l.type==="intersection")return Ot(l.left,a)||Ot(l.right,a);if(l.type==="record"||l.type==="map")return Ot(l.keyType,a)||Ot(l.valueType,a);if(l.type==="pipe")return Ot(l.in,a)||Ot(l.out,a);if(l.type==="object"){for(const o in l.shape)if(Ot(l.shape[o],a))return!0;return!1}if(l.type==="union"){for(const o of l.options)if(Ot(o,a))return!0;return!1}if(l.type==="tuple"){for(const o of l.items)if(Ot(o,a))return!0;return!!(l.rest&&Ot(l.rest,a))}return!1}const D2=(t,n={})=>a=>{const l=W0({...a,processors:n});return gt(t,l),eb(l,t),tb(l,t)},Do=(t,n,a={})=>l=>{const{libraryOptions:o,target:u}=l??{},d=W0({...o??{},target:u,io:n,processors:a});return gt(t,d),eb(d,t),tb(d,t)},R2={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},M2=(t,n,a,l)=>{const o=a;o.type="string";const{minimum:u,maximum:d,format:m,patterns:g,contentEncoding:p}=t._zod.bag;if(typeof u=="number"&&(o.minLength=u),typeof d=="number"&&(o.maxLength=d),m&&(o.format=R2[m]??m,o.format===""&&delete o.format,m==="time"&&delete o.format),p&&(o.contentEncoding=p),g&&g.size>0){const b=[...g];b.length===1?o.pattern=b[0].source:b.length>1&&(o.allOf=[...b.map(v=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},L2=(t,n,a,l)=>{const o=a,{minimum:u,maximum:d,format:m,multipleOf:g,exclusiveMaximum:p,exclusiveMinimum:b}=t._zod.bag;typeof m=="string"&&m.includes("int")?o.type="integer":o.type="number",typeof b=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(o.minimum=b,o.exclusiveMinimum=!0):o.exclusiveMinimum=b),typeof u=="number"&&(o.minimum=u,typeof b=="number"&&n.target!=="draft-04"&&(b>=u?delete o.minimum:delete o.exclusiveMinimum)),typeof p=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(o.maximum=p,o.exclusiveMaximum=!0):o.exclusiveMaximum=p),typeof d=="number"&&(o.maximum=d,typeof p=="number"&&n.target!=="draft-04"&&(p<=d?delete o.maximum:delete o.exclusiveMaximum)),typeof g=="number"&&(o.multipleOf=g)},U2=(t,n,a,l)=>{a.type="boolean"},$2=(t,n,a,l)=>{a.not={}},B2=(t,n,a,l)=>{},Z2=(t,n,a,l)=>{const o=t._zod.def,u=D0(o.entries);u.every(d=>typeof d=="number")&&(a.type="number"),u.every(d=>typeof d=="string")&&(a.type="string"),a.enum=u},q2=(t,n,a,l)=>{const o=t._zod.def,u=[];for(const d of o.values)if(d===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof d=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");u.push(Number(d))}else u.push(d);if(u.length!==0)if(u.length===1){const d=u[0];a.type=d===null?"null":typeof d,n.target==="draft-04"||n.target==="openapi-3.0"?a.enum=[d]:a.const=d}else u.every(d=>typeof d=="number")&&(a.type="number"),u.every(d=>typeof d=="string")&&(a.type="string"),u.every(d=>typeof d=="boolean")&&(a.type="boolean"),u.every(d=>d===null)&&(a.type="null"),a.enum=u},H2=(t,n,a,l)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},I2=(t,n,a,l)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},G2=(t,n,a,l)=>{const o=a,u=t._zod.def,{minimum:d,maximum:m}=t._zod.bag;typeof d=="number"&&(o.minItems=d),typeof m=="number"&&(o.maxItems=m),o.type="array",o.items=gt(u.element,n,{...l,path:[...l.path,"items"]})},K2=(t,n,a,l)=>{const o=a,u=t._zod.def;o.type="object",o.properties={};const d=u.shape;for(const p in d)o.properties[p]=gt(d[p],n,{...l,path:[...l.path,"properties",p]});const m=new Set(Object.keys(d)),g=new Set([...m].filter(p=>{const b=u.shape[p]._zod;return n.io==="input"?b.optin===void 0:b.optout===void 0}));g.size>0&&(o.required=Array.from(g)),u.catchall?._zod.def.type==="never"?o.additionalProperties=!1:u.catchall?u.catchall&&(o.additionalProperties=gt(u.catchall,n,{...l,path:[...l.path,"additionalProperties"]})):n.io==="output"&&(o.additionalProperties=!1)},Y2=(t,n,a,l)=>{const o=t._zod.def,u=o.inclusive===!1,d=o.options.map((m,g)=>gt(m,n,{...l,path:[...l.path,u?"oneOf":"anyOf",g]}));u?a.oneOf=d:a.anyOf=d},V2=(t,n,a,l)=>{const o=t._zod.def,u=gt(o.left,n,{...l,path:[...l.path,"allOf",0]}),d=gt(o.right,n,{...l,path:[...l.path,"allOf",1]}),m=p=>"allOf"in p&&Object.keys(p).length===1,g=[...m(u)?u.allOf:[u],...m(d)?d.allOf:[d]];a.allOf=g},P2=(t,n,a,l)=>{const o=a,u=t._zod.def;o.type="object";const d=u.keyType,g=d._zod.bag?.patterns;if(u.mode==="loose"&&g&&g.size>0){const b=gt(u.valueType,n,{...l,path:[...l.path,"patternProperties","*"]});o.patternProperties={};for(const v of g)o.patternProperties[v.source]=b}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(o.propertyNames=gt(u.keyType,n,{...l,path:[...l.path,"propertyNames"]})),o.additionalProperties=gt(u.valueType,n,{...l,path:[...l.path,"additionalProperties"]});const p=d._zod.values;if(p){const b=[...p].filter(v=>typeof v=="string"||typeof v=="number");b.length>0&&(o.required=b)}},Q2=(t,n,a,l)=>{const o=t._zod.def,u=gt(o.innerType,n,l),d=n.seen.get(t);n.target==="openapi-3.0"?(d.ref=o.innerType,a.nullable=!0):a.anyOf=[u,{type:"null"}]},X2=(t,n,a,l)=>{const o=t._zod.def;gt(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType},J2=(t,n,a,l)=>{const o=t._zod.def;gt(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType,a.default=JSON.parse(JSON.stringify(o.defaultValue))},F2=(t,n,a,l)=>{const o=t._zod.def;gt(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType,n.io==="input"&&(a._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},W2=(t,n,a,l)=>{const o=t._zod.def;gt(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType;let d;try{d=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}a.default=d},ez=(t,n,a,l)=>{const o=t._zod.def,u=n.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;gt(u,n,l);const d=n.seen.get(t);d.ref=u},tz=(t,n,a,l)=>{const o=t._zod.def;gt(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType,a.readOnly=!0},nb=(t,n,a,l)=>{const o=t._zod.def;gt(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType},nz=J("ZodISODateTime",(t,n)=>{i_.init(t,n),it.init(t,n)});function iz(t){return c2(nz,t)}const az=J("ZodISODate",(t,n)=>{a_.init(t,n),it.init(t,n)});function sz(t){return u2(az,t)}const lz=J("ZodISOTime",(t,n)=>{s_.init(t,n),it.init(t,n)});function rz(t){return d2(lz,t)}const oz=J("ZodISODuration",(t,n)=>{l_.init(t,n),it.init(t,n)});function cz(t){return f2(oz,t)}const uz=(t,n)=>{U0.init(t,n),t.name="ZodError",Object.defineProperties(t,{format:{value:a=>XN(t,a)},flatten:{value:a=>QN(t,a)},addIssue:{value:a=>{t.issues.push(a),t.message=JSON.stringify(t.issues,Wd,2)}},addIssues:{value:a=>{t.issues.push(...a),t.message=JSON.stringify(t.issues,Wd,2)}},isEmpty:{get(){return t.issues.length===0}}})},pn=J("ZodError",uz,{Parent:Error}),dz=$f(pn),fz=Bf(pn),hz=Wo(pn),mz=ec(pn),pz=WN(pn),gz=ek(pn),yz=tk(pn),vz=nk(pn),bz=ik(pn),xz=ak(pn),Sz=sk(pn),wz=lk(pn),nt=J("ZodType",(t,n)=>(tt.init(t,n),Object.assign(t["~standard"],{jsonSchema:{input:Do(t,"input"),output:Do(t,"output")}}),t.toJSONSchema=D2(t,{}),t.def=n,t.type=n.type,Object.defineProperty(t,"_def",{value:n}),t.check=(...a)=>t.clone(Zi(n,{checks:[...n.checks??[],...a.map(l=>typeof l=="function"?{_zod:{check:l,def:{check:"custom"},onattach:[]}}:l)]}),{parent:!0}),t.with=t.check,t.clone=(a,l)=>qi(t,a,l),t.brand=()=>t,t.register=((a,l)=>(a.add(t,l),t)),t.parse=(a,l)=>dz(t,a,l,{callee:t.parse}),t.safeParse=(a,l)=>hz(t,a,l),t.parseAsync=async(a,l)=>fz(t,a,l,{callee:t.parseAsync}),t.safeParseAsync=async(a,l)=>mz(t,a,l),t.spa=t.safeParseAsync,t.encode=(a,l)=>pz(t,a,l),t.decode=(a,l)=>gz(t,a,l),t.encodeAsync=async(a,l)=>yz(t,a,l),t.decodeAsync=async(a,l)=>vz(t,a,l),t.safeEncode=(a,l)=>bz(t,a,l),t.safeDecode=(a,l)=>xz(t,a,l),t.safeEncodeAsync=async(a,l)=>Sz(t,a,l),t.safeDecodeAsync=async(a,l)=>wz(t,a,l),t.refine=(a,l)=>t.check(gC(a,l)),t.superRefine=a=>t.check(yC(a)),t.overwrite=a=>t.check(Es(a)),t.optional=()=>Gy(t),t.exactOptional=()=>iC(t),t.nullable=()=>Ky(t),t.nullish=()=>Gy(Ky(t)),t.nonoptional=a=>cC(t,a),t.array=()=>wt(t),t.or=a=>Qz([t,a]),t.and=a=>Jz(t,a),t.transform=a=>Yy(t,tC(a)),t.default=a=>lC(t,a),t.prefault=a=>oC(t,a),t.catch=a=>dC(t,a),t.pipe=a=>Yy(t,a),t.readonly=()=>mC(t),t.describe=a=>{const l=t.clone();return zl.add(l,{description:a}),l},Object.defineProperty(t,"description",{get(){return zl.get(t)?.description},configurable:!0}),t.meta=(...a)=>{if(a.length===0)return zl.get(t);const l=t.clone();return zl.add(l,a[0]),l},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=a=>a(t),t)),ib=J("_ZodString",(t,n)=>{Zf.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(l,o,u)=>M2(t,l,o);const a=t._zod.bag;t.format=a.format??null,t.minLength=a.minimum??null,t.maxLength=a.maximum??null,t.regex=(...l)=>t.check(v2(...l)),t.includes=(...l)=>t.check(S2(...l)),t.startsWith=(...l)=>t.check(w2(...l)),t.endsWith=(...l)=>t.check(j2(...l)),t.min=(...l)=>t.check(To(...l)),t.max=(...l)=>t.check(J0(...l)),t.length=(...l)=>t.check(F0(...l)),t.nonempty=(...l)=>t.check(To(1,...l)),t.lowercase=l=>t.check(b2(l)),t.uppercase=l=>t.check(x2(l)),t.trim=()=>t.check(k2()),t.normalize=(...l)=>t.check(N2(...l)),t.toLowerCase=()=>t.check(_2()),t.toUpperCase=()=>t.check(z2()),t.slugify=()=>t.check(C2())}),jz=J("ZodString",(t,n)=>{Zf.init(t,n),ib.init(t,n),t.email=a=>t.check(H_(Nz,a)),t.url=a=>t.check(V_(kz,a)),t.jwt=a=>t.check(o2(Zz,a)),t.emoji=a=>t.check(P_(_z,a)),t.guid=a=>t.check($y(Hy,a)),t.uuid=a=>t.check(I_(yo,a)),t.uuidv4=a=>t.check(G_(yo,a)),t.uuidv6=a=>t.check(K_(yo,a)),t.uuidv7=a=>t.check(Y_(yo,a)),t.nanoid=a=>t.check(Q_(zz,a)),t.guid=a=>t.check($y(Hy,a)),t.cuid=a=>t.check(X_(Cz,a)),t.cuid2=a=>t.check(J_(Ez,a)),t.ulid=a=>t.check(F_(Az,a)),t.base64=a=>t.check(s2(Uz,a)),t.base64url=a=>t.check(l2($z,a)),t.xid=a=>t.check(W_(Oz,a)),t.ksuid=a=>t.check(e2(Tz,a)),t.ipv4=a=>t.check(t2(Dz,a)),t.ipv6=a=>t.check(n2(Rz,a)),t.cidrv4=a=>t.check(i2(Mz,a)),t.cidrv6=a=>t.check(a2(Lz,a)),t.e164=a=>t.check(r2(Bz,a)),t.datetime=a=>t.check(iz(a)),t.date=a=>t.check(sz(a)),t.time=a=>t.check(rz(a)),t.duration=a=>t.check(cz(a))});function ie(t){return q_(jz,t)}const it=J("ZodStringFormat",(t,n)=>{et.init(t,n),ib.init(t,n)}),Nz=J("ZodEmail",(t,n)=>{Pk.init(t,n),it.init(t,n)}),Hy=J("ZodGUID",(t,n)=>{Yk.init(t,n),it.init(t,n)}),yo=J("ZodUUID",(t,n)=>{Vk.init(t,n),it.init(t,n)}),kz=J("ZodURL",(t,n)=>{Qk.init(t,n),it.init(t,n)}),_z=J("ZodEmoji",(t,n)=>{Xk.init(t,n),it.init(t,n)}),zz=J("ZodNanoID",(t,n)=>{Jk.init(t,n),it.init(t,n)}),Cz=J("ZodCUID",(t,n)=>{Fk.init(t,n),it.init(t,n)}),Ez=J("ZodCUID2",(t,n)=>{Wk.init(t,n),it.init(t,n)}),Az=J("ZodULID",(t,n)=>{e_.init(t,n),it.init(t,n)}),Oz=J("ZodXID",(t,n)=>{t_.init(t,n),it.init(t,n)}),Tz=J("ZodKSUID",(t,n)=>{n_.init(t,n),it.init(t,n)}),Dz=J("ZodIPv4",(t,n)=>{r_.init(t,n),it.init(t,n)}),Rz=J("ZodIPv6",(t,n)=>{o_.init(t,n),it.init(t,n)}),Mz=J("ZodCIDRv4",(t,n)=>{c_.init(t,n),it.init(t,n)}),Lz=J("ZodCIDRv6",(t,n)=>{u_.init(t,n),it.init(t,n)}),Uz=J("ZodBase64",(t,n)=>{d_.init(t,n),it.init(t,n)}),$z=J("ZodBase64URL",(t,n)=>{h_.init(t,n),it.init(t,n)}),Bz=J("ZodE164",(t,n)=>{m_.init(t,n),it.init(t,n)}),Zz=J("ZodJWT",(t,n)=>{g_.init(t,n),it.init(t,n)}),ab=J("ZodNumber",(t,n)=>{V0.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(l,o,u)=>L2(t,l,o),t.gt=(l,o)=>t.check(Zy(l,o)),t.gte=(l,o)=>t.check(qd(l,o)),t.min=(l,o)=>t.check(qd(l,o)),t.lt=(l,o)=>t.check(By(l,o)),t.lte=(l,o)=>t.check(Zd(l,o)),t.max=(l,o)=>t.check(Zd(l,o)),t.int=l=>t.check(Iy(l)),t.safe=l=>t.check(Iy(l)),t.positive=l=>t.check(Zy(0,l)),t.nonnegative=l=>t.check(qd(0,l)),t.negative=l=>t.check(By(0,l)),t.nonpositive=l=>t.check(Zd(0,l)),t.multipleOf=(l,o)=>t.check(qy(l,o)),t.step=(l,o)=>t.check(qy(l,o)),t.finite=()=>t;const a=t._zod.bag;t.minValue=Math.max(a.minimum??Number.NEGATIVE_INFINITY,a.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(a.maximum??Number.POSITIVE_INFINITY,a.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(a.format??"").includes("int")||Number.isSafeInteger(a.multipleOf??.5),t.isFinite=!0,t.format=a.format??null});function Mi(t){return h2(ab,t)}const qz=J("ZodNumberFormat",(t,n)=>{y_.init(t,n),ab.init(t,n)});function Iy(t){return m2(qz,t)}const Hz=J("ZodBoolean",(t,n)=>{v_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>U2(t,a,l)});function qf(t){return p2(Hz,t)}const Iz=J("ZodUnknown",(t,n)=>{b_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>B2()});function tf(){return g2(Iz)}const Gz=J("ZodNever",(t,n)=>{x_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>$2(t,a,l)});function Kz(t){return y2(Gz,t)}const Yz=J("ZodArray",(t,n)=>{S_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>G2(t,a,l,o),t.element=n.element,t.min=(a,l)=>t.check(To(a,l)),t.nonempty=a=>t.check(To(1,a)),t.max=(a,l)=>t.check(J0(a,l)),t.length=(a,l)=>t.check(F0(a,l)),t.unwrap=()=>t.element});function wt(t,n){return E2(Yz,t,n)}const Vz=J("ZodObject",(t,n)=>{j_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>K2(t,a,l,o),He(t,"shape",()=>n.shape),t.keyof=()=>Cn(Object.keys(t._zod.def.shape)),t.catchall=a=>t.clone({...t._zod.def,catchall:a}),t.passthrough=()=>t.clone({...t._zod.def,catchall:tf()}),t.loose=()=>t.clone({...t._zod.def,catchall:tf()}),t.strict=()=>t.clone({...t._zod.def,catchall:Kz()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=a=>GN(t,a),t.safeExtend=a=>KN(t,a),t.merge=a=>YN(t,a),t.pick=a=>HN(t,a),t.omit=a=>IN(t,a),t.partial=(...a)=>VN(lb,t,a[0]),t.required=(...a)=>PN(rb,t,a[0])});function bt(t,n){const a={type:"object",shape:t??{},...ve(n)};return new Vz(a)}const Pz=J("ZodUnion",(t,n)=>{N_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>Y2(t,a,l,o),t.options=n.options});function Qz(t,n){return new Pz({type:"union",options:t,...ve(n)})}const Xz=J("ZodIntersection",(t,n)=>{k_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>V2(t,a,l,o)});function Jz(t,n){return new Xz({type:"intersection",left:t,right:n})}const Fz=J("ZodRecord",(t,n)=>{__.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>P2(t,a,l,o),t.keyType=n.keyType,t.valueType=n.valueType});function sb(t,n,a){return new Fz({type:"record",keyType:t,valueType:n,...ve(a)})}const nf=J("ZodEnum",(t,n)=>{z_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(l,o,u)=>Z2(t,l,o),t.enum=n.entries,t.options=Object.values(n.entries);const a=new Set(Object.keys(n.entries));t.extract=(l,o)=>{const u={};for(const d of l)if(a.has(d))u[d]=n.entries[d];else throw new Error(`Key ${d} not found in enum`);return new nf({...n,checks:[],...ve(o),entries:u})},t.exclude=(l,o)=>{const u={...n.entries};for(const d of l)if(a.has(d))delete u[d];else throw new Error(`Key ${d} not found in enum`);return new nf({...n,checks:[],...ve(o),entries:u})}});function Cn(t,n){const a=Array.isArray(t)?Object.fromEntries(t.map(l=>[l,l])):t;return new nf({type:"enum",entries:a,...ve(n)})}const Wz=J("ZodLiteral",(t,n)=>{C_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>q2(t,a,l),t.values=new Set(n.values),Object.defineProperty(t,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function Ro(t,n){return new Wz({type:"literal",values:Array.isArray(t)?t:[t],...ve(n)})}const eC=J("ZodTransform",(t,n)=>{E_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>I2(t,a),t._zod.parse=(a,l)=>{if(l.direction==="backward")throw new O0(t.constructor.name);a.addIssue=u=>{if(typeof u=="string")a.issues.push(Rl(u,a.value,n));else{const d=u;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=a.value),d.inst??(d.inst=t),a.issues.push(Rl(d))}};const o=n.transform(a.value,a);return o instanceof Promise?o.then(u=>(a.value=u,a)):(a.value=o,a)}});function tC(t){return new eC({type:"transform",transform:t})}const lb=J("ZodOptional",(t,n)=>{X0.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>nb(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function Gy(t){return new lb({type:"optional",innerType:t})}const nC=J("ZodExactOptional",(t,n)=>{A_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>nb(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function iC(t){return new nC({type:"optional",innerType:t})}const aC=J("ZodNullable",(t,n)=>{O_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>Q2(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function Ky(t){return new aC({type:"nullable",innerType:t})}const sC=J("ZodDefault",(t,n)=>{T_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>J2(t,a,l,o),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function lC(t,n){return new sC({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():M0(n)}})}const rC=J("ZodPrefault",(t,n)=>{D_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>F2(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function oC(t,n){return new rC({type:"prefault",innerType:t,get defaultValue(){return typeof n=="function"?n():M0(n)}})}const rb=J("ZodNonOptional",(t,n)=>{R_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>X2(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function cC(t,n){return new rb({type:"nonoptional",innerType:t,...ve(n)})}const uC=J("ZodCatch",(t,n)=>{M_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>W2(t,a,l,o),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function dC(t,n){return new uC({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}const fC=J("ZodPipe",(t,n)=>{L_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>ez(t,a,l,o),t.in=n.in,t.out=n.out});function Yy(t,n){return new fC({type:"pipe",in:t,out:n})}const hC=J("ZodReadonly",(t,n)=>{U_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>tz(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function mC(t){return new hC({type:"readonly",innerType:t})}const pC=J("ZodCustom",(t,n)=>{$_.init(t,n),nt.init(t,n),t._zod.processJSONSchema=(a,l,o)=>H2(t,a)});function gC(t,n={}){return A2(pC,t,n)}function yC(t){return O2(t)}bt({maxConcurrency:Mi().int().positive(),maxRequestsPerMinute:Mi().int().positive(),maxRequestsPerDay:Mi().int().positive()});const vC=["gemini","openai","claude","local"],nc=Cn(vC),ob=Cn(["citation.lost","citation.gained","run.completed","run.failed"]);bt({id:ie(),projectId:ie(),channel:Ro("webhook"),url:ie().url(),events:wt(ob),enabled:qf().default(!0),webhookSecret:ie().optional(),createdAt:ie(),updatedAt:ie()});const bC=bt({name:ie().min(1).max(63).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,{message:"Name must be a lowercase slug (letters, numbers, hyphens)"}),labels:sb(ie(),ie()).optional().default({})}),xC=bt({preset:ie().optional(),cron:ie().optional(),timezone:ie().optional().default("UTC"),providers:wt(nc).optional().default([])}).refine(t=>t.preset&&!t.cron||!t.preset&&t.cron,{message:'Exactly one of "preset" or "cron" must be provided'}).optional(),SC=bt({channel:Ro("webhook"),url:ie().url(),events:wt(ob).min(1)}),wC=bt({gsc:bt({propertyUrl:ie()}).optional(),syncSchedule:bt({preset:ie().optional(),cron:ie().optional()}).optional()}).optional(),jC=bt({displayName:ie().min(1),canonicalDomain:ie().min(1),ownedDomains:wt(ie().min(1)).optional().default([]),country:ie().length(2),language:ie().min(2),keywords:wt(ie().min(1)).optional().default([]),competitors:wt(ie().min(1)).optional().default([]),providers:wt(nc).optional().default([]),schedule:xC,notifications:wt(SC).optional().default([]),google:wC});bt({apiVersion:Ro("canonry/v1"),kind:Ro("Project"),metadata:bC,spec:jC});const NC=Cn(["gsc","ga4"]);bt({id:ie(),domain:ie(),connectionType:NC,propertyId:ie().nullable().optional(),scopes:wt(ie()).default([]),createdAt:ie(),updatedAt:ie()});bt({date:ie(),query:ie(),page:ie(),country:ie().nullable().optional(),device:ie().nullable().optional(),clicks:Mi(),impressions:Mi(),ctr:Mi(),position:Mi()});bt({id:ie(),url:ie(),indexingState:ie().nullable().optional(),verdict:ie().nullable().optional(),coverageState:ie().nullable().optional(),pageFetchState:ie().nullable().optional(),robotsTxtState:ie().nullable().optional(),crawlTime:ie().nullable().optional(),lastCrawlResult:ie().nullable().optional(),isMobileFriendly:qf().nullable().optional(),richResults:wt(ie()).default([]),inspectedAt:ie()});Cn(["stable","reindexed","deindexed","still-missing","new"]);const kC=Cn(["cli","api","config-file"]);bt({id:ie(),name:ie(),displayName:ie().optional(),canonicalDomain:ie(),ownedDomains:wt(ie()).default([]),country:ie().length(2),language:ie().min(2),tags:wt(ie()).default([]),labels:sb(ie(),ie()).default({}),configSource:kC.default("cli"),configRevision:Mi().int().positive().default(1),createdAt:ie().optional(),updatedAt:ie().optional()});function af(t){let n=t.trim().toLowerCase();try{n.includes("://")&&(n=new URL(n).hostname.toLowerCase())}catch{}return n.replace(/^www\./,"")}function _C(t){const n=[t.canonicalDomain,...t.ownedDomains??[]],a=new Set,l=[];for(const o of n){const u=o.trim();if(!u)continue;const d=af(u);a.has(d)||(a.add(d),l.push(u))}return l}const zC=Cn(["queued","running","completed","partial","failed"]),CC=Cn(["answer-visibility","site-audit","gsc-sync"]),EC=Cn(["manual","scheduled","config-apply"]),AC=Cn(["cited","not-cited"]),OC=Cn(["new","cited","lost","emerging","not-cited"]);bt({id:ie(),projectId:ie(),kind:CC,status:zC,trigger:EC.default("manual"),startedAt:ie().nullable().optional(),finishedAt:ie().nullable().optional(),error:ie().nullable().optional(),createdAt:ie()});const TC=bt({uri:ie(),title:ie()});bt({id:ie(),runId:ie(),keywordId:ie(),keyword:ie().optional(),provider:nc,citationState:AC,transition:OC.optional(),answerText:ie().nullable().optional(),citedDomains:wt(ie()).default([]),competitorOverlap:wt(ie()).default([]),groundingSources:wt(TC).default([]),searchQueries:wt(ie()).default([]),model:ie().nullable().optional(),createdAt:ie()});bt({id:ie(),projectId:ie().nullable().optional(),actor:ie(),action:ie(),entityType:ie(),entityId:ie().nullable().optional(),diff:tf().optional(),createdAt:ie()});bt({id:ie(),projectId:ie(),cronExpr:ie(),preset:ie().nullable().optional(),timezone:ie().default("UTC"),enabled:qf().default(!0),providers:wt(nc).default([]),lastRunAt:ie().nullable().optional(),nextRunAt:ie().nullable().optional(),createdAt:ie(),updatedAt:ie()});function cb(t){var n,a,l="";if(typeof t=="string"||typeof t=="number")l+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(n=0;n<o;n++)t[n]&&(a=cb(t[n]))&&(l&&(l+=" "),l+=a)}else for(a in t)t[a]&&(l&&(l+=" "),l+=a);return l}function ub(){for(var t,n,a=0,l="",o=arguments.length;a<o;a++)(t=arguments[a])&&(n=cb(t))&&(l&&(l+=" "),l+=n);return l}const Vy=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Py=ub,db=(t,n)=>a=>{var l;if(n?.variants==null)return Py(t,a?.class,a?.className);const{variants:o,defaultVariants:u}=n,d=Object.keys(o).map(p=>{const b=a?.[p],v=u?.[p];if(b===null)return null;const x=Vy(b)||Vy(v);return o[p][x]}),m=a&&Object.entries(a).reduce((p,b)=>{let[v,x]=b;return x===void 0||(p[v]=x),p},{}),g=n==null||(l=n.compoundVariants)===null||l===void 0?void 0:l.reduce((p,b)=>{let{class:v,className:x,...N}=b;return Object.entries(N).every(z=>{let[j,k]=z;return Array.isArray(k)?k.includes({...u,...m}[j]):{...u,...m}[j]===k})?[...p,v,x]:p},[]);return Py(t,d,g,a?.class,a?.className)},DC=(t,n)=>{const a=new Array(t.length+n.length);for(let l=0;l<t.length;l++)a[l]=t[l];for(let l=0;l<n.length;l++)a[t.length+l]=n[l];return a},RC=(t,n)=>({classGroupId:t,validator:n}),fb=(t=new Map,n=null,a)=>({nextPart:t,validators:n,classGroupId:a}),Mo="-",Qy=[],MC="arbitrary..",LC=t=>{const n=$C(t),{conflictingClassGroups:a,conflictingClassGroupModifiers:l}=t;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return UC(d);const m=d.split(Mo),g=m[0]===""&&m.length>1?1:0;return hb(m,g,n)},getConflictingClassGroupIds:(d,m)=>{if(m){const g=l[d],p=a[d];return g?p?DC(p,g):g:p||Qy}return a[d]||Qy}}},hb=(t,n,a)=>{if(t.length-n===0)return a.classGroupId;const o=t[n],u=a.nextPart.get(o);if(u){const p=hb(t,n+1,u);if(p)return p}const d=a.validators;if(d===null)return;const m=n===0?t.join(Mo):t.slice(n).join(Mo),g=d.length;for(let p=0;p<g;p++){const b=d[p];if(b.validator(m))return b.classGroupId}},UC=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=t.slice(1,-1),a=n.indexOf(":"),l=n.slice(0,a);return l?MC+l:void 0})(),$C=t=>{const{theme:n,classGroups:a}=t;return BC(a,n)},BC=(t,n)=>{const a=fb();for(const l in t){const o=t[l];Hf(o,a,l,n)}return a},Hf=(t,n,a,l)=>{const o=t.length;for(let u=0;u<o;u++){const d=t[u];ZC(d,n,a,l)}},ZC=(t,n,a,l)=>{if(typeof t=="string"){qC(t,n,a);return}if(typeof t=="function"){HC(t,n,a,l);return}IC(t,n,a,l)},qC=(t,n,a)=>{const l=t===""?n:mb(n,t);l.classGroupId=a},HC=(t,n,a,l)=>{if(GC(t)){Hf(t(l),n,a,l);return}n.validators===null&&(n.validators=[]),n.validators.push(RC(a,t))},IC=(t,n,a,l)=>{const o=Object.entries(t),u=o.length;for(let d=0;d<u;d++){const[m,g]=o[d];Hf(g,mb(n,m),a,l)}},mb=(t,n)=>{let a=t;const l=n.split(Mo),o=l.length;for(let u=0;u<o;u++){const d=l[u];let m=a.nextPart.get(d);m||(m=fb(),a.nextPart.set(d,m)),a=m}return a},GC=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,KC=t=>{if(t<1)return{get:()=>{},set:()=>{}};let n=0,a=Object.create(null),l=Object.create(null);const o=(u,d)=>{a[u]=d,n++,n>t&&(n=0,l=a,a=Object.create(null))};return{get(u){let d=a[u];if(d!==void 0)return d;if((d=l[u])!==void 0)return o(u,d),d},set(u,d){u in a?a[u]=d:o(u,d)}}},sf="!",Xy=":",YC=[],Jy=(t,n,a,l,o)=>({modifiers:t,hasImportantModifier:n,baseClassName:a,maybePostfixModifierPosition:l,isExternal:o}),VC=t=>{const{prefix:n,experimentalParseClassName:a}=t;let l=o=>{const u=[];let d=0,m=0,g=0,p;const b=o.length;for(let j=0;j<b;j++){const k=o[j];if(d===0&&m===0){if(k===Xy){u.push(o.slice(g,j)),g=j+1;continue}if(k==="/"){p=j;continue}}k==="["?d++:k==="]"?d--:k==="("?m++:k===")"&&m--}const v=u.length===0?o:o.slice(g);let x=v,N=!1;v.endsWith(sf)?(x=v.slice(0,-1),N=!0):v.startsWith(sf)&&(x=v.slice(1),N=!0);const z=p&&p>g?p-g:void 0;return Jy(u,N,x,z)};if(n){const o=n+Xy,u=l;l=d=>d.startsWith(o)?u(d.slice(o.length)):Jy(YC,!1,d,void 0,!0)}if(a){const o=l;l=u=>a({className:u,parseClassName:o})}return l},PC=t=>{const n=new Map;return t.orderSensitiveModifiers.forEach((a,l)=>{n.set(a,1e6+l)}),a=>{const l=[];let o=[];for(let u=0;u<a.length;u++){const d=a[u],m=d[0]==="[",g=n.has(d);m||g?(o.length>0&&(o.sort(),l.push(...o),o=[]),l.push(d)):o.push(d)}return o.length>0&&(o.sort(),l.push(...o)),l}},QC=t=>({cache:KC(t.cacheSize),parseClassName:VC(t),sortModifiers:PC(t),...LC(t)}),XC=/\s+/,JC=(t,n)=>{const{parseClassName:a,getClassGroupId:l,getConflictingClassGroupIds:o,sortModifiers:u}=n,d=[],m=t.trim().split(XC);let g="";for(let p=m.length-1;p>=0;p-=1){const b=m[p],{isExternal:v,modifiers:x,hasImportantModifier:N,baseClassName:z,maybePostfixModifierPosition:j}=a(b);if(v){g=b+(g.length>0?" "+g:g);continue}let k=!!j,A=l(k?z.substring(0,j):z);if(!A){if(!k){g=b+(g.length>0?" "+g:g);continue}if(A=l(z),!A){g=b+(g.length>0?" "+g:g);continue}k=!1}const T=x.length===0?"":x.length===1?x[0]:u(x).join(":"),O=N?T+sf:T,R=O+A;if(d.indexOf(R)>-1)continue;d.push(R);const L=o(A,k);for(let H=0;H<L.length;++H){const K=L[H];d.push(O+K)}g=b+(g.length>0?" "+g:g)}return g},FC=(...t)=>{let n=0,a,l,o="";for(;n<t.length;)(a=t[n++])&&(l=pb(a))&&(o&&(o+=" "),o+=l);return o},pb=t=>{if(typeof t=="string")return t;let n,a="";for(let l=0;l<t.length;l++)t[l]&&(n=pb(t[l]))&&(a&&(a+=" "),a+=n);return a},WC=(t,...n)=>{let a,l,o,u;const d=g=>{const p=n.reduce((b,v)=>v(b),t());return a=QC(p),l=a.cache.get,o=a.cache.set,u=m,m(g)},m=g=>{const p=l(g);if(p)return p;const b=JC(g,a);return o(g,b),b};return u=d,(...g)=>u(FC(...g))},eE=[],vt=t=>{const n=a=>a[t]||eE;return n.isThemeGetter=!0,n},gb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,yb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,tE=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,nE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iE=/\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$/,aE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,sE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ai=t=>tE.test(t),ze=t=>!!t&&!Number.isNaN(Number(t)),Oi=t=>!!t&&Number.isInteger(Number(t)),Hd=t=>t.endsWith("%")&&ze(t.slice(0,-1)),ti=t=>nE.test(t),vb=()=>!0,rE=t=>iE.test(t)&&!aE.test(t),If=()=>!1,oE=t=>sE.test(t),cE=t=>lE.test(t),uE=t=>!he(t)&&!pe(t),dE=t=>Hi(t,Sb,If),he=t=>gb.test(t),ua=t=>Hi(t,wb,rE),Fy=t=>Hi(t,bE,ze),fE=t=>Hi(t,Nb,vb),hE=t=>Hi(t,jb,If),Wy=t=>Hi(t,bb,If),mE=t=>Hi(t,xb,cE),vo=t=>Hi(t,kb,oE),pe=t=>yb.test(t),kl=t=>ba(t,wb),pE=t=>ba(t,jb),ev=t=>ba(t,bb),gE=t=>ba(t,Sb),yE=t=>ba(t,xb),bo=t=>ba(t,kb,!0),vE=t=>ba(t,Nb,!0),Hi=(t,n,a)=>{const l=gb.exec(t);return l?l[1]?n(l[1]):a(l[2]):!1},ba=(t,n,a=!1)=>{const l=yb.exec(t);return l?l[1]?n(l[1]):a:!1},bb=t=>t==="position"||t==="percentage",xb=t=>t==="image"||t==="url",Sb=t=>t==="length"||t==="size"||t==="bg-size",wb=t=>t==="length",bE=t=>t==="number",jb=t=>t==="family-name",Nb=t=>t==="number"||t==="weight",kb=t=>t==="shadow",xE=()=>{const t=vt("color"),n=vt("font"),a=vt("text"),l=vt("font-weight"),o=vt("tracking"),u=vt("leading"),d=vt("breakpoint"),m=vt("container"),g=vt("spacing"),p=vt("radius"),b=vt("shadow"),v=vt("inset-shadow"),x=vt("text-shadow"),N=vt("drop-shadow"),z=vt("blur"),j=vt("perspective"),k=vt("aspect"),A=vt("ease"),T=vt("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...R(),pe,he],H=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto","contain","none"],D=()=>[pe,he,g],P=()=>[Ai,"full","auto",...D()],xe=()=>[Oi,"none","subgrid",pe,he],Q=()=>["auto",{span:["full",Oi,pe,he]},Oi,pe,he],oe=()=>[Oi,"auto",pe,he],$e=()=>["auto","min","max","fr",pe,he],Qe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],me=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...D()],F=()=>[Ai,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],le=()=>[Ai,"screen","full","dvw","lvw","svw","min","max","fit",...D()],ye=()=>[Ai,"screen","full","lh","dvh","lvh","svh","min","max","fit",...D()],ee=()=>[t,pe,he],C=()=>[...R(),ev,Wy,{position:[pe,he]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],te=()=>["auto","cover","contain",gE,dE,{size:[pe,he]}],ae=()=>[Hd,kl,ua],ce=()=>["","none","full",p,pe,he],fe=()=>["",ze,kl,ua],q=()=>["solid","dashed","dotted","double"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[ze,Hd,ev,Wy],Ie=()=>["","none",z,pe,he],Be=()=>["none",ze,pe,he],Re=()=>["none",ze,pe,he],yn=()=>[ze,pe,he],jt=()=>[Ai,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ti],breakpoint:[ti],color:[vb],container:[ti],"drop-shadow":[ti],ease:["in","out","in-out"],font:[uE],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ti],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ti],shadow:[ti],spacing:["px",ze],text:[ti],"text-shadow":[ti],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ai,he,pe,k]}],container:["container"],columns:[{columns:[ze,he,pe,m]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:K()}],"overscroll-x":[{"overscroll-x":K()}],"overscroll-y":[{"overscroll-y":K()}],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:[Oi,"auto",pe,he]}],basis:[{basis:[Ai,"full","auto",m,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,Ai,"auto","initial","none",he]}],grow:[{grow:["",ze,pe,he]}],shrink:[{shrink:["",ze,pe,he]}],order:[{order:[Oi,"first","last","none",pe,he]}],"grid-cols":[{"grid-cols":xe()}],"col-start-end":[{col:Q()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":xe()}],"row-start-end":[{row:Q()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$e()}],"auto-rows":[{"auto-rows":$e()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...Qe(),"normal"]}],"justify-items":[{"justify-items":[...me(),"normal"]}],"justify-self":[{"justify-self":["auto",...me()]}],"align-content":[{content:["normal",...Qe()]}],"align-items":[{items:[...me(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...me(),{baseline:["","last"]}]}],"place-content":[{"place-content":Qe()}],"place-items":[{"place-items":[...me(),"baseline"]}],"place-self":[{"place-self":["auto",...me()]}],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:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mbs:[{mbs:U()}],mbe:[{mbe:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],"inline-size":[{inline:["auto",...le()]}],"min-inline-size":[{"min-inline":["auto",...le()]}],"max-inline-size":[{"max-inline":["none",...le()]}],"block-size":[{block:["auto",...ye()]}],"min-block-size":[{"min-block":["auto",...ye()]}],"max-block-size":[{"max-block":["none",...ye()]}],w:[{w:[m,"screen",...F()]}],"min-w":[{"min-w":[m,"screen","none",...F()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",a,kl,ua]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,vE,fE]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Hd,he]}],"font-family":[{font:[pE,hE,n]}],"font-features":[{"font-features":[he]}],"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,pe,he]}],"line-clamp":[{"line-clamp":[ze,"none",pe,Fy]}],leading:[{leading:[u,...D()]}],"list-image":[{"list-image":["none",pe,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ee()}],"text-color":[{text:ee()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",pe,ua]}],"text-decoration-color":[{decoration:ee()}],"underline-offset":[{"underline-offset":[ze,"auto",pe,he]}],"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",pe,he]}],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",pe,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:C()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Oi,pe,he],radial:["",pe,he],conic:[Oi,pe,he]},yE,mE]}],"bg-color":[{bg:ee()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:ee()}],"gradient-via":[{via:ee()}],"gradient-to":[{to:ee()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...q(),"hidden","none"]}],"divide-style":[{divide:[...q(),"hidden","none"]}],"border-color":[{border:ee()}],"border-color-x":[{"border-x":ee()}],"border-color-y":[{"border-y":ee()}],"border-color-s":[{"border-s":ee()}],"border-color-e":[{"border-e":ee()}],"border-color-bs":[{"border-bs":ee()}],"border-color-be":[{"border-be":ee()}],"border-color-t":[{"border-t":ee()}],"border-color-r":[{"border-r":ee()}],"border-color-b":[{"border-b":ee()}],"border-color-l":[{"border-l":ee()}],"divide-color":[{divide:ee()}],"outline-style":[{outline:[...q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,pe,he]}],"outline-w":[{outline:["",ze,kl,ua]}],"outline-color":[{outline:ee()}],shadow:[{shadow:["","none",b,bo,vo]}],"shadow-color":[{shadow:ee()}],"inset-shadow":[{"inset-shadow":["none",v,bo,vo]}],"inset-shadow-color":[{"inset-shadow":ee()}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ee()}],"ring-offset-w":[{"ring-offset":[ze,ua]}],"ring-offset-color":[{"ring-offset":ee()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":ee()}],"text-shadow":[{"text-shadow":["none",x,bo,vo]}],"text-shadow-color":[{"text-shadow":ee()}],opacity:[{opacity:[ze,pe,he]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"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":[ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":ee()}],"mask-image-linear-to-color":[{"mask-linear-to":ee()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":ee()}],"mask-image-t-to-color":[{"mask-t-to":ee()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":ee()}],"mask-image-r-to-color":[{"mask-r-to":ee()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":ee()}],"mask-image-b-to-color":[{"mask-b-to":ee()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":ee()}],"mask-image-l-to-color":[{"mask-l-to":ee()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":ee()}],"mask-image-x-to-color":[{"mask-x-to":ee()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":ee()}],"mask-image-y-to-color":[{"mask-y-to":ee()}],"mask-image-radial":[{"mask-radial":[pe,he]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":ee()}],"mask-image-radial-to-color":[{"mask-radial-to":ee()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":ee()}],"mask-image-conic-to-color":[{"mask-conic-to":ee()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:C()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,he]}],filter:[{filter:["","none",pe,he]}],blur:[{blur:Ie()}],brightness:[{brightness:[ze,pe,he]}],contrast:[{contrast:[ze,pe,he]}],"drop-shadow":[{"drop-shadow":["","none",N,bo,vo]}],"drop-shadow-color":[{"drop-shadow":ee()}],grayscale:[{grayscale:["",ze,pe,he]}],"hue-rotate":[{"hue-rotate":[ze,pe,he]}],invert:[{invert:["",ze,pe,he]}],saturate:[{saturate:[ze,pe,he]}],sepia:[{sepia:["",ze,pe,he]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,he]}],"backdrop-blur":[{"backdrop-blur":Ie()}],"backdrop-brightness":[{"backdrop-brightness":[ze,pe,he]}],"backdrop-contrast":[{"backdrop-contrast":[ze,pe,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,pe,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,pe,he]}],"backdrop-invert":[{"backdrop-invert":["",ze,pe,he]}],"backdrop-opacity":[{"backdrop-opacity":[ze,pe,he]}],"backdrop-saturate":[{"backdrop-saturate":[ze,pe,he]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,pe,he]}],"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",pe,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ze,"initial",pe,he]}],ease:[{ease:["linear","initial",A,pe,he]}],delay:[{delay:[ze,pe,he]}],animate:[{animate:["none",T,pe,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,pe,he]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:Be()}],"rotate-x":[{"rotate-x":Be()}],"rotate-y":[{"rotate-y":Be()}],"rotate-z":[{"rotate-z":Be()}],scale:[{scale:Re()}],"scale-x":[{"scale-x":Re()}],"scale-y":[{"scale-y":Re()}],"scale-z":[{"scale-z":Re()}],"scale-3d":["scale-3d"],skew:[{skew:yn()}],"skew-x":[{"skew-x":yn()}],"skew-y":[{"skew-y":yn()}],transform:[{transform:[pe,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:jt()}],"translate-x":[{"translate-x":jt()}],"translate-y":[{"translate-y":jt()}],"translate-z":[{"translate-z":jt()}],"translate-none":["translate-none"],accent:[{accent:ee()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ee()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe,he]}],"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",pe,he]}],fill:[{fill:["none",...ee()]}],"stroke-w":[{stroke:[ze,kl,ua,Fy]}],stroke:[{stroke:["none",...ee()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},SE=WC(xE);function gn(...t){return SE(ub(t))}const wE=db("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 _b({className:t,variant:n,...a}){return c.jsx("div",{className:gn(wE({variant:n}),t),...a})}var jE=Symbol.for("react.lazy"),Lo=cf[" use ".trim().toString()];function NE(t){return typeof t=="object"&&t!==null&&"then"in t}function zb(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===jE&&"_payload"in t&&NE(t._payload)}function kE(t){const n=zE(t),a=w.forwardRef((l,o)=>{let{children:u,...d}=l;zb(u)&&typeof Lo=="function"&&(u=Lo(u._payload));const m=w.Children.toArray(u),g=m.find(EE);if(g){const p=g.props.children,b=m.map(v=>v===g?w.Children.count(p)>1?w.Children.only(null):w.isValidElement(p)?p.props.children:null:v);return c.jsx(n,{...d,ref:o,children:w.isValidElement(p)?w.cloneElement(p,void 0,b):null})}return c.jsx(n,{...d,ref:o,children:u})});return a.displayName=`${t}.Slot`,a}var _E=kE("Slot");function zE(t){const n=w.forwardRef((a,l)=>{let{children:o,...u}=a;if(zb(o)&&typeof Lo=="function"&&(o=Lo(o._payload)),w.isValidElement(o)){const d=OE(o),m=AE(u,o.props);return o.type!==w.Fragment&&(m.ref=l?kf(l,d):d),w.cloneElement(o,m)}return w.Children.count(o)>1?w.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var CE=Symbol("radix.slottable");function EE(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===CE}function AE(t,n){const a={...n};for(const l in n){const o=t[l],u=n[l];/^on[A-Z]/.test(l)?o&&u?a[l]=(...m)=>{const g=u(...m);return o(...m),g}:o&&(a[l]=o):l==="style"?a[l]={...o,...u}:l==="className"&&(a[l]=[o,u].filter(Boolean).join(" "))}return{...t,...a}}function OE(t){let n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?t.ref:(n=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}const TE=db("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"}}),ue=w.forwardRef(({className:t,variant:n,size:a,asChild:l=!1,...o},u)=>{const d=l?_E:"button";return c.jsx(d,{ref:u,className:gn(TE({variant:n,size:a,className:t})),...o})});ue.displayName="Button";const Ve=w.forwardRef(({className:t,...n},a)=>c.jsx("div",{ref:a,className:gn("rounded-xl border border-zinc-800 bg-zinc-950/75 shadow-[0_0_0_1px_rgba(255,255,255,0.01)] backdrop-blur",t),...n}));Ve.displayName="Card";const DE=w.forwardRef(({className:t,...n},a)=>c.jsx("div",{ref:a,className:gn("flex flex-col gap-1.5 p-5",t),...n}));DE.displayName="CardHeader";const RE=w.forwardRef(({className:t,...n},a)=>c.jsx("h3",{ref:a,className:gn("font-medium tracking-tight text-zinc-50",t),...n}));RE.displayName="CardTitle";const ME=w.forwardRef(({className:t,...n},a)=>c.jsx("p",{ref:a,className:gn("text-sm text-zinc-500",t),...n}));ME.displayName="CardDescription";const LE=w.forwardRef(({className:t,...n},a)=>c.jsx("div",{ref:a,className:gn("p-5 pt-0",t),...n}));LE.displayName="CardContent";const UE=_0,$E=z0,Cb=w.forwardRef(({className:t,...n},a)=>c.jsx(Ef,{ref:a,className:gn("fixed inset-0 z-50 bg-black/70 backdrop-blur-sm",t),...n}));Cb.displayName=Ef.displayName;const BE=400,ZE=1200,qE=720,Eb=w.forwardRef(({className:t,children:n,...a},l)=>{const[o,u]=w.useState(qE),d=w.useRef(!1),m=w.useRef(0),g=w.useRef(0),p=w.useCallback(x=>{d.current=!0,m.current=x.clientX,g.current=o,x.target.setPointerCapture(x.pointerId),x.preventDefault()},[o]),b=w.useCallback(x=>{if(!d.current)return;const N=m.current-x.clientX,z=Math.min(ZE,Math.max(BE,g.current+N));u(z)},[]),v=w.useCallback(()=>{d.current=!1},[]);return c.jsxs($E,{children:[c.jsx(Cb,{}),c.jsxs(Af,{ref:l,className:gn("fixed z-50 flex flex-col bg-zinc-950 px-5 py-4 shadow-2xl overflow-hidden","max-md:inset-x-0 max-md:bottom-0 max-md:top-auto max-md:max-h-[88vh] max-md:rounded-t-2xl max-md:border-t","md:inset-y-0 md:right-0 md:h-full md:border-l","border-zinc-800",t),style:{width:`min(${o}px, 100vw)`},...a,children:[c.jsx("div",{className:"absolute inset-y-0 left-0 w-1.5 cursor-col-resize hover:bg-zinc-700/50 active:bg-zinc-600/50 transition-colors max-md:hidden",onPointerDown:p,onPointerMove:b,onPointerUp:v}),n,c.jsxs(E0,{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:[c.jsx(Df,{className:"size-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});Eb.displayName=Af.displayName;const HE=({className:t,...n})=>c.jsx("div",{className:gn("flex flex-col gap-1.5 pr-10",t),...n}),Ab=w.forwardRef(({className:t,...n},a)=>c.jsx(Of,{ref:a,className:gn("text-lg font-medium text-zinc-50",t),...n}));Ab.displayName=Of.displayName;const Ob=w.forwardRef(({className:t,...n},a)=>c.jsx(C0,{ref:a,className:gn("text-sm text-zinc-500",t),...n}));Ob.displayName=C0.displayName;function Nn(t){const n=new Date("2026-02-20");return t.map((a,l)=>({runId:`run_mock_${l+1}`,citationState:a,createdAt:new Date(n.getTime()+l*2*24*60*60*1e3).toISOString()}))}const xs=[{id:"project_citypoint",name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",ownedDomains:[],country:"US",language:"en",tags:["local intent","priority"],labels:{},configSource:"cli",configRevision:1},{id:"project_harbor",name:"Harbor Legal Group",canonicalDomain:"harborlegal.com",ownedDomains:[],country:"US",language:"en",tags:["lead gen"],labels:{},configSource:"cli",configRevision:1},{id:"project_northstar",name:"Northstar Orthopedics",canonicalDomain:"northstarortho.com",ownedDomains:[],country:"US",language:"en",tags:["multi-location"],labels:{},configSource:"cli",configRevision:1}];function ic(t){return{id:t.id,projectId:t.projectId,projectName:t.projectName,kind:t.kind,kindLabel:t.kindLabel,status:t.status,trigger:t.trigger??"manual",createdAt:t.createdAt,startedAt:t.startedAt,duration:t.duration,statusDetail:t.statusDetail,summary:t.summary,triggerLabel:t.triggerLabel}}const Uo=ic({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"}),Gf=ic({id:"run_citypoint_queued_20260309",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"queued",createdAt:"2026-03-09T08:05:00.000Z",startedAt:"Mar 9, 8:05 AM",duration:"Waiting for slot",statusDetail:"Ready to enqueue after the next provider rate window clears.",summary:"Queued follow-up after local ranking movement",triggerLabel:"Manual"}),Kf=ic({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"}),$o=ic({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"}),IE=[Gf,Uo,Kf,$o],GE=[{id:"evidence_citypoint_emergency_gemini",keyword:"emergency dentist brooklyn",provider:"gemini",model:"gemini-3-flash",citationState:"lost",changeLabel:"Lost since Mar 5",answerSnippet:"For urgent dental care in Brooklyn, Downtown Smiles and Harbor Dental are now cited first for emergency availability and same-day booking.",citedDomains:["downtownsmiles.com","harbordental.com"],evidenceUrls:["https://downtownsmiles.com/emergency-dentist-brooklyn","https://harbordental.com/same-day-emergency-care"],competitorDomains:["downtownsmiles.com","harbordental.com"],groundingSources:[],relatedTechnicalSignals:["FAQ schema missing on the emergency service page","llms.txt not found during latest site audit","Location pages link weakly into the emergency care hub"],summary:"AI answers now cite two competitors while your emergency page is no longer grounded.",runHistory:Nn(["cited","cited","cited","cited","cited","cited","cited","not-cited","not-cited"])},{id:"evidence_citypoint_emergency_openai",keyword:"emergency dentist brooklyn",provider:"openai",model:"gpt-5.4",citationState:"cited",changeLabel:"Cited for 6 runs",answerSnippet:"Citypoint Dental is listed as a top emergency dentist in Brooklyn for same-day appointments and walk-in availability.",citedDomains:["citypointdental.com","downtownsmiles.com"],evidenceUrls:["https://citypointdental.com/emergency-dentist-brooklyn"],competitorDomains:["downtownsmiles.com"],groundingSources:[],relatedTechnicalSignals:["Emergency page indexed with structured data"],summary:"OpenAI cites your emergency page consistently alongside one competitor.",runHistory:Nn(["not-cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_emergency_claude",keyword:"emergency dentist brooklyn",provider:"claude",model:"claude-sonnet-4-6",citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"Based on the search results, top-rated emergency dental practices in Brooklyn include Downtown Smiles and Harbor Dental.",citedDomains:["downtownsmiles.com","harbordental.com"],evidenceUrls:[],competitorDomains:["downtownsmiles.com","harbordental.com"],groundingSources:[],relatedTechnicalSignals:["FAQ schema missing","llms.txt not found"],summary:"Claude does not cite your domain for this emergency query.",runHistory:Nn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_invisalign_openai",keyword:"best invisalign dentist downtown brooklyn",provider:"openai",model:"gpt-5.4",citationState:"emerging",changeLabel:"First citation in 7 days",answerSnippet:"Citypoint Dental appears as an emerging recommendation for Invisalign in Downtown Brooklyn, supported by recent before-and-after case pages.",citedDomains:["citypointdental.com","clearlineortho.com"],evidenceUrls:["https://citypointdental.com/invisalign-downtown-brooklyn","https://citypointdental.com/case-studies/invisalign-open-bite"],competitorDomains:["clearlineortho.com"],groundingSources:[],relatedTechnicalSignals:["Structured data now present on two case-study pages","Internal links from service pages to case studies improved crawl depth"],summary:"Fresh case-study content is starting to earn citations on Invisalign prompts.",runHistory:Nn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","cited"])},{id:"evidence_citypoint_invisalign_gemini",keyword:"best invisalign dentist downtown brooklyn",provider:"gemini",model:"gemini-3-flash",citationState:"cited",changeLabel:"Cited for 8 runs",answerSnippet:"Citypoint Dental in Downtown Brooklyn is highlighted for its Invisalign expertise and patient outcomes.",citedDomains:["citypointdental.com"],evidenceUrls:["https://citypointdental.com/invisalign-downtown-brooklyn"],competitorDomains:[],groundingSources:[],relatedTechnicalSignals:["Case study pages well-indexed"],summary:"Gemini consistently cites your Invisalign page with no competitor overlap.",runHistory:Nn(["cited","cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_invisalign_claude",keyword:"best invisalign dentist downtown brooklyn",provider:"claude",model:"claude-sonnet-4-6",citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"For Invisalign in Downtown Brooklyn, Clear Line Ortho and Brooklyn Smiles are frequently recommended for their experienced orthodontists.",citedDomains:["clearlineortho.com","brooklynsmiles.com"],evidenceUrls:[],competitorDomains:["clearlineortho.com"],groundingSources:[],relatedTechnicalSignals:["No before/after schema on case study pages"],summary:"Claude does not surface your Invisalign content despite strong page quality.",runHistory:Nn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_claude",keyword:"pediatric dentist brooklyn heights",provider:"claude",model:"claude-sonnet-4-6",citationState:"not-cited",changeLabel:"No citation across 4 runs",answerSnippet:"Answers cite neighborhood-specific pediatric practices with stronger family-focused FAQ content and clearer insurance details.",citedDomains:["brightkidsdental.com","parkpediatricdental.com"],evidenceUrls:["https://brightkidsdental.com/pediatric-dentist-brooklyn-heights","https://parkpediatricdental.com/insurance"],competitorDomains:["brightkidsdental.com","parkpediatricdental.com"],groundingSources:[],relatedTechnicalSignals:["No dedicated pediatric service page exists for Brooklyn Heights","Insurance content is buried three clicks deep"],summary:"Coverage gap is content-driven, not purely technical.",runHistory:Nn(["not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_gemini",keyword:"pediatric dentist brooklyn heights",provider:"gemini",model:"gemini-3-flash",citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"For pediatric dentistry in Brooklyn Heights, Bright Kids Dental and Park Pediatric Dental are cited for family-friendly care.",citedDomains:["brightkidsdental.com","parkpediatricdental.com"],evidenceUrls:[],competitorDomains:["brightkidsdental.com","parkpediatricdental.com"],groundingSources:[],relatedTechnicalSignals:["No dedicated pediatric page for Brooklyn Heights"],summary:"Gemini does not surface your domain for pediatric queries in this area.",runHistory:Nn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_openai",keyword:"pediatric dentist brooklyn heights",provider:"openai",model:"gpt-5.4",citationState:"cited",changeLabel:"First citation this month",answerSnippet:"Citypoint Dental is mentioned as offering pediatric services in Brooklyn, though specialized pediatric-only practices are also highlighted.",citedDomains:["citypointdental.com","brightkidsdental.com"],evidenceUrls:["https://citypointdental.com/family-dentistry"],competitorDomains:["brightkidsdental.com"],groundingSources:[],relatedTechnicalSignals:["Family dentistry page recently updated"],summary:"OpenAI recently started citing your family dentistry page for this query.",runHistory:Nn(["not-cited","not-cited","not-cited","not-cited","not-cited","cited"])}],KE=[{project:xs[0],dateRangeLabel:"Last 7 days",contextLabel:"US / English / Local-intent monitoring",visibilitySummary:{label:"Answer Visibility",value:"61 / 100",delta:"-8 this week",tone:"caution",description:"Lost citation share on emergency-intent prompts while Invisalign visibility improved.",trend:[73,71,69,66,61]},providerScores:[{provider:"gemini",model:"gemini-3-flash",score:55,cited:5,total:9},{provider:"openai",model:"gpt-5.4",score:67,cited:6,total:9},{provider:"claude",model:"claude-sonnet-4-6",score:44,cited:4,total:9}],competitorPressure:{label:"Competitor Pressure",value:"High",delta:"2 rivals moved up",tone:"negative",description:"Downtown Smiles and Harbor Dental now own the highest-intent local prompts.",trend:[54,58,61,65,69]},runStatus:{label:"Run Status",value:"Partial",delta:"1 queued follow-up",tone:"caution",description:"Latest visibility sweep completed; next sweep is queued.",trend:[76,74,72,68,67]},insights:[{id:"insight_citypoint_lost_citations",tone:"negative",title:"Lost citation on 1 key phrase",detail:"Emergency-intent prompts stopped grounding Citypoint after competitors refreshed.",actionLabel:"Lost",affectedPhrases:[{keyword:"emergency dentist brooklyn",evidenceId:"evidence_citypoint_emergency_gemini",provider:"gemini",citationState:"lost"}]},{id:"insight_citypoint_emerging",tone:"positive",title:"New citation on 1 key phrase",detail:"Case-study content is earning citations on Invisalign prompts.",actionLabel:"Emerging",affectedPhrases:[{keyword:"best invisalign dentist downtown brooklyn",evidenceId:"evidence_citypoint_invisalign_openai",provider:"openai",citationState:"emerging"}]},{id:"insight_citypoint_content_gap",tone:"caution",title:"1 key phrase not cited by any provider",detail:"No dedicated neighborhood page to support pediatric queries.",actionLabel:"Gap",affectedPhrases:[{keyword:"pediatric dentist brooklyn heights",evidenceId:"evidence_citypoint_children_claude",provider:"claude",citationState:"not-cited"}]}],visibilityEvidence:GE,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:[Gf,Uo]},{project:xs[1],dateRangeLabel:"Last 14 days",contextLabel:"US / English / Service-area legal prompts",visibilitySummary:{label:"Answer Visibility",value:"74 / 100",delta:"+2 this week",tone:"positive",description:"Branded prompts are stable and informational queries are gradually improving.",trend:[68,70,71,73,74]},providerScores:[{provider:"gemini",model:"gemini-3-flash",score:75,cited:3,total:4},{provider:"openai",model:"gpt-5.4",score:50,cited:2,total:4}],competitorPressure:{label:"Competitor Pressure",value:"Moderate",delta:"Steady",tone:"neutral",description:"Competitors are stable; no new citation displacement was detected.",trend:[44,46,45,46,46]},runStatus:{label:"Run Status",value:"Healthy",delta:"No failures in 14 days",tone:"positive",description:"Latest visibility runs completed without issues.",trend:[88,89,90,90,91]},insights:[{id:"insight_harbor_cluster",tone:"positive",title:"Practice-area clustering is paying off",detail:"Merged legal service pages now ground broader informational prompts.",actionLabel:"Cited",affectedPhrases:[{keyword:"brooklyn personal injury lawyer",evidenceId:"evidence_harbor_personal_injury",provider:"gemini",citationState:"cited"}]},{id:"insight_harbor_local",tone:"neutral",title:"No significant changes",detail:"No new displacement on borough-specific injury prompts this week.",actionLabel:"Stable",affectedPhrases:[]}],visibilityEvidence:[{id:"evidence_harbor_personal_injury",keyword:"brooklyn personal injury lawyer",provider:"gemini",model:"gemini-3-flash",citationState:"cited",changeLabel:"Held for 5 runs",answerSnippet:"Harbor Legal Group remains cited for borough-specific personal injury queries due to clear practice-area and case-result content.",citedDomains:["harborlegal.com"],evidenceUrls:["https://harborlegal.com/personal-injury/brooklyn"],competitorDomains:["shorelineinjury.com"],groundingSources:[],relatedTechnicalSignals:["Practice-area schema intact","Case results link directly from service pages"],summary:"Grounding remains durable after the service-page consolidation.",runHistory:Nn(["cited","cited","cited","cited","cited"])}],competitors:[{id:"competitor_harbor_shoreline",domain:"shorelineinjury.com",citationCount:2,totalKeywords:6,pressureLabel:"Moderate",citedKeywords:["personal injury lawyer","car accident attorney"],movement:"Stable",notes:"Strong case-result pages keep it in rotation."}],recentRuns:[Kf]},{project:xs[2],dateRangeLabel:"Last 7 days",contextLabel:"US / English / Multi-location treatment prompts",visibilitySummary:{label:"Answer Visibility",value:"58 / 100",delta:"Run in progress",tone:"neutral",description:"The current run is measuring whether treatment-location pages improved citation breadth.",trend:[52,54,55,57,58]},providerScores:[{provider:"openai",model:"gpt-5.4",score:58,cited:4,total:7}],competitorPressure:{label:"Competitor Pressure",value:"Moderate",delta:"Watching 1 chain",tone:"caution",description:"Regional chain competitors are winning on broad treatment questions.",trend:[49,51,52,54,56]},runStatus:{label:"Run Status",value:"Running",delta:"9 prompts remaining",tone:"neutral",description:"Current answer-visibility sweep is still collecting provider responses.",trend:[63,64,65,67,68]},insights:[{id:"insight_northstar_location_depth",tone:"caution",title:"Location pages need stronger proof",detail:"Answers prefer competitors with physician-specific evidence.",actionLabel:"Gap",affectedPhrases:[{keyword:"knee replacement surgeon westchester",evidenceId:"evidence_northstar_knee",provider:"openai",citationState:"emerging"}]}],visibilityEvidence:[{id:"evidence_northstar_knee",keyword:"knee replacement surgeon westchester",provider:"openai",model:"gpt-5.4",citationState:"emerging",changeLabel:"Improving",answerSnippet:"Northstar Orthopedics is beginning to appear on location-sensitive treatment prompts when physician bios and treatment pages are tightly linked.",citedDomains:["northstarortho.com","regionaljointcare.com"],evidenceUrls:["https://northstarortho.com/locations/westchester/knee-replacement"],competitorDomains:["regionaljointcare.com"],groundingSources:[],relatedTechnicalSignals:["Physician bios now linked from treatment pages"],summary:"Template cleanup is helping, but proof depth still matters.",runHistory:Nn(["not-cited","not-cited","not-cited","cited"])}],competitors:[{id:"competitor_northstar_regional",domain:"regionaljointcare.com",citationCount:5,totalKeywords:7,pressureLabel:"High",citedKeywords:["knee replacement","hip surgery","joint pain treatment","orthopedic surgeon","sports medicine"],movement:"Winning broad treatment prompts",notes:"Heavy physician proof and patient-story content."}],recentRuns:[$o]}],YE={portfolioOverview:{projects:[{project:xs[0],visibilityScore:61,visibilityDelta:"-8 this week",lastRun:Uo,insight:"Lost emergency-intent citations after competitors refreshed availability pages.",trend:[73,71,69,66,61],competitorPressureLabel:"High"},{project:xs[1],visibilityScore:74,visibilityDelta:"+2 this week",lastRun:Kf,insight:"Practice-area consolidation is stabilizing branded and informational prompts.",trend:[68,70,71,73,74],competitorPressureLabel:"Moderate"},{project:xs[2],visibilityScore:58,visibilityDelta:"Run in progress",lastRun:$o,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:[Gf,$o,Uo],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:KE,runs:IE,setup:{healthChecks:[{id:"api",label:"API reachable",detail:"Primary control plane is responding.",state:"ready",guidance:"Required for project creation and run history."},{id:"worker",label:"Worker heartbeats received",detail:"Background execution loop is alive.",state:"ready",guidance:"Required before any answer-visibility run can start."},{id:"provider",label:"Provider configured",detail:"Gemini key and quota defaults are present.",state:"ready",guidance:"Required for answer-visibility sweeps."}],projectDraft:{name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",country:"US",language:"en"},keywordImportState:{mode:"paste",keywordCount:18,preview:["emergency dentist brooklyn","best invisalign dentist downtown brooklyn","pediatric dentist brooklyn heights"]},competitorDraft:{domains:["downtownsmiles.com","harbordental.com","clearlineortho.com"],notes:"Start with the domains that already displace the project on money prompts."},launchState:{enabled:!0,ctaLabel:"Launch first run",summary:"Queue a visibility sweep first, then follow with a site audit to explain movement."}},settings:{providerStatuses:[{name:"Gemini",model:"gemini-3-flash",state:"ready",detail:"API key detected and conservative quota defaults are active.",quota:{maxConcurrency:2,maxRequestsPerMinute:10,maxRequestsPerDay:1e3}},{name:"OpenAI",model:"gpt-5.4",state:"ready",detail:"API key configured.",quota:{maxConcurrency:2,maxRequestsPerMinute:10,maxRequestsPerDay:1e3}},{name:"Claude",model:"claude-sonnet-4-6",state:"needs-config",detail:"API key is missing."}],google:{state:"ready",detail:"Google OAuth app credentials are configured. Project-level GSC connections can be created from the dashboard."},selfHostNotes:["Configuration is stored in ~/.canonry/config.yaml.","The local config file is the source of truth for authentication credentials.","Google OAuth app credentials and per-domain Google tokens are stored in local config, not the database.","Database is SQLite at ~/.canonry/data.db.","API key was auto-generated during canonry init."],bootstrapNote:"Use the UI, CLI, or ~/.canonry/config.yaml to manage settings. Authentication credentials persist to local config."}},VE={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 PE(t={}){const n=structuredClone(YE),a=structuredClone(VE);if(t.emptyPortfolio&&(n.portfolioOverview.projects=[],n.portfolioOverview.attentionItems=[{id:"attention_setup",tone:"neutral",title:"No projects yet",detail:"Start the guided setup flow to add a domain, import keywords, and launch the first run.",actionLabel:"Open setup",href:"/setup"}],n.portfolioOverview.recentRuns=[],n.portfolioOverview.emptyState={title:"No projects yet",detail:"Canonry becomes useful after one project, a small keyword set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}),t.runScenario==="partial"&&(n.runs[0].status="partial",n.runs[0].duration="7m 24s",n.runs[0].statusDetail="Quota window closed mid-run; 14 of 18 prompts completed before the worker paused.",n.runs[0].summary="Partial visibility sweep after quota cap",n.portfolioOverview.recentRuns[0]=n.runs[0]),t.runScenario==="failed"&&(n.runs[0].status="failed",n.runs[0].duration="1m 43s",n.runs[0].statusDetail="Worker could not reach the provider after repeated retry exhaustion.",n.runs[0].summary="Provider retries exhausted before results were captured",n.portfolioOverview.recentRuns[0]=n.runs[0],n.portfolioOverview.attentionItems.unshift({id:"attention_failed_run",tone:"negative",title:"One queued follow-up failed to start cleanly",detail:"Worker retries exhausted before the provider returned a response.",actionLabel:"Open runs",href:"/runs"})),t.degradedWorker&&(a.workerStatus={label:"Worker",state:"error",detail:"heartbeat stale · last seen 12m ago",version:"phase-1",databaseConfigured:!0,lastHeartbeatAt:"2026-03-09T07:55:00.000Z"}),t.providerNeedsConfig&&(n.settings.providerStatuses=n.settings.providerStatuses.map(l=>({...l,state:"needs-config",detail:"API key is missing, so answer-visibility sweeps are blocked."}))),t.visibilityDropProjectId){const l=n.projects.find(u=>u.project.id===t.visibilityDropProjectId),o=n.portfolioOverview.projects.find(u=>u.project.id===t.visibilityDropProjectId);l&&(l.visibilitySummary.value="49 / 100",l.visibilitySummary.delta="-12 in 48h",l.visibilitySummary.tone="negative",l.visibilitySummary.description="A sharper drop than normal; citations slipped across both local and service-intent prompts.",l.insights.unshift({id:`${l.project.id}_drop`,tone:"negative",title:"Sharp citation drop detected",detail:"Answers that previously cited the domain now ground competitors on both local and service-intent prompts.",actionLabel:"Lost",affectedPhrases:l.visibilityEvidence.filter(u=>u.citationState==="lost").slice(0,5).map(u=>({keyword:u.keyword,evidenceId:u.id,provider:u.provider||void 0,citationState:u.citationState}))})),o&&(o.visibilityScore=49,o.visibilityDelta="-12 in 48h",o.insight="Sharp citation drop detected; grounding now prefers competitors on multiple high-intent prompts.")}return{dashboard:n,health:a}}function Tb(t,n){return t.projects.find(a=>a.project.id===n)}function QE(t,n){return t.runs.find(a=>a.id===n)}function XE(t,n){for(const a of t.projects){const l=a.visibilityEvidence.find(o=>o.id===n);if(l)return{project:a,evidence:l}}}const JE="/api/v1";function FE(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.apiKey?window.__CANONRY_CONFIG__.apiKey:""}async function Ae(t,n){const a=FE(),l=await fetch(`${JE}${t}`,{...n,headers:{"Content-Type":"application/json",...a?{Authorization:`Bearer ${a}`}:{},...n?.headers}});if(!l.ok){const o=await l.text();let u=`API ${l.status}: ${l.statusText}`;if(o)try{const d=JSON.parse(o);typeof d.error=="string"?u=d.error:d.error?.message?u=d.error.message:d.message&&(u=d.message)}catch{u=o}throw new Error(u)}if(l.status!==204)return l.json()}function WE(){return Ae("/projects")}function Db(t){return Ae(`/projects/${encodeURIComponent(t)}`)}function eA(){return Ae("/runs")}function Ml(t){return Ae(`/runs/${encodeURIComponent(t)}`)}function tA(t){return Ae(`/projects/${encodeURIComponent(t)}/keywords`)}function Rb(t){return Ae(`/projects/${encodeURIComponent(t)}/competitors`)}function nA(t){return Ae(`/projects/${encodeURIComponent(t)}/timeline`)}function ac(t,n){return Ae(`/projects/${encodeURIComponent(t)}`,{method:"PUT",body:JSON.stringify(n)})}function iA(t,n){return Ae(`/projects/${encodeURIComponent(t)}/keywords`,{method:"PUT",body:JSON.stringify({keywords:n})})}function aA(t,n){return Ae(`/projects/${encodeURIComponent(t)}/keywords`,{method:"POST",body:JSON.stringify({keywords:n})})}function Mb(t,n){return Ae(`/projects/${encodeURIComponent(t)}/competitors`,{method:"PUT",body:JSON.stringify({competitors:n})})}async function sA(t,n){const a=await Db(t);return ac(t,{displayName:a.displayName,canonicalDomain:a.canonicalDomain,ownedDomains:n,country:a.country,language:a.language,tags:a.tags,labels:a.labels,providers:a.providers})}async function lA(t,n){const a=await Db(t);return ac(t,{displayName:n.displayName??a.displayName,canonicalDomain:n.canonicalDomain??a.canonicalDomain,ownedDomains:n.ownedDomains??a.ownedDomains,country:n.country??a.country,language:n.language??a.language,tags:a.tags,labels:a.labels,providers:a.providers})}function Lb(t){return Ae(`/projects/${encodeURIComponent(t)}/runs`,{method:"POST",body:"{}"})}async function rA(t){await Ae(`/projects/${encodeURIComponent(t)}`,{method:"DELETE",body:"{}"})}function oA(t){return Ae(`/projects/${encodeURIComponent(t)}/export`)}function Ub(){return Ae("/settings")}function cA(t,n){return Ae(`/settings/providers/${encodeURIComponent(t)}`,{method:"PUT",body:JSON.stringify(n)})}function uA(t){return Ae("/settings/google",{method:"PUT",body:JSON.stringify(t)})}async function dA(t){try{return await Ae(`/projects/${encodeURIComponent(t)}/schedule`)}catch(n){if(n instanceof Error&&n.message.includes("404"))return null;throw n}}function tv(t,n){return Ae(`/projects/${encodeURIComponent(t)}/schedule`,{method:"PUT",body:JSON.stringify(n)})}async function fA(t){await Ae(`/projects/${encodeURIComponent(t)}/schedule`,{method:"DELETE",body:"{}"})}function hA(t){return Ae(`/projects/${encodeURIComponent(t)}/notifications`)}function mA(t,n){return Ae(`/projects/${encodeURIComponent(t)}/notifications`,{method:"POST",body:JSON.stringify(n)})}async function pA(t,n){await Ae(`/projects/${encodeURIComponent(t)}/notifications/${encodeURIComponent(n)}`,{method:"DELETE",body:"{}"})}function gA(t,n){return Ae(`/projects/${encodeURIComponent(t)}/notifications/${encodeURIComponent(n)}/test`,{method:"POST",body:"{}"})}function yA(t,n,a){return Ae(`/projects/${encodeURIComponent(t)}/keywords/generate`,{method:"POST",body:JSON.stringify({provider:n,count:a})})}function vA(t){return Ae("/apply",{method:"POST",body:JSON.stringify(t)})}function bA(t){return Ae("/runs",{method:"POST",body:JSON.stringify({})})}function xA(t){return Ae(`/projects/${encodeURIComponent(t)}/google/connections`)}function SA(t,n){return Ae(`/projects/${encodeURIComponent(t)}/google/connect`,{method:"POST",body:JSON.stringify({type:n})})}function wA(t,n){return Ae(`/projects/${encodeURIComponent(t)}/google/connections/${encodeURIComponent(n)}`,{method:"DELETE",body:"{}"})}function jA(t){return Ae(`/projects/${encodeURIComponent(t)}/google/properties`)}function NA(t,n,a){return Ae(`/projects/${encodeURIComponent(t)}/google/connections/${encodeURIComponent(n)}/property`,{method:"PUT",body:JSON.stringify({propertyId:a})})}function kA(t,n){return Ae(`/projects/${encodeURIComponent(t)}/google/gsc/sync`,{method:"POST",body:JSON.stringify(n??{})})}function _A(t,n){const a=new URLSearchParams;n?.startDate&&a.set("startDate",n.startDate),n?.endDate&&a.set("endDate",n.endDate),n?.query&&a.set("query",n.query),n?.page&&a.set("page",n.page),n?.limit!==void 0&&a.set("limit",String(n.limit));const l=a.toString()?`?${a.toString()}`:"";return Ae(`/projects/${encodeURIComponent(t)}/google/gsc/performance${l}`)}function zA(t,n){return Ae(`/projects/${encodeURIComponent(t)}/google/gsc/inspect`,{method:"POST",body:JSON.stringify({url:n})})}function CA(t,n){const a=new URLSearchParams;n?.url&&a.set("url",n.url),a.set("limit",String(n.limit));const l=a.toString()?`?${a.toString()}`:"";return Ae(`/projects/${encodeURIComponent(t)}/google/gsc/inspections${l}`)}function EA(t){return Ae(`/projects/${encodeURIComponent(t)}/google/gsc/deindexed`)}function $b(t){return{id:t.id,name:t.name,displayName:t.displayName,canonicalDomain:t.canonicalDomain,ownedDomains:t.ownedDomains??[],country:t.country,language:t.language,tags:t.tags,labels:t.labels,configSource:t.configSource,configRevision:t.configRevision,createdAt:t.createdAt,updatedAt:t.updatedAt}}function nv(t){try{return new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return t}}function AA(t,n){if(!t)return"Waiting";if(!n)return"Running";const a=new Date(n).getTime()-new Date(t).getTime();if(a<1e3)return"<1s";const l=Math.floor(a/1e3);if(l<60)return`${l}s`;const o=Math.floor(l/60),u=l%60;return`${o}m ${u}s`}function Bb(t){return t==="answer-visibility"?"Answer visibility sweep":t}function OA(t){return t==="manual"?"Manual":t==="scheduled"?"Scheduled":t==="config-apply"?"Config apply":t}function Yf(t,n){return{id:t.id,projectId:t.projectId,projectName:n,kind:t.kind,kindLabel:Bb(t.kind),status:t.status,trigger:t.trigger??"manual",createdAt:t.createdAt,startedAt:t.startedAt?nv(t.startedAt):nv(t.createdAt),duration:AA(t.startedAt,t.finishedAt),statusDetail:t.error?Zb(t.error):TA(t),summary:DA(t),triggerLabel:OA(t.trigger)}}function Zb(t){try{const a=JSON.parse(t);if(typeof a=="object"&&a!==null){const l=a.message??a.error?.message??a[0]?.error?.message;if(typeof l=="string"&&l.length>0)return l.length>200?l.slice(0,200)+"…":l}}catch{}const n=t.match(/\[.*?\]\s*(.+)/);if(n){const a=n[1];return a.length>200?a.slice(0,200)+"…":a}return t.length>200?t.slice(0,200)+"…":t}function TA(t){switch(t.status){case"queued":return"Waiting for execution slot.";case"running":return"Provider queries in progress.";case"completed":return"All key phrases checked.";case"partial":return"Run completed with some key phrases skipped.";case"failed":return t.error?Zb(t.error):"Run failed.";default:return""}}function DA(t){switch(t.status){case"queued":return"Queued for execution";case"running":return"In progress";case"completed":return"Visibility sweep completed";case"partial":return"Partial completion";case"failed":return"Run failed";default:return t.status}}function qb(t){if(t.length===0)return{score:0,citedCount:0,totalCount:0};const n=new Map;for(const u of t){const d=u.keyword??u.id;n.has(d)||n.set(d,!1),u.citationState==="cited"&&n.set(d,!0)}const a=n.size,l=[...n.values()].filter(Boolean).length;return{score:a>0?Math.round(l/a*100):0,citedCount:l,totalCount:a}}function RA(t){return t>=70?"positive":t>=40?"caution":"negative"}function MA(t){return t==="High"?"negative":t==="Moderate"?"caution":"neutral"}function Hb(t,n){if(t.length===0||n.length===0)return{label:"None",count:0};const a=new Set(n);let l=0;for(const u of t)u.competitorOverlap.some(d=>a.has(d))&&l++;const o=l/t.length;return o>=.5?{label:"High",count:l}:o>=.2?{label:"Moderate",count:l}:{label:"Low",count:l}}function LA(t,n,a,l){const o=[];let u=0;const d=new Set;if(a){const m=new Map;for(const p of a.snapshots)if(p.keyword){const b=`${p.keyword}::${p.provider}`;m.set(b,p)}const g=[...new Set(a.snapshots.map(p=>p.provider))].sort();g.length===0&&g.push("gemini");for(const p of n){if(p.runs.length===0)continue;d.add(p.keyword);const v=p.runs.at(-1)?.transition??"not-cited",x=v==="lost"?"lost":v==="emerging"?"emerging":v==="cited"?"cited":"not-cited";for(const N of g){const z=m.get(`${p.keyword}::${N}`);if(!z&&g.length>1)continue;const j=z?.model??null,k=j?`${N}:${j}`:null,A=k?p.modelRuns?.[k]:void 0,T=p.providerRuns?.[N],O=(A?.length?A:null)??(T?.length?T:null),R=O?O.at(-1).transition:v,L=R==="lost"?"lost":R==="emerging"?"emerging":z?z.citationState==="cited"?"cited":"not-cited":x,H=lf(O||p.runs),K=(O??p.runs).map(D=>({runId:D.runId,citationState:D.citationState,createdAt:D.createdAt}));o.push({id:`evidence_${t}_${u++}`,keyword:p.keyword,provider:z?.provider??N,model:z?.model??null,citationState:L,changeLabel:UA(R,H),answerSnippet:z?.answerText??"",citedDomains:z?.citedDomains??[],evidenceUrls:[],competitorDomains:z?.competitorOverlap??[],relatedTechnicalSignals:[],groundingSources:z?.groundingSources??[],summary:$A(L,p.keyword),runHistory:K})}}}for(const m of l)d.has(m.keyword)||o.push({id:`evidence_${t}_${u++}`,keyword:m.keyword,provider:"",model:null,citationState:"pending",changeLabel:"Awaiting first run",answerSnippet:"",citedDomains:[],evidenceUrls:[],competitorDomains:[],relatedTechnicalSignals:[],groundingSources:[],summary:`"${m.keyword}" has been added but no visibility run has been triggered yet.`,runHistory:[]});return o}function lf(t){if(t.length===0)return 0;const n=t[t.length-1].citationState;let a=0;for(let l=t.length-1;l>=0&&t[l].citationState===n;l--)a++;return a}function UA(t,n){switch(t){case"new":return"First observation";case"cited":return n<=1?"Cited in latest run":`Cited for ${n} runs`;case"lost":return"Lost since last run";case"emerging":return"First citation";case"not-cited":return n<=1?"Not cited in latest run":`Not cited across ${n} runs`;default:return t}}function $A(t,n){switch(t){case"cited":return`Your domain is cited in AI answers for "${n}".`;case"lost":return`Citation was lost for "${n}". Competitors may have gained ground.`;case"emerging":return`Your domain is starting to appear in answers for "${n}".`;case"not-cited":return`No citation detected for "${n}".`;case"pending":return`"${n}" has been added but no visibility run has been triggered yet.`}}function iv(t,n){const a=new Set(n),l=new Map;for(const o of t)if(o.keyword)for(const u of o.competitorOverlap){if(!a.has(u))continue;const d=l.get(u)??new Set;d.add(o.keyword),l.set(u,d)}return l}const Id=3;function BA(t){const{evidence:n,timeline:a,latestSnapshots:l,previousSnapshots:o,trackedCompetitors:u}=t,d=[],m=[],g=new Set;for(const A of n)A.citationState==="lost"&&(g.has(A.keyword)||(g.add(A.keyword),m.push({keyword:A.keyword,evidenceId:A.id,provider:A.provider,citationState:"lost"})));m.length>0&&d.push({id:"insight_lost",tone:"negative",title:`Lost citation on ${m.length} keyword${m.length>1?"s":""}`,detail:"Citations dropped since the last run.",actionLabel:"Lost",affectedPhrases:m});const p=iv(l,u),b=iv(o,u);for(const A of u){const T=p.get(A)??new Set,O=b.get(A)??new Set,R=[...T].filter(L=>!O.has(L));R.length>0&&d.push({id:`insight_comp_gained_${A}`,tone:"negative",title:`${A} appeared on ${R.length} keyword${R.length>1?"s":""}`,detail:"A tracked competitor gained new citations.",actionLabel:"Competitor",affectedPhrases:R.map(L=>{const H=n.find(K=>K.keyword===L);return{keyword:L,evidenceId:H?.id??"",citationState:"cited"}})})}const v=new Map;for(const A of a){const T=A.runs.at(-1);T&&v.set(A.keyword,{transition:T.transition,citationState:T.citationState})}const x=[],N=[],z=new Set;for(const[A,{transition:T,citationState:O}]of v){if(!(T==="emerging"||T==="new"&&O==="cited"))continue;z.add(A);const L=n.find(H=>H.keyword===A&&(H.citationState==="emerging"||H.citationState==="cited"));x.push({keyword:A,evidenceId:L?.id??"",provider:L?.provider,citationState:"emerging"})}for(const A of n)A.citationState==="emerging"&&(z.has(A.keyword)||N.push({keyword:A.keyword,evidenceId:A.id,provider:A.provider,citationState:"emerging"}));if(N.length>0){const A=new Set(N.map(T=>T.keyword)).size;d.push({id:"insight_provider_pickup",tone:"positive",title:`Picked up by new provider on ${A} keyword${A>1?"s":""}`,detail:"Your domain started appearing on additional providers.",actionLabel:"Pickup",affectedPhrases:N})}x.length>0&&d.push({id:"insight_first_citation",tone:"positive",title:`First citation on ${z.size} keyword${z.size>1?"s":""}`,detail:"Your domain appeared in AI answers for the first time.",actionLabel:"New",affectedPhrases:x});const j=new Set(n.map(A=>A.keyword)),k=[];for(const A of a){if(!j.has(A.keyword)||A.runs.length<Id||A.runs.at(-1)?.citationState!=="not-cited")continue;if(lf(A.runs)>=Id){const R=n.find(L=>L.keyword===A.keyword);k.push({keyword:A.keyword,evidenceId:R?.id??"",citationState:"not-cited"})}}k.length>0&&d.push({id:"insight_persistent_gap",tone:"caution",title:`${k.length} keyword${k.length>1?"s":""} uncited for ${Id}+ runs`,detail:"These keywords have not been cited by any provider across multiple consecutive runs.",actionLabel:"Gap",affectedPhrases:k});for(const A of u){const T=p.get(A)??new Set,R=[...b.get(A)??new Set].filter(L=>!T.has(L));R.length>0&&d.push({id:`insight_comp_lost_${A}`,tone:"neutral",title:`${A} dropped from ${R.length} keyword${R.length>1?"s":""}`,detail:"A tracked competitor lost citations.",actionLabel:"Competitor",affectedPhrases:R.map(L=>{const H=n.find(K=>K.keyword===L);return{keyword:L,evidenceId:H?.id??"",citationState:"not-cited"}})})}return d.length===0&&d.push({id:"insight_stable",tone:"neutral",title:"No significant changes",detail:"Citation state is stable across all tracked key phrases.",actionLabel:"Stable",affectedPhrases:[]}),d}function ZA(t){const n=t[0];if(!n)return{label:"Run Status",value:"None",delta:"No runs yet",tone:"neutral",description:"Trigger a visibility sweep to start tracking.",tooltip:"Current execution state of visibility sweeps. Shows the status of the most recent run and total run count.",trend:[]};const a=n.status==="completed"?"Healthy":n.status==="running"?"Running":n.status==="queued"?"Queued":n.status==="partial"?"Partial":"Failed",l=n.status==="completed"?"positive":n.status==="failed"?"negative":n.status==="partial"?"caution":"neutral";return{label:"Run Status",value:a,delta:`${t.length} total runs`,tone:l,description:`Latest: ${Bb(n.kind)} — ${n.status}`,tooltip:"Current execution state of visibility sweeps. Shows the status of the most recent run and total run count.",trend:[]}}function qA(t){const n=$b(t.project),a=LA(n.name,t.timeline,t.latestRunDetail,t.keywords),l=t.latestRunDetail?.snapshots??[],o=qb(l),u=Hb(l,t.competitors.map(v=>v.domain)),d=BA({evidence:a,timeline:t.timeline,latestSnapshots:t.latestRunDetail?.snapshots??[],previousSnapshots:t.previousRunDetail?.snapshots??[],trackedCompetitors:t.competitors.map(v=>v.domain)}),m=[...t.runs].sort((v,x)=>x.createdAt.localeCompare(v.createdAt)),g=m.map(v=>Yf(v,t.project.displayName||t.project.name)),p=new Map;for(const v of l){const x=v.provider||"gemini",N=v.model??null,z=`${x}::${N??"unknown"}`,j=p.get(z)??{provider:x,model:N,cited:0,total:0};j.total++,v.citationState==="cited"&&j.cited++,p.set(z,j)}const b=[...p.values()].sort((v,x)=>v.provider.localeCompare(x.provider)||(v.model??"").localeCompare(x.model??"")).map(({provider:v,model:x,cited:N,total:z})=>({provider:v,model:x,score:z>0?Math.round(N/z*100):0,cited:N,total:z}));return{project:n,dateRangeLabel:"All time",contextLabel:`${n.country} / ${n.language.toUpperCase()}`,visibilitySummary:{label:"Answer Visibility",value:l.length>0?`${o.score}`:"No data",delta:l.length>0?`${o.citedCount} of ${o.totalCount} key phrases visible`:"Run a sweep first",tone:l.length>0?RA(o.score):"neutral",description:l.length>0?`${o.citedCount} of ${o.totalCount} tracked key phrases found your domain in at least one AI answer engine.`:"No visibility data yet. Trigger a run to start tracking.",tooltip:'Percentage of tracked key phrases where your domain is cited by at least one AI answer engine. A key phrase is "visible" if any configured provider includes your site in its response.',trend:[]},providerScores:b,competitorPressure:{label:"Competitor Pressure",value:u.label,delta:u.count>0?`${u.count} overlapping citations`:"No overlap detected",tone:MA(u.label),description:t.competitors.length>0?`${t.competitors.length} competitor${t.competitors.length>1?"s":""} tracked.`:"No competitors configured.",tooltip:"How often competitor domains appear alongside yours in AI answers. High pressure means competitors are frequently cited for the same key phrases.",trend:[]},runStatus:ZA(m),insights:d,visibilityEvidence:a,competitors:t.competitors.map((v,x)=>{const N=new Set;for(const T of l)(T.competitorOverlap.includes(v.domain)||T.citedDomains.includes(v.domain))&&T.keyword&&N.add(T.keyword);const z=[...N],j=new Set(l.map(T=>T.keyword).filter(Boolean)),k=j.size>0?z.length/j.size:0,A=k>=.5?"High":k>=.2?"Moderate":z.length>0?"Low":"None";return{id:v.id||`comp_${x}`,domain:v.domain,citationCount:z.length,totalKeywords:j.size,pressureLabel:A,citedKeywords:z,movement:"",notes:""}}),recentRuns:g.slice(0,5)}}function HA(t){const n=$b(t.project),a=t.latestRunDetail?.snapshots??[],l=qb(a),o=Hb(a,t.competitors.map(g=>g.domain)),d=[...t.runs].sort((g,p)=>p.createdAt.localeCompare(g.createdAt))[0],m=d?Yf(d,t.project.displayName||t.project.name):{id:"none",projectId:t.project.id,projectName:t.project.displayName||t.project.name,kind:"answer-visibility",kindLabel:"No runs yet",status:"queued",trigger:"manual",createdAt:"",startedAt:"",duration:"",statusDetail:"",summary:"No runs yet",triggerLabel:""};return{project:n,visibilityScore:l.score,visibilityDelta:a.length>0?`${l.citedCount} of ${l.totalCount} key phrases`:"No data",lastRun:m,insight:a.length>0?`${l.citedCount} of ${l.totalCount} key phrases visible across ${new Set(a.map(g=>g.provider)).size} provider${new Set(a.map(g=>g.provider)).size>1?"s":""}.`:"No runs completed yet.",trend:[],competitorPressureLabel:o.label}}function IA(t,n){const a=[],l=[],o=[];for(const d of t){l.push(qA(d)),o.push(HA(d));const m=[...d.runs].sort((g,p)=>p.createdAt.localeCompare(g.createdAt));for(const g of m)a.push(Yf(g,d.project.displayName||d.project.name))}a.sort((d,m)=>m.createdAt.localeCompare(d.createdAt));const u=t.length>0;return{portfolioOverview:{projects:o,attentionItems:u?GA(l):[{id:"attention_setup",tone:"neutral",title:"No projects yet",detail:"Create your first project using the setup wizard, CLI, or API.",actionLabel:"Open setup",href:"/setup"}],recentRuns:a.slice(0,5),systemHealth:[{id:"api",label:"API",tone:"positive",detail:"Connected",meta:"Real-time data"},{id:"provider",label:"Gemini",tone:"positive",detail:"Configured",meta:"Provider active"}],lastUpdatedAt:new Date().toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}),...u?{}:{emptyState:{title:"No projects yet",detail:"Canonry becomes useful after one project, a small key phrase set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}}},projects:l,runs:a,setup:{healthChecks:[{id:"api",label:"API reachable",detail:"API is responding.",state:"ready",guidance:"Required for project creation and run history."},{id:"provider",label:"Provider configured",detail:"Gemini key is configured.",state:"ready",guidance:"Required for answer-visibility sweeps."}],projectDraft:{name:"",canonicalDomain:"",country:"US",language:"en"},keywordImportState:{mode:"paste",keywordCount:0,preview:[]},competitorDraft:{domains:[],notes:"Use the CLI to add competitors."},launchState:{enabled:u,ctaLabel:u?"Trigger run":"Create a project first",summary:u?"Ready to run.":"Create a project first to launch a run."}},settings:{providerStatuses:(n?.providers??[]).map(d=>({name:d.name,model:d.model,state:d.configured?"ready":"needs-config",detail:d.configured?"Provider is configured.":"API key is missing.",quota:d.quota})),google:{state:n?.google?.configured?"ready":"needs-config",detail:n?.google?.configured?"Google OAuth app credentials are configured. Project-level GSC connections can be created from the dashboard.":"Google OAuth client ID and client secret are not configured yet."},selfHostNotes:["Configuration is stored in ~/.canonry/config.yaml.","The local config file is the source of truth for authentication credentials.","Google OAuth app credentials and per-domain Google tokens are stored in local config, not the database.","Database is SQLite at ~/.canonry/data.db.","API key was auto-generated during canonry init."],bootstrapNote:"Use the UI, CLI, or ~/.canonry/config.yaml to manage settings. Authentication credentials persist to local config."}}}function GA(t){const n=[];for(const a of t){const l=a.visibilityEvidence.filter(u=>u.citationState==="lost");l.length>0&&n.push({id:`attention_${a.project.id}_lost`,tone:"negative",title:`${a.project.displayName||a.project.name} lost citations`,detail:`${l.length} key phrase${l.length>1?"s":""} lost citation.`,actionLabel:"Open project",href:`/projects/${a.project.id}`});const o=a.recentRuns.filter(u=>u.status==="running"||u.status==="queued");o.length>0&&n.push({id:`attention_${a.project.id}_active`,tone:"neutral",title:`${a.project.displayName||a.project.name} has active runs`,detail:`${o.length} run${o.length>1?"s":""} in progress.`,actionLabel:"View runs",href:"/runs"})}return n.length===0&&n.push({id:"attention_stable",tone:"positive",title:"All projects stable",detail:"No citation losses or active runs to flag.",actionLabel:"View portfolio",href:"/"}),n}const av=[{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"}],KA=PE(),sv=t=>({label:t,state:"checking",detail:"Checking service health"}),YA={apiStatus:sv("API"),workerStatus:sv("Worker")};async function VA(t,n){try{const a=await fetch(t);if(!a.ok)return{label:n,state:"error",detail:`HTTP ${a.status}`};const l=await a.json(),o=typeof l.version=="string"?l.version:"unknown",u=typeof l.databaseUrlConfigured=="boolean"?l.databaseUrlConfigured:void 0,d=typeof l.lastHeartbeatAt=="string"?l.lastHeartbeatAt:void 0,m=[o,u===!1?"database not configured":"database configured",d?`heartbeat ${d}`:void 0].filter(Boolean).join(" · ");return{label:n,state:"ok",detail:m,version:o,databaseConfigured:u,lastHeartbeatAt:d}}catch(a){return{label:n,state:"error",detail:a instanceof Error?a.message:"unreachable"}}}function Ri(t){if(!t)return"/";const n=t.split("?")[0]??"/";return n===""?"/":n.length>1&&n.endsWith("/")?n.slice(0,-1):n}function PA(t,n){const a=Ri(t);if(a==="/")return{kind:"overview",path:"/"};if(a==="/runs")return{kind:"runs",path:"/runs"};if(a==="/settings")return{kind:"settings",path:"/settings"};if(a==="/setup")return{kind:"setup",path:"/setup"};if(a==="/projects")return{kind:"projects",path:"/projects"};if(a.startsWith("/projects/")){const l=a.split("/").filter(Boolean);if(l.length<2||l.length>3)return{kind:"not-found",path:a};const[,o,u]=l,d=u===void 0?"overview":u==="search-console"?"search-console":null;return d?Tb(n,o)?{kind:"project",path:a,projectId:o,tab:d}:{kind:"not-found",path:a}:{kind:"not-found",path:a}}return{kind:"not-found",path:a}}function QA(t){return t?Ri(t):typeof window<"u"?Ri(window.location.pathname):"/"}function Bo(t){return t.state==="ok"?"positive":t.state==="checking"?"neutral":"negative"}function Ib(t){switch(t){case"completed":return"positive";case"partial":return"caution";case"failed":return"negative";case"queued":case"running":return"neutral"}}function XA(t){switch(t){case"cited":return"positive";case"emerging":return"positive";case"not-cited":return"caution";case"lost":return"negative";case"pending":return"neutral"}}function JA(t){const n=t.match(/^(\[.*?\])\s*(.+)/);if(n){const a=n[1],l=n[2],o=l.indexOf("{");if(o>=0){const u=l.slice(0,o).trim(),d=l.slice(o);try{const m=JSON.parse(d);return`${a} ${u}
|
|
222
|
-
|
|
223
|
-
${JSON.stringify(m,null,2)}`}catch{}}return`${a}
|
|
224
|
-
${l}`}try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}}function sc(t){return t.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function FA(t,n,a){return t.map(l=>{if(l.id==="api")return{...l,tone:Bo(n.apiStatus),detail:n.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:n.apiStatus.detail};if(l.id==="worker")return{...l,tone:Bo(n.workerStatus),detail:n.workerStatus.state==="ok"?"Healthy":"Needs attention",meta:n.workerStatus.detail};const o=a.providerStatuses.filter(g=>g.state==="ready").length,u=a.providerStatuses.length,d=o>0,m=a.providerStatuses.filter(g=>g.state==="ready").map(g=>Vb[g.name]??g.name).join(" · ");return{...l,label:"Providers",tone:d?"positive":"caution",detail:`${o} of ${u} configured`,meta:m||"None configured"}})}function WA(t,n){if(t.apiStatus.state!=="ok")return"Launch is blocked until the API responds cleanly.";if(t.apiStatus.databaseConfigured===!1)return"Launch is blocked until the API has a database connection configured.";if(t.workerStatus.state!=="ok")return"Launch is blocked until the worker is healthy and heartbeats are current.";if(!n.providerStatuses.some(a=>a.state==="ready"))return"Launch is blocked until at least one provider is configured."}function eO(t,n,a){const l=WA(n,a),o=structuredClone(t);return o.healthChecks=o.healthChecks.map(u=>{if(u.id==="api")return{...u,detail:n.apiStatus.detail,state:n.apiStatus.state==="ok"?"ready":"attention"};if(u.id==="worker")return{...u,detail:n.workerStatus.detail,state:n.workerStatus.state==="ok"?"ready":"attention"};const d=a.providerStatuses.some(m=>m.state==="ready");return{...u,detail:d?"At least one provider configured.":"No providers configured.",state:d?"ready":"attention"}}),o.launchState.enabled=l===void 0,o.launchState.blockedReason=l,o.launchState.summary=l??"Queue a visibility sweep first, then follow with a site audit to explain movement.",o}function Wt(t,n){return a=>{a.preventDefault(),a.stopPropagation(),t(n)}}function xo(t,n){return n==="projects"?t.kind==="projects"||t.kind==="project":n==="project"?t.kind==="project":t.kind===n}function lv({compact:t=!1,navigate:n}){return c.jsxs("a",{className:`brand-lockup ${t?"brand-lockup-compact":""}`,href:"/","aria-label":"Canonry home",onClick:Wt(n,"/"),children:[c.jsx("img",{className:"brand-icon",src:"/favicon.svg",alt:"","aria-hidden":"true"}),c.jsxs("span",{className:"brand-copy",children:[c.jsx("span",{className:"brand-mark",children:"Canonry"}),t?null:c.jsx("span",{className:"brand-subtitle",children:"AEO Monitor"})]})]})}function tO({points:t,tone:n}){const a=w.useId();if(t.length===0)return null;const l=42,o=132,u=5,d=Math.min(...t),g=Math.max(...t)-d||1,p=o-u*2,b=l-u*2,v=t.map((x,N)=>{const z=u+N/Math.max(t.length-1,1)*p,j=u+(1-(x-d)/g)*b;return`${z},${j}`}).join(" ");return c.jsxs("svg",{className:`sparkline sparkline-${n}`,viewBox:`0 0 ${o} ${l}`,"aria-hidden":"true",children:[c.jsx("defs",{children:c.jsx("clipPath",{id:a,children:c.jsx("rect",{x:u,y:u,width:p,height:b,rx:"8"})})}),c.jsx("line",{className:"sparkline-guide",x1:u,x2:o-u,y1:l-u,y2:l-u}),c.jsx("polyline",{clipPath:`url(#${a})`,points:v,vectorEffect:"non-scaling-stroke"})]})}function Gb({text:t}){return c.jsxs("span",{className:"info-tooltip-wrapper",children:[c.jsxs("svg",{className:"info-tooltip-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[c.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M8 7v4M8 5.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),c.jsx("span",{className:"info-tooltip-bubble",role:"tooltip",children:t})]})}function Gd({value:t,label:n,delta:a,tone:l,description:o,tooltip:u,isNumeric:d=!0}){const p=2*Math.PI*48,b=Number.parseInt(t,10),v=d&&!Number.isNaN(b)?Math.min(b/100,1):.5,x=p*(1-v);return c.jsxs("div",{className:"score-gauge",children:[c.jsxs("div",{className:"gauge-ring-wrapper",children:[c.jsxs("svg",{className:"gauge-ring",viewBox:"0 0 120 120","aria-hidden":"true",children:[c.jsx("circle",{className:"gauge-bg",cx:"60",cy:"60",r:48,strokeWidth:6}),c.jsx("circle",{className:`gauge-fill gauge-fill-${l}`,cx:"60",cy:"60",r:48,strokeWidth:6,strokeDasharray:p,strokeDashoffset:x,transform:"rotate(-90 60 60)"})]}),c.jsx("div",{className:"gauge-center",children:c.jsx("span",{className:d?"gauge-value":"gauge-value-text",children:t.split(" / ")[0]})})]}),c.jsxs("p",{className:"gauge-label",children:[n,u&&c.jsx(Gb,{text:u})]}),c.jsx("p",{className:"gauge-delta",children:a}),c.jsx("p",{className:"gauge-description",children:o})]})}function pt({tone:t,children:n}){const a=t==="positive"?"success":t==="caution"?"warning":t==="negative"?"destructive":"neutral";return c.jsx(_b,{variant:a,children:n})}function lc({status:t}){return c.jsx(pt,{tone:Ib(t),children:sc(t)})}function Kb({state:t}){return c.jsx(pt,{tone:XA(t),children:sc(t)})}function Yb({run:t,onOpen:n}){return c.jsxs("article",{className:"run-row",children:[c.jsxs("div",{className:"run-row-main",children:[c.jsxs("div",{className:"run-row-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"run-row-title",children:t.summary}),c.jsxs("p",{className:"run-row-subtitle",children:[t.projectName," · ",t.kindLabel]})]}),c.jsx(lc,{status:t.status})]}),c.jsx("p",{className:"run-row-detail",children:t.statusDetail})]}),c.jsxs("dl",{className:"run-row-meta",children:[c.jsxs("div",{children:[c.jsx("dt",{children:"Started"}),c.jsx("dd",{children:t.startedAt})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Duration"}),c.jsx("dd",{children:t.duration})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Trigger"}),c.jsx("dd",{children:t.triggerLabel})]})]}),c.jsx(ue,{variant:"outline",size:"sm",type:"button",onClick:()=>n(t.id),children:"View run"})]})}function Vf({provider:t}){const n={gemini:"border-blue-800/50 bg-blue-950/40 text-blue-300",openai:"border-green-800/50 bg-green-950/40 text-green-300",claude:"border-amber-800/50 bg-amber-950/40 text-amber-300",local:"border-purple-800/50 bg-purple-950/40 text-purple-300"};return c.jsx("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide ${n[t]??"border-zinc-700 bg-zinc-800 text-zinc-300"}`,children:t})}function nO({insights:t,onOpenEvidence:n}){const[a,l]=w.useState(null);return c.jsx("div",{className:"insight-list",children:t.map(o=>{const u=a===o.id,d=o.affectedPhrases.length>0;return c.jsxs("div",{children:[c.jsxs("div",{className:`insight-row insight-row-${o.tone} ${d?"cursor-pointer":""}`,onClick:d?()=>l(u?null:o.id):void 0,children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d&&c.jsx(Tf,{size:12,className:`shrink-0 text-zinc-500 transition-transform duration-150 ${u?"rotate-90":""}`}),c.jsx(pt,{tone:o.tone,children:o.actionLabel}),c.jsx("span",{className:"text-sm font-medium text-zinc-100 truncate",children:o.title}),c.jsx("span",{className:"hidden sm:inline text-xs text-zinc-500 truncate",children:o.detail})]}),d&&c.jsxs("span",{className:"text-[11px] text-zinc-600 whitespace-nowrap",children:[o.affectedPhrases.length," phrase",o.affectedPhrases.length>1?"s":""]})]}),u&&c.jsx("div",{className:"divide-y divide-zinc-800/20",children:o.affectedPhrases.map(m=>c.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2 pl-9 bg-zinc-900/40",children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx(Kb,{state:m.citationState}),c.jsx("span",{className:"text-sm text-zinc-200 truncate",children:m.keyword}),c.jsx("div",{className:"hidden sm:flex gap-1",children:m.provider&&c.jsx(Vf,{provider:m.provider})})]}),c.jsx("button",{type:"button",className:"text-xs text-zinc-400 hover:text-zinc-200 whitespace-nowrap transition-colors",onClick:g=>{g.stopPropagation(),n(m.evidenceId)},children:"View →"})]},m.evidenceId))})]},o.id)})})}function iO({history:t,maxDots:n=12}){const a=t.slice(-n);if(a.length===0)return c.jsx("span",{className:"text-[11px] text-zinc-600",children:"No data"});const l={cited:"bg-emerald-400","not-cited":"bg-zinc-600",lost:"bg-rose-400",emerging:"bg-emerald-400 ring-1 ring-emerald-300/60"};return c.jsx("div",{className:"flex items-center gap-[3px]",title:`${a.length} runs`,children:a.map((o,u)=>c.jsx("div",{className:`h-2.5 w-2.5 rounded-sm ${l[o.citationState]??"bg-zinc-700"}`,title:`${o.citationState} — ${new Date(o.createdAt).toLocaleDateString()}`},u))})}function aO(t){const n=new Map;for(const l of t)for(const o of l.runHistory){const u=n.get(o.createdAt);u?u.states.push(o.citationState):n.set(o.createdAt,{states:[o.citationState],runId:o.runId})}return[...n.entries()].sort(([l],[o])=>l.localeCompare(o)).map(([l,{states:o,runId:u}])=>({runId:u,createdAt:l,citationState:o.includes("cited")?"cited":o.includes("emerging")?"emerging":"not-cited"}))}function sO({phrase:t,items:n,onOpenEvidence:a}){const l=n.map(b=>b.citationState),o=l.includes("cited")?"cited":l.includes("emerging")?"emerging":l.includes("lost")?"lost":l.every(b=>b==="pending")?"pending":"not-cited",u=aO(n),d=n.filter(b=>b.citationState==="cited"||b.citationState==="emerging").length,m=(()=>{if(u.length<4)return"flat";const b=u.slice(-3),v=u.slice(-6,-3);if(v.length===0)return"flat";const x=b.filter(z=>z.citationState==="cited"||z.citationState==="emerging").length,N=v.filter(z=>z.citationState==="cited"||z.citationState==="emerging").length;return x>N?"up":x<N?"down":"flat"})(),g=(()=>{if(u.length===0)return"Awaiting first run";if(u.length===1)return"First observation";const b=u[u.length-1].citationState,v=u[u.length-2].citationState,x=b==="cited"||b==="emerging",N=v==="cited"||v==="emerging";if(!N&&x)return"Newly cited";if(N&&!x)return"Lost citation";let z=0;for(let j=u.length-1;j>=0;j--){const k=u[j].citationState;if((k==="cited"||k==="emerging")===x)z++;else break}return x?z<=1?"Cited in latest run":`Cited ${z} runs in a row`:z<=1?"Missed in latest run":`Missed for ${z} runs`})(),p=m==="up"?"↑":m==="down"?"↓":"→";return c.jsxs("div",{className:`evidence-phrase-card evidence-phrase-card--${o}`,children:[c.jsx("div",{className:"evidence-card-header",children:c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"evidence-card-keyword",children:t}),c.jsxs("div",{className:"evidence-card-status-row",children:[c.jsx(Kb,{state:o}),c.jsxs("span",{className:`evidence-card-trend evidence-card-trend--${m}`,children:[c.jsx("span",{"aria-hidden":"true",children:p}),c.jsx("span",{children:g})]})]})]})}),c.jsxs("div",{className:"evidence-card-timeline-row",children:[c.jsx(iO,{history:u,maxDots:14}),c.jsxs("span",{className:"evidence-card-ratio",children:[d,"/",n.length," provider",n.length!==1?"s":""]})]}),c.jsxs("div",{className:"evidence-card-providers",children:[n.filter(b=>b.citationState!=="pending").map(b=>c.jsxs("button",{type:"button",className:`evidence-provider-btn evidence-provider-btn--${b.citationState}`,onClick:()=>a(b.id),title:`View ${b.provider} evidence for "${t}"`,children:[c.jsx("span",{className:"capitalize",children:b.provider}),c.jsx("span",{"aria-hidden":"true",className:"font-bold",children:b.citationState==="cited"||b.citationState==="emerging"?"✓":b.citationState==="lost"?"✗":"–"}),c.jsx("span",{className:"opacity-50 text-[10px]",children:"View →"})]},b.id)),n.every(b=>b.citationState==="pending")&&c.jsx("span",{className:"text-xs text-zinc-500 italic py-1",children:"Awaiting first run"})]})]})}function lO({evidence:t,onOpenEvidence:n}){const a=w.useMemo(()=>{const l=new Map;for(const o of t){const u=l.get(o.keyword)??[];l.set(o.keyword,[...u,o])}return[...l.entries()].map(([o,u])=>({phrase:o,items:u}))},[t]);return a.length===0?c.jsx("p",{className:"supporting-copy",children:"No key phrases tracked yet."}):c.jsx("div",{className:"evidence-card-grid",children:a.map(({phrase:l,items:o})=>c.jsx(sO,{phrase:l,items:o,onOpenEvidence:n},l))})}function rO(t){return t==="High"?"negative":t==="Moderate"?"caution":"neutral"}function oO({competitors:t}){return t.length===0?c.jsx("p",{className:"text-sm text-zinc-500",children:"No competitors configured. Add competitors to track overlap."}):c.jsx("div",{className:"competitor-table-wrap",children:c.jsxs("table",{className:"competitor-table",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:"Domain"}),c.jsx("th",{children:"Pressure"}),c.jsx("th",{children:"Citations"}),c.jsx("th",{children:"Key Phrases"})]})}),c.jsx("tbody",{children:t.map(n=>c.jsxs("tr",{children:[c.jsx("td",{className:"font-medium text-zinc-100",children:n.domain}),c.jsx("td",{children:c.jsx(pt,{tone:rO(n.pressureLabel),children:n.pressureLabel})}),c.jsx("td",{className:"text-zinc-300 tabular-nums",children:n.totalKeywords>0?`${n.citationCount} / ${n.totalKeywords}`:"—"}),c.jsx("td",{className:"text-zinc-500 text-xs",children:n.citedKeywords.length>0?n.citedKeywords.join(", "):"Not cited"})]},n.id))})]})})}function cO({project:t,onNavigate:n}){const a=`/projects/${t.project.id}`;return c.jsxs("a",{className:"project-row cursor-pointer",href:a,onClick:Wt(n,a),children:[c.jsxs("div",{className:"project-row-primary",children:[c.jsxs("div",{children:[c.jsx("p",{className:"project-name",children:t.project.name}),c.jsx("p",{className:"project-domain",children:t.project.canonicalDomain})]}),c.jsx("p",{className:"project-insight",children:t.insight})]}),c.jsx("div",{className:"project-row-stat",children:c.jsxs("div",{className:"metric-inline-block",children:[c.jsx("p",{className:"metric-inline-label",children:"Answer Visibility"}),c.jsx("p",{className:"metric-inline-value",children:t.visibilityScore}),c.jsx("p",{className:"metric-inline-delta",children:t.visibilityDelta})]})}),c.jsx("div",{className:"project-row-stat",children:c.jsxs("div",{className:"metric-inline-block",children:[c.jsx("p",{className:"metric-inline-label",children:"Competitor Pressure"}),c.jsx("p",{className:"metric-inline-value",children:t.competitorPressureLabel}),c.jsxs("p",{className:"metric-inline-delta",children:[t.lastRun.kindLabel," · ",sc(t.lastRun.status)]})]})}),c.jsx("div",{className:"project-row-chart",children:c.jsx(tO,{points:t.trend,tone:Ib(t.lastRun.status)})}),c.jsx("span",{className:"project-row-link",children:c.jsx(Tf,{className:"h-4 w-4 text-zinc-500"})})]})}function uO({model:t,systemHealth:n,onNavigate:a,onOpenRun:l}){return c.jsxs("div",{className:"page-container",children:[c.jsxs("div",{className:"page-header",children:[c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Portfolio"}),c.jsx("p",{className:"page-subtitle",children:"Visibility and execution state across all projects"})]}),c.jsx("div",{className:"page-header-right",children:c.jsx("p",{className:"text-[11px] text-zinc-600",children:t.lastUpdatedAt})})]}),t.projects.length>0?c.jsx("div",{className:"project-list project-list-scrollable",children:t.projects.map(o=>c.jsx(cO,{project:o,onNavigate:a},o.project.id))}):c.jsxs(Ve,{className:"surface-card empty-card",children:[c.jsx("h3",{children:t.emptyState?.title??"No projects yet"}),c.jsx("p",{className:"supporting-copy",children:t.emptyState?.detail}),c.jsx(ue,{size:"sm",asChild:!0,children:c.jsx("a",{href:t.emptyState?.ctaHref??"/setup",onClick:Wt(a,t.emptyState?.ctaHref??"/setup"),children:t.emptyState?.ctaLabel??"Launch setup"})})]}),c.jsxs("div",{className:"overview-secondary-grid",children:[t.attentionItems.length>0&&c.jsxs("section",{className:"overview-secondary-section",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Needs attention"}),c.jsx("h2",{className:"section-title-sm",children:"What changed"})]})}),c.jsx("div",{className:"attention-list attention-list-scrollable",children:t.attentionItems.map(o=>c.jsxs("a",{className:`attention-item attention-item-${o.tone}`,href:o.href,onClick:Wt(a,o.href),children:[c.jsxs("div",{children:[c.jsx("p",{className:"attention-title",children:o.title}),c.jsx("p",{className:"attention-detail",children:o.detail})]}),c.jsx("span",{className:"attention-action",children:o.actionLabel})]},o.id))})]}),c.jsxs("section",{className:"overview-secondary-section",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Recent runs"}),c.jsx("h2",{className:"section-title-sm",children:"Activity"})]})}),c.jsx("div",{className:"compact-stack compact-stack-scrollable",children:t.recentRuns.length>0?t.recentRuns.map(o=>c.jsxs("button",{className:"compact-run",type:"button",onClick:()=>l(o.id),children:[c.jsxs("div",{children:[c.jsx("p",{className:"compact-run-title",children:o.projectName}),c.jsx("p",{className:"compact-run-detail",children:o.summary})]}),c.jsx(lc,{status:o.status})]},o.id)):c.jsx("p",{className:"supporting-copy",children:"Run history appears here after the first launch."})})]})]}),c.jsxs("section",{className:"page-section",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"System health"}),c.jsx("h2",{className:"section-title-sm",children:"Infrastructure"})]})}),c.jsx("div",{className:"health-grid",children:n.map(o=>c.jsxs(Ve,{className:"surface-card compact-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:o.label}),c.jsx("h3",{children:o.detail})]}),c.jsx(pt,{tone:o.tone,children:o.label})]}),c.jsx("p",{className:"supporting-copy",children:o.meta})]},o.id))})]})]})}function dO({projects:t,onNavigate:n,onProjectCreated:a}){const[l,o]=w.useState(!1),[u,d]=w.useState(""),[m,g]=w.useState(""),[p,b]=w.useState(""),[v,x]=w.useState("US"),[N,z]=w.useState("en"),[j,k]=w.useState(!1),[A,T]=w.useState(null),O=u.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),R=async()=>{if(!(!O||!p)){k(!0),T(null);try{const L=await ac(O,{displayName:m||u,canonicalDomain:p,country:v,language:N});a(),d(""),g(""),b(""),x("US"),z("en"),o(!1),n(`/projects/${L.id}`)}catch(L){T(L instanceof Error?L.message:"Failed to create project")}finally{k(!1)}}};return c.jsxs("div",{className:"page-container",children:[c.jsxs("div",{className:"page-header",children:[c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Projects"}),c.jsxs("p",{className:"page-subtitle",children:[t.length," project",t.length!==1?"s":""," tracked"]})]}),c.jsx("div",{className:"page-header-right",children:c.jsxs(ue,{type:"button",onClick:()=>o(L=>!L),children:[c.jsx(ky,{className:"size-4 mr-1.5"}),"Add project"]})})]}),l?c.jsxs(Ve,{className:"surface-card mb-6",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"New project"}),c.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Create a new monitoring project"})]})}),c.jsxs("div",{className:"compact-stack mt-4",children:[c.jsxs("div",{className:"setup-field-row",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"new-project-name",children:"Project name"}),c.jsx("input",{id:"new-project-name",className:"setup-input",type:"text",placeholder:"my-project",value:u,onChange:L=>d(L.target.value)}),O&&O!==u?c.jsxs("p",{className:"supporting-copy",children:["Slug: ",O]}):null]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"new-display-name",children:"Display name"}),c.jsx("input",{id:"new-display-name",className:"setup-input",type:"text",placeholder:"My Project",value:m,onChange:L=>g(L.target.value)})]})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"new-domain",children:"Canonical domain"}),c.jsx("input",{id:"new-domain",className:"setup-input",type:"text",placeholder:"example.com",value:p,onChange:L=>b(L.target.value)})]}),c.jsxs("div",{className:"setup-field-row",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"new-country",children:"Country"}),c.jsx("input",{id:"new-country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:v,onChange:L=>x(L.target.value.toUpperCase())})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"new-language",children:"Language"}),c.jsx("input",{id:"new-language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:N,onChange:L=>z(L.target.value.toLowerCase())})]})]})]}),A?c.jsx("p",{className:"text-rose-400 text-sm mt-3",children:A}):null,c.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[c.jsx(ue,{type:"button",disabled:!O||!p||j,onClick:R,children:j?"Creating...":"Create project"}),c.jsx(ue,{type:"button",variant:"ghost",onClick:()=>o(!1),children:"Cancel"})]})]}):null,t.length>0?c.jsx("div",{className:"data-table-wrapper",children:c.jsxs("table",{className:"data-table",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:"Name"}),c.jsx("th",{children:"Domain"}),c.jsx("th",{children:"Visibility"}),c.jsx("th",{children:"Last run"}),c.jsx("th",{className:"text-right",children:"Country"})]})}),c.jsx("tbody",{children:t.map(L=>{const H=`/projects/${L.project.id}`,K=L.recentRuns[0];return c.jsxs("tr",{className:"cursor-pointer",onClick:()=>n(H),children:[c.jsxs("td",{children:[c.jsx("a",{className:"text-zinc-100 font-medium hover:underline",href:H,onClick:Wt(n,H),children:L.project.displayName||L.project.name}),c.jsx("p",{className:"text-[11px] text-zinc-500",children:L.project.name})]}),c.jsx("td",{className:"text-zinc-400",children:L.project.canonicalDomain}),c.jsx("td",{children:c.jsx(pt,{tone:L.visibilitySummary.tone,children:L.visibilitySummary.value})}),c.jsx("td",{className:"text-zinc-500 text-sm",children:K?c.jsx(lc,{status:K.status}):c.jsx("span",{className:"text-zinc-600",children:"No runs"})}),c.jsx("td",{className:"text-right text-zinc-500",children:L.project.country})]},L.project.id)})})]})}):l?null:c.jsxs(Ve,{className:"surface-card empty-card",children:[c.jsx("h3",{children:"No projects yet"}),c.jsx("p",{className:"supporting-copy",children:"Create your first monitoring project to start tracking AI visibility."}),c.jsxs(ue,{type:"button",onClick:()=>o(!0),children:[c.jsx(ky,{className:"size-4 mr-1.5"}),"Add project"]})]}),c.jsx(fO,{onApplied:a})]})}function fO({onApplied:t}){const[n,a]=w.useState(""),[l,o]=w.useState(!1),[u,d]=w.useState([]),[m,g]=w.useState([]),p=async()=>{if(!n.trim())return;o(!0),d([]),g([]);const b=Tj(n),v=[],x=[];for(let N=0;N<b.length;N++){const z=b[N];if(z.errors.length>0){v.push(`Document ${N+1}: ${z.errors[0]?.message}`);continue}const j=z.toJSON();if(!(!j||typeof j!="object"))try{const k=await vA(j);x.push(`Applied "${k.displayName||k.name}" (revision ${k.configRevision})`)}catch(k){v.push(`Document ${N+1}: ${k instanceof Error?k.message:String(k)}`)}}d(x),g(v),o(!1),x.length>0&&t()};return c.jsxs("section",{className:"mt-8",children:[c.jsx("div",{className:"page-section-divider"}),c.jsx("div",{className:"section-head mt-6",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Config as code"}),c.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Apply YAML"})]})}),c.jsxs("p",{className:"text-zinc-500 text-sm mb-3",children:["Paste a ",c.jsx("code",{className:"text-zinc-400",children:"canonry.yaml"})," config (multi-document YAML with ",c.jsx("code",{className:"text-zinc-400",children:"---"})," separators supported)."]}),c.jsx("textarea",{className:"setup-input w-full font-mono text-xs",rows:10,placeholder:`apiVersion: canonry/v1
|
|
225
|
-
kind: Project
|
|
226
|
-
metadata:
|
|
227
|
-
name: my-project
|
|
228
|
-
spec:
|
|
229
|
-
canonicalDomain: example.com
|
|
230
|
-
country: US
|
|
231
|
-
language: en
|
|
232
|
-
keywords: []`,value:n,onChange:b=>a(b.target.value)}),u.length>0&&c.jsx("ul",{className:"mt-2 space-y-1",children:u.map((b,v)=>c.jsx("li",{className:"text-emerald-400 text-sm",children:b},v))}),m.length>0&&c.jsx("ul",{className:"mt-2 space-y-1",children:m.map((b,v)=>c.jsx("li",{className:"text-rose-400 text-sm",children:b},v))}),c.jsx("div",{className:"mt-3",children:c.jsx(ue,{type:"button",disabled:!n.trim()||l,onClick:p,children:l?"Applying...":"Apply"})})]})}function hO({model:t,tab:n,onOpenEvidence:a,onOpenRun:l,onTriggerRun:o,onDeleteProject:u,onAddKeywords:d,onAddCompetitors:m,onUpdateOwnedDomains:g,onUpdateProject:p,onNavigate:b}){const[v,x]=w.useState(!1),[N,z]=w.useState(!1),[j,k]=w.useState(!1),[A,T]=w.useState(null),[O,R]=w.useState(!1),[L,H]=w.useState(""),[K,D]=w.useState(!1),[P,xe]=w.useState(!1),[Q,oe]=w.useState(""),[$e,Qe]=w.useState(!1),[me,U]=w.useState(!1),[F,le]=w.useState(""),[ye,ee]=w.useState(!1);async function C(){const V=await oA(t.project.name),se=typeof V=="string"?V:JSON.stringify(V,null,2),Ie=new Blob([se],{type:"text/yaml"}),Be=URL.createObjectURL(Ie),Re=document.createElement("a");Re.href=Be,Re.download=`${t.project.name}.yaml`,Re.click(),URL.revokeObjectURL(Be)}async function G(){const V=L.split(`
|
|
233
|
-
`).map(se=>se.trim()).filter(Boolean);if(V.length!==0){D(!0);try{await d(t.project.name,V),H(""),R(!1)}finally{D(!1)}}}async function te(){const V=Q.trim();if(V){Qe(!0);try{await m(t.project.name,[V]),oe(""),xe(!1)}finally{Qe(!1)}}}async function ae(){const V=F.trim();if(V){ee(!0);try{const se=t.project.ownedDomains??[];await g(t.project.name,[...se,V]),le(""),U(!1)}finally{ee(!1)}}}async function ce(V){ee(!0);try{const se=t.project.ownedDomains??[];await g(t.project.name,se.filter(Ie=>Ie!==V))}finally{ee(!1)}}const fe=V=>!Number.isNaN(Number.parseInt(V,10)),q=[{key:"overview",label:"Overview",href:`/projects/${t.project.id}`},{key:"search-console",label:"Search Console",href:`/projects/${t.project.id}/search-console`}];return c.jsxs("div",{className:"page-container",children:[v?c.jsxs(Ve,{className:"surface-card p-6 mb-6 border-rose-800/60",children:[c.jsx("h3",{className:"text-base font-semibold text-rose-400 mb-2",children:"Delete project?"}),c.jsxs("p",{className:"text-sm text-zinc-400 mb-4",children:["This will permanently delete ",c.jsx("strong",{className:"text-zinc-200",children:t.project.displayName||t.project.name})," and all its key phrases, competitors, runs, and snapshots. This cannot be undone."]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(ue,{type:"button",variant:"destructive",disabled:N,onClick:async()=>{z(!0),u(t.project.name)},children:N?"Deleting...":"Yes, delete project"}),c.jsx(ue,{type:"button",variant:"outline",disabled:N,onClick:()=>x(!1),children:"Cancel"})]})]}):null,c.jsxs("div",{className:"page-header",children:[c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:t.project.displayName||t.project.name}),c.jsxs("p",{className:"page-subtitle",children:[t.project.canonicalDomain,(t.project.ownedDomains??[]).length===0&&!me&&c.jsx("button",{type:"button",className:"ml-2 text-[10px] uppercase tracking-wide text-zinc-600 hover:text-zinc-400 transition-colors",onClick:()=>U(!0),children:"+ add domain"})," "," · ",t.contextLabel]}),c.jsxs("div",{className:"tag-row",children:[c.jsx("span",{className:"tag",children:t.project.country}),c.jsx("span",{className:"tag",children:t.project.language.toUpperCase()}),t.project.tags.map(V=>c.jsx("span",{className:"tag",children:V},V))]}),((t.project.ownedDomains??[]).length>0||me)&&c.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"text-[10px] uppercase tracking-wide text-zinc-500 mr-1",children:"Also tracking"}),(t.project.ownedDomains??[]).map(V=>c.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-zinc-700/60 bg-zinc-800/40 px-2 py-0.5 text-xs text-zinc-300",children:[V,c.jsx("button",{type:"button",className:"ml-0.5 text-zinc-500 hover:text-zinc-200 transition-colors",disabled:ye,onClick:()=>ce(V),"aria-label":`Remove ${V}`,children:"×"})]},V)),me?c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx("input",{className:"rounded border border-zinc-700 bg-transparent px-1.5 py-0.5 text-xs text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none w-40",type:"text",placeholder:"docs.example.com",value:F,onChange:V=>le(V.target.value),onKeyDown:V=>V.key==="Enter"&&ae(),autoFocus:!0}),c.jsx(ue,{type:"button",size:"sm",disabled:!F.trim()||ye,onClick:ae,children:ye?"...":"Add"}),c.jsx("button",{type:"button",className:"text-xs text-zinc-500 hover:text-zinc-300",onClick:()=>{U(!1),le("")},children:"Cancel"})]}):c.jsx("button",{type:"button",className:"rounded-full border border-dashed border-zinc-700 px-2 py-0.5 text-[10px] uppercase tracking-wide text-zinc-500 hover:text-zinc-300 hover:border-zinc-500 transition-colors",onClick:()=>U(!0),children:"+ domain"})]})]}),c.jsxs("div",{className:"page-header-right",children:[c.jsx("p",{className:"text-sm text-zinc-500",children:t.dateRangeLabel}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(ue,{type:"button",variant:"outline",size:"icon",onClick:C,"aria-label":"Export project as YAML",children:c.jsx(bN,{className:"h-4 w-4 text-zinc-400"})}),c.jsx(ue,{type:"button",variant:"outline",size:"icon",onClick:()=>x(!0),"aria-label":"Delete project",children:c.jsx(RN,{className:"h-4 w-4 text-zinc-400"})}),c.jsx(ue,{type:"button",disabled:j,onClick:async()=>{k(!0),T(null);try{await o(t.project.name)}catch(V){T(V instanceof Error?V.message:"Failed to trigger run")}finally{k(!1)}},children:j?"Starting...":"Run now"})]})]})]}),A&&c.jsxs("div",{className:"mb-3 rounded-lg border border-rose-800/40 bg-rose-950/20 px-3 py-2 text-sm text-rose-300",children:[A,c.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>T(null),children:"×"})]}),c.jsx("nav",{className:"project-subnav","aria-label":"Project sections",children:q.map(V=>c.jsx("a",{className:`project-subnav-link ${V.key===n?"project-subnav-link-active":""}`,href:V.href,"aria-current":V.key===n?"page":void 0,onClick:Wt(b,V.href),children:V.label},V.key))}),n==="overview"?c.jsxs(c.Fragment,{children:[c.jsxs("section",{className:"gauge-row",children:[c.jsx(Gd,{value:t.visibilitySummary.value,label:t.visibilitySummary.label,delta:t.visibilitySummary.delta,tone:t.visibilitySummary.tone,description:t.visibilitySummary.description,tooltip:t.visibilitySummary.tooltip,isNumeric:fe(t.visibilitySummary.value)}),c.jsx(Gd,{value:t.competitorPressure.value,label:t.competitorPressure.label,delta:t.competitorPressure.delta,tone:t.competitorPressure.tone,description:t.competitorPressure.description,tooltip:t.competitorPressure.tooltip,isNumeric:fe(t.competitorPressure.value)}),c.jsx(Gd,{value:t.runStatus.value,label:t.runStatus.label,delta:t.runStatus.delta,tone:t.runStatus.tone,description:t.runStatus.description,tooltip:t.runStatus.tooltip,isNumeric:fe(t.runStatus.value)})]}),t.providerScores.length>1&&c.jsxs("section",{className:"page-section-divider",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Model breakdown"}),c.jsxs("h2",{children:["Visibility by model ",c.jsx(Gb,{text:"Per-model citation rate. Shows how often each AI model cites your domain across all tracked key phrases. Switching models can significantly affect citation rates."})]})]})}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3",children:t.providerScores.map(V=>c.jsxs(Ve,{className:"surface-card compact-card",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(Vf,{provider:V.provider}),c.jsxs("span",{className:`text-lg font-semibold ${V.score>=70?"text-emerald-400":V.score>=40?"text-amber-400":"text-rose-400"}`,children:[V.score,"%"]})]}),V.model&&c.jsx("p",{className:"mt-0.5 text-[11px] font-mono text-zinc-500 truncate",children:V.model}),c.jsxs("p",{className:"mt-1 text-xs text-zinc-500",children:[V.cited," of ",V.total," key phrases cited"]})]},`${V.provider}::${V.model??"unknown"}`))})]}),c.jsxs("section",{className:"page-section-divider",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"What changed"}),c.jsx("h2",{children:"Citation signals"})]})}),c.jsx(nO,{insights:t.insights,onOpenEvidence:a})]}),c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Visibility evidence"}),c.jsx("h2",{children:"Key phrase citation tracking"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("p",{className:"supporting-copy",children:[new Set(t.visibilityEvidence.map(V=>V.keyword)).size," key phrases tracked"]}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>R(!O),children:O?"Cancel":"+ Add key phrases"})]})]}),O&&c.jsxs("div",{className:"mb-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3",children:[c.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:L,onChange:V=>H(V.target.value)}),c.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[c.jsxs("p",{className:"text-xs text-zinc-500",children:[L.split(`
|
|
234
|
-
`).filter(V=>V.trim()).length," key phrases"]}),c.jsx(ue,{type:"button",size:"sm",disabled:!L.trim()||K,onClick:G,children:K?"Adding...":"Add key phrases"})]})]}),c.jsx(lO,{evidence:t.visibilityEvidence,onOpenEvidence:a})]}),c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Competitors"}),c.jsx("h2",{children:"Competitive landscape"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("p",{className:"supporting-copy",children:[t.competitors.length," tracked"]}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>xe(!P),children:P?"Cancel":"+ Add competitor"})]})]}),P&&c.jsxs("div",{className:"mb-3 flex gap-2 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3",children:[c.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:Q,onChange:V=>oe(V.target.value),onKeyDown:V=>V.key==="Enter"&&te()}),c.jsx(ue,{type:"button",size:"sm",disabled:!Q.trim()||$e,onClick:te,children:$e?"Adding...":"Add"})]}),c.jsx(oO,{competitors:t.competitors})]}),c.jsxs("section",{className:"page-section-divider",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Run timeline"}),c.jsx("h2",{children:"Recent execution history"})]})}),c.jsx("div",{className:"run-list",children:t.recentRuns.map(V=>c.jsx(Yb,{run:V,onOpen:l},V.id))})]}),c.jsx(pO,{project:{...t.project,displayName:t.project.displayName??t.project.name},onUpdateProject:p}),c.jsx(xO,{projectName:t.project.name}),c.jsx(wO,{projectName:t.project.name})]}):c.jsx(mO,{projectName:t.project.name,onOpenSettings:()=>b("/settings")})]})}function So(t){if(!t)return"—";try{return new Date(t).toLocaleString()}catch{return t}}function rv(t){return t===null?"Unknown":t?"Pass":"Fail"}function mO({projectName:t,onOpenSettings:n}){const[a,l]=w.useState(!1),[o,u]=w.useState([]),[d,m]=w.useState([]),[g,p]=w.useState([]),[b,v]=w.useState([]),[x,N]=w.useState([]),[z,j]=w.useState(null),[k,A]=w.useState(""),[T,O]=w.useState(""),[R,L]=w.useState("30"),[H,K]=w.useState(!1),[D,P]=w.useState({startDate:"",endDate:"",query:"",page:"",limit:"20"}),[xe,Q]=w.useState(""),[oe,$e]=w.useState(!0),[Qe,me]=w.useState(!1),[U,F]=w.useState(!1),[le,ye]=w.useState(!1),[ee,C]=w.useState(!1),[G,te]=w.useState(!1),[ae,ce]=w.useState(!1),[fe,q]=w.useState(!1),[V,se]=w.useState(null),[Ie,Be]=w.useState(null),Re=o.find(ne=>ne.connectionType==="gsc"),yn=g.length>0||b.length>0||x.length>0;async function jt(ne){if(!ne){m([]),A("");return}ye(!0);try{const{sites:we}=await jA(t);m(we),A(ne.propertyId??we[0]?.siteUrl??"")}catch(we){m([]),se(we instanceof Error?we.message:"Failed to load Search Console properties")}finally{ye(!1)}}async function En(){te(!0);try{const ne=await _A(t,{startDate:D.startDate||void 0,endDate:D.endDate||void 0,query:D.query||void 0,page:D.page||void 0,limit:parseInt(D.limit,10)||20});p(ne)}catch(ne){p([]),se(ne instanceof Error?ne.message:"Failed to load GSC performance data")}finally{te(!1)}}async function vn(){ce(!0);try{const[ne,we]=await Promise.all([CA(t,{url:xe.trim()||void 0,limit:20}),EA(t)]);v(ne),N(we)}catch(ne){v([]),N([]),se(ne instanceof Error?ne.message:"Failed to load GSC inspection history")}finally{ce(!1)}}async function Ii(){$e(!0),se(null);try{const[ne,we]=await Promise.all([Ub().catch(()=>null),xA(t).catch(()=>[])]);l(!!ne?.google?.configured),u(we);const Ki=we.find(Sa=>Sa.connectionType==="gsc");await Promise.all([jt(Ki),En(),vn()])}finally{$e(!1)}}w.useEffect(()=>{Ii()},[t]);async function Gi(){if(!a){se("Google OAuth app credentials are not configured yet. Set them on the Settings page first.");return}me(!0),se(null),Be(null);try{const{authUrl:ne}=await SA(t,"gsc"),we=window.open(ne,"_blank","width=600,height=700");if(!we){window.location.assign(ne);return}Be("Finish the Google consent flow in the popup, then close it to refresh this project.");const Ki=window.setInterval(()=>{we.closed&&(window.clearInterval(Ki),Be(null),Ii())},1e3)}catch(ne){se(ne instanceof Error?ne.message:"Failed to start OAuth flow")}finally{me(!1)}}async function It(){se(null),Be(null);try{await wA(t,"gsc"),u(ne=>ne.filter(we=>we.connectionType!=="gsc")),m([]),A("")}catch(ne){se(ne instanceof Error?ne.message:"Failed to disconnect")}}async function Rt(){if(k){C(!0),se(null);try{await NA(t,"gsc",k),u(ne=>ne.map(we=>we.connectionType==="gsc"?{...we,propertyId:k}:we)),Be("GSC property updated.")}catch(ne){se(ne instanceof Error?ne.message:"Failed to save GSC property")}finally{C(!1)}}}async function bn(){F(!0),se(null),Be(null);try{await kA(t,{days:parseInt(R,10)||void 0,full:H||void 0}),Be("GSC sync queued. Refresh after the run completes to see imported data.")}catch(ne){se(ne instanceof Error?ne.message:"Failed to trigger sync")}finally{F(!1)}}async function xa(){if(T.trim()){q(!0),se(null),Be(null);try{const ne=await zA(t,T.trim());j(ne),O(""),await vn()}catch(ne){se(ne instanceof Error?ne.message:"Failed to inspect URL")}finally{q(!1)}}}return c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Search Console"}),c.jsx("h2",{children:"Google Search Console"})]}),c.jsx("div",{className:"flex items-center gap-2",children:Re&&c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:G,onClick:()=>{En()},children:G?"Refreshing…":"Refresh data"})})]}),V&&c.jsxs("div",{className:"mb-3 rounded-lg border border-rose-800/40 bg-rose-950/20 px-3 py-2 text-sm text-rose-300",children:[V,c.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>se(null),children:"×"})]}),Ie&&c.jsxs("div",{className:"mb-3 rounded-lg border border-emerald-800/40 bg-emerald-950/20 px-3 py-2 text-sm text-emerald-300",children:[Ie,c.jsx("button",{type:"button",className:"ml-2 text-emerald-400 hover:text-emerald-200",onClick:()=>Be(null),children:"×"})]}),oe?c.jsx("p",{className:"text-sm text-zinc-500",children:"Loading…"}):c.jsxs("div",{className:"space-y-3",children:[c.jsxs(Ve,{className:"surface-card",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Connection"}),c.jsx("h3",{children:"Domain authorization"})]}),c.jsx(pt,{tone:Re?"positive":a?"caution":"negative",children:Re?"Connected":a?"Ready to connect":"App credentials missing"})]}),Re?c.jsxs("div",{className:"mt-3 space-y-3",children:[c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 px-4 py-3",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500"}),c.jsx("span",{className:"text-sm text-zinc-200",children:"Authorized for this project domain"}),c.jsx("span",{className:"text-xs text-zinc-500",children:Re.domain}),c.jsx("button",{type:"button",className:"ml-auto text-xs text-zinc-500 hover:text-rose-400 transition-colors",onClick:It,children:"Disconnect"})]}),c.jsxs("p",{className:"mt-2 text-xs text-zinc-500",children:["Canonry stores OAuth tokens per canonical domain. This project currently maps to ",c.jsx("code",{children:Re.domain}),"."]})]}),c.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Selected property"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:Re.propertyId??"No property selected yet"})]}),c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Last auth update"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:So(Re.updatedAt)})]})]})]}):c.jsxs("div",{className:"mt-3 rounded-lg border border-zinc-800/60 bg-zinc-900/30 px-4 py-5",children:[c.jsx("p",{className:"text-sm text-zinc-300",children:a?"Generate a Google OAuth link for this project and have the client sign in with a Google account that already has access to the correct Search Console property.":"Set Google OAuth client credentials first. Once configured, you can generate a consent link for this project domain."}),c.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[a?c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:Qe,onClick:Gi,children:Qe?"Opening…":"Connect Google Search Console"}):c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:!n,onClick:n,children:"Open Settings"}),!a&&c.jsx("p",{className:"text-xs text-zinc-500",children:"The same Google OAuth app credentials are shared across all projects."})]})]})]}),Re&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[c.jsxs(Ve,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Property"}),c.jsx("h3",{children:"Pick the Search Console property"})]})}),c.jsxs("div",{className:"mt-3 space-y-2",children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`gsc-property-${t}`,children:"Property URL"}),c.jsx("select",{id:`gsc-property-${t}`,className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none",value:k,disabled:le||d.length===0,onChange:ne=>A(ne.target.value),children:d.length===0?c.jsx("option",{value:"",children:le?"Loading properties…":"No properties available"}):d.map(ne=>c.jsxs("option",{value:ne.siteUrl,children:[ne.siteUrl," · ",ne.permissionLevel]},ne.siteUrl))}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(ue,{type:"button",size:"sm",variant:"outline",disabled:le,onClick:()=>{jt(Re)},children:le?"Refreshing…":"Refresh properties"}),c.jsx(ue,{type:"button",size:"sm",disabled:!k||ee,onClick:Rt,children:ee?"Saving…":"Save property"})]}),c.jsx("p",{className:"text-xs text-zinc-500",children:"The selected property is used for future syncs and URL inspections for this project."})]})]}),c.jsxs(Ve,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Sync"}),c.jsx("h3",{children:"Import GSC performance data"})]})}),c.jsxs("div",{className:"mt-3 space-y-3",children:[c.jsxs("div",{className:"grid gap-3 sm:grid-cols-[160px_1fr]",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`gsc-sync-days-${t}`,children:"Days"}),c.jsx("input",{id:`gsc-sync-days-${t}`,type:"number",min:"1",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",value:R,onChange:ne=>L(ne.target.value)})]}),c.jsxs("label",{className:"flex items-center gap-2 rounded border border-zinc-800/60 bg-zinc-900/20 px-3 py-2 text-sm text-zinc-300",children:[c.jsx("input",{type:"checkbox",checked:H,onChange:ne=>K(ne.target.checked)}),"Replace existing imported rows for the requested range"]})]}),c.jsx(ue,{type:"button",size:"sm",disabled:U||!Re.propertyId,onClick:bn,children:U?"Queueing…":"Queue sync"}),!Re.propertyId&&c.jsx("p",{className:"text-xs text-amber-400",children:"Select a Search Console property before queueing a sync."})]})]})]}),c.jsxs(Ve,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Inspection"}),c.jsx("h3",{children:"Inspect a URL"})]})}),c.jsxs("div",{className:"mt-3 flex flex-col gap-2 lg:flex-row",children:[c.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:"url",placeholder:"https://example.com/page",value:T,onChange:ne=>O(ne.target.value),onKeyDown:ne=>ne.key==="Enter"&&void xa()}),c.jsx(ue,{type:"button",size:"sm",disabled:fe||!Re.propertyId||!T.trim(),onClick:xa,children:fe?"Inspecting…":"Inspect URL"})]}),z&&c.jsxs("div",{className:"mt-3 grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Indexing state"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:z.indexingState??"Unknown"})]}),c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Verdict"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:z.verdict??"Unknown"})]}),c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Mobile friendly"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:rv(z.isMobileFriendly)})]}),c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Last crawl"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:So(z.crawlTime)})]})]})]})]}),(Re||yn)&&c.jsxs(c.Fragment,{children:[c.jsxs(Ve,{className:"surface-card",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Performance"}),c.jsx("h3",{children:"Imported search queries"})]}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:G,onClick:()=>{En()},children:G?"Loading…":"Apply filters"})]}),c.jsxs("div",{className:"mt-3 grid gap-2 lg:grid-cols-5",children:[c.jsx("input",{className:"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:"date",value:D.startDate,onChange:ne=>P(we=>({...we,startDate:ne.target.value}))}),c.jsx("input",{className:"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:"date",value:D.endDate,onChange:ne=>P(we=>({...we,endDate:ne.target.value}))}),c.jsx("input",{className:"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:"Filter query",value:D.query,onChange:ne=>P(we=>({...we,query:ne.target.value}))}),c.jsx("input",{className:"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:"Filter page",value:D.page,onChange:ne=>P(we=>({...we,page:ne.target.value}))}),c.jsx("input",{className:"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:"number",min:"1",placeholder:"Limit",value:D.limit,onChange:ne=>P(we=>({...we,limit:ne.target.value}))})]}),g.length>0?c.jsx("div",{className:"mt-3 overflow-x-auto",children:c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"Date"}),c.jsx("th",{className:"text-left",children:"Query"}),c.jsx("th",{className:"text-left",children:"Page"}),c.jsx("th",{className:"text-right",children:"Clicks"}),c.jsx("th",{className:"text-right",children:"Impressions"}),c.jsx("th",{className:"text-right",children:"CTR"}),c.jsx("th",{className:"text-right",children:"Position"})]})}),c.jsx("tbody",{children:g.map((ne,we)=>c.jsxs("tr",{children:[c.jsx("td",{className:"text-zinc-400",children:ne.date}),c.jsx("td",{className:"max-w-xs truncate text-zinc-200",children:ne.query}),c.jsx("td",{className:"max-w-xs truncate text-zinc-400",children:ne.page}),c.jsx("td",{className:"text-right tabular-nums text-zinc-300",children:ne.clicks.toLocaleString()}),c.jsx("td",{className:"text-right tabular-nums text-zinc-400",children:ne.impressions.toLocaleString()}),c.jsxs("td",{className:"text-right tabular-nums text-zinc-400",children:[(ne.ctr*100).toFixed(1),"%"]}),c.jsx("td",{className:"text-right tabular-nums text-zinc-400",children:ne.position.toFixed(1)})]},`${ne.date}:${ne.query}:${ne.page}:${we}`))})]})}):c.jsx("p",{className:"mt-3 text-sm text-zinc-500",children:"No performance rows match the current filters yet."})]}),c.jsxs(Ve,{className:"surface-card",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"History"}),c.jsx("h3",{children:"Inspection log"})]}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:ae,onClick:()=>{vn()},children:ae?"Loading…":"Refresh history"})]}),c.jsxs("div",{className:"mt-3 flex flex-col gap-2 lg:flex-row",children:[c.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:"Filter exact URL",value:xe,onChange:ne=>Q(ne.target.value)}),c.jsx(ue,{type:"button",size:"sm",variant:"outline",disabled:ae,onClick:()=>{vn()},children:"Apply filter"})]}),b.length>0?c.jsx("div",{className:"mt-3 overflow-x-auto",children:c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"URL"}),c.jsx("th",{className:"text-left",children:"Indexing"}),c.jsx("th",{className:"text-left",children:"Verdict"}),c.jsx("th",{className:"text-left",children:"Coverage"}),c.jsx("th",{className:"text-left",children:"Mobile"}),c.jsx("th",{className:"text-left",children:"Inspected"})]})}),c.jsx("tbody",{children:b.map(ne=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:ne.url}),c.jsx("td",{className:"text-zinc-300",children:ne.indexingState??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:ne.verdict??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:ne.coverageState??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:rv(ne.isMobileFriendly)}),c.jsx("td",{className:"text-zinc-400",children:So(ne.inspectedAt)})]},ne.id))})]})}):c.jsx("p",{className:"mt-3 text-sm text-zinc-500",children:"No inspection history yet."})]}),c.jsxs(Ve,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Deindexed"}),c.jsx("h3",{children:"Recent indexing losses"})]})}),x.length>0?c.jsx("div",{className:"mt-3 overflow-x-auto",children:c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"URL"}),c.jsx("th",{className:"text-left",children:"Previous"}),c.jsx("th",{className:"text-left",children:"Current"}),c.jsx("th",{className:"text-left",children:"Changed at"})]})}),c.jsx("tbody",{children:x.map(ne=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:ne.url}),c.jsx("td",{className:"text-zinc-400",children:ne.previousState??"Unknown"}),c.jsx("td",{className:"text-zinc-300",children:ne.currentState??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:So(ne.transitionDate)})]},`${ne.url}:${ne.transitionDate}`))})]})}):c.jsx("p",{className:"mt-3 text-sm text-zinc-500",children:"No deindexed transitions recorded."})]})]})]})]})}function pO({project:t,onUpdateProject:n}){const[a,l]=w.useState(!1),[o,u]=w.useState(!1),[d,m]=w.useState(null),[g,p]=w.useState(t.displayName),[b,v]=w.useState(t.canonicalDomain),[x,N]=w.useState(t.country),[z,j]=w.useState(t.language),[k,A]=w.useState(t.ownedDomains??[]),[T,O]=w.useState("");w.useEffect(()=>{a||(p(t.displayName),v(t.canonicalDomain),N(t.country),j(t.language),A(t.ownedDomains??[]))},[t,a]);function R(){l(!1),m(null),p(t.displayName),v(t.canonicalDomain),N(t.country),j(t.language),A(t.ownedDomains??[]),O("")}function L(){const Q=T.trim();Q&&(k.includes(Q)||A([...k,Q]),O(""))}function H(Q){A(k.filter(oe=>oe!==Q))}async function K(){if(!(!g.trim()||!b.trim()||!x.trim()||!z.trim())){u(!0),m(null);try{await n(t.name,{displayName:g.trim(),canonicalDomain:b.trim(),ownedDomains:k,country:x.trim(),language:z.trim()}),l(!1)}catch(Q){m(Q instanceof Error?Q.message:"Failed to save")}finally{u(!1)}}}const D=g!==t.displayName||b!==t.canonicalDomain||x!==t.country||z!==t.language||JSON.stringify(k)!==JSON.stringify(t.ownedDomains??[]),P="w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",xe="block text-xs font-medium text-zinc-400 mb-1";return c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Configuration"}),c.jsx("h2",{children:"Project settings"})]}),!a&&c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>l(!0),children:"Edit settings"})]}),d&&c.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:[d,c.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>m(null),children:"×"})]}),a?c.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-4",children:[c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:xe,children:"Display name"}),c.jsx("input",{className:P,type:"text",value:g,onChange:Q=>p(Q.target.value),placeholder:"My Project"})]}),c.jsxs("div",{children:[c.jsx("label",{className:xe,children:"Canonical domain"}),c.jsx("input",{className:P,type:"text",value:b,onChange:Q=>v(Q.target.value),placeholder:"example.com"})]}),c.jsxs("div",{children:[c.jsx("label",{className:xe,children:"Country"}),c.jsx("input",{className:P,type:"text",value:x,onChange:Q=>N(Q.target.value),placeholder:"US",maxLength:2})]}),c.jsxs("div",{children:[c.jsx("label",{className:xe,children:"Language"}),c.jsx("input",{className:P,type:"text",value:z,onChange:Q=>j(Q.target.value),placeholder:"en"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:xe,children:"Owned domains"}),c.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:k.map(Q=>c.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-zinc-700/60 bg-zinc-800/40 px-2 py-0.5 text-xs text-zinc-300",children:[Q,c.jsx("button",{type:"button",className:"ml-0.5 text-zinc-500 hover:text-zinc-200 transition-colors",onClick:()=>H(Q),"aria-label":`Remove ${Q}`,children:"×"})]},Q))}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{className:`${P} flex-1`,type:"text",placeholder:"docs.example.com",value:T,onChange:Q=>O(Q.target.value),onKeyDown:Q=>Q.key==="Enter"&&(Q.preventDefault(),L())}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:!T.trim(),onClick:L,children:"Add"})]})]}),c.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-zinc-800/60",children:[c.jsx(ue,{type:"button",disabled:o||!D||!g.trim()||!b.trim(),onClick:K,children:o?"Saving...":"Save changes"}),c.jsx(ue,{type:"button",variant:"outline",disabled:o,onClick:R,children:"Cancel"})]})]}):c.jsx("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 overflow-hidden",children:c.jsx("table",{className:"w-full text-sm",children:c.jsxs("tbody",{children:[c.jsxs("tr",{className:"border-b border-zinc-800/40",children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium w-40",children:"Display name"}),c.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:t.displayName||"—"})]}),c.jsxs("tr",{className:"border-b border-zinc-800/40",children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Canonical domain"}),c.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:t.canonicalDomain})]}),c.jsxs("tr",{className:"border-b border-zinc-800/40",children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Owned domains"}),c.jsx("td",{className:"px-4 py-2.5",children:(t.ownedDomains??[]).length>0?c.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.ownedDomains.map(Q=>c.jsx("span",{className:"rounded-full border border-zinc-700/60 bg-zinc-800/40 px-2 py-0.5 text-xs text-zinc-300",children:Q},Q))}):c.jsx("span",{className:"text-zinc-500",children:"—"})})]}),c.jsxs("tr",{className:"border-b border-zinc-800/40",children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Country"}),c.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:t.country})]}),c.jsxs("tr",{children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Language"}),c.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:t.language})]})]})})})]})}const gO=[{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"}],ov=["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 rf(t){return t===0?"12:00 AM":t<12?`${t}:00 AM`:t===12?"12:00 PM":`${t-12}:00 PM`}function yO(t,n){return t==="twice-daily"?"twice-daily":t.startsWith("weekly@")?`${t}@${n}`:`daily@${n}`}function vO(t,n){if(!t)return{freq:"custom",hour:6,customCron:n};if(t==="twice-daily")return{freq:"twice-daily",hour:6,customCron:""};const a=t.match(/^daily(?:@(\d+))?$/);if(a)return{freq:"daily",hour:a[1]?parseInt(a[1]):6,customCron:""};const l=t.match(/^(weekly@(?:mon|tue|wed|thu|fri|sat|sun))(?:@(\d+))?$/);return l?{freq:l[1],hour:l[2]?parseInt(l[2]):6,customCron:""}:{freq:"custom",hour:6,customCron:n}}function bO(t,n,a){const l=a==="UTC"?"UTC":a.split("/").pop()?.replace(/_/g," ")??a;if(!t)return`Custom: ${n} · ${l}`;if(t==="twice-daily")return`Twice a day (6am & 6pm) · ${l}`;const o=t.match(/^daily(?:@(\d+))?$/);if(o){const d=o[1]?parseInt(o[1]):6;return`Every day at ${rf(d)} · ${l}`}const u=t.match(/^weekly@(mon|tue|wed|thu|fri|sat|sun)(?:@(\d+))?$/);if(u){const d={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"},m=u[2]?parseInt(u[2]):6;return`Every ${d[u[1]]} at ${rf(m)} · ${l}`}return`${t} · ${l}`}function xO({projectName:t}){const[n,a]=w.useState("loading"),[l,o]=w.useState(!1),[u,d]=w.useState("daily"),[m,g]=w.useState(6),[p,b]=w.useState(""),[v,x]=w.useState("UTC"),[N,z]=w.useState(!1),[j,k]=w.useState(""),[A,T]=w.useState(!1),[O,R]=w.useState(!1),[L,H]=w.useState(null);w.useEffect(()=>{dA(t).then(a).catch(()=>a(null))},[t]);const K=()=>{if(n&&n!=="loading"){const Q=vO(n.preset??null,n.cronExpr);d(Q.freq),g(Q.hour),b(Q.customCron);const oe=ov.includes(n.timezone);x(oe?n.timezone:"Other"),z(!oe),k(oe?"":n.timezone)}else d("daily"),g(6),b(""),x("UTC"),z(!1),k("");H(null),o(!0)},D=async()=>{T(!0),H(null);try{const oe={timezone:N?j.trim()||"UTC":v};u==="custom"?oe.cron=p.trim():oe.preset=yO(u,m);const $e=await tv(t,oe);a($e),o(!1)}catch(Q){H(Q instanceof Error?Q.message:"Failed to save schedule")}finally{T(!1)}},P=async()=>{if(!(!n||n==="loading")){T(!0),H(null);try{const Q={timezone:n.timezone,enabled:!n.enabled};n.preset?Q.preset=n.preset:Q.cron=n.cronExpr,a(await tv(t,Q))}catch(Q){H(Q instanceof Error?Q.message:"Failed to update schedule")}finally{T(!1)}}},xe=async()=>{R(!0),H(null);try{await fA(t),a(null),o(!1)}catch(Q){H(Q instanceof Error?Q.message:"Failed to remove schedule")}finally{R(!1)}};return c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Automation"}),c.jsx("h2",{children:"Scheduled runs"})]}),n!=="loading"&&!l&&c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:K,children:n?"Edit schedule":"+ Set schedule"})]}),n==="loading"&&c.jsx("p",{className:"supporting-copy",children:"Loading..."}),n!=="loading"&&!l&&n===null&&c.jsx(Ve,{className:"surface-card compact-card",children:c.jsx("p",{className:"supporting-copy",children:"No schedule configured. Set one to automatically trigger visibility sweeps."})}),n!=="loading"&&!l&&n!==null&&c.jsxs(Ve,{className:"surface-card compact-card",children:[c.jsxs("div",{className:"flex items-start justify-between gap-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"text-sm font-medium text-zinc-200",children:bO(n.preset??null,n.cronExpr,n.timezone)}),c.jsxs("p",{className:"text-xs text-zinc-500",children:["Cron: ",c.jsx("span",{className:"font-mono",children:n.cronExpr})]}),n.nextRunAt&&c.jsxs("p",{className:"text-xs text-zinc-500",children:["Next run: ",new Date(n.nextRunAt).toLocaleString()]}),n.lastRunAt&&c.jsxs("p",{className:"text-xs text-zinc-500",children:["Last run: ",new Date(n.lastRunAt).toLocaleString()]})]}),c.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[c.jsx(pt,{tone:n.enabled?"positive":"neutral",children:n.enabled?"Active":"Paused"}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:A,onClick:P,children:n.enabled?"Pause":"Resume"}),c.jsx(ue,{type:"button",variant:"ghost",size:"sm",disabled:O,onClick:xe,children:O?"Removing...":"Remove"})]})]}),L&&c.jsx("p",{className:"text-rose-400 text-sm mt-2",children:L})]}),l&&c.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-3",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Frequency"}),c.jsx("select",{className:"w-full rounded border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none",value:u,onChange:Q=>d(Q.target.value),children:gO.map(Q=>c.jsx("option",{value:Q.value,children:Q.label},Q.value))})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Time"}),c.jsx("select",{className:"w-full rounded border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none disabled:opacity-40",value:m,disabled:u==="twice-daily"||u==="custom",onChange:Q=>g(parseInt(Q.target.value)),children:Array.from({length:24},(Q,oe)=>c.jsx("option",{value:oe,children:rf(oe)},oe))})]})]}),u==="custom"&&c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Cron expression"}),c.jsx("input",{className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 font-mono focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"0 9 * * 1-5",value:p,onChange:Q=>b(Q.target.value)})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Timezone"}),c.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:N?"Other":v,onChange:Q=>{Q.target.value==="Other"?(z(!0),x("Other")):(z(!1),x(Q.target.value))},children:[ov.map(Q=>c.jsx("option",{value:Q,children:Q},Q)),c.jsx("option",{value:"Other",children:"Other (enter manually)…"})]}),N&&c.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:j,onChange:Q=>k(Q.target.value)})]}),L&&c.jsx("p",{className:"text-rose-400 text-sm",children:L}),c.jsxs("div",{className:"flex gap-2 justify-end",children:[c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!1),H(null)},children:"Cancel"}),c.jsx(ue,{type:"button",size:"sm",disabled:A||u==="custom"&&!p.trim(),onClick:D,children:A?"Saving...":"Save schedule"})]})]})]})}const SO=[{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 wO({projectName:t}){const[n,a]=w.useState("loading"),[l,o]=w.useState(!1),[u,d]=w.useState(""),[m,g]=w.useState(["citation.lost","citation.gained"]),[p,b]=w.useState(!1),[v,x]=w.useState(null),[N,z]=w.useState({});w.useEffect(()=>{hA(t).then(a).catch(()=>a([]))},[t]);const j=O=>{g(R=>R.includes(O)?R.filter(L=>L!==O):[...R,O])},k=async()=>{if(!(!u.trim()||m.length===0)){b(!0),x(null);try{const O=await mA(t,{channel:"webhook",url:u.trim(),events:m});a(R=>R==="loading"?[O]:[...R,O]),d(""),g(["citation.lost","citation.gained"]),o(!1)}catch(O){x(O instanceof Error?O.message:"Failed to add webhook")}finally{b(!1)}}},A=async O=>{try{await pA(t,O),a(R=>R==="loading"?R:R.filter(L=>L.id!==O))}catch(R){x(R instanceof Error?R.message:"Failed to remove webhook")}},T=async O=>{z(R=>({...R,[O]:{state:"testing"}}));try{const R=await gA(t,O);z(L=>({...L,[O]:{state:R.ok?"ok":"fail",status:R.status}}))}catch{z(R=>({...R,[O]:{state:"fail"}}))}};return c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Automation"}),c.jsx("h2",{children:"Notifications"})]}),n!=="loading"&&c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!l),x(null)},children:l?"Cancel":"+ Add webhook"})]}),l&&c.jsxs("div",{className:"mb-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-3",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Webhook URL"}),c.jsx("input",{className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"url",placeholder:"https://hooks.example.com/canonry",value:u,onChange:O=>d(O.target.value)})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Trigger on"}),c.jsx("div",{className:"flex flex-wrap gap-3",children:SO.map(O=>c.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[c.jsx("input",{type:"checkbox",className:"rounded border-zinc-600 bg-zinc-800",checked:m.includes(O.value),onChange:()=>j(O.value)}),c.jsx("span",{className:"text-sm text-zinc-300",children:O.label})]},O.value))})]}),v&&c.jsx("p",{className:"text-rose-400 text-sm",children:v}),c.jsxs("div",{className:"flex gap-2 justify-end",children:[c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!1),x(null)},children:"Cancel"}),c.jsx(ue,{type:"button",size:"sm",disabled:p||!u.trim()||m.length===0,onClick:k,children:p?"Adding...":"Add webhook"})]})]}),n==="loading"&&c.jsx("p",{className:"supporting-copy",children:"Loading..."}),n!=="loading"&&n.length===0&&!l&&c.jsx(Ve,{className:"surface-card compact-card",children:c.jsx("p",{className:"supporting-copy",children:"No webhooks configured. Add one to get alerted when citations change or runs complete."})}),n!=="loading"&&n.length>0&&c.jsxs("div",{className:"evidence-table-wrap",children:[c.jsxs("table",{className:"evidence-table",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:"URL"}),c.jsx("th",{children:"Events"}),c.jsx("th",{children:"Status"}),c.jsx("th",{})]})}),c.jsx("tbody",{children:n.map(O=>c.jsxs("tr",{children:[c.jsx("td",{className:"evidence-keyword-cell",children:c.jsx("span",{className:"font-mono text-xs text-zinc-300 break-all",children:O.url})}),c.jsx("td",{children:c.jsx("div",{className:"flex flex-wrap gap-1",children:O.events.map(R=>c.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:R.replace("."," ")},R))})}),c.jsx("td",{children:c.jsx(pt,{tone:O.enabled?"positive":"neutral",children:O.enabled?"Active":"Paused"})}),c.jsx("td",{children:c.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[N[O.id]&&(()=>{const R=N[O.id],L=R.state==="testing"?"Sending…":R.state==="ok"?`Delivered${R.status?` (${R.status})`:""}`:`Failed${R.status?` (${R.status})`:""}`;return c.jsx(pt,{tone:R.state==="ok"?"positive":R.state==="fail"?"negative":"neutral",children:L})})(),c.jsx(ue,{variant:"ghost",size:"sm",type:"button",disabled:N[O.id]?.state==="testing",onClick:()=>T(O.id),children:"Test"}),c.jsx(ue,{variant:"ghost",size:"sm",type:"button",onClick:()=>A(O.id),children:"Remove"})]})})]},O.id))})]}),v&&c.jsx("p",{className:"text-rose-400 text-sm mt-2",children:v})]})]})}function jO({runs:t,onOpenRun:n,onTriggerAll:a}){const[l,o]=w.useState("all"),u=l==="all"?t:t.filter(d=>d.status===l);return c.jsxs("div",{className:"page-container",children:[c.jsxs("div",{className:"page-header",children:[c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Runs"}),c.jsx("p",{className:"page-subtitle",children:"Status, type, project, duration, and the shortest explanation that makes the outcome trustworthy."})]}),a&&c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:a,children:"Run all projects"})]}),c.jsxs("section",{children:[c.jsx("div",{className:"filter-row",role:"toolbar","aria-label":"Run filters",children:["all","queued","running","completed","partial","failed"].map(d=>c.jsx("button",{className:`filter-chip ${l===d?"filter-chip-active":""}`,type:"button","aria-pressed":l===d,onClick:()=>o(d),children:d==="all"?"All runs":sc(d)},d))}),c.jsx("div",{className:"run-list",children:u.length>0?u.map(d=>c.jsx(Yb,{run:d,onOpen:n},d.id)):c.jsxs(Ve,{className:"surface-card empty-card",children:[c.jsx("h2",{children:"No runs match this filter"}),c.jsx("p",{children:"Try another status filter or queue a new run from a project command center."})]})})]})]})}const NO={openai:"https://platform.openai.com/api-keys",claude:"https://platform.claude.com/settings/keys"},Vb={gemini:"Gemini",openai:"OpenAI",claude:"Claude",local:"Local"},kO={gemini:"e.g. gemini-3-flash",openai:"e.g. gpt-5.4",claude:"e.g. claude-sonnet-4-6",local:"e.g. llama3, mistral"};function _O({providerName:t,onSaved:n}){const a=t.toLowerCase()==="local",[l,o]=w.useState(""),[u,d]=w.useState(""),[m,g]=w.useState(""),[p,b]=w.useState(""),[v,x]=w.useState(""),[N,z]=w.useState(""),[j,k]=w.useState(!1),[A,T]=w.useState(null),[O,R]=w.useState(!1),L=a?u.trim().length>0:l.trim().length>0;async function H(){if(L){k(!0),T(null),R(!1);try{const P={};p.trim()&&(P.maxConcurrency=parseInt(p.trim(),10)),v.trim()&&(P.maxRequestsPerMinute=parseInt(v.trim(),10)),N.trim()&&(P.maxRequestsPerDay=parseInt(N.trim(),10)),await cA(t.toLowerCase(),{...l.trim()?{apiKey:l.trim()}:{},...u.trim()?{baseUrl:u.trim()}:{},...m.trim()?{model:m.trim()}:{},...Object.keys(P).length>0?{quota:P}:{}}),o(""),d(""),g(""),b(""),x(""),z(""),R(!0),n()}catch(P){T(P instanceof Error?P.message:"Failed to update provider")}finally{k(!1)}}}const K=NO[t.toLowerCase()],D=kO[t.toLowerCase()]??"Use default model";return c.jsxs("div",{className:"mt-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3 space-y-2",children:[a&&c.jsxs("div",{children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`base-url-${t}`,children:"Base URL"}),c.jsx("input",{id:`base-url-${t}`,type:"text",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"http://localhost:11434/v1",value:u,onChange:P=>d(P.target.value)}),c.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Any OpenAI-compatible endpoint — Ollama, LM Studio, llama.cpp, vLLM"})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("label",{className:"text-xs text-zinc-500",htmlFor:`api-key-${t}`,children:["API Key",a?" (optional)":""]}),K&&c.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 ↗"})]}),c.jsx("input",{id:`api-key-${t}`,type:"password",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:a?"Optional — most local servers don't need one":`Enter ${t} API key`,value:l,onChange:P=>o(P.target.value)})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`model-${t}`,children:"Model (optional)"}),c.jsx("input",{id:`model-${t}`,type:"text",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:D,value:m,onChange:P=>g(P.target.value)})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs text-zinc-500",children:"Quota (optional)"}),c.jsxs("div",{className:"mt-0.5 grid grid-cols-3 gap-1.5",children:[c.jsxs("div",{children:[c.jsx("input",{type:"number",min:"1",className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"Concurrent",value:p,onChange:P=>b(P.target.value)}),c.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Max concurrent"})]}),c.jsxs("div",{children:[c.jsx("input",{type:"number",min:"1",className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"/min",value:v,onChange:P=>x(P.target.value)}),c.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Per minute"})]}),c.jsxs("div",{children:[c.jsx("input",{type:"number",min:"1",className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"/day",value:N,onChange:P=>z(P.target.value)}),c.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Per day"})]})]})]}),A&&c.jsx("p",{className:"text-xs text-rose-400",children:A}),O&&c.jsx("p",{className:"text-xs text-emerald-400",children:"Provider updated."}),c.jsx(ue,{type:"button",size:"sm",disabled:!L||j,onClick:H,children:j?"Saving...":"Save"})]})}function zO({onSaved:t}){const[n,a]=w.useState(""),[l,o]=w.useState(""),[u,d]=w.useState(!1),[m,g]=w.useState(null),[p,b]=w.useState(!1),v=n.trim().length>0&&l.trim().length>0;async function x(){if(v){d(!0),g(null),b(!1);try{await uA({clientId:n.trim(),clientSecret:l.trim()}),a(""),o(""),b(!0),t()}catch(N){g(N instanceof Error?N.message:"Failed to update Google OAuth credentials")}finally{d(!1)}}}return c.jsxs("div",{className:"mt-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3 space-y-2",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:"google-client-id",children:"Client ID"}),c.jsx("a",{href:"https://console.cloud.google.com/apis/credentials",target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-zinc-500 hover:text-zinc-300 underline underline-offset-2",children:"Google Cloud ↗"})]}),c.jsx("input",{id:"google-client-id",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:"Google OAuth client ID",value:n,onChange:N=>a(N.target.value)})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:"google-client-secret",children:"Client secret"}),c.jsx("input",{id:"google-client-secret",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:"Google OAuth client secret",value:l,onChange:N=>o(N.target.value)})]}),c.jsxs("p",{className:"text-[11px] text-zinc-500",children:["These credentials are stored in ",c.jsx("code",{children:"~/.canonry/config.yaml"}),". Project-level Search Console connections are created separately per canonical domain."]}),m&&c.jsx("p",{className:"text-xs text-rose-400",children:m}),p&&c.jsx("p",{className:"text-xs text-emerald-400",children:"Google OAuth credentials updated."}),c.jsx(ue,{type:"button",size:"sm",disabled:!v||u,onClick:x,children:u?"Saving...":"Save Google OAuth app"})]})}function CO({settings:t,healthSnapshot:n,onSettingsChanged:a}){const[l,o]=w.useState(null),[u,d]=w.useState(!1);return c.jsxs("div",{className:"page-container",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Settings"}),c.jsx("p",{className:"page-subtitle",children:"Provider state, Google OAuth setup, and service health."})]})}),c.jsxs("section",{className:"settings-grid",children:[t.providerStatuses.map(m=>c.jsxs(Ve,{className:"surface-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Provider"}),c.jsx("h2",{children:m.name})]}),c.jsx(pt,{tone:m.state==="ready"?"positive":"caution",children:m.state==="ready"?"Ready":"Needs config"})]}),c.jsxs("dl",{className:"definition-list mt-3",children:[c.jsxs("div",{children:[c.jsx("dt",{children:"Model"}),c.jsx("dd",{className:"font-mono text-xs",children:m.model})]}),m.quota&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("dt",{children:"Concurrency"}),c.jsx("dd",{children:m.quota.maxConcurrency})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Rate limit"}),c.jsxs("dd",{children:[m.quota.maxRequestsPerMinute,"/min · ",m.quota.maxRequestsPerDay,"/day"]})]})]})]}),c.jsx("p",{className:"mt-2 text-sm text-zinc-500",children:m.detail}),c.jsx("div",{className:"mt-2",children:c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>o(l===m.name?null:m.name),children:l===m.name?"Cancel":m.state==="ready"?m.name.toLowerCase()==="local"?"Update config":"Update key":"Configure"})}),l===m.name&&c.jsx(_O,{providerName:m.name,onSaved:()=>{o(null),a?.()}})]},m.name)),c.jsxs(Ve,{className:"surface-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Google"}),c.jsx("h2",{children:"Search Console OAuth"})]}),c.jsx(pt,{tone:t.google.state==="ready"?"positive":"caution",children:t.google.state==="ready"?"Ready":"Needs config"})]}),c.jsxs("dl",{className:"definition-list mt-3",children:[c.jsxs("div",{children:[c.jsx("dt",{children:"Auth model"}),c.jsx("dd",{children:"One app credential set, then one OAuth connection per project domain"})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Storage"}),c.jsx("dd",{className:"font-mono text-xs",children:"~/.canonry/config.yaml"})]})]}),c.jsx("p",{className:"mt-2 text-sm text-zinc-500",children:t.google.detail}),c.jsx("div",{className:"mt-2",children:c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>d(!u),children:u?"Cancel":t.google.state==="ready"?"Update OAuth app":"Configure Google OAuth"})}),u&&c.jsx(zO,{onSaved:()=>{d(!1),a?.()}})]}),c.jsxs(Ve,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Service health"}),c.jsx("h2",{children:"API and worker"})]})}),c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{className:"health-row",children:[c.jsxs("div",{children:[c.jsx("p",{className:"run-row-title",children:"API"}),c.jsx("p",{className:"supporting-copy",children:n.apiStatus.detail})]}),c.jsx(pt,{tone:Bo(n.apiStatus),children:n.apiStatus.state==="ok"?"Healthy":"Attention"})]}),c.jsxs("div",{className:"health-row",children:[c.jsxs("div",{children:[c.jsx("p",{className:"run-row-title",children:"Worker"}),c.jsx("p",{className:"supporting-copy",children:n.workerStatus.detail})]}),c.jsx(pt,{tone:Bo(n.workerStatus),children:n.workerStatus.state==="ok"?"Healthy":"Attention"})]})]})]})]}),c.jsx("section",{className:"page-section",children:c.jsxs(Ve,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Self-host notes"}),c.jsx("h2",{children:"Operational guidance"})]})}),c.jsx("ul",{className:"detail-list",children:t.selfHostNotes.map(m=>c.jsx("li",{children:m},m))}),c.jsx("p",{className:"supporting-copy",children:t.bootstrapNote})]})})]})}const EO=[{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 AO({current:t,labels:n}){return c.jsx("div",{className:"setup-steps",role:"list","aria-label":"Setup progress",children:n.map((a,l)=>{const o=l<t,u=l===t;return c.jsxs("div",{className:`setup-step ${o?"setup-step-done":""} ${u?"setup-step-active":""}`,role:"listitem","aria-current":u?"step":void 0,children:[c.jsx("span",{className:"setup-step-number",children:o?"✓":l+1}),c.jsx("span",{className:"setup-step-label",children:a.label})]},a.label)})})}function OO({model:t,settings:n,onProjectCreated:a,onNavigate:l}){const[o,u]=w.useState(0),[d,m]=w.useState(""),[g,p]=w.useState(""),[b,v]=w.useState(""),[x,N]=w.useState("US"),[z,j]=w.useState("en"),[k,A]=w.useState(null),[T,O]=w.useState(null),[R,L]=w.useState(null),[H,K]=w.useState(!1),[D,P]=w.useState(""),[xe,Q]=w.useState(!1),[oe,$e]=w.useState(null),[Qe,me]=w.useState(!1),U=n.providerStatuses.filter(re=>re.state==="ready"),[F,le]=w.useState(U[0]?.name??""),[ye,ee]=w.useState(5),[C,G]=w.useState(!1),[te,ae]=w.useState(null),[ce,fe]=w.useState(""),[q,V]=w.useState(!1),[se,Ie]=w.useState(null),[Be,Re]=w.useState(!1),[yn,jt]=w.useState(!1),[En,vn]=w.useState(null),[Ii,Gi]=w.useState(!1),It=d.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Rt=D.split(`
|
|
235
|
-
`).map(re=>re.trim()).filter(Boolean),bn=ce.split(`
|
|
236
|
-
`).map(re=>re.trim()).filter(Boolean),xa=t.healthChecks.some(re=>re.id==="api"&&re.state==="ready"),ne=async()=>{if(!(!It||!b)){K(!0),L(null);try{const re=await ac(It,{displayName:g||d,canonicalDomain:b,country:x,language:z});A(It),O(re.id),a(),u(2)}catch(re){L(re instanceof Error?re.message:"Failed to create project")}finally{K(!1)}}},we=async()=>{if(!k)return;const re=Rt;if(re.length!==0){me(!0),$e(null);try{await iA(k,re),Q(!0),a(),u(3)}catch(Ln){$e(Ln instanceof Error?Ln.message:"Failed to save key phrases")}finally{me(!1)}}},Ki=async()=>{if(!(!k||!F)){G(!0),ae(null);try{const re=await yA(k,F,ye);if(re.keywords.length>0){const Ln=D?D.trimEnd()+`
|
|
237
|
-
`+re.keywords.join(`
|
|
238
|
-
`):re.keywords.join(`
|
|
239
|
-
`);P(Ln)}}catch(re){ae(re instanceof Error?re.message:"Failed to generate key phrases")}finally{G(!1)}}},Sa=async()=>{if(!k)return;const re=bn;if(re.length!==0){Re(!0),Ie(null);try{await Mb(k,re),V(!0),a(),u(4)}catch(Ln){Ie(Ln instanceof Error?Ln.message:"Failed to save competitors")}finally{Re(!1)}}},Zl=async()=>{if(k){Gi(!0),vn(null);try{await Lb(k),jt(!0),a()}catch(re){vn(re instanceof Error?re.message:"Failed to trigger run")}finally{Gi(!1)}}},en=()=>u(re=>Math.max(0,re-1)),rc=(()=>{switch(o){case 0:return c.jsxs(Ve,{className:"surface-card step-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 1 of 5"}),c.jsx("h2",{children:"System ready"})]})}),c.jsx("p",{className:"supporting-copy",children:"Checking that your Canonry instance is configured and reachable."}),c.jsx("div",{className:"compact-stack",children:t.healthChecks.map(re=>c.jsxs("div",{className:"health-check-row",children:[c.jsxs("div",{children:[c.jsx("p",{className:"run-row-title",children:re.label}),c.jsx("p",{className:"supporting-copy",children:re.detail}),re.id==="provider"&&re.state!=="ready"&&c.jsx("button",{type:"button",className:"text-emerald-400 hover:text-emerald-300 text-sm mt-1 underline underline-offset-2 cursor-pointer bg-transparent border-none p-0",onClick:()=>l("/settings"),children:"Configure providers"})]}),c.jsx(pt,{tone:re.state==="ready"?"positive":"caution",children:re.state==="ready"?"Ready":"Attention"})]},re.id))}),c.jsxs("div",{className:"setup-nav",children:[c.jsx("span",{}),c.jsx(ue,{type:"button",disabled:!xa,onClick:()=>u(1),children:"Continue"})]})]});case 1:return c.jsxs(Ve,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 2 of 5"}),c.jsx("h2",{children:"Create project"})]}),k?c.jsx(pt,{tone:"positive",children:"Created"}):null]}),k?c.jsxs("div",{className:"compact-stack",children:[c.jsxs("p",{className:"text-zinc-300",children:["Project ",c.jsx("span",{className:"text-zinc-100 font-medium",children:k})," created successfully."]}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:en,children:"Back"}),c.jsx(ue,{type:"button",onClick:()=>u(2),children:"Continue"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"project-name",children:"Project name"}),c.jsx("input",{id:"project-name",className:"setup-input",type:"text",placeholder:"my-website",value:d,onChange:re=>m(re.target.value)}),It&&It!==d?c.jsxs("p",{className:"supporting-copy",children:["Slug: ",It]}):null]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"display-name",children:"Display name (optional)"}),c.jsx("input",{id:"display-name",className:"setup-input",type:"text",placeholder:"My Website",value:g,onChange:re=>p(re.target.value)})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"domain",children:"Canonical domain"}),c.jsx("input",{id:"domain",className:"setup-input",type:"text",placeholder:"example.com",value:b,onChange:re=>v(re.target.value)})]}),c.jsxs("div",{className:"setup-field-row",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"country",children:"Country"}),c.jsx("input",{id:"country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:x,onChange:re=>N(re.target.value.toUpperCase())})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"language",children:"Language"}),c.jsx("input",{id:"language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:z,onChange:re=>j(re.target.value.toLowerCase())})]})]}),R?c.jsx("p",{className:"text-rose-400 text-sm",children:R}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:en,children:"Back"}),c.jsx(ue,{type:"button",disabled:!It||!b||H,onClick:ne,children:H?"Creating...":"Create project"})]})]})]});case 2:return c.jsxs(Ve,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 3 of 5"}),c.jsx("h2",{children:"Add key phrases"})]}),xe?c.jsxs(pt,{tone:"positive",children:[Rt.length," saved"]}):c.jsxs(pt,{tone:"neutral",children:[Rt.length," key phrase",Rt.length!==1?"s":""]})]}),c.jsx("p",{className:"supporting-copy",children:"Enter the search queries you want to track. One per line."}),xe?c.jsxs("div",{className:"compact-stack",children:[c.jsx("ul",{className:"detail-list",children:Rt.map(re=>c.jsx("li",{children:re},re))}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:en,children:"Back"}),c.jsx(ue,{type:"button",onClick:()=>u(3),children:"Continue"})]})]}):c.jsxs("div",{className:"compact-stack",children:[U.length>0?c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[c.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"auto-generate",c.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),c.jsxs("div",{className:"flex items-end gap-2",children:[c.jsxs("div",{className:"setup-field flex-1",children:[c.jsx("label",{className:"setup-label",htmlFor:"gen-provider",children:"Provider"}),c.jsx("select",{id:"gen-provider",className:"setup-input",value:F,onChange:re=>le(re.target.value),children:U.map(re=>c.jsxs("option",{value:re.name,children:[Vb[re.name]??re.name,re.model?` (${re.model})`:""]},re.name))})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"gen-count",children:"Count"}),c.jsx("select",{id:"gen-count",className:"setup-input",value:ye,onChange:re=>ee(Number(re.target.value)),children:[3,5,10,15,20].map(re=>c.jsx("option",{value:re,children:re},re))})]}),c.jsx(ue,{type:"button",variant:"outline",disabled:C||!F,onClick:Ki,children:C?"Analyzing site...":"Generate"})]}),te?c.jsx("p",{className:"text-rose-400 text-sm",children:te}):null]}):null,c.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[c.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"or type manually",c.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"keywords",children:"Key phrases (one per line)"}),c.jsx("textarea",{id:"keywords",className:"setup-textarea",rows:6,placeholder:`emergency dentist brooklyn
|
|
240
|
-
best invisalign downtown brooklyn
|
|
241
|
-
pediatric dentist brooklyn heights`,value:D,onChange:re=>P(re.target.value)})]}),oe?c.jsx("p",{className:"text-rose-400 text-sm",children:oe}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:en,children:"Back"}),c.jsx(ue,{type:"button",disabled:Rt.length===0||Qe,onClick:we,children:Qe?"Saving...":`Save ${Rt.length} key phrase${Rt.length!==1?"s":""}`})]})]})]});case 3:return c.jsxs(Ve,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 4 of 5"}),c.jsx("h2",{children:"Add competitors"})]}),q?c.jsx(pt,{tone:"positive",children:"Saved"}):null]}),c.jsx("p",{className:"supporting-copy",children:"Domains that compete for the same key phrases. One per line."}),q?c.jsxs("div",{className:"compact-stack",children:[c.jsx("ul",{className:"detail-list",children:bn.map(re=>c.jsx("li",{children:re},re))}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:en,children:"Back"}),c.jsx(ue,{type:"button",onClick:()=>u(4),children:"Continue"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"competitors",children:"Competitor domains (one per line)"}),c.jsx("textarea",{id:"competitors",className:"setup-textarea",rows:4,placeholder:`competitor1.com
|
|
242
|
-
competitor2.com`,value:ce,onChange:re=>fe(re.target.value)})]}),se?c.jsx("p",{className:"text-rose-400 text-sm",children:se}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:en,children:"Back"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:()=>u(4),children:"Skip"}),c.jsx(ue,{type:"button",disabled:bn.length===0||Be,onClick:Sa,children:Be?"Saving...":`Save ${bn.length} competitor${bn.length!==1?"s":""}`})]})]})]})]});case 4:return c.jsxs(Ve,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 5 of 5"}),c.jsx("h2",{children:"Launch first run"})]}),yn?c.jsx(pt,{tone:"positive",children:"Queued"}):null]}),yn?c.jsxs("div",{className:"compact-stack",children:[c.jsx("p",{className:"text-zinc-300",children:"Visibility sweep has been queued. View progress on the project page."}),c.jsxs("div",{className:"setup-nav",children:[c.jsx("span",{}),c.jsx(ue,{type:"button",onClick:()=>l(T?`/projects/${T}`:"/"),children:"Open project"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsxs("p",{className:"supporting-copy",children:["Everything is configured. Launch an answer-visibility sweep to start tracking citations for ",c.jsx("span",{className:"text-zinc-100 font-medium",children:k}),"."]}),En?c.jsx("p",{className:"text-rose-400 text-sm",children:En}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:en,children:"Back"}),c.jsx(ue,{type:"button",disabled:Ii,onClick:Zl,children:Ii?"Launching...":"Launch visibility sweep"})]})]})]});default:return null}})();return c.jsxs("div",{className:"page-container",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Setup"}),c.jsx("p",{className:"page-subtitle",children:"Create a project, add key phrases, add competitors, and launch the first run."})]})}),c.jsx(AO,{current:o,labels:EO}),c.jsx("section",{className:"setup-wizard",children:rc})]})}function TO({onNavigate:t}){return c.jsx("div",{className:"page-container",children:c.jsx("section",{className:"page-section",children:c.jsxs(Ve,{className:"surface-card empty-card",children:[c.jsx("h1",{children:"Route not found"}),c.jsx("p",{children:"The current path does not map to a dashboard view."}),c.jsx(ue,{asChild:!0,children:c.jsx("a",{href:"/",onClick:Wt(t,"/"),children:"Return to overview"})})]})})})}function DO({title:t,subtitle:n,children:a,open:l,onClose:o}){return c.jsx(UE,{open:l,onOpenChange:u=>u?void 0:o(),children:c.jsxs(Eb,{children:[c.jsxs(HE,{className:"drawer-head",children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:n}),c.jsx(Ab,{id:"drawer-title",children:t}),c.jsx(Ob,{className:"sr-only",children:n})]}),c.jsx("div",{className:"drawer-body",children:a})]})})}function cv(t,n){const a=n.filter(d=>d.trim().length>1),l=t.split(/(\*\*[^*]+\*\*)/).filter(Boolean).map(d=>d.startsWith("**")&&d.endsWith("**")?{type:"bold",value:d.slice(2,-2)}:{type:"text",value:d});if(a.length===0)return l.map((d,m)=>d.type==="bold"?c.jsx("strong",{className:"text-zinc-200 font-semibold",children:d.value},`b-${m}`):d.value).filter(Boolean);const o=a.map(d=>d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),u=new RegExp(`(${o.join("|")})`,"gi");return l.flatMap((d,m)=>d.value.split(u).map((p,b)=>p?b%2===1?d.type==="bold"?c.jsx("mark",{className:"answer-highlight",children:c.jsx("strong",{className:"text-zinc-200 font-semibold",children:p})},`hl-${m}-${b}`):c.jsx("mark",{className:"answer-highlight",children:p},`hl-${m}-${b}`):d.type==="bold"?c.jsx("strong",{className:"text-zinc-200 font-semibold",children:p},`b-${m}-${b}`):p:null)).filter(Boolean)}function RO({evidence:t,project:n,onClose:a}){const[l,o]=w.useState(!1),[u,d]=w.useState(-1),[m,g]=w.useState(null),[p,b]=w.useState(!1),[v,x]=w.useState({}),N=_C(n.project),z=new Set(N.map(af)),j=t.runHistory,k=j.length>1,A=u>=0&&m!==null,T=A?m:{citationState:t.citationState,provider:t.provider,model:t.model,answerSnippet:t.answerSnippet,citedDomains:t.citedDomains,competitorDomains:t.competitorDomains,groundingSources:t.groundingSources,evidenceUrls:t.evidenceUrls,changeLabel:t.changeLabel,summary:t.summary},O=T.citationState==="cited"||T.citationState==="emerging",L=T.citedDomains.findIndex(me=>z.has(me.toLowerCase().replace(/^www\./,"")))+1,H=T.citedDomains.length,K=n.project.displayName||n.project.name,D=[...N.map(af),K,K.split(" ").slice(0,2).join(" ")].filter(me=>me.trim().length>2),P=O?"cited":T.citationState==="lost"?"lost":T.citationState==="pending"?"pending":"not-cited",xe=w.useRef(0),Q=w.useCallback(async me=>{const U=++xe.current;if(me===-1||me===j.length-1){d(-1),g(null),o(!1);return}d(me),o(!1);const F=j[me],le=`${F.runId}::${t.keyword}::${t.provider}`;if(v[le]){g(v[le]);return}b(!0);try{const ye=await Ml(F.runId);if(U!==xe.current)return;const ee=ye.snapshots.find(G=>G.keyword===t.keyword&&G.provider===t.provider)??ye.snapshots.find(G=>G.keyword===t.keyword),C=ee?{citationState:ee.citationState,provider:ee.provider,model:ee.model??null,answerSnippet:ee.answerText??"",citedDomains:ee.citedDomains,competitorDomains:ee.competitorOverlap,groundingSources:ee.groundingSources,evidenceUrls:[],changeLabel:F.citationState,summary:""}:{citationState:F.citationState,provider:t.provider,model:null,answerSnippet:"",citedDomains:[],competitorDomains:[],groundingSources:[],evidenceUrls:[],changeLabel:F.citationState,summary:"Snapshot data not available for this run."};x(G=>({...G,[le]:C})),g(C)}catch{if(U!==xe.current)return;g({citationState:F.citationState,provider:t.provider,model:null,answerSnippet:"",citedDomains:[],competitorDomains:[],groundingSources:[],evidenceUrls:[],changeLabel:F.citationState,summary:"Failed to load historical run data."})}finally{U===xe.current&&b(!1)}},[j,t.keyword,t.provider,v]),oe=T.model?`${T.provider} (${T.model}) · ${T.changeLabel.toLowerCase()}`:`${T.provider} · ${T.changeLabel.toLowerCase()}`,$e=O&&L>0?{label:"Citation confirmed",title:`Cited #${L} of ${H} domain${H!==1?"s":""}`,meta:oe}:O?{label:"Citation confirmed",title:"Cited in this answer",meta:oe}:T.citationState==="lost"?{label:"Citation lost",title:H>0?`${H} domain${H!==1?"s":""} cited instead`:"No longer appearing in this answer",meta:oe}:T.citationState==="pending"?{label:"Pending",title:"Awaiting first visibility run",meta:"No provider data yet"}:{label:"Not in this answer",title:H>0?`${H} domain${H!==1?"s":""} cited instead`:"No domains cited for this query",meta:oe},Qe=()=>{if(!T.answerSnippet)return null;const me=T.answerSnippet.split(`
|
|
243
|
-
`),U=[];let F=[],le=0;const ye=()=>{if(F.length===0)return;const ee=F.join(" ").trim();ee&&U.push(c.jsx("p",{className:U.length>0?"mt-2.5":"",children:cv(ee,D)},le++)),F=[]};for(const ee of me){const C=ee.trim();if(/^[-–—]{3,}$/.test(C)){ye(),U.push(c.jsx("hr",{className:"border-zinc-800/60 my-3"},le++));continue}const G=C.match(/^(#{1,3})\s+(.+)$/);if(G){ye();const te=G[1].length,ae=G[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s#]+/u,"").trim()||G[2],ce=te===1?"text-[13px] font-semibold text-zinc-100 mt-4 mb-1":te===2?"text-xs font-semibold text-zinc-200 mt-3 mb-0.5":"text-xs font-medium text-zinc-300 mt-2";U.push(c.jsx("p",{className:ce,children:cv(ae,D)},le++));continue}if(C===""){ye();continue}F.push(C)}return ye(),U};return c.jsx(_0,{open:!0,onOpenChange:me=>{me||a()},children:c.jsxs(z0,{children:[c.jsx(Ef,{className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm"}),c.jsxs(Af,{className:"evidence-modal","aria-describedby":void 0,children:[c.jsxs("div",{className:"evidence-modal-header",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("p",{className:"eyebrow eyebrow-soft",children:[n.project.name," · ",T.provider||"All providers"]}),c.jsx(Of,{className:"text-lg font-semibold text-zinc-50 truncate",children:t.keyword})]}),c.jsxs(E0,{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:[c.jsx(Df,{className:"size-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]}),k&&c.jsxs("div",{className:"evidence-modal-timeline",children:[c.jsx("p",{className:"drawer-section-label mb-1.5",children:"Run history"}),c.jsx("div",{className:"flex items-center gap-1 overflow-x-auto pb-1",children:j.map((me,U)=>{const F=u===-1&&U===j.length-1||u===U,le=me.citationState==="cited"||me.citationState==="emerging"?"bg-emerald-400":me.citationState==="lost"?"bg-rose-400":"bg-zinc-600",ee=new Date(me.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"});return c.jsxs("button",{type:"button",className:`evidence-run-dot ${F?"evidence-run-dot--selected":""}`,onClick:()=>Q(U===j.length-1?-1:U),"aria-label":`Run ${ee}: ${me.citationState}`,"aria-pressed":F,children:[c.jsx("span",{className:`size-2 rounded-full ${le}`,"aria-hidden":"true"}),c.jsx("span",{className:"text-[10px] text-zinc-500",children:ee})]},U)})}),u>=0&&u<j.length&&c.jsxs("p",{className:"text-[11px] text-zinc-500 mt-1",children:["Viewing run from ",new Date(j[u].createdAt).toLocaleString()," — ",c.jsx("span",{className:"capitalize",children:j[u].citationState}),c.jsx("button",{type:"button",className:"text-zinc-400 hover:text-zinc-200 ml-2",onClick:()=>Q(-1),children:"← Back to latest"})]})]}),c.jsxs("div",{className:"evidence-modal-body",children:[p&&c.jsx("div",{className:"md:col-span-2 flex items-center justify-center py-12 text-zinc-500 text-sm",children:"Loading historical run data…"}),!p&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"evidence-modal-main",children:[c.jsxs("div",{className:`evidence-position-hero evidence-position-hero--${P}`,children:[c.jsx("p",{className:`evidence-position-label evidence-position-label--${P}`,children:$e.label}),c.jsx("p",{className:`evidence-position-title evidence-position-title--${P}`,children:$e.title}),c.jsx("p",{className:"evidence-position-meta",children:$e.meta})]}),T.answerSnippet&&c.jsxs("div",{children:[c.jsx("p",{className:"drawer-section-label",children:"What the AI said"}),c.jsx("div",{className:`answer-snippet-block ${l?"evidence-answer-expanded":"evidence-answer-collapsed"}`,children:Qe()}),T.answerSnippet.length>280&&c.jsx("button",{type:"button",className:"mt-1.5 text-xs text-zinc-500 hover:text-zinc-300 transition-colors",onClick:()=>o(!l),children:l?"↑ Collapse":"↓ Show full answer"})]}),!T.answerSnippet&&!p&&c.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"}),!A&&t.relatedTechnicalSignals.length>0&&c.jsxs("div",{children:[c.jsx("p",{className:"drawer-section-label",children:O?"Why you're cited":"What to fix"}),c.jsx("div",{className:"action-items-list",children:t.relatedTechnicalSignals.map((me,U)=>c.jsxs("div",{className:"action-item",children:[c.jsx("svg",{className:`action-item-icon ${O?"text-emerald-400":"text-amber-400"}`,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:O?c.jsx("path",{d:"M3 8l3.5 3.5L13 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}):c.jsxs(c.Fragment,{children:[c.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M8 5v3.5M8 10.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),c.jsx("span",{className:"action-item-text",children:me})]},U))})]}),T.summary&&c.jsx("p",{className:"text-xs text-zinc-600 border-t border-zinc-800/40 pt-3 mt-1",children:T.summary})]}),c.jsxs("div",{className:"evidence-modal-sidebar",children:[T.citedDomains.length>0&&c.jsxs("div",{children:[c.jsx("p",{className:"drawer-section-label",children:"Who was cited — in order"}),c.jsxs("div",{className:"citation-leaderboard",children:[T.citedDomains.map((me,U)=>{const F=me.toLowerCase().replace(/^www\./,""),le=z.has(F),ye=!le&&T.competitorDomains.some(C=>C.toLowerCase().replace(/^www\./,"")===F),ee=le?"you":ye?"competitor":"other";return c.jsxs("div",{className:`citation-leaderboard-item citation-leaderboard-item--${ee}`,children:[c.jsxs("span",{className:"citation-leaderboard-rank",children:["#",U+1]}),c.jsx("span",{className:"citation-leaderboard-domain",children:me}),le&&c.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),ye&&c.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},me)}),!O&&c.jsxs("div",{className:"citation-leaderboard-item citation-leaderboard-item--not-cited border-dashed",children:[c.jsx("span",{className:"citation-leaderboard-rank text-zinc-600",children:"—"}),c.jsx("span",{className:"citation-leaderboard-domain text-zinc-600",children:n.project.canonicalDomain}),c.jsx("span",{className:"citation-leaderboard-tag text-zinc-600",children:"Not cited"})]})]})]}),T.groundingSources.length>0&&c.jsxs("div",{children:[c.jsxs("p",{className:"drawer-section-label",children:["Grounding sources (",T.groundingSources.length,")"]}),c.jsx("ul",{className:"grid gap-0.5",children:T.groundingSources.map((me,U)=>c.jsx("li",{className:"truncate text-sm",children:c.jsx("a",{href:me.uri,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:me.title||me.uri})},U))})]}),T.evidenceUrls.length>0&&c.jsxs("div",{children:[c.jsx("p",{className:"drawer-section-label",children:"Evidence URLs"}),c.jsx("ul",{className:"grid gap-1",children:T.evidenceUrls.map(me=>c.jsx("li",{className:"truncate text-sm",children:c.jsx("a",{href:me,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:me})},me))})]}),T.citedDomains.length===0&&T.groundingSources.length===0&&T.evidenceUrls.length===0&&c.jsxs("div",{className:"flex items-center justify-center h-24 text-zinc-600 text-sm",children:["No citation data ",A?"for this run":"yet"]})]})]})]})]})]})})}async function MO(){try{const[t,n,a]=await Promise.all([WE(),eA(),Ub().catch(()=>null)]),l=await Promise.all(t.map(async o=>{const u=n.filter(x=>x.projectId===o.id),d=u.filter(x=>x.status==="completed"||x.status==="partial").sort((x,N)=>N.createdAt.localeCompare(x.createdAt)),[m,g,p,b,v]=await Promise.all([tA(o.name).catch(()=>[]),Rb(o.name).catch(()=>[]),nA(o.name).catch(()=>[]),d[0]?Ml(d[0].id).catch(()=>null):Promise.resolve(null),d[1]?Ml(d[1].id).catch(()=>null):Promise.resolve(null)]);return{project:o,runs:u,keywords:m,competitors:g,timeline:p,latestRunDetail:b,previousRunDetail:v}}));return IA(l,a)}catch{return null}}function LO({initialPathname:t,initialDashboard:n,initialHealthSnapshot:a,enableLiveStatus:l=!0}){const[o,u]=w.useState(n??null),[d,m]=w.useState(!n),[g,p]=w.useState(n?!0:null),[b,v]=w.useState(()=>QA(t)),[x,N]=w.useState(!1),[z,j]=w.useState(null),[k,A]=w.useState(null),[T,O]=w.useState(!1),[R,L]=w.useState(a??YA),H=w.useCallback(async()=>{const q=await MO();q?(u(q),p(!0)):p(!1),m(!1)},[]);w.useEffect(()=>{n||H()},[n,H]);const K=o?.runs.some(q=>q.status==="running"||q.status==="queued")??!1;if(w.useEffect(()=>{if(!K)return;const q=setInterval(()=>{H()},3e3);return()=>clearInterval(q)},[K,H]),w.useEffect(()=>{if(typeof window>"u")return;const q=()=>{v(Ri(window.location.pathname))};return window.addEventListener("popstate",q),()=>{window.removeEventListener("popstate",q)}},[]),w.useEffect(()=>{N(!1),j(null)},[b]),w.useEffect(()=>{if(d||!o)return;const q=o.projects.length>0;if(b==="/setup"&&q)typeof window<"u"&&Ri(window.location.pathname)!=="/"&&window.history.replaceState({},"","/"),v("/");else if(b==="/"&&!q){const V="/setup";typeof window<"u"&&Ri(window.location.pathname)!==V&&window.history.replaceState({},"",V),v(V)}},[d,o,b]),w.useEffect(()=>{if(typeof window>"u"||z===null)return;const q=V=>{V.key==="Escape"&&j(null)};return window.addEventListener("keydown",q),()=>{window.removeEventListener("keydown",q)}},[z]),w.useEffect(()=>{if(!l||typeof window>"u")return;let q=!0;const V=async()=>{const Ie=await VA("/health","API"),Be=Ie.state==="ok"?{label:"Runner",state:"ok",detail:"In-process job runner"}:{label:"Runner",state:Ie.state,detail:"Depends on API"};q&&L({apiStatus:Ie,workerStatus:Be})};V();const se=window.setInterval(()=>{V()},15e3);return()=>{q=!1,window.clearInterval(se)}},[l]),!d&&!o&&g===!1)return c.jsx("div",{className:"app-shell",children:c.jsx("div",{className:"main-area",style:{gridColumn:"1 / -1"},children:c.jsx("main",{id:"content",className:"page-shell",children:c.jsxs("div",{className:"page-container",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Cannot connect to API"}),c.jsxs("p",{className:"page-subtitle",children:["The dashboard could not reach the Canonry API. Make sure ",c.jsx("code",{children:"canonry serve"})," is running and try refreshing the page."]})]})}),c.jsx(ue,{type:"button",onClick:()=>{m(!0),H()},children:"Retry connection"})]})})})});const D=o??KA.dashboard,P=PA(b,D),xe=P.kind==="project"?Tb(D,P.projectId):void 0,Q=q=>{const V=Ri(q);if(typeof window>"u"){v(V);return}Ri(window.location.pathname)!==V&&window.history.pushState({},"",V),v(V)},oe=q=>{if(!q)return;j({kind:"run",runId:q}),A(null),O(!0);const V=q;Ml(q).then(se=>{j(Ie=>(Ie?.kind==="run"&&Ie.runId===V&&A(se),Ie))}).catch(()=>{j(se=>(se?.kind==="run"&&se.runId===V&&A(null),se))}).finally(()=>O(!1))},$e=()=>{bA().catch(q=>{console.error("Failed to trigger all runs",q)}).finally(()=>{H()})};w.useEffect(()=>{if(z?.kind!=="run"||!k||k.status!=="running"&&k.status!=="queued")return;const q=setInterval(()=>{Ml(z.runId).then(V=>{A(V),V.status!=="running"&&V.status!=="queued"&&H()}).catch(()=>{})},3e3);return()=>clearInterval(q)},[z,k?.status,k?.snapshots.length,H]);const Qe=q=>{j({kind:"evidence",evidenceId:q})},me=async q=>{await Lb(q),H()},U=async q=>{try{await rA(q),Q("/"),H()}catch(V){console.error("Failed to delete project:",V)}},F=async(q,V)=>{await aA(q,V),await H()},le=async(q,V)=>{const Ie=(await Rb(q)).map(Re=>Re.domain),Be=[...new Set([...Ie,...V])];await Mb(q,Be),await H()},ye=async(q,V)=>{await sA(q,V),await H()},ee=async(q,V)=>{await lA(q,V),await H()},C=FA(D.portfolioOverview.systemHealth,R,D.settings),G=eO(D.setup,R,D.settings),te=z?.kind==="run"?QE(D,z.runId):void 0,ae=z?.kind==="evidence"?XE(D,z.evidenceId):void 0,ce=[{label:"Overview",href:"/",icon:jN,active:xo(P,"overview")},{label:"Projects",href:"/projects",icon:SN,active:xo(P,"projects")},{label:"Runs",href:"/runs",icon:zN,active:xo(P,"runs")},{label:"Settings",href:"/settings",icon:TN,active:xo(P,"settings")}],fe=P.kind==="overview"?"Portfolio":P.kind==="projects"?"Projects":P.kind==="project"&&xe?xe.project.name:P.kind==="runs"?"Runs":P.kind==="settings"?"Settings":P.kind==="setup"?"Setup":"Not found";return c.jsxs("div",{className:"app-shell",children:[c.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),c.jsxs("aside",{className:"sidebar","aria-label":"Primary navigation",children:[c.jsx("div",{className:"sidebar-brand",children:c.jsx(lv,{navigate:Q})}),c.jsxs("nav",{className:"sidebar-nav",children:[ce.map(q=>c.jsxs("a",{className:`sidebar-link ${q.active?"sidebar-link-active":""}`,href:q.href,"aria-current":q.active?"page":void 0,onClick:Wt(Q,q.href),children:[c.jsx(q.icon,{className:"sidebar-icon"}),c.jsx("span",{children:q.label})]},q.label)),D.projects.length>0?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"sidebar-section-title",children:"Projects"}),D.projects.map(q=>{const V=P.kind==="project"&&xe?.project.id===q.project.id,se=q.visibilitySummary.tone;return c.jsxs("a",{className:`sidebar-project ${V?"sidebar-project-active":""}`,href:`/projects/${q.project.id}`,onClick:Wt(Q,`/projects/${q.project.id}`),children:[c.jsx("span",{className:`sidebar-dot sidebar-dot-${se}`}),c.jsx("span",{children:q.project.name})]},q.project.id)})]}):null,D.projects.length===0?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"sidebar-section-title",children:"Resources"}),c.jsxs("a",{className:"sidebar-link",href:"/setup","aria-current":P.kind==="setup"?"page":void 0,onClick:Wt(Q,"/setup"),children:[c.jsx(AN,{className:"sidebar-icon"}),c.jsx("span",{children:"Setup"})]})]}):null]}),c.jsx("div",{className:"sidebar-footer",children:av.map(q=>c.jsx("a",{className:"sidebar-footer-link",href:q.href,target:"_blank",rel:"noreferrer",children:q.label},q.href))})]}),c.jsxs("div",{className:"main-area",children:[c.jsxs("header",{className:"topbar",children:[c.jsxs("div",{className:"topbar-left",children:[c.jsx("div",{className:"topbar-brand-mobile",children:c.jsx(lv,{compact:!0,navigate:Q})}),c.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[c.jsx("a",{href:"/",onClick:Wt(Q,"/"),children:"Home"}),c.jsx(Tf,{className:"breadcrumb-sep size-3"}),c.jsx("span",{className:"breadcrumb-current",children:fe})]})]}),c.jsxs("div",{className:"topbar-actions",children:[c.jsxs("div",{className:"health-pill-row",children:[c.jsxs("span",{className:`health-pill health-pill-${R.apiStatus.state}`,children:["API ",R.apiStatus.state==="ok"?"ok":R.apiStatus.state]}),c.jsxs("span",{className:`health-pill health-pill-${R.workerStatus.state}`,children:["Worker ",R.workerStatus.state==="ok"?"ok":R.workerStatus.state]})]}),c.jsxs(ue,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":x,"aria-controls":"mobile-nav",onClick:()=>N(q=>!q),children:[c.jsx(kN,{className:"size-4"}),c.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),c.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${x?"mobile-nav-open":""}`,children:[c.jsxs(ue,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>N(!1),children:[c.jsx(Df,{className:"size-5"}),c.jsx("span",{className:"sr-only",children:"Close navigation"})]}),ce.map(q=>c.jsx("a",{className:`mobile-nav-link ${q.active?"mobile-nav-link-active":""}`,href:q.href,"aria-current":q.active?"page":void 0,onClick:Wt(Q,q.href),children:q.label},q.label)),D.projects.length>0?c.jsxs("div",{className:"mobile-nav-section",children:[c.jsx("p",{className:"mobile-nav-section-title",children:"Projects"}),D.projects.map(q=>c.jsx("a",{className:"mobile-nav-link",href:`/projects/${q.project.id}`,onClick:Wt(Q,`/projects/${q.project.id}`),children:q.project.name},q.project.id))]}):null]}),c.jsx("main",{id:"content",className:"page-shell",children:d?c.jsx("div",{className:"page-container",children:c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Loading"}),c.jsx("p",{className:"page-subtitle",children:"Connecting to API and loading dashboard data..."})]})})}):c.jsxs(c.Fragment,{children:[P.kind==="overview"?c.jsx(uO,{model:D.portfolioOverview,systemHealth:C,onNavigate:Q,onOpenRun:oe}):null,P.kind==="projects"?c.jsx(dO,{projects:D.projects,onNavigate:Q,onProjectCreated:H}):null,P.kind==="project"&&xe?c.jsx(hO,{model:xe,tab:P.tab,onOpenEvidence:Qe,onOpenRun:oe,onTriggerRun:me,onDeleteProject:U,onAddKeywords:F,onAddCompetitors:le,onUpdateOwnedDomains:ye,onUpdateProject:ee,onNavigate:Q}):null,P.kind==="runs"?c.jsx(jO,{runs:D.runs,onOpenRun:oe,onTriggerAll:$e}):null,P.kind==="settings"?c.jsx(CO,{settings:D.settings,healthSnapshot:R,onSettingsChanged:H}):null,P.kind==="setup"?c.jsx(OO,{model:G,settings:D.settings,onProjectCreated:H,onNavigate:Q}):null,P.kind==="not-found"?c.jsx(TO,{onNavigate:Q}):null]})}),c.jsxs("footer",{className:"footer",children:[c.jsx("p",{className:"supporting-copy",children:"Technical readiness and answer visibility stay separate."}),c.jsx("div",{className:"footer-links",children:av.map(q=>c.jsx("a",{href:q.href,target:"_blank",rel:"noreferrer",children:q.label},q.href))})]})]}),te?c.jsxs(DO,{open:te!==void 0,title:te.summary,subtitle:`${te.projectName} · ${te.kindLabel}`,onClose:()=>j(null),children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-sm",children:[c.jsx(lc,{status:te.status}),c.jsx("span",{className:"text-zinc-400",children:te.startedAt}),c.jsx("span",{className:"text-zinc-500",children:te.duration}),c.jsx("span",{className:"text-zinc-600",children:te.triggerLabel})]}),te.status==="failed"&&te.statusDetail&&c.jsx("p",{className:"text-sm text-rose-300/80 mt-2",children:te.statusDetail}),c.jsxs("div",{className:"mt-4",children:[c.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500 mb-2",children:"Activity Log"}),T?c.jsx("p",{className:"text-sm text-zinc-500",children:"Loading run details..."}):k&&k.snapshots.length>0?c.jsxs("div",{className:"space-y-2",children:[k.snapshots.map(q=>c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 p-3",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[c.jsx("p",{className:"text-sm font-medium text-zinc-200 truncate",children:q.keyword??"Unknown key phrase"}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(Vf,{provider:q.provider}),c.jsx(_b,{variant:q.citationState==="cited"?"success":"neutral",children:q.citationState})]})]}),q.model&&c.jsx("p",{className:"text-[11px] text-zinc-500 font-mono",children:q.model}),q.citedDomains.length>0&&c.jsxs("p",{className:"text-xs text-zinc-500 mt-1",children:[c.jsx("span",{className:"text-zinc-400",children:"Sources:"})," ",q.citedDomains.join(", ")]}),q.competitorOverlap.length>0&&c.jsxs("p",{className:"text-xs text-rose-400/80 mt-0.5",children:["Competitor cited: ",q.competitorOverlap.join(", ")]}),q.groundingSources&&q.groundingSources.length>0&&c.jsxs("details",{className:"mt-2",children:[c.jsxs("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:[q.groundingSources.length," grounding source",q.groundingSources.length!==1?"s":""]}),c.jsx("ul",{className:"mt-1 space-y-0.5",children:q.groundingSources.map((V,se)=>c.jsx("li",{className:"text-xs text-zinc-500 truncate",children:c.jsx("a",{href:V.uri,target:"_blank",rel:"noreferrer",className:"hover:text-zinc-300",children:V.title||V.uri})},se))})]}),q.answerText&&c.jsxs("details",{className:"mt-1",children:[c.jsx("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:"Answer preview"}),c.jsx("p",{className:"mt-1 text-xs text-zinc-400 leading-relaxed whitespace-pre-wrap",children:q.answerText})]})]},q.id)),k.status==="running"&&c.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[c.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),"Querying remaining key phrases..."]})]}):k&&k.status==="running"?c.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[c.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),"Waiting for first key phrase result..."]}):k&&k.status==="queued"?c.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[c.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-zinc-500 animate-pulse"}),"Run queued, waiting for execution slot..."]}):k&&k.error?c.jsxs("div",{className:"rounded-lg border border-rose-800/40 bg-rose-950/20 p-3",children:[c.jsx("p",{className:"text-sm font-medium text-rose-300 mb-2",children:"Run failed"}),c.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:JA(k.error)})]}):c.jsx("p",{className:"text-sm text-zinc-500",children:"No snapshot data available."})]})]}):null,ae?c.jsx(RO,{evidence:ae.evidence,project:ae.project,onClose:()=>j(null)}):null]})}const Pb=document.getElementById("root");if(!Pb)throw new Error("Expected #root element for web app bootstrap.");ww.createRoot(Pb).render(c.jsx(w.StrictMode,{children:c.jsx(LO,{})}));
|