@ainyc/canonry 1.13.3 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/assets/index-BnYZDZ9_.js +245 -0
- package/assets/assets/index-lxT9tqO2.css +1 -0
- package/assets/index.html +2 -2
- package/dist/{chunk-JKIWFSYI.js → chunk-WCZMFJUY.js} +99 -1
- package/dist/cli.js +125 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/package.json +4 -4
- package/assets/assets/index-BUh6m3HV.css +0 -1
- package/assets/assets/index-DOhW7c21.js +0 -245
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
function pw(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 y0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var zd={exports:{}},Tl={};var Jg;function gw(){if(Jg)return Tl;Jg=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 Tl.Fragment=n,Tl.jsx=a,Tl.jsxs=a,Tl}var Fg;function yw(){return Fg||(Fg=1,zd.exports=gw()),zd.exports}var c=yw(),_d={exports:{}},ke={};var Wg;function vw(){if(Wg)return ke;Wg=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"),S=Symbol.iterator;function N(C){return C===null||typeof C!="object"?null:(C=S&&C[S]||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,H,ne){this.props=C,this.context=H,this.refs=k,this.updater=ne||z}A.prototype.isReactComponent={},A.prototype.setState=function(C,H){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,H,"setState")},A.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function E(){}E.prototype=A.prototype;function O(C,H,ne){this.props=C,this.context=H,this.refs=k,this.updater=ne||z}var D=O.prototype=new E;D.constructor=O,j(D,A.prototype),D.isPureReactComponent=!0;var M=Array.isArray;function q(){}var V={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function Q(C,H,ne){var F=ne.ref;return{$$typeof:t,type:C,key:H,ref:F!==void 0?F:null,props:ne}}function Se(C,H){return Q(C.type,H,C.props)}function le(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function ue(C){var H={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(ne){return H[ne]})}var Ae=/\/+/g;function Be(C,H){return typeof C=="object"&&C!==null&&C.key!=null?ue(""+C.key):H.toString(36)}function Re(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(q,q):(C.status="pending",C.then(function(H){C.status==="pending"&&(C.status="fulfilled",C.value=H)},function(H){C.status==="pending"&&(C.status="rejected",C.reason=H)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function I(C,H,ne,F,ce){var he=typeof C;(he==="undefined"||he==="boolean")&&(C=null);var we=!1;if(C===null)we=!0;else switch(he){case"bigint":case"string":case"number":we=!0;break;case"object":switch(C.$$typeof){case t:case n:we=!0;break;case b:return we=C._init,I(we(C._payload),H,ne,F,ce)}}if(we)return ce=ce(C),we=F===""?"."+Be(C,0):F,M(ce)?(ne="",we!=null&&(ne=we.replace(Ae,"$&/")+"/"),I(ce,H,ne,"",function(Ie){return Ie})):ce!=null&&(le(ce)&&(ce=Se(ce,ne+(ce.key==null||C&&C.key===ce.key?"":(""+ce.key).replace(Ae,"$&/")+"/")+we)),H.push(ce)),1;we=0;var $=F===""?".":F+":";if(M(C))for(var ae=0;ae<C.length;ae++)F=C[ae],he=$+Be(F,ae),we+=I(F,H,ne,he,ce);else if(ae=N(C),typeof ae=="function")for(C=ae.call(C),ae=0;!(F=C.next()).done;)F=F.value,he=$+Be(F,ae++),we+=I(F,H,ne,he,ce);else if(he==="object"){if(typeof C.then=="function")return I(Re(C),H,ne,F,ce);throw H=String(C),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return we}function K(C,H,ne){if(C==null)return C;var F=[],ce=0;return I(C,F,"","",function(he){return H.call(ne,he,ce++)}),F}function se(C){if(C._status===-1){var H=C._result;H=H(),H.then(function(ne){(C._status===0||C._status===-1)&&(C._status=1,C._result=ne)},function(ne){(C._status===0||C._status===-1)&&(C._status=2,C._result=ne)}),C._status===-1&&(C._status=0,C._result=H)}if(C._status===1)return C._result.default;throw C._result}var fe=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=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(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},te={map:K,forEach:function(C,H,ne){K(C,function(){H.apply(this,arguments)},ne)},count:function(C){var H=0;return K(C,function(){H++}),H},toArray:function(C){return K(C,function(H){return H})||[]},only:function(C){if(!le(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return ke.Activity=v,ke.Children=te,ke.Component=A,ke.Fragment=a,ke.Profiler=o,ke.PureComponent=O,ke.StrictMode=l,ke.Suspense=g,ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,ke.__COMPILER_RUNTIME={__proto__:null,c:function(C){return V.H.useMemoCache(C)}},ke.cache=function(C){return function(){return C.apply(null,arguments)}},ke.cacheSignal=function(){return null},ke.cloneElement=function(C,H,ne){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var F=j({},C.props),ce=C.key;if(H!=null)for(he in H.key!==void 0&&(ce=""+H.key),H)!R.call(H,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&H.ref===void 0||(F[he]=H[he]);var he=arguments.length-2;if(he===1)F.children=ne;else if(1<he){for(var we=Array(he),$=0;$<he;$++)we[$]=arguments[$+2];F.children=we}return Q(C.type,ce,F)},ke.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},ke.createElement=function(C,H,ne){var F,ce={},he=null;if(H!=null)for(F in H.key!==void 0&&(he=""+H.key),H)R.call(H,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(ce[F]=H[F]);var we=arguments.length-2;if(we===1)ce.children=ne;else if(1<we){for(var $=Array(we),ae=0;ae<we;ae++)$[ae]=arguments[ae+2];ce.children=$}if(C&&C.defaultProps)for(F in we=C.defaultProps,we)ce[F]===void 0&&(ce[F]=we[F]);return Q(C,he,ce)},ke.createRef=function(){return{current:null}},ke.forwardRef=function(C){return{$$typeof:m,render:C}},ke.isValidElement=le,ke.lazy=function(C){return{$$typeof:b,_payload:{_status:-1,_result:C},_init:se}},ke.memo=function(C,H){return{$$typeof:p,type:C,compare:H===void 0?null:H}},ke.startTransition=function(C){var H=V.T,ne={};V.T=ne;try{var F=C(),ce=V.S;ce!==null&&ce(ne,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(q,fe)}catch(he){fe(he)}finally{H!==null&&ne.types!==null&&(H.types=ne.types),V.T=H}},ke.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},ke.use=function(C){return V.H.use(C)},ke.useActionState=function(C,H,ne){return V.H.useActionState(C,H,ne)},ke.useCallback=function(C,H){return V.H.useCallback(C,H)},ke.useContext=function(C){return V.H.useContext(C)},ke.useDebugValue=function(){},ke.useDeferredValue=function(C,H){return V.H.useDeferredValue(C,H)},ke.useEffect=function(C,H){return V.H.useEffect(C,H)},ke.useEffectEvent=function(C){return V.H.useEffectEvent(C)},ke.useId=function(){return V.H.useId()},ke.useImperativeHandle=function(C,H,ne){return V.H.useImperativeHandle(C,H,ne)},ke.useInsertionEffect=function(C,H){return V.H.useInsertionEffect(C,H)},ke.useLayoutEffect=function(C,H){return V.H.useLayoutEffect(C,H)},ke.useMemo=function(C,H){return V.H.useMemo(C,H)},ke.useOptimistic=function(C,H){return V.H.useOptimistic(C,H)},ke.useReducer=function(C,H,ne){return V.H.useReducer(C,H,ne)},ke.useRef=function(C){return V.H.useRef(C)},ke.useState=function(C){return V.H.useState(C)},ke.useSyncExternalStore=function(C,H,ne){return V.H.useSyncExternalStore(C,H,ne)},ke.useTransition=function(){return V.H.useTransition()},ke.version="19.2.4",ke}var ey;function pf(){return ey||(ey=1,_d.exports=vw()),_d.exports}var w=pf();const bw=y0(w),gf=pw({__proto__:null,default:bw},[w]);var Cd={exports:{}},Ol={},Ed={exports:{}},Ad={};var ty;function xw(){return ty||(ty=1,(function(t){function n(I,K){var se=I.length;I.push(K);e:for(;0<se;){var fe=se-1>>>1,te=I[fe];if(0<o(te,K))I[fe]=K,I[se]=te,se=fe;else break e}}function a(I){return I.length===0?null:I[0]}function l(I){if(I.length===0)return null;var K=I[0],se=I.pop();if(se!==K){I[0]=se;e:for(var fe=0,te=I.length,C=te>>>1;fe<C;){var H=2*(fe+1)-1,ne=I[H],F=H+1,ce=I[F];if(0>o(ne,se))F<te&&0>o(ce,ne)?(I[fe]=ce,I[F]=se,fe=F):(I[fe]=ne,I[H]=se,fe=H);else if(F<te&&0>o(ce,se))I[fe]=ce,I[F]=se,fe=F;else break e}}return K}function o(I,K){var se=I.sortIndex-K.sortIndex;return se!==0?se:I.id-K.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,S=3,N=!1,z=!1,j=!1,k=!1,A=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function D(I){for(var K=a(p);K!==null;){if(K.callback===null)l(p);else if(K.startTime<=I)l(p),K.sortIndex=K.expirationTime,n(g,K);else break;K=a(p)}}function M(I){if(j=!1,D(I),!z)if(a(g)!==null)z=!0,q||(q=!0,ue());else{var K=a(p);K!==null&&Re(M,K.startTime-I)}}var q=!1,V=-1,R=5,Q=-1;function Se(){return k?!0:!(t.unstable_now()-Q<R)}function le(){if(k=!1,q){var I=t.unstable_now();Q=I;var K=!0;try{e:{z=!1,j&&(j=!1,E(V),V=-1),N=!0;var se=S;try{t:{for(D(I),v=a(g);v!==null&&!(v.expirationTime>I&&Se());){var fe=v.callback;if(typeof fe=="function"){v.callback=null,S=v.priorityLevel;var te=fe(v.expirationTime<=I);if(I=t.unstable_now(),typeof te=="function"){v.callback=te,D(I),K=!0;break t}v===a(g)&&l(g),D(I)}else l(g);v=a(g)}if(v!==null)K=!0;else{var C=a(p);C!==null&&Re(M,C.startTime-I),K=!1}}break e}finally{v=null,S=se,N=!1}K=void 0}}finally{K?ue():q=!1}}}var ue;if(typeof O=="function")ue=function(){O(le)};else if(typeof MessageChannel<"u"){var Ae=new MessageChannel,Be=Ae.port2;Ae.port1.onmessage=le,ue=function(){Be.postMessage(null)}}else ue=function(){A(le,0)};function Re(I,K){V=A(function(){I(t.unstable_now())},K)}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(I){I.callback=null},t.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<I?Math.floor(1e3/I):5},t.unstable_getCurrentPriorityLevel=function(){return S},t.unstable_next=function(I){switch(S){case 1:case 2:case 3:var K=3;break;default:K=S}var se=S;S=K;try{return I()}finally{S=se}},t.unstable_requestPaint=function(){k=!0},t.unstable_runWithPriority=function(I,K){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var se=S;S=I;try{return K()}finally{S=se}},t.unstable_scheduleCallback=function(I,K,se){var fe=t.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?fe+se:fe):se=fe,I){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=se+te,I={id:b++,callback:K,priorityLevel:I,startTime:se,expirationTime:te,sortIndex:-1},se>fe?(I.sortIndex=se,n(p,I),a(g)===null&&I===a(p)&&(j?(E(V),V=-1):j=!0,Re(M,se-fe))):(I.sortIndex=te,n(g,I),z||N||(z=!0,q||(q=!0,ue()))),I},t.unstable_shouldYield=Se,t.unstable_wrapCallback=function(I){var K=S;return function(){var se=S;S=K;try{return I.apply(this,arguments)}finally{S=se}}}})(Ad)),Ad}var ny;function Sw(){return ny||(ny=1,Ed.exports=xw()),Ed.exports}var Td={exports:{}},Gt={};var iy;function ww(){if(iy)return Gt;iy=1;var t=pf();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 Gt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Gt.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)},Gt.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()}},Gt.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))},Gt.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},Gt.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var b=p.as,v=m(b,p.crossOrigin),S=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:S,fetchPriority:N}):b==="script"&&l.d.X(g,{crossOrigin:v,integrity:S,fetchPriority:N,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Gt.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)},Gt.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})}},Gt.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)},Gt.requestFormReset=function(g){l.d.r(g)},Gt.unstable_batchedUpdates=function(g,p){return g(p)},Gt.useFormState=function(g,p,b){return d.H.useFormState(g,p,b)},Gt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Gt.version="19.2.4",Gt}var ay;function v0(){if(ay)return Td.exports;ay=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(),Td.exports=ww(),Td.exports}var sy;function jw(){if(sy)return Ol;sy=1;var t=Sw(),n=pf(),a=v0();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,x=f.child;x;){if(x===s){y=!0,s=f,r=h;break}if(x===r){y=!0,r=f,s=h;break}x=x.sibling}if(!y){for(x=h.child;x;){if(x===s){y=!0,s=h,r=f;break}if(x===r){y=!0,r=h,s=f;break}x=x.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,S=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"),E=Symbol.for("react.consumer"),O=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),Se=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function ue(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var Ae=Symbol.for("react.client.reference");function Be(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ae?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 M:return"Suspense";case q:return"SuspenseList";case Q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case z:return"Portal";case O:return e.displayName||"Context";case E:return(e._context.displayName||"Context")+".Consumer";case D:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return i=e.displayName||null,i!==null?i:Be(e.type)||"Memo";case R:i=e._payload,e=e._init;try{return Be(e(i))}catch{}}return null}var Re=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},fe=[],te=-1;function C(e){return{current:e}}function H(e){0>te||(e.current=fe[te],fe[te]=null,te--)}function ne(e,i){te++,fe[te]=e.current,e.current=i}var F=C(null),ce=C(null),he=C(null),we=C(null);function $(e,i){switch(ne(he,i),ne(ce,e),ne(F,null),i.nodeType){case 9:case 11:e=(e=i.documentElement)&&(e=e.namespaceURI)?xg(e):0;break;default:if(e=i.tagName,i=i.namespaceURI)i=xg(i),e=Sg(i,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(F),ne(F,e)}function ae(){H(F),H(ce),H(he)}function Ie(e){e.memoizedState!==null&&ne(we,e);var i=F.current,s=Sg(i,e.type);i!==s&&(ne(ce,e),ne(F,s))}function re(e){ce.current===e&&(H(F),H(ce)),we.current===e&&(H(we),_l._currentValue=se)}var Ue,Ct;function ut(e){if(Ue===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);Ue=i&&i[1]||"",Ct=-1<s.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+Ue+e+Ct}var bt=!1;function Ot(e,i){if(!e||bt)return"";bt=!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(Y){var Z=Y}Reflect.construct(e,[],W)}else{try{W.call()}catch(Y){Z=Y}e.call(W.prototype)}}else{try{throw Error()}catch(Y){Z=Y}(W=e())&&typeof W.catch=="function"&&W.catch(function(){})}}catch(Y){if(Y&&Z&&typeof Y.stack=="string")return[Y.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],x=h[1];if(y&&x){var _=y.split(`
|
|
4
|
-
`),B=x.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 P=`
|
|
6
|
-
`+_[r].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),P}while(1<=r&&0<=f);break}}}finally{bt=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?ut(s):""}function bi(e,i){switch(e.tag){case 26:case 27:case 5:return ut(e.type);case 16:return ut("Lazy");case 13:return e.child!==i&&i!==null?ut("Suspense Fallback"):ut("Suspense");case 19:return ut("SuspenseList");case 0:case 15:return Ot(e.type,!1);case 11:return Ot(e.type.render,!1);case 1:return Ot(e.type,!0);case 31:return ut("Activity");default:return""}}function Mt(e){try{var i="",s=null;do i+=bi(e,s),s=e,e=e.return;while(e);return i}catch(r){return`
|
|
7
|
-
Error generating stack: `+r.message+`
|
|
8
|
-
`+r.stack}}var qt=Object.prototype.hasOwnProperty,dt=t.unstable_scheduleCallback,Ht=t.unstable_cancelCallback,xi=t.unstable_shouldYield,We=t.unstable_requestPaint,xt=t.unstable_now,ie=t.unstable_getCurrentPriorityLevel,Ne=t.unstable_ImmediatePriority,Et=t.unstable_UserBlockingPriority,St=t.unstable_NormalPriority,Kt=t.unstable_LowPriority,oe=t.unstable_IdlePriority,vn=t.log,hc=t.unstable_setDisableYieldValue,Si=null,Yt=null;function Hn(e){if(typeof vn=="function"&&hc(e),Yt&&typeof Yt.setStrictMode=="function")try{Yt.setStrictMode(Si,e)}catch{}}var Vt=Math.clz32?Math.clz32:G,mc=Math.log,Ql=Math.LN2;function G(e){return e>>>=0,e===0?32:31-(mc(e)/Ql|0)|0}var ve=256,Pt=262144,Pe=4194304;function Qt(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 en(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 x=r&134217727;return x!==0?(r=x&~h,r!==0?f=Qt(r):(y&=x,y!==0?f=Qt(y):s||(s=x&~e,s!==0&&(f=Qt(s))))):(x=r&~h,x!==0?f=Qt(x):y!==0?f=Qt(y):s||(s=r&~e,s!==0&&(f=Qt(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 Gn(e,i){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&i)===0}function Xl(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 Is(){var e=Pe;return Pe<<=1,(Pe&62914560)===0&&(Pe=4194304),e}function Ta(e){for(var i=[],s=0;31>s;s++)i.push(e);return i}function Zs(e,i){e.pendingLanes|=i,i!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ix(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 x=e.entanglements,_=e.expirationTimes,B=e.hiddenUpdates;for(s=y&~s;0<s;){var P=31-Vt(s),W=1<<P;x[P]=0,_[P]=-1;var Z=B[P];if(Z!==null)for(B[P]=null,P=0;P<Z.length;P++){var Y=Z[P];Y!==null&&(Y.lane&=-536870913)}s&=~W}r!==0&&nh(e,r,0),h!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=h&~(y&~i))}function nh(e,i,s){e.pendingLanes|=i,e.suspendedLanes&=~i;var r=31-Vt(i);e.entangledLanes|=i,e.entanglements[r]=e.entanglements[r]|1073741824|s&261930}function ih(e,i){var s=e.entangledLanes|=i;for(e=e.entanglements;s;){var r=31-Vt(s),f=1<<r;f&i|e[r]&i&&(e[r]|=i),s&=~f}}function ah(e,i){var s=i&-i;return s=(s&42)!==0?1:pc(s),(s&(e.suspendedLanes|i))!==0?0:s}function pc(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 gc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function sh(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:Gg(e.type))}function lh(e,i){var s=K.p;try{return K.p=e,i()}finally{K.p=s}}var wi=Math.random().toString(36).slice(2),Lt="__reactFiber$"+wi,tn="__reactProps$"+wi,Oa="__reactContainer$"+wi,yc="__reactEvents$"+wi,ax="__reactListeners$"+wi,sx="__reactHandles$"+wi,rh="__reactResources$"+wi,qs="__reactMarker$"+wi;function vc(e){delete e[Lt],delete e[tn],delete e[yc],delete e[ax],delete e[sx]}function Da(e){var i=e[Lt];if(i)return i;for(var s=e.parentNode;s;){if(i=s[Oa]||s[Lt]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(e=Cg(e);e!==null;){if(s=e[Lt])return s;e=Cg(e)}return i}e=s,s=e.parentNode}return null}function Ra(e){if(e=e[Lt]||e[Oa]){var i=e.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return e}return null}function Hs(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e.stateNode;throw Error(l(33))}function Ma(e){var i=e[rh];return i||(i=e[rh]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Dt(e){e[qs]=!0}var oh=new Set,ch={};function aa(e,i){La(e,i),La(e+"Capture",i)}function La(e,i){for(ch[e]=i,e=0;e<i.length;e++)oh.add(i[e])}var lx=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]*$"),uh={},dh={};function rx(e){return qt.call(dh,e)?!0:qt.call(uh,e)?!1:lx.test(e)?dh[e]=!0:(uh[e]=!0,!1)}function Jl(e,i,s){if(rx(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 Fl(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 Jn(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 bn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fh(e){var i=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function ox(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 bc(e){if(!e._valueTracker){var i=fh(e)?"checked":"value";e._valueTracker=ox(e,i,""+e[i])}}function hh(e){if(!e)return!1;var i=e._valueTracker;if(!i)return!0;var s=i.getValue(),r="";return e&&(r=fh(e)?e.checked?"true":"false":e.value),e=r,e!==s?(i.setValue(e),!0):!1}function Wl(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 cx=/[\n"\\]/g;function xn(e){return e.replace(cx,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function xc(e,i,s,r,f,h,y,x){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=""+bn(i)):e.value!==""+bn(i)&&(e.value=""+bn(i)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),i!=null?Sc(e,y,bn(i)):s!=null?Sc(e,y,bn(s)):r!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+bn(x):e.removeAttribute("name")}function mh(e,i,s,r,f,h,y,x){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)){bc(e);return}s=s!=null?""+bn(s):"",i=i!=null?""+bn(i):s,x||i===e.value||(e.value=i),e.defaultValue=i}r=r??f,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=x?e.checked:!!r,e.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),bc(e)}function Sc(e,i,s){i==="number"&&Wl(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function $a(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=""+bn(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 ph(e,i,s){if(i!=null&&(i=""+bn(i),i!==e.value&&(e.value=i),s==null)){e.defaultValue!==i&&(e.defaultValue=i);return}e.defaultValue=s!=null?""+bn(s):""}function gh(e,i,s,r){if(i==null){if(r!=null){if(s!=null)throw Error(l(92));if(Re(r)){if(1<r.length)throw Error(l(93));r=r[0]}s=r}s==null&&(s=""),i=s}s=bn(i),e.defaultValue=s,r=e.textContent,r===s&&r!==""&&r!==null&&(e.value=r),bc(e)}function Ua(e,i){if(i){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=i;return}}e.textContent=i}var ux=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 yh(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||ux.has(i)?i==="float"?e.cssFloat=s:e[i]=(""+s).trim():e[i]=s+"px"}function vh(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&&yh(e,f,r)}else for(var h in i)i.hasOwnProperty(h)&&yh(e,h,i[h])}function wc(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 dx=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"]]),fx=/^[\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 er(e){return fx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Fn(){}var jc=null;function Nc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ba=null,Ia=null;function bh(e){var i=Ra(e);if(i&&(e=i.stateNode)){var s=e[tn]||null;e:switch(e=i.stateNode,i.type){case"input":if(xc(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="'+xn(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var r=s[i];if(r!==e&&r.form===e.form){var f=r[tn]||null;if(!f)throw Error(l(90));xc(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&&hh(r)}break e;case"textarea":ph(e,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&$a(e,!!s.multiple,i,!1)}}}var kc=!1;function xh(e,i,s){if(kc)return e(i,s);kc=!0;try{var r=e(i);return r}finally{if(kc=!1,(Ba!==null||Ia!==null)&&(Zr(),Ba&&(i=Ba,e=Ia,Ia=Ba=null,bh(i),e)))for(i=0;i<e.length;i++)bh(e[i])}}function Gs(e,i){var s=e.stateNode;if(s===null)return null;var r=s[tn]||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 Wn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zc=!1;if(Wn)try{var Ks={};Object.defineProperty(Ks,"passive",{get:function(){zc=!0}}),window.addEventListener("test",Ks,Ks),window.removeEventListener("test",Ks,Ks)}catch{zc=!1}var ji=null,_c=null,tr=null;function Sh(){if(tr)return tr;var e,i=_c,s=i.length,r,f="value"in ji?ji.value:ji.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 tr=f.slice(e,1<r?1-r:void 0)}function nr(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 ir(){return!0}function wh(){return!1}function nn(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 x in e)e.hasOwnProperty(x)&&(s=e[x],this[x]=s?s(h):h[x]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?ir:wh,this.isPropagationStopped=wh,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=ir)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=ir)},persist:function(){},isPersistent:ir}),i}var sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ar=nn(sa),Ys=v({},sa,{view:0,detail:0}),hx=nn(Ys),Cc,Ec,Vs,sr=v({},Ys,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tc,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!==Vs&&(Vs&&e.type==="mousemove"?(Cc=e.screenX-Vs.screenX,Ec=e.screenY-Vs.screenY):Ec=Cc=0,Vs=e),Cc)},movementY:function(e){return"movementY"in e?e.movementY:Ec}}),jh=nn(sr),mx=v({},sr,{dataTransfer:0}),px=nn(mx),gx=v({},Ys,{relatedTarget:0}),Ac=nn(gx),yx=v({},sa,{animationName:0,elapsedTime:0,pseudoElement:0}),vx=nn(yx),bx=v({},sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xx=nn(bx),Sx=v({},sa,{data:0}),Nh=nn(Sx),wx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jx={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"},Nx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kx(e){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(e):(e=Nx[e])?!!i[e]:!1}function Tc(){return kx}var zx=v({},Ys,{key:function(e){if(e.key){var i=wx[e.key]||e.key;if(i!=="Unidentified")return i}return e.type==="keypress"?(e=nr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tc,charCode:function(e){return e.type==="keypress"?nr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?nr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_x=nn(zx),Cx=v({},sr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kh=nn(Cx),Ex=v({},Ys,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tc}),Ax=nn(Ex),Tx=v({},sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ox=nn(Tx),Dx=v({},sr,{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}),Rx=nn(Dx),Mx=v({},sa,{newState:0,oldState:0}),Lx=nn(Mx),$x=[9,13,27,32],Oc=Wn&&"CompositionEvent"in window,Ps=null;Wn&&"documentMode"in document&&(Ps=document.documentMode);var Ux=Wn&&"TextEvent"in window&&!Ps,zh=Wn&&(!Oc||Ps&&8<Ps&&11>=Ps),_h=" ",Ch=!1;function Eh(e,i){switch(e){case"keyup":return $x.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ah(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Za=!1;function Bx(e,i){switch(e){case"compositionend":return Ah(i);case"keypress":return i.which!==32?null:(Ch=!0,_h);case"textInput":return e=i.data,e===_h&&Ch?null:e;default:return null}}function Ix(e,i){if(Za)return e==="compositionend"||!Oc&&Eh(e,i)?(e=Sh(),tr=_c=ji=null,Za=!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 zh&&i.locale!=="ko"?null:i.data;default:return null}}var Zx={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 Th(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i==="input"?!!Zx[e.type]:i==="textarea"}function Oh(e,i,s,r){Ba?Ia?Ia.push(r):Ia=[r]:Ba=r,i=Pr(i,"onChange"),0<i.length&&(s=new ar("onChange","change",null,s,r),e.push({event:s,listeners:i}))}var Qs=null,Xs=null;function qx(e){mg(e,0)}function lr(e){var i=Hs(e);if(hh(i))return e}function Dh(e,i){if(e==="change")return i}var Rh=!1;if(Wn){var Dc;if(Wn){var Rc="oninput"in document;if(!Rc){var Mh=document.createElement("div");Mh.setAttribute("oninput","return;"),Rc=typeof Mh.oninput=="function"}Dc=Rc}else Dc=!1;Rh=Dc&&(!document.documentMode||9<document.documentMode)}function Lh(){Qs&&(Qs.detachEvent("onpropertychange",$h),Xs=Qs=null)}function $h(e){if(e.propertyName==="value"&&lr(Xs)){var i=[];Oh(i,Xs,e,Nc(e)),xh(qx,i)}}function Hx(e,i,s){e==="focusin"?(Lh(),Qs=i,Xs=s,Qs.attachEvent("onpropertychange",$h)):e==="focusout"&&Lh()}function Gx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lr(Xs)}function Kx(e,i){if(e==="click")return lr(i)}function Yx(e,i){if(e==="input"||e==="change")return lr(i)}function Vx(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}var un=typeof Object.is=="function"?Object.is:Vx;function Js(e,i){if(un(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(!qt.call(i,f)||!un(e[f],i[f]))return!1}return!0}function Uh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Bh(e,i){var s=Uh(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=Uh(s)}}function Ih(e,i){return e&&i?e===i?!0:e&&e.nodeType===3?!1:i&&i.nodeType===3?Ih(e,i.parentNode):"contains"in e?e.contains(i):e.compareDocumentPosition?!!(e.compareDocumentPosition(i)&16):!1:!1}function Zh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var i=Wl(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=Wl(e.document)}return i}function Mc(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 Px=Wn&&"documentMode"in document&&11>=document.documentMode,qa=null,Lc=null,Fs=null,$c=!1;function qh(e,i,s){var r=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;$c||qa==null||qa!==Wl(r)||(r=qa,"selectionStart"in r&&Mc(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}),Fs&&Js(Fs,r)||(Fs=r,r=Pr(Lc,"onSelect"),0<r.length&&(i=new ar("onSelect","select",null,i,s),e.push({event:i,listeners:r}),i.target=qa)))}function la(e,i){var s={};return s[e.toLowerCase()]=i.toLowerCase(),s["Webkit"+e]="webkit"+i,s["Moz"+e]="moz"+i,s}var Ha={animationend:la("Animation","AnimationEnd"),animationiteration:la("Animation","AnimationIteration"),animationstart:la("Animation","AnimationStart"),transitionrun:la("Transition","TransitionRun"),transitionstart:la("Transition","TransitionStart"),transitioncancel:la("Transition","TransitionCancel"),transitionend:la("Transition","TransitionEnd")},Uc={},Hh={};Wn&&(Hh=document.createElement("div").style,"AnimationEvent"in window||(delete Ha.animationend.animation,delete Ha.animationiteration.animation,delete Ha.animationstart.animation),"TransitionEvent"in window||delete Ha.transitionend.transition);function ra(e){if(Uc[e])return Uc[e];if(!Ha[e])return e;var i=Ha[e],s;for(s in i)if(i.hasOwnProperty(s)&&s in Hh)return Uc[e]=i[s];return e}var Gh=ra("animationend"),Kh=ra("animationiteration"),Yh=ra("animationstart"),Qx=ra("transitionrun"),Xx=ra("transitionstart"),Jx=ra("transitioncancel"),Vh=ra("transitionend"),Ph=new Map,Bc="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(" ");Bc.push("scrollEnd");function Rn(e,i){Ph.set(e,i),aa(i,[e])}var rr=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)},Sn=[],Ga=0,Ic=0;function or(){for(var e=Ga,i=Ic=Ga=0;i<e;){var s=Sn[i];Sn[i++]=null;var r=Sn[i];Sn[i++]=null;var f=Sn[i];Sn[i++]=null;var h=Sn[i];if(Sn[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&&Qh(s,f,h)}}function cr(e,i,s,r){Sn[Ga++]=e,Sn[Ga++]=i,Sn[Ga++]=s,Sn[Ga++]=r,Ic|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Zc(e,i,s,r){return cr(e,i,s,r),ur(e)}function oa(e,i){return cr(e,null,null,i),ur(e)}function Qh(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-Vt(s),e=h.hiddenUpdates,r=e[f],r===null?e[f]=[i]:r.push(i),i.lane=s|536870912),h):null}function ur(e){if(50<xl)throw xl=0,Xu=null,Error(l(185));for(var i=e.return;i!==null;)e=i,i=e.return;return e.tag===3?e.stateNode:null}var Ka={};function Fx(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 dn(e,i,s,r){return new Fx(e,i,s,r)}function qc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ei(e,i){var s=e.alternate;return s===null?(s=dn(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 Xh(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 dr(e,i,s,r,f,h){var y=0;if(r=e,typeof e=="function")qc(e)&&(y=1);else if(typeof e=="string")y=iw(e,s,F.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Q:return e=dn(31,s,i,f),e.elementType=Q,e.lanes=h,e;case j:return ca(s.children,f,h,i);case k:y=8,f|=24;break;case A:return e=dn(12,s,i,f|2),e.elementType=A,e.lanes=h,e;case M:return e=dn(13,s,i,f),e.elementType=M,e.lanes=h,e;case q:return e=dn(19,s,i,f),e.elementType=q,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O:y=10;break e;case E:y=9;break e;case D:y=11;break e;case V:y=14;break e;case R:y=16,r=null;break e}y=29,s=Error(l(130,e===null?"null":typeof e,"")),r=null}return i=dn(y,s,i,f),i.elementType=e,i.type=r,i.lanes=h,i}function ca(e,i,s,r){return e=dn(7,e,r,i),e.lanes=s,e}function Hc(e,i,s){return e=dn(6,e,null,i),e.lanes=s,e}function Jh(e){var i=dn(18,null,null,0);return i.stateNode=e,i}function Gc(e,i,s){return i=dn(4,e.children!==null?e.children:[],e.key,i),i.lanes=s,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}var Fh=new WeakMap;function wn(e,i){if(typeof e=="object"&&e!==null){var s=Fh.get(e);return s!==void 0?s:(i={value:e,source:i,stack:Mt(i)},Fh.set(e,i),i)}return{value:e,source:i,stack:Mt(i)}}var Ya=[],Va=0,fr=null,Ws=0,jn=[],Nn=0,Ni=null,Kn=1,Yn="";function ti(e,i){Ya[Va++]=Ws,Ya[Va++]=fr,fr=e,Ws=i}function Wh(e,i,s){jn[Nn++]=Kn,jn[Nn++]=Yn,jn[Nn++]=Ni,Ni=e;var r=Kn;e=Yn;var f=32-Vt(r)-1;r&=~(1<<f),s+=1;var h=32-Vt(i)+f;if(30<h){var y=f-f%5;h=(r&(1<<y)-1).toString(32),r>>=y,f-=y,Kn=1<<32-Vt(i)+f|s<<f|r,Yn=h+e}else Kn=1<<h|s<<f|r,Yn=e}function Kc(e){e.return!==null&&(ti(e,1),Wh(e,1,0))}function Yc(e){for(;e===fr;)fr=Ya[--Va],Ya[Va]=null,Ws=Ya[--Va],Ya[Va]=null;for(;e===Ni;)Ni=jn[--Nn],jn[Nn]=null,Yn=jn[--Nn],jn[Nn]=null,Kn=jn[--Nn],jn[Nn]=null}function em(e,i){jn[Nn++]=Kn,jn[Nn++]=Yn,jn[Nn++]=Ni,Kn=i.id,Yn=i.overflow,Ni=e}var $t=null,tt=null,$e=!1,ki=null,kn=!1,Vc=Error(l(519));function zi(e){var i=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw el(wn(i,e)),Vc}function tm(e){var i=e.stateNode,s=e.type,r=e.memoizedProps;switch(i[Lt]=e,i[tn]=r,s){case"dialog":De("cancel",i),De("close",i);break;case"iframe":case"object":case"embed":De("load",i);break;case"video":case"audio":for(s=0;s<wl.length;s++)De(wl[s],i);break;case"source":De("error",i);break;case"img":case"image":case"link":De("error",i),De("load",i);break;case"details":De("toggle",i);break;case"input":De("invalid",i),mh(i,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":De("invalid",i);break;case"textarea":De("invalid",i),gh(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||vg(i.textContent,s)?(r.popover!=null&&(De("beforetoggle",i),De("toggle",i)),r.onScroll!=null&&De("scroll",i),r.onScrollEnd!=null&&De("scrollend",i),r.onClick!=null&&(i.onclick=Fn),i=!0):i=!1,i||zi(e,!0)}function nm(e){for($t=e.return;$t;)switch($t.tag){case 5:case 31:case 13:kn=!1;return;case 27:case 3:kn=!0;return;default:$t=$t.return}}function Pa(e){if(e!==$t)return!1;if(!$e)return nm(e),$e=!0,!1;var i=e.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||dd(e.type,e.memoizedProps)),s=!s),s&&tt&&zi(e),nm(e),i===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));tt=_g(e)}else if(i===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));tt=_g(e)}else i===27?(i=tt,Ii(e.type)?(e=gd,gd=null,tt=e):tt=i):tt=$t?_n(e.stateNode.nextSibling):null;return!0}function ua(){tt=$t=null,$e=!1}function Pc(){var e=ki;return e!==null&&(rn===null?rn=e:rn.push.apply(rn,e),ki=null),e}function el(e){ki===null?ki=[e]:ki.push(e)}var Qc=C(null),da=null,ni=null;function _i(e,i,s){ne(Qc,i._currentValue),i._currentValue=s}function ii(e){e._currentValue=Qc.current,H(Qc)}function Xc(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 Jc(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 x=h;h=f;for(var _=0;_<i.length;_++)if(x.context===i[_]){h.lanes|=s,x=h.alternate,x!==null&&(x.lanes|=s),Xc(h.return,s,e),r||(y=null);break e}h=x.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),Xc(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 Qa(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 x=f.type;un(f.pendingProps.value,y.value)||(e!==null?e.push(x):e=[x])}}else if(f===we.current){if(y=f.alternate,y===null)throw Error(l(387));y.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(_l):e=[_l])}f=f.return}e!==null&&Jc(i,e,s,r),i.flags|=262144}function hr(e){for(e=e.firstContext;e!==null;){if(!un(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function fa(e){da=e,ni=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ut(e){return im(da,e)}function mr(e,i){return da===null&&fa(e),im(e,i)}function im(e,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},ni===null){if(e===null)throw Error(l(308));ni=i,e.dependencies={lanes:0,firstContext:i},e.flags|=524288}else ni=ni.next=i;return s}var Wx=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()})}},eS=t.unstable_scheduleCallback,tS=t.unstable_NormalPriority,wt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fc(){return{controller:new Wx,data:new Map,refCount:0}}function tl(e){e.refCount--,e.refCount===0&&eS(tS,function(){e.controller.abort()})}var nl=null,Wc=0,Xa=0,Ja=null;function nS(e,i){if(nl===null){var s=nl=[];Wc=0,Xa=nd(),Ja={status:"pending",value:void 0,then:function(r){s.push(r)}}}return Wc++,i.then(am,am),i}function am(){if(--Wc===0&&nl!==null){Ja!==null&&(Ja.status="fulfilled");var e=nl;nl=null,Xa=0,Ja=null;for(var i=0;i<e.length;i++)(0,e[i])()}}function iS(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 sm=I.S;I.S=function(e,i){qp=xt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&nS(e,i),sm!==null&&sm(e,i)};var ha=C(null);function eu(){var e=ha.current;return e!==null?e:Fe.pooledCache}function pr(e,i){i===null?ne(ha,ha.current):ne(ha,i.pool)}function lm(){var e=eu();return e===null?null:{parent:wt._currentValue,pool:e}}var Fa=Error(l(460)),tu=Error(l(474)),gr=Error(l(542)),yr={then:function(){}};function rm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function om(e,i,s){switch(s=e[s],s===void 0?e.push(i):s!==i&&(i.then(Fn,Fn),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,um(e),e;default:if(typeof i.status=="string")i.then(Fn,Fn);else{if(e=Fe,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,um(e),e}throw pa=i,Fa}}function ma(e){try{var i=e._init;return i(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(pa=s,Fa):s}}var pa=null;function cm(){if(pa===null)throw Error(l(459));var e=pa;return pa=null,e}function um(e){if(e===Fa||e===gr)throw Error(l(483))}var Wa=null,il=0;function vr(e){var i=il;return il+=1,Wa===null&&(Wa=[]),om(Wa,e,i)}function al(e,i){i=i.props.ref,e.ref=i!==void 0?i:null}function br(e,i){throw i.$$typeof===S?Error(l(525)):(e=Object.prototype.toString.call(i),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)))}function dm(e){function i(L,T){if(e){var U=L.deletions;U===null?(L.deletions=[T],L.flags|=16):U.push(T)}}function s(L,T){if(!e)return null;for(;T!==null;)i(L,T),T=T.sibling;return null}function r(L){for(var T=new Map;L!==null;)L.key!==null?T.set(L.key,L):T.set(L.index,L),L=L.sibling;return T}function f(L,T){return L=ei(L,T),L.index=0,L.sibling=null,L}function h(L,T,U){return L.index=U,e?(U=L.alternate,U!==null?(U=U.index,U<T?(L.flags|=67108866,T):U):(L.flags|=67108866,T)):(L.flags|=1048576,T)}function y(L){return e&&L.alternate===null&&(L.flags|=67108866),L}function x(L,T,U,X){return T===null||T.tag!==6?(T=Hc(U,L.mode,X),T.return=L,T):(T=f(T,U),T.return=L,T)}function _(L,T,U,X){var xe=U.type;return xe===j?P(L,T,U.props.children,X,U.key):T!==null&&(T.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===R&&ma(xe)===T.type)?(T=f(T,U.props),al(T,U),T.return=L,T):(T=dr(U.type,U.key,U.props,null,L.mode,X),al(T,U),T.return=L,T)}function B(L,T,U,X){return T===null||T.tag!==4||T.stateNode.containerInfo!==U.containerInfo||T.stateNode.implementation!==U.implementation?(T=Gc(U,L.mode,X),T.return=L,T):(T=f(T,U.children||[]),T.return=L,T)}function P(L,T,U,X,xe){return T===null||T.tag!==7?(T=ca(U,L.mode,X,xe),T.return=L,T):(T=f(T,U),T.return=L,T)}function W(L,T,U){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=Hc(""+T,L.mode,U),T.return=L,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case N:return U=dr(T.type,T.key,T.props,null,L.mode,U),al(U,T),U.return=L,U;case z:return T=Gc(T,L.mode,U),T.return=L,T;case R:return T=ma(T),W(L,T,U)}if(Re(T)||ue(T))return T=ca(T,L.mode,U,null),T.return=L,T;if(typeof T.then=="function")return W(L,vr(T),U);if(T.$$typeof===O)return W(L,mr(L,T),U);br(L,T)}return null}function Z(L,T,U,X){var xe=T!==null?T.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return xe!==null?null:x(L,T,""+U,X);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case N:return U.key===xe?_(L,T,U,X):null;case z:return U.key===xe?B(L,T,U,X):null;case R:return U=ma(U),Z(L,T,U,X)}if(Re(U)||ue(U))return xe!==null?null:P(L,T,U,X,null);if(typeof U.then=="function")return Z(L,T,vr(U),X);if(U.$$typeof===O)return Z(L,T,mr(L,U),X);br(L,U)}return null}function Y(L,T,U,X,xe){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return L=L.get(U)||null,x(T,L,""+X,xe);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case N:return L=L.get(X.key===null?U:X.key)||null,_(T,L,X,xe);case z:return L=L.get(X.key===null?U:X.key)||null,B(T,L,X,xe);case R:return X=ma(X),Y(L,T,U,X,xe)}if(Re(X)||ue(X))return L=L.get(U)||null,P(T,L,X,xe,null);if(typeof X.then=="function")return Y(L,T,U,vr(X),xe);if(X.$$typeof===O)return Y(L,T,U,mr(T,X),xe);br(T,X)}return null}function me(L,T,U,X){for(var xe=null,Ze=null,ye=T,Ee=T=0,Le=null;ye!==null&&Ee<U.length;Ee++){ye.index>Ee?(Le=ye,ye=null):Le=ye.sibling;var qe=Z(L,ye,U[Ee],X);if(qe===null){ye===null&&(ye=Le);break}e&&ye&&qe.alternate===null&&i(L,ye),T=h(qe,T,Ee),Ze===null?xe=qe:Ze.sibling=qe,Ze=qe,ye=Le}if(Ee===U.length)return s(L,ye),$e&&ti(L,Ee),xe;if(ye===null){for(;Ee<U.length;Ee++)ye=W(L,U[Ee],X),ye!==null&&(T=h(ye,T,Ee),Ze===null?xe=ye:Ze.sibling=ye,Ze=ye);return $e&&ti(L,Ee),xe}for(ye=r(ye);Ee<U.length;Ee++)Le=Y(ye,L,Ee,U[Ee],X),Le!==null&&(e&&Le.alternate!==null&&ye.delete(Le.key===null?Ee:Le.key),T=h(Le,T,Ee),Ze===null?xe=Le:Ze.sibling=Le,Ze=Le);return e&&ye.forEach(function(Ki){return i(L,Ki)}),$e&&ti(L,Ee),xe}function je(L,T,U,X){if(U==null)throw Error(l(151));for(var xe=null,Ze=null,ye=T,Ee=T=0,Le=null,qe=U.next();ye!==null&&!qe.done;Ee++,qe=U.next()){ye.index>Ee?(Le=ye,ye=null):Le=ye.sibling;var Ki=Z(L,ye,qe.value,X);if(Ki===null){ye===null&&(ye=Le);break}e&&ye&&Ki.alternate===null&&i(L,ye),T=h(Ki,T,Ee),Ze===null?xe=Ki:Ze.sibling=Ki,Ze=Ki,ye=Le}if(qe.done)return s(L,ye),$e&&ti(L,Ee),xe;if(ye===null){for(;!qe.done;Ee++,qe=U.next())qe=W(L,qe.value,X),qe!==null&&(T=h(qe,T,Ee),Ze===null?xe=qe:Ze.sibling=qe,Ze=qe);return $e&&ti(L,Ee),xe}for(ye=r(ye);!qe.done;Ee++,qe=U.next())qe=Y(ye,L,Ee,qe.value,X),qe!==null&&(e&&qe.alternate!==null&&ye.delete(qe.key===null?Ee:qe.key),T=h(qe,T,Ee),Ze===null?xe=qe:Ze.sibling=qe,Ze=qe);return e&&ye.forEach(function(mw){return i(L,mw)}),$e&&ti(L,Ee),xe}function Je(L,T,U,X){if(typeof U=="object"&&U!==null&&U.type===j&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case N:e:{for(var xe=U.key;T!==null;){if(T.key===xe){if(xe=U.type,xe===j){if(T.tag===7){s(L,T.sibling),X=f(T,U.props.children),X.return=L,L=X;break e}}else if(T.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===R&&ma(xe)===T.type){s(L,T.sibling),X=f(T,U.props),al(X,U),X.return=L,L=X;break e}s(L,T);break}else i(L,T);T=T.sibling}U.type===j?(X=ca(U.props.children,L.mode,X,U.key),X.return=L,L=X):(X=dr(U.type,U.key,U.props,null,L.mode,X),al(X,U),X.return=L,L=X)}return y(L);case z:e:{for(xe=U.key;T!==null;){if(T.key===xe)if(T.tag===4&&T.stateNode.containerInfo===U.containerInfo&&T.stateNode.implementation===U.implementation){s(L,T.sibling),X=f(T,U.children||[]),X.return=L,L=X;break e}else{s(L,T);break}else i(L,T);T=T.sibling}X=Gc(U,L.mode,X),X.return=L,L=X}return y(L);case R:return U=ma(U),Je(L,T,U,X)}if(Re(U))return me(L,T,U,X);if(ue(U)){if(xe=ue(U),typeof xe!="function")throw Error(l(150));return U=xe.call(U),je(L,T,U,X)}if(typeof U.then=="function")return Je(L,T,vr(U),X);if(U.$$typeof===O)return Je(L,T,mr(L,U),X);br(L,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,T!==null&&T.tag===6?(s(L,T.sibling),X=f(T,U),X.return=L,L=X):(s(L,T),X=Hc(U,L.mode,X),X.return=L,L=X),y(L)):s(L,T)}return function(L,T,U,X){try{il=0;var xe=Je(L,T,U,X);return Wa=null,xe}catch(ye){if(ye===Fa||ye===gr)throw ye;var Ze=dn(29,ye,null,L.mode);return Ze.lanes=X,Ze.return=L,Ze}}}var ga=dm(!0),fm=dm(!1),Ci=!1;function nu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function iu(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 Ei(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ai(e,i,s){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(He&2)!==0){var f=r.pending;return f===null?i.next=i:(i.next=f.next,f.next=i),r.pending=i,i=ur(e),Qh(e,null,s),i}return cr(e,r,i,s),ur(e)}function sl(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,ih(e,s)}}function au(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 su=!1;function ll(){if(su){var e=Ja;if(e!==null)throw e}}function rl(e,i,s,r){su=!1;var f=e.updateQueue;Ci=!1;var h=f.firstBaseUpdate,y=f.lastBaseUpdate,x=f.shared.pending;if(x!==null){f.shared.pending=null;var _=x,B=_.next;_.next=null,y===null?h=B:y.next=B,y=_;var P=e.alternate;P!==null&&(P=P.updateQueue,x=P.lastBaseUpdate,x!==y&&(x===null?P.firstBaseUpdate=B:x.next=B,P.lastBaseUpdate=_))}if(h!==null){var W=f.baseState;y=0,P=B=_=null,x=h;do{var Z=x.lane&-536870913,Y=Z!==x.lane;if(Y?(Me&Z)===Z:(r&Z)===Z){Z!==0&&Z===Xa&&(su=!0),P!==null&&(P=P.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var me=e,je=x;Z=i;var Je=s;switch(je.tag){case 1:if(me=je.payload,typeof me=="function"){W=me.call(Je,W,Z);break e}W=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=je.payload,Z=typeof me=="function"?me.call(Je,W,Z):me,Z==null)break e;W=v({},W,Z);break e;case 2:Ci=!0}}Z=x.callback,Z!==null&&(e.flags|=64,Y&&(e.flags|=8192),Y=f.callbacks,Y===null?f.callbacks=[Z]:Y.push(Z))}else Y={lane:Z,tag:x.tag,payload:x.payload,callback:x.callback,next:null},P===null?(B=P=Y,_=W):P=P.next=Y,y|=Z;if(x=x.next,x===null){if(x=f.shared.pending,x===null)break;Y=x,x=Y.next,Y.next=null,f.lastBaseUpdate=Y,f.shared.pending=null}}while(!0);P===null&&(_=W),f.baseState=_,f.firstBaseUpdate=B,f.lastBaseUpdate=P,h===null&&(f.shared.lanes=0),Mi|=y,e.lanes=y,e.memoizedState=W}}function hm(e,i){if(typeof e!="function")throw Error(l(191,e));e.call(i)}function mm(e,i){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)hm(s[e],i)}var es=C(null),xr=C(0);function pm(e,i){e=fi,ne(xr,e),ne(es,i),fi=e|i.baseLanes}function lu(){ne(xr,fi),ne(es,es.current)}function ru(){fi=xr.current,H(es),H(xr)}var fn=C(null),zn=null;function Ti(e){var i=e.alternate;ne(mt,mt.current&1),ne(fn,e),zn===null&&(i===null||es.current!==null||i.memoizedState!==null)&&(zn=e)}function ou(e){ne(mt,mt.current),ne(fn,e),zn===null&&(zn=e)}function gm(e){e.tag===22?(ne(mt,mt.current),ne(fn,e),zn===null&&(zn=e)):Oi()}function Oi(){ne(mt,mt.current),ne(fn,fn.current)}function hn(e){H(fn),zn===e&&(zn=null),H(mt)}var mt=C(0);function Sr(e){for(var i=e;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||md(s)||pd(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 ai=0,Ce=null,Qe=null,jt=null,wr=!1,ts=!1,ya=!1,jr=0,ol=0,ns=null,aS=0;function ft(){throw Error(l(321))}function cu(e,i){if(i===null)return!1;for(var s=0;s<i.length&&s<e.length;s++)if(!un(e[s],i[s]))return!1;return!0}function uu(e,i,s,r,f,h){return ai=h,Ce=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,I.H=e===null||e.memoizedState===null?Wm:ku,ya=!1,h=s(r,f),ya=!1,ts&&(h=vm(i,s,r,f)),ym(e),h}function ym(e){I.H=dl;var i=Qe!==null&&Qe.next!==null;if(ai=0,jt=Qe=Ce=null,wr=!1,ol=0,ns=null,i)throw Error(l(300));e===null||Nt||(e=e.dependencies,e!==null&&hr(e)&&(Nt=!0))}function vm(e,i,s,r){Ce=e;var f=0;do{if(ts&&(ns=null),ol=0,ts=!1,25<=f)throw Error(l(301));if(f+=1,jt=Qe=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}I.H=ep,h=i(s,r)}while(ts);return h}function sS(){var e=I.H,i=e.useState()[0];return i=typeof i.then=="function"?cl(i):i,e=e.useState()[0],(Qe!==null?Qe.memoizedState:null)!==e&&(Ce.flags|=1024),i}function du(){var e=jr!==0;return jr=0,e}function fu(e,i,s){i.updateQueue=e.updateQueue,i.flags&=-2053,e.lanes&=~s}function hu(e){if(wr){for(e=e.memoizedState;e!==null;){var i=e.queue;i!==null&&(i.pending=null),e=e.next}wr=!1}ai=0,jt=Qe=Ce=null,ts=!1,ol=jr=0,ns=null}function Xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Ce.memoizedState=jt=e:jt=jt.next=e,jt}function pt(){if(Qe===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var i=jt===null?Ce.memoizedState:jt.next;if(i!==null)jt=i,Qe=e;else{if(e===null)throw Ce.alternate===null?Error(l(467)):Error(l(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},jt===null?Ce.memoizedState=jt=e:jt=jt.next=e}return jt}function Nr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cl(e){var i=ol;return ol+=1,ns===null&&(ns=[]),e=om(ns,e,i),i=Ce,(jt===null?i.memoizedState:jt.next)===null&&(i=i.alternate,I.H=i===null||i.memoizedState===null?Wm:ku),e}function kr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return cl(e);if(e.$$typeof===O)return Ut(e)}throw Error(l(438,String(e)))}function mu(e){var i=null,s=Ce.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var r=Ce.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=Nr(),Ce.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]=Se;return i.index++,s}function si(e,i){return typeof i=="function"?i(e):i}function zr(e){var i=pt();return pu(i,Qe,e)}function pu(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 x=y=null,_=null,B=i,P=!1;do{var W=B.lane&-536870913;if(W!==B.lane?(Me&W)===W:(ai&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===Xa&&(P=!0);else if((ai&Z)===Z){B=B.next,Z===Xa&&(P=!0);continue}else W={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},_===null?(x=_=W,y=h):_=_.next=W,Ce.lanes|=Z,Mi|=Z;W=B.action,ya&&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?(x=_=Z,y=h):_=_.next=Z,Ce.lanes|=W,Mi|=W;B=B.next}while(B!==null&&B!==i);if(_===null?y=h:_.next=x,!un(h,e.memoizedState)&&(Nt=!0,P&&(s=Ja,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 gu(e){var i=pt(),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);un(h,i.memoizedState)||(Nt=!0),i.memoizedState=h,i.baseQueue===null&&(i.baseState=h),s.lastRenderedState=h}return[h,r]}function bm(e,i,s){var r=Ce,f=pt(),h=$e;if(h){if(s===void 0)throw Error(l(407));s=s()}else s=i();var y=!un((Qe||f).memoizedState,s);if(y&&(f.memoizedState=s,Nt=!0),f=f.queue,bu(wm.bind(null,r,f,e),[e]),f.getSnapshot!==i||y||jt!==null&&jt.memoizedState.tag&1){if(r.flags|=2048,is(9,{destroy:void 0},Sm.bind(null,r,f,s,i),null),Fe===null)throw Error(l(349));h||(ai&127)!==0||xm(r,i,s)}return s}function xm(e,i,s){e.flags|=16384,e={getSnapshot:i,value:s},i=Ce.updateQueue,i===null?(i=Nr(),Ce.updateQueue=i,i.stores=[e]):(s=i.stores,s===null?i.stores=[e]:s.push(e))}function Sm(e,i,s,r){i.value=s,i.getSnapshot=r,jm(i)&&Nm(e)}function wm(e,i,s){return s(function(){jm(i)&&Nm(e)})}function jm(e){var i=e.getSnapshot;e=e.value;try{var s=i();return!un(e,s)}catch{return!0}}function Nm(e){var i=oa(e,2);i!==null&&on(i,e,2)}function yu(e){var i=Xt();if(typeof e=="function"){var s=e;if(e=s(),ya){Hn(!0);try{s()}finally{Hn(!1)}}}return i.memoizedState=i.baseState=e,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:e},i}function km(e,i,s,r){return e.baseState=s,pu(e,Qe,typeof r=="function"?r:si)}function lS(e,i,s,r,f){if(Er(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)}};I.T!==null?s(!0):h.isTransition=!1,r(h),s=i.pending,s===null?(h.next=i.pending=h,zm(i,h)):(h.next=s.next,i.pending=s.next=h)}}function zm(e,i){var s=i.action,r=i.payload,f=e.state;if(i.isTransition){var h=I.T,y={};I.T=y;try{var x=s(f,r),_=I.S;_!==null&&_(y,x),_m(e,i,x)}catch(B){vu(e,i,B)}finally{h!==null&&y.types!==null&&(h.types=y.types),I.T=h}}else try{h=s(f,r),_m(e,i,h)}catch(B){vu(e,i,B)}}function _m(e,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(r){Cm(e,i,r)},function(r){return vu(e,i,r)}):Cm(e,i,s)}function Cm(e,i,s){i.status="fulfilled",i.value=s,Em(i),e.state=s,i=e.pending,i!==null&&(s=i.next,s===i?e.pending=null:(s=s.next,i.next=s,zm(e,s)))}function vu(e,i,s){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do i.status="rejected",i.reason=s,Em(i),i=i.next;while(i!==r)}e.action=null}function Em(e){e=e.listeners;for(var i=0;i<e.length;i++)(0,e[i])()}function Am(e,i){return i}function Tm(e,i){if($e){var s=Fe.formState;if(s!==null){e:{var r=Ce;if($e){if(tt){t:{for(var f=tt,h=kn;f.nodeType!==8;){if(!h){f=null;break t}if(f=_n(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){tt=_n(f.nextSibling),r=f.data==="F!";break e}}zi(r)}r=!1}r&&(i=s[0])}}return s=Xt(),s.memoizedState=s.baseState=i,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Am,lastRenderedState:i},s.queue=r,s=Xm.bind(null,Ce,r),r.dispatch=s,r=yu(!1),h=Nu.bind(null,Ce,!1,r.queue),r=Xt(),f={state:i,dispatch:null,action:e,pending:null},r.queue=f,s=lS.bind(null,Ce,f,h,s),f.dispatch=s,r.memoizedState=e,[i,s,!1]}function Om(e){var i=pt();return Dm(i,Qe,e)}function Dm(e,i,s){if(i=pu(e,i,Am)[0],e=zr(si)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var r=cl(i)}catch(y){throw y===Fa?gr:y}else r=i;i=pt();var f=i.queue,h=f.dispatch;return s!==i.memoizedState&&(Ce.flags|=2048,is(9,{destroy:void 0},rS.bind(null,f,s),null)),[r,h,e]}function rS(e,i){e.action=i}function Rm(e){var i=pt(),s=Qe;if(s!==null)return Dm(i,s,e);pt(),i=i.memoizedState,s=pt();var r=s.queue.dispatch;return s.memoizedState=e,[i,r,!1]}function is(e,i,s,r){return e={tag:e,create:s,deps:r,inst:i,next:null},i=Ce.updateQueue,i===null&&(i=Nr(),Ce.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 Mm(){return pt().memoizedState}function _r(e,i,s,r){var f=Xt();Ce.flags|=e,f.memoizedState=is(1|i,{destroy:void 0},s,r===void 0?null:r)}function Cr(e,i,s,r){var f=pt();r=r===void 0?null:r;var h=f.memoizedState.inst;Qe!==null&&r!==null&&cu(r,Qe.memoizedState.deps)?f.memoizedState=is(i,h,s,r):(Ce.flags|=e,f.memoizedState=is(1|i,h,s,r))}function Lm(e,i){_r(8390656,8,e,i)}function bu(e,i){Cr(2048,8,e,i)}function oS(e){Ce.flags|=4;var i=Ce.updateQueue;if(i===null)i=Nr(),Ce.updateQueue=i,i.events=[e];else{var s=i.events;s===null?i.events=[e]:s.push(e)}}function $m(e){var i=pt().memoizedState;return oS({ref:i,nextImpl:e}),function(){if((He&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}function Um(e,i){return Cr(4,2,e,i)}function Bm(e,i){return Cr(4,4,e,i)}function Im(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 Zm(e,i,s){s=s!=null?s.concat([e]):null,Cr(4,4,Im.bind(null,i,e),s)}function xu(){}function qm(e,i){var s=pt();i=i===void 0?null:i;var r=s.memoizedState;return i!==null&&cu(i,r[1])?r[0]:(s.memoizedState=[e,i],e)}function Hm(e,i){var s=pt();i=i===void 0?null:i;var r=s.memoizedState;if(i!==null&&cu(i,r[1]))return r[0];if(r=e(),ya){Hn(!0);try{e()}finally{Hn(!1)}}return s.memoizedState=[r,i],r}function Su(e,i,s){return s===void 0||(ai&1073741824)!==0&&(Me&261930)===0?e.memoizedState=i:(e.memoizedState=s,e=Gp(),Ce.lanes|=e,Mi|=e,s)}function Gm(e,i,s,r){return un(s,i)?s:es.current!==null?(e=Su(e,s,r),un(e,i)||(Nt=!0),e):(ai&42)===0||(ai&1073741824)!==0&&(Me&261930)===0?(Nt=!0,e.memoizedState=s):(e=Gp(),Ce.lanes|=e,Mi|=e,i)}function Km(e,i,s,r,f){var h=K.p;K.p=h!==0&&8>h?h:8;var y=I.T,x={};I.T=x,Nu(e,!1,i,s);try{var _=f(),B=I.S;if(B!==null&&B(x,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var P=iS(_,r);ul(e,i,P,gn(e))}else ul(e,i,r,gn(e))}catch(W){ul(e,i,{then:function(){},status:"rejected",reason:W},gn())}finally{K.p=h,y!==null&&x.types!==null&&(y.types=x.types),I.T=y}}function cS(){}function wu(e,i,s,r){if(e.tag!==5)throw Error(l(476));var f=Ym(e).queue;Km(e,f,i,se,s===null?cS:function(){return Vm(e),s(r)})}function Ym(e){var i=e.memoizedState;if(i!==null)return i;i={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:se},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:s},next:null},e.memoizedState=i,e=e.alternate,e!==null&&(e.memoizedState=i),i}function Vm(e){var i=Ym(e);i.next===null&&(i=e.alternate.memoizedState),ul(e,i.next.queue,{},gn())}function ju(){return Ut(_l)}function Pm(){return pt().memoizedState}function Qm(){return pt().memoizedState}function uS(e){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var s=gn();e=Ei(s);var r=Ai(i,e,s);r!==null&&(on(r,i,s),sl(r,i,s)),i={cache:Fc()},e.payload=i;return}i=i.return}}function dS(e,i,s){var r=gn();s={lane:r,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Er(e)?Jm(i,s):(s=Zc(e,i,s,r),s!==null&&(on(s,e,r),Fm(s,i,r)))}function Xm(e,i,s){var r=gn();ul(e,i,s,r)}function ul(e,i,s,r){var f={lane:r,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Er(e))Jm(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,x=h(y,s);if(f.hasEagerState=!0,f.eagerState=x,un(x,y))return cr(e,i,f,0),Fe===null&&or(),!1}catch{}if(s=Zc(e,i,f,r),s!==null)return on(s,e,r),Fm(s,i,r),!0}return!1}function Nu(e,i,s,r){if(r={lane:2,revertLane:nd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Er(e)){if(i)throw Error(l(479))}else i=Zc(e,s,r,2),i!==null&&on(i,e,2)}function Er(e){var i=e.alternate;return e===Ce||i!==null&&i===Ce}function Jm(e,i){ts=wr=!0;var s=e.pending;s===null?i.next=i:(i.next=s.next,s.next=i),e.pending=i}function Fm(e,i,s){if((s&4194048)!==0){var r=i.lanes;r&=e.pendingLanes,s|=r,i.lanes=s,ih(e,s)}}var dl={readContext:Ut,use:kr,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};dl.useEffectEvent=ft;var Wm={readContext:Ut,use:kr,useCallback:function(e,i){return Xt().memoizedState=[e,i===void 0?null:i],e},useContext:Ut,useEffect:Lm,useImperativeHandle:function(e,i,s){s=s!=null?s.concat([e]):null,_r(4194308,4,Im.bind(null,i,e),s)},useLayoutEffect:function(e,i){return _r(4194308,4,e,i)},useInsertionEffect:function(e,i){_r(4,2,e,i)},useMemo:function(e,i){var s=Xt();i=i===void 0?null:i;var r=e();if(ya){Hn(!0);try{e()}finally{Hn(!1)}}return s.memoizedState=[r,i],r},useReducer:function(e,i,s){var r=Xt();if(s!==void 0){var f=s(i);if(ya){Hn(!0);try{s(i)}finally{Hn(!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=dS.bind(null,Ce,e),[r.memoizedState,e]},useRef:function(e){var i=Xt();return e={current:e},i.memoizedState=e},useState:function(e){e=yu(e);var i=e.queue,s=Xm.bind(null,Ce,i);return i.dispatch=s,[e.memoizedState,s]},useDebugValue:xu,useDeferredValue:function(e,i){var s=Xt();return Su(s,e,i)},useTransition:function(){var e=yu(!1);return e=Km.bind(null,Ce,e.queue,!0,!1),Xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,i,s){var r=Ce,f=Xt();if($e){if(s===void 0)throw Error(l(407));s=s()}else{if(s=i(),Fe===null)throw Error(l(349));(Me&127)!==0||xm(r,i,s)}f.memoizedState=s;var h={value:s,getSnapshot:i};return f.queue=h,Lm(wm.bind(null,r,h,e),[e]),r.flags|=2048,is(9,{destroy:void 0},Sm.bind(null,r,h,s,i),null),s},useId:function(){var e=Xt(),i=Fe.identifierPrefix;if($e){var s=Yn,r=Kn;s=(r&~(1<<32-Vt(r)-1)).toString(32)+s,i="_"+i+"R_"+s,s=jr++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=aS++,i="_"+i+"r_"+s.toString(32)+"_";return e.memoizedState=i},useHostTransitionStatus:ju,useFormState:Tm,useActionState:Tm,useOptimistic:function(e){var i=Xt();i.memoizedState=i.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=Nu.bind(null,Ce,!0,s),s.dispatch=i,[e,i]},useMemoCache:mu,useCacheRefresh:function(){return Xt().memoizedState=uS.bind(null,Ce)},useEffectEvent:function(e){var i=Xt(),s={impl:e};return i.memoizedState=s,function(){if((He&2)!==0)throw Error(l(440));return s.impl.apply(void 0,arguments)}}},ku={readContext:Ut,use:kr,useCallback:qm,useContext:Ut,useEffect:bu,useImperativeHandle:Zm,useInsertionEffect:Um,useLayoutEffect:Bm,useMemo:Hm,useReducer:zr,useRef:Mm,useState:function(){return zr(si)},useDebugValue:xu,useDeferredValue:function(e,i){var s=pt();return Gm(s,Qe.memoizedState,e,i)},useTransition:function(){var e=zr(si)[0],i=pt().memoizedState;return[typeof e=="boolean"?e:cl(e),i]},useSyncExternalStore:bm,useId:Pm,useHostTransitionStatus:ju,useFormState:Om,useActionState:Om,useOptimistic:function(e,i){var s=pt();return km(s,Qe,e,i)},useMemoCache:mu,useCacheRefresh:Qm};ku.useEffectEvent=$m;var ep={readContext:Ut,use:kr,useCallback:qm,useContext:Ut,useEffect:bu,useImperativeHandle:Zm,useInsertionEffect:Um,useLayoutEffect:Bm,useMemo:Hm,useReducer:gu,useRef:Mm,useState:function(){return gu(si)},useDebugValue:xu,useDeferredValue:function(e,i){var s=pt();return Qe===null?Su(s,e,i):Gm(s,Qe.memoizedState,e,i)},useTransition:function(){var e=gu(si)[0],i=pt().memoizedState;return[typeof e=="boolean"?e:cl(e),i]},useSyncExternalStore:bm,useId:Pm,useHostTransitionStatus:ju,useFormState:Rm,useActionState:Rm,useOptimistic:function(e,i){var s=pt();return Qe!==null?km(s,Qe,e,i):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:mu,useCacheRefresh:Qm};ep.useEffectEvent=$m;function zu(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 _u={enqueueSetState:function(e,i,s){e=e._reactInternals;var r=gn(),f=Ei(r);f.payload=i,s!=null&&(f.callback=s),i=Ai(e,f,r),i!==null&&(on(i,e,r),sl(i,e,r))},enqueueReplaceState:function(e,i,s){e=e._reactInternals;var r=gn(),f=Ei(r);f.tag=1,f.payload=i,s!=null&&(f.callback=s),i=Ai(e,f,r),i!==null&&(on(i,e,r),sl(i,e,r))},enqueueForceUpdate:function(e,i){e=e._reactInternals;var s=gn(),r=Ei(s);r.tag=2,i!=null&&(r.callback=i),i=Ai(e,r,s),i!==null&&(on(i,e,s),sl(i,e,s))}};function tp(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?!Js(s,r)||!Js(f,h):!0}function np(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&&_u.enqueueReplaceState(i,i.state,null)}function va(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 ip(e){rr(e)}function ap(e){console.error(e)}function sp(e){rr(e)}function Ar(e,i){try{var s=e.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(r){setTimeout(function(){throw r})}}function lp(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 Cu(e,i,s){return s=Ei(s),s.tag=3,s.payload={element:null},s.callback=function(){Ar(e,i)},s}function rp(e){return e=Ei(e),e.tag=3,e}function op(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(){lp(i,s,r)}}var y=s.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){lp(i,s,r),typeof f!="function"&&(Li===null?Li=new Set([this]):Li.add(this));var x=r.stack;this.componentDidCatch(r.value,{componentStack:x!==null?x:""})})}function fS(e,i,s,r,f){if(s.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(i=s.alternate,i!==null&&Qa(i,s,f,!0),s=fn.current,s!==null){switch(s.tag){case 31:case 13:return zn===null?qr():s.alternate===null&&ht===0&&(ht=3),s.flags&=-257,s.flags|=65536,s.lanes=f,r===yr?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([r]):i.add(r),Wu(e,r,f)),!1;case 22:return s.flags|=65536,r===yr?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)),Wu(e,r,f)),!1}throw Error(l(435,s.tag))}return Wu(e,r,f),qr(),!1}if($e)return i=fn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=f,r!==Vc&&(e=Error(l(422),{cause:r}),el(wn(e,s)))):(r!==Vc&&(i=Error(l(423),{cause:r}),el(wn(i,s))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,r=wn(r,s),f=Cu(e.stateNode,r,f),au(e,f),ht!==4&&(ht=2)),!1;var h=Error(l(520),{cause:r});if(h=wn(h,s),bl===null?bl=[h]:bl.push(h),ht!==4&&(ht=2),i===null)return!0;r=wn(r,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,e=f&-f,s.lanes|=e,e=Cu(s.stateNode,r,e),au(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"&&(Li===null||!Li.has(h))))return s.flags|=65536,f&=-f,s.lanes|=f,f=rp(f),op(f,e,s,r),au(s,f),!1}s=s.return}while(s!==null);return!1}var Eu=Error(l(461)),Nt=!1;function Bt(e,i,s,r){i.child=e===null?fm(i,null,s,r):ga(i,e.child,s,r)}function cp(e,i,s,r,f){s=s.render;var h=i.ref;if("ref"in r){var y={};for(var x in r)x!=="ref"&&(y[x]=r[x])}else y=r;return fa(i),r=uu(e,i,s,y,h,f),x=du(),e!==null&&!Nt?(fu(e,i,f),li(e,i,f)):($e&&x&&Kc(i),i.flags|=1,Bt(e,i,r,f),i.child)}function up(e,i,s,r,f){if(e===null){var h=s.type;return typeof h=="function"&&!qc(h)&&h.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=h,dp(e,i,h,r,f)):(e=dr(s.type,null,r,i,i.mode,f),e.ref=i.ref,e.return=i,i.child=e)}if(h=e.child,!$u(e,f)){var y=h.memoizedProps;if(s=s.compare,s=s!==null?s:Js,s(y,r)&&e.ref===i.ref)return li(e,i,f)}return i.flags|=1,e=ei(h,r),e.ref=i.ref,e.return=i,i.child=e}function dp(e,i,s,r,f){if(e!==null){var h=e.memoizedProps;if(Js(h,r)&&e.ref===i.ref)if(Nt=!1,i.pendingProps=r=h,$u(e,f))(e.flags&131072)!==0&&(Nt=!0);else return i.lanes=e.lanes,li(e,i,f)}return Au(e,i,s,r,f)}function fp(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 hp(e,i,h,s,r)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},e!==null&&pr(i,h!==null?h.cachePool:null),h!==null?pm(i,h):lu(),gm(i);else return r=i.lanes=536870912,hp(e,i,h!==null?h.baseLanes|s:s,s,r)}else h!==null?(pr(i,h.cachePool),pm(i,h),Oi(),i.memoizedState=null):(e!==null&&pr(i,null),lu(),Oi());return Bt(e,i,f,s),i.child}function fl(e,i){return e!==null&&e.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function hp(e,i,s,r,f){var h=eu();return h=h===null?null:{parent:wt._currentValue,pool:h},i.memoizedState={baseLanes:s,cachePool:h},e!==null&&pr(i,null),lu(),gm(i),e!==null&&Qa(e,i,r,!0),i.childLanes=f,null}function Tr(e,i){return i=Dr({mode:i.mode,children:i.children},e.mode),i.ref=e.ref,e.child=i,i.return=e,i}function mp(e,i,s){return ga(i,e.child,null,s),e=Tr(i,i.pendingProps),e.flags|=2,hn(i),i.memoizedState=null,e}function hS(e,i,s){var r=i.pendingProps,f=(i.flags&128)!==0;if(i.flags&=-129,e===null){if($e){if(r.mode==="hidden")return e=Tr(i,r),i.lanes=536870912,fl(null,e);if(ou(i),(e=tt)?(e=zg(e,kn),e=e!==null&&e.data==="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Ni!==null?{id:Kn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},s=Jh(e),s.return=i,i.child=s,$t=i,tt=null)):e=null,e===null)throw zi(i);return i.lanes=536870912,null}return Tr(i,r)}var h=e.memoizedState;if(h!==null){var y=h.dehydrated;if(ou(i),f)if(i.flags&256)i.flags&=-257,i=mp(e,i,s);else if(i.memoizedState!==null)i.child=e.child,i.flags|=128,i=null;else throw Error(l(558));else if(Nt||Qa(e,i,s,!1),f=(s&e.childLanes)!==0,Nt||f){if(r=Fe,r!==null&&(y=ah(r,s),y!==0&&y!==h.retryLane))throw h.retryLane=y,oa(e,y),on(r,e,y),Eu;qr(),i=mp(e,i,s)}else e=h.treeContext,tt=_n(y.nextSibling),$t=i,$e=!0,ki=null,kn=!1,e!==null&&em(i,e),i=Tr(i,r),i.flags|=4096;return i}return e=ei(e.child,{mode:r.mode,children:r.children}),e.ref=i.ref,i.child=e,e.return=i,e}function Or(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 Au(e,i,s,r,f){return fa(i),s=uu(e,i,s,r,void 0,f),r=du(),e!==null&&!Nt?(fu(e,i,f),li(e,i,f)):($e&&r&&Kc(i),i.flags|=1,Bt(e,i,s,f),i.child)}function pp(e,i,s,r,f,h){return fa(i),i.updateQueue=null,s=vm(i,r,s,f),ym(e),r=du(),e!==null&&!Nt?(fu(e,i,h),li(e,i,h)):($e&&r&&Kc(i),i.flags|=1,Bt(e,i,s,h),i.child)}function gp(e,i,s,r,f){if(fa(i),i.stateNode===null){var h=Ka,y=s.contextType;typeof y=="object"&&y!==null&&(h=Ut(y)),h=new s(r,h),i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=_u,i.stateNode=h,h._reactInternals=i,h=i.stateNode,h.props=r,h.state=i.memoizedState,h.refs={},nu(i),y=s.contextType,h.context=typeof y=="object"&&y!==null?Ut(y):Ka,h.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(zu(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&&_u.enqueueReplaceState(h,h.state,null),rl(i,r,h,f),ll(),h.state=i.memoizedState),typeof h.componentDidMount=="function"&&(i.flags|=4194308),r=!0}else if(e===null){h=i.stateNode;var x=i.memoizedProps,_=va(s,x);h.props=_;var B=h.context,P=s.contextType;y=Ka,typeof P=="object"&&P!==null&&(y=Ut(P));var W=s.getDerivedStateFromProps;P=typeof W=="function"||typeof h.getSnapshotBeforeUpdate=="function",x=i.pendingProps!==x,P||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(x||B!==y)&&np(i,h,r,y),Ci=!1;var Z=i.memoizedState;h.state=Z,rl(i,r,h,f),ll(),B=i.memoizedState,x||Z!==B||Ci?(typeof W=="function"&&(zu(i,s,W,r),B=i.memoizedState),(_=Ci||tp(i,s,_,r,Z,B,y))?(P||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,iu(e,i),y=i.memoizedProps,P=va(s,y),h.props=P,W=i.pendingProps,Z=h.context,B=s.contextType,_=Ka,typeof B=="object"&&B!==null&&(_=Ut(B)),x=s.getDerivedStateFromProps,(B=typeof x=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==W||Z!==_)&&np(i,h,r,_),Ci=!1,Z=i.memoizedState,h.state=Z,rl(i,r,h,f),ll();var Y=i.memoizedState;y!==W||Z!==Y||Ci||e!==null&&e.dependencies!==null&&hr(e.dependencies)?(typeof x=="function"&&(zu(i,s,x,r),Y=i.memoizedState),(P=Ci||tp(i,s,P,r,Z,Y,_)||e!==null&&e.dependencies!==null&&hr(e.dependencies))?(B||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(r,Y,_),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(r,Y,_)),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=Y),h.props=r,h.state=Y,h.context=_,r=P):(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,Or(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=ga(i,e.child,null,f),i.child=ga(i,null,s,f)):Bt(e,i,s,f),i.memoizedState=h.state,e=i.child):e=li(e,i,f),e}function yp(e,i,s,r){return ua(),i.flags|=256,Bt(e,i,s,r),i.child}var Tu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ou(e){return{baseLanes:e,cachePool:lm()}}function Du(e,i,s){return e=e!==null?e.childLanes&~s:0,i&&(e|=pn),e}function vp(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:(mt.current&2)!==0),y&&(f=!0,i.flags&=-129),y=(i.flags&32)!==0,i.flags&=-33,e===null){if($e){if(f?Ti(i):Oi(),(e=tt)?(e=zg(e,kn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Ni!==null?{id:Kn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},s=Jh(e),s.return=i,i.child=s,$t=i,tt=null)):e=null,e===null)throw zi(i);return pd(e)?i.lanes=32:i.lanes=536870912,null}var x=r.children;return r=r.fallback,f?(Oi(),f=i.mode,x=Dr({mode:"hidden",children:x},f),r=ca(r,f,s,null),x.return=i,r.return=i,x.sibling=r,i.child=x,r=i.child,r.memoizedState=Ou(s),r.childLanes=Du(e,y,s),i.memoizedState=Tu,fl(null,r)):(Ti(i),Ru(i,x))}var _=e.memoizedState;if(_!==null&&(x=_.dehydrated,x!==null)){if(h)i.flags&256?(Ti(i),i.flags&=-257,i=Mu(e,i,s)):i.memoizedState!==null?(Oi(),i.child=e.child,i.flags|=128,i=null):(Oi(),x=r.fallback,f=i.mode,r=Dr({mode:"visible",children:r.children},f),x=ca(x,f,s,null),x.flags|=2,r.return=i,x.return=i,r.sibling=x,i.child=r,ga(i,e.child,null,s),r=i.child,r.memoizedState=Ou(s),r.childLanes=Du(e,y,s),i.memoizedState=Tu,i=fl(null,r));else if(Ti(i),pd(x)){if(y=x.nextSibling&&x.nextSibling.dataset,y)var B=y.dgst;y=B,r=Error(l(419)),r.stack="",r.digest=y,el({value:r,source:null,stack:null}),i=Mu(e,i,s)}else if(Nt||Qa(e,i,s,!1),y=(s&e.childLanes)!==0,Nt||y){if(y=Fe,y!==null&&(r=ah(y,s),r!==0&&r!==_.retryLane))throw _.retryLane=r,oa(e,r),on(y,e,r),Eu;md(x)||qr(),i=Mu(e,i,s)}else md(x)?(i.flags|=192,i.child=e.child,i=null):(e=_.treeContext,tt=_n(x.nextSibling),$t=i,$e=!0,ki=null,kn=!1,e!==null&&em(i,e),i=Ru(i,r.children),i.flags|=4096);return i}return f?(Oi(),x=r.fallback,f=i.mode,_=e.child,B=_.sibling,r=ei(_,{mode:"hidden",children:r.children}),r.subtreeFlags=_.subtreeFlags&65011712,B!==null?x=ei(B,x):(x=ca(x,f,s,null),x.flags|=2),x.return=i,r.return=i,r.sibling=x,i.child=r,fl(null,r),r=i.child,x=e.child.memoizedState,x===null?x=Ou(s):(f=x.cachePool,f!==null?(_=wt._currentValue,f=f.parent!==_?{parent:_,pool:_}:f):f=lm(),x={baseLanes:x.baseLanes|s,cachePool:f}),r.memoizedState=x,r.childLanes=Du(e,y,s),i.memoizedState=Tu,fl(e.child,r)):(Ti(i),s=e.child,e=s.sibling,s=ei(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 Ru(e,i){return i=Dr({mode:"visible",children:i},e.mode),i.return=e,e.child=i}function Dr(e,i){return e=dn(22,e,null,i),e.lanes=0,e}function Mu(e,i,s){return ga(i,e.child,null,s),e=Ru(i,i.pendingProps.children),e.flags|=2,i.memoizedState=null,e}function bp(e,i,s){e.lanes|=i;var r=e.alternate;r!==null&&(r.lanes|=i),Xc(e.return,i,s)}function Lu(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 xp(e,i,s){var r=i.pendingProps,f=r.revealOrder,h=r.tail;r=r.children;var y=mt.current,x=(y&2)!==0;if(x?(y=y&1|2,i.flags|=128):y&=1,ne(mt,y),Bt(e,i,r,s),r=$e?Ws:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=i.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bp(e,s,i);else if(e.tag===19)bp(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&&Sr(e)===null&&(f=s),s=s.sibling;s=f,s===null?(f=i.child,i.child=null):(f=s.sibling,s.sibling=null),Lu(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&&Sr(e)===null){i.child=f;break}e=f.sibling,f.sibling=s,s=f,f=e}Lu(i,!0,s,null,h,r);break;case"together":Lu(i,!1,null,null,void 0,r);break;default:i.memoizedState=null}return i.child}function li(e,i,s){if(e!==null&&(i.dependencies=e.dependencies),Mi|=i.lanes,(s&i.childLanes)===0)if(e!==null){if(Qa(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=ei(e,e.pendingProps),i.child=s,s.return=i;e.sibling!==null;)e=e.sibling,s=s.sibling=ei(e,e.pendingProps),s.return=i;s.sibling=null}return i.child}function $u(e,i){return(e.lanes&i)!==0?!0:(e=e.dependencies,!!(e!==null&&hr(e)))}function mS(e,i,s){switch(i.tag){case 3:$(i,i.stateNode.containerInfo),_i(i,wt,e.memoizedState.cache),ua();break;case 27:case 5:Ie(i);break;case 4:$(i,i.stateNode.containerInfo);break;case 10:_i(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,ou(i),null;break;case 13:var r=i.memoizedState;if(r!==null)return r.dehydrated!==null?(Ti(i),i.flags|=128,null):(s&i.child.childLanes)!==0?vp(e,i,s):(Ti(i),e=li(e,i,s),e!==null?e.sibling:null);Ti(i);break;case 19:var f=(e.flags&128)!==0;if(r=(s&i.childLanes)!==0,r||(Qa(e,i,s,!1),r=(s&i.childLanes)!==0),f){if(r)return xp(e,i,s);i.flags|=128}if(f=i.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),ne(mt,mt.current),r)break;return null;case 22:return i.lanes=0,fp(e,i,s,i.pendingProps);case 24:_i(i,wt,e.memoizedState.cache)}return li(e,i,s)}function Sp(e,i,s){if(e!==null)if(e.memoizedProps!==i.pendingProps)Nt=!0;else{if(!$u(e,s)&&(i.flags&128)===0)return Nt=!1,mS(e,i,s);Nt=(e.flags&131072)!==0}else Nt=!1,$e&&(i.flags&1048576)!==0&&Wh(i,Ws,i.index);switch(i.lanes=0,i.tag){case 16:e:{var r=i.pendingProps;if(e=ma(i.elementType),i.type=e,typeof e=="function")qc(e)?(r=va(e,r),i.tag=1,i=gp(null,i,e,r,s)):(i.tag=0,i=Au(null,i,e,r,s));else{if(e!=null){var f=e.$$typeof;if(f===D){i.tag=11,i=cp(null,i,e,r,s);break e}else if(f===V){i.tag=14,i=up(null,i,e,r,s);break e}}throw i=Be(e)||e,Error(l(306,i,""))}}return i;case 0:return Au(e,i,i.type,i.pendingProps,s);case 1:return r=i.type,f=va(r,i.pendingProps),gp(e,i,r,f,s);case 3:e:{if($(i,i.stateNode.containerInfo),e===null)throw Error(l(387));r=i.pendingProps;var h=i.memoizedState;f=h.element,iu(e,i),rl(i,r,null,s);var y=i.memoizedState;if(r=y.cache,_i(i,wt,r),r!==h.cache&&Jc(i,[wt],s,!0),ll(),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=yp(e,i,r,s);break e}else if(r!==f){f=wn(Error(l(424)),i),el(f),i=yp(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,tt=_n(e.firstChild),$t=i,$e=!0,ki=null,kn=!0,s=fm(i,null,r,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(ua(),r===f){i=li(e,i,s);break e}Bt(e,i,r,s)}i=i.child}return i;case 26:return Or(e,i),e===null?(s=Og(i.type,null,i.pendingProps,null))?i.memoizedState=s:$e||(s=i.type,e=i.pendingProps,r=Qr(he.current).createElement(s),r[Lt]=i,r[tn]=e,It(r,s,e),Dt(r),i.stateNode=r):i.memoizedState=Og(i.type,e.memoizedProps,i.pendingProps,e.memoizedState),null;case 27:return Ie(i),e===null&&$e&&(r=i.stateNode=Eg(i.type,i.pendingProps,he.current),$t=i,kn=!0,f=tt,Ii(i.type)?(gd=f,tt=_n(r.firstChild)):tt=f),Bt(e,i,i.pendingProps.children,s),Or(e,i),e===null&&(i.flags|=4194304),i.child;case 5:return e===null&&$e&&((f=r=tt)&&(r=GS(r,i.type,i.pendingProps,kn),r!==null?(i.stateNode=r,$t=i,tt=_n(r.firstChild),kn=!1,f=!0):f=!1),f||zi(i)),Ie(i),f=i.type,h=i.pendingProps,y=e!==null?e.memoizedProps:null,r=h.children,dd(f,h)?r=null:y!==null&&dd(f,y)&&(i.flags|=32),i.memoizedState!==null&&(f=uu(e,i,sS,null,null,s),_l._currentValue=f),Or(e,i),Bt(e,i,r,s),i.child;case 6:return e===null&&$e&&((e=s=tt)&&(s=KS(s,i.pendingProps,kn),s!==null?(i.stateNode=s,$t=i,tt=null,e=!0):e=!1),e||zi(i)),null;case 13:return vp(e,i,s);case 4:return $(i,i.stateNode.containerInfo),r=i.pendingProps,e===null?i.child=ga(i,null,r,s):Bt(e,i,r,s),i.child;case 11:return cp(e,i,i.type,i.pendingProps,s);case 7:return Bt(e,i,i.pendingProps,s),i.child;case 8:return Bt(e,i,i.pendingProps.children,s),i.child;case 12:return Bt(e,i,i.pendingProps.children,s),i.child;case 10:return r=i.pendingProps,_i(i,i.type,r.value),Bt(e,i,r.children,s),i.child;case 9:return f=i.type._context,r=i.pendingProps.children,fa(i),f=Ut(f),r=r(f),i.flags|=1,Bt(e,i,r,s),i.child;case 14:return up(e,i,i.type,i.pendingProps,s);case 15:return dp(e,i,i.type,i.pendingProps,s);case 19:return xp(e,i,s);case 31:return hS(e,i,s);case 22:return fp(e,i,s,i.pendingProps);case 24:return fa(i),r=Ut(wt),e===null?(f=eu(),f===null&&(f=Fe,h=Fc(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=s),f=h),i.memoizedState={parent:r,cache:f},nu(i),_i(i,wt,f)):((e.lanes&s)!==0&&(iu(e,i),rl(i,null,null,s),ll()),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),_i(i,wt,r)):(r=h.cache,_i(i,wt,r),r!==f.cache&&Jc(i,[wt],s,!0))),Bt(e,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(l(156,i.tag))}function ri(e){e.flags|=4}function Uu(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(Pp())e.flags|=8192;else throw pa=yr,tu}else e.flags&=-16777217}function wp(e,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!$g(i))if(Pp())e.flags|=8192;else throw pa=yr,tu}function Rr(e,i){i!==null&&(e.flags|=4),e.flags&16384&&(i=e.tag!==22?Is():536870912,e.lanes|=i,rs|=i)}function hl(e,i){if(!$e)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 nt(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 pS(e,i,s){var r=i.pendingProps;switch(Yc(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(i),null;case 1:return nt(i),null;case 3:return s=i.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),i.memoizedState.cache!==r&&(i.flags|=2048),ii(wt),ae(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Pa(i)?ri(i):e===null||e.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Pc())),nt(i),null;case 26:var f=i.type,h=i.memoizedState;return e===null?(ri(i),h!==null?(nt(i),wp(i,h)):(nt(i),Uu(i,f,null,r,s))):h?h!==e.memoizedState?(ri(i),nt(i),wp(i,h)):(nt(i),i.flags&=-16777217):(e=e.memoizedProps,e!==r&&ri(i),nt(i),Uu(i,f,e,r,s)),null;case 27:if(re(i),s=he.current,f=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==r&&ri(i);else{if(!r){if(i.stateNode===null)throw Error(l(166));return nt(i),null}e=F.current,Pa(i)?tm(i):(e=Eg(f,r,s),i.stateNode=e,ri(i))}return nt(i),null;case 5:if(re(i),f=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==r&&ri(i);else{if(!r){if(i.stateNode===null)throw Error(l(166));return nt(i),null}if(h=F.current,Pa(i))tm(i);else{var y=Qr(he.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[Lt]=i,h[tn]=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(It(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&&ri(i)}}return nt(i),Uu(i,i.type,e===null?null:e.memoizedProps,i.pendingProps,s),null;case 6:if(e&&i.stateNode!=null)e.memoizedProps!==r&&ri(i);else{if(typeof r!="string"&&i.stateNode===null)throw Error(l(166));if(e=he.current,Pa(i)){if(e=i.stateNode,s=i.memoizedProps,r=null,f=$t,f!==null)switch(f.tag){case 27:case 5:r=f.memoizedProps}e[Lt]=i,e=!!(e.nodeValue===s||r!==null&&r.suppressHydrationWarning===!0||vg(e.nodeValue,s)),e||zi(i,!0)}else e=Qr(e).createTextNode(r),e[Lt]=i,i.stateNode=e}return nt(i),null;case 31:if(s=i.memoizedState,e===null||e.memoizedState!==null){if(r=Pa(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[Lt]=i}else ua(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;nt(i),e=!1}else s=Pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return i.flags&256?(hn(i),i):(hn(i),null);if((i.flags&128)!==0)throw Error(l(558))}return nt(i),null;case 13:if(r=i.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Pa(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[Lt]=i}else ua(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;nt(i),f=!1}else f=Pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return i.flags&256?(hn(i),i):(hn(i),null)}return hn(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),Rr(i,i.updateQueue),nt(i),null);case 4:return ae(),e===null&&ld(i.stateNode.containerInfo),nt(i),null;case 10:return ii(i.type),nt(i),null;case 19:if(H(mt),r=i.memoizedState,r===null)return nt(i),null;if(f=(i.flags&128)!==0,h=r.rendering,h===null)if(f)hl(r,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=i.child;e!==null;){if(h=Sr(e),h!==null){for(i.flags|=128,hl(r,!1),e=h.updateQueue,i.updateQueue=e,Rr(i,e),i.subtreeFlags=0,e=s,s=i.child;s!==null;)Xh(s,e),s=s.sibling;return ne(mt,mt.current&1|2),$e&&ti(i,r.treeForkCount),i.child}e=e.sibling}r.tail!==null&&xt()>Br&&(i.flags|=128,f=!0,hl(r,!1),i.lanes=4194304)}else{if(!f)if(e=Sr(h),e!==null){if(i.flags|=128,f=!0,e=e.updateQueue,i.updateQueue=e,Rr(i,e),hl(r,!0),r.tail===null&&r.tailMode==="hidden"&&!h.alternate&&!$e)return nt(i),null}else 2*xt()-r.renderingStartTime>Br&&s!==536870912&&(i.flags|=128,f=!0,hl(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=xt(),e.sibling=null,s=mt.current,ne(mt,f?s&1|2:s&1),$e&&ti(i,r.treeForkCount),e):(nt(i),null);case 22:case 23:return hn(i),ru(),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&&(nt(i),i.subtreeFlags&6&&(i.flags|=8192)):nt(i),s=i.updateQueue,s!==null&&Rr(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&&H(ha),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),ii(wt),nt(i),null;case 25:return null;case 30:return null}throw Error(l(156,i.tag))}function gS(e,i){switch(Yc(i),i.tag){case 1:return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 3:return ii(wt),ae(),e=i.flags,(e&65536)!==0&&(e&128)===0?(i.flags=e&-65537|128,i):null;case 26:case 27:case 5:return re(i),null;case 31:if(i.memoizedState!==null){if(hn(i),i.alternate===null)throw Error(l(340));ua()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 13:if(hn(i),e=i.memoizedState,e!==null&&e.dehydrated!==null){if(i.alternate===null)throw Error(l(340));ua()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 19:return H(mt),null;case 4:return ae(),null;case 10:return ii(i.type),null;case 22:case 23:return hn(i),ru(),e!==null&&H(ha),e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 24:return ii(wt),null;case 25:return null;default:return null}}function jp(e,i){switch(Yc(i),i.tag){case 3:ii(wt),ae();break;case 26:case 27:case 5:re(i);break;case 4:ae();break;case 31:i.memoizedState!==null&&hn(i);break;case 13:hn(i);break;case 19:H(mt);break;case 10:ii(i.type);break;case 22:case 23:hn(i),ru(),e!==null&&H(ha);break;case 24:ii(wt)}}function ml(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(x){Ke(i,i.return,x)}}function Di(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,x=y.destroy;if(x!==void 0){y.destroy=void 0,f=i;var _=s,B=x;try{B()}catch(P){Ke(f,_,P)}}}r=r.next}while(r!==h)}}catch(P){Ke(i,i.return,P)}}function Np(e){var i=e.updateQueue;if(i!==null){var s=e.stateNode;try{mm(i,s)}catch(r){Ke(e,e.return,r)}}}function kp(e,i,s){s.props=va(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(r){Ke(e,i,r)}}function pl(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){Ke(e,i,f)}}function Vn(e,i){var s=e.ref,r=e.refCleanup;if(s!==null)if(typeof r=="function")try{r()}catch(f){Ke(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){Ke(e,i,f)}else s.current=null}function zp(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){Ke(e,e.return,f)}}function Bu(e,i,s){try{var r=e.stateNode;US(r,e.type,s,i),r[tn]=i}catch(f){Ke(e,e.return,f)}}function _p(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ii(e.type)||e.tag===4}function Iu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_p(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&&Ii(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 Zu(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=Fn));else if(r!==4&&(r===27&&Ii(e.type)&&(s=e.stateNode,i=null),e=e.child,e!==null))for(Zu(e,i,s),e=e.sibling;e!==null;)Zu(e,i,s),e=e.sibling}function Mr(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&&Ii(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Mr(e,i,s),e=e.sibling;e!==null;)Mr(e,i,s),e=e.sibling}function Cp(e){var i=e.stateNode,s=e.memoizedProps;try{for(var r=e.type,f=i.attributes;f.length;)i.removeAttributeNode(f[0]);It(i,r,s),i[Lt]=e,i[tn]=s}catch(h){Ke(e,e.return,h)}}var oi=!1,kt=!1,qu=!1,Ep=typeof WeakSet=="function"?WeakSet:Set,Rt=null;function yS(e,i){if(e=e.containerInfo,cd=no,e=Zh(e),Mc(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,x=-1,_=-1,B=0,P=0,W=e,Z=null;t:for(;;){for(var Y;W!==s||f!==0&&W.nodeType!==3||(x=y+f),W!==h||r!==0&&W.nodeType!==3||(_=y+r),W.nodeType===3&&(y+=W.nodeValue.length),(Y=W.firstChild)!==null;)Z=W,W=Y;for(;;){if(W===e)break t;if(Z===s&&++B===f&&(x=y),Z===h&&++P===r&&(_=y),(Y=W.nextSibling)!==null)break;W=Z,Z=W.parentNode}W=Y}s=x===-1||_===-1?null:{start:x,end:_}}else s=null}s=s||{start:0,end:0}}else s=null;for(ud={focusedElem:e,selectionRange:s},no=!1,Rt=i;Rt!==null;)if(i=Rt,e=i.child,(i.subtreeFlags&1028)!==0&&e!==null)e.return=i,Rt=e;else for(;Rt!==null;){switch(i=Rt,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 me=va(s.type,f);e=r.getSnapshotBeforeUpdate(me,h),r.__reactInternalSnapshotBeforeUpdate=e}catch(je){Ke(s,s.return,je)}}break;case 3:if((e&1024)!==0){if(e=i.stateNode.containerInfo,s=e.nodeType,s===9)hd(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":hd(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,Rt=e;break}Rt=i.return}}function Ap(e,i,s){var r=s.flags;switch(s.tag){case 0:case 11:case 15:ui(e,s),r&4&&ml(5,s);break;case 1:if(ui(e,s),r&4)if(e=s.stateNode,i===null)try{e.componentDidMount()}catch(y){Ke(s,s.return,y)}else{var f=va(s.type,i.memoizedProps);i=i.memoizedState;try{e.componentDidUpdate(f,i,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Ke(s,s.return,y)}}r&64&&Np(s),r&512&&pl(s,s.return);break;case 3:if(ui(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{mm(e,i)}catch(y){Ke(s,s.return,y)}}break;case 27:i===null&&r&4&&Cp(s);case 26:case 5:ui(e,s),i===null&&r&4&&zp(s),r&512&&pl(s,s.return);break;case 12:ui(e,s);break;case 31:ui(e,s),r&4&&Dp(e,s);break;case 13:ui(e,s),r&4&&Rp(e,s),r&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=zS.bind(null,s),YS(e,s))));break;case 22:if(r=s.memoizedState!==null||oi,!r){i=i!==null&&i.memoizedState!==null||kt,f=oi;var h=kt;oi=r,(kt=i)&&!h?di(e,s,(s.subtreeFlags&8772)!==0):ui(e,s),oi=f,kt=h}break;case 30:break;default:ui(e,s)}}function Tp(e){var i=e.alternate;i!==null&&(e.alternate=null,Tp(i)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(i=e.stateNode,i!==null&&vc(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 st=null,an=!1;function ci(e,i,s){for(s=s.child;s!==null;)Op(e,i,s),s=s.sibling}function Op(e,i,s){if(Yt&&typeof Yt.onCommitFiberUnmount=="function")try{Yt.onCommitFiberUnmount(Si,s)}catch{}switch(s.tag){case 26:kt||Vn(s,i),ci(e,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:kt||Vn(s,i);var r=st,f=an;Ii(s.type)&&(st=s.stateNode,an=!1),ci(e,i,s),Nl(s.stateNode),st=r,an=f;break;case 5:kt||Vn(s,i);case 6:if(r=st,f=an,st=null,ci(e,i,s),st=r,an=f,st!==null)if(an)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(s.stateNode)}catch(h){Ke(s,i,h)}else try{st.removeChild(s.stateNode)}catch(h){Ke(s,i,h)}break;case 18:st!==null&&(an?(e=st,Ng(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),ps(e)):Ng(st,s.stateNode));break;case 4:r=st,f=an,st=s.stateNode.containerInfo,an=!0,ci(e,i,s),st=r,an=f;break;case 0:case 11:case 14:case 15:Di(2,s,i),kt||Di(4,s,i),ci(e,i,s);break;case 1:kt||(Vn(s,i),r=s.stateNode,typeof r.componentWillUnmount=="function"&&kp(s,i,r)),ci(e,i,s);break;case 21:ci(e,i,s);break;case 22:kt=(r=kt)||s.memoizedState!==null,ci(e,i,s),kt=r;break;default:ci(e,i,s)}}function Dp(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ps(e)}catch(s){Ke(i,i.return,s)}}}function Rp(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ps(e)}catch(s){Ke(i,i.return,s)}}function vS(e){switch(e.tag){case 31:case 13:case 19:var i=e.stateNode;return i===null&&(i=e.stateNode=new Ep),i;case 22:return e=e.stateNode,i=e._retryCache,i===null&&(i=e._retryCache=new Ep),i;default:throw Error(l(435,e.tag))}}function Lr(e,i){var s=vS(e);i.forEach(function(r){if(!s.has(r)){s.add(r);var f=_S.bind(null,e,r);r.then(f,f)}})}function sn(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,x=y;e:for(;x!==null;){switch(x.tag){case 27:if(Ii(x.type)){st=x.stateNode,an=!1;break e}break;case 5:st=x.stateNode,an=!1;break e;case 3:case 4:st=x.stateNode.containerInfo,an=!0;break e}x=x.return}if(st===null)throw Error(l(160));Op(h,y,f),st=null,an=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Mp(i,e),i=i.sibling}var Mn=null;function Mp(e,i){var s=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:sn(i,e),ln(e),r&4&&(Di(3,e,e.return),ml(3,e),Di(5,e,e.return));break;case 1:sn(i,e),ln(e),r&512&&(kt||s===null||Vn(s,s.return)),r&64&&oi&&(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=Mn;if(sn(i,e),ln(e),r&512&&(kt||s===null||Vn(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[qs]||h[Lt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(r),f.head.insertBefore(h,f.querySelector("head > title"))),It(h,r,s),h[Lt]=e,Dt(h),r=h;break e;case"link":var y=Mg("link","href",f).get(r+(s.href||""));if(y){for(var x=0;x<y.length;x++)if(h=y[x],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(x,1);break t}}h=f.createElement(r),It(h,r,s),f.head.appendChild(h);break;case"meta":if(y=Mg("meta","content",f).get(r+(s.content||""))){for(x=0;x<y.length;x++)if(h=y[x],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(x,1);break t}}h=f.createElement(r),It(h,r,s),f.head.appendChild(h);break;default:throw Error(l(468,r))}h[Lt]=e,Dt(h),r=h}e.stateNode=r}else Lg(f,e.type,e.stateNode);else e.stateNode=Rg(f,r,e.memoizedProps);else h!==r?(h===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):h.count--,r===null?Lg(f,e.type,e.stateNode):Rg(f,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Bu(e,e.memoizedProps,s.memoizedProps)}break;case 27:sn(i,e),ln(e),r&512&&(kt||s===null||Vn(s,s.return)),s!==null&&r&4&&Bu(e,e.memoizedProps,s.memoizedProps);break;case 5:if(sn(i,e),ln(e),r&512&&(kt||s===null||Vn(s,s.return)),e.flags&32){f=e.stateNode;try{Ua(f,"")}catch(me){Ke(e,e.return,me)}}r&4&&e.stateNode!=null&&(f=e.memoizedProps,Bu(e,f,s!==null?s.memoizedProps:f)),r&1024&&(qu=!0);break;case 6:if(sn(i,e),ln(e),r&4){if(e.stateNode===null)throw Error(l(162));r=e.memoizedProps,s=e.stateNode;try{s.nodeValue=r}catch(me){Ke(e,e.return,me)}}break;case 3:if(Fr=null,f=Mn,Mn=Xr(i.containerInfo),sn(i,e),Mn=f,ln(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{ps(i.containerInfo)}catch(me){Ke(e,e.return,me)}qu&&(qu=!1,Lp(e));break;case 4:r=Mn,Mn=Xr(e.stateNode.containerInfo),sn(i,e),ln(e),Mn=r;break;case 12:sn(i,e),ln(e);break;case 31:sn(i,e),ln(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Lr(e,r)));break;case 13:sn(i,e),ln(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Ur=xt()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Lr(e,r)));break;case 22:f=e.memoizedState!==null;var _=s!==null&&s.memoizedState!==null,B=oi,P=kt;if(oi=B||f,kt=P||_,sn(i,e),kt=P,oi=B,ln(e),r&8192)e:for(i=e.stateNode,i._visibility=f?i._visibility&-2:i._visibility|1,f&&(s===null||_||oi||kt||ba(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{x=_.stateNode;var W=_.memoizedProps.style,Z=W!=null&&W.hasOwnProperty("display")?W.display:null;x.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(me){Ke(_,_.return,me)}}}else if(i.tag===6){if(s===null){_=i;try{_.stateNode.nodeValue=f?"":_.memoizedProps}catch(me){Ke(_,_.return,me)}}}else if(i.tag===18){if(s===null){_=i;try{var Y=_.stateNode;f?kg(Y,!0):kg(_.stateNode,!1)}catch(me){Ke(_,_.return,me)}}}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,Lr(e,s))));break;case 19:sn(i,e),ln(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Lr(e,r)));break;case 30:break;case 21:break;default:sn(i,e),ln(e)}}function ln(e){var i=e.flags;if(i&2){try{for(var s,r=e.return;r!==null;){if(_p(r)){s=r;break}r=r.return}if(s==null)throw Error(l(160));switch(s.tag){case 27:var f=s.stateNode,h=Iu(e);Mr(e,h,f);break;case 5:var y=s.stateNode;s.flags&32&&(Ua(y,""),s.flags&=-33);var x=Iu(e);Mr(e,x,y);break;case 3:case 4:var _=s.stateNode.containerInfo,B=Iu(e);Zu(e,B,_);break;default:throw Error(l(161))}}catch(P){Ke(e,e.return,P)}e.flags&=-3}i&4096&&(e.flags&=-4097)}function Lp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var i=e;Lp(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),e=e.sibling}}function ui(e,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Ap(e,i.alternate,i),i=i.sibling}function ba(e){for(e=e.child;e!==null;){var i=e;switch(i.tag){case 0:case 11:case 14:case 15:Di(4,i,i.return),ba(i);break;case 1:Vn(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&kp(i,i.return,s),ba(i);break;case 27:Nl(i.stateNode);case 26:case 5:Vn(i,i.return),ba(i);break;case 22:i.memoizedState===null&&ba(i);break;case 30:ba(i);break;default:ba(i)}e=e.sibling}}function di(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:di(f,h,s),ml(4,h);break;case 1:if(di(f,h,s),r=h,f=r.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(B){Ke(r,r.return,B)}if(r=h,f=r.updateQueue,f!==null){var x=r.stateNode;try{var _=f.shared.hiddenCallbacks;if(_!==null)for(f.shared.hiddenCallbacks=null,f=0;f<_.length;f++)hm(_[f],x)}catch(B){Ke(r,r.return,B)}}s&&y&64&&Np(h),pl(h,h.return);break;case 27:Cp(h);case 26:case 5:di(f,h,s),s&&r===null&&y&4&&zp(h),pl(h,h.return);break;case 12:di(f,h,s);break;case 31:di(f,h,s),s&&y&4&&Dp(f,h);break;case 13:di(f,h,s),s&&y&4&&Rp(f,h);break;case 22:h.memoizedState===null&&di(f,h,s),pl(h,h.return);break;case 30:break;default:di(f,h,s)}i=i.sibling}}function Hu(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&&tl(s))}function Gu(e,i){e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&tl(e))}function Ln(e,i,s,r){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)$p(e,i,s,r),i=i.sibling}function $p(e,i,s,r){var f=i.flags;switch(i.tag){case 0:case 11:case 15:Ln(e,i,s,r),f&2048&&ml(9,i);break;case 1:Ln(e,i,s,r);break;case 3:Ln(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&&tl(e)));break;case 12:if(f&2048){Ln(e,i,s,r),e=i.stateNode;try{var h=i.memoizedProps,y=h.id,x=h.onPostCommit;typeof x=="function"&&x(y,i.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(_){Ke(i,i.return,_)}}else Ln(e,i,s,r);break;case 31:Ln(e,i,s,r);break;case 13:Ln(e,i,s,r);break;case 23:break;case 22:h=i.stateNode,y=i.alternate,i.memoizedState!==null?h._visibility&2?Ln(e,i,s,r):gl(e,i):h._visibility&2?Ln(e,i,s,r):(h._visibility|=2,as(e,i,s,r,(i.subtreeFlags&10256)!==0||!1)),f&2048&&Hu(y,i);break;case 24:Ln(e,i,s,r),f&2048&&Gu(i.alternate,i);break;default:Ln(e,i,s,r)}}function as(e,i,s,r,f){for(f=f&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var h=e,y=i,x=s,_=r,B=y.flags;switch(y.tag){case 0:case 11:case 15:as(h,y,x,_,f),ml(8,y);break;case 23:break;case 22:var P=y.stateNode;y.memoizedState!==null?P._visibility&2?as(h,y,x,_,f):gl(h,y):(P._visibility|=2,as(h,y,x,_,f)),f&&B&2048&&Hu(y.alternate,y);break;case 24:as(h,y,x,_,f),f&&B&2048&&Gu(y.alternate,y);break;default:as(h,y,x,_,f)}i=i.sibling}}function gl(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:gl(s,r),f&2048&&Hu(r.alternate,r);break;case 24:gl(s,r),f&2048&&Gu(r.alternate,r);break;default:gl(s,r)}i=i.sibling}}var yl=8192;function ss(e,i,s){if(e.subtreeFlags&yl)for(e=e.child;e!==null;)Up(e,i,s),e=e.sibling}function Up(e,i,s){switch(e.tag){case 26:ss(e,i,s),e.flags&yl&&e.memoizedState!==null&&aw(s,Mn,e.memoizedState,e.memoizedProps);break;case 5:ss(e,i,s);break;case 3:case 4:var r=Mn;Mn=Xr(e.stateNode.containerInfo),ss(e,i,s),Mn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=yl,yl=16777216,ss(e,i,s),yl=r):ss(e,i,s));break;default:ss(e,i,s)}}function Bp(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 vl(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];Rt=r,Zp(r,e)}Bp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ip(e),e=e.sibling}function Ip(e){switch(e.tag){case 0:case 11:case 15:vl(e),e.flags&2048&&Di(9,e,e.return);break;case 3:vl(e);break;case 12:vl(e);break;case 22:var i=e.stateNode;e.memoizedState!==null&&i._visibility&2&&(e.return===null||e.return.tag!==13)?(i._visibility&=-3,$r(e)):vl(e);break;default:vl(e)}}function $r(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];Rt=r,Zp(r,e)}Bp(e)}for(e=e.child;e!==null;){switch(i=e,i.tag){case 0:case 11:case 15:Di(8,i,i.return),$r(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,$r(i));break;default:$r(i)}e=e.sibling}}function Zp(e,i){for(;Rt!==null;){var s=Rt;switch(s.tag){case 0:case 11:case 15:Di(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:tl(s.memoizedState.cache)}if(r=s.child,r!==null)r.return=s,Rt=r;else e:for(s=e;Rt!==null;){r=Rt;var f=r.sibling,h=r.return;if(Tp(r),r===s){Rt=null;break e}if(f!==null){f.return=h,Rt=f;break e}Rt=h}}}var bS={getCacheForType:function(e){var i=Ut(wt),s=i.data.get(e);return s===void 0&&(s=e(),i.data.set(e,s)),s},cacheSignal:function(){return Ut(wt).controller.signal}},xS=typeof WeakMap=="function"?WeakMap:Map,He=0,Fe=null,Oe=null,Me=0,Ge=0,mn=null,Ri=!1,ls=!1,Ku=!1,fi=0,ht=0,Mi=0,xa=0,Yu=0,pn=0,rs=0,bl=null,rn=null,Vu=!1,Ur=0,qp=0,Br=1/0,Ir=null,Li=null,At=0,$i=null,os=null,hi=0,Pu=0,Qu=null,Hp=null,xl=0,Xu=null;function gn(){return(He&2)!==0&&Me!==0?Me&-Me:I.T!==null?nd():sh()}function Gp(){if(pn===0)if((Me&536870912)===0||$e){var e=Pt;Pt<<=1,(Pt&3932160)===0&&(Pt=262144),pn=e}else pn=536870912;return e=fn.current,e!==null&&(e.flags|=32),pn}function on(e,i,s){(e===Fe&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)&&(cs(e,0),Ui(e,Me,pn,!1)),Zs(e,s),((He&2)===0||e!==Fe)&&(e===Fe&&((He&2)===0&&(xa|=s),ht===4&&Ui(e,Me,pn,!1)),Pn(e))}function Kp(e,i,s){if((He&6)!==0)throw Error(l(327));var r=!s&&(i&127)===0&&(i&e.expiredLanes)===0||Gn(e,i),f=r?jS(e,i):Fu(e,i,!0),h=r;do{if(f===0){ls&&!r&&Ui(e,i,0,!1);break}else{if(s=e.current.alternate,h&&!SS(s)){f=Fu(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 x=e;f=bl;var _=x.current.memoizedState.isDehydrated;if(_&&(cs(x,y).flags|=256),y=Fu(x,y,!1),y!==2){if(Ku&&!_){x.errorRecoveryDisabledLanes|=h,xa|=h,f=4;break e}h=rn,rn=f,h!==null&&(rn===null?rn=h:rn.push.apply(rn,h))}f=y}if(h=!1,f!==2)continue}}if(f===1){cs(e,0),Ui(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:Ui(r,i,pn,!Ri);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(l(329))}if((i&62914560)===i&&(f=Ur+300-xt(),10<f)){if(Ui(r,i,pn,!Ri),en(r,0,!0)!==0)break e;hi=i,r.timeoutHandle=wg(Yp.bind(null,r,s,rn,Ir,Vu,i,pn,xa,rs,Ri,h,"Throttled",-0,0),f);break e}Yp(r,s,rn,Ir,Vu,i,pn,xa,rs,Ri,h,null,-0,0)}}break}while(!0);Pn(e)}function Yp(e,i,s,r,f,h,y,x,_,B,P,W,Z,Y){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:Fn},Up(i,h,W);var me=(h&62914560)===h?Ur-xt():(h&4194048)===h?qp-xt():0;if(me=sw(W,me),me!==null){hi=h,e.cancelPendingCommit=me(eg.bind(null,e,i,h,s,r,f,y,x,_,P,W,null,Z,Y)),Ui(e,h,y,!B);return}}eg(e,i,h,s,r,f,y,x,_)}function SS(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(!un(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 Ui(e,i,s,r){i&=~Yu,i&=~xa,e.suspendedLanes|=i,e.pingedLanes&=~i,r&&(e.warmLanes|=i),r=e.expirationTimes;for(var f=i;0<f;){var h=31-Vt(f),y=1<<h;r[h]=-1,f&=~y}s!==0&&nh(e,s,i)}function Zr(){return(He&6)===0?(Sl(0),!1):!0}function Ju(){if(Oe!==null){if(Ge===0)var e=Oe.return;else e=Oe,ni=da=null,hu(e),Wa=null,il=0,e=Oe;for(;e!==null;)jp(e.alternate,e),e=e.return;Oe=null}}function cs(e,i){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,ZS(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),hi=0,Ju(),Fe=e,Oe=s=ei(e.current,null),Me=i,Ge=0,mn=null,Ri=!1,ls=Gn(e,i),Ku=!1,rs=pn=Yu=xa=Mi=ht=0,rn=bl=null,Vu=!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-Vt(r),h=1<<f;i|=e[f],r&=~h}return fi=i,or(),s}function Vp(e,i){Ce=null,I.H=dl,i===Fa||i===gr?(i=cm(),Ge=3):i===tu?(i=cm(),Ge=4):Ge=i===Eu?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,mn=i,Oe===null&&(ht=1,Ar(e,wn(i,e.current)))}function Pp(){var e=fn.current;return e===null?!0:(Me&4194048)===Me?zn===null:(Me&62914560)===Me||(Me&536870912)!==0?e===zn:!1}function Qp(){var e=I.H;return I.H=dl,e===null?dl:e}function Xp(){var e=I.A;return I.A=bS,e}function qr(){ht=4,Ri||(Me&4194048)!==Me&&fn.current!==null||(ls=!0),(Mi&134217727)===0&&(xa&134217727)===0||Fe===null||Ui(Fe,Me,pn,!1)}function Fu(e,i,s){var r=He;He|=2;var f=Qp(),h=Xp();(Fe!==e||Me!==i)&&(Ir=null,cs(e,i)),i=!1;var y=ht;e:do try{if(Ge!==0&&Oe!==null){var x=Oe,_=mn;switch(Ge){case 8:Ju(),y=6;break e;case 3:case 2:case 9:case 6:fn.current===null&&(i=!0);var B=Ge;if(Ge=0,mn=null,us(e,x,_,B),s&&ls){y=0;break e}break;default:B=Ge,Ge=0,mn=null,us(e,x,_,B)}}wS(),y=ht;break}catch(P){Vp(e,P)}while(!0);return i&&e.shellSuspendCounter++,ni=da=null,He=r,I.H=f,I.A=h,Oe===null&&(Fe=null,Me=0,or()),y}function wS(){for(;Oe!==null;)Jp(Oe)}function jS(e,i){var s=He;He|=2;var r=Qp(),f=Xp();Fe!==e||Me!==i?(Ir=null,Br=xt()+500,cs(e,i)):ls=Gn(e,i);e:do try{if(Ge!==0&&Oe!==null){i=Oe;var h=mn;t:switch(Ge){case 1:Ge=0,mn=null,us(e,i,h,1);break;case 2:case 9:if(rm(h)){Ge=0,mn=null,Fp(i);break}i=function(){Ge!==2&&Ge!==9||Fe!==e||(Ge=7),Pn(e)},h.then(i,i);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:rm(h)?(Ge=0,mn=null,Fp(i)):(Ge=0,mn=null,us(e,i,h,7));break;case 5:var y=null;switch(Oe.tag){case 26:y=Oe.memoizedState;case 5:case 27:var x=Oe;if(y?$g(y):x.stateNode.complete){Ge=0,mn=null;var _=x.sibling;if(_!==null)Oe=_;else{var B=x.return;B!==null?(Oe=B,Hr(B)):Oe=null}break t}}Ge=0,mn=null,us(e,i,h,5);break;case 6:Ge=0,mn=null,us(e,i,h,6);break;case 8:Ju(),ht=6;break e;default:throw Error(l(462))}}NS();break}catch(P){Vp(e,P)}while(!0);return ni=da=null,I.H=r,I.A=f,He=s,Oe!==null?0:(Fe=null,Me=0,or(),ht)}function NS(){for(;Oe!==null&&!xi();)Jp(Oe)}function Jp(e){var i=Sp(e.alternate,e,fi);e.memoizedProps=e.pendingProps,i===null?Hr(e):Oe=i}function Fp(e){var i=e,s=i.alternate;switch(i.tag){case 15:case 0:i=pp(s,i,i.pendingProps,i.type,void 0,Me);break;case 11:i=pp(s,i,i.pendingProps,i.type.render,i.ref,Me);break;case 5:hu(i);default:jp(s,i),i=Oe=Xh(i,fi),i=Sp(s,i,fi)}e.memoizedProps=e.pendingProps,i===null?Hr(e):Oe=i}function us(e,i,s,r){ni=da=null,hu(i),Wa=null,il=0;var f=i.return;try{if(fS(e,f,i,s,Me)){ht=1,Ar(e,wn(s,e.current)),Oe=null;return}}catch(h){if(f!==null)throw Oe=f,h;ht=1,Ar(e,wn(s,e.current)),Oe=null;return}i.flags&32768?($e||r===1?e=!0:ls||(Me&536870912)!==0?e=!1:(Ri=e=!0,(r===2||r===9||r===3||r===6)&&(r=fn.current,r!==null&&r.tag===13&&(r.flags|=16384))),Wp(i,e)):Hr(i)}function Hr(e){var i=e;do{if((i.flags&32768)!==0){Wp(i,Ri);return}e=i.return;var s=pS(i.alternate,i,fi);if(s!==null){Oe=s;return}if(i=i.sibling,i!==null){Oe=i;return}Oe=i=e}while(i!==null);ht===0&&(ht=5)}function Wp(e,i){do{var s=gS(e.alternate,e);if(s!==null){s.flags&=32767,Oe=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(e=e.sibling,e!==null)){Oe=e;return}Oe=e=s}while(e!==null);ht=6,Oe=null}function eg(e,i,s,r,f,h,y,x,_){e.cancelPendingCommit=null;do Gr();while(At!==0);if((He&6)!==0)throw Error(l(327));if(i!==null){if(i===e.current)throw Error(l(177));if(h=i.lanes|i.childLanes,h|=Ic,ix(e,s,h,y,x,_),e===Fe&&(Oe=Fe=null,Me=0),os=i,$i=e,hi=s,Pu=h,Qu=f,Hp=r,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,CS(St,function(){return sg(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||r){r=I.T,I.T=null,f=K.p,K.p=2,y=He,He|=4;try{yS(e,i,s)}finally{He=y,K.p=f,I.T=r}}At=1,tg(),ng(),ig()}}function tg(){if(At===1){At=0;var e=$i,i=os,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=I.T,I.T=null;var r=K.p;K.p=2;var f=He;He|=4;try{Mp(i,e);var h=ud,y=Zh(e.containerInfo),x=h.focusedElem,_=h.selectionRange;if(y!==x&&x&&x.ownerDocument&&Ih(x.ownerDocument.documentElement,x)){if(_!==null&&Mc(x)){var B=_.start,P=_.end;if(P===void 0&&(P=B),"selectionStart"in x)x.selectionStart=B,x.selectionEnd=Math.min(P,x.value.length);else{var W=x.ownerDocument||document,Z=W&&W.defaultView||window;if(Z.getSelection){var Y=Z.getSelection(),me=x.textContent.length,je=Math.min(_.start,me),Je=_.end===void 0?je:Math.min(_.end,me);!Y.extend&&je>Je&&(y=Je,Je=je,je=y);var L=Bh(x,je),T=Bh(x,Je);if(L&&T&&(Y.rangeCount!==1||Y.anchorNode!==L.node||Y.anchorOffset!==L.offset||Y.focusNode!==T.node||Y.focusOffset!==T.offset)){var U=W.createRange();U.setStart(L.node,L.offset),Y.removeAllRanges(),je>Je?(Y.addRange(U),Y.extend(T.node,T.offset)):(U.setEnd(T.node,T.offset),Y.addRange(U))}}}}for(W=[],Y=x;Y=Y.parentNode;)Y.nodeType===1&&W.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<W.length;x++){var X=W[x];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}no=!!cd,ud=cd=null}finally{He=f,K.p=r,I.T=s}}e.current=i,At=2}}function ng(){if(At===2){At=0;var e=$i,i=os,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=I.T,I.T=null;var r=K.p;K.p=2;var f=He;He|=4;try{Ap(e,i.alternate,i)}finally{He=f,K.p=r,I.T=s}}At=3}}function ig(){if(At===4||At===3){At=0,We();var e=$i,i=os,s=hi,r=Hp;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?At=5:(At=0,os=$i=null,ag(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Li=null),gc(s),i=i.stateNode,Yt&&typeof Yt.onCommitFiberRoot=="function")try{Yt.onCommitFiberRoot(Si,i,void 0,(i.current.flags&128)===128)}catch{}if(r!==null){i=I.T,f=K.p,K.p=2,I.T=null;try{for(var h=e.onRecoverableError,y=0;y<r.length;y++){var x=r[y];h(x.value,{componentStack:x.stack})}}finally{I.T=i,K.p=f}}(hi&3)!==0&&Gr(),Pn(e),f=e.pendingLanes,(s&261930)!==0&&(f&42)!==0?e===Xu?xl++:(xl=0,Xu=e):xl=0,Sl(0)}}function ag(e,i){(e.pooledCacheLanes&=i)===0&&(i=e.pooledCache,i!=null&&(e.pooledCache=null,tl(i)))}function Gr(){return tg(),ng(),ig(),sg()}function sg(){if(At!==5)return!1;var e=$i,i=Pu;Pu=0;var s=gc(hi),r=I.T,f=K.p;try{K.p=32>s?32:s,I.T=null,s=Qu,Qu=null;var h=$i,y=hi;if(At=0,os=$i=null,hi=0,(He&6)!==0)throw Error(l(331));var x=He;if(He|=4,Ip(h.current),$p(h,h.current,y,s),He=x,Sl(0,!1),Yt&&typeof Yt.onPostCommitFiberRoot=="function")try{Yt.onPostCommitFiberRoot(Si,h)}catch{}return!0}finally{K.p=f,I.T=r,ag(e,i)}}function lg(e,i,s){i=wn(s,i),i=Cu(e.stateNode,i,2),e=Ai(e,i,2),e!==null&&(Zs(e,2),Pn(e))}function Ke(e,i,s){if(e.tag===3)lg(e,e,s);else for(;i!==null;){if(i.tag===3){lg(i,e,s);break}else if(i.tag===1){var r=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Li===null||!Li.has(r))){e=wn(s,e),s=rp(2),r=Ai(i,s,2),r!==null&&(op(s,r,i,e),Zs(r,2),Pn(r));break}}i=i.return}}function Wu(e,i,s){var r=e.pingCache;if(r===null){r=e.pingCache=new xS;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)||(Ku=!0,f.add(s),e=kS.bind(null,e,i,s),i.then(e,e))}function kS(e,i,s){var r=e.pingCache;r!==null&&r.delete(i),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,Fe===e&&(Me&s)===s&&(ht===4||ht===3&&(Me&62914560)===Me&&300>xt()-Ur?(He&2)===0&&cs(e,0):Yu|=s,rs===Me&&(rs=0)),Pn(e)}function rg(e,i){i===0&&(i=Is()),e=oa(e,i),e!==null&&(Zs(e,i),Pn(e))}function zS(e){var i=e.memoizedState,s=0;i!==null&&(s=i.retryLane),rg(e,s)}function _S(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),rg(e,s)}function CS(e,i){return dt(e,i)}var Kr=null,ds=null,ed=!1,Yr=!1,td=!1,Bi=0;function Pn(e){e!==ds&&e.next===null&&(ds===null?Kr=ds=e:ds=ds.next=e),Yr=!0,ed||(ed=!0,AS())}function Sl(e,i){if(!td&&Yr){td=!0;do for(var s=!1,r=Kr;r!==null;){if(e!==0){var f=r.pendingLanes;if(f===0)var h=0;else{var y=r.suspendedLanes,x=r.pingedLanes;h=(1<<31-Vt(42|e)+1)-1,h&=f&~(y&~x),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(s=!0,dg(r,h))}else h=Me,h=en(r,r===Fe?h:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(h&3)===0||Gn(r,h)||(s=!0,dg(r,h));r=r.next}while(s);td=!1}}function ES(){og()}function og(){Yr=ed=!1;var e=0;Bi!==0&&IS()&&(e=Bi);for(var i=xt(),s=null,r=Kr;r!==null;){var f=r.next,h=cg(r,i);h===0?(r.next=null,s===null?Kr=f:s.next=f,f===null&&(ds=s)):(s=r,(e!==0||(h&3)!==0)&&(Yr=!0)),r=f}At!==0&&At!==5||Sl(e),Bi!==0&&(Bi=0)}function cg(e,i){for(var s=e.suspendedLanes,r=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var y=31-Vt(h),x=1<<y,_=f[y];_===-1?((x&s)===0||(x&r)!==0)&&(f[y]=Xl(x,i)):_<=i&&(e.expiredLanes|=x),h&=~x}if(i=Fe,s=Me,s=en(e,e===i?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,s===0||e===i&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ht(r),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||Gn(e,s)){if(i=s&-s,i===e.callbackPriority)return i;switch(r!==null&&Ht(r),gc(s)){case 2:case 8:s=Et;break;case 32:s=St;break;case 268435456:s=oe;break;default:s=St}return r=ug.bind(null,e),s=dt(s,r),e.callbackPriority=i,e.callbackNode=s,i}return r!==null&&r!==null&&Ht(r),e.callbackPriority=2,e.callbackNode=null,2}function ug(e,i){if(At!==0&&At!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(Gr()&&e.callbackNode!==s)return null;var r=Me;return r=en(e,e===Fe?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Kp(e,r,i),cg(e,xt()),e.callbackNode!=null&&e.callbackNode===s?ug.bind(null,e):null)}function dg(e,i){if(Gr())return null;Kp(e,i,!0)}function AS(){qS(function(){(He&6)!==0?dt(Ne,ES):og()})}function nd(){if(Bi===0){var e=Xa;e===0&&(e=ve,ve<<=1,(ve&261888)===0&&(ve=256)),Bi=e}return Bi}function fg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:er(""+e)}function hg(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 TS(e,i,s,r,f){if(i==="submit"&&s&&s.stateNode===f){var h=fg((f[tn]||null).action),y=r.submitter;y&&(i=(i=y[tn]||null)?fg(i.formAction):y.getAttribute("formAction"),i!==null&&(h=i,y=null));var x=new ar("action","action",null,r,f);e.push({event:x,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Bi!==0){var _=y?hg(f,y):new FormData(f);wu(s,{pending:!0,data:_,method:f.method,action:h},null,_)}}else typeof h=="function"&&(x.preventDefault(),_=y?hg(f,y):new FormData(f),wu(s,{pending:!0,data:_,method:f.method,action:h},h,_))},currentTarget:f}]})}}for(var id=0;id<Bc.length;id++){var ad=Bc[id],OS=ad.toLowerCase(),DS=ad[0].toUpperCase()+ad.slice(1);Rn(OS,"on"+DS)}Rn(Gh,"onAnimationEnd"),Rn(Kh,"onAnimationIteration"),Rn(Yh,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(Qx,"onTransitionRun"),Rn(Xx,"onTransitionStart"),Rn(Jx,"onTransitionCancel"),Rn(Vh,"onTransitionEnd"),La("onMouseEnter",["mouseout","mouseover"]),La("onMouseLeave",["mouseout","mouseover"]),La("onPointerEnter",["pointerout","pointerover"]),La("onPointerLeave",["pointerout","pointerover"]),aa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),aa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),aa("onBeforeInput",["compositionend","keypress","textInput","paste"]),aa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),aa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),aa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wl="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(" "),RS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wl));function mg(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 x=r[y],_=x.instance,B=x.currentTarget;if(x=x.listener,_!==h&&f.isPropagationStopped())break e;h=x,f.currentTarget=B;try{h(f)}catch(P){rr(P)}f.currentTarget=null,h=_}else for(y=0;y<r.length;y++){if(x=r[y],_=x.instance,B=x.currentTarget,x=x.listener,_!==h&&f.isPropagationStopped())break e;h=x,f.currentTarget=B;try{h(f)}catch(P){rr(P)}f.currentTarget=null,h=_}}}}function De(e,i){var s=i[yc];s===void 0&&(s=i[yc]=new Set);var r=e+"__bubble";s.has(r)||(pg(i,e,2,!1),s.add(r))}function sd(e,i,s){var r=0;i&&(r|=4),pg(s,e,r,i)}var Vr="_reactListening"+Math.random().toString(36).slice(2);function ld(e){if(!e[Vr]){e[Vr]=!0,oh.forEach(function(s){s!=="selectionchange"&&(RS.has(s)||sd(s,!1,e),sd(s,!0,e))});var i=e.nodeType===9?e:e.ownerDocument;i===null||i[Vr]||(i[Vr]=!0,sd("selectionchange",!1,i))}}function pg(e,i,s,r){switch(Gg(i)){case 2:var f=ow;break;case 8:f=cw;break;default:f=Sd}s=f.bind(null,i,s,e),f=void 0,!zc||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 rd(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 x=r.stateNode.containerInfo;if(x===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(;x!==null;){if(y=Da(x),y===null)return;if(_=y.tag,_===5||_===6||_===26||_===27){r=h=y;continue e}x=x.parentNode}}r=r.return}xh(function(){var B=h,P=Nc(s),W=[];e:{var Z=Ph.get(e);if(Z!==void 0){var Y=ar,me=e;switch(e){case"keypress":if(nr(s)===0)break e;case"keydown":case"keyup":Y=_x;break;case"focusin":me="focus",Y=Ac;break;case"focusout":me="blur",Y=Ac;break;case"beforeblur":case"afterblur":Y=Ac;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":Y=jh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=px;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=Ax;break;case Gh:case Kh:case Yh:Y=vx;break;case Vh:Y=Ox;break;case"scroll":case"scrollend":Y=hx;break;case"wheel":Y=Rx;break;case"copy":case"cut":case"paste":Y=xx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=kh;break;case"toggle":case"beforetoggle":Y=Lx}var je=(i&4)!==0,Je=!je&&(e==="scroll"||e==="scrollend"),L=je?Z!==null?Z+"Capture":null:Z;je=[];for(var T=B,U;T!==null;){var X=T;if(U=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||U===null||L===null||(X=Gs(T,L),X!=null&&je.push(jl(T,X,U))),Je)break;T=T.return}0<je.length&&(Z=new Y(Z,me,null,s,P),W.push({event:Z,listeners:je}))}}if((i&7)===0){e:{if(Z=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",Z&&s!==jc&&(me=s.relatedTarget||s.fromElement)&&(Da(me)||me[Oa]))break e;if((Y||Z)&&(Z=P.window===P?P:(Z=P.ownerDocument)?Z.defaultView||Z.parentWindow:window,Y?(me=s.relatedTarget||s.toElement,Y=B,me=me?Da(me):null,me!==null&&(Je=u(me),je=me.tag,me!==Je||je!==5&&je!==27&&je!==6)&&(me=null)):(Y=null,me=B),Y!==me)){if(je=jh,X="onMouseLeave",L="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(je=kh,X="onPointerLeave",L="onPointerEnter",T="pointer"),Je=Y==null?Z:Hs(Y),U=me==null?Z:Hs(me),Z=new je(X,T+"leave",Y,s,P),Z.target=Je,Z.relatedTarget=U,X=null,Da(P)===B&&(je=new je(L,T+"enter",me,s,P),je.target=U,je.relatedTarget=Je,X=je),Je=X,Y&&me)t:{for(je=MS,L=Y,T=me,U=0,X=L;X;X=je(X))U++;X=0;for(var xe=T;xe;xe=je(xe))X++;for(;0<U-X;)L=je(L),U--;for(;0<X-U;)T=je(T),X--;for(;U--;){if(L===T||T!==null&&L===T.alternate){je=L;break t}L=je(L),T=je(T)}je=null}else je=null;Y!==null&&gg(W,Z,Y,je,!1),me!==null&&Je!==null&&gg(W,Je,me,je,!0)}}e:{if(Z=B?Hs(B):window,Y=Z.nodeName&&Z.nodeName.toLowerCase(),Y==="select"||Y==="input"&&Z.type==="file")var Ze=Dh;else if(Th(Z))if(Rh)Ze=Yx;else{Ze=Gx;var ye=Hx}else Y=Z.nodeName,!Y||Y.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?B&&wc(B.elementType)&&(Ze=Dh):Ze=Kx;if(Ze&&(Ze=Ze(e,B))){Oh(W,Ze,s,P);break e}ye&&ye(e,Z,B),e==="focusout"&&B&&Z.type==="number"&&B.memoizedProps.value!=null&&Sc(Z,"number",Z.value)}switch(ye=B?Hs(B):window,e){case"focusin":(Th(ye)||ye.contentEditable==="true")&&(qa=ye,Lc=B,Fs=null);break;case"focusout":Fs=Lc=qa=null;break;case"mousedown":$c=!0;break;case"contextmenu":case"mouseup":case"dragend":$c=!1,qh(W,s,P);break;case"selectionchange":if(Px)break;case"keydown":case"keyup":qh(W,s,P)}var Ee;if(Oc)e:{switch(e){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Za?Eh(e,s)&&(Le="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Le="onCompositionStart");Le&&(zh&&s.locale!=="ko"&&(Za||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Za&&(Ee=Sh()):(ji=P,_c="value"in ji?ji.value:ji.textContent,Za=!0)),ye=Pr(B,Le),0<ye.length&&(Le=new Nh(Le,e,null,s,P),W.push({event:Le,listeners:ye}),Ee?Le.data=Ee:(Ee=Ah(s),Ee!==null&&(Le.data=Ee)))),(Ee=Ux?Bx(e,s):Ix(e,s))&&(Le=Pr(B,"onBeforeInput"),0<Le.length&&(ye=new Nh("onBeforeInput","beforeinput",null,s,P),W.push({event:ye,listeners:Le}),ye.data=Ee)),TS(W,e,B,s,P)}mg(W,i)})}function jl(e,i,s){return{instance:e,listener:i,currentTarget:s}}function Pr(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=Gs(e,s),f!=null&&r.unshift(jl(e,f,h)),f=Gs(e,i),f!=null&&r.push(jl(e,f,h))),e.tag===3)return r;e=e.return}return[]}function MS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function gg(e,i,s,r,f){for(var h=i._reactName,y=[];s!==null&&s!==r;){var x=s,_=x.alternate,B=x.stateNode;if(x=x.tag,_!==null&&_===r)break;x!==5&&x!==26&&x!==27||B===null||(_=B,f?(B=Gs(s,h),B!=null&&y.unshift(jl(s,B,_))):f||(B=Gs(s,h),B!=null&&y.push(jl(s,B,_)))),s=s.return}y.length!==0&&e.push({event:i,listeners:y})}var LS=/\r\n?/g,$S=/\u0000|\uFFFD/g;function yg(e){return(typeof e=="string"?e:""+e).replace(LS,`
|
|
9
|
-
`).replace($S,"")}function vg(e,i){return i=yg(i),yg(e)===i}function Xe(e,i,s,r,f,h){switch(s){case"children":typeof r=="string"?i==="body"||i==="textarea"&&r===""||Ua(e,r):(typeof r=="number"||typeof r=="bigint")&&i!=="body"&&Ua(e,""+r);break;case"className":Fl(e,"class",r);break;case"tabIndex":Fl(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Fl(e,s,r);break;case"style":vh(e,r,h);break;case"data":if(i!=="object"){Fl(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=er(""+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"&&Xe(e,i,"name",f.name,f,null),Xe(e,i,"formEncType",f.formEncType,f,null),Xe(e,i,"formMethod",f.formMethod,f,null),Xe(e,i,"formTarget",f.formTarget,f,null)):(Xe(e,i,"encType",f.encType,f,null),Xe(e,i,"method",f.method,f,null),Xe(e,i,"target",f.target,f,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(s);break}r=er(""+r),e.setAttribute(s,r);break;case"onClick":r!=null&&(e.onclick=Fn);break;case"onScroll":r!=null&&De("scroll",e);break;case"onScrollEnd":r!=null&&De("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=er(""+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":De("beforetoggle",e),De("toggle",e),Jl(e,"popover",r);break;case"xlinkActuate":Jn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Jn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Jn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Jn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Jn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Jn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Jn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Jn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Jn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Jl(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=dx.get(s)||s,Jl(e,s,r))}}function od(e,i,s,r,f,h){switch(s){case"style":vh(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"?Ua(e,r):(typeof r=="number"||typeof r=="bigint")&&Ua(e,""+r);break;case"onScroll":r!=null&&De("scroll",e);break;case"onScrollEnd":r!=null&&De("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Fn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ch.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[tn]||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,""):Jl(e,s,r)}}}function It(e,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",e),De("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:Xe(e,i,h,y,s,null)}}f&&Xe(e,i,"srcSet",s.srcSet,s,null),r&&Xe(e,i,"src",s.src,s,null);return;case"input":De("invalid",e);var x=h=y=f=null,_=null,B=null;for(r in s)if(s.hasOwnProperty(r)){var P=s[r];if(P!=null)switch(r){case"name":f=P;break;case"type":y=P;break;case"checked":_=P;break;case"defaultChecked":B=P;break;case"value":h=P;break;case"defaultValue":x=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(l(137,i));break;default:Xe(e,i,r,P,s,null)}}mh(e,h,x,_,B,y,f,!1);return;case"select":De("invalid",e),r=y=h=null;for(f in s)if(s.hasOwnProperty(f)&&(x=s[f],x!=null))switch(f){case"value":h=x;break;case"defaultValue":y=x;break;case"multiple":r=x;default:Xe(e,i,f,x,s,null)}i=h,s=y,e.multiple=!!r,i!=null?$a(e,!!r,i,!1):s!=null&&$a(e,!!r,s,!0);return;case"textarea":De("invalid",e),h=f=r=null;for(y in s)if(s.hasOwnProperty(y)&&(x=s[y],x!=null))switch(y){case"value":r=x;break;case"defaultValue":f=x;break;case"children":h=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(l(91));break;default:Xe(e,i,y,x,s,null)}gh(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":Xe(e,i,_,r,s,null));return;case"dialog":De("beforetoggle",e),De("toggle",e),De("cancel",e),De("close",e);break;case"iframe":case"object":De("load",e);break;case"video":case"audio":for(r=0;r<wl.length;r++)De(wl[r],e);break;case"image":De("error",e),De("load",e);break;case"details":De("toggle",e);break;case"embed":case"source":case"link":De("error",e),De("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:Xe(e,i,B,r,s,null)}return;default:if(wc(i)){for(P in s)s.hasOwnProperty(P)&&(r=s[P],r!==void 0&&od(e,i,P,r,s,void 0));return}}for(x in s)s.hasOwnProperty(x)&&(r=s[x],r!=null&&Xe(e,i,x,r,s,null))}function US(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,x=null,_=null,B=null,P=null;for(Y in s){var W=s[Y];if(s.hasOwnProperty(Y)&&W!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":_=W;default:r.hasOwnProperty(Y)||Xe(e,i,Y,null,r,W)}}for(var Z in r){var Y=r[Z];if(W=s[Z],r.hasOwnProperty(Z)&&(Y!=null||W!=null))switch(Z){case"type":h=Y;break;case"name":f=Y;break;case"checked":B=Y;break;case"defaultChecked":P=Y;break;case"value":y=Y;break;case"defaultValue":x=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(l(137,i));break;default:Y!==W&&Xe(e,i,Z,Y,r,W)}}xc(e,y,x,_,B,P,h,f);return;case"select":Y=y=x=Z=null;for(h in s)if(_=s[h],s.hasOwnProperty(h)&&_!=null)switch(h){case"value":break;case"multiple":Y=_;default:r.hasOwnProperty(h)||Xe(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":x=h;break;case"multiple":y=h;default:h!==_&&Xe(e,i,f,h,r,_)}i=x,s=y,r=Y,Z!=null?$a(e,!!s,Z,!1):!!r!=!!s&&(i!=null?$a(e,!!s,i,!0):$a(e,!!s,s?[]:"",!1));return;case"textarea":Y=Z=null;for(x in s)if(f=s[x],s.hasOwnProperty(x)&&f!=null&&!r.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Xe(e,i,x,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":Y=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(l(91));break;default:f!==h&&Xe(e,i,y,f,r,h)}ph(e,Z,Y);return;case"option":for(var me in s)Z=s[me],s.hasOwnProperty(me)&&Z!=null&&!r.hasOwnProperty(me)&&(me==="selected"?e.selected=!1:Xe(e,i,me,null,r,Z));for(_ in r)Z=r[_],Y=s[_],r.hasOwnProperty(_)&&Z!==Y&&(Z!=null||Y!=null)&&(_==="selected"?e.selected=Z&&typeof Z!="function"&&typeof Z!="symbol":Xe(e,i,_,Z,r,Y));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 je in s)Z=s[je],s.hasOwnProperty(je)&&Z!=null&&!r.hasOwnProperty(je)&&Xe(e,i,je,null,r,Z);for(B in r)if(Z=r[B],Y=s[B],r.hasOwnProperty(B)&&Z!==Y&&(Z!=null||Y!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(l(137,i));break;default:Xe(e,i,B,Z,r,Y)}return;default:if(wc(i)){for(var Je in s)Z=s[Je],s.hasOwnProperty(Je)&&Z!==void 0&&!r.hasOwnProperty(Je)&&od(e,i,Je,void 0,r,Z);for(P in r)Z=r[P],Y=s[P],!r.hasOwnProperty(P)||Z===Y||Z===void 0&&Y===void 0||od(e,i,P,Z,r,Y);return}}for(var L in s)Z=s[L],s.hasOwnProperty(L)&&Z!=null&&!r.hasOwnProperty(L)&&Xe(e,i,L,null,r,Z);for(W in r)Z=r[W],Y=s[W],!r.hasOwnProperty(W)||Z===Y||Z==null&&Y==null||Xe(e,i,W,Z,r,Y)}function bg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function BS(){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,x=f.duration;if(h&&x&&bg(y)){for(y=0,x=f.responseEnd,r+=1;r<s.length;r++){var _=s[r],B=_.startTime;if(B>x)break;var P=_.transferSize,W=_.initiatorType;P&&bg(W)&&(_=_.responseEnd,y+=P*(_<x?1:(x-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 cd=null,ud=null;function Qr(e){return e.nodeType===9?e:e.ownerDocument}function xg(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 Sg(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 dd(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 fd=null;function IS(){var e=window.event;return e&&e.type==="popstate"?e===fd?!1:(fd=e,!0):(fd=null,!1)}var wg=typeof setTimeout=="function"?setTimeout:void 0,ZS=typeof clearTimeout=="function"?clearTimeout:void 0,jg=typeof Promise=="function"?Promise:void 0,qS=typeof queueMicrotask=="function"?queueMicrotask:typeof jg<"u"?function(e){return jg.resolve(null).then(e).catch(HS)}:wg;function HS(e){setTimeout(function(){throw e})}function Ii(e){return e==="head"}function Ng(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),ps(i);return}r--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")r++;else if(s==="html")Nl(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Nl(s);for(var h=s.firstChild;h;){var y=h.nextSibling,x=h.nodeName;h[qs]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&h.rel.toLowerCase()==="stylesheet"||s.removeChild(h),h=y}}else s==="body"&&Nl(e.ownerDocument.body);s=f}while(s);ps(i)}function kg(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 hd(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":hd(s),vc(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function GS(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[qs])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=_n(e.nextSibling),e===null)break}return null}function KS(e,i,s){if(i==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=_n(e.nextSibling),e===null))return null;return e}function zg(e,i){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=_n(e.nextSibling),e===null))return null;return e}function md(e){return e.data==="$?"||e.data==="$~"}function pd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function YS(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 _n(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 gd=null;function _g(e){e=e.nextSibling;for(var i=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(i===0)return _n(e.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}e=e.nextSibling}return null}function Cg(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 Eg(e,i,s){switch(i=Qr(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 Nl(e){for(var i=e.attributes;i.length;)e.removeAttributeNode(i[0]);vc(e)}var Cn=new Map,Ag=new Set;function Xr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var mi=K.d;K.d={f:VS,r:PS,D:QS,C:XS,L:JS,m:FS,X:ew,S:WS,M:tw};function VS(){var e=mi.f(),i=Zr();return e||i}function PS(e){var i=Ra(e);i!==null&&i.tag===5&&i.type==="form"?Vm(i):mi.r(e)}var fs=typeof document>"u"?null:document;function Tg(e,i,s){var r=fs;if(r&&typeof i=="string"&&i){var f=xn(i);f='link[rel="'+e+'"][href="'+f+'"]',typeof s=="string"&&(f+='[crossorigin="'+s+'"]'),Ag.has(f)||(Ag.add(f),e={rel:e,crossOrigin:s,href:i},r.querySelector(f)===null&&(i=r.createElement("link"),It(i,"link",e),Dt(i),r.head.appendChild(i)))}}function QS(e){mi.D(e),Tg("dns-prefetch",e,null)}function XS(e,i){mi.C(e,i),Tg("preconnect",e,i)}function JS(e,i,s){mi.L(e,i,s);var r=fs;if(r&&e&&i){var f='link[rel="preload"][as="'+xn(i)+'"]';i==="image"&&s&&s.imageSrcSet?(f+='[imagesrcset="'+xn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(f+='[imagesizes="'+xn(s.imageSizes)+'"]')):f+='[href="'+xn(e)+'"]';var h=f;switch(i){case"style":h=hs(e);break;case"script":h=ms(e)}Cn.has(h)||(e=v({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:e,as:i},s),Cn.set(h,e),r.querySelector(f)!==null||i==="style"&&r.querySelector(kl(h))||i==="script"&&r.querySelector(zl(h))||(i=r.createElement("link"),It(i,"link",e),Dt(i),r.head.appendChild(i)))}}function FS(e,i){mi.m(e,i);var s=fs;if(s&&e){var r=i&&typeof i.as=="string"?i.as:"script",f='link[rel="modulepreload"][as="'+xn(r)+'"][href="'+xn(e)+'"]',h=f;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=ms(e)}if(!Cn.has(h)&&(e=v({rel:"modulepreload",href:e},i),Cn.set(h,e),s.querySelector(f)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(zl(h)))return}r=s.createElement("link"),It(r,"link",e),Dt(r),s.head.appendChild(r)}}}function WS(e,i,s){mi.S(e,i,s);var r=fs;if(r&&e){var f=Ma(r).hoistableStyles,h=hs(e);i=i||"default";var y=f.get(h);if(!y){var x={loading:0,preload:null};if(y=r.querySelector(kl(h)))x.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":i},s),(s=Cn.get(h))&&yd(e,s);var _=y=r.createElement("link");Dt(_),It(_,"link",e),_._p=new Promise(function(B,P){_.onload=B,_.onerror=P}),_.addEventListener("load",function(){x.loading|=1}),_.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Jr(y,i,r)}y={type:"stylesheet",instance:y,count:1,state:x},f.set(h,y)}}}function ew(e,i){mi.X(e,i);var s=fs;if(s&&e){var r=Ma(s).hoistableScripts,f=ms(e),h=r.get(f);h||(h=s.querySelector(zl(f)),h||(e=v({src:e,async:!0},i),(i=Cn.get(f))&&vd(e,i),h=s.createElement("script"),Dt(h),It(h,"link",e),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(f,h))}}function tw(e,i){mi.M(e,i);var s=fs;if(s&&e){var r=Ma(s).hoistableScripts,f=ms(e),h=r.get(f);h||(h=s.querySelector(zl(f)),h||(e=v({src:e,async:!0,type:"module"},i),(i=Cn.get(f))&&vd(e,i),h=s.createElement("script"),Dt(h),It(h,"link",e),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(f,h))}}function Og(e,i,s,r){var f=(f=he.current)?Xr(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=hs(s.href),s=Ma(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=hs(s.href);var h=Ma(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(kl(e)))&&!h._p&&(y.instance=h,y.state.loading=5),Cn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Cn.set(e,s),h||nw(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=ms(s),s=Ma(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 hs(e){return'href="'+xn(e)+'"'}function kl(e){return'link[rel="stylesheet"]['+e+"]"}function Dg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function nw(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}),It(i,"link",s),Dt(i),e.head.appendChild(i))}function ms(e){return'[src="'+xn(e)+'"]'}function zl(e){return"script[async]"+e}function Rg(e,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var r=e.querySelector('style[data-href~="'+xn(s.href)+'"]');if(r)return i.instance=r,Dt(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"),Dt(r),It(r,"style",f),Jr(r,s.precedence,e),i.instance=r;case"stylesheet":f=hs(s.href);var h=e.querySelector(kl(f));if(h)return i.state.loading|=4,i.instance=h,Dt(h),h;r=Dg(s),(f=Cn.get(f))&&yd(r,f),h=(e.ownerDocument||e).createElement("link"),Dt(h);var y=h;return y._p=new Promise(function(x,_){y.onload=x,y.onerror=_}),It(h,"link",r),i.state.loading|=4,Jr(h,s.precedence,e),i.instance=h;case"script":return h=ms(s.src),(f=e.querySelector(zl(h)))?(i.instance=f,Dt(f),f):(r=s,(f=Cn.get(h))&&(r=v({},s),vd(r,f)),e=e.ownerDocument||e,f=e.createElement("script"),Dt(f),It(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,Jr(r,s.precedence,e));return i.instance}function Jr(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 x=r[y];if(x.dataset.precedence===i)h=x;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 yd(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.title==null&&(e.title=i.title)}function vd(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.integrity==null&&(e.integrity=i.integrity)}var Fr=null;function Mg(e,i,s){if(Fr===null){var r=new Map,f=Fr=new Map;f.set(s,r)}else f=Fr,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[qs]||h[Lt]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var y=h.getAttribute(i)||"";y=e+y;var x=r.get(y);x?x.push(h):r.set(y,[h])}}return r}function Lg(e,i,s){e=e.ownerDocument||e,e.head.insertBefore(s,i==="title"?e.querySelector("head > title"):null)}function iw(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 $g(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function aw(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=hs(r.href),h=i.querySelector(kl(f));if(h){i=h._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(e.count++,e=Wr.bind(e),i.then(e,e)),s.state.loading|=4,s.instance=h,Dt(h);return}h=i.ownerDocument||i,r=Dg(r),(f=Cn.get(f))&&yd(r,f),h=h.createElement("link"),Dt(h);var y=h;y._p=new Promise(function(x,_){y.onload=x,y.onerror=_}),It(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=Wr.bind(e),i.addEventListener("load",s),i.addEventListener("error",s))}}var bd=0;function sw(e,i){return e.stylesheets&&e.count===0&&to(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var r=setTimeout(function(){if(e.stylesheets&&to(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+i);0<e.imgBytes&&bd===0&&(bd=62500*BS());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&to(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>bd?50:800)+i);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(f)}}:null}function Wr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)to(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var eo=null;function to(e,i){e.stylesheets=null,e.unsuspend!==null&&(e.count++,eo=new Map,i.forEach(lw,e),eo=null,Wr.call(e))}function lw(e,i){if(!(i.state.loading&4)){var s=eo.get(e);if(s)var r=s.get(null);else{s=new Map,eo.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=Wr.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 _l={$$typeof:O,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function rw(e,i,s,r,f,h,y,x,_){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=Ta(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ta(0),this.hiddenUpdates=Ta(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 Ug(e,i,s,r,f,h,y,x,_,B,P,W){return e=new rw(e,i,s,y,_,B,P,W,x),i=1,h===!0&&(i|=24),h=dn(3,null,null,i),e.current=h,h.stateNode=e,i=Fc(),i.refCount++,e.pooledCache=i,i.refCount++,h.memoizedState={element:r,isDehydrated:s,cache:i},nu(h),e}function Bg(e){return e?(e=Ka,e):Ka}function Ig(e,i,s,r,f,h){f=Bg(f),r.context===null?r.context=f:r.pendingContext=f,r=Ei(i),r.payload={element:s},h=h===void 0?null:h,h!==null&&(r.callback=h),s=Ai(e,r,i),s!==null&&(on(s,e,i),sl(s,e,i))}function Zg(e,i){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<i?s:i}}function xd(e,i){Zg(e,i),(e=e.alternate)&&Zg(e,i)}function qg(e){if(e.tag===13||e.tag===31){var i=oa(e,67108864);i!==null&&on(i,e,67108864),xd(e,67108864)}}function Hg(e){if(e.tag===13||e.tag===31){var i=gn();i=pc(i);var s=oa(e,i);s!==null&&on(s,e,i),xd(e,i)}}var no=!0;function ow(e,i,s,r){var f=I.T;I.T=null;var h=K.p;try{K.p=2,Sd(e,i,s,r)}finally{K.p=h,I.T=f}}function cw(e,i,s,r){var f=I.T;I.T=null;var h=K.p;try{K.p=8,Sd(e,i,s,r)}finally{K.p=h,I.T=f}}function Sd(e,i,s,r){if(no){var f=wd(r);if(f===null)rd(e,i,r,io,s),Kg(e,r);else if(dw(f,e,i,s,r))r.stopPropagation();else if(Kg(e,r),i&4&&-1<uw.indexOf(e)){for(;f!==null;){var h=Ra(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var y=Qt(h.pendingLanes);if(y!==0){var x=h;for(x.pendingLanes|=2,x.entangledLanes|=2;y;){var _=1<<31-Vt(y);x.entanglements[1]|=_,y&=~_}Pn(h),(He&6)===0&&(Br=xt()+500,Sl(0))}}break;case 31:case 13:x=oa(h,2),x!==null&&on(x,h,2),Zr(),xd(h,2)}if(h=wd(r),h===null&&rd(e,i,r,io,s),h===f)break;f=h}f!==null&&r.stopPropagation()}else rd(e,i,r,null,s)}}function wd(e){return e=Nc(e),jd(e)}var io=null;function jd(e){if(io=null,e=Da(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 io=e,null}function Gg(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(ie()){case Ne:return 2;case Et:return 8;case St:case Kt:return 32;case oe:return 268435456;default:return 32}default:return 32}}var Nd=!1,Zi=null,qi=null,Hi=null,Cl=new Map,El=new Map,Gi=[],uw="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 Kg(e,i){switch(e){case"focusin":case"focusout":Zi=null;break;case"dragenter":case"dragleave":qi=null;break;case"mouseover":case"mouseout":Hi=null;break;case"pointerover":case"pointerout":Cl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":El.delete(i.pointerId)}}function Al(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=Ra(i),i!==null&&qg(i)),e):(e.eventSystemFlags|=r,i=e.targetContainers,f!==null&&i.indexOf(f)===-1&&i.push(f),e)}function dw(e,i,s,r,f){switch(i){case"focusin":return Zi=Al(Zi,e,i,s,r,f),!0;case"dragenter":return qi=Al(qi,e,i,s,r,f),!0;case"mouseover":return Hi=Al(Hi,e,i,s,r,f),!0;case"pointerover":var h=f.pointerId;return Cl.set(h,Al(Cl.get(h)||null,e,i,s,r,f)),!0;case"gotpointercapture":return h=f.pointerId,El.set(h,Al(El.get(h)||null,e,i,s,r,f)),!0}return!1}function Yg(e){var i=Da(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,lh(e.priority,function(){Hg(s)});return}}else if(i===31){if(i=m(s),i!==null){e.blockedOn=i,lh(e.priority,function(){Hg(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 ao(e){if(e.blockedOn!==null)return!1;for(var i=e.targetContainers;0<i.length;){var s=wd(e.nativeEvent);if(s===null){s=e.nativeEvent;var r=new s.constructor(s.type,s);jc=r,s.target.dispatchEvent(r),jc=null}else return i=Ra(s),i!==null&&qg(i),e.blockedOn=s,!1;i.shift()}return!0}function Vg(e,i,s){ao(e)&&s.delete(i)}function fw(){Nd=!1,Zi!==null&&ao(Zi)&&(Zi=null),qi!==null&&ao(qi)&&(qi=null),Hi!==null&&ao(Hi)&&(Hi=null),Cl.forEach(Vg),El.forEach(Vg)}function so(e,i){e.blockedOn===i&&(e.blockedOn=null,Nd||(Nd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,fw)))}var lo=null;function Pg(e){lo!==e&&(lo=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){lo===e&&(lo=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(jd(r||s)===null)continue;break}var h=Ra(s);h!==null&&(e.splice(i,3),i-=3,wu(h,{pending:!0,data:f,method:s.method,action:r},r,f))}}))}function ps(e){function i(_){return so(_,e)}Zi!==null&&so(Zi,e),qi!==null&&so(qi,e),Hi!==null&&so(Hi,e),Cl.forEach(i),El.forEach(i);for(var s=0;s<Gi.length;s++){var r=Gi[s];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Gi.length&&(s=Gi[0],s.blockedOn===null);)Yg(s),s.blockedOn===null&&Gi.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[tn]||null;if(typeof h=="function")y||Pg(s);else if(y){var x=null;if(h&&h.hasAttribute("formAction")){if(f=h,y=h[tn]||null)x=y.formAction;else if(jd(f)!==null)continue}else x=y.action;typeof x=="function"?s[r+1]=x:(s.splice(r,3),r-=3),Pg(s)}}}function Qg(){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 kd(e){this._internalRoot=e}ro.prototype.render=kd.prototype.render=function(e){var i=this._internalRoot;if(i===null)throw Error(l(409));var s=i.current,r=gn();Ig(s,r,e,i,null,null)},ro.prototype.unmount=kd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var i=e.containerInfo;Ig(e.current,2,null,e,null,null),Zr(),i[Oa]=null}};function ro(e){this._internalRoot=e}ro.prototype.unstable_scheduleHydration=function(e){if(e){var i=sh();e={blockedOn:null,target:e,priority:i};for(var s=0;s<Gi.length&&i!==0&&i<Gi[s].priority;s++);Gi.splice(s,0,e),s===0&&Yg(e)}};var Xg=n.version;if(Xg!=="19.2.4")throw Error(l(527,Xg,"19.2.4"));K.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 hw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var oo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oo.isDisabled&&oo.supportsFiber)try{Si=oo.inject(hw),Yt=oo}catch{}}return Ol.createRoot=function(e,i){if(!o(e))throw Error(l(299));var s=!1,r="",f=ip,h=ap,y=sp;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=Ug(e,1,!1,null,null,s,r,null,f,h,y,Qg),e[Oa]=i.current,ld(e),new kd(i)},Ol.hydrateRoot=function(e,i,s){if(!o(e))throw Error(l(299));var r=!1,f="",h=ip,y=ap,x=sp,_=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&&(x=s.onRecoverableError),s.formState!==void 0&&(_=s.formState)),i=Ug(e,1,!0,i,s??null,r,f,_,h,y,x,Qg),i.context=Bg(null),s=i.current,r=gn(),r=pc(r),f=Ei(r),f.callback=null,Ai(s,f,r),s=r,i.current.lanes=s,Zs(i,s),Pn(i),e[Oa]=i.current,ld(e),new ro(i)},Ol.version="19.2.4",Ol}var ly;function Nw(){if(ly)return Cd.exports;ly=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(),Cd.exports=jw(),Cd.exports}var kw=Nw();const yf=Symbol.for("yaml.alias"),Jd=Symbol.for("yaml.document"),Ji=Symbol.for("yaml.map"),b0=Symbol.for("yaml.pair"),Xn=Symbol.for("yaml.scalar"),Ms=Symbol.for("yaml.seq"),Tn=Symbol.for("yaml.node.type"),_a=t=>!!t&&typeof t=="object"&&t[Tn]===yf,Yo=t=>!!t&&typeof t=="object"&&t[Tn]===Jd,Kl=t=>!!t&&typeof t=="object"&&t[Tn]===Ji,vt=t=>!!t&&typeof t=="object"&&t[Tn]===b0,et=t=>!!t&&typeof t=="object"&&t[Tn]===Xn,Yl=t=>!!t&&typeof t=="object"&&t[Tn]===Ms;function gt(t){if(t&&typeof t=="object")switch(t[Tn]){case Ji:case Ms:return!0}return!1}function yt(t){if(t&&typeof t=="object")switch(t[Tn]){case yf:case Ji:case Xn:case Ms:return!0}return!1}const x0=t=>(et(t)||gt(t))&&!!t.anchor,wa=Symbol("break visit"),zw=Symbol("skip children"),$l=Symbol("remove node");function Ls(t,n){const a=_w(n);Yo(t)?Ss(null,t.contents,a,Object.freeze([t]))===$l&&(t.contents=null):Ss(null,t,a,Object.freeze([]))}Ls.BREAK=wa;Ls.SKIP=zw;Ls.REMOVE=$l;function Ss(t,n,a,l){const o=Cw(t,n,a,l);if(yt(o)||vt(o))return Ew(t,l,o),Ss(t,o,a,l);if(typeof o!="symbol"){if(gt(n)){l=Object.freeze(l.concat(n));for(let u=0;u<n.items.length;++u){const d=Ss(u,n.items[u],a,l);if(typeof d=="number")u=d-1;else{if(d===wa)return wa;d===$l&&(n.items.splice(u,1),u-=1)}}}else if(vt(n)){l=Object.freeze(l.concat(n));const u=Ss("key",n.key,a,l);if(u===wa)return wa;u===$l&&(n.key=null);const d=Ss("value",n.value,a,l);if(d===wa)return wa;d===$l&&(n.value=null)}}return o}function _w(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 Cw(t,n,a,l){if(typeof a=="function")return a(t,n,l);if(Kl(n))return a.Map?.(t,n,l);if(Yl(n))return a.Seq?.(t,n,l);if(vt(n))return a.Pair?.(t,n,l);if(et(n))return a.Scalar?.(t,n,l);if(_a(n))return a.Alias?.(t,n,l)}function Ew(t,n,a){const l=n[n.length-1];if(gt(l))l.items[t]=a;else if(vt(l))t==="key"?l.key=a:l.value=a;else if(Yo(l))l.contents=a;else{const o=_a(l)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}}const Aw={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Tw=t=>t.replace(/[!,[\]{}]/g,n=>Aw[n]);class Ft{constructor(n,a){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Ft.defaultYaml,n),this.tags=Object.assign({},Ft.defaultTags,a)}clone(){const n=new Ft(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){const n=new Ft(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Ft.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Ft.defaultTags);break}return n}add(n,a){this.atNextDocument&&(this.yaml={explicit:Ft.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Ft.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+Tw(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&&yt(n.contents)){const u={};Ls(n.contents,(d,m)=>{yt(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
|
-
`)}}Ft.defaultYaml={explicit:!1,version:"1.2"};Ft.defaultTags={"!!":"tag:yaml.org,2002:"};function S0(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 w0(t){const n=new Set;return Ls(t,{Value(a,l){l.anchor&&n.add(l.anchor)}}),n}function j0(t,n){for(let a=1;;++a){const l=`${t}${a}`;if(!n.has(l))return l}}function Ow(t,n){const a=[],l=new Map;let o=null;return{onAnchor:u=>{a.push(u),o??(o=w0(t));const d=j0(n,o);return o.add(d),d},setAnchors:()=>{for(const u of a){const d=l.get(u);if(typeof d=="object"&&d.anchor&&(et(d.node)||gt(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 ws(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=ws(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=ws(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=ws(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=ws(t,l,o,u);d===void 0?delete l[o]:d!==u&&(l[o]=d)}return t.call(n,a,l)}function An(t,n,a){if(Array.isArray(t))return t.map((l,o)=>An(l,String(o),a));if(t&&typeof t.toJSON=="function"){if(!a||!x0(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 vf{constructor(n){Object.defineProperty(this,Tn,{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(!Yo(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=An(this,"",d);if(typeof o=="function")for(const{count:g,res:p}of d.anchors.values())o(p,g);return typeof u=="function"?ws(u,{"":m},"",m):m}}class bf extends vf{constructor(n){super(yf),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=[],Ls(n,{Node:(u,d)=>{(_a(d)||x0(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||(An(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=Co(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(S0(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 Co(t,n,a){if(_a(n)){const l=n.resolve(t),o=a&&l&&a.get(l);return o?o.count*o.aliasCount:0}else if(gt(n)){let l=0;for(const o of n.items){const u=Co(t,o,a);u>l&&(l=u)}return l}else if(vt(n)){const l=Co(t,n.key,a),o=Co(t,n.value,a);return Math.max(l,o)}return 1}const N0=t=>!t||typeof t!="function"&&typeof t!="object";class _e extends vf{constructor(n){super(Xn),this.value=n}toJSON(n,a){return a?.keep?this.value:An(this.value,n,a)}toString(){return String(this.value)}}_e.BLOCK_FOLDED="BLOCK_FOLDED";_e.BLOCK_LITERAL="BLOCK_LITERAL";_e.PLAIN="PLAIN";_e.QUOTE_DOUBLE="QUOTE_DOUBLE";_e.QUOTE_SINGLE="QUOTE_SINGLE";const Dw="tag:yaml.org,2002:";function Rw(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 Bl(t,n,a){if(Yo(t)&&(t=t.contents),yt(t))return t;if(vt(t)){const v=a.schema[Ji].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 bf(g.anchor);g={anchor:null,node:null},m.set(t,g)}n?.startsWith("!!")&&(n=Dw+n.slice(2));let p=Rw(t,n,d.tags);if(!p){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const v=new _e(t);return g&&(g.node=v),v}p=t instanceof Map?d[Ji]:Symbol.iterator in Object(t)?d[Ms]:d[Ji]}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 _e(t);return n?b.tag=n:p.default||(b.tag=p.tag),g&&(g.node=b),b}function Do(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 Bl(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 Ml=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class k0 extends vf{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=>yt(l)||vt(l)?l.clone(n):l),this.range&&(a.range=this.range.slice()),a}addIn(n,a){if(Ml(n))this.add(a);else{const[l,...o]=n,u=this.get(l,!0);if(gt(u))u.addIn(o,a);else if(u===void 0&&this.schema)this.set(l,Do(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(gt(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&&et(u)?u.value:u:gt(u)?u.getIn(o,a):void 0}hasAllNullValues(n){return this.items.every(a=>{if(!vt(a))return!1;const l=a.value;return l==null||n&&et(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 gt(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(gt(u))u.setIn(o,a);else if(u===void 0&&this.schema)this.set(l,Do(this.schema,o,a));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${o}`)}}}const Mw=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function gi(t,n){return/^\n+$/.test(t)?t.substring(1):n?t.replace(/^(?! *$)/gm,n):t}const ja=(t,n,a)=>t.endsWith(`
|
|
11
|
-
`)?gi(a,n):a.includes(`
|
|
12
|
-
`)?`
|
|
13
|
-
`+gi(a,n):(t.endsWith(" ")?"":" ")+a,z0="flow",Fd="block",Eo="quoted";function Vo(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 S,N,z=!1,j=-1,k=-1,A=-1;a===Fd&&(j=ry(t,j,n.length),j!==-1&&(v=j+g));for(let O;O=t[j+=1];){if(a===Eo&&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===Fd&&(j=ry(t,j,n.length)),v=j+n.length+g,S=void 0;else{if(O===" "&&N&&N!==" "&&N!==`
|
|
15
|
-
`&&N!==" "){const D=t[j+1];D&&D!==" "&&D!==`
|
|
16
|
-
`&&D!==" "&&(S=j)}if(j>=v)if(S)p.push(S),v=S+g,S=void 0;else if(a===Eo){for(;N===" "||N===" ";)N=O,O=t[j+=1],z=!0;const D=j>A+1?j-2:k-1;if(b[D])return t;p.push(D),b[D]=!0,v=D+g,S=void 0}else z=!0}N=O}if(z&&m&&m(),p.length===0)return t;d&&d();let E=t.slice(0,p[0]);for(let O=0;O<p.length;++O){const D=p[O],M=p[O+1]||t.length;D===0?E=`
|
|
17
|
-
${n}${t.slice(0,M)}`:(a===Eo&&b[D]&&(E+=`${t[D]}\\`),E+=`
|
|
18
|
-
${n}${t.slice(D+1,M)}`)}return E}function ry(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 Po=(t,n)=>({indentAtStart:n?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Qo=t=>/^(%|---|\.\.\.)/m.test(t);function Lw(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 Ul(t,n){const a=JSON.stringify(t);if(n.options.doubleQuotedAsJSON)return a;const{implicitKey:l}=n,o=n.options.doubleQuotedMinMultiLineLength,u=n.indent||(Qo(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:Vo(d,u,Eo,Po(n,!1))}function Wd(t,n){if(n.options.singleQuote===!1||n.implicitKey&&t.includes(`
|
|
24
|
-
`)||/[ \t]\n|\n[ \t]/.test(t))return Ul(t,n);const a=n.indent||(Qo(t)?" ":""),l="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
25
|
-
${a}`)+"'";return n.implicitKey?l:Vo(l,a,z0,Po(n,!1))}function js(t,n){const{singleQuote:a}=n.options;let l;if(a===!1)l=Ul;else{const o=t.includes('"'),u=t.includes("'");o&&!u?l=Wd:u&&!o?l=Ul:l=a?Wd:Ul}return l(t,n)}let ef;try{ef=new RegExp(`(^|(?<!
|
|
26
|
-
))
|
|
27
|
-
+(?!
|
|
28
|
-
|$)`,"g")}catch{ef=/\n+(?!\n|$)/g}function Ao({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 js(a,l);const p=l.indent||(l.forceBlockIndent||Qo(a)?" ":""),b=d==="literal"?!0:d==="folded"||n===_e.BLOCK_FOLDED?!1:n===_e.BLOCK_LITERAL?!0:!Lw(a,g,p.length);if(!a)return b?`|
|
|
29
|
-
`:`>
|
|
30
|
-
`;let v,S;for(S=a.length;S>0;--S){const M=a[S-1];if(M!==`
|
|
31
|
-
`&&M!==" "&&M!==" ")break}let N=a.substring(S);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(ef,`$&${p}`));let j=!1,k,A=-1;for(k=0;k<a.length;++k){const M=a[k];if(M===" ")j=!0;else if(M===`
|
|
34
|
-
`)A=k;else break}let E=a.substring(0,A<k?A+1:k);E&&(a=a.substring(E.length),E=E.replace(/\n+/g,`$&${p}`));let D=(j?p?"2":"1":"")+v;if(t&&(D+=" "+m(t.replace(/ ?[\r\n]+/g," ")),o&&o()),!b){const M=a.replace(/\n+/g,`
|
|
35
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);let q=!1;const V=Po(l,!0);d!=="folded"&&n!==_e.BLOCK_FOLDED&&(V.onOverflow=()=>{q=!0});const R=Vo(`${E}${M}${N}`,p,Fd,V);if(!q)return`>${D}
|
|
36
|
-
${p}${R}`}return a=a.replace(/\n+/g,`$&${p}`),`|${D}
|
|
37
|
-
${p}${E}${a}${N}`}function $w(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 js(u,n);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return m||b||!u.includes(`
|
|
39
|
-
`)?js(u,n):Ao(t,n,a,l);if(!m&&!b&&o!==_e.PLAIN&&u.includes(`
|
|
40
|
-
`))return Ao(t,n,a,l);if(Qo(u)){if(g==="")return n.forceBlockIndent=!0,Ao(t,n,a,l);if(m&&g===p)return js(u,n)}const v=u.replace(/\n+/g,`$&
|
|
41
|
-
${g}`);if(d){const S=j=>j.default&&j.tag!=="tag:yaml.org,2002:str"&&j.test?.test(v),{compat:N,tags:z}=n.doc.schema;if(z.some(S)||N?.some(S))return js(u,n)}return m?v:Vo(v,g,z0,Po(n,!1))}function xf(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!==_e.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(d.value)&&(m=_e.QUOTE_DOUBLE);const g=b=>{switch(b){case _e.BLOCK_FOLDED:case _e.BLOCK_LITERAL:return o||u?js(d.value,n):Ao(d,n,a,l);case _e.QUOTE_DOUBLE:return Ul(d.value,n);case _e.QUOTE_SINGLE:return Wd(d.value,n);case _e.PLAIN:return $w(d,n,a,l);default:return null}};let p=g(m);if(p===null){const{defaultKeyType:b,defaultStringType:v}=n.options,S=o&&b||v;if(p=g(S),p===null)throw new Error(`Unsupported default string type ${S}`)}return p}function _0(t,n){const a=Object.assign({blockQuote:!0,commentString:Mw,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 Uw(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(et(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 Bw(t,n,{anchors:a,doc:l}){if(!l.directives)return"";const o=[],u=(et(t)||gt(t))&&t.anchor;u&&S0(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 Ts(t,n,a,l){if(vt(t))return t.toString(n,a,l);if(_a(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=yt(t)?t:n.doc.createNode(t,{onTagObj:g=>o=g});o??(o=Uw(n.doc.schema.tags,u));const d=Bw(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):et(u)?xf(u,n,a,l):u.toString(n,a,l);return d?et(u)||m[0]==="{"||m[0]==="["?`${d} ${m}`:`${d}
|
|
42
|
-
${n.indent}${m}`:m}function Iw({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 S=yt(t)&&t.comment||null;if(v){if(S)throw new Error("With simple keys, key nodes cannot have comments");if(gt(t)||!yt(t)&&typeof t=="object"){const V="With simple keys, collection cannot be used as a key value";throw new Error(V)}}let N=!v&&(!t||S&&n==null&&!a.inFlow||gt(t)||(et(t)?t.type===_e.BLOCK_FOLDED||t.type===_e.BLOCK_LITERAL:typeof t=="object"));a=Object.assign({},a,{allNullValues:!1,implicitKey:!N&&(v||!u),indent:m+g});let z=!1,j=!1,k=Ts(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}`,S&&!z?k+=ja(k,a.indent,p(S)):j&&o&&o(),k;z&&(S=null),N?(S&&(k+=ja(k,a.indent,p(S))),k=`? ${k}
|
|
43
|
-
${m}:`):(k=`${k}:`,S&&(k+=ja(k,a.indent,p(S))));let A,E,O;yt(n)?(A=!!n.spaceBefore,E=n.commentBefore,O=n.comment):(A=!1,E=null,O=null,n&&typeof n=="object"&&(n=d.createNode(n))),a.implicitKey=!1,!N&&!S&&et(n)&&(a.indentAtStart=k.length+1),j=!1,!b&&g.length>=2&&!a.inFlow&&!N&&Yl(n)&&!n.flow&&!n.tag&&!n.anchor&&(a.indent=a.indent.substring(2));let D=!1;const M=Ts(n,a,()=>D=!0,()=>j=!0);let q=" ";if(S||A||E){if(q=A?`
|
|
44
|
-
`:"",E){const V=p(E);q+=`
|
|
45
|
-
${gi(V,a.indent)}`}M===""&&!a.inFlow?q===`
|
|
46
|
-
`&&O&&(q=`
|
|
47
|
-
|
|
48
|
-
`):q+=`
|
|
49
|
-
${a.indent}`}else if(!N&>(n)){const V=M[0],R=M.indexOf(`
|
|
50
|
-
`),Q=R!==-1,Se=a.inFlow??n.flow??n.items.length===0;if(Q||!Se){let le=!1;if(Q&&(V==="&"||V==="!")){let ue=M.indexOf(" ");V==="&"&&ue!==-1&&ue<R&&M[ue+1]==="!"&&(ue=M.indexOf(" ",ue+1)),(ue===-1||R<ue)&&(le=!0)}le||(q=`
|
|
51
|
-
${a.indent}`)}}else(M===""||M[0]===`
|
|
52
|
-
`)&&(q="");return k+=q+M,a.inFlow?D&&l&&l():O&&!D?k+=ja(k,a.indent,p(O)):j&&o&&o(),k}function Zw(t,n){(t==="debug"||t==="warn")&&console.warn(n)}const co="<<",yi={identify:t=>t===co||typeof t=="symbol"&&t.description===co,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new _e(Symbol(co)),{addToJSMap:C0}),stringify:()=>co},qw=(t,n)=>(yi.identify(n)||et(n)&&(!n.type||n.type===_e.PLAIN)&&yi.identify(n.value))&&t?.doc.schema.tags.some(a=>a.tag===yi.tag&&a.default);function C0(t,n,a){if(a=t&&_a(a)?a.resolve(t.doc):a,Yl(a))for(const l of a.items)Od(t,n,l);else if(Array.isArray(a))for(const l of a)Od(t,n,l);else Od(t,n,a)}function Od(t,n,a){const l=t&&_a(a)?a.resolve(t.doc):a;if(!Kl(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 E0(t,n,{key:a,value:l}){if(yt(a)&&a.addToJSMap)a.addToJSMap(t,n,l);else if(qw(t,a))C0(t,n,l);else{const o=An(a,"",t);if(n instanceof Map)n.set(o,An(l,o,t));else if(n instanceof Set)n.add(o);else{const u=Hw(a,o,t),d=An(l,u,t);u in n?Object.defineProperty(n,u,{value:d,writable:!0,enumerable:!0,configurable:!0}):n[u]=d}}return n}function Hw(t,n,a){if(n===null)return"";if(typeof n!="object")return String(n);if(yt(t)&&a?.doc){const l=_0(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)+'..."'),Zw(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 Sf(t,n,a){const l=Bl(t,void 0,a),o=Bl(n,void 0,a);return new Wt(l,o)}class Wt{constructor(n,a=null){Object.defineProperty(this,Tn,{value:b0}),this.key=n,this.value=a}clone(n){let{key:a,value:l}=this;return yt(a)&&(a=a.clone(n)),yt(l)&&(l=l.clone(n)),new Wt(a,l)}toJSON(n,a){const l=a?.mapAsMap?new Map:{};return E0(a,l,this)}toString(n,a,l){return n?.doc?Iw(this,n,a,l):JSON.stringify(this)}}function A0(t,n,a){return(n.inFlow??t.flow?Kw:Gw)(t,n,a)}function Gw({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 S=[];for(let z=0;z<n.length;++z){const j=n[z];let k=null;if(yt(j))!v&&j.spaceBefore&&S.push(""),Ro(a,S,j.commentBefore,v),j.comment&&(k=j.comment);else if(vt(j)){const E=yt(j.key)?j.key:null;E&&(!v&&E.spaceBefore&&S.push(""),Ro(a,S,E.commentBefore,v))}v=!1;let A=Ts(j,b,()=>k=null,()=>v=!0);k&&(A+=ja(A,u,p(k))),v&&k&&(v=!1),S.push(l+A)}let N;if(S.length===0)N=o.start+o.end;else{N=S[0];for(let z=1;z<S.length;++z){const j=S[z];N+=j?`
|
|
53
|
-
${g}${j}`:`
|
|
54
|
-
`}}return t?(N+=`
|
|
55
|
-
`+gi(p(t),g),m&&m()):v&&d&&d(),N}function Kw({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(yt(j))j.spaceBefore&&v.push(""),Ro(n,v,j.commentBefore,!1),j.comment&&(k=j.comment);else if(vt(j)){const E=yt(j.key)?j.key:null;E&&(E.spaceBefore&&v.push(""),Ro(n,v,E.commentBefore,!1),E.comment&&(p=!0));const O=yt(j.value)?j.value:null;O?(O.comment&&(k=O.comment),O.commentBefore&&(p=!0)):j.value==null&&E?.comment&&(k=E.comment)}k&&(p=!0);let A=Ts(j,g,()=>k=null);z<t.length-1&&(A+=","),k&&(A+=ja(A,l,m(k))),!p&&(v.length>b||A.includes(`
|
|
56
|
-
`))&&(p=!0),v.push(A),b=v.length}const{start:S,end:N}=a;if(v.length===0)return S+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=S;for(const j of v)z+=j?`
|
|
57
|
-
${u}${o}${j}`:`
|
|
58
|
-
`;return`${z}
|
|
59
|
-
${o}${N}`}else return`${S}${d}${v.join(" ")}${d}${N}`}function Ro({indent:t,options:{commentString:n}},a,l,o){if(l&&o&&(l=l.replace(/^\n+/,"")),l){const u=gi(n(l),t);a.push(u.trimStart())}}function Na(t,n){const a=et(n)?n.value:n;for(const l of t)if(vt(l)&&(l.key===n||l.key===a||et(l.key)&&l.key.value===a))return l}class En extends k0{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(Ji,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(Sf(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;vt(n)?l=n:!n||typeof n!="object"||!("key"in n)?l=new Wt(n,n?.value):l=new Wt(n.key,n.value);const o=Na(this.items,l.key),u=this.schema?.sortMapEntries;if(o){if(!a)throw new Error(`Key ${l.key} already set`);et(o.value)&&N0(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=Na(this.items,n);return a?this.items.splice(this.items.indexOf(a),1).length>0:!1}get(n,a){const o=Na(this.items,n)?.value;return(!a&&et(o)?o.value:o)??void 0}has(n){return!!Na(this.items,n)}set(n,a){this.add(new Wt(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)E0(a,o,u);return o}toString(n,a,l){if(!n)return JSON.stringify(this);for(const o of this.items)if(!vt(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})),A0(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:l,onComment:a})}}const $s={collection:"map",default:!0,nodeClass:En,tag:"tag:yaml.org,2002:map",resolve(t,n){return Kl(t)||n("Expected a mapping for this tag"),t},createNode:(t,n,a)=>En.from(t,n,a)};class ka extends k0{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(Ms,n),this.items=[]}add(n){this.items.push(n)}delete(n){const a=uo(n);return typeof a!="number"?!1:this.items.splice(a,1).length>0}get(n,a){const l=uo(n);if(typeof l!="number")return;const o=this.items[l];return!a&&et(o)?o.value:o}has(n){const a=uo(n);return typeof a=="number"&&a<this.items.length}set(n,a){const l=uo(n);if(typeof l!="number")throw new Error(`Expected a valid index, not ${n}.`);const o=this.items[l];et(o)&&N0(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(An(u,String(o++),a));return l}toString(n,a,l){return n?A0(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(Bl(m,void 0,l))}}return u}}function uo(t){let n=et(t)?t.value:t;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}const Us={collection:"seq",default:!0,nodeClass:ka,tag:"tag:yaml.org,2002:seq",resolve(t,n){return Yl(t)||n("Expected a sequence for this tag"),t},createNode:(t,n,a)=>ka.from(t,n,a)},Xo={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),xf(t,n,a,l)}},Jo={identify:t=>t==null,createNode:()=>new _e(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new _e(null),stringify:({source:t},n)=>typeof t=="string"&&Jo.test.test(t)?t:n.options.nullStr},wf={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new _e(t[0]==="t"||t[0]==="T"),stringify({source:t,value:n},a){if(t&&wf.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 Bn({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 T0={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:Bn},O0={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():Bn(t)}},D0={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 _e(parseFloat(t)),a=t.indexOf(".");return a!==-1&&t[t.length-1]==="0"&&(n.minFractionDigits=t.length-a-1),n},stringify:Bn},Fo=t=>typeof t=="bigint"||Number.isInteger(t),jf=(t,n,a,{intAsBigInt:l})=>l?BigInt(t):parseInt(t.substring(n),a);function R0(t,n,a){const{value:l}=t;return Fo(l)&&l>=0?a+l.toString(n):Bn(t)}const M0={identify:t=>Fo(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,n,a)=>jf(t,2,8,a),stringify:t=>R0(t,8,"0o")},L0={identify:Fo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,n,a)=>jf(t,0,10,a),stringify:Bn},$0={identify:t=>Fo(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,n,a)=>jf(t,2,16,a),stringify:t=>R0(t,16,"0x")},Yw=[$s,Us,Xo,Jo,wf,M0,L0,$0,T0,O0,D0];function oy(t){return typeof t=="bigint"||Number.isInteger(t)}const fo=({value:t})=>JSON.stringify(t),Vw=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:fo},{identify:t=>t==null,createNode:()=>new _e(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:fo},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:fo},{identify:oy,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})=>oy(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:fo}],Pw={default:!0,tag:"",test:/^/,resolve(t,n){return n(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Qw=[$s,Us].concat(Vw,Pw),Nf={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=_e.BLOCK_LITERAL),n!==_e.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,S=0;v<p;++v,S+=g)b[v]=m.substr(S,g);m=b.join(n===_e.BLOCK_LITERAL?`
|
|
60
|
-
`:" ")}return xf({comment:t,type:n,value:m},l,o,u)}};function U0(t,n){if(Yl(t))for(let a=0;a<t.items.length;++a){let l=t.items[a];if(!vt(l)){if(Kl(l)){l.items.length>1&&n("Each pair must have its own sequence indicator");const o=l.items[0]||new Wt(new _e(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]=vt(l)?l:new Wt(l)}}else n("Expected a sequence for this tag");return t}function B0(t,n,a){const{replacer:l}=a,o=new ka(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(Sf(m,g,a))}return o}const kf={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:U0,createNode:B0};class zs extends ka{constructor(){super(),this.add=En.prototype.add.bind(this),this.delete=En.prototype.delete.bind(this),this.get=En.prototype.get.bind(this),this.has=En.prototype.has.bind(this),this.set=En.prototype.set.bind(this),this.tag=zs.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(vt(o)?(u=An(o.key,"",a),d=An(o.value,u,a)):u=An(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=B0(n,a,l),u=new this;return u.items=o.items,u}}zs.tag="tag:yaml.org,2002:omap";const zf={collection:"seq",identify:t=>t instanceof Map,nodeClass:zs,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,n){const a=U0(t,n),l=[];for(const{key:o}of a.items)et(o)&&(l.includes(o.value)?n(`Ordered maps must not include duplicate keys: ${o.value}`):l.push(o.value));return Object.assign(new zs,a)},createNode:(t,n,a)=>zs.from(t,n,a)};function I0({value:t,source:n},a){return n&&(t?Z0:q0).test.test(n)?n:t?a.options.trueStr:a.options.falseStr}const Z0={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 _e(!0),stringify:I0},q0={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 _e(!1),stringify:I0},Xw={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:Bn},Jw={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():Bn(t)}},Fw={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 _e(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:Bn},Vl=t=>typeof t=="bigint"||Number.isInteger(t);function Wo(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 _f(t,n,a){const{value:l}=t;if(Vl(l)){const o=l.toString(n);return l<0?"-"+a+o.substr(1):a+o}return Bn(t)}const Ww={identify:Vl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,n,a)=>Wo(t,2,2,a),stringify:t=>_f(t,2,"0b")},ej={identify:Vl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,n,a)=>Wo(t,1,8,a),stringify:t=>_f(t,8,"0")},tj={identify:Vl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,n,a)=>Wo(t,0,10,a),stringify:Bn},nj={identify:Vl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,n,a)=>Wo(t,2,16,a),stringify:t=>_f(t,16,"0x")};class _s extends En{constructor(n){super(n),this.tag=_s.tag}add(n){let a;vt(n)?a=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?a=new Wt(n.key,null):a=new Wt(n,null),Na(this.items,a.key)||this.items.push(a)}get(n,a){const l=Na(this.items,n);return!a&&vt(l)?et(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=Na(this.items,n);l&&!a?this.items.splice(this.items.indexOf(l),1):!l&&a&&this.items.push(new Wt(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(Sf(d,null,l));return u}}_s.tag="tag:yaml.org,2002:set";const Cf={collection:"map",identify:t=>t instanceof Set,nodeClass:_s,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,n,a)=>_s.from(t,n,a),resolve(t,n){if(Kl(t)){if(t.hasAllNullValues(!0))return Object.assign(new _s,t);n("Set items must all have null values")}else n("Expected a mapping for this tag");return t}};function Ef(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 H0(t){let{value:n}=t,a=d=>d;if(typeof n=="bigint")a=d=>BigInt(d);else if(isNaN(n)||!isFinite(n))return Bn(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 G0={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})=>Ef(t,a),stringify:H0},K0={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=>Ef(t,!1),stringify:H0},ec={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(ec.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=Ef(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$/,"")??""},cy=[$s,Us,Xo,Jo,Z0,q0,Ww,ej,tj,nj,Xw,Jw,Fw,Nf,yi,zf,kf,Cf,G0,K0,ec],uy=new Map([["core",Yw],["failsafe",[$s,Us,Xo]],["json",Qw],["yaml11",cy],["yaml-1.1",cy]]),dy={binary:Nf,bool:wf,float:D0,floatExp:O0,floatNaN:T0,floatTime:K0,int:L0,intHex:$0,intOct:M0,intTime:G0,map:$s,merge:yi,null:Jo,omap:zf,pairs:kf,seq:Us,set:Cf,timestamp:ec},ij={"tag:yaml.org,2002:binary":Nf,"tag:yaml.org,2002:merge":yi,"tag:yaml.org,2002:omap":zf,"tag:yaml.org,2002:pairs":kf,"tag:yaml.org,2002:set":Cf,"tag:yaml.org,2002:timestamp":ec};function Dd(t,n,a){const l=uy.get(n);if(l&&!t)return a&&!l.includes(yi)?l.concat(yi):l.slice();let o=l;if(!o)if(Array.isArray(t))o=[];else{const u=Array.from(uy.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(yi)),o.reduce((u,d)=>{const m=typeof d=="string"?dy[d]:d;if(!m){const g=JSON.stringify(d),p=Object.keys(dy).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 aj=(t,n)=>t.key<n.key?-1:t.key>n.key?1:0;class Af{constructor({compat:n,customTags:a,merge:l,resolveKnownTags:o,schema:u,sortMapEntries:d,toStringDefaults:m}){this.compat=Array.isArray(n)?Dd(n,"compat"):n?Dd(null,n):null,this.name=typeof u=="string"&&u||"core",this.knownTags=o?ij:{},this.tags=Dd(a,this.name,l),this.toStringOptions=m??null,Object.defineProperty(this,Ji,{value:$s}),Object.defineProperty(this,Xn,{value:Xo}),Object.defineProperty(this,Ms,{value:Us}),this.sortMapEntries=typeof d=="function"?d:d===!0?aj:null}clone(){const n=Object.create(Af.prototype,Object.getOwnPropertyDescriptors(this));return n.tags=this.tags.slice(),n}}function sj(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=_0(t,n),{commentString:u}=o.options;if(t.commentBefore){a.length!==1&&a.unshift("");const g=u(t.commentBefore);a.unshift(gi(g,""))}let d=!1,m=null;if(t.contents){if(yt(t.contents)){if(t.contents.spaceBefore&&l&&a.push(""),t.contents.commentBefore){const b=u(t.contents.commentBefore);a.push(gi(b,""))}o.forceBlockIndent=!!t.comment,m=t.contents.comment}const g=m?void 0:()=>d=!0;let p=Ts(t.contents,o,()=>m=null,g);m&&(p+=ja(p,"",u(m))),(p[0]==="|"||p[0]===">")&&a[a.length-1]==="---"?a[a.length-1]=`--- ${p}`:a.push(p)}else a.push(Ts(t.contents,o));if(t.directives?.docEnd)if(t.comment){const g=u(t.comment);g.includes(`
|
|
63
|
-
`)?(a.push("..."),a.push(gi(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(gi(u(g),"")))}return a.join(`
|
|
64
|
-
`)+`
|
|
65
|
-
`}class tc{constructor(n,a,l){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Tn,{value:Jd});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 Ft({version:d}),this.setSchema(d,l),this.contents=n===void 0?null:this.createNode(n,o,l)}clone(){const n=Object.create(tc.prototype,{[Tn]:{value:Jd}});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=yt(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){gs(this.contents)&&this.contents.add(n)}addIn(n,a){gs(this.contents)&&this.contents.addIn(n,a)}createAlias(n,a){if(!n.anchor){const l=w0(this);n.anchor=!a||l.has(a)?j0(a||"a",l):a}return new bf(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=E=>typeof E=="number"||E instanceof String||E 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:S,sourceObjects:N}=Ow(this,d||"a"),z={aliasDuplicateObjects:u??!0,keepUndefined:g??!1,onAnchor:v,onTagObj:p,replacer:o,schema:this.schema,sourceObjects:N},j=Bl(n,b,z);return m&>(j)&&(j.flow=!0),S(),j}createPair(n,a,l={}){const o=this.createNode(n,null,l),u=this.createNode(a,null,l);return new Wt(o,u)}delete(n){return gs(this.contents)?this.contents.delete(n):!1}deleteIn(n){return Ml(n)?this.contents==null?!1:(this.contents=null,!0):gs(this.contents)?this.contents.deleteIn(n):!1}get(n,a){return gt(this.contents)?this.contents.get(n,a):void 0}getIn(n,a){return Ml(n)?!a&&et(this.contents)?this.contents.value:this.contents:gt(this.contents)?this.contents.getIn(n,a):void 0}has(n){return gt(this.contents)?this.contents.has(n):!1}hasIn(n){return Ml(n)?this.contents!==void 0:gt(this.contents)?this.contents.hasIn(n):!1}set(n,a){this.contents==null?this.contents=Do(this.schema,[n],a):gs(this.contents)&&this.contents.set(n,a)}setIn(n,a){Ml(n)?this.contents=a:this.contents==null?this.contents=Do(this.schema,Array.from(n),a):gs(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 Ft({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 Ft({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 Af(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=An(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"?ws(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 sj(this,n)}}function gs(t){if(gt(t))return!0;throw new Error("Expected a YAML collection as document contents")}class Y0 extends Error{constructor(n,a,l,o){super(),this.name=n,this.code=l,this.message=o,this.pos=a}}class ho extends Y0{constructor(n,a,l){super("YAMLParseError",n,a,l)}}class lj extends Y0{constructor(n,a,l){super("YAMLWarning",n,a,l)}}const fy=(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 Os(t,{flow:n,indicator:a,next:l,offset:o,onError:u,parentIndent:d,startOnNewline:m}){let g=!1,p=m,b=m,v="",S="",N=!1,z=!1,j=null,k=null,A=null,E=null,O=null,D=null,M=null;for(const R of t)switch(z&&(R.type!=="space"&&R.type!=="newline"&&R.type!=="comma"&&u(R.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),z=!1),j&&(p&&R.type!=="comment"&&R.type!=="newline"&&u(j,"TAB_AS_INDENT","Tabs are not allowed as indentation"),j=null),R.type){case"space":!n&&(a!=="doc-start"||l?.type!=="flow-collection")&&R.source.includes(" ")&&(j=R),b=!0;break;case"comment":{b||u(R,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const Q=R.source.substring(1)||" ";v?v+=S+Q:v=Q,S="",p=!1;break}case"newline":p?v?v+=R.source:(!D||a!=="seq-item-ind")&&(g=!0):S+=R.source,p=!0,N=!0,(k||A)&&(E=R),b=!0;break;case"anchor":k&&u(R,"MULTIPLE_ANCHORS","A node can have at most one anchor"),R.source.endsWith(":")&&u(R.offset+R.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),k=R,M??(M=R.offset),p=!1,b=!1,z=!0;break;case"tag":{A&&u(R,"MULTIPLE_TAGS","A node can have at most one tag"),A=R,M??(M=R.offset),p=!1,b=!1,z=!0;break}case a:(k||A)&&u(R,"BAD_PROP_ORDER",`Anchors and tags must be after the ${R.source} indicator`),D&&u(R,"UNEXPECTED_TOKEN",`Unexpected ${R.source} in ${n??"collection"}`),D=R,p=a==="seq-item-ind"||a==="explicit-key-ind",b=!1;break;case"comma":if(n){O&&u(R,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),O=R,p=!1,b=!1;break}default:u(R,"UNEXPECTED_TOKEN",`Unexpected ${R.type} token`),p=!1,b=!1}const q=t[t.length-1],V=q?q.offset+q.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:D,spaceBefore:g,comment:v,hasNewline:N,anchor:k,tag:A,newlineAfterProp:E,end:V,start:M??V}}function Il(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(Il(n.key)||Il(n.value))return!0}return!1;default:return!0}}function tf(t,n,a){if(n?.type==="flow-collection"){const l=n.end[0];l.indent===t&&(l.source==="]"||l.source==="}")&&Il(n)&&a(l,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function V0(t,n,a){const{uniqueKeys:l}=t.options;if(l===!1)return!1;const o=typeof l=="function"?l:(u,d)=>u===d||et(u)&&et(d)&&u.value===d.value;return n.some(u=>o(u.key,a))}const hy="All mapping items must start at the same column";function rj({composeNode:t,composeEmptyNode:n},a,l,o,u){const d=u?.nodeClass??En,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:S,sep:N,value:z}=b,j=Os(v,{indicator:"explicit-key-ind",next:S??N?.[0],offset:g,onError:o,parentIndent:l.indent,startOnNewline:!0}),k=!j.found;if(k){if(S&&(S.type==="block-seq"?o(g,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in S&&S.indent!==l.indent&&o(g,"BAD_INDENT",hy)),!j.anchor&&!j.tag&&!N){p=j.end,j.comment&&(m.comment?m.comment+=`
|
|
72
|
-
`+j.comment:m.comment=j.comment);continue}(j.newlineAfterProp||Il(S))&&o(S??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",hy);a.atKey=!0;const A=j.end,E=S?t(a,S,j,o):n(a,A,v,null,j,o);a.schema.compat&&tf(l.indent,S,o),a.atKey=!1,V0(a,m.items,E)&&o(A,"DUPLICATE_KEY","Map keys must be unique");const O=Os(N??[],{indicator:"map-value-ind",next:z,offset:E.range[2],onError:o,parentIndent:l.indent,startOnNewline:!S||S.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(E.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const D=z?t(a,z,O,o):n(a,g,N,null,O,o);a.schema.compat&&tf(l.indent,z,o),g=D.range[2];const M=new Wt(E,D);a.options.keepSourceTokens&&(M.srcToken=b),m.items.push(M)}else{k&&o(E.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),O.comment&&(E.comment?E.comment+=`
|
|
73
|
-
`+O.comment:E.comment=O.comment);const D=new Wt(E);a.options.keepSourceTokens&&(D.srcToken=b),m.items.push(D)}}return p&&p<g&&o(p,"IMPOSSIBLE","Map comment with trailing content"),m.range=[l.offset,g,p??g],m}function oj({composeNode:t,composeEmptyNode:n},a,l,o,u){const d=u?.nodeClass??ka,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 S=Os(b,{indicator:"seq-item-ind",next:v,offset:g,onError:o,parentIndent:l.indent,startOnNewline:!0});if(!S.found)if(S.anchor||S.tag||v)v?.type==="block-seq"?o(S.end,"BAD_INDENT","All sequence items must start at the same column"):o(g,"MISSING_CHAR","Sequence item without - indicator");else{p=S.end,S.comment&&(m.comment=S.comment);continue}const N=v?t(a,v,S,o):n(a,S.end,b,null,S,o);a.schema.compat&&tf(l.indent,v,o),g=N.range[2],m.items.push(N)}return m.range=[l.offset,g,p??g],m}function Pl(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 Rd="Block collections are not allowed within flow collections",Md=t=>t&&(t.type==="block-map"||t.type==="block-seq");function cj({composeNode:t,composeEmptyNode:n},a,l,o,u){const d=l.start.source==="{",m=d?"flow map":"flow sequence",g=u?.nodeClass??(d?En:ka),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:E,key:O,sep:D,value:M}=A,q=Os(E,{flow:m,indicator:"explicit-key-ind",next:O??D?.[0],offset:v,onError:o,parentIndent:l.indent,startOnNewline:!1});if(!q.found){if(!q.anchor&&!q.tag&&!D&&!M){k===0&&q.comma?o(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`):k<l.items.length-1&&o(q.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${m}`),q.comment&&(p.comment?p.comment+=`
|
|
74
|
-
`+q.comment:p.comment=q.comment),v=q.end;continue}!d&&a.options.strict&&Il(O)&&o(O,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(k===0)q.comma&&o(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`);else if(q.comma||o(q.start,"MISSING_CHAR",`Missing , between ${m} items`),q.comment){let V="";e:for(const R of E)switch(R.type){case"comma":case"space":break;case"comment":V=R.source.substring(1);break e;default:break e}if(V){let R=p.items[p.items.length-1];vt(R)&&(R=R.value??R.key),R.comment?R.comment+=`
|
|
75
|
-
`+V:R.comment=V,q.comment=q.comment.substring(V.length+1)}}if(!d&&!D&&!q.found){const V=M?t(a,M,q,o):n(a,q.end,D,null,q,o);p.items.push(V),v=V.range[2],Md(M)&&o(V.range,"BLOCK_IN_FLOW",Rd)}else{a.atKey=!0;const V=q.end,R=O?t(a,O,q,o):n(a,V,E,null,q,o);Md(O)&&o(R.range,"BLOCK_IN_FLOW",Rd),a.atKey=!1;const Q=Os(D??[],{flow:m,indicator:"map-value-ind",next:M,offset:R.range[2],onError:o,parentIndent:l.indent,startOnNewline:!1});if(Q.found){if(!d&&!q.found&&a.options.strict){if(D)for(const ue of D){if(ue===Q.found)break;if(ue.type==="newline"){o(ue,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}q.start<Q.found.offset-1024&&o(Q.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else M&&("source"in M&&M.source?.[0]===":"?o(M,"MISSING_CHAR",`Missing space after : in ${m}`):o(Q.start,"MISSING_CHAR",`Missing , or : between ${m} items`));const Se=M?t(a,M,Q,o):Q.found?n(a,Q.end,D,null,Q,o):null;Se?Md(M)&&o(Se.range,"BLOCK_IN_FLOW",Rd):Q.comment&&(R.comment?R.comment+=`
|
|
76
|
-
`+Q.comment:R.comment=Q.comment);const le=new Wt(R,Se);if(a.options.keepSourceTokens&&(le.srcToken=A),d){const ue=p;V0(a,ue.items,R)&&o(V,"DUPLICATE_KEY","Map keys must be unique"),ue.items.push(le)}else{const ue=new En(a.schema);ue.flow=!0,ue.items.push(le);const Ae=(Se??R).range;ue.range=[R.range[0],Ae[1],Ae[2]],p.items.push(ue)}v=Se?Se.range[2]:Q.end}}const S=d?"}":"]",[N,...z]=l.end;let j=v;if(N?.source===S)j=N.offset+N.source.length;else{const k=m[0].toUpperCase()+m.substring(1),A=b?`${k} must end with a ${S}`:`${k} in block collection must be sufficiently indented and end with a ${S}`;o(v,b?"MISSING_CHAR":"BAD_INDENT",A),N&&N.source.length!==1&&z.unshift(N)}if(z.length>0){const k=Pl(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 Ld(t,n,a,l,o,u){const d=a.type==="block-map"?rj(t,n,a,l,u):a.type==="block-seq"?oj(t,n,a,l,u):cj(t,n,a,l,u),m=d.constructor;return o==="!"||o===m.tagName?(d.tag=m.tagName,d):(o&&(d.tag=o),d)}function uj(t,n,a,l,o){const u=l.tag,d=u?n.directives.tagName(u.source,S=>o(u,"TAG_RESOLVE_FAILED",S)):null;if(a.type==="block-seq"){const{anchor:S,newlineAfterProp:N}=l,z=S&&u?S.offset>u.offset?S:u:S??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===En.tagName&&m==="map"||d===ka.tagName&&m==="seq")return Ld(t,n,a,o,d);let g=n.schema.tags.find(S=>S.tag===d&&S.collection===m);if(!g){const S=n.schema.knownTags[d];if(S?.collection===m)n.schema.tags.push(Object.assign({},S,{default:!1})),g=S;else return S?o(u,"BAD_COLLECTION_TYPE",`${S.tag} used for ${m} collection, but expects ${S.collection??"scalar"}`,!0):o(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${d}`,!0),Ld(t,n,a,o,d)}const p=Ld(t,n,a,o,d,g),b=g.resolve?.(p,S=>o(u,"TAG_RESOLVE_FAILED",S),n.options)??p,v=yt(b)?b:new _e(b);return v.range=p.range,v.tag=d,g?.format&&(v.format=g.format),v}function dj(t,n,a){const l=n.offset,o=fj(n,t.options.strict,a);if(!o)return{value:"",type:null,comment:"",range:[l,l,l]};const u=o.mode===">"?_e.BLOCK_FOLDED:_e.BLOCK_LITERAL,d=n.source?hj(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="",S="",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 E=A[A.length-1]==="\r";if(E&&(A=A.slice(0,-1)),A&&k.length<g){const D=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;a(p-A.length-(E?2:1),"BAD_INDENT",D),k=""}u===_e.BLOCK_LITERAL?(v+=S+k.slice(g)+A,S=`
|
|
80
|
-
`):k.length>g||A[0]===" "?(S===" "?S=`
|
|
81
|
-
`:!N&&S===`
|
|
82
|
-
`&&(S=`
|
|
83
|
-
|
|
84
|
-
`),v+=S+k.slice(g)+A,S=`
|
|
85
|
-
`,N=!0):A===""?S===`
|
|
86
|
-
`?v+=`
|
|
87
|
-
`:S=`
|
|
88
|
-
`:(v+=S+A,S=" ",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 fj({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 S=1;S<o.length;++S){const N=o[S];if(!m&&(N==="-"||N==="+"))m=N;else{const z=Number(N);!d&&z?d=z:g===-1&&(g=t+S)}}g!==-1&&l(g,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let p=!1,b="",v=o.length;for(let S=1;S<n.length;++S){const N=n[S];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 hj(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 mj(t,n,a){const{offset:l,type:o,source:u,end:d}=t;let m,g;const p=(S,N,z)=>a(l+S,N,z);switch(o){case"scalar":m=_e.PLAIN,g=pj(u,p);break;case"single-quoted-scalar":m=_e.QUOTE_SINGLE,g=gj(u,p);break;case"double-quoted-scalar":m=_e.QUOTE_DOUBLE,g=yj(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=Pl(d,b,n,a);return{value:g,type:m,comment:v.comment,range:[l,b,v.offset]}}function pj(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}`),P0(t)}function gj(t,n){return(t[t.length-1]!=="'"||t.length===1)&&n(t.length,"MISSING_CHAR","Missing closing 'quote"),P0(t.slice(1,-1)).replace(/''/g,"'")}function P0(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 yj(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}=vj(t,l);a+=u,l=d}else if(o==="\\"){let u=t[++l];const d=bj[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+=xj(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 vj(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 bj={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
107
|
-
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function xj(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 Q0(t,n,a,l){const{value:o,type:u,comment:d,range:m}=n.type==="block-scalar"?dj(t,n,l):mj(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[Xn]:g?p=Sj(t.schema,o,g,a,l):n.type==="scalar"?p=wj(t,o,n,l):p=t.schema[Xn];let b;try{const v=p.resolve(o,S=>l(a??n,"TAG_RESOLVE_FAILED",S),t.options);b=et(v)?v:new _e(v)}catch(v){const S=v instanceof Error?v.message:String(v);l(a??n,"TAG_RESOLVE_FAILED",S),b=new _e(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 Sj(t,n,a,l,o){if(a==="!")return t[Xn];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[Xn])}function wj({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[Xn];if(a.compat){const m=a.compat.find(g=>g.default&&g.test?.test(l))??a[Xn];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 jj(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 Nj={composeNode:X0,composeEmptyNode:Tf};function X0(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=kj(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=Q0(t,n,g,l),m&&(p.anchor=m.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=uj(Nj,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=Tf(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&&(!et(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 Tf(t,n,a,l,{spaceBefore:o,comment:u,anchor:d,tag:m,end:g},p){const b={type:"scalar",offset:jj(n,a,l),indent:-1,source:""},v=Q0(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 kj({options:t},{offset:n,source:a,end:l},o){const u=new bf(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=Pl(l,d,t.strict,o);return u.range=[n,d,m.offset],m.comment&&(u.comment=m.comment),u}function zj(t,n,{offset:a,start:l,value:o,end:u},d){const m=Object.assign({_directives:n},t),g=new tc(void 0,m),p={atKey:!1,atRoot:!0,directives:g.directives,options:g.options,schema:g.schema},b=Os(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?X0(p,o,b,d):Tf(p,b.end,l,null,b,d);const v=g.contents.range[2],S=Pl(u,v,!1,d);return S.comment&&(g.comment=S.comment),g.range=[a,v,S.offset],g}function Dl(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 my(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 _j{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(a,l,o,u)=>{const d=Dl(a);u?this.warnings.push(new lj(d,l,o)):this.errors.push(new ho(d,l,o))},this.directives=new Ft({version:n.version||"1.2"}),this.options=n}decorate(n,a){const{comment:l,afterEmptyLine:o}=my(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(gt(u)&&!u.flow&&u.items.length>0){let d=u.items[0];vt(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:my(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=Dl(n);u[0]+=a,this.onError(u,"BAD_DIRECTIVE",l,o)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{const a=zj(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 ho(Dl(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 ho(Dl(n),"UNEXPECTED_TOKEN",l));break}this.doc.directives.docEnd=!0;const a=Pl(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 ho(Dl(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 tc(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 J0="\uFEFF",F0="",W0="",nf="";function Cj(t){switch(t){case J0:return"byte-order-mark";case F0:return"doc-mode";case W0:return"flow-error-end";case nf: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 $n(t){switch(t){case void 0:case" ":case`
|
|
117
|
-
`:case"\r":case" ":return!0;default:return!1}}const py=new Set("0123456789ABCDEFabcdef"),Ej=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),mo=new Set(",[]{}"),Aj=new Set(` ,[]{}
|
|
118
|
-
\r `),$d=t=>!t||Aj.has(t);class Tj{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==="...")&&$n(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]===J0&&(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 F0,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==="...")&&$n(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&&!$n(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===":")&&$n(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($d),"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("..."))&&$n(o[3]))&&!(l===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield W0,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($d),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const d=this.charAt(1);if(this.flowKey||$n(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=>$n(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 nf,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($n(u)||n&&mo.has(u))break;a=l}else if($n(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&&mo.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&&mo.has(o))break;a=l}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield nf,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($d))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const n=this.flowLevel>0,a=this.charAt(1);if($n(a)||n&&mo.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(;!$n(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(Ej.has(a))a=this.buffer[++n];else if(a==="%"&&py.has(this.buffer[n+1])&&py.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 Oj{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 Qi(t,n){for(let a=0;a<t.length;++a)if(t[a].type===n)return!0;return!1}function gy(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 ev(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 po(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 ys(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 yy(t){if(t.start.type==="flow-seq-start")for(const n of t.items)n.sep&&!n.value&&!Qi(n.start,"explicit-key-ind")&&!Qi(n.sep,"map-value-ind")&&(n.key&&(n.value=n.key),delete n.key,ev(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 Dj{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 Tj,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=Cj(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"&&yy(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&&gy(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":{gy(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=po(this.peek(2)),l=ys(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(Qi(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(ev(a.key)&&!Qi(a.sep,"newline")){const d=ys(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(Qi(a.start,"newline"))Object.assign(a,{key:null,sep:[this.sourceToken]});else{const d=ys(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]}):Qi(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&&!Qi(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||Qi(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=po(l),u=ys(o);yy(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=po(n),l=ys(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=po(n),l=ys(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 Rj(t){const n=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||n&&new Oj||null,prettyErrors:n}}function Mj(t,n={}){const{lineCounter:a,prettyErrors:l}=Rj(n),o=new Dj(a?.addNewLine),u=new _j(n),d=Array.from(u.compose(o.parse(t)));if(l&&a)for(const m of d)m.errors.forEach(fy(t,a)),m.warnings.forEach(fy(t,a));return d.length>0?d:Object.assign([],{empty:!0},u.streamInfo())}function Fi(t,n,{checkForDefaultPrevented:a=!0}={}){return function(o){if(t?.(o),a===!1||!o.defaultPrevented)return n?.(o)}}function vy(t,n){if(typeof t=="function")return t(n);t!=null&&(t.current=n)}function Of(...t){return n=>{let a=!1;const l=t.map(o=>{const u=vy(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():vy(t[o],null)}}}}function Ca(...t){return w.useCallback(Of(...t),t)}function Lj(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 $j(t,n=[]){let a=[];function l(u,d){const m=w.createContext(d),g=a.length;a=[...a,d];const p=v=>{const{scope:S,children:N,...z}=v,j=S?.[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,S){const N=S?.[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,Uj(o,...n)]}function Uj(...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 Zl=globalThis?.document?w.useLayoutEffect:()=>{},Bj=gf[" useId ".trim().toString()]||(()=>{}),Ij=0;function Ud(t){const[n,a]=w.useState(Bj());return Zl(()=>{a(l=>l??String(Ij++))},[t]),t||(n?`radix-${n}`:"")}var Zj=gf[" useInsertionEffect ".trim().toString()]||Zl;function qj({prop:t,defaultProp:n,onChange:a=()=>{},caller:l}){const[o,u,d]=Hj({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=Gj(b)?b(t):b;v!==t&&d.current?.(v)}else u(b)},[m,t,u,d]);return[g,p]}function Hj({defaultProp:t,onChange:n}){const[a,l]=w.useState(t),o=w.useRef(a),u=w.useRef(n);return Zj(()=>{u.current=n},[n]),w.useEffect(()=>{o.current!==a&&(u.current?.(a),o.current=a)},[a,o]),[a,l,u]}function Gj(t){return typeof t=="function"}var tv=v0();const Kj=y0(tv);function nv(t){const n=Yj(t),a=w.forwardRef((l,o)=>{const{children:u,...d}=l,m=w.Children.toArray(u),g=m.find(Pj);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 Yj(t){const n=w.forwardRef((a,l)=>{const{children:o,...u}=a;if(w.isValidElement(o)){const d=Xj(o),m=Qj(u,o.props);return o.type!==w.Fragment&&(m.ref=l?Of(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 Vj=Symbol("radix.slottable");function Pj(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Vj}function Qj(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 Xj(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 Jj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vi=Jj.reduce((t,n)=>{const a=nv(`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 Fj(t,n){t&&tv.flushSync(()=>t.dispatchEvent(n))}function ql(t){const n=w.useRef(t);return w.useEffect(()=>{n.current=t}),w.useMemo(()=>(...a)=>n.current?.(...a),[])}function Wj(t,n=globalThis?.document){const a=ql(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 eN="DismissableLayer",af="dismissableLayer.update",tN="dismissableLayer.pointerDownOutside",nN="dismissableLayer.focusOutside",by,iv=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),av=w.forwardRef((t,n)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:l,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:d,onDismiss:m,...g}=t,p=w.useContext(iv),[b,v]=w.useState(null),S=b?.ownerDocument??globalThis?.document,[,N]=w.useState({}),z=Ca(n,V=>v(V)),j=Array.from(p.layers),[k]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),A=j.indexOf(k),E=b?j.indexOf(b):-1,O=p.layersWithOutsidePointerEventsDisabled.size>0,D=E>=A,M=sN(V=>{const R=V.target,Q=[...p.branches].some(Se=>Se.contains(R));!D||Q||(o?.(V),d?.(V),V.defaultPrevented||m?.())},S),q=lN(V=>{const R=V.target;[...p.branches].some(Se=>Se.contains(R))||(u?.(V),d?.(V),V.defaultPrevented||m?.())},S);return Wj(V=>{E===p.layers.size-1&&(l?.(V),!V.defaultPrevented&&m&&(V.preventDefault(),m()))},S),w.useEffect(()=>{if(b)return a&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(by=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(b)),p.layers.add(b),xy(),()=>{a&&p.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=by)}},[b,S,a,p]),w.useEffect(()=>()=>{b&&(p.layers.delete(b),p.layersWithOutsidePointerEventsDisabled.delete(b),xy())},[b,p]),w.useEffect(()=>{const V=()=>N({});return document.addEventListener(af,V),()=>document.removeEventListener(af,V)},[]),c.jsx(vi.div,{...g,ref:z,style:{pointerEvents:O?D?"auto":"none":void 0,...t.style},onFocusCapture:Fi(t.onFocusCapture,q.onFocusCapture),onBlurCapture:Fi(t.onBlurCapture,q.onBlurCapture),onPointerDownCapture:Fi(t.onPointerDownCapture,M.onPointerDownCapture)})});av.displayName=eN;var iN="DismissableLayerBranch",aN=w.forwardRef((t,n)=>{const a=w.useContext(iv),l=w.useRef(null),o=Ca(n,l);return w.useEffect(()=>{const u=l.current;if(u)return a.branches.add(u),()=>{a.branches.delete(u)}},[a.branches]),c.jsx(vi.div,{...t,ref:o})});aN.displayName=iN;function sN(t,n=globalThis?.document){const a=ql(t),l=w.useRef(!1),o=w.useRef(()=>{});return w.useEffect(()=>{const u=m=>{if(m.target&&!l.current){let g=function(){sv(tN,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 lN(t,n=globalThis?.document){const a=ql(t),l=w.useRef(!1);return w.useEffect(()=>{const o=u=>{u.target&&!l.current&&sv(nN,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 xy(){const t=new CustomEvent(af);document.dispatchEvent(t)}function sv(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?Fj(o,u):o.dispatchEvent(u)}var Bd="focusScope.autoFocusOnMount",Id="focusScope.autoFocusOnUnmount",Sy={bubbles:!1,cancelable:!0},rN="FocusScope",lv=w.forwardRef((t,n)=>{const{loop:a=!1,trapped:l=!1,onMountAutoFocus:o,onUnmountAutoFocus:u,...d}=t,[m,g]=w.useState(null),p=ql(o),b=ql(u),v=w.useRef(null),S=Ca(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 D=O.target;m.contains(D)?v.current=D:Pi(v.current,{select:!0})},k=function(O){if(N.paused||!m)return;const D=O.relatedTarget;D!==null&&(m.contains(D)||Pi(v.current,{select:!0}))},A=function(O){if(document.activeElement===document.body)for(const M of O)M.removedNodes.length>0&&Pi(m)};document.addEventListener("focusin",j),document.addEventListener("focusout",k);const E=new MutationObserver(A);return m&&E.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",j),document.removeEventListener("focusout",k),E.disconnect()}}},[l,m,N.paused]),w.useEffect(()=>{if(m){jy.add(N);const j=document.activeElement;if(!m.contains(j)){const A=new CustomEvent(Bd,Sy);m.addEventListener(Bd,p),m.dispatchEvent(A),A.defaultPrevented||(oN(hN(rv(m)),{select:!0}),document.activeElement===j&&Pi(m))}return()=>{m.removeEventListener(Bd,p),setTimeout(()=>{const A=new CustomEvent(Id,Sy);m.addEventListener(Id,b),m.dispatchEvent(A),A.defaultPrevented||Pi(j??document.body,{select:!0}),m.removeEventListener(Id,b),jy.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 E=j.currentTarget,[O,D]=cN(E);O&&D?!j.shiftKey&&A===D?(j.preventDefault(),a&&Pi(O,{select:!0})):j.shiftKey&&A===O&&(j.preventDefault(),a&&Pi(D,{select:!0})):A===E&&j.preventDefault()}},[a,l,N.paused]);return c.jsx(vi.div,{tabIndex:-1,...d,ref:S,onKeyDown:z})});lv.displayName=rN;function oN(t,{select:n=!1}={}){const a=document.activeElement;for(const l of t)if(Pi(l,{select:n}),document.activeElement!==a)return}function cN(t){const n=rv(t),a=wy(n,t),l=wy(n.reverse(),t);return[a,l]}function rv(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 wy(t,n){for(const a of t)if(!uN(a,{upTo:n}))return a}function uN(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 dN(t){return t instanceof HTMLInputElement&&"select"in t}function Pi(t,{select:n=!1}={}){if(t&&t.focus){const a=document.activeElement;t.focus({preventScroll:!0}),t!==a&&dN(t)&&n&&t.select()}}var jy=fN();function fN(){let t=[];return{add(n){const a=t[0];n!==a&&a?.pause(),t=Ny(t,n),t.unshift(n)},remove(n){t=Ny(t,n),t[0]?.resume()}}}function Ny(t,n){const a=[...t],l=a.indexOf(n);return l!==-1&&a.splice(l,1),a}function hN(t){return t.filter(n=>n.tagName!=="A")}var mN="Portal",ov=w.forwardRef((t,n)=>{const{container:a,...l}=t,[o,u]=w.useState(!1);Zl(()=>u(!0),[]);const d=a||o&&globalThis?.document?.body;return d?Kj.createPortal(c.jsx(vi.div,{...l,ref:n}),d):null});ov.displayName=mN;function pN(t,n){return w.useReducer((a,l)=>n[a][l]??a,t)}var nc=t=>{const{present:n,children:a}=t,l=gN(n),o=typeof a=="function"?a({present:l.isPresent}):w.Children.only(a),u=Ca(l.ref,yN(o));return typeof a=="function"||l.isPresent?w.cloneElement(o,{ref:u}):null};nc.displayName="Presence";function gN(t){const[n,a]=w.useState(),l=w.useRef(null),o=w.useRef(t),u=w.useRef("none"),d=t?"mounted":"unmounted",[m,g]=pN(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const p=go(l.current);u.current=m==="mounted"?p:"none"},[m]),Zl(()=>{const p=l.current,b=o.current;if(b!==t){const S=u.current,N=go(p);t?g("MOUNT"):N==="none"||p?.display==="none"?g("UNMOUNT"):g(b&&S!==N?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,g]),Zl(()=>{if(n){let p;const b=n.ownerDocument.defaultView??window,v=N=>{const j=go(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)})}},S=N=>{N.target===n&&(u.current=go(l.current))};return n.addEventListener("animationstart",S),n.addEventListener("animationcancel",v),n.addEventListener("animationend",v),()=>{b.clearTimeout(p),n.removeEventListener("animationstart",S),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 go(t){return t?.animationName||"none"}function yN(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 Zd=0;function vN(){w.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??ky()),document.body.insertAdjacentElement("beforeend",t[1]??ky()),Zd++,()=>{Zd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Zd--}},[])}function ky(){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 Qn=function(){return Qn=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},Qn.apply(this,arguments)};function cv(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 bN(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 To="right-scroll-bar-position",Oo="width-before-scroll-bar",xN="with-scroll-bars-hidden",SN="--removed-body-scroll-bar-size";function qd(t,n){return typeof t=="function"?t(n):t&&(t.current=n),t}function wN(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 jN=typeof window<"u"?w.useLayoutEffect:w.useEffect,zy=new WeakMap;function NN(t,n){var a=wN(null,function(l){return t.forEach(function(o){return qd(o,l)})});return jN(function(){var l=zy.get(a);if(l){var o=new Set(l),u=new Set(t),d=a.current;o.forEach(function(m){u.has(m)||qd(m,null)}),u.forEach(function(m){o.has(m)||qd(m,d)})}zy.set(a,t)},[t]),a}function kN(t){return t}function zN(t,n){n===void 0&&(n=kN);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 _N(t){t===void 0&&(t={});var n=zN(null);return n.options=Qn({async:!0,ssr:!1},t),n}var uv=function(t){var n=t.sideCar,a=cv(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,Qn({},a))};uv.isSideCarExport=!0;function CN(t,n){return t.useMedium(n),uv}var dv=_N(),Hd=function(){},ic=w.forwardRef(function(t,n){var a=w.useRef(null),l=w.useState({onScrollCapture:Hd,onWheelCapture:Hd,onTouchMoveCapture:Hd}),o=l[0],u=l[1],d=t.forwardProps,m=t.children,g=t.className,p=t.removeScrollBar,b=t.enabled,v=t.shards,S=t.sideCar,N=t.noRelative,z=t.noIsolation,j=t.inert,k=t.allowPinchZoom,A=t.as,E=A===void 0?"div":A,O=t.gapMode,D=cv(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=S,q=NN([a,n]),V=Qn(Qn({},D),o);return w.createElement(w.Fragment,null,b&&w.createElement(M,{sideCar:dv,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),Qn(Qn({},V),{ref:q})):w.createElement(E,Qn({},V,{className:g,ref:q}),m))});ic.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ic.classNames={fullWidth:Oo,zeroRight:To};var EN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function AN(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var n=EN();return n&&t.setAttribute("nonce",n),t}function TN(t,n){t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n))}function ON(t){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(t)}var DN=function(){var t=0,n=null;return{add:function(a){t==0&&(n=AN())&&(TN(n,a),ON(n)),t++},remove:function(){t--,!t&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},RN=function(){var t=DN();return function(n,a){w.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&a])}},fv=function(){var t=RN(),n=function(a){var l=a.styles,o=a.dynamic;return t(l,o),null};return n},MN={left:0,top:0,right:0,gap:0},Gd=function(t){return parseInt(t||"",10)||0},LN=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[Gd(a),Gd(l),Gd(o)]},$N=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return MN;var n=LN(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])}},UN=fv(),Cs="data-scroll-locked",BN=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(xN,` {
|
|
141
|
-
overflow: hidden `).concat(l,`;
|
|
142
|
-
padding-right: `).concat(m,"px ").concat(l,`;
|
|
143
|
-
}
|
|
144
|
-
body[`).concat(Cs,`] {
|
|
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(To,` {
|
|
158
|
-
right: `).concat(m,"px ").concat(l,`;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.`).concat(Oo,` {
|
|
162
|
-
margin-right: `).concat(m,"px ").concat(l,`;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.`).concat(To," .").concat(To,` {
|
|
166
|
-
right: 0 `).concat(l,`;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.`).concat(Oo," .").concat(Oo,` {
|
|
170
|
-
margin-right: 0 `).concat(l,`;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
body[`).concat(Cs,`] {
|
|
174
|
-
`).concat(SN,": ").concat(m,`px;
|
|
175
|
-
}
|
|
176
|
-
`)},_y=function(){var t=parseInt(document.body.getAttribute(Cs)||"0",10);return isFinite(t)?t:0},IN=function(){w.useEffect(function(){return document.body.setAttribute(Cs,(_y()+1).toString()),function(){var t=_y()-1;t<=0?document.body.removeAttribute(Cs):document.body.setAttribute(Cs,t.toString())}},[])},ZN=function(t){var n=t.noRelative,a=t.noImportant,l=t.gapMode,o=l===void 0?"margin":l;IN();var u=w.useMemo(function(){return $N(o)},[o]);return w.createElement(UN,{styles:BN(u,!n,o,a?"":"!important")})},sf=!1;if(typeof window<"u")try{var yo=Object.defineProperty({},"passive",{get:function(){return sf=!0,!0}});window.addEventListener("test",yo,yo),window.removeEventListener("test",yo,yo)}catch{sf=!1}var vs=sf?{passive:!1}:!1,qN=function(t){return t.tagName==="TEXTAREA"},hv=function(t,n){if(!(t instanceof Element))return!1;var a=window.getComputedStyle(t);return a[n]!=="hidden"&&!(a.overflowY===a.overflowX&&!qN(t)&&a[n]==="visible")},HN=function(t){return hv(t,"overflowY")},GN=function(t){return hv(t,"overflowX")},Cy=function(t,n){var a=n.ownerDocument,l=n;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var o=mv(t,l);if(o){var u=pv(t,l),d=u[1],m=u[2];if(d>m)return!0}l=l.parentNode}while(l&&l!==a.body);return!1},KN=function(t){var n=t.scrollTop,a=t.scrollHeight,l=t.clientHeight;return[n,a,l]},YN=function(t){var n=t.scrollLeft,a=t.scrollWidth,l=t.clientWidth;return[n,a,l]},mv=function(t,n){return t==="v"?HN(n):GN(n)},pv=function(t,n){return t==="v"?KN(n):YN(n)},VN=function(t,n){return t==="h"&&n==="rtl"?-1:1},PN=function(t,n,a,l,o){var u=VN(t,window.getComputedStyle(n).direction),d=u*l,m=a.target,g=n.contains(m),p=!1,b=d>0,v=0,S=0;do{if(!m)break;var N=pv(t,m),z=N[0],j=N[1],k=N[2],A=j-k-u*z;(z||A)&&mv(t,m)&&(v+=A,S+=z);var E=m.parentNode;m=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!g&&m!==document.body||g&&(n.contains(m)||n===m));return(b&&Math.abs(v)<1||!b&&Math.abs(S)<1)&&(p=!0),p},vo=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Ey=function(t){return[t.deltaX,t.deltaY]},Ay=function(t){return t&&"current"in t?t.current:t},QN=function(t,n){return t[0]===n[0]&&t[1]===n[1]},XN=function(t){return`
|
|
177
|
-
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
178
|
-
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
179
|
-
`)},JN=0,bs=[];function FN(t){var n=w.useRef([]),a=w.useRef([0,0]),l=w.useRef(),o=w.useState(JN++)[0],u=w.useState(fv)[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=bN([t.lockRef.current],(t.shards||[]).map(Ay),!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=vo(j),E=a.current,O="deltaX"in j?j.deltaX:E[0]-A[0],D="deltaY"in j?j.deltaY:E[1]-A[1],M,q=j.target,V=Math.abs(O)>Math.abs(D)?"h":"v";if("touches"in j&&V==="h"&&q.type==="range")return!1;var R=window.getSelection(),Q=R&&R.anchorNode,Se=Q?Q===q||Q.contains(q):!1;if(Se)return!1;var le=Cy(V,q);if(!le)return!0;if(le?M=V:(M=V==="v"?"h":"v",le=Cy(V,q)),!le)return!1;if(!l.current&&"changedTouches"in j&&(O||D)&&(l.current=M),!M)return!0;var ue=l.current||M;return PN(ue,k,j,ue==="h"?O:D)},[]),g=w.useCallback(function(j){var k=j;if(!(!bs.length||bs[bs.length-1]!==u)){var A="deltaY"in k?Ey(k):vo(k),E=n.current.filter(function(M){return M.name===k.type&&(M.target===k.target||k.target===M.shadowParent)&&QN(M.delta,A)})[0];if(E&&E.should){k.cancelable&&k.preventDefault();return}if(!E){var O=(d.current.shards||[]).map(Ay).filter(Boolean).filter(function(M){return M.contains(k.target)}),D=O.length>0?m(k,O[0]):!d.current.noIsolation;D&&k.cancelable&&k.preventDefault()}}},[]),p=w.useCallback(function(j,k,A,E){var O={name:j,delta:k,target:A,should:E,shadowParent:WN(A)};n.current.push(O),setTimeout(function(){n.current=n.current.filter(function(D){return D!==O})},1)},[]),b=w.useCallback(function(j){a.current=vo(j),l.current=void 0},[]),v=w.useCallback(function(j){p(j.type,Ey(j),j.target,m(j,t.lockRef.current))},[]),S=w.useCallback(function(j){p(j.type,vo(j),j.target,m(j,t.lockRef.current))},[]);w.useEffect(function(){return bs.push(u),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:S}),document.addEventListener("wheel",g,vs),document.addEventListener("touchmove",g,vs),document.addEventListener("touchstart",b,vs),function(){bs=bs.filter(function(j){return j!==u}),document.removeEventListener("wheel",g,vs),document.removeEventListener("touchmove",g,vs),document.removeEventListener("touchstart",b,vs)}},[]);var N=t.removeScrollBar,z=t.inert;return w.createElement(w.Fragment,null,z?w.createElement(u,{styles:XN(o)}):null,N?w.createElement(ZN,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function WN(t){for(var n=null;t!==null;)t instanceof ShadowRoot&&(n=t.host,t=t.host),t=t.parentNode;return n}const e1=CN(dv,FN);var gv=w.forwardRef(function(t,n){return w.createElement(ic,Qn({},t,{ref:n,sideCar:e1}))});gv.classNames=ic.classNames;var t1=function(t){if(typeof document>"u")return null;var n=Array.isArray(t)?t[0]:t;return n.ownerDocument.body},xs=new WeakMap,bo=new WeakMap,xo={},Kd=0,yv=function(t){return t&&(t.host||yv(t.parentNode))},n1=function(t,n){return n.map(function(a){if(t.contains(a))return a;var l=yv(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})},i1=function(t,n,a,l){var o=n1(n,Array.isArray(t)?t:[t]);xo[a]||(xo[a]=new WeakMap);var u=xo[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(S){if(m.has(S))b(S);else try{var N=S.getAttribute(l),z=N!==null&&N!=="false",j=(xs.get(S)||0)+1,k=(u.get(S)||0)+1;xs.set(S,j),u.set(S,k),d.push(S),j===1&&z&&bo.set(S,!0),k===1&&S.setAttribute(a,"true"),z||S.setAttribute(l,"true")}catch(A){console.error("aria-hidden: cannot operate on ",S,A)}})};return b(n),m.clear(),Kd++,function(){d.forEach(function(v){var S=xs.get(v)-1,N=u.get(v)-1;xs.set(v,S),u.set(v,N),S||(bo.has(v)||v.removeAttribute(l),bo.delete(v)),N||v.removeAttribute(a)}),Kd--,Kd||(xs=new WeakMap,xs=new WeakMap,bo=new WeakMap,xo={})}},a1=function(t,n,a){a===void 0&&(a="data-aria-hidden");var l=Array.from(Array.isArray(t)?t:[t]),o=t1(t);return o?(l.push.apply(l,Array.from(o.querySelectorAll("[aria-live], script"))),i1(l,o,a,"aria-hidden")):function(){return null}},ac="Dialog",[vv]=$j(ac),[s1,In]=vv(ac),bv=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]=qj({prop:l,defaultProp:o??!1,onChange:u,caller:ac});return c.jsx(s1,{scope:n,triggerRef:m,contentRef:g,contentId:Ud(),titleId:Ud(),descriptionId:Ud(),open:p,onOpenChange:b,onOpenToggle:w.useCallback(()=>b(v=>!v),[b]),modal:d,children:a})};bv.displayName=ac;var xv="DialogTrigger",l1=w.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=In(xv,a),u=Ca(n,o.triggerRef);return c.jsx(vi.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Mf(o.open),...l,ref:u,onClick:Fi(t.onClick,o.onOpenToggle)})});l1.displayName=xv;var Df="DialogPortal",[r1,Sv]=vv(Df,{forceMount:void 0}),wv=t=>{const{__scopeDialog:n,forceMount:a,children:l,container:o}=t,u=In(Df,n);return c.jsx(r1,{scope:n,forceMount:a,children:w.Children.map(l,d=>c.jsx(nc,{present:a||u.open,children:c.jsx(ov,{asChild:!0,container:o,children:d})}))})};wv.displayName=Df;var Mo="DialogOverlay",jv=w.forwardRef((t,n)=>{const a=Sv(Mo,t.__scopeDialog),{forceMount:l=a.forceMount,...o}=t,u=In(Mo,t.__scopeDialog);return u.modal?c.jsx(nc,{present:l||u.open,children:c.jsx(c1,{...o,ref:n})}):null});jv.displayName=Mo;var o1=nv("DialogOverlay.RemoveScroll"),c1=w.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=In(Mo,a);return c.jsx(gv,{as:o1,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsx(vi.div,{"data-state":Mf(o.open),...l,ref:n,style:{pointerEvents:"auto",...l.style}})})}),za="DialogContent",Nv=w.forwardRef((t,n)=>{const a=Sv(za,t.__scopeDialog),{forceMount:l=a.forceMount,...o}=t,u=In(za,t.__scopeDialog);return c.jsx(nc,{present:l||u.open,children:u.modal?c.jsx(u1,{...o,ref:n}):c.jsx(d1,{...o,ref:n})})});Nv.displayName=za;var u1=w.forwardRef((t,n)=>{const a=In(za,t.__scopeDialog),l=w.useRef(null),o=Ca(n,a.contentRef,l);return w.useEffect(()=>{const u=l.current;if(u)return a1(u)},[]),c.jsx(kv,{...t,ref:o,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Fi(t.onCloseAutoFocus,u=>{u.preventDefault(),a.triggerRef.current?.focus()}),onPointerDownOutside:Fi(t.onPointerDownOutside,u=>{const d=u.detail.originalEvent,m=d.button===0&&d.ctrlKey===!0;(d.button===2||m)&&u.preventDefault()}),onFocusOutside:Fi(t.onFocusOutside,u=>u.preventDefault())})}),d1=w.forwardRef((t,n)=>{const a=In(za,t.__scopeDialog),l=w.useRef(!1),o=w.useRef(!1);return c.jsx(kv,{...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()}})}),kv=w.forwardRef((t,n)=>{const{__scopeDialog:a,trapFocus:l,onOpenAutoFocus:o,onCloseAutoFocus:u,...d}=t,m=In(za,a),g=w.useRef(null),p=Ca(n,g);return vN(),c.jsxs(c.Fragment,{children:[c.jsx(lv,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:o,onUnmountAutoFocus:u,children:c.jsx(av,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Mf(m.open),...d,ref:p,onDismiss:()=>m.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(f1,{titleId:m.titleId}),c.jsx(m1,{contentRef:g,descriptionId:m.descriptionId})]})]})}),Rf="DialogTitle",zv=w.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=In(Rf,a);return c.jsx(vi.h2,{id:o.titleId,...l,ref:n})});zv.displayName=Rf;var _v="DialogDescription",Cv=w.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=In(_v,a);return c.jsx(vi.p,{id:o.descriptionId,...l,ref:n})});Cv.displayName=_v;var Ev="DialogClose",Av=w.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=In(Ev,a);return c.jsx(vi.button,{type:"button",...l,ref:n,onClick:Fi(t.onClick,()=>o.onOpenChange(!1))})});Av.displayName=Ev;function Mf(t){return t?"open":"closed"}var Tv="DialogTitleWarning",[JT,Ov]=Lj(Tv,{contentName:za,titleName:Rf,docsSlug:"dialog"}),f1=({titleId:t})=>{const n=Ov(Tv),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},h1="DialogDescriptionWarning",m1=({contentRef:t,descriptionId:n})=>{const l=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ov(h1).contentName}}.`;return w.useEffect(()=>{const o=t.current?.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(l))},[l,t,n]),null},Dv=bv,Rv=wv,Lf=jv,$f=Nv,Uf=zv,Mv=Cv,Lv=Av;const p1=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),g1=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,a,l)=>l?l.toUpperCase():a.toLowerCase()),Ty=t=>{const n=g1(t);return n.charAt(0).toUpperCase()+n.slice(1)},$v=(...t)=>t.filter((n,a,l)=>!!n&&n.trim()!==""&&l.indexOf(n)===a).join(" ").trim(),y1=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var v1={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 b1=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,...v1,width:n,height:n,stroke:t,strokeWidth:l?Number(a)*24/Number(n):a,className:$v("lucide",o),...!u&&!y1(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(b1,{ref:u,iconNode:n,className:$v(`lucide-${p1(Ty(t))}`,`lucide-${t}`,l),...o}));return a.displayName=Ty(t),a};const x1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Bf=Zn("chevron-right",x1);const S1=[["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"}]],w1=Zn("download",S1);const j1=[["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"}]],N1=Zn("globe",j1);const k1=[["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"}]],z1=Zn("layout-dashboard",k1);const _1=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],C1=Zn("menu",_1);const E1=[["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"}]],A1=Zn("play",E1);const T1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Oy=Zn("plus",T1);const O1=[["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"}]],D1=Zn("rocket",O1);const R1=[["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"}]],M1=Zn("settings",R1);const L1=[["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"}]],$1=Zn("trash-2",L1);const U1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],If=Zn("x",U1);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 S=b[v];S in m||(m[S]=p[S].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 Es extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Uv extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const Bv={};function Wi(t){return Bv}function Iv(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 lf(t,n){return typeof n=="bigint"?n.toString():n}function Zf(t){return{get value(){{const n=t();return Object.defineProperty(this,"value",{value:n}),n}}}}function qf(t){return t==null}function Hf(t){const n=t.startsWith("^")?1:0,a=t.endsWith("$")?t.length-1:t.length;return t.slice(n,a)}function B1(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 Dy=Symbol("evaluating");function Ve(t,n,a){let l;Object.defineProperty(t,n,{get(){if(l!==Dy)return l===void 0&&(l=Dy,l=a()),l},set(o){Object.defineProperty(t,n,{value:o})},configurable:!0})}function Ea(t,n,a){Object.defineProperty(t,n,{value:a,writable:!0,enumerable:!0,configurable:!0})}function ta(...t){const n={};for(const a of t){const l=Object.getOwnPropertyDescriptors(a);Object.assign(n,l)}return Object.defineProperties({},n)}function Ry(t){return JSON.stringify(t)}function I1(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Zv="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Lo(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const Z1=Zf(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Ds(t){if(Lo(t)===!1)return!1;const n=t.constructor;if(n===void 0||typeof n!="function")return!0;const a=n.prototype;return!(Lo(a)===!1||Object.prototype.hasOwnProperty.call(a,"isPrototypeOf")===!1)}function qv(t){return Ds(t)?{...t}:Array.isArray(t)?[...t]:t}const q1=new Set(["string","number","symbol"]);function Rs(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function na(t,n,a){const l=new t._zod.constr(n??t._zod.def);return(!n||a?.parent)&&(l._zod.parent=t),l}function be(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 H1(t){return Object.keys(t).filter(n=>t[n]._zod.optin==="optional"&&t[n]._zod.optout==="optional")}const G1={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 K1(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=ta(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 Ea(this,"shape",d),d},checks:[]});return na(t,u)}function Y1(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=ta(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 Ea(this,"shape",d),d},checks:[]});return na(t,u)}function V1(t,n){if(!Ds(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=ta(t._zod.def,{get shape(){const u={...t._zod.def.shape,...n};return Ea(this,"shape",u),u}});return na(t,o)}function P1(t,n){if(!Ds(n))throw new Error("Invalid input to safeExtend: expected a plain object");const a=ta(t._zod.def,{get shape(){const l={...t._zod.def.shape,...n};return Ea(this,"shape",l),l}});return na(t,a)}function Q1(t,n){const a=ta(t._zod.def,{get shape(){const l={...t._zod.def.shape,...n._zod.def.shape};return Ea(this,"shape",l),l},get catchall(){return n._zod.def.catchall},checks:[]});return na(t,a)}function X1(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=ta(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 Ea(this,"shape",g),g},checks:[]});return na(n,d)}function J1(t,n,a){const l=ta(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 Ea(this,"shape",u),u}});return na(n,l)}function Ns(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 ks(t,n){return n.map(a=>{var l;return(l=a).path??(l.path=[]),a.path.unshift(t),a})}function So(t){return typeof t=="string"?t:t?.message}function ea(t,n,a){const l={...t,path:t.path??[]};if(!t.message){const o=So(t.inst?._zod.def?.error?.(t))??So(n?.error?.(t))??So(a.customError?.(t))??So(a.localeError?.(t))??"Invalid input";l.message=o}return delete l.inst,delete l.continue,n?.reportInput||delete l.input,l}function Gf(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Hl(...t){const[n,a,l]=t;return typeof n=="string"?{message:n,code:"custom",input:a,inst:l}:{...n}}const Hv=(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,lf,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Gv=J("$ZodError",Hv),Kv=J("$ZodError",Hv,{Parent:Error});function F1(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 W1(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 Kf=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 Es;if(d.issues.length){const m=new(o?.Err??t)(d.issues.map(g=>ea(g,u,Wi())));throw Zv(m,o?.callee),m}return d.value},Yf=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=>ea(g,u,Wi())));throw Zv(m,o?.callee),m}return d.value},sc=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 Es;return u.issues.length?{success:!1,error:new(t??Gv)(u.issues.map(d=>ea(d,o,Wi())))}:{success:!0,data:u.value}},ek=sc(Kv),lc=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=>ea(d,o,Wi())))}:{success:!0,data:u.value}},tk=lc(Kv),nk=t=>(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return Kf(t)(n,a,o)},ik=t=>(n,a,l)=>Kf(t)(n,a,l),ak=t=>async(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return Yf(t)(n,a,o)},sk=t=>async(n,a,l)=>Yf(t)(n,a,l),lk=t=>(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return sc(t)(n,a,o)},rk=t=>(n,a,l)=>sc(t)(n,a,l),ok=t=>async(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return lc(t)(n,a,o)},ck=t=>async(n,a,l)=>lc(t)(n,a,l),uk=/^[cC][^\s-]{8,}$/,dk=/^[0-9a-z]+$/,fk=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,hk=/^[0-9a-vA-V]{20}$/,mk=/^[A-Za-z0-9]{27}$/,pk=/^[a-zA-Z0-9_-]{21}$/,gk=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,yk=/^([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})$/,My=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)$/,vk=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,bk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function xk(){return new RegExp(bk,"u")}const Sk=/^(?:(?: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])$/,wk=/^(([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}|:))$/,jk=/^((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])$/,Nk=/^(([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])$/,kk=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Yv=/^[A-Za-z0-9_-]*$/,zk=/^\+[1-9]\d{6,14}$/,Vv="(?:(?:\\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])))",_k=new RegExp(`^${Vv}$`);function Pv(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 Ck(t){return new RegExp(`^${Pv(t)}$`)}function Ek(t){const n=Pv({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(`^${Vv}T(?:${l})$`)}const Ak=t=>{const n=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},Tk=/^-?\d+$/,Qv=/^-?\d+(?:\.\d+)?$/,Ok=/^(?:true|false)$/i,Dk=/^[^A-Z]*$/,Rk=/^[^a-z]*$/,cn=J("$ZodCheck",(t,n)=>{var a;t._zod??(t._zod={}),t._zod.def=n,(a=t._zod).onattach??(a.onattach=[])}),Xv={number:"number",bigint:"bigint",object:"date"},Jv=J("$ZodCheckLessThan",(t,n)=>{cn.init(t,n);const a=Xv[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})}}),Fv=J("$ZodCheckGreaterThan",(t,n)=>{cn.init(t,n);const a=Xv[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})}}),Mk=J("$ZodCheckMultipleOf",(t,n)=>{cn.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):B1(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})}}),Lk=J("$ZodCheckNumberFormat",(t,n)=>{cn.init(t,n),n.format=n.format||"float64";const a=n.format?.includes("int"),l=a?"int":"number",[o,u]=G1[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=Tk)}),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})}}),$k=J("$ZodCheckMaxLength",(t,n)=>{var a;cn.init(t,n),(a=t._zod.def).when??(a.when=l=>{const o=l.value;return!qf(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=Gf(o);l.issues.push({origin:d,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:t,continue:!n.abort})}}),Uk=J("$ZodCheckMinLength",(t,n)=>{var a;cn.init(t,n),(a=t._zod.def).when??(a.when=l=>{const o=l.value;return!qf(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=Gf(o);l.issues.push({origin:d,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:t,continue:!n.abort})}}),Bk=J("$ZodCheckLengthEquals",(t,n)=>{var a;cn.init(t,n),(a=t._zod.def).when??(a.when=l=>{const o=l.value;return!qf(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=Gf(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})}}),rc=J("$ZodCheckStringFormat",(t,n)=>{var a,l;cn.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=()=>{})}),Ik=J("$ZodCheckRegex",(t,n)=>{rc.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})}}),Zk=J("$ZodCheckLowerCase",(t,n)=>{n.pattern??(n.pattern=Dk),rc.init(t,n)}),qk=J("$ZodCheckUpperCase",(t,n)=>{n.pattern??(n.pattern=Rk),rc.init(t,n)}),Hk=J("$ZodCheckIncludes",(t,n)=>{cn.init(t,n);const a=Rs(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})}}),Gk=J("$ZodCheckStartsWith",(t,n)=>{cn.init(t,n);const a=new RegExp(`^${Rs(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})}}),Kk=J("$ZodCheckEndsWith",(t,n)=>{cn.init(t,n);const a=new RegExp(`.*${Rs(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})}}),Yk=J("$ZodCheckOverwrite",(t,n)=>{cn.init(t,n),t._zod.check=a=>{a.value=n.tx(a.value)}});class Vk{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 Pk={major:4,minor:3,patch:6},rt=J("$ZodType",(t,n)=>{var a;t??(t={}),t._zod.def=n,t._zod.bag=t._zod.bag||{},t._zod.version=Pk;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=Ns(d),b;for(const v of m){if(v._zod.def.when){if(!v._zod.def.when(d))continue}else if(p)continue;const S=d.issues.length,N=v._zod.check(d);if(N instanceof Promise&&g?.async===!1)throw new Es;if(b||N instanceof Promise)b=(b??Promise.resolve()).then(async()=>{await N,d.issues.length!==S&&(p||(p=Ns(d,S)))});else{if(d.issues.length===S)continue;p||(p=Ns(d,S))}}return b?b.then(()=>d):d},u=(d,m,g)=>{if(Ns(d))return d.aborted=!0,d;const p=o(m,l,g);if(p instanceof Promise){if(g.async===!1)throw new Es;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 Es;return g.then(p=>o(p,l,m))}return o(g,l,m)}}Ve(t,"~standard",()=>({validate:o=>{try{const u=ek(t,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return tk(t,o).then(d=>d.success?{value:d.data}:{issues:d.error?.issues})}},vendor:"zod",version:1}))}),Vf=J("$ZodString",(t,n)=>{rt.init(t,n),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Ak(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}}),lt=J("$ZodStringFormat",(t,n)=>{rc.init(t,n),Vf.init(t,n)}),Qk=J("$ZodGUID",(t,n)=>{n.pattern??(n.pattern=yk),lt.init(t,n)}),Xk=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=My(l))}else n.pattern??(n.pattern=My());lt.init(t,n)}),Jk=J("$ZodEmail",(t,n)=>{n.pattern??(n.pattern=vk),lt.init(t,n)}),Fk=J("$ZodURL",(t,n)=>{lt.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})}}}),Wk=J("$ZodEmoji",(t,n)=>{n.pattern??(n.pattern=xk()),lt.init(t,n)}),ez=J("$ZodNanoID",(t,n)=>{n.pattern??(n.pattern=pk),lt.init(t,n)}),tz=J("$ZodCUID",(t,n)=>{n.pattern??(n.pattern=uk),lt.init(t,n)}),nz=J("$ZodCUID2",(t,n)=>{n.pattern??(n.pattern=dk),lt.init(t,n)}),iz=J("$ZodULID",(t,n)=>{n.pattern??(n.pattern=fk),lt.init(t,n)}),az=J("$ZodXID",(t,n)=>{n.pattern??(n.pattern=hk),lt.init(t,n)}),sz=J("$ZodKSUID",(t,n)=>{n.pattern??(n.pattern=mk),lt.init(t,n)}),lz=J("$ZodISODateTime",(t,n)=>{n.pattern??(n.pattern=Ek(n)),lt.init(t,n)}),rz=J("$ZodISODate",(t,n)=>{n.pattern??(n.pattern=_k),lt.init(t,n)}),oz=J("$ZodISOTime",(t,n)=>{n.pattern??(n.pattern=Ck(n)),lt.init(t,n)}),cz=J("$ZodISODuration",(t,n)=>{n.pattern??(n.pattern=gk),lt.init(t,n)}),uz=J("$ZodIPv4",(t,n)=>{n.pattern??(n.pattern=Sk),lt.init(t,n),t._zod.bag.format="ipv4"}),dz=J("$ZodIPv6",(t,n)=>{n.pattern??(n.pattern=wk),lt.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})}}}),fz=J("$ZodCIDRv4",(t,n)=>{n.pattern??(n.pattern=jk),lt.init(t,n)}),hz=J("$ZodCIDRv6",(t,n)=>{n.pattern??(n.pattern=Nk),lt.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 Wv(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const mz=J("$ZodBase64",(t,n)=>{n.pattern??(n.pattern=kk),lt.init(t,n),t._zod.bag.contentEncoding="base64",t._zod.check=a=>{Wv(a.value)||a.issues.push({code:"invalid_format",format:"base64",input:a.value,inst:t,continue:!n.abort})}});function pz(t){if(!Yv.test(t))return!1;const n=t.replace(/[-_]/g,l=>l==="-"?"+":"/"),a=n.padEnd(Math.ceil(n.length/4)*4,"=");return Wv(a)}const gz=J("$ZodBase64URL",(t,n)=>{n.pattern??(n.pattern=Yv),lt.init(t,n),t._zod.bag.contentEncoding="base64url",t._zod.check=a=>{pz(a.value)||a.issues.push({code:"invalid_format",format:"base64url",input:a.value,inst:t,continue:!n.abort})}}),yz=J("$ZodE164",(t,n)=>{n.pattern??(n.pattern=zk),lt.init(t,n)});function vz(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 bz=J("$ZodJWT",(t,n)=>{lt.init(t,n),t._zod.check=a=>{vz(a.value,n.alg)||a.issues.push({code:"invalid_format",format:"jwt",input:a.value,inst:t,continue:!n.abort})}}),eb=J("$ZodNumber",(t,n)=>{rt.init(t,n),t._zod.pattern=t._zod.bag.pattern??Qv,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}}),xz=J("$ZodNumberFormat",(t,n)=>{Lk.init(t,n),eb.init(t,n)}),Sz=J("$ZodBoolean",(t,n)=>{rt.init(t,n),t._zod.pattern=Ok,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}}),wz=J("$ZodUnknown",(t,n)=>{rt.init(t,n),t._zod.parse=a=>a}),jz=J("$ZodNever",(t,n)=>{rt.init(t,n),t._zod.parse=(a,l)=>(a.issues.push({expected:"never",code:"invalid_type",input:a.value,inst:t}),a)});function Ly(t,n,a){t.issues.length&&n.issues.push(...ks(a,t.issues)),n.value[a]=t.value}const Nz=J("$ZodArray",(t,n)=>{rt.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=>Ly(p,a,d))):Ly(g,a,d)}return u.length?Promise.all(u).then(()=>a):a}});function $o(t,n,a,l,o){if(t.issues.length){if(o&&!(a in l))return;n.issues.push(...ks(a,t.issues))}t.value===void 0?a in l&&(n.value[a]=void 0):n.value[a]=t.value}function tb(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=H1(t.shape);return{...t,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(a)}}function nb(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 S=g.run({value:n[v],issues:[]},l);S instanceof Promise?t.push(S.then(N=>$o(N,a,v,n,b))):$o(S,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 kz=J("$ZodObject",(t,n)=>{if(rt.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=Zf(()=>tb(n));Ve(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=Lo,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 S of d.keys){const N=v[S],z=N._zod.optout==="optional",j=N._zod.run({value:p[S],issues:[]},g);j instanceof Promise?b.push(j.then(k=>$o(k,m,S,p,z))):$o(j,m,S,p,z)}return u?nb(b,p,m,g,l.value,t):b.length?Promise.all(b).then(()=>m):m}}),zz=J("$ZodObjectJIT",(t,n)=>{kz.init(t,n);const a=t._zod.parse,l=Zf(()=>tb(n)),o=S=>{const N=new Vk(["shape","payload","ctx"]),z=l.value,j=O=>{const D=Ry(O);return`shape[${D}]._zod.run({ value: input[${D}], 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 D=k[O],M=Ry(O),V=S[O]?._zod?.optout==="optional";N.write(`const ${D} = ${j(O)};`),V?N.write(`
|
|
186
|
-
if (${D}.issues.length) {
|
|
187
|
-
if (${M} in input) {
|
|
188
|
-
payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
|
|
189
|
-
...iss,
|
|
190
|
-
path: iss.path ? [${M}, ...iss.path] : [${M}]
|
|
191
|
-
})));
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
if (${D}.value === undefined) {
|
|
196
|
-
if (${M} in input) {
|
|
197
|
-
newResult[${M}] = undefined;
|
|
198
|
-
}
|
|
199
|
-
} else {
|
|
200
|
-
newResult[${M}] = ${D}.value;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
`):N.write(`
|
|
204
|
-
if (${D}.issues.length) {
|
|
205
|
-
payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
|
|
206
|
-
...iss,
|
|
207
|
-
path: iss.path ? [${M}, ...iss.path] : [${M}]
|
|
208
|
-
})));
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
if (${D}.value === undefined) {
|
|
212
|
-
if (${M} in input) {
|
|
213
|
-
newResult[${M}] = undefined;
|
|
214
|
-
}
|
|
215
|
-
} else {
|
|
216
|
-
newResult[${M}] = ${D}.value;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
`)}N.write("payload.value = newResult;"),N.write("return payload;");const E=N.compile();return(O,D)=>E(S,O,D)};let u;const d=Lo,m=!Bv.jitless,p=m&&Z1.value,b=n.catchall;let v;t._zod.parse=(S,N)=>{v??(v=l.value);const z=S.value;return d(z)?m&&p&&N?.async===!1&&N.jitless!==!0?(u||(u=o(n.shape)),S=u(S,N),b?nb([],z,S,N,v,t):S):a(S,N):(S.issues.push({expected:"object",code:"invalid_type",input:z,inst:t}),S)}});function $y(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=>!Ns(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=>ea(d,l,Wi())))}),n)}const _z=J("$ZodUnion",(t,n)=>{rt.init(t,n),Ve(t._zod,"optin",()=>n.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ve(t._zod,"optout",()=>n.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ve(t._zod,"values",()=>{if(n.options.every(o=>o._zod.values))return new Set(n.options.flatMap(o=>Array.from(o._zod.values)))}),Ve(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=>Hf(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=>$y(g,o,t,u)):$y(m,o,t,u)}}),Cz=J("$ZodIntersection",(t,n)=>{rt.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])=>Uy(a,g,p)):Uy(a,u,d)}});function rf(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(Ds(t)&&Ds(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=rf(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=rf(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 Uy(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}),Ns(t))return t;const d=rf(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 Ez=J("$ZodRecord",(t,n)=>{rt.init(t,n),t._zod.parse=(a,l)=>{const o=a.value;if(!Ds(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(...ks(p,v.issues)),a.value[p]=v.value})):(b.issues.length&&a.issues.push(...ks(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"&&Qv.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=>ea(v,l,Wi())),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(...ks(m,v.issues)),a.value[g.value]=v.value})):(b.issues.length&&a.issues.push(...ks(m,b.issues)),a.value[g.value]=b.value)}}return u.length?Promise.all(u).then(()=>a):a}}),Az=J("$ZodEnum",(t,n)=>{rt.init(t,n);const a=Iv(n.entries),l=new Set(a);t._zod.values=l,t._zod.pattern=new RegExp(`^(${a.filter(o=>q1.has(typeof o)).map(o=>typeof o=="string"?Rs(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}}),Tz=J("$ZodLiteral",(t,n)=>{if(rt.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"?Rs(l):l?Rs(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}}),Oz=J("$ZodTransform",(t,n)=>{rt.init(t,n),t._zod.parse=(a,l)=>{if(l.direction==="backward")throw new Uv(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 Es;return a.value=o,a}});function By(t,n){return t.issues.length&&n===void 0?{issues:[],value:void 0}:t}const ib=J("$ZodOptional",(t,n)=>{rt.init(t,n),t._zod.optin="optional",t._zod.optout="optional",Ve(t._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),Ve(t._zod,"pattern",()=>{const a=n.innerType._zod.pattern;return a?new RegExp(`^(${Hf(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=>By(u,a.value)):By(o,a.value)}return a.value===void 0?a:n.innerType._zod.run(a,l)}}),Dz=J("$ZodExactOptional",(t,n)=>{ib.init(t,n),Ve(t._zod,"values",()=>n.innerType._zod.values),Ve(t._zod,"pattern",()=>n.innerType._zod.pattern),t._zod.parse=(a,l)=>n.innerType._zod.run(a,l)}),Rz=J("$ZodNullable",(t,n)=>{rt.init(t,n),Ve(t._zod,"optin",()=>n.innerType._zod.optin),Ve(t._zod,"optout",()=>n.innerType._zod.optout),Ve(t._zod,"pattern",()=>{const a=n.innerType._zod.pattern;return a?new RegExp(`^(${Hf(a.source)}|null)$`):void 0}),Ve(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)}),Mz=J("$ZodDefault",(t,n)=>{rt.init(t,n),t._zod.optin="optional",Ve(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=>Iy(u,n)):Iy(o,n)}});function Iy(t,n){return t.value===void 0&&(t.value=n.defaultValue),t}const Lz=J("$ZodPrefault",(t,n)=>{rt.init(t,n),t._zod.optin="optional",Ve(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))}),$z=J("$ZodNonOptional",(t,n)=>{rt.init(t,n),Ve(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=>Zy(u,t)):Zy(o,t)}});function Zy(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 Uz=J("$ZodCatch",(t,n)=>{rt.init(t,n),Ve(t._zod,"optin",()=>n.innerType._zod.optin),Ve(t._zod,"optout",()=>n.innerType._zod.optout),Ve(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=>ea(d,l,Wi()))},input:a.value}),a.issues=[]),a)):(a.value=o.value,o.issues.length&&(a.value=n.catchValue({...a,error:{issues:o.issues.map(u=>ea(u,l,Wi()))},input:a.value}),a.issues=[]),a)}}),Bz=J("$ZodPipe",(t,n)=>{rt.init(t,n),Ve(t._zod,"values",()=>n.in._zod.values),Ve(t._zod,"optin",()=>n.in._zod.optin),Ve(t._zod,"optout",()=>n.out._zod.optout),Ve(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=>wo(d,n.in,l)):wo(u,n.in,l)}const o=n.in._zod.run(a,l);return o instanceof Promise?o.then(u=>wo(u,n.out,l)):wo(o,n.out,l)}});function wo(t,n,a){return t.issues.length?(t.aborted=!0,t):n._zod.run({value:t.value,issues:t.issues},a)}const Iz=J("$ZodReadonly",(t,n)=>{rt.init(t,n),Ve(t._zod,"propValues",()=>n.innerType._zod.propValues),Ve(t._zod,"values",()=>n.innerType._zod.values),Ve(t._zod,"optin",()=>n.innerType?._zod?.optin),Ve(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(qy):qy(o)}});function qy(t){return t.value=Object.freeze(t.value),t}const Zz=J("$ZodCustom",(t,n)=>{cn.init(t,n),rt.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=>Hy(u,a,l,t));Hy(o,a,l,t)}});function Hy(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(Hl(o))}}var Gy;class qz{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 Hz(){return new qz}(Gy=globalThis).__zod_globalRegistry??(Gy.__zod_globalRegistry=Hz());const Ll=globalThis.__zod_globalRegistry;function Gz(t,n){return new t({type:"string",...be(n)})}function Kz(t,n){return new t({type:"string",format:"email",check:"string_format",abort:!1,...be(n)})}function Ky(t,n){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...be(n)})}function Yz(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...be(n)})}function Vz(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(n)})}function Pz(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(n)})}function Qz(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(n)})}function Xz(t,n){return new t({type:"string",format:"url",check:"string_format",abort:!1,...be(n)})}function Jz(t,n){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...be(n)})}function Fz(t,n){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(n)})}function Wz(t,n){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...be(n)})}function e2(t,n){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(n)})}function t2(t,n){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...be(n)})}function n2(t,n){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...be(n)})}function i2(t,n){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(n)})}function a2(t,n){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(n)})}function s2(t,n){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(n)})}function l2(t,n){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(n)})}function r2(t,n){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(n)})}function o2(t,n){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...be(n)})}function c2(t,n){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...be(n)})}function u2(t,n){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...be(n)})}function d2(t,n){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...be(n)})}function f2(t,n){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(n)})}function h2(t,n){return new t({type:"string",format:"date",check:"string_format",...be(n)})}function m2(t,n){return new t({type:"string",format:"time",check:"string_format",precision:null,...be(n)})}function p2(t,n){return new t({type:"string",format:"duration",check:"string_format",...be(n)})}function g2(t,n){return new t({type:"number",checks:[],...be(n)})}function y2(t,n){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...be(n)})}function v2(t,n){return new t({type:"boolean",...be(n)})}function b2(t){return new t({type:"unknown"})}function x2(t,n){return new t({type:"never",...be(n)})}function Yy(t,n){return new Jv({check:"less_than",...be(n),value:t,inclusive:!1})}function Yd(t,n){return new Jv({check:"less_than",...be(n),value:t,inclusive:!0})}function Vy(t,n){return new Fv({check:"greater_than",...be(n),value:t,inclusive:!1})}function Vd(t,n){return new Fv({check:"greater_than",...be(n),value:t,inclusive:!0})}function Py(t,n){return new Mk({check:"multiple_of",...be(n),value:t})}function ab(t,n){return new $k({check:"max_length",...be(n),maximum:t})}function Uo(t,n){return new Uk({check:"min_length",...be(n),minimum:t})}function sb(t,n){return new Bk({check:"length_equals",...be(n),length:t})}function S2(t,n){return new Ik({check:"string_format",format:"regex",...be(n),pattern:t})}function w2(t){return new Zk({check:"string_format",format:"lowercase",...be(t)})}function j2(t){return new qk({check:"string_format",format:"uppercase",...be(t)})}function N2(t,n){return new Hk({check:"string_format",format:"includes",...be(n),includes:t})}function k2(t,n){return new Gk({check:"string_format",format:"starts_with",...be(n),prefix:t})}function z2(t,n){return new Kk({check:"string_format",format:"ends_with",...be(n),suffix:t})}function Bs(t){return new Yk({check:"overwrite",tx:t})}function _2(t){return Bs(n=>n.normalize(t))}function C2(){return Bs(t=>t.trim())}function E2(){return Bs(t=>t.toLowerCase())}function A2(){return Bs(t=>t.toUpperCase())}function T2(){return Bs(t=>I1(t))}function O2(t,n,a){return new t({type:"array",element:n,...be(a)})}function D2(t,n,a){return new t({type:"custom",check:"custom",fn:n,...be(a)})}function R2(t){const n=M2(a=>(a.addIssue=l=>{if(typeof l=="string")a.issues.push(Hl(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(Hl(o))}},t(a.value,a)));return n}function M2(t,n){const a=new cn({check:"custom",...be(n)});return a._zod.check=t,a}function lb(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??Ll,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 _t(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 S=d.schema,N=n.processors[o.type];if(!N)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);N(t,n,S,b)}const v=t._zod.parent;v&&(d.ref||(d.ref=v),_t(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"&&Jt(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 rb(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,S=t.external.uri??(z=>z);if(v)return{ref:S(v)};const N=d[1].defId??d[1].schema.id??`schema${t.counter++}`;return d[1].defId=N,{defId:N,ref:`${S("__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 ob(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 S=t.seen.get(b),N=S.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&&S.def)for(const j in g)j==="$ref"||j==="allOf"||j in S.def&&JSON.stringify(g[j])===JSON.stringify(S.def[j])&&delete g[j]}const v=d._zod.parent;if(v&&v!==b){l(v);const S=t.seen.get(v);if(S?.schema.$ref&&(g.$ref=S.schema.$ref,S.def))for(const N in g)N==="$ref"||N==="allOf"||N in S.def&&JSON.stringify(g[N])===JSON.stringify(S.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:Bo(n,"input",t.processors),output:Bo(n,"output",t.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function Jt(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 Jt(l.element,a);if(l.type==="set")return Jt(l.valueType,a);if(l.type==="lazy")return Jt(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 Jt(l.innerType,a);if(l.type==="intersection")return Jt(l.left,a)||Jt(l.right,a);if(l.type==="record"||l.type==="map")return Jt(l.keyType,a)||Jt(l.valueType,a);if(l.type==="pipe")return Jt(l.in,a)||Jt(l.out,a);if(l.type==="object"){for(const o in l.shape)if(Jt(l.shape[o],a))return!0;return!1}if(l.type==="union"){for(const o of l.options)if(Jt(o,a))return!0;return!1}if(l.type==="tuple"){for(const o of l.items)if(Jt(o,a))return!0;return!!(l.rest&&Jt(l.rest,a))}return!1}const L2=(t,n={})=>a=>{const l=lb({...a,processors:n});return _t(t,l),rb(l,t),ob(l,t)},Bo=(t,n,a={})=>l=>{const{libraryOptions:o,target:u}=l??{},d=lb({...o??{},target:u,io:n,processors:a});return _t(t,d),rb(d,t),ob(d,t)},$2={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},U2=(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=$2[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}))])}},B2=(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)},I2=(t,n,a,l)=>{a.type="boolean"},Z2=(t,n,a,l)=>{a.not={}},q2=(t,n,a,l)=>{},H2=(t,n,a,l)=>{const o=t._zod.def,u=Iv(o.entries);u.every(d=>typeof d=="number")&&(a.type="number"),u.every(d=>typeof d=="string")&&(a.type="string"),a.enum=u},G2=(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},K2=(t,n,a,l)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Y2=(t,n,a,l)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},V2=(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=_t(u.element,n,{...l,path:[...l.path,"items"]})},P2=(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]=_t(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=_t(u.catchall,n,{...l,path:[...l.path,"additionalProperties"]})):n.io==="output"&&(o.additionalProperties=!1)},Q2=(t,n,a,l)=>{const o=t._zod.def,u=o.inclusive===!1,d=o.options.map((m,g)=>_t(m,n,{...l,path:[...l.path,u?"oneOf":"anyOf",g]}));u?a.oneOf=d:a.anyOf=d},X2=(t,n,a,l)=>{const o=t._zod.def,u=_t(o.left,n,{...l,path:[...l.path,"allOf",0]}),d=_t(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},J2=(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=_t(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=_t(u.keyType,n,{...l,path:[...l.path,"propertyNames"]})),o.additionalProperties=_t(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)}},F2=(t,n,a,l)=>{const o=t._zod.def,u=_t(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"}]},W2=(t,n,a,l)=>{const o=t._zod.def;_t(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType},e_=(t,n,a,l)=>{const o=t._zod.def;_t(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType,a.default=JSON.parse(JSON.stringify(o.defaultValue))},t_=(t,n,a,l)=>{const o=t._zod.def;_t(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)))},n_=(t,n,a,l)=>{const o=t._zod.def;_t(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},i_=(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;_t(u,n,l);const d=n.seen.get(t);d.ref=u},a_=(t,n,a,l)=>{const o=t._zod.def;_t(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType,a.readOnly=!0},cb=(t,n,a,l)=>{const o=t._zod.def;_t(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType},s_=J("ZodISODateTime",(t,n)=>{lz.init(t,n),ct.init(t,n)});function l_(t){return f2(s_,t)}const r_=J("ZodISODate",(t,n)=>{rz.init(t,n),ct.init(t,n)});function o_(t){return h2(r_,t)}const c_=J("ZodISOTime",(t,n)=>{oz.init(t,n),ct.init(t,n)});function u_(t){return m2(c_,t)}const d_=J("ZodISODuration",(t,n)=>{cz.init(t,n),ct.init(t,n)});function f_(t){return p2(d_,t)}const h_=(t,n)=>{Gv.init(t,n),t.name="ZodError",Object.defineProperties(t,{format:{value:a=>W1(t,a)},flatten:{value:a=>F1(t,a)},addIssue:{value:a=>{t.issues.push(a),t.message=JSON.stringify(t.issues,lf,2)}},addIssues:{value:a=>{t.issues.push(...a),t.message=JSON.stringify(t.issues,lf,2)}},isEmpty:{get(){return t.issues.length===0}}})},On=J("ZodError",h_,{Parent:Error}),m_=Kf(On),p_=Yf(On),g_=sc(On),y_=lc(On),v_=nk(On),b_=ik(On),x_=ak(On),S_=sk(On),w_=lk(On),j_=rk(On),N_=ok(On),k_=ck(On),ot=J("ZodType",(t,n)=>(rt.init(t,n),Object.assign(t["~standard"],{jsonSchema:{input:Bo(t,"input"),output:Bo(t,"output")}}),t.toJSONSchema=L2(t,{}),t.def=n,t.type=n.type,Object.defineProperty(t,"_def",{value:n}),t.check=(...a)=>t.clone(ta(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)=>na(t,a,l),t.brand=()=>t,t.register=((a,l)=>(a.add(t,l),t)),t.parse=(a,l)=>m_(t,a,l,{callee:t.parse}),t.safeParse=(a,l)=>g_(t,a,l),t.parseAsync=async(a,l)=>p_(t,a,l,{callee:t.parseAsync}),t.safeParseAsync=async(a,l)=>y_(t,a,l),t.spa=t.safeParseAsync,t.encode=(a,l)=>v_(t,a,l),t.decode=(a,l)=>b_(t,a,l),t.encodeAsync=async(a,l)=>x_(t,a,l),t.decodeAsync=async(a,l)=>S_(t,a,l),t.safeEncode=(a,l)=>w_(t,a,l),t.safeDecode=(a,l)=>j_(t,a,l),t.safeEncodeAsync=async(a,l)=>N_(t,a,l),t.safeDecodeAsync=async(a,l)=>k_(t,a,l),t.refine=(a,l)=>t.check(bC(a,l)),t.superRefine=a=>t.check(xC(a)),t.overwrite=a=>t.check(Bs(a)),t.optional=()=>Jy(t),t.exactOptional=()=>lC(t),t.nullable=()=>Fy(t),t.nullish=()=>Jy(Fy(t)),t.nonoptional=a=>fC(t,a),t.array=()=>it(t),t.or=a=>F_([t,a]),t.and=a=>eC(t,a),t.transform=a=>Wy(t,aC(a)),t.default=a=>cC(t,a),t.prefault=a=>dC(t,a),t.catch=a=>mC(t,a),t.pipe=a=>Wy(t,a),t.readonly=()=>yC(t),t.describe=a=>{const l=t.clone();return Ll.add(l,{description:a}),l},Object.defineProperty(t,"description",{get(){return Ll.get(t)?.description},configurable:!0}),t.meta=(...a)=>{if(a.length===0)return Ll.get(t);const l=t.clone();return Ll.add(l,a[0]),l},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=a=>a(t),t)),ub=J("_ZodString",(t,n)=>{Vf.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(l,o,u)=>U2(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(S2(...l)),t.includes=(...l)=>t.check(N2(...l)),t.startsWith=(...l)=>t.check(k2(...l)),t.endsWith=(...l)=>t.check(z2(...l)),t.min=(...l)=>t.check(Uo(...l)),t.max=(...l)=>t.check(ab(...l)),t.length=(...l)=>t.check(sb(...l)),t.nonempty=(...l)=>t.check(Uo(1,...l)),t.lowercase=l=>t.check(w2(l)),t.uppercase=l=>t.check(j2(l)),t.trim=()=>t.check(C2()),t.normalize=(...l)=>t.check(_2(...l)),t.toLowerCase=()=>t.check(E2()),t.toUpperCase=()=>t.check(A2()),t.slugify=()=>t.check(T2())}),z_=J("ZodString",(t,n)=>{Vf.init(t,n),ub.init(t,n),t.email=a=>t.check(Kz(__,a)),t.url=a=>t.check(Xz(C_,a)),t.jwt=a=>t.check(d2(H_,a)),t.emoji=a=>t.check(Jz(E_,a)),t.guid=a=>t.check(Ky(Qy,a)),t.uuid=a=>t.check(Yz(jo,a)),t.uuidv4=a=>t.check(Vz(jo,a)),t.uuidv6=a=>t.check(Pz(jo,a)),t.uuidv7=a=>t.check(Qz(jo,a)),t.nanoid=a=>t.check(Fz(A_,a)),t.guid=a=>t.check(Ky(Qy,a)),t.cuid=a=>t.check(Wz(T_,a)),t.cuid2=a=>t.check(e2(O_,a)),t.ulid=a=>t.check(t2(D_,a)),t.base64=a=>t.check(o2(I_,a)),t.base64url=a=>t.check(c2(Z_,a)),t.xid=a=>t.check(n2(R_,a)),t.ksuid=a=>t.check(i2(M_,a)),t.ipv4=a=>t.check(a2(L_,a)),t.ipv6=a=>t.check(s2($_,a)),t.cidrv4=a=>t.check(l2(U_,a)),t.cidrv6=a=>t.check(r2(B_,a)),t.e164=a=>t.check(u2(q_,a)),t.datetime=a=>t.check(l_(a)),t.date=a=>t.check(o_(a)),t.time=a=>t.check(u_(a)),t.duration=a=>t.check(f_(a))});function ee(t){return Gz(z_,t)}const ct=J("ZodStringFormat",(t,n)=>{lt.init(t,n),ub.init(t,n)}),__=J("ZodEmail",(t,n)=>{Jk.init(t,n),ct.init(t,n)}),Qy=J("ZodGUID",(t,n)=>{Qk.init(t,n),ct.init(t,n)}),jo=J("ZodUUID",(t,n)=>{Xk.init(t,n),ct.init(t,n)}),C_=J("ZodURL",(t,n)=>{Fk.init(t,n),ct.init(t,n)}),E_=J("ZodEmoji",(t,n)=>{Wk.init(t,n),ct.init(t,n)}),A_=J("ZodNanoID",(t,n)=>{ez.init(t,n),ct.init(t,n)}),T_=J("ZodCUID",(t,n)=>{tz.init(t,n),ct.init(t,n)}),O_=J("ZodCUID2",(t,n)=>{nz.init(t,n),ct.init(t,n)}),D_=J("ZodULID",(t,n)=>{iz.init(t,n),ct.init(t,n)}),R_=J("ZodXID",(t,n)=>{az.init(t,n),ct.init(t,n)}),M_=J("ZodKSUID",(t,n)=>{sz.init(t,n),ct.init(t,n)}),L_=J("ZodIPv4",(t,n)=>{uz.init(t,n),ct.init(t,n)}),$_=J("ZodIPv6",(t,n)=>{dz.init(t,n),ct.init(t,n)}),U_=J("ZodCIDRv4",(t,n)=>{fz.init(t,n),ct.init(t,n)}),B_=J("ZodCIDRv6",(t,n)=>{hz.init(t,n),ct.init(t,n)}),I_=J("ZodBase64",(t,n)=>{mz.init(t,n),ct.init(t,n)}),Z_=J("ZodBase64URL",(t,n)=>{gz.init(t,n),ct.init(t,n)}),q_=J("ZodE164",(t,n)=>{yz.init(t,n),ct.init(t,n)}),H_=J("ZodJWT",(t,n)=>{bz.init(t,n),ct.init(t,n)}),db=J("ZodNumber",(t,n)=>{eb.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(l,o,u)=>B2(t,l,o),t.gt=(l,o)=>t.check(Vy(l,o)),t.gte=(l,o)=>t.check(Vd(l,o)),t.min=(l,o)=>t.check(Vd(l,o)),t.lt=(l,o)=>t.check(Yy(l,o)),t.lte=(l,o)=>t.check(Yd(l,o)),t.max=(l,o)=>t.check(Yd(l,o)),t.int=l=>t.check(Xy(l)),t.safe=l=>t.check(Xy(l)),t.positive=l=>t.check(Vy(0,l)),t.nonnegative=l=>t.check(Vd(0,l)),t.negative=l=>t.check(Yy(0,l)),t.nonpositive=l=>t.check(Yd(0,l)),t.multipleOf=(l,o)=>t.check(Py(l,o)),t.step=(l,o)=>t.check(Py(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 Zt(t){return g2(db,t)}const G_=J("ZodNumberFormat",(t,n)=>{xz.init(t,n),db.init(t,n)});function Xy(t){return y2(G_,t)}const K_=J("ZodBoolean",(t,n)=>{Sz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>I2(t,a,l)});function Pf(t){return v2(K_,t)}const Y_=J("ZodUnknown",(t,n)=>{wz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>q2()});function of(){return b2(Y_)}const V_=J("ZodNever",(t,n)=>{jz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>Z2(t,a,l)});function P_(t){return x2(V_,t)}const Q_=J("ZodArray",(t,n)=>{Nz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>V2(t,a,l,o),t.element=n.element,t.min=(a,l)=>t.check(Uo(a,l)),t.nonempty=a=>t.check(Uo(1,a)),t.max=(a,l)=>t.check(ab(a,l)),t.length=(a,l)=>t.check(sb(a,l)),t.unwrap=()=>t.element});function it(t,n){return O2(Q_,t,n)}const X_=J("ZodObject",(t,n)=>{zz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>P2(t,a,l,o),Ve(t,"shape",()=>n.shape),t.keyof=()=>qn(Object.keys(t._zod.def.shape)),t.catchall=a=>t.clone({...t._zod.def,catchall:a}),t.passthrough=()=>t.clone({...t._zod.def,catchall:of()}),t.loose=()=>t.clone({...t._zod.def,catchall:of()}),t.strict=()=>t.clone({...t._zod.def,catchall:P_()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=a=>V1(t,a),t.safeExtend=a=>P1(t,a),t.merge=a=>Q1(t,a),t.pick=a=>K1(t,a),t.omit=a=>Y1(t,a),t.partial=(...a)=>X1(fb,t,a[0]),t.required=(...a)=>J1(hb,t,a[0])});function at(t,n){const a={type:"object",shape:t??{},...be(n)};return new X_(a)}const J_=J("ZodUnion",(t,n)=>{_z.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>Q2(t,a,l,o),t.options=n.options});function F_(t,n){return new J_({type:"union",options:t,...be(n)})}const W_=J("ZodIntersection",(t,n)=>{Cz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>X2(t,a,l,o)});function eC(t,n){return new W_({type:"intersection",left:t,right:n})}const tC=J("ZodRecord",(t,n)=>{Ez.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>J2(t,a,l,o),t.keyType=n.keyType,t.valueType=n.valueType});function Qf(t,n,a){return new tC({type:"record",keyType:t,valueType:n,...be(a)})}const cf=J("ZodEnum",(t,n)=>{Az.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(l,o,u)=>H2(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 cf({...n,checks:[],...be(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 cf({...n,checks:[],...be(o),entries:u})}});function qn(t,n){const a=Array.isArray(t)?Object.fromEntries(t.map(l=>[l,l])):t;return new cf({type:"enum",entries:a,...be(n)})}const nC=J("ZodLiteral",(t,n)=>{Tz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>G2(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 Io(t,n){return new nC({type:"literal",values:Array.isArray(t)?t:[t],...be(n)})}const iC=J("ZodTransform",(t,n)=>{Oz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>Y2(t,a),t._zod.parse=(a,l)=>{if(l.direction==="backward")throw new Uv(t.constructor.name);a.addIssue=u=>{if(typeof u=="string")a.issues.push(Hl(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(Hl(d))}};const o=n.transform(a.value,a);return o instanceof Promise?o.then(u=>(a.value=u,a)):(a.value=o,a)}});function aC(t){return new iC({type:"transform",transform:t})}const fb=J("ZodOptional",(t,n)=>{ib.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>cb(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function Jy(t){return new fb({type:"optional",innerType:t})}const sC=J("ZodExactOptional",(t,n)=>{Dz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>cb(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function lC(t){return new sC({type:"optional",innerType:t})}const rC=J("ZodNullable",(t,n)=>{Rz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>F2(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function Fy(t){return new rC({type:"nullable",innerType:t})}const oC=J("ZodDefault",(t,n)=>{Mz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>e_(t,a,l,o),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function cC(t,n){return new oC({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():qv(n)}})}const uC=J("ZodPrefault",(t,n)=>{Lz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>t_(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function dC(t,n){return new uC({type:"prefault",innerType:t,get defaultValue(){return typeof n=="function"?n():qv(n)}})}const hb=J("ZodNonOptional",(t,n)=>{$z.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>W2(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function fC(t,n){return new hb({type:"nonoptional",innerType:t,...be(n)})}const hC=J("ZodCatch",(t,n)=>{Uz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>n_(t,a,l,o),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function mC(t,n){return new hC({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}const pC=J("ZodPipe",(t,n)=>{Bz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>i_(t,a,l,o),t.in=n.in,t.out=n.out});function Wy(t,n){return new pC({type:"pipe",in:t,out:n})}const gC=J("ZodReadonly",(t,n)=>{Iz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>a_(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function yC(t){return new gC({type:"readonly",innerType:t})}const vC=J("ZodCustom",(t,n)=>{Zz.init(t,n),ot.init(t,n),t._zod.processJSONSchema=(a,l,o)=>K2(t,a)});function bC(t,n={}){return D2(vC,t,n)}function xC(t){return R2(t)}at({maxConcurrency:Zt().int().positive(),maxRequestsPerMinute:Zt().int().positive(),maxRequestsPerDay:Zt().int().positive()});const SC=["gemini","openai","claude","local"],oc=qn(SC),mb=at({label:ee().min(1),city:ee().min(1),region:ee().min(1),country:ee().length(2),timezone:ee().optional()}),pb=qn(["citation.lost","citation.gained","run.completed","run.failed"]);at({id:ee(),projectId:ee(),channel:Io("webhook"),url:ee().url(),events:it(pb),enabled:Pf().default(!0),webhookSecret:ee().optional(),createdAt:ee(),updatedAt:ee()});const wC=at({name:ee().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:Qf(ee(),ee()).optional().default({})}),jC=at({preset:ee().optional(),cron:ee().optional(),timezone:ee().optional().default("UTC"),providers:it(oc).optional().default([])}).refine(t=>t.preset&&!t.cron||!t.preset&&t.cron,{message:'Exactly one of "preset" or "cron" must be provided'}).optional(),NC=at({channel:Io("webhook"),url:ee().url(),events:it(pb).min(1)}),kC=at({gsc:at({propertyUrl:ee()}).optional(),syncSchedule:at({preset:ee().optional(),cron:ee().optional()}).optional()}).optional(),zC=at({displayName:ee().min(1),canonicalDomain:ee().min(1),ownedDomains:it(ee().min(1)).optional().default([]),country:ee().length(2),language:ee().min(2),keywords:it(ee().min(1)).optional().default([]),competitors:it(ee().min(1)).optional().default([]),providers:it(oc).optional().default([]),locations:it(mb).optional().default([]),defaultLocation:ee().optional(),schedule:jC,notifications:it(NC).optional().default([]),google:kC});at({apiVersion:Io("canonry/v1"),kind:Io("Project"),metadata:wC,spec:zC});const _C=qn(["gsc","ga4"]);at({id:ee(),domain:ee(),connectionType:_C,propertyId:ee().nullable().optional(),scopes:it(ee()).default([]),createdAt:ee(),updatedAt:ee()});at({date:ee(),query:ee(),page:ee(),country:ee().nullable().optional(),device:ee().nullable().optional(),clicks:Zt(),impressions:Zt(),ctr:Zt(),position:Zt()});const uf=at({id:ee(),url:ee(),indexingState:ee().nullable().optional(),verdict:ee().nullable().optional(),coverageState:ee().nullable().optional(),pageFetchState:ee().nullable().optional(),robotsTxtState:ee().nullable().optional(),crawlTime:ee().nullable().optional(),lastCrawlResult:ee().nullable().optional(),isMobileFriendly:Pf().nullable().optional(),richResults:it(ee()).default([]),inspectedAt:ee()});qn(["stable","reindexed","deindexed","still-missing","new"]);const CC=at({url:ee(),previousState:ee().nullable(),currentState:ee().nullable(),transitionDate:ee()}),EC=at({reason:ee(),count:Zt(),urls:it(uf).default([])});at({summary:at({total:Zt(),indexed:Zt(),notIndexed:Zt(),deindexed:Zt(),percentage:Zt()}),lastInspectedAt:ee().nullable(),indexed:it(uf).default([]),notIndexed:it(uf).default([]),deindexed:it(CC).default([]),reasonGroups:it(EC).default([])});at({date:ee(),indexed:Zt(),notIndexed:Zt(),reasonBreakdown:Qf(ee(),Zt()).default({})});const AC=qn(["cli","api","config-file"]);at({id:ee(),name:ee(),displayName:ee().optional(),canonicalDomain:ee(),ownedDomains:it(ee()).default([]),country:ee().length(2),language:ee().min(2),tags:it(ee()).default([]),labels:Qf(ee(),ee()).default({}),locations:it(mb).default([]),defaultLocation:ee().nullable().optional(),configSource:AC.default("cli"),configRevision:Zt().int().positive().default(1),createdAt:ee().optional(),updatedAt:ee().optional()});function df(t){let n=t.trim().toLowerCase();try{n.includes("://")&&(n=new URL(n).hostname.toLowerCase())}catch{}return n.replace(/^www\./,"")}function TC(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=df(u);a.has(d)||(a.add(d),l.push(u))}return l}const OC=qn(["queued","running","completed","partial","failed"]),DC=qn(["answer-visibility","site-audit","gsc-sync","inspect-sitemap"]),RC=qn(["manual","scheduled","config-apply"]),MC=qn(["cited","not-cited"]),LC=qn(["new","cited","lost","emerging","not-cited"]);at({id:ee(),projectId:ee(),kind:DC,status:OC,trigger:RC.default("manual"),location:ee().nullable().optional(),startedAt:ee().nullable().optional(),finishedAt:ee().nullable().optional(),error:ee().nullable().optional(),createdAt:ee()});const $C=at({uri:ee(),title:ee()});at({id:ee(),runId:ee(),keywordId:ee(),keyword:ee().optional(),provider:oc,citationState:MC,transition:LC.optional(),answerText:ee().nullable().optional(),citedDomains:it(ee()).default([]),competitorOverlap:it(ee()).default([]),groundingSources:it($C).default([]),searchQueries:it(ee()).default([]),model:ee().nullable().optional(),location:ee().nullable().optional(),createdAt:ee()});at({id:ee(),projectId:ee().nullable().optional(),actor:ee(),action:ee(),entityType:ee(),entityId:ee().nullable().optional(),diff:of().optional(),createdAt:ee()});at({id:ee(),projectId:ee(),cronExpr:ee(),preset:ee().nullable().optional(),timezone:ee().default("UTC"),enabled:Pf().default(!0),providers:it(oc).default([]),lastRunAt:ee().nullable().optional(),nextRunAt:ee().nullable().optional(),createdAt:ee(),updatedAt:ee()});function gb(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=gb(t[n]))&&(l&&(l+=" "),l+=a)}else for(a in t)t[a]&&(l&&(l+=" "),l+=a);return l}function yb(){for(var t,n,a=0,l="",o=arguments.length;a<o;a++)(t=arguments[a])&&(n=gb(t))&&(l&&(l+=" "),l+=n);return l}const e0=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,t0=yb,vb=(t,n)=>a=>{var l;if(n?.variants==null)return t0(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 S=e0(b)||e0(v);return o[p][S]}),m=a&&Object.entries(a).reduce((p,b)=>{let[v,S]=b;return S===void 0||(p[v]=S),p},{}),g=n==null||(l=n.compoundVariants)===null||l===void 0?void 0:l.reduce((p,b)=>{let{class:v,className:S,...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,S]:p},[]);return t0(t,d,g,a?.class,a?.className)},UC=(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},BC=(t,n)=>({classGroupId:t,validator:n}),bb=(t=new Map,n=null,a)=>({nextPart:t,validators:n,classGroupId:a}),Zo="-",n0=[],IC="arbitrary..",ZC=t=>{const n=HC(t),{conflictingClassGroups:a,conflictingClassGroupModifiers:l}=t;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return qC(d);const m=d.split(Zo),g=m[0]===""&&m.length>1?1:0;return xb(m,g,n)},getConflictingClassGroupIds:(d,m)=>{if(m){const g=l[d],p=a[d];return g?p?UC(p,g):g:p||n0}return a[d]||n0}}},xb=(t,n,a)=>{if(t.length-n===0)return a.classGroupId;const o=t[n],u=a.nextPart.get(o);if(u){const p=xb(t,n+1,u);if(p)return p}const d=a.validators;if(d===null)return;const m=n===0?t.join(Zo):t.slice(n).join(Zo),g=d.length;for(let p=0;p<g;p++){const b=d[p];if(b.validator(m))return b.classGroupId}},qC=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?IC+l:void 0})(),HC=t=>{const{theme:n,classGroups:a}=t;return GC(a,n)},GC=(t,n)=>{const a=bb();for(const l in t){const o=t[l];Xf(o,a,l,n)}return a},Xf=(t,n,a,l)=>{const o=t.length;for(let u=0;u<o;u++){const d=t[u];KC(d,n,a,l)}},KC=(t,n,a,l)=>{if(typeof t=="string"){YC(t,n,a);return}if(typeof t=="function"){VC(t,n,a,l);return}PC(t,n,a,l)},YC=(t,n,a)=>{const l=t===""?n:Sb(n,t);l.classGroupId=a},VC=(t,n,a,l)=>{if(QC(t)){Xf(t(l),n,a,l);return}n.validators===null&&(n.validators=[]),n.validators.push(BC(a,t))},PC=(t,n,a,l)=>{const o=Object.entries(t),u=o.length;for(let d=0;d<u;d++){const[m,g]=o[d];Xf(g,Sb(n,m),a,l)}},Sb=(t,n)=>{let a=t;const l=n.split(Zo),o=l.length;for(let u=0;u<o;u++){const d=l[u];let m=a.nextPart.get(d);m||(m=bb(),a.nextPart.set(d,m)),a=m}return a},QC=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,XC=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)}}},ff="!",i0=":",JC=[],a0=(t,n,a,l,o)=>({modifiers:t,hasImportantModifier:n,baseClassName:a,maybePostfixModifierPosition:l,isExternal:o}),FC=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===i0){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 S=v,N=!1;v.endsWith(ff)?(S=v.slice(0,-1),N=!0):v.startsWith(ff)&&(S=v.slice(1),N=!0);const z=p&&p>g?p-g:void 0;return a0(u,N,S,z)};if(n){const o=n+i0,u=l;l=d=>d.startsWith(o)?u(d.slice(o.length)):a0(JC,!1,d,void 0,!0)}if(a){const o=l;l=u=>a({className:u,parseClassName:o})}return l},WC=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}},eE=t=>({cache:XC(t.cacheSize),parseClassName:FC(t),sortModifiers:WC(t),...ZC(t)}),tE=/\s+/,nE=(t,n)=>{const{parseClassName:a,getClassGroupId:l,getConflictingClassGroupIds:o,sortModifiers:u}=n,d=[],m=t.trim().split(tE);let g="";for(let p=m.length-1;p>=0;p-=1){const b=m[p],{isExternal:v,modifiers:S,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 E=S.length===0?"":S.length===1?S[0]:u(S).join(":"),O=N?E+ff:E,D=O+A;if(d.indexOf(D)>-1)continue;d.push(D);const M=o(A,k);for(let q=0;q<M.length;++q){const V=M[q];d.push(O+V)}g=b+(g.length>0?" "+g:g)}return g},iE=(...t)=>{let n=0,a,l,o="";for(;n<t.length;)(a=t[n++])&&(l=wb(a))&&(o&&(o+=" "),o+=l);return o},wb=t=>{if(typeof t=="string")return t;let n,a="";for(let l=0;l<t.length;l++)t[l]&&(n=wb(t[l]))&&(a&&(a+=" "),a+=n);return a},aE=(t,...n)=>{let a,l,o,u;const d=g=>{const p=n.reduce((b,v)=>v(b),t());return a=eE(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=nE(g,a);return o(g,b),b};return u=d,(...g)=>u(iE(...g))},sE=[],Tt=t=>{const n=a=>a[t]||sE;return n.isThemeGetter=!0,n},jb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Nb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lE=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,rE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oE=/\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$/,cE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,uE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yi=t=>lE.test(t),Te=t=>!!t&&!Number.isNaN(Number(t)),Vi=t=>!!t&&Number.isInteger(Number(t)),Pd=t=>t.endsWith("%")&&Te(t.slice(0,-1)),pi=t=>rE.test(t),kb=()=>!0,fE=t=>oE.test(t)&&!cE.test(t),Jf=()=>!1,hE=t=>uE.test(t),mE=t=>dE.test(t),pE=t=>!pe(t)&&!ge(t),gE=t=>ia(t,Cb,Jf),pe=t=>jb.test(t),Sa=t=>ia(t,Eb,fE),s0=t=>ia(t,NE,Te),yE=t=>ia(t,Tb,kb),vE=t=>ia(t,Ab,Jf),l0=t=>ia(t,zb,Jf),bE=t=>ia(t,_b,mE),No=t=>ia(t,Ob,hE),ge=t=>Nb.test(t),Rl=t=>Aa(t,Eb),xE=t=>Aa(t,Ab),r0=t=>Aa(t,zb),SE=t=>Aa(t,Cb),wE=t=>Aa(t,_b),ko=t=>Aa(t,Ob,!0),jE=t=>Aa(t,Tb,!0),ia=(t,n,a)=>{const l=jb.exec(t);return l?l[1]?n(l[1]):a(l[2]):!1},Aa=(t,n,a=!1)=>{const l=Nb.exec(t);return l?l[1]?n(l[1]):a:!1},zb=t=>t==="position"||t==="percentage",_b=t=>t==="image"||t==="url",Cb=t=>t==="length"||t==="size"||t==="bg-size",Eb=t=>t==="length",NE=t=>t==="number",Ab=t=>t==="family-name",Tb=t=>t==="number"||t==="weight",Ob=t=>t==="shadow",kE=()=>{const t=Tt("color"),n=Tt("font"),a=Tt("text"),l=Tt("font-weight"),o=Tt("tracking"),u=Tt("leading"),d=Tt("breakpoint"),m=Tt("container"),g=Tt("spacing"),p=Tt("radius"),b=Tt("shadow"),v=Tt("inset-shadow"),S=Tt("text-shadow"),N=Tt("drop-shadow"),z=Tt("blur"),j=Tt("perspective"),k=Tt("aspect"),A=Tt("ease"),E=Tt("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...D(),ge,pe],q=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],R=()=>[ge,pe,g],Q=()=>[Yi,"full","auto",...R()],Se=()=>[Vi,"none","subgrid",ge,pe],le=()=>["auto",{span:["full",Vi,ge,pe]},Vi,ge,pe],ue=()=>[Vi,"auto",ge,pe],Ae=()=>["auto","min","max","fr",ge,pe],Be=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Re=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...R()],K=()=>[Yi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],se=()=>[Yi,"screen","full","dvw","lvw","svw","min","max","fit",...R()],fe=()=>[Yi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],te=()=>[t,ge,pe],C=()=>[...D(),r0,l0,{position:[ge,pe]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ne=()=>["auto","cover","contain",SE,gE,{size:[ge,pe]}],F=()=>[Pd,Rl,Sa],ce=()=>["","none","full",p,ge,pe],he=()=>["",Te,Rl,Sa],we=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Te,Pd,r0,l0],Ie=()=>["","none",z,ge,pe],re=()=>["none",Te,ge,pe],Ue=()=>["none",Te,ge,pe],Ct=()=>[Te,ge,pe],ut=()=>[Yi,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pi],breakpoint:[pi],color:[kb],container:[pi],"drop-shadow":[pi],ease:["in","out","in-out"],font:[pE],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pi],shadow:[pi],spacing:["px",Te],text:[pi],"text-shadow":[pi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Yi,pe,ge,k]}],container:["container"],columns:[{columns:[Te,pe,ge,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:M()}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{"inset-s":Q(),start:Q()}],end:[{"inset-e":Q(),end:Q()}],"inset-bs":[{"inset-bs":Q()}],"inset-be":[{"inset-be":Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[Vi,"auto",ge,pe]}],basis:[{basis:[Yi,"full","auto",m,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,Yi,"auto","initial","none",pe]}],grow:[{grow:["",Te,ge,pe]}],shrink:[{shrink:["",Te,ge,pe]}],order:[{order:[Vi,"first","last","none",ge,pe]}],"grid-cols":[{"grid-cols":Se()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":Se()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ae()}],"auto-rows":[{"auto-rows":Ae()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...Be(),"normal"]}],"justify-items":[{"justify-items":[...Re(),"normal"]}],"justify-self":[{"justify-self":["auto",...Re()]}],"align-content":[{content:["normal",...Be()]}],"align-items":[{items:[...Re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Re(),{baseline:["","last"]}]}],"place-content":[{"place-content":Be()}],"place-items":[{"place-items":[...Re(),"baseline"]}],"place-self":[{"place-self":["auto",...Re()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mbs:[{mbs:I()}],mbe:[{mbe:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],"inline-size":[{inline:["auto",...se()]}],"min-inline-size":[{"min-inline":["auto",...se()]}],"max-inline-size":[{"max-inline":["none",...se()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[m,"screen",...K()]}],"min-w":[{"min-w":[m,"screen","none",...K()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",a,Rl,Sa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,jE,yE]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Pd,pe]}],"font-family":[{font:[xE,vE,n]}],"font-features":[{"font-features":[pe]}],"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,ge,pe]}],"line-clamp":[{"line-clamp":[Te,"none",ge,s0]}],leading:[{leading:[u,...R()]}],"list-image":[{"list-image":["none",ge,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:te()}],"text-color":[{text:te()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",ge,Sa]}],"text-decoration-color":[{decoration:te()}],"underline-offset":[{"underline-offset":[Te,"auto",ge,pe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,pe]}],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",ge,pe]}],"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:H()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Vi,ge,pe],radial:["",ge,pe],conic:[Vi,ge,pe]},wE,bE]}],"bg-color":[{bg:te()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:te()}],"gradient-via":[{via:te()}],"gradient-to":[{to:te()}],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:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:te()}],"border-color-x":[{"border-x":te()}],"border-color-y":[{"border-y":te()}],"border-color-s":[{"border-s":te()}],"border-color-e":[{"border-e":te()}],"border-color-bs":[{"border-bs":te()}],"border-color-be":[{"border-be":te()}],"border-color-t":[{"border-t":te()}],"border-color-r":[{"border-r":te()}],"border-color-b":[{"border-b":te()}],"border-color-l":[{"border-l":te()}],"divide-color":[{divide:te()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,ge,pe]}],"outline-w":[{outline:["",Te,Rl,Sa]}],"outline-color":[{outline:te()}],shadow:[{shadow:["","none",b,ko,No]}],"shadow-color":[{shadow:te()}],"inset-shadow":[{"inset-shadow":["none",v,ko,No]}],"inset-shadow-color":[{"inset-shadow":te()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:te()}],"ring-offset-w":[{"ring-offset":[Te,Sa]}],"ring-offset-color":[{"ring-offset":te()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":te()}],"text-shadow":[{"text-shadow":["none",S,ko,No]}],"text-shadow-color":[{"text-shadow":te()}],opacity:[{opacity:[Te,ge,pe]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],"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":[Te]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":te()}],"mask-image-linear-to-color":[{"mask-linear-to":te()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":te()}],"mask-image-t-to-color":[{"mask-t-to":te()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":te()}],"mask-image-r-to-color":[{"mask-r-to":te()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":te()}],"mask-image-b-to-color":[{"mask-b-to":te()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":te()}],"mask-image-l-to-color":[{"mask-l-to":te()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":te()}],"mask-image-x-to-color":[{"mask-x-to":te()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":te()}],"mask-image-y-to-color":[{"mask-y-to":te()}],"mask-image-radial":[{"mask-radial":[ge,pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":te()}],"mask-image-radial-to-color":[{"mask-radial-to":te()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":te()}],"mask-image-conic-to-color":[{"mask-conic-to":te()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:C()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,pe]}],filter:[{filter:["","none",ge,pe]}],blur:[{blur:Ie()}],brightness:[{brightness:[Te,ge,pe]}],contrast:[{contrast:[Te,ge,pe]}],"drop-shadow":[{"drop-shadow":["","none",N,ko,No]}],"drop-shadow-color":[{"drop-shadow":te()}],grayscale:[{grayscale:["",Te,ge,pe]}],"hue-rotate":[{"hue-rotate":[Te,ge,pe]}],invert:[{invert:["",Te,ge,pe]}],saturate:[{saturate:[Te,ge,pe]}],sepia:[{sepia:["",Te,ge,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,pe]}],"backdrop-blur":[{"backdrop-blur":Ie()}],"backdrop-brightness":[{"backdrop-brightness":[Te,ge,pe]}],"backdrop-contrast":[{"backdrop-contrast":[Te,ge,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,ge,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,ge,pe]}],"backdrop-invert":[{"backdrop-invert":["",Te,ge,pe]}],"backdrop-opacity":[{"backdrop-opacity":[Te,ge,pe]}],"backdrop-saturate":[{"backdrop-saturate":[Te,ge,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,ge,pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",ge,pe]}],ease:[{ease:["linear","initial",A,ge,pe]}],delay:[{delay:[Te,ge,pe]}],animate:[{animate:["none",E,ge,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,ge,pe]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:Ue()}],"scale-x":[{"scale-x":Ue()}],"scale-y":[{"scale-y":Ue()}],"scale-z":[{"scale-z":Ue()}],"scale-3d":["scale-3d"],skew:[{skew:Ct()}],"skew-x":[{"skew-x":Ct()}],"skew-y":[{"skew-y":Ct()}],transform:[{transform:[ge,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ut()}],"translate-x":[{"translate-x":ut()}],"translate-y":[{"translate-y":ut()}],"translate-z":[{"translate-z":ut()}],"translate-none":["translate-none"],accent:[{accent:te()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:te()}],"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",ge,pe]}],"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":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",ge,pe]}],fill:[{fill:["none",...te()]}],"stroke-w":[{stroke:[Te,Rl,Sa,s0]}],stroke:[{stroke:["none",...te()]}],"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"]}},zE=aE(kE);function Dn(...t){return zE(yb(t))}const _E=vb("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 Db({className:t,variant:n,...a}){return c.jsx("div",{className:Dn(_E({variant:n}),t),...a})}var CE=Symbol.for("react.lazy"),qo=gf[" use ".trim().toString()];function EE(t){return typeof t=="object"&&t!==null&&"then"in t}function Rb(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===CE&&"_payload"in t&&EE(t._payload)}function AE(t){const n=OE(t),a=w.forwardRef((l,o)=>{let{children:u,...d}=l;Rb(u)&&typeof qo=="function"&&(u=qo(u._payload));const m=w.Children.toArray(u),g=m.find(RE);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 TE=AE("Slot");function OE(t){const n=w.forwardRef((a,l)=>{let{children:o,...u}=a;if(Rb(o)&&typeof qo=="function"&&(o=qo(o._payload)),w.isValidElement(o)){const d=LE(o),m=ME(u,o.props);return o.type!==w.Fragment&&(m.ref=l?Of(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 DE=Symbol("radix.slottable");function RE(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===DE}function ME(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 LE(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 $E=vb("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"}}),de=w.forwardRef(({className:t,variant:n,size:a,asChild:l=!1,...o},u)=>{const d=l?TE:"button";return c.jsx(d,{ref:u,className:Dn($E({variant:n,size:a,className:t})),...o})});de.displayName="Button";const Ye=w.forwardRef(({className:t,...n},a)=>c.jsx("div",{ref:a,className:Dn("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}));Ye.displayName="Card";const UE=w.forwardRef(({className:t,...n},a)=>c.jsx("div",{ref:a,className:Dn("flex flex-col gap-1.5 p-5",t),...n}));UE.displayName="CardHeader";const BE=w.forwardRef(({className:t,...n},a)=>c.jsx("h3",{ref:a,className:Dn("font-medium tracking-tight text-zinc-50",t),...n}));BE.displayName="CardTitle";const IE=w.forwardRef(({className:t,...n},a)=>c.jsx("p",{ref:a,className:Dn("text-sm text-zinc-500",t),...n}));IE.displayName="CardDescription";const ZE=w.forwardRef(({className:t,...n},a)=>c.jsx("div",{ref:a,className:Dn("p-5 pt-0",t),...n}));ZE.displayName="CardContent";const qE=Dv,HE=Rv,Mb=w.forwardRef(({className:t,...n},a)=>c.jsx(Lf,{ref:a,className:Dn("fixed inset-0 z-50 bg-black/70 backdrop-blur-sm",t),...n}));Mb.displayName=Lf.displayName;const GE=400,KE=1200,YE=720,Lb=w.forwardRef(({className:t,children:n,...a},l)=>{const[o,u]=w.useState(YE),d=w.useRef(!1),m=w.useRef(0),g=w.useRef(0),p=w.useCallback(S=>{d.current=!0,m.current=S.clientX,g.current=o,S.target.setPointerCapture(S.pointerId),S.preventDefault()},[o]),b=w.useCallback(S=>{if(!d.current)return;const N=m.current-S.clientX,z=Math.min(KE,Math.max(GE,g.current+N));u(z)},[]),v=w.useCallback(()=>{d.current=!1},[]);return c.jsxs(HE,{children:[c.jsx(Mb,{}),c.jsxs($f,{ref:l,className:Dn("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(Lv,{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(If,{className:"size-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});Lb.displayName=$f.displayName;const VE=({className:t,...n})=>c.jsx("div",{className:Dn("flex flex-col gap-1.5 pr-10",t),...n}),$b=w.forwardRef(({className:t,...n},a)=>c.jsx(Uf,{ref:a,className:Dn("text-lg font-medium text-zinc-50",t),...n}));$b.displayName=Uf.displayName;const Ub=w.forwardRef(({className:t,...n},a)=>c.jsx(Mv,{ref:a,className:Dn("text-sm text-zinc-500",t),...n}));Ub.displayName=Mv.displayName;function Un(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 As=[{id:"project_citypoint",name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",ownedDomains:[],country:"US",language:"en",tags:["local intent","priority"],labels:{},locations:[],defaultLocation:null,configSource:"cli",configRevision:1},{id:"project_harbor",name:"Harbor Legal Group",canonicalDomain:"harborlegal.com",ownedDomains:[],country:"US",language:"en",tags:["lead gen"],labels:{},locations:[],defaultLocation:null,configSource:"cli",configRevision:1},{id:"project_northstar",name:"Northstar Orthopedics",canonicalDomain:"northstarortho.com",ownedDomains:[],country:"US",language:"en",tags:["multi-location"],labels:{},locations:[],defaultLocation:null,configSource:"cli",configRevision:1}];function cc(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 Ho=cc({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"}),Ff=cc({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"}),Wf=cc({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"}),Go=cc({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"}),PE=[Ff,Ho,Wf,Go],QE=[{id:"evidence_citypoint_emergency_gemini",keyword:"emergency dentist brooklyn",provider:"gemini",model:"gemini-3-flash",location:null,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:Un(["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",location:null,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:Un(["not-cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_emergency_claude",keyword:"emergency dentist brooklyn",provider:"claude",model:"claude-sonnet-4-6",location:null,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:Un(["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",location:null,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:Un(["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",location:null,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:Un(["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",location:null,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:Un(["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",location:null,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:Un(["not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_gemini",keyword:"pediatric dentist brooklyn heights",provider:"gemini",model:"gemini-3-flash",location:null,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:Un(["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",location:null,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:Un(["not-cited","not-cited","not-cited","not-cited","not-cited","cited"])}],XE=[{project:As[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:QE,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:[Ff,Ho]},{project:As[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",location:null,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:Un(["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:[Wf]},{project:As[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",location:null,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:Un(["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:[Go]}],JE={portfolioOverview:{projects:[{project:As[0],visibilityScore:61,visibilityDelta:"-8 this week",lastRun:Ho,insight:"Lost emergency-intent citations after competitors refreshed availability pages.",trend:[73,71,69,66,61],competitorPressureLabel:"High"},{project:As[1],visibilityScore:74,visibilityDelta:"+2 this week",lastRun:Wf,insight:"Practice-area consolidation is stabilizing branded and informational prompts.",trend:[68,70,71,73,74],competitorPressureLabel:"Moderate"},{project:As[2],visibilityScore:58,visibilityDelta:"Run in progress",lastRun:Go,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:[Ff,Go,Ho],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:XE,runs:PE,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."}},FE={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 WE(t={}){const n=structuredClone(JE),a=structuredClone(FE);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 Bb(t,n){return t.projects.find(a=>a.project.id===n)}function eA(t,n){return t.runs.find(a=>a.id===n)}function tA(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 nA="/api/v1";function iA(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.apiKey?window.__CANONRY_CONFIG__.apiKey:""}async function ze(t,n){const a=iA(),l=await fetch(`${nA}${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 aA(){return ze("/projects")}function Ib(t){return ze(`/projects/${encodeURIComponent(t)}`)}function sA(){return ze("/runs")}function Gl(t){return ze(`/runs/${encodeURIComponent(t)}`)}function lA(t){return ze(`/projects/${encodeURIComponent(t)}/keywords`)}function Zb(t){return ze(`/projects/${encodeURIComponent(t)}/competitors`)}function qb(t,n){const a=new URLSearchParams;n!==void 0&&a.set("location",n);const l=a.toString();return ze(`/projects/${encodeURIComponent(t)}/timeline${l?`?${l}`:""}`)}function uc(t,n){return ze(`/projects/${encodeURIComponent(t)}`,{method:"PUT",body:JSON.stringify(n)})}function rA(t,n){return ze(`/projects/${encodeURIComponent(t)}/keywords`,{method:"PUT",body:JSON.stringify({keywords:n})})}function oA(t,n){return ze(`/projects/${encodeURIComponent(t)}/keywords`,{method:"DELETE",body:JSON.stringify({keywords:n})})}function cA(t,n){return ze(`/projects/${encodeURIComponent(t)}/keywords`,{method:"POST",body:JSON.stringify({keywords:n})})}function Hb(t,n){return ze(`/projects/${encodeURIComponent(t)}/competitors`,{method:"PUT",body:JSON.stringify({competitors:n})})}async function uA(t,n){const a=await Ib(t);return uc(t,{displayName:a.displayName,canonicalDomain:a.canonicalDomain,ownedDomains:n,country:a.country,language:a.language,tags:a.tags,labels:a.labels,providers:a.providers,locations:a.locations,defaultLocation:a.defaultLocation})}async function dA(t,n){const a=await Ib(t);return uc(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,locations:n.locations??a.locations,defaultLocation:n.defaultLocation!==void 0?n.defaultLocation:a.defaultLocation})}function Gb(t,n){const a={};return ze(`/projects/${encodeURIComponent(t)}/runs`,{method:"POST",body:JSON.stringify(a)})}function fA(t,n){return ze(`/projects/${encodeURIComponent(t)}/locations`,{method:"POST",body:JSON.stringify(n)})}async function hA(t,n){await ze(`/projects/${encodeURIComponent(t)}/locations/${encodeURIComponent(n)}`,{method:"DELETE"})}function mA(t,n){return ze(`/projects/${encodeURIComponent(t)}/locations/default`,{method:"PUT",body:JSON.stringify({label:n})})}async function pA(t){await ze(`/projects/${encodeURIComponent(t)}`,{method:"DELETE",body:"{}"})}function gA(t){return ze(`/projects/${encodeURIComponent(t)}/export`)}function Kb(){return ze("/settings")}function yA(t,n){return ze(`/settings/providers/${encodeURIComponent(t)}`,{method:"PUT",body:JSON.stringify(n)})}function vA(t){return ze("/settings/google",{method:"PUT",body:JSON.stringify(t)})}async function bA(t){try{return await ze(`/projects/${encodeURIComponent(t)}/schedule`)}catch(n){if(n instanceof Error&&n.message.includes("404"))return null;throw n}}function o0(t,n){return ze(`/projects/${encodeURIComponent(t)}/schedule`,{method:"PUT",body:JSON.stringify(n)})}async function xA(t){await ze(`/projects/${encodeURIComponent(t)}/schedule`,{method:"DELETE",body:"{}"})}function SA(t){return ze(`/projects/${encodeURIComponent(t)}/notifications`)}function wA(t,n){return ze(`/projects/${encodeURIComponent(t)}/notifications`,{method:"POST",body:JSON.stringify(n)})}async function jA(t,n){await ze(`/projects/${encodeURIComponent(t)}/notifications/${encodeURIComponent(n)}`,{method:"DELETE",body:"{}"})}function NA(t,n){return ze(`/projects/${encodeURIComponent(t)}/notifications/${encodeURIComponent(n)}/test`,{method:"POST",body:"{}"})}function kA(t,n,a){return ze(`/projects/${encodeURIComponent(t)}/keywords/generate`,{method:"POST",body:JSON.stringify({provider:n,count:a})})}function zA(t){return ze("/apply",{method:"POST",body:JSON.stringify(t)})}function _A(t){return ze("/runs",{method:"POST",body:JSON.stringify({})})}function CA(t){return ze(`/projects/${encodeURIComponent(t)}/google/connections`)}function EA(t,n){return ze(`/projects/${encodeURIComponent(t)}/google/connect`,{method:"POST",body:JSON.stringify({type:n})})}function AA(t,n){return ze(`/projects/${encodeURIComponent(t)}/google/connections/${encodeURIComponent(n)}`,{method:"DELETE",body:"{}"})}function TA(t){return ze(`/projects/${encodeURIComponent(t)}/google/properties`)}function OA(t,n,a){return ze(`/projects/${encodeURIComponent(t)}/google/connections/${encodeURIComponent(n)}/property`,{method:"PUT",body:JSON.stringify({propertyId:a})})}function DA(t,n){return ze(`/projects/${encodeURIComponent(t)}/google/gsc/sync`,{method:"POST",body:JSON.stringify(n??{})})}function RA(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 ze(`/projects/${encodeURIComponent(t)}/google/gsc/performance${l}`)}function MA(t,n){return ze(`/projects/${encodeURIComponent(t)}/google/gsc/inspect`,{method:"POST",body:JSON.stringify({url:n})})}function LA(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 ze(`/projects/${encodeURIComponent(t)}/google/gsc/inspections${l}`)}function $A(t){return ze(`/projects/${encodeURIComponent(t)}/google/gsc/deindexed`)}function UA(t){return ze(`/projects/${encodeURIComponent(t)}/google/gsc/coverage`)}function BA(t,n){const a=new URLSearchParams,l=a.toString()?`?${a.toString()}`:"";return ze(`/projects/${encodeURIComponent(t)}/google/gsc/coverage/history${l}`)}function IA(t,n){return ze(`/projects/${encodeURIComponent(t)}/google/gsc/inspect-sitemap`,{method:"POST",body:JSON.stringify(n??{})})}function Yb(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,locations:t.locations??[],defaultLocation:t.defaultLocation??null,configSource:t.configSource,configRevision:t.configRevision,createdAt:t.createdAt,updatedAt:t.updatedAt}}function c0(t){try{return new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return t}}function ZA(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 Vb(t){return t==="answer-visibility"?"Answer visibility sweep":t}function qA(t){return t==="manual"?"Manual":t==="scheduled"?"Scheduled":t==="config-apply"?"Config apply":t}function eh(t,n){return{id:t.id,projectId:t.projectId,projectName:n,kind:t.kind,kindLabel:Vb(t.kind),status:t.status,trigger:t.trigger??"manual",location:t.location??null,createdAt:t.createdAt,startedAt:t.startedAt?c0(t.startedAt):c0(t.createdAt),duration:ZA(t.startedAt,t.finishedAt),statusDetail:t.error?Pb(t.error):HA(t),summary:GA(t),triggerLabel:qA(t.trigger)}}function Pb(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 HA(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?Pb(t.error):"Run failed.";default:return""}}function GA(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 KA(t){return t>=70?"positive":t>=40?"caution":"negative"}function YA(t){return t==="High"?"negative":t==="Moderate"?"caution":"neutral"}function Xb(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 VA(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",S=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,E=p.providerRuns?.[N],O=(E?.length?E:null)??(A?.length?A:null),D=E?.length?"provider":A?.length?"model":"keyword",M=O?O.at(-1).transition:v,q=M==="lost"?"lost":M==="emerging"?"emerging":z?z.citationState==="cited"?"cited":"not-cited":S,V=hf(O||p.runs),R=PA(p,N),Q=(O??p.runs).map(Ae=>({runId:Ae.runId,citationState:Ae.citationState,createdAt:Ae.createdAt,model:R.get(Ae.runId)??null})),Se=QA(Q),le=D==="provider"&&Se.length<=1?"model":D,ue=XA(Q);o.push({id:`evidence_${t}_${u++}`,keyword:p.keyword,provider:z?.provider??N,model:z?.model??null,location:z?.location??null,citationState:q,changeLabel:JA(M,V),answerSnippet:z?.answerText??"",citedDomains:z?.citedDomains??[],evidenceUrls:[],competitorDomains:z?.competitorOverlap??[],relatedTechnicalSignals:[],groundingSources:z?.groundingSources??[],summary:FA(q,p.keyword),runHistory:Q,historyScope:le,modelsSeen:Se,modelTransitions:ue})}}}for(const m of l)d.has(m.keyword)||o.push({id:`evidence_${t}_${u++}`,keyword:m.keyword,provider:"",model:null,location: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:[],historyScope:"keyword",modelsSeen:[],modelTransitions:[]});return o}function PA(t,n){const a=new Map,l=`${n}:`;for(const[o,u]of Object.entries(t.modelRuns??{})){if(!o.startsWith(l))continue;const d=o.slice(l.length),m=d==="unknown"?null:d;for(const g of u)a.set(g.runId,m)}return a}function QA(t){const n=new Set;for(const a of t)a.model&&n.add(a.model);return[...n]}function XA(t){const n=[];let a=null;for(const l of t){const o=l.model??null;o!==a&&a!==null&&n.push({runId:l.runId,createdAt:l.createdAt,fromModel:a,toModel:o}),a=o}return n}function hf(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 JA(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 FA(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 u0(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 Qd=3;function WA(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=u0(l,u),b=u0(o,u);for(const A of u){const E=p.get(A)??new Set,O=b.get(A)??new Set,D=[...E].filter(M=>!O.has(M));D.length>0&&d.push({id:`insight_comp_gained_${A}`,tone:"negative",title:`${A} appeared on ${D.length} keyword${D.length>1?"s":""}`,detail:"A tracked competitor gained new citations.",actionLabel:"Competitor",affectedPhrases:D.map(M=>{const q=n.find(V=>V.keyword===M);return{keyword:M,evidenceId:q?.id??"",citationState:"cited"}})})}const v=new Map;for(const A of a){const E=A.runs.at(-1);E&&v.set(A.keyword,{transition:E.transition,citationState:E.citationState})}const S=[],N=[],z=new Set;for(const[A,{transition:E,citationState:O}]of v){if(!(E==="emerging"||E==="new"&&O==="cited"))continue;z.add(A);const M=n.find(q=>q.keyword===A&&(q.citationState==="emerging"||q.citationState==="cited"));S.push({keyword:A,evidenceId:M?.id??"",provider:M?.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(E=>E.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})}S.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:S});const j=new Set(n.map(A=>A.keyword)),k=[];for(const A of a){if(!j.has(A.keyword)||A.runs.length<Qd||A.runs.at(-1)?.citationState!=="not-cited")continue;if(hf(A.runs)>=Qd){const D=n.find(M=>M.keyword===A.keyword);k.push({keyword:A.keyword,evidenceId:D?.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 ${Qd}+ 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 E=p.get(A)??new Set,D=[...b.get(A)??new Set].filter(M=>!E.has(M));D.length>0&&d.push({id:`insight_comp_lost_${A}`,tone:"neutral",title:`${A} dropped from ${D.length} keyword${D.length>1?"s":""}`,detail:"A tracked competitor lost citations.",actionLabel:"Competitor",affectedPhrases:D.map(M=>{const q=n.find(V=>V.keyword===M);return{keyword:M,evidenceId:q?.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 eT(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: ${Vb(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 tT(t){const n=Yb(t.project),a=VA(n.name,t.timeline,t.latestRunDetail,t.keywords),l=t.latestRunDetail?.snapshots??[],o=Qb(l),u=Xb(l,t.competitors.map(v=>v.domain)),d=WA({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,S)=>S.createdAt.localeCompare(v.createdAt)),g=m.map(v=>eh(v,t.project.displayName||t.project.name)),p=new Map;for(const v of l){const S=v.provider||"gemini",N=v.model??null,z=`${S}::${N??"unknown"}`,j=p.get(z)??{provider:S,model:N,cited:0,total:0};j.total++,v.citationState==="cited"&&j.cited++,p.set(z,j)}const b=[...p.values()].sort((v,S)=>v.provider.localeCompare(S.provider)||(v.model??"").localeCompare(S.model??"")).map(({provider:v,model:S,cited:N,total:z})=>({provider:v,model:S,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?KA(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:YA(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:eT(m),insights:d,visibilityEvidence:a,competitors:t.competitors.map((v,S)=>{const N=new Set;for(const E of l)(E.competitorOverlap.includes(v.domain)||E.citedDomains.includes(v.domain))&&E.keyword&&N.add(E.keyword);const z=[...N],j=new Set(l.map(E=>E.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_${S}`,domain:v.domain,citationCount:z.length,totalKeywords:j.size,pressureLabel:A,citedKeywords:z,movement:"",notes:""}}),recentRuns:g.slice(0,5)}}function nT(t){const n=Yb(t.project),a=t.latestRunDetail?.snapshots??[],l=Qb(a),o=Xb(a,t.competitors.map(g=>g.domain)),d=[...t.runs].sort((g,p)=>p.createdAt.localeCompare(g.createdAt))[0],m=d?eh(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 iT(t,n){const a=[],l=[],o=[];for(const d of t){l.push(tT(d)),o.push(nT(d));const m=[...d.runs].sort((g,p)=>p.createdAt.localeCompare(g.createdAt));for(const g of m)a.push(eh(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?aT(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 aT(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 d0=[{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"}],sT=WE(),f0=t=>({label:t,state:"checking",detail:"Checking service health"}),lT={apiStatus:f0("API"),workerStatus:f0("Worker")};async function rT(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 Xi(t){if(!t)return"/";const n=t.split("?")[0]??"/";return n===""?"/":n.length>1&&n.endsWith("/")?n.slice(0,-1):n}function oT(t,n){const a=Xi(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?Bb(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 cT(t){return t?Xi(t):typeof window<"u"?Xi(window.location.pathname):"/"}function Ko(t){return t.state==="ok"?"positive":t.state==="checking"?"neutral":"negative"}function Jb(t){switch(t){case"completed":return"positive";case"partial":return"caution";case"failed":return"negative";case"queued":case"running":return"neutral"}}function uT(t){switch(t){case"cited":return"positive";case"emerging":return"caution";case"not-cited":return"caution";case"lost":return"negative";case"pending":return"neutral"}}function dT(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 dc(t){return t.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function fT(t,n,a){return t.map(l=>{if(l.id==="api")return{...l,tone:Ko(n.apiStatus),detail:n.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:n.apiStatus.detail};if(l.id==="worker")return{...l,tone:Ko(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=>tx[g.name]??g.name).join(" · ");return{...l,label:"Providers",tone:d?"positive":"caution",detail:`${o} of ${u} configured`,meta:m||"None configured"}})}function hT(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 mT(t,n,a){const l=hT(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 yn(t,n){return a=>{a.preventDefault(),a.stopPropagation(),t(n)}}function zo(t,n){return n==="projects"?t.kind==="projects"||t.kind==="project":n==="project"?t.kind==="project":t.kind===n}function h0({compact:t=!1,navigate:n}){return c.jsxs("a",{className:`brand-lockup ${t?"brand-lockup-compact":""}`,href:"/","aria-label":"Canonry home",onClick:yn(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 pT({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((S,N)=>{const z=u+N/Math.max(t.length-1,1)*p,j=u+(1-(S-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 Fb({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 Xd({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,S=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:S,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(Fb,{text:u})]}),c.jsx("p",{className:"gauge-delta",children:a}),c.jsx("p",{className:"gauge-description",children:o})]})}function zt({tone:t,children:n}){const a=t==="positive"?"success":t==="caution"?"warning":t==="negative"?"destructive":"neutral";return c.jsx(Db,{variant:a,children:n})}function fc({status:t}){return c.jsx(zt,{tone:Jb(t),children:dc(t)})}function Wb({state:t}){return c.jsx(zt,{tone:uT(t),children:dc(t)})}function ex({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.location?` · ${t.location}`:""," · ",t.kindLabel]})]}),c.jsx(fc,{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(de,{variant:"outline",size:"sm",type:"button",onClick:()=>n(t.id),children:"View run"})]})}function th({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 gT({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(Bf,{size:12,className:`shrink-0 text-zinc-500 transition-transform duration-150 ${u?"rotate-90":""}`}),c.jsx(zt,{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(Wb,{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(th,{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 yT({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-amber-400 ring-1 ring-amber-300/60"},o=new Date(a[0].createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"}),u=new Date(a[a.length-1].createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"});return c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"text-[9px] text-zinc-600 shrink-0",children:o}),c.jsx("div",{className:"flex items-center gap-[3px]",title:`${a.length} runs`,children:a.map((d,m)=>c.jsx("div",{className:`h-2.5 w-2.5 rounded-sm ${l[d.citationState]??"bg-zinc-700"} ${d.model&&m>0&&a[m-1]?.model&&a[m-1].model!==d.model?"ring-1 ring-amber-300/80 ring-offset-1 ring-offset-zinc-950":""}`,title:[d.citationState,new Date(d.createdAt).toLocaleDateString(),d.model?`model ${d.model}`:null,d.model&&m>0&&a[m-1]?.model&&a[m-1].model!==d.model?"model changed":null].filter(Boolean).join(" — ")},m))}),c.jsx("span",{className:"text-[9px] text-zinc-600 shrink-0",children:u})]})}function vT(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 bT({phrase:t,items:n,onOpenEvidence:a,showLocationLabels:l=!0,compareLocations:o=!1,timelineLoading:u=!1,onDeleteKeyword:d}){const m=n.map(z=>z.citationState),g=m.includes("cited")?"cited":m.includes("emerging")?"emerging":m.includes("lost")?"lost":m.every(z=>z==="pending")?"pending":"not-cited",p=vT(n),b=n.filter(z=>z.citationState==="cited"||z.citationState==="emerging").length,v=(()=>{if(p.length<4)return"flat";const z=p.slice(-3),j=p.slice(-6,-3);if(j.length===0)return"flat";const k=z.filter(E=>E.citationState==="cited"||E.citationState==="emerging").length,A=j.filter(E=>E.citationState==="cited"||E.citationState==="emerging").length;return k>A?"up":k<A?"down":"flat"})(),S=(()=>{if(p.length===0)return"Awaiting first run";if(p.length===1)return"First observation";const z=p[p.length-1].citationState,j=p[p.length-2].citationState,k=z==="cited"||z==="emerging",A=j==="cited"||j==="emerging";if(!A&&k)return"Newly cited";if(A&&!k)return"Lost citation";let E=0;for(let O=p.length-1;O>=0;O--){const D=p[O].citationState;if((D==="cited"||D==="emerging")===k)E++;else break}return k?E<=1?"Cited in latest run":`Cited ${E} runs in a row`:E<=1?"Missed in latest run":`Missed for ${E} runs`})(),N=v==="up"?"↑":v==="down"?"↓":"→";return c.jsxs("div",{className:`evidence-phrase-card evidence-phrase-card--${g}`,children:[c.jsxs("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(Wb,{state:g}),c.jsxs("span",{className:`evidence-card-trend evidence-card-trend--${v}`,children:[c.jsx("span",{"aria-hidden":"true",children:N}),c.jsx("span",{children:S})]})]})]}),d&&c.jsx("button",{type:"button",className:"ml-2 shrink-0 text-zinc-600 hover:text-rose-400 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-rose-500",onClick:d,title:`Remove "${t}"`,"aria-label":`Remove key phrase "${t}"`,children:"×"})]}),c.jsxs("div",{className:`evidence-card-timeline-row${u?" opacity-40 pointer-events-none":""}`,children:[u?c.jsx("span",{className:"text-[10px] text-zinc-500 italic animate-pulse",children:"Loading…"}):c.jsx(yT,{history:p,maxDots:14}),c.jsxs("span",{className:"evidence-card-ratio",children:[b,"/",n.length," provider",n.length!==1?"s":""]})]}),o?(()=>{const z=Array.from(n.reduce((j,k)=>{const A=k.location??"",E=j.get(A)??[];return j.set(A,[...E,k]),j},new Map)).map(([j,k])=>({loc:j||"No location",locItems:k}));return c.jsx("div",{className:"evidence-card-location-compare",children:z.map(({loc:j,locItems:k})=>{const A=k.filter(E=>E.citationState==="cited"||E.citationState==="emerging").length;return c.jsxs("div",{className:"evidence-card-location-row",children:[c.jsx("span",{className:"evidence-card-location-label",children:j}),c.jsxs("div",{className:"evidence-card-location-providers",children:[k.filter(E=>E.citationState!=="pending").map(E=>c.jsxs("button",{type:"button",className:`evidence-provider-btn evidence-provider-btn--${E.citationState} evidence-provider-btn--compact`,onClick:()=>a(E.id),title:`View ${E.provider} evidence for "${t}" in ${j}`,children:[c.jsx("span",{className:"capitalize",children:E.provider}),c.jsx("span",{"aria-hidden":"true",className:"font-bold",children:E.citationState==="cited"||E.citationState==="emerging"?"✓":E.citationState==="lost"?"✗":"–"})]},E.id)),k.every(E=>E.citationState==="pending")&&c.jsx("span",{className:"text-xs text-zinc-500 italic",children:"Pending"})]}),c.jsxs("span",{className:"evidence-card-location-score",children:[A,"/",k.length]})]},j)})})})():c.jsxs("div",{className:"evidence-card-providers",children:[n.filter(z=>z.citationState!=="pending").map(z=>c.jsxs("button",{type:"button",className:`evidence-provider-btn evidence-provider-btn--${z.citationState}`,onClick:()=>a(z.id),title:`View ${z.provider} evidence for "${t}"`,children:[c.jsx("span",{className:"capitalize",children:z.provider}),z.location&&l&&c.jsx("span",{className:"text-[9px] opacity-60",children:z.location}),c.jsx("span",{"aria-hidden":"true",className:"font-bold",children:z.citationState==="cited"||z.citationState==="emerging"?"✓":z.citationState==="lost"?"✗":"–"}),c.jsx("span",{className:"opacity-50 text-[10px]",children:"View →"})]},z.id)),n.every(z=>z.citationState==="pending")&&c.jsx("span",{className:"text-xs text-zinc-500 italic py-1",children:"Awaiting first run"})]})]})}function xT({evidence:t,onOpenEvidence:n,showLocationLabels:a=!0,compareLocations:l=!1,timelineLoading:o=!1,onDeleteKeyword:u}){const d=w.useMemo(()=>{const m=new Map;for(const g of t){const p=m.get(g.keyword)??[];m.set(g.keyword,[...p,g])}return[...m.entries()].map(([g,p])=>({phrase:g,items:p}))},[t]);return d.length===0?c.jsx("p",{className:"supporting-copy",children:"No key phrases tracked yet."}):c.jsx("div",{className:"evidence-card-grid",children:d.map(({phrase:m,items:g})=>c.jsx(bT,{phrase:m,items:g,onOpenEvidence:n,showLocationLabels:a,compareLocations:l,timelineLoading:o,onDeleteKeyword:u?()=>u(m):void 0},m))})}function ST(t){return t==="High"?"negative":t==="Moderate"?"caution":"neutral"}function wT({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(zt,{tone:ST(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 jT({project:t,onNavigate:n}){const a=`/projects/${t.project.id}`;return c.jsxs("a",{className:"project-row cursor-pointer",href:a,onClick:yn(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," · ",dc(t.lastRun.status)]})]})}),c.jsx("div",{className:"project-row-chart",children:c.jsx(pT,{points:t.trend,tone:Jb(t.lastRun.status)})}),c.jsx("span",{className:"project-row-link",children:c.jsx(Bf,{className:"h-4 w-4 text-zinc-500"})})]})}function NT({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(jT,{project:o,onNavigate:a},o.project.id))}):c.jsxs(Ye,{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(de,{size:"sm",asChild:!0,children:c.jsx("a",{href:t.emptyState?.ctaHref??"/setup",onClick:yn(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:yn(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(fc,{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(Ye,{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(zt,{tone:o.tone,children:o.label})]}),c.jsx("p",{className:"supporting-copy",children:o.meta})]},o.id))})]})]})}function kT({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,S]=w.useState("US"),[N,z]=w.useState("en"),[j,k]=w.useState(!1),[A,E]=w.useState(null),O=u.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),D=async()=>{if(!(!O||!p)){k(!0),E(null);try{const M=await uc(O,{displayName:m||u,canonicalDomain:p,country:v,language:N});a(),d(""),g(""),b(""),S("US"),z("en"),o(!1),n(`/projects/${M.id}`)}catch(M){E(M instanceof Error?M.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(de,{type:"button",onClick:()=>o(M=>!M),children:[c.jsx(Oy,{className:"size-4 mr-1.5"}),"Add project"]})})]}),l?c.jsxs(Ye,{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:M=>d(M.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:M=>g(M.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:M=>b(M.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:M=>S(M.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:M=>z(M.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(de,{type:"button",disabled:!O||!p||j,onClick:D,children:j?"Creating...":"Create project"}),c.jsx(de,{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(M=>{const q=`/projects/${M.project.id}`,V=M.recentRuns[0];return c.jsxs("tr",{className:"cursor-pointer",onClick:()=>n(q),children:[c.jsxs("td",{children:[c.jsx("a",{className:"text-zinc-100 font-medium hover:underline",href:q,onClick:yn(n,q),children:M.project.displayName||M.project.name}),c.jsx("p",{className:"text-[11px] text-zinc-500",children:M.project.name})]}),c.jsx("td",{className:"text-zinc-400",children:M.project.canonicalDomain}),c.jsx("td",{children:c.jsx(zt,{tone:M.visibilitySummary.tone,children:M.visibilitySummary.value})}),c.jsx("td",{className:"text-zinc-500 text-sm",children:V?c.jsx(fc,{status:V.status}):c.jsx("span",{className:"text-zinc-600",children:"No runs"})}),c.jsx("td",{className:"text-right text-zinc-500",children:M.project.country})]},M.project.id)})})]})}):l?null:c.jsxs(Ye,{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(de,{type:"button",onClick:()=>o(!0),children:[c.jsx(Oy,{className:"size-4 mr-1.5"}),"Add project"]})]}),c.jsx(zT,{onApplied:a})]})}function zT({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=Mj(n),v=[],S=[];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 zA(j);S.push(`Applied "${k.displayName||k.name}" (revision ${k.configRevision})`)}catch(k){v.push(`Document ${N+1}: ${k instanceof Error?k.message:String(k)}`)}}d(S),g(v),o(!1),S.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(de,{type:"button",disabled:!n.trim()||l,onClick:p,children:l?"Applying...":"Apply"})})]})}function _T({model:t,tab:n,onOpenEvidence:a,onOpenRun:l,onTriggerRun:o,onDeleteProject:u,onAddKeywords:d,onDeleteKeywords:m,onAddCompetitors:g,onUpdateOwnedDomains:p,onUpdateProject:b,onNavigate:v}){const[S,N]=w.useState(!1),[z,j]=w.useState(!1),[k,A]=w.useState(!1),[E,O]=w.useState(null),[D,M]=w.useState(!1),[q,V]=w.useState(""),[R,Q]=w.useState(!1),[Se,le]=w.useState(null),[ue,Ae]=w.useState(!1),[Be,Re]=w.useState(""),[I,K]=w.useState(!1),[se,fe]=w.useState(!1),[te,C]=w.useState(""),[H,ne]=w.useState(!1),[F,ce]=w.useState(void 0),[he,we]=w.useState(!1),[$,ae]=w.useState(null),[Ie,re]=w.useState(!1),Ue=w.useMemo(()=>new Set(t.visibilityEvidence.map(ie=>ie.location??"")),[t.visibilityEvidence]),Ct=Ue.has(""),ut=w.useMemo(()=>[...Ue].filter(Boolean),[Ue]);w.useEffect(()=>{if(F===void 0||F===""){ae(null),re(!1);return}re(!0),qb(t.project.name,F).then(ie=>{ae(ie),re(!1)}).catch(()=>{ae(null),re(!1)})},[F,t.project.name]);const bt=w.useMemo(()=>{if(!$)return null;const ie=new Map;for(const Ne of $){for(const[Et,St]of Object.entries(Ne.providerRuns??{}))ie.set(`${Ne.keyword}::${Et}`,St.map(Kt=>({runId:Kt.runId,citationState:Kt.citationState,createdAt:Kt.createdAt})));(!Ne.providerRuns||Object.keys(Ne.providerRuns).length===0)&&ie.set(`${Ne.keyword}::`,Ne.runs.map(Et=>({runId:Et.runId,citationState:Et.citationState,createdAt:Et.createdAt})))}return ie},[$]),Ot=w.useMemo(()=>{const ie=F!==void 0?t.visibilityEvidence.filter(Ne=>F===""?!Ne.location:Ne.location===F):t.visibilityEvidence;return bt?ie.map(Ne=>{const Et=bt.get(`${Ne.keyword}::${Ne.provider}`)??bt.get(`${Ne.keyword}::`);return Et?{...Ne,runHistory:Et}:Ne}):ie},[t.visibilityEvidence,F,bt]);async function bi(){const ie=await gA(t.project.name),Ne=typeof ie=="string"?ie:JSON.stringify(ie,null,2),Et=new Blob([Ne],{type:"text/yaml"}),St=URL.createObjectURL(Et),Kt=document.createElement("a");Kt.href=St,Kt.download=`${t.project.name}.yaml`,Kt.click(),URL.revokeObjectURL(St)}async function Mt(ie){le(ie);try{await m(t.project.name,[ie])}finally{le(null)}}async function qt(){const ie=q.split(`
|
|
233
|
-
`).map(Ne=>Ne.trim()).filter(Boolean);if(ie.length!==0){Q(!0);try{await d(t.project.name,ie),V(""),M(!1)}finally{Q(!1)}}}async function dt(){const ie=Be.trim();if(ie){K(!0);try{await g(t.project.name,[ie]),Re(""),Ae(!1)}finally{K(!1)}}}async function Ht(){const ie=te.trim();if(ie){ne(!0);try{const Ne=t.project.ownedDomains??[];await p(t.project.name,[...Ne,ie]),C(""),fe(!1)}finally{ne(!1)}}}async function xi(ie){ne(!0);try{const Ne=t.project.ownedDomains??[];await p(t.project.name,Ne.filter(Et=>Et!==ie))}finally{ne(!1)}}const We=ie=>!Number.isNaN(Number.parseInt(ie,10)),xt=[{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:[S?c.jsxs(Ye,{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(de,{type:"button",variant:"destructive",disabled:z,onClick:async()=>{j(!0),u(t.project.name)},children:z?"Deleting...":"Yes, delete project"}),c.jsx(de,{type:"button",variant:"outline",disabled:z,onClick:()=>N(!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&&!se&&c.jsx("button",{type:"button",className:"ml-2 text-[10px] uppercase tracking-wide text-zinc-600 hover:text-zinc-400 transition-colors",onClick:()=>fe(!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(ie=>c.jsx("span",{className:"tag",children:ie},ie))]}),((t.project.ownedDomains??[]).length>0||se)&&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(ie=>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:[ie,c.jsx("button",{type:"button",className:"ml-0.5 text-zinc-500 hover:text-zinc-200 transition-colors",disabled:H,onClick:()=>xi(ie),"aria-label":`Remove ${ie}`,children:"×"})]},ie)),se?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:te,onChange:ie=>C(ie.target.value),onKeyDown:ie=>ie.key==="Enter"&&Ht(),autoFocus:!0}),c.jsx(de,{type:"button",size:"sm",disabled:!te.trim()||H,onClick:Ht,children:H?"...":"Add"}),c.jsx("button",{type:"button",className:"text-xs text-zinc-500 hover:text-zinc-300",onClick:()=>{fe(!1),C("")},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:()=>fe(!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(de,{type:"button",variant:"outline",size:"icon",onClick:bi,"aria-label":"Export project as YAML",children:c.jsx(w1,{className:"h-4 w-4 text-zinc-400"})}),c.jsx(de,{type:"button",variant:"outline",size:"icon",onClick:()=>N(!0),"aria-label":"Delete project",children:c.jsx($1,{className:"h-4 w-4 text-zinc-400"})}),c.jsx(de,{type:"button",disabled:k,onClick:async()=>{A(!0),O(null);try{await o(t.project.name)}catch(ie){O(ie instanceof Error?ie.message:"Failed to trigger run")}finally{A(!1)}},children:k?"Starting...":"Run now"})]})]})]}),E&&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:[E,c.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>O(null),children:"×"})]}),c.jsx("nav",{className:"project-subnav","aria-label":"Project sections",children:xt.map(ie=>c.jsx("a",{className:`project-subnav-link ${ie.key===n?"project-subnav-link-active":""}`,href:ie.href,"aria-current":ie.key===n?"page":void 0,onClick:yn(v,ie.href),children:ie.label},ie.key))}),n==="overview"?c.jsxs(c.Fragment,{children:[c.jsxs("section",{className:"gauge-row",children:[c.jsx(Xd,{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:We(t.visibilitySummary.value)}),c.jsx(Xd,{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:We(t.competitorPressure.value)}),c.jsx(Xd,{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:We(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(Fb,{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(ie=>c.jsxs(Ye,{className:"surface-card compact-card",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(th,{provider:ie.provider}),c.jsxs("span",{className:`text-lg font-semibold ${ie.score>=70?"text-emerald-400":ie.score>=40?"text-amber-400":"text-rose-400"}`,children:[ie.score,"%"]})]}),ie.model&&c.jsx("p",{className:"mt-0.5 text-[11px] font-mono text-zinc-500 truncate",children:ie.model}),c.jsxs("p",{className:"mt-1 text-xs text-zinc-500",children:[ie.cited," of ",ie.total," key phrases cited"]})]},`${ie.provider}::${ie.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(gT,{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(ie=>ie.keyword)).size," key phrases tracked"]}),c.jsx(de,{type:"button",variant:"outline",size:"sm",onClick:()=>M(!D),children:D?"Cancel":"+ Add key phrases"})]})]}),D&&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:q,onChange:ie=>V(ie.target.value)}),c.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[c.jsxs("p",{className:"text-xs text-zinc-500",children:[q.split(`
|
|
234
|
-
`).filter(ie=>ie.trim()).length," key phrases"]}),c.jsx(de,{type:"button",size:"sm",disabled:!q.trim()||R,onClick:qt,children:R?"Adding...":"Add key phrases"})]})]}),t.project.locations&&t.project.locations.length>0&&c.jsxs("div",{className:"filter-row mb-3",role:"toolbar","aria-label":"Location filters",children:[c.jsx("button",{className:`filter-chip ${F===void 0?"filter-chip-active":""}`,type:"button","aria-pressed":F===void 0,onClick:()=>{ce(void 0)},children:"All locations"}),t.project.locations.map(ie=>Ue.has(ie.label)&&c.jsx("button",{className:`filter-chip ${F===ie.label?"filter-chip-active":""}`,type:"button","aria-pressed":F===ie.label,onClick:()=>{ce(ie.label),we(!1)},children:ie.label},ie.label)),Ct&&c.jsx("button",{className:`filter-chip ${F===""?"filter-chip-active":""}`,type:"button","aria-pressed":F==="",onClick:()=>{ce(""),we(!1)},children:"No location"}),ut.length>1&&F===void 0&&c.jsx("button",{className:`filter-chip filter-chip-compare ${he?"filter-chip-active":""}`,type:"button","aria-pressed":he,onClick:()=>we(ie=>!ie),title:"Side-by-side location comparison",children:"Compare"})]}),c.jsx(xT,{evidence:Ot,onOpenEvidence:a,showLocationLabels:F===void 0,compareLocations:F===void 0&&he,timelineLoading:Ie,onDeleteKeyword:Se?void 0:Mt})]}),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(de,{type:"button",variant:"outline",size:"sm",onClick:()=>Ae(!ue),children:ue?"Cancel":"+ Add competitor"})]})]}),ue&&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:Be,onChange:ie=>Re(ie.target.value),onKeyDown:ie=>ie.key==="Enter"&&dt()}),c.jsx(de,{type:"button",size:"sm",disabled:!Be.trim()||I,onClick:dt,children:I?"Adding...":"Add"})]}),c.jsx(wT,{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(ie=>c.jsx(ex,{run:ie,onOpen:l},ie.id))})]}),c.jsx(ET,{project:{...t.project,displayName:t.project.displayName??t.project.name,defaultLocation:t.project.defaultLocation??null},onUpdateProject:b}),c.jsx(RT,{projectName:t.project.name}),c.jsx(LT,{projectName:t.project.name})]}):c.jsx(CT,{projectName:t.project.name,onOpenSettings:()=>v("/settings")})]})}function _o(t){if(!t)return"—";try{return new Date(t).toLocaleString()}catch{return t}}function m0(t){return t===null?"Unknown":t?"Pass":"Fail"}function CT({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([]),[S,N]=w.useState([]),[z,j]=w.useState(null),[k,A]=w.useState(""),[E,O]=w.useState(""),[D,M]=w.useState("30"),[q,V]=w.useState(!1),[R,Q]=w.useState({startDate:"",endDate:"",query:"",page:"",limit:"20"}),[Se,le]=w.useState(""),[ue,Ae]=w.useState(!0),[Be,Re]=w.useState(!1),[I,K]=w.useState(!1),[se,fe]=w.useState(!1),[te,C]=w.useState(!1),[H,ne]=w.useState(!1),[F,ce]=w.useState(!1),[he,we]=w.useState(!1),[$,ae]=w.useState(null),[Ie,re]=w.useState(!1),[Ue,Ct]=w.useState(!1),[ut,bt]=w.useState(""),[Ot,bi]=w.useState("indexed"),[Mt,qt]=w.useState([]),[dt,Ht]=w.useState(null),[xi,We]=w.useState(null),[xt,ie]=w.useState(null),Ne=o.find(G=>G.connectionType==="gsc"),Et=g.length>0||b.length>0||S.length>0;async function St(G){if(!G){m([]),A("");return}fe(!0);try{const{sites:ve}=await TA(t);m(ve),A(G.propertyId??ve[0]?.siteUrl??"")}catch(ve){m([]),We(ve instanceof Error?ve.message:"Failed to load Search Console properties")}finally{fe(!1)}}async function Kt(){ne(!0);try{const G=await RA(t,{startDate:R.startDate||void 0,endDate:R.endDate||void 0,query:R.query||void 0,page:R.page||void 0,limit:parseInt(R.limit,10)||20});p(G)}catch(G){p([]),We(G instanceof Error?G.message:"Failed to load GSC performance data")}finally{ne(!1)}}async function oe(){ce(!0);try{const[G,ve]=await Promise.all([LA(t,{url:Se.trim()||void 0,limit:20}),$A(t)]);v(G),N(ve)}catch(G){v([]),N([]),We(G instanceof Error?G.message:"Failed to load GSC inspection history")}finally{ce(!1)}}async function vn(){re(!0);try{const[G,ve]=await Promise.all([UA(t),BA(t).catch(()=>[])]);ae(G),qt(ve)}catch{ae(null),qt([])}finally{re(!1)}}async function hc(){Ct(!0),We(null),ie(null);try{const G=await IA(t,{sitemapUrl:ut.trim()||void 0});ie(`Sitemap inspection queued (run ${G.id}). Refresh coverage after the run completes.`),bt("")}catch(G){We(G instanceof Error?G.message:"Failed to queue sitemap inspection")}finally{Ct(!1)}}async function Si(){Ae(!0),We(null);try{const[G,ve]=await Promise.all([Kb().catch(()=>null),CA(t).catch(()=>[])]);l(!!G?.google?.configured),u(ve);const Pt=ve.find(Pe=>Pe.connectionType==="gsc");await Promise.all([St(Pt),Kt(),oe(),vn()])}finally{Ae(!1)}}w.useEffect(()=>{Si()},[t]);async function Yt(){if(!a){We("Google OAuth app credentials are not configured yet. Set them on the Settings page first.");return}Re(!0),We(null),ie(null);try{const{authUrl:G}=await EA(t,"gsc"),ve=window.open(G,"_blank","width=600,height=700");if(!ve){window.location.assign(G);return}ie("Finish the Google consent flow in the popup, then close it to refresh this project.");const Pt=window.setInterval(()=>{ve.closed&&(window.clearInterval(Pt),ie(null),Si())},1e3)}catch(G){We(G instanceof Error?G.message:"Failed to start OAuth flow")}finally{Re(!1)}}async function Hn(){We(null),ie(null);try{await AA(t,"gsc"),u(G=>G.filter(ve=>ve.connectionType!=="gsc")),m([]),A("")}catch(G){We(G instanceof Error?G.message:"Failed to disconnect")}}async function Vt(){if(k){C(!0),We(null);try{await OA(t,"gsc",k),u(G=>G.map(ve=>ve.connectionType==="gsc"?{...ve,propertyId:k}:ve)),ie("GSC property updated.")}catch(G){We(G instanceof Error?G.message:"Failed to save GSC property")}finally{C(!1)}}}async function mc(){K(!0),We(null),ie(null);try{await DA(t,{days:parseInt(D,10)||void 0,full:q||void 0}),ie("GSC sync queued. Refresh after the run completes to see imported data.")}catch(G){We(G instanceof Error?G.message:"Failed to trigger sync")}finally{K(!1)}}async function Ql(){if(E.trim()){we(!0),We(null),ie(null);try{const G=await MA(t,E.trim());j(G),O(""),await oe()}catch(G){We(G instanceof Error?G.message:"Failed to inspect URL")}finally{we(!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:Ne&&c.jsx(de,{type:"button",variant:"outline",size:"sm",disabled:H,onClick:()=>{Kt()},children:H?"Refreshing…":"Refresh data"})})]}),xi&&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:[xi,c.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>We(null),children:"×"})]}),xt&&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:[xt,c.jsx("button",{type:"button",className:"ml-2 text-emerald-400 hover:text-emerald-200",onClick:()=>ie(null),children:"×"})]}),ue?c.jsx("p",{className:"text-sm text-zinc-500",children:"Loading…"}):c.jsxs("div",{className:"space-y-3",children:[c.jsxs(Ye,{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(zt,{tone:Ne?"positive":a?"caution":"negative",children:Ne?"Connected":a?"Ready to connect":"App credentials missing"})]}),Ne?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:Ne.domain}),c.jsx("button",{type:"button",className:"ml-auto text-xs text-zinc-500 hover:text-rose-400 transition-colors",onClick:Hn,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:Ne.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:Ne.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:_o(Ne.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(de,{type:"button",variant:"outline",size:"sm",disabled:Be,onClick:Yt,children:Be?"Opening…":"Connect Google Search Console"}):c.jsx(de,{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."})]})]})]}),Ne&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[c.jsxs(Ye,{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:se||d.length===0,onChange:G=>A(G.target.value),children:d.length===0?c.jsx("option",{value:"",children:se?"Loading properties…":"No properties available"}):d.map(G=>c.jsxs("option",{value:G.siteUrl,children:[G.siteUrl," · ",G.permissionLevel]},G.siteUrl))}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(de,{type:"button",size:"sm",variant:"outline",disabled:se,onClick:()=>{St(Ne)},children:se?"Refreshing…":"Refresh properties"}),c.jsx(de,{type:"button",size:"sm",disabled:!k||te,onClick:Vt,children:te?"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(Ye,{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:D,onChange:G=>M(G.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:q,onChange:G=>V(G.target.checked)}),"Replace existing imported rows for the requested range"]})]}),c.jsx(de,{type:"button",size:"sm",disabled:I||!Ne.propertyId,onClick:mc,children:I?"Queueing…":"Queue sync"}),!Ne.propertyId&&c.jsx("p",{className:"text-xs text-amber-400",children:"Select a Search Console property before queueing a sync."})]})]})]}),c.jsxs(Ye,{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:E,onChange:G=>O(G.target.value),onKeyDown:G=>G.key==="Enter"&&void Ql()}),c.jsx(de,{type:"button",size:"sm",disabled:he||!Ne.propertyId||!E.trim(),onClick:Ql,children:he?"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:m0(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:_o(z.crawlTime)})]})]})]}),c.jsxs(Ye,{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:"Coverage"}),c.jsx("h3",{children:"Index Coverage"})]}),c.jsx("div",{className:"flex items-center gap-2",children:c.jsx(de,{type:"button",variant:"outline",size:"sm",disabled:Ie,onClick:()=>{vn()},children:Ie?"Loading…":"Refresh coverage"})})]}),$&&$.summary.total>0?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"mt-3",children:[c.jsxs("div",{className:"flex items-stretch overflow-hidden rounded-lg border border-zinc-800/60",children:[$.summary.indexed>0&&c.jsxs("div",{className:"flex items-center gap-2 bg-emerald-950/40 border-r border-zinc-800/60 px-4 py-3",style:{flexBasis:`${$.summary.indexed/$.summary.total*100}%`},children:[c.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full bg-emerald-500 shrink-0"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-emerald-400/70",children:"Indexed"}),c.jsx("p",{className:"text-lg font-semibold tabular-nums text-emerald-400",children:$.summary.indexed.toLocaleString()})]})]}),$.summary.notIndexed>0&&c.jsxs("div",{className:"flex items-center gap-2 bg-zinc-900/40 px-4 py-3",style:{flexBasis:`${$.summary.notIndexed/$.summary.total*100}%`},children:[c.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full bg-zinc-500 shrink-0"}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Not indexed"}),c.jsxs("p",{className:"text-lg font-semibold tabular-nums text-zinc-300",children:[$.summary.notIndexed.toLocaleString(),($.reasonGroups??[]).length>0&&c.jsxs("span",{className:"ml-1 text-xs font-normal text-zinc-500",children:["· ",($.reasonGroups??[]).length," ",($.reasonGroups??[]).length===1?"reason":"reasons"]})]})]})]})]}),$.summary.deindexed>0&&c.jsxs("p",{className:"mt-1.5 text-xs text-rose-400",children:[$.summary.deindexed," page",$.summary.deindexed!==1?"s":""," recently lost indexing"]})]}),Mt.length>1&&c.jsxs("div",{className:"mt-4",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500 mb-2",children:"Pages over time"}),c.jsxs("div",{className:"relative h-36 w-full",children:[(()=>{const G=Math.max(...Mt.map(Pe=>Pe.indexed+Pe.notIndexed),1),ve=Mt.length,Pt=2;return c.jsx("svg",{viewBox:`0 0 ${ve*12+Pt} 140`,className:"h-full w-full",preserveAspectRatio:"none",children:Mt.map((Pe,Qt)=>{const en=Pe.indexed+Pe.notIndexed,Gn=en/G*128,Xl=en>0?Pe.indexed/en*Gn:0,Is=Gn-Xl,Ta=Qt*12+Pt;return c.jsxs("g",{children:[c.jsx("title",{children:`${Pe.date}
|
|
235
|
-
Indexed: ${Pe.indexed}
|
|
236
|
-
Not indexed: ${Pe.notIndexed}`}),c.jsx("rect",{x:Ta,y:128-Gn,width:10,height:Is,rx:1,fill:"#3f3f46"}),c.jsx("rect",{x:Ta,y:128-Gn+Is,width:10,height:Xl,rx:1,fill:"#10b981"})]},Pe.date)})})})(),c.jsxs("div",{className:"flex justify-between text-[10px] text-zinc-600 mt-0.5 px-0.5",children:[c.jsx("span",{children:Mt[0]?.date}),c.jsx("span",{children:Mt[Mt.length-1]?.date})]})]})]}),c.jsx("div",{className:"mt-3 flex gap-1",children:["indexed","notIndexed","deindexed"].map(G=>{const ve=G==="indexed"?$.indexed.length:G==="notIndexed"?$.notIndexed.length:$.deindexed.length,Pt=G==="indexed"?"Indexed":G==="notIndexed"?"Not Indexed":"Deindexed";return c.jsxs("button",{type:"button",className:`rounded-full px-3 py-1 text-xs font-medium transition-colors ${Ot===G?"bg-zinc-700 text-zinc-100":"text-zinc-400 hover:bg-zinc-800 hover:text-zinc-200"}`,onClick:()=>{bi(G),Ht(null)},children:[Pt," (",ve,")"]},G)})}),c.jsxs("div",{className:"mt-3 overflow-x-auto",children:[Ot==="indexed"&&$.indexed.length>0&&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:"Verdict"}),c.jsx("th",{className:"text-left",children:"Last Crawl"}),c.jsx("th",{className:"text-left",children:"Mobile"})]})}),c.jsx("tbody",{children:$.indexed.map(G=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:G.url}),c.jsx("td",{className:"text-zinc-400",children:G.verdict??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:G.crawlTime?G.crawlTime.split("T")[0]:"—"}),c.jsx("td",{className:"text-zinc-400",children:G.isMobileFriendly===!0?"Yes":G.isMobileFriendly===!1?"No":"—"})]},G.id))})]}),Ot==="notIndexed"&&!dt&&($.reasonGroups??[]).length>0&&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:"Reason"}),c.jsx("th",{className:"text-right",children:"Pages"})]})}),c.jsx("tbody",{children:($.reasonGroups??[]).map(G=>c.jsxs("tr",{className:"cursor-pointer hover:bg-zinc-800/40",onClick:()=>Ht(G.reason),children:[c.jsx("td",{className:"text-zinc-200",children:G.reason}),c.jsx("td",{className:"text-right tabular-nums text-zinc-400",children:G.count})]},G.reason))})]}),Ot==="notIndexed"&&!dt&&($.reasonGroups??[]).length===0&&$.notIndexed.length>0&&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 State"}),c.jsx("th",{className:"text-left",children:"Coverage"})]})}),c.jsx("tbody",{children:$.notIndexed.map(G=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:G.url}),c.jsx("td",{className:"text-zinc-400",children:G.indexingState??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:G.coverageState??"Unknown"})]},G.id))})]}),Ot==="notIndexed"&&dt&&(()=>{const G=($.reasonGroups??[]).find(ve=>ve.reason===dt);return G?c.jsxs("div",{children:[c.jsx("div",{className:"flex items-center gap-2 mb-3",children:c.jsx("button",{type:"button",className:"text-xs text-zinc-400 hover:text-zinc-200 transition-colors",onClick:()=>Ht(null),children:"← Back to reasons"})}),c.jsxs("div",{className:"mb-3 rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-sm font-medium text-zinc-200",children:G.reason}),c.jsxs("p",{className:"mt-1 text-xs text-zinc-500",children:[G.count," affected page",G.count!==1?"s":""]})]}),Mt.length>1&&(()=>{const ve=Mt.map(Pe=>({date:Pe.date,count:Pe.reasonBreakdown[dt]??0})).filter((Pe,Qt,en)=>Qt===0||Qt===en.length-1||en[Qt].count>0),Pt=Math.max(...ve.map(Pe=>Pe.count),1);return ve.length<2?null:c.jsxs("div",{className:"mb-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500 mb-1",children:"Affected pages over time"}),c.jsx("div",{className:"h-20 w-full",children:c.jsx("svg",{viewBox:`0 0 ${ve.length*12+2} 80`,className:"h-full w-full",preserveAspectRatio:"none",children:ve.map((Pe,Qt)=>{const en=Pe.count/Pt*68;return c.jsxs("g",{children:[c.jsx("title",{children:`${Pe.date}: ${Pe.count} pages`}),c.jsx("rect",{x:Qt*12+2,y:68-en,width:10,height:en,rx:1,fill:"#f59e0b"})]},Pe.date)})})})]})})(),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:"Last Crawl"})]})}),c.jsx("tbody",{children:G.urls.map(ve=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:ve.url}),c.jsx("td",{className:"text-zinc-400",children:ve.crawlTime?ve.crawlTime.split("T")[0]:"—"})]},ve.id))})]})]}):null})(),Ot==="deindexed"&&$.deindexed.length>0&&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:"Detected"})]})}),c.jsx("tbody",{children:$.deindexed.map((G,ve)=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:G.url}),c.jsx("td",{className:"text-zinc-400",children:G.previousState}),c.jsx("td",{className:"text-zinc-400",children:G.currentState}),c.jsx("td",{className:"text-zinc-400",children:G.transitionDate.split("T")[0]})]},`${G.url}-${ve}`))})]}),(Ot==="indexed"&&$.indexed.length===0||Ot==="notIndexed"&&!dt&&$.notIndexed.length===0||Ot==="deindexed"&&$.deindexed.length===0)&&c.jsx("p",{className:"text-sm text-zinc-500",children:"No URLs in this category."})]})]}):c.jsx("p",{className:"mt-3 text-sm text-zinc-500",children:Ie?"Loading coverage data…":"No coverage data yet. Inspect your sitemap to populate this view."}),c.jsxs("div",{className:"mt-4 border-t border-zinc-800/60 pt-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500 mb-2",children:"Inspect from sitemap"}),c.jsxs("div",{className:"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/sitemap.xml (leave empty for default)",value:ut,onChange:G=>bt(G.target.value)}),c.jsx(de,{type:"button",size:"sm",disabled:Ue||!Ne.propertyId,onClick:hc,children:Ue?"Queueing…":"Inspect Sitemap"})]}),!Ne.propertyId&&c.jsx("p",{className:"mt-1 text-xs text-amber-400",children:"Select a Search Console property first."})]})]})]}),(Ne||Et)&&c.jsxs(c.Fragment,{children:[c.jsxs(Ye,{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(de,{type:"button",variant:"outline",size:"sm",disabled:H,onClick:()=>{Kt()},children:H?"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:R.startDate,onChange:G=>Q(ve=>({...ve,startDate:G.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:R.endDate,onChange:G=>Q(ve=>({...ve,endDate:G.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:R.query,onChange:G=>Q(ve=>({...ve,query:G.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:R.page,onChange:G=>Q(ve=>({...ve,page:G.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:R.limit,onChange:G=>Q(ve=>({...ve,limit:G.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((G,ve)=>c.jsxs("tr",{children:[c.jsx("td",{className:"text-zinc-400",children:G.date}),c.jsx("td",{className:"max-w-xs truncate text-zinc-200",children:G.query}),c.jsx("td",{className:"max-w-xs truncate text-zinc-400",children:G.page}),c.jsx("td",{className:"text-right tabular-nums text-zinc-300",children:G.clicks.toLocaleString()}),c.jsx("td",{className:"text-right tabular-nums text-zinc-400",children:G.impressions.toLocaleString()}),c.jsxs("td",{className:"text-right tabular-nums text-zinc-400",children:[(G.ctr*100).toFixed(1),"%"]}),c.jsx("td",{className:"text-right tabular-nums text-zinc-400",children:G.position.toFixed(1)})]},`${G.date}:${G.query}:${G.page}:${ve}`))})]})}):c.jsx("p",{className:"mt-3 text-sm text-zinc-500",children:"No performance rows match the current filters yet."})]}),c.jsxs(Ye,{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(de,{type:"button",variant:"outline",size:"sm",disabled:F,onClick:()=>{oe()},children:F?"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:Se,onChange:G=>le(G.target.value)}),c.jsx(de,{type:"button",size:"sm",variant:"outline",disabled:F,onClick:()=>{oe()},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(G=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:G.url}),c.jsx("td",{className:"text-zinc-300",children:G.indexingState??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:G.verdict??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:G.coverageState??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:m0(G.isMobileFriendly)}),c.jsx("td",{className:"text-zinc-400",children:_o(G.inspectedAt)})]},G.id))})]})}):c.jsx("p",{className:"mt-3 text-sm text-zinc-500",children:"No inspection history yet."})]}),c.jsxs(Ye,{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"})]})}),S.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:S.map(G=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:G.url}),c.jsx("td",{className:"text-zinc-400",children:G.previousState??"Unknown"}),c.jsx("td",{className:"text-zinc-300",children:G.currentState??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:_o(G.transitionDate)})]},`${G.url}:${G.transitionDate}`))})]})}):c.jsx("p",{className:"mt-3 text-sm text-zinc-500",children:"No deindexed transitions recorded."})]})]})]})]})}function ET({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),[S,N]=w.useState(t.country),[z,j]=w.useState(t.language),[k,A]=w.useState(t.ownedDomains??[]),[E,O]=w.useState(""),[D,M]=w.useState(null),[q,V]=w.useState(!1),[R,Q]=w.useState(!1),[Se,le]=w.useState(""),[ue,Ae]=w.useState(""),[Be,Re]=w.useState(""),[I,K]=w.useState(""),[se,fe]=w.useState("");w.useEffect(()=>{a||(p(t.displayName),v(t.canonicalDomain),N(t.country),j(t.language),A(t.ownedDomains??[]))},[t,a]);function te(){l(!1),m(null),p(t.displayName),v(t.canonicalDomain),N(t.country),j(t.language),A(t.ownedDomains??[]),O("")}function C(){const re=E.trim();re&&(k.includes(re)||A([...k,re]),O(""))}function H(re){A(k.filter(Ue=>Ue!==re))}async function ne(){if(!(!g.trim()||!b.trim()||!S.trim()||!z.trim())){u(!0),m(null);try{await n(t.name,{displayName:g.trim(),canonicalDomain:b.trim(),ownedDomains:k,country:S.trim(),language:z.trim()}),l(!1)}catch(re){m(re instanceof Error?re.message:"Failed to save")}finally{u(!1)}}}async function F(){const re=Se.trim(),Ue=ue.trim(),Ct=Be.trim(),ut=I.trim();if(!(!re||!Ue||!Ct||!ut)){V(!0),M(null);try{const bt={label:re,city:Ue,region:Ct,country:ut};se.trim()&&(bt.timezone=se.trim()),await fA(t.name,bt),await n(t.name,{}),le(""),Ae(""),Re(""),K(""),fe(""),Q(!1)}catch(bt){M(bt instanceof Error?bt.message:"Failed to add location")}finally{V(!1)}}}async function ce(re){V(!0),M(null);try{await hA(t.name,re),await n(t.name,{})}catch(Ue){M(Ue instanceof Error?Ue.message:"Failed to remove location")}finally{V(!1)}}async function he(re){V(!0),M(null);try{await mA(t.name,re),await n(t.name,{})}catch(Ue){M(Ue instanceof Error?Ue.message:"Failed to set default location")}finally{V(!1)}}const we=g!==t.displayName||b!==t.canonicalDomain||S!==t.country||z!==t.language||JSON.stringify(k)!==JSON.stringify(t.ownedDomains??[]),$="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",ae="block text-xs font-medium text-zinc-400 mb-1",Ie=Se.trim()&&ue.trim()&&Be.trim()&&I.trim();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(de,{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:ae,children:"Display name"}),c.jsx("input",{className:$,type:"text",value:g,onChange:re=>p(re.target.value),placeholder:"My Project"})]}),c.jsxs("div",{children:[c.jsx("label",{className:ae,children:"Canonical domain"}),c.jsx("input",{className:$,type:"text",value:b,onChange:re=>v(re.target.value),placeholder:"example.com"})]}),c.jsxs("div",{children:[c.jsx("label",{className:ae,children:"Country"}),c.jsx("input",{className:$,type:"text",value:S,onChange:re=>N(re.target.value),placeholder:"US",maxLength:2})]}),c.jsxs("div",{children:[c.jsx("label",{className:ae,children:"Language"}),c.jsx("input",{className:$,type:"text",value:z,onChange:re=>j(re.target.value),placeholder:"en"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:ae,children:"Owned domains"}),c.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:k.map(re=>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:[re,c.jsx("button",{type:"button",className:"ml-0.5 text-zinc-500 hover:text-zinc-200 transition-colors",onClick:()=>H(re),"aria-label":`Remove ${re}`,children:"×"})]},re))}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{className:`${$} flex-1`,type:"text",placeholder:"docs.example.com",value:E,onChange:re=>O(re.target.value),onKeyDown:re=>re.key==="Enter"&&(re.preventDefault(),C())}),c.jsx(de,{type:"button",variant:"outline",size:"sm",disabled:!E.trim(),onClick:C,children:"Add"})]})]}),c.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-zinc-800/60",children:[c.jsx(de,{type:"button",disabled:o||!we||!g.trim()||!b.trim(),onClick:ne,children:o?"Saving...":"Save changes"}),c.jsx(de,{type:"button",variant:"outline",disabled:o,onClick:te,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(re=>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:re},re))}):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",{className:"border-b border-zinc-800/40",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})]}),c.jsxs("tr",{children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium align-top pt-3",children:"Locations"}),c.jsxs("td",{className:"px-4 py-2.5",children:[D&&c.jsxs("div",{className:"mb-2 rounded border border-rose-800/40 bg-rose-950/20 px-2 py-1 text-xs text-rose-300",children:[D,c.jsx("button",{type:"button",className:"ml-1 text-rose-400 hover:text-rose-200",onClick:()=>M(null),children:"×"})]}),(t.locations??[]).length>0?c.jsxs("table",{className:"w-full text-xs mb-2",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"text-zinc-600",children:[c.jsx("th",{className:"text-left pb-1 font-medium pr-3",children:"Label"}),c.jsx("th",{className:"text-left pb-1 font-medium pr-3",children:"City"}),c.jsx("th",{className:"text-left pb-1 font-medium pr-3",children:"Region"}),c.jsx("th",{className:"text-left pb-1 font-medium pr-3",children:"Country"}),c.jsx("th",{className:"text-left pb-1 font-medium pr-3",children:"Timezone"}),c.jsx("th",{className:"pb-1"})]})}),c.jsx("tbody",{children:t.locations.map(re=>c.jsxs("tr",{className:"border-t border-zinc-800/30",children:[c.jsx("td",{className:"py-1.5 pr-3",children:c.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full border px-1.5 py-0.5 text-[10px] font-medium ${re.label===t.defaultLocation?"border-emerald-700/60 bg-emerald-950/30 text-emerald-300":"border-zinc-700/60 bg-zinc-800/40 text-zinc-300"}`,children:[re.label,re.label===t.defaultLocation?" ★":""]})}),c.jsx("td",{className:"py-1.5 pr-3 text-zinc-300",children:re.city}),c.jsx("td",{className:"py-1.5 pr-3 text-zinc-300",children:re.region}),c.jsx("td",{className:"py-1.5 pr-3 text-zinc-300",children:re.country}),c.jsx("td",{className:"py-1.5 pr-3 text-zinc-500",children:re.timezone??"—"}),c.jsx("td",{className:"py-1.5",children:c.jsxs("div",{className:"flex items-center gap-1.5",children:[re.label!==t.defaultLocation&&c.jsx("button",{type:"button",disabled:q,onClick:()=>he(re.label),className:"text-[10px] text-zinc-500 hover:text-emerald-400 transition-colors disabled:opacity-40","aria-label":`Set ${re.label} as default location`,children:"Set default"}),c.jsx("button",{type:"button",disabled:q,onClick:()=>ce(re.label),className:"text-[10px] text-zinc-500 hover:text-rose-400 transition-colors disabled:opacity-40","aria-label":`Remove location ${re.label}`,children:"Remove"})]})})]},re.label))})]}):c.jsx("p",{className:"text-zinc-500 text-xs mb-2",children:"No locations configured"}),R?c.jsxs("div",{className:"mt-2 rounded border border-zinc-800 bg-zinc-900/50 p-3 space-y-2",children:[c.jsx("p",{className:"text-[10px] font-medium uppercase tracking-wide text-zinc-500",children:"Add location"}),c.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-[10px] text-zinc-500 mb-0.5",children:"Label *"}),c.jsx("input",{className:$,type:"text",value:Se,onChange:re=>le(re.target.value),placeholder:"nyc"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-[10px] text-zinc-500 mb-0.5",children:"City *"}),c.jsx("input",{className:$,type:"text",value:ue,onChange:re=>Ae(re.target.value),placeholder:"New York"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-[10px] text-zinc-500 mb-0.5",children:"Region *"}),c.jsx("input",{className:$,type:"text",value:Be,onChange:re=>Re(re.target.value),placeholder:"NY"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-[10px] text-zinc-500 mb-0.5",children:"Country *"}),c.jsx("input",{className:$,type:"text",value:I,onChange:re=>K(re.target.value),placeholder:"US",maxLength:2})]}),c.jsxs("div",{className:"col-span-2",children:[c.jsx("label",{className:"block text-[10px] text-zinc-500 mb-0.5",children:"Timezone (optional)"}),c.jsx("input",{className:$,type:"text",value:se,onChange:re=>fe(re.target.value),placeholder:"America/New_York"})]})]}),c.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[c.jsx(de,{type:"button",size:"sm",disabled:q||!Ie,onClick:F,children:q?"Adding...":"Add location"}),c.jsx(de,{type:"button",size:"sm",variant:"outline",disabled:q,onClick:()=>{Q(!1),M(null)},children:"Cancel"})]})]}):c.jsx(de,{type:"button",size:"sm",variant:"outline",onClick:()=>Q(!0),children:"+ Add location"})]})]})]})})})]})}const AT=[{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"}],p0=["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 mf(t){return t===0?"12:00 AM":t<12?`${t}:00 AM`:t===12?"12:00 PM":`${t-12}:00 PM`}function TT(t,n){return t==="twice-daily"?"twice-daily":t.startsWith("weekly@")?`${t}@${n}`:`daily@${n}`}function OT(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 DT(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 ${mf(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 ${mf(m)} · ${l}`}return`${t} · ${l}`}function RT({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,S]=w.useState("UTC"),[N,z]=w.useState(!1),[j,k]=w.useState(""),[A,E]=w.useState(!1),[O,D]=w.useState(!1),[M,q]=w.useState(null);w.useEffect(()=>{bA(t).then(a).catch(()=>a(null))},[t]);const V=()=>{if(n&&n!=="loading"){const le=OT(n.preset??null,n.cronExpr);d(le.freq),g(le.hour),b(le.customCron);const ue=p0.includes(n.timezone);S(ue?n.timezone:"Other"),z(!ue),k(ue?"":n.timezone)}else d("daily"),g(6),b(""),S("UTC"),z(!1),k("");q(null),o(!0)},R=async()=>{E(!0),q(null);try{const ue={timezone:N?j.trim()||"UTC":v};u==="custom"?ue.cron=p.trim():ue.preset=TT(u,m);const Ae=await o0(t,ue);a(Ae),o(!1)}catch(le){q(le instanceof Error?le.message:"Failed to save schedule")}finally{E(!1)}},Q=async()=>{if(!(!n||n==="loading")){E(!0),q(null);try{const le={timezone:n.timezone,enabled:!n.enabled};n.preset?le.preset=n.preset:le.cron=n.cronExpr,a(await o0(t,le))}catch(le){q(le instanceof Error?le.message:"Failed to update schedule")}finally{E(!1)}}},Se=async()=>{D(!0),q(null);try{await xA(t),a(null),o(!1)}catch(le){q(le instanceof Error?le.message:"Failed to remove schedule")}finally{D(!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(de,{type:"button",variant:"outline",size:"sm",onClick:V,children:n?"Edit schedule":"+ Set schedule"})]}),n==="loading"&&c.jsx("p",{className:"supporting-copy",children:"Loading..."}),n!=="loading"&&!l&&n===null&&c.jsx(Ye,{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(Ye,{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:DT(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(zt,{tone:n.enabled?"positive":"neutral",children:n.enabled?"Active":"Paused"}),c.jsx(de,{type:"button",variant:"outline",size:"sm",disabled:A,onClick:Q,children:n.enabled?"Pause":"Resume"}),c.jsx(de,{type:"button",variant:"ghost",size:"sm",disabled:O,onClick:Se,children:O?"Removing...":"Remove"})]})]}),M&&c.jsx("p",{className:"text-rose-400 text-sm mt-2",children:M})]}),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:le=>d(le.target.value),children:AT.map(le=>c.jsx("option",{value:le.value,children:le.label},le.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:le=>g(parseInt(le.target.value)),children:Array.from({length:24},(le,ue)=>c.jsx("option",{value:ue,children:mf(ue)},ue))})]})]}),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:le=>b(le.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:le=>{le.target.value==="Other"?(z(!0),S("Other")):(z(!1),S(le.target.value))},children:[p0.map(le=>c.jsx("option",{value:le,children:le},le)),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:le=>k(le.target.value)})]}),M&&c.jsx("p",{className:"text-rose-400 text-sm",children:M}),c.jsxs("div",{className:"flex gap-2 justify-end",children:[c.jsx(de,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!1),q(null)},children:"Cancel"}),c.jsx(de,{type:"button",size:"sm",disabled:A||u==="custom"&&!p.trim(),onClick:R,children:A?"Saving...":"Save schedule"})]})]})]})}const MT=[{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 LT({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,S]=w.useState(null),[N,z]=w.useState({});w.useEffect(()=>{SA(t).then(a).catch(()=>a([]))},[t]);const j=O=>{g(D=>D.includes(O)?D.filter(M=>M!==O):[...D,O])},k=async()=>{if(!(!u.trim()||m.length===0)){b(!0),S(null);try{const O=await wA(t,{channel:"webhook",url:u.trim(),events:m});a(D=>D==="loading"?[O]:[...D,O]),d(""),g(["citation.lost","citation.gained"]),o(!1)}catch(O){S(O instanceof Error?O.message:"Failed to add webhook")}finally{b(!1)}}},A=async O=>{try{await jA(t,O),a(D=>D==="loading"?D:D.filter(M=>M.id!==O))}catch(D){S(D instanceof Error?D.message:"Failed to remove webhook")}},E=async O=>{z(D=>({...D,[O]:{state:"testing"}}));try{const D=await NA(t,O);z(M=>({...M,[O]:{state:D.ok?"ok":"fail",status:D.status}}))}catch{z(D=>({...D,[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(de,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!l),S(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:MT.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(de,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!1),S(null)},children:"Cancel"}),c.jsx(de,{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(Ye,{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(D=>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:D.replace("."," ")},D))})}),c.jsx("td",{children:c.jsx(zt,{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 D=N[O.id],M=D.state==="testing"?"Sending…":D.state==="ok"?`Delivered${D.status?` (${D.status})`:""}`:`Failed${D.status?` (${D.status})`:""}`;return c.jsx(zt,{tone:D.state==="ok"?"positive":D.state==="fail"?"negative":"neutral",children:M})})(),c.jsx(de,{variant:"ghost",size:"sm",type:"button",disabled:N[O.id]?.state==="testing",onClick:()=>E(O.id),children:"Test"}),c.jsx(de,{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 $T({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(de,{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":dc(d)},d))}),c.jsx("div",{className:"run-list",children:u.length>0?u.map(d=>c.jsx(ex,{run:d,onOpen:n},d.id)):c.jsxs(Ye,{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 UT={openai:"https://platform.openai.com/api-keys",claude:"https://platform.claude.com/settings/keys"},tx={gemini:"Gemini",openai:"OpenAI",claude:"Claude",local:"Local"},BT={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 IT({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,S]=w.useState(""),[N,z]=w.useState(""),[j,k]=w.useState(!1),[A,E]=w.useState(null),[O,D]=w.useState(!1),M=a?u.trim().length>0:l.trim().length>0;async function q(){if(M){k(!0),E(null),D(!1);try{const Q={};p.trim()&&(Q.maxConcurrency=parseInt(p.trim(),10)),v.trim()&&(Q.maxRequestsPerMinute=parseInt(v.trim(),10)),N.trim()&&(Q.maxRequestsPerDay=parseInt(N.trim(),10)),await yA(t.toLowerCase(),{...l.trim()?{apiKey:l.trim()}:{},...u.trim()?{baseUrl:u.trim()}:{},...m.trim()?{model:m.trim()}:{},...Object.keys(Q).length>0?{quota:Q}:{}}),o(""),d(""),g(""),b(""),S(""),z(""),D(!0),n()}catch(Q){E(Q instanceof Error?Q.message:"Failed to update provider")}finally{k(!1)}}}const V=UT[t.toLowerCase()],R=BT[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:Q=>d(Q.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)":""]}),V&&c.jsx("a",{href:V,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:Q=>o(Q.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:R,value:m,onChange:Q=>g(Q.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:Q=>b(Q.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:Q=>S(Q.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:Q=>z(Q.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(de,{type:"button",size:"sm",disabled:!M||j,onClick:q,children:j?"Saving...":"Save"})]})}function ZT({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 S(){if(v){d(!0),g(null),b(!1);try{await vA({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(de,{type:"button",size:"sm",disabled:!v||u,onClick:S,children:u?"Saving...":"Save Google OAuth app"})]})}function qT({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(Ye,{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(zt,{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(de,{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(IT,{providerName:m.name,onSaved:()=>{o(null),a?.()}})]},m.name)),c.jsxs(Ye,{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(zt,{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(de,{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(ZT,{onSaved:()=>{d(!1),a?.()}})]}),c.jsxs(Ye,{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(zt,{tone:Ko(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(zt,{tone:Ko(n.workerStatus),children:n.workerStatus.state==="ok"?"Healthy":"Attention"})]})]})]})]}),c.jsx("section",{className:"page-section",children:c.jsxs(Ye,{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 HT=[{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 GT({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 KT({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(""),[S,N]=w.useState("US"),[z,j]=w.useState("en"),[k,A]=w.useState(null),[E,O]=w.useState(null),[D,M]=w.useState(null),[q,V]=w.useState(!1),[R,Q]=w.useState(""),[Se,le]=w.useState(!1),[ue,Ae]=w.useState(null),[Be,Re]=w.useState(!1),I=n.providerStatuses.filter(oe=>oe.state==="ready"),[K,se]=w.useState(I[0]?.name??""),[fe,te]=w.useState(5),[C,H]=w.useState(!1),[ne,F]=w.useState(null),[ce,he]=w.useState(""),[we,$]=w.useState(!1),[ae,Ie]=w.useState(null),[re,Ue]=w.useState(!1),[Ct,ut]=w.useState(!1),[bt,Ot]=w.useState(null),[bi,Mt]=w.useState(!1),qt=d.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),dt=R.split(`
|
|
237
|
-
`).map(oe=>oe.trim()).filter(Boolean),Ht=ce.split(`
|
|
238
|
-
`).map(oe=>oe.trim()).filter(Boolean),xi=t.healthChecks.some(oe=>oe.id==="api"&&oe.state==="ready"),We=async()=>{if(!(!qt||!b)){V(!0),M(null);try{const oe=await uc(qt,{displayName:g||d,canonicalDomain:b,country:S,language:z});A(qt),O(oe.id),a(),u(2)}catch(oe){M(oe instanceof Error?oe.message:"Failed to create project")}finally{V(!1)}}},xt=async()=>{if(!k)return;const oe=dt;if(oe.length!==0){Re(!0),Ae(null);try{await rA(k,oe),le(!0),a(),u(3)}catch(vn){Ae(vn instanceof Error?vn.message:"Failed to save key phrases")}finally{Re(!1)}}},ie=async()=>{if(!(!k||!K)){H(!0),F(null);try{const oe=await kA(k,K,fe);if(oe.keywords.length>0){const vn=R?R.trimEnd()+`
|
|
239
|
-
`+oe.keywords.join(`
|
|
240
|
-
`):oe.keywords.join(`
|
|
241
|
-
`);Q(vn)}}catch(oe){F(oe instanceof Error?oe.message:"Failed to generate key phrases")}finally{H(!1)}}},Ne=async()=>{if(!k)return;const oe=Ht;if(oe.length!==0){Ue(!0),Ie(null);try{await Hb(k,oe),$(!0),a(),u(4)}catch(vn){Ie(vn instanceof Error?vn.message:"Failed to save competitors")}finally{Ue(!1)}}},Et=async()=>{if(k){Mt(!0),Ot(null);try{await Gb(k),ut(!0),a()}catch(oe){Ot(oe instanceof Error?oe.message:"Failed to trigger run")}finally{Mt(!1)}}},St=()=>u(oe=>Math.max(0,oe-1)),Kt=(()=>{switch(o){case 0:return c.jsxs(Ye,{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(oe=>c.jsxs("div",{className:"health-check-row",children:[c.jsxs("div",{children:[c.jsx("p",{className:"run-row-title",children:oe.label}),c.jsx("p",{className:"supporting-copy",children:oe.detail}),oe.id==="provider"&&oe.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(zt,{tone:oe.state==="ready"?"positive":"caution",children:oe.state==="ready"?"Ready":"Attention"})]},oe.id))}),c.jsxs("div",{className:"setup-nav",children:[c.jsx("span",{}),c.jsx(de,{type:"button",disabled:!xi,onClick:()=>u(1),children:"Continue"})]})]});case 1:return c.jsxs(Ye,{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(zt,{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(de,{type:"button",variant:"outline",onClick:St,children:"Back"}),c.jsx(de,{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:oe=>m(oe.target.value)}),qt&&qt!==d?c.jsxs("p",{className:"supporting-copy",children:["Slug: ",qt]}):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:oe=>p(oe.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:oe=>v(oe.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:S,onChange:oe=>N(oe.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:oe=>j(oe.target.value.toLowerCase())})]})]}),D?c.jsx("p",{className:"text-rose-400 text-sm",children:D}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(de,{type:"button",variant:"outline",onClick:St,children:"Back"}),c.jsx(de,{type:"button",disabled:!qt||!b||q,onClick:We,children:q?"Creating...":"Create project"})]})]})]});case 2:return c.jsxs(Ye,{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"})]}),Se?c.jsxs(zt,{tone:"positive",children:[dt.length," saved"]}):c.jsxs(zt,{tone:"neutral",children:[dt.length," key phrase",dt.length!==1?"s":""]})]}),c.jsx("p",{className:"supporting-copy",children:"Enter the search queries you want to track. One per line."}),Se?c.jsxs("div",{className:"compact-stack",children:[c.jsx("ul",{className:"detail-list",children:dt.map(oe=>c.jsx("li",{children:oe},oe))}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(de,{type:"button",variant:"outline",onClick:St,children:"Back"}),c.jsx(de,{type:"button",onClick:()=>u(3),children:"Continue"})]})]}):c.jsxs("div",{className:"compact-stack",children:[I.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:K,onChange:oe=>se(oe.target.value),children:I.map(oe=>c.jsxs("option",{value:oe.name,children:[tx[oe.name]??oe.name,oe.model?` (${oe.model})`:""]},oe.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:fe,onChange:oe=>te(Number(oe.target.value)),children:[3,5,10,15,20].map(oe=>c.jsx("option",{value:oe,children:oe},oe))})]}),c.jsx(de,{type:"button",variant:"outline",disabled:C||!K,onClick:ie,children:C?"Analyzing site...":"Generate"})]}),ne?c.jsx("p",{className:"text-rose-400 text-sm",children:ne}):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
|
|
242
|
-
best invisalign downtown brooklyn
|
|
243
|
-
pediatric dentist brooklyn heights`,value:R,onChange:oe=>Q(oe.target.value)})]}),ue?c.jsx("p",{className:"text-rose-400 text-sm",children:ue}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(de,{type:"button",variant:"outline",onClick:St,children:"Back"}),c.jsx(de,{type:"button",disabled:dt.length===0||Be,onClick:xt,children:Be?"Saving...":`Save ${dt.length} key phrase${dt.length!==1?"s":""}`})]})]})]});case 3:return c.jsxs(Ye,{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"})]}),we?c.jsx(zt,{tone:"positive",children:"Saved"}):null]}),c.jsx("p",{className:"supporting-copy",children:"Domains that compete for the same key phrases. One per line."}),we?c.jsxs("div",{className:"compact-stack",children:[c.jsx("ul",{className:"detail-list",children:Ht.map(oe=>c.jsx("li",{children:oe},oe))}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(de,{type:"button",variant:"outline",onClick:St,children:"Back"}),c.jsx(de,{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
|
|
244
|
-
competitor2.com`,value:ce,onChange:oe=>he(oe.target.value)})]}),ae?c.jsx("p",{className:"text-rose-400 text-sm",children:ae}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(de,{type:"button",variant:"outline",onClick:St,children:"Back"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(de,{type:"button",variant:"outline",onClick:()=>u(4),children:"Skip"}),c.jsx(de,{type:"button",disabled:Ht.length===0||re,onClick:Ne,children:re?"Saving...":`Save ${Ht.length} competitor${Ht.length!==1?"s":""}`})]})]})]})]});case 4:return c.jsxs(Ye,{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"})]}),Ct?c.jsx(zt,{tone:"positive",children:"Queued"}):null]}),Ct?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(de,{type:"button",onClick:()=>l(E?`/projects/${E}`:"/"),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}),"."]}),bt?c.jsx("p",{className:"text-rose-400 text-sm",children:bt}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(de,{type:"button",variant:"outline",onClick:St,children:"Back"}),c.jsx(de,{type:"button",disabled:bi,onClick:Et,children:bi?"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(GT,{current:o,labels:HT}),c.jsx("section",{className:"setup-wizard",children:Kt})]})}function YT({onNavigate:t}){return c.jsx("div",{className:"page-container",children:c.jsx("section",{className:"page-section",children:c.jsxs(Ye,{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(de,{asChild:!0,children:c.jsx("a",{href:"/",onClick:yn(t,"/"),children:"Return to overview"})})]})})})}function VT({title:t,subtitle:n,children:a,open:l,onClose:o}){return c.jsx(qE,{open:l,onOpenChange:u=>u?void 0:o(),children:c.jsxs(Lb,{children:[c.jsxs(VE,{className:"drawer-head",children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:n}),c.jsx($b,{id:"drawer-title",children:t}),c.jsx(Ub,{className:"sr-only",children:n})]}),c.jsx("div",{className:"drawer-body",children:a})]})})}function g0(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 PT({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,S]=w.useState({}),N=TC(n.project),z=new Set(N.map(df)),j=t.runHistory,k=j.length>1,A=u>=0&&m!==null,E=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=E.citationState==="cited"||E.citationState==="emerging",M=E.citedDomains.findIndex(K=>z.has(K.toLowerCase().replace(/^www\./,"")))+1,q=E.citedDomains.length,V=n.project.displayName||n.project.name,R=[...N.map(df),V,V.split(" ").slice(0,2).join(" ")].filter(K=>K.trim().length>2),Q=O?"cited":E.citationState==="lost"?"lost":E.citationState==="pending"?"pending":"not-cited",Se=w.useRef(0),le=w.useCallback(async K=>{const se=++Se.current;if(K===-1||K===j.length-1){d(-1),g(null),o(!1);return}d(K),o(!1);const fe=j[K],te=`${fe.runId}::${t.keyword}::${t.provider}`;if(v[te]){g(v[te]);return}b(!0);try{const C=await Gl(fe.runId);if(se!==Se.current)return;const H=C.snapshots.find(F=>F.keyword===t.keyword&&F.provider===t.provider)??C.snapshots.find(F=>F.keyword===t.keyword),ne=H?{citationState:H.citationState,provider:H.provider,model:H.model??null,answerSnippet:H.answerText??"",citedDomains:H.citedDomains,competitorDomains:H.competitorOverlap,groundingSources:H.groundingSources,evidenceUrls:[],changeLabel:fe.citationState,summary:""}:{citationState:fe.citationState,provider:t.provider,model:fe.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],groundingSources:[],evidenceUrls:[],changeLabel:fe.citationState,summary:"Snapshot data not available for this run."};S(F=>({...F,[te]:ne})),g(ne)}catch{if(se!==Se.current)return;g({citationState:fe.citationState,provider:t.provider,model:fe.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],groundingSources:[],evidenceUrls:[],changeLabel:fe.citationState,summary:"Failed to load historical run data."})}finally{se===Se.current&&b(!1)}},[j,t.keyword,t.provider,v]),Ae=(A||t.historyScope!=="provider")&&E.model?`${E.provider} (${E.model}) · ${E.changeLabel.toLowerCase()}`:`${E.provider} · ${E.changeLabel.toLowerCase()}`,Be=!A&&t.historyScope==="provider"?[t.model?`Current model: ${t.model}`:null,t.modelsSeen&&t.modelsSeen.length>1?`History spans ${t.modelsSeen.length} models`:null].filter(Boolean).join(" · "):"",Re=O&&M>0?{label:"Citation confirmed",title:`Cited #${M} of ${q} domain${q!==1?"s":""}`,meta:Ae}:O?{label:"Citation confirmed",title:"Cited in this answer",meta:Ae}:E.citationState==="lost"?{label:"Citation lost",title:q>0?`${q} domain${q!==1?"s":""} cited instead`:"No longer appearing in this answer",meta:Ae}:E.citationState==="pending"?{label:"Pending",title:"Awaiting first visibility run",meta:"No provider data yet"}:{label:"Not in this answer",title:q>0?`${q} domain${q!==1?"s":""} cited instead`:"No domains cited for this query",meta:Ae},I=()=>{if(!E.answerSnippet)return null;const K=E.answerSnippet.split(`
|
|
245
|
-
`),se=[];let fe=[],te=0;const C=()=>{if(fe.length===0)return;const H=fe.join(" ").trim();H&&se.push(c.jsx("p",{className:se.length>0?"mt-2.5":"",children:g0(H,R)},te++)),fe=[]};for(const H of K){const ne=H.trim();if(/^[-–—]{3,}$/.test(ne)){C(),se.push(c.jsx("hr",{className:"border-zinc-800/60 my-3"},te++));continue}const F=ne.match(/^(#{1,3})\s+(.+)$/);if(F){C();const ce=F[1].length,he=F[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s#]+/u,"").trim()||F[2],we=ce===1?"text-[13px] font-semibold text-zinc-100 mt-4 mb-1":ce===2?"text-xs font-semibold text-zinc-200 mt-3 mb-0.5":"text-xs font-medium text-zinc-300 mt-2";se.push(c.jsx("p",{className:we,children:g0(he,R)},te++));continue}if(ne===""){C();continue}fe.push(ne)}return C(),se};return c.jsx(Dv,{open:!0,onOpenChange:K=>{K||a()},children:c.jsxs(Rv,{children:[c.jsx(Lf,{className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm"}),c.jsxs($f,{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," · ",E.provider||"All providers"]}),c.jsx(Uf,{className:"text-lg font-semibold text-zinc-50 truncate",children:t.keyword})]}),c.jsxs(Lv,{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(If,{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((K,se)=>{const fe=u===-1&&se===j.length-1||u===se,te=K.citationState==="cited"?"bg-emerald-400":K.citationState==="emerging"?"bg-amber-400":K.citationState==="lost"?"bg-rose-400":"bg-zinc-600",H=new Date(K.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"}),ne=!!(K.model&&se>0&&j[se-1]?.model&&j[se-1].model!==K.model);return c.jsxs("button",{type:"button",className:`evidence-run-dot ${fe?"evidence-run-dot--selected":""}`,onClick:()=>le(se===j.length-1?-1:se),"aria-label":[`Run ${H}: ${K.citationState}`,K.model?`model ${K.model}`:null,ne?"model changed":null].filter(Boolean).join(" — "),"aria-pressed":fe,children:[c.jsx("span",{className:`size-2 rounded-full ${te} ${ne?"ring-1 ring-amber-300/80 ring-offset-2 ring-offset-zinc-950":""}`,"aria-hidden":"true"}),c.jsx("span",{className:"text-[10px] text-zinc-500",children:H})]},se)})}),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:()=>le(-1),children:"← Back to latest"})]}),!A&&(t.modelTransitions?.length??0)>0&&c.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:t.modelTransitions.map(K=>c.jsx("span",{className:"inline-flex items-center rounded-full border border-amber-400/30 bg-amber-400/10 px-2 py-1 text-[10px] text-amber-100",children:`${K.fromModel??"unknown"} -> ${K.toModel??"unknown"} on ${new Date(K.createdAt).toLocaleDateString()}`},`${K.runId}:${K.toModel??"unknown"}`))})]}),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--${Q}`,children:[c.jsx("p",{className:`evidence-position-label evidence-position-label--${Q}`,children:Re.label}),c.jsx("p",{className:`evidence-position-title evidence-position-title--${Q}`,children:Re.title}),c.jsx("p",{className:"evidence-position-meta",children:Re.meta}),Be&&c.jsx("p",{className:"mt-1 text-[11px] text-zinc-500",children:Be})]}),E.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:I()}),E.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"})]}),!E.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((K,se)=>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:K})]},se))})]}),E.summary&&c.jsx("p",{className:"text-xs text-zinc-600 border-t border-zinc-800/40 pt-3 mt-1",children:E.summary})]}),c.jsxs("div",{className:"evidence-modal-sidebar",children:[E.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:[E.citedDomains.map((K,se)=>{const fe=K.toLowerCase().replace(/^www\./,""),te=z.has(fe),C=!te&&E.competitorDomains.some(ne=>ne.toLowerCase().replace(/^www\./,"")===fe),H=te?"you":C?"competitor":"other";return c.jsxs("div",{className:`citation-leaderboard-item citation-leaderboard-item--${H}`,children:[c.jsxs("span",{className:"citation-leaderboard-rank",children:["#",se+1]}),c.jsx("span",{className:"citation-leaderboard-domain",children:K}),te&&c.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),C&&c.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},K)}),!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"})]})]})]}),E.groundingSources.length>0&&c.jsxs("div",{children:[c.jsxs("p",{className:"drawer-section-label",children:["Grounding sources (",E.groundingSources.length,")"]}),c.jsx("ul",{className:"grid gap-0.5",children:E.groundingSources.map((K,se)=>c.jsx("li",{className:"truncate text-sm",children:c.jsx("a",{href:K.uri,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:K.title||K.uri})},se))})]}),E.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:E.evidenceUrls.map(K=>c.jsx("li",{className:"truncate text-sm",children:c.jsx("a",{href:K,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:K})},K))})]}),E.citedDomains.length===0&&E.groundingSources.length===0&&E.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 QT(){try{const[t,n,a]=await Promise.all([aA(),sA(),Kb().catch(()=>null)]),l=await Promise.all(t.map(async o=>{const u=n.filter(S=>S.projectId===o.id),d=u.filter(S=>(S.status==="completed"||S.status==="partial")&&S.kind==="answer-visibility").sort((S,N)=>N.createdAt.localeCompare(S.createdAt)),[m,g,p,b,v]=await Promise.all([lA(o.name).catch(()=>[]),Zb(o.name).catch(()=>[]),qb(o.name).catch(()=>[]),d[0]?Gl(d[0].id).catch(()=>null):Promise.resolve(null),d[1]?Gl(d[1].id).catch(()=>null):Promise.resolve(null)]);return{project:o,runs:u,keywords:m,competitors:g,timeline:p,latestRunDetail:b,previousRunDetail:v}}));return iT(l,a)}catch{return null}}function XT({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(()=>cT(t)),[S,N]=w.useState(!1),[z,j]=w.useState(null),[k,A]=w.useState(null),[E,O]=w.useState(!1),[D,M]=w.useState(a??lT),q=w.useCallback(async()=>{const $=await QT();$?(u($),p(!0)):p(!1),m(!1)},[]);w.useEffect(()=>{n||q()},[n,q]);const V=o?.runs.some($=>$.status==="running"||$.status==="queued")??!1;if(w.useEffect(()=>{if(!V)return;const $=setInterval(()=>{q()},3e3);return()=>clearInterval($)},[V,q]),w.useEffect(()=>{if(typeof window>"u")return;const $=()=>{v(Xi(window.location.pathname))};return window.addEventListener("popstate",$),()=>{window.removeEventListener("popstate",$)}},[]),w.useEffect(()=>{N(!1),j(null)},[b]),w.useEffect(()=>{if(d||!o)return;const $=o.projects.length>0;if(b==="/setup"&&$)typeof window<"u"&&Xi(window.location.pathname)!=="/"&&window.history.replaceState({},"","/"),v("/");else if(b==="/"&&!$){const ae="/setup";typeof window<"u"&&Xi(window.location.pathname)!==ae&&window.history.replaceState({},"",ae),v(ae)}},[d,o,b]),w.useEffect(()=>{if(typeof window>"u"||z===null)return;const $=ae=>{ae.key==="Escape"&&j(null)};return window.addEventListener("keydown",$),()=>{window.removeEventListener("keydown",$)}},[z]),w.useEffect(()=>{if(!l||typeof window>"u")return;let $=!0;const ae=async()=>{const re=await rT("/health","API"),Ue=re.state==="ok"?{label:"Runner",state:"ok",detail:"In-process job runner"}:{label:"Runner",state:re.state,detail:"Depends on API"};$&&M({apiStatus:re,workerStatus:Ue})};ae();const Ie=window.setInterval(()=>{ae()},15e3);return()=>{$=!1,window.clearInterval(Ie)}},[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(de,{type:"button",onClick:()=>{m(!0),q()},children:"Retry connection"})]})})})});const R=o??sT.dashboard,Q=oT(b,R),Se=Q.kind==="project"?Bb(R,Q.projectId):void 0,le=$=>{const ae=Xi($);if(typeof window>"u"){v(ae);return}Xi(window.location.pathname)!==ae&&window.history.pushState({},"",ae),v(ae)},ue=$=>{if(!$)return;j({kind:"run",runId:$}),A(null),O(!0);const ae=$;Gl($).then(Ie=>{j(re=>(re?.kind==="run"&&re.runId===ae&&A(Ie),re))}).catch(()=>{j(Ie=>(Ie?.kind==="run"&&Ie.runId===ae&&A(null),Ie))}).finally(()=>O(!1))},Ae=()=>{_A().catch($=>{console.error("Failed to trigger all runs",$)}).finally(()=>{q()})};w.useEffect(()=>{if(z?.kind!=="run"||!k||k.status!=="running"&&k.status!=="queued")return;const $=setInterval(()=>{Gl(z.runId).then(ae=>{A(ae),ae.status!=="running"&&ae.status!=="queued"&&q()}).catch(()=>{})},3e3);return()=>clearInterval($)},[z,k?.status,k?.snapshots.length,q]);const Be=$=>{j({kind:"evidence",evidenceId:$})},Re=async $=>{await Gb($),q()},I=async $=>{try{await pA($),le("/"),q()}catch(ae){console.error("Failed to delete project:",ae)}},K=async($,ae)=>{await cA($,ae),await q()},se=async($,ae)=>{await oA($,ae),await q()},fe=async($,ae)=>{const re=(await Zb($)).map(Ct=>Ct.domain),Ue=[...new Set([...re,...ae])];await Hb($,Ue),await q()},te=async($,ae)=>{await uA($,ae),await q()},C=async($,ae)=>{await dA($,ae),await q()},H=fT(R.portfolioOverview.systemHealth,D,R.settings),ne=mT(R.setup,D,R.settings),F=z?.kind==="run"?eA(R,z.runId):void 0,ce=z?.kind==="evidence"?tA(R,z.evidenceId):void 0,he=[{label:"Overview",href:"/",icon:z1,active:zo(Q,"overview")},{label:"Projects",href:"/projects",icon:N1,active:zo(Q,"projects")},{label:"Runs",href:"/runs",icon:A1,active:zo(Q,"runs")},{label:"Settings",href:"/settings",icon:M1,active:zo(Q,"settings")}],we=Q.kind==="overview"?"Portfolio":Q.kind==="projects"?"Projects":Q.kind==="project"&&Se?Se.project.name:Q.kind==="runs"?"Runs":Q.kind==="settings"?"Settings":Q.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(h0,{navigate:le})}),c.jsxs("nav",{className:"sidebar-nav",children:[he.map($=>c.jsxs("a",{className:`sidebar-link ${$.active?"sidebar-link-active":""}`,href:$.href,"aria-current":$.active?"page":void 0,onClick:yn(le,$.href),children:[c.jsx($.icon,{className:"sidebar-icon"}),c.jsx("span",{children:$.label})]},$.label)),R.projects.length>0?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"sidebar-section-title",children:"Projects"}),R.projects.map($=>{const ae=Q.kind==="project"&&Se?.project.id===$.project.id,Ie=$.visibilitySummary.tone;return c.jsxs("a",{className:`sidebar-project ${ae?"sidebar-project-active":""}`,href:`/projects/${$.project.id}`,onClick:yn(le,`/projects/${$.project.id}`),children:[c.jsx("span",{className:`sidebar-dot sidebar-dot-${Ie}`}),c.jsx("span",{children:$.project.name})]},$.project.id)})]}):null,R.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":Q.kind==="setup"?"page":void 0,onClick:yn(le,"/setup"),children:[c.jsx(D1,{className:"sidebar-icon"}),c.jsx("span",{children:"Setup"})]})]}):null]}),c.jsx("div",{className:"sidebar-footer",children:d0.map($=>c.jsx("a",{className:"sidebar-footer-link",href:$.href,target:"_blank",rel:"noreferrer",children:$.label},$.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(h0,{compact:!0,navigate:le})}),c.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[c.jsx("a",{href:"/",onClick:yn(le,"/"),children:"Home"}),c.jsx(Bf,{className:"breadcrumb-sep size-3"}),c.jsx("span",{className:"breadcrumb-current",children:we})]})]}),c.jsxs("div",{className:"topbar-actions",children:[c.jsxs("div",{className:"health-pill-row",children:[c.jsxs("span",{className:`health-pill health-pill-${D.apiStatus.state}`,children:["API ",D.apiStatus.state==="ok"?"ok":D.apiStatus.state]}),c.jsxs("span",{className:`health-pill health-pill-${D.workerStatus.state}`,children:["Worker ",D.workerStatus.state==="ok"?"ok":D.workerStatus.state]})]}),c.jsxs(de,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":S,"aria-controls":"mobile-nav",onClick:()=>N($=>!$),children:[c.jsx(C1,{className:"size-4"}),c.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),c.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${S?"mobile-nav-open":""}`,children:[c.jsxs(de,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>N(!1),children:[c.jsx(If,{className:"size-5"}),c.jsx("span",{className:"sr-only",children:"Close navigation"})]}),he.map($=>c.jsx("a",{className:`mobile-nav-link ${$.active?"mobile-nav-link-active":""}`,href:$.href,"aria-current":$.active?"page":void 0,onClick:yn(le,$.href),children:$.label},$.label)),R.projects.length>0?c.jsxs("div",{className:"mobile-nav-section",children:[c.jsx("p",{className:"mobile-nav-section-title",children:"Projects"}),R.projects.map($=>c.jsx("a",{className:"mobile-nav-link",href:`/projects/${$.project.id}`,onClick:yn(le,`/projects/${$.project.id}`),children:$.project.name},$.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:[Q.kind==="overview"?c.jsx(NT,{model:R.portfolioOverview,systemHealth:H,onNavigate:le,onOpenRun:ue}):null,Q.kind==="projects"?c.jsx(kT,{projects:R.projects,onNavigate:le,onProjectCreated:q}):null,Q.kind==="project"&&Se?c.jsx(_T,{model:Se,tab:Q.tab,onOpenEvidence:Be,onOpenRun:ue,onTriggerRun:Re,onDeleteProject:I,onAddKeywords:K,onDeleteKeywords:se,onAddCompetitors:fe,onUpdateOwnedDomains:te,onUpdateProject:C,onNavigate:le}):null,Q.kind==="runs"?c.jsx($T,{runs:R.runs,onOpenRun:ue,onTriggerAll:Ae}):null,Q.kind==="settings"?c.jsx(qT,{settings:R.settings,healthSnapshot:D,onSettingsChanged:q}):null,Q.kind==="setup"?c.jsx(KT,{model:ne,settings:R.settings,onProjectCreated:q,onNavigate:le}):null,Q.kind==="not-found"?c.jsx(YT,{onNavigate:le}):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:d0.map($=>c.jsx("a",{href:$.href,target:"_blank",rel:"noreferrer",children:$.label},$.href))})]})]}),F?c.jsxs(VT,{open:F!==void 0,title:F.summary,subtitle:`${F.projectName} · ${F.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(fc,{status:F.status}),c.jsx("span",{className:"text-zinc-400",children:F.startedAt}),c.jsx("span",{className:"text-zinc-500",children:F.duration}),c.jsx("span",{className:"text-zinc-600",children:F.triggerLabel})]}),F.status==="failed"&&F.statusDetail&&c.jsx("p",{className:"text-sm text-rose-300/80 mt-2",children:F.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"}),E?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($=>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:$.keyword??"Unknown key phrase"}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(th,{provider:$.provider}),c.jsx(Db,{variant:$.citationState==="cited"?"success":"neutral",children:$.citationState})]})]}),$.model&&c.jsx("p",{className:"text-[11px] text-zinc-500 font-mono",children:$.model}),$.citedDomains.length>0&&c.jsxs("p",{className:"text-xs text-zinc-500 mt-1",children:[c.jsx("span",{className:"text-zinc-400",children:"Sources:"})," ",$.citedDomains.join(", ")]}),$.competitorOverlap.length>0&&c.jsxs("p",{className:"text-xs text-rose-400/80 mt-0.5",children:["Competitor cited: ",$.competitorOverlap.join(", ")]}),$.groundingSources&&$.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:[$.groundingSources.length," grounding source",$.groundingSources.length!==1?"s":""]}),c.jsx("ul",{className:"mt-1 space-y-0.5",children:$.groundingSources.map((ae,Ie)=>c.jsx("li",{className:"text-xs text-zinc-500 truncate",children:c.jsx("a",{href:ae.uri,target:"_blank",rel:"noreferrer",className:"hover:text-zinc-300",children:ae.title||ae.uri})},Ie))})]}),$.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:$.answerText})]})]},$.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:dT(k.error)})]}):c.jsx("p",{className:"text-sm text-zinc-500",children:"No snapshot data available."})]})]}):null,ce?c.jsx(PT,{evidence:ce.evidence,project:ce.project,onClose:()=>j(null)}):null]})}const nx=document.getElementById("root");if(!nx)throw new Error("Expected #root element for web app bootstrap.");kw.createRoot(nx).render(c.jsx(w.StrictMode,{children:c.jsx(XT,{})}));
|