@skybridge/devtools 0.0.0-dev.d44bc64 → 0.0.0-dev.d4584f0
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.
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
var Cq=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var d2e=Cq((ns,rs)=>{function Oq(e,t){for(var r=0;r<t.length;r++){const i=t[r];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function r(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=r(s);fetch(s.href,l)}})();var uS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t2={exports:{}},pb={};var c5;function Rq(){if(c5)return pb;c5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var f in s)f!=="key"&&(l[f]=s[f])}else l=s;return s=l.ref,{$$typeof:e,type:i,key:c,ref:s!==void 0?s:null,props:l}}return pb.Fragment=t,pb.jsx=r,pb.jsxs=r,pb}var f5;function Aq(){return f5||(f5=1,t2.exports=Rq()),t2.exports}var k=Aq(),n2={exports:{}},It={};var d5;function Mq(){if(d5)return It;d5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function _(z){return z===null||typeof z!="object"?null:(z=v&&z[v]||z["@@iterator"],typeof z=="function"?z:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,w={};function x(z,L,Y){this.props=z,this.context=L,this.refs=w,this.updater=Y||b}x.prototype.isReactComponent={},x.prototype.setState=function(z,L){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,L,"setState")},x.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function E(){}E.prototype=x.prototype;function R(z,L,Y){this.props=z,this.context=L,this.refs=w,this.updater=Y||b}var T=R.prototype=new E;T.constructor=R,S(T,x.prototype),T.isPureReactComponent=!0;var C=Array.isArray;function O(){}var M={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function U(z,L,Y){var I=Y.ref;return{$$typeof:e,type:z,key:L,ref:I!==void 0?I:null,props:Y}}function B(z,L){return U(z.type,L,z.props)}function q(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function V(z){var L={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(Y){return L[Y]})}var G=/\/+/g;function ne(z,L){return typeof z=="object"&&z!==null&&z.key!=null?V(""+z.key):L.toString(36)}function oe(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(O,O):(z.status="pending",z.then(function(L){z.status==="pending"&&(z.status="fulfilled",z.value=L)},function(L){z.status==="pending"&&(z.status="rejected",z.reason=L)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function K(z,L,Y,I,X){var J=typeof z;(J==="undefined"||J==="boolean")&&(z=null);var he=!1;if(z===null)he=!0;else switch(J){case"bigint":case"string":case"number":he=!0;break;case"object":switch(z.$$typeof){case e:case t:he=!0;break;case m:return he=z._init,K(he(z._payload),L,Y,I,X)}}if(he)return X=X(z),he=I===""?"."+ne(z,0):I,C(X)?(Y="",he!=null&&(Y=he.replace(G,"$&/")+"/"),K(X,L,Y,"",function(je){return je})):X!=null&&(q(X)&&(X=B(X,Y+(X.key==null||z&&z.key===X.key?"":(""+X.key).replace(G,"$&/")+"/")+he)),L.push(X)),1;he=0;var xe=I===""?".":I+":";if(C(z))for(var we=0;we<z.length;we++)I=z[we],J=xe+ne(I,we),he+=K(I,L,Y,J,X);else if(we=_(z),typeof we=="function")for(z=we.call(z),we=0;!(I=z.next()).done;)I=I.value,J=xe+ne(I,we++),he+=K(I,L,Y,J,X);else if(J==="object"){if(typeof z.then=="function")return K(oe(z),L,Y,I,X);throw L=String(z),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return he}function ee(z,L,Y){if(z==null)return z;var I=[],X=0;return K(z,I,"","",function(J){return L.call(Y,J,X++)}),I}function re(z){if(z._status===-1){var L=z._result;L=L(),L.then(function(Y){(z._status===0||z._status===-1)&&(z._status=1,z._result=Y)},function(Y){(z._status===0||z._status===-1)&&(z._status=2,z._result=Y)}),z._status===-1&&(z._status=0,z._result=L)}if(z._status===1)return z._result.default;throw z._result}var ue=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},Q={map:ee,forEach:function(z,L,Y){ee(z,function(){L.apply(this,arguments)},Y)},count:function(z){var L=0;return ee(z,function(){L++}),L},toArray:function(z){return ee(z,function(L){return L})||[]},only:function(z){if(!q(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return It.Activity=g,It.Children=Q,It.Component=x,It.Fragment=r,It.Profiler=s,It.PureComponent=R,It.StrictMode=i,It.Suspense=d,It.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,It.__COMPILER_RUNTIME={__proto__:null,c:function(z){return M.H.useMemoCache(z)}},It.cache=function(z){return function(){return z.apply(null,arguments)}},It.cacheSignal=function(){return null},It.cloneElement=function(z,L,Y){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var I=S({},z.props),X=z.key;if(L!=null)for(J in L.key!==void 0&&(X=""+L.key),L)!D.call(L,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&L.ref===void 0||(I[J]=L[J]);var J=arguments.length-2;if(J===1)I.children=Y;else if(1<J){for(var he=Array(J),xe=0;xe<J;xe++)he[xe]=arguments[xe+2];I.children=he}return U(z.type,X,I)},It.createContext=function(z){return z={$$typeof:c,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:l,_context:z},z},It.createElement=function(z,L,Y){var I,X={},J=null;if(L!=null)for(I in L.key!==void 0&&(J=""+L.key),L)D.call(L,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(X[I]=L[I]);var he=arguments.length-2;if(he===1)X.children=Y;else if(1<he){for(var xe=Array(he),we=0;we<he;we++)xe[we]=arguments[we+2];X.children=xe}if(z&&z.defaultProps)for(I in he=z.defaultProps,he)X[I]===void 0&&(X[I]=he[I]);return U(z,J,X)},It.createRef=function(){return{current:null}},It.forwardRef=function(z){return{$$typeof:f,render:z}},It.isValidElement=q,It.lazy=function(z){return{$$typeof:m,_payload:{_status:-1,_result:z},_init:re}},It.memo=function(z,L){return{$$typeof:h,type:z,compare:L===void 0?null:L}},It.startTransition=function(z){var L=M.T,Y={};M.T=Y;try{var I=z(),X=M.S;X!==null&&X(Y,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(O,ue)}catch(J){ue(J)}finally{L!==null&&Y.types!==null&&(L.types=Y.types),M.T=L}},It.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},It.use=function(z){return M.H.use(z)},It.useActionState=function(z,L,Y){return M.H.useActionState(z,L,Y)},It.useCallback=function(z,L){return M.H.useCallback(z,L)},It.useContext=function(z){return M.H.useContext(z)},It.useDebugValue=function(){},It.useDeferredValue=function(z,L){return M.H.useDeferredValue(z,L)},It.useEffect=function(z,L){return M.H.useEffect(z,L)},It.useEffectEvent=function(z){return M.H.useEffectEvent(z)},It.useId=function(){return M.H.useId()},It.useImperativeHandle=function(z,L,Y){return M.H.useImperativeHandle(z,L,Y)},It.useInsertionEffect=function(z,L){return M.H.useInsertionEffect(z,L)},It.useLayoutEffect=function(z,L){return M.H.useLayoutEffect(z,L)},It.useMemo=function(z,L){return M.H.useMemo(z,L)},It.useOptimistic=function(z,L){return M.H.useOptimistic(z,L)},It.useReducer=function(z,L,Y){return M.H.useReducer(z,L,Y)},It.useRef=function(z){return M.H.useRef(z)},It.useState=function(z){return M.H.useState(z)},It.useSyncExternalStore=function(z,L,Y){return M.H.useSyncExternalStore(z,L,Y)},It.useTransition=function(){return M.H.useTransition()},It.version="19.2.4",It}var h5;function _g(){return h5||(h5=1,n2.exports=Mq()),n2.exports}var j=_g();const Qo=tu(j),A1=Oq({__proto__:null,default:Qo},[j]);var r2={exports:{}},mb={},a2={exports:{}},i2={};var p5;function jq(){return p5||(p5=1,(function(e){function t(K,ee){var re=K.length;K.push(ee);e:for(;0<re;){var ue=re-1>>>1,Q=K[ue];if(0<s(Q,ee))K[ue]=ee,K[re]=Q,re=ue;else break e}}function r(K){return K.length===0?null:K[0]}function i(K){if(K.length===0)return null;var ee=K[0],re=K.pop();if(re!==ee){K[0]=re;e:for(var ue=0,Q=K.length,z=Q>>>1;ue<z;){var L=2*(ue+1)-1,Y=K[L],I=L+1,X=K[I];if(0>s(Y,re))I<Q&&0>s(X,Y)?(K[ue]=X,K[I]=re,ue=I):(K[ue]=Y,K[L]=re,ue=L);else if(I<Q&&0>s(X,re))K[ue]=X,K[I]=re,ue=I;else break e}}return ee}function s(K,ee){var re=K.sortIndex-ee.sortIndex;return re!==0?re:K.id-ee.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],h=[],m=1,g=null,v=3,_=!1,b=!1,S=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function T(K){for(var ee=r(h);ee!==null;){if(ee.callback===null)i(h);else if(ee.startTime<=K)i(h),ee.sortIndex=ee.expirationTime,t(d,ee);else break;ee=r(h)}}function C(K){if(S=!1,T(K),!b)if(r(d)!==null)b=!0,O||(O=!0,V());else{var ee=r(h);ee!==null&&oe(C,ee.startTime-K)}}var O=!1,M=-1,D=5,U=-1;function B(){return w?!0:!(e.unstable_now()-U<D)}function q(){if(w=!1,O){var K=e.unstable_now();U=K;var ee=!0;try{e:{b=!1,S&&(S=!1,E(M),M=-1),_=!0;var re=v;try{t:{for(T(K),g=r(d);g!==null&&!(g.expirationTime>K&&B());){var ue=g.callback;if(typeof ue=="function"){g.callback=null,v=g.priorityLevel;var Q=ue(g.expirationTime<=K);if(K=e.unstable_now(),typeof Q=="function"){g.callback=Q,T(K),ee=!0;break t}g===r(d)&&i(d),T(K)}else i(d);g=r(d)}if(g!==null)ee=!0;else{var z=r(h);z!==null&&oe(C,z.startTime-K),ee=!1}}break e}finally{g=null,v=re,_=!1}ee=void 0}}finally{ee?V():O=!1}}}var V;if(typeof R=="function")V=function(){R(q)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,ne=G.port2;G.port1.onmessage=q,V=function(){ne.postMessage(null)}}else V=function(){x(q,0)};function oe(K,ee){M=x(function(){K(e.unstable_now())},ee)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(K){K.callback=null},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(K){switch(v){case 1:case 2:case 3:var ee=3;break;default:ee=v}var re=v;v=ee;try{return K()}finally{v=re}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(K,ee){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var re=v;v=K;try{return ee()}finally{v=re}},e.unstable_scheduleCallback=function(K,ee,re){var ue=e.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?ue+re:ue):re=ue,K){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=re+Q,K={id:m++,callback:ee,priorityLevel:K,startTime:re,expirationTime:Q,sortIndex:-1},re>ue?(K.sortIndex=re,t(h,K),r(d)===null&&K===r(h)&&(S?(E(M),M=-1):S=!0,oe(C,re-ue))):(K.sortIndex=Q,t(d,K),b||_||(b=!0,O||(O=!0,V()))),K},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(K){var ee=v;return function(){var re=v;v=ee;try{return K.apply(this,arguments)}finally{v=re}}}})(i2)),i2}var m5;function yz(){return m5||(m5=1,a2.exports=jq()),a2.exports}var o2={exports:{}},Ri={};var g5;function kq(){if(g5)return Ri;g5=1;var e=_g();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(d,h,m){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:d,containerInfo:h,implementation:m}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Ri.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Ri.createPortal=function(d,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(d,h,null,m)},Ri.flushSync=function(d){var h=c.T,m=i.p;try{if(c.T=null,i.p=2,d)return d()}finally{c.T=h,i.p=m,i.d.f()}},Ri.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(d,h))},Ri.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},Ri.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var m=h.as,g=f(m,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,_=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?i.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:_}):m==="script"&&i.d.X(d,{crossOrigin:g,integrity:v,fetchPriority:_,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Ri.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=f(h.as,h.crossOrigin);i.d.M(d,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(d)},Ri.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,g=f(m,h.crossOrigin);i.d.L(d,m,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Ri.preloadModule=function(d,h){if(typeof d=="string")if(h){var m=f(h.as,h.crossOrigin);i.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(d)},Ri.requestFormReset=function(d){i.d.r(d)},Ri.unstable_batchedUpdates=function(d,h){return d(h)},Ri.useFormState=function(d,h,m){return c.H.useFormState(d,h,m)},Ri.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ri.version="19.2.4",Ri}var y5;function vz(){if(y5)return o2.exports;y5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),o2.exports=kq(),o2.exports}var v5;function Dq(){if(v5)return mb;v5=1;var e=yz(),t=_g(),r=vz();function i(n){var a="https://react.dev/errors/"+n;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){var a=n,o=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(o=a.return),n=a.return;while(n)}return a.tag===3?o:null}function c(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function f(n){if(n.tag===31){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function d(n){if(l(n)!==n)throw Error(i(188))}function h(n){var a=n.alternate;if(!a){if(a=l(n),a===null)throw Error(i(188));return a!==n?null:n}for(var o=n,u=a;;){var p=o.return;if(p===null)break;var y=p.alternate;if(y===null){if(u=p.return,u!==null){o=u;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===o)return d(p),n;if(y===u)return d(p),a;y=y.sibling}throw Error(i(188))}if(o.return!==u.return)o=p,u=y;else{for(var A=!1,N=p.child;N;){if(N===o){A=!0,o=p,u=y;break}if(N===u){A=!0,u=p,o=y;break}N=N.sibling}if(!A){for(N=y.child;N;){if(N===o){A=!0,o=y,u=p;break}if(N===u){A=!0,u=y,o=p;break}N=N.sibling}if(!A)throw Error(i(189))}}if(o.alternate!==u)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?n:a}function m(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n;for(n=n.child;n!==null;){if(a=m(n),a!==null)return a;n=n.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),R=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function V(n){return n===null||typeof n!="object"?null:(n=q&&n[q]||n["@@iterator"],typeof n=="function"?n:null)}var G=Symbol.for("react.client.reference");function ne(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===G?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case S:return"Fragment";case x:return"Profiler";case w:return"StrictMode";case C:return"Suspense";case O:return"SuspenseList";case U:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case b:return"Portal";case R:return n.displayName||"Context";case E:return(n._context.displayName||"Context")+".Consumer";case T:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case M:return a=n.displayName||null,a!==null?a:ne(n.type)||"Memo";case D:a=n._payload,n=n._init;try{return ne(n(a))}catch{}}return null}var oe=Array.isArray,K=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},ue=[],Q=-1;function z(n){return{current:n}}function L(n){0>Q||(n.current=ue[Q],ue[Q]=null,Q--)}function Y(n,a){Q++,ue[Q]=n.current,n.current=a}var I=z(null),X=z(null),J=z(null),he=z(null);function xe(n,a){switch(Y(J,a),Y(X,n),Y(I,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?Pv(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=Pv(a),n=Iv(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}L(I),Y(I,n)}function we(){L(I),L(X),L(J)}function je(n){n.memoizedState!==null&&Y(he,n);var a=I.current,o=Iv(a,n.type);a!==o&&(Y(X,n),Y(I,o))}function de(n){X.current===n&&(L(I),L(X)),he.current===n&&(L(he),ll._currentValue=re)}var se,ye;function be(n){if(se===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);se=a&&a[1]||"",ye=-1<o.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+se+n+ye}var Ae=!1;function Oe(n,a){if(!n||Ae)return"";Ae=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(ce){var le=ce}Reflect.construct(n,[],ve)}else{try{ve.call()}catch(ce){le=ce}n.call(ve.prototype)}}else{try{throw Error()}catch(ce){le=ce}(ve=n())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(ce){if(ce&&le&&typeof ce.stack=="string")return[ce.stack,le.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),A=y[0],N=y[1];if(A&&N){var H=A.split(`
|
|
4
|
+
`),ie=N.split(`
|
|
5
|
+
`);for(p=u=0;u<H.length&&!H[u].includes("DetermineComponentFrameRoot");)u++;for(;p<ie.length&&!ie[p].includes("DetermineComponentFrameRoot");)p++;if(u===H.length||p===ie.length)for(u=H.length-1,p=ie.length-1;1<=u&&0<=p&&H[u]!==ie[p];)p--;for(;1<=u&&0<=p;u--,p--)if(H[u]!==ie[p]){if(u!==1||p!==1)do if(u--,p--,0>p||H[u]!==ie[p]){var pe=`
|
|
6
|
+
`+H[u].replace(" at new "," at ");return n.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",n.displayName)),pe}while(1<=u&&0<=p);break}}}finally{Ae=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?be(o):""}function Ie(n,a){switch(n.tag){case 26:case 27:case 5:return be(n.type);case 16:return be("Lazy");case 13:return n.child!==a&&a!==null?be("Suspense Fallback"):be("Suspense");case 19:return be("SuspenseList");case 0:case 15:return Oe(n.type,!1);case 11:return Oe(n.type.render,!1);case 1:return Oe(n.type,!0);case 31:return be("Activity");default:return""}}function $e(n){try{var a="",o=null;do a+=Ie(n,o),o=n,n=n.return;while(n);return a}catch(u){return`
|
|
7
|
+
Error generating stack: `+u.message+`
|
|
8
|
+
`+u.stack}}var Ne=Object.prototype.hasOwnProperty,Ue=e.unstable_scheduleCallback,Re=e.unstable_cancelCallback,Ze=e.unstable_shouldYield,ot=e.unstable_requestPaint,qe=e.unstable_now,xn=e.unstable_getCurrentPriorityLevel,yn=e.unstable_ImmediatePriority,zn=e.unstable_UserBlockingPriority,Dt=e.unstable_NormalPriority,Vt=e.unstable_LowPriority,hn=e.unstable_IdlePriority,Cn=e.log,_i=e.unstable_setDisableYieldValue,kr=null,Ht=null;function Mn(n){if(typeof Cn=="function"&&_i(n),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(kr,n)}catch{}}var Pt=Math.clz32?Math.clz32:qr,Gt=Math.log,qn=Math.LN2;function qr(n){return n>>>=0,n===0?32:31-(Gt(n)/qn|0)|0}var pn=256,dr=262144,Rr=4194304;function Vn(n){var a=n&42;if(a!==0)return a;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Xr(n,a,o){var u=n.pendingLanes;if(u===0)return 0;var p=0,y=n.suspendedLanes,A=n.pingedLanes;n=n.warmLanes;var N=u&134217727;return N!==0?(u=N&~y,u!==0?p=Vn(u):(A&=N,A!==0?p=Vn(A):o||(o=N&~n,o!==0&&(p=Vn(o))))):(N=u&~y,N!==0?p=Vn(N):A!==0?p=Vn(A):o||(o=u&~n,o!==0&&(p=Vn(o)))),p===0?0:a!==0&&a!==p&&(a&y)===0&&(y=p&-p,o=a&-a,y>=o||y===32&&(o&4194048)!==0)?a:p}function Vr(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function oo(n,a){switch(n){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Ua(){var n=Rr;return Rr<<=1,(Rr&62914560)===0&&(Rr=4194304),n}function qa(n){for(var a=[],o=0;31>o;o++)a.push(n);return a}function aa(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function At(n,a,o,u,p,y){var A=n.pendingLanes;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=o,n.entangledLanes&=o,n.errorRecoveryDisabledLanes&=o,n.shellSuspendCounter=0;var N=n.entanglements,H=n.expirationTimes,ie=n.hiddenUpdates;for(o=A&~o;0<o;){var pe=31-Pt(o),ve=1<<pe;N[pe]=0,H[pe]=-1;var le=ie[pe];if(le!==null)for(ie[pe]=null,pe=0;pe<le.length;pe++){var ce=le[pe];ce!==null&&(ce.lane&=-536870913)}o&=~ve}u!==0&&On(n,u,0),y!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=y&~(A&~a))}function On(n,a,o){n.pendingLanes|=a,n.suspendedLanes&=~a;var u=31-Pt(a);n.entangledLanes|=a,n.entanglements[u]=n.entanglements[u]|1073741824|o&261930}function Fr(n,a){var o=n.entangledLanes|=a;for(n=n.entanglements;o;){var u=31-Pt(o),p=1<<u;p&a|n[u]&a&&(n[u]|=a),o&=~p}}function hr(n,a){var o=a&-a;return o=(o&42)!==0?1:jn(o),(o&(n.suspendedLanes|a))!==0?0:o}function jn(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Ti(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Cs(){var n=ee.p;return n!==0?n:(n=window.event,n===void 0?32:sb(n.type))}function Tl(n,a){var o=ee.p;try{return ee.p=n,a()}finally{ee.p=o}}var ca=Math.random().toString(36).slice(2),cn="__reactFiber$"+ca,_n="__reactProps$"+ca,Ni="__reactContainer$"+ca,su="__reactEvents$"+ca,Kg="__reactListeners$"+ca,em="__reactHandles$"+ca,Bc="__reactResources$"+ca,yo="__reactMarker$"+ca;function lu(n){delete n[cn],delete n[_n],delete n[su],delete n[Kg],delete n[em]}function zi(n){var a=n[cn];if(a)return a;for(var o=n.parentNode;o;){if(a=o[Ni]||o[cn]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(n=Hv(n);n!==null;){if(o=n[cn])return o;n=Hv(n)}return a}n=o,o=n.parentNode}return null}function $i(n){if(n=n[cn]||n[Ni]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}function vo(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(i(33))}function Pi(n){var a=n[Bc];return a||(a=n[Bc]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Jt(n){n[yo]=!0}var Kf=new Set,Yf={};function Va(n,a){Ii(n,a),Ii(n+"Capture",a)}function Ii(n,a){for(Yf[n]=a,n=0;n<a.length;n++)Kf.add(a[n])}var Yg=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]*$"),Zf={},Xf={};function Zg(n){return Ne.call(Xf,n)?!0:Ne.call(Zf,n)?!1:Yg.test(n)?Xf[n]=!0:(Zf[n]=!0,!1)}function Os(n,a,o){if(Zg(a))if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+o)}}function ls(n,a,o){if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttribute(a,""+o)}}function Br(n,a,o,u){if(u===null)n.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(a,o,""+u)}}function Xn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Qf(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Xg(n,a,o){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,a);if(!n.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,y=u.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return p.call(this)},set:function(A){o=""+A,y.call(this,A)}}),Object.defineProperty(n,a,{enumerable:u.enumerable}),{getValue:function(){return o},setValue:function(A){o=""+A},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function uu(n){if(!n._valueTracker){var a=Qf(n)?"checked":"value";n._valueTracker=Xg(n,a,""+n[a])}}function Wf(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var o=a.getValue(),u="";return n&&(u=Qf(n)?n.checked?"true":"false":n.value),n=u,n!==o?(a.setValue(n),!0):!1}function us(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Hc=/[\n"\\]/g;function Qn(n){return n.replace(Hc,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function cu(n,a,o,u,p,y,A,N){n.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?n.type=A:n.removeAttribute("type"),a!=null?A==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+Xn(a)):n.value!==""+Xn(a)&&(n.value=""+Xn(a)):A!=="submit"&&A!=="reset"||n.removeAttribute("value"),a!=null?Cl(n,A,Xn(a)):o!=null?Cl(n,A,Xn(o)):u!=null&&n.removeAttribute("value"),p==null&&y!=null&&(n.defaultChecked=!!y),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?n.name=""+Xn(N):n.removeAttribute("name")}function Jf(n,a,o,u,p,y,A,N){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.type=y),a!=null||o!=null){if(!(y!=="submit"&&y!=="reset"||a!=null)){uu(n);return}o=o!=null?""+Xn(o):"",a=a!=null?""+Xn(a):o,N||a===n.value||(n.value=a),n.defaultValue=a}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=N?n.checked:!!u,n.defaultChecked=!!u,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(n.name=A),uu(n)}function Cl(n,a,o){a==="number"&&us(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function Fa(n,a,o,u){if(n=n.options,a){a={};for(var p=0;p<o.length;p++)a["$"+o[p]]=!0;for(o=0;o<n.length;o++)p=a.hasOwnProperty("$"+n[o].value),n[o].selected!==p&&(n[o].selected=p),p&&u&&(n[o].defaultSelected=!0)}else{for(o=""+Xn(o),a=null,p=0;p<n.length;p++){if(n[p].value===o){n[p].selected=!0,u&&(n[p].defaultSelected=!0);return}a!==null||n[p].disabled||(a=n[p])}a!==null&&(a.selected=!0)}}function ed(n,a,o){if(a!=null&&(a=""+Xn(a),a!==n.value&&(n.value=a),o==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=o!=null?""+Xn(o):""}function td(n,a,o,u){if(a==null){if(u!=null){if(o!=null)throw Error(i(92));if(oe(u)){if(1<u.length)throw Error(i(93));u=u[0]}o=u}o==null&&(o=""),a=o}o=Xn(a),n.defaultValue=o,u=n.textContent,u===o&&u!==""&&u!==null&&(n.value=u),uu(n)}function Li(n,a){if(a){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=a;return}}n.textContent=a}var Qg=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 nd(n,a,o){var u=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":u?n.setProperty(a,o):typeof o!="number"||o===0||Qg.has(a)?a==="float"?n.cssFloat=o:n[a]=(""+o).trim():n[a]=o+"px"}function rd(n,a,o){if(a!=null&&typeof a!="object")throw Error(i(62));if(n=n.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var p in a)u=a[p],a.hasOwnProperty(p)&&o[p]!==u&&nd(n,p,u)}else for(var y in a)a.hasOwnProperty(y)&&nd(n,y,a[y])}function fu(n){if(n.indexOf("-")===-1)return!1;switch(n){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 Wg=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"]]),Jg=/^[\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 Rs(n){return Jg.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Qr(){}var du=null;function hu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ui=null,Ci=null;function Gc(n){var a=$i(n);if(a&&(n=a.stateNode)){var o=n[_n]||null;e:switch(n=a.stateNode,a.type){case"input":if(cu(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Qn(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var u=o[a];if(u!==n&&u.form===n.form){var p=u[_n]||null;if(!p)throw Error(i(90));cu(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)u=o[a],u.form===n.form&&Wf(u)}break e;case"textarea":ed(n,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&Fa(n,!!o.multiple,a,!1)}}}var pu=!1;function mu(n,a,o){if(pu)return n(a,o);pu=!0;try{var u=n(a);return u}finally{if(pu=!1,(Ui!==null||Ci!==null)&&(Ju(),Ui&&(a=Ui,n=Ci,Ci=Ui=null,Gc(a),n)))for(a=0;a<n.length;a++)Gc(n[a])}}function so(n,a){var o=n.stateNode;if(o===null)return null;var u=o[_n]||null;if(u===null)return null;o=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(i(231,a,typeof o));return o}var Hr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ol=!1;if(Hr)try{var lo={};Object.defineProperty(lo,"passive",{get:function(){Ol=!0}}),window.addEventListener("test",lo,lo),window.removeEventListener("test",lo,lo)}catch{Ol=!1}var fa=null,uo=null,As=null;function ad(){if(As)return As;var n,a=uo,o=a.length,u,p="value"in fa?fa.value:fa.textContent,y=p.length;for(n=0;n<o&&a[n]===p[n];n++);var A=o-n;for(u=1;u<=A&&a[o-u]===p[y-u];u++);return As=p.slice(n,1<u?1-u:void 0)}function Ms(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}function js(){return!0}function id(){return!1}function kn(n){function a(o,u,p,y,A){this._reactName=o,this._targetInst=p,this.type=u,this.nativeEvent=y,this.target=A,this.currentTarget=null;for(var N in n)n.hasOwnProperty(N)&&(o=n[N],this[N]=o?o(y):y[N]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?js:id,this.isPropagationStopped=id,this}return g(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=js)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=js)},persist:function(){},isPersistent:js}),a}var Ba={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fe=kn(Ba),ia=g({},Ba,{view:0,detail:0}),tm=kn(ia),Rl,Al,bo,ks=g({},ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jl,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==bo&&(bo&&n.type==="mousemove"?(Rl=n.screenX-bo.screenX,Al=n.screenY-bo.screenY):Al=Rl=0,bo=n),Rl)},movementY:function(n){return"movementY"in n?n.movementY:Al}}),Oi=kn(ks),od=g({},ks,{dataTransfer:0}),sd=kn(od),za=g({},ia,{relatedTarget:0}),Ml=kn(za),nm=g({},Ba,{animationName:0,elapsedTime:0,pseudoElement:0}),rm=kn(nm),am=g({},Ba,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),ey=kn(am),im=g({},Ba,{data:0}),Kc=kn(im),om={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ld={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"},ty={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sm(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=ty[n])?!!a[n]:!1}function jl(){return sm}var lm=g({},ia,{key:function(n){if(n.key){var a=om[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=Ms(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?ld[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jl,charCode:function(n){return n.type==="keypress"?Ms(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Ms(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),$a=kn(lm),um=g({},ks,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yc=kn(um),ny=g({},ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jl}),ry=kn(ny),ay=g({},Ba,{propertyName:0,elapsedTime:0,pseudoElement:0}),ud=kn(ay),iy=g({},ks,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),oy=kn(iy),sy=g({},Ba,{newState:0,oldState:0}),cm=kn(sy),da=[9,13,27,32],gu=Hr&&"CompositionEvent"in window,So=null;Hr&&"documentMode"in document&&(So=document.documentMode);var ly=Hr&&"TextEvent"in window&&!So,cd=Hr&&(!gu||So&&8<So&&11>=So),fd=" ",dd=!1;function hd(n,a){switch(n){case"keyup":return da.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pd(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var qi=!1;function uy(n,a){switch(n){case"compositionend":return pd(a);case"keypress":return a.which!==32?null:(dd=!0,fd);case"textInput":return n=a.data,n===fd&&dd?null:n;default:return null}}function cy(n,a){if(qi)return n==="compositionend"||!gu&&hd(n,a)?(n=ad(),As=uo=fa=null,qi=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return cd&&a.locale!=="ko"?null:a.data;default:return null}}var fy={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 md(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!fy[n.type]:a==="textarea"}function gd(n,a,o,u){Ui?Ci?Ci.push(u):Ci=[u]:Ui=u,a=oc(a,"onChange"),0<a.length&&(o=new Fe("onChange","change",null,o,u),n.push({event:o,listeners:a}))}var wo=null,Eo=null;function dy(n){jv(n,0)}function Ds(n){var a=vo(n);if(Wf(a))return n}function Zc(n,a){if(n==="change")return a}var yu=!1;if(Hr){var vu;if(Hr){var kl="oninput"in document;if(!kl){var yd=document.createElement("div");yd.setAttribute("oninput","return;"),kl=typeof yd.oninput=="function"}vu=kl}else vu=!1;yu=vu&&(!document.documentMode||9<document.documentMode)}function bu(){wo&&(wo.detachEvent("onpropertychange",Pa),Eo=wo=null)}function Pa(n){if(n.propertyName==="value"&&Ds(Eo)){var a=[];gd(a,Eo,n,hu(n)),mu(dy,a)}}function fm(n,a,o){n==="focusin"?(bu(),wo=a,Eo=o,wo.attachEvent("onpropertychange",Pa)):n==="focusout"&&bu()}function hy(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ds(Eo)}function dm(n,a){if(n==="click")return Ds(a)}function hm(n,a){if(n==="input"||n==="change")return Ds(a)}function pm(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var $n=typeof Object.is=="function"?Object.is:pm;function xo(n,a){if($n(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var o=Object.keys(n),u=Object.keys(a);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var p=o[u];if(!Ne.call(a,p)||!$n(n[p],a[p]))return!1}return!0}function Xc(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function vd(n,a){var o=Xc(n);n=0;for(var u;o;){if(o.nodeType===3){if(u=n+o.textContent.length,n<=a&&u>=a)return{node:o,offset:a-n};n=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Xc(o)}}function Su(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?Su(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function bd(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=us(n.document);a instanceof n.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)n=a.contentWindow;else break;a=us(n.document)}return a}function cs(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}var py=Hr&&"documentMode"in document&&11>=document.documentMode,Vi=null,wu=null,_o=null,fs=!1;function Sd(n,a,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;fs||Vi==null||Vi!==us(u)||(u=Vi,"selectionStart"in u&&cs(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),_o&&xo(_o,u)||(_o=u,u=oc(wu,"onSelect"),0<u.length&&(a=new Fe("onSelect","select",null,a,o),n.push({event:a,listeners:u}),a.target=Vi)))}function P(n,a){var o={};return o[n.toLowerCase()]=a.toLowerCase(),o["Webkit"+n]="webkit"+a,o["Moz"+n]="moz"+a,o}var $={animationend:P("Animation","AnimationEnd"),animationiteration:P("Animation","AnimationIteration"),animationstart:P("Animation","AnimationStart"),transitionrun:P("Transition","TransitionRun"),transitionstart:P("Transition","TransitionStart"),transitioncancel:P("Transition","TransitionCancel"),transitionend:P("Transition","TransitionEnd")},F={},Z={};Hr&&(Z=document.createElement("div").style,"AnimationEvent"in window||(delete $.animationend.animation,delete $.animationiteration.animation,delete $.animationstart.animation),"TransitionEvent"in window||delete $.transitionend.transition);function fe(n){if(F[n])return F[n];if(!$[n])return n;var a=$[n],o;for(o in a)if(a.hasOwnProperty(o)&&o in Z)return F[n]=a[o];return n}var Se=fe("animationend"),_e=fe("animationiteration"),ge=fe("animationstart"),Te=fe("transitionrun"),Ce=fe("transitionstart"),Ve=fe("transitioncancel"),He=fe("transitionend"),ut=new Map,nt="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(" ");nt.push("scrollEnd");function mt(n,a){ut.set(n,a),Va(a,[n])}var un=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Ke=[],_t=0,fn=0;function Nt(){for(var n=_t,a=fn=_t=0;a<n;){var o=Ke[a];Ke[a++]=null;var u=Ke[a];Ke[a++]=null;var p=Ke[a];Ke[a++]=null;var y=Ke[a];if(Ke[a++]=null,u!==null&&p!==null){var A=u.pending;A===null?p.next=p:(p.next=A.next,A.next=p),u.pending=p}y!==0&&co(o,p,y)}}function Gr(n,a,o,u){Ke[_t++]=n,Ke[_t++]=a,Ke[_t++]=o,Ke[_t++]=u,fn|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function Kr(n,a,o,u){return Gr(n,a,o,u),ha(n)}function Dr(n,a){return Gr(n,null,null,a),ha(n)}function co(n,a,o){n.lanes|=o;var u=n.alternate;u!==null&&(u.lanes|=o);for(var p=!1,y=n.return;y!==null;)y.childLanes|=o,u=y.alternate,u!==null&&(u.childLanes|=o),y.tag===22&&(n=y.stateNode,n===null||n._visibility&1||(p=!0)),n=y,y=y.return;return n.tag===3?(y=n.stateNode,p&&a!==null&&(p=31-Pt(o),n=y.hiddenUpdates,u=n[p],u===null?n[p]=[a]:u.push(a),a.lane=o|536870912),y):null}function ha(n){if(50<tl)throw tl=0,Oh=null,Error(i(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var Wn={};function mm(n,a,o,u){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dn(n,a,o,u){return new mm(n,a,o,u)}function Dl(n){return n=n.prototype,!(!n||!n.isReactComponent)}function pr(n,a){var o=n.alternate;return o===null?(o=Dn(n.tag,a,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=a,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&65011712,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,a=n.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o.refCleanup=n.refCleanup,o}function Eu(n,a){n.flags&=65011714;var o=n.alternate;return o===null?(n.childLanes=0,n.lanes=a,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,a=o.dependencies,n.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),n}function To(n,a,o,u,p,y){var A=0;if(u=n,typeof n=="function")Dl(n)&&(A=1);else if(typeof n=="string")A=F_(n,o,I.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case U:return n=Dn(31,o,a,p),n.elementType=U,n.lanes=y,n;case S:return pa(o.children,p,y,a);case w:A=8,p|=24;break;case x:return n=Dn(12,o,a,p|2),n.elementType=x,n.lanes=y,n;case C:return n=Dn(13,o,a,p),n.elementType=C,n.lanes=y,n;case O:return n=Dn(19,o,a,p),n.elementType=O,n.lanes=y,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case R:A=10;break e;case E:A=9;break e;case T:A=11;break e;case M:A=14;break e;case D:A=16,u=null;break e}A=29,o=Error(i(130,n===null?"null":typeof n,"")),u=null}return a=Dn(A,o,a,p),a.elementType=n,a.type=u,a.lanes=y,a}function pa(n,a,o,u){return n=Dn(7,n,u,a),n.lanes=o,n}function xu(n,a,o){return n=Dn(6,n,null,a),n.lanes=o,n}function Qc(n){var a=Dn(18,null,null,0);return a.stateNode=n,a}function wd(n,a,o){return a=Dn(4,n.children!==null?n.children:[],n.key,a),a.lanes=o,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var my=new WeakMap;function mr(n,a){if(typeof n=="object"&&n!==null){var o=my.get(n);return o!==void 0?o:(a={value:n,source:a,stack:$e(a)},my.set(n,a),a)}return{value:n,source:a,stack:$e(a)}}var Co=[],Oo=0,_u=null,Ns=0,gr=[],yr=0,Ha=null,Wr=1,Jr="";function ma(n,a){Co[Oo++]=Ns,Co[Oo++]=_u,_u=n,Ns=a}function gy(n,a,o){gr[yr++]=Wr,gr[yr++]=Jr,gr[yr++]=Ha,Ha=n;var u=Wr;n=Jr;var p=32-Pt(u)-1;u&=~(1<<p),o+=1;var y=32-Pt(a)+p;if(30<y){var A=p-p%5;y=(u&(1<<A)-1).toString(32),u>>=A,p-=A,Wr=1<<32-Pt(a)+p|o<<p|u,Jr=y+n}else Wr=1<<y|o<<p|u,Jr=n}function Ed(n){n.return!==null&&(ma(n,1),gy(n,1,0))}function xd(n){for(;n===_u;)_u=Co[--Oo],Co[Oo]=null,Ns=Co[--Oo],Co[Oo]=null;for(;n===Ha;)Ha=gr[--yr],gr[yr]=null,Jr=gr[--yr],gr[yr]=null,Wr=gr[--yr],gr[yr]=null}function yy(n,a){gr[yr++]=Wr,gr[yr++]=Jr,gr[yr++]=Ha,Wr=a.id,Jr=a.overflow,Ha=n}var vn=null,Tt=null,rt=!1,Ga=null,vr=!1,_d=Error(i(519));function Ka(n){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zs(mr(a,n)),_d}function vy(n){var a=n.stateNode,o=n.type,u=n.memoizedProps;switch(a[cn]=n,a[_n]=u,o){case"dialog":Qe("cancel",a),Qe("close",a);break;case"iframe":case"object":case"embed":Qe("load",a);break;case"video":case"audio":for(o=0;o<rl.length;o++)Qe(rl[o],a);break;case"source":Qe("error",a);break;case"img":case"image":case"link":Qe("error",a),Qe("load",a);break;case"details":Qe("toggle",a);break;case"input":Qe("invalid",a),Jf(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Qe("invalid",a);break;case"textarea":Qe("invalid",a),td(a,u.value,u.defaultValue,u.children)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||u.suppressHydrationWarning===!0||zv(a.textContent,o)?(u.popover!=null&&(Qe("beforetoggle",a),Qe("toggle",a)),u.onScroll!=null&&Qe("scroll",a),u.onScrollEnd!=null&&Qe("scrollend",a),u.onClick!=null&&(a.onclick=Qr),a=!0):a=!1,a||Ka(n,!0)}function by(n){for(vn=n.return;vn;)switch(vn.tag){case 5:case 31:case 13:vr=!1;return;case 27:case 3:vr=!0;return;default:vn=vn.return}}function Ro(n){if(n!==vn)return!1;if(!rt)return by(n),rt=!0,!1;var a=n.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||Vh(n.type,n.memoizedProps)),o=!o),o&&Tt&&Ka(n),by(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Tt=Bv(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Tt=Bv(n)}else a===27?(a=Tt,si(n.type)?(n=Kh,Kh=null,Tt=n):Tt=a):Tt=vn?Sr(n.stateNode.nextSibling):null;return!0}function Fi(){Tt=vn=null,rt=!1}function Td(){var n=Ga;return n!==null&&(Gn===null?Gn=n:Gn.push.apply(Gn,n),Ga=null),n}function zs(n){Ga===null?Ga=[n]:Ga.push(n)}var Cd=z(null),Bi=null,ga=null;function Ya(n,a,o){Y(Cd,a._currentValue),a._currentValue=o}function ya(n){n._currentValue=Cd.current,L(Cd)}function Od(n,a,o){for(;n!==null;){var u=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),n===o)break;n=n.return}}function Rd(n,a,o,u){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var y=p.dependencies;if(y!==null){var A=p.child;y=y.firstContext;e:for(;y!==null;){var N=y;y=p;for(var H=0;H<a.length;H++)if(N.context===a[H]){y.lanes|=o,N=y.alternate,N!==null&&(N.lanes|=o),Od(y.return,o,n),u||(A=null);break e}y=N.next}}else if(p.tag===18){if(A=p.return,A===null)throw Error(i(341));A.lanes|=o,y=A.alternate,y!==null&&(y.lanes|=o),Od(A,o,n),A=null}else A=p.child;if(A!==null)A.return=p;else for(A=p;A!==null;){if(A===n){A=null;break}if(p=A.sibling,p!==null){p.return=A.return,A=p;break}A=A.return}p=A}}function Ao(n,a,o,u){n=null;for(var p=a,y=!1;p!==null;){if(!y){if((p.flags&524288)!==0)y=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var A=p.alternate;if(A===null)throw Error(i(387));if(A=A.memoizedProps,A!==null){var N=p.type;$n(p.pendingProps.value,A.value)||(n!==null?n.push(N):n=[N])}}else if(p===he.current){if(A=p.alternate,A===null)throw Error(i(387));A.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(ll):n=[ll])}p=p.return}n!==null&&Rd(a,n,o,u),a.flags|=262144}function Tu(n){for(n=n.firstContext;n!==null;){if(!$n(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Hi(n){Bi=n,ga=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function bn(n){return Sy(Bi,n)}function Cu(n,a){return Bi===null&&Hi(n),Sy(n,a)}function Sy(n,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},ga===null){if(n===null)throw Error(i(308));ga=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else ga=ga.next=a;return o}var Lx=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(o,u){n.push(u)}};this.abort=function(){a.aborted=!0,n.forEach(function(o){return o()})}},Ux=e.unstable_scheduleCallback,qx=e.unstable_NormalPriority,Kt={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ad(){return{controller:new Lx,data:new Map,refCount:0}}function $s(n){n.refCount--,n.refCount===0&&Ux(qx,function(){n.controller.abort()})}var Ps=null,Md=0,Mo=0,jo=null;function Vx(n,a){if(Ps===null){var o=Ps=[];Md=0,Mo=Dh(),jo={status:"pending",value:void 0,then:function(u){o.push(u)}}}return Md++,a.then(wy,wy),a}function wy(){if(--Md===0&&Ps!==null){jo!==null&&(jo.status="fulfilled");var n=Ps;Ps=null,Mo=0,jo=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function Fx(n,a){var o=[],u={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return n.then(function(){u.status="fulfilled",u.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(u.status="rejected",u.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),u}var Ey=K.S;K.S=function(n,a){iv=qe(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&Vx(n,a),Ey!==null&&Ey(n,a)};var Gi=z(null);function jd(){var n=Gi.current;return n!==null?n:Et.pooledCache}function Ou(n,a){a===null?Y(Gi,Gi.current):Y(Gi,a.pool)}function xy(){var n=jd();return n===null?null:{parent:Kt._currentValue,pool:n}}var ko=Error(i(460)),kd=Error(i(474)),Ru=Error(i(542)),Au={then:function(){}};function _y(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Ty(n,a,o){switch(o=n[o],o===void 0?n.push(a):o!==a&&(a.then(Qr,Qr),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Oy(n),n;default:if(typeof a.status=="string")a.then(Qr,Qr);else{if(n=Et,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=a,n.status="pending",n.then(function(u){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=u}},function(u){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Oy(n),n}throw Yi=a,ko}}function Ki(n){try{var a=n._init;return a(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Yi=o,ko):o}}var Yi=null;function Cy(){if(Yi===null)throw Error(i(459));var n=Yi;return Yi=null,n}function Oy(n){if(n===ko||n===Ru)throw Error(i(483))}var Do=null,Is=0;function Mu(n){var a=Is;return Is+=1,Do===null&&(Do=[]),Ty(Do,n,a)}function Ls(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function ju(n,a){throw a.$$typeof===v?Error(i(525)):(n=Object.prototype.toString.call(a),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n)))}function Ry(n){function a(te,W){if(n){var ae=te.deletions;ae===null?(te.deletions=[W],te.flags|=16):ae.push(W)}}function o(te,W){if(!n)return null;for(;W!==null;)a(te,W),W=W.sibling;return null}function u(te){for(var W=new Map;te!==null;)te.key!==null?W.set(te.key,te):W.set(te.index,te),te=te.sibling;return W}function p(te,W){return te=pr(te,W),te.index=0,te.sibling=null,te}function y(te,W,ae){return te.index=ae,n?(ae=te.alternate,ae!==null?(ae=ae.index,ae<W?(te.flags|=67108866,W):ae):(te.flags|=67108866,W)):(te.flags|=1048576,W)}function A(te){return n&&te.alternate===null&&(te.flags|=67108866),te}function N(te,W,ae,me){return W===null||W.tag!==6?(W=xu(ae,te.mode,me),W.return=te,W):(W=p(W,ae),W.return=te,W)}function H(te,W,ae,me){var ze=ae.type;return ze===S?pe(te,W,ae.props.children,me,ae.key):W!==null&&(W.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===D&&Ki(ze)===W.type)?(W=p(W,ae.props),Ls(W,ae),W.return=te,W):(W=To(ae.type,ae.key,ae.props,null,te.mode,me),Ls(W,ae),W.return=te,W)}function ie(te,W,ae,me){return W===null||W.tag!==4||W.stateNode.containerInfo!==ae.containerInfo||W.stateNode.implementation!==ae.implementation?(W=wd(ae,te.mode,me),W.return=te,W):(W=p(W,ae.children||[]),W.return=te,W)}function pe(te,W,ae,me,ze){return W===null||W.tag!==7?(W=pa(ae,te.mode,me,ze),W.return=te,W):(W=p(W,ae),W.return=te,W)}function ve(te,W,ae){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=xu(""+W,te.mode,ae),W.return=te,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case _:return ae=To(W.type,W.key,W.props,null,te.mode,ae),Ls(ae,W),ae.return=te,ae;case b:return W=wd(W,te.mode,ae),W.return=te,W;case D:return W=Ki(W),ve(te,W,ae)}if(oe(W)||V(W))return W=pa(W,te.mode,ae,null),W.return=te,W;if(typeof W.then=="function")return ve(te,Mu(W),ae);if(W.$$typeof===R)return ve(te,Cu(te,W),ae);ju(te,W)}return null}function le(te,W,ae,me){var ze=W!==null?W.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return ze!==null?null:N(te,W,""+ae,me);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case _:return ae.key===ze?H(te,W,ae,me):null;case b:return ae.key===ze?ie(te,W,ae,me):null;case D:return ae=Ki(ae),le(te,W,ae,me)}if(oe(ae)||V(ae))return ze!==null?null:pe(te,W,ae,me,null);if(typeof ae.then=="function")return le(te,W,Mu(ae),me);if(ae.$$typeof===R)return le(te,W,Cu(te,ae),me);ju(te,ae)}return null}function ce(te,W,ae,me,ze){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return te=te.get(ae)||null,N(W,te,""+me,ze);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case _:return te=te.get(me.key===null?ae:me.key)||null,H(W,te,me,ze);case b:return te=te.get(me.key===null?ae:me.key)||null,ie(W,te,me,ze);case D:return me=Ki(me),ce(te,W,ae,me,ze)}if(oe(me)||V(me))return te=te.get(ae)||null,pe(W,te,me,ze,null);if(typeof me.then=="function")return ce(te,W,ae,Mu(me),ze);if(me.$$typeof===R)return ce(te,W,ae,Cu(W,me),ze);ju(W,me)}return null}function Me(te,W,ae,me){for(var ze=null,st=null,De=W,Ge=W=0,tt=null;De!==null&&Ge<ae.length;Ge++){De.index>Ge?(tt=De,De=null):tt=De.sibling;var lt=le(te,De,ae[Ge],me);if(lt===null){De===null&&(De=tt);break}n&&De&<.alternate===null&&a(te,De),W=y(lt,W,Ge),st===null?ze=lt:st.sibling=lt,st=lt,De=tt}if(Ge===ae.length)return o(te,De),rt&&ma(te,Ge),ze;if(De===null){for(;Ge<ae.length;Ge++)De=ve(te,ae[Ge],me),De!==null&&(W=y(De,W,Ge),st===null?ze=De:st.sibling=De,st=De);return rt&&ma(te,Ge),ze}for(De=u(De);Ge<ae.length;Ge++)tt=ce(De,te,Ge,ae[Ge],me),tt!==null&&(n&&tt.alternate!==null&&De.delete(tt.key===null?Ge:tt.key),W=y(tt,W,Ge),st===null?ze=tt:st.sibling=tt,st=tt);return n&&De.forEach(function(di){return a(te,di)}),rt&&ma(te,Ge),ze}function Pe(te,W,ae,me){if(ae==null)throw Error(i(151));for(var ze=null,st=null,De=W,Ge=W=0,tt=null,lt=ae.next();De!==null&&!lt.done;Ge++,lt=ae.next()){De.index>Ge?(tt=De,De=null):tt=De.sibling;var di=le(te,De,lt.value,me);if(di===null){De===null&&(De=tt);break}n&&De&&di.alternate===null&&a(te,De),W=y(di,W,Ge),st===null?ze=di:st.sibling=di,st=di,De=tt}if(lt.done)return o(te,De),rt&&ma(te,Ge),ze;if(De===null){for(;!lt.done;Ge++,lt=ae.next())lt=ve(te,lt.value,me),lt!==null&&(W=y(lt,W,Ge),st===null?ze=lt:st.sibling=lt,st=lt);return rt&&ma(te,Ge),ze}for(De=u(De);!lt.done;Ge++,lt=ae.next())lt=ce(De,te,Ge,lt.value,me),lt!==null&&(n&<.alternate!==null&&De.delete(lt.key===null?Ge:lt.key),W=y(lt,W,Ge),st===null?ze=lt:st.sibling=lt,st=lt);return n&&De.forEach(function(e2){return a(te,e2)}),rt&&ma(te,Ge),ze}function wt(te,W,ae,me){if(typeof ae=="object"&&ae!==null&&ae.type===S&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case _:e:{for(var ze=ae.key;W!==null;){if(W.key===ze){if(ze=ae.type,ze===S){if(W.tag===7){o(te,W.sibling),me=p(W,ae.props.children),me.return=te,te=me;break e}}else if(W.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===D&&Ki(ze)===W.type){o(te,W.sibling),me=p(W,ae.props),Ls(me,ae),me.return=te,te=me;break e}o(te,W);break}else a(te,W);W=W.sibling}ae.type===S?(me=pa(ae.props.children,te.mode,me,ae.key),me.return=te,te=me):(me=To(ae.type,ae.key,ae.props,null,te.mode,me),Ls(me,ae),me.return=te,te=me)}return A(te);case b:e:{for(ze=ae.key;W!==null;){if(W.key===ze)if(W.tag===4&&W.stateNode.containerInfo===ae.containerInfo&&W.stateNode.implementation===ae.implementation){o(te,W.sibling),me=p(W,ae.children||[]),me.return=te,te=me;break e}else{o(te,W);break}else a(te,W);W=W.sibling}me=wd(ae,te.mode,me),me.return=te,te=me}return A(te);case D:return ae=Ki(ae),wt(te,W,ae,me)}if(oe(ae))return Me(te,W,ae,me);if(V(ae)){if(ze=V(ae),typeof ze!="function")throw Error(i(150));return ae=ze.call(ae),Pe(te,W,ae,me)}if(typeof ae.then=="function")return wt(te,W,Mu(ae),me);if(ae.$$typeof===R)return wt(te,W,Cu(te,ae),me);ju(te,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,W!==null&&W.tag===6?(o(te,W.sibling),me=p(W,ae),me.return=te,te=me):(o(te,W),me=xu(ae,te.mode,me),me.return=te,te=me),A(te)):o(te,W)}return function(te,W,ae,me){try{Is=0;var ze=wt(te,W,ae,me);return Do=null,ze}catch(De){if(De===ko||De===Ru)throw De;var st=Dn(29,De,null,te.mode);return st.lanes=me,st.return=te,st}}}var Zi=Ry(!0),Ay=Ry(!1),Za=!1;function Dd(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Nd(n,a){n=n.updateQueue,a.updateQueue===n&&(a.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Xa(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Qa(n,a,o){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(dt&2)!==0){var p=u.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),u.pending=a,a=ha(n),co(n,null,o),a}return Gr(n,u,a,o),ha(n)}function Us(n,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var u=a.lanes;u&=n.pendingLanes,o|=u,a.lanes=o,Fr(n,o)}}function zd(n,a){var o=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var p=null,y=null;if(o=o.firstBaseUpdate,o!==null){do{var A={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};y===null?p=y=A:y=y.next=A,o=o.next}while(o!==null);y===null?p=y=a:y=y.next=a}else p=y=a;o={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=a:n.next=a,o.lastBaseUpdate=a}var $d=!1;function qs(){if($d){var n=jo;if(n!==null)throw n}}function Vs(n,a,o,u){$d=!1;var p=n.updateQueue;Za=!1;var y=p.firstBaseUpdate,A=p.lastBaseUpdate,N=p.shared.pending;if(N!==null){p.shared.pending=null;var H=N,ie=H.next;H.next=null,A===null?y=ie:A.next=ie,A=H;var pe=n.alternate;pe!==null&&(pe=pe.updateQueue,N=pe.lastBaseUpdate,N!==A&&(N===null?pe.firstBaseUpdate=ie:N.next=ie,pe.lastBaseUpdate=H))}if(y!==null){var ve=p.baseState;A=0,pe=ie=H=null,N=y;do{var le=N.lane&-536870913,ce=le!==N.lane;if(ce?(et&le)===le:(u&le)===le){le!==0&&le===Mo&&($d=!0),pe!==null&&(pe=pe.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var Me=n,Pe=N;le=a;var wt=o;switch(Pe.tag){case 1:if(Me=Pe.payload,typeof Me=="function"){ve=Me.call(wt,ve,le);break e}ve=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=Pe.payload,le=typeof Me=="function"?Me.call(wt,ve,le):Me,le==null)break e;ve=g({},ve,le);break e;case 2:Za=!0}}le=N.callback,le!==null&&(n.flags|=64,ce&&(n.flags|=8192),ce=p.callbacks,ce===null?p.callbacks=[le]:ce.push(le))}else ce={lane:le,tag:N.tag,payload:N.payload,callback:N.callback,next:null},pe===null?(ie=pe=ce,H=ve):pe=pe.next=ce,A|=le;if(N=N.next,N===null){if(N=p.shared.pending,N===null)break;ce=N,N=ce.next,ce.next=null,p.lastBaseUpdate=ce,p.shared.pending=null}}while(!0);pe===null&&(H=ve),p.baseState=H,p.firstBaseUpdate=ie,p.lastBaseUpdate=pe,y===null&&(p.shared.lanes=0),ni|=A,n.lanes=A,n.memoizedState=ve}}function My(n,a){if(typeof n!="function")throw Error(i(191,n));n.call(a)}function jy(n,a){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)My(o[n],a)}var No=z(null),ku=z(0);function ky(n,a){n=Ca,Y(ku,n),Y(No,a),Ca=n|a.baseLanes}function Pd(){Y(ku,Ca),Y(No,No.current)}function Id(){Ca=ku.current,L(No),L(ku)}var nr=z(null),br=null;function Wa(n){var a=n.alternate;Y(Ft,Ft.current&1),Y(nr,n),br===null&&(a===null||No.current!==null||a.memoizedState!==null)&&(br=n)}function Ld(n){Y(Ft,Ft.current),Y(nr,n),br===null&&(br=n)}function Dy(n){n.tag===22?(Y(Ft,Ft.current),Y(nr,n),br===null&&(br=n)):Ja()}function Ja(){Y(Ft,Ft.current),Y(nr,nr.current)}function rr(n){L(nr),br===n&&(br=null),L(Ft)}var Ft=z(0);function Du(n){for(var a=n;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Hh(o)||Gh(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var va=0,Be=null,bt=null,Yt=null,Nu=!1,zo=!1,Xi=!1,zu=0,Fs=0,$o=null,Bx=0;function zt(){throw Error(i(321))}function Ud(n,a){if(a===null)return!1;for(var o=0;o<a.length&&o<n.length;o++)if(!$n(n[o],a[o]))return!1;return!0}function qd(n,a,o,u,p,y){return va=y,Be=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,K.H=n===null||n.memoizedState===null?g0:nh,Xi=!1,y=o(u,p),Xi=!1,zo&&(y=zy(a,o,u,p)),Ny(n),y}function Ny(n){K.H=Gs;var a=bt!==null&&bt.next!==null;if(va=0,Yt=bt=Be=null,Nu=!1,Fs=0,$o=null,a)throw Error(i(300));n===null||Zt||(n=n.dependencies,n!==null&&Tu(n)&&(Zt=!0))}function zy(n,a,o,u){Be=n;var p=0;do{if(zo&&($o=null),Fs=0,zo=!1,25<=p)throw Error(i(301));if(p+=1,Yt=bt=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}K.H=y0,y=a(o,u)}while(zo);return y}function Hx(){var n=K.H,a=n.useState()[0];return a=typeof a.then=="function"?Bs(a):a,n=n.useState()[0],(bt!==null?bt.memoizedState:null)!==n&&(Be.flags|=1024),a}function Vd(){var n=zu!==0;return zu=0,n}function Fd(n,a,o){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~o}function Bd(n){if(Nu){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}Nu=!1}va=0,Yt=bt=Be=null,zo=!1,Fs=zu=0,$o=null}function Nn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yt===null?Be.memoizedState=Yt=n:Yt=Yt.next=n,Yt}function Bt(){if(bt===null){var n=Be.alternate;n=n!==null?n.memoizedState:null}else n=bt.next;var a=Yt===null?Be.memoizedState:Yt.next;if(a!==null)Yt=a,bt=n;else{if(n===null)throw Be.alternate===null?Error(i(467)):Error(i(310));bt=n,n={memoizedState:bt.memoizedState,baseState:bt.baseState,baseQueue:bt.baseQueue,queue:bt.queue,next:null},Yt===null?Be.memoizedState=Yt=n:Yt=Yt.next=n}return Yt}function $u(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bs(n){var a=Fs;return Fs+=1,$o===null&&($o=[]),n=Ty($o,n,a),a=Be,(Yt===null?a.memoizedState:Yt.next)===null&&(a=a.alternate,K.H=a===null||a.memoizedState===null?g0:nh),n}function Pu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Bs(n);if(n.$$typeof===R)return bn(n)}throw Error(i(438,String(n)))}function Hd(n){var a=null,o=Be.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var u=Be.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=$u(),Be.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(n),u=0;u<n;u++)o[u]=B;return a.index++,o}function ba(n,a){return typeof a=="function"?a(n):a}function Iu(n){var a=Bt();return Gd(a,bt,n)}function Gd(n,a,o){var u=n.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=o;var p=n.baseQueue,y=u.pending;if(y!==null){if(p!==null){var A=p.next;p.next=y.next,y.next=A}a.baseQueue=p=y,u.pending=null}if(y=n.baseState,p===null)n.memoizedState=y;else{a=p.next;var N=A=null,H=null,ie=a,pe=!1;do{var ve=ie.lane&-536870913;if(ve!==ie.lane?(et&ve)===ve:(va&ve)===ve){var le=ie.revertLane;if(le===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),ve===Mo&&(pe=!0);else if((va&le)===le){ie=ie.next,le===Mo&&(pe=!0);continue}else ve={lane:0,revertLane:ie.revertLane,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},H===null?(N=H=ve,A=y):H=H.next=ve,Be.lanes|=le,ni|=le;ve=ie.action,Xi&&o(y,ve),y=ie.hasEagerState?ie.eagerState:o(y,ve)}else le={lane:ve,revertLane:ie.revertLane,gesture:ie.gesture,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},H===null?(N=H=le,A=y):H=H.next=le,Be.lanes|=ve,ni|=ve;ie=ie.next}while(ie!==null&&ie!==a);if(H===null?A=y:H.next=N,!$n(y,n.memoizedState)&&(Zt=!0,pe&&(o=jo,o!==null)))throw o;n.memoizedState=y,n.baseState=A,n.baseQueue=H,u.lastRenderedState=y}return p===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function Kd(n){var a=Bt(),o=a.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=n;var u=o.dispatch,p=o.pending,y=a.memoizedState;if(p!==null){o.pending=null;var A=p=p.next;do y=n(y,A.action),A=A.next;while(A!==p);$n(y,a.memoizedState)||(Zt=!0),a.memoizedState=y,a.baseQueue===null&&(a.baseState=y),o.lastRenderedState=y}return[y,u]}function $y(n,a,o){var u=Be,p=Bt(),y=rt;if(y){if(o===void 0)throw Error(i(407));o=o()}else o=a();var A=!$n((bt||p).memoizedState,o);if(A&&(p.memoizedState=o,Zt=!0),p=p.queue,Xd(Ly.bind(null,u,p,n),[n]),p.getSnapshot!==a||A||Yt!==null&&Yt.memoizedState.tag&1){if(u.flags|=2048,Po(9,{destroy:void 0},Iy.bind(null,u,p,o,a),null),Et===null)throw Error(i(349));y||(va&127)!==0||Py(u,a,o)}return o}function Py(n,a,o){n.flags|=16384,n={getSnapshot:a,value:o},a=Be.updateQueue,a===null?(a=$u(),Be.updateQueue=a,a.stores=[n]):(o=a.stores,o===null?a.stores=[n]:o.push(n))}function Iy(n,a,o,u){a.value=o,a.getSnapshot=u,Uy(a)&&qy(n)}function Ly(n,a,o){return o(function(){Uy(a)&&qy(n)})}function Uy(n){var a=n.getSnapshot;n=n.value;try{var o=a();return!$n(n,o)}catch{return!0}}function qy(n){var a=Dr(n,2);a!==null&&Kn(a,n,2)}function Yd(n){var a=Nn();if(typeof n=="function"){var o=n;if(n=o(),Xi){Mn(!0);try{o()}finally{Mn(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:n},a}function Vy(n,a,o,u){return n.baseState=o,Gd(n,bt,typeof u=="function"?u:ba)}function Gx(n,a,o,u,p){if(qu(n))throw Error(i(485));if(n=a.action,n!==null){var y={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){y.listeners.push(A)}};K.T!==null?o(!0):y.isTransition=!1,u(y),o=a.pending,o===null?(y.next=a.pending=y,Fy(a,y)):(y.next=o.next,a.pending=o.next=y)}}function Fy(n,a){var o=a.action,u=a.payload,p=n.state;if(a.isTransition){var y=K.T,A={};K.T=A;try{var N=o(p,u),H=K.S;H!==null&&H(A,N),By(n,a,N)}catch(ie){Zd(n,a,ie)}finally{y!==null&&A.types!==null&&(y.types=A.types),K.T=y}}else try{y=o(p,u),By(n,a,y)}catch(ie){Zd(n,a,ie)}}function By(n,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){Hy(n,a,u)},function(u){return Zd(n,a,u)}):Hy(n,a,o)}function Hy(n,a,o){a.status="fulfilled",a.value=o,Gy(a),n.state=o,a=n.pending,a!==null&&(o=a.next,o===a?n.pending=null:(o=o.next,a.next=o,Fy(n,o)))}function Zd(n,a,o){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=o,Gy(a),a=a.next;while(a!==u)}n.action=null}function Gy(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function Ky(n,a){return a}function Yy(n,a){if(rt){var o=Et.formState;if(o!==null){e:{var u=Be;if(rt){if(Tt){t:{for(var p=Tt,y=vr;p.nodeType!==8;){if(!y){p=null;break t}if(p=Sr(p.nextSibling),p===null){p=null;break t}}y=p.data,p=y==="F!"||y==="F"?p:null}if(p){Tt=Sr(p.nextSibling),u=p.data==="F!";break e}}Ka(u)}u=!1}u&&(a=o[0])}}return o=Nn(),o.memoizedState=o.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ky,lastRenderedState:a},o.queue=u,o=h0.bind(null,Be,u),u.dispatch=o,u=Yd(!1),y=th.bind(null,Be,!1,u.queue),u=Nn(),p={state:a,dispatch:null,action:n,pending:null},u.queue=p,o=Gx.bind(null,Be,p,y,o),p.dispatch=o,u.memoizedState=n,[a,o,!1]}function Zy(n){var a=Bt();return Xy(a,bt,n)}function Xy(n,a,o){if(a=Gd(n,a,Ky)[0],n=Iu(ba)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=Bs(a)}catch(A){throw A===ko?Ru:A}else u=a;a=Bt();var p=a.queue,y=p.dispatch;return o!==a.memoizedState&&(Be.flags|=2048,Po(9,{destroy:void 0},Kx.bind(null,p,o),null)),[u,y,n]}function Kx(n,a){n.action=a}function Qy(n){var a=Bt(),o=bt;if(o!==null)return Xy(a,o,n);Bt(),a=a.memoizedState,o=Bt();var u=o.queue.dispatch;return o.memoizedState=n,[a,u,!1]}function Po(n,a,o,u){return n={tag:n,create:o,deps:u,inst:a,next:null},a=Be.updateQueue,a===null&&(a=$u(),Be.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=n.next=n:(u=o.next,o.next=n,n.next=u,a.lastEffect=n),n}function Wy(){return Bt().memoizedState}function Lu(n,a,o,u){var p=Nn();Be.flags|=n,p.memoizedState=Po(1|a,{destroy:void 0},o,u===void 0?null:u)}function Uu(n,a,o,u){var p=Bt();u=u===void 0?null:u;var y=p.memoizedState.inst;bt!==null&&u!==null&&Ud(u,bt.memoizedState.deps)?p.memoizedState=Po(a,y,o,u):(Be.flags|=n,p.memoizedState=Po(1|a,y,o,u))}function Jy(n,a){Lu(8390656,8,n,a)}function Xd(n,a){Uu(2048,8,n,a)}function Yx(n){Be.flags|=4;var a=Be.updateQueue;if(a===null)a=$u(),Be.updateQueue=a,a.events=[n];else{var o=a.events;o===null?a.events=[n]:o.push(n)}}function e0(n){var a=Bt().memoizedState;return Yx({ref:a,nextImpl:n}),function(){if((dt&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function t0(n,a){return Uu(4,2,n,a)}function n0(n,a){return Uu(4,4,n,a)}function r0(n,a){if(typeof a=="function"){n=n();var o=a(n);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return n=n(),a.current=n,function(){a.current=null}}function a0(n,a,o){o=o!=null?o.concat([n]):null,Uu(4,4,r0.bind(null,a,n),o)}function Qd(){}function i0(n,a){var o=Bt();a=a===void 0?null:a;var u=o.memoizedState;return a!==null&&Ud(a,u[1])?u[0]:(o.memoizedState=[n,a],n)}function o0(n,a){var o=Bt();a=a===void 0?null:a;var u=o.memoizedState;if(a!==null&&Ud(a,u[1]))return u[0];if(u=n(),Xi){Mn(!0);try{n()}finally{Mn(!1)}}return o.memoizedState=[u,a],u}function Wd(n,a,o){return o===void 0||(va&1073741824)!==0&&(et&261930)===0?n.memoizedState=a:(n.memoizedState=o,n=sv(),Be.lanes|=n,ni|=n,o)}function s0(n,a,o,u){return $n(o,a)?o:No.current!==null?(n=Wd(n,o,u),$n(n,a)||(Zt=!0),n):(va&42)===0||(va&1073741824)!==0&&(et&261930)===0?(Zt=!0,n.memoizedState=o):(n=sv(),Be.lanes|=n,ni|=n,a)}function l0(n,a,o,u,p){var y=ee.p;ee.p=y!==0&&8>y?y:8;var A=K.T,N={};K.T=N,th(n,!1,a,o);try{var H=p(),ie=K.S;if(ie!==null&&ie(N,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var pe=Fx(H,u);Hs(n,a,pe,or(n))}else Hs(n,a,u,or(n))}catch(ve){Hs(n,a,{then:function(){},status:"rejected",reason:ve},or())}finally{ee.p=y,A!==null&&N.types!==null&&(A.types=N.types),K.T=A}}function Zx(){}function Jd(n,a,o,u){if(n.tag!==5)throw Error(i(476));var p=u0(n).queue;l0(n,p,a,re,o===null?Zx:function(){return c0(n),o(u)})}function u0(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:re},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:o},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function c0(n){var a=u0(n);a.next===null&&(a=n.alternate.memoizedState),Hs(n,a.next.queue,{},or())}function eh(){return bn(ll)}function f0(){return Bt().memoizedState}function d0(){return Bt().memoizedState}function Xx(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var o=or();n=Xa(o);var u=Qa(a,n,o);u!==null&&(Kn(u,a,o),Us(u,a,o)),a={cache:Ad()},n.payload=a;return}a=a.return}}function Qx(n,a,o){var u=or();o={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},qu(n)?p0(a,o):(o=Kr(n,a,o,u),o!==null&&(Kn(o,n,u),m0(o,a,u)))}function h0(n,a,o){var u=or();Hs(n,a,o,u)}function Hs(n,a,o,u){var p={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(qu(n))p0(a,p);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=a.lastRenderedReducer,y!==null))try{var A=a.lastRenderedState,N=y(A,o);if(p.hasEagerState=!0,p.eagerState=N,$n(N,A))return Gr(n,a,p,0),Et===null&&Nt(),!1}catch{}if(o=Kr(n,a,p,u),o!==null)return Kn(o,n,u),m0(o,a,u),!0}return!1}function th(n,a,o,u){if(u={lane:2,revertLane:Dh(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},qu(n)){if(a)throw Error(i(479))}else a=Kr(n,o,u,2),a!==null&&Kn(a,n,2)}function qu(n){var a=n.alternate;return n===Be||a!==null&&a===Be}function p0(n,a){zo=Nu=!0;var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}function m0(n,a,o){if((o&4194048)!==0){var u=a.lanes;u&=n.pendingLanes,o|=u,a.lanes=o,Fr(n,o)}}var Gs={readContext:bn,use:Pu,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useLayoutEffect:zt,useInsertionEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useSyncExternalStore:zt,useId:zt,useHostTransitionStatus:zt,useFormState:zt,useActionState:zt,useOptimistic:zt,useMemoCache:zt,useCacheRefresh:zt};Gs.useEffectEvent=zt;var g0={readContext:bn,use:Pu,useCallback:function(n,a){return Nn().memoizedState=[n,a===void 0?null:a],n},useContext:bn,useEffect:Jy,useImperativeHandle:function(n,a,o){o=o!=null?o.concat([n]):null,Lu(4194308,4,r0.bind(null,a,n),o)},useLayoutEffect:function(n,a){return Lu(4194308,4,n,a)},useInsertionEffect:function(n,a){Lu(4,2,n,a)},useMemo:function(n,a){var o=Nn();a=a===void 0?null:a;var u=n();if(Xi){Mn(!0);try{n()}finally{Mn(!1)}}return o.memoizedState=[u,a],u},useReducer:function(n,a,o){var u=Nn();if(o!==void 0){var p=o(a);if(Xi){Mn(!0);try{o(a)}finally{Mn(!1)}}}else p=a;return u.memoizedState=u.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},u.queue=n,n=n.dispatch=Qx.bind(null,Be,n),[u.memoizedState,n]},useRef:function(n){var a=Nn();return n={current:n},a.memoizedState=n},useState:function(n){n=Yd(n);var a=n.queue,o=h0.bind(null,Be,a);return a.dispatch=o,[n.memoizedState,o]},useDebugValue:Qd,useDeferredValue:function(n,a){var o=Nn();return Wd(o,n,a)},useTransition:function(){var n=Yd(!1);return n=l0.bind(null,Be,n.queue,!0,!1),Nn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,o){var u=Be,p=Nn();if(rt){if(o===void 0)throw Error(i(407));o=o()}else{if(o=a(),Et===null)throw Error(i(349));(et&127)!==0||Py(u,a,o)}p.memoizedState=o;var y={value:o,getSnapshot:a};return p.queue=y,Jy(Ly.bind(null,u,y,n),[n]),u.flags|=2048,Po(9,{destroy:void 0},Iy.bind(null,u,y,o,a),null),o},useId:function(){var n=Nn(),a=Et.identifierPrefix;if(rt){var o=Jr,u=Wr;o=(u&~(1<<32-Pt(u)-1)).toString(32)+o,a="_"+a+"R_"+o,o=zu++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=Bx++,a="_"+a+"r_"+o.toString(32)+"_";return n.memoizedState=a},useHostTransitionStatus:eh,useFormState:Yy,useActionState:Yy,useOptimistic:function(n){var a=Nn();a.memoizedState=a.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=th.bind(null,Be,!0,o),o.dispatch=a,[n,a]},useMemoCache:Hd,useCacheRefresh:function(){return Nn().memoizedState=Xx.bind(null,Be)},useEffectEvent:function(n){var a=Nn(),o={impl:n};return a.memoizedState=o,function(){if((dt&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}},nh={readContext:bn,use:Pu,useCallback:i0,useContext:bn,useEffect:Xd,useImperativeHandle:a0,useInsertionEffect:t0,useLayoutEffect:n0,useMemo:o0,useReducer:Iu,useRef:Wy,useState:function(){return Iu(ba)},useDebugValue:Qd,useDeferredValue:function(n,a){var o=Bt();return s0(o,bt.memoizedState,n,a)},useTransition:function(){var n=Iu(ba)[0],a=Bt().memoizedState;return[typeof n=="boolean"?n:Bs(n),a]},useSyncExternalStore:$y,useId:f0,useHostTransitionStatus:eh,useFormState:Zy,useActionState:Zy,useOptimistic:function(n,a){var o=Bt();return Vy(o,bt,n,a)},useMemoCache:Hd,useCacheRefresh:d0};nh.useEffectEvent=e0;var y0={readContext:bn,use:Pu,useCallback:i0,useContext:bn,useEffect:Xd,useImperativeHandle:a0,useInsertionEffect:t0,useLayoutEffect:n0,useMemo:o0,useReducer:Kd,useRef:Wy,useState:function(){return Kd(ba)},useDebugValue:Qd,useDeferredValue:function(n,a){var o=Bt();return bt===null?Wd(o,n,a):s0(o,bt.memoizedState,n,a)},useTransition:function(){var n=Kd(ba)[0],a=Bt().memoizedState;return[typeof n=="boolean"?n:Bs(n),a]},useSyncExternalStore:$y,useId:f0,useHostTransitionStatus:eh,useFormState:Qy,useActionState:Qy,useOptimistic:function(n,a){var o=Bt();return bt!==null?Vy(o,bt,n,a):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:Hd,useCacheRefresh:d0};y0.useEffectEvent=e0;function rh(n,a,o,u){a=n.memoizedState,o=o(u,a),o=o==null?a:g({},a,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var ah={enqueueSetState:function(n,a,o){n=n._reactInternals;var u=or(),p=Xa(u);p.payload=a,o!=null&&(p.callback=o),a=Qa(n,p,u),a!==null&&(Kn(a,n,u),Us(a,n,u))},enqueueReplaceState:function(n,a,o){n=n._reactInternals;var u=or(),p=Xa(u);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=Qa(n,p,u),a!==null&&(Kn(a,n,u),Us(a,n,u))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var o=or(),u=Xa(o);u.tag=2,a!=null&&(u.callback=a),a=Qa(n,u,o),a!==null&&(Kn(a,n,o),Us(a,n,o))}};function v0(n,a,o,u,p,y,A){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,y,A):a.prototype&&a.prototype.isPureReactComponent?!xo(o,u)||!xo(p,y):!0}function b0(n,a,o,u){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,u),a.state!==n&&ah.enqueueReplaceState(a,a.state,null)}function Qi(n,a){var o=a;if("ref"in a){o={};for(var u in a)u!=="ref"&&(o[u]=a[u])}if(n=n.defaultProps){o===a&&(o=g({},o));for(var p in n)o[p]===void 0&&(o[p]=n[p])}return o}function S0(n){un(n)}function w0(n){console.error(n)}function E0(n){un(n)}function Vu(n,a){try{var o=n.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function x0(n,a,o){try{var u=n.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function ih(n,a,o){return o=Xa(o),o.tag=3,o.payload={element:null},o.callback=function(){Vu(n,a)},o}function _0(n){return n=Xa(n),n.tag=3,n}function T0(n,a,o,u){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var y=u.value;n.payload=function(){return p(y)},n.callback=function(){x0(a,o,u)}}var A=o.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(n.callback=function(){x0(a,o,u),typeof p!="function"&&(ri===null?ri=new Set([this]):ri.add(this));var N=u.stack;this.componentDidCatch(u.value,{componentStack:N!==null?N:""})})}function Wx(n,a,o,u,p){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=o.alternate,a!==null&&Ao(a,o,p,!0),o=nr.current,o!==null){switch(o.tag){case 31:case 13:return br===null?ec():o.alternate===null&&$t===0&&($t=3),o.flags&=-257,o.flags|=65536,o.lanes=p,u===Au?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([u]):a.add(u),Mh(n,u,p)),!1;case 22:return o.flags|=65536,u===Au?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([u]):o.add(u)),Mh(n,u,p)),!1}throw Error(i(435,o.tag))}return Mh(n,u,p),ec(),!1}if(rt)return a=nr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,u!==_d&&(n=Error(i(422),{cause:u}),zs(mr(n,o)))):(u!==_d&&(a=Error(i(423),{cause:u}),zs(mr(a,o))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,u=mr(u,o),p=ih(n.stateNode,u,p),zd(n,p),$t!==4&&($t=2)),!1;var y=Error(i(520),{cause:u});if(y=mr(y,o),el===null?el=[y]:el.push(y),$t!==4&&($t=2),a===null)return!0;u=mr(u,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,n=p&-p,o.lanes|=n,n=ih(o.stateNode,u,n),zd(o,n),!1;case 1:if(a=o.type,y=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ri===null||!ri.has(y))))return o.flags|=65536,p&=-p,o.lanes|=p,p=_0(p),T0(p,n,o,u),zd(o,p),!1}o=o.return}while(o!==null);return!1}var oh=Error(i(461)),Zt=!1;function Sn(n,a,o,u){a.child=n===null?Ay(a,null,o,u):Zi(a,n.child,o,u)}function C0(n,a,o,u,p){o=o.render;var y=a.ref;if("ref"in u){var A={};for(var N in u)N!=="ref"&&(A[N]=u[N])}else A=u;return Hi(a),u=qd(n,a,o,A,y,p),N=Vd(),n!==null&&!Zt?(Fd(n,a,p),Sa(n,a,p)):(rt&&N&&Ed(a),a.flags|=1,Sn(n,a,u,p),a.child)}function O0(n,a,o,u,p){if(n===null){var y=o.type;return typeof y=="function"&&!Dl(y)&&y.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=y,R0(n,a,y,u,p)):(n=To(o.type,null,u,a,a.mode,p),n.ref=a.ref,n.return=a,a.child=n)}if(y=n.child,!ph(n,p)){var A=y.memoizedProps;if(o=o.compare,o=o!==null?o:xo,o(A,u)&&n.ref===a.ref)return Sa(n,a,p)}return a.flags|=1,n=pr(y,u),n.ref=a.ref,n.return=a,a.child=n}function R0(n,a,o,u,p){if(n!==null){var y=n.memoizedProps;if(xo(y,u)&&n.ref===a.ref)if(Zt=!1,a.pendingProps=u=y,ph(n,p))(n.flags&131072)!==0&&(Zt=!0);else return a.lanes=n.lanes,Sa(n,a,p)}return sh(n,a,o,u,p)}function A0(n,a,o,u){var p=u.children,y=n!==null?n.memoizedState:null;if(n===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((a.flags&128)!==0){if(y=y!==null?y.baseLanes|o:o,n!==null){for(u=a.child=n.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~y}else u=0,a.child=null;return M0(n,a,y,o,u)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ou(a,y!==null?y.cachePool:null),y!==null?ky(a,y):Pd(),Dy(a);else return u=a.lanes=536870912,M0(n,a,y!==null?y.baseLanes|o:o,o,u)}else y!==null?(Ou(a,y.cachePool),ky(a,y),Ja(),a.memoizedState=null):(n!==null&&Ou(a,null),Pd(),Ja());return Sn(n,a,p,o),a.child}function Ks(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function M0(n,a,o,u,p){var y=jd();return y=y===null?null:{parent:Kt._currentValue,pool:y},a.memoizedState={baseLanes:o,cachePool:y},n!==null&&Ou(a,null),Pd(),Dy(a),n!==null&&Ao(n,a,u,!0),a.childLanes=p,null}function Fu(n,a){return a=Hu({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}function j0(n,a,o){return Zi(a,n.child,null,o),n=Fu(a,a.pendingProps),n.flags|=2,rr(a),a.memoizedState=null,n}function Jx(n,a,o){var u=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(rt){if(u.mode==="hidden")return n=Fu(a,u),a.lanes=536870912,Ks(null,n);if(Ld(a),(n=Tt)?(n=Fv(n,vr),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Ha!==null?{id:Wr,overflow:Jr}:null,retryLane:536870912,hydrationErrors:null},o=Qc(n),o.return=a,a.child=o,vn=a,Tt=null)):n=null,n===null)throw Ka(a);return a.lanes=536870912,null}return Fu(a,u)}var y=n.memoizedState;if(y!==null){var A=y.dehydrated;if(Ld(a),p)if(a.flags&256)a.flags&=-257,a=j0(n,a,o);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(i(558));else if(Zt||Ao(n,a,o,!1),p=(o&n.childLanes)!==0,Zt||p){if(u=Et,u!==null&&(A=hr(u,o),A!==0&&A!==y.retryLane))throw y.retryLane=A,Dr(n,A),Kn(u,n,A),oh;ec(),a=j0(n,a,o)}else n=y.treeContext,Tt=Sr(A.nextSibling),vn=a,rt=!0,Ga=null,vr=!1,n!==null&&yy(a,n),a=Fu(a,u),a.flags|=4096;return a}return n=pr(n.child,{mode:u.mode,children:u.children}),n.ref=a.ref,a.child=n,n.return=a,n}function Bu(n,a){var o=a.ref;if(o===null)n!==null&&n.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(n===null||n.ref!==o)&&(a.flags|=4194816)}}function sh(n,a,o,u,p){return Hi(a),o=qd(n,a,o,u,void 0,p),u=Vd(),n!==null&&!Zt?(Fd(n,a,p),Sa(n,a,p)):(rt&&u&&Ed(a),a.flags|=1,Sn(n,a,o,p),a.child)}function k0(n,a,o,u,p,y){return Hi(a),a.updateQueue=null,o=zy(a,u,o,p),Ny(n),u=Vd(),n!==null&&!Zt?(Fd(n,a,y),Sa(n,a,y)):(rt&&u&&Ed(a),a.flags|=1,Sn(n,a,o,y),a.child)}function D0(n,a,o,u,p){if(Hi(a),a.stateNode===null){var y=Wn,A=o.contextType;typeof A=="object"&&A!==null&&(y=bn(A)),y=new o(u,y),a.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=ah,a.stateNode=y,y._reactInternals=a,y=a.stateNode,y.props=u,y.state=a.memoizedState,y.refs={},Dd(a),A=o.contextType,y.context=typeof A=="object"&&A!==null?bn(A):Wn,y.state=a.memoizedState,A=o.getDerivedStateFromProps,typeof A=="function"&&(rh(a,o,A,u),y.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(A=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),A!==y.state&&ah.enqueueReplaceState(y,y.state,null),Vs(a,u,y,p),qs(),y.state=a.memoizedState),typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(n===null){y=a.stateNode;var N=a.memoizedProps,H=Qi(o,N);y.props=H;var ie=y.context,pe=o.contextType;A=Wn,typeof pe=="object"&&pe!==null&&(A=bn(pe));var ve=o.getDerivedStateFromProps;pe=typeof ve=="function"||typeof y.getSnapshotBeforeUpdate=="function",N=a.pendingProps!==N,pe||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(N||ie!==A)&&b0(a,y,u,A),Za=!1;var le=a.memoizedState;y.state=le,Vs(a,u,y,p),qs(),ie=a.memoizedState,N||le!==ie||Za?(typeof ve=="function"&&(rh(a,o,ve,u),ie=a.memoizedState),(H=Za||v0(a,o,H,u,le,ie,A))?(pe||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(a.flags|=4194308)):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=ie),y.props=u,y.state=ie,y.context=A,u=H):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{y=a.stateNode,Nd(n,a),A=a.memoizedProps,pe=Qi(o,A),y.props=pe,ve=a.pendingProps,le=y.context,ie=o.contextType,H=Wn,typeof ie=="object"&&ie!==null&&(H=bn(ie)),N=o.getDerivedStateFromProps,(ie=typeof N=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(A!==ve||le!==H)&&b0(a,y,u,H),Za=!1,le=a.memoizedState,y.state=le,Vs(a,u,y,p),qs();var ce=a.memoizedState;A!==ve||le!==ce||Za||n!==null&&n.dependencies!==null&&Tu(n.dependencies)?(typeof N=="function"&&(rh(a,o,N,u),ce=a.memoizedState),(pe=Za||v0(a,o,pe,u,le,ce,H)||n!==null&&n.dependencies!==null&&Tu(n.dependencies))?(ie||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,ce,H),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,ce,H)),typeof y.componentDidUpdate=="function"&&(a.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=ce),y.props=u,y.state=ce,y.context=H,u=pe):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=1024),u=!1)}return y=u,Bu(n,a),u=(a.flags&128)!==0,y||u?(y=a.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:y.render(),a.flags|=1,n!==null&&u?(a.child=Zi(a,n.child,null,p),a.child=Zi(a,null,o,p)):Sn(n,a,o,p),a.memoizedState=y.state,n=a.child):n=Sa(n,a,p),n}function N0(n,a,o,u){return Fi(),a.flags|=256,Sn(n,a,o,u),a.child}var lh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function uh(n){return{baseLanes:n,cachePool:xy()}}function ch(n,a,o){return n=n!==null?n.childLanes&~o:0,a&&(n|=ir),n}function z0(n,a,o){var u=a.pendingProps,p=!1,y=(a.flags&128)!==0,A;if((A=y)||(A=n!==null&&n.memoizedState===null?!1:(Ft.current&2)!==0),A&&(p=!0,a.flags&=-129),A=(a.flags&32)!==0,a.flags&=-33,n===null){if(rt){if(p?Wa(a):Ja(),(n=Tt)?(n=Fv(n,vr),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Ha!==null?{id:Wr,overflow:Jr}:null,retryLane:536870912,hydrationErrors:null},o=Qc(n),o.return=a,a.child=o,vn=a,Tt=null)):n=null,n===null)throw Ka(a);return Gh(n)?a.lanes=32:a.lanes=536870912,null}var N=u.children;return u=u.fallback,p?(Ja(),p=a.mode,N=Hu({mode:"hidden",children:N},p),u=pa(u,p,o,null),N.return=a,u.return=a,N.sibling=u,a.child=N,u=a.child,u.memoizedState=uh(o),u.childLanes=ch(n,A,o),a.memoizedState=lh,Ks(null,u)):(Wa(a),fh(a,N))}var H=n.memoizedState;if(H!==null&&(N=H.dehydrated,N!==null)){if(y)a.flags&256?(Wa(a),a.flags&=-257,a=dh(n,a,o)):a.memoizedState!==null?(Ja(),a.child=n.child,a.flags|=128,a=null):(Ja(),N=u.fallback,p=a.mode,u=Hu({mode:"visible",children:u.children},p),N=pa(N,p,o,null),N.flags|=2,u.return=a,N.return=a,u.sibling=N,a.child=u,Zi(a,n.child,null,o),u=a.child,u.memoizedState=uh(o),u.childLanes=ch(n,A,o),a.memoizedState=lh,a=Ks(null,u));else if(Wa(a),Gh(N)){if(A=N.nextSibling&&N.nextSibling.dataset,A)var ie=A.dgst;A=ie,u=Error(i(419)),u.stack="",u.digest=A,zs({value:u,source:null,stack:null}),a=dh(n,a,o)}else if(Zt||Ao(n,a,o,!1),A=(o&n.childLanes)!==0,Zt||A){if(A=Et,A!==null&&(u=hr(A,o),u!==0&&u!==H.retryLane))throw H.retryLane=u,Dr(n,u),Kn(A,n,u),oh;Hh(N)||ec(),a=dh(n,a,o)}else Hh(N)?(a.flags|=192,a.child=n.child,a=null):(n=H.treeContext,Tt=Sr(N.nextSibling),vn=a,rt=!0,Ga=null,vr=!1,n!==null&&yy(a,n),a=fh(a,u.children),a.flags|=4096);return a}return p?(Ja(),N=u.fallback,p=a.mode,H=n.child,ie=H.sibling,u=pr(H,{mode:"hidden",children:u.children}),u.subtreeFlags=H.subtreeFlags&65011712,ie!==null?N=pr(ie,N):(N=pa(N,p,o,null),N.flags|=2),N.return=a,u.return=a,u.sibling=N,a.child=u,Ks(null,u),u=a.child,N=n.child.memoizedState,N===null?N=uh(o):(p=N.cachePool,p!==null?(H=Kt._currentValue,p=p.parent!==H?{parent:H,pool:H}:p):p=xy(),N={baseLanes:N.baseLanes|o,cachePool:p}),u.memoizedState=N,u.childLanes=ch(n,A,o),a.memoizedState=lh,Ks(n.child,u)):(Wa(a),o=n.child,n=o.sibling,o=pr(o,{mode:"visible",children:u.children}),o.return=a,o.sibling=null,n!==null&&(A=a.deletions,A===null?(a.deletions=[n],a.flags|=16):A.push(n)),a.child=o,a.memoizedState=null,o)}function fh(n,a){return a=Hu({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function Hu(n,a){return n=Dn(22,n,null,a),n.lanes=0,n}function dh(n,a,o){return Zi(a,n.child,null,o),n=fh(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function $0(n,a,o){n.lanes|=a;var u=n.alternate;u!==null&&(u.lanes|=a),Od(n.return,a,o)}function hh(n,a,o,u,p,y){var A=n.memoizedState;A===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:p,treeForkCount:y}:(A.isBackwards=a,A.rendering=null,A.renderingStartTime=0,A.last=u,A.tail=o,A.tailMode=p,A.treeForkCount=y)}function P0(n,a,o){var u=a.pendingProps,p=u.revealOrder,y=u.tail;u=u.children;var A=Ft.current,N=(A&2)!==0;if(N?(A=A&1|2,a.flags|=128):A&=1,Y(Ft,A),Sn(n,a,u,o),u=rt?Ns:0,!N&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&$0(n,o,a);else if(n.tag===19)$0(n,o,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(o=a.child,p=null;o!==null;)n=o.alternate,n!==null&&Du(n)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),hh(a,!1,p,o,y,u);break;case"backwards":case"unstable_legacy-backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(n=p.alternate,n!==null&&Du(n)===null){a.child=p;break}n=p.sibling,p.sibling=o,o=p,p=n}hh(a,!0,o,null,y,u);break;case"together":hh(a,!1,null,null,void 0,u);break;default:a.memoizedState=null}return a.child}function Sa(n,a,o){if(n!==null&&(a.dependencies=n.dependencies),ni|=a.lanes,(o&a.childLanes)===0)if(n!==null){if(Ao(n,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(n!==null&&a.child!==n.child)throw Error(i(153));if(a.child!==null){for(n=a.child,o=pr(n,n.pendingProps),a.child=o,o.return=a;n.sibling!==null;)n=n.sibling,o=o.sibling=pr(n,n.pendingProps),o.return=a;o.sibling=null}return a.child}function ph(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&Tu(n)))}function e_(n,a,o){switch(a.tag){case 3:xe(a,a.stateNode.containerInfo),Ya(a,Kt,n.memoizedState.cache),Fi();break;case 27:case 5:je(a);break;case 4:xe(a,a.stateNode.containerInfo);break;case 10:Ya(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Ld(a),null;break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(Wa(a),a.flags|=128,null):(o&a.child.childLanes)!==0?z0(n,a,o):(Wa(a),n=Sa(n,a,o),n!==null?n.sibling:null);Wa(a);break;case 19:var p=(n.flags&128)!==0;if(u=(o&a.childLanes)!==0,u||(Ao(n,a,o,!1),u=(o&a.childLanes)!==0),p){if(u)return P0(n,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Y(Ft,Ft.current),u)break;return null;case 22:return a.lanes=0,A0(n,a,o,a.pendingProps);case 24:Ya(a,Kt,n.memoizedState.cache)}return Sa(n,a,o)}function I0(n,a,o){if(n!==null)if(n.memoizedProps!==a.pendingProps)Zt=!0;else{if(!ph(n,o)&&(a.flags&128)===0)return Zt=!1,e_(n,a,o);Zt=(n.flags&131072)!==0}else Zt=!1,rt&&(a.flags&1048576)!==0&&gy(a,Ns,a.index);switch(a.lanes=0,a.tag){case 16:e:{var u=a.pendingProps;if(n=Ki(a.elementType),a.type=n,typeof n=="function")Dl(n)?(u=Qi(n,u),a.tag=1,a=D0(null,a,n,u,o)):(a.tag=0,a=sh(null,a,n,u,o));else{if(n!=null){var p=n.$$typeof;if(p===T){a.tag=11,a=C0(null,a,n,u,o);break e}else if(p===M){a.tag=14,a=O0(null,a,n,u,o);break e}}throw a=ne(n)||n,Error(i(306,a,""))}}return a;case 0:return sh(n,a,a.type,a.pendingProps,o);case 1:return u=a.type,p=Qi(u,a.pendingProps),D0(n,a,u,p,o);case 3:e:{if(xe(a,a.stateNode.containerInfo),n===null)throw Error(i(387));u=a.pendingProps;var y=a.memoizedState;p=y.element,Nd(n,a),Vs(a,u,null,o);var A=a.memoizedState;if(u=A.cache,Ya(a,Kt,u),u!==y.cache&&Rd(a,[Kt],o,!0),qs(),u=A.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:A.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=N0(n,a,u,o);break e}else if(u!==p){p=mr(Error(i(424)),a),zs(p),a=N0(n,a,u,o);break e}else for(n=a.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Tt=Sr(n.firstChild),vn=a,rt=!0,Ga=null,vr=!0,o=Ay(a,null,u,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Fi(),u===p){a=Sa(n,a,o);break e}Sn(n,a,u,o)}a=a.child}return a;case 26:return Bu(n,a),n===null?(o=Zv(a.type,null,a.pendingProps,null))?a.memoizedState=o:rt||(o=a.type,n=a.pendingProps,u=sc(J.current).createElement(o),u[cn]=a,u[_n]=n,wn(u,o,n),Jt(u),a.stateNode=u):a.memoizedState=Zv(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return je(a),n===null&&rt&&(u=a.stateNode=Gv(a.type,a.pendingProps,J.current),vn=a,vr=!0,p=Tt,si(a.type)?(Kh=p,Tt=Sr(u.firstChild)):Tt=p),Sn(n,a,a.pendingProps.children,o),Bu(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&rt&&((p=u=Tt)&&(u=M_(u,a.type,a.pendingProps,vr),u!==null?(a.stateNode=u,vn=a,Tt=Sr(u.firstChild),vr=!1,p=!0):p=!1),p||Ka(a)),je(a),p=a.type,y=a.pendingProps,A=n!==null?n.memoizedProps:null,u=y.children,Vh(p,y)?u=null:A!==null&&Vh(p,A)&&(a.flags|=32),a.memoizedState!==null&&(p=qd(n,a,Hx,null,null,o),ll._currentValue=p),Bu(n,a),Sn(n,a,u,o),a.child;case 6:return n===null&&rt&&((n=o=Tt)&&(o=j_(o,a.pendingProps,vr),o!==null?(a.stateNode=o,vn=a,Tt=null,n=!0):n=!1),n||Ka(a)),null;case 13:return z0(n,a,o);case 4:return xe(a,a.stateNode.containerInfo),u=a.pendingProps,n===null?a.child=Zi(a,null,u,o):Sn(n,a,u,o),a.child;case 11:return C0(n,a,a.type,a.pendingProps,o);case 7:return Sn(n,a,a.pendingProps,o),a.child;case 8:return Sn(n,a,a.pendingProps.children,o),a.child;case 12:return Sn(n,a,a.pendingProps.children,o),a.child;case 10:return u=a.pendingProps,Ya(a,a.type,u.value),Sn(n,a,u.children,o),a.child;case 9:return p=a.type._context,u=a.pendingProps.children,Hi(a),p=bn(p),u=u(p),a.flags|=1,Sn(n,a,u,o),a.child;case 14:return O0(n,a,a.type,a.pendingProps,o);case 15:return R0(n,a,a.type,a.pendingProps,o);case 19:return P0(n,a,o);case 31:return Jx(n,a,o);case 22:return A0(n,a,o,a.pendingProps);case 24:return Hi(a),u=bn(Kt),n===null?(p=jd(),p===null&&(p=Et,y=Ad(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=o),p=y),a.memoizedState={parent:u,cache:p},Dd(a),Ya(a,Kt,p)):((n.lanes&o)!==0&&(Nd(n,a),Vs(a,null,null,o),qs()),p=n.memoizedState,y=a.memoizedState,p.parent!==u?(p={parent:u,cache:u},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),Ya(a,Kt,u)):(u=y.cache,Ya(a,Kt,u),u!==p.cache&&Rd(a,[Kt],o,!0))),Sn(n,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function wa(n){n.flags|=4}function mh(n,a,o,u,p){if((a=(n.mode&32)!==0)&&(a=!1),a){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(fv())n.flags|=8192;else throw Yi=Au,kd}else n.flags&=-16777217}function L0(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!eb(a))if(fv())n.flags|=8192;else throw Yi=Au,kd}function Gu(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?Ua():536870912,n.lanes|=a,qo|=a)}function Ys(n,a){if(!rt)switch(n.tailMode){case"hidden":a=n.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function Ct(n){var a=n.alternate!==null&&n.alternate.child===n.child,o=0,u=0;if(a)for(var p=n.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=u,n.childLanes=o,a}function t_(n,a,o){var u=a.pendingProps;switch(xd(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ct(a),null;case 1:return Ct(a),null;case 3:return o=a.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),ya(Kt),we(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(Ro(a)?wa(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Td())),Ct(a),null;case 26:var p=a.type,y=a.memoizedState;return n===null?(wa(a),y!==null?(Ct(a),L0(a,y)):(Ct(a),mh(a,p,null,u,o))):y?y!==n.memoizedState?(wa(a),Ct(a),L0(a,y)):(Ct(a),a.flags&=-16777217):(n=n.memoizedProps,n!==u&&wa(a),Ct(a),mh(a,p,n,u,o)),null;case 27:if(de(a),o=J.current,p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return Ct(a),null}n=I.current,Ro(a)?vy(a):(n=Gv(p,u,o),a.stateNode=n,wa(a))}return Ct(a),null;case 5:if(de(a),p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return Ct(a),null}if(y=I.current,Ro(a))vy(a);else{var A=sc(J.current);switch(y){case 1:y=A.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:y=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":y=A.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":y=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":y=A.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?A.createElement("select",{is:u.is}):A.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?A.createElement(p,{is:u.is}):A.createElement(p)}}y[cn]=a,y[_n]=u;e:for(A=a.child;A!==null;){if(A.tag===5||A.tag===6)y.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===a)break e;for(;A.sibling===null;){if(A.return===null||A.return===a)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}a.stateNode=y;e:switch(wn(y,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&wa(a)}}return Ct(a),mh(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,o),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(i(166));if(n=J.current,Ro(a)){if(n=a.stateNode,o=a.memoizedProps,u=null,p=vn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}n[cn]=a,n=!!(n.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||zv(n.nodeValue,o)),n||Ka(a,!0)}else n=sc(n).createTextNode(u),n[cn]=a,a.stateNode=n}return Ct(a),null;case 31:if(o=a.memoizedState,n===null||n.memoizedState!==null){if(u=Ro(a),o!==null){if(n===null){if(!u)throw Error(i(318));if(n=a.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[cn]=a}else Fi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ct(a),n=!1}else o=Td(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return a.flags&256?(rr(a),a):(rr(a),null);if((a.flags&128)!==0)throw Error(i(558))}return Ct(a),null;case 13:if(u=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=Ro(a),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(i(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[cn]=a}else Fi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ct(a),p=!1}else p=Td(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(rr(a),a):(rr(a),null)}return rr(a),(a.flags&128)!==0?(a.lanes=o,a):(o=u!==null,n=n!==null&&n.memoizedState!==null,o&&(u=a.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==p&&(u.flags|=2048)),o!==n&&o&&(a.child.flags|=8192),Gu(a,a.updateQueue),Ct(a),null);case 4:return we(),n===null&&Ph(a.stateNode.containerInfo),Ct(a),null;case 10:return ya(a.type),Ct(a),null;case 19:if(L(Ft),u=a.memoizedState,u===null)return Ct(a),null;if(p=(a.flags&128)!==0,y=u.rendering,y===null)if(p)Ys(u,!1);else{if($t!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(y=Du(n),y!==null){for(a.flags|=128,Ys(u,!1),n=y.updateQueue,a.updateQueue=n,Gu(a,n),a.subtreeFlags=0,n=o,o=a.child;o!==null;)Eu(o,n),o=o.sibling;return Y(Ft,Ft.current&1|2),rt&&ma(a,u.treeForkCount),a.child}n=n.sibling}u.tail!==null&&qe()>Qu&&(a.flags|=128,p=!0,Ys(u,!1),a.lanes=4194304)}else{if(!p)if(n=Du(y),n!==null){if(a.flags|=128,p=!0,n=n.updateQueue,a.updateQueue=n,Gu(a,n),Ys(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!rt)return Ct(a),null}else 2*qe()-u.renderingStartTime>Qu&&o!==536870912&&(a.flags|=128,p=!0,Ys(u,!1),a.lanes=4194304);u.isBackwards?(y.sibling=a.child,a.child=y):(n=u.last,n!==null?n.sibling=y:a.child=y,u.last=y)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=qe(),n.sibling=null,o=Ft.current,Y(Ft,p?o&1|2:o&1),rt&&ma(a,u.treeForkCount),n):(Ct(a),null);case 22:case 23:return rr(a),Id(),u=a.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(o&536870912)!==0&&(a.flags&128)===0&&(Ct(a),a.subtreeFlags&6&&(a.flags|=8192)):Ct(a),o=a.updateQueue,o!==null&&Gu(a,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==o&&(a.flags|=2048),n!==null&&L(Gi),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),ya(Kt),Ct(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function n_(n,a){switch(xd(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return ya(Kt),we(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return de(a),null;case 31:if(a.memoizedState!==null){if(rr(a),a.alternate===null)throw Error(i(340));Fi()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(rr(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Fi()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return L(Ft),null;case 4:return we(),null;case 10:return ya(a.type),null;case 22:case 23:return rr(a),Id(),n!==null&&L(Gi),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return ya(Kt),null;case 25:return null;default:return null}}function U0(n,a){switch(xd(a),a.tag){case 3:ya(Kt),we();break;case 26:case 27:case 5:de(a);break;case 4:we();break;case 31:a.memoizedState!==null&&rr(a);break;case 13:rr(a);break;case 19:L(Ft);break;case 10:ya(a.type);break;case 22:case 23:rr(a),Id(),n!==null&&L(Gi);break;case 24:ya(Kt)}}function Zs(n,a){try{var o=a.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var p=u.next;o=p;do{if((o.tag&n)===n){u=void 0;var y=o.create,A=o.inst;u=y(),A.destroy=u}o=o.next}while(o!==p)}}catch(N){yt(a,a.return,N)}}function ei(n,a,o){try{var u=a.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var y=p.next;u=y;do{if((u.tag&n)===n){var A=u.inst,N=A.destroy;if(N!==void 0){A.destroy=void 0,p=a;var H=o,ie=N;try{ie()}catch(pe){yt(p,H,pe)}}}u=u.next}while(u!==y)}}catch(pe){yt(a,a.return,pe)}}function q0(n){var a=n.updateQueue;if(a!==null){var o=n.stateNode;try{jy(a,o)}catch(u){yt(n,n.return,u)}}}function V0(n,a,o){o.props=Qi(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(u){yt(n,a,u)}}function Xs(n,a){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof o=="function"?n.refCleanup=o(u):o.current=u}}catch(p){yt(n,a,p)}}function ea(n,a){var o=n.ref,u=n.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(p){yt(n,a,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(p){yt(n,a,p)}else o.current=null}function F0(n){var a=n.type,o=n.memoizedProps,u=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break e;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(p){yt(n,n.return,p)}}function gh(n,a,o){try{var u=n.stateNode;__(u,n.type,o,a),u[_n]=a}catch(p){yt(n,n.return,p)}}function B0(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&si(n.type)||n.tag===4}function yh(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||B0(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&si(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function vh(n,a,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(n,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(n),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=Qr));else if(u!==4&&(u===27&&si(n.type)&&(o=n.stateNode,a=null),n=n.child,n!==null))for(vh(n,a,o),n=n.sibling;n!==null;)vh(n,a,o),n=n.sibling}function Ku(n,a,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?o.insertBefore(n,a):o.appendChild(n);else if(u!==4&&(u===27&&si(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(Ku(n,a,o),n=n.sibling;n!==null;)Ku(n,a,o),n=n.sibling}function H0(n){var a=n.stateNode,o=n.memoizedProps;try{for(var u=n.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);wn(a,u,o),a[cn]=n,a[_n]=o}catch(y){yt(n,n.return,y)}}var Ea=!1,Xt=!1,bh=!1,G0=typeof WeakSet=="function"?WeakSet:Set,dn=null;function r_(n,a){if(n=n.containerInfo,Uh=pc,n=bd(n),cs(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var p=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var A=0,N=-1,H=-1,ie=0,pe=0,ve=n,le=null;t:for(;;){for(var ce;ve!==o||p!==0&&ve.nodeType!==3||(N=A+p),ve!==y||u!==0&&ve.nodeType!==3||(H=A+u),ve.nodeType===3&&(A+=ve.nodeValue.length),(ce=ve.firstChild)!==null;)le=ve,ve=ce;for(;;){if(ve===n)break t;if(le===o&&++ie===p&&(N=A),le===y&&++pe===u&&(H=A),(ce=ve.nextSibling)!==null)break;ve=le,le=ve.parentNode}ve=ce}o=N===-1||H===-1?null:{start:N,end:H}}else o=null}o=o||{start:0,end:0}}else o=null;for(qh={focusedElem:n,selectionRange:o},pc=!1,dn=a;dn!==null;)if(a=dn,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,dn=n;else for(;dn!==null;){switch(a=dn,y=a.alternate,n=a.flags,a.tag){case 0:if((n&4)!==0&&(n=a.updateQueue,n=n!==null?n.events:null,n!==null))for(o=0;o<n.length;o++)p=n[o],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&y!==null){n=void 0,o=a,p=y.memoizedProps,y=y.memoizedState,u=o.stateNode;try{var Me=Qi(o.type,p);n=u.getSnapshotBeforeUpdate(Me,y),u.__reactInternalSnapshotBeforeUpdate=n}catch(Pe){yt(o,o.return,Pe)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,o=n.nodeType,o===9)Bh(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Bh(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(i(163))}if(n=a.sibling,n!==null){n.return=a.return,dn=n;break}dn=a.return}}function K0(n,a,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:_a(n,o),u&4&&Zs(5,o);break;case 1:if(_a(n,o),u&4)if(n=o.stateNode,a===null)try{n.componentDidMount()}catch(A){yt(o,o.return,A)}else{var p=Qi(o.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(p,a,n.__reactInternalSnapshotBeforeUpdate)}catch(A){yt(o,o.return,A)}}u&64&&q0(o),u&512&&Xs(o,o.return);break;case 3:if(_a(n,o),u&64&&(n=o.updateQueue,n!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{jy(n,a)}catch(A){yt(o,o.return,A)}}break;case 27:a===null&&u&4&&H0(o);case 26:case 5:_a(n,o),a===null&&u&4&&F0(o),u&512&&Xs(o,o.return);break;case 12:_a(n,o);break;case 31:_a(n,o),u&4&&X0(n,o);break;case 13:_a(n,o),u&4&&Q0(n,o),u&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=d_.bind(null,o),k_(n,o))));break;case 22:if(u=o.memoizedState!==null||Ea,!u){a=a!==null&&a.memoizedState!==null||Xt,p=Ea;var y=Xt;Ea=u,(Xt=a)&&!y?Ta(n,o,(o.subtreeFlags&8772)!==0):_a(n,o),Ea=p,Xt=y}break;case 30:break;default:_a(n,o)}}function Y0(n){var a=n.alternate;a!==null&&(n.alternate=null,Y0(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&lu(a)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Mt=null,Fn=!1;function xa(n,a,o){for(o=o.child;o!==null;)Z0(n,a,o),o=o.sibling}function Z0(n,a,o){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(kr,o)}catch{}switch(o.tag){case 26:Xt||ea(o,a),xa(n,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Xt||ea(o,a);var u=Mt,p=Fn;si(o.type)&&(Mt=o.stateNode,Fn=!1),xa(n,a,o),il(o.stateNode),Mt=u,Fn=p;break;case 5:Xt||ea(o,a);case 6:if(u=Mt,p=Fn,Mt=null,xa(n,a,o),Mt=u,Fn=p,Mt!==null)if(Fn)try{(Mt.nodeType===9?Mt.body:Mt.nodeName==="HTML"?Mt.ownerDocument.body:Mt).removeChild(o.stateNode)}catch(y){yt(o,a,y)}else try{Mt.removeChild(o.stateNode)}catch(y){yt(o,a,y)}break;case 18:Mt!==null&&(Fn?(n=Mt,qv(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),Zo(n)):qv(Mt,o.stateNode));break;case 4:u=Mt,p=Fn,Mt=o.stateNode.containerInfo,Fn=!0,xa(n,a,o),Mt=u,Fn=p;break;case 0:case 11:case 14:case 15:ei(2,o,a),Xt||ei(4,o,a),xa(n,a,o);break;case 1:Xt||(ea(o,a),u=o.stateNode,typeof u.componentWillUnmount=="function"&&V0(o,a,u)),xa(n,a,o);break;case 21:xa(n,a,o);break;case 22:Xt=(u=Xt)||o.memoizedState!==null,xa(n,a,o),Xt=u;break;default:xa(n,a,o)}}function X0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Zo(n)}catch(o){yt(a,a.return,o)}}}function Q0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Zo(n)}catch(o){yt(a,a.return,o)}}function a_(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new G0),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new G0),a;default:throw Error(i(435,n.tag))}}function Yu(n,a){var o=a_(n);a.forEach(function(u){if(!o.has(u)){o.add(u);var p=h_.bind(null,n,u);u.then(p,p)}})}function Bn(n,a){var o=a.deletions;if(o!==null)for(var u=0;u<o.length;u++){var p=o[u],y=n,A=a,N=A;e:for(;N!==null;){switch(N.tag){case 27:if(si(N.type)){Mt=N.stateNode,Fn=!1;break e}break;case 5:Mt=N.stateNode,Fn=!1;break e;case 3:case 4:Mt=N.stateNode.containerInfo,Fn=!0;break e}N=N.return}if(Mt===null)throw Error(i(160));Z0(y,A,p),Mt=null,Fn=!1,y=p.alternate,y!==null&&(y.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)W0(a,n),a=a.sibling}var Nr=null;function W0(n,a){var o=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Bn(a,n),Hn(n),u&4&&(ei(3,n,n.return),Zs(3,n),ei(5,n,n.return));break;case 1:Bn(a,n),Hn(n),u&512&&(Xt||o===null||ea(o,o.return)),u&64&&Ea&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var p=Nr;if(Bn(a,n),Hn(n),u&512&&(Xt||o===null||ea(o,o.return)),u&4){var y=o!==null?o.memoizedState:null;if(u=n.memoizedState,o===null)if(u===null)if(n.stateNode===null){e:{u=n.type,o=n.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":y=p.getElementsByTagName("title")[0],(!y||y[yo]||y[cn]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=p.createElement(u),p.head.insertBefore(y,p.querySelector("head > title"))),wn(y,u,o),y[cn]=n,Jt(y),u=y;break e;case"link":var A=Wv("link","href",p).get(u+(o.href||""));if(A){for(var N=0;N<A.length;N++)if(y=A[N],y.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&y.getAttribute("rel")===(o.rel==null?null:o.rel)&&y.getAttribute("title")===(o.title==null?null:o.title)&&y.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){A.splice(N,1);break t}}y=p.createElement(u),wn(y,u,o),p.head.appendChild(y);break;case"meta":if(A=Wv("meta","content",p).get(u+(o.content||""))){for(N=0;N<A.length;N++)if(y=A[N],y.getAttribute("content")===(o.content==null?null:""+o.content)&&y.getAttribute("name")===(o.name==null?null:o.name)&&y.getAttribute("property")===(o.property==null?null:o.property)&&y.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&y.getAttribute("charset")===(o.charSet==null?null:o.charSet)){A.splice(N,1);break t}}y=p.createElement(u),wn(y,u,o),p.head.appendChild(y);break;default:throw Error(i(468,u))}y[cn]=n,Jt(y),u=y}n.stateNode=u}else Jv(p,n.type,n.stateNode);else n.stateNode=Qv(p,u,n.memoizedProps);else y!==u?(y===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):y.count--,u===null?Jv(p,n.type,n.stateNode):Qv(p,u,n.memoizedProps)):u===null&&n.stateNode!==null&&gh(n,n.memoizedProps,o.memoizedProps)}break;case 27:Bn(a,n),Hn(n),u&512&&(Xt||o===null||ea(o,o.return)),o!==null&&u&4&&gh(n,n.memoizedProps,o.memoizedProps);break;case 5:if(Bn(a,n),Hn(n),u&512&&(Xt||o===null||ea(o,o.return)),n.flags&32){p=n.stateNode;try{Li(p,"")}catch(Me){yt(n,n.return,Me)}}u&4&&n.stateNode!=null&&(p=n.memoizedProps,gh(n,p,o!==null?o.memoizedProps:p)),u&1024&&(bh=!0);break;case 6:if(Bn(a,n),Hn(n),u&4){if(n.stateNode===null)throw Error(i(162));u=n.memoizedProps,o=n.stateNode;try{o.nodeValue=u}catch(Me){yt(n,n.return,Me)}}break;case 3:if(cc=null,p=Nr,Nr=lc(a.containerInfo),Bn(a,n),Nr=p,Hn(n),u&4&&o!==null&&o.memoizedState.isDehydrated)try{Zo(a.containerInfo)}catch(Me){yt(n,n.return,Me)}bh&&(bh=!1,J0(n));break;case 4:u=Nr,Nr=lc(n.stateNode.containerInfo),Bn(a,n),Hn(n),Nr=u;break;case 12:Bn(a,n),Hn(n);break;case 31:Bn(a,n),Hn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Yu(n,u)));break;case 13:Bn(a,n),Hn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Xu=qe()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Yu(n,u)));break;case 22:p=n.memoizedState!==null;var H=o!==null&&o.memoizedState!==null,ie=Ea,pe=Xt;if(Ea=ie||p,Xt=pe||H,Bn(a,n),Xt=pe,Ea=ie,Hn(n),u&8192)e:for(a=n.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||H||Ea||Xt||Wi(n)),o=null,a=n;;){if(a.tag===5||a.tag===26){if(o===null){H=o=a;try{if(y=H.stateNode,p)A=y.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{N=H.stateNode;var ve=H.memoizedProps.style,le=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;N.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(Me){yt(H,H.return,Me)}}}else if(a.tag===6){if(o===null){H=a;try{H.stateNode.nodeValue=p?"":H.memoizedProps}catch(Me){yt(H,H.return,Me)}}}else if(a.tag===18){if(o===null){H=a;try{var ce=H.stateNode;p?Vv(ce,!0):Vv(H.stateNode,!1)}catch(Me){yt(H,H.return,Me)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===n)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=n.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Yu(n,o))));break;case 19:Bn(a,n),Hn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Yu(n,u)));break;case 30:break;case 21:break;default:Bn(a,n),Hn(n)}}function Hn(n){var a=n.flags;if(a&2){try{for(var o,u=n.return;u!==null;){if(B0(u)){o=u;break}u=u.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var p=o.stateNode,y=yh(n);Ku(n,y,p);break;case 5:var A=o.stateNode;o.flags&32&&(Li(A,""),o.flags&=-33);var N=yh(n);Ku(n,N,A);break;case 3:case 4:var H=o.stateNode.containerInfo,ie=yh(n);vh(n,ie,H);break;default:throw Error(i(161))}}catch(pe){yt(n,n.return,pe)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function J0(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;J0(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function _a(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)K0(n,a.alternate,a),a=a.sibling}function Wi(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:ei(4,a,a.return),Wi(a);break;case 1:ea(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&V0(a,a.return,o),Wi(a);break;case 27:il(a.stateNode);case 26:case 5:ea(a,a.return),Wi(a);break;case 22:a.memoizedState===null&&Wi(a);break;case 30:Wi(a);break;default:Wi(a)}n=n.sibling}}function Ta(n,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,p=n,y=a,A=y.flags;switch(y.tag){case 0:case 11:case 15:Ta(p,y,o),Zs(4,y);break;case 1:if(Ta(p,y,o),u=y,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(ie){yt(u,u.return,ie)}if(u=y,p=u.updateQueue,p!==null){var N=u.stateNode;try{var H=p.shared.hiddenCallbacks;if(H!==null)for(p.shared.hiddenCallbacks=null,p=0;p<H.length;p++)My(H[p],N)}catch(ie){yt(u,u.return,ie)}}o&&A&64&&q0(y),Xs(y,y.return);break;case 27:H0(y);case 26:case 5:Ta(p,y,o),o&&u===null&&A&4&&F0(y),Xs(y,y.return);break;case 12:Ta(p,y,o);break;case 31:Ta(p,y,o),o&&A&4&&X0(p,y);break;case 13:Ta(p,y,o),o&&A&4&&Q0(p,y);break;case 22:y.memoizedState===null&&Ta(p,y,o),Xs(y,y.return);break;case 30:break;default:Ta(p,y,o)}a=a.sibling}}function Sh(n,a){var o=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==o&&(n!=null&&n.refCount++,o!=null&&$s(o))}function wh(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&$s(n))}function zr(n,a,o,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)ev(n,a,o,u),a=a.sibling}function ev(n,a,o,u){var p=a.flags;switch(a.tag){case 0:case 11:case 15:zr(n,a,o,u),p&2048&&Zs(9,a);break;case 1:zr(n,a,o,u);break;case 3:zr(n,a,o,u),p&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&$s(n)));break;case 12:if(p&2048){zr(n,a,o,u),n=a.stateNode;try{var y=a.memoizedProps,A=y.id,N=y.onPostCommit;typeof N=="function"&&N(A,a.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(H){yt(a,a.return,H)}}else zr(n,a,o,u);break;case 31:zr(n,a,o,u);break;case 13:zr(n,a,o,u);break;case 23:break;case 22:y=a.stateNode,A=a.alternate,a.memoizedState!==null?y._visibility&2?zr(n,a,o,u):Qs(n,a):y._visibility&2?zr(n,a,o,u):(y._visibility|=2,Io(n,a,o,u,(a.subtreeFlags&10256)!==0||!1)),p&2048&&Sh(A,a);break;case 24:zr(n,a,o,u),p&2048&&wh(a.alternate,a);break;default:zr(n,a,o,u)}}function Io(n,a,o,u,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var y=n,A=a,N=o,H=u,ie=A.flags;switch(A.tag){case 0:case 11:case 15:Io(y,A,N,H,p),Zs(8,A);break;case 23:break;case 22:var pe=A.stateNode;A.memoizedState!==null?pe._visibility&2?Io(y,A,N,H,p):Qs(y,A):(pe._visibility|=2,Io(y,A,N,H,p)),p&&ie&2048&&Sh(A.alternate,A);break;case 24:Io(y,A,N,H,p),p&&ie&2048&&wh(A.alternate,A);break;default:Io(y,A,N,H,p)}a=a.sibling}}function Qs(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=n,u=a,p=u.flags;switch(u.tag){case 22:Qs(o,u),p&2048&&Sh(u.alternate,u);break;case 24:Qs(o,u),p&2048&&wh(u.alternate,u);break;default:Qs(o,u)}a=a.sibling}}var Ws=8192;function Lo(n,a,o){if(n.subtreeFlags&Ws)for(n=n.child;n!==null;)tv(n,a,o),n=n.sibling}function tv(n,a,o){switch(n.tag){case 26:Lo(n,a,o),n.flags&Ws&&n.memoizedState!==null&&B_(o,Nr,n.memoizedState,n.memoizedProps);break;case 5:Lo(n,a,o);break;case 3:case 4:var u=Nr;Nr=lc(n.stateNode.containerInfo),Lo(n,a,o),Nr=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=Ws,Ws=16777216,Lo(n,a,o),Ws=u):Lo(n,a,o));break;default:Lo(n,a,o)}}function nv(n){var a=n.alternate;if(a!==null&&(n=a.child,n!==null)){a.child=null;do a=n.sibling,n.sibling=null,n=a;while(n!==null)}}function Js(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];dn=u,av(u,n)}nv(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)rv(n),n=n.sibling}function rv(n){switch(n.tag){case 0:case 11:case 15:Js(n),n.flags&2048&&ei(9,n,n.return);break;case 3:Js(n);break;case 12:Js(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,Zu(n)):Js(n);break;default:Js(n)}}function Zu(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];dn=u,av(u,n)}nv(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:ei(8,a,a.return),Zu(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,Zu(a));break;default:Zu(a)}n=n.sibling}}function av(n,a){for(;dn!==null;){var o=dn;switch(o.tag){case 0:case 11:case 15:ei(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:$s(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,dn=u;else e:for(o=n;dn!==null;){u=dn;var p=u.sibling,y=u.return;if(Y0(u),u===o){dn=null;break e}if(p!==null){p.return=y,dn=p;break e}dn=y}}}var i_={getCacheForType:function(n){var a=bn(Kt),o=a.data.get(n);return o===void 0&&(o=n(),a.data.set(n,o)),o},cacheSignal:function(){return bn(Kt).controller.signal}},o_=typeof WeakMap=="function"?WeakMap:Map,dt=0,Et=null,Xe=null,et=0,gt=0,ar=null,ti=!1,Uo=!1,Eh=!1,Ca=0,$t=0,ni=0,Ji=0,xh=0,ir=0,qo=0,el=null,Gn=null,_h=!1,Xu=0,iv=0,Qu=1/0,Wu=null,ri=null,nn=0,ai=null,Vo=null,Oa=0,Th=0,Ch=null,ov=null,tl=0,Oh=null;function or(){return(dt&2)!==0&&et!==0?et&-et:K.T!==null?Dh():Cs()}function sv(){if(ir===0)if((et&536870912)===0||rt){var n=dr;dr<<=1,(dr&3932160)===0&&(dr=262144),ir=n}else ir=536870912;return n=nr.current,n!==null&&(n.flags|=32),ir}function Kn(n,a,o){(n===Et&&(gt===2||gt===9)||n.cancelPendingCommit!==null)&&(Fo(n,0),ii(n,et,ir,!1)),aa(n,o),((dt&2)===0||n!==Et)&&(n===Et&&((dt&2)===0&&(Ji|=o),$t===4&&ii(n,et,ir,!1)),ta(n))}function lv(n,a,o){if((dt&6)!==0)throw Error(i(327));var u=!o&&(a&127)===0&&(a&n.expiredLanes)===0||Vr(n,a),p=u?u_(n,a):Ah(n,a,!0),y=u;do{if(p===0){Uo&&!u&&ii(n,a,0,!1);break}else{if(o=n.current.alternate,y&&!s_(o)){p=Ah(n,a,!1),y=!1;continue}if(p===2){if(y=a,n.errorRecoveryDisabledLanes&y)var A=0;else A=n.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){a=A;e:{var N=n;p=el;var H=N.current.memoizedState.isDehydrated;if(H&&(Fo(N,A).flags|=256),A=Ah(N,A,!1),A!==2){if(Eh&&!H){N.errorRecoveryDisabledLanes|=y,Ji|=y,p=4;break e}y=Gn,Gn=p,y!==null&&(Gn===null?Gn=y:Gn.push.apply(Gn,y))}p=A}if(y=!1,p!==2)continue}}if(p===1){Fo(n,0),ii(n,a,0,!0);break}e:{switch(u=n,y=p,y){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:ii(u,a,ir,!ti);break e;case 2:Gn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(p=Xu+300-qe(),10<p)){if(ii(u,a,ir,!ti),Xr(u,0,!0)!==0)break e;Oa=a,u.timeoutHandle=Lv(uv.bind(null,u,o,Gn,Wu,_h,a,ir,Ji,qo,ti,y,"Throttled",-0,0),p);break e}uv(u,o,Gn,Wu,_h,a,ir,Ji,qo,ti,y,null,-0,0)}}break}while(!0);ta(n)}function uv(n,a,o,u,p,y,A,N,H,ie,pe,ve,le,ce){if(n.timeoutHandle=-1,ve=a.subtreeFlags,ve&8192||(ve&16785408)===16785408){ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qr},tv(a,y,ve);var Me=(y&62914560)===y?Xu-qe():(y&4194048)===y?iv-qe():0;if(Me=H_(ve,Me),Me!==null){Oa=y,n.cancelPendingCommit=Me(yv.bind(null,n,a,y,o,u,p,A,N,H,pe,ve,null,le,ce)),ii(n,y,A,!ie);return}}yv(n,a,y,o,u,p,A,N,H)}function s_(n){for(var a=n;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var p=o[u],y=p.getSnapshot;p=p.value;try{if(!$n(y(),p))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ii(n,a,o,u){a&=~xh,a&=~Ji,n.suspendedLanes|=a,n.pingedLanes&=~a,u&&(n.warmLanes|=a),u=n.expirationTimes;for(var p=a;0<p;){var y=31-Pt(p),A=1<<y;u[y]=-1,p&=~A}o!==0&&On(n,o,a)}function Ju(){return(dt&6)===0?(nl(0),!1):!0}function Rh(){if(Xe!==null){if(gt===0)var n=Xe.return;else n=Xe,ga=Bi=null,Bd(n),Do=null,Is=0,n=Xe;for(;n!==null;)U0(n.alternate,n),n=n.return;Xe=null}}function Fo(n,a){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,O_(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),Oa=0,Rh(),Et=n,Xe=o=pr(n.current,null),et=a,gt=0,ar=null,ti=!1,Uo=Vr(n,a),Eh=!1,qo=ir=xh=Ji=ni=$t=0,Gn=el=null,_h=!1,(a&8)!==0&&(a|=a&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=a;0<u;){var p=31-Pt(u),y=1<<p;a|=n[p],u&=~y}return Ca=a,Nt(),o}function cv(n,a){Be=null,K.H=Gs,a===ko||a===Ru?(a=Cy(),gt=3):a===kd?(a=Cy(),gt=4):gt=a===oh?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,ar=a,Xe===null&&($t=1,Vu(n,mr(a,n.current)))}function fv(){var n=nr.current;return n===null?!0:(et&4194048)===et?br===null:(et&62914560)===et||(et&536870912)!==0?n===br:!1}function dv(){var n=K.H;return K.H=Gs,n===null?Gs:n}function hv(){var n=K.A;return K.A=i_,n}function ec(){$t=4,ti||(et&4194048)!==et&&nr.current!==null||(Uo=!0),(ni&134217727)===0&&(Ji&134217727)===0||Et===null||ii(Et,et,ir,!1)}function Ah(n,a,o){var u=dt;dt|=2;var p=dv(),y=hv();(Et!==n||et!==a)&&(Wu=null,Fo(n,a)),a=!1;var A=$t;e:do try{if(gt!==0&&Xe!==null){var N=Xe,H=ar;switch(gt){case 8:Rh(),A=6;break e;case 3:case 2:case 9:case 6:nr.current===null&&(a=!0);var ie=gt;if(gt=0,ar=null,Bo(n,N,H,ie),o&&Uo){A=0;break e}break;default:ie=gt,gt=0,ar=null,Bo(n,N,H,ie)}}l_(),A=$t;break}catch(pe){cv(n,pe)}while(!0);return a&&n.shellSuspendCounter++,ga=Bi=null,dt=u,K.H=p,K.A=y,Xe===null&&(Et=null,et=0,Nt()),A}function l_(){for(;Xe!==null;)pv(Xe)}function u_(n,a){var o=dt;dt|=2;var u=dv(),p=hv();Et!==n||et!==a?(Wu=null,Qu=qe()+500,Fo(n,a)):Uo=Vr(n,a);e:do try{if(gt!==0&&Xe!==null){a=Xe;var y=ar;t:switch(gt){case 1:gt=0,ar=null,Bo(n,a,y,1);break;case 2:case 9:if(_y(y)){gt=0,ar=null,mv(a);break}a=function(){gt!==2&>!==9||Et!==n||(gt=7),ta(n)},y.then(a,a);break e;case 3:gt=7;break e;case 4:gt=5;break e;case 7:_y(y)?(gt=0,ar=null,mv(a)):(gt=0,ar=null,Bo(n,a,y,7));break;case 5:var A=null;switch(Xe.tag){case 26:A=Xe.memoizedState;case 5:case 27:var N=Xe;if(A?eb(A):N.stateNode.complete){gt=0,ar=null;var H=N.sibling;if(H!==null)Xe=H;else{var ie=N.return;ie!==null?(Xe=ie,tc(ie)):Xe=null}break t}}gt=0,ar=null,Bo(n,a,y,5);break;case 6:gt=0,ar=null,Bo(n,a,y,6);break;case 8:Rh(),$t=6;break e;default:throw Error(i(462))}}c_();break}catch(pe){cv(n,pe)}while(!0);return ga=Bi=null,K.H=u,K.A=p,dt=o,Xe!==null?0:(Et=null,et=0,Nt(),$t)}function c_(){for(;Xe!==null&&!Ze();)pv(Xe)}function pv(n){var a=I0(n.alternate,n,Ca);n.memoizedProps=n.pendingProps,a===null?tc(n):Xe=a}function mv(n){var a=n,o=a.alternate;switch(a.tag){case 15:case 0:a=k0(o,a,a.pendingProps,a.type,void 0,et);break;case 11:a=k0(o,a,a.pendingProps,a.type.render,a.ref,et);break;case 5:Bd(a);default:U0(o,a),a=Xe=Eu(a,Ca),a=I0(o,a,Ca)}n.memoizedProps=n.pendingProps,a===null?tc(n):Xe=a}function Bo(n,a,o,u){ga=Bi=null,Bd(a),Do=null,Is=0;var p=a.return;try{if(Wx(n,p,a,o,et)){$t=1,Vu(n,mr(o,n.current)),Xe=null;return}}catch(y){if(p!==null)throw Xe=p,y;$t=1,Vu(n,mr(o,n.current)),Xe=null;return}a.flags&32768?(rt||u===1?n=!0:Uo||(et&536870912)!==0?n=!1:(ti=n=!0,(u===2||u===9||u===3||u===6)&&(u=nr.current,u!==null&&u.tag===13&&(u.flags|=16384))),gv(a,n)):tc(a)}function tc(n){var a=n;do{if((a.flags&32768)!==0){gv(a,ti);return}n=a.return;var o=t_(a.alternate,a,Ca);if(o!==null){Xe=o;return}if(a=a.sibling,a!==null){Xe=a;return}Xe=a=n}while(a!==null);$t===0&&($t=5)}function gv(n,a){do{var o=n_(n.alternate,n);if(o!==null){o.flags&=32767,Xe=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(n=n.sibling,n!==null)){Xe=n;return}Xe=n=o}while(n!==null);$t=6,Xe=null}function yv(n,a,o,u,p,y,A,N,H){n.cancelPendingCommit=null;do nc();while(nn!==0);if((dt&6)!==0)throw Error(i(327));if(a!==null){if(a===n.current)throw Error(i(177));if(y=a.lanes|a.childLanes,y|=fn,At(n,o,y,A,N,H),n===Et&&(Xe=Et=null,et=0),Vo=a,ai=n,Oa=o,Th=y,Ch=p,ov=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,p_(Dt,function(){return Ev(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=K.T,K.T=null,p=ee.p,ee.p=2,A=dt,dt|=4;try{r_(n,a,o)}finally{dt=A,ee.p=p,K.T=u}}nn=1,vv(),bv(),Sv()}}function vv(){if(nn===1){nn=0;var n=ai,a=Vo,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=K.T,K.T=null;var u=ee.p;ee.p=2;var p=dt;dt|=4;try{W0(a,n);var y=qh,A=bd(n.containerInfo),N=y.focusedElem,H=y.selectionRange;if(A!==N&&N&&N.ownerDocument&&Su(N.ownerDocument.documentElement,N)){if(H!==null&&cs(N)){var ie=H.start,pe=H.end;if(pe===void 0&&(pe=ie),"selectionStart"in N)N.selectionStart=ie,N.selectionEnd=Math.min(pe,N.value.length);else{var ve=N.ownerDocument||document,le=ve&&ve.defaultView||window;if(le.getSelection){var ce=le.getSelection(),Me=N.textContent.length,Pe=Math.min(H.start,Me),wt=H.end===void 0?Pe:Math.min(H.end,Me);!ce.extend&&Pe>wt&&(A=wt,wt=Pe,Pe=A);var te=vd(N,Pe),W=vd(N,wt);if(te&&W&&(ce.rangeCount!==1||ce.anchorNode!==te.node||ce.anchorOffset!==te.offset||ce.focusNode!==W.node||ce.focusOffset!==W.offset)){var ae=ve.createRange();ae.setStart(te.node,te.offset),ce.removeAllRanges(),Pe>wt?(ce.addRange(ae),ce.extend(W.node,W.offset)):(ae.setEnd(W.node,W.offset),ce.addRange(ae))}}}}for(ve=[],ce=N;ce=ce.parentNode;)ce.nodeType===1&&ve.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<ve.length;N++){var me=ve[N];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}pc=!!Uh,qh=Uh=null}finally{dt=p,ee.p=u,K.T=o}}n.current=a,nn=2}}function bv(){if(nn===2){nn=0;var n=ai,a=Vo,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=K.T,K.T=null;var u=ee.p;ee.p=2;var p=dt;dt|=4;try{K0(n,a.alternate,a)}finally{dt=p,ee.p=u,K.T=o}}nn=3}}function Sv(){if(nn===4||nn===3){nn=0,ot();var n=ai,a=Vo,o=Oa,u=ov;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?nn=5:(nn=0,Vo=ai=null,wv(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(ri=null),Ti(o),a=a.stateNode,Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(kr,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=K.T,p=ee.p,ee.p=2,K.T=null;try{for(var y=n.onRecoverableError,A=0;A<u.length;A++){var N=u[A];y(N.value,{componentStack:N.stack})}}finally{K.T=a,ee.p=p}}(Oa&3)!==0&&nc(),ta(n),p=n.pendingLanes,(o&261930)!==0&&(p&42)!==0?n===Oh?tl++:(tl=0,Oh=n):tl=0,nl(0)}}function wv(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,$s(a)))}function nc(){return vv(),bv(),Sv(),Ev()}function Ev(){if(nn!==5)return!1;var n=ai,a=Th;Th=0;var o=Ti(Oa),u=K.T,p=ee.p;try{ee.p=32>o?32:o,K.T=null,o=Ch,Ch=null;var y=ai,A=Oa;if(nn=0,Vo=ai=null,Oa=0,(dt&6)!==0)throw Error(i(331));var N=dt;if(dt|=4,rv(y.current),ev(y,y.current,A,o),dt=N,nl(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(kr,y)}catch{}return!0}finally{ee.p=p,K.T=u,wv(n,a)}}function xv(n,a,o){a=mr(o,a),a=ih(n.stateNode,a,2),n=Qa(n,a,2),n!==null&&(aa(n,2),ta(n))}function yt(n,a,o){if(n.tag===3)xv(n,n,o);else for(;a!==null;){if(a.tag===3){xv(a,n,o);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ri===null||!ri.has(u))){n=mr(o,n),o=_0(2),u=Qa(a,o,2),u!==null&&(T0(o,u,a,n),aa(u,2),ta(u));break}}a=a.return}}function Mh(n,a,o){var u=n.pingCache;if(u===null){u=n.pingCache=new o_;var p=new Set;u.set(a,p)}else p=u.get(a),p===void 0&&(p=new Set,u.set(a,p));p.has(o)||(Eh=!0,p.add(o),n=f_.bind(null,n,a,o),a.then(n,n))}function f_(n,a,o){var u=n.pingCache;u!==null&&u.delete(a),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,Et===n&&(et&o)===o&&($t===4||$t===3&&(et&62914560)===et&&300>qe()-Xu?(dt&2)===0&&Fo(n,0):xh|=o,qo===et&&(qo=0)),ta(n)}function _v(n,a){a===0&&(a=Ua()),n=Dr(n,a),n!==null&&(aa(n,a),ta(n))}function d_(n){var a=n.memoizedState,o=0;a!==null&&(o=a.retryLane),_v(n,o)}function h_(n,a){var o=0;switch(n.tag){case 31:case 13:var u=n.stateNode,p=n.memoizedState;p!==null&&(o=p.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(i(314))}u!==null&&u.delete(a),_v(n,o)}function p_(n,a){return Ue(n,a)}var rc=null,Ho=null,jh=!1,ac=!1,kh=!1,oi=0;function ta(n){n!==Ho&&n.next===null&&(Ho===null?rc=Ho=n:Ho=Ho.next=n),ac=!0,jh||(jh=!0,g_())}function nl(n,a){if(!kh&&ac){kh=!0;do for(var o=!1,u=rc;u!==null;){if(n!==0){var p=u.pendingLanes;if(p===0)var y=0;else{var A=u.suspendedLanes,N=u.pingedLanes;y=(1<<31-Pt(42|n)+1)-1,y&=p&~(A&~N),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(o=!0,Rv(u,y))}else y=et,y=Xr(u,u===Et?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||Vr(u,y)||(o=!0,Rv(u,y));u=u.next}while(o);kh=!1}}function m_(){Tv()}function Tv(){ac=jh=!1;var n=0;oi!==0&&C_()&&(n=oi);for(var a=qe(),o=null,u=rc;u!==null;){var p=u.next,y=Cv(u,a);y===0?(u.next=null,o===null?rc=p:o.next=p,p===null&&(Ho=o)):(o=u,(n!==0||(y&3)!==0)&&(ac=!0)),u=p}nn!==0&&nn!==5||nl(n),oi!==0&&(oi=0)}function Cv(n,a){for(var o=n.suspendedLanes,u=n.pingedLanes,p=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var A=31-Pt(y),N=1<<A,H=p[A];H===-1?((N&o)===0||(N&u)!==0)&&(p[A]=oo(N,a)):H<=a&&(n.expiredLanes|=N),y&=~N}if(a=Et,o=et,o=Xr(n,n===a?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,o===0||n===a&&(gt===2||gt===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&Re(u),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||Vr(n,o)){if(a=o&-o,a===n.callbackPriority)return a;switch(u!==null&&Re(u),Ti(o)){case 2:case 8:o=zn;break;case 32:o=Dt;break;case 268435456:o=hn;break;default:o=Dt}return u=Ov.bind(null,n),o=Ue(o,u),n.callbackPriority=a,n.callbackNode=o,a}return u!==null&&u!==null&&Re(u),n.callbackPriority=2,n.callbackNode=null,2}function Ov(n,a){if(nn!==0&&nn!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(nc()&&n.callbackNode!==o)return null;var u=et;return u=Xr(n,n===Et?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(lv(n,u,a),Cv(n,qe()),n.callbackNode!=null&&n.callbackNode===o?Ov.bind(null,n):null)}function Rv(n,a){if(nc())return null;lv(n,a,!0)}function g_(){R_(function(){(dt&6)!==0?Ue(yn,m_):Tv()})}function Dh(){if(oi===0){var n=Mo;n===0&&(n=pn,pn<<=1,(pn&261888)===0&&(pn=256)),oi=n}return oi}function Av(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Rs(""+n)}function Mv(n,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,n.id&&o.setAttribute("form",n.id),a.parentNode.insertBefore(o,a),n=new FormData(n),o.parentNode.removeChild(o),n}function y_(n,a,o,u,p){if(a==="submit"&&o&&o.stateNode===p){var y=Av((p[_n]||null).action),A=u.submitter;A&&(a=(a=A[_n]||null)?Av(a.formAction):A.getAttribute("formAction"),a!==null&&(y=a,A=null));var N=new Fe("action","action",null,u,p);n.push({event:N,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(oi!==0){var H=A?Mv(p,A):new FormData(p);Jd(o,{pending:!0,data:H,method:p.method,action:y},null,H)}}else typeof y=="function"&&(N.preventDefault(),H=A?Mv(p,A):new FormData(p),Jd(o,{pending:!0,data:H,method:p.method,action:y},y,H))},currentTarget:p}]})}}for(var Nh=0;Nh<nt.length;Nh++){var zh=nt[Nh],v_=zh.toLowerCase(),b_=zh[0].toUpperCase()+zh.slice(1);mt(v_,"on"+b_)}mt(Se,"onAnimationEnd"),mt(_e,"onAnimationIteration"),mt(ge,"onAnimationStart"),mt("dblclick","onDoubleClick"),mt("focusin","onFocus"),mt("focusout","onBlur"),mt(Te,"onTransitionRun"),mt(Ce,"onTransitionStart"),mt(Ve,"onTransitionCancel"),mt(He,"onTransitionEnd"),Ii("onMouseEnter",["mouseout","mouseover"]),Ii("onMouseLeave",["mouseout","mouseover"]),Ii("onPointerEnter",["pointerout","pointerover"]),Ii("onPointerLeave",["pointerout","pointerover"]),Va("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Va("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Va("onBeforeInput",["compositionend","keypress","textInput","paste"]),Va("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Va("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Va("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var rl="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(" "),S_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(rl));function jv(n,a){a=(a&4)!==0;for(var o=0;o<n.length;o++){var u=n[o],p=u.event;u=u.listeners;e:{var y=void 0;if(a)for(var A=u.length-1;0<=A;A--){var N=u[A],H=N.instance,ie=N.currentTarget;if(N=N.listener,H!==y&&p.isPropagationStopped())break e;y=N,p.currentTarget=ie;try{y(p)}catch(pe){un(pe)}p.currentTarget=null,y=H}else for(A=0;A<u.length;A++){if(N=u[A],H=N.instance,ie=N.currentTarget,N=N.listener,H!==y&&p.isPropagationStopped())break e;y=N,p.currentTarget=ie;try{y(p)}catch(pe){un(pe)}p.currentTarget=null,y=H}}}}function Qe(n,a){var o=a[su];o===void 0&&(o=a[su]=new Set);var u=n+"__bubble";o.has(u)||(kv(a,n,2,!1),o.add(u))}function $h(n,a,o){var u=0;a&&(u|=4),kv(o,n,u,a)}var ic="_reactListening"+Math.random().toString(36).slice(2);function Ph(n){if(!n[ic]){n[ic]=!0,Kf.forEach(function(o){o!=="selectionchange"&&(S_.has(o)||$h(o,!1,n),$h(o,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[ic]||(a[ic]=!0,$h("selectionchange",!1,a))}}function kv(n,a,o,u){switch(sb(a)){case 2:var p=Y_;break;case 8:p=Z_;break;default:p=Wh}o=p.bind(null,a,o,n),p=void 0,!Ol||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),u?p!==void 0?n.addEventListener(a,o,{capture:!0,passive:p}):n.addEventListener(a,o,!0):p!==void 0?n.addEventListener(a,o,{passive:p}):n.addEventListener(a,o,!1)}function Ih(n,a,o,u,p){var y=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var A=u.tag;if(A===3||A===4){var N=u.stateNode.containerInfo;if(N===p)break;if(A===4)for(A=u.return;A!==null;){var H=A.tag;if((H===3||H===4)&&A.stateNode.containerInfo===p)return;A=A.return}for(;N!==null;){if(A=zi(N),A===null)return;if(H=A.tag,H===5||H===6||H===26||H===27){u=y=A;continue e}N=N.parentNode}}u=u.return}mu(function(){var ie=y,pe=hu(o),ve=[];e:{var le=ut.get(n);if(le!==void 0){var ce=Fe,Me=n;switch(n){case"keypress":if(Ms(o)===0)break e;case"keydown":case"keyup":ce=$a;break;case"focusin":Me="focus",ce=Ml;break;case"focusout":Me="blur",ce=Ml;break;case"beforeblur":case"afterblur":ce=Ml;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=Oi;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=sd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=ry;break;case Se:case _e:case ge:ce=rm;break;case He:ce=ud;break;case"scroll":case"scrollend":ce=tm;break;case"wheel":ce=oy;break;case"copy":case"cut":case"paste":ce=ey;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=Yc;break;case"toggle":case"beforetoggle":ce=cm}var Pe=(a&4)!==0,wt=!Pe&&(n==="scroll"||n==="scrollend"),te=Pe?le!==null?le+"Capture":null:le;Pe=[];for(var W=ie,ae;W!==null;){var me=W;if(ae=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||ae===null||te===null||(me=so(W,te),me!=null&&Pe.push(al(W,me,ae))),wt)break;W=W.return}0<Pe.length&&(le=new ce(le,Me,null,o,pe),ve.push({event:le,listeners:Pe}))}}if((a&7)===0){e:{if(le=n==="mouseover"||n==="pointerover",ce=n==="mouseout"||n==="pointerout",le&&o!==du&&(Me=o.relatedTarget||o.fromElement)&&(zi(Me)||Me[Ni]))break e;if((ce||le)&&(le=pe.window===pe?pe:(le=pe.ownerDocument)?le.defaultView||le.parentWindow:window,ce?(Me=o.relatedTarget||o.toElement,ce=ie,Me=Me?zi(Me):null,Me!==null&&(wt=l(Me),Pe=Me.tag,Me!==wt||Pe!==5&&Pe!==27&&Pe!==6)&&(Me=null)):(ce=null,Me=ie),ce!==Me)){if(Pe=Oi,me="onMouseLeave",te="onMouseEnter",W="mouse",(n==="pointerout"||n==="pointerover")&&(Pe=Yc,me="onPointerLeave",te="onPointerEnter",W="pointer"),wt=ce==null?le:vo(ce),ae=Me==null?le:vo(Me),le=new Pe(me,W+"leave",ce,o,pe),le.target=wt,le.relatedTarget=ae,me=null,zi(pe)===ie&&(Pe=new Pe(te,W+"enter",Me,o,pe),Pe.target=ae,Pe.relatedTarget=wt,me=Pe),wt=me,ce&&Me)t:{for(Pe=w_,te=ce,W=Me,ae=0,me=te;me;me=Pe(me))ae++;me=0;for(var ze=W;ze;ze=Pe(ze))me++;for(;0<ae-me;)te=Pe(te),ae--;for(;0<me-ae;)W=Pe(W),me--;for(;ae--;){if(te===W||W!==null&&te===W.alternate){Pe=te;break t}te=Pe(te),W=Pe(W)}Pe=null}else Pe=null;ce!==null&&Dv(ve,le,ce,Pe,!1),Me!==null&&wt!==null&&Dv(ve,wt,Me,Pe,!0)}}e:{if(le=ie?vo(ie):window,ce=le.nodeName&&le.nodeName.toLowerCase(),ce==="select"||ce==="input"&&le.type==="file")var st=Zc;else if(md(le))if(yu)st=hm;else{st=hy;var De=fm}else ce=le.nodeName,!ce||ce.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?ie&&fu(ie.elementType)&&(st=Zc):st=dm;if(st&&(st=st(n,ie))){gd(ve,st,o,pe);break e}De&&De(n,le,ie),n==="focusout"&&ie&&le.type==="number"&&ie.memoizedProps.value!=null&&Cl(le,"number",le.value)}switch(De=ie?vo(ie):window,n){case"focusin":(md(De)||De.contentEditable==="true")&&(Vi=De,wu=ie,_o=null);break;case"focusout":_o=wu=Vi=null;break;case"mousedown":fs=!0;break;case"contextmenu":case"mouseup":case"dragend":fs=!1,Sd(ve,o,pe);break;case"selectionchange":if(py)break;case"keydown":case"keyup":Sd(ve,o,pe)}var Ge;if(gu)e:{switch(n){case"compositionstart":var tt="onCompositionStart";break e;case"compositionend":tt="onCompositionEnd";break e;case"compositionupdate":tt="onCompositionUpdate";break e}tt=void 0}else qi?hd(n,o)&&(tt="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(tt="onCompositionStart");tt&&(cd&&o.locale!=="ko"&&(qi||tt!=="onCompositionStart"?tt==="onCompositionEnd"&&qi&&(Ge=ad()):(fa=pe,uo="value"in fa?fa.value:fa.textContent,qi=!0)),De=oc(ie,tt),0<De.length&&(tt=new Kc(tt,n,null,o,pe),ve.push({event:tt,listeners:De}),Ge?tt.data=Ge:(Ge=pd(o),Ge!==null&&(tt.data=Ge)))),(Ge=ly?uy(n,o):cy(n,o))&&(tt=oc(ie,"onBeforeInput"),0<tt.length&&(De=new Kc("onBeforeInput","beforeinput",null,o,pe),ve.push({event:De,listeners:tt}),De.data=Ge)),y_(ve,n,ie,o,pe)}jv(ve,a)})}function al(n,a,o){return{instance:n,listener:a,currentTarget:o}}function oc(n,a){for(var o=a+"Capture",u=[];n!==null;){var p=n,y=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||y===null||(p=so(n,o),p!=null&&u.unshift(al(n,p,y)),p=so(n,a),p!=null&&u.push(al(n,p,y))),n.tag===3)return u;n=n.return}return[]}function w_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Dv(n,a,o,u,p){for(var y=a._reactName,A=[];o!==null&&o!==u;){var N=o,H=N.alternate,ie=N.stateNode;if(N=N.tag,H!==null&&H===u)break;N!==5&&N!==26&&N!==27||ie===null||(H=ie,p?(ie=so(o,y),ie!=null&&A.unshift(al(o,ie,H))):p||(ie=so(o,y),ie!=null&&A.push(al(o,ie,H)))),o=o.return}A.length!==0&&n.push({event:a,listeners:A})}var E_=/\r\n?/g,x_=/\u0000|\uFFFD/g;function Nv(n){return(typeof n=="string"?n:""+n).replace(E_,`
|
|
9
|
+
`).replace(x_,"")}function zv(n,a){return a=Nv(a),Nv(n)===a}function St(n,a,o,u,p,y){switch(o){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Li(n,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Li(n,""+u);break;case"className":ls(n,"class",u);break;case"tabIndex":ls(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":ls(n,o,u);break;case"style":rd(n,u,y);break;case"data":if(a!=="object"){ls(n,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||o!=="href")){n.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(o);break}u=Rs(""+u),n.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(o,"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 y=="function"&&(o==="formAction"?(a!=="input"&&St(n,a,"name",p.name,p,null),St(n,a,"formEncType",p.formEncType,p,null),St(n,a,"formMethod",p.formMethod,p,null),St(n,a,"formTarget",p.formTarget,p,null)):(St(n,a,"encType",p.encType,p,null),St(n,a,"method",p.method,p,null),St(n,a,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(o);break}u=Rs(""+u),n.setAttribute(o,u);break;case"onClick":u!=null&&(n.onclick=Qr);break;case"onScroll":u!=null&&Qe("scroll",n);break;case"onScrollEnd":u!=null&&Qe("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}o=Rs(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,""+u):n.removeAttribute(o);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":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":u===!0?n.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,u):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(o,u):n.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(o):n.setAttribute(o,u);break;case"popover":Qe("beforetoggle",n),Qe("toggle",n),Os(n,"popover",u);break;case"xlinkActuate":Br(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Br(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Br(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Br(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Br(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Br(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Br(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Br(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Br(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Os(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=Wg.get(o)||o,Os(n,o,u))}}function Lh(n,a,o,u,p,y){switch(o){case"style":rd(n,u,y);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"children":typeof u=="string"?Li(n,u):(typeof u=="number"||typeof u=="bigint")&&Li(n,""+u);break;case"onScroll":u!=null&&Qe("scroll",n);break;case"onScrollEnd":u!=null&&Qe("scrollend",n);break;case"onClick":u!=null&&(n.onclick=Qr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yf.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),a=o.slice(2,p?o.length-7:void 0),y=n[_n]||null,y=y!=null?y[o]:null,typeof y=="function"&&n.removeEventListener(a,y,p),typeof u=="function")){typeof y!="function"&&y!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(a,u,p);break e}o in n?n[o]=u:u===!0?n.setAttribute(o,""):Os(n,o,u)}}}function wn(n,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",n),Qe("load",n);var u=!1,p=!1,y;for(y in o)if(o.hasOwnProperty(y)){var A=o[y];if(A!=null)switch(y){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:St(n,a,y,A,o,null)}}p&&St(n,a,"srcSet",o.srcSet,o,null),u&&St(n,a,"src",o.src,o,null);return;case"input":Qe("invalid",n);var N=y=A=p=null,H=null,ie=null;for(u in o)if(o.hasOwnProperty(u)){var pe=o[u];if(pe!=null)switch(u){case"name":p=pe;break;case"type":A=pe;break;case"checked":H=pe;break;case"defaultChecked":ie=pe;break;case"value":y=pe;break;case"defaultValue":N=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(i(137,a));break;default:St(n,a,u,pe,o,null)}}Jf(n,y,N,H,ie,A,p,!1);return;case"select":Qe("invalid",n),u=A=y=null;for(p in o)if(o.hasOwnProperty(p)&&(N=o[p],N!=null))switch(p){case"value":y=N;break;case"defaultValue":A=N;break;case"multiple":u=N;default:St(n,a,p,N,o,null)}a=y,o=A,n.multiple=!!u,a!=null?Fa(n,!!u,a,!1):o!=null&&Fa(n,!!u,o,!0);return;case"textarea":Qe("invalid",n),y=p=u=null;for(A in o)if(o.hasOwnProperty(A)&&(N=o[A],N!=null))switch(A){case"value":u=N;break;case"defaultValue":p=N;break;case"children":y=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(i(91));break;default:St(n,a,A,N,o,null)}td(n,u,p,y);return;case"option":for(H in o)o.hasOwnProperty(H)&&(u=o[H],u!=null)&&(H==="selected"?n.selected=u&&typeof u!="function"&&typeof u!="symbol":St(n,a,H,u,o,null));return;case"dialog":Qe("beforetoggle",n),Qe("toggle",n),Qe("cancel",n),Qe("close",n);break;case"iframe":case"object":Qe("load",n);break;case"video":case"audio":for(u=0;u<rl.length;u++)Qe(rl[u],n);break;case"image":Qe("error",n),Qe("load",n);break;case"details":Qe("toggle",n);break;case"embed":case"source":case"link":Qe("error",n),Qe("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ie in o)if(o.hasOwnProperty(ie)&&(u=o[ie],u!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:St(n,a,ie,u,o,null)}return;default:if(fu(a)){for(pe in o)o.hasOwnProperty(pe)&&(u=o[pe],u!==void 0&&Lh(n,a,pe,u,o,void 0));return}}for(N in o)o.hasOwnProperty(N)&&(u=o[N],u!=null&&St(n,a,N,u,o,null))}function __(n,a,o,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,y=null,A=null,N=null,H=null,ie=null,pe=null;for(ce in o){var ve=o[ce];if(o.hasOwnProperty(ce)&&ve!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":H=ve;default:u.hasOwnProperty(ce)||St(n,a,ce,null,u,ve)}}for(var le in u){var ce=u[le];if(ve=o[le],u.hasOwnProperty(le)&&(ce!=null||ve!=null))switch(le){case"type":y=ce;break;case"name":p=ce;break;case"checked":ie=ce;break;case"defaultChecked":pe=ce;break;case"value":A=ce;break;case"defaultValue":N=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(i(137,a));break;default:ce!==ve&&St(n,a,le,ce,u,ve)}}cu(n,A,N,H,ie,pe,y,p);return;case"select":ce=A=N=le=null;for(y in o)if(H=o[y],o.hasOwnProperty(y)&&H!=null)switch(y){case"value":break;case"multiple":ce=H;default:u.hasOwnProperty(y)||St(n,a,y,null,u,H)}for(p in u)if(y=u[p],H=o[p],u.hasOwnProperty(p)&&(y!=null||H!=null))switch(p){case"value":le=y;break;case"defaultValue":N=y;break;case"multiple":A=y;default:y!==H&&St(n,a,p,y,u,H)}a=N,o=A,u=ce,le!=null?Fa(n,!!o,le,!1):!!u!=!!o&&(a!=null?Fa(n,!!o,a,!0):Fa(n,!!o,o?[]:"",!1));return;case"textarea":ce=le=null;for(N in o)if(p=o[N],o.hasOwnProperty(N)&&p!=null&&!u.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:St(n,a,N,null,u,p)}for(A in u)if(p=u[A],y=o[A],u.hasOwnProperty(A)&&(p!=null||y!=null))switch(A){case"value":le=p;break;case"defaultValue":ce=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==y&&St(n,a,A,p,u,y)}ed(n,le,ce);return;case"option":for(var Me in o)le=o[Me],o.hasOwnProperty(Me)&&le!=null&&!u.hasOwnProperty(Me)&&(Me==="selected"?n.selected=!1:St(n,a,Me,null,u,le));for(H in u)le=u[H],ce=o[H],u.hasOwnProperty(H)&&le!==ce&&(le!=null||ce!=null)&&(H==="selected"?n.selected=le&&typeof le!="function"&&typeof le!="symbol":St(n,a,H,le,u,ce));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 Pe in o)le=o[Pe],o.hasOwnProperty(Pe)&&le!=null&&!u.hasOwnProperty(Pe)&&St(n,a,Pe,null,u,le);for(ie in u)if(le=u[ie],ce=o[ie],u.hasOwnProperty(ie)&&le!==ce&&(le!=null||ce!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(i(137,a));break;default:St(n,a,ie,le,u,ce)}return;default:if(fu(a)){for(var wt in o)le=o[wt],o.hasOwnProperty(wt)&&le!==void 0&&!u.hasOwnProperty(wt)&&Lh(n,a,wt,void 0,u,le);for(pe in u)le=u[pe],ce=o[pe],!u.hasOwnProperty(pe)||le===ce||le===void 0&&ce===void 0||Lh(n,a,pe,le,u,ce);return}}for(var te in o)le=o[te],o.hasOwnProperty(te)&&le!=null&&!u.hasOwnProperty(te)&&St(n,a,te,null,u,le);for(ve in u)le=u[ve],ce=o[ve],!u.hasOwnProperty(ve)||le===ce||le==null&&ce==null||St(n,a,ve,le,u,ce)}function $v(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function T_(){if(typeof performance.getEntriesByType=="function"){for(var n=0,a=0,o=performance.getEntriesByType("resource"),u=0;u<o.length;u++){var p=o[u],y=p.transferSize,A=p.initiatorType,N=p.duration;if(y&&N&&$v(A)){for(A=0,N=p.responseEnd,u+=1;u<o.length;u++){var H=o[u],ie=H.startTime;if(ie>N)break;var pe=H.transferSize,ve=H.initiatorType;pe&&$v(ve)&&(H=H.responseEnd,A+=pe*(H<N?1:(N-ie)/(H-ie)))}if(--u,a+=8*(y+A)/(p.duration/1e3),n++,10<n)break}}if(0<n)return a/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Uh=null,qh=null;function sc(n){return n.nodeType===9?n:n.ownerDocument}function Pv(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Iv(n,a){if(n===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&a==="foreignObject"?0:n}function Vh(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Fh=null;function C_(){var n=window.event;return n&&n.type==="popstate"?n===Fh?!1:(Fh=n,!0):(Fh=null,!1)}var Lv=typeof setTimeout=="function"?setTimeout:void 0,O_=typeof clearTimeout=="function"?clearTimeout:void 0,Uv=typeof Promise=="function"?Promise:void 0,R_=typeof queueMicrotask=="function"?queueMicrotask:typeof Uv<"u"?function(n){return Uv.resolve(null).then(n).catch(A_)}:Lv;function A_(n){setTimeout(function(){throw n})}function si(n){return n==="head"}function qv(n,a){var o=a,u=0;do{var p=o.nextSibling;if(n.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"||o==="/&"){if(u===0){n.removeChild(p),Zo(a);return}u--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")u++;else if(o==="html")il(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,il(o);for(var y=o.firstChild;y;){var A=y.nextSibling,N=y.nodeName;y[yo]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&y.rel.toLowerCase()==="stylesheet"||o.removeChild(y),y=A}}else o==="body"&&il(n.ownerDocument.body);o=p}while(o);Zo(a)}function Vv(n,a){var o=n;n=0;do{var u=o.nextSibling;if(o.nodeType===1?a?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(a?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),u&&u.nodeType===8)if(o=u.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=u}while(o)}function Bh(n){var a=n.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Bh(o),lu(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function M_(n,a,o,u){for(;n.nodeType===1;){var p=o;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[yo])switch(a){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(y=n.getAttribute("rel"),y==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(y!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(y=n.getAttribute("src"),(y!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&y&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(a==="input"&&n.type==="hidden"){var y=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===y)return n}else return n;if(n=Sr(n.nextSibling),n===null)break}return null}function j_(n,a,o){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=Sr(n.nextSibling),n===null))return null;return n}function Fv(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=Sr(n.nextSibling),n===null))return null;return n}function Hh(n){return n.data==="$?"||n.data==="$~"}function Gh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function k_(n,a){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=a;else if(n.data!=="$?"||o.readyState!=="loading")a();else{var u=function(){a(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function Sr(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return n}var Kh=null;function Bv(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(a===0)return Sr(n.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}n=n.nextSibling}return null}function Hv(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(a===0)return n;a--}else o!=="/$"&&o!=="/&"||a++}n=n.previousSibling}return null}function Gv(n,a,o){switch(a=sc(o),n){case"html":if(n=a.documentElement,!n)throw Error(i(452));return n;case"head":if(n=a.head,!n)throw Error(i(453));return n;case"body":if(n=a.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function il(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);lu(n)}var wr=new Map,Kv=new Set;function lc(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Ra=ee.d;ee.d={f:D_,r:N_,D:z_,C:$_,L:P_,m:I_,X:U_,S:L_,M:q_};function D_(){var n=Ra.f(),a=Ju();return n||a}function N_(n){var a=$i(n);a!==null&&a.tag===5&&a.type==="form"?c0(a):Ra.r(n)}var Go=typeof document>"u"?null:document;function Yv(n,a,o){var u=Go;if(u&&typeof a=="string"&&a){var p=Qn(a);p='link[rel="'+n+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),Kv.has(p)||(Kv.add(p),n={rel:n,crossOrigin:o,href:a},u.querySelector(p)===null&&(a=u.createElement("link"),wn(a,"link",n),Jt(a),u.head.appendChild(a)))}}function z_(n){Ra.D(n),Yv("dns-prefetch",n,null)}function $_(n,a){Ra.C(n,a),Yv("preconnect",n,a)}function P_(n,a,o){Ra.L(n,a,o);var u=Go;if(u&&n&&a){var p='link[rel="preload"][as="'+Qn(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+Qn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+Qn(o.imageSizes)+'"]')):p+='[href="'+Qn(n)+'"]';var y=p;switch(a){case"style":y=Ko(n);break;case"script":y=Yo(n)}wr.has(y)||(n=g({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:n,as:a},o),wr.set(y,n),u.querySelector(p)!==null||a==="style"&&u.querySelector(ol(y))||a==="script"&&u.querySelector(sl(y))||(a=u.createElement("link"),wn(a,"link",n),Jt(a),u.head.appendChild(a)))}}function I_(n,a){Ra.m(n,a);var o=Go;if(o&&n){var u=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+Qn(u)+'"][href="'+Qn(n)+'"]',y=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Yo(n)}if(!wr.has(y)&&(n=g({rel:"modulepreload",href:n},a),wr.set(y,n),o.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(sl(y)))return}u=o.createElement("link"),wn(u,"link",n),Jt(u),o.head.appendChild(u)}}}function L_(n,a,o){Ra.S(n,a,o);var u=Go;if(u&&n){var p=Pi(u).hoistableStyles,y=Ko(n);a=a||"default";var A=p.get(y);if(!A){var N={loading:0,preload:null};if(A=u.querySelector(ol(y)))N.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":a},o),(o=wr.get(y))&&Yh(n,o);var H=A=u.createElement("link");Jt(H),wn(H,"link",n),H._p=new Promise(function(ie,pe){H.onload=ie,H.onerror=pe}),H.addEventListener("load",function(){N.loading|=1}),H.addEventListener("error",function(){N.loading|=2}),N.loading|=4,uc(A,a,u)}A={type:"stylesheet",instance:A,count:1,state:N},p.set(y,A)}}}function U_(n,a){Ra.X(n,a);var o=Go;if(o&&n){var u=Pi(o).hoistableScripts,p=Yo(n),y=u.get(p);y||(y=o.querySelector(sl(p)),y||(n=g({src:n,async:!0},a),(a=wr.get(p))&&Zh(n,a),y=o.createElement("script"),Jt(y),wn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function q_(n,a){Ra.M(n,a);var o=Go;if(o&&n){var u=Pi(o).hoistableScripts,p=Yo(n),y=u.get(p);y||(y=o.querySelector(sl(p)),y||(n=g({src:n,async:!0,type:"module"},a),(a=wr.get(p))&&Zh(n,a),y=o.createElement("script"),Jt(y),wn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function Zv(n,a,o,u){var p=(p=J.current)?lc(p):null;if(!p)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=Ko(o.href),o=Pi(p).hoistableStyles,u=o.get(a),u||(u={type:"style",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=Ko(o.href);var y=Pi(p).hoistableStyles,A=y.get(n);if(A||(p=p.ownerDocument||p,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(n,A),(y=p.querySelector(ol(n)))&&!y._p&&(A.instance=y,A.state.loading=5),wr.has(n)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},wr.set(n,o),y||V_(p,n,o,A.state))),a&&u===null)throw Error(i(528,""));return A}if(a&&u!==null)throw Error(i(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Yo(o),o=Pi(p).hoistableScripts,u=o.get(a),u||(u={type:"script",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function Ko(n){return'href="'+Qn(n)+'"'}function ol(n){return'link[rel="stylesheet"]['+n+"]"}function Xv(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function V_(n,a,o,u){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=n.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),wn(a,"link",o),Jt(a),n.head.appendChild(a))}function Yo(n){return'[src="'+Qn(n)+'"]'}function sl(n){return"script[async]"+n}function Qv(n,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var u=n.querySelector('style[data-href~="'+Qn(o.href)+'"]');if(u)return a.instance=u,Jt(u),u;var p=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),Jt(u),wn(u,"style",p),uc(u,o.precedence,n),a.instance=u;case"stylesheet":p=Ko(o.href);var y=n.querySelector(ol(p));if(y)return a.state.loading|=4,a.instance=y,Jt(y),y;u=Xv(o),(p=wr.get(p))&&Yh(u,p),y=(n.ownerDocument||n).createElement("link"),Jt(y);var A=y;return A._p=new Promise(function(N,H){A.onload=N,A.onerror=H}),wn(y,"link",u),a.state.loading|=4,uc(y,o.precedence,n),a.instance=y;case"script":return y=Yo(o.src),(p=n.querySelector(sl(y)))?(a.instance=p,Jt(p),p):(u=o,(p=wr.get(y))&&(u=g({},o),Zh(u,p)),n=n.ownerDocument||n,p=n.createElement("script"),Jt(p),wn(p,"link",u),n.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,uc(u,o.precedence,n));return a.instance}function uc(n,a,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,y=p,A=0;A<u.length;A++){var N=u[A];if(N.dataset.precedence===a)y=N;else if(y!==p)break}y?y.parentNode.insertBefore(n,y.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(n,a.firstChild))}function Yh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function Zh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var cc=null;function Wv(n,a,o){if(cc===null){var u=new Map,p=cc=new Map;p.set(o,u)}else p=cc,u=p.get(o),u||(u=new Map,p.set(o,u));if(u.has(n))return u;for(u.set(n,null),o=o.getElementsByTagName(n),p=0;p<o.length;p++){var y=o[p];if(!(y[yo]||y[cn]||n==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var A=y.getAttribute(a)||"";A=n+A;var N=u.get(A);N?N.push(y):u.set(A,[y])}}return u}function Jv(n,a,o){n=n.ownerDocument||n,n.head.insertBefore(o,a==="title"?n.querySelector("head > title"):null)}function F_(n,a,o){if(o===1||a.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(n=a.disabled,typeof a.precedence=="string"&&n==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function eb(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function B_(n,a,o,u){if(o.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=Ko(u.href),y=a.querySelector(ol(p));if(y){a=y._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=fc.bind(n),a.then(n,n)),o.state.loading|=4,o.instance=y,Jt(y);return}y=a.ownerDocument||a,u=Xv(u),(p=wr.get(p))&&Yh(u,p),y=y.createElement("link"),Jt(y);var A=y;A._p=new Promise(function(N,H){A.onload=N,A.onerror=H}),wn(y,"link",u),o.instance=y}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(n.count++,o=fc.bind(n),a.addEventListener("load",o),a.addEventListener("error",o))}}var Xh=0;function H_(n,a){return n.stylesheets&&n.count===0&&hc(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var u=setTimeout(function(){if(n.stylesheets&&hc(n,n.stylesheets),n.unsuspend){var y=n.unsuspend;n.unsuspend=null,y()}},6e4+a);0<n.imgBytes&&Xh===0&&(Xh=62500*T_());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&hc(n,n.stylesheets),n.unsuspend)){var y=n.unsuspend;n.unsuspend=null,y()}},(n.imgBytes>Xh?50:800)+a);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function fc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var dc=null;function hc(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,dc=new Map,a.forEach(G_,n),dc=null,fc.call(n))}function G_(n,a){if(!(a.state.loading&4)){var o=dc.get(n);if(o)var u=o.get(null);else{o=new Map,dc.set(n,o);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<p.length;y++){var A=p[y];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(o.set(A.dataset.precedence,A),u=A)}u&&o.set(null,u)}p=a.instance,A=p.getAttribute("data-precedence"),y=o.get(A)||u,y===u&&o.set(null,p),o.set(A,p),this.count++,u=fc.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),y?y.parentNode.insertBefore(p,y.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),a.state.loading|=4}}var ll={$$typeof:R,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function K_(n,a,o,u,p,y,A,N,H){this.tag=1,this.containerInfo=n,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=qa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qa(0),this.hiddenUpdates=qa(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=y,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function tb(n,a,o,u,p,y,A,N,H,ie,pe,ve){return n=new K_(n,a,o,A,H,ie,pe,ve,N),a=1,y===!0&&(a|=24),y=Dn(3,null,null,a),n.current=y,y.stateNode=n,a=Ad(),a.refCount++,n.pooledCache=a,a.refCount++,y.memoizedState={element:u,isDehydrated:o,cache:a},Dd(y),n}function nb(n){return n?(n=Wn,n):Wn}function rb(n,a,o,u,p,y){p=nb(p),u.context===null?u.context=p:u.pendingContext=p,u=Xa(a),u.payload={element:o},y=y===void 0?null:y,y!==null&&(u.callback=y),o=Qa(n,u,a),o!==null&&(Kn(o,n,a),Us(o,n,a))}function ab(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<a?o:a}}function Qh(n,a){ab(n,a),(n=n.alternate)&&ab(n,a)}function ib(n){if(n.tag===13||n.tag===31){var a=Dr(n,67108864);a!==null&&Kn(a,n,67108864),Qh(n,67108864)}}function ob(n){if(n.tag===13||n.tag===31){var a=or();a=jn(a);var o=Dr(n,a);o!==null&&Kn(o,n,a),Qh(n,a)}}var pc=!0;function Y_(n,a,o,u){var p=K.T;K.T=null;var y=ee.p;try{ee.p=2,Wh(n,a,o,u)}finally{ee.p=y,K.T=p}}function Z_(n,a,o,u){var p=K.T;K.T=null;var y=ee.p;try{ee.p=8,Wh(n,a,o,u)}finally{ee.p=y,K.T=p}}function Wh(n,a,o,u){if(pc){var p=Jh(u);if(p===null)Ih(n,a,u,mc,o),lb(n,u);else if(Q_(p,n,a,o,u))u.stopPropagation();else if(lb(n,u),a&4&&-1<X_.indexOf(n)){for(;p!==null;){var y=$i(p);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var A=Vn(y.pendingLanes);if(A!==0){var N=y;for(N.pendingLanes|=2,N.entangledLanes|=2;A;){var H=1<<31-Pt(A);N.entanglements[1]|=H,A&=~H}ta(y),(dt&6)===0&&(Qu=qe()+500,nl(0))}}break;case 31:case 13:N=Dr(y,2),N!==null&&Kn(N,y,2),Ju(),Qh(y,2)}if(y=Jh(u),y===null&&Ih(n,a,u,mc,o),y===p)break;p=y}p!==null&&u.stopPropagation()}else Ih(n,a,u,null,o)}}function Jh(n){return n=hu(n),ep(n)}var mc=null;function ep(n){if(mc=null,n=zi(n),n!==null){var a=l(n);if(a===null)n=null;else{var o=a.tag;if(o===13){if(n=c(a),n!==null)return n;n=null}else if(o===31){if(n=f(a),n!==null)return n;n=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}return mc=n,null}function sb(n){switch(n){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(xn()){case yn:return 2;case zn:return 8;case Dt:case Vt:return 32;case hn:return 268435456;default:return 32}default:return 32}}var tp=!1,li=null,ui=null,ci=null,ul=new Map,cl=new Map,fi=[],X_="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 lb(n,a){switch(n){case"focusin":case"focusout":li=null;break;case"dragenter":case"dragleave":ui=null;break;case"mouseover":case"mouseout":ci=null;break;case"pointerover":case"pointerout":ul.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":cl.delete(a.pointerId)}}function fl(n,a,o,u,p,y){return n===null||n.nativeEvent!==y?(n={blockedOn:a,domEventName:o,eventSystemFlags:u,nativeEvent:y,targetContainers:[p]},a!==null&&(a=$i(a),a!==null&&ib(a)),n):(n.eventSystemFlags|=u,a=n.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),n)}function Q_(n,a,o,u,p){switch(a){case"focusin":return li=fl(li,n,a,o,u,p),!0;case"dragenter":return ui=fl(ui,n,a,o,u,p),!0;case"mouseover":return ci=fl(ci,n,a,o,u,p),!0;case"pointerover":var y=p.pointerId;return ul.set(y,fl(ul.get(y)||null,n,a,o,u,p)),!0;case"gotpointercapture":return y=p.pointerId,cl.set(y,fl(cl.get(y)||null,n,a,o,u,p)),!0}return!1}function ub(n){var a=zi(n.target);if(a!==null){var o=l(a);if(o!==null){if(a=o.tag,a===13){if(a=c(o),a!==null){n.blockedOn=a,Tl(n.priority,function(){ob(o)});return}}else if(a===31){if(a=f(o),a!==null){n.blockedOn=a,Tl(n.priority,function(){ob(o)});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}function gc(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var o=Jh(n.nativeEvent);if(o===null){o=n.nativeEvent;var u=new o.constructor(o.type,o);du=u,o.target.dispatchEvent(u),du=null}else return a=$i(o),a!==null&&ib(a),n.blockedOn=o,!1;a.shift()}return!0}function cb(n,a,o){gc(n)&&o.delete(a)}function W_(){tp=!1,li!==null&&gc(li)&&(li=null),ui!==null&&gc(ui)&&(ui=null),ci!==null&&gc(ci)&&(ci=null),ul.forEach(cb),cl.forEach(cb)}function yc(n,a){n.blockedOn===a&&(n.blockedOn=null,tp||(tp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,W_)))}var vc=null;function fb(n){vc!==n&&(vc=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){vc===n&&(vc=null);for(var a=0;a<n.length;a+=3){var o=n[a],u=n[a+1],p=n[a+2];if(typeof u!="function"){if(ep(u||o)===null)continue;break}var y=$i(o);y!==null&&(n.splice(a,3),a-=3,Jd(y,{pending:!0,data:p,method:o.method,action:u},u,p))}}))}function Zo(n){function a(H){return yc(H,n)}li!==null&&yc(li,n),ui!==null&&yc(ui,n),ci!==null&&yc(ci,n),ul.forEach(a),cl.forEach(a);for(var o=0;o<fi.length;o++){var u=fi[o];u.blockedOn===n&&(u.blockedOn=null)}for(;0<fi.length&&(o=fi[0],o.blockedOn===null);)ub(o),o.blockedOn===null&&fi.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var p=o[u],y=o[u+1],A=p[_n]||null;if(typeof y=="function")A||fb(o);else if(A){var N=null;if(y&&y.hasAttribute("formAction")){if(p=y,A=y[_n]||null)N=A.formAction;else if(ep(p)!==null)continue}else N=A.action;typeof N=="function"?o[u+1]=N:(o.splice(u,3),u-=3),fb(o)}}}function db(){function n(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(A){return p=A})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),u||setTimeout(o,20)}function o(){if(!u&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function np(n){this._internalRoot=n}bc.prototype.render=np.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(i(409));var o=a.current,u=or();rb(o,u,n,a,null,null)},bc.prototype.unmount=np.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;rb(n.current,2,null,n,null,null),Ju(),a[Ni]=null}};function bc(n){this._internalRoot=n}bc.prototype.unstable_scheduleHydration=function(n){if(n){var a=Cs();n={blockedOn:null,target:n,priority:a};for(var o=0;o<fi.length&&a!==0&&a<fi[o].priority;o++);fi.splice(o,0,n),o===0&&ub(n)}};var hb=t.version;if(hb!=="19.2.4")throw Error(i(527,hb,"19.2.4"));ee.findDOMNode=function(n){var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=h(a),n=n!==null?m(n):null,n=n===null?null:n.stateNode,n};var J_={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:K,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Sc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sc.isDisabled&&Sc.supportsFiber)try{kr=Sc.inject(J_),Ht=Sc}catch{}}return mb.createRoot=function(n,a){if(!s(n))throw Error(i(299));var o=!1,u="",p=S0,y=w0,A=E0;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(A=a.onRecoverableError)),a=tb(n,1,!1,null,null,o,u,null,p,y,A,db),n[Ni]=a.current,Ph(n),new np(a)},mb.hydrateRoot=function(n,a,o){if(!s(n))throw Error(i(299));var u=!1,p="",y=S0,A=w0,N=E0,H=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(A=o.onCaughtError),o.onRecoverableError!==void 0&&(N=o.onRecoverableError),o.formState!==void 0&&(H=o.formState)),a=tb(n,1,!0,a,o??null,u,p,H,y,A,N,db),a.context=nb(null),o=a.current,u=or(),u=jn(u),p=Xa(u),p.callback=null,Qa(o,p,u),o=u,a.current.lanes=o,aa(a,o),ta(a),n[Ni]=a.current,Ph(n),new bc(a)},mb.version="19.2.4",mb}var b5;function Nq(){if(b5)return r2.exports;b5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),r2.exports=Dq(),r2.exports}var zq=Nq(),Tg=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},$q={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Pq=class{#e=$q;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},gp=new Pq;function Iq(e){setTimeout(e,0)}var Tp=typeof window>"u"||"Deno"in globalThis;function no(){}function Lq(e,t){return typeof e=="function"?e(t):e}function rC(e){return typeof e=="number"&&e>=0&&e!==1/0}function bz(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pf(e,t){return typeof e=="function"?e(t):e}function ds(e,t){return typeof e=="function"?e(t):e}function S5(e,t){const{type:r="all",exact:i,fetchStatus:s,predicate:l,queryKey:c,stale:f}=e;if(c){if(i){if(t.queryHash!==WO(c,t.options))return!1}else if(!n1(t.queryKey,c))return!1}if(r!=="all"){const d=t.isActive();if(r==="active"&&!d||r==="inactive"&&d)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||s&&s!==t.state.fetchStatus||l&&!l(t))}function w5(e,t){const{exact:r,status:i,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(r){if(Cp(t.options.mutationKey)!==Cp(l))return!1}else if(!n1(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function WO(e,t){return(t?.queryKeyHashFn||Cp)(e)}function Cp(e){return JSON.stringify(e,(t,r)=>aC(r)?Object.keys(r).sort().reduce((i,s)=>(i[s]=r[s],i),{}):r)}function n1(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>n1(e[r],t[r])):!1}var Uq=Object.prototype.hasOwnProperty;function Sz(e,t,r=0){if(e===t)return e;if(r>500)return t;const i=E5(e)&&E5(t);if(!i&&!(aC(e)&&aC(t)))return t;const l=(i?e:Object.keys(e)).length,c=i?t:Object.keys(t),f=c.length,d=i?new Array(f):{};let h=0;for(let m=0;m<f;m++){const g=i?m:c[m],v=e[g],_=t[g];if(v===_){d[g]=v,(i?m<l:Uq.call(e,g))&&h++;continue}if(v===null||_===null||typeof v!="object"||typeof _!="object"){d[g]=_;continue}const b=Sz(v,_,r+1);d[g]=b,b===v&&h++}return l===f&&h===l?e:d}function Jw(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function E5(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function aC(e){if(!x5(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!x5(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function x5(e){return Object.prototype.toString.call(e)==="[object Object]"}function qq(e){return new Promise(t=>{gp.setTimeout(t,e)})}function iC(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Sz(e,t):t}function Vq(e,t,r=0){const i=[...e,t];return r&&i.length>r?i.slice(1):i}function Fq(e,t,r=0){const i=[t,...e];return r&&i.length>r?i.slice(0,-1):i}var JO=Symbol();function wz(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===JO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function eR(e,t){return typeof e=="function"?e(...t):!!e}function Bq(e,t,r){let i=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),i||(i=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),e}var Hq=class extends Tg{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Tp&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},tR=new Hq;function oC(){let e,t;const r=new Promise((s,l)=>{e=s,t=l});r.status="pending",r.catch(()=>{});function i(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{i({status:"fulfilled",value:s}),e(s)},r.reject=s=>{i({status:"rejected",reason:s}),t(s)},r}var Gq=Iq;function Kq(){let e=[],t=0,r=f=>{f()},i=f=>{f()},s=Gq;const l=f=>{t?e.push(f):s(()=>{r(f)})},c=()=>{const f=e;e=[],f.length&&s(()=>{i(()=>{f.forEach(d=>{r(d)})})})};return{batch:f=>{let d;t++;try{d=f()}finally{t--,t||c()}return d},batchCalls:f=>(...d)=>{l(()=>{f(...d)})},schedule:l,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{s=f}}}var ja=Kq(),Yq=class extends Tg{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Tp&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},eE=new Yq;function Zq(e){return Math.min(1e3*2**e,3e4)}function Ez(e){return(e??"online")==="online"?eE.isOnline():!0}var sC=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function xz(e){let t=!1,r=0,i;const s=oC(),l=()=>s.status!=="pending",c=S=>{if(!l()){const w=new sC(S);v(w),e.onCancel?.(w)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>tR.isFocused()&&(e.networkMode==="always"||eE.isOnline())&&e.canRun(),m=()=>Ez(e.networkMode)&&e.canRun(),g=S=>{l()||(i?.(),s.resolve(S))},v=S=>{l()||(i?.(),s.reject(S))},_=()=>new Promise(S=>{i=w=>{(l()||h())&&S(w)},e.onPause?.()}).then(()=>{i=void 0,l()||e.onContinue?.()}),b=()=>{if(l())return;let S;const w=r===0?e.initialPromise:void 0;try{S=w??e.fn()}catch(x){S=Promise.reject(x)}Promise.resolve(S).then(g).catch(x=>{if(l())return;const E=e.retry??(Tp?0:3),R=e.retryDelay??Zq,T=typeof R=="function"?R(r,x):R,C=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,x);if(t||!C){v(x);return}r++,e.onFail?.(r,x),qq(T).then(()=>h()?void 0:_()).then(()=>{t?v(x):b()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(i?.(),s),cancelRetry:f,continueRetry:d,canStart:m,start:()=>(m()?b():_().then(b),s)}}var _z=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rC(this.gcTime)&&(this.#e=gp.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Tp?1/0:300*1e3))}clearGcTimeout(){this.#e&&(gp.clearTimeout(this.#e),this.#e=void 0)}},Xq=class extends _z{#e;#t;#n;#a;#r;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=T5(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=T5(this.options);t.data!==void 0&&(this.setState(_5(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const r=iC(this.state.data,e,this.options);return this.#i({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(no).catch(no):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>ds(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===JO||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>pf(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!bz(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#s?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(d=>d.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#s=!0,r.signal)})},s=()=>{const f=wz(this.options,t),h=(()=>{const m={client:this.#a,queryKey:this.queryKey,meta:this.meta};return i(m),m})();return this.#s=!1,this.options.persister?this.options.persister(f,h,this):f(h)},c=(()=>{const f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:s};return i(f),f})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#i({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=xz({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:f=>{f instanceof sC&&f.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(f,d)=>{this.#i({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#n.config.onSuccess?.(f,this),this.#n.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof sC){if(f.silent)return this.#r.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#i({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#i(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Tz(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,..._5(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;case"error":const s=e.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),ja.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Tz(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ez(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _5(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function T5(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,i=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Qq=class extends Tg{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#s=oC(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#o;#s;#i;#m;#d;#h;#u;#c;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),C5(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return lC(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return lC(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ds(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#t.setOptions(this.options),t._defaulted&&!Jw(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&O5(this.#t,r,this.options,t)&&this.#f(),this.updateResult(),i&&(this.#t!==r||ds(this.options.enabled,this.#t)!==ds(t.enabled,this.#t)||pf(this.options.staleTime,this.#t)!==pf(t.staleTime,this.#t))&&this.#g();const s=this.#y();i&&(this.#t!==r||ds(this.options.enabled,this.#t)!==ds(t.enabled,this.#t)||s!==this.#l)&&this.#v(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);return Jq(this,r)&&(this.#a=r,this.#o=this.options,this.#r=this.#t.state),r}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(r,i)=>(this.trackProp(i),t?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#f(e){this.#E();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(no)),t}#g(){this.#S();const e=pf(this.options.staleTime,this.#t);if(Tp||this.#a.isStale||!rC(e))return;const r=bz(this.#a.dataUpdatedAt,e)+1;this.#u=gp.setTimeout(()=>{this.#a.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#l=e,!(Tp||ds(this.options.enabled,this.#t)===!1||!rC(this.#l)||this.#l===0)&&(this.#c=gp.setInterval(()=>{(this.options.refetchIntervalInBackground||tR.isFocused())&&this.#f()},this.#l))}#b(){this.#g(),this.#v(this.#y())}#S(){this.#u&&(gp.clearTimeout(this.#u),this.#u=void 0)}#w(){this.#c&&(gp.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const r=this.#t,i=this.options,s=this.#a,l=this.#r,c=this.#o,d=e!==r?e.state:this.#n,{state:h}=e;let m={...h},g=!1,v;if(t._optimisticResults){const D=this.hasListeners(),U=!D&&C5(e,t),B=D&&O5(e,r,t,i);(U||B)&&(m={...m,...Tz(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:_,errorUpdatedAt:b,status:S}=m;v=m.data;let w=!1;if(t.placeholderData!==void 0&&v===void 0&&S==="pending"){let D;s?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(D=s.data,w=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(S="success",v=iC(s?.data,D,t),g=!0)}if(t.select&&v!==void 0&&!w)if(s&&v===l?.data&&t.select===this.#m)v=this.#d;else try{this.#m=t.select,v=t.select(v),v=iC(s?.data,v,t),this.#d=v,this.#i=null}catch(D){this.#i=D}this.#i&&(_=this.#i,v=this.#d,b=Date.now(),S="error");const x=m.fetchStatus==="fetching",E=S==="pending",R=S==="error",T=E&&x,C=v!==void 0,M={status:S,fetchStatus:m.fetchStatus,isPending:E,isSuccess:S==="success",isError:R,isInitialLoading:T,isLoading:T,data:v,dataUpdatedAt:m.dataUpdatedAt,error:_,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:x,isRefetching:x&&!E,isLoadingError:R&&!C,isPaused:m.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:R&&C,isStale:nR(e,t),refetch:this.refetch,promise:this.#s,isEnabled:ds(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=M.data!==void 0,U=M.status==="error"&&!D,B=G=>{U?G.reject(M.error):D&&G.resolve(M.data)},q=()=>{const G=this.#s=M.promise=oC();B(G)},V=this.#s;switch(V.status){case"pending":e.queryHash===r.queryHash&&B(V);break;case"fulfilled":(U||M.data!==V.value)&&q();break;case"rejected":(!U||M.error!==V.reason)&&q();break}}return M}updateResult(){const e=this.#a,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#o=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Jw(t,e))return;this.#a=t;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!this.#p.size)return!0;const l=new Set(s??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#a).some(c=>{const f=c;return this.#a[f]!==e[f]&&l.has(f)})};this.#x({listeners:r()})}#E(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#x(e){ja.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Wq(e,t){return ds(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function C5(e,t){return Wq(e,t)||e.state.data!==void 0&&lC(e,t,t.refetchOnMount)}function lC(e,t,r){if(ds(t.enabled,e)!==!1&&pf(t.staleTime,e)!=="static"){const i=typeof r=="function"?r(e):r;return i==="always"||i!==!1&&nR(e,t)}return!1}function O5(e,t,r,i){return(e!==t||ds(i.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&nR(e,r)}function nR(e,t){return ds(t.enabled,e)!==!1&&e.isStaleByTime(pf(t.staleTime,e))}function Jq(e,t){return!Jw(e.getCurrentResult(),t)}function R5(e){return{onFetch:(t,r)=>{const i=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let m=!1;const g=b=>{Bq(b,()=>t.signal,()=>m=!0)},v=wz(t.options,t.fetchOptions),_=async(b,S,w)=>{if(m)return Promise.reject();if(S==null&&b.pages.length)return Promise.resolve(b);const E=(()=>{const O={client:t.client,queryKey:t.queryKey,pageParam:S,direction:w?"backward":"forward",meta:t.options.meta};return g(O),O})(),R=await v(E),{maxPages:T}=t.options,C=w?Fq:Vq;return{pages:C(b.pages,R,T),pageParams:C(b.pageParams,S,T)}};if(s&&l.length){const b=s==="backward",S=b?eV:A5,w={pages:l,pageParams:c},x=S(i,w);f=await _(w,x,b)}else{const b=e??l.length;do{const S=d===0?c[0]??i.initialPageParam:A5(i,f);if(d>0&&S==null)break;f=await _(f,S),d++}while(d<b)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=h}}}function A5(e,{pages:t,pageParams:r}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,r[i],r):void 0}function eV(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var tV=class extends _z{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Cz(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=xz({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(l,c)=>{this.#r({type:"failed",failureCount:l,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",s=!this.#a.canStart();try{if(i)t();else{this.#r({type:"pending",variables:e,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);const c=await this.options.onMutate?.(e,r);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:s})}const l=await this.#a.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,r),await this.options.onSuccess?.(l,e,this.state.context,r),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(l,null,e,this.state.context,r),this.#r({type:"success",data:l}),l}catch(l){try{await this.#n.config.onError?.(l,e,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onError?.(l,e,this.state.context,r)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,r)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:l}),l}finally{this.#n.runNext(this)}}#r(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),ja.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Cz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var nV=class extends Tg{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,r){const i=new tV({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(i),i}add(e){this.#e.add(e);const t=cS(e);if(typeof t=="string"){const r=this.#t.get(t);r?r.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=cS(e);if(typeof t=="string"){const r=this.#t.get(t);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=cS(e);if(typeof t=="string"){const i=this.#t.get(t)?.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=cS(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){ja.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>w5(t,r))}findAll(e={}){return this.getAll().filter(t=>w5(e,t))}notify(e){ja.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return ja.batch(()=>Promise.all(e.map(t=>t.continue().catch(no))))}};function cS(e){return e.options.scope?.id}var rV=class extends Tg{#e;#t=void 0;#n;#a;constructor(t,r){super(),this.#e=t,this.setOptions(r),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const r=this.options;this.options=this.#e.defaultMutationOptions(t),Jw(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&Cp(r.mutationKey)!==Cp(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#o()}mutate(t,r){return this.#a=r,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??Cz();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){ja.batch(()=>{if(this.#a&&this.hasListeners()){const r=this.#t.variables,i=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#a.onSuccess?.(t.data,r,i,s)}catch(l){Promise.reject(l)}try{this.#a.onSettled?.(t.data,null,r,i,s)}catch(l){Promise.reject(l)}}else if(t?.type==="error"){try{this.#a.onError?.(t.error,r,i,s)}catch(l){Promise.reject(l)}try{this.#a.onSettled?.(void 0,t.error,r,i,s)}catch(l){Promise.reject(l)}}}this.listeners.forEach(r=>{r(this.#t)})})}},aV=class extends Tg{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const i=t.queryKey,s=t.queryHash??WO(i,t);let l=this.get(s);return l||(l=new Xq({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ja.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>S5(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>S5(e,r)):t}notify(e){ja.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ja.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ja.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},iV=class{#e;#t;#n;#a;#r;#o;#s;#i;constructor(e={}){this.#e=e.queryCache||new aV,this.#t=e.mutationCache||new nV,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#s=tR.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=eE.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#s?.(),this.#s=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#e.build(this,t),i=r.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(pf(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const i=r.data;return[t,i]})}setQueryData(e,t,r){const i=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(i.queryHash)?.state.data,c=Lq(t,l);if(c!==void 0)return this.#e.build(this,i).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return ja.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;ja.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return ja.batch(()=>(r.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},i=ja.batch(()=>this.#e.findAll(e).map(s=>s.cancel(r)));return Promise.all(i).then(no).catch(no)}invalidateQueries(e,t={}){return ja.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},i=ja.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let l=s.fetch(void 0,r);return r.throwOnError||(l=l.catch(no)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(no)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime(pf(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(no).catch(no)}fetchInfiniteQuery(e){return e.behavior=R5(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(no).catch(no)}ensureInfiniteQueryData(e){return e.behavior=R5(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return eE.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#a.set(Cp(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#a.values()],r={};return t.forEach(i=>{n1(e,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(e,t){this.#r.set(Cp(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(i=>{n1(e,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=WO(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===JO&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Oz=j.createContext(void 0),Rz=e=>{const t=j.useContext(Oz);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},oV=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),k.jsx(Oz.Provider,{value:e,children:t})),Az=j.createContext(!1),sV=()=>j.useContext(Az);Az.Provider;function lV(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var uV=j.createContext(lV()),cV=()=>j.useContext(uV),fV=(e,t,r)=>{const i=r?.state.error&&typeof e.throwOnError=="function"?eR(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},dV=e=>{j.useEffect(()=>{e.clearReset()},[e])},hV=({result:e,errorResetBoundary:t,throwOnError:r,query:i,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(s&&e.data===void 0||eR(r,[e.error,i])),pV=(e,t)=>t.state.data===void 0,mV=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...s)=>r(i(...s)):r(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},gV=(e,t)=>e.isLoading&&e.isFetching&&!t,yV=(e,t)=>e?.suspense&&t.isPending,M5=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function vV(e,t,r){const i=sV(),s=cV(),l=Rz(),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const f=l.getQueryCache().get(c.queryHash);c._optimisticResults=i?"isRestoring":"optimistic",mV(c),fV(c,s,f),dV(s);const d=!l.getQueryCache().get(c.queryHash),[h]=j.useState(()=>new t(l,c)),m=h.getOptimisticResult(c),g=!i&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(v=>{const _=g?h.subscribe(ja.batchCalls(v)):no;return h.updateResult(),_},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),j.useEffect(()=>{h.setOptions(c)},[c,h]),yV(c,m))throw M5(c,h,s);if(hV({result:m,errorResetBoundary:s,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw m.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(c,m),c.experimental_prefetchInRender&&!Tp&&gV(m,i)&&(d?M5(c,h,s):f?.promise)?.catch(no).finally(()=>{h.updateResult()}),c.notifyOnChangeProps?m:h.trackResult(m)}function Mz(e,t){return vV({...e,enabled:!0,suspense:!0,throwOnError:pV,placeholderData:void 0},Qq)}function bV(e,t){const r=Rz(),[i]=j.useState(()=>new rV(r,e));j.useEffect(()=>{i.setOptions(e)},[i,e]);const s=j.useSyncExternalStore(j.useCallback(c=>i.subscribe(ja.batchCalls(c)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=j.useCallback((c,f)=>{i.mutate(c,f).catch(no)},[i]);if(s.error&&eR(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}var SV={};const rR=xV();function Ar(e,...t){if(!rR)return;const r=EV(e,...t);performance.mark(r);try{console.log(e,...t)}catch{console.log(r)}}function wV(e,...t){rR&&console.warn(e,...t)}function EV(e,...t){return e.replace(/%[sfdO]/g,r=>{const i=t.shift();return r==="%O"&&i?JSON.stringify(i).replace(/"([^"]+)":/g,"$1:"):String(i)})}function xV(){if(typeof window>"u")return(SV.DEBUG||"").includes("nuqs");try{const e="nuqs-localStorage-test";if(typeof localStorage>"u")return!1;localStorage.setItem(e,e);const t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem("debug")||"").includes("nuqs")}catch{return!1}}const _V={303:"Multiple adapter contexts detected. This might happen in monorepos.",404:"nuqs requires an adapter to work with your framework.",409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:"Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.",422:"Invalid options combination: `limitUrlUpdates: debounce` should be used in SSR scenarios, with `shallow: false`",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:"Empty search params cache. Search params can't be accessed in Layouts.",501:"Search params cache already populated. Have you called `parse` twice?"};function M1(e){return`[nuqs] ${_V[e]}
|
|
10
|
+
See https://nuqs.dev/NUQS-${e}`}function TV(e){if(e.size===0)return"";const t=[];for(const[i,s]of e.entries()){const l=i.replace(/#/g,"%23").replace(/&/g,"%26").replace(/\+/g,"%2B").replace(/=/g,"%3D").replace(/\?/g,"%3F");t.push(`${l}=${CV(s)}`)}return"?"+t.join("&")}function CV(e){return e.replace(/%/g,"%25").replace(/\+/g,"%2B").replace(/ /g,"+").replace(/#/g,"%23").replace(/&/g,"%26").replace(/"/g,"%22").replace(/'/g,"%27").replace(/`/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/[\x00-\x1F]/g,t=>encodeURIComponent(t))}const Op=j.createContext({useAdapter(){throw new Error(M1(404))}});Op.displayName="NuqsAdapterContext";rR&&typeof window<"u"&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==Op&&console.error(M1(303)),window.__NuqsAdapterContext=Op);function OV(e){return({children:t,defaultOptions:r,processUrlSearchParams:i,...s})=>j.createElement(Op.Provider,{...s,value:{useAdapter:e,defaultOptions:r,processUrlSearchParams:i}},t)}function RV(e){const t=j.useContext(Op);if(!("useAdapter"in t))throw new Error(M1(404));return t.useAdapter(e)}const AV=()=>j.useContext(Op).defaultOptions,MV=()=>j.useContext(Op).processUrlSearchParams;function jV(){if(typeof window>"u"||!window.GestureEvent)return 50;try{const e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}function kV(e){return{method:"throttle",timeMs:e}}const Ib=kV(jV());function DV(e){return e===null||Array.isArray(e)&&e.length===0}function NV(e,t,r){if(typeof e=="string")r.set(t,e);else{r.delete(t);for(const i of e)r.append(t,i);r.has(t)||r.set(t,"")}return r}function aR(){const e=new Map;return{on(t,r){const i=e.get(t)||[];return i.push(r),e.set(t,i),()=>this.off(t,r)},off(t,r){const i=e.get(t);i&&e.set(t,i.filter(s=>s!==r))},emit(t,r){e.get(t)?.forEach(i=>i(r))}}}function uC(e,t,r){function i(){e(),r.removeEventListener("abort",l)}const s=setTimeout(i,t);function l(){clearTimeout(s),r.removeEventListener("abort",l)}r.addEventListener("abort",l)}function cC(){const e=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let t=()=>{},r=()=>{};return{promise:new e((i,s)=>{t=i,r=s}),resolve:t,reject:r}}function zV(e,t){let r=t;for(let i=e.length-1;i>=0;i--){const s=e[i];if(!s)continue;const l=r;r=()=>s(l)}r()}function fC(){return new URLSearchParams(location.search)}var jz=class{updateMap=new Map;options={history:"replace",scroll:!1,shallow:!0};timeMs=Ib.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:r},i=Ib.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),Ar("[nuqs gtq] Enqueueing %s=%s %O",e,t,r),this.updateMap.set(e,t),r.history==="push"&&(this.options.history="push"),r.scroll&&(this.options.scroll=!0),r.shallow===!1&&(this.options.shallow=!1),r.startTransition&&this.transitions.add(r.startTransition),(!Number.isFinite(this.timeMs)||i>this.timeMs)&&(this.timeMs=i)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=fC}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=fC,rateLimitFactor:t=1,...r},i){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return Ar("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=cC();const s=()=>{this.lastFlushedAt=performance.now();const[c,f]=this.applyPendingUpdates({...r,autoResetQueueOnUpdate:r.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},i);f===null?(this.resolvers.resolve(c),this.resetQueueOnNextPush=!0):this.resolvers.reject(c),this.resolvers=null};return uC(()=>{const c=performance.now()-this.lastFlushedAt,f=this.timeMs,d=t*Math.max(0,f-c);Ar("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",d,f,t),d===0?s():uC(s,d,this.controller.signal)},0,this.controller.signal),this.resolvers.promise}abort(){return this.controller?.abort(),this.controller=new AbortController,this.resolvers?.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){const e=Array.from(this.updateMap.keys());return Ar("[nuqs gtq] Resetting queue %s",JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:"replace",scroll:!1,shallow:!0},this.timeMs=Ib.timeMs,e}applyPendingUpdates(e,t){const{updateUrl:r,getSearchParamsSnapshot:i}=e;let s=i();if(Ar("[nuqs gtq] Applying %d pending update(s) on top of %s",this.updateMap.size,s.toString()),this.updateMap.size===0)return[s,null];const l=Array.from(this.updateMap.entries()),c={...this.options},f=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),Ar("[nuqs gtq] Flushing queue %O with options %O",l,c);for(const[d,h]of l)h===null?s.delete(d):s=NV(h,d,s);t&&(s=t(s));try{return zV(f,()=>{r(s,c)}),[s,null]}catch(d){return console.error(M1(429),l.map(([h])=>h).join(),d),[s,d]}}};const Aw=new jz;function $V(e,t,r){const i=j.useCallback(()=>{const l=Object.fromEntries(e.map(c=>[c,r(c)]));return[JSON.stringify(l),l]},[e.join(","),r]),s=j.useRef(null);return s.current===null&&(s.current=i()),j.useSyncExternalStore(j.useCallback(l=>{const c=e.map(f=>t(f,l));return()=>c.forEach(f=>f())},[e.join(","),t]),()=>{const[l,c]=i();return s.current[0]===l?s.current[1]:(s.current=[l,c],c)},()=>s.current[1])}var PV=class{callback;resolvers=cC();controller=new AbortController;queuedValue=void 0;constructor(e){this.callback=e}abort(){this.controller.abort(),this.queuedValue=void 0}push(e,t){return this.queuedValue=e,this.controller.abort(),this.controller=new AbortController,uC(()=>{const r=this.resolvers;try{Ar("[nuqs dq] Flushing debounce queue",e);const i=this.callback(e);Ar("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=cC(),i.then(s=>r.resolve(s)).catch(s=>r.reject(s))}catch(i){this.queuedValue=void 0,r.reject(i)}},t,this.controller.signal),this.resolvers.promise}},IV=class{throttleQueue;queues=new Map;queuedQuerySync=aR();constructor(e=new jz){this.throttleQueue=e}useQueuedQueries(e){return $V(e,(t,r)=>this.queuedQuerySync.on(t,r),t=>this.getQueuedQuery(t))}push(e,t,r,i){if(!Number.isFinite(t)){const c=r.getSearchParamsSnapshot??fC;return Promise.resolve(c())}const s=e.key;if(!this.queues.has(s)){Ar("[nuqs dqc] Creating debounce queue for `%s`",s);const c=new PV(f=>(this.throttleQueue.push(f),this.throttleQueue.flush(r,i).finally(()=>{this.queues.get(f.key)?.queuedValue===void 0&&(Ar("[nuqs dqc] Cleaning up empty queue for `%s`",f.key),this.queues.delete(f.key)),this.queuedQuerySync.emit(f.key)})));this.queues.set(s,c)}Ar("[nuqs dqc] Enqueueing debounce update %O",e);const l=this.queues.get(s).push(e,t);return this.queuedQuerySync.emit(s),l}abort(e){const t=this.queues.get(e);return t?(Ar("[nuqs dqc] Aborting debounce queue %s=%s",e,t.queuedValue?.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),r=>(r.then(t.resolvers.resolve,t.resolvers.reject),r)):r=>r}abortAll(){for(const[e,t]of this.queues.entries())Ar("[nuqs dqc] Aborting debounce queue %s=%s",e,t.queuedValue?.query),t.abort(),t.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(e);this.queues.clear()}getQueuedQuery(e){const t=this.queues.get(e)?.queuedValue?.query;return t!==void 0?t:this.throttleQueue.getQueuedQuery(e)}};const s2=new IV(Aw);function kz(e,t){return e===t?!0:e===null||t===null||typeof e=="string"||typeof t=="string"||e.length!==t.length?!1:e.every((r,i)=>r===t[i])}function j5(e,t,r){return i=>{if(!(t.length===0||t.some(l=>!kz(i.getAll(l),e.getAll(l)))))return Ar("[nuqs `%s`] no change, returning previous",t.join(","),i),i;const s=Dz(e,t,r);return Ar("[nuqs `%s`] subbed search params change\n from %O\n to %O",t.join(","),i,s),s}}function Dz(e,t,r){if(t.length===0)return e;const i=r?new URLSearchParams(e):e;for(const s of e.keys())t.includes(s)||i.delete(s);return i}const LV="__nuqs__",dC=aR();function UV(e){return function(r,i){const s=new URL(location.href);s.search=TV(r),Ar("[nuqs react] Updating url: %s",s),e&&i.shallow===!1?(i.history==="push"?location.assign:location.replace).call(location,s):(i.history==="push"?history.pushState:history.replaceState).call(history,history.state,LV,s),dC.emit("update",r),i.scroll===!0&&window.scrollTo({top:0})}}const Nz=j.createContext({fullPageNavigationOnShallowFalseUpdates:!1});function qV(e){const{fullPageNavigationOnShallowFalseUpdates:t}=j.useContext(Nz),[r,i]=j.useState(()=>typeof location>"u"?new URLSearchParams:Dz(new URLSearchParams(location.search),e,!1));return j.useEffect(()=>{const s=()=>{i(j5(new URLSearchParams(location.search),e,!1))},l=c=>{i(j5(c,e,!0))};return dC.on("update",l),window.addEventListener("popstate",s),()=>{dC.off("update",l),window.removeEventListener("popstate",s)}},[e.join("&")]),{searchParams:r,updateUrl:j.useMemo(()=>UV(t),[t])}}const VV=OV(qV);function FV({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...r}){return j.createElement(Nz.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},j.createElement(VV,{...r,children:e}))}const zz=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim();const BV=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const HV=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase());const k5=e=>{const t=HV(e);return t.charAt(0).toUpperCase()+t.slice(1)};var GV={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 KV=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const YV=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:c,...f},d)=>j.createElement("svg",{ref:d,...GV,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:zz("lucide",s),...!l&&!KV(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,m])=>j.createElement(h,m)),...Array.isArray(l)?l:[l]]));const Di=(e,t)=>{const r=j.forwardRef(({className:i,...s},l)=>j.createElement(YV,{ref:l,iconNode:t,className:zz(`lucide-${BV(k5(e))}`,`lucide-${e}`,i),...s}));return r.displayName=k5(e),r};const ZV=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],iR=Di("check",ZV);const XV=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],$z=Di("chevron-down",XV);const QV=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],WV=Di("chevron-up",QV);const JV=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],eF=Di("chevrons-up-down",JV);const tF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],nF=Di("circle-alert",tF);const rF=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],aF=Di("external-link",rF);const iF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],oF=Di("info",iF);const sF=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],lF=Di("loader-circle",sF);const uF=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],cF=Di("log-out",uF);const fF=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],dF=Di("moon",fF);const hF=[["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"}]],pF=Di("play",hF);const mF=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],Pz=Di("plug-zap",mF);const gF=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],yF=Di("search",gF);const vF=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],bF=Di("sun",vF);const SF=[["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"}]],wF=Di("trash",SF);const EF=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xF=Di("x",EF);function _F(e,t){const r=getComputedStyle(e),i=parseFloat(r.fontSize);return t*i}function TF(e,t){const r=getComputedStyle(e.ownerDocument.body),i=parseFloat(r.fontSize);return t*i}function CF(e){return e/100*window.innerHeight}function OF(e){return e/100*window.innerWidth}function RF(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function fS({groupSize:e,panelElement:t,styleProp:r}){let i;const[s,l]=RF(r);switch(l){case"%":{i=s/100*e;break}case"px":{i=s;break}case"rem":{i=TF(t,s);break}case"em":{i=_F(t,s);break}case"vh":{i=CF(s);break}case"vw":{i=OF(s);break}}return i}function ho(e){return parseFloat(e.toFixed(3))}function ag({group:e}){const{orientation:t,panels:r}=e;return r.reduce((i,s)=>(i+=t==="horizontal"?s.element.offsetWidth:s.element.offsetHeight,i),0)}function hC(e){const{panels:t}=e,r=ag({group:e});return r===0?t.map(i=>({groupResizeBehavior:i.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:i.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:i.panelConstraints.disabled,minSize:0,maxSize:100,panelId:i.id})):t.map(i=>{const{element:s,panelConstraints:l}=i;let c=0;if(l.collapsedSize!==void 0){const m=fS({groupSize:r,panelElement:s,styleProp:l.collapsedSize});c=ho(m/r*100)}let f;if(l.defaultSize!==void 0){const m=fS({groupSize:r,panelElement:s,styleProp:l.defaultSize});f=ho(m/r*100)}let d=0;if(l.minSize!==void 0){const m=fS({groupSize:r,panelElement:s,styleProp:l.minSize});d=ho(m/r*100)}let h=100;if(l.maxSize!==void 0){const m=fS({groupSize:r,panelElement:s,styleProp:l.maxSize});h=ho(m/r*100)}return{groupResizeBehavior:l.groupResizeBehavior,collapsedSize:c,collapsible:l.collapsible===!0,defaultSize:f,disabled:l.disabled,minSize:d,maxSize:h,panelId:i.id}})}function Jn(e,t="Assertion error"){if(!e)throw Error(t)}function pC(e,t){return Array.from(t).sort(e==="horizontal"?AF:MF)}function AF(e,t){const r=e.element.offsetLeft-t.element.offsetLeft;return r!==0?r:e.element.offsetWidth-t.element.offsetWidth}function MF(e,t){const r=e.element.offsetTop-t.element.offsetTop;return r!==0?r:e.element.offsetHeight-t.element.offsetHeight}function Iz(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Lz(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function jF({orientation:e,rects:t,targetRect:r}){const i={x:r.x+r.width/2,y:r.y+r.height/2};let s,l=Number.MAX_VALUE;for(const c of t){const{x:f,y:d}=Lz(i,c),h=e==="horizontal"?f:d;h<l&&(l=h,s=c)}return Jn(s,"No rect found"),s}let dS;function kF(){return dS===void 0&&(typeof matchMedia=="function"?dS=!!matchMedia("(pointer:coarse)").matches:dS=!1),dS}function Uz(e){const{element:t,orientation:r,panels:i,separators:s}=e,l=pC(r,Array.from(t.children).filter(Iz).map(b=>({element:b}))).map(({element:b})=>b),c=[];let f=!1,d=!1,h=-1,m=-1,g=0,v,_=[];{let b=-1;for(const S of l)S.hasAttribute("data-panel")&&(b++,S.ariaDisabled===null&&(g++,h===-1&&(h=b),m=b))}if(g>1){let b=-1;for(const S of l)if(S.hasAttribute("data-panel")){b++;const w=i.find(x=>x.element===S);if(w){if(v){const x=v.element.getBoundingClientRect(),E=S.getBoundingClientRect();let R;if(d){const T=r==="horizontal"?new DOMRect(x.right,x.top,0,x.height):new DOMRect(x.left,x.bottom,x.width,0),C=r==="horizontal"?new DOMRect(E.left,E.top,0,E.height):new DOMRect(E.left,E.top,E.width,0);switch(_.length){case 0:{R=[T,C];break}case 1:{const O=_[0],M=jF({orientation:r,rects:[x,E],targetRect:O.element.getBoundingClientRect()});R=[O,M===x?C:T];break}default:{R=_;break}}}else _.length?R=_:R=[r==="horizontal"?new DOMRect(x.right,E.top,E.left-x.right,E.height):new DOMRect(E.left,x.bottom,E.width,E.top-x.bottom)];for(const T of R){let C="width"in T?T:T.element.getBoundingClientRect();const O=kF()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(C.width<O){const D=O-C.width;C=new DOMRect(C.x-D/2,C.y,C.width+D,C.height)}if(C.height<O){const D=O-C.height;C=new DOMRect(C.x,C.y-D/2,C.width,C.height+D)}const M=b<=h||b>m;!f&&!M&&c.push({group:e,groupSize:ag({group:e}),panels:[v,w],separator:"width"in T?void 0:T,rect:C}),f=!1}}d=!1,v=w,_=[]}}else if(S.hasAttribute("data-separator")){S.ariaDisabled!==null&&(f=!0);const w=s.find(x=>x.element===S);w?_.push(w):(v=void 0,_=[])}else d=!0}return c}class qz{#e={};addListener(t,r){const i=this.#e[t];return i===void 0?this.#e[t]=[r]:i.includes(r)||i.push(r),()=>{this.removeListener(t,r)}}emit(t,r){const i=this.#e[t];if(i!==void 0)if(i.length===1)i[0].call(null,r);else{let s=!1,l=null;const c=Array.from(i);for(let f=0;f<c.length;f++){const d=c[f];try{d.call(null,r)}catch(h){l===null&&(s=!0,l=h)}}if(s)throw l}}removeAllListeners(){this.#e={}}removeListener(t,r){const i=this.#e[t];if(i!==void 0){const s=i.indexOf(r);s>=0&&i.splice(s,1)}}}let Fl=new Map;const Vz=new qz;function DF(e){Fl=new Map(Fl),Fl.delete(e)}function D5(e,t){for(const[r]of Fl)if(r.id===e)return r}function mf(e,t){for(const[r,i]of Fl)if(r.id===e)return i;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Up(){return Fl}function oR(e,t){return Vz.addListener("groupChange",r=>{r.group.id===e&&t(r)})}function kc(e,t){const r=Fl.get(e);Fl=new Map(Fl),Fl.set(e,t),Vz.emit("groupChange",{group:e,prev:r,next:t})}function NF(e,t,r){let i,s={x:1/0,y:1/0};for(const l of t){const c=Lz(r,l.rect);switch(e){case"horizontal":{c.x<=s.x&&(i=l,s=c);break}case"vertical":{c.y<=s.y&&(i=l,s=c);break}}}return i?{distance:s,hitRegion:i}:void 0}function zF(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function $F(e,t){if(e===t)throw new Error("Cannot compare node with itself");const r={a:$5(e),b:$5(t)};let i;for(;r.a.at(-1)===r.b.at(-1);)i=r.a.pop(),r.b.pop();Jn(i,"Stacking order can only be calculated for elements with a common ancestor");const s={a:z5(N5(r.a)),b:z5(N5(r.b))};if(s.a===s.b){const l=i.childNodes,c={a:r.a.at(-1),b:r.b.at(-1)};let f=l.length;for(;f--;){const d=l[f];if(d===c.a)return 1;if(d===c.b)return-1}}return Math.sign(s.a-s.b)}const PF=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function IF(e){const t=getComputedStyle(Fz(e)??e).display;return t==="flex"||t==="inline-flex"}function LF(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||IF(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||PF.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function N5(e){let t=e.length;for(;t--;){const r=e[t];if(Jn(r,"Missing node"),LF(r))return r}return null}function z5(e){return e&&Number(getComputedStyle(e).zIndex)||0}function $5(e){const t=[];for(;e;)t.push(e),e=Fz(e);return t}function Fz(e){const{parentNode:t}=e;return zF(t)?t.host:t}function UF(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function qF({groupElement:e,hitRegion:t,pointerEventTarget:r}){if(!Iz(r)||r.contains(e)||e.contains(r))return!0;if($F(r,e)>0){let i=r;for(;i;){if(i.contains(e))return!0;if(UF(i.getBoundingClientRect(),t))return!1;i=i.parentElement}}return!0}function sR(e,t){const r=[];return t.forEach((i,s)=>{if(s.disabled)return;const l=Uz(s),c=NF(s.orientation,l,{x:e.clientX,y:e.clientY});c&&c.distance.x<=0&&c.distance.y<=0&&qF({groupElement:s.element,hitRegion:c.hitRegion.rect,pointerEventTarget:e.target})&&r.push(c.hitRegion)}),r}function VF(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}function ro(e,t,r=0){return Math.abs(ho(e)-ho(t))<=r}function Il(e,t){return ro(e,t)?0:e>t?1:-1}function jm({overrideDisabledPanels:e,panelConstraints:t,prevSize:r,size:i}){const{collapsedSize:s=0,collapsible:l,disabled:c,maxSize:f=100,minSize:d=0}=t;if(c&&!e)return r;if(Il(i,d)<0)if(l){const h=(s+d)/2;Il(i,h)<0?i=s:i=d}else i=d;return i=Math.min(f,i),i=ho(i),i}function r1({delta:e,initialLayout:t,panelConstraints:r,pivotIndices:i,prevLayout:s,trigger:l}){if(ro(e,0))return t;const c=l==="imperative-api",f=Object.values(t),d=Object.values(s),h=[...f],[m,g]=i;Jn(m!=null,"Invalid first pivot index"),Jn(g!=null,"Invalid second pivot index");let v=0;switch(l){case"keyboard":{{const S=e<0?g:m,w=r[S];Jn(w,`Panel constraints not found for index ${S}`);const{collapsedSize:x=0,collapsible:E,minSize:R=0}=w;if(E){const T=f[S];if(Jn(T!=null,`Previous layout not found for panel index ${S}`),ro(T,x)){const C=R-T;Il(C,Math.abs(e))>0&&(e=e<0?0-C:C)}}}{const S=e<0?m:g,w=r[S];Jn(w,`No panel constraints found for index ${S}`);const{collapsedSize:x=0,collapsible:E,minSize:R=0}=w;if(E){const T=f[S];if(Jn(T!=null,`Previous layout not found for panel index ${S}`),ro(T,R)){const C=T-x;Il(C,Math.abs(e))>0&&(e=e<0?0-C:C)}}}break}default:{const S=e<0?g:m,w=r[S];Jn(w,`Panel constraints not found for index ${S}`);const x=f[S],{collapsible:E,collapsedSize:R,minSize:T}=w;if(E&&Il(x,T)<0)if(e>0){const C=T-R,O=C/2,M=x+e;Il(M,T)<0&&(e=Il(e,O)<=0?0:C)}else{const C=T-R,O=100-C/2,M=x-e;Il(M,T)<0&&(e=Il(100+e,O)>0?0:-C)}break}}{const S=e<0?1:-1;let w=e<0?g:m,x=0;for(;;){const R=f[w];Jn(R!=null,`Previous layout not found for panel index ${w}`);const T=jm({overrideDisabledPanels:c,panelConstraints:r[w],prevSize:R,size:100})-R;if(x+=T,w+=S,w<0||w>=r.length)break}const E=Math.min(Math.abs(e),Math.abs(x));e=e<0?0-E:E}{let S=e<0?m:g;for(;S>=0&&S<r.length;){const w=Math.abs(e)-Math.abs(v),x=f[S];Jn(x!=null,`Previous layout not found for panel index ${S}`);const E=x-w,R=jm({overrideDisabledPanels:c,panelConstraints:r[S],prevSize:x,size:E});if(!ro(x,R)&&(v+=x-R,h[S]=R,v.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?S--:S++}}if(VF(d,h))return s;{const S=e<0?g:m,w=f[S];Jn(w!=null,`Previous layout not found for panel index ${S}`);const x=w+v,E=jm({overrideDisabledPanels:c,panelConstraints:r[S],prevSize:w,size:x});if(h[S]=E,!ro(E,x)){let R=x-E,T=e<0?g:m;for(;T>=0&&T<r.length;){const C=h[T];Jn(C!=null,`Previous layout not found for panel index ${T}`);const O=C+R,M=jm({overrideDisabledPanels:c,panelConstraints:r[T],prevSize:C,size:O});if(ro(C,M)||(R-=M-C,h[T]=M),ro(R,0))break;e>0?T--:T++}}}const _=Object.values(h).reduce((S,w)=>w+S,0);if(!ro(_,100,.1))return s;const b=Object.keys(s);return h.reduce((S,w,x)=>(S[b[x]]=w,S),{})}function Rp(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(t[r]===void 0||Il(e[r],t[r])!==0)return!1;return!0}function Ap({layout:e,panelConstraints:t}){const r=Object.values(e),i=[...r],s=i.reduce((f,d)=>f+d,0);if(i.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${i.map(f=>`${f}%`).join(", ")}`);if(!ro(s,100)&&i.length>0)for(let f=0;f<t.length;f++){const d=i[f];Jn(d!=null,`No layout data found for index ${f}`);const h=100/s*d;i[f]=h}let l=0;for(let f=0;f<t.length;f++){const d=r[f];Jn(d!=null,`No layout data found for index ${f}`);const h=i[f];Jn(h!=null,`No layout data found for index ${f}`);const m=jm({overrideDisabledPanels:!0,panelConstraints:t[f],prevSize:d,size:h});h!=m&&(l+=h-m,i[f]=m)}if(!ro(l,0))for(let f=0;f<t.length;f++){const d=i[f];Jn(d!=null,`No layout data found for index ${f}`);const h=d+l,m=jm({overrideDisabledPanels:!0,panelConstraints:t[f],prevSize:d,size:h});if(d!==m&&(l-=m-d,i[f]=m,ro(l,0)))break}const c=Object.keys(e);return i.reduce((f,d,h)=>(f[c[h]]=d,f),{})}function Bz({groupId:e,panelId:t}){const r=()=>{const f=Up();for(const[d,{defaultLayoutDeferred:h,derivedPanelConstraints:m,layout:g,groupSize:v,separatorToPanels:_}]of f)if(d.id===e)return{defaultLayoutDeferred:h,derivedPanelConstraints:m,group:d,groupSize:v,layout:g,separatorToPanels:_};throw Error(`Group ${e} not found`)},i=()=>{const f=r().derivedPanelConstraints.find(d=>d.panelId===t);if(f!==void 0)return f;throw Error(`Panel constraints not found for Panel ${t}`)},s=()=>{const f=r().group.panels.find(d=>d.id===t);if(f!==void 0)return f;throw Error(`Layout not found for Panel ${t}`)},l=()=>{const f=r().layout[t];if(f!==void 0)return f;throw Error(`Layout not found for Panel ${t}`)},c=f=>{const d=l();if(f===d)return;const{defaultLayoutDeferred:h,derivedPanelConstraints:m,group:g,groupSize:v,layout:_,separatorToPanels:b}=r(),S=g.panels.findIndex(R=>R.id===t),w=S===g.panels.length-1,x=r1({delta:w?d-f:f-d,initialLayout:_,panelConstraints:m,pivotIndices:w?[S-1,S]:[S,S+1],prevLayout:_,trigger:"imperative-api"}),E=Ap({layout:x,panelConstraints:m});Rp(_,E)||kc(g,{defaultLayoutDeferred:h,derivedPanelConstraints:m,groupSize:v,layout:E,separatorToPanels:b})};return{collapse:()=>{const{collapsible:f,collapsedSize:d}=i(),{mutableValues:h}=s(),m=l();f&&m!==d&&(h.expandToSize=m,c(d))},expand:()=>{const{collapsible:f,collapsedSize:d,minSize:h}=i(),{mutableValues:m}=s(),g=l();if(f&&g===d){let v=m.expandToSize??h;v===0&&(v=1),c(v)}},getSize:()=>{const{group:f}=r(),d=l(),{element:h}=s(),m=f.orientation==="horizontal"?h.offsetWidth:h.offsetHeight;return{asPercentage:d,inPixels:m}},isCollapsed:()=>{const{collapsible:f,collapsedSize:d}=i(),h=l();return f&&ro(d,h)},resize:f=>{if(l()!==f){let d;switch(typeof f){case"number":{const{group:h}=r(),m=ag({group:h});d=ho(f/m*100);break}case"string":{d=parseFloat(f);break}}c(d)}}}}function P5(e){if(e.defaultPrevented)return;const t=Up();sR(e,t).forEach(r=>{if(r.separator){const i=r.panels.find(s=>s.panelConstraints.defaultSize!==void 0);if(i){const s=i.panelConstraints.defaultSize,l=Bz({groupId:r.group.id,panelId:i.id});l&&s!==void 0&&(l.resize(s),e.preventDefault())}}})}function Mw(e){const t=Up();for(const[r]of t)if(r.separators.some(i=>i.element===e))return r;throw Error("Could not find parent Group for separator element")}function Hz({groupId:e}){const t=()=>{const r=Up();for(const[i,s]of r)if(i.id===e)return{group:i,...s};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:r,layout:i}=t();return r?{}:i},setLayout(r){const{defaultLayoutDeferred:i,derivedPanelConstraints:s,group:l,groupSize:c,layout:f,separatorToPanels:d}=t(),h=Ap({layout:r,panelConstraints:s});return i?f:(Rp(f,h)||kc(l,{defaultLayoutDeferred:i,derivedPanelConstraints:s,groupSize:c,layout:h,separatorToPanels:d}),h)}}}function rp(e,t){const r=Mw(e),i=mf(r.id,!0),s=r.separators.find(m=>m.element===e);Jn(s,"Matching separator not found");const l=i.separatorToPanels.get(s);Jn(l,"Matching panels not found");const c=l.map(m=>r.panels.indexOf(m)),f=Hz({groupId:r.id}).getLayout(),d=r1({delta:t,initialLayout:f,panelConstraints:i.derivedPanelConstraints,pivotIndices:c,prevLayout:f,trigger:"keyboard"}),h=Ap({layout:d,panelConstraints:i.derivedPanelConstraints});Rp(f,h)||kc(r,{defaultLayoutDeferred:i.defaultLayoutDeferred,derivedPanelConstraints:i.derivedPanelConstraints,groupSize:i.groupSize,layout:h,separatorToPanels:i.separatorToPanels})}function I5(e){if(e.defaultPrevented)return;const t=e.currentTarget,r=Mw(t);if(!r.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),r.orientation==="vertical"&&rp(t,5);break}case"ArrowLeft":{e.preventDefault(),r.orientation==="horizontal"&&rp(t,-5);break}case"ArrowRight":{e.preventDefault(),r.orientation==="horizontal"&&rp(t,5);break}case"ArrowUp":{e.preventDefault(),r.orientation==="vertical"&&rp(t,-5);break}case"End":{e.preventDefault(),rp(t,100);break}case"Enter":{e.preventDefault();const i=Mw(t),s=mf(i.id,!0),{derivedPanelConstraints:l,layout:c,separatorToPanels:f}=s,d=i.separators.find(v=>v.element===t);Jn(d,"Matching separator not found");const h=f.get(d);Jn(h,"Matching panels not found");const m=h[0],g=l.find(v=>v.panelId===m.id);if(Jn(g,"Panel metadata not found"),g.collapsible){const v=c[m.id],_=g.collapsedSize===v?i.mutableState.expandedPanelSizes[m.id]??g.minSize:g.collapsedSize;rp(t,_-v)}break}case"F6":{e.preventDefault();const i=Mw(t).separators.map(c=>c.element),s=Array.from(i).findIndex(c=>c===e.currentTarget);Jn(s!==null,"Index not found");const l=e.shiftKey?s>0?s-1:i.length-1:s+1<i.length?s+1:0;i[l].focus();break}case"Home":{e.preventDefault(),rp(t,-100);break}}}let Hm={cursorFlags:0,state:"inactive"};const lR=new qz;function Mp(){return Hm}function FF(e){return lR.addListener("change",e)}function BF(e){const t=Hm,r={...Hm};r.cursorFlags=e,Hm=r,lR.emit("change",{prev:t,next:r})}function Gm(e){const t=Hm;Hm=e,lR.emit("change",{prev:t,next:e})}function L5(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const t=Up(),r=sR(e,t),i=new Map;let s=!1;r.forEach(l=>{l.separator&&(s||(s=!0,l.separator.element.focus()));const c=t.get(l.group);c&&i.set(l.group,c.layout)}),Gm({cursorFlags:0,hitRegions:r,initialLayoutMap:i,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}),r.length&&e.preventDefault()}const HF=e=>e,l2=()=>{},Gz=1,Kz=2,Yz=4,Zz=8,U5=3,q5=12;let hS;function V5(){return hS===void 0&&(hS=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(hS=!0)),hS}function GF({cursorFlags:e,groups:t,state:r}){let i=0,s=0;switch(r){case"active":case"hover":t.forEach(l=>{if(!l.mutableState.disableCursor)switch(l.orientation){case"horizontal":{i++;break}case"vertical":{s++;break}}})}if(!(i===0&&s===0)){switch(r){case"active":{if(e&&V5()){const l=(e&Gz)!==0,c=(e&Kz)!==0,f=(e&Yz)!==0,d=(e&Zz)!==0;if(l)return f?"se-resize":d?"ne-resize":"e-resize";if(c)return f?"sw-resize":d?"nw-resize":"w-resize";if(f)return"s-resize";if(d)return"n-resize"}break}}return V5()?i>0&&s>0?"move":i>0?"ew-resize":"ns-resize":i>0&&s>0?"grab":i>0?"col-resize":"row-resize"}}const F5=new WeakMap;function uR(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:r}=F5.get(e)??{};r===void 0&&(r=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&e.adoptedStyleSheets.push(r));const i=Mp();switch(i.state){case"active":case"hover":{const s=GF({cursorFlags:i.cursorFlags,groups:i.hitRegions.map(c=>c.group),state:i.state}),l=`*, *:hover {cursor: ${s} !important; }`;if(t===l)return;t=l,s?r.cssRules.length===0?r.insertRule(l):r.replaceSync(l):r.cssRules.length===1&&r.deleteRule(0);break}case"inactive":{t=void 0,r.cssRules.length===1&&r.deleteRule(0);break}}F5.set(e,{prevStyle:t,styleSheet:r})}function Xz({document:e,event:t,hitRegions:r,initialLayoutMap:i,mountedGroups:s,pointerDownAtPoint:l,prevCursorFlags:c}){let f=0;r.forEach(h=>{const{group:m,groupSize:g}=h,{orientation:v,panels:_}=m,{disableCursor:b}=m.mutableState;let S=0;l?v==="horizontal"?S=(t.clientX-l.x)/g*100:S=(t.clientY-l.y)/g*100:v==="horizontal"?S=t.clientX<0?-100:100:S=t.clientY<0?-100:100;const w=i.get(m),x=s.get(m);if(!w||!x)return;const{defaultLayoutDeferred:E,derivedPanelConstraints:R,groupSize:T,layout:C,separatorToPanels:O}=x;if(R&&C&&O){const M=r1({delta:S,initialLayout:w,panelConstraints:R,pivotIndices:h.panels.map(D=>_.indexOf(D)),prevLayout:C,trigger:"mouse-or-touch"});if(Rp(M,C)){if(S!==0&&!b)switch(v){case"horizontal":{f|=S<0?Gz:Kz;break}case"vertical":{f|=S<0?Yz:Zz;break}}}else kc(h.group,{defaultLayoutDeferred:E,derivedPanelConstraints:R,groupSize:T,layout:M,separatorToPanels:O})}});let d=0;t.movementX===0?d|=c&U5:d|=f&U5,t.movementY===0?d|=c&q5:d|=f&q5,BF(d),uR(e)}function B5(e){const t=Up(),r=Mp();r.state==="active"&&Xz({document:e.currentTarget,event:e,hitRegions:r.hitRegions,initialLayoutMap:r.initialLayoutMap,mountedGroups:t,prevCursorFlags:r.cursorFlags})}function H5(e){if(e.defaultPrevented)return;const t=Mp(),r=Up();switch(t.state){case"active":{if(e.buttons===0){Gm({cursorFlags:0,state:"inactive"}),t.hitRegions.forEach(i=>{const s=mf(i.group.id,!0);kc(i.group,s)});return}Xz({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:r,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break}default:{const i=sR(e,r);i.length===0?t.state!=="inactive"&&Gm({cursorFlags:0,state:"inactive"}):Gm({cursorFlags:0,hitRegions:i,state:"hover"}),uR(e.currentTarget);break}}}function G5(e){e.relatedTarget instanceof HTMLIFrameElement&&Mp().state==="hover"&&Gm({cursorFlags:0,state:"inactive"})}function K5(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const t=Mp();t.state==="active"&&(Gm({cursorFlags:0,state:"inactive"}),t.hitRegions.length>0&&(uR(e.currentTarget),t.hitRegions.forEach(r=>{const i=mf(r.group.id,!0);kc(r.group,i)}),e.preventDefault()))}function Y5(e){let t=0,r=0;const i={};for(const l of e)if(l.defaultSize!==void 0){t++;const c=ho(l.defaultSize);r+=c,i[l.panelId]=c}else i[l.panelId]=void 0;const s=e.length-t;if(s!==0){const l=ho((100-r)/s);for(const c of e)c.defaultSize===void 0&&(i[c.panelId]=l)}return i}function KF(e,t,r){if(!r[0])return;const i=e.panels.find(d=>d.element===t);if(!i||!i.onResize)return;const s=ag({group:e}),l=e.orientation==="horizontal"?i.element.offsetWidth:i.element.offsetHeight,c=i.mutableValues.prevSize,f={asPercentage:ho(l/s*100),inPixels:l};i.mutableValues.prevSize=f,i.onResize(f,i.id,c)}function YF(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function ZF({group:e,nextGroupSize:t,prevGroupSize:r,prevLayout:i}){if(r<=0||t<=0||r===t)return i;let s=0,l=0,c=!1;const f=new Map,d=[];for(const g of e.panels){const v=i[g.id]??0;if(g.panelConstraints.groupResizeBehavior==="preserve-pixel-size"){c=!0;const _=v/100*r,b=ho(_/t*100);f.set(g.id,b),s+=b}else d.push(g.id),l+=v}if(!c||d.length===0)return i;const h=100-s,m={...i};if(f.forEach((g,v)=>{m[v]=g}),l>0)for(const g of d){const v=i[g]??0;m[g]=ho(v/l*h)}else{const g=ho(h/d.length);for(const v of d)m[v]=g}return m}function XF(e,t){const r=e.map(s=>s.id),i=Object.keys(t);if(r.length!==i.length)return!1;for(const s of r)if(!i.includes(s))return!1;return!0}const gm=new Map;function QF(e){let t=!0;Jn(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const r=e.element.ownerDocument.defaultView.ResizeObserver,i=new Set,s=new Set,l=new r(b=>{for(const S of b){const{borderBoxSize:w,target:x}=S;if(x===e.element){if(t){const E=ag({group:e});if(E===0)return;const R=mf(e.id);if(!R)return;const T=hC(e),C=R.defaultLayoutDeferred?Y5(T):R.layout,O=ZF({group:e,nextGroupSize:E,prevGroupSize:R.groupSize,prevLayout:C}),M=Ap({layout:O,panelConstraints:T});if(!R.defaultLayoutDeferred&&Rp(R.layout,M)&&YF(R.derivedPanelConstraints,T)&&R.groupSize===E)return;kc(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:T,groupSize:E,layout:M,separatorToPanels:R.separatorToPanels})}}else KF(e,x,w)}});l.observe(e.element),e.panels.forEach(b=>{Jn(!i.has(b.id),`Panel ids must be unique; id "${b.id}" was used more than once`),i.add(b.id),b.onResize&&l.observe(b.element)});const c=ag({group:e}),f=hC(e),d=e.panels.map(({id:b})=>b).join(",");let h=e.mutableState.defaultLayout;h&&(XF(e.panels,h)||(h=void 0));const m=e.mutableState.layouts[d]??h??Y5(f),g=Ap({layout:m,panelConstraints:f}),v=e.element.ownerDocument;gm.set(v,(gm.get(v)??0)+1);const _=new Map;return Uz(e).forEach(b=>{b.separator&&_.set(b.separator,b.panels)}),kc(e,{defaultLayoutDeferred:c===0,derivedPanelConstraints:f,groupSize:c,layout:g,separatorToPanels:_}),e.separators.forEach(b=>{Jn(!s.has(b.id),`Separator ids must be unique; id "${b.id}" was used more than once`),s.add(b.id),b.element.addEventListener("keydown",I5)}),gm.get(v)===1&&(v.addEventListener("dblclick",P5,!0),v.addEventListener("pointerdown",L5,!0),v.addEventListener("pointerleave",B5),v.addEventListener("pointermove",H5),v.addEventListener("pointerout",G5),v.addEventListener("pointerup",K5,!0)),function(){t=!1,gm.set(v,Math.max(0,(gm.get(v)??0)-1)),DF(e),e.separators.forEach(b=>{b.element.removeEventListener("keydown",I5)}),gm.get(v)||(v.removeEventListener("dblclick",P5,!0),v.removeEventListener("pointerdown",L5,!0),v.removeEventListener("pointerleave",B5),v.removeEventListener("pointermove",H5),v.removeEventListener("pointerout",G5),v.removeEventListener("pointerup",K5,!0)),l.disconnect()}}function WF(){const[e,t]=j.useState({}),r=j.useCallback(()=>t({}),[]);return[e,r]}function cR(e){const t=j.useId();return`${e??t}`}const qp=typeof window<"u"?j.useLayoutEffect:j.useEffect;function Lb(e){const t=j.useRef(e);return qp(()=>{t.current=e},[e]),j.useCallback((...r)=>t.current?.(...r),[t])}function fR(...e){return Lb(t=>{e.forEach(r=>{if(r)switch(typeof r){case"function":{r(t);break}case"object":{r.current=t;break}}})})}function dR(e){const t=j.useRef({...e});return qp(()=>{for(const r in e)t.current[r]=e[r]},[e]),t.current}const Qz=j.createContext(null);function JF(e,t){const r=j.useRef({getLayout:()=>({}),setLayout:HF});j.useImperativeHandle(t,()=>r.current,[]),qp(()=>{Object.assign(r.current,Hz({groupId:e}))})}function km({children:e,className:t,defaultLayout:r,disableCursor:i,disabled:s,elementRef:l,groupRef:c,id:f,onLayoutChange:d,onLayoutChanged:h,orientation:m="horizontal",resizeTargetMinimumSize:g={coarse:20,fine:10},style:v,..._}){const b=j.useRef({onLayoutChange:{},onLayoutChanged:{}}),S=Lb(q=>{Rp(b.current.onLayoutChange,q)||(b.current.onLayoutChange=q,d?.(q))}),w=Lb(q=>{Rp(b.current.onLayoutChanged,q)||(b.current.onLayoutChanged=q,h?.(q))}),x=cR(f),E=j.useRef(null),[R,T]=WF(),C=j.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:g,separators:[]}),O=fR(E,l);JF(x,c);const M=Lb((q,V)=>{const G=Mp(),ne=D5(q),oe=mf(q);if(oe){let K=!1;return G.state==="active"&&(K=G.hitRegions.some(ee=>ee.group===ne)),{flexGrow:oe.layout[V]??1,pointerEvents:K?"none":void 0}}return{flexGrow:r?.[V]??1}}),D=dR({defaultLayout:r,disableCursor:i}),U=j.useMemo(()=>({get disableCursor(){return!!D.disableCursor},getPanelStyles:M,id:x,orientation:m,registerPanel:q=>{const V=C.current;return V.panels=pC(m,[...V.panels,q]),T(),()=>{V.panels=V.panels.filter(G=>G!==q),T()}},registerSeparator:q=>{const V=C.current;return V.separators=pC(m,[...V.separators,q]),T(),()=>{V.separators=V.separators.filter(G=>G!==q),T()}},togglePanelDisabled:(q,V)=>{const G=C.current.panels.find(K=>K.id===q);G&&(G.panelConstraints.disabled=V);const ne=D5(x),oe=mf(x);ne&&oe&&kc(ne,{...oe,derivedPanelConstraints:hC(ne)})},toggleSeparatorDisabled:(q,V)=>{const G=C.current.separators.find(ne=>ne.id===q);G&&(G.disabled=V)}}),[M,x,T,m,D]),B=j.useRef(null);return qp(()=>{const q=E.current;if(q===null)return;const V=C.current;let G;if(D.defaultLayout!==void 0&&Object.keys(D.defaultLayout).length===V.panels.length){G={};for(const Q of V.panels){const z=D.defaultLayout[Q.id];z!==void 0&&(G[Q.id]=z)}}const ne={disabled:!!s,element:q,id:x,mutableState:{defaultLayout:G,disableCursor:!!D.disableCursor,expandedPanelSizes:C.current.lastExpandedPanelSizes,layouts:C.current.layouts},orientation:m,panels:V.panels,resizeTargetMinimumSize:V.resizeTargetMinimumSize,separators:V.separators};B.current=ne;const oe=QF(ne),{defaultLayoutDeferred:K,derivedPanelConstraints:ee,layout:re}=mf(ne.id,!0);!K&&ee.length>0&&(S(re),w(re));const ue=oR(x,Q=>{const{defaultLayoutDeferred:z,derivedPanelConstraints:L,layout:Y}=Q.next;if(z||L.length===0)return;const I=ne.panels.map(({id:J})=>J).join(",");ne.mutableState.layouts[I]=Y,L.forEach(J=>{if(J.collapsible){const{layout:he}=Q.prev??{};if(he){const xe=ro(J.collapsedSize,Y[J.panelId]),we=ro(J.collapsedSize,he[J.panelId]);xe&&!we&&(ne.mutableState.expandedPanelSizes[J.panelId]=he[J.panelId])}}});const X=Mp().state!=="active";S(Y),X&&w(Y)});return()=>{B.current=null,oe(),ue()}},[s,x,w,S,m,R,D]),j.useEffect(()=>{const q=B.current;q&&(q.mutableState.defaultLayout=r,q.mutableState.disableCursor=!!i)}),k.jsx(Qz.Provider,{value:U,children:k.jsx("div",{..._,className:t,"data-group":!0,"data-testid":x,id:x,ref:O,style:{height:"100%",width:"100%",overflow:"hidden",...v,display:"flex",flexDirection:m==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:m==="horizontal"?"pan-y":"pan-x"},children:e})})}km.displayName="Group";function u2(e,t){return`react-resizable-panels:${[e,...t].join(":")}`}function Rb({debounceSaveMs:e=100,panelIds:t,storage:r=localStorage,...i}){const s=t!==void 0,l="id"in i?i.id:i.groupId,c=u2(l,t??[]),f=j.useSyncExternalStore(eB,()=>r.getItem(c),()=>r.getItem(c)),d=j.useMemo(()=>f?JSON.parse(f):void 0,[f]),h=j.useRef(null),m=j.useCallback(()=>{const _=h.current;_&&(h.current=null,clearTimeout(_))},[]);j.useLayoutEffect(()=>()=>{m()},[m]);const g=j.useCallback(_=>{m();let b;s?b=u2(l,Object.keys(_)):b=u2(l,[]);try{r.setItem(b,JSON.stringify(_))}catch(S){console.error(S)}},[m,s,l,r]),v=j.useCallback(_=>{m(),e===0?g(_):h.current=setTimeout(()=>{g(_)},e)},[m,e,g]);return{defaultLayout:d,onLayoutChange:v,onLayoutChanged:g}}function eB(){return function(){}}function hR(){const e=j.useContext(Qz);return Jn(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function tB(e,t){const{id:r}=hR(),i=j.useRef({collapse:l2,expand:l2,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:l2});j.useImperativeHandle(t,()=>i.current,[]),qp(()=>{Object.assign(i.current,Bz({groupId:r,panelId:e}))})}function gl({children:e,className:t,collapsedSize:r="0%",collapsible:i=!1,defaultSize:s,disabled:l,elementRef:c,groupResizeBehavior:f="preserve-relative-size",id:d,maxSize:h="100%",minSize:m="0%",onResize:g,panelRef:v,style:_,...b}){const S=!!d,w=cR(d),x=dR({disabled:l}),E=j.useRef(null),R=fR(E,c),{getPanelStyles:T,id:C,orientation:O,registerPanel:M,togglePanelDisabled:D}=hR(),U=g!==null,B=Lb((V,G,ne)=>{g?.(V,d,ne)});qp(()=>{const V=E.current;if(V!==null){const G={element:V,id:w,idIsStable:S,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:U?B:void 0,panelConstraints:{groupResizeBehavior:f,collapsedSize:r,collapsible:i,defaultSize:s,disabled:x.disabled,maxSize:h,minSize:m}};return M(G)}},[f,r,i,s,U,w,S,h,m,B,M,x]),j.useEffect(()=>{D(w,!!l)},[l,w,D]),tB(w,v);const q=j.useSyncExternalStore(V=>oR(C,V),()=>JSON.stringify(T(C,w)),()=>JSON.stringify(T(C,w)));return k.jsx("div",{...b,"aria-disabled":l||void 0,"data-panel":!0,"data-testid":w,id:w,ref:R,style:{...nB,display:"flex",flexBasis:0,flexShrink:1,overflow:"visible",...JSON.parse(q)},children:k.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,overflow:"auto",..._,touchAction:O==="horizontal"?"pan-y":"pan-x"},children:e})})}gl.displayName="Panel";const nB={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function rB({layout:e,panelConstraints:t,panelId:r,panelIndex:i}){let s,l;const c=e[r],f=t.find(d=>d.panelId===r);if(f){const d=f.maxSize,h=f.collapsible?f.collapsedSize:f.minSize,m=[i,i+1];l=Ap({layout:r1({delta:h-c,initialLayout:e,panelConstraints:t,pivotIndices:m,prevLayout:e}),panelConstraints:t})[r],s=Ap({layout:r1({delta:d-c,initialLayout:e,panelConstraints:t,pivotIndices:m,prevLayout:e}),panelConstraints:t})[r]}return{valueControls:r,valueMax:s,valueMin:l,valueNow:c}}function Dm({children:e,className:t,disabled:r,elementRef:i,id:s,style:l,...c}){const f=cR(s),d=dR({disabled:r}),[h,m]=j.useState({}),[g,v]=j.useState("inactive"),_=j.useRef(null),b=fR(_,i),{disableCursor:S,id:w,orientation:x,registerSeparator:E,toggleSeparatorDisabled:R}=hR(),T=x==="horizontal"?"vertical":"horizontal";qp(()=>{const O=_.current;if(O!==null){const M={disabled:d.disabled,element:O,id:f},D=E(M),U=FF(q=>{v(q.next.state!=="inactive"&&q.next.hitRegions.some(V=>V.separator===M)?q.next.state:"inactive")}),B=oR(w,q=>{const{derivedPanelConstraints:V,layout:G,separatorToPanels:ne}=q.next,oe=ne.get(M);if(oe){const K=oe[0],ee=oe.indexOf(K);m(rB({layout:G,panelConstraints:V,panelId:K.id,panelIndex:ee}))}});return()=>{U(),B(),D()}}},[w,f,E,d]),j.useEffect(()=>{R(f,!!r)},[r,f,R]);let C;return r&&!S&&(C="not-allowed"),k.jsx("div",{...c,"aria-controls":h.valueControls,"aria-disabled":r||void 0,"aria-orientation":T,"aria-valuemax":h.valueMax,"aria-valuemin":h.valueMin,"aria-valuenow":h.valueNow,children:e,className:t,"data-separator":r?"disabled":g,"data-testid":f,id:f,ref:b,role:"separator",style:{flexBasis:"auto",cursor:C,...l,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:r?void 0:0})}Dm.displayName="Separator";const Z5=e=>{let t;const r=new Set,i=(h,m)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const v=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),r.forEach(_=>_(t,v))}},s=()=>t,f={setState:i,getState:s,getInitialState:()=>d,subscribe:h=>(r.add(h),()=>r.delete(h))},d=t=e(i,s,f);return f},aB=(e=>e?Z5(e):Z5),iB=e=>e;function oB(e,t=iB){const r=Qo.useSyncExternalStore(e.subscribe,Qo.useCallback(()=>t(e.getState()),[e,t]),Qo.useCallback(()=>t(e.getInitialState()),[e,t]));return Qo.useDebugValue(r),r}const sB=e=>{const t=aB(e),r=i=>oB(t,i);return Object.assign(r,t),r},Wz=(e=>sB),Rc=Wz()(e=>({status:"idle",requiresAuth:!1,error:null,setStatus:t=>e({status:t}),setRequiresAuth:t=>e({requiresAuth:t}),setError:t=>e({error:t}),reset:()=>e({status:"idle",requiresAuth:!1,error:null})}));let pR;pR=globalThis.crypto;async function lB(e){return(await pR).getRandomValues(new Uint8Array(e))}async function uB(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",r=Math.pow(2,8)-Math.pow(2,8)%t.length;let i="";for(;i.length<e;){const s=await lB(e-i.length);for(const l of s)l<r&&(i+=t[l%t.length])}return i}async function cB(e){return await uB(e)}async function fB(e){const t=await(await pR).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function dB(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await cB(e),r=await fB(t);return{code_verifier:t,code_challenge:r}}const hB=Object.freeze({status:"aborted"});function ke(e,t,r){function i(f,d){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:d,constr:c,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,d);const h=c.prototype,m=Object.keys(h);for(let g=0;g<m.length;g++){const v=m[g];v in f||(f[v]=h[v].bind(f))}}const s=r?.Parent??Object;class l extends s{}Object.defineProperty(l,"name",{value:e});function c(f){var d;const h=r?.Parent?new l:this;i(h,f),(d=h._zod).deferred??(d.deferred=[]);for(const m of h._zod.deferred)m();return h}return Object.defineProperty(c,"init",{value:i}),Object.defineProperty(c,Symbol.hasInstance,{value:f=>r?.Parent&&f instanceof r.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class Km extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Jz extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const e6={};function Tf(e){return e6}function t6(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,s])=>t.indexOf(+i)===-1).map(([i,s])=>s)}function mC(e,t){return typeof t=="bigint"?t.toString():t}function LE(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function mR(e){return e==null}function gR(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function pB(e,t){const r=(e.toString().split(".")[1]||"").length,i=t.toString();let s=(i.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(i)){const d=i.match(/\d?e-(\d?)/);d?.[1]&&(s=Number.parseInt(d[1]))}const l=r>s?r:s,c=Number.parseInt(e.toFixed(l).replace(".","")),f=Number.parseInt(t.toFixed(l).replace(".",""));return c%f/10**l}const X5=Symbol("evaluating");function Ln(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==X5)return i===void 0&&(i=X5,i=r()),i},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function Vp(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function zf(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function Q5(e){return JSON.stringify(e)}function mB(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const n6="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function a1(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const gB=LE(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ig(e){if(a1(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(a1(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function r6(e){return ig(e)?{...e}:Array.isArray(e)?[...e]:e}const yB=new Set(["string","number","symbol"]);function og(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $f(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function pt(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function vB(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const bB={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 SB(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const l=zf(e._zod.def,{get shape(){const c={};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(c[f]=r.shape[f])}return Vp(this,"shape",c),c},checks:[]});return $f(e,l)}function wB(e,t){const r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const l=zf(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete c[f]}return Vp(this,"shape",c),c},checks:[]});return $f(e,l)}function EB(e,t){if(!ig(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const l=e._zod.def.shape;for(const c in t)if(Object.getOwnPropertyDescriptor(l,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=zf(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return Vp(this,"shape",l),l}});return $f(e,s)}function xB(e,t){if(!ig(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=zf(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Vp(this,"shape",i),i}});return $f(e,r)}function _B(e,t){const r=zf(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Vp(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return $f(e,r)}function TB(e,t,r){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=zf(t._zod.def,{get shape(){const f=t._zod.def.shape,d={...f};if(r)for(const h in r){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);r[h]&&(d[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)d[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return Vp(this,"shape",d),d},checks:[]});return $f(t,c)}function CB(e,t,r){const i=zf(t._zod.def,{get shape(){const s=t._zod.def.shape,l={...s};if(r)for(const c in r){if(!(c in l))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(l[c]=new e({type:"nonoptional",innerType:s[c]}))}else for(const c in s)l[c]=new e({type:"nonoptional",innerType:s[c]});return Vp(this,"shape",l),l}});return $f(t,i)}function Nm(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function zm(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function pS(e){return typeof e=="string"?e:e?.message}function Cf(e,t,r){const i={...e,path:e.path??[]};if(!e.message){const s=pS(e.inst?._zod.def?.error?.(e))??pS(t?.error?.(e))??pS(r.customError?.(e))??pS(r.localeError?.(e))??"Invalid input";i.message=s}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function yR(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function i1(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}const a6=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,mC,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},i6=ke("$ZodError",a6),o6=ke("$ZodError",a6,{Parent:Error});function OB(e,t=r=>r.message){const r={},i=[];for(const s of e.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):i.push(t(s));return{formErrors:i,fieldErrors:r}}function RB(e,t=r=>r.message){const r={_errors:[]},i=s=>{for(const l of s.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>i({issues:c}));else if(l.code==="invalid_key")i({issues:l.issues});else if(l.code==="invalid_element")i({issues:l.issues});else if(l.path.length===0)r._errors.push(t(l));else{let c=r,f=0;for(;f<l.path.length;){const d=l.path[f];f===l.path.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(l))):c[d]=c[d]||{_errors:[]},c=c[d],f++}}};return i(e),r}const vR=e=>(t,r,i,s)=>{const l=i?Object.assign(i,{async:!1}):{async:!1},c=t._zod.run({value:r,issues:[]},l);if(c instanceof Promise)throw new Km;if(c.issues.length){const f=new(s?.Err??e)(c.issues.map(d=>Cf(d,l,Tf())));throw n6(f,s?.callee),f}return c.value},bR=e=>async(t,r,i,s)=>{const l=i?Object.assign(i,{async:!0}):{async:!0};let c=t._zod.run({value:r,issues:[]},l);if(c instanceof Promise&&(c=await c),c.issues.length){const f=new(s?.Err??e)(c.issues.map(d=>Cf(d,l,Tf())));throw n6(f,s?.callee),f}return c.value},UE=e=>(t,r,i)=>{const s=i?{...i,async:!1}:{async:!1},l=t._zod.run({value:r,issues:[]},s);if(l instanceof Promise)throw new Km;return l.issues.length?{success:!1,error:new(e??i6)(l.issues.map(c=>Cf(c,s,Tf())))}:{success:!0,data:l.value}},s6=UE(o6),qE=e=>async(t,r,i)=>{const s=i?Object.assign(i,{async:!0}):{async:!0};let l=t._zod.run({value:r,issues:[]},s);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(c=>Cf(c,s,Tf())))}:{success:!0,data:l.value}},AB=qE(o6),MB=e=>(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return vR(e)(t,r,s)},jB=e=>(t,r,i)=>vR(e)(t,r,i),kB=e=>async(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return bR(e)(t,r,s)},DB=e=>async(t,r,i)=>bR(e)(t,r,i),NB=e=>(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return UE(e)(t,r,s)},zB=e=>(t,r,i)=>UE(e)(t,r,i),$B=e=>async(t,r,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return qE(e)(t,r,s)},PB=e=>async(t,r,i)=>qE(e)(t,r,i),IB=/^[cC][^\s-]{8,}$/,LB=/^[0-9a-z]+$/,UB=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,qB=/^[0-9a-vA-V]{20}$/,VB=/^[A-Za-z0-9]{27}$/,FB=/^[a-zA-Z0-9_-]{21}$/,BB=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,HB=/^([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})$/,W5=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[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)$/,GB=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,KB="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function YB(){return new RegExp(KB,"u")}const ZB=/^(?:(?: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])$/,XB=/^(([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}|:))$/,QB=/^((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])$/,WB=/^(([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])$/,JB=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,l6=/^[A-Za-z0-9_-]*$/,eH=/^\+[1-9]\d{6,14}$/,u6="(?:(?:\\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])))",tH=new RegExp(`^${u6}$`);function c6(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function nH(e){return new RegExp(`^${c6(e)}$`)}function rH(e){const t=c6({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${u6}T(?:${i})$`)}const aH=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},iH=/^-?\d+$/,f6=/^-?\d+(?:\.\d+)?$/,oH=/^(?:true|false)$/i,sH=/^null$/i,lH=/^[^A-Z]*$/,uH=/^[^a-z]*$/,mo=ke("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),d6={number:"number",bigint:"bigint",object:"date"},h6=ke("$ZodCheckLessThan",(e,t)=>{mo.init(e,t);const r=d6[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,l=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<l&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),p6=ke("$ZodCheckGreaterThan",(e,t)=>{mo.init(e,t);const r=d6[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,l=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>l&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),cH=ke("$ZodCheckMultipleOf",(e,t)=>{mo.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):pB(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),fH=ke("$ZodCheckNumberFormat",(e,t)=>{mo.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),i=r?"int":"number",[s,l]=bB[t.format];e._zod.onattach.push(c=>{const f=c._zod.bag;f.format=t.format,f.minimum=s,f.maximum=l,r&&(f.pattern=iH)}),e._zod.check=c=>{const f=c.value;if(r){if(!Number.isInteger(f)){c.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?c.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):c.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}f<s&&c.issues.push({origin:"number",input:f,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),f>l&&c.issues.push({origin:"number",input:f,code:"too_big",maximum:l,inclusive:!0,inst:e,continue:!t.abort})}}),dH=ke("$ZodCheckMaxLength",(e,t)=>{var r;mo.init(e,t),(r=e._zod.def).when??(r.when=i=>{const s=i.value;return!mR(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const s=i.value;if(s.length<=t.maximum)return;const c=yR(s);i.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),hH=ke("$ZodCheckMinLength",(e,t)=>{var r;mo.init(e,t),(r=e._zod.def).when??(r.when=i=>{const s=i.value;return!mR(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const s=i.value;if(s.length>=t.minimum)return;const c=yR(s);i.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),pH=ke("$ZodCheckLengthEquals",(e,t)=>{var r;mo.init(e,t),(r=e._zod.def).when??(r.when=i=>{const s=i.value;return!mR(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=i=>{const s=i.value,l=s.length;if(l===t.length)return;const c=yR(s),f=l>t.length;i.issues.push({origin:c,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),VE=ke("$ZodCheckStringFormat",(e,t)=>{var r,i;mo.init(e,t),e._zod.onattach.push(s=>{const l=s._zod.bag;l.format=t.format,t.pattern&&(l.patterns??(l.patterns=new Set),l.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),mH=ke("$ZodCheckRegex",(e,t)=>{VE.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),gH=ke("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=lH),VE.init(e,t)}),yH=ke("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=uH),VE.init(e,t)}),vH=ke("$ZodCheckIncludes",(e,t)=>{mo.init(e,t);const r=og(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(s=>{const l=s._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(i)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),bH=ke("$ZodCheckStartsWith",(e,t)=>{mo.init(e,t);const r=new RegExp(`^${og(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),SH=ke("$ZodCheckEndsWith",(e,t)=>{mo.init(e,t);const r=new RegExp(`.*${og(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),wH=ke("$ZodCheckOverwrite",(e,t)=>{mo.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class EH{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(`
|
|
11
|
+
`).filter(c=>c),s=Math.min(...i.map(c=>c.length-c.trimStart().length)),l=i.map(c=>c.slice(s)).map(c=>" ".repeat(this.indent*2)+c);for(const c of l)this.content.push(c)}compile(){const t=Function,r=this?.args,s=[...(this?.content??[""]).map(l=>` ${l}`)];return new t(...r,s.join(`
|
|
12
|
+
`))}}const xH={major:4,minor:3,patch:6},Tr=ke("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=xH;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const s of i)for(const l of s._zod.onattach)l(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(c,f,d)=>{let h=Nm(c),m;for(const g of f){if(g._zod.def.when){if(!g._zod.def.when(c))continue}else if(h)continue;const v=c.issues.length,_=g._zod.check(c);if(_ instanceof Promise&&d?.async===!1)throw new Km;if(m||_ instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await _,c.issues.length!==v&&(h||(h=Nm(c,v)))});else{if(c.issues.length===v)continue;h||(h=Nm(c,v))}}return m?m.then(()=>c):c},l=(c,f,d)=>{if(Nm(c))return c.aborted=!0,c;const h=s(f,i,d);if(h instanceof Promise){if(d.async===!1)throw new Km;return h.then(m=>e._zod.parse(m,d))}return e._zod.parse(h,d)};e._zod.run=(c,f)=>{if(f.skipChecks)return e._zod.parse(c,f);if(f.direction==="backward"){const h=e._zod.parse({value:c.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(m=>l(m,c,f)):l(h,c,f)}const d=e._zod.parse(c,f);if(d instanceof Promise){if(f.async===!1)throw new Km;return d.then(h=>s(h,i,f))}return s(d,i,f)}}Ln(e,"~standard",()=>({validate:s=>{try{const l=s6(e,s);return l.success?{value:l.data}:{issues:l.error?.issues}}catch{return AB(e,s).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),SR=ke("$ZodString",(e,t)=>{Tr.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??aH(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),jr=ke("$ZodStringFormat",(e,t)=>{VE.init(e,t),SR.init(e,t)}),_H=ke("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=HB),jr.init(e,t)}),TH=ke("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=W5(i))}else t.pattern??(t.pattern=W5());jr.init(e,t)}),CH=ke("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=GB),jr.init(e,t)}),OH=ke("$ZodURL",(e,t)=>{jr.init(e,t),e._zod.check=r=>{try{const i=r.value.trim(),s=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=s.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),RH=ke("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=YB()),jr.init(e,t)}),AH=ke("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=FB),jr.init(e,t)}),MH=ke("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=IB),jr.init(e,t)}),jH=ke("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=LB),jr.init(e,t)}),kH=ke("$ZodULID",(e,t)=>{t.pattern??(t.pattern=UB),jr.init(e,t)}),DH=ke("$ZodXID",(e,t)=>{t.pattern??(t.pattern=qB),jr.init(e,t)}),NH=ke("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=VB),jr.init(e,t)}),zH=ke("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=rH(t)),jr.init(e,t)}),$H=ke("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=tH),jr.init(e,t)}),PH=ke("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=nH(t)),jr.init(e,t)}),IH=ke("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=BB),jr.init(e,t)}),LH=ke("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=ZB),jr.init(e,t),e._zod.bag.format="ipv4"}),UH=ke("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=XB),jr.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),qH=ke("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=QB),jr.init(e,t)}),VH=ke("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=WB),jr.init(e,t),e._zod.check=r=>{const i=r.value.split("/");try{if(i.length!==2)throw new Error;const[s,l]=i;if(!l)throw new Error;const c=Number(l);if(`${c}`!==l)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${s}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function m6(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const FH=ke("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=JB),jr.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{m6(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function BH(e){if(!l6.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return m6(r)}const HH=ke("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=l6),jr.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{BH(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),GH=ke("$ZodE164",(e,t)=>{t.pattern??(t.pattern=eH),jr.init(e,t)});function KH(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const s=JSON.parse(atob(i));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const YH=ke("$ZodJWT",(e,t)=>{jr.init(e,t),e._zod.check=r=>{KH(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),g6=ke("$ZodNumber",(e,t)=>{Tr.init(e,t),e._zod.pattern=e._zod.bag.pattern??f6,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const s=r.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return r;const l=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...l?{received:l}:{}}),r}}),ZH=ke("$ZodNumberFormat",(e,t)=>{fH.init(e,t),g6.init(e,t)}),XH=ke("$ZodBoolean",(e,t)=>{Tr.init(e,t),e._zod.pattern=oH,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}const s=r.value;return typeof s=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),r}}),QH=ke("$ZodNull",(e,t)=>{Tr.init(e,t),e._zod.pattern=sH,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{const s=r.value;return s===null||r.issues.push({expected:"null",code:"invalid_type",input:s,inst:e}),r}}),WH=ke("$ZodAny",(e,t)=>{Tr.init(e,t),e._zod.parse=r=>r}),JH=ke("$ZodUnknown",(e,t)=>{Tr.init(e,t),e._zod.parse=r=>r}),eG=ke("$ZodNever",(e,t)=>{Tr.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function J5(e,t,r){e.issues.length&&t.issues.push(...zm(r,e.issues)),t.value[r]=e.value}const tG=ke("$ZodArray",(e,t)=>{Tr.init(e,t),e._zod.parse=(r,i)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),r;r.value=Array(s.length);const l=[];for(let c=0;c<s.length;c++){const f=s[c],d=t.element._zod.run({value:f,issues:[]},i);d instanceof Promise?l.push(d.then(h=>J5(h,r,c))):J5(d,r,c)}return l.length?Promise.all(l).then(()=>r):r}});function tE(e,t,r,i,s){if(e.issues.length){if(s&&!(r in i))return;t.issues.push(...zm(r,e.issues))}e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}function y6(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const r=vB(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function v6(e,t,r,i,s,l){const c=[],f=s.keySet,d=s.catchall._zod,h=d.def.type,m=d.optout==="optional";for(const g in t){if(f.has(g))continue;if(h==="never"){c.push(g);continue}const v=d.run({value:t[g],issues:[]},i);v instanceof Promise?e.push(v.then(_=>tE(_,r,g,t,m))):tE(v,r,g,t,m)}return c.length&&r.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:l}),e.length?Promise.all(e).then(()=>r):r}const nG=ke("$ZodObject",(e,t)=>{if(Tr.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...f};return Object.defineProperty(t,"shape",{value:d}),d}})}const i=LE(()=>y6(t));Ln(e._zod,"propValues",()=>{const f=t.shape,d={};for(const h in f){const m=f[h]._zod;if(m.values){d[h]??(d[h]=new Set);for(const g of m.values)d[h].add(g)}}return d});const s=a1,l=t.catchall;let c;e._zod.parse=(f,d)=>{c??(c=i.value);const h=f.value;if(!s(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const m=[],g=c.shape;for(const v of c.keys){const _=g[v],b=_._zod.optout==="optional",S=_._zod.run({value:h[v],issues:[]},d);S instanceof Promise?m.push(S.then(w=>tE(w,f,v,h,b))):tE(S,f,v,h,b)}return l?v6(m,h,f,d,i.value,e):m.length?Promise.all(m).then(()=>f):f}}),rG=ke("$ZodObjectJIT",(e,t)=>{nG.init(e,t);const r=e._zod.parse,i=LE(()=>y6(t)),s=v=>{const _=new EH(["shape","payload","ctx"]),b=i.value,S=R=>{const T=Q5(R);return`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`};_.write("const input = payload.value;");const w=Object.create(null);let x=0;for(const R of b.keys)w[R]=`key_${x++}`;_.write("const newResult = {};");for(const R of b.keys){const T=w[R],C=Q5(R),M=v[R]?._zod?.optout==="optional";_.write(`const ${T} = ${S(R)};`),M?_.write(`
|
|
13
|
+
if (${T}.issues.length) {
|
|
14
|
+
if (${C} in input) {
|
|
15
|
+
payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
|
|
16
|
+
...iss,
|
|
17
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
18
|
+
})));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (${T}.value === undefined) {
|
|
23
|
+
if (${C} in input) {
|
|
24
|
+
newResult[${C}] = undefined;
|
|
25
|
+
}
|
|
26
|
+
} else {
|
|
27
|
+
newResult[${C}] = ${T}.value;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
`):_.write(`
|
|
31
|
+
if (${T}.issues.length) {
|
|
32
|
+
payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
|
|
33
|
+
...iss,
|
|
34
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
35
|
+
})));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (${T}.value === undefined) {
|
|
39
|
+
if (${C} in input) {
|
|
40
|
+
newResult[${C}] = undefined;
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
newResult[${C}] = ${T}.value;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
`)}_.write("payload.value = newResult;"),_.write("return payload;");const E=_.compile();return(R,T)=>E(v,R,T)};let l;const c=a1,f=!e6.jitless,h=f&&gB.value,m=t.catchall;let g;e._zod.parse=(v,_)=>{g??(g=i.value);const b=v.value;return c(b)?f&&h&&_?.async===!1&&_.jitless!==!0?(l||(l=s(t.shape)),v=l(v,_),m?v6([],b,v,_,g,e):v):r(v,_):(v.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),v)}});function e3(e,t,r,i){for(const l of e)if(l.issues.length===0)return t.value=l.value,t;const s=e.filter(l=>!Nm(l));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(l=>l.issues.map(c=>Cf(c,i,Tf())))}),t)}const b6=ke("$ZodUnion",(e,t)=>{Tr.init(e,t),Ln(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),Ln(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),Ln(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),Ln(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(l=>l._zod.pattern);return new RegExp(`^(${s.map(l=>gR(l.source)).join("|")})$`)}});const r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(s,l)=>{if(r)return i(s,l);let c=!1;const f=[];for(const d of t.options){const h=d._zod.run({value:s.value,issues:[]},l);if(h instanceof Promise)f.push(h),c=!0;else{if(h.issues.length===0)return h;f.push(h)}}return c?Promise.all(f).then(d=>e3(d,s,e,l)):e3(f,s,e,l)}}),aG=ke("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,b6.init(e,t);const r=e._zod.parse;Ln(e._zod,"propValues",()=>{const s={};for(const l of t.options){const c=l._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const[f,d]of Object.entries(c)){s[f]||(s[f]=new Set);for(const h of d)s[f].add(h)}}return s});const i=LE(()=>{const s=t.options,l=new Map;for(const c of s){const f=c._zod.propValues?.[t.discriminator];if(!f||f.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(const d of f){if(l.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);l.set(d,c)}}return l});e._zod.parse=(s,l)=>{const c=s.value;if(!a1(c))return s.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),s;const f=i.value.get(c?.[t.discriminator]);return f?f._zod.run(s,l):t.unionFallback?r(s,l):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),s)}}),iG=ke("$ZodIntersection",(e,t)=>{Tr.init(e,t),e._zod.parse=(r,i)=>{const s=r.value,l=t.left._zod.run({value:s,issues:[]},i),c=t.right._zod.run({value:s,issues:[]},i);return l instanceof Promise||c instanceof Promise?Promise.all([l,c]).then(([d,h])=>t3(r,d,h)):t3(r,l,c)}});function gC(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ig(e)&&ig(t)){const r=Object.keys(t),i=Object.keys(e).filter(l=>r.indexOf(l)!==-1),s={...e,...t};for(const l of i){const c=gC(e[l],t[l]);if(!c.valid)return{valid:!1,mergeErrorPath:[l,...c.mergeErrorPath]};s[l]=c.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;i<e.length;i++){const s=e[i],l=t[i],c=gC(s,l);if(!c.valid)return{valid:!1,mergeErrorPath:[i,...c.mergeErrorPath]};r.push(c.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function t3(e,t,r){const i=new Map;let s;for(const f of t.issues)if(f.code==="unrecognized_keys"){s??(s=f);for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).l=!0}else e.issues.push(f);for(const f of r.issues)if(f.code==="unrecognized_keys")for(const d of f.keys)i.has(d)||i.set(d,{}),i.get(d).r=!0;else e.issues.push(f);const l=[...i].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(l.length&&s&&e.issues.push({...s,keys:l}),Nm(e))return e;const c=gC(t.value,r.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const oG=ke("$ZodRecord",(e,t)=>{Tr.init(e,t),e._zod.parse=(r,i)=>{const s=r.value;if(!ig(s))return r.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),r;const l=[],c=t.keyType._zod.values;if(c){r.value={};const f=new Set;for(const h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){f.add(typeof h=="number"?h.toString():h);const m=t.valueType._zod.run({value:s[h],issues:[]},i);m instanceof Promise?l.push(m.then(g=>{g.issues.length&&r.issues.push(...zm(h,g.issues)),r.value[h]=g.value})):(m.issues.length&&r.issues.push(...zm(h,m.issues)),r.value[h]=m.value)}let d;for(const h in s)f.has(h)||(d=d??[],d.push(h));d&&d.length>0&&r.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:d})}else{r.value={};for(const f of Reflect.ownKeys(s)){if(f==="__proto__")continue;let d=t.keyType._zod.run({value:f,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof f=="string"&&f6.test(f)&&d.issues.length){const g=t.keyType._zod.run({value:Number(f),issues:[]},i);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");g.issues.length===0&&(d=g)}if(d.issues.length){t.mode==="loose"?r.value[f]=s[f]:r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(g=>Cf(g,i,Tf())),input:f,path:[f],inst:e});continue}const m=t.valueType._zod.run({value:s[f],issues:[]},i);m instanceof Promise?l.push(m.then(g=>{g.issues.length&&r.issues.push(...zm(f,g.issues)),r.value[d.value]=g.value})):(m.issues.length&&r.issues.push(...zm(f,m.issues)),r.value[d.value]=m.value)}}return l.length?Promise.all(l).then(()=>r):r}}),sG=ke("$ZodEnum",(e,t)=>{Tr.init(e,t);const r=t6(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(s=>yB.has(typeof s)).map(s=>typeof s=="string"?og(s):s.toString()).join("|")})$`),e._zod.parse=(s,l)=>{const c=s.value;return i.has(c)||s.issues.push({code:"invalid_value",values:r,input:c,inst:e}),s}}),lG=ke("$ZodLiteral",(e,t)=>{if(Tr.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?og(i):i?og(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,s)=>{const l=i.value;return r.has(l)||i.issues.push({code:"invalid_value",values:t.values,input:l,inst:e}),i}}),uG=ke("$ZodTransform",(e,t)=>{Tr.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Jz(e.constructor.name);const s=t.transform(r.value,r);if(i.async)return(s instanceof Promise?s:Promise.resolve(s)).then(c=>(r.value=c,r));if(s instanceof Promise)throw new Km;return r.value=s,r}});function n3(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const S6=ke("$ZodOptional",(e,t)=>{Tr.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ln(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ln(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${gR(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(l=>n3(l,r.value)):n3(s,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),cG=ke("$ZodExactOptional",(e,t)=>{S6.init(e,t),Ln(e._zod,"values",()=>t.innerType._zod.values),Ln(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),fG=ke("$ZodNullable",(e,t)=>{Tr.init(e,t),Ln(e._zod,"optin",()=>t.innerType._zod.optin),Ln(e._zod,"optout",()=>t.innerType._zod.optout),Ln(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${gR(r.source)}|null)$`):void 0}),Ln(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),dG=ke("$ZodDefault",(e,t)=>{Tr.init(e,t),e._zod.optin="optional",Ln(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;const s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(l=>r3(l,t)):r3(s,t)}});function r3(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const hG=ke("$ZodPrefault",(e,t)=>{Tr.init(e,t),e._zod.optin="optional",Ln(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),pG=ke("$ZodNonOptional",(e,t)=>{Tr.init(e,t),Ln(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(l=>a3(l,e)):a3(s,e)}});function a3(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const mG=ke("$ZodCatch",(e,t)=>{Tr.init(e,t),Ln(e._zod,"optin",()=>t.innerType._zod.optin),Ln(e._zod,"optout",()=>t.innerType._zod.optout),Ln(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(l=>(r.value=l.value,l.issues.length&&(r.value=t.catchValue({...r,error:{issues:l.issues.map(c=>Cf(c,i,Tf()))},input:r.value}),r.issues=[]),r)):(r.value=s.value,s.issues.length&&(r.value=t.catchValue({...r,error:{issues:s.issues.map(l=>Cf(l,i,Tf()))},input:r.value}),r.issues=[]),r)}}),gG=ke("$ZodPipe",(e,t)=>{Tr.init(e,t),Ln(e._zod,"values",()=>t.in._zod.values),Ln(e._zod,"optin",()=>t.in._zod.optin),Ln(e._zod,"optout",()=>t.out._zod.optout),Ln(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){const l=t.out._zod.run(r,i);return l instanceof Promise?l.then(c=>mS(c,t.in,i)):mS(l,t.in,i)}const s=t.in._zod.run(r,i);return s instanceof Promise?s.then(l=>mS(l,t.out,i)):mS(s,t.out,i)}});function mS(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const yG=ke("$ZodReadonly",(e,t)=>{Tr.init(e,t),Ln(e._zod,"propValues",()=>t.innerType._zod.propValues),Ln(e._zod,"values",()=>t.innerType._zod.values),Ln(e._zod,"optin",()=>t.innerType?._zod?.optin),Ln(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const s=t.innerType._zod.run(r,i);return s instanceof Promise?s.then(i3):i3(s)}});function i3(e){return e.value=Object.freeze(e.value),e}const vG=ke("$ZodCustom",(e,t)=>{mo.init(e,t),Tr.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,s=t.fn(i);if(s instanceof Promise)return s.then(l=>o3(l,r,i,e));o3(s,r,i,e)}});function o3(e,t,r,i){if(!e){const s={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(s.params=i._zod.def.params),t.issues.push(i1(s))}}var s3;class bG{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};delete i.id;const s={...i,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function SG(){return new bG}(s3=globalThis).__zod_globalRegistry??(s3.__zod_globalRegistry=SG());const Ab=globalThis.__zod_globalRegistry;function wG(e,t){return new e({type:"string",...pt(t)})}function EG(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...pt(t)})}function l3(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...pt(t)})}function xG(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...pt(t)})}function _G(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...pt(t)})}function TG(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...pt(t)})}function CG(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...pt(t)})}function w6(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...pt(t)})}function OG(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...pt(t)})}function RG(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...pt(t)})}function AG(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...pt(t)})}function MG(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...pt(t)})}function jG(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...pt(t)})}function kG(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...pt(t)})}function DG(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...pt(t)})}function NG(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...pt(t)})}function zG(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...pt(t)})}function $G(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...pt(t)})}function PG(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...pt(t)})}function IG(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...pt(t)})}function LG(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...pt(t)})}function UG(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...pt(t)})}function qG(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...pt(t)})}function VG(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...pt(t)})}function FG(e,t){return new e({type:"string",format:"date",check:"string_format",...pt(t)})}function BG(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...pt(t)})}function HG(e,t){return new e({type:"string",format:"duration",check:"string_format",...pt(t)})}function GG(e,t){return new e({type:"number",checks:[],...pt(t)})}function KG(e,t){return new e({type:"number",coerce:!0,checks:[],...pt(t)})}function YG(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...pt(t)})}function ZG(e,t){return new e({type:"boolean",...pt(t)})}function XG(e,t){return new e({type:"null",...pt(t)})}function QG(e){return new e({type:"any"})}function WG(e){return new e({type:"unknown"})}function JG(e,t){return new e({type:"never",...pt(t)})}function u3(e,t){return new h6({check:"less_than",...pt(t),value:e,inclusive:!1})}function c2(e,t){return new h6({check:"less_than",...pt(t),value:e,inclusive:!0})}function c3(e,t){return new p6({check:"greater_than",...pt(t),value:e,inclusive:!1})}function f2(e,t){return new p6({check:"greater_than",...pt(t),value:e,inclusive:!0})}function f3(e,t){return new cH({check:"multiple_of",...pt(t),value:e})}function E6(e,t){return new dH({check:"max_length",...pt(t),maximum:e})}function nE(e,t){return new hH({check:"min_length",...pt(t),minimum:e})}function x6(e,t){return new pH({check:"length_equals",...pt(t),length:e})}function eK(e,t){return new mH({check:"string_format",format:"regex",...pt(t),pattern:e})}function tK(e){return new gH({check:"string_format",format:"lowercase",...pt(e)})}function nK(e){return new yH({check:"string_format",format:"uppercase",...pt(e)})}function rK(e,t){return new vH({check:"string_format",format:"includes",...pt(t),includes:e})}function aK(e,t){return new bH({check:"string_format",format:"starts_with",...pt(t),prefix:e})}function iK(e,t){return new SH({check:"string_format",format:"ends_with",...pt(t),suffix:e})}function Cg(e){return new wH({check:"overwrite",tx:e})}function oK(e){return Cg(t=>t.normalize(e))}function sK(){return Cg(e=>e.trim())}function lK(){return Cg(e=>e.toLowerCase())}function uK(){return Cg(e=>e.toUpperCase())}function cK(){return Cg(e=>mB(e))}function fK(e,t,r){return new e({type:"array",element:t,...pt(r)})}function dK(e,t,r){const i=pt(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function hK(e,t,r){return new e({type:"custom",check:"custom",fn:t,...pt(r)})}function pK(e){const t=mK(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(i1(i,r.value,t._zod.def));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),r.issues.push(i1(s))}},e(r.value,r)));return t}function mK(e,t){const r=new mo({check:"custom",...pt(t)});return r._zod.check=e,r}function _6(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Ab,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function la(e,t,r={path:[],schemaPath:[]}){var i;const s=e._zod.def,l=t.seen.get(e);if(l)return l.count++,r.schemaPath.includes(e)&&(l.cycle=r.path),l.schema;const c={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,c);const f=e._zod.toJSONSchema?.();if(f)c.schema=f;else{const m={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,m);else{const v=c.schema,_=t.processors[s.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);_(e,t,v,m)}const g=e._zod.parent;g&&(c.ref||(c.ref=g),la(g,t,m),t.seen.get(g).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(c.schema,d),t.io==="input"&&to(e)&&(delete c.schema.examples,delete c.schema.default),t.io==="input"&&c.schema._prefault&&((i=c.schema).default??(i.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function T6(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const c of e.seen.entries()){const f=e.metadataRegistry.get(c[0])?.id;if(f){const d=i.get(f);if(d&&d!==c[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(f,c[0])}}const s=c=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(c[0])?.id,v=e.external.uri??(b=>b);if(g)return{ref:v(g)};const _=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=_,{defId:_,ref:`${v("__shared")}#/${f}/${_}`}}if(c[1]===r)return{ref:"#"};const h=`#/${f}/`,m=c[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:h+m}},l=c=>{if(c[1].schema.$ref)return;const f=c[1],{ref:d,defId:h}=s(c);f.def={...f.schema},h&&(f.defId=h);const m=f.schema;for(const g in m)delete m[g];m.$ref=d};if(e.cycles==="throw")for(const c of e.seen.entries()){const f=c[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/<root>
|
|
47
|
+
|
|
48
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const f=c[1];if(t===c[0]){l(c);continue}if(e.external){const h=e.external.registry.get(c[0])?.id;if(t!==c[0]&&h){l(c);continue}}if(e.metadataRegistry.get(c[0])?.id){l(c);continue}if(f.cycle){l(c);continue}if(f.count>1&&e.reused==="ref"){l(c);continue}}}function C6(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=c=>{const f=e.seen.get(c);if(f.ref===null)return;const d=f.def??f.schema,h={...d},m=f.ref;if(f.ref=null,m){i(m);const v=e.seen.get(m),_=v.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(_)):Object.assign(d,_),Object.assign(d,h),c._zod.parent===m)for(const S in d)S==="$ref"||S==="allOf"||S in h||delete d[S];if(_.$ref&&v.def)for(const S in d)S==="$ref"||S==="allOf"||S in v.def&&JSON.stringify(d[S])===JSON.stringify(v.def[S])&&delete d[S]}const g=c._zod.parent;if(g&&g!==m){i(g);const v=e.seen.get(g);if(v?.schema.$ref&&(d.$ref=v.schema.$ref,v.def))for(const _ in d)_==="$ref"||_==="allOf"||_ in v.def&&JSON.stringify(d[_])===JSON.stringify(v.def[_])&&delete d[_]}e.override({zodSchema:c,jsonSchema:d,path:f.path??[]})};for(const c of[...e.seen.entries()].reverse())i(c[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(c)}Object.assign(s,r.def??r.schema);const l=e.external?.defs??{};for(const c of e.seen.entries()){const f=c[1];f.def&&f.defId&&(l[f.defId]=f.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?s.$defs=l:s.definitions=l);try{const c=JSON.parse(JSON.stringify(s));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:rE(t,"input",e.processors),output:rE(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function to(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return to(i.element,r);if(i.type==="set")return to(i.valueType,r);if(i.type==="lazy")return to(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return to(i.innerType,r);if(i.type==="intersection")return to(i.left,r)||to(i.right,r);if(i.type==="record"||i.type==="map")return to(i.keyType,r)||to(i.valueType,r);if(i.type==="pipe")return to(i.in,r)||to(i.out,r);if(i.type==="object"){for(const s in i.shape)if(to(i.shape[s],r))return!0;return!1}if(i.type==="union"){for(const s of i.options)if(to(s,r))return!0;return!1}if(i.type==="tuple"){for(const s of i.items)if(to(s,r))return!0;return!!(i.rest&&to(i.rest,r))}return!1}const gK=(e,t={})=>r=>{const i=_6({...r,processors:t});return la(e,i),T6(i,e),C6(i,e)},rE=(e,t,r={})=>i=>{const{libraryOptions:s,target:l}=i??{},c=_6({...s??{},target:l,io:t,processors:r});return la(e,c),T6(c,e),C6(c,e)},yK={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},vK=(e,t,r,i)=>{const s=r;s.type="string";const{minimum:l,maximum:c,format:f,patterns:d,contentEncoding:h}=e._zod.bag;if(typeof l=="number"&&(s.minLength=l),typeof c=="number"&&(s.maxLength=c),f&&(s.format=yK[f]??f,s.format===""&&delete s.format,f==="time"&&delete s.format),h&&(s.contentEncoding=h),d&&d.size>0){const m=[...d];m.length===1?s.pattern=m[0].source:m.length>1&&(s.allOf=[...m.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},bK=(e,t,r,i)=>{const s=r,{minimum:l,maximum:c,format:f,multipleOf:d,exclusiveMaximum:h,exclusiveMinimum:m}=e._zod.bag;typeof f=="string"&&f.includes("int")?s.type="integer":s.type="number",typeof m=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=m,s.exclusiveMinimum=!0):s.exclusiveMinimum=m),typeof l=="number"&&(s.minimum=l,typeof m=="number"&&t.target!=="draft-04"&&(m>=l?delete s.minimum:delete s.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=h,s.exclusiveMaximum=!0):s.exclusiveMaximum=h),typeof c=="number"&&(s.maximum=c,typeof h=="number"&&t.target!=="draft-04"&&(h<=c?delete s.maximum:delete s.exclusiveMaximum)),typeof d=="number"&&(s.multipleOf=d)},SK=(e,t,r,i)=>{r.type="boolean"},wK=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},EK=(e,t,r,i)=>{r.not={}},xK=(e,t,r,i)=>{},_K=(e,t,r,i)=>{},TK=(e,t,r,i)=>{const s=e._zod.def,l=t6(s.entries);l.every(c=>typeof c=="number")&&(r.type="number"),l.every(c=>typeof c=="string")&&(r.type="string"),r.enum=l},CK=(e,t,r,i)=>{const s=e._zod.def,l=[];for(const c of s.values)if(c===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");l.push(Number(c))}else l.push(c);if(l.length!==0)if(l.length===1){const c=l[0];r.type=c===null?"null":typeof c,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[c]:r.const=c}else l.every(c=>typeof c=="number")&&(r.type="number"),l.every(c=>typeof c=="string")&&(r.type="string"),l.every(c=>typeof c=="boolean")&&(r.type="boolean"),l.every(c=>c===null)&&(r.type="null"),r.enum=l},OK=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},RK=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},AK=(e,t,r,i)=>{const s=r,l=e._zod.def,{minimum:c,maximum:f}=e._zod.bag;typeof c=="number"&&(s.minItems=c),typeof f=="number"&&(s.maxItems=f),s.type="array",s.items=la(l.element,t,{...i,path:[...i.path,"items"]})},MK=(e,t,r,i)=>{const s=r,l=e._zod.def;s.type="object",s.properties={};const c=l.shape;for(const h in c)s.properties[h]=la(c[h],t,{...i,path:[...i.path,"properties",h]});const f=new Set(Object.keys(c)),d=new Set([...f].filter(h=>{const m=l.shape[h]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));d.size>0&&(s.required=Array.from(d)),l.catchall?._zod.def.type==="never"?s.additionalProperties=!1:l.catchall?l.catchall&&(s.additionalProperties=la(l.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},jK=(e,t,r,i)=>{const s=e._zod.def,l=s.inclusive===!1,c=s.options.map((f,d)=>la(f,t,{...i,path:[...i.path,l?"oneOf":"anyOf",d]}));l?r.oneOf=c:r.anyOf=c},kK=(e,t,r,i)=>{const s=e._zod.def,l=la(s.left,t,{...i,path:[...i.path,"allOf",0]}),c=la(s.right,t,{...i,path:[...i.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,d=[...f(l)?l.allOf:[l],...f(c)?c.allOf:[c]];r.allOf=d},DK=(e,t,r,i)=>{const s=r,l=e._zod.def;s.type="object";const c=l.keyType,d=c._zod.bag?.patterns;if(l.mode==="loose"&&d&&d.size>0){const m=la(l.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});s.patternProperties={};for(const g of d)s.patternProperties[g.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=la(l.keyType,t,{...i,path:[...i.path,"propertyNames"]})),s.additionalProperties=la(l.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const h=c._zod.values;if(h){const m=[...h].filter(g=>typeof g=="string"||typeof g=="number");m.length>0&&(s.required=m)}},NK=(e,t,r,i)=>{const s=e._zod.def,l=la(s.innerType,t,i),c=t.seen.get(e);t.target==="openapi-3.0"?(c.ref=s.innerType,r.nullable=!0):r.anyOf=[l,{type:"null"}]},zK=(e,t,r,i)=>{const s=e._zod.def;la(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType},$K=(e,t,r,i)=>{const s=e._zod.def;la(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType,r.default=JSON.parse(JSON.stringify(s.defaultValue))},PK=(e,t,r,i)=>{const s=e._zod.def;la(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},IK=(e,t,r,i)=>{const s=e._zod.def;la(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType;let c;try{c=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=c},LK=(e,t,r,i)=>{const s=e._zod.def,l=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;la(l,t,i);const c=t.seen.get(e);c.ref=l},UK=(e,t,r,i)=>{const s=e._zod.def;la(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType,r.readOnly=!0},O6=(e,t,r,i)=>{const s=e._zod.def;la(s.innerType,t,i);const l=t.seen.get(e);l.ref=s.innerType},qK=ke("ZodISODateTime",(e,t)=>{zH.init(e,t),Lr.init(e,t)});function R6(e){return VG(qK,e)}const VK=ke("ZodISODate",(e,t)=>{$H.init(e,t),Lr.init(e,t)});function FK(e){return FG(VK,e)}const BK=ke("ZodISOTime",(e,t)=>{PH.init(e,t),Lr.init(e,t)});function HK(e){return BG(BK,e)}const GK=ke("ZodISODuration",(e,t)=>{IH.init(e,t),Lr.init(e,t)});function KK(e){return HG(GK,e)}const YK=(e,t)=>{i6.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>RB(e,r)},flatten:{value:r=>OB(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,mC,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,mC,2)}},isEmpty:{get(){return e.issues.length===0}}})},xs=ke("ZodError",YK,{Parent:Error}),ZK=vR(xs),XK=bR(xs),QK=UE(xs),WK=qE(xs),JK=MB(xs),eY=jB(xs),tY=kB(xs),nY=DB(xs),rY=NB(xs),aY=zB(xs),iY=$B(xs),oY=PB(xs),Cr=ke("ZodType",(e,t)=>(Tr.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:rE(e,"input"),output:rE(e,"output")}}),e.toJSONSchema=gK(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(zf(t,{checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(r,i)=>$f(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>ZK(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>QK(e,r,i),e.parseAsync=async(r,i)=>XK(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>WK(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>JK(e,r,i),e.decode=(r,i)=>eY(e,r,i),e.encodeAsync=async(r,i)=>tY(e,r,i),e.decodeAsync=async(r,i)=>nY(e,r,i),e.safeEncode=(r,i)=>rY(e,r,i),e.safeDecode=(r,i)=>aY(e,r,i),e.safeEncodeAsync=async(r,i)=>iY(e,r,i),e.safeDecodeAsync=async(r,i)=>oY(e,r,i),e.refine=(r,i)=>e.check(JY(r,i)),e.superRefine=r=>e.check(eZ(r)),e.overwrite=r=>e.check(Cg(r)),e.optional=()=>Zr(e),e.exactOptional=()=>UY(e),e.nullable=()=>p3(e),e.nullish=()=>Zr(p3(e)),e.nonoptional=r=>GY(e,r),e.array=()=>Ye(e),e.or=r=>Or([e,r]),e.and=r=>ER(e,r),e.transform=r=>vC(e,z6(r)),e.default=r=>FY(e,r),e.prefault=r=>HY(e,r),e.catch=r=>YY(e,r),e.pipe=r=>vC(e,r),e.readonly=()=>QY(e),e.describe=r=>{const i=e.clone();return Ab.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return Ab.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Ab.get(e);const i=e.clone();return Ab.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),A6=ke("_ZodString",(e,t)=>{SR.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(i,s,l)=>vK(e,i,s);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(eK(...i)),e.includes=(...i)=>e.check(rK(...i)),e.startsWith=(...i)=>e.check(aK(...i)),e.endsWith=(...i)=>e.check(iK(...i)),e.min=(...i)=>e.check(nE(...i)),e.max=(...i)=>e.check(E6(...i)),e.length=(...i)=>e.check(x6(...i)),e.nonempty=(...i)=>e.check(nE(1,...i)),e.lowercase=i=>e.check(tK(i)),e.uppercase=i=>e.check(nK(i)),e.trim=()=>e.check(sK()),e.normalize=(...i)=>e.check(oK(...i)),e.toLowerCase=()=>e.check(lK()),e.toUpperCase=()=>e.check(uK()),e.slugify=()=>e.check(cK())}),sY=ke("ZodString",(e,t)=>{SR.init(e,t),A6.init(e,t),e.email=r=>e.check(EG(lY,r)),e.url=r=>e.check(w6(M6,r)),e.jwt=r=>e.check(qG(_Y,r)),e.emoji=r=>e.check(OG(cY,r)),e.guid=r=>e.check(l3(d3,r)),e.uuid=r=>e.check(xG(gS,r)),e.uuidv4=r=>e.check(_G(gS,r)),e.uuidv6=r=>e.check(TG(gS,r)),e.uuidv7=r=>e.check(CG(gS,r)),e.nanoid=r=>e.check(RG(fY,r)),e.guid=r=>e.check(l3(d3,r)),e.cuid=r=>e.check(AG(dY,r)),e.cuid2=r=>e.check(MG(hY,r)),e.ulid=r=>e.check(jG(pY,r)),e.base64=r=>e.check(IG(wY,r)),e.base64url=r=>e.check(LG(EY,r)),e.xid=r=>e.check(kG(mY,r)),e.ksuid=r=>e.check(DG(gY,r)),e.ipv4=r=>e.check(NG(yY,r)),e.ipv6=r=>e.check(zG(vY,r)),e.cidrv4=r=>e.check($G(bY,r)),e.cidrv6=r=>e.check(PG(SY,r)),e.e164=r=>e.check(UG(xY,r)),e.datetime=r=>e.check(R6(r)),e.date=r=>e.check(FK(r)),e.time=r=>e.check(HK(r)),e.duration=r=>e.check(KK(r))});function Ee(e){return wG(sY,e)}const Lr=ke("ZodStringFormat",(e,t)=>{jr.init(e,t),A6.init(e,t)}),lY=ke("ZodEmail",(e,t)=>{CH.init(e,t),Lr.init(e,t)}),d3=ke("ZodGUID",(e,t)=>{_H.init(e,t),Lr.init(e,t)}),gS=ke("ZodUUID",(e,t)=>{TH.init(e,t),Lr.init(e,t)}),M6=ke("ZodURL",(e,t)=>{OH.init(e,t),Lr.init(e,t)});function uY(e){return w6(M6,e)}const cY=ke("ZodEmoji",(e,t)=>{RH.init(e,t),Lr.init(e,t)}),fY=ke("ZodNanoID",(e,t)=>{AH.init(e,t),Lr.init(e,t)}),dY=ke("ZodCUID",(e,t)=>{MH.init(e,t),Lr.init(e,t)}),hY=ke("ZodCUID2",(e,t)=>{jH.init(e,t),Lr.init(e,t)}),pY=ke("ZodULID",(e,t)=>{kH.init(e,t),Lr.init(e,t)}),mY=ke("ZodXID",(e,t)=>{DH.init(e,t),Lr.init(e,t)}),gY=ke("ZodKSUID",(e,t)=>{NH.init(e,t),Lr.init(e,t)}),yY=ke("ZodIPv4",(e,t)=>{LH.init(e,t),Lr.init(e,t)}),vY=ke("ZodIPv6",(e,t)=>{UH.init(e,t),Lr.init(e,t)}),bY=ke("ZodCIDRv4",(e,t)=>{qH.init(e,t),Lr.init(e,t)}),SY=ke("ZodCIDRv6",(e,t)=>{VH.init(e,t),Lr.init(e,t)}),wY=ke("ZodBase64",(e,t)=>{FH.init(e,t),Lr.init(e,t)}),EY=ke("ZodBase64URL",(e,t)=>{HH.init(e,t),Lr.init(e,t)}),xY=ke("ZodE164",(e,t)=>{GH.init(e,t),Lr.init(e,t)}),_Y=ke("ZodJWT",(e,t)=>{YH.init(e,t),Lr.init(e,t)}),wR=ke("ZodNumber",(e,t)=>{g6.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(i,s,l)=>bK(e,i,s),e.gt=(i,s)=>e.check(c3(i,s)),e.gte=(i,s)=>e.check(f2(i,s)),e.min=(i,s)=>e.check(f2(i,s)),e.lt=(i,s)=>e.check(u3(i,s)),e.lte=(i,s)=>e.check(c2(i,s)),e.max=(i,s)=>e.check(c2(i,s)),e.int=i=>e.check(h3(i)),e.safe=i=>e.check(h3(i)),e.positive=i=>e.check(c3(0,i)),e.nonnegative=i=>e.check(f2(0,i)),e.negative=i=>e.check(u3(0,i)),e.nonpositive=i=>e.check(c2(0,i)),e.multipleOf=(i,s)=>e.check(f3(i,s)),e.step=(i,s)=>e.check(f3(i,s)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Un(e){return GG(wR,e)}const TY=ke("ZodNumberFormat",(e,t)=>{ZH.init(e,t),wR.init(e,t)});function h3(e){return YG(TY,e)}const CY=ke("ZodBoolean",(e,t)=>{XH.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>SK(e,r,i)});function xr(e){return ZG(CY,e)}const OY=ke("ZodNull",(e,t)=>{QH.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>wK(e,r,i)});function j6(e){return XG(OY,e)}const RY=ke("ZodAny",(e,t)=>{WH.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>xK()});function AY(){return QG(RY)}const MY=ke("ZodUnknown",(e,t)=>{JH.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>_K()});function Pr(){return WG(MY)}const jY=ke("ZodNever",(e,t)=>{eG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>EK(e,r,i)});function kY(e){return JG(jY,e)}const DY=ke("ZodArray",(e,t)=>{tG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>AK(e,r,i,s),e.element=t.element,e.min=(r,i)=>e.check(nE(r,i)),e.nonempty=r=>e.check(nE(1,r)),e.max=(r,i)=>e.check(E6(r,i)),e.length=(r,i)=>e.check(x6(r,i)),e.unwrap=()=>e.element});function Ye(e,t){return fK(DY,e,t)}const k6=ke("ZodObject",(e,t)=>{rG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>MK(e,r,i,s),Ln(e,"shape",()=>t.shape),e.keyof=()=>is(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Pr()}),e.loose=()=>e.clone({...e._zod.def,catchall:Pr()}),e.strict=()=>e.clone({...e._zod.def,catchall:kY()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>EB(e,r),e.safeExtend=r=>xB(e,r),e.merge=r=>_B(e,r),e.pick=r=>SB(e,r),e.omit=r=>wB(e,r),e.partial=(...r)=>TB($6,e,r[0]),e.required=(...r)=>CB(P6,e,r[0])});function We(e,t){const r={type:"object",shape:e??{},...pt(t)};return new k6(r)}function vi(e,t){return new k6({type:"object",shape:e,catchall:Pr(),...pt(t)})}const D6=ke("ZodUnion",(e,t)=>{b6.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>jK(e,r,i,s),e.options=t.options});function Or(e,t){return new D6({type:"union",options:e,...pt(t)})}const NY=ke("ZodDiscriminatedUnion",(e,t)=>{D6.init(e,t),aG.init(e,t)});function N6(e,t,r){return new NY({type:"union",options:t,discriminator:e,...pt(r)})}const zY=ke("ZodIntersection",(e,t)=>{iG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>kK(e,r,i,s)});function ER(e,t){return new zY({type:"intersection",left:e,right:t})}const $Y=ke("ZodRecord",(e,t)=>{oG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>DK(e,r,i,s),e.keyType=t.keyType,e.valueType=t.valueType});function Ir(e,t,r){return new $Y({type:"record",keyType:e,valueType:t,...pt(r)})}const yC=ke("ZodEnum",(e,t)=>{sG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(i,s,l)=>TK(e,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,s)=>{const l={};for(const c of i)if(r.has(c))l[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new yC({...t,checks:[],...pt(s),entries:l})},e.exclude=(i,s)=>{const l={...t.entries};for(const c of i)if(r.has(c))delete l[c];else throw new Error(`Key ${c} not found in enum`);return new yC({...t,checks:[],...pt(s),entries:l})}});function is(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new yC({type:"enum",entries:r,...pt(t)})}const PY=ke("ZodLiteral",(e,t)=>{lG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>CK(e,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function vt(e,t){return new PY({type:"literal",values:Array.isArray(e)?e:[e],...pt(t)})}const IY=ke("ZodTransform",(e,t)=>{uG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>RK(e,r),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new Jz(e.constructor.name);r.addIssue=l=>{if(typeof l=="string")r.issues.push(i1(l,r.value,t));else{const c=l;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=r.value),c.inst??(c.inst=e),r.issues.push(i1(c))}};const s=t.transform(r.value,r);return s instanceof Promise?s.then(l=>(r.value=l,r)):(r.value=s,r)}});function z6(e){return new IY({type:"transform",transform:e})}const $6=ke("ZodOptional",(e,t)=>{S6.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>O6(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function Zr(e){return new $6({type:"optional",innerType:e})}const LY=ke("ZodExactOptional",(e,t)=>{cG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>O6(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function UY(e){return new LY({type:"optional",innerType:e})}const qY=ke("ZodNullable",(e,t)=>{fG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>NK(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function p3(e){return new qY({type:"nullable",innerType:e})}const VY=ke("ZodDefault",(e,t)=>{dG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>$K(e,r,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function FY(e,t){return new VY({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():r6(t)}})}const BY=ke("ZodPrefault",(e,t)=>{hG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>PK(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function HY(e,t){return new BY({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():r6(t)}})}const P6=ke("ZodNonOptional",(e,t)=>{pG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>zK(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function GY(e,t){return new P6({type:"nonoptional",innerType:e,...pt(t)})}const KY=ke("ZodCatch",(e,t)=>{mG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>IK(e,r,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function YY(e,t){return new KY({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const ZY=ke("ZodPipe",(e,t)=>{gG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>LK(e,r,i,s),e.in=t.in,e.out=t.out});function vC(e,t){return new ZY({type:"pipe",in:e,out:t})}const XY=ke("ZodReadonly",(e,t)=>{yG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>UK(e,r,i,s),e.unwrap=()=>e._zod.def.innerType});function QY(e){return new XY({type:"readonly",innerType:e})}const I6=ke("ZodCustom",(e,t)=>{vG.init(e,t),Cr.init(e,t),e._zod.processJSONSchema=(r,i,s)=>OK(e,r)});function WY(e,t){return dK(I6,e??(()=>!0),t)}function JY(e,t={}){return hK(I6,e,t)}function eZ(e){return pK(e)}function L6(e,t){return vC(z6(e),t)}const tZ={custom:"custom"};function nZ(e){return KG(wR,e)}const FE="2025-11-25",rZ=[FE,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],hp="io.modelcontextprotocol/related-task",BE="2.0",bi=WY(e=>e!==null&&(typeof e=="object"||typeof e=="function")),U6=Or([Ee(),Un().int()]),q6=Ee();vi({ttl:Or([Un(),j6()]).optional(),pollInterval:Un().optional()});const aZ=We({ttl:Un().optional()}),iZ=We({taskId:Ee()}),xR=vi({progressToken:U6.optional(),[hp]:iZ.optional()}),os=We({_meta:xR.optional()}),j1=os.extend({task:aZ.optional()}),oZ=e=>j1.safeParse(e).success,wi=We({method:Ee(),params:os.loose().optional()}),_s=We({_meta:xR.optional()}),Ts=We({method:Ee(),params:_s.loose().optional()}),Ei=vi({_meta:xR.optional()}),HE=Or([Ee(),Un().int()]),V6=We({jsonrpc:vt(BE),id:HE,...wi.shape}).strict(),bC=e=>V6.safeParse(e).success,F6=We({jsonrpc:vt(BE),...Ts.shape}).strict(),sZ=e=>F6.safeParse(e).success,_R=We({jsonrpc:vt(BE),id:HE,result:Ei}).strict(),Mb=e=>_R.safeParse(e).success;var Ut;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(Ut||(Ut={}));const TR=We({jsonrpc:vt(BE),id:HE.optional(),error:We({code:Un().int(),message:Ee(),data:Pr().optional()})}).strict(),lZ=e=>TR.safeParse(e).success,d2=Or([V6,F6,_R,TR]);Or([_R,TR]);const $m=Ei.strict(),uZ=_s.extend({requestId:HE.optional(),reason:Ee().optional()}),CR=Ts.extend({method:vt("notifications/cancelled"),params:uZ}),cZ=We({src:Ee(),mimeType:Ee().optional(),sizes:Ye(Ee()).optional(),theme:is(["light","dark"]).optional()}),k1=We({icons:Ye(cZ).optional()}),sg=We({name:Ee(),title:Ee().optional()}),B6=sg.extend({...sg.shape,...k1.shape,version:Ee(),websiteUrl:Ee().optional(),description:Ee().optional()}),fZ=ER(We({applyDefaults:xr().optional()}),Ir(Ee(),Pr())),dZ=L6(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ER(We({form:fZ.optional(),url:bi.optional()}),Ir(Ee(),Pr()).optional())),hZ=vi({list:bi.optional(),cancel:bi.optional(),requests:vi({sampling:vi({createMessage:bi.optional()}).optional(),elicitation:vi({create:bi.optional()}).optional()}).optional()}),pZ=vi({list:bi.optional(),cancel:bi.optional(),requests:vi({tools:vi({call:bi.optional()}).optional()}).optional()}),mZ=We({experimental:Ir(Ee(),bi).optional(),sampling:We({context:bi.optional(),tools:bi.optional()}).optional(),elicitation:dZ.optional(),roots:We({listChanged:xr().optional()}).optional(),tasks:hZ.optional()}),gZ=os.extend({protocolVersion:Ee(),capabilities:mZ,clientInfo:B6}),yZ=wi.extend({method:vt("initialize"),params:gZ}),vZ=We({experimental:Ir(Ee(),bi).optional(),logging:bi.optional(),completions:bi.optional(),prompts:We({listChanged:xr().optional()}).optional(),resources:We({subscribe:xr().optional(),listChanged:xr().optional()}).optional(),tools:We({listChanged:xr().optional()}).optional(),tasks:pZ.optional()}),H6=Ei.extend({protocolVersion:Ee(),capabilities:vZ,serverInfo:B6,instructions:Ee().optional()}),G6=Ts.extend({method:vt("notifications/initialized"),params:_s.optional()}),bZ=e=>G6.safeParse(e).success,OR=wi.extend({method:vt("ping"),params:os.optional()}),SZ=We({progress:Un(),total:Zr(Un()),message:Zr(Ee())}),wZ=We({..._s.shape,...SZ.shape,progressToken:U6}),RR=Ts.extend({method:vt("notifications/progress"),params:wZ}),EZ=os.extend({cursor:q6.optional()}),D1=wi.extend({params:EZ.optional()}),N1=Ei.extend({nextCursor:q6.optional()}),xZ=is(["working","input_required","completed","failed","cancelled"]),z1=We({taskId:Ee(),status:xZ,ttl:Or([Un(),j6()]),createdAt:Ee(),lastUpdatedAt:Ee(),pollInterval:Zr(Un()),statusMessage:Zr(Ee())}),o1=Ei.extend({task:z1}),_Z=_s.merge(z1),aE=Ts.extend({method:vt("notifications/tasks/status"),params:_Z}),AR=wi.extend({method:vt("tasks/get"),params:os.extend({taskId:Ee()})}),MR=Ei.merge(z1),jR=wi.extend({method:vt("tasks/result"),params:os.extend({taskId:Ee()})});Ei.loose();const kR=D1.extend({method:vt("tasks/list")}),DR=N1.extend({tasks:Ye(z1)}),NR=wi.extend({method:vt("tasks/cancel"),params:os.extend({taskId:Ee()})}),TZ=Ei.merge(z1),K6=We({uri:Ee(),mimeType:Zr(Ee()),_meta:Ir(Ee(),Pr()).optional()}),Y6=K6.extend({text:Ee()}),zR=Ee().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Z6=K6.extend({blob:zR}),$1=is(["user","assistant"]),Og=We({audience:Ye($1).optional(),priority:Un().min(0).max(1).optional(),lastModified:R6({offset:!0}).optional()}),X6=We({...sg.shape,...k1.shape,uri:Ee(),description:Zr(Ee()),mimeType:Zr(Ee()),annotations:Og.optional(),_meta:Zr(vi({}))}),CZ=We({...sg.shape,...k1.shape,uriTemplate:Ee(),description:Zr(Ee()),mimeType:Zr(Ee()),annotations:Og.optional(),_meta:Zr(vi({}))}),OZ=D1.extend({method:vt("resources/list")}),Q6=N1.extend({resources:Ye(X6)}),RZ=D1.extend({method:vt("resources/templates/list")}),W6=N1.extend({resourceTemplates:Ye(CZ)}),$R=os.extend({uri:Ee()}),AZ=$R,MZ=wi.extend({method:vt("resources/read"),params:AZ}),J6=Ei.extend({contents:Ye(Or([Y6,Z6]))}),e9=Ts.extend({method:vt("notifications/resources/list_changed"),params:_s.optional()}),jZ=$R,kZ=wi.extend({method:vt("resources/subscribe"),params:jZ}),DZ=$R,NZ=wi.extend({method:vt("resources/unsubscribe"),params:DZ}),zZ=_s.extend({uri:Ee()}),$Z=Ts.extend({method:vt("notifications/resources/updated"),params:zZ}),PZ=We({name:Ee(),description:Zr(Ee()),required:Zr(xr())}),IZ=We({...sg.shape,...k1.shape,description:Zr(Ee()),arguments:Zr(Ye(PZ)),_meta:Zr(vi({}))}),LZ=D1.extend({method:vt("prompts/list")}),t9=N1.extend({prompts:Ye(IZ)}),UZ=os.extend({name:Ee(),arguments:Ir(Ee(),Ee()).optional()}),qZ=wi.extend({method:vt("prompts/get"),params:UZ}),PR=We({type:vt("text"),text:Ee(),annotations:Og.optional(),_meta:Ir(Ee(),Pr()).optional()}),IR=We({type:vt("image"),data:zR,mimeType:Ee(),annotations:Og.optional(),_meta:Ir(Ee(),Pr()).optional()}),LR=We({type:vt("audio"),data:zR,mimeType:Ee(),annotations:Og.optional(),_meta:Ir(Ee(),Pr()).optional()}),VZ=We({type:vt("tool_use"),name:Ee(),id:Ee(),input:Ir(Ee(),Pr()),_meta:Ir(Ee(),Pr()).optional()}),FZ=We({type:vt("resource"),resource:Or([Y6,Z6]),annotations:Og.optional(),_meta:Ir(Ee(),Pr()).optional()}),BZ=X6.extend({type:vt("resource_link")}),UR=Or([PR,IR,LR,BZ,FZ]),HZ=We({role:$1,content:UR}),n9=Ei.extend({description:Ee().optional(),messages:Ye(HZ)}),r9=Ts.extend({method:vt("notifications/prompts/list_changed"),params:_s.optional()}),GZ=We({title:Ee().optional(),readOnlyHint:xr().optional(),destructiveHint:xr().optional(),idempotentHint:xr().optional(),openWorldHint:xr().optional()}),KZ=We({taskSupport:is(["required","optional","forbidden"]).optional()}),a9=We({...sg.shape,...k1.shape,description:Ee().optional(),inputSchema:We({type:vt("object"),properties:Ir(Ee(),bi).optional(),required:Ye(Ee()).optional()}).catchall(Pr()),outputSchema:We({type:vt("object"),properties:Ir(Ee(),bi).optional(),required:Ye(Ee()).optional()}).catchall(Pr()).optional(),annotations:GZ.optional(),execution:KZ.optional(),_meta:Ir(Ee(),Pr()).optional()}),YZ=D1.extend({method:vt("tools/list")}),i9=N1.extend({tools:Ye(a9)}),GE=Ei.extend({content:Ye(UR).default([]),structuredContent:Ir(Ee(),Pr()).optional(),isError:xr().optional()});GE.or(Ei.extend({toolResult:Pr()}));const ZZ=j1.extend({name:Ee(),arguments:Ir(Ee(),Pr()).optional()}),XZ=wi.extend({method:vt("tools/call"),params:ZZ}),o9=Ts.extend({method:vt("notifications/tools/list_changed"),params:_s.optional()}),QZ=We({autoRefresh:xr().default(!0),debounceMs:Un().int().nonnegative().default(300)}),s9=is(["debug","info","notice","warning","error","critical","alert","emergency"]),WZ=os.extend({level:s9}),JZ=wi.extend({method:vt("logging/setLevel"),params:WZ}),eX=_s.extend({level:s9,logger:Ee().optional(),data:Pr()}),tX=Ts.extend({method:vt("notifications/message"),params:eX}),nX=We({name:Ee().optional()}),rX=We({hints:Ye(nX).optional(),costPriority:Un().min(0).max(1).optional(),speedPriority:Un().min(0).max(1).optional(),intelligencePriority:Un().min(0).max(1).optional()}),aX=We({mode:is(["auto","required","none"]).optional()}),iX=We({type:vt("tool_result"),toolUseId:Ee().describe("The unique identifier for the corresponding tool call."),content:Ye(UR).default([]),structuredContent:We({}).loose().optional(),isError:xr().optional(),_meta:Ir(Ee(),Pr()).optional()}),oX=N6("type",[PR,IR,LR]),iE=N6("type",[PR,IR,LR,VZ,iX]),sX=We({role:$1,content:Or([iE,Ye(iE)]),_meta:Ir(Ee(),Pr()).optional()}),lX=j1.extend({messages:Ye(sX),modelPreferences:rX.optional(),systemPrompt:Ee().optional(),includeContext:is(["none","thisServer","allServers"]).optional(),temperature:Un().optional(),maxTokens:Un().int(),stopSequences:Ye(Ee()).optional(),metadata:bi.optional(),tools:Ye(a9).optional(),toolChoice:aX.optional()}),l9=wi.extend({method:vt("sampling/createMessage"),params:lX}),u9=Ei.extend({model:Ee(),stopReason:Zr(is(["endTurn","stopSequence","maxTokens"]).or(Ee())),role:$1,content:oX}),c9=Ei.extend({model:Ee(),stopReason:Zr(is(["endTurn","stopSequence","maxTokens","toolUse"]).or(Ee())),role:$1,content:Or([iE,Ye(iE)])}),uX=We({type:vt("boolean"),title:Ee().optional(),description:Ee().optional(),default:xr().optional()}),cX=We({type:vt("string"),title:Ee().optional(),description:Ee().optional(),minLength:Un().optional(),maxLength:Un().optional(),format:is(["email","uri","date","date-time"]).optional(),default:Ee().optional()}),fX=We({type:is(["number","integer"]),title:Ee().optional(),description:Ee().optional(),minimum:Un().optional(),maximum:Un().optional(),default:Un().optional()}),dX=We({type:vt("string"),title:Ee().optional(),description:Ee().optional(),enum:Ye(Ee()),default:Ee().optional()}),hX=We({type:vt("string"),title:Ee().optional(),description:Ee().optional(),oneOf:Ye(We({const:Ee(),title:Ee()})),default:Ee().optional()}),pX=We({type:vt("string"),title:Ee().optional(),description:Ee().optional(),enum:Ye(Ee()),enumNames:Ye(Ee()).optional(),default:Ee().optional()}),mX=Or([dX,hX]),gX=We({type:vt("array"),title:Ee().optional(),description:Ee().optional(),minItems:Un().optional(),maxItems:Un().optional(),items:We({type:vt("string"),enum:Ye(Ee())}),default:Ye(Ee()).optional()}),yX=We({type:vt("array"),title:Ee().optional(),description:Ee().optional(),minItems:Un().optional(),maxItems:Un().optional(),items:We({anyOf:Ye(We({const:Ee(),title:Ee()}))}),default:Ye(Ee()).optional()}),vX=Or([gX,yX]),bX=Or([pX,mX,vX]),SX=Or([bX,uX,cX,fX]),wX=j1.extend({mode:vt("form").optional(),message:Ee(),requestedSchema:We({type:vt("object"),properties:Ir(Ee(),SX),required:Ye(Ee()).optional()})}),EX=j1.extend({mode:vt("url"),message:Ee(),elicitationId:Ee(),url:Ee().url()}),xX=Or([wX,EX]),f9=wi.extend({method:vt("elicitation/create"),params:xX}),_X=_s.extend({elicitationId:Ee()}),TX=Ts.extend({method:vt("notifications/elicitation/complete"),params:_X}),d9=Ei.extend({action:is(["accept","decline","cancel"]),content:L6(e=>e===null?void 0:e,Ir(Ee(),Or([Ee(),Un(),xr(),Ye(Ee())])).optional())}),CX=We({type:vt("ref/resource"),uri:Ee()}),OX=We({type:vt("ref/prompt"),name:Ee()}),RX=os.extend({ref:Or([OX,CX]),argument:We({name:Ee(),value:Ee()}),context:We({arguments:Ir(Ee(),Ee()).optional()}).optional()}),AX=wi.extend({method:vt("completion/complete"),params:RX}),h9=Ei.extend({completion:vi({values:Ye(Ee()).max(100),total:Zr(Un().int()),hasMore:Zr(xr())})}),MX=We({uri:Ee().startsWith("file://"),name:Ee().optional(),_meta:Ir(Ee(),Pr()).optional()}),jX=wi.extend({method:vt("roots/list"),params:os.optional()}),kX=Ei.extend({roots:Ye(MX)}),DX=Ts.extend({method:vt("notifications/roots/list_changed"),params:_s.optional()});Or([OR,yZ,AX,JZ,qZ,LZ,OZ,RZ,MZ,kZ,NZ,XZ,YZ,AR,jR,kR,NR]);Or([CR,RR,G6,DX,aE]);Or([$m,u9,c9,d9,kX,MR,DR,o1]);Or([OR,l9,f9,jX,AR,jR,kR,NR]);Or([CR,RR,tX,$Z,e9,o9,r9,aE,TX]);Or([$m,H6,h9,n9,t9,Q6,W6,J6,GE,i9,MR,DR,o1]);class Ot extends Error{constructor(t,r,i){super(`MCP error ${t}: ${r}`),this.code=t,this.data=i,this.name="McpError"}static fromError(t,r,i){if(t===Ut.UrlElicitationRequired&&i){const s=i;if(s.elicitations)return new NX(s.elicitations,r)}return new Ot(t,r,i)}}class NX extends Ot{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(Ut.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}const gi=uY().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:tZ.custom,message:"URL must be parseable",fatal:!0}),hB}).refine(e=>{const t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),zX=vi({resource:Ee().url(),authorization_servers:Ye(gi).optional(),jwks_uri:Ee().url().optional(),scopes_supported:Ye(Ee()).optional(),bearer_methods_supported:Ye(Ee()).optional(),resource_signing_alg_values_supported:Ye(Ee()).optional(),resource_name:Ee().optional(),resource_documentation:Ee().optional(),resource_policy_uri:Ee().url().optional(),resource_tos_uri:Ee().url().optional(),tls_client_certificate_bound_access_tokens:xr().optional(),authorization_details_types_supported:Ye(Ee()).optional(),dpop_signing_alg_values_supported:Ye(Ee()).optional(),dpop_bound_access_tokens_required:xr().optional()}),p9=vi({issuer:Ee(),authorization_endpoint:gi,token_endpoint:gi,registration_endpoint:gi.optional(),scopes_supported:Ye(Ee()).optional(),response_types_supported:Ye(Ee()),response_modes_supported:Ye(Ee()).optional(),grant_types_supported:Ye(Ee()).optional(),token_endpoint_auth_methods_supported:Ye(Ee()).optional(),token_endpoint_auth_signing_alg_values_supported:Ye(Ee()).optional(),service_documentation:gi.optional(),revocation_endpoint:gi.optional(),revocation_endpoint_auth_methods_supported:Ye(Ee()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Ye(Ee()).optional(),introspection_endpoint:Ee().optional(),introspection_endpoint_auth_methods_supported:Ye(Ee()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Ye(Ee()).optional(),code_challenge_methods_supported:Ye(Ee()).optional(),client_id_metadata_document_supported:xr().optional()}),$X=vi({issuer:Ee(),authorization_endpoint:gi,token_endpoint:gi,userinfo_endpoint:gi.optional(),jwks_uri:gi,registration_endpoint:gi.optional(),scopes_supported:Ye(Ee()).optional(),response_types_supported:Ye(Ee()),response_modes_supported:Ye(Ee()).optional(),grant_types_supported:Ye(Ee()).optional(),acr_values_supported:Ye(Ee()).optional(),subject_types_supported:Ye(Ee()),id_token_signing_alg_values_supported:Ye(Ee()),id_token_encryption_alg_values_supported:Ye(Ee()).optional(),id_token_encryption_enc_values_supported:Ye(Ee()).optional(),userinfo_signing_alg_values_supported:Ye(Ee()).optional(),userinfo_encryption_alg_values_supported:Ye(Ee()).optional(),userinfo_encryption_enc_values_supported:Ye(Ee()).optional(),request_object_signing_alg_values_supported:Ye(Ee()).optional(),request_object_encryption_alg_values_supported:Ye(Ee()).optional(),request_object_encryption_enc_values_supported:Ye(Ee()).optional(),token_endpoint_auth_methods_supported:Ye(Ee()).optional(),token_endpoint_auth_signing_alg_values_supported:Ye(Ee()).optional(),display_values_supported:Ye(Ee()).optional(),claim_types_supported:Ye(Ee()).optional(),claims_supported:Ye(Ee()).optional(),service_documentation:Ee().optional(),claims_locales_supported:Ye(Ee()).optional(),ui_locales_supported:Ye(Ee()).optional(),claims_parameter_supported:xr().optional(),request_parameter_supported:xr().optional(),request_uri_parameter_supported:xr().optional(),require_request_uri_registration:xr().optional(),op_policy_uri:gi.optional(),op_tos_uri:gi.optional(),client_id_metadata_document_supported:xr().optional()}),PX=We({...$X.shape,...p9.pick({code_challenge_methods_supported:!0}).shape}),IX=We({access_token:Ee(),id_token:Ee().optional(),token_type:Ee(),expires_in:nZ().optional(),scope:Ee().optional(),refresh_token:Ee().optional()}).strip(),LX=We({error:Ee(),error_description:Ee().optional(),error_uri:Ee().optional()}),m3=gi.optional().or(vt("").transform(()=>{})),UX=We({redirect_uris:Ye(gi),token_endpoint_auth_method:Ee().optional(),grant_types:Ye(Ee()).optional(),response_types:Ye(Ee()).optional(),client_name:Ee().optional(),client_uri:gi.optional(),logo_uri:m3,scope:Ee().optional(),contacts:Ye(Ee()).optional(),tos_uri:m3,policy_uri:Ee().optional(),jwks_uri:gi.optional(),jwks:AY().optional(),software_id:Ee().optional(),software_version:Ee().optional(),software_statement:Ee().optional()}).strip(),qX=We({client_id:Ee(),client_secret:Ee().optional(),client_id_issued_at:Un().optional(),client_secret_expires_at:Un().optional()}).strip(),VX=UX.merge(qX);We({error:Ee(),error_description:Ee().optional()}).strip();We({token:Ee(),token_type_hint:Ee().optional()}).strip();function FX(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function BX({requestedResource:e,configuredResource:t}){const r=typeof e=="string"?new URL(e):new URL(e.href),i=typeof t=="string"?new URL(t):new URL(t.href);if(r.origin!==i.origin||r.pathname.length<i.pathname.length)return!1;const s=r.pathname.endsWith("/")?r.pathname:r.pathname+"/",l=i.pathname.endsWith("/")?i.pathname:i.pathname+"/";return s.startsWith(l)}class La extends Error{constructor(t,r){super(t),this.errorUri=r,this.name=this.constructor.name}toResponseObject(){const t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}}class SC extends La{}SC.errorCode="invalid_request";class oE extends La{}oE.errorCode="invalid_client";class sE extends La{}sE.errorCode="invalid_grant";class lE extends La{}lE.errorCode="unauthorized_client";class wC extends La{}wC.errorCode="unsupported_grant_type";class EC extends La{}EC.errorCode="invalid_scope";class xC extends La{}xC.errorCode="access_denied";class lg extends La{}lg.errorCode="server_error";class _C extends La{}_C.errorCode="temporarily_unavailable";class TC extends La{}TC.errorCode="unsupported_response_type";class CC extends La{}CC.errorCode="unsupported_token_type";class OC extends La{}OC.errorCode="invalid_token";class RC extends La{}RC.errorCode="method_not_allowed";class AC extends La{}AC.errorCode="too_many_requests";class uE extends La{}uE.errorCode="invalid_client_metadata";class MC extends La{}MC.errorCode="insufficient_scope";class jC extends La{}jC.errorCode="invalid_target";const HX={[SC.errorCode]:SC,[oE.errorCode]:oE,[sE.errorCode]:sE,[lE.errorCode]:lE,[wC.errorCode]:wC,[EC.errorCode]:EC,[xC.errorCode]:xC,[lg.errorCode]:lg,[_C.errorCode]:_C,[TC.errorCode]:TC,[CC.errorCode]:CC,[OC.errorCode]:OC,[RC.errorCode]:RC,[AC.errorCode]:AC,[uE.errorCode]:uE,[MC.errorCode]:MC,[jC.errorCode]:jC};class pp extends Error{constructor(t){super(t??"Unauthorized")}}function GX(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const h2="code",p2="S256";function KX(e,t){const r=e.client_secret!==void 0;return t.length===0?r?"client_secret_post":"none":"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&GX(e.token_endpoint_auth_method)&&t.includes(e.token_endpoint_auth_method)?e.token_endpoint_auth_method:r&&t.includes("client_secret_basic")?"client_secret_basic":r&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":r?"client_secret_post":"none"}function YX(e,t,r,i){const{client_id:s,client_secret:l}=t;switch(e){case"client_secret_basic":ZX(s,l,r);return;case"client_secret_post":XX(s,l,i);return;case"none":QX(s,i);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function ZX(e,t,r){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const i=btoa(`${e}:${t}`);r.set("Authorization",`Basic ${i}`)}function XX(e,t,r){r.set("client_id",e),t&&r.set("client_secret",t)}function QX(e,t){t.set("client_id",e)}async function m9(e){const t=e instanceof Response?e.status:void 0,r=e instanceof Response?await e.text():e;try{const i=LX.parse(JSON.parse(r)),{error:s,error_description:l,error_uri:c}=i,f=HX[s]||lg;return new f(l||"",c)}catch(i){const s=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${i}. Raw body: ${r}`;return new lg(s)}}async function jb(e,t){try{return await m2(e,t)}catch(r){if(r instanceof oE||r instanceof lE)return await e.invalidateCredentials?.("all"),await m2(e,t);if(r instanceof sE)return await e.invalidateCredentials?.("tokens"),await m2(e,t);throw r}}async function m2(e,{serverUrl:t,authorizationCode:r,scope:i,resourceMetadataUrl:s,fetchFn:l}){const c=await e.discoveryState?.();let f,d,h,m=s;if(!m&&c?.resourceMetadataUrl&&(m=new URL(c.resourceMetadataUrl)),c?.authorizationServerUrl){if(d=c.authorizationServerUrl,f=c.resourceMetadata,h=c.authorizationServerMetadata??await g9(d,{fetchFn:l}),!f)try{f=await qR(t,{resourceMetadataUrl:m},l)}catch{}(h!==c.authorizationServerMetadata||f!==c.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(d),resourceMetadataUrl:m?.toString(),resourceMetadata:f,authorizationServerMetadata:h})}else{const E=await aQ(t,{resourceMetadataUrl:m,fetchFn:l});d=E.authorizationServerUrl,h=E.authorizationServerMetadata,f=E.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(d),resourceMetadataUrl:m?.toString(),resourceMetadata:f,authorizationServerMetadata:h})}const g=await JX(t,e,f);let v=await Promise.resolve(e.clientInformation());if(!v){if(r!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const E=h?.client_id_metadata_document_supported===!0,R=e.clientMetadataUrl;if(R&&!WX(R))throw new uE(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${R}`);if(E&&R)v={client_id:R},await e.saveClientInformation?.(v);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const C=await uQ(d,{metadata:h,clientMetadata:e.clientMetadata,fetchFn:l});await e.saveClientInformation(C),v=C}}const _=!e.redirectUrl;if(r!==void 0||_){const E=await lQ(e,d,{metadata:h,resource:g,authorizationCode:r,fetchFn:l});return await e.saveTokens(E),"AUTHORIZED"}const b=await e.tokens();if(b?.refresh_token)try{const E=await sQ(d,{metadata:h,clientInformation:v,refreshToken:b.refresh_token,resource:g,addClientAuthentication:e.addClientAuthentication,fetchFn:l});return await e.saveTokens(E),"AUTHORIZED"}catch(E){if(!(!(E instanceof La)||E instanceof lg))throw E}const S=e.state?await e.state():void 0,{authorizationUrl:w,codeVerifier:x}=await iQ(d,{metadata:h,clientInformation:v,state:S,redirectUrl:e.redirectUrl,scope:i||f?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:g});return await e.saveCodeVerifier(x),await e.redirectToAuthorization(w),"REDIRECT"}function WX(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function JX(e,t,r){const i=FX(e);if(t.validateResourceURL)return await t.validateResourceURL(i,r?.resource);if(r){if(!BX({requestedResource:i,configuredResource:r.resource}))throw new Error(`Protected resource ${r.resource} does not match expected ${i} (or origin)`);return new URL(r.resource)}}function g3(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[r,i]=t.split(" ");if(r.toLowerCase()!=="bearer"||!i)return{};const s=g2(e,"resource_metadata")||void 0;let l;if(s)try{l=new URL(s)}catch{}const c=g2(e,"scope")||void 0,f=g2(e,"error")||void 0;return{resourceMetadataUrl:l,scope:c,error:f}}function g2(e,t){const r=e.headers.get("WWW-Authenticate");if(!r)return null;const i=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),s=r.match(i);return s?s[1]||s[2]:null}async function qR(e,t,r=fetch){const i=await nQ(e,"oauth-protected-resource",r,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!i||i.status===404)throw await i?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!i.ok)throw await i.body?.cancel(),new Error(`HTTP ${i.status} trying to load well-known OAuth protected resource metadata.`);return zX.parse(await i.json())}async function VR(e,t,r=fetch){try{return await r(e,{headers:t})}catch(i){if(i instanceof TypeError)return t?VR(e,void 0,r):void 0;throw i}}function eQ(e,t="",r={}){return t.endsWith("/")&&(t=t.slice(0,-1)),r.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function y3(e,t,r=fetch){return await VR(e,{"MCP-Protocol-Version":t},r)}function tQ(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function nQ(e,t,r,i){const s=new URL(e),l=i?.protocolVersion??FE;let c;if(i?.metadataUrl)c=new URL(i.metadataUrl);else{const d=eQ(t,s.pathname);c=new URL(d,i?.metadataServerUrl??s),c.search=s.search}let f=await y3(c,l,r);if(!i?.metadataUrl&&tQ(f,s.pathname)){const d=new URL(`/.well-known/${t}`,s);f=await y3(d,l,r)}return f}function rQ(e){const t=typeof e=="string"?new URL(e):e,r=t.pathname!=="/",i=[];if(!r)return i.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),i.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),i;let s=t.pathname;return s.endsWith("/")&&(s=s.slice(0,-1)),i.push({url:new URL(`/.well-known/oauth-authorization-server${s}`,t.origin),type:"oauth"}),i.push({url:new URL(`/.well-known/openid-configuration${s}`,t.origin),type:"oidc"}),i.push({url:new URL(`${s}/.well-known/openid-configuration`,t.origin),type:"oidc"}),i}async function g9(e,{fetchFn:t=fetch,protocolVersion:r=FE}={}){const i={"MCP-Protocol-Version":r,Accept:"application/json"},s=rQ(e);for(const{url:l,type:c}of s){const f=await VR(l,i,t);if(f){if(!f.ok){if(await f.body?.cancel(),f.status>=400&&f.status<500)continue;throw new Error(`HTTP ${f.status} trying to load ${c==="oauth"?"OAuth":"OpenID provider"} metadata from ${l}`)}return c==="oauth"?p9.parse(await f.json()):PX.parse(await f.json())}}}async function aQ(e,t){let r,i;try{r=await qR(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),r.authorization_servers&&r.authorization_servers.length>0&&(i=r.authorization_servers[0])}catch{}i||(i=String(new URL("/",e)));const s=await g9(i,{fetchFn:t?.fetchFn});return{authorizationServerUrl:i,authorizationServerMetadata:s,resourceMetadata:r}}async function iQ(e,{metadata:t,clientInformation:r,redirectUrl:i,scope:s,state:l,resource:c}){let f;if(t){if(f=new URL(t.authorization_endpoint),!t.response_types_supported.includes(h2))throw new Error(`Incompatible auth server: does not support response type ${h2}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(p2))throw new Error(`Incompatible auth server: does not support code challenge method ${p2}`)}else f=new URL("/authorize",e);const d=await dB(),h=d.code_verifier,m=d.code_challenge;return f.searchParams.set("response_type",h2),f.searchParams.set("client_id",r.client_id),f.searchParams.set("code_challenge",m),f.searchParams.set("code_challenge_method",p2),f.searchParams.set("redirect_uri",String(i)),l&&f.searchParams.set("state",l),s&&f.searchParams.set("scope",s),s?.includes("offline_access")&&f.searchParams.append("prompt","consent"),c&&f.searchParams.set("resource",c.href),{authorizationUrl:f,codeVerifier:h}}function oQ(e,t,r){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(r)})}async function y9(e,{metadata:t,tokenRequestParams:r,clientInformation:i,addClientAuthentication:s,resource:l,fetchFn:c}){const f=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),d=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(l&&r.set("resource",l.href),s)await s(d,r,f,t);else if(i){const m=t?.token_endpoint_auth_methods_supported??[],g=KX(i,m);YX(g,i,d,r)}const h=await(c??fetch)(f,{method:"POST",headers:d,body:r});if(!h.ok)throw await m9(h);return IX.parse(await h.json())}async function sQ(e,{metadata:t,clientInformation:r,refreshToken:i,resource:s,addClientAuthentication:l,fetchFn:c}){const f=new URLSearchParams({grant_type:"refresh_token",refresh_token:i}),d=await y9(e,{metadata:t,tokenRequestParams:f,clientInformation:r,addClientAuthentication:l,resource:s,fetchFn:c});return{refresh_token:i,...d}}async function lQ(e,t,{metadata:r,resource:i,authorizationCode:s,fetchFn:l}={}){const c=e.clientMetadata.scope;let f;if(e.prepareTokenRequest&&(f=await e.prepareTokenRequest(c)),!f){if(!s)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const h=await e.codeVerifier();f=oQ(s,h,e.redirectUrl)}const d=await e.clientInformation();return y9(t,{metadata:r,tokenRequestParams:f,clientInformation:d??void 0,addClientAuthentication:e.addClientAuthentication,resource:i,fetchFn:l})}async function uQ(e,{metadata:t,clientMetadata:r,fetchFn:i}){let s;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");s=new URL(t.registration_endpoint)}else s=new URL("/register",e);const l=await(i??fetch)(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!l.ok)throw await m9(l);return VX.parse(await l.json())}var v9=typeof global=="object"&&global&&global.Object===Object&&global,cQ=typeof self=="object"&&self&&self.Object===Object&&self,nu=v9||cQ||Function("return this")(),vs=nu.Symbol,b9=Object.prototype,fQ=b9.hasOwnProperty,dQ=b9.toString,gb=vs?vs.toStringTag:void 0;function hQ(e){var t=fQ.call(e,gb),r=e[gb];try{e[gb]=void 0;var i=!0}catch{}var s=dQ.call(e);return i&&(t?e[gb]=r:delete e[gb]),s}var pQ=Object.prototype,mQ=pQ.toString;function gQ(e){return mQ.call(e)}var yQ="[object Null]",vQ="[object Undefined]",v3=vs?vs.toStringTag:void 0;function Lc(e){return e==null?e===void 0?vQ:yQ:v3&&v3 in Object(e)?hQ(e):gQ(e)}function bs(e){return e!=null&&typeof e=="object"}var bQ="[object Symbol]";function P1(e){return typeof e=="symbol"||bs(e)&&Lc(e)==bQ}function Rg(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r<i;)s[r]=t(e[r],r,e);return s}var Na=Array.isArray,b3=vs?vs.prototype:void 0,S3=b3?b3.toString:void 0;function S9(e){if(typeof e=="string")return e;if(Na(e))return Rg(e,S9)+"";if(P1(e))return S3?S3.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var SQ=/\s/;function wQ(e){for(var t=e.length;t--&&SQ.test(e.charAt(t)););return t}var EQ=/^\s+/;function xQ(e){return e&&e.slice(0,wQ(e)+1).replace(EQ,"")}function En(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var w3=NaN,_Q=/^[-+]0x[0-9a-f]+$/i,TQ=/^0b[01]+$/i,CQ=/^0o[0-7]+$/i,OQ=parseInt;function RQ(e){if(typeof e=="number")return e;if(P1(e))return w3;if(En(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=En(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=xQ(e);var r=TQ.test(e);return r||CQ.test(e)?OQ(e.slice(2),r?2:8):_Q.test(e)?w3:+e}var E3=1/0,AQ=17976931348623157e292;function MQ(e){if(!e)return e===0?e:0;if(e=RQ(e),e===E3||e===-E3){var t=e<0?-1:1;return t*AQ}return e===e?e:0}function w9(e){var t=MQ(e),r=t%1;return t===t?r?t-r:t:0}function KE(e){return e}var jQ="[object AsyncFunction]",kQ="[object Function]",DQ="[object GeneratorFunction]",NQ="[object Proxy]";function I1(e){if(!En(e))return!1;var t=Lc(e);return t==kQ||t==DQ||t==jQ||t==NQ}var y2=nu["__core-js_shared__"],x3=(function(){var e=/[^.]+$/.exec(y2&&y2.keys&&y2.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function zQ(e){return!!x3&&x3 in e}var $Q=Function.prototype,PQ=$Q.toString;function Fp(e){if(e!=null){try{return PQ.call(e)}catch{}try{return e+""}catch{}}return""}var IQ=/[\\^$.*+?()[\]{}|]/g,LQ=/^\[object .+?Constructor\]$/,UQ=Function.prototype,qQ=Object.prototype,VQ=UQ.toString,FQ=qQ.hasOwnProperty,BQ=RegExp("^"+VQ.call(FQ).replace(IQ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function HQ(e){if(!En(e)||zQ(e))return!1;var t=I1(e)?BQ:LQ;return t.test(Fp(e))}function GQ(e,t){return e?.[t]}function Bp(e,t){var r=GQ(e,t);return HQ(r)?r:void 0}var kC=Bp(nu,"WeakMap"),_3=Object.create,E9=(function(){function e(){}return function(t){if(!En(t))return{};if(_3)return _3(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function KQ(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function jw(){}function FR(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var YQ=800,ZQ=16,XQ=Date.now;function QQ(e){var t=0,r=0;return function(){var i=XQ(),s=ZQ-(i-r);if(r=i,s>0){if(++t>=YQ)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function WQ(e){return function(){return e}}var cE=(function(){try{var e=Bp(Object,"defineProperty");return e({},"",{}),e}catch{}})(),JQ=cE?function(e,t){return cE(e,"toString",{configurable:!0,enumerable:!1,value:WQ(t),writable:!0})}:KE,x9=QQ(JQ);function BR(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function eW(e,t,r,i){for(var s=e.length,l=r+-1;++l<s;)if(t(e[l],l,e))return l;return-1}function tW(e){return e!==e}function nW(e,t,r){for(var i=r-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}function _9(e,t,r){return t===t?nW(e,t,r):eW(e,tW,r)}function HR(e,t){var r=e==null?0:e.length;return!!r&&_9(e,t,0)>-1}var rW=9007199254740991,aW=/^(?:0|[1-9]\d*)$/;function YE(e,t){var r=typeof e;return t=t??rW,!!t&&(r=="number"||r!="symbol"&&aW.test(e))&&e>-1&&e%1==0&&e<t}function GR(e,t,r){t=="__proto__"&&cE?cE(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function L1(e,t){return e===t||e!==e&&t!==t}var iW=Object.prototype,oW=iW.hasOwnProperty;function ZE(e,t,r){var i=e[t];(!(oW.call(e,t)&&L1(i,r))||r===void 0&&!(t in e))&&GR(e,t,r)}function Hp(e,t,r,i){var s=!r;r||(r={});for(var l=-1,c=t.length;++l<c;){var f=t[l],d=void 0;d===void 0&&(d=e[f]),s?GR(r,f,d):ZE(r,f,d)}return r}var T3=Math.max;function T9(e,t,r){return t=T3(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,l=T3(i.length-t,0),c=Array(l);++s<l;)c[s]=i[t+s];s=-1;for(var f=Array(t+1);++s<t;)f[s]=i[s];return f[t]=r(c),KQ(e,this,f)}}function XE(e,t){return x9(T9(e,t,KE),e+"")}var sW=9007199254740991;function KR(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=sW}function Pf(e){return e!=null&&KR(e.length)&&!I1(e)}function lW(e,t,r){if(!En(r))return!1;var i=typeof t;return(i=="number"?Pf(r)&&YE(t,r.length):i=="string"&&t in r)?L1(r[t],e):!1}function C9(e){return XE(function(t,r){var i=-1,s=r.length,l=s>1?r[s-1]:void 0,c=s>2?r[2]:void 0;for(l=e.length>3&&typeof l=="function"?(s--,l):void 0,c&&lW(r[0],r[1],c)&&(l=s<3?void 0:l,s=1),t=Object(t);++i<s;){var f=r[i];f&&e(t,f,i,l)}return t})}var uW=Object.prototype;function U1(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||uW;return e===r}function O9(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var cW="[object Arguments]";function C3(e){return bs(e)&&Lc(e)==cW}var R9=Object.prototype,fW=R9.hasOwnProperty,dW=R9.propertyIsEnumerable,ug=C3((function(){return arguments})())?C3:function(e){return bs(e)&&fW.call(e,"callee")&&!dW.call(e,"callee")};function hW(){return!1}var A9=typeof ns=="object"&&ns&&!ns.nodeType&&ns,O3=A9&&typeof rs=="object"&&rs&&!rs.nodeType&&rs,pW=O3&&O3.exports===A9,R3=pW?nu.Buffer:void 0,mW=R3?R3.isBuffer:void 0,jp=mW||hW,gW="[object Arguments]",yW="[object Array]",vW="[object Boolean]",bW="[object Date]",SW="[object Error]",wW="[object Function]",EW="[object Map]",xW="[object Number]",_W="[object Object]",TW="[object RegExp]",CW="[object Set]",OW="[object String]",RW="[object WeakMap]",AW="[object ArrayBuffer]",MW="[object DataView]",jW="[object Float32Array]",kW="[object Float64Array]",DW="[object Int8Array]",NW="[object Int16Array]",zW="[object Int32Array]",$W="[object Uint8Array]",PW="[object Uint8ClampedArray]",IW="[object Uint16Array]",LW="[object Uint32Array]",Er={};Er[jW]=Er[kW]=Er[DW]=Er[NW]=Er[zW]=Er[$W]=Er[PW]=Er[IW]=Er[LW]=!0;Er[gW]=Er[yW]=Er[AW]=Er[vW]=Er[MW]=Er[bW]=Er[SW]=Er[wW]=Er[EW]=Er[xW]=Er[_W]=Er[TW]=Er[CW]=Er[OW]=Er[RW]=!1;function UW(e){return bs(e)&&KR(e.length)&&!!Er[Lc(e)]}function YR(e){return function(t){return e(t)}}var M9=typeof ns=="object"&&ns&&!ns.nodeType&&ns,Ub=M9&&typeof rs=="object"&&rs&&!rs.nodeType&&rs,qW=Ub&&Ub.exports===M9,v2=qW&&v9.process,cg=(function(){try{var e=Ub&&Ub.require&&Ub.require("util").types;return e||v2&&v2.binding&&v2.binding("util")}catch{}})(),A3=cg&&cg.isTypedArray,q1=A3?YR(A3):UW,VW=Object.prototype,FW=VW.hasOwnProperty;function j9(e,t){var r=Na(e),i=!r&&ug(e),s=!r&&!i&&jp(e),l=!r&&!i&&!s&&q1(e),c=r||i||s||l,f=c?O9(e.length,String):[],d=f.length;for(var h in e)(t||FW.call(e,h))&&!(c&&(h=="length"||s&&(h=="offset"||h=="parent")||l&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||YE(h,d)))&&f.push(h);return f}function k9(e,t){return function(r){return e(t(r))}}var BW=k9(Object.keys,Object),HW=Object.prototype,GW=HW.hasOwnProperty;function D9(e){if(!U1(e))return BW(e);var t=[];for(var r in Object(e))GW.call(e,r)&&r!="constructor"&&t.push(r);return t}function ps(e){return Pf(e)?j9(e):D9(e)}var KW=Object.prototype,YW=KW.hasOwnProperty,ZW=C9(function(e,t){if(U1(t)||Pf(t)){Hp(t,ps(t),e);return}for(var r in t)YW.call(t,r)&&ZE(e,r,t[r])});function XW(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var QW=Object.prototype,WW=QW.hasOwnProperty;function JW(e){if(!En(e))return XW(e);var t=U1(e),r=[];for(var i in e)i=="constructor"&&(t||!WW.call(e,i))||r.push(i);return r}function V1(e){return Pf(e)?j9(e,!0):JW(e)}var eJ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tJ=/^\w*$/;function ZR(e,t){if(Na(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||P1(e)?!0:tJ.test(e)||!eJ.test(e)||t!=null&&e in Object(t)}var s1=Bp(Object,"create");function nJ(){this.__data__=s1?s1(null):{},this.size=0}function rJ(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var aJ="__lodash_hash_undefined__",iJ=Object.prototype,oJ=iJ.hasOwnProperty;function sJ(e){var t=this.__data__;if(s1){var r=t[e];return r===aJ?void 0:r}return oJ.call(t,e)?t[e]:void 0}var lJ=Object.prototype,uJ=lJ.hasOwnProperty;function cJ(e){var t=this.__data__;return s1?t[e]!==void 0:uJ.call(t,e)}var fJ="__lodash_hash_undefined__";function dJ(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=s1&&t===void 0?fJ:t,this}function kp(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}kp.prototype.clear=nJ;kp.prototype.delete=rJ;kp.prototype.get=sJ;kp.prototype.has=cJ;kp.prototype.set=dJ;function hJ(){this.__data__=[],this.size=0}function QE(e,t){for(var r=e.length;r--;)if(L1(e[r][0],t))return r;return-1}var pJ=Array.prototype,mJ=pJ.splice;function gJ(e){var t=this.__data__,r=QE(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():mJ.call(t,r,1),--this.size,!0}function yJ(e){var t=this.__data__,r=QE(t,e);return r<0?void 0:t[r][1]}function vJ(e){return QE(this.__data__,e)>-1}function bJ(e,t){var r=this.__data__,i=QE(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Uc(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Uc.prototype.clear=hJ;Uc.prototype.delete=gJ;Uc.prototype.get=yJ;Uc.prototype.has=vJ;Uc.prototype.set=bJ;var l1=Bp(nu,"Map");function SJ(){this.size=0,this.__data__={hash:new kp,map:new(l1||Uc),string:new kp}}function wJ(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function WE(e,t){var r=e.__data__;return wJ(t)?r[typeof t=="string"?"string":"hash"]:r.map}function EJ(e){var t=WE(this,e).delete(e);return this.size-=t?1:0,t}function xJ(e){return WE(this,e).get(e)}function _J(e){return WE(this,e).has(e)}function TJ(e,t){var r=WE(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function qc(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}qc.prototype.clear=SJ;qc.prototype.delete=EJ;qc.prototype.get=xJ;qc.prototype.has=_J;qc.prototype.set=TJ;var CJ="Expected a function";function XR(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(CJ);var r=function(){var i=arguments,s=t?t.apply(this,i):i[0],l=r.cache;if(l.has(s))return l.get(s);var c=e.apply(this,i);return r.cache=l.set(s,c)||l,c};return r.cache=new(XR.Cache||qc),r}XR.Cache=qc;var OJ=500;function RJ(e){var t=XR(e,function(i){return r.size===OJ&&r.clear(),i}),r=t.cache;return t}var AJ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,MJ=/\\(\\)?/g,N9=RJ(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(AJ,function(r,i,s,l){t.push(s?l.replace(MJ,"$1"):i||r)}),t});function QR(e){return e==null?"":S9(e)}function Ag(e,t){return Na(e)?e:ZR(e,t)?[e]:N9(QR(e))}function Gp(e){if(typeof e=="string"||P1(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function JE(e,t){t=Ag(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Gp(t[r++])];return r&&r==i?e:void 0}function Le(e,t,r){var i=e==null?void 0:JE(e,t);return i===void 0?r:i}function WR(e,t){for(var r=-1,i=t.length,s=e.length;++r<i;)e[s+r]=t[r];return e}var M3=vs?vs.isConcatSpreadable:void 0;function jJ(e){return Na(e)||ug(e)||!!(M3&&e&&e[M3])}function F1(e,t,r,i,s){var l=-1,c=e.length;for(r||(r=jJ),s||(s=[]);++l<c;){var f=e[l];t>0&&r(f)?t>1?F1(f,t-1,r,i,s):WR(s,f):i||(s[s.length]=f)}return s}function DC(e){var t=e==null?0:e.length;return t?F1(e,1):[]}function z9(e){return x9(T9(e,void 0,DC),e+"")}var ex=k9(Object.getPrototypeOf,Object),kJ="[object Object]",DJ=Function.prototype,NJ=Object.prototype,$9=DJ.toString,zJ=NJ.hasOwnProperty,$J=$9.call(Object);function Of(e){if(!bs(e)||Lc(e)!=kJ)return!1;var t=ex(e);if(t===null)return!0;var r=zJ.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&$9.call(r)==$J}function PJ(e,t,r){var i=-1,s=e.length;t<0&&(t=-t>s?0:s+t),r=r>s?s:r,r<0&&(r+=s),s=t>r?0:r-t>>>0,t>>>=0;for(var l=Array(s);++i<s;)l[i]=e[i+t];return l}function IJ(e,t,r,i){var s=-1,l=e==null?0:e.length;for(i&&l&&(r=e[++s]);++s<l;)r=t(r,e[s],s,e);return r}function LJ(){this.__data__=new Uc,this.size=0}function UJ(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function qJ(e){return this.__data__.get(e)}function VJ(e){return this.__data__.has(e)}var FJ=200;function BJ(e,t){var r=this.__data__;if(r instanceof Uc){var i=r.__data__;if(!l1||i.length<FJ-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new qc(i)}return r.set(e,t),this.size=r.size,this}function vl(e){var t=this.__data__=new Uc(e);this.size=t.size}vl.prototype.clear=LJ;vl.prototype.delete=UJ;vl.prototype.get=qJ;vl.prototype.has=VJ;vl.prototype.set=BJ;function HJ(e,t){return e&&Hp(t,ps(t),e)}function GJ(e,t){return e&&Hp(t,V1(t),e)}var P9=typeof ns=="object"&&ns&&!ns.nodeType&&ns,j3=P9&&typeof rs=="object"&&rs&&!rs.nodeType&&rs,KJ=j3&&j3.exports===P9,k3=KJ?nu.Buffer:void 0,D3=k3?k3.allocUnsafe:void 0;function I9(e,t){if(t)return e.slice();var r=e.length,i=D3?D3(r):new e.constructor(r);return e.copy(i),i}function YJ(e,t){for(var r=-1,i=e==null?0:e.length,s=0,l=[];++r<i;){var c=e[r];t(c,r,e)&&(l[s++]=c)}return l}function L9(){return[]}var ZJ=Object.prototype,XJ=ZJ.propertyIsEnumerable,N3=Object.getOwnPropertySymbols,JR=N3?function(e){return e==null?[]:(e=Object(e),YJ(N3(e),function(t){return XJ.call(e,t)}))}:L9;function QJ(e,t){return Hp(e,JR(e),t)}var WJ=Object.getOwnPropertySymbols,U9=WJ?function(e){for(var t=[];e;)WR(t,JR(e)),e=ex(e);return t}:L9;function JJ(e,t){return Hp(e,U9(e),t)}function q9(e,t,r){var i=t(e);return Na(e)?i:WR(i,r(e))}function NC(e){return q9(e,ps,JR)}function eA(e){return q9(e,V1,U9)}var zC=Bp(nu,"DataView"),$C=Bp(nu,"Promise"),Ym=Bp(nu,"Set"),z3="[object Map]",eee="[object Object]",$3="[object Promise]",P3="[object Set]",I3="[object WeakMap]",L3="[object DataView]",tee=Fp(zC),nee=Fp(l1),ree=Fp($C),aee=Fp(Ym),iee=Fp(kC),hs=Lc;(zC&&hs(new zC(new ArrayBuffer(1)))!=L3||l1&&hs(new l1)!=z3||$C&&hs($C.resolve())!=$3||Ym&&hs(new Ym)!=P3||kC&&hs(new kC)!=I3)&&(hs=function(e){var t=Lc(e),r=t==eee?e.constructor:void 0,i=r?Fp(r):"";if(i)switch(i){case tee:return L3;case nee:return z3;case ree:return $3;case aee:return P3;case iee:return I3}return t});var oee=Object.prototype,see=oee.hasOwnProperty;function lee(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&see.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var fE=nu.Uint8Array;function tA(e){var t=new e.constructor(e.byteLength);return new fE(t).set(new fE(e)),t}function uee(e,t){var r=t?tA(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var cee=/\w*$/;function fee(e){var t=new e.constructor(e.source,cee.exec(e));return t.lastIndex=e.lastIndex,t}var U3=vs?vs.prototype:void 0,q3=U3?U3.valueOf:void 0;function dee(e){return q3?Object(q3.call(e)):{}}function V9(e,t){var r=t?tA(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var hee="[object Boolean]",pee="[object Date]",mee="[object Map]",gee="[object Number]",yee="[object RegExp]",vee="[object Set]",bee="[object String]",See="[object Symbol]",wee="[object ArrayBuffer]",Eee="[object DataView]",xee="[object Float32Array]",_ee="[object Float64Array]",Tee="[object Int8Array]",Cee="[object Int16Array]",Oee="[object Int32Array]",Ree="[object Uint8Array]",Aee="[object Uint8ClampedArray]",Mee="[object Uint16Array]",jee="[object Uint32Array]";function kee(e,t,r){var i=e.constructor;switch(t){case wee:return tA(e);case hee:case pee:return new i(+e);case Eee:return uee(e,r);case xee:case _ee:case Tee:case Cee:case Oee:case Ree:case Aee:case Mee:case jee:return V9(e,r);case mee:return new i;case gee:case bee:return new i(e);case yee:return fee(e);case vee:return new i;case See:return dee(e)}}function F9(e){return typeof e.constructor=="function"&&!U1(e)?E9(ex(e)):{}}var Dee="[object Map]";function Nee(e){return bs(e)&&hs(e)==Dee}var V3=cg&&cg.isMap,zee=V3?YR(V3):Nee,$ee="[object Set]";function Pee(e){return bs(e)&&hs(e)==$ee}var F3=cg&&cg.isSet,Iee=F3?YR(F3):Pee,Lee=1,Uee=2,qee=4,B9="[object Arguments]",Vee="[object Array]",Fee="[object Boolean]",Bee="[object Date]",Hee="[object Error]",H9="[object Function]",Gee="[object GeneratorFunction]",Kee="[object Map]",Yee="[object Number]",G9="[object Object]",Zee="[object RegExp]",Xee="[object Set]",Qee="[object String]",Wee="[object Symbol]",Jee="[object WeakMap]",ete="[object ArrayBuffer]",tte="[object DataView]",nte="[object Float32Array]",rte="[object Float64Array]",ate="[object Int8Array]",ite="[object Int16Array]",ote="[object Int32Array]",ste="[object Uint8Array]",lte="[object Uint8ClampedArray]",ute="[object Uint16Array]",cte="[object Uint32Array]",lr={};lr[B9]=lr[Vee]=lr[ete]=lr[tte]=lr[Fee]=lr[Bee]=lr[nte]=lr[rte]=lr[ate]=lr[ite]=lr[ote]=lr[Kee]=lr[Yee]=lr[G9]=lr[Zee]=lr[Xee]=lr[Qee]=lr[Wee]=lr[ste]=lr[lte]=lr[ute]=lr[cte]=!0;lr[Hee]=lr[H9]=lr[Jee]=!1;function qb(e,t,r,i,s,l){var c,f=t&Lee,d=t&Uee,h=t&qee;if(r&&(c=s?r(e,i,s,l):r(e)),c!==void 0)return c;if(!En(e))return e;var m=Na(e);if(m){if(c=lee(e),!f)return FR(e,c)}else{var g=hs(e),v=g==H9||g==Gee;if(jp(e))return I9(e,f);if(g==G9||g==B9||v&&!s){if(c=d||v?{}:F9(e),!f)return d?JJ(e,GJ(c,e)):QJ(e,HJ(c,e))}else{if(!lr[g])return s?e:{};c=kee(e,g,f)}}l||(l=new vl);var _=l.get(e);if(_)return _;l.set(e,c),Iee(e)?e.forEach(function(w){c.add(qb(w,t,r,w,e,l))}):zee(e)&&e.forEach(function(w,x){c.set(x,qb(w,t,r,x,e,l))});var b=h?d?eA:NC:d?V1:ps,S=m?void 0:b(e);return BR(S||e,function(w,x){S&&(x=w,w=e[x]),ZE(c,x,qb(w,t,r,x,e,l))}),c}var fte=1,dte=4;function B1(e){return qb(e,fte|dte)}var hte="__lodash_hash_undefined__";function pte(e){return this.__data__.set(e,hte),this}function mte(e){return this.__data__.has(e)}function Dp(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new qc;++t<r;)this.add(e[t])}Dp.prototype.add=Dp.prototype.push=pte;Dp.prototype.has=mte;function gte(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function u1(e,t){return e.has(t)}var yte=1,vte=2;function K9(e,t,r,i,s,l){var c=r&yte,f=e.length,d=t.length;if(f!=d&&!(c&&d>f))return!1;var h=l.get(e),m=l.get(t);if(h&&m)return h==t&&m==e;var g=-1,v=!0,_=r&vte?new Dp:void 0;for(l.set(e,t),l.set(t,e);++g<f;){var b=e[g],S=t[g];if(i)var w=c?i(S,b,g,t,e,l):i(b,S,g,e,t,l);if(w!==void 0){if(w)continue;v=!1;break}if(_){if(!gte(t,function(x,E){if(!u1(_,E)&&(b===x||s(b,x,r,i,l)))return _.push(E)})){v=!1;break}}else if(!(b===S||s(b,S,r,i,l))){v=!1;break}}return l.delete(e),l.delete(t),v}function bte(e){var t=-1,r=Array(e.size);return e.forEach(function(i,s){r[++t]=[s,i]}),r}function nA(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var Ste=1,wte=2,Ete="[object Boolean]",xte="[object Date]",_te="[object Error]",Tte="[object Map]",Cte="[object Number]",Ote="[object RegExp]",Rte="[object Set]",Ate="[object String]",Mte="[object Symbol]",jte="[object ArrayBuffer]",kte="[object DataView]",B3=vs?vs.prototype:void 0,b2=B3?B3.valueOf:void 0;function Dte(e,t,r,i,s,l,c){switch(r){case kte:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case jte:return!(e.byteLength!=t.byteLength||!l(new fE(e),new fE(t)));case Ete:case xte:case Cte:return L1(+e,+t);case _te:return e.name==t.name&&e.message==t.message;case Ote:case Ate:return e==t+"";case Tte:var f=bte;case Rte:var d=i&Ste;if(f||(f=nA),e.size!=t.size&&!d)return!1;var h=c.get(e);if(h)return h==t;i|=wte,c.set(e,t);var m=K9(f(e),f(t),i,s,l,c);return c.delete(e),m;case Mte:if(b2)return b2.call(e)==b2.call(t)}return!1}var Nte=1,zte=Object.prototype,$te=zte.hasOwnProperty;function Pte(e,t,r,i,s,l){var c=r&Nte,f=NC(e),d=f.length,h=NC(t),m=h.length;if(d!=m&&!c)return!1;for(var g=d;g--;){var v=f[g];if(!(c?v in t:$te.call(t,v)))return!1}var _=l.get(e),b=l.get(t);if(_&&b)return _==t&&b==e;var S=!0;l.set(e,t),l.set(t,e);for(var w=c;++g<d;){v=f[g];var x=e[v],E=t[v];if(i)var R=c?i(E,x,v,t,e,l):i(x,E,v,e,t,l);if(!(R===void 0?x===E||s(x,E,r,i,l):R)){S=!1;break}w||(w=v=="constructor")}if(S&&!w){var T=e.constructor,C=t.constructor;T!=C&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof C=="function"&&C instanceof C)&&(S=!1)}return l.delete(e),l.delete(t),S}var Ite=1,H3="[object Arguments]",G3="[object Array]",yS="[object Object]",Lte=Object.prototype,K3=Lte.hasOwnProperty;function Ute(e,t,r,i,s,l){var c=Na(e),f=Na(t),d=c?G3:hs(e),h=f?G3:hs(t);d=d==H3?yS:d,h=h==H3?yS:h;var m=d==yS,g=h==yS,v=d==h;if(v&&jp(e)){if(!jp(t))return!1;c=!0,m=!1}if(v&&!m)return l||(l=new vl),c||q1(e)?K9(e,t,r,i,s,l):Dte(e,t,d,r,i,s,l);if(!(r&Ite)){var _=m&&K3.call(e,"__wrapped__"),b=g&&K3.call(t,"__wrapped__");if(_||b){var S=_?e.value():e,w=b?t.value():t;return l||(l=new vl),s(S,w,r,i,l)}}return v?(l||(l=new vl),Pte(e,t,r,i,s,l)):!1}function H1(e,t,r,i,s){return e===t?!0:e==null||t==null||!bs(e)&&!bs(t)?e!==e&&t!==t:Ute(e,t,r,i,H1,s)}var qte=1,Vte=2;function Fte(e,t,r,i){var s=r.length,l=s;if(e==null)return!l;for(e=Object(e);s--;){var c=r[s];if(c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<l;){c=r[s];var f=c[0],d=e[f],h=c[1];if(c[2]){if(d===void 0&&!(f in e))return!1}else{var m=new vl,g;if(!(g===void 0?H1(h,d,qte|Vte,i,m):g))return!1}}return!0}function Y9(e){return e===e&&!En(e)}function Bte(e){for(var t=ps(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,Y9(s)]}return t}function Z9(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Hte(e){var t=Bte(e);return t.length==1&&t[0][2]?Z9(t[0][0],t[0][1]):function(r){return r===e||Fte(r,e,t)}}function Gte(e,t){return e!=null&&t in Object(e)}function X9(e,t,r){t=Ag(t,e);for(var i=-1,s=t.length,l=!1;++i<s;){var c=Gp(t[i]);if(!(l=e!=null&&r(e,c)))break;e=e[c]}return l||++i!=s?l:(s=e==null?0:e.length,!!s&&KR(s)&&YE(c,s)&&(Na(e)||ug(e)))}function Q9(e,t){return e!=null&&X9(e,t,Gte)}var Kte=1,Yte=2;function Zte(e,t){return ZR(e)&&Y9(t)?Z9(Gp(e),t):function(r){var i=Le(r,e);return i===void 0&&i===t?Q9(r,e):H1(t,i,Kte|Yte)}}function Xte(e){return function(t){return t?.[e]}}function Qte(e){return function(t){return JE(t,e)}}function Wte(e){return ZR(e)?Xte(Gp(e)):Qte(e)}function rA(e){return typeof e=="function"?e:e==null?KE:typeof e=="object"?Na(e)?Zte(e[0],e[1]):Hte(e):Wte(e)}function Jte(e){return function(t,r,i){for(var s=-1,l=Object(t),c=i(t),f=c.length;f--;){var d=c[++s];if(r(l[d],d,l)===!1)break}return t}}var W9=Jte();function J9(e,t){return e&&W9(e,t,ps)}function ene(e,t){return function(r,i){if(r==null)return r;if(!Pf(r))return e(r,i);for(var s=r.length,l=-1,c=Object(r);++l<s&&i(c[l],l,c)!==!1;);return r}}var e$=ene(J9);function PC(e,t,r){(r!==void 0&&!L1(e[t],r)||r===void 0&&!(t in e))&&GR(e,t,r)}function c1(e){return bs(e)&&Pf(e)}function IC(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function tne(e){return Hp(e,V1(e))}function nne(e,t,r,i,s,l,c){var f=IC(e,r),d=IC(t,r),h=c.get(d);if(h){PC(e,r,h);return}var m=l?l(f,d,r+"",e,t,c):void 0,g=m===void 0;if(g){var v=Na(d),_=!v&&jp(d),b=!v&&!_&&q1(d);m=d,v||_||b?Na(f)?m=f:c1(f)?m=FR(f):_?(g=!1,m=I9(d,!0)):b?(g=!1,m=V9(d,!0)):m=[]:Of(d)||ug(d)?(m=f,ug(f)?m=tne(f):(!En(f)||I1(f))&&(m=F9(d))):g=!1}g&&(c.set(d,m),s(m,d,i,l,c),c.delete(d)),PC(e,r,m)}function t$(e,t,r,i,s){e!==t&&W9(t,function(l,c){if(s||(s=new vl),En(l))nne(e,t,c,r,t$,i,s);else{var f=i?i(IC(e,c),l,c+"",e,t,s):void 0;f===void 0&&(f=l),PC(e,c,f)}},V1)}var rne=200;function ane(e,t,r,i){var s=-1,l=HR,c=!0,f=e.length,d=[],h=t.length;if(!f)return d;t.length>=rne&&(l=u1,c=!1,t=new Dp(t));e:for(;++s<f;){var m=e[s],g=m;if(m=m!==0?m:0,c&&g===g){for(var v=h;v--;)if(t[v]===g)continue e;d.push(m)}else l(t,g,i)||d.push(m)}return d}var ine=XE(function(e,t){return c1(e)?ane(e,F1(t,1,c1,!0)):[]});function n$(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function r$(e){return typeof e=="function"?e:KE}function one(e,t){var r=Na(e)?BR:e$;return r(e,r$(t))}var sne=1/0;function lne(e){var t=e==null?0:e.length;return t?F1(e,sne):[]}var une=Object.prototype,cne=une.hasOwnProperty;function fne(e,t){return e!=null&&cne.call(e,t)}function mn(e,t){return e!=null&&X9(e,t,fne)}var dne="[object String]";function Rf(e){return typeof e=="string"||!Na(e)&&bs(e)&&Lc(e)==dne}function hne(e,t){return Rg(t,function(r){return e[r]})}function pne(e){return e==null?[]:hne(e,ps(e))}var mne=Math.max;function gne(e,t,r,i){e=Pf(e)?e:pne(e),r=r?w9(r):0;var s=e.length;return r<0&&(r=mne(s+r,0)),Rf(e)?r<=s&&e.indexOf(t,r)>-1:!!s&&_9(e,t,r)>-1}var yne=Math.min;function vne(e,t,r){for(var i=HR,s=e[0].length,l=e.length,c=l,f=Array(l),d=1/0,h=[];c--;){var m=e[c];d=yne(m.length,d),f[c]=s>=120&&m.length>=120?new Dp(c&&m):void 0}m=e[0];var g=-1,v=f[0];e:for(;++g<s&&h.length<d;){var _=m[g],b=_;if(_=_!==0?_:0,!(v?u1(v,b):i(h,b))){for(c=l;--c;){var S=f[c];if(!(S?u1(S,b):i(e[c],b)))continue e}v&&v.push(b),h.push(_)}}return h}function bne(e){return c1(e)?e:[]}var Y3=XE(function(e){var t=Rg(e,bne);return t.length&&t[0]===e[0]?vne(t):[]});function Sne(e,t){return t.length<2?e:JE(e,PJ(t,0,-1))}var wne="[object Map]",Ene="[object Set]",xne=Object.prototype,_ne=xne.hasOwnProperty;function na(e){if(e==null)return!0;if(Pf(e)&&(Na(e)||typeof e=="string"||typeof e.splice=="function"||jp(e)||q1(e)||ug(e)))return!e.length;var t=hs(e);if(t==wne||t==Ene)return!e.size;if(U1(e))return!D9(e).length;for(var r in e)if(_ne.call(e,r))return!1;return!0}function gf(e,t){return H1(e,t)}function Tne(e,t,r){r=typeof r=="function"?r:void 0;var i=r?r(e,t):void 0;return i===void 0?H1(e,t,void 0,r):!!i}var Cne="[object Number]";function a$(e){return typeof e=="number"||bs(e)&&Lc(e)==Cne}function dE(e){return e==null}function i$(e){return e===void 0}var One=C9(function(e,t,r){t$(e,t,r)}),Rne=Object.prototype,Ane=Rne.hasOwnProperty;function o$(e,t){t=Ag(t,e);var r=-1,i=t.length;if(!i)return!0;for(var s=e==null||typeof e!="object"&&typeof e!="function";++r<i;){var l=t[r];if(typeof l=="string"){if(l==="__proto__"&&!Ane.call(e,"__proto__"))return!1;if(l==="constructor"&&r+1<i&&typeof t[r+1]=="string"&&t[r+1]==="prototype"){if(s&&r===0)continue;return!1}}}var c=Sne(e,t);return c==null||delete c[Gp(n$(t))]}function Mne(e){return Of(e)?void 0:e}var jne=1,kne=2,Dne=4,fg=z9(function(e,t){var r={};if(e==null)return r;var i=!1;t=Rg(t,function(l){return l=Ag(l,e),i||(i=l.length>1),l}),Hp(e,eA(e),r),i&&(r=qb(r,jne|kne|Dne,Mne));for(var s=t.length;s--;)o$(r,t[s]);return r});function aA(e,t,r,i){if(!En(e))return e;t=Ag(t,e);for(var s=-1,l=t.length,c=l-1,f=e;f!=null&&++s<l;){var d=Gp(t[s]),h=r;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(s!=c){var m=f[d];h=i?i(m,d,f):void 0,h===void 0&&(h=En(m)?m:YE(t[s+1])?[]:{})}ZE(f,d,h),f=f[d]}return e}function s$(e,t,r){for(var i=-1,s=t.length,l={};++i<s;){var c=t[i],f=JE(e,c);r(f,c)&&aA(l,Ag(c,e),f)}return l}function Nne(e,t){if(e==null)return{};var r=Rg(eA(e),function(i){return[i]});return t=rA(t),s$(e,r,function(i,s){return t(i,s[0])})}function zne(e,t){return s$(e,t,function(r,i){return Q9(e,i)})}var iA=z9(function(e,t){return e==null?{}:zne(e,t)});function $ne(e,t,r,i,s){return s(e,function(l,c,f){r=i?(i=!1,l):t(r,l,c,f)}),r}function Pne(e,t,r){var i=Na(e)?IJ:$ne,s=arguments.length<3;return i(e,rA(t),r,s,e$)}function In(e,t,r){return e==null?e:aA(e,t,r)}function Ine(e,t,r,i){return i=typeof i=="function"?i:void 0,e==null?e:aA(e,t,r,i)}var Lne=9007199254740991,S2=4294967295,Une=Math.min;function l$(e,t){if(e=w9(e),e<1||e>Lne)return[];var r=S2,i=Une(e,S2);t=r$(t),e-=S2;for(var s=O9(i,t);++r<e;)t(r);return s}function u$(e){return Na(e)?Rg(e,Gp):P1(e)?[e]:FR(N9(QR(e)))}function qne(e,t,r){var i=Na(e),s=i||jp(e)||q1(e);if(t=rA(t),r==null){var l=e&&e.constructor;s?r=i?new l:[]:En(e)?r=I1(l)?E9(ex(e)):{}:r={}}return(s?BR:J9)(e,function(c,f,d){return t(r,c,f,d)}),r}var Vne=1/0,Fne=Ym&&1/nA(new Ym([,-0]))[1]==Vne?function(e){return new Ym(e)}:jw,Bne=200;function c$(e,t,r){var i=-1,s=HR,l=e.length,c=!0,f=[],d=f;if(l>=Bne){var h=Fne(e);if(h)return nA(h);c=!1,s=u1,d=new Dp}else d=f;e:for(;++i<l;){var m=e[i],g=m;if(m=m!==0?m:0,c&&g===g){for(var v=d.length;v--;)if(d[v]===g)continue e;f.push(m)}else s(d,g,r)||(d!==f&&d.push(g),f.push(m))}return f}var Hne=XE(function(e){return c$(F1(e,1,c1,!0))});function f$(e){return e&&e.length?c$(e):[]}var Gne=0;function d$(e){var t=++Gne;return QR(e)+t}function Kne(e,t){return e==null?!0:o$(e,t)}const Mg=Wz()(e=>({tools:{},setToolData:(t,r)=>e(i=>vS(i,`tools.${t}`,{...i.tools[t],...r})),updateOpenaiObject:(t,r,i)=>e(s=>s.tools[t]?.openaiObject?vS(s,`tools.${t}.openaiObject.${r}`,i):s),pushOpenAiLog:(t,r)=>e(i=>{const s=i.tools[t]?.openaiLogs||[];return vS(i,`tools.${t}.openaiLogs`,[...s,{...r,id:crypto.randomUUID()}])}),setOpenInAppUrl:(t,r)=>e(i=>vS(i,`tools.${t}.openInAppUrl`,r))})),jg=e=>{const{tools:t}=Mg();return t[e]},vS=(e,t,r)=>{const i=B1(e);return In(i,t,r),i};function h$(e,t,r){try{return e(t)}catch(i){return wV("[nuqs] Error while parsing value `%s`: %O"+(r?" (for key `%s`)":""),t,i,r),null}}function Vc(e){function t(r){if(typeof r>"u")return null;let i="";if(Array.isArray(r)){if(r[0]===void 0)return null;i=r[0]}return typeof r=="string"&&(i=r),h$(e.parse,i)}return{type:"single",eq:(r,i)=>r===i,...e,parseServerSide:t,withDefault(r){return{...this,defaultValue:r,parseServerSide(i){return t(i)??r}}},withOptions(r){return{...this,...r}}}}const Yne=Vc({parse:e=>e,serialize:String});Vc({parse:e=>{const t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)});Vc({parse:e=>{const t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)});Vc({parse:e=>{const t=parseInt(e,16);return t==t?t:null},serialize:e=>{const t=Math.round(e).toString(16);return(t.length&1?"0":"")+t}});Vc({parse:e=>{const t=parseFloat(e);return t==t?t:null},serialize:String});Vc({parse:e=>e.toLowerCase()==="true",serialize:String});function oA(e,t){return e.valueOf()===t.valueOf()}Vc({parse:e=>{const t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:oA});Vc({parse:e=>{const t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:oA});Vc({parse:e=>{const t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:oA});const w2=aR(),Zne={};function Xne(e,t={}){const r=j.useId(),i=AV(),s=MV(),{history:l="replace",scroll:c=i?.scroll??!1,shallow:f=i?.shallow??!0,throttleMs:d=Ib.timeMs,limitUrlUpdates:h=i?.limitUrlUpdates,clearOnDefault:m=i?.clearOnDefault??!0,startTransition:g,urlKeys:v=Zne}=t,_=Object.keys(e).join(","),b=j.useMemo(()=>Object.fromEntries(Object.keys(e).map(D=>[D,v[D]??D])),[_,JSON.stringify(v)]),S=RV(Object.values(b)),w=S.searchParams,x=j.useRef({}),E=j.useMemo(()=>Object.fromEntries(Object.keys(e).map(D=>[D,e[D].defaultValue??null])),[Object.values(e).map(({defaultValue:D})=>D).join(",")]),R=s2.useQueuedQueries(Object.values(b)),[T,C]=j.useState(()=>E2(e,v,w??new URLSearchParams,R).state),O=j.useRef(T);if(Ar("[nuq+ %s `%s`] render - state: %O, iSP: %s",r,_,T,w),Object.keys(x.current).join("&")!==Object.values(b).join("&")){const{state:D,hasChanged:U}=E2(e,v,w,R,x.current,O.current);U&&(Ar("[nuq+ %s `%s`] State changed: %O",r,_,{state:D,initialSearchParams:w,queuedQueries:R,queryRef:x.current,stateRef:O.current}),O.current=D,C(D)),x.current=Object.fromEntries(Object.entries(b).map(([B,q])=>[q,e[B]?.type==="multi"?w?.getAll(q):w?.get(q)??null]))}j.useEffect(()=>{const{state:D,hasChanged:U}=E2(e,v,w,R,x.current,O.current);U&&(Ar("[nuq+ %s `%s`] State changed: %O",r,_,{state:D,initialSearchParams:w,queuedQueries:R,queryRef:x.current,stateRef:O.current}),O.current=D,C(D))},[Object.values(b).map(D=>`${D}=${w?.getAll(D)}`).join("&"),JSON.stringify(R)]),j.useEffect(()=>{const D=Object.keys(e).reduce((U,B)=>(U[B]=({state:q,query:V})=>{C(G=>{const{defaultValue:ne}=e[B],oe=b[B],K=q??ne??null,ee=G[B]??ne??null;return Object.is(ee,K)?(Ar("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",r,_,oe,q,ne,O.current),G):(O.current={...O.current,[B]:K},x.current[oe]=V,Ar("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",r,_,oe,q,ne,O.current),O.current)})},U),{});for(const U of Object.keys(e)){const B=b[U];Ar("[nuq+ %s `%s`] Subscribing to sync for `%s`",r,B,_),w2.on(B,D[U])}return()=>{for(const U of Object.keys(e)){const B=b[U];Ar("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",r,B,_),w2.off(B,D[U])}}},[_,b]);const M=j.useCallback((D,U={})=>{const B=Object.fromEntries(Object.keys(e).map(ee=>[ee,null])),q=typeof D=="function"?D(Z3(O.current,E))??B:D??B;Ar("[nuq+ %s `%s`] setState: %O",r,_,q);let V,G=0,ne=!1;const oe=[];for(let[ee,re]of Object.entries(q)){const ue=e[ee],Q=b[ee];if(!ue||re===void 0)continue;(U.clearOnDefault??ue.clearOnDefault??m)&&re!==null&&ue.defaultValue!==void 0&&(ue.eq??((Y,I)=>Y===I))(re,ue.defaultValue)&&(re=null);const z=re===null?null:(ue.serialize??String)(re);w2.emit(Q,{state:re,query:z});const L={key:Q,query:z,options:{history:U.history??ue.history??l,shallow:U.shallow??ue.shallow??f,scroll:U.scroll??ue.scroll??c,startTransition:U.startTransition??ue.startTransition??g}};if(U?.limitUrlUpdates?.method==="debounce"||h?.method==="debounce"||ue.limitUrlUpdates?.method==="debounce"){L.options.shallow===!0&&console.warn(M1(422));const Y=U?.limitUrlUpdates?.timeMs??h?.timeMs??ue.limitUrlUpdates?.timeMs??Ib.timeMs,I=s2.push(L,Y,S,s);G<Y&&(V=I,G=Y)}else{const Y=U?.limitUrlUpdates?.timeMs??ue?.limitUrlUpdates?.timeMs??h?.timeMs??U.throttleMs??ue.throttleMs??d;oe.push(s2.abort(Q)),Aw.push(L,Y),ne=!0}}const K=oe.reduce((ee,re)=>re(ee),ne?Aw.flush(S,s):Aw.getPendingPromise(S));return V??K},[_,l,f,c,d,h?.method,h?.timeMs,g,b,S.updateUrl,S.getSearchParamsSnapshot,S.rateLimitFactor,s,E]);return[j.useMemo(()=>Z3(T,E),[T,E]),M]}function E2(e,t,r,i,s,l){let c=!1;const f=Object.entries(e).reduce((d,[h,m])=>{const g=t?.[h]??h,v=i[g],_=m.type==="multi"?[]:null,b=v===void 0?(m.type==="multi"?r?.getAll(g):r?.get(g))??_:v;return s&&l&&kz(s[g]??_,b)?(d[h]=l[h]??null,d):(c=!0,d[h]=(DV(b)?null:h$(m.parse,b,g))??null,s&&(s[g]=b),d)},{});if(!c){const d=Object.keys(e),h=Object.keys(l??{});c=d.length!==h.length||d.some(m=>!h.includes(m))}return{state:f,hasChanged:c}}function Z3(e,t){return Object.fromEntries(Object.keys(e).map(r=>[r,e[r]??t[r]??null]))}function Qne(e,t={}){const{parse:r,type:i,serialize:s,eq:l,defaultValue:c,...f}=t,[{[e]:d},h]=Xne({[e]:{parse:r??(m=>m),type:i,serialize:s,eq:l,defaultValue:c}},f);return[d,j.useCallback((m,g={})=>h(v=>({[e]:typeof m=="function"?m(v[e]):m}),g),[e,h])]}function sA(){return Qne("tool",Yne)}const lA=new iV,x2="skybridge-devtools-oauth",wc={clientInfo:`${x2}:client-info`,tokens:`${x2}:tokens`,codeVerifier:`${x2}:code-verifier`};class p${get redirectUrl(){const t=new URL(window.location.origin+window.location.pathname);return t.searchParams.set("oauth_callback","true"),t.toString()}get clientMetadata(){return{redirect_uris:[this.redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:"Skybridge Devtools",client_uri:window.location.origin}}clientInformation(){const t=localStorage.getItem(wc.clientInfo);return t?JSON.parse(t):void 0}saveClientInformation(t){localStorage.setItem(wc.clientInfo,JSON.stringify(t))}tokens(){const t=localStorage.getItem(wc.tokens);return t?JSON.parse(t):void 0}saveTokens(t){localStorage.setItem(wc.tokens,JSON.stringify(t))}redirectToAuthorization(t){window.location.href=t.toString()}saveCodeVerifier(t){localStorage.setItem(wc.codeVerifier,t)}codeVerifier(){return localStorage.getItem(wc.codeVerifier)??""}invalidateCredentials(t){(t==="all"||t==="tokens")&&localStorage.removeItem(wc.tokens),(t==="all"||t==="client")&&localStorage.removeItem(wc.clientInfo),(t==="all"||t==="verifier")&&localStorage.removeItem(wc.codeVerifier)}}function tx(e){return!!e._zod}function cf(e,t){return tx(e)?s6(e,t):e.safeParse(t)}function m$(e){if(!e)return;let t;if(tx(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function Wne(e){if(tx(e)){const l=e._zod?.def;if(l){if(l.value!==void 0)return l.value;if(Array.isArray(l.values)&&l.values.length>0)return l.values[0]}}const r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}const i=e.value;if(i!==void 0)return i}function ap(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function X3(e){const r=m$(e)?.method;if(!r)throw new Error("Schema is missing a method literal");const i=Wne(r);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function Q3(e,t){const r=cf(e,t);if(!r.success)throw r.error;return r.data}const Jne=6e4;class ere{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(CR,r=>{this._oncancel(r)}),this.setNotificationHandler(RR,r=>{this._onprogress(r)}),this.setRequestHandler(OR,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(AR,async(r,i)=>{const s=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!s)throw new Ot(Ut.InvalidParams,"Failed to retrieve task: Task not found");return{...s}}),this.setRequestHandler(jR,async(r,i)=>{const s=async()=>{const l=r.params.taskId;if(this._taskMessageQueue){let f;for(;f=await this._taskMessageQueue.dequeue(l,i.sessionId);){if(f.type==="response"||f.type==="error"){const d=f.message,h=d.id,m=this._requestResolvers.get(h);if(m)if(this._requestResolvers.delete(h),f.type==="response")m(d);else{const g=d,v=new Ot(g.error.code,g.error.message,g.error.data);m(v)}else{const g=f.type==="response"?"Response":"Error";this._onerror(new Error(`${g} handler missing for request ${h}`))}continue}await this._transport?.send(f.message,{relatedRequestId:i.requestId})}}const c=await this._taskStore.getTask(l,i.sessionId);if(!c)throw new Ot(Ut.InvalidParams,`Task not found: ${l}`);if(!ap(c.status))return await this._waitForTaskUpdate(l,i.signal),await s();if(ap(c.status)){const f=await this._taskStore.getTaskResult(l,i.sessionId);return this._clearTaskQueue(l),{...f,_meta:{...f._meta,[hp]:{taskId:l}}}}return await s()};return await s()}),this.setRequestHandler(kR,async(r,i)=>{try{const{tasks:s,nextCursor:l}=await this._taskStore.listTasks(r.params?.cursor,i.sessionId);return{tasks:s,nextCursor:l,_meta:{}}}catch(s){throw new Ot(Ut.InvalidParams,`Failed to list tasks: ${s instanceof Error?s.message:String(s)}`)}}),this.setRequestHandler(NR,async(r,i)=>{try{const s=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!s)throw new Ot(Ut.InvalidParams,`Task not found: ${r.params.taskId}`);if(ap(s.status))throw new Ot(Ut.InvalidParams,`Cannot cancel task in terminal status: ${s.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",i.sessionId),this._clearTaskQueue(r.params.taskId);const l=await this._taskStore.getTask(r.params.taskId,i.sessionId);if(!l)throw new Ot(Ut.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...l}}catch(s){throw s instanceof Ot?s:new Ot(Ut.InvalidRequest,`Failed to cancel task: ${s instanceof Error?s.message:String(s)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,i,s,l=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(s,r),startTime:Date.now(),timeout:r,maxTotalTimeout:i,resetTimeoutOnProgress:l,onTimeout:s})}_resetTimeout(t){const r=this._timeoutInfo.get(t);if(!r)return!1;const i=Date.now()-r.startTime;if(r.maxTotalTimeout&&i>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),Ot.fromError(Ut.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:i});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){const r=this._timeoutInfo.get(t);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;const r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};const i=this.transport?.onerror;this._transport.onerror=l=>{i?.(l),this._onerror(l)};const s=this._transport?.onmessage;this._transport.onmessage=(l,c)=>{s?.(l,c),Mb(l)||lZ(l)?this._onresponse(l):bC(l)?this._onrequest(l,c):sZ(l)?this._onnotification(l):this._onerror(new Error(`Unknown message type: ${JSON.stringify(l)}`))},await this._transport.start()}_onclose(){const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const i of this._requestHandlerAbortControllers.values())i.abort();this._requestHandlerAbortControllers.clear();const r=Ot.fromError(Ut.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const i of t.values())i(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){const r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(t,r){const i=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,s=this._transport,l=t.params?._meta?.[hp]?.taskId;if(i===void 0){const m={jsonrpc:"2.0",id:t.id,error:{code:Ut.MethodNotFound,message:"Method not found"}};l&&this._taskMessageQueue?this._enqueueTaskMessage(l,{type:"error",message:m,timestamp:Date.now()},s?.sessionId).catch(g=>this._onerror(new Error(`Failed to enqueue error response: ${g}`))):s?.send(m).catch(g=>this._onerror(new Error(`Failed to send an error response: ${g}`)));return}const c=new AbortController;this._requestHandlerAbortControllers.set(t.id,c);const f=oZ(t.params)?t.params.task:void 0,d=this._taskStore?this.requestTaskStore(t,s?.sessionId):void 0,h={signal:c.signal,sessionId:s?.sessionId,_meta:t.params?._meta,sendNotification:async m=>{if(c.signal.aborted)return;const g={relatedRequestId:t.id};l&&(g.relatedTask={taskId:l}),await this.notification(m,g)},sendRequest:async(m,g,v)=>{if(c.signal.aborted)throw new Ot(Ut.ConnectionClosed,"Request was cancelled");const _={...v,relatedRequestId:t.id};l&&!_.relatedTask&&(_.relatedTask={taskId:l});const b=_.relatedTask?.taskId??l;return b&&d&&await d.updateTaskStatus(b,"input_required"),await this.request(m,g,_)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:l,taskStore:d,taskRequestedTtl:f?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{f&&this.assertTaskHandlerCapability(t.method)}).then(()=>i(t,h)).then(async m=>{if(c.signal.aborted)return;const g={result:m,jsonrpc:"2.0",id:t.id};l&&this._taskMessageQueue?await this._enqueueTaskMessage(l,{type:"response",message:g,timestamp:Date.now()},s?.sessionId):await s?.send(g)},async m=>{if(c.signal.aborted)return;const g={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(m.code)?m.code:Ut.InternalError,message:m.message??"Internal error",...m.data!==void 0&&{data:m.data}}};l&&this._taskMessageQueue?await this._enqueueTaskMessage(l,{type:"error",message:g,timestamp:Date.now()},s?.sessionId):await s?.send(g)}).catch(m=>this._onerror(new Error(`Failed to send response: ${m}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progressToken:r,...i}=t.params,s=Number(r),l=this._progressHandlers.get(s);if(!l){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}const c=this._responseHandlers.get(s),f=this._timeoutInfo.get(s);if(f&&c&&f.resetTimeoutOnProgress)try{this._resetTimeout(s)}catch(d){this._responseHandlers.delete(s),this._progressHandlers.delete(s),this._cleanupTimeout(s),c(d);return}l(i)}_onresponse(t){const r=Number(t.id),i=this._requestResolvers.get(r);if(i){if(this._requestResolvers.delete(r),Mb(t))i(t);else{const c=new Ot(t.error.code,t.error.message,t.error.data);i(c)}return}const s=this._responseHandlers.get(r);if(s===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let l=!1;if(Mb(t)&&t.result&&typeof t.result=="object"){const c=t.result;if(c.task&&typeof c.task=="object"){const f=c.task;typeof f.taskId=="string"&&(l=!0,this._taskProgressTokens.set(f.taskId,r))}}if(l||this._progressHandlers.delete(r),Mb(t))s(t);else{const c=Ot.fromError(t.error.code,t.error.message,t.error.data);s(c)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,i){const{task:s}=i??{};if(!s){try{yield{type:"result",result:await this.request(t,r,i)}}catch(c){yield{type:"error",error:c instanceof Ot?c:new Ot(Ut.InternalError,String(c))}}return}let l;try{const c=await this.request(t,o1,i);if(c.task)l=c.task.taskId,yield{type:"taskCreated",task:c.task};else throw new Ot(Ut.InternalError,"Task creation did not return a task");for(;;){const f=await this.getTask({taskId:l},i);if(yield{type:"taskStatus",task:f},ap(f.status)){f.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:l},r,i)}:f.status==="failed"?yield{type:"error",error:new Ot(Ut.InternalError,`Task ${l} failed`)}:f.status==="cancelled"&&(yield{type:"error",error:new Ot(Ut.InternalError,`Task ${l} was cancelled`)});return}if(f.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:l},r,i)};return}const d=f.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(h=>setTimeout(h,d)),i?.signal?.throwIfAborted()}}catch(c){yield{type:"error",error:c instanceof Ot?c:new Ot(Ut.InternalError,String(c))}}}request(t,r,i){const{relatedRequestId:s,resumptionToken:l,onresumptiontoken:c,task:f,relatedTask:d}=i??{};return new Promise((h,m)=>{const g=E=>{m(E)};if(!this._transport){g(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),f&&this.assertTaskCapability(t.method)}catch(E){g(E);return}i?.signal?.throwIfAborted();const v=this._requestMessageId++,_={...t,jsonrpc:"2.0",id:v};i?.onprogress&&(this._progressHandlers.set(v,i.onprogress),_.params={...t.params,_meta:{...t.params?._meta||{},progressToken:v}}),f&&(_.params={..._.params,task:f}),d&&(_.params={..._.params,_meta:{..._.params?._meta||{},[hp]:d}});const b=E=>{this._responseHandlers.delete(v),this._progressHandlers.delete(v),this._cleanupTimeout(v),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:v,reason:String(E)}},{relatedRequestId:s,resumptionToken:l,onresumptiontoken:c}).catch(T=>this._onerror(new Error(`Failed to send cancellation: ${T}`)));const R=E instanceof Ot?E:new Ot(Ut.RequestTimeout,String(E));m(R)};this._responseHandlers.set(v,E=>{if(!i?.signal?.aborted){if(E instanceof Error)return m(E);try{const R=cf(r,E.result);R.success?h(R.data):m(R.error)}catch(R){m(R)}}}),i?.signal?.addEventListener("abort",()=>{b(i?.signal?.reason)});const S=i?.timeout??Jne,w=()=>b(Ot.fromError(Ut.RequestTimeout,"Request timed out",{timeout:S}));this._setupTimeout(v,S,i?.maxTotalTimeout,w,i?.resetTimeoutOnProgress??!1);const x=d?.taskId;if(x){const E=R=>{const T=this._responseHandlers.get(v);T?T(R):this._onerror(new Error(`Response handler missing for side-channeled request ${v}`))};this._requestResolvers.set(v,E),this._enqueueTaskMessage(x,{type:"request",message:_,timestamp:Date.now()}).catch(R=>{this._cleanupTimeout(v),m(R)})}else this._transport.send(_,{relatedRequestId:s,resumptionToken:l,onresumptiontoken:c}).catch(E=>{this._cleanupTimeout(v),m(E)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},MR,r)}async getTaskResult(t,r,i){return this.request({method:"tasks/result",params:t},r,i)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},DR,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},TZ,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const i=r?.relatedTask?.taskId;if(i){const f={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[hp]:r.relatedTask}}};await this._enqueueTaskMessage(i,{type:"notification",message:f,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let f={...t,jsonrpc:"2.0"};r?.relatedTask&&(f={...f,params:{...f.params,_meta:{...f.params?._meta||{},[hp]:r.relatedTask}}}),this._transport?.send(f,r).catch(d=>this._onerror(d))});return}let c={...t,jsonrpc:"2.0"};r?.relatedTask&&(c={...c,params:{...c.params,_meta:{...c.params?._meta||{},[hp]:r.relatedTask}}}),await this._transport.send(c,r)}setRequestHandler(t,r){const i=X3(t);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(s,l)=>{const c=Q3(t,s);return Promise.resolve(r(c,l))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,r){const i=X3(t);this._notificationHandlers.set(i,s=>{const l=Q3(t,s);return Promise.resolve(r(l))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){const r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,r,i){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const s=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,r,i,s)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){const i=await this._taskMessageQueue.dequeueAll(t,r);for(const s of i)if(s.type==="request"&&bC(s.message)){const l=s.message.id,c=this._requestResolvers.get(l);c?(c(new Ot(Ut.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(l)):this._onerror(new Error(`Resolver missing for request ${l} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,r){let i=this._options?.defaultTaskPollInterval??1e3;try{const s=await this._taskStore?.getTask(t);s?.pollInterval&&(i=s.pollInterval)}catch{}return new Promise((s,l)=>{if(r.aborted){l(new Ot(Ut.InvalidRequest,"Request cancelled"));return}const c=setTimeout(s,i);r.addEventListener("abort",()=>{clearTimeout(c),l(new Ot(Ut.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){const i=this._taskStore;if(!i)throw new Error("No task store configured");return{createTask:async s=>{if(!t)throw new Error("No request provided");return await i.createTask(s,t.id,{method:t.method,params:t.params},r)},getTask:async s=>{const l=await i.getTask(s,r);if(!l)throw new Ot(Ut.InvalidParams,"Failed to retrieve task: Task not found");return l},storeTaskResult:async(s,l,c)=>{await i.storeTaskResult(s,l,c,r);const f=await i.getTask(s,r);if(f){const d=aE.parse({method:"notifications/tasks/status",params:f});await this.notification(d),ap(f.status)&&this._cleanupTaskProgressHandler(s)}},getTaskResult:s=>i.getTaskResult(s,r),updateTaskStatus:async(s,l,c)=>{const f=await i.getTask(s,r);if(!f)throw new Ot(Ut.InvalidParams,`Task "${s}" not found - it may have been cleaned up`);if(ap(f.status))throw new Ot(Ut.InvalidParams,`Cannot update task "${s}" from terminal status "${f.status}" to "${l}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await i.updateTaskStatus(s,l,c,r);const d=await i.getTask(s,r);if(d){const h=aE.parse({method:"notifications/tasks/status",params:d});await this.notification(h),ap(d.status)&&this._cleanupTaskProgressHandler(s)}},listTasks:s=>i.listTasks(s,r)}}}function W3(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function tre(e,t){const r={...e};for(const i in t){const s=i,l=t[s];if(l===void 0)continue;const c=r[s];W3(c)&&W3(l)?r[s]={...c,...l}:r[s]=l}return r}var bS={exports:{}},_2={},Ec={},ip={},T2={},C2={},O2={},J3;function hE(){return J3||(J3=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(E){if(super(),!e.IDENTIFIER.test(E))throw new Error("CodeGen: name must be a valid identifier");this.str=E}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class i extends t{constructor(E){super(),this._items=typeof E=="string"?[E]:E}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const E=this._items[0];return E===""||E==='""'}get str(){var E;return(E=this._str)!==null&&E!==void 0?E:this._str=this._items.reduce((R,T)=>`${R}${T}`,"")}get names(){var E;return(E=this._names)!==null&&E!==void 0?E:this._names=this._items.reduce((R,T)=>(T instanceof r&&(R[T.str]=(R[T.str]||0)+1),R),{})}}e._Code=i,e.nil=new i("");function s(x,...E){const R=[x[0]];let T=0;for(;T<E.length;)f(R,E[T]),R.push(x[++T]);return new i(R)}e._=s;const l=new i("+");function c(x,...E){const R=[_(x[0])];let T=0;for(;T<E.length;)R.push(l),f(R,E[T]),R.push(l,_(x[++T]));return d(R),new i(R)}e.str=c;function f(x,E){E instanceof i?x.push(...E._items):E instanceof r?x.push(E):x.push(g(E))}e.addCodeArg=f;function d(x){let E=1;for(;E<x.length-1;){if(x[E]===l){const R=h(x[E-1],x[E+1]);if(R!==void 0){x.splice(E-1,3,R);continue}x[E++]="+"}E++}}function h(x,E){if(E==='""')return x;if(x==='""')return E;if(typeof x=="string")return E instanceof r||x[x.length-1]!=='"'?void 0:typeof E!="string"?`${x.slice(0,-1)}${E}"`:E[0]==='"'?x.slice(0,-1)+E.slice(1):void 0;if(typeof E=="string"&&E[0]==='"'&&!(x instanceof r))return`"${x}${E.slice(1)}`}function m(x,E){return E.emptyStr()?x:x.emptyStr()?E:c`${x}${E}`}e.strConcat=m;function g(x){return typeof x=="number"||typeof x=="boolean"||x===null?x:_(Array.isArray(x)?x.join(","):x)}function v(x){return new i(_(x))}e.stringify=v;function _(x){return JSON.stringify(x).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function b(x){return typeof x=="string"&&e.IDENTIFIER.test(x)?new i(`.${x}`):s`[${x}]`}e.getProperty=b;function S(x){if(typeof x=="string"&&e.IDENTIFIER.test(x))return new i(`${x}`);throw new Error(`CodeGen: invalid export name: ${x}, use explicit $id name mapping`)}e.getEsmExportName=S;function w(x){return new i(x.toString())}e.regexpCode=w})(O2)),O2}var R2={},ej;function tj(){return ej||(ej=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=hE();class r extends Error{constructor(h){super(`CodeGen: "code" for ${h} not defined`),this.value=h.value}}var i;(function(d){d[d.Started=0]="Started",d[d.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class s{constructor({prefixes:h,parent:m}={}){this._names={},this._prefixes=h,this._parent=m}toName(h){return h instanceof t.Name?h:this.name(h)}name(h){return new t.Name(this._newName(h))}_newName(h){const m=this._names[h]||this._nameGroup(h);return`${h}${m.index++}`}_nameGroup(h){var m,g;if(!((g=(m=this._parent)===null||m===void 0?void 0:m._prefixes)===null||g===void 0)&&g.has(h)||this._prefixes&&!this._prefixes.has(h))throw new Error(`CodeGen: prefix "${h}" is not allowed in this scope`);return this._names[h]={prefix:h,index:0}}}e.Scope=s;class l extends t.Name{constructor(h,m){super(m),this.prefix=h}setValue(h,{property:m,itemIndex:g}){this.value=h,this.scopePath=(0,t._)`.${new t.Name(m)}[${g}]`}}e.ValueScopeName=l;const c=(0,t._)`\n`;class f extends s{constructor(h){super(h),this._values={},this._scope=h.scope,this.opts={...h,_n:h.lines?c:t.nil}}get(){return this._scope}name(h){return new l(h,this._newName(h))}value(h,m){var g;if(m.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const v=this.toName(h),{prefix:_}=v,b=(g=m.key)!==null&&g!==void 0?g:m.ref;let S=this._values[_];if(S){const E=S.get(b);if(E)return E}else S=this._values[_]=new Map;S.set(b,v);const w=this._scope[_]||(this._scope[_]=[]),x=w.length;return w[x]=m.ref,v.setValue(m,{property:_,itemIndex:x}),v}getValue(h,m){const g=this._values[h];if(g)return g.get(m)}scopeRefs(h,m=this._values){return this._reduceValues(m,g=>{if(g.scopePath===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return(0,t._)`${h}${g.scopePath}`})}scopeCode(h=this._values,m,g){return this._reduceValues(h,v=>{if(v.value===void 0)throw new Error(`CodeGen: name "${v}" has no value`);return v.value.code},m,g)}_reduceValues(h,m,g={},v){let _=t.nil;for(const b in h){const S=h[b];if(!S)continue;const w=g[b]=g[b]||new Map;S.forEach(x=>{if(w.has(x))return;w.set(x,i.Started);let E=m(x);if(E){const R=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,t._)`${_}${R} ${x} = ${E};${this.opts._n}`}else if(E=v?.(x))_=(0,t._)`${_}${E}${this.opts._n}`;else throw new r(x);w.set(x,i.Completed)})}return _}}e.ValueScope=f})(R2)),R2}var nj;function Wt(){return nj||(nj=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=hE(),r=tj();var i=hE();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var s=tj();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class l{optimizeNodes(){return this}optimizeNames(I,X){return this}}class c extends l{constructor(I,X,J){super(),this.varKind=I,this.name=X,this.rhs=J}render({es5:I,_n:X}){const J=I?r.varKinds.var:this.varKind,he=this.rhs===void 0?"":` = ${this.rhs}`;return`${J} ${this.name}${he};`+X}optimizeNames(I,X){if(I[this.name.str])return this.rhs&&(this.rhs=ne(this.rhs,I,X)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class f extends l{constructor(I,X,J){super(),this.lhs=I,this.rhs=X,this.sideEffects=J}render({_n:I}){return`${this.lhs} = ${this.rhs};`+I}optimizeNames(I,X){if(!(this.lhs instanceof t.Name&&!I[this.lhs.str]&&!this.sideEffects))return this.rhs=ne(this.rhs,I,X),this}get names(){const I=this.lhs instanceof t.Name?{}:{...this.lhs.names};return G(I,this.rhs)}}class d extends f{constructor(I,X,J,he){super(I,J,he),this.op=X}render({_n:I}){return`${this.lhs} ${this.op}= ${this.rhs};`+I}}class h extends l{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`${this.label}:`+I}}class m extends l{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`break${this.label?` ${this.label}`:""};`+I}}class g extends l{constructor(I){super(),this.error=I}render({_n:I}){return`throw ${this.error};`+I}get names(){return this.error.names}}class v extends l{constructor(I){super(),this.code=I}render({_n:I}){return`${this.code};`+I}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(I,X){return this.code=ne(this.code,I,X),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class _ extends l{constructor(I=[]){super(),this.nodes=I}render(I){return this.nodes.reduce((X,J)=>X+J.render(I),"")}optimizeNodes(){const{nodes:I}=this;let X=I.length;for(;X--;){const J=I[X].optimizeNodes();Array.isArray(J)?I.splice(X,1,...J):J?I[X]=J:I.splice(X,1)}return I.length>0?this:void 0}optimizeNames(I,X){const{nodes:J}=this;let he=J.length;for(;he--;){const xe=J[he];xe.optimizeNames(I,X)||(oe(I,xe.names),J.splice(he,1))}return J.length>0?this:void 0}get names(){return this.nodes.reduce((I,X)=>V(I,X.names),{})}}class b extends _{render(I){return"{"+I._n+super.render(I)+"}"+I._n}}class S extends _{}class w extends b{}w.kind="else";class x extends b{constructor(I,X){super(X),this.condition=I}render(I){let X=`if(${this.condition})`+super.render(I);return this.else&&(X+="else "+this.else.render(I)),X}optimizeNodes(){super.optimizeNodes();const I=this.condition;if(I===!0)return this.nodes;let X=this.else;if(X){const J=X.optimizeNodes();X=this.else=Array.isArray(J)?new w(J):J}if(X)return I===!1?X instanceof x?X:X.nodes:this.nodes.length?this:new x(K(I),X instanceof x?[X]:X.nodes);if(!(I===!1||!this.nodes.length))return this}optimizeNames(I,X){var J;if(this.else=(J=this.else)===null||J===void 0?void 0:J.optimizeNames(I,X),!!(super.optimizeNames(I,X)||this.else))return this.condition=ne(this.condition,I,X),this}get names(){const I=super.names;return G(I,this.condition),this.else&&V(I,this.else.names),I}}x.kind="if";class E extends b{}E.kind="for";class R extends E{constructor(I){super(),this.iteration=I}render(I){return`for(${this.iteration})`+super.render(I)}optimizeNames(I,X){if(super.optimizeNames(I,X))return this.iteration=ne(this.iteration,I,X),this}get names(){return V(super.names,this.iteration.names)}}class T extends E{constructor(I,X,J,he){super(),this.varKind=I,this.name=X,this.from=J,this.to=he}render(I){const X=I.es5?r.varKinds.var:this.varKind,{name:J,from:he,to:xe}=this;return`for(${X} ${J}=${he}; ${J}<${xe}; ${J}++)`+super.render(I)}get names(){const I=G(super.names,this.from);return G(I,this.to)}}class C extends E{constructor(I,X,J,he){super(),this.loop=I,this.varKind=X,this.name=J,this.iterable=he}render(I){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(I)}optimizeNames(I,X){if(super.optimizeNames(I,X))return this.iterable=ne(this.iterable,I,X),this}get names(){return V(super.names,this.iterable.names)}}class O extends b{constructor(I,X,J){super(),this.name=I,this.args=X,this.async=J}render(I){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(I)}}O.kind="func";class M extends _{render(I){return"return "+super.render(I)}}M.kind="return";class D extends b{render(I){let X="try"+super.render(I);return this.catch&&(X+=this.catch.render(I)),this.finally&&(X+=this.finally.render(I)),X}optimizeNodes(){var I,X;return super.optimizeNodes(),(I=this.catch)===null||I===void 0||I.optimizeNodes(),(X=this.finally)===null||X===void 0||X.optimizeNodes(),this}optimizeNames(I,X){var J,he;return super.optimizeNames(I,X),(J=this.catch)===null||J===void 0||J.optimizeNames(I,X),(he=this.finally)===null||he===void 0||he.optimizeNames(I,X),this}get names(){const I=super.names;return this.catch&&V(I,this.catch.names),this.finally&&V(I,this.finally.names),I}}class U extends b{constructor(I){super(),this.error=I}render(I){return`catch(${this.error})`+super.render(I)}}U.kind="catch";class B extends b{render(I){return"finally"+super.render(I)}}B.kind="finally";class q{constructor(I,X={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...X,_n:X.lines?`
|
|
49
|
+
`:""},this._extScope=I,this._scope=new r.Scope({parent:I}),this._nodes=[new S]}toString(){return this._root.render(this.opts)}name(I){return this._scope.name(I)}scopeName(I){return this._extScope.name(I)}scopeValue(I,X){const J=this._extScope.value(I,X);return(this._values[J.prefix]||(this._values[J.prefix]=new Set)).add(J),J}getScopeValue(I,X){return this._extScope.getValue(I,X)}scopeRefs(I){return this._extScope.scopeRefs(I,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(I,X,J,he){const xe=this._scope.toName(X);return J!==void 0&&he&&(this._constants[xe.str]=J),this._leafNode(new c(I,xe,J)),xe}const(I,X,J){return this._def(r.varKinds.const,I,X,J)}let(I,X,J){return this._def(r.varKinds.let,I,X,J)}var(I,X,J){return this._def(r.varKinds.var,I,X,J)}assign(I,X,J){return this._leafNode(new f(I,X,J))}add(I,X){return this._leafNode(new d(I,e.operators.ADD,X))}code(I){return typeof I=="function"?I():I!==t.nil&&this._leafNode(new v(I)),this}object(...I){const X=["{"];for(const[J,he]of I)X.length>1&&X.push(","),X.push(J),(J!==he||this.opts.es5)&&(X.push(":"),(0,t.addCodeArg)(X,he));return X.push("}"),new t._Code(X)}if(I,X,J){if(this._blockNode(new x(I)),X&&J)this.code(X).else().code(J).endIf();else if(X)this.code(X).endIf();else if(J)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(I){return this._elseNode(new x(I))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(x,w)}_for(I,X){return this._blockNode(I),X&&this.code(X).endFor(),this}for(I,X){return this._for(new R(I),X)}forRange(I,X,J,he,xe=this.opts.es5?r.varKinds.var:r.varKinds.let){const we=this._scope.toName(I);return this._for(new T(xe,we,X,J),()=>he(we))}forOf(I,X,J,he=r.varKinds.const){const xe=this._scope.toName(I);if(this.opts.es5){const we=X instanceof t.Name?X:this.var("_arr",X);return this.forRange("_i",0,(0,t._)`${we}.length`,je=>{this.var(xe,(0,t._)`${we}[${je}]`),J(xe)})}return this._for(new C("of",he,xe,X),()=>J(xe))}forIn(I,X,J,he=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(I,(0,t._)`Object.keys(${X})`,J);const xe=this._scope.toName(I);return this._for(new C("in",he,xe,X),()=>J(xe))}endFor(){return this._endBlockNode(E)}label(I){return this._leafNode(new h(I))}break(I){return this._leafNode(new m(I))}return(I){const X=new M;if(this._blockNode(X),this.code(I),X.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(M)}try(I,X,J){if(!X&&!J)throw new Error('CodeGen: "try" without "catch" and "finally"');const he=new D;if(this._blockNode(he),this.code(I),X){const xe=this.name("e");this._currNode=he.catch=new U(xe),X(xe)}return J&&(this._currNode=he.finally=new B,this.code(J)),this._endBlockNode(U,B)}throw(I){return this._leafNode(new g(I))}block(I,X){return this._blockStarts.push(this._nodes.length),I&&this.code(I).endBlock(X),this}endBlock(I){const X=this._blockStarts.pop();if(X===void 0)throw new Error("CodeGen: not in self-balancing block");const J=this._nodes.length-X;if(J<0||I!==void 0&&J!==I)throw new Error(`CodeGen: wrong number of nodes: ${J} vs ${I} expected`);return this._nodes.length=X,this}func(I,X=t.nil,J,he){return this._blockNode(new O(I,X,J)),he&&this.code(he).endFunc(),this}endFunc(){return this._endBlockNode(O)}optimize(I=1){for(;I-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(I){return this._currNode.nodes.push(I),this}_blockNode(I){this._currNode.nodes.push(I),this._nodes.push(I)}_endBlockNode(I,X){const J=this._currNode;if(J instanceof I||X&&J instanceof X)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${X?`${I.kind}/${X.kind}`:I.kind}"`)}_elseNode(I){const X=this._currNode;if(!(X instanceof x))throw new Error('CodeGen: "else" without "if"');return this._currNode=X.else=I,this}get _root(){return this._nodes[0]}get _currNode(){const I=this._nodes;return I[I.length-1]}set _currNode(I){const X=this._nodes;X[X.length-1]=I}}e.CodeGen=q;function V(Y,I){for(const X in I)Y[X]=(Y[X]||0)+(I[X]||0);return Y}function G(Y,I){return I instanceof t._CodeOrName?V(Y,I.names):Y}function ne(Y,I,X){if(Y instanceof t.Name)return J(Y);if(!he(Y))return Y;return new t._Code(Y._items.reduce((xe,we)=>(we instanceof t.Name&&(we=J(we)),we instanceof t._Code?xe.push(...we._items):xe.push(we),xe),[]));function J(xe){const we=X[xe.str];return we===void 0||I[xe.str]!==1?xe:(delete I[xe.str],we)}function he(xe){return xe instanceof t._Code&&xe._items.some(we=>we instanceof t.Name&&I[we.str]===1&&X[we.str]!==void 0)}}function oe(Y,I){for(const X in I)Y[X]=(Y[X]||0)-(I[X]||0)}function K(Y){return typeof Y=="boolean"||typeof Y=="number"||Y===null?!Y:(0,t._)`!${L(Y)}`}e.not=K;const ee=z(e.operators.AND);function re(...Y){return Y.reduce(ee)}e.and=re;const ue=z(e.operators.OR);function Q(...Y){return Y.reduce(ue)}e.or=Q;function z(Y){return(I,X)=>I===t.nil?X:X===t.nil?I:(0,t._)`${L(I)} ${Y} ${L(X)}`}function L(Y){return Y instanceof t.Name?Y:(0,t._)`(${Y})`}})(C2)),C2}var rn={},rj;function An(){if(rj)return rn;rj=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.checkStrictMode=rn.getErrorPath=rn.Type=rn.useFunc=rn.setEvaluated=rn.evaluatedPropsToName=rn.mergeEvaluated=rn.eachItem=rn.unescapeJsonPointer=rn.escapeJsonPointer=rn.escapeFragment=rn.unescapeFragment=rn.schemaRefOrVal=rn.schemaHasRulesButRef=rn.schemaHasRules=rn.checkUnknownRules=rn.alwaysValidSchema=rn.toHash=void 0;const e=Wt(),t=hE();function r(C){const O={};for(const M of C)O[M]=!0;return O}rn.toHash=r;function i(C,O){return typeof O=="boolean"?O:Object.keys(O).length===0?!0:(s(C,O),!l(O,C.self.RULES.all))}rn.alwaysValidSchema=i;function s(C,O=C.schema){const{opts:M,self:D}=C;if(!M.strictSchema||typeof O=="boolean")return;const U=D.RULES.keywords;for(const B in O)U[B]||T(C,`unknown keyword: "${B}"`)}rn.checkUnknownRules=s;function l(C,O){if(typeof C=="boolean")return!C;for(const M in C)if(O[M])return!0;return!1}rn.schemaHasRules=l;function c(C,O){if(typeof C=="boolean")return!C;for(const M in C)if(M!=="$ref"&&O.all[M])return!0;return!1}rn.schemaHasRulesButRef=c;function f({topSchemaRef:C,schemaPath:O},M,D,U){if(!U){if(typeof M=="number"||typeof M=="boolean")return M;if(typeof M=="string")return(0,e._)`${M}`}return(0,e._)`${C}${O}${(0,e.getProperty)(D)}`}rn.schemaRefOrVal=f;function d(C){return g(decodeURIComponent(C))}rn.unescapeFragment=d;function h(C){return encodeURIComponent(m(C))}rn.escapeFragment=h;function m(C){return typeof C=="number"?`${C}`:C.replace(/~/g,"~0").replace(/\//g,"~1")}rn.escapeJsonPointer=m;function g(C){return C.replace(/~1/g,"/").replace(/~0/g,"~")}rn.unescapeJsonPointer=g;function v(C,O){if(Array.isArray(C))for(const M of C)O(M);else O(C)}rn.eachItem=v;function _({mergeNames:C,mergeToName:O,mergeValues:M,resultToName:D}){return(U,B,q,V)=>{const G=q===void 0?B:q instanceof e.Name?(B instanceof e.Name?C(U,B,q):O(U,B,q),q):B instanceof e.Name?(O(U,q,B),B):M(B,q);return V===e.Name&&!(G instanceof e.Name)?D(U,G):G}}rn.mergeEvaluated={props:_({mergeNames:(C,O,M)=>C.if((0,e._)`${M} !== true && ${O} !== undefined`,()=>{C.if((0,e._)`${O} === true`,()=>C.assign(M,!0),()=>C.assign(M,(0,e._)`${M} || {}`).code((0,e._)`Object.assign(${M}, ${O})`))}),mergeToName:(C,O,M)=>C.if((0,e._)`${M} !== true`,()=>{O===!0?C.assign(M,!0):(C.assign(M,(0,e._)`${M} || {}`),S(C,M,O))}),mergeValues:(C,O)=>C===!0?!0:{...C,...O},resultToName:b}),items:_({mergeNames:(C,O,M)=>C.if((0,e._)`${M} !== true && ${O} !== undefined`,()=>C.assign(M,(0,e._)`${O} === true ? true : ${M} > ${O} ? ${M} : ${O}`)),mergeToName:(C,O,M)=>C.if((0,e._)`${M} !== true`,()=>C.assign(M,O===!0?!0:(0,e._)`${M} > ${O} ? ${M} : ${O}`)),mergeValues:(C,O)=>C===!0?!0:Math.max(C,O),resultToName:(C,O)=>C.var("items",O)})};function b(C,O){if(O===!0)return C.var("props",!0);const M=C.var("props",(0,e._)`{}`);return O!==void 0&&S(C,M,O),M}rn.evaluatedPropsToName=b;function S(C,O,M){Object.keys(M).forEach(D=>C.assign((0,e._)`${O}${(0,e.getProperty)(D)}`,!0))}rn.setEvaluated=S;const w={};function x(C,O){return C.scopeValue("func",{ref:O,code:w[O.code]||(w[O.code]=new t._Code(O.code))})}rn.useFunc=x;var E;(function(C){C[C.Num=0]="Num",C[C.Str=1]="Str"})(E||(rn.Type=E={}));function R(C,O,M){if(C instanceof e.Name){const D=O===E.Num;return M?D?(0,e._)`"[" + ${C} + "]"`:(0,e._)`"['" + ${C} + "']"`:D?(0,e._)`"/" + ${C}`:(0,e._)`"/" + ${C}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return M?(0,e.getProperty)(C).toString():"/"+m(C)}rn.getErrorPath=R;function T(C,O,M=C.opts.strictSchema){if(M){if(O=`strict mode: ${O}`,M===!0)throw new Error(O);C.self.logger.warn(O)}}return rn.checkStrictMode=T,rn}var SS={},aj;function If(){if(aj)return SS;aj=1,Object.defineProperty(SS,"__esModule",{value:!0});const e=Wt(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return SS.default=t,SS}var ij;function nx(){return ij||(ij=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=Wt(),r=An(),i=If();e.keywordError={message:({keyword:w})=>(0,t.str)`must pass "${w}" keyword validation`},e.keyword$DataError={message:({keyword:w,schemaType:x})=>x?(0,t.str)`"${w}" keyword must be ${x} ($data)`:(0,t.str)`"${w}" keyword is invalid ($data)`};function s(w,x=e.keywordError,E,R){const{it:T}=w,{gen:C,compositeRule:O,allErrors:M}=T,D=g(w,x,E);R??(O||M)?d(C,D):h(T,(0,t._)`[${D}]`)}e.reportError=s;function l(w,x=e.keywordError,E){const{it:R}=w,{gen:T,compositeRule:C,allErrors:O}=R,M=g(w,x,E);d(T,M),C||O||h(R,i.default.vErrors)}e.reportExtraError=l;function c(w,x){w.assign(i.default.errors,x),w.if((0,t._)`${i.default.vErrors} !== null`,()=>w.if(x,()=>w.assign((0,t._)`${i.default.vErrors}.length`,x),()=>w.assign(i.default.vErrors,null)))}e.resetErrorsCount=c;function f({gen:w,keyword:x,schemaValue:E,data:R,errsCount:T,it:C}){if(T===void 0)throw new Error("ajv implementation error");const O=w.name("err");w.forRange("i",T,i.default.errors,M=>{w.const(O,(0,t._)`${i.default.vErrors}[${M}]`),w.if((0,t._)`${O}.instancePath === undefined`,()=>w.assign((0,t._)`${O}.instancePath`,(0,t.strConcat)(i.default.instancePath,C.errorPath))),w.assign((0,t._)`${O}.schemaPath`,(0,t.str)`${C.errSchemaPath}/${x}`),C.opts.verbose&&(w.assign((0,t._)`${O}.schema`,E),w.assign((0,t._)`${O}.data`,R))})}e.extendErrors=f;function d(w,x){const E=w.const("err",x);w.if((0,t._)`${i.default.vErrors} === null`,()=>w.assign(i.default.vErrors,(0,t._)`[${E}]`),(0,t._)`${i.default.vErrors}.push(${E})`),w.code((0,t._)`${i.default.errors}++`)}function h(w,x){const{gen:E,validateName:R,schemaEnv:T}=w;T.$async?E.throw((0,t._)`new ${w.ValidationError}(${x})`):(E.assign((0,t._)`${R}.errors`,x),E.return(!1))}const m={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function g(w,x,E){const{createErrors:R}=w.it;return R===!1?(0,t._)`{}`:v(w,x,E)}function v(w,x,E={}){const{gen:R,it:T}=w,C=[_(T,E),b(w,E)];return S(w,x,C),R.object(...C)}function _({errorPath:w},{instancePath:x}){const E=x?(0,t.str)`${w}${(0,r.getErrorPath)(x,r.Type.Str)}`:w;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,E)]}function b({keyword:w,it:{errSchemaPath:x}},{schemaPath:E,parentSchema:R}){let T=R?x:(0,t.str)`${x}/${w}`;return E&&(T=(0,t.str)`${T}${(0,r.getErrorPath)(E,r.Type.Str)}`),[m.schemaPath,T]}function S(w,{params:x,message:E},R){const{keyword:T,data:C,schemaValue:O,it:M}=w,{opts:D,propertyName:U,topSchemaRef:B,schemaPath:q}=M;R.push([m.keyword,T],[m.params,typeof x=="function"?x(w):x||(0,t._)`{}`]),D.messages&&R.push([m.message,typeof E=="function"?E(w):E]),D.verbose&&R.push([m.schema,O],[m.parentSchema,(0,t._)`${B}${q}`],[i.default.data,C]),U&&R.push([m.propertyName,U])}})(T2)),T2}var oj;function nre(){if(oj)return ip;oj=1,Object.defineProperty(ip,"__esModule",{value:!0}),ip.boolOrEmptySchema=ip.topBoolOrEmptySchema=void 0;const e=nx(),t=Wt(),r=If(),i={message:"boolean schema is false"};function s(f){const{gen:d,schema:h,validateName:m}=f;h===!1?c(f,!1):typeof h=="object"&&h.$async===!0?d.return(r.default.data):(d.assign((0,t._)`${m}.errors`,null),d.return(!0))}ip.topBoolOrEmptySchema=s;function l(f,d){const{gen:h,schema:m}=f;m===!1?(h.var(d,!1),c(f)):h.var(d,!0)}ip.boolOrEmptySchema=l;function c(f,d){const{gen:h,data:m}=f,g={gen:h,keyword:"false schema",data:m,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:f};(0,e.reportError)(g,i,void 0,d)}return ip}var hi={},op={},sj;function g$(){if(sj)return op;sj=1,Object.defineProperty(op,"__esModule",{value:!0}),op.getRules=op.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(s){return typeof s=="string"&&t.has(s)}op.isJSONType=r;function i(){const s={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...s,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},s.number,s.string,s.array,s.object],post:{rules:[]},all:{},keywords:{}}}return op.getRules=i,op}var xc={},lj;function y$(){if(lj)return xc;lj=1,Object.defineProperty(xc,"__esModule",{value:!0}),xc.shouldUseRule=xc.shouldUseGroup=xc.schemaHasRulesForType=void 0;function e({schema:i,self:s},l){const c=s.RULES.types[l];return c&&c!==!0&&t(i,c)}xc.schemaHasRulesForType=e;function t(i,s){return s.rules.some(l=>r(i,l))}xc.shouldUseGroup=t;function r(i,s){var l;return i[s.keyword]!==void 0||((l=s.definition.implements)===null||l===void 0?void 0:l.some(c=>i[c]!==void 0))}return xc.shouldUseRule=r,xc}var uj;function pE(){if(uj)return hi;uj=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.reportTypeError=hi.checkDataTypes=hi.checkDataType=hi.coerceAndCheckDataType=hi.getJSONTypes=hi.getSchemaTypes=hi.DataType=void 0;const e=g$(),t=y$(),r=nx(),i=Wt(),s=An();var l;(function(E){E[E.Correct=0]="Correct",E[E.Wrong=1]="Wrong"})(l||(hi.DataType=l={}));function c(E){const R=f(E.type);if(R.includes("null")){if(E.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!R.length&&E.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');E.nullable===!0&&R.push("null")}return R}hi.getSchemaTypes=c;function f(E){const R=Array.isArray(E)?E:E?[E]:[];if(R.every(e.isJSONType))return R;throw new Error("type must be JSONType or JSONType[]: "+R.join(","))}hi.getJSONTypes=f;function d(E,R){const{gen:T,data:C,opts:O}=E,M=m(R,O.coerceTypes),D=R.length>0&&!(M.length===0&&R.length===1&&(0,t.schemaHasRulesForType)(E,R[0]));if(D){const U=b(R,C,O.strictNumbers,l.Wrong);T.if(U,()=>{M.length?g(E,R,M):w(E)})}return D}hi.coerceAndCheckDataType=d;const h=new Set(["string","number","integer","boolean","null"]);function m(E,R){return R?E.filter(T=>h.has(T)||R==="array"&&T==="array"):[]}function g(E,R,T){const{gen:C,data:O,opts:M}=E,D=C.let("dataType",(0,i._)`typeof ${O}`),U=C.let("coerced",(0,i._)`undefined`);M.coerceTypes==="array"&&C.if((0,i._)`${D} == 'object' && Array.isArray(${O}) && ${O}.length == 1`,()=>C.assign(O,(0,i._)`${O}[0]`).assign(D,(0,i._)`typeof ${O}`).if(b(R,O,M.strictNumbers),()=>C.assign(U,O))),C.if((0,i._)`${U} !== undefined`);for(const q of T)(h.has(q)||q==="array"&&M.coerceTypes==="array")&&B(q);C.else(),w(E),C.endIf(),C.if((0,i._)`${U} !== undefined`,()=>{C.assign(O,U),v(E,U)});function B(q){switch(q){case"string":C.elseIf((0,i._)`${D} == "number" || ${D} == "boolean"`).assign(U,(0,i._)`"" + ${O}`).elseIf((0,i._)`${O} === null`).assign(U,(0,i._)`""`);return;case"number":C.elseIf((0,i._)`${D} == "boolean" || ${O} === null
|
|
50
|
+
|| (${D} == "string" && ${O} && ${O} == +${O})`).assign(U,(0,i._)`+${O}`);return;case"integer":C.elseIf((0,i._)`${D} === "boolean" || ${O} === null
|
|
51
|
+
|| (${D} === "string" && ${O} && ${O} == +${O} && !(${O} % 1))`).assign(U,(0,i._)`+${O}`);return;case"boolean":C.elseIf((0,i._)`${O} === "false" || ${O} === 0 || ${O} === null`).assign(U,!1).elseIf((0,i._)`${O} === "true" || ${O} === 1`).assign(U,!0);return;case"null":C.elseIf((0,i._)`${O} === "" || ${O} === 0 || ${O} === false`),C.assign(U,null);return;case"array":C.elseIf((0,i._)`${D} === "string" || ${D} === "number"
|
|
52
|
+
|| ${D} === "boolean" || ${O} === null`).assign(U,(0,i._)`[${O}]`)}}}function v({gen:E,parentData:R,parentDataProperty:T},C){E.if((0,i._)`${R} !== undefined`,()=>E.assign((0,i._)`${R}[${T}]`,C))}function _(E,R,T,C=l.Correct){const O=C===l.Correct?i.operators.EQ:i.operators.NEQ;let M;switch(E){case"null":return(0,i._)`${R} ${O} null`;case"array":M=(0,i._)`Array.isArray(${R})`;break;case"object":M=(0,i._)`${R} && typeof ${R} == "object" && !Array.isArray(${R})`;break;case"integer":M=D((0,i._)`!(${R} % 1) && !isNaN(${R})`);break;case"number":M=D();break;default:return(0,i._)`typeof ${R} ${O} ${E}`}return C===l.Correct?M:(0,i.not)(M);function D(U=i.nil){return(0,i.and)((0,i._)`typeof ${R} == "number"`,U,T?(0,i._)`isFinite(${R})`:i.nil)}}hi.checkDataType=_;function b(E,R,T,C){if(E.length===1)return _(E[0],R,T,C);let O;const M=(0,s.toHash)(E);if(M.array&&M.object){const D=(0,i._)`typeof ${R} != "object"`;O=M.null?D:(0,i._)`!${R} || ${D}`,delete M.null,delete M.array,delete M.object}else O=i.nil;M.number&&delete M.integer;for(const D in M)O=(0,i.and)(O,_(D,R,T,C));return O}hi.checkDataTypes=b;const S={message:({schema:E})=>`must be ${E}`,params:({schema:E,schemaValue:R})=>typeof E=="string"?(0,i._)`{type: ${E}}`:(0,i._)`{type: ${R}}`};function w(E){const R=x(E);(0,r.reportError)(R,S)}hi.reportTypeError=w;function x(E){const{gen:R,data:T,schema:C}=E,O=(0,s.schemaRefOrVal)(E,C,"type");return{gen:R,keyword:"type",data:T,schema:C.type,schemaCode:O,schemaValue:O,parentSchema:C,params:{},it:E}}return hi}var yb={},cj;function rre(){if(cj)return yb;cj=1,Object.defineProperty(yb,"__esModule",{value:!0}),yb.assignDefaults=void 0;const e=Wt(),t=An();function r(s,l){const{properties:c,items:f}=s.schema;if(l==="object"&&c)for(const d in c)i(s,d,c[d].default);else l==="array"&&Array.isArray(f)&&f.forEach((d,h)=>i(s,h,d.default))}yb.assignDefaults=r;function i(s,l,c){const{gen:f,compositeRule:d,data:h,opts:m}=s;if(c===void 0)return;const g=(0,e._)`${h}${(0,e.getProperty)(l)}`;if(d){(0,t.checkStrictMode)(s,`default is ignored for: ${g}`);return}let v=(0,e._)`${g} === undefined`;m.useDefaults==="empty"&&(v=(0,e._)`${v} || ${g} === null || ${g} === ""`),f.if(v,(0,e._)`${g} = ${(0,e.stringify)(c)}`)}return yb}var dl={},Yn={},fj;function xl(){if(fj)return Yn;fj=1,Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.validateUnion=Yn.validateArray=Yn.usePattern=Yn.callValidateCode=Yn.schemaProperties=Yn.allSchemaProperties=Yn.noPropertyInData=Yn.propertyInData=Yn.isOwnProperty=Yn.hasPropFunc=Yn.reportMissingProp=Yn.checkMissingProp=Yn.checkReportMissingProp=void 0;const e=Wt(),t=An(),r=If(),i=An();function s(E,R){const{gen:T,data:C,it:O}=E;T.if(m(T,C,R,O.opts.ownProperties),()=>{E.setParams({missingProperty:(0,e._)`${R}`},!0),E.error()})}Yn.checkReportMissingProp=s;function l({gen:E,data:R,it:{opts:T}},C,O){return(0,e.or)(...C.map(M=>(0,e.and)(m(E,R,M,T.ownProperties),(0,e._)`${O} = ${M}`)))}Yn.checkMissingProp=l;function c(E,R){E.setParams({missingProperty:R},!0),E.error()}Yn.reportMissingProp=c;function f(E){return E.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Yn.hasPropFunc=f;function d(E,R,T){return(0,e._)`${f(E)}.call(${R}, ${T})`}Yn.isOwnProperty=d;function h(E,R,T,C){const O=(0,e._)`${R}${(0,e.getProperty)(T)} !== undefined`;return C?(0,e._)`${O} && ${d(E,R,T)}`:O}Yn.propertyInData=h;function m(E,R,T,C){const O=(0,e._)`${R}${(0,e.getProperty)(T)} === undefined`;return C?(0,e.or)(O,(0,e.not)(d(E,R,T))):O}Yn.noPropertyInData=m;function g(E){return E?Object.keys(E).filter(R=>R!=="__proto__"):[]}Yn.allSchemaProperties=g;function v(E,R){return g(R).filter(T=>!(0,t.alwaysValidSchema)(E,R[T]))}Yn.schemaProperties=v;function _({schemaCode:E,data:R,it:{gen:T,topSchemaRef:C,schemaPath:O,errorPath:M},it:D},U,B,q){const V=q?(0,e._)`${E}, ${R}, ${C}${O}`:R,G=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,M)],[r.default.parentData,D.parentData],[r.default.parentDataProperty,D.parentDataProperty],[r.default.rootData,r.default.rootData]];D.opts.dynamicRef&&G.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const ne=(0,e._)`${V}, ${T.object(...G)}`;return B!==e.nil?(0,e._)`${U}.call(${B}, ${ne})`:(0,e._)`${U}(${ne})`}Yn.callValidateCode=_;const b=(0,e._)`new RegExp`;function S({gen:E,it:{opts:R}},T){const C=R.unicodeRegExp?"u":"",{regExp:O}=R.code,M=O(T,C);return E.scopeValue("pattern",{key:M.toString(),ref:M,code:(0,e._)`${O.code==="new RegExp"?b:(0,i.useFunc)(E,O)}(${T}, ${C})`})}Yn.usePattern=S;function w(E){const{gen:R,data:T,keyword:C,it:O}=E,M=R.name("valid");if(O.allErrors){const U=R.let("valid",!0);return D(()=>R.assign(U,!1)),U}return R.var(M,!0),D(()=>R.break()),M;function D(U){const B=R.const("len",(0,e._)`${T}.length`);R.forRange("i",0,B,q=>{E.subschema({keyword:C,dataProp:q,dataPropType:t.Type.Num},M),R.if((0,e.not)(M),U)})}}Yn.validateArray=w;function x(E){const{gen:R,schema:T,keyword:C,it:O}=E;if(!Array.isArray(T))throw new Error("ajv implementation error");if(T.some(B=>(0,t.alwaysValidSchema)(O,B))&&!O.opts.unevaluated)return;const D=R.let("valid",!1),U=R.name("_valid");R.block(()=>T.forEach((B,q)=>{const V=E.subschema({keyword:C,schemaProp:q,compositeRule:!0},U);R.assign(D,(0,e._)`${D} || ${U}`),E.mergeValidEvaluated(V,U)||R.if((0,e.not)(D))})),E.result(D,()=>E.reset(),()=>E.error(!0))}return Yn.validateUnion=x,Yn}var dj;function are(){if(dj)return dl;dj=1,Object.defineProperty(dl,"__esModule",{value:!0}),dl.validateKeywordUsage=dl.validSchemaType=dl.funcKeywordCode=dl.macroKeywordCode=void 0;const e=Wt(),t=If(),r=xl(),i=nx();function s(v,_){const{gen:b,keyword:S,schema:w,parentSchema:x,it:E}=v,R=_.macro.call(E.self,w,x,E),T=h(b,S,R);E.opts.validateSchema!==!1&&E.self.validateSchema(R,!0);const C=b.name("valid");v.subschema({schema:R,schemaPath:e.nil,errSchemaPath:`${E.errSchemaPath}/${S}`,topSchemaRef:T,compositeRule:!0},C),v.pass(C,()=>v.error(!0))}dl.macroKeywordCode=s;function l(v,_){var b;const{gen:S,keyword:w,schema:x,parentSchema:E,$data:R,it:T}=v;d(T,_);const C=!R&&_.compile?_.compile.call(T.self,x,E,T):_.validate,O=h(S,w,C),M=S.let("valid");v.block$data(M,D),v.ok((b=_.valid)!==null&&b!==void 0?b:M);function D(){if(_.errors===!1)q(),_.modifying&&c(v),V(()=>v.error());else{const G=_.async?U():B();_.modifying&&c(v),V(()=>f(v,G))}}function U(){const G=S.let("ruleErrs",null);return S.try(()=>q((0,e._)`await `),ne=>S.assign(M,!1).if((0,e._)`${ne} instanceof ${T.ValidationError}`,()=>S.assign(G,(0,e._)`${ne}.errors`),()=>S.throw(ne))),G}function B(){const G=(0,e._)`${O}.errors`;return S.assign(G,null),q(e.nil),G}function q(G=_.async?(0,e._)`await `:e.nil){const ne=T.opts.passContext?t.default.this:t.default.self,oe=!("compile"in _&&!R||_.schema===!1);S.assign(M,(0,e._)`${G}${(0,r.callValidateCode)(v,O,ne,oe)}`,_.modifying)}function V(G){var ne;S.if((0,e.not)((ne=_.valid)!==null&&ne!==void 0?ne:M),G)}}dl.funcKeywordCode=l;function c(v){const{gen:_,data:b,it:S}=v;_.if(S.parentData,()=>_.assign(b,(0,e._)`${S.parentData}[${S.parentDataProperty}]`))}function f(v,_){const{gen:b}=v;b.if((0,e._)`Array.isArray(${_})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${_} : ${t.default.vErrors}.concat(${_})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(v)},()=>v.error())}function d({schemaEnv:v},_){if(_.async&&!v.$async)throw new Error("async keyword in sync schema")}function h(v,_,b){if(b===void 0)throw new Error(`keyword "${_}" failed to compile`);return v.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function m(v,_,b=!1){return!_.length||_.some(S=>S==="array"?Array.isArray(v):S==="object"?v&&typeof v=="object"&&!Array.isArray(v):typeof v==S||b&&typeof v>"u")}dl.validSchemaType=m;function g({schema:v,opts:_,self:b,errSchemaPath:S},w,x){if(Array.isArray(w.keyword)?!w.keyword.includes(x):w.keyword!==x)throw new Error("ajv implementation error");const E=w.dependencies;if(E?.some(R=>!Object.prototype.hasOwnProperty.call(v,R)))throw new Error(`parent schema must have dependencies of ${x}: ${E.join(",")}`);if(w.validateSchema&&!w.validateSchema(v[x])){const T=`keyword "${x}" value is invalid at path "${S}": `+b.errorsText(w.validateSchema.errors);if(_.validateSchema==="log")b.logger.error(T);else throw new Error(T)}}return dl.validateKeywordUsage=g,dl}var _c={},hj;function ire(){if(hj)return _c;hj=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.extendSubschemaMode=_c.extendSubschemaData=_c.getSubschema=void 0;const e=Wt(),t=An();function r(l,{keyword:c,schemaProp:f,schema:d,schemaPath:h,errSchemaPath:m,topSchemaRef:g}){if(c!==void 0&&d!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(c!==void 0){const v=l.schema[c];return f===void 0?{schema:v,schemaPath:(0,e._)`${l.schemaPath}${(0,e.getProperty)(c)}`,errSchemaPath:`${l.errSchemaPath}/${c}`}:{schema:v[f],schemaPath:(0,e._)`${l.schemaPath}${(0,e.getProperty)(c)}${(0,e.getProperty)(f)}`,errSchemaPath:`${l.errSchemaPath}/${c}/${(0,t.escapeFragment)(f)}`}}if(d!==void 0){if(h===void 0||m===void 0||g===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:h,topSchemaRef:g,errSchemaPath:m}}throw new Error('either "keyword" or "schema" must be passed')}_c.getSubschema=r;function i(l,c,{dataProp:f,dataPropType:d,data:h,dataTypes:m,propertyName:g}){if(h!==void 0&&f!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:v}=c;if(f!==void 0){const{errorPath:b,dataPathArr:S,opts:w}=c,x=v.let("data",(0,e._)`${c.data}${(0,e.getProperty)(f)}`,!0);_(x),l.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(f,d,w.jsPropertySyntax)}`,l.parentDataProperty=(0,e._)`${f}`,l.dataPathArr=[...S,l.parentDataProperty]}if(h!==void 0){const b=h instanceof e.Name?h:v.let("data",h,!0);_(b),g!==void 0&&(l.propertyName=g)}m&&(l.dataTypes=m);function _(b){l.data=b,l.dataLevel=c.dataLevel+1,l.dataTypes=[],c.definedProperties=new Set,l.parentData=c.data,l.dataNames=[...c.dataNames,b]}}_c.extendSubschemaData=i;function s(l,{jtdDiscriminator:c,jtdMetadata:f,compositeRule:d,createErrors:h,allErrors:m}){d!==void 0&&(l.compositeRule=d),h!==void 0&&(l.createErrors=h),m!==void 0&&(l.allErrors=m),l.jtdDiscriminator=c,l.jtdMetadata=f}return _c.extendSubschemaMode=s,_c}var eo={},A2,pj;function v$(){return pj||(pj=1,A2=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var i,s,l;if(Array.isArray(t)){if(i=t.length,i!=r.length)return!1;for(s=i;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(l=Object.keys(t),i=l.length,i!==Object.keys(r).length)return!1;for(s=i;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,l[s]))return!1;for(s=i;s--!==0;){var c=l[s];if(!e(t[c],r[c]))return!1}return!0}return t!==t&&r!==r}),A2}var M2={exports:{}},mj;function ore(){if(mj)return M2.exports;mj=1;var e=M2.exports=function(i,s,l){typeof s=="function"&&(l=s,s={}),l=s.cb||l;var c=typeof l=="function"?l:l.pre||function(){},f=l.post||function(){};t(s,c,f,i,"",i)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(i,s,l,c,f,d,h,m,g,v){if(c&&typeof c=="object"&&!Array.isArray(c)){s(c,f,d,h,m,g,v);for(var _ in c){var b=c[_];if(Array.isArray(b)){if(_ in e.arrayKeywords)for(var S=0;S<b.length;S++)t(i,s,l,b[S],f+"/"+_+"/"+S,d,f,_,c,S)}else if(_ in e.propsKeywords){if(b&&typeof b=="object")for(var w in b)t(i,s,l,b[w],f+"/"+_+"/"+r(w),d,f,_,c,w)}else(_ in e.keywords||i.allKeys&&!(_ in e.skipKeywords))&&t(i,s,l,b,f+"/"+_,d,f,_,c)}l(c,f,d,h,m,g,v)}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return M2.exports}var gj;function rx(){if(gj)return eo;gj=1,Object.defineProperty(eo,"__esModule",{value:!0}),eo.getSchemaRefs=eo.resolveUrl=eo.normalizeId=eo._getFullPath=eo.getFullPath=eo.inlineRef=void 0;const e=An(),t=v$(),r=ore(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(S,w=!0){return typeof S=="boolean"?!0:w===!0?!c(S):w?f(S)<=w:!1}eo.inlineRef=s;const l=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(S){for(const w in S){if(l.has(w))return!0;const x=S[w];if(Array.isArray(x)&&x.some(c)||typeof x=="object"&&c(x))return!0}return!1}function f(S){let w=0;for(const x in S){if(x==="$ref")return 1/0;if(w++,!i.has(x)&&(typeof S[x]=="object"&&(0,e.eachItem)(S[x],E=>w+=f(E)),w===1/0))return 1/0}return w}function d(S,w="",x){x!==!1&&(w=g(w));const E=S.parse(w);return h(S,E)}eo.getFullPath=d;function h(S,w){return S.serialize(w).split("#")[0]+"#"}eo._getFullPath=h;const m=/#\/?$/;function g(S){return S?S.replace(m,""):""}eo.normalizeId=g;function v(S,w,x){return x=g(x),S.resolve(w,x)}eo.resolveUrl=v;const _=/^[a-z_][-a-z0-9._]*$/i;function b(S,w){if(typeof S=="boolean")return{};const{schemaId:x,uriResolver:E}=this.opts,R=g(S[x]||w),T={"":R},C=d(E,R,!1),O={},M=new Set;return r(S,{allKeys:!0},(B,q,V,G)=>{if(G===void 0)return;const ne=C+q;let oe=T[G];typeof B[x]=="string"&&(oe=K.call(this,B[x])),ee.call(this,B.$anchor),ee.call(this,B.$dynamicAnchor),T[q]=oe;function K(re){const ue=this.opts.uriResolver.resolve;if(re=g(oe?ue(oe,re):re),M.has(re))throw U(re);M.add(re);let Q=this.refs[re];return typeof Q=="string"&&(Q=this.refs[Q]),typeof Q=="object"?D(B,Q.schema,re):re!==g(ne)&&(re[0]==="#"?(D(B,O[re],re),O[re]=B):this.refs[re]=ne),re}function ee(re){if(typeof re=="string"){if(!_.test(re))throw new Error(`invalid anchor "${re}"`);K.call(this,`#${re}`)}}}),O;function D(B,q,V){if(q!==void 0&&!t(B,q))throw U(V)}function U(B){return new Error(`reference "${B}" resolves to more than one schema`)}}return eo.getSchemaRefs=b,eo}var yj;function ax(){if(yj)return Ec;yj=1,Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.getData=Ec.KeywordCxt=Ec.validateFunctionCode=void 0;const e=nre(),t=pE(),r=y$(),i=pE(),s=rre(),l=are(),c=ire(),f=Wt(),d=If(),h=rx(),m=An(),g=nx();function v(de){if(C(de)&&(M(de),T(de))){w(de);return}_(de,()=>(0,e.topBoolOrEmptySchema)(de))}Ec.validateFunctionCode=v;function _({gen:de,validateName:se,schema:ye,schemaEnv:be,opts:Ae},Oe){Ae.code.es5?de.func(se,(0,f._)`${d.default.data}, ${d.default.valCxt}`,be.$async,()=>{de.code((0,f._)`"use strict"; ${E(ye,Ae)}`),S(de,Ae),de.code(Oe)}):de.func(se,(0,f._)`${d.default.data}, ${b(Ae)}`,be.$async,()=>de.code(E(ye,Ae)).code(Oe))}function b(de){return(0,f._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${de.dynamicRef?(0,f._)`, ${d.default.dynamicAnchors}={}`:f.nil}}={}`}function S(de,se){de.if(d.default.valCxt,()=>{de.var(d.default.instancePath,(0,f._)`${d.default.valCxt}.${d.default.instancePath}`),de.var(d.default.parentData,(0,f._)`${d.default.valCxt}.${d.default.parentData}`),de.var(d.default.parentDataProperty,(0,f._)`${d.default.valCxt}.${d.default.parentDataProperty}`),de.var(d.default.rootData,(0,f._)`${d.default.valCxt}.${d.default.rootData}`),se.dynamicRef&&de.var(d.default.dynamicAnchors,(0,f._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{de.var(d.default.instancePath,(0,f._)`""`),de.var(d.default.parentData,(0,f._)`undefined`),de.var(d.default.parentDataProperty,(0,f._)`undefined`),de.var(d.default.rootData,d.default.data),se.dynamicRef&&de.var(d.default.dynamicAnchors,(0,f._)`{}`)})}function w(de){const{schema:se,opts:ye,gen:be}=de;_(de,()=>{ye.$comment&&se.$comment&&G(de),B(de),be.let(d.default.vErrors,null),be.let(d.default.errors,0),ye.unevaluated&&x(de),D(de),ne(de)})}function x(de){const{gen:se,validateName:ye}=de;de.evaluated=se.const("evaluated",(0,f._)`${ye}.evaluated`),se.if((0,f._)`${de.evaluated}.dynamicProps`,()=>se.assign((0,f._)`${de.evaluated}.props`,(0,f._)`undefined`)),se.if((0,f._)`${de.evaluated}.dynamicItems`,()=>se.assign((0,f._)`${de.evaluated}.items`,(0,f._)`undefined`))}function E(de,se){const ye=typeof de=="object"&&de[se.schemaId];return ye&&(se.code.source||se.code.process)?(0,f._)`/*# sourceURL=${ye} */`:f.nil}function R(de,se){if(C(de)&&(M(de),T(de))){O(de,se);return}(0,e.boolOrEmptySchema)(de,se)}function T({schema:de,self:se}){if(typeof de=="boolean")return!de;for(const ye in de)if(se.RULES.all[ye])return!0;return!1}function C(de){return typeof de.schema!="boolean"}function O(de,se){const{schema:ye,gen:be,opts:Ae}=de;Ae.$comment&&ye.$comment&&G(de),q(de),V(de);const Oe=be.const("_errs",d.default.errors);D(de,Oe),be.var(se,(0,f._)`${Oe} === ${d.default.errors}`)}function M(de){(0,m.checkUnknownRules)(de),U(de)}function D(de,se){if(de.opts.jtd)return K(de,[],!1,se);const ye=(0,t.getSchemaTypes)(de.schema),be=(0,t.coerceAndCheckDataType)(de,ye);K(de,ye,!be,se)}function U(de){const{schema:se,errSchemaPath:ye,opts:be,self:Ae}=de;se.$ref&&be.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(se,Ae.RULES)&&Ae.logger.warn(`$ref: keywords ignored in schema at path "${ye}"`)}function B(de){const{schema:se,opts:ye}=de;se.default!==void 0&&ye.useDefaults&&ye.strictSchema&&(0,m.checkStrictMode)(de,"default is ignored in the schema root")}function q(de){const se=de.schema[de.opts.schemaId];se&&(de.baseId=(0,h.resolveUrl)(de.opts.uriResolver,de.baseId,se))}function V(de){if(de.schema.$async&&!de.schemaEnv.$async)throw new Error("async schema in sync schema")}function G({gen:de,schemaEnv:se,schema:ye,errSchemaPath:be,opts:Ae}){const Oe=ye.$comment;if(Ae.$comment===!0)de.code((0,f._)`${d.default.self}.logger.log(${Oe})`);else if(typeof Ae.$comment=="function"){const Ie=(0,f.str)`${be}/$comment`,$e=de.scopeValue("root",{ref:se.root});de.code((0,f._)`${d.default.self}.opts.$comment(${Oe}, ${Ie}, ${$e}.schema)`)}}function ne(de){const{gen:se,schemaEnv:ye,validateName:be,ValidationError:Ae,opts:Oe}=de;ye.$async?se.if((0,f._)`${d.default.errors} === 0`,()=>se.return(d.default.data),()=>se.throw((0,f._)`new ${Ae}(${d.default.vErrors})`)):(se.assign((0,f._)`${be}.errors`,d.default.vErrors),Oe.unevaluated&&oe(de),se.return((0,f._)`${d.default.errors} === 0`))}function oe({gen:de,evaluated:se,props:ye,items:be}){ye instanceof f.Name&&de.assign((0,f._)`${se}.props`,ye),be instanceof f.Name&&de.assign((0,f._)`${se}.items`,be)}function K(de,se,ye,be){const{gen:Ae,schema:Oe,data:Ie,allErrors:$e,opts:Ne,self:Ue}=de,{RULES:Re}=Ue;if(Oe.$ref&&(Ne.ignoreKeywordsWithRef||!(0,m.schemaHasRulesButRef)(Oe,Re))){Ae.block(()=>he(de,"$ref",Re.all.$ref.definition));return}Ne.jtd||re(de,se),Ae.block(()=>{for(const ot of Re.rules)Ze(ot);Ze(Re.post)});function Ze(ot){(0,r.shouldUseGroup)(Oe,ot)&&(ot.type?(Ae.if((0,i.checkDataType)(ot.type,Ie,Ne.strictNumbers)),ee(de,ot),se.length===1&&se[0]===ot.type&&ye&&(Ae.else(),(0,i.reportTypeError)(de)),Ae.endIf()):ee(de,ot),$e||Ae.if((0,f._)`${d.default.errors} === ${be||0}`))}}function ee(de,se){const{gen:ye,schema:be,opts:{useDefaults:Ae}}=de;Ae&&(0,s.assignDefaults)(de,se.type),ye.block(()=>{for(const Oe of se.rules)(0,r.shouldUseRule)(be,Oe)&&he(de,Oe.keyword,Oe.definition,se.type)})}function re(de,se){de.schemaEnv.meta||!de.opts.strictTypes||(ue(de,se),de.opts.allowUnionTypes||Q(de,se),z(de,de.dataTypes))}function ue(de,se){if(se.length){if(!de.dataTypes.length){de.dataTypes=se;return}se.forEach(ye=>{Y(de.dataTypes,ye)||X(de,`type "${ye}" not allowed by context "${de.dataTypes.join(",")}"`)}),I(de,se)}}function Q(de,se){se.length>1&&!(se.length===2&&se.includes("null"))&&X(de,"use allowUnionTypes to allow union type keyword")}function z(de,se){const ye=de.self.RULES.all;for(const be in ye){const Ae=ye[be];if(typeof Ae=="object"&&(0,r.shouldUseRule)(de.schema,Ae)){const{type:Oe}=Ae.definition;Oe.length&&!Oe.some(Ie=>L(se,Ie))&&X(de,`missing type "${Oe.join(",")}" for keyword "${be}"`)}}}function L(de,se){return de.includes(se)||se==="number"&&de.includes("integer")}function Y(de,se){return de.includes(se)||se==="integer"&&de.includes("number")}function I(de,se){const ye=[];for(const be of de.dataTypes)Y(se,be)?ye.push(be):se.includes("integer")&&be==="number"&&ye.push("integer");de.dataTypes=ye}function X(de,se){const ye=de.schemaEnv.baseId+de.errSchemaPath;se+=` at "${ye}" (strictTypes)`,(0,m.checkStrictMode)(de,se,de.opts.strictTypes)}class J{constructor(se,ye,be){if((0,l.validateKeywordUsage)(se,ye,be),this.gen=se.gen,this.allErrors=se.allErrors,this.keyword=be,this.data=se.data,this.schema=se.schema[be],this.$data=ye.$data&&se.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m.schemaRefOrVal)(se,this.schema,be,this.$data),this.schemaType=ye.schemaType,this.parentSchema=se.schema,this.params={},this.it=se,this.def=ye,this.$data)this.schemaCode=se.gen.const("vSchema",je(this.$data,se));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,ye.schemaType,ye.allowUndefined))throw new Error(`${be} value must be ${JSON.stringify(ye.schemaType)}`);("code"in ye?ye.trackErrors:ye.errors!==!1)&&(this.errsCount=se.gen.const("_errs",d.default.errors))}result(se,ye,be){this.failResult((0,f.not)(se),ye,be)}failResult(se,ye,be){this.gen.if(se),be?be():this.error(),ye?(this.gen.else(),ye(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(se,ye){this.failResult((0,f.not)(se),void 0,ye)}fail(se){if(se===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(se),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(se){if(!this.$data)return this.fail(se);const{schemaCode:ye}=this;this.fail((0,f._)`${ye} !== undefined && (${(0,f.or)(this.invalid$data(),se)})`)}error(se,ye,be){if(ye){this.setParams(ye),this._error(se,be),this.setParams({});return}this._error(se,be)}_error(se,ye){(se?g.reportExtraError:g.reportError)(this,this.def.error,ye)}$dataError(){(0,g.reportError)(this,this.def.$dataError||g.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,g.resetErrorsCount)(this.gen,this.errsCount)}ok(se){this.allErrors||this.gen.if(se)}setParams(se,ye){ye?Object.assign(this.params,se):this.params=se}block$data(se,ye,be=f.nil){this.gen.block(()=>{this.check$data(se,be),ye()})}check$data(se=f.nil,ye=f.nil){if(!this.$data)return;const{gen:be,schemaCode:Ae,schemaType:Oe,def:Ie}=this;be.if((0,f.or)((0,f._)`${Ae} === undefined`,ye)),se!==f.nil&&be.assign(se,!0),(Oe.length||Ie.validateSchema)&&(be.elseIf(this.invalid$data()),this.$dataError(),se!==f.nil&&be.assign(se,!1)),be.else()}invalid$data(){const{gen:se,schemaCode:ye,schemaType:be,def:Ae,it:Oe}=this;return(0,f.or)(Ie(),$e());function Ie(){if(be.length){if(!(ye instanceof f.Name))throw new Error("ajv implementation error");const Ne=Array.isArray(be)?be:[be];return(0,f._)`${(0,i.checkDataTypes)(Ne,ye,Oe.opts.strictNumbers,i.DataType.Wrong)}`}return f.nil}function $e(){if(Ae.validateSchema){const Ne=se.scopeValue("validate$data",{ref:Ae.validateSchema});return(0,f._)`!${Ne}(${ye})`}return f.nil}}subschema(se,ye){const be=(0,c.getSubschema)(this.it,se);(0,c.extendSubschemaData)(be,this.it,se),(0,c.extendSubschemaMode)(be,se);const Ae={...this.it,...be,items:void 0,props:void 0};return R(Ae,ye),Ae}mergeEvaluated(se,ye){const{it:be,gen:Ae}=this;be.opts.unevaluated&&(be.props!==!0&&se.props!==void 0&&(be.props=m.mergeEvaluated.props(Ae,se.props,be.props,ye)),be.items!==!0&&se.items!==void 0&&(be.items=m.mergeEvaluated.items(Ae,se.items,be.items,ye)))}mergeValidEvaluated(se,ye){const{it:be,gen:Ae}=this;if(be.opts.unevaluated&&(be.props!==!0||be.items!==!0))return Ae.if(ye,()=>this.mergeEvaluated(se,f.Name)),!0}}Ec.KeywordCxt=J;function he(de,se,ye,be){const Ae=new J(de,ye,se);"code"in ye?ye.code(Ae,be):Ae.$data&&ye.validate?(0,l.funcKeywordCode)(Ae,ye):"macro"in ye?(0,l.macroKeywordCode)(Ae,ye):(ye.compile||ye.validate)&&(0,l.funcKeywordCode)(Ae,ye)}const xe=/^\/(?:[^~]|~0|~1)*$/,we=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function je(de,{dataLevel:se,dataNames:ye,dataPathArr:be}){let Ae,Oe;if(de==="")return d.default.rootData;if(de[0]==="/"){if(!xe.test(de))throw new Error(`Invalid JSON-pointer: ${de}`);Ae=de,Oe=d.default.rootData}else{const Ue=we.exec(de);if(!Ue)throw new Error(`Invalid JSON-pointer: ${de}`);const Re=+Ue[1];if(Ae=Ue[2],Ae==="#"){if(Re>=se)throw new Error(Ne("property/index",Re));return be[se-Re]}if(Re>se)throw new Error(Ne("data",Re));if(Oe=ye[se-Re],!Ae)return Oe}let Ie=Oe;const $e=Ae.split("/");for(const Ue of $e)Ue&&(Oe=(0,f._)`${Oe}${(0,f.getProperty)((0,m.unescapeJsonPointer)(Ue))}`,Ie=(0,f._)`${Ie} && ${Oe}`);return Ie;function Ne(Ue,Re){return`Cannot access ${Ue} ${Re} levels up, current level is ${se}`}}return Ec.getData=je,Ec}var wS={},vj;function uA(){if(vj)return wS;vj=1,Object.defineProperty(wS,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return wS.default=e,wS}var ES={},bj;function ix(){if(bj)return ES;bj=1,Object.defineProperty(ES,"__esModule",{value:!0});const e=rx();class t extends Error{constructor(i,s,l,c){super(c||`can't resolve reference ${l} from id ${s}`),this.missingRef=(0,e.resolveUrl)(i,s,l),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return ES.default=t,ES}var Xo={},Sj;function cA(){if(Sj)return Xo;Sj=1,Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.resolveSchema=Xo.getCompilingSchema=Xo.resolveRef=Xo.compileSchema=Xo.SchemaEnv=void 0;const e=Wt(),t=uA(),r=If(),i=rx(),s=An(),l=ax();class c{constructor(x){var E;this.refs={},this.dynamicAnchors={};let R;typeof x.schema=="object"&&(R=x.schema),this.schema=x.schema,this.schemaId=x.schemaId,this.root=x.root||this,this.baseId=(E=x.baseId)!==null&&E!==void 0?E:(0,i.normalizeId)(R?.[x.schemaId||"$id"]),this.schemaPath=x.schemaPath,this.localRefs=x.localRefs,this.meta=x.meta,this.$async=R?.$async,this.refs={}}}Xo.SchemaEnv=c;function f(w){const x=m.call(this,w);if(x)return x;const E=(0,i.getFullPath)(this.opts.uriResolver,w.root.baseId),{es5:R,lines:T}=this.opts.code,{ownProperties:C}=this.opts,O=new e.CodeGen(this.scope,{es5:R,lines:T,ownProperties:C});let M;w.$async&&(M=O.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const D=O.scopeName("validate");w.validateName=D;const U={gen:O,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:O.scopeValue("schema",this.opts.code.source===!0?{ref:w.schema,code:(0,e.stringify)(w.schema)}:{ref:w.schema}),validateName:D,ValidationError:M,schema:w.schema,schemaEnv:w,rootId:E,baseId:w.baseId||E,schemaPath:e.nil,errSchemaPath:w.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let B;try{this._compilations.add(w),(0,l.validateFunctionCode)(U),O.optimize(this.opts.code.optimize);const q=O.toString();B=`${O.scopeRefs(r.default.scope)}return ${q}`,this.opts.code.process&&(B=this.opts.code.process(B,w));const G=new Function(`${r.default.self}`,`${r.default.scope}`,B)(this,this.scope.get());if(this.scope.value(D,{ref:G}),G.errors=null,G.schema=w.schema,G.schemaEnv=w,w.$async&&(G.$async=!0),this.opts.code.source===!0&&(G.source={validateName:D,validateCode:q,scopeValues:O._values}),this.opts.unevaluated){const{props:ne,items:oe}=U;G.evaluated={props:ne instanceof e.Name?void 0:ne,items:oe instanceof e.Name?void 0:oe,dynamicProps:ne instanceof e.Name,dynamicItems:oe instanceof e.Name},G.source&&(G.source.evaluated=(0,e.stringify)(G.evaluated))}return w.validate=G,w}catch(q){throw delete w.validate,delete w.validateName,B&&this.logger.error("Error compiling schema, function code:",B),q}finally{this._compilations.delete(w)}}Xo.compileSchema=f;function d(w,x,E){var R;E=(0,i.resolveUrl)(this.opts.uriResolver,x,E);const T=w.refs[E];if(T)return T;let C=v.call(this,w,E);if(C===void 0){const O=(R=w.localRefs)===null||R===void 0?void 0:R[E],{schemaId:M}=this.opts;O&&(C=new c({schema:O,schemaId:M,root:w,baseId:x}))}if(C!==void 0)return w.refs[E]=h.call(this,C)}Xo.resolveRef=d;function h(w){return(0,i.inlineRef)(w.schema,this.opts.inlineRefs)?w.schema:w.validate?w:f.call(this,w)}function m(w){for(const x of this._compilations)if(g(x,w))return x}Xo.getCompilingSchema=m;function g(w,x){return w.schema===x.schema&&w.root===x.root&&w.baseId===x.baseId}function v(w,x){let E;for(;typeof(E=this.refs[x])=="string";)x=E;return E||this.schemas[x]||_.call(this,w,x)}function _(w,x){const E=this.opts.uriResolver.parse(x),R=(0,i._getFullPath)(this.opts.uriResolver,E);let T=(0,i.getFullPath)(this.opts.uriResolver,w.baseId,void 0);if(Object.keys(w.schema).length>0&&R===T)return S.call(this,E,w);const C=(0,i.normalizeId)(R),O=this.refs[C]||this.schemas[C];if(typeof O=="string"){const M=_.call(this,w,O);return typeof M?.schema!="object"?void 0:S.call(this,E,M)}if(typeof O?.schema=="object"){if(O.validate||f.call(this,O),C===(0,i.normalizeId)(x)){const{schema:M}=O,{schemaId:D}=this.opts,U=M[D];return U&&(T=(0,i.resolveUrl)(this.opts.uriResolver,T,U)),new c({schema:M,schemaId:D,root:w,baseId:T})}return S.call(this,E,O)}}Xo.resolveSchema=_;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function S(w,{baseId:x,schema:E,root:R}){var T;if(((T=w.fragment)===null||T===void 0?void 0:T[0])!=="/")return;for(const M of w.fragment.slice(1).split("/")){if(typeof E=="boolean")return;const D=E[(0,s.unescapeFragment)(M)];if(D===void 0)return;E=D;const U=typeof E=="object"&&E[this.opts.schemaId];!b.has(M)&&U&&(x=(0,i.resolveUrl)(this.opts.uriResolver,x,U))}let C;if(typeof E!="boolean"&&E.$ref&&!(0,s.schemaHasRulesButRef)(E,this.RULES)){const M=(0,i.resolveUrl)(this.opts.uriResolver,x,E.$ref);C=_.call(this,R,M)}const{schemaId:O}=this.opts;if(C=C||new c({schema:E,schemaId:O,root:R,baseId:x}),C.schema!==C.root.schema)return C}return Xo}const sre="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",lre="Meta-schema for $data reference (JSON AnySchema extension proposal)",ure="object",cre=["$data"],fre={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},dre=!1,hre={$id:sre,description:lre,type:ure,required:cre,properties:fre,additionalProperties:dre};var xS={},vb={exports:{}},j2,wj;function b$(){if(wj)return j2;wj=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(v){let _="",b=0,S=0;for(S=0;S<v.length;S++)if(b=v[S].charCodeAt(0),b!==48){if(!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";_+=v[S];break}for(S+=1;S<v.length;S++){if(b=v[S].charCodeAt(0),!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";_+=v[S]}return _}const i=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(v){return v.length=0,!0}function l(v,_,b){if(v.length){const S=r(v);if(S!=="")_.push(S);else return b.error=!0,!1;v.length=0}return!0}function c(v){let _=0;const b={error:!1,address:"",zone:""},S=[],w=[];let x=!1,E=!1,R=l;for(let T=0;T<v.length;T++){const C=v[T];if(!(C==="["||C==="]"))if(C===":"){if(x===!0&&(E=!0),!R(w,S,b))break;if(++_>7){b.error=!0;break}T>0&&v[T-1]===":"&&(x=!0),S.push(":");continue}else if(C==="%"){if(!R(w,S,b))break;R=s}else{w.push(C);continue}}return w.length&&(R===s?b.zone=w.join(""):E?S.push(w.join("")):S.push(r(w))),b.address=S.join(""),b}function f(v){if(d(v,":")<2)return{host:v,isIPV6:!1};const _=c(v);if(_.error)return{host:v,isIPV6:!1};{let b=_.address,S=_.address;return _.zone&&(b+="%"+_.zone,S+="%25"+_.zone),{host:b,isIPV6:!0,escapedHost:S}}}function d(v,_){let b=0;for(let S=0;S<v.length;S++)v[S]===_&&b++;return b}function h(v){let _=v;const b=[];let S=-1,w=0;for(;w=_.length;){if(w===1){if(_===".")break;if(_==="/"){b.push("/");break}else{b.push(_);break}}else if(w===2){if(_[0]==="."){if(_[1]===".")break;if(_[1]==="/"){_=_.slice(2);continue}}else if(_[0]==="/"&&(_[1]==="."||_[1]==="/")){b.push("/");break}}else if(w===3&&_==="/.."){b.length!==0&&b.pop(),b.push("/");break}if(_[0]==="."){if(_[1]==="."){if(_[2]==="/"){_=_.slice(3);continue}}else if(_[1]==="/"){_=_.slice(2);continue}}else if(_[0]==="/"&&_[1]==="."){if(_[2]==="/"){_=_.slice(2);continue}else if(_[2]==="."&&_[3]==="/"){_=_.slice(3),b.length!==0&&b.pop();continue}}if((S=_.indexOf("/",1))===-1){b.push(_);break}else b.push(_.slice(0,S)),_=_.slice(S)}return b.join("")}function m(v,_){const b=_!==!0?escape:unescape;return v.scheme!==void 0&&(v.scheme=b(v.scheme)),v.userinfo!==void 0&&(v.userinfo=b(v.userinfo)),v.host!==void 0&&(v.host=b(v.host)),v.path!==void 0&&(v.path=b(v.path)),v.query!==void 0&&(v.query=b(v.query)),v.fragment!==void 0&&(v.fragment=b(v.fragment)),v}function g(v){const _=[];if(v.userinfo!==void 0&&(_.push(v.userinfo),_.push("@")),v.host!==void 0){let b=unescape(v.host);if(!t(b)){const S=f(b);S.isIPV6===!0?b=`[${S.escapedHost}]`:b=v.host}_.push(b)}return(typeof v.port=="number"||typeof v.port=="string")&&(_.push(":"),_.push(String(v.port))),_.length?_.join(""):void 0}return j2={nonSimpleDomain:i,recomposeAuthority:g,normalizeComponentEncoding:m,removeDotSegments:h,isIPv4:t,isUUID:e,normalizeIPv6:f,stringArrayToHexStripped:r},j2}var k2,Ej;function pre(){if(Ej)return k2;Ej=1;const{isUUID:e}=b$(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function i(C){return r.indexOf(C)!==-1}function s(C){return C.secure===!0?!0:C.secure===!1?!1:C.scheme?C.scheme.length===3&&(C.scheme[0]==="w"||C.scheme[0]==="W")&&(C.scheme[1]==="s"||C.scheme[1]==="S")&&(C.scheme[2]==="s"||C.scheme[2]==="S"):!1}function l(C){return C.host||(C.error=C.error||"HTTP URIs must have a host."),C}function c(C){const O=String(C.scheme).toLowerCase()==="https";return(C.port===(O?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}function f(C){return C.secure=s(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C}function d(C){if((C.port===(s(C)?443:80)||C.port==="")&&(C.port=void 0),typeof C.secure=="boolean"&&(C.scheme=C.secure?"wss":"ws",C.secure=void 0),C.resourceName){const[O,M]=C.resourceName.split("?");C.path=O&&O!=="/"?O:void 0,C.query=M,C.resourceName=void 0}return C.fragment=void 0,C}function h(C,O){if(!C.path)return C.error="URN can not be parsed",C;const M=C.path.match(t);if(M){const D=O.scheme||C.scheme||"urn";C.nid=M[1].toLowerCase(),C.nss=M[2];const U=`${D}:${O.nid||C.nid}`,B=T(U);C.path=void 0,B&&(C=B.parse(C,O))}else C.error=C.error||"URN can not be parsed.";return C}function m(C,O){if(C.nid===void 0)throw new Error("URN without nid cannot be serialized");const M=O.scheme||C.scheme||"urn",D=C.nid.toLowerCase(),U=`${M}:${O.nid||D}`,B=T(U);B&&(C=B.serialize(C,O));const q=C,V=C.nss;return q.path=`${D||O.nid}:${V}`,O.skipEscape=!0,q}function g(C,O){const M=C;return M.uuid=M.nss,M.nss=void 0,!O.tolerant&&(!M.uuid||!e(M.uuid))&&(M.error=M.error||"UUID is not valid."),M}function v(C){const O=C;return O.nss=(C.uuid||"").toLowerCase(),O}const _={scheme:"http",domainHost:!0,parse:l,serialize:c},b={scheme:"https",domainHost:_.domainHost,parse:l,serialize:c},S={scheme:"ws",domainHost:!0,parse:f,serialize:d},w={scheme:"wss",domainHost:S.domainHost,parse:S.parse,serialize:S.serialize},R={http:_,https:b,ws:S,wss:w,urn:{scheme:"urn",parse:h,serialize:m,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:g,serialize:v,skipNormalize:!0}};Object.setPrototypeOf(R,null);function T(C){return C&&(R[C]||R[C.toLowerCase()])||void 0}return k2={wsIsSecure:s,SCHEMES:R,isValidSchemeName:i,getSchemeHandler:T},k2}var xj;function S$(){if(xj)return vb.exports;xj=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:i,isIPv4:s,nonSimpleDomain:l}=b$(),{SCHEMES:c,getSchemeHandler:f}=pre();function d(w,x){return typeof w=="string"?w=v(b(w,x),x):typeof w=="object"&&(w=b(v(w,x),x)),w}function h(w,x,E){const R=E?Object.assign({scheme:"null"},E):{scheme:"null"},T=m(b(w,R),b(x,R),R,!0);return R.skipEscape=!0,v(T,R)}function m(w,x,E,R){const T={};return R||(w=b(v(w,E),E),x=b(v(x,E),E)),E=E||{},!E.tolerant&&x.scheme?(T.scheme=x.scheme,T.userinfo=x.userinfo,T.host=x.host,T.port=x.port,T.path=t(x.path||""),T.query=x.query):(x.userinfo!==void 0||x.host!==void 0||x.port!==void 0?(T.userinfo=x.userinfo,T.host=x.host,T.port=x.port,T.path=t(x.path||""),T.query=x.query):(x.path?(x.path[0]==="/"?T.path=t(x.path):((w.userinfo!==void 0||w.host!==void 0||w.port!==void 0)&&!w.path?T.path="/"+x.path:w.path?T.path=w.path.slice(0,w.path.lastIndexOf("/")+1)+x.path:T.path=x.path,T.path=t(T.path)),T.query=x.query):(T.path=w.path,x.query!==void 0?T.query=x.query:T.query=w.query),T.userinfo=w.userinfo,T.host=w.host,T.port=w.port),T.scheme=w.scheme),T.fragment=x.fragment,T}function g(w,x,E){return typeof w=="string"?(w=unescape(w),w=v(i(b(w,E),!0),{...E,skipEscape:!0})):typeof w=="object"&&(w=v(i(w,!0),{...E,skipEscape:!0})),typeof x=="string"?(x=unescape(x),x=v(i(b(x,E),!0),{...E,skipEscape:!0})):typeof x=="object"&&(x=v(i(x,!0),{...E,skipEscape:!0})),w.toLowerCase()===x.toLowerCase()}function v(w,x){const E={host:w.host,scheme:w.scheme,userinfo:w.userinfo,port:w.port,path:w.path,query:w.query,nid:w.nid,nss:w.nss,uuid:w.uuid,fragment:w.fragment,reference:w.reference,resourceName:w.resourceName,secure:w.secure,error:""},R=Object.assign({},x),T=[],C=f(R.scheme||E.scheme);C&&C.serialize&&C.serialize(E,R),E.path!==void 0&&(R.skipEscape?E.path=unescape(E.path):(E.path=escape(E.path),E.scheme!==void 0&&(E.path=E.path.split("%3A").join(":")))),R.reference!=="suffix"&&E.scheme&&T.push(E.scheme,":");const O=r(E);if(O!==void 0&&(R.reference!=="suffix"&&T.push("//"),T.push(O),E.path&&E.path[0]!=="/"&&T.push("/")),E.path!==void 0){let M=E.path;!R.absolutePath&&(!C||!C.absolutePath)&&(M=t(M)),O===void 0&&M[0]==="/"&&M[1]==="/"&&(M="/%2F"+M.slice(2)),T.push(M)}return E.query!==void 0&&T.push("?",E.query),E.fragment!==void 0&&T.push("#",E.fragment),T.join("")}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(w,x){const E=Object.assign({},x),R={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let T=!1;E.reference==="suffix"&&(E.scheme?w=E.scheme+":"+w:w="//"+w);const C=w.match(_);if(C){if(R.scheme=C[1],R.userinfo=C[3],R.host=C[4],R.port=parseInt(C[5],10),R.path=C[6]||"",R.query=C[7],R.fragment=C[8],isNaN(R.port)&&(R.port=C[5]),R.host)if(s(R.host)===!1){const D=e(R.host);R.host=D.host.toLowerCase(),T=D.isIPV6}else T=!0;R.scheme===void 0&&R.userinfo===void 0&&R.host===void 0&&R.port===void 0&&R.query===void 0&&!R.path?R.reference="same-document":R.scheme===void 0?R.reference="relative":R.fragment===void 0?R.reference="absolute":R.reference="uri",E.reference&&E.reference!=="suffix"&&E.reference!==R.reference&&(R.error=R.error||"URI is not a "+E.reference+" reference.");const O=f(E.scheme||R.scheme);if(!E.unicodeSupport&&(!O||!O.unicodeSupport)&&R.host&&(E.domainHost||O&&O.domainHost)&&T===!1&&l(R.host))try{R.host=URL.domainToASCII(R.host.toLowerCase())}catch(M){R.error=R.error||"Host's domain name can not be converted to ASCII: "+M}(!O||O&&!O.skipNormalize)&&(w.indexOf("%")!==-1&&(R.scheme!==void 0&&(R.scheme=unescape(R.scheme)),R.host!==void 0&&(R.host=unescape(R.host))),R.path&&(R.path=escape(unescape(R.path))),R.fragment&&(R.fragment=encodeURI(decodeURIComponent(R.fragment)))),O&&O.parse&&O.parse(R,E)}else R.error=R.error||"URI can not be parsed.";return R}const S={SCHEMES:c,normalize:d,resolve:h,resolveComponent:m,equal:g,serialize:v,parse:b};return vb.exports=S,vb.exports.default=S,vb.exports.fastUri=S,vb.exports}var _j;function mre(){if(_j)return xS;_j=1,Object.defineProperty(xS,"__esModule",{value:!0});const e=S$();return e.code='require("ajv/dist/runtime/uri").default',xS.default=e,xS}var Tj;function gre(){return Tj||(Tj=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=ax();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=Wt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const i=uA(),s=ix(),l=g$(),c=cA(),f=Wt(),d=rx(),h=pE(),m=An(),g=hre,v=mre(),_=(Q,z)=>new RegExp(Q,z);_.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],S=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},x={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},E=200;function R(Q){var z,L,Y,I,X,J,he,xe,we,je,de,se,ye,be,Ae,Oe,Ie,$e,Ne,Ue,Re,Ze,ot,qe,xn;const yn=Q.strict,zn=(z=Q.code)===null||z===void 0?void 0:z.optimize,Dt=zn===!0||zn===void 0?1:zn||0,Vt=(Y=(L=Q.code)===null||L===void 0?void 0:L.regExp)!==null&&Y!==void 0?Y:_,hn=(I=Q.uriResolver)!==null&&I!==void 0?I:v.default;return{strictSchema:(J=(X=Q.strictSchema)!==null&&X!==void 0?X:yn)!==null&&J!==void 0?J:!0,strictNumbers:(xe=(he=Q.strictNumbers)!==null&&he!==void 0?he:yn)!==null&&xe!==void 0?xe:!0,strictTypes:(je=(we=Q.strictTypes)!==null&&we!==void 0?we:yn)!==null&&je!==void 0?je:"log",strictTuples:(se=(de=Q.strictTuples)!==null&&de!==void 0?de:yn)!==null&&se!==void 0?se:"log",strictRequired:(be=(ye=Q.strictRequired)!==null&&ye!==void 0?ye:yn)!==null&&be!==void 0?be:!1,code:Q.code?{...Q.code,optimize:Dt,regExp:Vt}:{optimize:Dt,regExp:Vt},loopRequired:(Ae=Q.loopRequired)!==null&&Ae!==void 0?Ae:E,loopEnum:(Oe=Q.loopEnum)!==null&&Oe!==void 0?Oe:E,meta:(Ie=Q.meta)!==null&&Ie!==void 0?Ie:!0,messages:($e=Q.messages)!==null&&$e!==void 0?$e:!0,inlineRefs:(Ne=Q.inlineRefs)!==null&&Ne!==void 0?Ne:!0,schemaId:(Ue=Q.schemaId)!==null&&Ue!==void 0?Ue:"$id",addUsedSchema:(Re=Q.addUsedSchema)!==null&&Re!==void 0?Re:!0,validateSchema:(Ze=Q.validateSchema)!==null&&Ze!==void 0?Ze:!0,validateFormats:(ot=Q.validateFormats)!==null&&ot!==void 0?ot:!0,unicodeRegExp:(qe=Q.unicodeRegExp)!==null&&qe!==void 0?qe:!0,int32range:(xn=Q.int32range)!==null&&xn!==void 0?xn:!0,uriResolver:hn}}class T{constructor(z={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,z=this.opts={...z,...R(z)};const{es5:L,lines:Y}=this.opts.code;this.scope=new f.ValueScope({scope:{},prefixes:S,es5:L,lines:Y}),this.logger=V(z.logger);const I=z.validateFormats;z.validateFormats=!1,this.RULES=(0,l.getRules)(),C.call(this,w,z,"NOT SUPPORTED"),C.call(this,x,z,"DEPRECATED","warn"),this._metaOpts=B.call(this),z.formats&&D.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),z.keywords&&U.call(this,z.keywords),typeof z.meta=="object"&&this.addMetaSchema(z.meta),M.call(this),z.validateFormats=I}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:z,meta:L,schemaId:Y}=this.opts;let I=g;Y==="id"&&(I={...g},I.id=I.$id,delete I.$id),L&&z&&this.addMetaSchema(I,I[Y],!1)}defaultMeta(){const{meta:z,schemaId:L}=this.opts;return this.opts.defaultMeta=typeof z=="object"?z[L]||z:void 0}validate(z,L){let Y;if(typeof z=="string"){if(Y=this.getSchema(z),!Y)throw new Error(`no schema with key or ref "${z}"`)}else Y=this.compile(z);const I=Y(L);return"$async"in Y||(this.errors=Y.errors),I}compile(z,L){const Y=this._addSchema(z,L);return Y.validate||this._compileSchemaEnv(Y)}compileAsync(z,L){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:Y}=this.opts;return I.call(this,z,L);async function I(je,de){await X.call(this,je.$schema);const se=this._addSchema(je,de);return se.validate||J.call(this,se)}async function X(je){je&&!this.getSchema(je)&&await I.call(this,{$ref:je},!0)}async function J(je){try{return this._compileSchemaEnv(je)}catch(de){if(!(de instanceof s.default))throw de;return he.call(this,de),await xe.call(this,de.missingSchema),J.call(this,je)}}function he({missingSchema:je,missingRef:de}){if(this.refs[je])throw new Error(`AnySchema ${je} is loaded but ${de} cannot be resolved`)}async function xe(je){const de=await we.call(this,je);this.refs[je]||await X.call(this,de.$schema),this.refs[je]||this.addSchema(de,je,L)}async function we(je){const de=this._loading[je];if(de)return de;try{return await(this._loading[je]=Y(je))}finally{delete this._loading[je]}}}addSchema(z,L,Y,I=this.opts.validateSchema){if(Array.isArray(z)){for(const J of z)this.addSchema(J,void 0,Y,I);return this}let X;if(typeof z=="object"){const{schemaId:J}=this.opts;if(X=z[J],X!==void 0&&typeof X!="string")throw new Error(`schema ${J} must be string`)}return L=(0,d.normalizeId)(L||X),this._checkUnique(L),this.schemas[L]=this._addSchema(z,Y,L,I,!0),this}addMetaSchema(z,L,Y=this.opts.validateSchema){return this.addSchema(z,L,!0,Y),this}validateSchema(z,L){if(typeof z=="boolean")return!0;let Y;if(Y=z.$schema,Y!==void 0&&typeof Y!="string")throw new Error("$schema must be a string");if(Y=Y||this.opts.defaultMeta||this.defaultMeta(),!Y)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const I=this.validate(Y,z);if(!I&&L){const X="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(X);else throw new Error(X)}return I}getSchema(z){let L;for(;typeof(L=O.call(this,z))=="string";)z=L;if(L===void 0){const{schemaId:Y}=this.opts,I=new c.SchemaEnv({schema:{},schemaId:Y});if(L=c.resolveSchema.call(this,I,z),!L)return;this.refs[z]=L}return L.validate||this._compileSchemaEnv(L)}removeSchema(z){if(z instanceof RegExp)return this._removeAllSchemas(this.schemas,z),this._removeAllSchemas(this.refs,z),this;switch(typeof z){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const L=O.call(this,z);return typeof L=="object"&&this._cache.delete(L.schema),delete this.schemas[z],delete this.refs[z],this}case"object":{const L=z;this._cache.delete(L);let Y=z[this.opts.schemaId];return Y&&(Y=(0,d.normalizeId)(Y),delete this.schemas[Y],delete this.refs[Y]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(z){for(const L of z)this.addKeyword(L);return this}addKeyword(z,L){let Y;if(typeof z=="string")Y=z,typeof L=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),L.keyword=Y);else if(typeof z=="object"&&L===void 0){if(L=z,Y=L.keyword,Array.isArray(Y)&&!Y.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ne.call(this,Y,L),!L)return(0,m.eachItem)(Y,X=>oe.call(this,X)),this;ee.call(this,L);const I={...L,type:(0,h.getJSONTypes)(L.type),schemaType:(0,h.getJSONTypes)(L.schemaType)};return(0,m.eachItem)(Y,I.type.length===0?X=>oe.call(this,X,I):X=>I.type.forEach(J=>oe.call(this,X,I,J))),this}getKeyword(z){const L=this.RULES.all[z];return typeof L=="object"?L.definition:!!L}removeKeyword(z){const{RULES:L}=this;delete L.keywords[z],delete L.all[z];for(const Y of L.rules){const I=Y.rules.findIndex(X=>X.keyword===z);I>=0&&Y.rules.splice(I,1)}return this}addFormat(z,L){return typeof L=="string"&&(L=new RegExp(L)),this.formats[z]=L,this}errorsText(z=this.errors,{separator:L=", ",dataVar:Y="data"}={}){return!z||z.length===0?"No errors":z.map(I=>`${Y}${I.instancePath} ${I.message}`).reduce((I,X)=>I+L+X)}$dataMetaSchema(z,L){const Y=this.RULES.all;z=JSON.parse(JSON.stringify(z));for(const I of L){const X=I.split("/").slice(1);let J=z;for(const he of X)J=J[he];for(const he in Y){const xe=Y[he];if(typeof xe!="object")continue;const{$data:we}=xe.definition,je=J[he];we&&je&&(J[he]=ue(je))}}return z}_removeAllSchemas(z,L){for(const Y in z){const I=z[Y];(!L||L.test(Y))&&(typeof I=="string"?delete z[Y]:I&&!I.meta&&(this._cache.delete(I.schema),delete z[Y]))}}_addSchema(z,L,Y,I=this.opts.validateSchema,X=this.opts.addUsedSchema){let J;const{schemaId:he}=this.opts;if(typeof z=="object")J=z[he];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof z!="boolean")throw new Error("schema must be object or boolean")}let xe=this._cache.get(z);if(xe!==void 0)return xe;Y=(0,d.normalizeId)(J||Y);const we=d.getSchemaRefs.call(this,z,Y);return xe=new c.SchemaEnv({schema:z,schemaId:he,meta:L,baseId:Y,localRefs:we}),this._cache.set(xe.schema,xe),X&&!Y.startsWith("#")&&(Y&&this._checkUnique(Y),this.refs[Y]=xe),I&&this.validateSchema(z,!0),xe}_checkUnique(z){if(this.schemas[z]||this.refs[z])throw new Error(`schema with key or id "${z}" already exists`)}_compileSchemaEnv(z){if(z.meta?this._compileMetaSchema(z):c.compileSchema.call(this,z),!z.validate)throw new Error("ajv implementation error");return z.validate}_compileMetaSchema(z){const L=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,z)}finally{this.opts=L}}}T.ValidationError=i.default,T.MissingRefError=s.default,e.default=T;function C(Q,z,L,Y="error"){for(const I in Q){const X=I;X in z&&this.logger[Y](`${L}: option ${I}. ${Q[X]}`)}}function O(Q){return Q=(0,d.normalizeId)(Q),this.schemas[Q]||this.refs[Q]}function M(){const Q=this.opts.schemas;if(Q)if(Array.isArray(Q))this.addSchema(Q);else for(const z in Q)this.addSchema(Q[z],z)}function D(){for(const Q in this.opts.formats){const z=this.opts.formats[Q];z&&this.addFormat(Q,z)}}function U(Q){if(Array.isArray(Q)){this.addVocabulary(Q);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const z in Q){const L=Q[z];L.keyword||(L.keyword=z),this.addKeyword(L)}}function B(){const Q={...this.opts};for(const z of b)delete Q[z];return Q}const q={log(){},warn(){},error(){}};function V(Q){if(Q===!1)return q;if(Q===void 0)return console;if(Q.log&&Q.warn&&Q.error)return Q;throw new Error("logger must implement log, warn and error methods")}const G=/^[a-z_$][a-z0-9_$:-]*$/i;function ne(Q,z){const{RULES:L}=this;if((0,m.eachItem)(Q,Y=>{if(L.keywords[Y])throw new Error(`Keyword ${Y} is already defined`);if(!G.test(Y))throw new Error(`Keyword ${Y} has invalid name`)}),!!z&&z.$data&&!("code"in z||"validate"in z))throw new Error('$data keyword must have "code" or "validate" function')}function oe(Q,z,L){var Y;const I=z?.post;if(L&&I)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:X}=this;let J=I?X.post:X.rules.find(({type:xe})=>xe===L);if(J||(J={type:L,rules:[]},X.rules.push(J)),X.keywords[Q]=!0,!z)return;const he={keyword:Q,definition:{...z,type:(0,h.getJSONTypes)(z.type),schemaType:(0,h.getJSONTypes)(z.schemaType)}};z.before?K.call(this,J,he,z.before):J.rules.push(he),X.all[Q]=he,(Y=z.implements)===null||Y===void 0||Y.forEach(xe=>this.addKeyword(xe))}function K(Q,z,L){const Y=Q.rules.findIndex(I=>I.keyword===L);Y>=0?Q.rules.splice(Y,0,z):(Q.rules.push(z),this.logger.warn(`rule ${L} is not defined`))}function ee(Q){let{metaSchema:z}=Q;z!==void 0&&(Q.$data&&this.opts.$data&&(z=ue(z)),Q.validateSchema=this.compile(z,!0))}const re={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ue(Q){return{anyOf:[Q,re]}}})(_2)),_2}var _S={},TS={},CS={},Cj;function yre(){if(Cj)return CS;Cj=1,Object.defineProperty(CS,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return CS.default=e,CS}var Wc={},Oj;function vre(){if(Oj)return Wc;Oj=1,Object.defineProperty(Wc,"__esModule",{value:!0}),Wc.callRef=Wc.getValidate=void 0;const e=ix(),t=xl(),r=Wt(),i=If(),s=cA(),l=An(),c={keyword:"$ref",schemaType:"string",code(h){const{gen:m,schema:g,it:v}=h,{baseId:_,schemaEnv:b,validateName:S,opts:w,self:x}=v,{root:E}=b;if((g==="#"||g==="#/")&&_===E.baseId)return T();const R=s.resolveRef.call(x,E,_,g);if(R===void 0)throw new e.default(v.opts.uriResolver,_,g);if(R instanceof s.SchemaEnv)return C(R);return O(R);function T(){if(b===E)return d(h,S,b,b.$async);const M=m.scopeValue("root",{ref:E});return d(h,(0,r._)`${M}.validate`,E,E.$async)}function C(M){const D=f(h,M);d(h,D,M,M.$async)}function O(M){const D=m.scopeValue("schema",w.code.source===!0?{ref:M,code:(0,r.stringify)(M)}:{ref:M}),U=m.name("valid"),B=h.subschema({schema:M,dataTypes:[],schemaPath:r.nil,topSchemaRef:D,errSchemaPath:g},U);h.mergeEvaluated(B),h.ok(U)}}};function f(h,m){const{gen:g}=h;return m.validate?g.scopeValue("validate",{ref:m.validate}):(0,r._)`${g.scopeValue("wrapper",{ref:m})}.validate`}Wc.getValidate=f;function d(h,m,g,v){const{gen:_,it:b}=h,{allErrors:S,schemaEnv:w,opts:x}=b,E=x.passContext?i.default.this:r.nil;v?R():T();function R(){if(!w.$async)throw new Error("async schema referenced by sync schema");const M=_.let("valid");_.try(()=>{_.code((0,r._)`await ${(0,t.callValidateCode)(h,m,E)}`),O(m),S||_.assign(M,!0)},D=>{_.if((0,r._)`!(${D} instanceof ${b.ValidationError})`,()=>_.throw(D)),C(D),S||_.assign(M,!1)}),h.ok(M)}function T(){h.result((0,t.callValidateCode)(h,m,E),()=>O(m),()=>C(m))}function C(M){const D=(0,r._)`${M}.errors`;_.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${D} : ${i.default.vErrors}.concat(${D})`),_.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function O(M){var D;if(!b.opts.unevaluated)return;const U=(D=g?.validate)===null||D===void 0?void 0:D.evaluated;if(b.props!==!0)if(U&&!U.dynamicProps)U.props!==void 0&&(b.props=l.mergeEvaluated.props(_,U.props,b.props));else{const B=_.var("props",(0,r._)`${M}.evaluated.props`);b.props=l.mergeEvaluated.props(_,B,b.props,r.Name)}if(b.items!==!0)if(U&&!U.dynamicItems)U.items!==void 0&&(b.items=l.mergeEvaluated.items(_,U.items,b.items));else{const B=_.var("items",(0,r._)`${M}.evaluated.items`);b.items=l.mergeEvaluated.items(_,B,b.items,r.Name)}}}return Wc.callRef=d,Wc.default=c,Wc}var Rj;function bre(){if(Rj)return TS;Rj=1,Object.defineProperty(TS,"__esModule",{value:!0});const e=yre(),t=vre(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return TS.default=r,TS}var OS={},RS={},Aj;function Sre(){if(Aj)return RS;Aj=1,Object.defineProperty(RS,"__esModule",{value:!0});const e=Wt(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},i={message:({keyword:l,schemaCode:c})=>(0,e.str)`must be ${r[l].okStr} ${c}`,params:({keyword:l,schemaCode:c})=>(0,e._)`{comparison: ${r[l].okStr}, limit: ${c}}`},s={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:i,code(l){const{keyword:c,data:f,schemaCode:d}=l;l.fail$data((0,e._)`${f} ${r[c].fail} ${d} || isNaN(${f})`)}};return RS.default=s,RS}var AS={},Mj;function wre(){if(Mj)return AS;Mj=1,Object.defineProperty(AS,"__esModule",{value:!0});const e=Wt(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,e._)`{multipleOf: ${i}}`},code(i){const{gen:s,data:l,schemaCode:c,it:f}=i,d=f.opts.multipleOfPrecision,h=s.let("res"),m=d?(0,e._)`Math.abs(Math.round(${h}) - ${h}) > 1e-${d}`:(0,e._)`${h} !== parseInt(${h})`;i.fail$data((0,e._)`(${c} === 0 || (${h} = ${l}/${c}, ${m}))`)}};return AS.default=r,AS}var MS={},jS={},jj;function Ere(){if(jj)return jS;jj=1,Object.defineProperty(jS,"__esModule",{value:!0});function e(t){const r=t.length;let i=0,s=0,l;for(;s<r;)i++,l=t.charCodeAt(s++),l>=55296&&l<=56319&&s<r&&(l=t.charCodeAt(s),(l&64512)===56320&&s++);return i}return jS.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',jS}var kj;function xre(){if(kj)return MS;kj=1,Object.defineProperty(MS,"__esModule",{value:!0});const e=Wt(),t=An(),r=Ere(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:l,schemaCode:c}){const f=l==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${f} than ${c} characters`},params:({schemaCode:l})=>(0,e._)`{limit: ${l}}`},code(l){const{keyword:c,data:f,schemaCode:d,it:h}=l,m=c==="maxLength"?e.operators.GT:e.operators.LT,g=h.opts.unicode===!1?(0,e._)`${f}.length`:(0,e._)`${(0,t.useFunc)(l.gen,r.default)}(${f})`;l.fail$data((0,e._)`${g} ${m} ${d}`)}};return MS.default=s,MS}var kS={},Dj;function _re(){if(Dj)return kS;Dj=1,Object.defineProperty(kS,"__esModule",{value:!0});const e=xl(),t=Wt(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,t.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,t._)`{pattern: ${s}}`},code(s){const{data:l,$data:c,schema:f,schemaCode:d,it:h}=s,m=h.opts.unicodeRegExp?"u":"",g=c?(0,t._)`(new RegExp(${d}, ${m}))`:(0,e.usePattern)(s,f);s.fail$data((0,t._)`!${g}.test(${l})`)}};return kS.default=i,kS}var DS={},Nj;function Tre(){if(Nj)return DS;Nj=1,Object.defineProperty(DS,"__esModule",{value:!0});const e=Wt(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:s}){const l=i==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${l} than ${s} properties`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:s,data:l,schemaCode:c}=i,f=s==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${l}).length ${f} ${c}`)}};return DS.default=r,DS}var NS={},zj;function Cre(){if(zj)return NS;zj=1,Object.defineProperty(NS,"__esModule",{value:!0});const e=xl(),t=Wt(),r=An(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:l}})=>(0,t.str)`must have required property '${l}'`,params:({params:{missingProperty:l}})=>(0,t._)`{missingProperty: ${l}}`},code(l){const{gen:c,schema:f,schemaCode:d,data:h,$data:m,it:g}=l,{opts:v}=g;if(!m&&f.length===0)return;const _=f.length>=v.loopRequired;if(g.allErrors?b():S(),v.strictRequired){const E=l.parentSchema.properties,{definedProperties:R}=l.it;for(const T of f)if(E?.[T]===void 0&&!R.has(T)){const C=g.schemaEnv.baseId+g.errSchemaPath,O=`required property "${T}" is not defined at "${C}" (strictRequired)`;(0,r.checkStrictMode)(g,O,g.opts.strictRequired)}}function b(){if(_||m)l.block$data(t.nil,w);else for(const E of f)(0,e.checkReportMissingProp)(l,E)}function S(){const E=c.let("missing");if(_||m){const R=c.let("valid",!0);l.block$data(R,()=>x(E,R)),l.ok(R)}else c.if((0,e.checkMissingProp)(l,f,E)),(0,e.reportMissingProp)(l,E),c.else()}function w(){c.forOf("prop",d,E=>{l.setParams({missingProperty:E}),c.if((0,e.noPropertyInData)(c,h,E,v.ownProperties),()=>l.error())})}function x(E,R){l.setParams({missingProperty:E}),c.forOf(E,d,()=>{c.assign(R,(0,e.propertyInData)(c,h,E,v.ownProperties)),c.if((0,t.not)(R),()=>{l.error(),c.break()})},t.nil)}}};return NS.default=s,NS}var zS={},$j;function Ore(){if($j)return zS;$j=1,Object.defineProperty(zS,"__esModule",{value:!0});const e=Wt(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:s}){const l=i==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${l} than ${s} items`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:s,data:l,schemaCode:c}=i,f=s==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${l}.length ${f} ${c}`)}};return zS.default=r,zS}var $S={},PS={},Pj;function fA(){if(Pj)return PS;Pj=1,Object.defineProperty(PS,"__esModule",{value:!0});const e=v$();return e.code='require("ajv/dist/runtime/equal").default',PS.default=e,PS}var Ij;function Rre(){if(Ij)return $S;Ij=1,Object.defineProperty($S,"__esModule",{value:!0});const e=pE(),t=Wt(),r=An(),i=fA(),l={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:c,j:f}})=>(0,t.str)`must NOT have duplicate items (items ## ${f} and ${c} are identical)`,params:({params:{i:c,j:f}})=>(0,t._)`{i: ${c}, j: ${f}}`},code(c){const{gen:f,data:d,$data:h,schema:m,parentSchema:g,schemaCode:v,it:_}=c;if(!h&&!m)return;const b=f.let("valid"),S=g.items?(0,e.getSchemaTypes)(g.items):[];c.block$data(b,w,(0,t._)`${v} === false`),c.ok(b);function w(){const T=f.let("i",(0,t._)`${d}.length`),C=f.let("j");c.setParams({i:T,j:C}),f.assign(b,!0),f.if((0,t._)`${T} > 1`,()=>(x()?E:R)(T,C))}function x(){return S.length>0&&!S.some(T=>T==="object"||T==="array")}function E(T,C){const O=f.name("item"),M=(0,e.checkDataTypes)(S,O,_.opts.strictNumbers,e.DataType.Wrong),D=f.const("indices",(0,t._)`{}`);f.for((0,t._)`;${T}--;`,()=>{f.let(O,(0,t._)`${d}[${T}]`),f.if(M,(0,t._)`continue`),S.length>1&&f.if((0,t._)`typeof ${O} == "string"`,(0,t._)`${O} += "_"`),f.if((0,t._)`typeof ${D}[${O}] == "number"`,()=>{f.assign(C,(0,t._)`${D}[${O}]`),c.error(),f.assign(b,!1).break()}).code((0,t._)`${D}[${O}] = ${T}`)})}function R(T,C){const O=(0,r.useFunc)(f,i.default),M=f.name("outer");f.label(M).for((0,t._)`;${T}--;`,()=>f.for((0,t._)`${C} = ${T}; ${C}--;`,()=>f.if((0,t._)`${O}(${d}[${T}], ${d}[${C}])`,()=>{c.error(),f.assign(b,!1).break(M)})))}}};return $S.default=l,$S}var IS={},Lj;function Are(){if(Lj)return IS;Lj=1,Object.defineProperty(IS,"__esModule",{value:!0});const e=Wt(),t=An(),r=fA(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:l})=>(0,e._)`{allowedValue: ${l}}`},code(l){const{gen:c,data:f,$data:d,schemaCode:h,schema:m}=l;d||m&&typeof m=="object"?l.fail$data((0,e._)`!${(0,t.useFunc)(c,r.default)}(${f}, ${h})`):l.fail((0,e._)`${m} !== ${f}`)}};return IS.default=s,IS}var LS={},Uj;function Mre(){if(Uj)return LS;Uj=1,Object.defineProperty(LS,"__esModule",{value:!0});const e=Wt(),t=An(),r=fA(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:l})=>(0,e._)`{allowedValues: ${l}}`},code(l){const{gen:c,data:f,$data:d,schema:h,schemaCode:m,it:g}=l;if(!d&&h.length===0)throw new Error("enum must have non-empty array");const v=h.length>=g.opts.loopEnum;let _;const b=()=>_??(_=(0,t.useFunc)(c,r.default));let S;if(v||d)S=c.let("valid"),l.block$data(S,w);else{if(!Array.isArray(h))throw new Error("ajv implementation error");const E=c.const("vSchema",m);S=(0,e.or)(...h.map((R,T)=>x(E,T)))}l.pass(S);function w(){c.assign(S,!1),c.forOf("v",m,E=>c.if((0,e._)`${b()}(${f}, ${E})`,()=>c.assign(S,!0).break()))}function x(E,R){const T=h[R];return typeof T=="object"&&T!==null?(0,e._)`${b()}(${f}, ${E}[${R}])`:(0,e._)`${f} === ${T}`}}};return LS.default=s,LS}var qj;function jre(){if(qj)return OS;qj=1,Object.defineProperty(OS,"__esModule",{value:!0});const e=Sre(),t=wre(),r=xre(),i=_re(),s=Tre(),l=Cre(),c=Ore(),f=Rre(),d=Are(),h=Mre(),m=[e.default,t.default,r.default,i.default,s.default,l.default,c.default,f.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,h.default];return OS.default=m,OS}var US={},ym={},Vj;function w$(){if(Vj)return ym;Vj=1,Object.defineProperty(ym,"__esModule",{value:!0}),ym.validateAdditionalItems=void 0;const e=Wt(),t=An(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:l}})=>(0,e.str)`must NOT have more than ${l} items`,params:({params:{len:l}})=>(0,e._)`{limit: ${l}}`},code(l){const{parentSchema:c,it:f}=l,{items:d}=c;if(!Array.isArray(d)){(0,t.checkStrictMode)(f,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(l,d)}};function s(l,c){const{gen:f,schema:d,data:h,keyword:m,it:g}=l;g.items=!0;const v=f.const("len",(0,e._)`${h}.length`);if(d===!1)l.setParams({len:c.length}),l.pass((0,e._)`${v} <= ${c.length}`);else if(typeof d=="object"&&!(0,t.alwaysValidSchema)(g,d)){const b=f.var("valid",(0,e._)`${v} <= ${c.length}`);f.if((0,e.not)(b),()=>_(b)),l.ok(b)}function _(b){f.forRange("i",c.length,v,S=>{l.subschema({keyword:m,dataProp:S,dataPropType:t.Type.Num},b),g.allErrors||f.if((0,e.not)(b),()=>f.break())})}}return ym.validateAdditionalItems=s,ym.default=i,ym}var qS={},vm={},Fj;function E$(){if(Fj)return vm;Fj=1,Object.defineProperty(vm,"__esModule",{value:!0}),vm.validateTuple=void 0;const e=Wt(),t=An(),r=xl(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(l){const{schema:c,it:f}=l;if(Array.isArray(c))return s(l,"additionalItems",c);f.items=!0,!(0,t.alwaysValidSchema)(f,c)&&l.ok((0,r.validateArray)(l))}};function s(l,c,f=l.schema){const{gen:d,parentSchema:h,data:m,keyword:g,it:v}=l;S(h),v.opts.unevaluated&&f.length&&v.items!==!0&&(v.items=t.mergeEvaluated.items(d,f.length,v.items));const _=d.name("valid"),b=d.const("len",(0,e._)`${m}.length`);f.forEach((w,x)=>{(0,t.alwaysValidSchema)(v,w)||(d.if((0,e._)`${b} > ${x}`,()=>l.subschema({keyword:g,schemaProp:x,dataProp:x},_)),l.ok(_))});function S(w){const{opts:x,errSchemaPath:E}=v,R=f.length,T=R===w.minItems&&(R===w.maxItems||w[c]===!1);if(x.strictTuples&&!T){const C=`"${g}" is ${R}-tuple, but minItems or maxItems/${c} are not specified or different at path "${E}"`;(0,t.checkStrictMode)(v,C,x.strictTuples)}}}return vm.validateTuple=s,vm.default=i,vm}var Bj;function kre(){if(Bj)return qS;Bj=1,Object.defineProperty(qS,"__esModule",{value:!0});const e=E$(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return qS.default=t,qS}var VS={},Hj;function Dre(){if(Hj)return VS;Hj=1,Object.defineProperty(VS,"__esModule",{value:!0});const e=Wt(),t=An(),r=xl(),i=w$(),l={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:c}})=>(0,e.str)`must NOT have more than ${c} items`,params:({params:{len:c}})=>(0,e._)`{limit: ${c}}`},code(c){const{schema:f,parentSchema:d,it:h}=c,{prefixItems:m}=d;h.items=!0,!(0,t.alwaysValidSchema)(h,f)&&(m?(0,i.validateAdditionalItems)(c,m):c.ok((0,r.validateArray)(c)))}};return VS.default=l,VS}var FS={},Gj;function Nre(){if(Gj)return FS;Gj=1,Object.defineProperty(FS,"__esModule",{value:!0});const e=Wt(),t=An(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:l}})=>l===void 0?(0,e.str)`must contain at least ${s} valid item(s)`:(0,e.str)`must contain at least ${s} and no more than ${l} valid item(s)`,params:({params:{min:s,max:l}})=>l===void 0?(0,e._)`{minContains: ${s}}`:(0,e._)`{minContains: ${s}, maxContains: ${l}}`},code(s){const{gen:l,schema:c,parentSchema:f,data:d,it:h}=s;let m,g;const{minContains:v,maxContains:_}=f;h.opts.next?(m=v===void 0?1:v,g=_):m=1;const b=l.const("len",(0,e._)`${d}.length`);if(s.setParams({min:m,max:g}),g===void 0&&m===0){(0,t.checkStrictMode)(h,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(g!==void 0&&m>g){(0,t.checkStrictMode)(h,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,t.alwaysValidSchema)(h,c)){let R=(0,e._)`${b} >= ${m}`;g!==void 0&&(R=(0,e._)`${R} && ${b} <= ${g}`),s.pass(R);return}h.items=!0;const S=l.name("valid");g===void 0&&m===1?x(S,()=>l.if(S,()=>l.break())):m===0?(l.let(S,!0),g!==void 0&&l.if((0,e._)`${d}.length > 0`,w)):(l.let(S,!1),w()),s.result(S,()=>s.reset());function w(){const R=l.name("_valid"),T=l.let("count",0);x(R,()=>l.if(R,()=>E(T)))}function x(R,T){l.forRange("i",0,b,C=>{s.subschema({keyword:"contains",dataProp:C,dataPropType:t.Type.Num,compositeRule:!0},R),T()})}function E(R){l.code((0,e._)`${R}++`),g===void 0?l.if((0,e._)`${R} >= ${m}`,()=>l.assign(S,!0).break()):(l.if((0,e._)`${R} > ${g}`,()=>l.assign(S,!1).break()),m===1?l.assign(S,!0):l.if((0,e._)`${R} >= ${m}`,()=>l.assign(S,!0)))}}};return FS.default=i,FS}var D2={},Kj;function zre(){return Kj||(Kj=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Wt(),r=An(),i=xl();e.error={message:({params:{property:d,depsCount:h,deps:m}})=>{const g=h===1?"property":"properties";return(0,t.str)`must have ${g} ${m} when property ${d} is present`},params:({params:{property:d,depsCount:h,deps:m,missingProperty:g}})=>(0,t._)`{property: ${d},
|
|
53
|
+
missingProperty: ${g},
|
|
54
|
+
depsCount: ${h},
|
|
55
|
+
deps: ${m}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(d){const[h,m]=l(d);c(d,h),f(d,m)}};function l({schema:d}){const h={},m={};for(const g in d){if(g==="__proto__")continue;const v=Array.isArray(d[g])?h:m;v[g]=d[g]}return[h,m]}function c(d,h=d.schema){const{gen:m,data:g,it:v}=d;if(Object.keys(h).length===0)return;const _=m.let("missing");for(const b in h){const S=h[b];if(S.length===0)continue;const w=(0,i.propertyInData)(m,g,b,v.opts.ownProperties);d.setParams({property:b,depsCount:S.length,deps:S.join(", ")}),v.allErrors?m.if(w,()=>{for(const x of S)(0,i.checkReportMissingProp)(d,x)}):(m.if((0,t._)`${w} && (${(0,i.checkMissingProp)(d,S,_)})`),(0,i.reportMissingProp)(d,_),m.else())}}e.validatePropertyDeps=c;function f(d,h=d.schema){const{gen:m,data:g,keyword:v,it:_}=d,b=m.name("valid");for(const S in h)(0,r.alwaysValidSchema)(_,h[S])||(m.if((0,i.propertyInData)(m,g,S,_.opts.ownProperties),()=>{const w=d.subschema({keyword:v,schemaProp:S},b);d.mergeValidEvaluated(w,b)},()=>m.var(b,!0)),d.ok(b))}e.validateSchemaDeps=f,e.default=s})(D2)),D2}var BS={},Yj;function $re(){if(Yj)return BS;Yj=1,Object.defineProperty(BS,"__esModule",{value:!0});const e=Wt(),t=An(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>(0,e._)`{propertyName: ${s.propertyName}}`},code(s){const{gen:l,schema:c,data:f,it:d}=s;if((0,t.alwaysValidSchema)(d,c))return;const h=l.name("valid");l.forIn("key",f,m=>{s.setParams({propertyName:m}),s.subschema({keyword:"propertyNames",data:m,dataTypes:["string"],propertyName:m,compositeRule:!0},h),l.if((0,e.not)(h),()=>{s.error(!0),d.allErrors||l.break()})}),s.ok(h)}};return BS.default=i,BS}var HS={},Zj;function x$(){if(Zj)return HS;Zj=1,Object.defineProperty(HS,"__esModule",{value:!0});const e=xl(),t=Wt(),r=If(),i=An(),l={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:c})=>(0,t._)`{additionalProperty: ${c.additionalProperty}}`},code(c){const{gen:f,schema:d,parentSchema:h,data:m,errsCount:g,it:v}=c;if(!g)throw new Error("ajv implementation error");const{allErrors:_,opts:b}=v;if(v.props=!0,b.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(v,d))return;const S=(0,e.allSchemaProperties)(h.properties),w=(0,e.allSchemaProperties)(h.patternProperties);x(),c.ok((0,t._)`${g} === ${r.default.errors}`);function x(){f.forIn("key",m,O=>{!S.length&&!w.length?T(O):f.if(E(O),()=>T(O))})}function E(O){let M;if(S.length>8){const D=(0,i.schemaRefOrVal)(v,h.properties,"properties");M=(0,e.isOwnProperty)(f,D,O)}else S.length?M=(0,t.or)(...S.map(D=>(0,t._)`${O} === ${D}`)):M=t.nil;return w.length&&(M=(0,t.or)(M,...w.map(D=>(0,t._)`${(0,e.usePattern)(c,D)}.test(${O})`))),(0,t.not)(M)}function R(O){f.code((0,t._)`delete ${m}[${O}]`)}function T(O){if(b.removeAdditional==="all"||b.removeAdditional&&d===!1){R(O);return}if(d===!1){c.setParams({additionalProperty:O}),c.error(),_||f.break();return}if(typeof d=="object"&&!(0,i.alwaysValidSchema)(v,d)){const M=f.name("valid");b.removeAdditional==="failing"?(C(O,M,!1),f.if((0,t.not)(M),()=>{c.reset(),R(O)})):(C(O,M),_||f.if((0,t.not)(M),()=>f.break()))}}function C(O,M,D){const U={keyword:"additionalProperties",dataProp:O,dataPropType:i.Type.Str};D===!1&&Object.assign(U,{compositeRule:!0,createErrors:!1,allErrors:!1}),c.subschema(U,M)}}};return HS.default=l,HS}var GS={},Xj;function Pre(){if(Xj)return GS;Xj=1,Object.defineProperty(GS,"__esModule",{value:!0});const e=ax(),t=xl(),r=An(),i=x$(),s={keyword:"properties",type:"object",schemaType:"object",code(l){const{gen:c,schema:f,parentSchema:d,data:h,it:m}=l;m.opts.removeAdditional==="all"&&d.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(m,i.default,"additionalProperties"));const g=(0,t.allSchemaProperties)(f);for(const w of g)m.definedProperties.add(w);m.opts.unevaluated&&g.length&&m.props!==!0&&(m.props=r.mergeEvaluated.props(c,(0,r.toHash)(g),m.props));const v=g.filter(w=>!(0,r.alwaysValidSchema)(m,f[w]));if(v.length===0)return;const _=c.name("valid");for(const w of v)b(w)?S(w):(c.if((0,t.propertyInData)(c,h,w,m.opts.ownProperties)),S(w),m.allErrors||c.else().var(_,!0),c.endIf()),l.it.definedProperties.add(w),l.ok(_);function b(w){return m.opts.useDefaults&&!m.compositeRule&&f[w].default!==void 0}function S(w){l.subschema({keyword:"properties",schemaProp:w,dataProp:w},_)}}};return GS.default=s,GS}var KS={},Qj;function Ire(){if(Qj)return KS;Qj=1,Object.defineProperty(KS,"__esModule",{value:!0});const e=xl(),t=Wt(),r=An(),i=An(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(l){const{gen:c,schema:f,data:d,parentSchema:h,it:m}=l,{opts:g}=m,v=(0,e.allSchemaProperties)(f),_=v.filter(T=>(0,r.alwaysValidSchema)(m,f[T]));if(v.length===0||_.length===v.length&&(!m.opts.unevaluated||m.props===!0))return;const b=g.strictSchema&&!g.allowMatchingProperties&&h.properties,S=c.name("valid");m.props!==!0&&!(m.props instanceof t.Name)&&(m.props=(0,i.evaluatedPropsToName)(c,m.props));const{props:w}=m;x();function x(){for(const T of v)b&&E(T),m.allErrors?R(T):(c.var(S,!0),R(T),c.if(S))}function E(T){for(const C in b)new RegExp(T).test(C)&&(0,r.checkStrictMode)(m,`property ${C} matches pattern ${T} (use allowMatchingProperties)`)}function R(T){c.forIn("key",d,C=>{c.if((0,t._)`${(0,e.usePattern)(l,T)}.test(${C})`,()=>{const O=_.includes(T);O||l.subschema({keyword:"patternProperties",schemaProp:T,dataProp:C,dataPropType:i.Type.Str},S),m.opts.unevaluated&&w!==!0?c.assign((0,t._)`${w}[${C}]`,!0):!O&&!m.allErrors&&c.if((0,t.not)(S),()=>c.break())})})}}};return KS.default=s,KS}var YS={},Wj;function Lre(){if(Wj)return YS;Wj=1,Object.defineProperty(YS,"__esModule",{value:!0});const e=An(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:i,schema:s,it:l}=r;if((0,e.alwaysValidSchema)(l,s)){r.fail();return}const c=i.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},c),r.failResult(c,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return YS.default=t,YS}var ZS={},Jj;function Ure(){if(Jj)return ZS;Jj=1,Object.defineProperty(ZS,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:xl().validateUnion,error:{message:"must match a schema in anyOf"}};return ZS.default=t,ZS}var XS={},e4;function qre(){if(e4)return XS;e4=1,Object.defineProperty(XS,"__esModule",{value:!0});const e=Wt(),t=An(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>(0,e._)`{passingSchemas: ${s.passing}}`},code(s){const{gen:l,schema:c,parentSchema:f,it:d}=s;if(!Array.isArray(c))throw new Error("ajv implementation error");if(d.opts.discriminator&&f.discriminator)return;const h=c,m=l.let("valid",!1),g=l.let("passing",null),v=l.name("_valid");s.setParams({passing:g}),l.block(_),s.result(m,()=>s.reset(),()=>s.error(!0));function _(){h.forEach((b,S)=>{let w;(0,t.alwaysValidSchema)(d,b)?l.var(v,!0):w=s.subschema({keyword:"oneOf",schemaProp:S,compositeRule:!0},v),S>0&&l.if((0,e._)`${v} && ${m}`).assign(m,!1).assign(g,(0,e._)`[${g}, ${S}]`).else(),l.if(v,()=>{l.assign(m,!0),l.assign(g,S),w&&s.mergeEvaluated(w,e.Name)})})}}};return XS.default=i,XS}var QS={},t4;function Vre(){if(t4)return QS;t4=1,Object.defineProperty(QS,"__esModule",{value:!0});const e=An(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:i,schema:s,it:l}=r;if(!Array.isArray(s))throw new Error("ajv implementation error");const c=i.name("valid");s.forEach((f,d)=>{if((0,e.alwaysValidSchema)(l,f))return;const h=r.subschema({keyword:"allOf",schemaProp:d},c);r.ok(c),r.mergeEvaluated(h)})}};return QS.default=t,QS}var WS={},n4;function Fre(){if(n4)return WS;n4=1,Object.defineProperty(WS,"__esModule",{value:!0});const e=Wt(),t=An(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:l})=>(0,e.str)`must match "${l.ifClause}" schema`,params:({params:l})=>(0,e._)`{failingKeyword: ${l.ifClause}}`},code(l){const{gen:c,parentSchema:f,it:d}=l;f.then===void 0&&f.else===void 0&&(0,t.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const h=s(d,"then"),m=s(d,"else");if(!h&&!m)return;const g=c.let("valid",!0),v=c.name("_valid");if(_(),l.reset(),h&&m){const S=c.let("ifClause");l.setParams({ifClause:S}),c.if(v,b("then",S),b("else",S))}else h?c.if(v,b("then")):c.if((0,e.not)(v),b("else"));l.pass(g,()=>l.error(!0));function _(){const S=l.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},v);l.mergeEvaluated(S)}function b(S,w){return()=>{const x=l.subschema({keyword:S},v);c.assign(g,v),l.mergeValidEvaluated(x,g),w?c.assign(w,(0,e._)`${S}`):l.setParams({ifClause:S})}}}};function s(l,c){const f=l.schema[c];return f!==void 0&&!(0,t.alwaysValidSchema)(l,f)}return WS.default=i,WS}var JS={},r4;function Bre(){if(r4)return JS;r4=1,Object.defineProperty(JS,"__esModule",{value:!0});const e=An(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:i,it:s}){i.if===void 0&&(0,e.checkStrictMode)(s,`"${r}" without "if" is ignored`)}};return JS.default=t,JS}var a4;function Hre(){if(a4)return US;a4=1,Object.defineProperty(US,"__esModule",{value:!0});const e=w$(),t=kre(),r=E$(),i=Dre(),s=Nre(),l=zre(),c=$re(),f=x$(),d=Pre(),h=Ire(),m=Lre(),g=Ure(),v=qre(),_=Vre(),b=Fre(),S=Bre();function w(x=!1){const E=[m.default,g.default,v.default,_.default,b.default,S.default,c.default,f.default,l.default,d.default,h.default];return x?E.push(t.default,i.default):E.push(e.default,r.default),E.push(s.default),E}return US.default=w,US}var ew={},tw={},i4;function Gre(){if(i4)return tw;i4=1,Object.defineProperty(tw,"__esModule",{value:!0});const e=Wt(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,e._)`{format: ${i}}`},code(i,s){const{gen:l,data:c,$data:f,schema:d,schemaCode:h,it:m}=i,{opts:g,errSchemaPath:v,schemaEnv:_,self:b}=m;if(!g.validateFormats)return;f?S():w();function S(){const x=l.scopeValue("formats",{ref:b.formats,code:g.code.formats}),E=l.const("fDef",(0,e._)`${x}[${h}]`),R=l.let("fType"),T=l.let("format");l.if((0,e._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>l.assign(R,(0,e._)`${E}.type || "string"`).assign(T,(0,e._)`${E}.validate`),()=>l.assign(R,(0,e._)`"string"`).assign(T,E)),i.fail$data((0,e.or)(C(),O()));function C(){return g.strictSchema===!1?e.nil:(0,e._)`${h} && !${T}`}function O(){const M=_.$async?(0,e._)`(${E}.async ? await ${T}(${c}) : ${T}(${c}))`:(0,e._)`${T}(${c})`,D=(0,e._)`(typeof ${T} == "function" ? ${M} : ${T}.test(${c}))`;return(0,e._)`${T} && ${T} !== true && ${R} === ${s} && !${D}`}}function w(){const x=b.formats[d];if(!x){C();return}if(x===!0)return;const[E,R,T]=O(x);E===s&&i.pass(M());function C(){if(g.strictSchema===!1){b.logger.warn(D());return}throw new Error(D());function D(){return`unknown format "${d}" ignored in schema at path "${v}"`}}function O(D){const U=D instanceof RegExp?(0,e.regexpCode)(D):g.code.formats?(0,e._)`${g.code.formats}${(0,e.getProperty)(d)}`:void 0,B=l.scopeValue("formats",{key:d,ref:D,code:U});return typeof D=="object"&&!(D instanceof RegExp)?[D.type||"string",D.validate,(0,e._)`${B}.validate`]:["string",D,B]}function M(){if(typeof x=="object"&&!(x instanceof RegExp)&&x.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${T}(${c})`}return typeof R=="function"?(0,e._)`${T}(${c})`:(0,e._)`${T}.test(${c})`}}}};return tw.default=r,tw}var o4;function Kre(){if(o4)return ew;o4=1,Object.defineProperty(ew,"__esModule",{value:!0});const t=[Gre().default];return ew.default=t,ew}var sp={},s4;function Yre(){return s4||(s4=1,Object.defineProperty(sp,"__esModule",{value:!0}),sp.contentVocabulary=sp.metadataVocabulary=void 0,sp.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],sp.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),sp}var l4;function Zre(){if(l4)return _S;l4=1,Object.defineProperty(_S,"__esModule",{value:!0});const e=bre(),t=jre(),r=Hre(),i=Kre(),s=Yre(),l=[e.default,t.default,(0,r.default)(),i.default,s.metadataVocabulary,s.contentVocabulary];return _S.default=l,_S}var nw={},bb={},u4;function Xre(){if(u4)return bb;u4=1,Object.defineProperty(bb,"__esModule",{value:!0}),bb.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(bb.DiscrError=e={})),bb}var c4;function Qre(){if(c4)return nw;c4=1,Object.defineProperty(nw,"__esModule",{value:!0});const e=Wt(),t=Xre(),r=cA(),i=ix(),s=An(),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:f,tagName:d}})=>f===t.DiscrError.Tag?`tag "${d}" must be string`:`value of tag "${d}" must be in oneOf`,params:({params:{discrError:f,tag:d,tagName:h}})=>(0,e._)`{error: ${f}, tag: ${h}, tagValue: ${d}}`},code(f){const{gen:d,data:h,schema:m,parentSchema:g,it:v}=f,{oneOf:_}=g;if(!v.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=m.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(m.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const S=d.let("valid",!1),w=d.const("tag",(0,e._)`${h}${(0,e.getProperty)(b)}`);d.if((0,e._)`typeof ${w} == "string"`,()=>x(),()=>f.error(!1,{discrError:t.DiscrError.Tag,tag:w,tagName:b})),f.ok(S);function x(){const T=R();d.if(!1);for(const C in T)d.elseIf((0,e._)`${w} === ${C}`),d.assign(S,E(T[C]));d.else(),f.error(!1,{discrError:t.DiscrError.Mapping,tag:w,tagName:b}),d.endIf()}function E(T){const C=d.name("valid"),O=f.subschema({keyword:"oneOf",schemaProp:T},C);return f.mergeEvaluated(O,e.Name),C}function R(){var T;const C={},O=D(g);let M=!0;for(let q=0;q<_.length;q++){let V=_[q];if(V?.$ref&&!(0,s.schemaHasRulesButRef)(V,v.self.RULES)){const ne=V.$ref;if(V=r.resolveRef.call(v.self,v.schemaEnv.root,v.baseId,ne),V instanceof r.SchemaEnv&&(V=V.schema),V===void 0)throw new i.default(v.opts.uriResolver,v.baseId,ne)}const G=(T=V?.properties)===null||T===void 0?void 0:T[b];if(typeof G!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);M=M&&(O||D(V)),U(G,q)}if(!M)throw new Error(`discriminator: "${b}" must be required`);return C;function D({required:q}){return Array.isArray(q)&&q.includes(b)}function U(q,V){if(q.const)B(q.const,V);else if(q.enum)for(const G of q.enum)B(G,V);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function B(q,V){if(typeof q!="string"||q in C)throw new Error(`discriminator: "${b}" values must be unique strings`);C[q]=V}}}};return nw.default=c,nw}const Wre="http://json-schema.org/draft-07/schema#",Jre="http://json-schema.org/draft-07/schema#",eae="Core schema meta-schema",tae={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},nae=["object","boolean"],rae={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},aae={$schema:Wre,$id:Jre,title:eae,definitions:tae,type:nae,properties:rae,default:!0};var f4;function dA(){return f4||(f4=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=gre(),i=Zre(),s=Qre(),l=aae,c=["/properties"],f="http://json-schema.org/draft-07/schema";class d extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(l,c):l;this.addMetaSchema(b,f,!1),this.refs["http://json-schema.org/schema"]=f}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(f)?f:void 0)}}t.Ajv=d,e.exports=t=d,e.exports.Ajv=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var h=ax();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var m=Wt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return m._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return m.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return m.CodeGen}});var g=uA();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return g.default}});var v=ix();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return v.default}})})(bS,bS.exports)),bS.exports}var iae=dA();const _$=tu(iae);var rw={exports:{}},N2={},d4;function oae(){return d4||(d4=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(q,V){return{validate:q,compare:V}}e.fullFormats={date:t(l,c),time:t(d(!0),h),"date-time":t(v(!0),_),"iso-time":t(d(),m),"iso-date-time":t(v(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:x,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:B,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:R,int32:{type:"number",validate:O},int64:{type:"number",validate:M},float:{type:"number",validate:D},double:{type:"number",validate:D},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,c),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,_),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(q){return q%4===0&&(q%100!==0||q%400===0)}const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function l(q){const V=i.exec(q);if(!V)return!1;const G=+V[1],ne=+V[2],oe=+V[3];return ne>=1&&ne<=12&&oe>=1&&oe<=(ne===2&&r(G)?29:s[ne])}function c(q,V){if(q&&V)return q>V?1:q<V?-1:0}const f=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function d(q){return function(G){const ne=f.exec(G);if(!ne)return!1;const oe=+ne[1],K=+ne[2],ee=+ne[3],re=ne[4],ue=ne[5]==="-"?-1:1,Q=+(ne[6]||0),z=+(ne[7]||0);if(Q>23||z>59||q&&!re)return!1;if(oe<=23&&K<=59&&ee<60)return!0;const L=K-z*ue,Y=oe-Q*ue-(L<0?1:0);return(Y===23||Y===-1)&&(L===59||L===-1)&&ee<61}}function h(q,V){if(!(q&&V))return;const G=new Date("2020-01-01T"+q).valueOf(),ne=new Date("2020-01-01T"+V).valueOf();if(G&&ne)return G-ne}function m(q,V){if(!(q&&V))return;const G=f.exec(q),ne=f.exec(V);if(G&&ne)return q=G[1]+G[2]+G[3],V=ne[1]+ne[2]+ne[3],q>V?1:q<V?-1:0}const g=/t|\s/i;function v(q){const V=d(q);return function(ne){const oe=ne.split(g);return oe.length===2&&l(oe[0])&&V(oe[1])}}function _(q,V){if(!(q&&V))return;const G=new Date(q).valueOf(),ne=new Date(V).valueOf();if(G&&ne)return G-ne}function b(q,V){if(!(q&&V))return;const[G,ne]=q.split(g),[oe,K]=V.split(g),ee=c(G,oe);if(ee!==void 0)return ee||h(ne,K)}const S=/\/|:/,w=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function x(q){return S.test(q)&&w.test(q)}const E=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function R(q){return E.lastIndex=0,E.test(q)}const T=-2147483648,C=2**31-1;function O(q){return Number.isInteger(q)&&q<=C&&q>=T}function M(q){return Number.isInteger(q)}function D(){return!0}const U=/[^\\]\\Z/;function B(q){if(U.test(q))return!1;try{return new RegExp(q),!0}catch{return!1}}})(N2)),N2}var z2={},h4;function sae(){return h4||(h4=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=dA(),r=Wt(),i=r.operators,s={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},l={message:({keyword:f,schemaCode:d})=>(0,r.str)`should be ${s[f].okStr} ${d}`,params:({keyword:f,schemaCode:d})=>(0,r._)`{comparison: ${s[f].okStr}, limit: ${d}}`};e.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:l,code(f){const{gen:d,data:h,schemaCode:m,keyword:g,it:v}=f,{opts:_,self:b}=v;if(!_.validateFormats)return;const S=new t.KeywordCxt(v,b.RULES.all.format.definition,"format");S.$data?w():x();function w(){const R=d.scopeValue("formats",{ref:b.formats,code:_.code.formats}),T=d.const("fmt",(0,r._)`${R}[${S.schemaCode}]`);f.fail$data((0,r.or)((0,r._)`typeof ${T} != "object"`,(0,r._)`${T} instanceof RegExp`,(0,r._)`typeof ${T}.compare != "function"`,E(T)))}function x(){const R=S.schema,T=b.formats[R];if(!T||T===!0)return;if(typeof T!="object"||T instanceof RegExp||typeof T.compare!="function")throw new Error(`"${g}": format "${R}" does not define "compare" function`);const C=d.scopeValue("formats",{key:R,ref:T,code:_.code.formats?(0,r._)`${_.code.formats}${(0,r.getProperty)(R)}`:void 0});f.fail$data(E(C))}function E(R){return(0,r._)`${R}.compare(${h}, ${m}) ${s[g].fail} 0`}},dependencies:["format"]};const c=f=>(f.addKeyword(e.formatLimitDefinition),f);e.default=c})(z2)),z2}var p4;function lae(){return p4||(p4=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=oae(),i=sae(),s=Wt(),l=new s.Name("fullFormats"),c=new s.Name("fastFormats"),f=(h,m={keywords:!0})=>{if(Array.isArray(m))return d(h,m,r.fullFormats,l),h;const[g,v]=m.mode==="fast"?[r.fastFormats,c]:[r.fullFormats,l],_=m.formats||r.formatNames;return d(h,_,g,v),m.keywords&&(0,i.default)(h),h};f.get=(h,m="full")=>{const v=(m==="fast"?r.fastFormats:r.fullFormats)[h];if(!v)throw new Error(`Unknown format "${h}"`);return v};function d(h,m,g,v){var _,b;(_=(b=h.opts.code).formats)!==null&&_!==void 0||(b.formats=(0,s._)`require("ajv-formats/dist/formats").${v}`);for(const S of m)h.addFormat(S,g[S])}e.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f})(rw,rw.exports)),rw.exports}var uae=lae();const cae=tu(uae);function fae(){const e=new _$({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return cae(e),e}class dae{constructor(t){this._ajv=t??fae()}getValidator(t){const r="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return i=>r(i)?{valid:!0,data:i,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}}class hae{constructor(t){this._client=t}async*callToolStream(t,r=GE,i){const s=this._client,l={...i,task:i?.task??(s.isToolTask(t.name)?{}:void 0)},c=s.requestStream({method:"tools/call",params:t},r,l),f=s.getToolOutputValidator(t.name);for await(const d of c){if(d.type==="result"&&f){const h=d.result;if(!h.structuredContent&&!h.isError){yield{type:"error",error:new Ot(Ut.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`)};return}if(h.structuredContent)try{const m=f(h.structuredContent);if(!m.valid){yield{type:"error",error:new Ot(Ut.InvalidParams,`Structured content does not match the tool's output schema: ${m.errorMessage}`)};return}}catch(m){if(m instanceof Ot){yield{type:"error",error:m};return}yield{type:"error",error:new Ot(Ut.InvalidParams,`Failed to validate structured content: ${m instanceof Error?m.message:String(m)}`)};return}}yield d}}async getTask(t,r){return this._client.getTask({taskId:t},r)}async getTaskResult(t,r,i){return this._client.getTaskResult({taskId:t},r,i)}async listTasks(t,r){return this._client.listTasks(t?{cursor:t}:void 0,r)}async cancelTask(t,r){return this._client.cancelTask({taskId:t},r)}requestStream(t,r,i){return this._client.requestStream(t,r,i)}}function pae(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${t})`);break}}function mae(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break}}function kw(e,t){if(!(!e||t===null||typeof t!="object")){if(e.type==="object"&&e.properties&&typeof e.properties=="object"){const r=t,i=e.properties;for(const s of Object.keys(i)){const l=i[s];r[s]===void 0&&Object.prototype.hasOwnProperty.call(l,"default")&&(r[s]=l.default),r[s]!==void 0&&kw(l,r[s])}}if(Array.isArray(e.anyOf))for(const r of e.anyOf)typeof r!="boolean"&&kw(r,t);if(Array.isArray(e.oneOf))for(const r of e.oneOf)typeof r!="boolean"&&kw(r,t)}}function gae(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};const t=e.form!==void 0,r=e.url!==void 0;return{supportsFormMode:t||!t&&!r,supportsUrlMode:r}}class yae extends ere{constructor(t,r){super(r),this._clientInfo=t,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=r?.capabilities??{},this._jsonSchemaValidator=r?.jsonSchemaValidator??new dae,r?.listChanged&&(this._pendingListChangedConfig=r.listChanged)}_setupListChangedHandlers(t){t.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",o9,t.tools,async()=>(await this.listTools()).tools),t.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",r9,t.prompts,async()=>(await this.listPrompts()).prompts),t.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",e9,t.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new hae(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=tre(this._capabilities,t)}setRequestHandler(t,r){const s=m$(t)?.method;if(!s)throw new Error("Schema is missing a method literal");let l;if(tx(s)){const f=s;l=f._zod?.def?.value??f.value}else{const f=s;l=f._def?.value??f.value}if(typeof l!="string")throw new Error("Schema method literal must be a string");const c=l;if(c==="elicitation/create"){const f=async(d,h)=>{const m=cf(f9,d);if(!m.success){const E=m.error instanceof Error?m.error.message:String(m.error);throw new Ot(Ut.InvalidParams,`Invalid elicitation request: ${E}`)}const{params:g}=m.data;g.mode=g.mode??"form";const{supportsFormMode:v,supportsUrlMode:_}=gae(this._capabilities.elicitation);if(g.mode==="form"&&!v)throw new Ot(Ut.InvalidParams,"Client does not support form-mode elicitation requests");if(g.mode==="url"&&!_)throw new Ot(Ut.InvalidParams,"Client does not support URL-mode elicitation requests");const b=await Promise.resolve(r(d,h));if(g.task){const E=cf(o1,b);if(!E.success){const R=E.error instanceof Error?E.error.message:String(E.error);throw new Ot(Ut.InvalidParams,`Invalid task creation result: ${R}`)}return E.data}const S=cf(d9,b);if(!S.success){const E=S.error instanceof Error?S.error.message:String(S.error);throw new Ot(Ut.InvalidParams,`Invalid elicitation result: ${E}`)}const w=S.data,x=g.mode==="form"?g.requestedSchema:void 0;if(g.mode==="form"&&w.action==="accept"&&w.content&&x&&this._capabilities.elicitation?.form?.applyDefaults)try{kw(x,w.content)}catch{}return w};return super.setRequestHandler(t,f)}if(c==="sampling/createMessage"){const f=async(d,h)=>{const m=cf(l9,d);if(!m.success){const w=m.error instanceof Error?m.error.message:String(m.error);throw new Ot(Ut.InvalidParams,`Invalid sampling request: ${w}`)}const{params:g}=m.data,v=await Promise.resolve(r(d,h));if(g.task){const w=cf(o1,v);if(!w.success){const x=w.error instanceof Error?w.error.message:String(w.error);throw new Ot(Ut.InvalidParams,`Invalid task creation result: ${x}`)}return w.data}const b=g.tools||g.toolChoice?c9:u9,S=cf(b,v);if(!S.success){const w=S.error instanceof Error?S.error.message:String(S.error);throw new Ot(Ut.InvalidParams,`Invalid sampling result: ${w}`)}return S.data};return super.setRequestHandler(t,f)}return super.setRequestHandler(t,r)}assertCapability(t,r){if(!this._serverCapabilities?.[t])throw new Error(`Server does not support ${t} (required for ${r})`)}async connect(t,r){if(await super.connect(t),t.sessionId===void 0)try{const i=await this.request({method:"initialize",params:{protocolVersion:FE,capabilities:this._capabilities,clientInfo:this._clientInfo}},H6,r);if(i===void 0)throw new Error(`Server sent invalid initialize result: ${i}`);if(!rZ.includes(i.protocolVersion))throw new Error(`Server's protocol version is not supported: ${i.protocolVersion}`);this._serverCapabilities=i.capabilities,this._serverVersion=i.serverInfo,t.setProtocolVersion&&t.setProtocolVersion(i.protocolVersion),this._instructions=i.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(i){throw this.close(),i}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(t){switch(t){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${t})`);if(t==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${t})`);break}}assertNotificationCapability(t){switch(t){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${t})`);break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${t})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${t})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${t})`);break}}assertTaskCapability(t){pae(this._serverCapabilities?.tasks?.requests,t,"Server")}assertTaskHandlerCapability(t){this._capabilities&&mae(this._capabilities.tasks?.requests,t,"Client")}async ping(t){return this.request({method:"ping"},$m,t)}async complete(t,r){return this.request({method:"completion/complete",params:t},h9,r)}async setLoggingLevel(t,r){return this.request({method:"logging/setLevel",params:{level:t}},$m,r)}async getPrompt(t,r){return this.request({method:"prompts/get",params:t},n9,r)}async listPrompts(t,r){return this.request({method:"prompts/list",params:t},t9,r)}async listResources(t,r){return this.request({method:"resources/list",params:t},Q6,r)}async listResourceTemplates(t,r){return this.request({method:"resources/templates/list",params:t},W6,r)}async readResource(t,r){return this.request({method:"resources/read",params:t},J6,r)}async subscribeResource(t,r){return this.request({method:"resources/subscribe",params:t},$m,r)}async unsubscribeResource(t,r){return this.request({method:"resources/unsubscribe",params:t},$m,r)}async callTool(t,r=GE,i){if(this.isToolTaskRequired(t.name))throw new Ot(Ut.InvalidRequest,`Tool "${t.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const s=await this.request({method:"tools/call",params:t},r,i),l=this.getToolOutputValidator(t.name);if(l){if(!s.structuredContent&&!s.isError)throw new Ot(Ut.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(s.structuredContent)try{const c=l(s.structuredContent);if(!c.valid)throw new Ot(Ut.InvalidParams,`Structured content does not match the tool's output schema: ${c.errorMessage}`)}catch(c){throw c instanceof Ot?c:new Ot(Ut.InvalidParams,`Failed to validate structured content: ${c instanceof Error?c.message:String(c)}`)}}return s}isToolTask(t){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(t):!1}isToolTaskRequired(t){return this._cachedRequiredTaskTools.has(t)}cacheToolMetadata(t){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const r of t){if(r.outputSchema){const s=this._jsonSchemaValidator.getValidator(r.outputSchema);this._cachedToolOutputValidators.set(r.name,s)}const i=r.execution?.taskSupport;(i==="required"||i==="optional")&&this._cachedKnownTaskTools.add(r.name),i==="required"&&this._cachedRequiredTaskTools.add(r.name)}}getToolOutputValidator(t){return this._cachedToolOutputValidators.get(t)}async listTools(t,r){const i=await this.request({method:"tools/list",params:t},i9,r);return this.cacheToolMetadata(i.tools),i}_setupListChangedHandler(t,r,i,s){const l=QZ.safeParse(i);if(!l.success)throw new Error(`Invalid ${t} listChanged options: ${l.error.message}`);if(typeof i.onChanged!="function")throw new Error(`Invalid ${t} listChanged options: onChanged must be a function`);const{autoRefresh:c,debounceMs:f}=l.data,{onChanged:d}=i,h=async()=>{if(!c){d(null,null);return}try{const g=await s();d(null,g)}catch(g){const v=g instanceof Error?g:new Error(String(g));d(v,null)}},m=()=>{if(f){const g=this._listChangedDebounceTimers.get(t);g&&clearTimeout(g);const v=setTimeout(h,f);this._listChangedDebounceTimers.set(t,v)}else h()};this.setNotificationHandler(r,m)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}function LC(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function vae(e=fetch,t){return t?async(r,i)=>{const s={...t,...i,headers:i?.headers?{...LC(t.headers),...LC(i.headers)}:t.headers};return e(r,s)}:e}class m4 extends Error{constructor(t,r){super(t),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}}function $2(e){}function bae(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=$2,onError:r=$2,onRetry:i=$2,onComment:s}=e;let l="",c=!0,f,d="",h="";function m(S){const w=c?S.replace(/^\xEF\xBB\xBF/,""):S,[x,E]=Sae(`${l}${w}`);for(const R of x)g(R);l=E,c=!1}function g(S){if(S===""){_();return}if(S.startsWith(":")){s&&s(S.slice(S.startsWith(": ")?2:1));return}const w=S.indexOf(":");if(w!==-1){const x=S.slice(0,w),E=S[w+1]===" "?2:1,R=S.slice(w+E);v(x,R,S);return}v(S,"",S)}function v(S,w,x){switch(S){case"event":h=w;break;case"data":d=`${d}${w}
|
|
56
|
+
`;break;case"id":f=w.includes("\0")?void 0:w;break;case"retry":/^\d+$/.test(w)?i(parseInt(w,10)):r(new m4(`Invalid \`retry\` value: "${w}"`,{type:"invalid-retry",value:w,line:x}));break;default:r(new m4(`Unknown field "${S.length>20?`${S.slice(0,20)}…`:S}"`,{type:"unknown-field",field:S,value:w,line:x}));break}}function _(){d.length>0&&t({id:f,event:h||void 0,data:d.endsWith(`
|
|
57
|
+
`)?d.slice(0,-1):d}),f=void 0,d="",h=""}function b(S={}){l&&S.consume&&g(l),c=!0,f=void 0,d="",h="",l=""}return{feed:m,reset:b}}function Sae(e){const t=[];let r="",i=0;for(;i<e.length;){const s=e.indexOf("\r",i),l=e.indexOf(`
|
|
58
|
+
`,i);let c=-1;if(s!==-1&&l!==-1?c=Math.min(s,l):s!==-1?s===e.length-1?c=-1:c=s:l!==-1&&(c=l),c===-1){r=e.slice(i);break}else{const f=e.slice(i,c);t.push(f),i=c+1,e[i-1]==="\r"&&e[i]===`
|
|
59
|
+
`&&i++}}return[t,r]}class wae extends TransformStream{constructor({onError:t,onRetry:r,onComment:i}={}){let s;super({start(l){s=bae({onEvent:c=>{l.enqueue(c)},onError(c){t==="terminate"?l.error(c):typeof t=="function"&&t(c)},onRetry:r,onComment:i})},transform(l){s.feed(l)}})}}const Eae={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class bm extends Error{constructor(t,r){super(`Streamable HTTP error: ${r}`),this.code=t}}class xae{constructor(t,r){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=r?.requestInit,this._authProvider=r?.authProvider,this._fetch=r?.fetch,this._fetchWithInit=vae(r?.fetch,r?.requestInit),this._sessionId=r?.sessionId,this._reconnectionOptions=r?.reconnectionOptions??Eae}async _authThenStart(){if(!this._authProvider)throw new pp("No auth provider");let t;try{t=await jb(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(r){throw this.onerror?.(r),r}if(t!=="AUTHORIZED")throw new pp;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const i=await this._authProvider.tokens();i&&(t.Authorization=`Bearer ${i.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const r=LC(this._requestInit?.headers);return new Headers({...t,...r})}async _startOrAuthSse(t){const{resumptionToken:r}=t;try{const i=await this._commonHeaders();i.set("Accept","text/event-stream"),r&&i.set("last-event-id",r);const s=await(this._fetch??fetch)(this._url,{method:"GET",headers:i,signal:this._abortController?.signal});if(!s.ok){if(await s.body?.cancel(),s.status===401&&this._authProvider)return await this._authThenStart();if(s.status===405)return;throw new bm(s.status,`Failed to open SSE stream: ${s.statusText}`)}this._handleSseStream(s.body,t,!0)}catch(i){throw this.onerror?.(i),i}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const r=this._reconnectionOptions.initialReconnectionDelay,i=this._reconnectionOptions.reconnectionDelayGrowFactor,s=this._reconnectionOptions.maxReconnectionDelay;return Math.min(r*Math.pow(i,t),s)}_scheduleReconnection(t,r=0){const i=this._reconnectionOptions.maxRetries;if(r>=i){this.onerror?.(new Error(`Maximum reconnection attempts (${i}) exceeded.`));return}const s=this._getNextReconnectionDelay(r);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(l=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${l instanceof Error?l.message:String(l)}`)),this._scheduleReconnection(t,r+1)})},s)}_handleSseStream(t,r,i){if(!t)return;const{onresumptiontoken:s,replayMessageId:l}=r;let c,f=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new wae({onRetry:_=>{this._serverRetryMs=_}})).getReader();for(;;){const{value:_,done:b}=await m.read();if(b)break;if(_.id&&(c=_.id,f=!0,s?.(_.id)),!!_.data&&(!_.event||_.event==="message"))try{const S=d2.parse(JSON.parse(_.data));Mb(S)&&(d=!0,l!==void 0&&(S.id=l)),this.onmessage?.(S)}catch(S){this.onerror?.(S)}}(i||f)&&!d&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:c,onresumptiontoken:s,replayMessageId:l},0)}catch(m){if(this.onerror?.(new Error(`SSE stream disconnected: ${m}`)),(i||f)&&!d&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:s,replayMessageId:l},0)}catch(_){this.onerror?.(new Error(`Failed to reconnect: ${_ instanceof Error?_.message:String(_)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new pp("No auth provider");if(await jb(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new pp("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,r){try{const{resumptionToken:i,onresumptiontoken:s}=r||{};if(i){this._startOrAuthSse({resumptionToken:i,replayMessageId:bC(t)?t.id:void 0}).catch(v=>this.onerror?.(v));return}const l=await this._commonHeaders();l.set("content-type","application/json"),l.set("accept","application/json, text/event-stream");const c={...this._requestInit,method:"POST",headers:l,body:JSON.stringify(t),signal:this._abortController?.signal},f=await(this._fetch??fetch)(this._url,c),d=f.headers.get("mcp-session-id");if(d&&(this._sessionId=d),!f.ok){const v=await f.text().catch(()=>null);if(f.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new bm(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:_,scope:b}=g3(f);if(this._resourceMetadataUrl=_,this._scope=b,await jb(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new pp;return this._hasCompletedAuthFlow=!0,this.send(t)}if(f.status===403&&this._authProvider){const{resourceMetadataUrl:_,scope:b,error:S}=g3(f);if(S==="insufficient_scope"){const w=f.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===w)throw new bm(403,"Server returned 403 after trying upscoping");if(b&&(this._scope=b),_&&(this._resourceMetadataUrl=_),this._lastUpscopingHeader=w??void 0,await jb(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new pp;return this.send(t)}}throw new bm(f.status,`Error POSTing to endpoint: ${v}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,f.status===202){await f.body?.cancel(),bZ(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(v=>this.onerror?.(v));return}const m=(Array.isArray(t)?t:[t]).filter(v=>"method"in v&&"id"in v&&v.id!==void 0).length>0,g=f.headers.get("content-type");if(m)if(g?.includes("text/event-stream"))this._handleSseStream(f.body,{onresumptiontoken:s},!1);else if(g?.includes("application/json")){const v=await f.json(),_=Array.isArray(v)?v.map(b=>d2.parse(b)):[d2.parse(v)];for(const b of _)this.onmessage?.(b)}else throw await f.body?.cancel(),new bm(-1,`Unexpected content type: ${g}`);else await f.body?.cancel()}catch(i){throw this.onerror?.(i),i}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),r={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._url,r);if(await i.body?.cancel(),!i.ok&&i.status!==405)throw new bm(i.status,`Failed to terminate session: ${i.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,r){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:r?.onresumptiontoken})}}class _ae{client=null;transport=null;async connect(t,r){const i=typeof t=="string"?new URL(t):t;this.transport=new xae(i,{authProvider:r}),this.client=new yae({name:"mcp-client",version:"1.0.0"},{capabilities:{experimental:{tools:{},resources:{},prompts:{}}}}),await this.client.connect(this.transport)}async listTools(){if(!this.client)throw new Error("Client not connected. Call connect() first.");try{return(await this.client.listTools()).tools}catch(t){if(t instanceof Error&&t.message.includes("MCP error -32601: Method not found"))return[];throw t}}async callTool(t,r){if(!this.client)throw new Error("Client not connected. Call connect() first.");const i=await this.client.callTool({name:t,arguments:r??{}}),{_meta:s,...l}=i;return{...l,meta:s}}async listResources(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listResources()).resources}async readResource(t){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.readResource({uri:t})}async listPrompts(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return(await this.client.listPrompts()).prompts}async getPrompt(t,r){if(!this.client)throw new Error("Client not connected. Call connect() first.");return await this.client.getPrompt({name:t,...r&&{arguments:r}})}getServerInfo(){if(!this.client)throw new Error("Client not connected. Call connect() first.");return this.client._serverVersion}async finishAuth(t){if(!this.transport)throw new Error("Transport not available. Call connect() first.");await this.transport.finishAuth(t)}async close(){this.client&&(await this.client.close(),this.client=null),this.transport&&(this.transport=null)}}const Ac=new _ae;let Vb=null;const T$=()=>`${window.location.origin}/mcp`;async function ox(){const e=T$(),{setStatus:t,setRequiresAuth:r,setError:i}=Rc.getState();t("connecting"),i(null),await Ac.close();let s=!1;try{(await qR(e))?.authorization_servers?.length&&(s=!0)}catch{}r(s);try{s?(Vb=new p$,await Ac.connect(e,Vb)):(Vb=null,await Ac.connect(e)),t("authenticated"),lA.invalidateQueries({queryKey:["list-tools"]})}catch(l){if(l instanceof pp){t("unauthenticated");return}t("error"),i(l instanceof Error?l.message:"Connection failed")}}async function Tae(e){const t=T$(),r=new p$;await jb(r,{serverUrl:t,authorizationCode:e}),await ox()}async function Cae(){Vb?.invalidateCredentials("all"),Vb=null,await Ac.close(),Rc.getState().reset(),lA.invalidateQueries({queryKey:["list-tools"]})}const Oae={theme:"light",userAgent:{device:{type:"desktop"},capabilities:{hover:!0,touch:!1}},locale:"en-US",maxHeight:void 0,displayMode:"inline",safeArea:{insets:{top:0,bottom:0,left:0,right:0}},toolInput:{},toolOutput:null,toolResponseMetadata:null,view:{mode:"inline"},widgetState:null},C$=()=>{const{data:e}=Mz({queryKey:["list-tools"],queryFn:()=>Ac.listTools()});return e},Rae=()=>{if(Rc(t=>t.status)==="authenticated")return Ac.getServerInfo()},Aae=()=>{const{setToolData:e}=Mg();return bV({mutationFn:async({toolName:t,args:r})=>{e(t,{input:r??{},response:void 0,openaiRef:null,openaiLogs:[],openaiObject:null,openInAppUrl:null});const i=await Ac.callTool(t,r);return e(t,{input:r??{},response:i,openaiRef:null,openaiLogs:[],openaiObject:{...Oae,toolInput:r??{},toolOutput:i.structuredContent,toolResponseMetadata:i.meta??null,widgetState:null},openInAppUrl:null}),i}})},hA=()=>{const[e]=sA();return C$().find(r=>r.name===e)??null},Lf=()=>{const e=hA();if(!e)throw new Error("No tool is currently selected");return e},O$=e=>Mz({queryKey:["resource",e],queryFn:async()=>{if(!e)throw new Error("Resource URI is required");return await Ac.readResource(e)}});function sx(){return typeof window<"u"}function Uf(e){return pA(e)?(e.nodeName||"").toLowerCase():"#document"}function ua(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ru(e){var t;return(t=(pA(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pA(e){return sx()?e instanceof Node||e instanceof ua(e).Node:!1}function Zn(e){return sx()?e instanceof Element||e instanceof ua(e).Element:!1}function Mr(e){return sx()?e instanceof HTMLElement||e instanceof ua(e).HTMLElement:!1}function UC(e){return!sx()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ua(e).ShadowRoot}const Mae=new Set(["inline","contents"]);function qf(e){const{overflow:t,overflowX:r,overflowY:i,display:s}=as(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&!Mae.has(s)}const jae=new Set(["table","td","th"]);function kae(e){return jae.has(Uf(e))}const Dae=[":popover-open",":modal"];function lx(e){return Dae.some(t=>{try{return e.matches(t)}catch{return!1}})}const Nae=["transform","translate","scale","rotate","perspective"],zae=["transform","translate","scale","rotate","perspective","filter"],$ae=["paint","layout","strict","content"];function mA(e){const t=ux(),r=Zn(e)?as(e):e;return Nae.some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||zae.some(i=>(r.willChange||"").includes(i))||$ae.some(i=>(r.contain||"").includes(i))}function Pae(e){let t=Dc(e);for(;Mr(t)&&!Mc(t);){if(mA(t))return t;if(lx(t))return null;t=Dc(t)}return null}function ux(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Iae=new Set(["html","body","#document"]);function Mc(e){return Iae.has(Uf(e))}function as(e){return ua(e).getComputedStyle(e)}function cx(e){return Zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Dc(e){if(Uf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||UC(e)&&e.host||ru(e);return UC(t)?t.host:t}function R$(e){const t=Dc(e);return Mc(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mr(t)&&qf(t)?t:R$(t)}function yf(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=R$(e),l=s===((i=e.ownerDocument)==null?void 0:i.body),c=ua(s);if(l){const f=qC(c);return t.concat(c,c.visualViewport||[],qf(s)?s:[],f&&r?yf(f):[])}return t.concat(s,yf(s,[],r))}function qC(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const g4={};function ki(e,t){const r=j.useRef(g4);return r.current===g4&&(r.current=e(t)),r}const P2=A1[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Lae=P2&&P2!==j.useLayoutEffect?P2:e=>e();function Je(e){const t=ki(Uae).current;return t.next=e,Lae(t.effect),t.trampoline}function Uae(){const e={next:void 0,callback:qae,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function qae(){}const Vae={...A1},Fae=()=>{},at=typeof document<"u"?j.useLayoutEffect:Fae;function VC(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Fb={};function G1(e,t,r,i,s){let l={...FC(e,Fb)};return t&&(l=kb(l,t)),r&&(l=kb(l,r)),i&&(l=kb(l,i)),s&&(l=kb(l,s)),l}function Bae(e){if(e.length===0)return Fb;if(e.length===1)return FC(e[0],Fb);let t={...FC(e[0],Fb)};for(let r=1;r<e.length;r+=1)t=kb(t,e[r]);return t}function kb(e,t){return A$(t)?t(e):Hae(e,t)}function Hae(e,t){if(!t)return e;for(const r in t){const i=t[r];switch(r){case"style":{e[r]=VC(e.style,i);break}case"className":{e[r]=M$(e.className,i);break}default:Gae(r,i)?e[r]=Kae(e[r],i):e[r]=i}}return e}function Gae(e,t){const r=e.charCodeAt(0),i=e.charCodeAt(1),s=e.charCodeAt(2);return r===111&&i===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function A$(e){return typeof e=="function"}function FC(e,t){return A$(e)?e(t):e??Fb}function Kae(e,t){return t?e?r=>{if(Yae(r)){const s=r;BC(s);const l=t(s);return s.baseUIHandlerPrevented||e?.(s),l}const i=t(r);return e?.(r),i}:t:e}function BC(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function M$(e,t){return t?e?t+" "+e:t:e}function Yae(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function xi(e,...t){const r=new URL("https://base-ui.com/production-error");return r.searchParams.set("code",e.toString()),t.forEach(i=>r.searchParams.append("args[]",i)),`Base UI error #${e}; visit ${r} for the full message.`}const j$=j.createContext(void 0);function k$(e=!1){const t=j.useContext(j$);if(t===void 0&&!e)throw new Error(xi(16));return t}function Zae(e){const{focusableWhenDisabled:t,disabled:r,composite:i=!1,tabIndex:s=0,isNativeButton:l}=e,c=i&&t!==!1,f=i&&t===!1;return{props:j.useMemo(()=>{const h={onKeyDown(m){r&&t&&m.key!=="Tab"&&m.preventDefault()}};return i||(h.tabIndex=s,!l&&r&&(h.tabIndex=t?s:-1)),(l&&(t||c)||!l&&r)&&(h["aria-disabled"]=r),l&&(!t||f)&&(h.disabled=r),h},[i,r,t,c,f,l,s])}}function Kp(e={}){const{disabled:t=!1,focusableWhenDisabled:r,tabIndex:i=0,native:s=!0}=e,l=j.useRef(null),c=k$(!0)!==void 0,f=Je(()=>{const v=l.current;return!!(v?.tagName==="A"&&v?.href)}),{props:d}=Zae({focusableWhenDisabled:r,disabled:t,composite:c,tabIndex:i,isNativeButton:s}),h=j.useCallback(()=>{const v=l.current;Xae(v)&&c&&t&&d.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,d.disabled,c]);at(h,[h]);const m=j.useCallback((v={})=>{const{onClick:_,onMouseDown:b,onKeyUp:S,onKeyDown:w,onPointerDown:x,...E}=v;return G1({type:s?"button":void 0,onClick(T){if(t){T.preventDefault();return}_?.(T)},onMouseDown(T){t||b?.(T)},onKeyDown(T){if(t||(BC(T),w?.(T)),T.baseUIHandlerPrevented)return;const C=T.target===T.currentTarget&&!s&&!f()&&!t,O=T.key==="Enter",M=T.key===" ";C&&((M||O)&&T.preventDefault(),O&&_?.(T))},onKeyUp(T){t||(BC(T),S?.(T)),!T.baseUIHandlerPrevented&&T.target===T.currentTarget&&!s&&!t&&T.key===" "&&_?.(T)},onPointerDown(T){if(t){T.preventDefault();return}x?.(T)}},s?void 0:{role:"button"},d,E)},[t,d,s,f]),g=Je(v=>{l.current=v,h()});return{getButtonProps:m,buttonRef:g}}function Xae(e){return Mr(e)&&e.tagName==="BUTTON"}function Nc(e,t,r,i){const s=ki(D$).current;return Wae(s,e,t,r,i)&&N$(s,[e,t,r,i]),s.callback}function Qae(e){const t=ki(D$).current;return Jae(t,e)&&N$(t,e),t.callback}function D$(){return{callback:null,cleanup:null,refs:[]}}function Wae(e,t,r,i,s){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==i||e.refs[3]!==s}function Jae(e,t){return e.refs.length!==t.length||e.refs.some((r,i)=>r!==t[i])}function N$(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){const i=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const l=t[s];if(l!=null)switch(typeof l){case"function":{const c=l(r);typeof c=="function"&&(i[s]=c);break}case"object":{l.current=r;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const l=t[s];if(l!=null)switch(typeof l){case"function":{const c=i[s];typeof c=="function"?c():l(null);break}case"object":{l.current=null;break}}}}}}}const eie=parseInt(j.version,10);function gA(e){return eie>=e}function y4(e){if(!j.isValidElement(e))return null;const t=e,r=t.props;return(gA(19)?r?.ref:t.ref)??null}function tie(e,t){const r={};for(const i in e){const s=e[i];if(t?.hasOwnProperty(i)){const l=t[i](s);l!=null&&Object.assign(r,l);continue}s===!0?r[`data-${i.toLowerCase()}`]="":s&&(r[`data-${i.toLowerCase()}`]=s.toString())}return r}function nie(e,t){return typeof e=="function"?e(t):e}function rie(e,t){return typeof e=="function"?e(t):e}function fo(){}const f1=Object.freeze([]),ka=Object.freeze({}),aie=500,iie={style:{transition:"none"}},z$="data-base-ui-click-trigger",oie={fallbackAxisSide:"none"},sie={fallbackAxisSide:"end"},lie={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function sr(e,t,r={}){const i=t.render,s=uie(t,r);if(r.enabled===!1)return null;const l=r.state??ka;return fie(e,i,s,l)}function uie(e,t={}){const{className:r,style:i,render:s}=e,{state:l=ka,ref:c,props:f,stateAttributesMapping:d,enabled:h=!0}=t,m=h?nie(r,l):void 0,g=h?rie(i,l):void 0,v=h?tie(l,d):ka,_=h?VC(v,Array.isArray(f)?Bae(f):f)??ka:ka;return typeof document<"u"&&(h?Array.isArray(c)?_.ref=Qae([_.ref,y4(s),...c]):_.ref=Nc(_.ref,y4(s),c):Nc(null,null)),h?(m!==void 0&&(_.className=M$(_.className,m)),g!==void 0&&(_.style=VC(_.style,g)),_):ka}const cie=Symbol.for("react.lazy");function fie(e,t,r,i){if(t){if(typeof t=="function")return t(r,i);const s=G1(r,t.props);s.ref=r.ref;let l=t;return l?.$$typeof===cie&&(l=j.Children.toArray(t)[0]),j.cloneElement(l,s)}if(e&&typeof e=="string")return die(e,r);throw new Error(xi(8))}function die(e,t){return e==="button"?j.createElement("button",{type:"button",...t,key:t.key}):e==="img"?j.createElement("img",{alt:"",...t,key:t.key}):j.createElement(e,t)}const hie=j.forwardRef(function(t,r){const{render:i,className:s,disabled:l=!1,focusableWhenDisabled:c=!1,nativeButton:f=!0,...d}=t,{getButtonProps:h,buttonRef:m}=Kp({disabled:l,focusableWhenDisabled:c,native:f});return sr("button",t,{state:{disabled:l},ref:[r,m],props:[d,h]})});function $$(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=$$(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function yA(){for(var e,t,r=0,i="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=$$(e))&&(i&&(i+=" "),i+=t);return i}const v4=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,b4=yA,Fc=(e,t)=>r=>{var i;if(t?.variants==null)return b4(e,r?.class,r?.className);const{variants:s,defaultVariants:l}=t,c=Object.keys(s).map(h=>{const m=r?.[h],g=l?.[h];if(m===null)return null;const v=v4(m)||v4(g);return s[h][v]}),f=r&&Object.entries(r).reduce((h,m)=>{let[g,v]=m;return v===void 0||(h[g]=v),h},{}),d=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((h,m)=>{let{class:g,className:v,..._}=m;return Object.entries(_).every(b=>{let[S,w]=b;return Array.isArray(w)?w.includes({...l,...f}[S]):{...l,...f}[S]===w})?[...h,g,v]:h},[]);return b4(e,c,d,r?.class,r?.className)},pie=(e,t)=>{const r=new Array(e.length+t.length);for(let i=0;i<e.length;i++)r[i]=e[i];for(let i=0;i<t.length;i++)r[e.length+i]=t[i];return r},mie=(e,t)=>({classGroupId:e,validator:t}),P$=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),mE="-",S4=[],gie="arbitrary..",yie=e=>{const t=bie(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return vie(c);const f=c.split(mE),d=f[0]===""&&f.length>1?1:0;return I$(f,d,t)},getConflictingClassGroupIds:(c,f)=>{if(f){const d=i[c],h=r[c];return d?h?pie(h,d):d:h||S4}return r[c]||S4}}},I$=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const s=e[t],l=r.nextPart.get(s);if(l){const h=I$(e,t+1,l);if(h)return h}const c=r.validators;if(c===null)return;const f=t===0?e.join(mE):e.slice(t).join(mE),d=c.length;for(let h=0;h<d;h++){const m=c[h];if(m.validator(f))return m.classGroupId}},vie=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),i=t.slice(0,r);return i?gie+i:void 0})(),bie=e=>{const{theme:t,classGroups:r}=e;return Sie(r,t)},Sie=(e,t)=>{const r=P$();for(const i in e){const s=e[i];vA(s,r,i,t)}return r},vA=(e,t,r,i)=>{const s=e.length;for(let l=0;l<s;l++){const c=e[l];wie(c,t,r,i)}},wie=(e,t,r,i)=>{if(typeof e=="string"){Eie(e,t,r);return}if(typeof e=="function"){xie(e,t,r,i);return}_ie(e,t,r,i)},Eie=(e,t,r)=>{const i=e===""?t:L$(t,e);i.classGroupId=r},xie=(e,t,r,i)=>{if(Tie(e)){vA(e(i),t,r,i);return}t.validators===null&&(t.validators=[]),t.validators.push(mie(r,e))},_ie=(e,t,r,i)=>{const s=Object.entries(e),l=s.length;for(let c=0;c<l;c++){const[f,d]=s[c];vA(d,L$(t,f),r,i)}},L$=(e,t)=>{let r=e;const i=t.split(mE),s=i.length;for(let l=0;l<s;l++){const c=i[l];let f=r.nextPart.get(c);f||(f=P$(),r.nextPart.set(c,f)),r=f}return r},Tie=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Cie=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),i=Object.create(null);const s=(l,c)=>{r[l]=c,t++,t>e&&(t=0,i=r,r=Object.create(null))};return{get(l){let c=r[l];if(c!==void 0)return c;if((c=i[l])!==void 0)return s(l,c),c},set(l,c){l in r?r[l]=c:s(l,c)}}},HC="!",w4=":",Oie=[],E4=(e,t,r,i,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:i,isExternal:s}),Rie=e=>{const{prefix:t,experimentalParseClassName:r}=e;let i=s=>{const l=[];let c=0,f=0,d=0,h;const m=s.length;for(let S=0;S<m;S++){const w=s[S];if(c===0&&f===0){if(w===w4){l.push(s.slice(d,S)),d=S+1;continue}if(w==="/"){h=S;continue}}w==="["?c++:w==="]"?c--:w==="("?f++:w===")"&&f--}const g=l.length===0?s:s.slice(d);let v=g,_=!1;g.endsWith(HC)?(v=g.slice(0,-1),_=!0):g.startsWith(HC)&&(v=g.slice(1),_=!0);const b=h&&h>d?h-d:void 0;return E4(l,_,v,b)};if(t){const s=t+w4,l=i;i=c=>c.startsWith(s)?l(c.slice(s.length)):E4(Oie,!1,c,void 0,!0)}if(r){const s=i;i=l=>r({className:l,parseClassName:s})}return i},Aie=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,i)=>{t.set(r,1e6+i)}),r=>{const i=[];let s=[];for(let l=0;l<r.length;l++){const c=r[l],f=c[0]==="[",d=t.has(c);f||d?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(c)):s.push(c)}return s.length>0&&(s.sort(),i.push(...s)),i}},Mie=e=>({cache:Cie(e.cacheSize),parseClassName:Rie(e),sortModifiers:Aie(e),...yie(e)}),jie=/\s+/,kie=(e,t)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:l}=t,c=[],f=e.trim().split(jie);let d="";for(let h=f.length-1;h>=0;h-=1){const m=f[h],{isExternal:g,modifiers:v,hasImportantModifier:_,baseClassName:b,maybePostfixModifierPosition:S}=r(m);if(g){d=m+(d.length>0?" "+d:d);continue}let w=!!S,x=i(w?b.substring(0,S):b);if(!x){if(!w){d=m+(d.length>0?" "+d:d);continue}if(x=i(b),!x){d=m+(d.length>0?" "+d:d);continue}w=!1}const E=v.length===0?"":v.length===1?v[0]:l(v).join(":"),R=_?E+HC:E,T=R+x;if(c.indexOf(T)>-1)continue;c.push(T);const C=s(x,w);for(let O=0;O<C.length;++O){const M=C[O];c.push(R+M)}d=m+(d.length>0?" "+d:d)}return d},Die=(...e)=>{let t=0,r,i,s="";for(;t<e.length;)(r=e[t++])&&(i=U$(r))&&(s&&(s+=" "),s+=i);return s},U$=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=U$(e[i]))&&(r&&(r+=" "),r+=t);return r},Nie=(e,...t)=>{let r,i,s,l;const c=d=>{const h=t.reduce((m,g)=>g(m),e());return r=Mie(h),i=r.cache.get,s=r.cache.set,l=f,f(d)},f=d=>{const h=i(d);if(h)return h;const m=kie(d,r);return s(d,m),m};return l=c,(...d)=>l(Die(...d))},zie=[],Aa=e=>{const t=r=>r[e]||zie;return t.isThemeGetter=!0,t},q$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,V$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$ie=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Pie=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Iie=/\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$/,Lie=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Uie=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qie=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Jc=e=>$ie.test(e),an=e=>!!e&&!Number.isNaN(Number(e)),ef=e=>!!e&&Number.isInteger(Number(e)),I2=e=>e.endsWith("%")&&an(e.slice(0,-1)),Tc=e=>Pie.test(e),F$=()=>!0,Vie=e=>Iie.test(e)&&!Lie.test(e),bA=()=>!1,Fie=e=>Uie.test(e),Bie=e=>qie.test(e),Hie=e=>!ct(e)&&!ht(e),Gie=e=>Vf(e,G$,bA),ct=e=>q$.test(e),lp=e=>Vf(e,K$,Vie),x4=e=>Vf(e,eoe,an),Kie=e=>Vf(e,Z$,F$),Yie=e=>Vf(e,Y$,bA),_4=e=>Vf(e,B$,bA),Zie=e=>Vf(e,H$,Bie),aw=e=>Vf(e,X$,Fie),ht=e=>V$.test(e),Sb=e=>Yp(e,K$),Xie=e=>Yp(e,Y$),T4=e=>Yp(e,B$),Qie=e=>Yp(e,G$),Wie=e=>Yp(e,H$),iw=e=>Yp(e,X$,!0),Jie=e=>Yp(e,Z$,!0),Vf=(e,t,r)=>{const i=q$.exec(e);return i?i[1]?t(i[1]):r(i[2]):!1},Yp=(e,t,r=!1)=>{const i=V$.exec(e);return i?i[1]?t(i[1]):r:!1},B$=e=>e==="position"||e==="percentage",H$=e=>e==="image"||e==="url",G$=e=>e==="length"||e==="size"||e==="bg-size",K$=e=>e==="length",eoe=e=>e==="number",Y$=e=>e==="family-name",Z$=e=>e==="number"||e==="weight",X$=e=>e==="shadow",toe=()=>{const e=Aa("color"),t=Aa("font"),r=Aa("text"),i=Aa("font-weight"),s=Aa("tracking"),l=Aa("leading"),c=Aa("breakpoint"),f=Aa("container"),d=Aa("spacing"),h=Aa("radius"),m=Aa("shadow"),g=Aa("inset-shadow"),v=Aa("text-shadow"),_=Aa("drop-shadow"),b=Aa("blur"),S=Aa("perspective"),w=Aa("aspect"),x=Aa("ease"),E=Aa("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...T(),ht,ct],O=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],D=()=>[ht,ct,d],U=()=>[Jc,"full","auto",...D()],B=()=>[ef,"none","subgrid",ht,ct],q=()=>["auto",{span:["full",ef,ht,ct]},ef,ht,ct],V=()=>[ef,"auto",ht,ct],G=()=>["auto","min","max","fr",ht,ct],ne=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...D()],ee=()=>[Jc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],re=()=>[Jc,"screen","full","dvw","lvw","svw","min","max","fit",...D()],ue=()=>[Jc,"screen","full","lh","dvh","lvh","svh","min","max","fit",...D()],Q=()=>[e,ht,ct],z=()=>[...T(),T4,_4,{position:[ht,ct]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",Qie,Gie,{size:[ht,ct]}],I=()=>[I2,Sb,lp],X=()=>["","none","full",h,ht,ct],J=()=>["",an,Sb,lp],he=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>[an,I2,T4,_4],je=()=>["","none",b,ht,ct],de=()=>["none",an,ht,ct],se=()=>["none",an,ht,ct],ye=()=>[an,ht,ct],be=()=>[Jc,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Tc],breakpoint:[Tc],color:[F$],container:[Tc],"drop-shadow":[Tc],ease:["in","out","in-out"],font:[Hie],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Tc],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Tc],shadow:[Tc],spacing:["px",an],text:[Tc],"text-shadow":[Tc],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Jc,ct,ht,w]}],container:["container"],columns:[{columns:[an,ct,ht,f]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"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:C()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:U()}],"inset-x":[{"inset-x":U()}],"inset-y":[{"inset-y":U()}],start:[{"inset-s":U(),start:U()}],end:[{"inset-e":U(),end:U()}],"inset-bs":[{"inset-bs":U()}],"inset-be":[{"inset-be":U()}],top:[{top:U()}],right:[{right:U()}],bottom:[{bottom:U()}],left:[{left:U()}],visibility:["visible","invisible","collapse"],z:[{z:[ef,"auto",ht,ct]}],basis:[{basis:[Jc,"full","auto",f,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[an,Jc,"auto","initial","none",ct]}],grow:[{grow:["",an,ht,ct]}],shrink:[{shrink:["",an,ht,ct]}],order:[{order:[ef,"first","last","none",ht,ct]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...ne(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...ne()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pbs:[{pbs:D()}],pbe:[{pbe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],"inline-size":[{inline:["auto",...re()]}],"min-inline-size":[{"min-inline":["auto",...re()]}],"max-inline-size":[{"max-inline":["none",...re()]}],"block-size":[{block:["auto",...ue()]}],"min-block-size":[{"min-block":["auto",...ue()]}],"max-block-size":[{"max-block":["none",...ue()]}],w:[{w:[f,"screen",...ee()]}],"min-w":[{"min-w":[f,"screen","none",...ee()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",r,Sb,lp]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,Jie,Kie]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",I2,ct]}],"font-family":[{font:[Xie,Yie,t]}],"font-features":[{"font-features":[ct]}],"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:[s,ht,ct]}],"line-clamp":[{"line-clamp":[an,"none",ht,x4]}],leading:[{leading:[l,...D()]}],"list-image":[{"list-image":["none",ht,ct]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ht,ct]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Q()}],"text-color":[{text:Q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[an,"from-font","auto",ht,lp]}],"text-decoration-color":[{decoration:Q()}],"underline-offset":[{"underline-offset":[an,"auto",ht,ct]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ht,ct]}],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",ht,ct]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ef,ht,ct],radial:["",ht,ct],conic:[ef,ht,ct]},Wie,Zie]}],"bg-color":[{bg:Q()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:Q()}],"gradient-via":[{via:Q()}],"gradient-to":[{to:Q()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"hidden","none"]}],"border-color":[{border:Q()}],"border-color-x":[{"border-x":Q()}],"border-color-y":[{"border-y":Q()}],"border-color-s":[{"border-s":Q()}],"border-color-e":[{"border-e":Q()}],"border-color-bs":[{"border-bs":Q()}],"border-color-be":[{"border-be":Q()}],"border-color-t":[{"border-t":Q()}],"border-color-r":[{"border-r":Q()}],"border-color-b":[{"border-b":Q()}],"border-color-l":[{"border-l":Q()}],"divide-color":[{divide:Q()}],"outline-style":[{outline:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[an,ht,ct]}],"outline-w":[{outline:["",an,Sb,lp]}],"outline-color":[{outline:Q()}],shadow:[{shadow:["","none",m,iw,aw]}],"shadow-color":[{shadow:Q()}],"inset-shadow":[{"inset-shadow":["none",g,iw,aw]}],"inset-shadow-color":[{"inset-shadow":Q()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Q()}],"ring-offset-w":[{"ring-offset":[an,lp]}],"ring-offset-color":[{"ring-offset":Q()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":Q()}],"text-shadow":[{"text-shadow":["none",v,iw,aw]}],"text-shadow-color":[{"text-shadow":Q()}],opacity:[{opacity:[an,ht,ct]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"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":[an]}],"mask-image-linear-from-pos":[{"mask-linear-from":we()}],"mask-image-linear-to-pos":[{"mask-linear-to":we()}],"mask-image-linear-from-color":[{"mask-linear-from":Q()}],"mask-image-linear-to-color":[{"mask-linear-to":Q()}],"mask-image-t-from-pos":[{"mask-t-from":we()}],"mask-image-t-to-pos":[{"mask-t-to":we()}],"mask-image-t-from-color":[{"mask-t-from":Q()}],"mask-image-t-to-color":[{"mask-t-to":Q()}],"mask-image-r-from-pos":[{"mask-r-from":we()}],"mask-image-r-to-pos":[{"mask-r-to":we()}],"mask-image-r-from-color":[{"mask-r-from":Q()}],"mask-image-r-to-color":[{"mask-r-to":Q()}],"mask-image-b-from-pos":[{"mask-b-from":we()}],"mask-image-b-to-pos":[{"mask-b-to":we()}],"mask-image-b-from-color":[{"mask-b-from":Q()}],"mask-image-b-to-color":[{"mask-b-to":Q()}],"mask-image-l-from-pos":[{"mask-l-from":we()}],"mask-image-l-to-pos":[{"mask-l-to":we()}],"mask-image-l-from-color":[{"mask-l-from":Q()}],"mask-image-l-to-color":[{"mask-l-to":Q()}],"mask-image-x-from-pos":[{"mask-x-from":we()}],"mask-image-x-to-pos":[{"mask-x-to":we()}],"mask-image-x-from-color":[{"mask-x-from":Q()}],"mask-image-x-to-color":[{"mask-x-to":Q()}],"mask-image-y-from-pos":[{"mask-y-from":we()}],"mask-image-y-to-pos":[{"mask-y-to":we()}],"mask-image-y-from-color":[{"mask-y-from":Q()}],"mask-image-y-to-color":[{"mask-y-to":Q()}],"mask-image-radial":[{"mask-radial":[ht,ct]}],"mask-image-radial-from-pos":[{"mask-radial-from":we()}],"mask-image-radial-to-pos":[{"mask-radial-to":we()}],"mask-image-radial-from-color":[{"mask-radial-from":Q()}],"mask-image-radial-to-color":[{"mask-radial-to":Q()}],"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":T()}],"mask-image-conic-pos":[{"mask-conic":[an]}],"mask-image-conic-from-pos":[{"mask-conic-from":we()}],"mask-image-conic-to-pos":[{"mask-conic-to":we()}],"mask-image-conic-from-color":[{"mask-conic-from":Q()}],"mask-image-conic-to-color":[{"mask-conic-to":Q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ht,ct]}],filter:[{filter:["","none",ht,ct]}],blur:[{blur:je()}],brightness:[{brightness:[an,ht,ct]}],contrast:[{contrast:[an,ht,ct]}],"drop-shadow":[{"drop-shadow":["","none",_,iw,aw]}],"drop-shadow-color":[{"drop-shadow":Q()}],grayscale:[{grayscale:["",an,ht,ct]}],"hue-rotate":[{"hue-rotate":[an,ht,ct]}],invert:[{invert:["",an,ht,ct]}],saturate:[{saturate:[an,ht,ct]}],sepia:[{sepia:["",an,ht,ct]}],"backdrop-filter":[{"backdrop-filter":["","none",ht,ct]}],"backdrop-blur":[{"backdrop-blur":je()}],"backdrop-brightness":[{"backdrop-brightness":[an,ht,ct]}],"backdrop-contrast":[{"backdrop-contrast":[an,ht,ct]}],"backdrop-grayscale":[{"backdrop-grayscale":["",an,ht,ct]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[an,ht,ct]}],"backdrop-invert":[{"backdrop-invert":["",an,ht,ct]}],"backdrop-opacity":[{"backdrop-opacity":[an,ht,ct]}],"backdrop-saturate":[{"backdrop-saturate":[an,ht,ct]}],"backdrop-sepia":[{"backdrop-sepia":["",an,ht,ct]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ht,ct]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[an,"initial",ht,ct]}],ease:[{ease:["linear","initial",x,ht,ct]}],delay:[{delay:[an,ht,ct]}],animate:[{animate:["none",E,ht,ct]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,ht,ct]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[ht,ct,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:be()}],"translate-x":[{"translate-x":be()}],"translate-y":[{"translate-y":be()}],"translate-z":[{"translate-z":be()}],"translate-none":["translate-none"],accent:[{accent:Q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Q()}],"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",ht,ct]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mbs":[{"scroll-mbs":D()}],"scroll-mbe":[{"scroll-mbe":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pbs":[{"scroll-pbs":D()}],"scroll-pbe":[{"scroll-pbe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ht,ct]}],fill:[{fill:["none",...Q()]}],"stroke-w":[{stroke:[an,Sb,lp,x4]}],stroke:[{stroke:["none",...Q()]}],"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"]}},Q$=Nie(toe);function qt(...e){return Q$(yA(e))}const noe=Fc("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:ring-1 aria-invalid:ring-1 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-none [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-none","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function bl({className:e,variant:t="default",size:r="default",...i}){return k.jsx(hie,{"data-slot":"button",className:qt(noe({variant:t,size:r,className:e})),...i})}const roe={idle:{bg:"bg-gray-100",dot:"bg-gray-400",text:"text-gray-600",label:"Disconnected"},connecting:{bg:"bg-yellow-100",dot:"bg-yellow-500",text:"text-yellow-800",label:"Connecting..."},authenticated:{bg:"bg-green-100",dot:"bg-green-500",text:"text-green-800",label:"Connected"},unauthenticated:{bg:"bg-orange-100",dot:"bg-orange-500",text:"text-orange-800",label:"Login required"},error:{bg:"bg-red-100",dot:"bg-red-500",text:"text-red-800",label:"Error"}};function aoe({status:e}){const t=roe[e];return k.jsxs("span",{className:`flex items-center gap-1 rounded-full ${t.bg} px-2 py-0.5 text-xs font-semibold ${t.text}`,children:[k.jsx("span",{className:`h-2 w-2 rounded-full ${t.dot} mr-1 inline-block`}),t.label]})}const ioe=()=>{const e=Rae(),t=e?.name,r=e?.version,[,i]=sA(),{status:s,requiresAuth:l,error:c}=Rc();return k.jsx("div",{className:"flex flex-col border-b border-border bg-background",children:k.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[k.jsxs("div",{className:"flex items-center gap-4",children:[k.jsx("button",{type:"button",className:"font-semibold cursor-pointer",onClick:()=>{i(null)},children:"Skybridge"}),k.jsx("span",{className:"h-4 w-px bg-border","aria-hidden":"true"}),t&&k.jsxs("div",{className:"flex items-center gap-4 rounded-md border border-border bg-muted px-2 py-1",children:[k.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),r&&k.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",r]})]}),c&&k.jsx("span",{className:"text-xs text-red-600 max-w-48 truncate",children:c})]}),k.jsxs("div",{className:"flex items-center gap-2",children:[l&&k.jsx(aoe,{status:s}),l&&(s==="authenticated"?k.jsxs(bl,{variant:"outline",size:"sm",onClick:()=>{Cae()},children:[k.jsx(cF,{className:"h-3.5 w-3.5"}),"Sign out"]}):k.jsxs(bl,{variant:"outline",size:"sm",onClick:ox,children:[k.jsx(Pz,{className:"h-3.5 w-3.5"}),"Connect"]})),k.jsx(bl,{variant:"ghost",size:"sm",className:"h-8 gap-2",children:k.jsxs("a",{href:"https://docs.skybridge.tech/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:["Learn more about Skybridge",k.jsx(aF,{className:"h-3.5 w-3.5"})]})})]})]})})},W$=j.createContext({});function ooe(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const soe=typeof window<"u",loe=soe?j.useLayoutEffect:j.useEffect,SA=j.createContext(null);function wA(e,t){e.indexOf(t)===-1&&e.push(t)}function gE(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const Ql=(e,t,r)=>r>t?t:r<e?e:r;let EA=()=>{};const zc={},J$=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function eP(e){return typeof e=="object"&&e!==null}const tP=e=>/^0[^.\s]+$/u.test(e);function nP(e){let t;return()=>(t===void 0&&(t=e()),t)}const ys=e=>e,uoe=(e,t)=>r=>t(e(r)),K1=(...e)=>e.reduce(uoe),d1=(e,t,r)=>{const i=t-e;return i===0?1:(r-e)/i};class xA{constructor(){this.subscriptions=[]}add(t){return wA(this.subscriptions,t),()=>gE(this.subscriptions,t)}notify(t,r,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,r,i);else for(let l=0;l<s;l++){const c=this.subscriptions[l];c&&c(t,r,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Sl=e=>e*1e3,ms=e=>e/1e3;function rP(e,t){return t?e*(1e3/t):0}const aP=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,coe=1e-7,foe=12;function doe(e,t,r,i,s){let l,c,f=0;do c=t+(r-t)/2,l=aP(c,i,s)-e,l>0?r=c:t=c;while(Math.abs(l)>coe&&++f<foe);return c}function Y1(e,t,r,i){if(e===t&&r===i)return ys;const s=l=>doe(l,0,1,e,r);return l=>l===0||l===1?l:aP(s(l),t,i)}const iP=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,oP=e=>t=>1-e(1-t),sP=Y1(.33,1.53,.69,.99),_A=oP(sP),lP=iP(_A),uP=e=>(e*=2)<1?.5*_A(e):.5*(2-Math.pow(2,-10*(e-1))),TA=e=>1-Math.sin(Math.acos(e)),cP=oP(TA),fP=iP(TA),hoe=Y1(.42,0,1,1),poe=Y1(0,0,.58,1),dP=Y1(.42,0,.58,1),moe=e=>Array.isArray(e)&&typeof e[0]!="number",hP=e=>Array.isArray(e)&&typeof e[0]=="number",goe={linear:ys,easeIn:hoe,easeInOut:dP,easeOut:poe,circIn:TA,circInOut:fP,circOut:cP,backIn:_A,backInOut:lP,backOut:sP,anticipate:uP},yoe=e=>typeof e=="string",C4=e=>{if(hP(e)){EA(e.length===4);const[t,r,i,s]=e;return Y1(t,r,i,s)}else if(yoe(e))return goe[e];return e},ow=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function voe(e,t){let r=new Set,i=new Set,s=!1,l=!1;const c=new WeakSet;let f={delta:0,timestamp:0,isProcessing:!1};function d(m){c.has(m)&&(h.schedule(m),e()),m(f)}const h={schedule:(m,g=!1,v=!1)=>{const b=v&&s?r:i;return g&&c.add(m),b.has(m)||b.add(m),m},cancel:m=>{i.delete(m),c.delete(m)},process:m=>{if(f=m,s){l=!0;return}s=!0,[r,i]=[i,r],r.forEach(d),r.clear(),s=!1,l&&(l=!1,h.process(m))}};return h}const boe=40;function pP(e,t){let r=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},l=()=>r=!0,c=ow.reduce((R,T)=>(R[T]=voe(l),R),{}),{setup:f,read:d,resolveKeyframes:h,preUpdate:m,update:g,preRender:v,render:_,postRender:b}=c,S=()=>{const R=zc.useManualTiming?s.timestamp:performance.now();r=!1,zc.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(R-s.timestamp,boe),1)),s.timestamp=R,s.isProcessing=!0,f.process(s),d.process(s),h.process(s),m.process(s),g.process(s),v.process(s),_.process(s),b.process(s),s.isProcessing=!1,r&&t&&(i=!1,e(S))},w=()=>{r=!0,i=!0,s.isProcessing||e(S)};return{schedule:ow.reduce((R,T)=>{const C=c[T];return R[T]=(O,M=!1,D=!1)=>(r||w(),C.schedule(O,M,D)),R},{}),cancel:R=>{for(let T=0;T<ow.length;T++)c[ow[T]].cancel(R)},state:s,steps:c}}const{schedule:cr,cancel:Af,state:pi,steps:L2}=pP(typeof requestAnimationFrame<"u"?requestAnimationFrame:ys,!0);let Dw;function Soe(){Dw=void 0}const ao={now:()=>(Dw===void 0&&ao.set(pi.isProcessing||zc.useManualTiming?pi.timestamp:performance.now()),Dw),set:e=>{Dw=e,queueMicrotask(Soe)}},mP=e=>t=>typeof t=="string"&&t.startsWith(e),gP=mP("--"),woe=mP("var(--"),CA=e=>woe(e)?Eoe.test(e.split("/*")[0].trim()):!1,Eoe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function O4(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const kg={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},h1={...kg,transform:e=>Ql(0,1,e)},sw={...kg,default:1},Bb=e=>Math.round(e*1e5)/1e5,OA=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xoe(e){return e==null}const _oe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,RA=(e,t)=>r=>!!(typeof r=="string"&&_oe.test(r)&&r.startsWith(e)||t&&!xoe(r)&&Object.prototype.hasOwnProperty.call(r,t)),yP=(e,t,r)=>i=>{if(typeof i!="string")return i;const[s,l,c,f]=i.match(OA);return{[e]:parseFloat(s),[t]:parseFloat(l),[r]:parseFloat(c),alpha:f!==void 0?parseFloat(f):1}},Toe=e=>Ql(0,255,e),U2={...kg,transform:e=>Math.round(Toe(e))},yp={test:RA("rgb","red"),parse:yP("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:i=1})=>"rgba("+U2.transform(e)+", "+U2.transform(t)+", "+U2.transform(r)+", "+Bb(h1.transform(i))+")"};function Coe(e){let t="",r="",i="",s="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,r+=r,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const GC={test:RA("#"),parse:Coe,transform:yp.transform},Z1=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),af=Z1("deg"),Yl=Z1("%"),ft=Z1("px"),Ooe=Z1("vh"),Roe=Z1("vw"),R4={...Yl,parse:e=>Yl.parse(e)/100,transform:e=>Yl.transform(e*100)},Pm={test:RA("hsl","hue"),parse:yP("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:i=1})=>"hsla("+Math.round(e)+", "+Yl.transform(Bb(t))+", "+Yl.transform(Bb(r))+", "+Bb(h1.transform(i))+")"},sa={test:e=>yp.test(e)||GC.test(e)||Pm.test(e),parse:e=>yp.test(e)?yp.parse(e):Pm.test(e)?Pm.parse(e):GC.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?yp.transform(e):Pm.transform(e),getAnimatableNone:e=>{const t=sa.parse(e);return t.alpha=0,sa.transform(t)}},Aoe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Moe(e){return isNaN(e)&&typeof e=="string"&&(e.match(OA)?.length||0)+(e.match(Aoe)?.length||0)>0}const vP="number",bP="color",joe="var",koe="var(",A4="${}",Doe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function p1(e){const t=e.toString(),r=[],i={color:[],number:[],var:[]},s=[];let l=0;const f=t.replace(Doe,d=>(sa.test(d)?(i.color.push(l),s.push(bP),r.push(sa.parse(d))):d.startsWith(koe)?(i.var.push(l),s.push(joe),r.push(d)):(i.number.push(l),s.push(vP),r.push(parseFloat(d))),++l,A4)).split(A4);return{values:r,split:f,indexes:i,types:s}}function SP(e){return p1(e).values}function wP(e){const{split:t,types:r}=p1(e),i=t.length;return s=>{let l="";for(let c=0;c<i;c++)if(l+=t[c],s[c]!==void 0){const f=r[c];f===vP?l+=Bb(s[c]):f===bP?l+=sa.transform(s[c]):l+=s[c]}return l}}const Noe=e=>typeof e=="number"?0:sa.test(e)?sa.getAnimatableNone(e):e;function zoe(e){const t=SP(e);return wP(e)(t.map(Noe))}const wl={test:Moe,parse:SP,createTransformer:wP,getAnimatableNone:zoe};function q2(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function $oe({hue:e,saturation:t,lightness:r,alpha:i}){e/=360,t/=100,r/=100;let s=0,l=0,c=0;if(!t)s=l=c=r;else{const f=r<.5?r*(1+t):r+t-r*t,d=2*r-f;s=q2(d,f,e+1/3),l=q2(d,f,e),c=q2(d,f,e-1/3)}return{red:Math.round(s*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:i}}function yE(e,t){return r=>r>0?t:e}const $r=(e,t,r)=>e+(t-e)*r,V2=(e,t,r)=>{const i=e*e,s=r*(t*t-i)+i;return s<0?0:Math.sqrt(s)},Poe=[GC,yp,Pm],Ioe=e=>Poe.find(t=>t.test(e));function M4(e){const t=Ioe(e);if(!t)return!1;let r=t.parse(e);return t===Pm&&(r=$oe(r)),r}const j4=(e,t)=>{const r=M4(e),i=M4(t);if(!r||!i)return yE(e,t);const s={...r};return l=>(s.red=V2(r.red,i.red,l),s.green=V2(r.green,i.green,l),s.blue=V2(r.blue,i.blue,l),s.alpha=$r(r.alpha,i.alpha,l),yp.transform(s))},KC=new Set(["none","hidden"]);function Loe(e,t){return KC.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Uoe(e,t){return r=>$r(e,t,r)}function AA(e){return typeof e=="number"?Uoe:typeof e=="string"?CA(e)?yE:sa.test(e)?j4:Foe:Array.isArray(e)?EP:typeof e=="object"?sa.test(e)?j4:qoe:yE}function EP(e,t){const r=[...e],i=r.length,s=e.map((l,c)=>AA(l)(l,t[c]));return l=>{for(let c=0;c<i;c++)r[c]=s[c](l);return r}}function qoe(e,t){const r={...e,...t},i={};for(const s in r)e[s]!==void 0&&t[s]!==void 0&&(i[s]=AA(e[s])(e[s],t[s]));return s=>{for(const l in i)r[l]=i[l](s);return r}}function Voe(e,t){const r=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const l=t.types[s],c=e.indexes[l][i[l]],f=e.values[c]??0;r[s]=f,i[l]++}return r}const Foe=(e,t)=>{const r=wl.createTransformer(t),i=p1(e),s=p1(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?KC.has(e)&&!s.values.length||KC.has(t)&&!i.values.length?Loe(e,t):K1(EP(Voe(i,s),s.values),r):yE(e,t)};function xP(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?$r(e,t,r):AA(e)(e,t)}const Boe=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>cr.update(t,r),stop:()=>Af(t),now:()=>pi.isProcessing?pi.timestamp:ao.now()}},_P=(e,t,r=10)=>{let i="";const s=Math.max(Math.round(t/r),2);for(let l=0;l<s;l++)i+=Math.round(e(l/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},vE=2e4;function MA(e){let t=0;const r=50;let i=e.next(t);for(;!i.done&&t<vE;)t+=r,i=e.next(t);return t>=vE?1/0:t}function Hoe(e,t=100,r){const i=r({...e,keyframes:[0,t]}),s=Math.min(MA(i),vE);return{type:"keyframes",ease:l=>i.next(s*l).value/t,duration:ms(s)}}const Goe=5;function TP(e,t,r){const i=Math.max(t-Goe,0);return rP(r-e(i),t-i)}const Yr={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},F2=.001;function Koe({duration:e=Yr.duration,bounce:t=Yr.bounce,velocity:r=Yr.velocity,mass:i=Yr.mass}){let s,l,c=1-t;c=Ql(Yr.minDamping,Yr.maxDamping,c),e=Ql(Yr.minDuration,Yr.maxDuration,ms(e)),c<1?(s=h=>{const m=h*c,g=m*e,v=m-r,_=YC(h,c),b=Math.exp(-g);return F2-v/_*b},l=h=>{const g=h*c*e,v=g*r+r,_=Math.pow(c,2)*Math.pow(h,2)*e,b=Math.exp(-g),S=YC(Math.pow(h,2),c);return(-s(h)+F2>0?-1:1)*((v-_)*b)/S}):(s=h=>{const m=Math.exp(-h*e),g=(h-r)*e+1;return-F2+m*g},l=h=>{const m=Math.exp(-h*e),g=(r-h)*(e*e);return m*g});const f=5/e,d=Zoe(s,l,f);if(e=Sl(e),isNaN(d))return{stiffness:Yr.stiffness,damping:Yr.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:c*2*Math.sqrt(i*h),duration:e}}}const Yoe=12;function Zoe(e,t,r){let i=r;for(let s=1;s<Yoe;s++)i=i-e(i)/t(i);return i}function YC(e,t){return e*Math.sqrt(1-t*t)}const Xoe=["duration","bounce"],Qoe=["stiffness","damping","mass"];function k4(e,t){return t.some(r=>e[r]!==void 0)}function Woe(e){let t={velocity:Yr.velocity,stiffness:Yr.stiffness,damping:Yr.damping,mass:Yr.mass,isResolvedFromDuration:!1,...e};if(!k4(e,Qoe)&&k4(e,Xoe))if(t.velocity=0,e.visualDuration){const r=e.visualDuration,i=2*Math.PI/(r*1.2),s=i*i,l=2*Ql(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Yr.mass,stiffness:s,damping:l}}else{const r=Koe({...e,velocity:0});t={...t,...r,mass:Yr.mass},t.isResolvedFromDuration=!0}return t}function bE(e=Yr.visualDuration,t=Yr.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=r;const l=r.keyframes[0],c=r.keyframes[r.keyframes.length-1],f={done:!1,value:l},{stiffness:d,damping:h,mass:m,duration:g,velocity:v,isResolvedFromDuration:_}=Woe({...r,velocity:-ms(r.velocity||0)}),b=v||0,S=h/(2*Math.sqrt(d*m)),w=c-l,x=ms(Math.sqrt(d/m)),E=Math.abs(w)<5;i||(i=E?Yr.restSpeed.granular:Yr.restSpeed.default),s||(s=E?Yr.restDelta.granular:Yr.restDelta.default);let R;if(S<1){const C=YC(x,S);R=O=>{const M=Math.exp(-S*x*O);return c-M*((b+S*x*w)/C*Math.sin(C*O)+w*Math.cos(C*O))}}else if(S===1)R=C=>c-Math.exp(-x*C)*(w+(b+x*w)*C);else{const C=x*Math.sqrt(S*S-1);R=O=>{const M=Math.exp(-S*x*O),D=Math.min(C*O,300);return c-M*((b+S*x*w)*Math.sinh(D)+C*w*Math.cosh(D))/C}}const T={calculatedDuration:_&&g||null,next:C=>{const O=R(C);if(_)f.done=C>=g;else{let M=C===0?b:0;S<1&&(M=C===0?Sl(b):TP(R,C,O));const D=Math.abs(M)<=i,U=Math.abs(c-O)<=s;f.done=D&&U}return f.value=f.done?c:O,f},toString:()=>{const C=Math.min(MA(T),vE),O=_P(M=>T.next(C*M).value,C,30);return C+"ms "+O},toTransition:()=>{}};return T}bE.applyToOptions=e=>{const t=Hoe(e,100,bE);return e.ease=t.ease,e.duration=Sl(t.duration),e.type="keyframes",e};function ZC({keyframes:e,velocity:t=0,power:r=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:l=500,modifyTarget:c,min:f,max:d,restDelta:h=.5,restSpeed:m}){const g=e[0],v={done:!1,value:g},_=D=>f!==void 0&&D<f||d!==void 0&&D>d,b=D=>f===void 0?d:d===void 0||Math.abs(f-D)<Math.abs(d-D)?f:d;let S=r*t;const w=g+S,x=c===void 0?w:c(w);x!==w&&(S=x-g);const E=D=>-S*Math.exp(-D/i),R=D=>x+E(D),T=D=>{const U=E(D),B=R(D);v.done=Math.abs(U)<=h,v.value=v.done?x:B};let C,O;const M=D=>{_(v.value)&&(C=D,O=bE({keyframes:[v.value,b(v.value)],velocity:TP(R,D,v.value),damping:s,stiffness:l,restDelta:h,restSpeed:m}))};return M(0),{calculatedDuration:null,next:D=>{let U=!1;return!O&&C===void 0&&(U=!0,T(D),M(D)),C!==void 0&&D>=C?O.next(D-C):(!U&&T(D),v)}}}function Joe(e,t,r){const i=[],s=r||zc.mix||xP,l=e.length-1;for(let c=0;c<l;c++){let f=s(e[c],e[c+1]);if(t){const d=Array.isArray(t)?t[c]||ys:t;f=K1(d,f)}i.push(f)}return i}function ese(e,t,{clamp:r=!0,ease:i,mixer:s}={}){const l=e.length;if(EA(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=Joe(t,i,s),d=f.length,h=m=>{if(c&&m<e[0])return t[0];let g=0;if(d>1)for(;g<e.length-2&&!(m<e[g+1]);g++);const v=d1(e[g],e[g+1],m);return f[g](v)};return r?m=>h(Ql(e[0],e[l-1],m)):h}function tse(e,t){const r=e[e.length-1];for(let i=1;i<=t;i++){const s=d1(0,t,i);e.push($r(r,1,s))}}function nse(e){const t=[0];return tse(t,e.length-1),t}function rse(e,t){return e.map(r=>r*t)}function ase(e,t){return e.map(()=>t||dP).splice(0,e.length-1)}function Hb({duration:e=300,keyframes:t,times:r,ease:i="easeInOut"}){const s=moe(i)?i.map(C4):C4(i),l={done:!1,value:t[0]},c=rse(r&&r.length===t.length?r:nse(t),e),f=ese(c,t,{ease:Array.isArray(s)?s:ase(t,s)});return{calculatedDuration:e,next:d=>(l.value=f(d),l.done=d>=e,l)}}const ise=e=>e!==null;function jA(e,{repeat:t,repeatType:r="loop"},i,s=1){const l=e.filter(ise),f=s<0||t&&r!=="loop"&&t%2===1?0:l.length-1;return!f||i===void 0?l[f]:i}const ose={decay:ZC,inertia:ZC,tween:Hb,keyframes:Hb,spring:bE};function CP(e){typeof e.type=="string"&&(e.type=ose[e.type])}class kA{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const sse=e=>e/100;class DA extends kA{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:r}=this.options;r&&r.updatedAt!==ao.now()&&this.tick(ao.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;CP(t);const{type:r=Hb,repeat:i=0,repeatDelay:s=0,repeatType:l,velocity:c=0}=t;let{keyframes:f}=t;const d=r||Hb;d!==Hb&&typeof f[0]!="number"&&(this.mixKeyframes=K1(sse,xP(f[0],f[1])),f=[0,100]);const h=d({...t,keyframes:f});l==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...f].reverse(),velocity:-c})),h.calculatedDuration===null&&(h.calculatedDuration=MA(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=h}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:i,totalDuration:s,mixKeyframes:l,mirroredGenerator:c,resolvedDuration:f,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:m,repeat:g,repeatType:v,repeatDelay:_,type:b,onUpdate:S,finalKeyframe:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const x=this.currentTime-h*(this.playbackSpeed>=0?1:-1),E=this.playbackSpeed>=0?x<0:x>s;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let R=this.currentTime,T=i;if(g){const D=Math.min(this.currentTime,s)/f;let U=Math.floor(D),B=D%1;!B&&D>=1&&(B=1),B===1&&U--,U=Math.min(U,g+1),U%2&&(v==="reverse"?(B=1-B,_&&(B-=_/f)):v==="mirror"&&(T=c)),R=Ql(0,1,B)*f}const C=E?{done:!1,value:m[0]}:T.next(R);l&&(C.value=l(C.value));let{done:O}=C;!E&&d!==null&&(O=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return M&&b!==ZC&&(C.value=jA(m,this.options,w,this.speed)),S&&S(C.value),M&&this.finish(),C}then(t,r){return this.finished.then(t,r)}get duration(){return ms(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ms(t)}get time(){return ms(this.currentTime)}set time(t){t=Sl(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ao.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=ms(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Boe,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=r??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ao.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function lse(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const vp=e=>e*180/Math.PI,XC=e=>{const t=vp(Math.atan2(e[1],e[0]));return QC(t)},use={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:XC,rotateZ:XC,skewX:e=>vp(Math.atan(e[1])),skewY:e=>vp(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},QC=e=>(e=e%360,e<0&&(e+=360),e),D4=XC,N4=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),z4=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),cse={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:N4,scaleY:z4,scale:e=>(N4(e)+z4(e))/2,rotateX:e=>QC(vp(Math.atan2(e[6],e[5]))),rotateY:e=>QC(vp(Math.atan2(-e[2],e[0]))),rotateZ:D4,rotate:D4,skewX:e=>vp(Math.atan(e[4])),skewY:e=>vp(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function WC(e){return e.includes("scale")?1:0}function JC(e,t){if(!e||e==="none")return WC(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(r)i=cse,s=r;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=use,s=f}if(!s)return WC(t);const l=i[t],c=s[1].split(",").map(dse);return typeof l=="function"?l(c):c[l]}const fse=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return JC(r,t)};function dse(e){return parseFloat(e.trim())}const Dg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ng=new Set(Dg),$4=e=>e===kg||e===ft,hse=new Set(["x","y","z"]),pse=Dg.filter(e=>!hse.has(e));function mse(e){const t=[];return pse.forEach(r=>{const i=e.getValue(r);i!==void 0&&(t.push([r,i.get()]),i.set(r.startsWith("scale")?1:0))}),t}const ff={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>JC(t,"x"),y:(e,{transform:t})=>JC(t,"y")};ff.translateX=ff.x;ff.translateY=ff.y;const Ep=new Set;let eO=!1,tO=!1,nO=!1;function OP(){if(tO){const e=Array.from(Ep).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),r=new Map;t.forEach(i=>{const s=mse(i);s.length&&(r.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=r.get(i);s&&s.forEach(([l,c])=>{i.getValue(l)?.set(c)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}tO=!1,eO=!1,Ep.forEach(e=>e.complete(nO)),Ep.clear()}function RP(){Ep.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(tO=!0)})}function gse(){nO=!0,RP(),OP(),nO=!1}class NA{constructor(t,r,i,s,l,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=i,this.motionValue=s,this.element=l,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(Ep.add(this),eO||(eO=!0,cr.read(RP),cr.resolveKeyframes(OP))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:i,motionValue:s}=this;if(t[0]===null){const l=s?.get(),c=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&r){const f=i.readValue(r,c);f!=null&&(t[0]=f)}t[0]===void 0&&(t[0]=c),s&&l===void 0&&s.set(t[0])}lse(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ep.delete(this)}cancel(){this.state==="scheduled"&&(Ep.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const yse=e=>e.startsWith("--");function vse(e,t,r){yse(t)?e.style.setProperty(t,r):e.style[t]=r}const bse={};function AP(e,t){const r=nP(e);return()=>bse[t]??r()}const Sse=AP(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),MP=AP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Db=([e,t,r,i])=>`cubic-bezier(${e}, ${t}, ${r}, ${i})`,P4={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Db([0,.65,.55,1]),circOut:Db([.55,0,1,.45]),backIn:Db([.31,.01,.66,-.59]),backOut:Db([.33,1.53,.69,.99])};function jP(e,t){if(e)return typeof e=="function"?MP()?_P(e,t):"ease-out":hP(e)?Db(e):Array.isArray(e)?e.map(r=>jP(r,t)||P4.easeOut):P4[e]}function wse(e,t,r,{delay:i=0,duration:s=300,repeat:l=0,repeatType:c="loop",ease:f="easeOut",times:d}={},h=void 0){const m={[t]:r};d&&(m.offset=d);const g=jP(f,s);Array.isArray(g)&&(m.easing=g);const v={delay:i,duration:s,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:l+1,direction:c==="reverse"?"alternate":"normal"};return h&&(v.pseudoElement=h),e.animate(m,v)}function kP(e){return typeof e=="function"&&"applyToOptions"in e}function Ese({type:e,...t}){return kP(e)&&MP()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class DP extends kA{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:r,name:i,keyframes:s,pseudoElement:l,allowFlatten:c=!1,finalKeyframe:f,onComplete:d}=t;this.isPseudoElement=!!l,this.allowFlatten=c,this.options=t,EA(typeof t.type!="string");const h=Ese(t);this.animation=wse(r,i,s,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const m=jA(s,this.options,f,this.speed);this.updateMotionValue&&this.updateMotionValue(m),vse(r,i,m),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ms(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ms(t)}get time(){return ms(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Sl(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:r,rangeEnd:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Sse()?(this.animation.timeline=t,r&&(this.animation.rangeStart=r),i&&(this.animation.rangeEnd=i),ys):s(this)}}const NP={anticipate:uP,backInOut:lP,circInOut:fP};function xse(e){return e in NP}function _se(e){typeof e.ease=="string"&&xse(e.ease)&&(e.ease=NP[e.ease])}const B2=10;class Tse extends DP{constructor(t){_se(t),CP(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:i,onComplete:s,element:l,...c}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const f=new DA({...c,autoplay:!1}),d=Math.max(B2,ao.now()-this.startTime),h=Ql(0,B2,d-B2);r.setWithVelocity(f.sample(Math.max(0,d-h)).value,f.sample(d).value,h),f.stop()}}const I4=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(wl.test(e)||e==="0")&&!e.startsWith("url("));function Cse(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Ose(e,t,r,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],c=I4(s,t),f=I4(l,t);return!c||!f?!1:Cse(e)||(r==="spring"||kP(r))&&i}function rO(e){e.duration=0,e.type="keyframes"}const Rse=new Set(["opacity","clipPath","filter","transform"]),Ase=nP(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Mse(e){const{motionValue:t,name:r,repeatDelay:i,repeatType:s,damping:l,type:c}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return Ase()&&r&&Rse.has(r)&&(r!=="transform"||!h)&&!d&&!i&&s!=="mirror"&&l!==0&&c!=="inertia"}const jse=40;class kse extends kA{constructor({autoplay:t=!0,delay:r=0,type:i="keyframes",repeat:s=0,repeatDelay:l=0,repeatType:c="loop",keyframes:f,name:d,motionValue:h,element:m,...g}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ao.now();const v={autoplay:t,delay:r,type:i,repeat:s,repeatDelay:l,repeatType:c,name:d,motionValue:h,element:m,...g},_=m?.KeyframeResolver||NA;this.keyframeResolver=new _(f,(b,S,w)=>this.onKeyframesResolved(b,S,v,!w),d,h,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,i,s){this.keyframeResolver=void 0;const{name:l,type:c,velocity:f,delay:d,isHandoff:h,onUpdate:m}=i;this.resolvedAt=ao.now(),Ose(t,l,c,f)||((zc.instantAnimations||!d)&&m?.(jA(t,i,r)),t[0]=t[t.length-1],rO(i),i.repeat=0);const v={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>jse?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...i,keyframes:t},_=!h&&Mse(v),b=v.motionValue?.owner?.current,S=_?new Tse({...v,element:b}):new DA(v);S.finished.then(()=>{this.notifyFinished()}).catch(ys),this.pendingTimeline&&(this.stopTimeline=S.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=S}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),gse()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function zP(e,t,r,i=0,s=1){const l=Array.from(e).sort((h,m)=>h.sortNodePosition(m)).indexOf(t),c=e.size,f=(c-1)*i;return typeof r=="function"?r(l,c):s===1?l*i:f-l*i}const Dse=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Nse(e){const t=Dse.exec(e);if(!t)return[,];const[,r,i,s]=t;return[`--${r??i}`,s]}function $P(e,t,r=1){const[i,s]=Nse(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const c=l.trim();return J$(c)?parseFloat(c):c}return CA(s)?$P(s,t,r+1):s}const zse={type:"spring",stiffness:500,damping:25,restSpeed:10},$se=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Pse={type:"keyframes",duration:.8},Ise={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Lse=(e,{keyframes:t})=>t.length>2?Pse:Ng.has(e)?e.startsWith("scale")?$se(t[1]):zse:Ise,Use=e=>e!==null;function qse(e,{repeat:t,repeatType:r="loop"},i){const s=e.filter(Use),l=t&&r!=="loop"&&t%2===1?0:s.length-1;return s[l]}function PP(e,t){if(e?.inherit&&t){const{inherit:r,...i}=e;return{...t,...i}}return e}function zA(e,t){const r=e?.[t]??e?.default??e;return r!==e?PP(r,e):r}function Vse({when:e,delay:t,delayChildren:r,staggerChildren:i,staggerDirection:s,repeat:l,repeatType:c,repeatDelay:f,from:d,elapsed:h,...m}){return!!Object.keys(m).length}const $A=(e,t,r,i={},s,l)=>c=>{const f=zA(i,e)||{},d=f.delay||i.delay||0;let{elapsed:h=0}=i;h=h-Sl(d);const m={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-h,onUpdate:v=>{t.set(v),f.onUpdate&&f.onUpdate(v)},onComplete:()=>{c(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:l?void 0:s};Vse(f)||Object.assign(m,Lse(e,m)),m.duration&&(m.duration=Sl(m.duration)),m.repeatDelay&&(m.repeatDelay=Sl(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let g=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(rO(m),m.delay===0&&(g=!0)),(zc.instantAnimations||zc.skipAnimations||s?.shouldSkipAnimations)&&(g=!0,rO(m),m.delay=0),m.allowFlatten=!f.type&&!f.ease,g&&!l&&t.get()!==void 0){const v=qse(m.keyframes,f);if(v!==void 0){cr.update(()=>{m.onUpdate(v),m.onComplete()});return}}return f.isSync?new DA(m):new kse(m)};function L4(e){const t=[{},{}];return e?.values.forEach((r,i)=>{t[0][i]=r.get(),t[1][i]=r.getVelocity()}),t}function PA(e,t,r,i){if(typeof t=="function"){const[s,l]=L4(i);t=t(r!==void 0?r:e.custom,s,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,l]=L4(i);t=t(r!==void 0?r:e.custom,s,l)}return t}function Zm(e,t,r){const i=e.getProps();return PA(i,t,r!==void 0?r:i.custom,e)}const IP=new Set(["width","height","top","left","right","bottom",...Dg]),U4=30,Fse=e=>!isNaN(parseFloat(e));class Bse{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=ao.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=ao.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Fse(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new xA);const i=this.events[t].add(r);return t==="change"?()=>{i(),cr.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,i){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ao.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>U4)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,U4);return rP(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function dg(e,t){return new Bse(e,t)}const aO=e=>Array.isArray(e);function Hse(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,dg(r))}function Gse(e){return aO(e)?e[e.length-1]||0:e}function Kse(e,t){const r=Zm(e,t);let{transitionEnd:i={},transition:s={},...l}=r||{};l={...l,...i};for(const c in l){const f=Gse(l[c]);Hse(e,c,f)}}const ji=e=>!!(e&&e.getVelocity);function Yse(e){return!!(ji(e)&&e.add)}function iO(e,t){const r=e.getValue("willChange");if(Yse(r))return r.add(t);if(!r&&zc.WillChange){const i=new zc.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function IA(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Zse="framerAppearId",LP="data-"+IA(Zse);function UP(e){return e.props[LP]}function Xse({protectedKeys:e,needsAnimating:t},r){const i=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,i}function qP(e,t,{delay:r=0,transitionOverride:i,type:s}={}){let{transition:l,transitionEnd:c,...f}=t;const d=e.getDefaultTransition();l=l?PP(l,d):d;const h=l?.reduceMotion;i&&(l=i);const m=[],g=s&&e.animationState&&e.animationState.getState()[s];for(const v in f){const _=e.getValue(v,e.latestValues[v]??null),b=f[v];if(b===void 0||g&&Xse(g,v))continue;const S={delay:r,...zA(l||{},v)},w=_.get();if(w!==void 0&&!_.isAnimating&&!Array.isArray(b)&&b===w&&!S.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const T=UP(e);if(T){const C=window.MotionHandoffAnimation(T,v,cr);C!==null&&(S.startTime=C,x=!0)}}iO(e,v);const E=h??e.shouldReduceMotion;_.start($A(v,_,b,E&&IP.has(v)?{type:!1}:S,e,x));const R=_.animation;R&&m.push(R)}if(c){const v=()=>cr.update(()=>{c&&Kse(e,c)});m.length?Promise.all(m).then(v):v()}return m}function oO(e,t,r={}){const i=Zm(e,t,r.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const l=i?()=>Promise.all(qP(e,i,r)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:g}=s;return Qse(e,t,d,h,m,g,r)}:()=>Promise.resolve(),{when:f}=s;if(f){const[d,h]=f==="beforeChildren"?[l,c]:[c,l];return d().then(()=>h())}else return Promise.all([l(),c(r.delay)])}function Qse(e,t,r=0,i=0,s=0,l=1,c){const f=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),f.push(oO(d,t,{...c,delay:r+(typeof i=="function"?0:i)+zP(e.variantChildren,d,i,s,l)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(f)}function Wse(e,t,r={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(l=>oO(e,l,r));i=Promise.all(s)}else if(typeof t=="string")i=oO(e,t,r);else{const s=typeof t=="function"?Zm(e,t,r.custom):t;i=Promise.all(qP(e,s,r))}return i.then(()=>{e.notify("AnimationComplete",t)})}const Jse={test:e=>e==="auto",parse:e=>e},VP=e=>t=>t.test(e),FP=[kg,ft,Yl,af,Roe,Ooe,Jse],q4=e=>FP.find(VP(e));function ele(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||tP(e):!0}const tle=new Set(["brightness","contrast","saturate","opacity"]);function nle(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=r.match(OA)||[];if(!i)return e;const s=r.replace(i,"");let l=tle.has(t)?1:0;return i!==r&&(l*=100),t+"("+l+s+")"}const rle=/\b([a-z-]*)\(.*?\)/gu,sO={...wl,getAnimatableNone:e=>{const t=e.match(rle);return t?t.map(nle).join(" "):e}},lO={...wl,getAnimatableNone:e=>{const t=wl.parse(e);return wl.createTransformer(e)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},V4={...kg,transform:Math.round},ale={rotate:af,rotateX:af,rotateY:af,rotateZ:af,scale:sw,scaleX:sw,scaleY:sw,scaleZ:sw,skew:af,skewX:af,skewY:af,distance:ft,translateX:ft,translateY:ft,translateZ:ft,x:ft,y:ft,z:ft,perspective:ft,transformPerspective:ft,opacity:h1,originX:R4,originY:R4,originZ:ft},LA={borderWidth:ft,borderTopWidth:ft,borderRightWidth:ft,borderBottomWidth:ft,borderLeftWidth:ft,borderRadius:ft,borderTopLeftRadius:ft,borderTopRightRadius:ft,borderBottomRightRadius:ft,borderBottomLeftRadius:ft,width:ft,maxWidth:ft,height:ft,maxHeight:ft,top:ft,right:ft,bottom:ft,left:ft,inset:ft,insetBlock:ft,insetBlockStart:ft,insetBlockEnd:ft,insetInline:ft,insetInlineStart:ft,insetInlineEnd:ft,padding:ft,paddingTop:ft,paddingRight:ft,paddingBottom:ft,paddingLeft:ft,paddingBlock:ft,paddingBlockStart:ft,paddingBlockEnd:ft,paddingInline:ft,paddingInlineStart:ft,paddingInlineEnd:ft,margin:ft,marginTop:ft,marginRight:ft,marginBottom:ft,marginLeft:ft,marginBlock:ft,marginBlockStart:ft,marginBlockEnd:ft,marginInline:ft,marginInlineStart:ft,marginInlineEnd:ft,fontSize:ft,backgroundPositionX:ft,backgroundPositionY:ft,...ale,zIndex:V4,fillOpacity:h1,strokeOpacity:h1,numOctaves:V4},ile={...LA,color:sa,backgroundColor:sa,outlineColor:sa,fill:sa,stroke:sa,borderColor:sa,borderTopColor:sa,borderRightColor:sa,borderBottomColor:sa,borderLeftColor:sa,filter:sO,WebkitFilter:sO,mask:lO,WebkitMask:lO},BP=e=>ile[e],ole=new Set([sO,lO]);function HP(e,t){let r=BP(e);return ole.has(r)||(r=wl),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const sle=new Set(["auto","none","0"]);function lle(e,t,r){let i=0,s;for(;i<e.length&&!s;){const l=e[i];typeof l=="string"&&!sle.has(l)&&p1(l).values.length&&(s=e[i]),i++}if(s&&r)for(const l of t)e[l]=HP(r,s)}class ule extends NA{constructor(t,r,i,s,l){super(t,r,i,s,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:i}=this;if(!r||!r.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let g=t[m];if(typeof g=="string"&&(g=g.trim(),CA(g))){const v=$P(g,r.current);v!==void 0&&(t[m]=v),m===t.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!IP.has(i)||t.length!==2)return;const[s,l]=t,c=q4(s),f=q4(l),d=O4(s),h=O4(l);if(d!==h&&ff[i]){this.needsMeasurement=!0;return}if(c!==f)if($4(c)&&$4(f))for(let m=0;m<t.length;m++){const g=t[m];typeof g=="string"&&(t[m]=parseFloat(g))}else ff[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||ele(t[s]))&&i.push(s);i.length&&lle(t,i,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ff[i](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const s=r[r.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){const{element:t,name:r,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(r);s&&s.jump(this.measuredOrigin,!1);const l=i.length-1,c=i[l];i[l]=ff[r](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),this.removedTransforms?.length&&this.removedTransforms.forEach(([f,d])=>{t.getValue(f).set(d)}),this.resolveNoneKeyframes()}}const cle=new Set(["opacity","clipPath","filter","transform"]);function GP(e,t,r){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=r?.[e]??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}const KP=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function fle(e){return eP(e)&&"offsetHeight"in e}const{schedule:UA}=pP(queueMicrotask,!1),ml={x:!1,y:!1};function YP(){return ml.x||ml.y}function dle(e){return e==="x"||e==="y"?ml[e]?null:(ml[e]=!0,()=>{ml[e]=!1}):ml.x||ml.y?null:(ml.x=ml.y=!0,()=>{ml.x=ml.y=!1})}function ZP(e,t){const r=GP(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[r,s,()=>i.abort()]}function hle(e){return!(e.pointerType==="touch"||YP())}function ple(e,t,r={}){const[i,s,l]=ZP(e,r);return i.forEach(c=>{let f=!1,d=!1,h;const m=()=>{c.removeEventListener("pointerleave",b)},g=w=>{h&&(h(w),h=void 0),m()},v=w=>{f=!1,window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v),d&&(d=!1,g(w))},_=()=>{f=!0,window.addEventListener("pointerup",v,s),window.addEventListener("pointercancel",v,s)},b=w=>{if(w.pointerType!=="touch"){if(f){d=!0;return}g(w)}},S=w=>{if(!hle(w))return;d=!1;const x=t(c,w);typeof x=="function"&&(h=x,c.addEventListener("pointerleave",b,s))};c.addEventListener("pointerenter",S,s),c.addEventListener("pointerdown",_,s)}),l}const XP=(e,t)=>t?e===t?!0:XP(e,t.parentElement):!1,qA=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,mle=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function gle(e){return mle.has(e.tagName)||e.isContentEditable===!0}const yle=new Set(["INPUT","SELECT","TEXTAREA"]);function vle(e){return yle.has(e.tagName)||e.isContentEditable===!0}const Nw=new WeakSet;function F4(e){return t=>{t.key==="Enter"&&e(t)}}function H2(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const ble=(e,t)=>{const r=e.currentTarget;if(!r)return;const i=F4(()=>{if(Nw.has(r))return;H2(r,"down");const s=F4(()=>{H2(r,"up")}),l=()=>H2(r,"cancel");r.addEventListener("keyup",s,t),r.addEventListener("blur",l,t)});r.addEventListener("keydown",i,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",i),t)};function B4(e){return qA(e)&&!YP()}const H4=new WeakSet;function Sle(e,t,r={}){const[i,s,l]=ZP(e,r),c=f=>{const d=f.currentTarget;if(!B4(f)||H4.has(f))return;Nw.add(d),r.stopPropagation&&H4.add(f);const h=t(d,f),m=(_,b)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",v),Nw.has(d)&&Nw.delete(d),B4(_)&&typeof h=="function"&&h(_,{success:b})},g=_=>{m(_,d===window||d===document||r.useGlobalTarget||XP(d,_.target))},v=_=>{m(_,!1)};window.addEventListener("pointerup",g,s),window.addEventListener("pointercancel",v,s)};return i.forEach(f=>{(r.useGlobalTarget?window:f).addEventListener("pointerdown",c,s),fle(f)&&(f.addEventListener("focus",h=>ble(h,s)),!gle(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),l}function VA(e){return eP(e)&&"ownerSVGElement"in e}const zw=new WeakMap;let $w;const QP=(e,t,r)=>(i,s)=>s&&s[0]?s[0][e+"Size"]:VA(i)&&"getBBox"in i?i.getBBox()[t]:i[r],wle=QP("inline","width","offsetWidth"),Ele=QP("block","height","offsetHeight");function xle({target:e,borderBoxSize:t}){zw.get(e)?.forEach(r=>{r(e,{get width(){return wle(e,t)},get height(){return Ele(e,t)}})})}function _le(e){e.forEach(xle)}function Tle(){typeof ResizeObserver>"u"||($w=new ResizeObserver(_le))}function Cle(e,t){$w||Tle();const r=GP(e);return r.forEach(i=>{let s=zw.get(i);s||(s=new Set,zw.set(i,s)),s.add(t),$w?.observe(i)}),()=>{r.forEach(i=>{const s=zw.get(i);s?.delete(t),s?.size||$w?.unobserve(i)})}}const Pw=new Set;let Im;function Ole(){Im=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Pw.forEach(t=>t(e))},window.addEventListener("resize",Im)}function Rle(e){return Pw.add(e),Im||Ole(),()=>{Pw.delete(e),!Pw.size&&typeof Im=="function"&&(window.removeEventListener("resize",Im),Im=void 0)}}function G4(e,t){return typeof e=="function"?Rle(e):Cle(e,t)}function Ale(e){return VA(e)&&e.tagName==="svg"}const Mle=[...FP,sa,wl],jle=e=>Mle.find(VP(e)),K4=()=>({translate:0,scale:1,origin:0,originPoint:0}),Lm=()=>({x:K4(),y:K4()}),Y4=()=>({min:0,max:0}),Ma=()=>({x:Y4(),y:Y4()}),kle=new WeakMap;function fx(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function m1(e){return typeof e=="string"||Array.isArray(e)}const FA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],BA=["initial",...FA];function dx(e){return fx(e.animate)||BA.some(t=>m1(e[t]))}function WP(e){return!!(dx(e)||e.variants)}function Dle(e,t,r){for(const i in t){const s=t[i],l=r[i];if(ji(s))e.addValue(i,s);else if(ji(l))e.addValue(i,dg(s,{owner:e}));else if(l!==s)if(e.hasValue(i)){const c=e.getValue(i);c.liveStyle===!0?c.jump(s):c.hasAnimated||c.set(s)}else{const c=e.getStaticValue(i);e.addValue(i,dg(c!==void 0?c:s,{owner:e}))}}for(const i in r)t[i]===void 0&&e.removeValue(i);return t}const uO={current:null},JP={current:!1},Nle=typeof window<"u";function zle(){if(JP.current=!0,!!Nle)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>uO.current=e.matches;e.addEventListener("change",t),t()}else uO.current=!1}const Z4=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let SE={};function e8(e){SE=e}function $le(){return SE}class Ple{scrapeMotionValuesFromProps(t,r,i){return{}}constructor({parent:t,props:r,presenceContext:i,reducedMotionConfig:s,skipAnimations:l,blockInitialAnimation:c,visualState:f},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=NA,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const _=ao.now();this.renderScheduledAt<_&&(this.renderScheduledAt=_,cr.render(this.render,!1,!0))};const{latestValues:h,renderState:m}=f;this.latestValues=h,this.baseTarget={...h},this.initialValues=r.initial?{...h}:{},this.renderState=m,this.parent=t,this.props=r,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=l,this.options=d,this.blockInitialAnimation=!!c,this.isControllingVariants=dx(r),this.isVariantNode=WP(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...v}=this.scrapeMotionValuesFromProps(r,{},this);for(const _ in v){const b=v[_];h[_]!==void 0&&ji(b)&&b.set(h[_])}}mount(t){if(this.hasBeenMounted)for(const r in this.initialValues)this.values.get(r)?.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=t,kle.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(JP.current||zle(),this.shouldReduceMotion=uO.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Af(this.notifyUpdate),Af(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),r.accelerate&&cle.has(t)&&this.current instanceof HTMLElement){const{factory:c,keyframes:f,times:d,ease:h,duration:m}=r.accelerate,g=new DP({element:this.current,name:t,keyframes:f,times:d,ease:h,duration:Sl(m)}),v=c(g);this.valueSubscriptions.set(t,()=>{v(),g.cancel()});return}const i=Ng.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=r.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&cr.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{s(),l&&l(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in SE){const r=SE[t];if(!r)continue;const{isEnabled:i,Feature:s}=r;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ma()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let i=0;i<Z4.length;i++){const s=Z4[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const l="on"+s,c=t[l];c&&(this.propEventSubscriptions[s]=this.on(s,c))}this.prevMotionValues=Dle(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const i=this.values.get(t);r!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&r!==void 0&&(i=dg(r===null?void 0:r,{owner:this}),this.addValue(t,i)),i}readValue(t,r){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(J$(i)||tP(i))?i=parseFloat(i):!jle(i)&&wl.test(r)&&(i=HP(t,r)),this.setBaseTarget(t,ji(i)?i.get():i)),ji(i)?i.get():i}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const l=PA(this.props,r,this.presenceContext?.custom);l&&(i=l[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ji(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new xA),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){UA.render(this.render)}}class t8 extends Ple{constructor(){super(...arguments),this.KeyframeResolver=ule}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){const i=t.style;return i?i[r]:void 0}removeValueFromRenderState(t,{vars:r,style:i}){delete r[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ji(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}class Ff{constructor(t){this.isMounted=!1,this.node=t}update(){}}function n8({top:e,left:t,right:r,bottom:i}){return{x:{min:t,max:r},y:{min:e,max:i}}}function Ile({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Lle(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:i.y,right:i.x}}function G2(e){return e===void 0||e===1}function cO({scale:e,scaleX:t,scaleY:r}){return!G2(e)||!G2(t)||!G2(r)}function mp(e){return cO(e)||r8(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function r8(e){return X4(e.x)||X4(e.y)}function X4(e){return e&&e!=="0%"}function wE(e,t,r){const i=e-r,s=t*i;return r+s}function Q4(e,t,r,i,s){return s!==void 0&&(e=wE(e,s,i)),wE(e,r,i)+t}function fO(e,t=0,r=1,i,s){e.min=Q4(e.min,t,r,i,s),e.max=Q4(e.max,t,r,i,s)}function a8(e,{x:t,y:r}){fO(e.x,t.translate,t.scale,t.originPoint),fO(e.y,r.translate,r.scale,r.originPoint)}const W4=.999999999999,J4=1.0000000000001;function Ule(e,t,r,i=!1){const s=r.length;if(!s)return;t.x=t.y=1;let l,c;for(let f=0;f<s;f++){l=r[f],c=l.projectionDelta;const{visualElement:d}=l.options;d&&d.props.style&&d.props.style.display==="contents"||(i&&l.options.layoutScroll&&l.scroll&&l!==l.root&&qm(e,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,a8(e,c)),i&&mp(l.latestValues)&&qm(e,l.latestValues))}t.x<J4&&t.x>W4&&(t.x=1),t.y<J4&&t.y>W4&&(t.y=1)}function Um(e,t){e.min=e.min+t,e.max=e.max+t}function ek(e,t,r,i,s=.5){const l=$r(e.min,e.max,s);fO(e,t,r,l,i)}function tk(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function qm(e,t){ek(e.x,tk(t.x,e.x),t.scaleX,t.scale,t.originX),ek(e.y,tk(t.y,e.y),t.scaleY,t.scale,t.originY)}function i8(e,t){return n8(Lle(e.getBoundingClientRect(),t))}function qle(e,t,r){const i=i8(e,r),{scroll:s}=t;return s&&(Um(i.x,s.offset.x),Um(i.y,s.offset.y)),i}const Vle={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Fle=Dg.length;function Ble(e,t,r){let i="",s=!0;for(let l=0;l<Fle;l++){const c=Dg[l],f=e[c];if(f===void 0)continue;let d=!0;if(typeof f=="number")d=f===(c.startsWith("scale")?1:0);else{const h=parseFloat(f);d=c.startsWith("scale")?h===1:h===0}if(!d||r){const h=KP(f,LA[c]);if(!d){s=!1;const m=Vle[c]||c;i+=`${m}(${h}) `}r&&(t[c]=h)}}return i=i.trim(),r?i=r(t,s?"":i):s&&(i="none"),i}function HA(e,t,r){const{style:i,vars:s,transformOrigin:l}=e;let c=!1,f=!1;for(const d in t){const h=t[d];if(Ng.has(d)){c=!0;continue}else if(gP(d)){s[d]=h;continue}else{const m=KP(h,LA[d]);d.startsWith("origin")?(f=!0,l[d]=m):i[d]=m}}if(t.transform||(c||r?i.transform=Ble(t,e.transform,r):i.transform&&(i.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:m=0}=l;i.transformOrigin=`${d} ${h} ${m}`}}function o8(e,{style:t,vars:r},i,s){const l=e.style;let c;for(c in t)l[c]=t[c];s?.applyProjectionStyles(l,i);for(c in r)l.setProperty(c,r[c])}function nk(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const wb={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ft.test(e))e=parseFloat(e);else return e;const r=nk(e,t.target.x),i=nk(e,t.target.y);return`${r}% ${i}%`}},Hle={correct:(e,{treeScale:t,projectionDelta:r})=>{const i=e,s=wl.parse(e);if(s.length>5)return i;const l=wl.createTransformer(e),c=typeof s[0]!="number"?1:0,f=r.x.scale*t.x,d=r.y.scale*t.y;s[0+c]/=f,s[1+c]/=d;const h=$r(f,d,.5);return typeof s[2+c]=="number"&&(s[2+c]/=h),typeof s[3+c]=="number"&&(s[3+c]/=h),l(s)}},dO={borderRadius:{...wb,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:wb,borderTopRightRadius:wb,borderBottomLeftRadius:wb,borderBottomRightRadius:wb,boxShadow:Hle};function s8(e,{layout:t,layoutId:r}){return Ng.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!dO[e]||e==="opacity")}function GA(e,t,r){const i=e.style,s=t?.style,l={};if(!i)return l;for(const c in i)(ji(i[c])||s&&ji(s[c])||s8(c,e)||r?.getValue(c)?.liveStyle!==void 0)&&(l[c]=i[c]);return l}function Gle(e){return window.getComputedStyle(e)}class Kle extends t8{constructor(){super(...arguments),this.type="html",this.renderInstance=o8}readValueFromInstance(t,r){if(Ng.has(r))return this.projection?.isProjecting?WC(r):fse(t,r);{const i=Gle(t),s=(gP(r)?i.getPropertyValue(r):i[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:r}){return i8(t,r)}build(t,r,i){HA(t,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,r,i){return GA(t,r,i)}}const Yle={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zle={offset:"strokeDashoffset",array:"strokeDasharray"};function Xle(e,t,r=1,i=0,s=!0){e.pathLength=1;const l=s?Yle:Zle;e[l.offset]=`${-i}`,e[l.array]=`${t} ${r}`}const Qle=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function l8(e,{attrX:t,attrY:r,attrScale:i,pathLength:s,pathSpacing:l=1,pathOffset:c=0,...f},d,h,m){if(HA(e,f,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:v}=e;g.transform&&(v.transform=g.transform,delete g.transform),(v.transform||g.transformOrigin)&&(v.transformOrigin=g.transformOrigin??"50% 50%",delete g.transformOrigin),v.transform&&(v.transformBox=m?.transformBox??"fill-box",delete g.transformBox);for(const _ of Qle)g[_]!==void 0&&(v[_]=g[_],delete g[_]);t!==void 0&&(g.x=t),r!==void 0&&(g.y=r),i!==void 0&&(g.scale=i),s!==void 0&&Xle(g,s,l,c,!1)}const u8=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),c8=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Wle(e,t,r,i){o8(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(u8.has(s)?s:IA(s),t.attrs[s])}function f8(e,t,r){const i=GA(e,t,r);for(const s in e)if(ji(e[s])||ji(t[s])){const l=Dg.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[l]=e[s]}return i}class Jle extends t8{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ma}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Ng.has(r)){const i=BP(r);return i&&i.default||0}return r=u8.has(r)?r:IA(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,i){return f8(t,r,i)}build(t,r,i){l8(t,r,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,r,i,s){Wle(t,r,i,s)}mount(t){this.isSVGTag=c8(t.tagName),super.mount(t)}}const eue=BA.length;function d8(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?d8(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<eue;r++){const i=BA[r],s=e.props[i];(m1(s)||s===!1)&&(t[i]=s)}return t}function h8(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let i=0;i<r;i++)if(t[i]!==e[i])return!1;return!0}const tue=[...FA].reverse(),nue=FA.length;function rue(e){return t=>Promise.all(t.map(({animation:r,options:i})=>Wse(e,r,i)))}function aue(e){let t=rue(e),r=rk(),i=!0,s=!1;const l=h=>(m,g)=>{const v=Zm(e,g,h==="exit"?e.presenceContext?.custom:void 0);if(v){const{transition:_,transitionEnd:b,...S}=v;m={...m,...S,...b}}return m};function c(h){t=h(e)}function f(h){const{props:m}=e,g=d8(e.parent)||{},v=[],_=new Set;let b={},S=1/0;for(let x=0;x<nue;x++){const E=tue[x],R=r[E],T=m[E]!==void 0?m[E]:g[E],C=m1(T),O=E===h?R.isActive:null;O===!1&&(S=x);let M=T===g[E]&&T!==m[E]&&C;if(M&&(i||s)&&e.manuallyAnimateOnMount&&(M=!1),R.protectedKeys={...b},!R.isActive&&O===null||!T&&!R.prevProp||fx(T)||typeof T=="boolean")continue;if(E==="exit"&&R.isActive&&O!==!0){R.prevResolvedValues&&(b={...b,...R.prevResolvedValues});continue}const D=iue(R.prevProp,T);let U=D||E===h&&R.isActive&&!M&&C||x>S&&C,B=!1;const q=Array.isArray(T)?T:[T];let V=q.reduce(l(E),{});O===!1&&(V={});const{prevResolvedValues:G={}}=R,ne={...G,...V},oe=re=>{U=!0,_.has(re)&&(B=!0,_.delete(re)),R.needsAnimating[re]=!0;const ue=e.getValue(re);ue&&(ue.liveStyle=!1)};for(const re in ne){const ue=V[re],Q=G[re];if(b.hasOwnProperty(re))continue;let z=!1;aO(ue)&&aO(Q)?z=!h8(ue,Q):z=ue!==Q,z?ue!=null?oe(re):_.add(re):ue!==void 0&&_.has(re)?oe(re):R.protectedKeys[re]=!0}R.prevProp=T,R.prevResolvedValues=V,R.isActive&&(b={...b,...V}),(i||s)&&e.blockInitialAnimation&&(U=!1);const K=M&&D;U&&(!K||B)&&v.push(...q.map(re=>{const ue={type:E};if(typeof re=="string"&&(i||s)&&!K&&e.manuallyAnimateOnMount&&e.parent){const{parent:Q}=e,z=Zm(Q,re);if(Q.enteringChildren&&z){const{delayChildren:L}=z.transition||{};ue.delay=zP(Q.enteringChildren,e,L)}}return{animation:re,options:ue}}))}if(_.size){const x={};if(typeof m.initial!="boolean"){const E=Zm(e,Array.isArray(m.initial)?m.initial[0]:m.initial);E&&E.transition&&(x.transition=E.transition)}_.forEach(E=>{const R=e.getBaseTarget(E),T=e.getValue(E);T&&(T.liveStyle=!0),x[E]=R??null}),v.push({animation:x})}let w=!!v.length;return i&&(m.initial===!1||m.initial===m.animate)&&!e.manuallyAnimateOnMount&&(w=!1),i=!1,s=!1,w?t(v):Promise.resolve()}function d(h,m){if(r[h].isActive===m)return Promise.resolve();e.variantChildren?.forEach(v=>v.animationState?.setActive(h,m)),r[h].isActive=m;const g=f(h);for(const v in r)r[v].protectedKeys={};return g}return{animateChanges:f,setActive:d,setAnimateFunction:c,getState:()=>r,reset:()=>{r=rk(),s=!0}}}function iue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!h8(t,e):!1}function up(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rk(){return{animate:up(!0),whileInView:up(),whileHover:up(),whileTap:up(),whileDrag:up(),whileFocus:up(),exit:up()}}function ak(e,t){e.min=t.min,e.max=t.max}function hl(e,t){ak(e.x,t.x),ak(e.y,t.y)}function ik(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const p8=1e-4,oue=1-p8,sue=1+p8,m8=.01,lue=0-m8,uue=0+m8;function io(e){return e.max-e.min}function cue(e,t,r){return Math.abs(e-t)<=r}function ok(e,t,r,i=.5){e.origin=i,e.originPoint=$r(t.min,t.max,e.origin),e.scale=io(r)/io(t),e.translate=$r(r.min,r.max,e.origin)-e.originPoint,(e.scale>=oue&&e.scale<=sue||isNaN(e.scale))&&(e.scale=1),(e.translate>=lue&&e.translate<=uue||isNaN(e.translate))&&(e.translate=0)}function Gb(e,t,r,i){ok(e.x,t.x,r.x,i?i.originX:void 0),ok(e.y,t.y,r.y,i?i.originY:void 0)}function sk(e,t,r){e.min=r.min+t.min,e.max=e.min+io(t)}function fue(e,t,r){sk(e.x,t.x,r.x),sk(e.y,t.y,r.y)}function lk(e,t,r){e.min=t.min-r.min,e.max=e.min+io(t)}function EE(e,t,r){lk(e.x,t.x,r.x),lk(e.y,t.y,r.y)}function uk(e,t,r,i,s){return e-=t,e=wE(e,1/r,i),s!==void 0&&(e=wE(e,1/s,i)),e}function due(e,t=0,r=1,i=.5,s,l=e,c=e){if(Yl.test(t)&&(t=parseFloat(t),t=$r(c.min,c.max,t/100)-c.min),typeof t!="number")return;let f=$r(l.min,l.max,i);e===l&&(f-=t),e.min=uk(e.min,t,r,f,s),e.max=uk(e.max,t,r,f,s)}function ck(e,t,[r,i,s],l,c){due(e,t[r],t[i],t[s],t.scale,l,c)}const hue=["x","scaleX","originX"],pue=["y","scaleY","originY"];function fk(e,t,r,i){ck(e.x,t,hue,r?r.x:void 0,i?i.x:void 0),ck(e.y,t,pue,r?r.y:void 0,i?i.y:void 0)}function dk(e){return e.translate===0&&e.scale===1}function g8(e){return dk(e.x)&&dk(e.y)}function hk(e,t){return e.min===t.min&&e.max===t.max}function mue(e,t){return hk(e.x,t.x)&&hk(e.y,t.y)}function pk(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function y8(e,t){return pk(e.x,t.x)&&pk(e.y,t.y)}function mk(e){return io(e.x)/io(e.y)}function gk(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function $l(e){return[e("x"),e("y")]}function gue(e,t,r){let i="";const s=e.x.translate/t.x,l=e.y.translate/t.y,c=r?.z||0;if((s||l||c)&&(i=`translate3d(${s}px, ${l}px, ${c}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:h,rotate:m,rotateX:g,rotateY:v,skewX:_,skewY:b}=r;h&&(i=`perspective(${h}px) ${i}`),m&&(i+=`rotate(${m}deg) `),g&&(i+=`rotateX(${g}deg) `),v&&(i+=`rotateY(${v}deg) `),_&&(i+=`skewX(${_}deg) `),b&&(i+=`skewY(${b}deg) `)}const f=e.x.scale*t.x,d=e.y.scale*t.y;return(f!==1||d!==1)&&(i+=`scale(${f}, ${d})`),i||"none"}const v8=["TopLeft","TopRight","BottomLeft","BottomRight"],yue=v8.length,yk=e=>typeof e=="string"?parseFloat(e):e,vk=e=>typeof e=="number"||ft.test(e);function vue(e,t,r,i,s,l){s?(e.opacity=$r(0,r.opacity??1,bue(i)),e.opacityExit=$r(t.opacity??1,0,Sue(i))):l&&(e.opacity=$r(t.opacity??1,r.opacity??1,i));for(let c=0;c<yue;c++){const f=`border${v8[c]}Radius`;let d=bk(t,f),h=bk(r,f);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||vk(d)===vk(h)?(e[f]=Math.max($r(yk(d),yk(h),i),0),(Yl.test(h)||Yl.test(d))&&(e[f]+="%")):e[f]=h}(t.rotate||r.rotate)&&(e.rotate=$r(t.rotate||0,r.rotate||0,i))}function bk(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const bue=b8(0,.5,cP),Sue=b8(.5,.95,ys);function b8(e,t,r){return i=>i<e?0:i>t?1:r(d1(e,t,i))}function wue(e,t,r){const i=ji(e)?e:dg(e);return i.start($A("",i,t,r)),i.animation}function g1(e,t,r,i={passive:!0}){return e.addEventListener(t,r,i),()=>e.removeEventListener(t,r)}const Eue=(e,t)=>e.depth-t.depth;class xue{constructor(){this.children=[],this.isDirty=!1}add(t){wA(this.children,t),this.isDirty=!0}remove(t){gE(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Eue),this.isDirty=!1,this.children.forEach(t)}}function _ue(e,t){const r=ao.now(),i=({timestamp:s})=>{const l=s-r;l>=t&&(Af(i),e(l-t))};return cr.setup(i,!0),()=>Af(i)}function Iw(e){return ji(e)?e.get():e}class Tue{constructor(){this.members=[]}add(t){wA(this.members,t);for(let r=this.members.length-1;r>=0;r--){const i=this.members[r];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(gE(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(gE(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){for(let r=this.members.indexOf(t)-1;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(t,r){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:l}=t.options;(s===void 0||s!==l)&&(t.resumeFrom=i,r&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Lw={hasAnimatedSinceResize:!0,hasEverUpdated:!1},K2=["","X","Y","Z"],Cue=1e3;let Oue=0;function Y2(e,t,r,i){const{latestValues:s}=t;s[e]&&(r[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function S8(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=UP(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:s,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",cr,!(s||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&S8(i)}function w8({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(c={},f=t?.()){this.id=Oue++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Mue),this.nodes.forEach(Nue),this.nodes.forEach(zue),this.nodes.forEach(jue)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new xue)}addEventListener(c,f){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new xA),this.eventHandlers.get(c).add(f)}notifyListeners(c,...f){const d=this.eventHandlers.get(c);d&&d.notify(...f)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=VA(c)&&!Ale(c),this.instance=c;const{layoutId:f,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||f)&&(this.isLayoutDirty=!0),e){let m,g=0;const v=()=>this.root.updateBlockedByResize=!1;cr.read(()=>{g=window.innerWidth}),e(c,()=>{const _=window.innerWidth;_!==g&&(g=_,this.root.updateBlockedByResize=!0,m&&m(),m=_ue(v,250),Lw.hasAnimatedSinceResize&&(Lw.hasAnimatedSinceResize=!1,this.nodes.forEach(Ek)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&h&&(f||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:g,hasRelativeLayoutChanged:v,layout:_})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||h.getDefaultTransition()||Uue,{onLayoutAnimationStart:S,onLayoutAnimationComplete:w}=h.getProps(),x=!this.targetLayout||!y8(this.targetLayout,_),E=!g&&v;if(this.options.layoutRoot||this.resumeFrom||E||g&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const R={...zA(b,"layout"),onPlay:S,onComplete:w};(h.shouldReduceMotion||this.options.layoutRoot)&&(R.delay=0,R.type=!1),this.startAnimation(R),this.setAnimationOrigin(m,E)}else g||Ek(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=_})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Af(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach($ue),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&S8(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const g=this.path[m];g.shouldResetTransform=!0,g.updateScroll("snapshot"),g.options.layoutRoot&&g.willUpdate(!1)}const{layoutId:f,layout:d}=this.options;if(f===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Sk);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(wk);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Due),this.nodes.forEach(Rue),this.nodes.forEach(Aue)):this.nodes.forEach(wk),this.clearAllSnapshots();const f=ao.now();pi.delta=Ql(0,1e3/60,f-pi.timestamp),pi.timestamp=f,pi.isProcessing=!0,L2.update.process(pi),L2.preRender.process(pi),L2.render.process(pi),pi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,UA.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(kue),this.sharedNodes.forEach(Pue)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,cr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){cr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!io(this.snapshot.measuredBox.x)&&!io(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Ma(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(f=!1),f&&this.instance){const d=i(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:d,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!s)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!g8(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;c&&this.instance&&(f||mp(this.latestValues)||m)&&(s(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const f=this.measurePageBox();let d=this.removeElementScroll(f);return c&&(d=this.removeTransform(d)),que(d),{animationId:this.root.animationId,measuredBox:f,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:c}=this.options;if(!c)return Ma();const f=c.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Vue))){const{scroll:h}=this.root;h&&(Um(f.x,h.offset.x),Um(f.y,h.offset.y))}return f}removeElementScroll(c){const f=Ma();if(hl(f,c),this.scroll?.wasRoot)return f;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:m,options:g}=h;h!==this.root&&m&&g.layoutScroll&&(m.wasRoot&&hl(f,c),Um(f.x,m.offset.x),Um(f.y,m.offset.y))}return f}applyTransform(c,f=!1){const d=Ma();hl(d,c);for(let h=0;h<this.path.length;h++){const m=this.path[h];!f&&m.options.layoutScroll&&m.scroll&&m!==m.root&&qm(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),mp(m.latestValues)&&qm(d,m.latestValues)}return mp(this.latestValues)&&qm(d,this.latestValues),d}removeTransform(c){const f=Ma();hl(f,c);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!mp(h.latestValues))continue;cO(h.latestValues)&&h.updateSnapshot();const m=Ma(),g=h.measurePageBox();hl(m,g),fk(f,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,m)}return mp(this.latestValues)&&fk(f,this.latestValues),f}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==pi.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==f;if(!(c||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:g}=this.options;if(!this.layout||!(m||g))return;this.resolvedRelativeTargetAt=pi.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ma(),this.targetWithTransforms=Ma()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),fue(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):hl(this.target,this.layout.layoutBox),a8(this.target,this.targetDelta)):hl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||cO(this.parent.latestValues)||r8(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,f,d){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ma(),this.relativeTargetOrigin=Ma(),EE(this.relativeTargetOrigin,f,d),hl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const c=this.getLead(),f=!!this.resumingFrom||this!==c;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===pi.timestamp&&(d=!1),d)return;const{layout:h,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||m))return;hl(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,v=this.treeScale.y;Ule(this.layoutCorrected,this.treeScale,this.path,f),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Ma());const{target:_}=c;if(!_){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ik(this.prevProjectionDelta.x,this.projectionDelta.x),ik(this.prevProjectionDelta.y,this.projectionDelta.y)),Gb(this.projectionDelta,this.layoutCorrected,_,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==v||!gk(this.projectionDelta.x,this.prevProjectionDelta.x)||!gk(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",_))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){if(this.options.visualElement?.scheduleRender(),c){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Lm(),this.projectionDelta=Lm(),this.projectionDeltaWithTransform=Lm()}setAnimationOrigin(c,f=!1){const d=this.snapshot,h=d?d.latestValues:{},m={...this.latestValues},g=Lm();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const v=Ma(),_=d?d.source:void 0,b=this.layout?this.layout.source:void 0,S=_!==b,w=this.getStack(),x=!w||w.members.length<=1,E=!!(S&&!x&&this.options.crossfade===!0&&!this.path.some(Lue));this.animationProgress=0;let R;this.mixTargetDelta=T=>{const C=T/1e3;xk(g.x,c.x,C),xk(g.y,c.y,C),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(EE(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Iue(this.relativeTarget,this.relativeTargetOrigin,v,C),R&&mue(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=Ma()),hl(R,this.relativeTarget)),S&&(this.animationValues=m,vue(m,h,this.latestValues,C,E,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Af(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=cr.update(()=>{Lw.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=dg(0)),this.motionValue.jump(0,!1),this.currentAnimation=wue(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),c.onUpdate&&c.onUpdate(f)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Cue),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:f,target:d,layout:h,latestValues:m}=c;if(!(!f||!d||!h)){if(this!==c&&this.layout&&h&&E8(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||Ma();const g=io(this.layout.layoutBox.x);d.x.min=c.target.x.min,d.x.max=d.x.min+g;const v=io(this.layout.layoutBox.y);d.y.min=c.target.y.min,d.y.max=d.y.min+v}hl(f,d),qm(f,m),Gb(this.projectionDeltaWithTransform,this.layoutCorrected,f,m)}}registerSharedNode(c,f){this.sharedNodes.has(c)||this.sharedNodes.set(c,new Tue),this.sharedNodes.get(c).add(f);const h=f.options.initialPromotionConfig;f.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(f):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){const{layoutId:c}=this.options;return c?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:c}=this.options;return c?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:f,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),c&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let f=!1;const{latestValues:d}=c;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(f=!0),!f)return;const h={};d.z&&Y2("z",c,h,this.animationValues);for(let m=0;m<K2.length;m++)Y2(`rotate${K2[m]}`,c,h,this.animationValues),Y2(`skew${K2[m]}`,c,h,this.animationValues);c.render();for(const m in h)c.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);c.scheduleRender()}applyProjectionStyles(c,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=Iw(f?.pointerEvents)||"",c.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=Iw(f?.pointerEvents)||""),this.hasProjected&&!mp(this.latestValues)&&(c.transform=d?d({},""):"none",this.hasProjected=!1);return}c.visibility="";const m=h.animationValues||h.latestValues;this.applyTransformsToTarget();let g=gue(this.projectionDeltaWithTransform,this.treeScale,m);d&&(g=d(m,g)),c.transform=g;const{x:v,y:_}=this.projectionDelta;c.transformOrigin=`${v.origin*100}% ${_.origin*100}% 0`,h.animationValues?c.opacity=h===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:c.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const b in dO){if(m[b]===void 0)continue;const{correct:S,applyTo:w,isCSSVariable:x}=dO[b],E=g==="none"?m[b]:S(m[b],h);if(w){const R=w.length;for(let T=0;T<R;T++)c[w[T]]=E}else x?this.options.visualElement.renderState.vars[b]=E:c[b]=E}this.options.layoutId&&(c.pointerEvents=h===this?Iw(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>c.currentAnimation?.stop()),this.root.nodes.forEach(Sk),this.root.sharedNodes.clear()}}}function Rue(e){e.updateLayout()}function Aue(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,l=t.source!==e.layout.source;s==="size"?$l(m=>{const g=l?t.measuredBox[m]:t.layoutBox[m],v=io(g);g.min=r[m].min,g.max=g.min+v}):E8(s,t.layoutBox,r)&&$l(m=>{const g=l?t.measuredBox[m]:t.layoutBox[m],v=io(r[m]);g.max=g.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+v)});const c=Lm();Gb(c,r,t.layoutBox);const f=Lm();l?Gb(f,e.applyTransform(i,!0),t.measuredBox):Gb(f,r,t.layoutBox);const d=!g8(c);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:g,layout:v}=m;if(g&&v){const _=Ma();EE(_,t.layoutBox,g.layoutBox);const b=Ma();EE(b,r,v.layoutBox),y8(_,b)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=_,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:f,layoutDelta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Mue(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function jue(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function kue(e){e.clearSnapshot()}function Sk(e){e.clearMeasurements()}function wk(e){e.isLayoutDirty=!1}function Due(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ek(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Nue(e){e.resolveTargetDelta()}function zue(e){e.calcProjection()}function $ue(e){e.resetSkewAndRotation()}function Pue(e){e.removeLeadSnapshot()}function xk(e,t,r){e.translate=$r(t.translate,0,r),e.scale=$r(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function _k(e,t,r,i){e.min=$r(t.min,r.min,i),e.max=$r(t.max,r.max,i)}function Iue(e,t,r,i){_k(e.x,t.x,r.x,i),_k(e.y,t.y,r.y,i)}function Lue(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Uue={duration:.45,ease:[.4,0,.1,1]},Tk=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ck=Tk("applewebkit/")&&!Tk("chrome/")?Math.round:ys;function Ok(e){e.min=Ck(e.min),e.max=Ck(e.max)}function que(e){Ok(e.x),Ok(e.y)}function E8(e,t,r){return e==="position"||e==="preserve-aspect"&&!cue(mk(t),mk(r),.2)}function Vue(e){return e!==e.root&&e.scroll?.wasRoot}const Fue=w8({attachResizeListener:(e,t)=>g1(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Z2={current:void 0},x8=w8({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Z2.current){const e=new Fue({});e.mount(window),e.setOptions({layoutScroll:!0}),Z2.current=e}return Z2.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),_8=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Bue(e=!0){const t=j.useContext(SA);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:i,register:s}=t,l=j.useId();j.useEffect(()=>{if(e)return s(l)},[e]);const c=j.useCallback(()=>e&&i&&i(l),[l,i,e]);return!r&&i?[!1,c]:[!0]}const T8=j.createContext({strict:!1}),Rk={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Ak=!1;function Hue(){if(Ak)return;const e={};for(const t in Rk)e[t]={isEnabled:r=>Rk[t].some(i=>!!r[i])};e8(e),Ak=!0}function C8(){return Hue(),$le()}function Gue(e){const t=C8();for(const r in e)t[r]={...t[r],...e[r]};e8(t)}const Kue=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function xE(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Kue.has(e)}let O8=e=>!xE(e);function Yue(e){typeof e=="function"&&(O8=t=>t.startsWith("on")?!xE(t):e(t))}try{Yue(require("@emotion/is-prop-valid").default)}catch{}function Zue(e,t,r){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||(O8(s)||r===!0&&xE(s)||!t&&!xE(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const hx=j.createContext({});function Xue(e,t){if(dx(e)){const{initial:r,animate:i}=e;return{initial:r===!1||m1(r)?r:void 0,animate:m1(i)?i:void 0}}return e.inherit!==!1?t:{}}function Que(e){const{initial:t,animate:r}=Xue(e,j.useContext(hx));return j.useMemo(()=>({initial:t,animate:r}),[Mk(t),Mk(r)])}function Mk(e){return Array.isArray(e)?e.join(" "):e}const KA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function R8(e,t,r){for(const i in t)!ji(t[i])&&!s8(i,r)&&(e[i]=t[i])}function Wue({transformTemplate:e},t){return j.useMemo(()=>{const r=KA();return HA(r,t,e),Object.assign({},r.vars,r.style)},[t])}function Jue(e,t){const r=e.style||{},i={};return R8(i,r,e),Object.assign(i,Wue(e,t)),i}function ece(e,t){const r={},i=Jue(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const A8=()=>({...KA(),attrs:{}});function tce(e,t,r,i){const s=j.useMemo(()=>{const l=A8();return l8(l,t,c8(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};R8(l,e.style,e),s.style={...l,...s.style}}return s}const nce=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function YA(e){return typeof e!="string"||e.includes("-")?!1:!!(nce.indexOf(e)>-1||/[A-Z]/u.test(e))}function rce(e,t,r,{latestValues:i},s,l=!1,c){const d=(c??YA(e)?tce:ece)(t,i,s,e),h=Zue(t,typeof e=="string",l),m=e!==j.Fragment?{...h,...d,ref:r}:{},{children:g}=t,v=j.useMemo(()=>ji(g)?g.get():g,[g]);return j.createElement(e,{...m,children:v})}function ace({scrapeMotionValuesFromProps:e,createRenderState:t},r,i,s){return{latestValues:ice(r,i,s,e),renderState:t()}}function ice(e,t,r,i){const s={},l=i(e,{});for(const v in l)s[v]=Iw(l[v]);let{initial:c,animate:f}=e;const d=dx(e),h=WP(e);t&&h&&!d&&e.inherit!==!1&&(c===void 0&&(c=t.initial),f===void 0&&(f=t.animate));let m=r?r.initial===!1:!1;m=m||c===!1;const g=m?f:c;if(g&&typeof g!="boolean"&&!fx(g)){const v=Array.isArray(g)?g:[g];for(let _=0;_<v.length;_++){const b=PA(e,v[_]);if(b){const{transitionEnd:S,transition:w,...x}=b;for(const E in x){let R=x[E];if(Array.isArray(R)){const T=m?R.length-1:0;R=R[T]}R!==null&&(s[E]=R)}for(const E in S)s[E]=S[E]}}}return s}const M8=e=>(t,r)=>{const i=j.useContext(hx),s=j.useContext(SA),l=()=>ace(e,t,i,s);return r?l():ooe(l)},oce=M8({scrapeMotionValuesFromProps:GA,createRenderState:KA}),sce=M8({scrapeMotionValuesFromProps:f8,createRenderState:A8}),lce=Symbol.for("motionComponentSymbol");function uce(e,t,r){const i=j.useRef(r);j.useInsertionEffect(()=>{i.current=r});const s=j.useRef(null);return j.useCallback(l=>{l&&e.onMount?.(l);const c=i.current;if(typeof c=="function")if(l){const f=c(l);typeof f=="function"&&(s.current=f)}else s.current?(s.current(),s.current=null):c(l);else c&&(c.current=l);t&&(l?t.mount(l):t.unmount())},[t])}const j8=j.createContext({});function Cm(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function cce(e,t,r,i,s,l){const{visualElement:c}=j.useContext(hx),f=j.useContext(T8),d=j.useContext(SA),h=j.useContext(_8),m=h.reducedMotion,g=h.skipAnimations,v=j.useRef(null),_=j.useRef(!1);i=i||f.renderer,!v.current&&i&&(v.current=i(e,{visualState:t,parent:c,props:r,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:m,skipAnimations:g,isSVG:l}),_.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const b=v.current,S=j.useContext(j8);b&&!b.projection&&s&&(b.type==="html"||b.type==="svg")&&fce(v.current,r,s,S);const w=j.useRef(!1);j.useInsertionEffect(()=>{b&&w.current&&b.update(r,d)});const x=r[LP],E=j.useRef(!!x&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(x)&&window.MotionHasOptimisedAnimation?.(x));return loe(()=>{_.current=!0,b&&(w.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),E.current&&b.animationState&&b.animationState.animateChanges())}),j.useEffect(()=>{b&&(!E.current&&b.animationState&&b.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(x)}),E.current=!1),b.enteringChildren=void 0)}),b}function fce(e,t,r,i){const{layoutId:s,layout:l,drag:c,dragConstraints:f,layoutScroll:d,layoutRoot:h,layoutCrossfade:m}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:k8(e.parent)),e.projection.setOptions({layoutId:s,layout:l,alwaysMeasureLayout:!!c||f&&Cm(f),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:m,layoutScroll:d,layoutRoot:h})}function k8(e){if(e)return e.options.allowProjection!==!1?e.projection:k8(e.parent)}function X2(e,{forwardMotionProps:t=!1,type:r}={},i,s){i&&Gue(i);const l=r?r==="svg":YA(e),c=l?sce:oce;function f(h,m){let g;const v={...j.useContext(_8),...h,layoutId:dce(h)},{isStatic:_}=v,b=Que(h),S=c(h,_);if(!_&&typeof window<"u"){hce();const w=pce(v);g=w.MeasureLayout,b.visualElement=cce(e,S,v,s,w.ProjectionNode,l)}return k.jsxs(hx.Provider,{value:b,children:[g&&b.visualElement?k.jsx(g,{visualElement:b.visualElement,...v}):null,rce(e,h,uce(S,b.visualElement,m),S,_,t,l)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=j.forwardRef(f);return d[lce]=e,d}function dce({layoutId:e}){const t=j.useContext(W$).id;return t&&e!==void 0?t+"-"+e:e}function hce(e,t){j.useContext(T8).strict}function pce(e){const t=C8(),{drag:r,layout:i}=t;if(!r&&!i)return{};const s={...r,...i};return{MeasureLayout:r?.isEnabled(e)||i?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function mce(e,t){if(typeof Proxy>"u")return X2;const r=new Map,i=(l,c)=>X2(l,c,e,t),s=(l,c)=>i(l,c);return new Proxy(s,{get:(l,c)=>c==="create"?i:(r.has(c)||r.set(c,X2(c,void 0,e,t)),r.get(c))})}const gce=(e,t)=>t.isSVG??YA(e)?new Jle(t):new Kle(t,{allowProjection:e!==j.Fragment});class yce extends Ff{constructor(t){super(t),t.animationState||(t.animationState=aue(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();fx(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let vce=0;class bce extends Ff{constructor(){super(...arguments),this.id=vce++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t);r&&!t&&s.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Sce={animation:{Feature:yce},exit:{Feature:bce}};function X1(e){return{point:{x:e.pageX,y:e.pageY}}}const wce=e=>t=>qA(t)&&e(t,X1(t));function Kb(e,t,r,i){return g1(e,t,wce(r),i)}const D8=({current:e})=>e?e.ownerDocument.defaultView:null,jk=(e,t)=>Math.abs(e-t);function Ece(e,t){const r=jk(e.x,t.x),i=jk(e.y,t.y);return Math.sqrt(r**2+i**2)}const kk=new Set(["auto","scroll"]);class N8{constructor(t,r,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:l=!1,distanceThreshold:c=3,element:f}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=_=>{this.handleScroll(_.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=W2(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,S=Ece(_.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!S)return;const{point:w}=_,{timestamp:x}=pi;this.history.push({...w,timestamp:x});const{onStart:E,onMove:R}=this.handlers;b||(E&&E(this.lastMoveEvent,_),this.startEvent=this.lastMoveEvent),R&&R(this.lastMoveEvent,_)},this.handlePointerMove=(_,b)=>{this.lastMoveEvent=_,this.lastMoveEventInfo=Q2(b,this.transformPagePoint),cr.update(this.updatePoint,!0)},this.handlePointerUp=(_,b)=>{this.end();const{onEnd:S,onSessionEnd:w,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=W2(_.type==="pointercancel"?this.lastMoveEventInfo:Q2(b,this.transformPagePoint),this.history);this.startEvent&&S&&S(_,E),w&&w(_,E)},!qA(t))return;this.dragSnapToOrigin=l,this.handlers=r,this.transformPagePoint=i,this.distanceThreshold=c,this.contextWindow=s||window;const d=X1(t),h=Q2(d,this.transformPagePoint),{point:m}=h,{timestamp:g}=pi;this.history=[{...m,timestamp:g}];const{onSessionStart:v}=r;v&&v(t,W2(h,this.history)),this.removeListeners=K1(Kb(this.contextWindow,"pointermove",this.handlePointerMove),Kb(this.contextWindow,"pointerup",this.handlePointerUp),Kb(this.contextWindow,"pointercancel",this.handlePointerUp)),f&&this.startScrollTracking(f)}startScrollTracking(t){let r=t.parentElement;for(;r;){const i=getComputedStyle(r);(kk.has(i.overflowX)||kk.has(i.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const r=this.scrollPositions.get(t);if(!r)return;const i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},l={x:s.x-r.x,y:s.y-r.y};l.x===0&&l.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,s),cr.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Af(this.updatePoint)}}function Q2(e,t){return t?{point:t(e.point)}:e}function Dk(e,t){return{x:e.x-t.x,y:e.y-t.y}}function W2({point:e},t){return{point:e,delta:Dk(e,z8(t)),offset:Dk(e,xce(t)),velocity:_ce(t,.1)}}function xce(e){return e[0]}function z8(e){return e[e.length-1]}function _ce(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,i=null;const s=z8(e);for(;r>=0&&(i=e[r],!(s.timestamp-i.timestamp>Sl(t)));)r--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&s.timestamp-i.timestamp>Sl(t)*2&&(i=e[1]);const l=ms(s.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const c={x:(s.x-i.x)/l,y:(s.y-i.y)/l};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function Tce(e,{min:t,max:r},i){return t!==void 0&&e<t?e=i?$r(t,e,i.min):Math.max(e,t):r!==void 0&&e>r&&(e=i?$r(r,e,i.max):Math.min(e,r)),e}function Nk(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Cce(e,{top:t,left:r,bottom:i,right:s}){return{x:Nk(e.x,r,s),y:Nk(e.y,t,i)}}function zk(e,t){let r=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,i]=[i,r]),{min:r,max:i}}function Oce(e,t){return{x:zk(e.x,t.x),y:zk(e.y,t.y)}}function Rce(e,t){let r=.5;const i=io(e),s=io(t);return s>i?r=d1(t.min,t.max-i,e.min):i>s&&(r=d1(e.min,e.max-s,t.min)),Ql(0,1,r)}function Ace(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const hO=.35;function Mce(e=hO){return e===!1?e=0:e===!0&&(e=hO),{x:$k(e,"left","right"),y:$k(e,"top","bottom")}}function $k(e,t,r){return{min:Pk(e,t),max:Pk(e,r)}}function Pk(e,t){return typeof e=="number"?e:e[t]||0}const jce=new WeakMap;class kce{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ma(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const l=g=>{r&&this.snapToCursor(X1(g).point),this.stopAnimation()},c=(g,v)=>{const{drag:_,dragPropagation:b,onDragStart:S}=this.getProps();if(_&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=dle(_),!this.openDragLock))return;this.latestPointerEvent=g,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$l(x=>{let E=this.getAxisMotionValue(x).get()||0;if(Yl.test(E)){const{projection:R}=this.visualElement;if(R&&R.layout){const T=R.layout.layoutBox[x];T&&(E=io(T)*(parseFloat(E)/100))}}this.originPoint[x]=E}),S&&cr.update(()=>S(g,v),!1,!0),iO(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},f=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v;const{dragPropagation:_,dragDirectionLock:b,onDirectionLock:S,onDrag:w}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:x}=v;if(b&&this.currentDirection===null){this.currentDirection=Nce(x),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",v.point,x),this.updateAxis("y",v.point,x),this.visualElement.render(),w&&cr.update(()=>w(g,v),!1,!0)},d=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v,this.stop(g,v),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:g}=this.getProps();(g||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new N8(t,{onSessionStart:l,onStart:c,onMove:f,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:i,contextWindow:D8(this.visualElement),element:this.visualElement.current})}stop(t,r){const i=t||this.latestPointerEvent,s=r||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!s||!i)return;const{velocity:c}=s;this.startAnimation(c);const{onDragEnd:f}=this.getProps();f&&cr.postRender(()=>f(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,r,i){const{drag:s}=this.getProps();if(!i||!lw(t,s,this.currentDirection))return;const l=this.getAxisMotionValue(t);let c=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(c=Tce(c,this.constraints[t],this.elastic[t])),l.set(c)}resolveConstraints(){const{dragConstraints:t,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&Cm(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=Cce(i.layoutBox,t):this.constraints=!1,this.elastic=Mce(r),s!==this.constraints&&!Cm(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&$l(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=Ace(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Cm(t))return!1;const i=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const l=qle(i,s.root,this.visualElement.getTransformPagePoint());let c=Oce(s.layout.layoutBox,l);if(r){const f=r(Ile(c));this.hasMutatedConstraints=!!f,f&&(c=n8(f))}return c}startAnimation(t){const{drag:r,dragMomentum:i,dragElastic:s,dragTransition:l,dragSnapToOrigin:c,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},h=$l(m=>{if(!lw(m,r,this.currentDirection))return;let g=d&&d[m]||{};c&&(g={min:0,max:0});const v=s?200:1e6,_=s?40:1e7,b={type:"inertia",velocity:i?t[m]:0,bounceStiffness:v,bounceDamping:_,timeConstant:750,restDelta:1,restSpeed:10,...l,...g};return this.startAxisValueAnimation(m,b)});return Promise.all(h).then(f)}startAxisValueAnimation(t,r){const i=this.getAxisMotionValue(t);return iO(this.visualElement,t),i.start($A(t,i,0,r,this.visualElement,!1))}stopAnimation(){$l(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[r];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){$l(r=>{const{drag:i}=this.getProps();if(!lw(r,i,this.currentDirection))return;const{projection:s}=this.visualElement,l=this.getAxisMotionValue(r);if(s&&s.layout){const{min:c,max:f}=s.layout.layoutBox[r],d=l.get()||0;l.set(t[r]-$r(c,f,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Cm(r)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};$l(c=>{const f=this.getAxisMotionValue(c);if(f&&this.constraints!==!1){const d=f.get();s[c]=Rce({min:d,max:d},this.constraints[c])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),$l(c=>{if(!lw(c,t,null))return;const f=this.getAxisMotionValue(c),{min:d,max:h}=this.constraints[c];f.set($r(d,h,s[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;jce.set(this.visualElement,this);const t=this.visualElement.current,r=Kb(t,"pointerdown",h=>{const{drag:m,dragListener:g=!0}=this.getProps(),v=h.target,_=v!==t&&vle(v);m&&g&&!_&&this.start(h)});let i;const s=()=>{const{dragConstraints:h}=this.getProps();Cm(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),i||(i=Dce(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,c=l.addEventListener("measure",s);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),cr.read(s);const f=g1(window,"resize",()=>this.scalePositionWithinConstraints()),d=l.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&($l(g=>{const v=this.getAxisMotionValue(g);v&&(this.originPoint[g]+=h[g].translate,v.set(v.get()+h[g].translate))}),this.visualElement.render())}));return()=>{f(),r(),c(),d&&d(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:l=!1,dragElastic:c=hO,dragMomentum:f=!0}=t;return{...t,drag:r,dragDirectionLock:i,dragPropagation:s,dragConstraints:l,dragElastic:c,dragMomentum:f}}}function Ik(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Dce(e,t,r){const i=G4(e,Ik(r)),s=G4(t,Ik(r));return()=>{i(),s()}}function lw(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Nce(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class zce extends Ff{constructor(t){super(t),this.removeGroupControls=ys,this.removeListeners=ys,this.controls=new kce(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ys}update(){const{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const J2=e=>(t,r)=>{e&&cr.update(()=>e(t,r),!1,!0)};class $ce extends Ff{constructor(){super(...arguments),this.removePointerDownListener=ys}onPointerDown(t){this.session=new N8(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:D8(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:J2(t),onStart:J2(r),onMove:J2(i),onEnd:(l,c)=>{delete this.session,s&&cr.postRender(()=>s(l,c))}}}mount(){this.removePointerDownListener=Kb(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let eT=!1;class Pce extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:i,layoutId:s}=this.props,{projection:l}=t;l&&(r.group&&r.group.add(l),i&&i.register&&s&&i.register(l),eT&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Lw.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:i,drag:s,isPresent:l}=this.props,{projection:c}=i;return c&&(c.isPresent=l,t.layoutDependency!==r&&c.setOptions({...c.options,layoutDependency:r}),eT=!0,s||t.layoutDependency!==r||r===void 0||t.isPresent!==l?c.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?c.promote():c.relegate()||cr.postRender(()=>{const f=c.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),UA.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:i}=this.props,{projection:s}=t;eT=!0,s&&(s.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function $8(e){const[t,r]=Bue(),i=j.useContext(W$);return k.jsx(Pce,{...e,layoutGroup:i,switchLayoutGroup:j.useContext(j8),isPresent:t,safeToRemove:r})}const Ice={pan:{Feature:$ce},drag:{Feature:zce,ProjectionNode:x8,MeasureLayout:$8}};function Lk(e,t,r){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",r==="Start");const s="onHover"+r,l=i[s];l&&cr.postRender(()=>l(t,X1(t)))}class Lce extends Ff{mount(){const{current:t}=this.node;t&&(this.unmount=ple(t,(r,i)=>(Lk(this.node,i,"Start"),s=>Lk(this.node,s,"End"))))}unmount(){}}class Uce extends Ff{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=K1(g1(this.node.current,"focus",()=>this.onFocus()),g1(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Uk(e,t,r){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",r==="Start");const s="onTap"+(r==="End"?"":r),l=i[s];l&&cr.postRender(()=>l(t,X1(t)))}class qce extends Ff{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:r,propagate:i}=this.node.props;this.unmount=Sle(t,(s,l)=>(Uk(this.node,l,"Start"),(c,{success:f})=>Uk(this.node,c,f?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:i?.tap===!1})}unmount(){}}const pO=new WeakMap,tT=new WeakMap,Vce=e=>{const t=pO.get(e.target);t&&t(e)},Fce=e=>{e.forEach(Vce)};function Bce({root:e,...t}){const r=e||document;tT.has(r)||tT.set(r,{});const i=tT.get(r),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(Fce,{root:e,...t})),i[s]}function Hce(e,t,r){const i=Bce(t);return pO.set(e,r),i.observe(e),()=>{pO.delete(e),i.unobserve(e)}}const Gce={some:0,all:1};class Kce extends Ff{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:i,amount:s="some",once:l}=t,c={root:r?r.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:Gce[s]},f=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,l&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:g}=this.node.getProps(),v=h?m:g;v&&v(d)};return Hce(this.node.current,c,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Yce(t,r))&&this.startObserver()}unmount(){}}function Yce({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const Zce={inView:{Feature:Kce},tap:{Feature:qce},focus:{Feature:Uce},hover:{Feature:Lce}},Xce={layout:{ProjectionNode:x8,MeasureLayout:$8}},Qce={...Sce,...Zce,...Ice,...Xce},qk=mce(Qce,gce),P8=Qo.memo(({className:e})=>{const t=["M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875","M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867","M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859","M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851","M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843","M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835","M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827","M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819","M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811","M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803","M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795","M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787","M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779","M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771","M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763","M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755","M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747","M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739","M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731","M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723","M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715","M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707","M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699","M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691","M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683","M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675","M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667","M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659","M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651","M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643","M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635","M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627","M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619","M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611","M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603","M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595","M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587","M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579","M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571","M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563","M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555","M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547","M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539","M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531","M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523","M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515","M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507","M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499","M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491","M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483"];return k.jsx("div",{className:qt("absolute h-full w-full inset-0 mask-size-[40px] mask-repeat-[no-repeat] flex items-center justify-center",e),children:k.jsxs("svg",{className:"z-0 h-full w-full pointer-events-none absolute",width:"100%",height:"100%",viewBox:"0 0 696 316",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[k.jsx("title",{children:"Background Beams"}),k.jsx("path",{d:"M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483M-30 -589C-30 -589 38 -184 502 -57C966 70 1034 475 1034 475M-23 -597C-23 -597 45 -192 509 -65C973 62 1041 467 1041 467M-16 -605C-16 -605 52 -200 516 -73C980 54 1048 459 1048 459M-9 -613C-9 -613 59 -208 523 -81C987 46 1055 451 1055 451M-2 -621C-2 -621 66 -216 530 -89C994 38 1062 443 1062 443M5 -629C5 -629 73 -224 537 -97C1001 30 1069 435 1069 435M12 -637C12 -637 80 -232 544 -105C1008 22 1076 427 1076 427M19 -645C19 -645 87 -240 551 -113C1015 14 1083 419 1083 419",stroke:"url(#paint0_radial_242_278)",strokeOpacity:"0.05",strokeWidth:"0.5"}),t.map((r,i)=>k.jsx(qk.path,{d:r,stroke:`url(#linearGradient-${i})`,strokeOpacity:"0.4",strokeWidth:"0.5"},`path-${i}`)),k.jsxs("defs",{children:[t.map((r,i)=>k.jsxs(qk.linearGradient,{id:`linearGradient-${i}`,initial:{x1:"0%",x2:"0%",y1:"0%",y2:"0%"},animate:{x1:["0%","100%"],x2:["0%","95%"],y1:["0%","100%"],y2:["0%",`${93+Math.random()*8}%`]},transition:{duration:Math.random()*10+10,ease:"easeInOut",repeat:1/0,delay:0},children:[k.jsx("stop",{stopColor:"#000000",stopOpacity:"0"}),k.jsx("stop",{stopColor:"#111111"}),k.jsx("stop",{offset:"32.5%",stopColor:"#666666"}),k.jsx("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]},`gradient-${i}`)),k.jsxs("radialGradient",{id:"paint0_radial_242_278",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(352 34) rotate(90) scale(555 1560.62)",children:[k.jsx("stop",{offset:"0.0666667",stopColor:"var(--neutral-300)"}),k.jsx("stop",{offset:"0.243243",stopColor:"var(--neutral-300)"}),k.jsx("stop",{offset:"0.43594",stopColor:"white",stopOpacity:"0"})]})]})]})})});P8.displayName="BackgroundBeams";const Wce=()=>k.jsxs(k.Fragment,{children:[k.jsx(P8,{className:"absolute inset-0"}),k.jsx("div",{className:"relative z-10 flex-1 flex items-center justify-center",children:k.jsxs("div",{className:"text-center",children:[k.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Skybridge"}),k.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a tool from the sidebar to begin"})]})})]});function sn(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function Jce(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),sn(e.additionalItems)}function Vk(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const jc="__additional_property",bp="additionalProperties",$c="allOf",gn="anyOf",Ss="const",px="default",ZA="dependencies",efe="enum",yi="__errors",er="$id",XA="if",Np="items",tfe="_$junk_option_schema_id$_",Uw="$name",Qt="oneOf",mO="patternProperties",Tn="properties",nT="readonly",I8="required",_E="submitButtonOptions",tr="$ref",QA="__rjsf_ref",Nb="$schema",L8="root",U8="_",nfe=["discriminator","propertyName"],Fk="formContext",rfe="layoutGridLookupMap",WA="__rjsf_additionalProperties",q8="__rjsf_rootSchema",afe="ui:field",JA="ui:widget",vf="ui:options",gO="ui:globalOptions",ife="ui:definitions",ofe="https://json-schema.org/draft/2019-09/schema",qw="https://json-schema.org/draft/2020-12/schema";function xt(e={},t={}){return e?Object.keys(e).filter(r=>r.indexOf("ui:")===0).reduce((r,i)=>{const s=e[i];return i===JA&&sn(s)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),r):i===vf&&sn(s)?{...r,...s}:{...r,[i.substring(3)]:s}},{...t}):{...t}}function V8(e,t={},r){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:i=!0}=xt(t);return i===!1?i:e.maxProperties!==void 0&&r?Object.keys(r).length<e.maxProperties:!0}function yO(e){const t={[yi]:[],addError(r){this[yi].push(r)}};if(Array.isArray(e))return e.reduce((r,i,s)=>({...r,[s]:yO(i)}),t);if(Of(e)){const r=e;return Object.keys(r).reduce((i,s)=>({...i,[s]:yO(r[s])}),t)}return t}function ur(e,t){return Tne(e,t,(r,i)=>{if(typeof r=="function"&&typeof i=="function")return!0})}const sfe=Object.prototype;function zb(e){for(const t in e)if(sfe.hasOwnProperty.call(e,t))return!1;return!0}const lfe=["array","boolean","integer","null","number","object","string"];new Set(lfe);const ufe=["$defs","definitions","properties","patternProperties","dependencies"];new Set(ufe);const cfe=["items","allOf","oneOf","anyOf"];new Set(cfe);const ffe=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(ffe);function Vw(e){return typeof e=="object"}function Ll(e){return Vw(e)?zb(e):e===!0}function Vm(e,t){return e<t?-1:e>t?1:0}function rT(e,t){const r=e.length;if(r===0)return t;let i=t.length;if(i===0)return e;if(r<i){const l=e;e=t,t=l,i=r}const s=new Set(e);for(let l=0;l<i;l++)s.add(t[l]);return Array.from(s)}function dfe(e,t){const r=[];if(e.length===0||t.length===0)return r;if(e.length>t.length){const s=e;e=t,t=s}const i=new Set(t);for(let s=0;s<e.length&&i.size>0;s++){const l=e[s];i.delete(l)&&r.push(l)}return r}function Bk(e){return e.length===0}function aT(e){return(t,r)=>{const i=t.length-r.length;if(i!==0)return i;for(let s=0;s<t.length;s++)if(t[s]!==r[s]){const l=e(t[s],r[s]);if(l!==0)return l}return 0}}function F8(e,{threshold:t=12}={}){return r=>{const i=r.length;if(i===0)return r;if(i<=t){const c=[];let f=0;e:for(let d=0;d<i;d++){const h=r[d];for(let m=0;m<f;m++)if(e(h,c[m])===0)continue e;f=c.push(h)}return c}const s=r.slice().sort(e);let l=0;for(let c=1;c<i;c++)e(s[l],s[c])!==0&&++l!==c&&(s[l]=s[c]);return s.length=l+1,s}}function hfe(e){return(t,r)=>{const i=[];let s=t.length,l=r.length;if(s===0||l===0)return i;if(s>l){const m=t;t=r,r=m;const g=s;s=l,l=g}const c=[...t].sort(e),f=[...r].sort(e);let d=0,h=0;for(;d<s&&h<l;){const m=e(c[d],f[h]);m===0?((i.length===0||e(i[i.length-1],c[d])!==0)&&i.push(c[d]),d++,h++):m<0?d++:h++}return i}}function pfe(e,t){return r=>{if(e.has(r))return e.get(r);const i=t(r);return e.set(r,i),i}}const Hk=pfe,B8=()=>0,mfe=e=>e===void 0,gfe=e=>typeof e!="object",Gk={boolean:0,number:1,string:2};function yfe(e,t){const r=typeof e,i=typeof t;return r===i?Vm(e,t):Gk[r]-Gk[i]}function vfe(e,t){const r=e.length;if(r===0)return t;const i=t.length;if(i===0)return e;if(i>r){const c=e;e=t,t=c}const s=new Set(e),l=t.length;for(let c=0;c<l;c++){const f=t[c];s.has(f)||e.push(f)}return e}function mx(e,t,r=B8){return(i,s)=>e(i)?e(s)?r(i,s):-1:e(s)?1:t(i,s)}function Om(e){return mx(mfe,e)}function of(e,t){return mx(r=>r===void 0||e(r),t)}function iT(e,t){return mx(Array.isArray,e,t)}const oa=Om(Vm),oT=of(e=>e===0,(e,t)=>e-t);function bfe({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const r=Hk(t,S=>Object.keys(S).sort());function i(S){return(w,x)=>{const E=r(w),R=r(x),T=Math.min(E.length,R.length);for(let C=0;C<T;C++){const O=Vm(E[C],R[C]);if(O!==0)return O}if(E.length!==R.length)return E.length-R.length;for(let C=0;C<T;C++){const O=E[C],M=S(w[O],x[O]);if(M!==0)return M}return 0}}function s(S){const w=aT(S),x=Hk(e,F8(S,{threshold:0}));return(E,R)=>w(x(E),x(R))}const l=s(Vm);function c(S,w){if(Vw(S)){if(Vw(w)){const x=Object.keys(S),E=Object.keys(w),R=vfe(x,E),T=R.length;for(let C=0;C<T;C++){const O=R[C];if(S[O]===w[O])continue;const D=(b[O]??f)(S[O],w[O]);if(D!==0)return D}return 0}return w===!0&&zb(S)?0:1}return Vw(w)?S===!0&&zb(w)?0:-1:Vm(S,w)}const f=Om(h),d=mx(gfe,iT(i(f),aT(h)),yfe);function h(S,w){return S===null?-1:w===null?1:d(S,w)}const m=Om(c),g=of(zb,i(m)),v=Om(s(c)),_=of(Ll,c),b={$id:oa,$comment:oa,$defs:g,$ref:oa,$schema:oa,const:f,contains:m,contentEncoding:oa,contentMediaType:oa,default:f,definitions:g,description:oa,else:m,examples:f,exclusiveMaximum:oa,exclusiveMinimum:oa,format:oa,if:m,maximum:oa,maxItems:oa,maxLength:oa,maxProperties:oa,minimum:oa,multipleOf:oa,not:m,pattern:oa,propertyNames:m,readOnly:oa,then:m,title:oa,writeOnly:oa,uniqueItems:of(S=>S===!1,B8),minLength:oT,minItems:oT,minProperties:oT,required:of(Bk,l),enum:of(Bk,s(h)),type:Om((S,w)=>{const x=Array.isArray(S),E=Array.isArray(w);return!x&&!E?Vm(S,w):l(x?S:[S],E?w:[w])}),items:of(S=>!Array.isArray(S)&&Ll(S),iT(c,aT(c))),anyOf:v,allOf:v,oneOf:v,properties:g,patternProperties:g,additionalProperties:_,additionalItems:_,dependencies:of(zb,i(Om(iT(c,l))))};return{compareSchemaValues:h,compareSchemaDefinitions:c}}function Kk(e){return e}const H8=(e,t)=>e?H8(t%e,e):t,Sfe=(e,t)=>Math.abs(e*t)/H8(e,t);function wfe(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function*sT(e,t,r){const i=e.length,s=t.length;if(i>0&&s>0)for(let l=0;l<i;l++){const c=e[l];for(let f=0;f<s;f++)yield r(c,t[f])}}function lT(e,t){return e||t}function Yk(e){return(t,r)=>{const i={...t},s=Object.keys(r),l=s.length;for(let c=0;c<l;c++){const f=s[c];i[f]=t[f]===void 0?r[f]:e(t[f],r[f])}return i}}function Efe(e){const t=new Map;for(const r of e)for(const i of r[0])t.set(i,r[1]);return t}function cp(e,t,r){r===void 0||Ll(r)?delete e[t]:e[t]=r}const xfe=["properties","patternProperties","additionalProperties"];function Zk(e){const t=Object.keys(e),r=t.length,i=[];for(let s=0;s<r;s++){const l=t[s];i.push({regExp:new RegExp(l),schema:e[l]})}return[i,t]}const Xk=[[],[]];function Qk(e,t,r){const i=r.length;for(let s=0;s<i;s++){const l=r[s];if(!l.regExp.test(t))continue;const c=l.schema;if(c===!1)return!0;e.push(c)}return!1}const _fe=["items","additionalItems"],Tfe=["if","then","else"];function Wk(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function uT(e,t){if(e===t)return e;switch(e){case"number":if(t==="integer")return"integer";case"integer":if(t==="number")return"integer";default:return}}function fp(e,t,r){return[e,t,r]}function Cfe(e){const t=new Map;for(const[r,i,s]of e){const l=c=>{if(!s(c))throw new Error(`Schema keys '${r}' and '${i}' are conflicting (${r}: ${JSON.stringify(c[r])}, ${i}: ${JSON.stringify(c[i])})`)};for(const c of[[r,i],[i,r]]){let f=t.get(c[0]);f===void 0&&(f=[],t.set(c[0],f)),f.push({oppositeKey:c[1],check:l})}}return t}const Ofe=[fp("minimum","maximum",e=>e.maximum>=e.minimum),fp("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),fp("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),fp("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),fp("minLength","maxLength",e=>e.maxLength>=e.minLength),fp("minItems","maxItems",e=>e.maxItems>=e.minItems),fp("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function Rfe({mergePatterns:e=wfe,isSubRegExp:t=Object.is,intersectJson:r=dfe,deduplicateJsonSchemaDef:i=Kk,defaultMerger:s=Kk,assigners:l=[],checks:c=Ofe,mergers:f}={}){function d(T){const C=T.length;let O=T[0];for(let M=1;M<C;M++){const D=x(O,T[M]);if(D===!1)return!1;Ll(D)||(O=D)}return O}function h(T,C,O,M,D,U,B){if(T.length=0,O===!1)return!1;if(T.push(O),D!==void 0){if(D===!1)return!1;T.push(D)}if(Qk(T,C,U))return!1;const V=T.length<2;if(B===!1){if(V)return;if(Qk(T,C,M))return!1}else V&&B!==void 0&&T.push(B);return T.length===1?T[0]:d(T)}function m(T,C,O,M,D,U){const B=O.length;if(B>0&&D!==!1)if(U)Object.assign(T,C);else for(let q=0;q<B;q++){const V=O[q];M.has(V)||(T[V]=x(C[V],D))}return T}const g=(T,{properties:C={},patternProperties:O,additionalProperties:M=!0},{properties:D={},patternProperties:U,additionalProperties:B=!0})=>{const q=Ll(M),V=Ll(B);if(q&&V)return cp(T,"properties",E(C,D)),cp(T,"patternProperties",O&&U?E(O,U):O??U),delete T.additionalProperties,T;const G=x(M,B);cp(T,"additionalProperties",G);const ne={},oe=Object.keys(C),K=oe.length,[ee,re]=O?Zk(O):Xk,[ue,Q]=U?Zk(U):Xk,z=[],L=new Set,Y=V?void 0:B;for(let we=0;we<K;we++){const je=oe[we];L.add(je);const de=h(z,je,C[je],ee,D[je],ue,Y);de!==void 0&&(ne[je]=de)}const I=Object.keys(D),X=I.length,J=q?void 0:M;for(let we=0;we<X;we++){const je=I[we];if(L.has(je))continue;const de=h(z,je,D[je],ue,void 0,ee,J);de!==void 0&&(ne[je]=de)}cp(T,"properties",ne);let he={};const xe=new Set;if(re.length>0&&Q.length>0){const we=sT(re,Q,(je,de)=>{t(je,de)&&xe.add(je),t(de,je)&&xe.add(de),he[e(je,de)]=x(O[je],U[de])});for(;!we.next().done;);}return he=m(he,O,re,xe,B,V),he=m(he,U,Q,xe,M,q),cp(T,"patternProperties",he),T},v=(T,{items:C=[],additionalItems:O},{items:M=[],additionalItems:D})=>{const U=Array.isArray(C),B=Array.isArray(M),q=[];if(T.items=q,U&&B){const[V,G,ne]=C.length<M.length?[C.length,O,M]:[M.length,D,C];let oe=0;for(;oe<V;oe++)q.push(x(C[oe],M[oe]));if(G===!1)T.additionalItems=!1;else{const K=G===void 0||Ll(G);for(;oe<ne.length;oe++)q.push(K?ne[oe]:x(ne[oe],G));cp(T,"additionalItems",O!==void 0&&D!==void 0?x(O,D):O??D)}}else if(U||B){const[V,G,ne]=U?[C,M,O]:[M,C,D];cp(T,"additionalItems",ne&&x(ne,G));for(let oe=0;oe<V.length;oe++)q.push(x(V[oe],G))}else delete T.additionalItems,T.items=x(C,M);return T},_=(T,C,O)=>{Wk(T,C);const M=Wk({},O);return T.allOf===void 0?T.allOf=[M]:T.allOf=T.allOf.concat(M),T};function b(T,C){return i(Array.from(sT(T,C,x)))}const S=Efe([[xfe,g],[_fe,v],[Tfe,_],...l]),w=Cfe(c);function x(T,C){if(T===!1||C===!1)return!1;if(Ll(T))return Ll(C)?!0:C;if(Ll(C))return T;let O={...T};const M=new Set,D=new Set,U=Object.keys(C),B=U.length;for(let q=0;q<B;q++){const V=U[q],G=C[V];if(G===void 0)continue;const ne=w.get(V);if(ne!==void 0){const re=ne.length;for(let ue=0;ue<re;ue++){const Q=ne[ue];T[Q.oppositeKey]!==void 0&&D.add(Q.check)}}const oe=T[V];if(oe===void 0){O[V]=G;continue}const K=S.get(V);if(K){M.add(K);continue}const ee=R[V]??s;O[V]=ee(oe,G)}for(const q of M)O=q(O,T,C);for(const q of D)q(O);return O}const E=Yk(x),R={$id:s,$ref:s,$schema:s,$comment:s,$defs:E,definitions:E,type:(T,C)=>{if(T===C)return T;const O=Array.isArray(T),M=Array.isArray(C);if(!O&&!M){const D=uT(T,C);if(D!==void 0)return D}else if(O||M){const D=new Set;if(O&&M)for(const B of sT(T,C,uT))B!==void 0&&D.add(B);else{const B=O?T:C,q=O?C:T,V=B.length;for(let G=0;G<V;G++){const ne=uT(q,B[G]);ne!==void 0&&D.add(ne)}}const U=D.size;if(U===1)return D.values().next().value;if(U>1)return Array.from(D)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${T.toString()}, ${C.toString()}`)},default:s,description:s,title:s,const:s,format:s,contentEncoding:s,contentMediaType:s,not:(T,C)=>{const O=i([T,C]);return O.length===1?O[0]:{anyOf:O}},pattern:e,readOnly:lT,writeOnly:lT,enum:(T,C)=>{const O=r(T,C);if(O.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(T)}", "${JSON.stringify(C)}"`);return O},anyOf:b,oneOf:b,allOf:(T,C)=>i(T.concat(C)),propertyNames:x,contains:x,dependencies:Yk((T,C)=>Array.isArray(T)?Array.isArray(C)?rT(T,C):x(C,{required:T}):Array.isArray(C)?x(T,{required:C}):x(T,C)),examples:(T,C)=>{if(!Array.isArray(T)||!Array.isArray(C))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(T)}" and "${JSON.stringify(C)}"`);return rT(T,C)},multipleOf:(T,C)=>{let O=1;for(;!Number.isInteger(T)||!Number.isInteger(C);)O*=10,T*=10,C*=10;return Sfe(T,C)/O},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:lT,required:rT,...f};return{mergeSchemaDefinitions:x,mergeArrayOfSchemaDefinitions:d}}function Afe(e){const t=[],r=[e];for(;r.length>0;){const i=r.pop();if(typeof i=="boolean"||i.allOf===void 0){t.push(i);continue}const{allOf:s,...l}=i;t.push(l);for(let c=s.length-1;c>=0;c--)r.push(s[c])}return t}function Mfe(e){return t=>e(Afe(t))}var Eb={},Jk;function jfe(){if(Jk)return Eb;Jk=1;var e=/~/,t=/~[01]/g;function r(h){switch(h){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+h)}function i(h){return e.test(h)?h.replace(t,r):h}function s(h,m,g){for(var v,_,b=1,S=m.length;b<S;){if(m[b]==="constructor"||m[b]==="prototype"||m[b]==="__proto__")return h;if(v=i(m[b++]),_=S>b,typeof h[v]>"u"&&(Array.isArray(h)&&v==="-"&&(v=h.length),_&&(m[b]!==""&&m[b]<1/0||m[b]==="-"?h[v]=[]:h[v]={})),!_)break;h=h[v]}var w=h[v];return g===void 0?delete h[v]:h[v]=g,w}function l(h){if(typeof h=="string"){if(h=h.split("/"),h[0]==="")return h;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(h)){for(const m of h)if(typeof m!="string"&&typeof m!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return h}throw new Error("Invalid JSON pointer.")}function c(h,m){if(typeof h!="object")throw new Error("Invalid input object.");m=l(m);var g=m.length;if(g===1)return h;for(var v=1;v<g;){if(h=h[i(m[v++])],g===v)return h;if(typeof h!="object"||h===null)return}}function f(h,m,g){if(typeof h!="object")throw new Error("Invalid input object.");if(m=l(m),m.length===0)throw new Error("Invalid JSON pointer for set.");return s(h,m,g)}function d(h){var m=l(h);return{get:function(g){return c(g,m)},set:function(g,v){return f(g,m,v)}}}return Eb.get=c,Eb.set=f,Eb.compile=d,Eb}var kfe=jfe();const cT=tu(kfe);var Dfe=S$();const eM=tu(Dfe);function TE(e,t){if(er in e&&eM.equal(e[er],t))return e;for(const r of Object.values(e))if(Array.isArray(r)){for(const i of r)if(En(i)){const s=TE(i,t);if(s!==void 0)return s}}else if(En(r)){const i=TE(r,t);if(i!==void 0)return i}}function vO(e,t){const r=Le(e,er,t);tr in e&&(e={...e,[tr]:eM.resolve(r,e[tr])});for(const[i,s]of Object.entries(e))Array.isArray(s)?e={...e,[i]:s.map(l=>En(l)?vO(l,r):l)}:En(s)&&(e={...e,[i]:vO(s,r)});return e}function tM(e,t){const r=t[e];return[fg(t,[e]),r]}function G8(e,t={},r=[],i=Le(t,[er])){const s=e||"";let l;if(s.startsWith("#")){const f=decodeURIComponent(s.substring(1));i===void 0||er in t&&t[er]===i?l=cT.get(t,f):t[Nb]===qw&&(l=TE(t,i.replace(/\/$/,"")),l!==void 0&&(l=cT.get(l,f)))}else if(t[Nb]===qw){const f=i?eM.resolve(i,s):s,[d,...h]=f.replace(/#\/?$/,"").split("#");l=TE(t,d.replace(/\/$/,"")),l!==void 0&&(i=l[er],na(h)||(l=cT.get(l,decodeURIComponent(h.join("#")))))}if(l===void 0)throw new Error(`Could not find a definition for ${e}.`);const c=l[tr];if(c){if(r.includes(c)){if(r.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[m,...g]=r,v=[...g,s,m].join(" -> ");throw new Error(`Definition for ${m} contains a circular reference through ${v}`)}const[f,d]=tM(tr,l),h=G8(d,t,[...r,s],i);return Object.keys(f).length>0?t[Nb]===ofe||t[Nb]===qw?{[$c]:[f,h]}:{...f,...h}:h}return l}function nM(e,t={},r=Le(t,[er])){return G8(e,t,[],r)}function Wl(e){let t;const r=Le(e,nfe);return Rf(r)?t=r:r!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof r}" instead`),t}function y1(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":isNaN(e)?typeof e=="object"?"object":"string":"number"}function El(e){let{type:t}=e;return!t&&e.const?y1(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(r=>r!=="null"):t=t[0]),t)}function Pc(e,t){const r=Object.assign({},e);return Object.keys(t).reduce((i,s)=>{const l=e?e[s]:{},c=t[s];return e&&s in e&&sn(c)?i[s]=Pc(l,c):e&&t&&(El(e)==="object"||El(t)==="object")&&s===I8&&Array.isArray(l)&&Array.isArray(c)?i[s]=Hne(l,c):i[s]=c,i},r)}function K8(e,t,r){var i;if(e&&r){const s=Le(e,r);if(s===void 0)return;for(let l=0;l<t.length;l++){const c=t[l],f=Le(c,[Tn,r],{});if(!(f.type==="object"||f.type==="array")&&(f.const===s||!((i=f.enum)===null||i===void 0)&&i.includes(s)))return l}}}function rM(e,t,r,i,s){if(t===void 0)return 0;const l=K8(t,r,s);if(a$(l))return l;for(let c=0;c<r.length;c++){const f=r[c];if(s&&mn(f,[Tn,s])){const d=Le(t,s),h=Le(f,[Tn,s],{});if(e.isValid(h,d,i))return c}else if(f[Tn]){const d={anyOf:Object.keys(f[Tn]).map(m=>({required:[m]}))};let h;if(f.anyOf){const{...m}=f;m.allOf?m.allOf=m.allOf.slice():m.allOf=[],m.allOf.push(d),h=m}else h=Object.assign({},f,d);if(delete h.required,e.isValid(h,t,i))return c}else if(e.isValid(f,t,i))return c}return 0}function Si(e,t,r={},i,s,l=!1){return Bl(e,t,r,i,void 0,void 0,s,l)[0]}function Nfe(e,t,r,i,s,l,c){const{if:f,then:d,else:h,...m}=t,g=e.isValid(f,l||{},r);let v=[m],_=[];if(i)d&&typeof d!="boolean"&&(_=_.concat(Bl(e,d,r,l,i,s,c))),h&&typeof h!="boolean"&&(_=_.concat(Bl(e,h,r,l,i,s,c)));else{const b=g?d:h;b&&typeof b!="boolean"&&(_=_.concat(Bl(e,b,r,l,i,s,c)))}return _.length&&(v=_.map(b=>Pc(m,b))),v.flatMap(b=>Bl(e,b,r,l,i,s,c))}function Y8(e){return e.reduce((r,i)=>i.length>1?i.flatMap(s=>l$(r.length,l=>[...r[l]].concat(s))):(r.forEach(s=>s.push(i[0])),r),[[]])}function Z8(e,t){return Object.keys(e.patternProperties).filter(r=>RegExp(r).test(t)).reduce((r,i)=>(In(r,[i],e.patternProperties[i]),r),{})}function zfe(e,t,r,i,s,l,c,f){const d=X8(e,t,r,i,s,l,c,f);if(d.length>1||d[0]!==t)return d;if(ZA in t)return Q8(e,t,r,i,s,l,c).flatMap(m=>Bl(e,m,r,l,i,s,c));if($c in t&&Array.isArray(t[$c])){const h=t.allOf.map(g=>Bl(e,g,r,l,i,s,c));return Y8(h).map(g=>({...t,allOf:g}))}return[t]}function X8(e,t,r,i,s,l,c,f){const d=Xm(t,r,s,void 0,f);return d!==t?Bl(e,d,r,l,i,s,c,f):[t]}function Xm(e,t,r,i,s){if(!sn(e))return e;let l=e;if(tr in l){const{$ref:c,...f}=l;if(r.includes(c))return l;r.push(c),l={...nM(c,t,i),...f,[QA]:c},er in l&&(i=l[er])}if(Tn in l){const c=[],f=qne(l[Tn],(d,h,m)=>{const g=[...r];d[m]=Xm(h,t,g,i,s),c.push(g)},{});One(r,f$(lne(c))),l={...l,[Tn]:f}}if(Np in l&&!Array.isArray(l.items)&&typeof l.items!="boolean"&&(l={...l,items:Xm(l.items,t,r,i,s)}),s){let c,f;gn in e&&Array.isArray(e[gn])?(c=gn,f=l[gn]):Qt in e&&Array.isArray(e[Qt])&&(c=Qt,f=l[Qt]),c&&f&&(l={...l,[c]:f.map(d=>Xm(d,t,r,i,s))})}return ur(e,l)?e:l}function $fe(e,t,r,i,s){const l={...t,properties:{...t.properties}},c=i&&sn(i)?i:{};return Object.keys(c).forEach(f=>{if(!(f in l.properties)){if(mO in l){const d=Z8(l,f);if(!na(d)){l.properties[f]=Si(e,{[$c]:Object.values(d)},r,Le(c,[f]),s),In(l.properties,[f,jc],!0);return}}if(bp in l&&l.additionalProperties!==!1){let d;typeof l.additionalProperties!="boolean"?tr in l.additionalProperties?d=Si(e,{[tr]:Le(l.additionalProperties,[tr])},r,c,s):"type"in l.additionalProperties?d={...l.additionalProperties}:gn in l.additionalProperties||Qt in l.additionalProperties?d={type:"object",...l.additionalProperties}:d={type:y1(Le(c,[f]))}:d={type:y1(Le(c,[f]))},l.properties[f]=d,In(l.properties,[f,jc],!0)}else l.properties[f]={type:"null"},In(l.properties,[f,jc],!0)}}),l}const{compareSchemaDefinitions:Pfe,compareSchemaValues:Ife}=bfe(),{mergeArrayOfSchemaDefinitions:Lfe}=Rfe({intersectJson:hfe(Ife),deduplicateJsonSchemaDef:F8(Pfe)}),Ufe=Mfe(Lfe);function qfe(e){return Ufe(e)}function Bl(e,t,r,i,s=!1,l=[],c,f){return sn(t)?zfe(e,t,r,s,l,i,c,f).flatMap(h=>{var m;let g=h;if(XA in g)return Nfe(e,g,r,s,l,i,c);if($c in g){if(s){const{allOf:_,...b}=g;return[..._,b]}try{const _=[],b=[];(m=g.allOf)===null||m===void 0||m.forEach(S=>{typeof S=="object"&&S.contains?_.push(S):b.push(S)}),_.length&&(g={...g,allOf:b}),g=c?c(g):qfe(g),_.length&&(g.allOf=_)}catch(_){console.warn(`could not merge subschemas in allOf:
|
|
60
|
+
`,_);const{allOf:b,...S}=g;return S}}return Tn in g&&mO in g&&(g=Object.keys(g.properties).reduce((_,b)=>{const S=Z8(_,b);return na(S)||(_.properties[b]=Si(e,{allOf:[_.properties[b],...Object.values(S)]},r,Le(i,[b]),c)),_},{...g,properties:{...g.properties}})),mO in g||bp in g&&g.additionalProperties!==!1?$fe(e,g,r,i,c):g}):[{}]}function Vfe(e,t,r,i,s){let l;const{oneOf:c,anyOf:f,...d}=t;if(Array.isArray(c)?l=c:Array.isArray(f)&&(l=f),l){const h=s===void 0&&i?{}:s,m=Wl(t);l=l.map(v=>Xm(v,r,[]));const g=rM(e,h,l,r,m);if(i)return l.map(v=>Pc(d,v));t=Pc(d,l[g])}return[t]}function Q8(e,t,r,i,s,l,c){const{dependencies:f,...d}=t;return Vfe(e,d,r,i,l).flatMap(m=>W8(e,f,m,r,i,s,l,c))}function W8(e,t,r,i,s,l,c,f){let d=[r];for(const h in t){if(!s&&Le(c,[h])===void 0||r.properties&&!(h in r.properties))continue;const[m,g]=tM(h,t);return Array.isArray(g)?d[0]=Ffe(r,g):sn(g)&&(d=Bfe(e,r,i,h,g,s,l,c,f)),d.flatMap(v=>W8(e,m,v,i,s,l,c,f))}return d}function Ffe(e,t){if(!t)return e;const r=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:r}}function Bfe(e,t,r,i,s,l,c,f,d){return Bl(e,s,r,f,l,c,d).flatMap(m=>{const{oneOf:g,...v}=m;if(t=Pc(t,v),g===void 0)return t;const _=g.map(S=>typeof S=="boolean"||!(tr in S)?[S]:X8(e,S,r,l,c,f));return Y8(_).flatMap(S=>Hfe(e,t,r,i,S,l,c,f,d))})}function Hfe(e,t,r,i,s,l,c,f,d){const h=s.filter(m=>{if(typeof m=="boolean"||!m||!m.properties)return!1;const{[i]:g}=m.properties;if(g){const v={type:"object",properties:{[i]:g}};return e.isValid(v,f,r)||l}return!1});return!l&&h.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):h.flatMap(m=>{const g=m,[v]=tM(i,g.properties),_={...g,properties:v};return Bl(e,_,r,f,l,c,d).map(S=>Pc(t,S))})}function $b(e,t,r,i,s,l={},c){if(Array.isArray(r[s])){const d=Wl(r)||i,h=r[s].map(g=>Si(e,g,t,l,c)),m=Le(l,d);if(m!==void 0)return h.find(g=>gf(Le(g,[Tn,d,px],Le(g,[Tn,d,Ss])),m))}}function J8(e,t,r,i,s){let l=r;if(mn(r,tr)&&(l=Si(e,r,t,void 0,s)),na(i))return l;const c=Array.isArray(i)?i:i.split("."),[f,...d]=c;if(f&&mn(l,f))return l=Le(l,f),J8(e,t,l,d,s)}function Fw(e,t,r,i,s,l){const c=J8(e,t,r,i,l);return c===void 0?s:c}const eD={title:"!@#$_UNKNOWN_$#@!"};function Gfe(e,t,r,i,s={},l){const c=Array.isArray(i)?[...i]:i.split(".");let f=r;const d=c.pop();c.length&&c.forEach(v=>{f=Fw(e,t,f,[Tn,v],{},l),mn(f,Qt)?f=$b(e,t,f,d,Qt,Le(s,v),l):mn(f,gn)&&(f=$b(e,t,f,d,gn,Le(s,v),l))}),mn(f,Qt)?f=$b(e,t,f,d,Qt,s,l):mn(f,gn)&&(f=$b(e,t,f,d,gn,s,l));let h=Fw(e,t,f,[Tn,d],eD,l);h===eD&&(h=void 0);const m=Fw(e,t,f,I8,[],l);let g;return h&&Array.isArray(m)&&(g=m.includes(d)),{field:h,isRequired:g}}const Kfe={type:"object",$id:tfe,properties:{__not_really_there__:{type:"number"}}};function bO(e,t,r,i,s){let l=0;return r&&(En(r.properties)?l+=Pne(r.properties,(c,f,d)=>{const h=Le(i,d);if(typeof f=="boolean")return c;if(mn(f,tr)){const m=Si(e,f,t,h,s);return c+bO(e,t,m,h||{},s)}if((mn(f,Qt)||mn(f,gn))&&h){const m=mn(f,Qt)?Qt:gn,g=Wl(f);return c+v1(e,t,h,Le(f,m),-1,g,s)}if(f.type==="object")return En(h)&&(c+=1),c+bO(e,t,f,h,s);if(f.type===y1(h)){let m=c+1;return f.default?m+=h===f.default?1:-1:f.const&&(m+=h===f.const?1:-1),m}return c},0):Rf(r.type)&&r.type===y1(i)&&(l+=1)),l}function v1(e,t,r,i,s=-1,l,c){const f=i.map(v=>Xm(v,t,[])),d=K8(r,i,l);if(a$(d))return d;const h=f.reduce((v,_,b)=>(rM(e,r,[Kfe,_],t,l)===1&&v.push(b),v),[]);if(h.length===1)return h[0];h.length||l$(f.length,v=>h.push(v));const m=new Set,{bestIndex:g}=h.reduce((v,_)=>{const{bestScore:b}=v,S=f[_],w=bO(e,t,S,r,c);return m.add(w),w>b?{bestIndex:_,bestScore:w}:v},{bestIndex:s,bestScore:0});return m.size===1&&s>=0?s:g}function aM(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>sn(t))}function b1(e,t,r=!1,i=!1,s=!1){if(Array.isArray(t)){const l=Array.isArray(e)?e:[],c=s?l:t,f=s?t:l,d=c.map((h,m)=>f[m]!==void 0?b1(l[m],t[m],r,i,s):h);return(r||s)&&d.length<f.length&&d.push(...f.slice(d.length)),d}if(sn(t)){const l=Object.assign({},e);return Object.keys(t).reduce((c,f)=>{var d;const h=Le(t,f),m=sn(e)&&f in e,g=f in t,v=(d=Le(e,f))!==null&&d!==void 0?d:{},_=m&&Object.entries(v).some(([,w])=>sn(w)),b=m&&sn(Le(e,f)),S=g&&sn(h);return b&&S&&!_?(c[f]={...Le(e,f),...h},c):(c[f]=b1(Le(e,f),h,r,i,s&&(m||!g)),c)},l)}return i&&(e!==void 0&&dE(t)||typeof t=="number"&&isNaN(t))||s&&!dE(t)?e:t}function zp(e,t,r=!1){return Object.keys(t).reduce((i,s)=>{const l=e?e[s]:{},c=t[s];if(e&&s in e&&sn(c))i[s]=zp(l,c,r);else if(r&&Array.isArray(l)&&Array.isArray(c)){let f=c;r==="preventDuplicates"&&(f=c.reduce((d,h)=>(l.includes(h)||d.push(h),d),[])),i[s]=l.concat(f)}else i[s]=c;return i},Object.assign({},e))}function eI(e){return Array.isArray(e.enum)&&e.enum.length===1||Ss in e}function iM(e,t,r={},i){const s=Si(e,t,r,void 0,i),l=s.oneOf||s.anyOf;return Array.isArray(s.enum)?!0:Array.isArray(l)?l.every(c=>typeof c!="boolean"&&eI(c)):!1}function oM(e,t,r,i){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:iM(e,t.items,r,i)}function tI(e){const t=e[Ss],r=El(e);return sn(t)&&Rf(t?.$data)&&r!=="object"&&r!=="array"}function Yfe(e){if(efe in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(Ss in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function Zfe(e,t){const r=new Map(e.map(l=>[String(l.value),l])),i=new Set(t.filter(l=>l!=="*").map(String)),s=e.filter(l=>!i.has(String(l.value)));return t.flatMap(l=>{if(l==="*")return s;const c=r.get(String(l));return c?[c]:[]})}function hg(e,t){if(e.enum){let l,c;if(t){const{enumNames:d,enumOrder:h}=xt(t);l=d,c=h}let f=e.enum.map((d,h)=>({label:Array.isArray(l)?l[h]||String(d):l?.[String(d)]||String(d),value:d}));return c&&(f=Zfe(f,c)),f}let r,i;e.anyOf?(r=e.anyOf,i=t?.anyOf):e.oneOf&&(r=e.oneOf,i=t?.oneOf);let s=Wl(e);if(t){const{optionsSchemaSelector:l=s}=xt(t);s=l}return r&&r.map((l,c)=>{const{title:f}=xt(i?.[c]),d=l;let h,m=f;if(s){const g=Le(d,[Tn,s],{});h=Le(g,px,Le(g,Ss)),m=m||g?.title||d.title||String(h)}else h=Yfe(d),m=m||d.title||String(h);return{schema:d,label:m,value:h}})}const Xfe=["string","number","integer","boolean","null"];var pg;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(pg||(pg={}));function fT(e,t=pg.Ignore,r=-1){if(r>=0){if(Array.isArray(e.items)&&r<e.items.length){const i=e.items[r];if(typeof i!="boolean")return i}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==pg.Ignore&&sn(e.additionalItems)?e.additionalItems:{}}function nI(e,t){const{default:r,type:i}=e;return Array.isArray(i)&&i.includes("null")&&na(t)&&r===null?null:t}function tD(e,t,r,i,s,l=[],c={},f=!1,d=!1){const{emptyObjectFields:h="populateAllDefaults"}=c;if(i===!0||f)e[t]=r;else if(i==="excludeObjectChildren")(d&&r!==void 0||!sn(r)||!na(r))&&(e[t]=r);else if(h!=="skipDefaults"){const m=s===void 0?l.includes(t):s;sn(r)?h==="skipEmptyDefaults"?na(r)||(e[t]=r):(!na(r)||l.includes(t))&&(m||h!=="populateRequiredDefaults")&&(e[t]=r):r!==void 0&&(h==="populateAllDefaults"||h==="skipEmptyDefaults"||m&&l.includes(t))&&(e[t]=r)}}function bf(e,t,r={}){const{parentDefaults:i,rawFormData:s,rootSchema:l={},includeUndefinedValues:c=!1,_recurseList:f=[],experimental_defaultFormStateBehavior:d=void 0,experimental_customMergeAllOf:h=void 0,required:m,shouldMergeDefaultsIntoFormData:g=!1,initialDefaultsGenerated:v}=r;let _=sn(s)?s:{};const b=sn(t)?t:{};let S=i,w=null,x=d,E=f;if(b[Ss]!==void 0&&d?.constAsDefaults!=="never"&&!tI(b))S=b[Ss];else if(sn(S)&&sn(b.default)&&!b[gn]&&!b[Qt]&&!b[tr])S=zp(S,b.default);else if(px in b&&!b[gn]&&!b[Qt]&&!b[tr])S=b.default;else if(tr in b){const C=b[tr];f.includes(C)||(E=f.concat(C),w=nM(C,l));const O=s===void 0||sn(s)&&na(s);w&&!S&&O&&(S=b.default),g&&w&&!sn(s)&&(_=s)}else if(ZA in b){const C={...nD(e,b,r,S),..._};w=Q8(e,b,l,!1,[],C,h)[0]}else if(aM(b))S=b.items.map((C,O)=>bf(e,C,{rootSchema:l,includeUndefinedValues:c,_recurseList:f,experimental_defaultFormStateBehavior:d,experimental_customMergeAllOf:h,parentDefaults:Array.isArray(i)?i[O]:void 0,rawFormData:_,required:m,shouldMergeDefaultsIntoFormData:g}));else if(Qt in b){const{oneOf:C,...O}=b;if(C.length===0)return;const M=Wl(b),{type:D="null"}=O;!Array.isArray(D)&&Xfe.includes(D)&&x?.constAsDefaults==="skipOneOf"&&(x={...x,constAsDefaults:"never"}),w=C[v1(e,l,s??b.default,C,0,M,h)],w=Pc(O,w)}else if(gn in b){const{anyOf:C,...O}=b;if(C.length===0)return;const M=Wl(b);w=C[v1(e,l,s??b.default,C,0,M,h)],w=Pc(O,w)}if(w)return bf(e,w,{rootSchema:l,includeUndefinedValues:c,_recurseList:E,experimental_defaultFormStateBehavior:x,experimental_customMergeAllOf:h,parentDefaults:S,rawFormData:s??_,required:m,shouldMergeDefaultsIntoFormData:g,initialDefaultsGenerated:v});S===void 0&&(S=b.default);const R=nD(e,b,r,S);let T=R??S;if(g){const{arrayMinItems:C={}}=d||{},{mergeExtraDefaults:O}=C,M=Qfe(e,b,l,s,d,h);(!sn(s)||$c in b)&&(T=b1(T,M,O,!0))}return T}function Qfe(e,t,r,i,s,l){const c=!eI(t)&&iM(e,t,r,l);let f=i;if(c){const h=hg(t);f=h?.some(g=>ur(g.value,i))?i:void 0}return t[Ss]&&s?.constAsDefaults==="always"&&(f=t.const),f}function Wfe(e,t,{rawFormData:r,rootSchema:i={},includeUndefinedValues:s=!1,_recurseList:l=[],experimental_defaultFormStateBehavior:c=void 0,experimental_customMergeAllOf:f=void 0,required:d,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}={},g){{const v=sn(r)?r:{},_=t,S=c?.allOf==="populateDefaults"&&$c in _||c?.emptyObjectFields!=="skipEmptyDefaults"&&XA in _?Si(e,_,i,v,f):_,w=S[Ss],x=Object.keys(S.properties||{}).reduce((E,R)=>{var T;const C=Le(S,[Tn,R],{}),O=sn(w)&&w[R]!==void 0,M=(sn(C)&&Ss in C||O)&&c?.constAsDefaults!=="never"&&!tI(C),D=bf(e,C,{rootSchema:i,_recurseList:l,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:f,includeUndefinedValues:s===!0,parentDefaults:Le(g,[R]),rawFormData:Le(v,[R]),required:(T=S.required)===null||T===void 0?void 0:T.includes(R),shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m});return tD(E,R,D,s,d,S.required,c,M,C?.type==="null"),E},{});if(S.additionalProperties&&!m){const E=sn(S.additionalProperties)?S.additionalProperties:{},R=new Set;sn(g)&&Object.keys(g).filter(C=>!S.properties||!S.properties[C]).forEach(C=>R.add(C));const T=[];Object.keys(v).filter(C=>!S.properties||!S.properties[C]).forEach(C=>{R.add(C),T.push(C)}),R.forEach(C=>{var O;const M=bf(e,E,{rootSchema:i,_recurseList:l,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:f,includeUndefinedValues:s===!0,parentDefaults:Le(g,[C]),rawFormData:Le(v,[C]),required:(O=S.required)===null||O===void 0?void 0:O.includes(C),shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m});tD(x,C,M,s,d,T)})}return nI(t,x)}}function Jfe(e,t,{rawFormData:r,rootSchema:i={},_recurseList:s=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:c=void 0,required:f,requiredAsRoot:d=!1,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}={},g){var v,_;const b=t,S=(v=l?.arrayMinItems)!==null&&v!==void 0?v:{},{populate:w,mergeExtraDefaults:x}=S,E=w==="never",R=w==="requiredOnly",T=w==="all"||!E&&!R,C=(_=S?.computeSkipPopulate)!==null&&_!==void 0?_:(()=>!1),M=l?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(g)&&(g=g.map((q,V)=>{const G=fT(b,pg.Fallback,V),ne=Array.isArray(r)?r[V]:void 0;return bf(e,G,{rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,parentDefaults:q,rawFormData:ne,required:f,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m})})),Array.isArray(r)){const q=fT(b);if(E)g=r;else{const V=r.map((ne,oe)=>bf(e,q,{rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,rawFormData:ne,parentDefaults:Le(g,[oe]),required:f,shouldMergeDefaultsIntoFormData:h,initialDefaultsGenerated:m}));g=b1(g,V,(R&&f||T)&&x)}}if((sn(b)&&Ss in b&&l?.constAsDefaults!=="never")===!1){if(E)return g??M;if(R&&!f)return g||void 0}let U;const B=Array.isArray(g)?g.length:0;if(!b.minItems||oM(e,b,i,c)||C(e,b,i)||b.minItems<=B)U=g||!f&&!d?g:M;else{const q=g||[],V=fT(b,pg.Invert),G=V.default,ne=Array.from({length:b.minItems-B},()=>bf(e,V,{parentDefaults:G,rootSchema:i,_recurseList:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,required:f,shouldMergeDefaultsIntoFormData:h}));U=q.concat(ne)}return nI(t,U)}function nD(e,t,r={},i){switch(El(t)){case"object":return Wfe(e,t,r,i);case"array":return Jfe(e,t,r,i)}}function rI(e,t,r,i,s=!1,l,c,f){if(!sn(t))throw new Error("Invalid schema: "+t);const d=Si(e,t,i,r,c),h=bf(e,d,{rootSchema:i,includeUndefinedValues:s,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,rawFormData:r,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:f,requiredAsRoot:!0});if(d.type!=="object"&&sn(d.default))return{...h,...r};if(sn(r)||Array.isArray(r)){const{mergeDefaultsIntoFormData:m}=l||{};return b1(h,r,!0,m==="useDefaultIfFormDataUndefined",!0)}return h}function aI(e={}){return"widget"in xt(e)&&xt(e).widget!=="hidden"}function iI(e,t,r={},i,s){if(r[JA]==="files")return!0;if(t.items){const l=Si(e,t.items,i,void 0,s);return l.type==="string"&&l.format==="data-url"}return!1}function ede(e,t,r={},i,s,l){const c=xt(r,s),{label:f=!0}=c;let d=!!f;if(d){const h=El(t),m=Le(t,jc,!1);h==="array"&&(d=m||oM(e,t,i,l)||iI(e,t,r,i,l)||aI(r)),h==="object"&&(d=m),h==="boolean"&&r&&!r[JA]&&(d=!1),r&&r[afe]&&(d=!1)}return d}function sf(e,t,r,i,s,l=[],c){if(tr in t||ZA in t||$c in t||XA in t){const d=Si(e,t,i,s,c);if(l.findIndex(m=>ur(m,d))===-1)return sf(e,d,r,i,s,l.concat(d),c)}let f={[Uw]:r.replace(/^\./,"")};if(Qt in t||gn in t){const d=Qt in t?t.oneOf:t.anyOf,h=Wl(t),m=v1(e,i,s,d,0,h,c),g=d[m];f={...f,...sf(e,g,r,i,s,l,c)}}if(bp in t&&t[bp]!==!1){In(f,WA,!0);const d=En(t[bp])?t[bp]:{},h=Le(t,Tn,{});for(const m of Object.keys(s??{}))m in h||(f[m]=sf(e,d,`${r}.${m}`,i,Le(s,[m]),l,c))}if(Np in t&&Array.isArray(s)){const{items:d,additionalItems:h}=t;Array.isArray(d)?s.forEach((m,g)=>{d[g]?f[g]=sf(e,d[g],`${r}.${g}`,i,m,l,c):h?f[g]=sf(e,h,`${r}.${g}`,i,m,l,c):console.warn(`Unable to generate path schema for "${r}.${g}". No schema defined for it`)}):s.forEach((m,g)=>{f[g]=sf(e,d,`${r}.${g}`,i,m,l,c)})}else if(Tn in t)for(const d in t.properties){const h=Le(t,[Tn,d],{});f[d]=sf(e,h,`${r}.${d}`,i,Le(s,[d]),l,c)}return f}function oI(e,t,r="",i,s,l){return sf(e,t,r,i,s,void 0,l)}function sI(e,t){if(t.length===0&&typeof e!="object")return e;const r=iA(e,t);return Array.isArray(e)?Object.keys(r).map(i=>r[i]):r}function lI(e,t){const r=(s,l)=>typeof s!="object"||na(s)||l&&!na(s),i=(s,l=[],c=[[]])=>{const f=Object.keys(s);return f.forEach(d=>{const h=s[d];if(typeof h=="object"){const m=c.map(g=>[...g,d]);h[WA]&&h[Uw]!==""?l.push(h[Uw]):i(h,l,m)}else d===Uw&&h!==""&&c.forEach(m=>{const g=Le(t,m),v=f.length===1;(r(g,v)||Array.isArray(g)&&g.every(_=>r(_,v)))&&l.push(m)})}),l};return i(e)}function tde(e,t,r={},i){const s=Si(e,t,r,i),l=oI(e,s,"",r,i),f=lI(l,i).map(d=>Array.isArray(d)?d.join("."):d);return sI(i,f)}const Sm=Symbol("no Value");function SO(e,t,r,i,s={},l){let c;if(mn(r,Tn)){const f={};if(mn(i,Tn)){const m=Le(i,Tn,{});Object.keys(m).forEach(g=>{mn(s,g)&&(f[g]=void 0)})}const d=Object.keys(Le(r,Tn,{})),h={};d.forEach(m=>{const g=Le(s,m);let v=Le(i,[Tn,m],{}),_=Le(r,[Tn,m],{});mn(v,tr)&&(v=Si(e,v,t,g,l)),mn(_,tr)&&(_=Si(e,_,t,g,l));const b=Le(v,"type"),S=Le(_,"type");if(!b||b===S)if(mn(f,m)&&delete f[m],S==="object"||S==="array"&&Array.isArray(g)){const w=SO(e,t,_,v,g,l);(w!==void 0||S==="array")&&(h[m]=w)}else{const w=Le(_,"default",Sm),x=Le(v,"default",Sm);w!==Sm&&w!==g&&(x===g?f[m]=w:Le(_,"readOnly")===!0&&(f[m]=void 0));const E=Le(_,"const",Sm),R=Le(v,"const",Sm);E!==Sm&&E!==g&&(f[m]=R===g?E:void 0)}}),c={...typeof s=="string"||Array.isArray(s)?void 0:s,...f,...h}}else if(Le(i,"type")==="array"&&Le(r,"type")==="array"&&Array.isArray(s)){let f=Le(i,"items"),d=Le(r,"items");if(typeof f=="object"&&typeof d=="object"&&!Array.isArray(f)&&!Array.isArray(d)){mn(f,tr)&&(f=Si(e,f,t,s,l)),mn(d,tr)&&(d=Si(e,d,t,s,l));const h=Le(f,"type"),m=Le(d,"type");if(!h||h===m){const g=Le(r,"maxItems",-1);m==="object"?c=s.reduce((v,_)=>{const b=SO(e,t,d,f,_,l);return b!==void 0&&(g<0||v.length<g)&&v.push(b),v},[]):c=g>0&&s.length>g?s.slice(0,g):s}}else typeof f=="boolean"&&typeof d=="boolean"&&f===d&&(c=s)}return c}class nde{constructor(t,r,i,s){r&&r[Nb]===qw?this.rootSchema=vO(r,Le(r,er,"#")):this.rootSchema=r,this.validator=t,this.experimental_defaultFormStateBehavior=i,this.experimental_customMergeAllOf=s}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,r,i={},s){return!t||!r?!1:this.validator!==t||!ur(this.rootSchema,r)||!ur(this.experimental_defaultFormStateBehavior,i)||this.experimental_customMergeAllOf!==s}findFieldInSchema(t,r,i){return Gfe(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,r,i,s){return $b(this.validator,this.rootSchema,t,r,i,s,this.experimental_customMergeAllOf)}getDefaultFormState(t,r,i=!1,s){return rI(this.validator,t,r,this.rootSchema,i,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,s)}getDisplayLabel(t,r,i){return ede(this.validator,t,r,this.rootSchema,i,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,r,i,s){return v1(this.validator,this.rootSchema,t,r,i,s,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,r,i){return rM(this.validator,t,r,this.rootSchema,i)}getFromSchema(t,r,i){return Fw(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}isFilesArray(t,r){return iI(this.validator,t,r,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return oM(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return iM(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(t,r){return tde(this.validator,t,this.rootSchema,r)}retrieveSchema(t,r,i){return Si(this.validator,t,this.rootSchema,r,this.experimental_customMergeAllOf,i)}sanitizeDataForNewSchema(t,r,i){return SO(this.validator,this.rootSchema,t,r,i,this.experimental_customMergeAllOf)}toPathSchema(t,r,i){return oI(this.validator,t,r,this.rootSchema,i,this.experimental_customMergeAllOf)}}function rde(e,t,r={},i){return new nde(e,t,r,i)}function ade(e){var t;if(e.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const i=e.slice(5).split(";base64,");if(i.length!==2)throw new Error("File is invalid: dataURI must be base64");const[s,l]=i,[c,...f]=s.split(";"),d=c||"",h=decodeURI(((t=f.map(m=>m.split("=")).find(([m])=>m==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const m=atob(l),g=new Array(m.length);for(let _=0;_<m.length;_++)g[_]=m.charCodeAt(_);return{blob:new window.Blob([new Uint8Array(g)],{type:d}),name:h}}catch(m){throw new Error("File is invalid: "+m.message)}}function lf(e,t){let r=String(e);for(;r.length<t;)r="0"+r;return r}function uI(e,t){if(e<=0&&t<=0)e=new Date().getFullYear()+e,t=new Date().getFullYear()+t;else if(e<0||t<0)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);if(e>t)return uI(t,e).reverse();const r=[];for(let i=e;i<=t;i++)r.push({value:i,label:lf(i,2)});return r}function rD(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let s=0;s<r.length;s++){const l=r[s];if(!Object.prototype.hasOwnProperty.call(t,l)||!Object.is(e[l],t[l]))return!1}return!0}function ide(e,t){let r=e;if(Array.isArray(t)){const i=r.split(/(%\d)/);t.forEach((s,l)=>{const c=i.findIndex(f=>f===`%${l+1}`);c>=0&&(i[c]=s)}),r=i.join("")}return r}function ode(e,t){return ide(e,t)}function Da(e,t=[],r){if(Array.isArray(e))return e.map(l=>Da(l,t)).filter(l=>l!==r);const i=e===""||e===null?-1:Number(e),s=t[i];return s?s.value:r}function cI(e,t,r=[]){const i=Da(e,r);return Array.isArray(t)?t.filter(s=>!ur(s,i)):ur(i,t)?void 0:t}function Q1(e,t){return Array.isArray(t)?t.some(r=>ur(r,e)):ur(t,e)}function fI(e,t=[],r=!1){const i=t.map((s,l)=>Q1(s.value,e)?String(l):void 0).filter(s=>typeof s<"u");return r?i:i[0]}function dI(e,t,r=[]){const i=Da(e,r);if(!dE(i)){const s=r.findIndex(f=>i===f.value),l=r.map(({value:f})=>f);return t.slice(0,s).concat(i,t.slice(s)).sort((f,d)=>+(l.indexOf(f)>l.indexOf(d)))}return t}class hI{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let i=Array.isArray(t)&&t.length>0||typeof t=="string"?Le(this.errorSchema,t):this.errorSchema;return!i&&t&&(i={},Ine(this.errorSchema,t,i,Object)),i}resetAllErrors(t){return this.errorSchema=t?B1(t):{},this}addErrors(t,r){const i=this.getOrCreateErrorBlock(r);let s=Le(i,yi);return Array.isArray(s)||(s=[],i[yi]=s),Array.isArray(t)?In(i,yi,[...new Set([...s,...t])]):In(i,yi,[...new Set([...s,t])]),this}setErrors(t,r){const i=this.getOrCreateErrorBlock(r),s=Array.isArray(t)?[...new Set([...t])]:[t];return In(i,yi,s),this}clearErrors(t){const r=this.getOrCreateErrorBlock(t);return In(r,yi,[]),this}}function aD(e,t){const r=Of(e),i=Of(t);if(e===t||!r&&!i)return[];if(r&&!i)return ps(e);if(!r&&i)return ps(t);{const s=ps(Nne(e,(c,f)=>!ur(c,Le(t,f)))),l=ine(ps(t),ps(e));return[...s,...l]}}function sde(e,t,r=[1900,new Date().getFullYear()+2],i="YMD"){const{day:s,month:l,year:c,hour:f,minute:d,second:h}=e,m={type:"day",range:[1,31],value:s},g={type:"month",range:[1,12],value:l},v={type:"year",range:r,value:c},_=[];switch(i){case"MDY":_.push(g,m,v);break;case"DMY":_.push(m,g,v);break;default:_.push(v,g,m)}return t&&_.push({type:"hour",range:[0,23],value:f},{type:"minute",range:[0,59],value:d},{type:"second",range:[0,59],value:h}),_}function pI(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function mI(e,t,r={},i=!0){const s={type:t||"text",...pI(e)};return r.inputType?s.type=r.inputType:t||(e.type==="number"?(s.type="number",i&&s.step===void 0&&(s.step="any")):e.type==="integer"&&(s.type="number",s.step===void 0&&(s.step=1))),r.autocomplete&&(s.autoComplete=r.autocomplete),r.accept&&(s.accept=r.accept),s}const iD={props:{disabled:!1},submitText:"Submit",norender:!1};function gI(e={}){const t=xt(e);if(t&&t[_E]){const r=t[_E];return{...iD,...r}}return iD}function kt(e,t,r={}){const{templates:i}=t;if(e==="ButtonTemplates")return i[e];if(Object.hasOwn(r,e)&&typeof r[e]=="string"&&Object.hasOwn(i,r[e])){const s=r[e];return i[s]}return r[e]||i[e]}function sM(){if(typeof process>"u"||Le(process,"env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,r){return e.has(r)||e.set(r,d$("test-id-")),e.get(r)}})}var dT={exports:{}},Pn={};var oD;function lde(){if(oD)return Pn;oD=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function S(w){if(typeof w=="object"&&w!==null){var x=w.$$typeof;switch(x){case e:switch(w=w.type,w){case r:case s:case i:case h:case m:return w;default:switch(w=w&&w.$$typeof,w){case f:case c:case d:case v:case g:case l:return w;default:return x}}case t:return x}}}return Pn.ContextConsumer=c,Pn.ContextProvider=l,Pn.Element=e,Pn.ForwardRef=d,Pn.Fragment=r,Pn.Lazy=v,Pn.Memo=g,Pn.Portal=t,Pn.Profiler=s,Pn.StrictMode=i,Pn.Suspense=h,Pn.SuspenseList=m,Pn.isAsyncMode=function(){return!1},Pn.isConcurrentMode=function(){return!1},Pn.isContextConsumer=function(w){return S(w)===c},Pn.isContextProvider=function(w){return S(w)===l},Pn.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},Pn.isForwardRef=function(w){return S(w)===d},Pn.isFragment=function(w){return S(w)===r},Pn.isLazy=function(w){return S(w)===v},Pn.isMemo=function(w){return S(w)===g},Pn.isPortal=function(w){return S(w)===t},Pn.isProfiler=function(w){return S(w)===s},Pn.isStrictMode=function(w){return S(w)===i},Pn.isSuspense=function(w){return S(w)===h},Pn.isSuspenseList=function(w){return S(w)===m},Pn.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===s||w===i||w===h||w===m||w===_||typeof w=="object"&&w!==null&&(w.$$typeof===v||w.$$typeof===g||w.$$typeof===l||w.$$typeof===c||w.$$typeof===d||w.$$typeof===b||w.getModuleId!==void 0)},Pn.typeOf=S,Pn}var sD;function ude(){return sD||(sD=1,dT.exports=lde()),dT.exports}var cde=ude();const lD=tu(cde),hT={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function fde(e){let t=Le(e,"MergedWidget");if(!t){const r=e.defaultProps&&e.defaultProps.options||{};t=({options:i,...s})=>k.jsx(e,{options:{...r,...i},...s}),In(e,"MergedWidget",t)}return t}function Jl(e,t,r={}){const i=El(e);if(typeof t=="function"||t&&lD.isForwardRef(j.createElement(t))||lD.isMemo(t))return fde(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in r){const s=r[t];return Jl(e,s,r)}if(typeof i=="string"){if(!(i in hT))throw new Error(`No widget for type '${i}' in schema: ${JSON.stringify(e)}`);if(t in hT[i]){const s=r[hT[i][t]];return Jl(e,s,r)}}throw new Error(`No widget '${t}' for type '${i}' in schema: ${JSON.stringify(e)}`)}function dde(e){let t=0;for(let r=0;r<e.length;r+=1){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return t.toString(16)}function hde(e){const t=new Set;return JSON.stringify(e,(r,i)=>(t.add(r),i)),JSON.stringify(e,Array.from(t).sort())}function Hl(e){return dde(hde(e))}function pde(e){return Hl(e)}function mde(e,t,r={}){try{return Jl(e,t,r),!0}catch(i){const s=i;if(s.message&&(s.message.startsWith("No widget")||s.message.startsWith("Unsupported widget")))return!1;throw i}}function Zp(e,t){return`${Rf(e)?e:e[er]}__${t}`}function Xp(e){return Zp(e,"description")}function lM(e){return Zp(e,"error")}function gx(e){return Zp(e,"examples")}function uM(e){return Zp(e,"help")}function yx(e){return Zp(e,"title")}function go(e,t=!1){const r=t?` ${gx(e)}`:"";return`${lM(e)} ${Xp(e)} ${uM(e)}${r}`}function xp(e,t){return`${e}-${t}`}function Gl(e,t){return Zp(e,t)}function pT(e,t){return Zp(e,`optional${t}`)}function zg(e){return!dE(e)&&(!En(e)||Array.isArray(e)||!na(e))}function gde(e,t){const{rootSchema:r,schemaUtils:i}=e;if(gf(t,r))return!0;if(tr in r){const s=i.retrieveSchema(r);return gf(t,fg(s,QA))}return!1}function yI(e,t,r){return t?r:e}function yde(e){return e?new Date(e).toJSON():void 0}function cM(e,t,r){const i=[rfe];return mn(e,Fk)&&i.unshift(Fk),Le(e,[...i,t],r)}function vde(e,t){if(!Array.isArray(t))return e;const r=m=>m.reduce((g,v)=>(g[v]=!0,g),{}),i=m=>m.length>1?`properties '${m.join("', '")}'`:`property '${m[0]}'`,s=r(e),l=t.filter(m=>m==="*"||s[m]),c=r(l),f=e.filter(m=>!c[m]),d=l.indexOf("*");if(d===-1){if(f.length)throw new Error(`uiSchema order list does not contain ${i(f)}`);return l}if(d!==l.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const h=[...l];return h.splice(d,1,...f),h}function mT(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const r=new Date(e);if(Number.isNaN(r.getTime()))throw new Error("Unable to parse date "+e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:t?r.getUTCHours():0,minute:t?r.getUTCMinutes():0,second:t?r.getUTCSeconds():0}}const bde=[Np,bp],Sde=[Qt,gn,$c];function Bw(e,t,r,i=new Set){const{rootSchema:s,uiSchemaDefinitions:l}=r;let c={...t},f=e;const d=e[tr],h=d&&i.has(d);if(d){if(i.add(d),l&&d in l&&(c=zp(l[d],c)),h)return c;try{f=nM(d,s)}catch{f=e}}const m=f[Tn];if(m&&sn(m))for(const[g,v]of Object.entries(m)){const _=c[g]||{},b=Bw(v,_,r,new Set(i));Object.keys(b).length>0&&(c[g]=b)}for(const g of bde){const v=f[g];if(v&&sn(v)&&!Array.isArray(v)){const _=c[g];if(typeof _!="function"){const S=Bw(v,_||{},r,new Set(i));Object.keys(S).length>0&&(c[g]=S)}}}for(const g of Sde){const v=f[g];if(Array.isArray(v)&&v.length>0){const _=c[g],b=Array.isArray(_)?[..._]:[];let S=!1;for(let w=0;w<v.length;w++){const x=v[w],E=b[w]||{},R=Bw(x,E,r,new Set(i));Object.keys(R).length>0&&(b[w]=R,S=!0)}S&&(c[g]=b)}}return c}function wde(e,t,r){var i,s;const l=(i=e[QA])!==null&&i!==void 0?i:e[tr],c=l?(s=r.uiSchemaDefinitions)===null||s===void 0?void 0:s[l]:void 0;return c?!t||Object.keys(t).length===0?{...c}:zp(c,t):t||{}}function Yb(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return Yb(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return Yb(e.oneOf[0]);if(e.allOf){const t=r=>Yb(r);return e.allOf.some(t)}return!1}function vI(e,t,r,i="customDeep"){if(i==="always")return!0;if(i==="shallow"){const{props:c,state:f}=e;return!rD(c,t)||!rD(f,r)}const{props:s,state:l}=e;return!ur(s,t)||!ur(l,r)}function uD(e){const t=f$(e.map(r=>En(r)?El(r):void 0).flat().filter(r=>r!==void 0));return t.length===1?t[0]:t}function W1(e,t,r,i){const{enableOptionalDataFieldForType:s=[]}=xt(i,e.globalUiOptions);let l;return gn in t&&Array.isArray(t[gn])?l=uD(t[gn]):Qt in t&&Array.isArray(t[Qt])?l=uD(t[Qt]):l=El(t),!gde(e,t)&&!r&&!!l&&!Array.isArray(l)&&!!s.find(c=>c===l)}function cD(e,t=!0){const{year:r,month:i,day:s,hour:l=0,minute:c=0,second:f=0}=e,d=Date.UTC(r,i-1,s,l,c,f),h=new Date(d).toJSON();return t?h:h.slice(0,10)}function fM(e,t=[]){if(!e)return[];let r=[];return yi in e&&(r=r.concat(e[yi].map(i=>{const s=`.${t.join(".")}`;return{property:s,message:i,stack:`${s} ${i}`}}))),Object.keys(e).reduce((i,s)=>{if(s!==yi){const l=e[s];Of(l)&&(i=i.concat(fM(l,[...t,s])))}return i},r)}function Ede(e){const t=new hI;return e.length&&e.forEach(r=>{const{property:i,message:s}=r,l=i==="."?[]:u$(i);l.length>0&&l[0]===""&&l.splice(0,1),s&&t.addErrors(s,l)}),t.ErrorSchema}function ws(e,t,r,i){const s=Array.isArray(r)?r:r?.path,l=e===""?[]:[e],c=s?s.concat(...l):l,f=[t.idPrefix,...c].join(t.idSeparator);let d;return t.nameGenerator&&c.length>0&&(d=t.nameGenerator(c,t.idPrefix,i)),{path:c,[er]:f,...d!==void 0&&{name:d}}}function bI(e){return Object.keys(e).reduce((t,r)=>{if(r==="addError")return t;{const i=e[r];return Of(i)?{...t,[r]:bI(i)}:{...t,[r]:i}}},{})}function xde(e){return Object.values(e).every(t=>t!==-1)}function _de(e){const{className:t="form-control",type:r,range:i,value:s,select:l,rootId:c,name:f,disabled:d,readonly:h,autofocus:m,registry:g,onBlur:v,onFocus:_}=e,b=`${c}_${r}`,{SelectWidget:S}=g.widgets,w=j.useCallback(x=>l(r,x),[l,r]);return k.jsx(S,{schema:{type:"integer"},id:b,name:f,className:t,options:{enumOptions:uI(i[0],i[1])},placeholder:r,value:s,disabled:d,readonly:h,autofocus:m,onChange:w,onBlur:v,onFocus:_,registry:g,label:"","aria-describedby":go(c)})}function Tde(e){const{time:t=!1,disabled:r=!1,readonly:i=!1,options:s,onChange:l,value:c}=e,[f,d]=j.useState(mT(c,t));j.useEffect(()=>{d(mT(c,t))},[t,c]);const h=j.useCallback((_,b)=>{const S={...f,[_]:typeof b>"u"?-1:b};xde(S)?l(cD(S,t)):d(S)},[f,l,t]),m=j.useCallback(_=>{_.preventDefault(),!(r||i)&&l(void 0)},[r,i,l]),g=j.useCallback(_=>{if(_.preventDefault(),r||i)return;const b=mT(new Date().toJSON(),t);l(cD(b,t))},[r,i,t,l]);return{elements:j.useMemo(()=>sde(f,t,s.yearsRange,s.format),[f,t,s.yearsRange,s.format]),handleChange:h,handleClear:m,handleSetNow:g}}function Qp(e){const t=j.useRef(e);return gf(e,t.current)||(t.current=e),t.current}function Cde(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function Ode(e){const{name:t,size:r,type:i}=e;return new Promise((s,l)=>{const c=new window.FileReader;c.onerror=l,c.onload=f=>{var d;typeof((d=f.target)===null||d===void 0?void 0:d.result)=="string"?s({dataURL:Cde(f.target.result,t),name:t,size:r,type:i}):s({dataURL:null,name:t,size:r,type:i})},c.readAsDataURL(e)})}function Rde(e){return Promise.all(Array.from(e).map(Ode))}function fD(e){return e.reduce((t,r)=>{if(!r)return t;try{const{blob:i,name:s}=ade(r);return[...t,{dataURL:r,name:s,size:i.size,type:i.type}]}catch{return t}},[])}function Ade(e,t,r=!1){const i=j.useMemo(()=>r&&e?Array.isArray(e)?e:[e]:[],[e,r]),s=j.useMemo(()=>Array.isArray(e)?fD(e):fD([e||""]),[e]),l=j.useCallback(f=>{Rde(f).then(d=>{const h=d.map(m=>m.dataURL||null);t(r?i.concat(...h):h[0])})},[i,r,t]),c=j.useCallback(f=>{if(r){const d=i.filter((h,m)=>m!==f);t(d)}else t(void 0)},[i,r,t]);return{filesInfo:s,handleChange:l,handleRemove:c}}function Mde(e){if(!e)return"";const t=new Date(e),r=lf(t.getFullYear(),4),i=lf(t.getMonth()+1,2),s=lf(t.getDate(),2),l=lf(t.getHours(),2),c=lf(t.getMinutes(),2),f=lf(t.getSeconds(),2),d=lf(t.getMilliseconds(),3);return`${r}-${i}-${s}T${l}:${c}:${f}.${d}`}function Pb(e,t,r=!1){if(!t)return e;const{errors:i,errorSchema:s}=e;let l=fM(t),c=t;return na(s)||(c=zp(s,t,r?"preventDuplicates":!0),l=[...i].concat(l)),{errorSchema:c,errors:l}}function jde(e){for(const t in e){const r=e,i=r[t];t===tr&&typeof i=="string"&&i.startsWith("#")?r[t]=q8+i:r[t]=dM(i)}return e}function kde(e){for(let t=0;t<e.length;t++)e[t]=dM(e[t]);return e}function dM(e){return Array.isArray(e)?kde([...e]):En(e)?jde({...e}):e}var tn;(function(e){e.ArrayItemTitle="Item",e.MissingItems="Missing items definition",e.EmptyArray="No items yet. Use the button below to add some.",e.YesLabel="Yes",e.NoLabel="No",e.CloseLabel="Close",e.ErrorsLabel="Errors",e.NewStringDefault="New Value",e.AddButton="Add",e.AddItemButton="Add Item",e.CopyButton="Copy",e.MoveDownButton="Move down",e.MoveUpButton="Move up",e.RemoveButton="Remove",e.NowLabel="Now",e.ClearLabel="Clear",e.AriaDateLabel="Select a date",e.PreviewLabel="Preview",e.DecrementAriaLabel="Decrease value by 1",e.IncrementAriaLabel="Increase value by 1",e.OptionalObjectAdd="Add data for optional field",e.OptionalObjectRemove="Remove data for optional field",e.OptionalObjectEmptyMsg="No data for optional field",e.Type="Type",e.Value="Value",e.ClearButton="clear input",e.UnknownFieldType="Unknown field type %1",e.OptionPrefix="Option %1",e.TitleOptionPrefix="%1 option %2",e.KeyLabel="%1 Key",e.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',e.UnsupportedField="Unsupported field schema.",e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo="**%1** (%2, %3 bytes)"})(tn||(tn={}));function wO(){return d$("rjsf-array-item-")}function dD(e){return Array.isArray(e)?e.map(t=>({key:wO(),item:t})):[]}function SI(e){return Array.isArray(e)?e.map(t=>t.item):[]}function Dde(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function wI(e,t,r,i){let{addable:s}=xt(i,e.globalUiOptions);return s!==!1&&(t.maxItems!==void 0?s=r.length<t.maxItems:s=!0),s}function EI(e,t,r,i){if(typeof e.items=="function")try{return e.items(t,r,i)}catch(s){console.error(`Error executing dynamic uiSchema.items function for item at index ${r}:`,s);return}else return e.items}function Nde(e,t){const{schemaUtils:r,globalFormOptions:i}=e;let s=t.items;return i.useFallbackUiForUnsupportedType&&!s?s={}:aM(t)&&Jce(t)&&(s=t.additionalItems),r.getDefaultFormState(s)}function zde(e){const{schema:t,fieldPathId:r,uiSchema:i,formData:s=[],disabled:l=!1,readonly:c=!1,autofocus:f=!1,required:d=!1,placeholder:h,onBlur:m,onFocus:g,registry:v,rawErrors:_,name:b,onSelectChange:S}=e,{widgets:w,schemaUtils:x,globalFormOptions:E,globalUiOptions:R}=v,T=x.retrieveSchema(t.items,s),C=i?.items??{},O=hg(T,C),{widget:M="select",title:D,...U}=xt(i,R),B=Jl(t,M,w),q=D??t.title??b,V=x.getDisplayLabel(t,i,R),G=Qp(ws("",E,r,!0));return k.jsx(B,{id:G[er],name:b,multiple:!0,onChange:S,onBlur:m,onFocus:g,options:{...U,enumOptions:O},schema:t,uiSchema:i,registry:v,value:s,disabled:l,readonly:c,required:d,label:q,hideLabel:!V,placeholder:h,autofocus:f,rawErrors:_,htmlName:G.name})}function $de(e){const{schema:t,fieldPathId:r,uiSchema:i,disabled:s=!1,readonly:l=!1,autofocus:c=!1,required:f=!1,hideError:d,placeholder:h,onBlur:m,onFocus:g,formData:v=[],registry:_,rawErrors:b,name:S,onSelectChange:w}=e,{widgets:x,schemaUtils:E,globalFormOptions:R,globalUiOptions:T}=_,{widget:C,title:O,...M}=xt(i,T),D=Jl(t,C,x),U=O??t.title??S,B=E.getDisplayLabel(t,i,T),q=Qp(ws("",R,r,!0));return k.jsx(D,{id:q[er],name:S,multiple:!0,onChange:w,onBlur:m,onFocus:g,options:M,schema:t,uiSchema:i,registry:_,value:v,disabled:s,readonly:l,hideError:d,required:f,label:U,hideLabel:!B,placeholder:h,autofocus:c,rawErrors:b,htmlName:q.name})}function Pde(e){const{schema:t,uiSchema:r,fieldPathId:i,name:s,disabled:l=!1,readonly:c=!1,autofocus:f=!1,required:d=!1,onBlur:h,onFocus:m,registry:g,formData:v=[],rawErrors:_,onSelectChange:b}=e,{widgets:S,schemaUtils:w,globalFormOptions:x,globalUiOptions:E}=g,{widget:R="files",title:T,...C}=xt(r,E),O=Jl(t,R,S),M=T??t.title??s,D=w.getDisplayLabel(t,r,E),U=Qp(ws("",x,i,!0));return k.jsx(O,{options:C,id:U[er],name:s,multiple:!0,onChange:b,onBlur:h,onFocus:m,schema:t,uiSchema:r,value:v,disabled:l,readonly:c,required:d,registry:g,autofocus:f,rawErrors:_,label:M,hideLabel:!D,htmlName:U.name})}function xI(e){const{itemKey:t,index:r,name:i,disabled:s,hideError:l,readonly:c,registry:f,uiOptions:d,parentUiSchema:h,canAdd:m,canRemove:g=!0,canMoveUp:v,canMoveDown:_,itemSchema:b,itemData:S,itemUiSchema:w,itemFieldPathId:x,itemErrorSchema:E,autofocus:R,onBlur:T,onFocus:C,onChange:O,rawErrors:M,totalItems:D,title:U,handleAddItem:B,handleCopyItem:q,handleRemoveItem:V,handleReorderItems:G}=e,{schemaUtils:ne,fields:{ArraySchemaField:oe,SchemaField:K},globalUiOptions:ee}=f,re=Qp(x),ue=oe||K,Q=kt("ArrayFieldItemTemplate",f,d),z=ne.getDisplayLabel(b,w,ee),{description:L}=xt(w),Y=!!L||!!b.description,{orderable:I=!0,removable:X=!0,copyable:J=!1}=d,he={moveUp:I&&v,moveDown:I&&_,copy:J&&m,remove:X&&g,toolbar:!1};he.toolbar=Object.keys(he).some(be=>he[be]);const xe=j.useCallback(be=>{B(be,r+1)},[B,r]),we=j.useCallback(be=>{q(be,r)},[q,r]),je=j.useCallback(be=>{V(be,r)},[V,r]),de=j.useCallback(be=>{G(be,r,r-1)},[G,r]),se=j.useCallback(be=>{G(be,r,r+1)},[G,r]),ye={children:k.jsx(ue,{name:i,title:U,index:r,schema:b,uiSchema:w,formData:S,errorSchema:E,fieldPathId:re,required:Dde(b),onChange:O,onBlur:T,onFocus:C,registry:f,disabled:s,readonly:c,hideError:l,autofocus:R,rawErrors:M}),buttonsProps:{fieldPathId:re,disabled:s,readonly:c,canAdd:m,hasCopy:he.copy,hasMoveUp:he.moveUp,hasMoveDown:he.moveDown,hasRemove:he.remove,index:r,totalItems:D,onAddItem:xe,onCopyItem:we,onRemoveItem:je,onMoveUpItem:de,onMoveDownItem:se,registry:f,schema:b,uiSchema:w},itemKey:t,className:"rjsf-array-item",disabled:s,hasToolbar:he.toolbar,index:r,totalItems:D,readonly:c,registry:f,schema:b,uiSchema:w,parentUiSchema:h,displayLabel:z,hasDescription:Y};return k.jsx(Q,{...ye})}function Ide(e){const{schema:t,uiSchema:r={},errorSchema:i,fieldPathId:s,formData:l,name:c,title:f,disabled:d=!1,readonly:h=!1,autofocus:m=!1,required:g=!1,hideError:v=!1,registry:_,onBlur:b,onFocus:S,rawErrors:w,onChange:x,keyedFormData:E,handleAddItem:R,handleCopyItem:T,handleRemoveItem:C,handleReorderItems:O}=e,M=t.title||f||c,{schemaUtils:D,fields:U,formContext:B,globalFormOptions:q,globalUiOptions:V}=_,{OptionalDataControlsField:G}=U,ne=xt(r,V),oe=En(t.items)?t.items:{},K=D.retrieveSchema(oe),ee=SI(E),re=W1(_,t,g,r),ue=zg(l),Q=wI(_,t,ee,r)&&(!re||ue),z=ue?E:[],L=re?" rjsf-optional-array-field":"",Y=e.childFieldPathId??s,I=re?k.jsx(G,{...e,fieldPathId:Y}):void 0,X={canAdd:Q,items:z.map((he,xe)=>{const{key:we,item:je}=he,de=je,se=D.retrieveSchema(oe,de),ye=i?i[xe]:void 0,be=ws(xe,q,Y),Ae=EI(r,je,xe,B),Oe={itemKey:we,index:xe,name:c&&`${c}-${xe}`,registry:_,uiOptions:ne,hideError:v,readonly:h,disabled:d,required:g,title:M?`${M}-${xe+1}`:void 0,canAdd:Q,canMoveUp:xe>0,canMoveDown:xe<ee.length-1,itemSchema:se,itemFieldPathId:be,itemErrorSchema:ye,itemData:de,itemUiSchema:Ae,autofocus:m&&xe===0,onBlur:b,onFocus:S,rawErrors:w,totalItems:E.length,handleAddItem:R,handleCopyItem:T,handleRemoveItem:C,handleReorderItems:O,onChange:x};return k.jsx(xI,{...Oe},we)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${K.type}${L}`,disabled:d,fieldPathId:s,uiSchema:r,onAddClick:R,readonly:h,required:g,schema:t,title:M,formData:ee,rawErrors:w,registry:_,optionalDataControl:I},J=kt("ArrayFieldTemplate",_,ne);return k.jsx(J,{...X})}function Lde(e){const{schema:t,uiSchema:r={},formData:i,errorSchema:s,fieldPathId:l,name:c,title:f,disabled:d=!1,readonly:h=!1,autofocus:m=!1,required:g=!1,hideError:v=!1,registry:_,onBlur:b,onFocus:S,rawErrors:w,keyedFormData:x,onChange:E,handleAddItem:R,handleCopyItem:T,handleRemoveItem:C,handleReorderItems:O}=e;let{formData:M=[]}=e;const D=t.title||f||c,{schemaUtils:U,fields:B,formContext:q,globalFormOptions:V,globalUiOptions:G}=_,ne=xt(r,G),{OptionalDataControlsField:oe}=B,K=W1(_,t,g,r),ee=zg(i),ue=(En(t.items)?t.items:[]).map((xe,we)=>U.retrieveSchema(xe,M[we])),Q=En(t.additionalItems)?U.retrieveSchema(t.additionalItems,i):null,z=e.childFieldPathId??l;M.length<ue.length&&(M=M.concat(new Array(ue.length-M.length)));const L=ee?x:[],Y=K?" rjsf-optional-array-field":"",I=K?k.jsx(oe,{...e,fieldPathId:z}):void 0,X=wI(_,t,M,r)&&!!Q&&(!K||ee),J={canAdd:X,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${Y}`,disabled:d,fieldPathId:l,formData:i,items:L.map((xe,we)=>{const{key:je,item:de}=xe,se=de,ye=we>=ue.length,be=(ye&&En(t.additionalItems)?U.retrieveSchema(t.additionalItems,se):ue[we])||{},Ae=ws(we,V,z);let Oe;ye?Oe=r.additionalItems:Array.isArray(r.items)?Oe=r.items[we]:Oe=EI(r,de,we,q);const Ie=s?s[we]:void 0,$e={index:we,itemKey:je,name:c&&`${c}-${we}`,registry:_,uiOptions:ne,hideError:v,readonly:h,disabled:d,required:g,title:D?`${D}-${we+1}`:void 0,canAdd:X,canRemove:ye,canMoveUp:we>=ue.length+1,canMoveDown:ye&&we<M.length-1,itemSchema:be,itemData:se,itemUiSchema:Oe,itemFieldPathId:Ae,itemErrorSchema:Ie,autofocus:m&&we===0,onBlur:b,onFocus:S,rawErrors:w,totalItems:x.length,onChange:E,handleAddItem:R,handleCopyItem:T,handleRemoveItem:C,handleReorderItems:O};return k.jsx(xI,{...$e},je)}),onAddClick:R,readonly:h,required:g,registry:_,schema:t,uiSchema:r,title:D,errorSchema:s,rawErrors:w,optionalDataControl:I},he=kt("ArrayFieldTemplate",_,ne);return k.jsx(he,{...J})}function Ude(e=[]){const t=j.useMemo(()=>Hl(e),[e]),[r,i]=j.useState(()=>({formDataHash:t,keyedFormData:dD(e)}));let{keyedFormData:s,formDataHash:l}=r;if(t!==l){const f=Array.isArray(e)?e:[],d=s||[];s=f.length===d.length?d.map((h,m)=>({key:h.key,item:f[m]})):dD(f),l=t,i({formDataHash:l,keyedFormData:s})}const c=j.useCallback(f=>{const d=SI(f),h=Hl(d);return i({formDataHash:h,keyedFormData:f}),d},[]);return{keyedFormData:s,updateKeyedFormData:c}}function qde(e){const{schema:t,uiSchema:r,errorSchema:i,fieldPathId:s,registry:l,formData:c,onChange:f}=e,{globalFormOptions:d,schemaUtils:h,translateString:m}=l,{keyedFormData:g,updateKeyedFormData:v}=Ude(c),_=e.childFieldPathId??s,b=j.useCallback((O,M)=>{O&&O.preventDefault();let D;if(i){D={};for(const q in i){const V=parseInt(q);M===void 0||V<M?In(D,[V],i[q]):V>=M&&In(D,[V+1],i[q])}}const U={key:wO(),item:Nde(l,t)},B=[...g];M!==void 0?B.splice(M,0,U):B.push(U),f(v(B),_.path,D)},[g,l,t,f,v,i,_]),S=j.useCallback((O,M)=>{O&&O.preventDefault();let D;if(i){D={};for(const q in i){const V=parseInt(q);V<=M?In(D,[V],i[q]):V>M&&In(D,[V+1],i[q])}}const U={key:wO(),item:B1(g[M].item)},B=[...g];M!==void 0?B.splice(M+1,0,U):B.push(U),f(v(B),_.path,D)},[g,f,v,i,_]),w=j.useCallback((O,M)=>{O&&O.preventDefault();let D;if(i){D={};for(const B in i){const q=parseInt(B);q<M?In(D,[q],i[B]):q>M&&In(D,[q-1],i[B])}}const U=g.filter((B,q)=>q!==M);f(v(U),_.path,D)},[g,f,v,i,_]),x=j.useCallback((O,M,D)=>{O&&(O.preventDefault(),O.currentTarget.blur());let U;if(i){U={};for(const V in i){const G=parseInt(V);G==M?In(U,[D],i[M]):G==D?In(U,[M],i[D]):In(U,[V],i[G])}}function B(){const V=g.slice();return V.splice(M,1),V.splice(D,0,g[M]),V}const q=B();f(v(q),_.path,U)},[g,f,v,i,_]),E=j.useCallback((O,M,D,U)=>{f(O===void 0?null:O,M,D,U)},[f]),R=j.useCallback(O=>{f(O,_.path,void 0,_?.[er])},[f,_]),T={...e,formData:c,fieldPathId:_,onSelectChange:R},C={...e,handleAddItem:b,handleCopyItem:S,handleRemoveItem:w,handleReorderItems:x,keyedFormData:g,onChange:E};if(!(Np in t)){if(!d.useFallbackUiForUnsupportedType){const M=xt(r),D=kt("UnsupportedFieldTemplate",l,M);return k.jsx(D,{schema:t,fieldPathId:s,reason:m(tn.MissingItems),registry:l})}const O={...t,[Np]:{type:void 0}};T.schema=O,C.schema=O}return h.isMultiSelect(T.schema)?k.jsx(zde,{...T}):aI(r)?k.jsx($de,{...T}):aM(T.schema)?k.jsx(Lde,{...C}):h.isFilesArray(T.schema,r)?k.jsx(Pde,{...T}):k.jsx(Ide,{...C})}function Vde(e){const{schema:t,name:r,uiSchema:i,fieldPathId:s,formData:l,registry:c,required:f,disabled:d,readonly:h,hideError:m,autofocus:g,title:v,onChange:_,onFocus:b,onBlur:S,rawErrors:w}=e,{title:x}=t,{widgets:E,translateString:R,globalUiOptions:T}=c,{widget:C="checkbox",title:O,label:M=!0,enumNames:D,...U}=xt(i,T),B=Jl(t,C,E),q=R(tn.YesLabel),V=R(tn.NoLabel);let G;const ne=O??x??v??r;if(Array.isArray(t.oneOf))G=hg({oneOf:t.oneOf.map(K=>{if(En(K))return{...K,title:K.title||(K.const===!0?q:V)}}).filter(K=>K)},i);else{const K=t.enum??[!0,!1];!D&&K.length===2&&K.every(ee=>typeof ee=="boolean")?G=[{value:K[0],label:K[0]?q:V},{value:K[1],label:K[1]?q:V}]:G=hg({enum:K},i)}const oe=j.useCallback((K,ee,re)=>_(K,s.path,ee,re),[_,s]);return k.jsx(B,{options:{...U,enumOptions:G},schema:t,uiSchema:i,id:s.$id,name:r,onChange:oe,onFocus:b,onBlur:S,label:ne,hideLabel:!M,value:l,required:f,disabled:d,readonly:h,hideError:m,registry:c,autofocus:g,rawErrors:w,htmlName:s.name})}function Fde(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function Bde(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function Hde(e,t){switch(t){case"string":return String(e);case"number":{const r=Number(e);return isNaN(r)?0:r}case"boolean":return!!e;default:return e}}function Gde(e){const{id:t,formData:r,displayLabel:i=!0,schema:s,name:l,uiSchema:c,required:f,disabled:d=!1,readonly:h=!1,onBlur:m,onFocus:g,registry:v,fieldPathId:_,onChange:b,errorSchema:S}=e,{translateString:w,fields:x,globalFormOptions:E}=v,[R,T]=j.useState(Bde(r)),C=xt(c),O=Qp(ws("__internal_type_selector",E,_)),M=w(tn.Type),D=j.useMemo(()=>Fde(M),[M]),U=V=>{V!=null&&(T(V),b(Hde(r,V),_.path,S,t))};if(!E.useFallbackUiForUnsupportedType){const{reason:V=w(tn.UnknownFieldType,[String(s.type)])}=e,G=kt("UnsupportedFieldTemplate",v,C);return k.jsx(G,{schema:s,fieldPathId:_,reason:V,registry:v})}const B=kt("FallbackFieldTemplate",v,C),{SchemaField:q}=x;return k.jsx(B,{schema:s,registry:v,typeSelector:k.jsx(q,{fieldPathId:O,name:`${l}__fallback_type`,schema:D,formData:R,onChange:U,onBlur:m,onFocus:g,registry:v,hideLabel:!i,disabled:d,readonly:h,required:f},r?Hl(r):"__empty__"),schemaField:k.jsx(q,{...e,schema:{type:R,title:w(tn.Value),...R==="object"&&{additionalProperties:!0}}})})}var Kl;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(Kl||(Kl={}));var Zb;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(Zb||(Zb={}));const Kde=/^\$lookup=(.+)/,gT="layoutGrid";function hD(e,t){return e??t}function Yde(e){return/^\d+?$/.test(e)}const Sf=sM();function Zde(e,t,r,i,s){const l=Le(r,[gO],{}),c=Le(r,e),f={...Le(c,[vf],{}),...t,...l},d={...c};na(f)||In(d,[vf],f),na(l)||In(d,[gO],l);let{readonly:h}=xt(d);return(s===!0||i$(h)&&i===!0)&&(h=!0,mn(f,nT)?In(d,[vf,nT],!0):In(d,`ui:${nT}`,!0)),{fieldUiSchema:d,uiReadonly:h}}function Xde(e,t,r="$0m3tH1nG Un3xP3cT3d"){const i=DC([t]).sort(),s=DC([r]).sort();switch(e){case Zb.ALL:return gf(i,s);case Zb.SOME:return Y3(i,s).length>0;case Zb.NONE:return Y3(i,s).length===0;default:return!1}}function vx(e,t,r){let i={},s=e[t];if(Of(s)){const{children:l,className:c,...f}=s;if(s=l,c){const h=c.split(" ").map(m=>cM(r,m,m)).join(" ");i={...f,className:h}}else i=f}if(!Array.isArray(s))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:s,gridProps:i}}function pD(e,t,r){let i;if(Yde(r)&&e&&e?.type==="array"&&mn(e,Np)){const s=Number(r),l=e[Np];Array.isArray(l)?s>l.length?i=n$(l):i=l[s]:i=l,t={[er]:t[er],path:[...t.path.slice(0,t.path.length-1),s]}}return{rawSchema:i,fieldPathId:t}}function Qde(e,t,r,i,s){const{schemaUtils:l,globalFormOptions:c}=e;let f=r,d=s;const h=t.split("."),m=h.pop();let g=l.retrieveSchema(f,i),v=i,_=g.readOnly;h.forEach(w=>{if(d=ws(w,c,d),mn(g,Tn))f=Le(g,[Tn,w],{});else if(g&&(mn(g,Qt)||mn(g,gn))){const x=mn(g,Qt)?Qt:gn,E=l.findSelectedOptionInXxxOf(g,w,x,v);f=Le(E,[Tn,w],{})}else{const x=pD(g,d,w);f=x.rawSchema??{},d=x.fieldPathId}v=Le(v,w,{}),g=l.retrieveSchema(f,v),_=hD(g.readOnly,_)});let b,S=!1;if(na(g)&&(g=void 0),g&&m){if(g&&(mn(g,Qt)||mn(g,gn))){const x=mn(g,Qt)?Qt:gn;g=l.findSelectedOptionInXxxOf(g,m,x,v)}d=ws(m,c,d),S=g!==void 0&&Array.isArray(g.required)&&gne(g.required,m);const w=pD(g,d,m);if(w.rawSchema?(g=w.rawSchema,d=w.fieldPathId):(g=Le(g,[Tn,m]),g=g&&l.retrieveSchema(g)),_=hD(g?.readOnly,_),g&&(mn(g,Qt)||mn(g,gn))){const x=mn(g,Qt)?Qt:gn,E=Wl(g);b={options:g[x],hasDiscriminator:!!E}}}return{schema:g,isRequired:S,isReadonly:_,optionsInfo:b,fieldPathId:d}}function Wde(e,t){let r=e;return Rf(r)&&(r=cM(t,r)),I1(r)?r:null}function Jde(e,t){let r,i=null,s={},l;if(Rf(t)||i$(t))r=t??"";else{const{name:c="",render:f,...d}=t;r=c,s=d,na(s)||one(s,(h,m)=>{if(Rf(h)){const g=Kde.exec(h);if(Array.isArray(g)&&g.length>1){const v=g[1];s[m]=cM(e,v,v)}}}),i=Wde(f,e),!c&&i&&(l=k.jsx(i,{...d,"data-testid":Sf.uiComponent}))}return{name:r,UIComponent:i,uiProps:s,rendered:l}}function bx(e){const{childrenLayoutGridSchemaId:t,...r}=e,{registry:i,schema:s,formData:l}=r,{schemaUtils:c}=i,f=c.retrieveSchema(s,l);return t.map(d=>j.createElement(hM,{...r,key:`layoutGrid-${Hl(d)}`,schema:f,layoutGridSchema:d}))}function ehe(e){const{layoutGridSchema:t,...r}=e,{formData:i,registry:s}=r,{children:l,gridProps:c}=vx(t,Kl.CONDITION,s),{operator:f,field:d="",value:h}=c,m=Le(i,d,null);return Xde(f,m,h)?k.jsx(bx,{...r,childrenLayoutGridSchemaId:l}):null}function the(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:s}=r,{children:l,gridProps:c}=vx(t,Kl.COLUMN,i),f=xt(s),d=kt("GridTemplate",i,f);return k.jsx(d,{column:!0,"data-testid":Sf.col,...c,children:k.jsx(bx,{...r,childrenLayoutGridSchemaId:l})})}function nhe(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:s}=r,{children:l,gridProps:c}=vx(t,Kl.COLUMNS,i),f=xt(s),d=kt("GridTemplate",i,f);return l.map(h=>k.jsx(d,{column:!0,"data-testid":Sf.col,...c,children:k.jsx(bx,{...r,childrenLayoutGridSchemaId:[h]})},`column-${Hl(h)}`))}function rhe(e){const{layoutGridSchema:t,...r}=e,{registry:i,uiSchema:s}=r,{children:l,gridProps:c}=vx(t,Kl.ROW,i),f=xt(s),d=kt("GridTemplate",i,f);return k.jsx(d,{...c,"data-testid":Sf.row,children:k.jsx(bx,{...r,childrenLayoutGridSchemaId:l})})}function ahe(e){const{gridSchema:t,schema:r,uiSchema:i,errorSchema:s,fieldPathId:l,onBlur:c,onFocus:f,formData:d,readonly:h,registry:m,layoutGridSchema:g,...v}=e,{onChange:_}=v,{fields:b}=m,{SchemaField:S,LayoutMultiSchemaField:w}=b,x=Jde(m,t),{name:E,UIComponent:R,uiProps:T}=x,{schema:C,isRequired:O,isReadonly:M,optionsInfo:D,fieldPathId:U}=Qde(m,E,r,d,l),B=Qp(U);if(x.rendered)return x.rendered;if(C){const q=D?.hasDiscriminator?w:S,{fieldUiSchema:V,uiReadonly:G}=Zde(E,T,i,M,h);return k.jsx(q,{"data-testid":D?.hasDiscriminator?Sf.layoutMultiSchemaField:Sf.field,...v,name:E,required:O,readonly:G,schema:C,uiSchema:V,errorSchema:Le(s,E),fieldPathId:B,formData:Le(d,E),onChange:_,onBlur:c,onFocus:f,options:D?.options,registry:m})}return R?k.jsx(R,{"data-testid":Sf.uiComponent,...v,name:E,required:O,formData:d,readOnly:!!M||h,errorSchema:s,uiSchema:i,schema:r,fieldPathId:l,onBlur:c,onFocus:f,registry:m,...T}):null}function hM(e){const{uiSchema:t}=e;let{layoutGridSchema:r}=e;const i=xt(t);if(!r&&gT in i&&En(i[gT])&&(r=i[gT]),En(r)){if(Kl.ROW in r)return k.jsx(rhe,{...e,layoutGridSchema:r});if(Kl.COLUMN in r)return k.jsx(the,{...e,layoutGridSchema:r});if(Kl.COLUMNS in r)return k.jsx(nhe,{...e,layoutGridSchema:r});if(Kl.CONDITION in r)return k.jsx(ehe,{...e,layoutGridSchema:r})}return k.jsx(ahe,{...e,gridSchema:r})}hM.TEST_IDS=Sf;function ihe(e){const{fieldPathId:t,title:r,schema:i,uiSchema:s,required:l,registry:c,name:f}=e,d=xt(s,c.globalUiOptions),{title:h}=d,{title:m}=i,g=h||r||m||f;if(!g)return null;const v=kt("TitleFieldTemplate",c,d);return k.jsx(v,{id:yx(t),title:g,required:l,schema:i,uiSchema:s,registry:c})}function yT(e,t,r){const i="!@#!@$@#$!@$#";return e.map(({schema:l})=>l).find(l=>{const c=Le(l,[Tn,t]);return Le(c,px,Le(c,Ss,i))===r})}function mD(e,t,r,i,s){const l=t.map(d=>r.retrieveSchema(d,s));let c=e;mn(e,Qt)?c={...e,[Qt]:l}:mn(e,gn)&&(c={...e,[gn]:l});const f=hg(c,i);if(!f)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(c)}`);return f}function ohe(e){const{name:t,baseType:r,disabled:i=!1,formData:s,fieldPathId:l,onBlur:c,onChange:f,options:d,onFocus:h,registry:m,uiSchema:g,schema:v,autofocus:_,readonly:b,required:S,errorSchema:w,hideError:x=!1}=e,{widgets:E,schemaUtils:R,globalUiOptions:T}=m,[C,O]=j.useState(mD(v,d,R,g,s)),M=Le(l,er),D=Wl(v),U=kt("FieldErrorTemplate",m,d),B=kt("FieldTemplate",m,d),q=Hl(v),V=Hl(d),G=g?Hl(g):"",ne=s?Hl(s):"";j.useEffect(()=>{O(mD(v,d,R,g,s))},[q,V,R,G,ne]);const{widget:oe=D?"radio":"select",title:K="",placeholder:ee="",optionsSchemaSelector:re=D,hideError:ue,...Q}=xt(g);if(!re)throw new Error("No selector field provided for the LayoutMultiSchemaField");const z=Le(s,re);let L=Le(C[0]?.schema,[Tn,re],{});const Y=yT(C,re,z);L=L?.type?L:{...L,type:Y?.type||r};const I=Jl(L,oe,E),X=ue===void 0?x:!!ue,J=Le(w,[yi],[]),he=fg(w,[yi]),xe=R.getDisplayLabel(v,g,T),we=se=>{const ye=yT(C,re,se),be=yT(C,re,z);let Ae=R.sanitizeDataForNewSchema(ye,be,s);Ae&&ye&&(Ae=R.getDefaultFormState(ye,Ae,"excludeObjectChildren")),Ae&&In(Ae,re,se),f(Ae,l.path,void 0,M)},je={enumOptions:C,...Q},de=!X&&J.length>0?k.jsx(U,{fieldPathId:l,schema:v,errors:J,registry:m}):void 0;return k.jsx(B,{fieldPathId:l,id:M,schema:v,label:(K||v.title)??"",disabled:i||Array.isArray(C)&&na(C),uiSchema:g,required:S,readonly:!!b,registry:m,displayLabel:xe,errors:de,onChange:f,onKeyRename:jw,onKeyRenameBlur:jw,onRemoveProperty:jw,children:k.jsx(I,{id:M,name:t,schema:v,label:(K||v.title)??"",disabled:i||Array.isArray(C)&&na(C),uiSchema:g,autofocus:_,readonly:b,required:S,registry:m,multiple:!1,rawErrors:J,hideError:X,hideLabel:!xe,errorSchema:he,placeholder:ee,onChange:we,onBlur:c,onFocus:h,value:z,options:je,htmlName:l.name})})}class gD extends j.Component{constructor(t){super(t);const{formData:r,options:i,registry:{schemaUtils:s}}=this.props,l=i.map(c=>s.retrieveSchema(c,r));this.state={retrievedOptions:l,selectedOption:this.getMatchingOption(0,r,l)}}componentDidUpdate(t,r){const{formData:i,options:s,fieldPathId:l}=this.props,{selectedOption:c}=this.state;let f=this.state;if(!ur(t.options,s)){const{registry:{schemaUtils:d}}=this.props,h=s.map(m=>d.retrieveSchema(m,i));f={selectedOption:c,retrievedOptions:h}}if(!ur(i,t.formData)&&l.$id===t.fieldPathId.$id){const{retrievedOptions:d}=f,h=this.getMatchingOption(c,i,d);r&&h!==c&&(f={selectedOption:h,retrievedOptions:d})}f!==this.state&&this.setState(f)}getMatchingOption(t,r,i){const{schema:s,registry:{schemaUtils:l}}=this.props,c=Wl(s);return l.getClosestMatchingOption(r,i,t,c)}onOptionChange=t=>{const{selectedOption:r,retrievedOptions:i}=this.state,{formData:s,onChange:l,registry:c,fieldPathId:f}=this.props,{schemaUtils:d}=c,h=t!==void 0?parseInt(t,10):-1;if(h===r)return;const m=h>=0?i[h]:void 0,g=r>=0?i[r]:void 0;let v=d.sanitizeDataForNewSchema(m,g,s);m&&(v=d.getDefaultFormState(m,v,"excludeObjectChildren")),this.setState({selectedOption:h},()=>{l(v,f.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:t,schema:r}=this.props;return`${t.$id}${r.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:t,disabled:r=!1,errorSchema:i={},formData:s,onBlur:l,onFocus:c,readonly:f,required:d=!1,registry:h,schema:m,uiSchema:g}=this.props,{widgets:v,fields:_,translateString:b,globalUiOptions:S,schemaUtils:w}=h,{SchemaField:x}=_,E=kt("MultiSchemaFieldTemplate",h,S),R=W1(h,m,d,g),T=zg(s),{selectedOption:C,retrievedOptions:O}=this.state,{widget:M="select",placeholder:D,autofocus:U,autocomplete:B,title:q=m.title,...V}=xt(g,S),G=Jl({type:"number"},M,v),ne=Le(i,yi,[]),oe=fg(i,[yi]),K=w.getDisplayLabel(m,g,S),ee=C>=0&&O[C]||null;let re;if(ee){const{required:J}=m;re=J?Pc({required:J},ee):ee}let ue=[];Qt in m&&g&&Qt in g?Array.isArray(g[Qt])?ue=g[Qt]:console.warn(`uiSchema.oneOf is not an array for "${q||t}"`):gn in m&&g&&gn in g&&(Array.isArray(g[gn])?ue=g[gn]:console.warn(`uiSchema.anyOf is not an array for "${q||t}"`));let Q=g;C>=0&&ue.length>C&&(Q=ue[C]);const z=q?tn.TitleOptionPrefix:tn.OptionPrefix,L=q?[q]:[],Y=O.map((J,he)=>{const{title:xe=J.title}=xt(ue[he]);return{label:xe||b(z,L.concat(String(he+1))),value:he}}),I=!R||T?k.jsx(G,{id:this.getFieldId(),name:`${t}${m.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:l,onFocus:c,disabled:r||na(Y),multiple:!1,rawErrors:ne,errorSchema:oe,value:C>=0?C:void 0,options:{enumOptions:Y,...V},registry:h,placeholder:D,autocomplete:B,autofocus:U,label:q??t,hideLabel:!K,readonly:f}):void 0,X=re&&re.type!=="null"&&k.jsx(x,{...this.props,schema:re,uiSchema:Q})||null;return k.jsx(E,{schema:m,registry:h,uiSchema:g,selector:I,optionSchemaField:X})}}const she=/\.([0-9]*0)*$/,lhe=/[0.]0*$/;function uhe(e){const{registry:t,onChange:r,formData:i,value:s}=e,[l,c]=j.useState(s),{StringField:f}=t.fields;let d=i;const h=j.useCallback((m,g,v,_)=>{c(m),`${m}`.charAt(0)==="."&&(m=`0${m}`);const b=typeof m=="string"&&m.match(she)?Vk(m.replace(lhe,"")):Vk(m);r(b,g,v,_)},[r]);if(typeof l=="string"&&typeof d=="number"){const m=new RegExp(`^(${String(d).replace(".","\\.")})?\\.?0*$`);l.match(m)&&(d=l)}return k.jsx(f,{...e,formData:d,onChange:h})}function Ul(){return Ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Ul.apply(null,arguments)}const uw=["strong","em","del","mark"],yD=[["**",uw[0]],["__",uw[0]],["~~",uw[2]],["==",uw[3]],["*","em"],["_","em"]];function che(e,t){for(var r=1,i=t+1;i<e.length&&r>0;)e[i]!=="\\"?(e[i]==="["&&r++,e[i]==="]"&&r--,i++):i+=2;if(r===0&&i<e.length&&(e[i]==="("||e[i]==="[")){var s=e[i]==="("?")":"]",l=1;for(i++;i<e.length&&l>0;)e[i]!=="\\"?(e[i]==="("&&s===")"&&l++,e[i]===s&&l--,i++):i+=2;if(l===0)return i}return-1}function fhe(e,t){if(!t||!t.inline&&!t.simple)return null;var r=e[0];if(r!=="*"&&r!=="_"&&r!=="~"&&r!=="=")return null;for(var i="",s=0,l="",c=0;c<6;c++){var f=yD[c][0];if(e.startsWith(f)&&e.length>=2*f.length){i=f,s=f.length,l=yD[c][1];break}}if(!i)return null;for(var d=s,h=!1,m=!1,g="",v=0,_="",b=!1,S="";d<e.length;){var w=e[d];if(b)_+=w,b=!1,S=w,d++;else if(w!=="\\")if(w!=="`"||v!==0){if(w==="["&&!h&&v===0){var x=che(e,d);if(x!==-1){_+=e.slice(d,x),d=x,S=e[x-1];continue}}if(m)_+=w,g?w===g&&(g=""):w==='"'||w==="'"?g=w:w===">"&&(m=!1),S=w,d++;else if(w!=="<"||h){if(w===`
|
|
61
|
+
`&&S===`
|
|
62
|
+
`&&!h&&v===0)return null;if(!h&&v===0){for(var E=0;d+E<e.length&&e[d+E]===i[0];)E++;if(E>=s&&(s!==1||i!=="*"&&i!=="_"||e[d-1]!==i&&e[d+1]!==i)){var R=[e.slice(0,d+E),l,_+e.slice(d+s,d+E)];return R.index=0,R.input=e,R}}_+=w,S=w,d++}else{var T=e[d+1],C=e.indexOf(">",d);if(C!==-1){var O=e.slice(d,C+1).endsWith("/>");T==="/"?v=Math.max(0,v-1):O||v++}m=!0,_+=w,S=w,d++}}else h=!h,_+=w,S=w,d++;else _+=w,b=!0,S=w,d++}return null}const dhe=["children","options"],vD=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:"className",for:"htmlFor"}),bD={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},hhe=["style","script","pre"],phe=["src","href","data","formAction","srcDoc","action"],mhe=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,ghe=/\n{2,}$/,SD=/^(\s*>[\s\S]*?)(?=\n\n|$)/,yhe=/^ *> ?/gm,vhe=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,bhe=/^ {2,}\n/,She=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,wD=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,ED=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,whe=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Ehe=/^(?:\n *)*\n/,xhe=/\r\n?/g,_he=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,The=/^\[\^([^\]]+)]/,Che=/\f/g,Ohe=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,Rhe=/^\[(x|\s)\]/,xD=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,_D=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,TD=/^([^\n]+)\n *(=|-)\2{2,} *\n/,pM=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function Ahe(e){const t=pM.exec(e);if(!t)return null;const r=t[1],i=r.toLowerCase(),s=i.length+1;let l=t[0].length;e[l]===`
|
|
63
|
+
`&&l++;const c=l;let f=l,d=1;const h=e.length;for(;d>0;){const g=e.indexOf("<",l);if(g===-1)return null;let v=-1,_=-1;if(e[g+1]==="/")_=g;else if(e[g+1]===i[0]||e[g+1]===r[0]){let b=!0;for(let S=0;S<i.length;S++){const w=e[g+1+S];if(w!==i[S]&&w!==r[S]){b=!1;break}}!b||e[g+s]!==" "&&e[g+s]!==">"||(v=g)}if(v!==-1||_!==-1)if(v!==-1&&(_===-1||v<_))l=v+s+1,d++;else{let b=_+2;for(;b<h;){const w=e[b];if(w!==" "&&w!==" "&&w!==`
|
|
64
|
+
`&&w!=="\r")break;b++}if(b+i.length>h)return null;let S=!0;for(let w=0;w<i.length;w++){const x=e[b+w];if(x!==i[w]&&x!==r[w]){S=!1;break}}if(!S){l=b;continue}for(b+=i.length;b<h;){const w=e[b];if(w!==" "&&w!==" "&&w!==`
|
|
65
|
+
`&&w!=="\r")break;b++}if(b>=h||e[b]!==">"){l=b;continue}f=_,l=b+1,d--}else l=g+1}let m=0;for(;l+m<h&&e[l+m]===`
|
|
66
|
+
`;)m++;return[e.slice(0,l+m),r,t[2],e.slice(c,f)]}const Mhe=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,CD=/^<!--[\s\S]*?(?:-->)/,jhe=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,EO=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,khe=/^\{.*\}$/,Dhe=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Nhe=/^<([^ >]+[:@\/][^ >]+)>/,zhe=/-([a-z])?/gi,OD=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,$he=/^[^\n]+(?: \n|\n{2,})/,Phe=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Ihe=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Lhe=/^\[([^\]]*)\] ?\[([^\]]*)\]/,Uhe=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,qhe=/\t/g,Vhe=/(^ *\||\| *$)/g,Fhe=/^ *:-+: *$/,Bhe=/^ *:-+ *$/,Hhe=/^ *-+: *$/,Ghe=/^(:[a-zA-Z0-9-_]+:)/,Khe=/^\\([^0-9A-Za-z\s])/,Yhe=/\\([^0-9A-Za-z\s])/g,Zhe=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,Xhe=/^\n+/,Qhe=/^([ \t]*)/,Whe=/(?:^|\n)( *)$/,mM="(?:\\d+\\.)",gM="(?:[*+-])";function _I(e){return"( *)("+(e===1?mM:gM)+") +"}const TI=_I(1),CI=_I(2);function OI(e){return RegExp("^"+(e===1?TI:CI))}const Jhe=OI(1),epe=OI(2);function RI(e){return RegExp("^"+(e===1?TI:CI)+"[^\\n]*(?:\\n(?!\\1"+(e===1?mM:gM)+" )[^\\n]*)*(\\n|$)","gm")}const tpe=RI(1),npe=RI(2);function AI(e){const t=e===1?mM:gM;return RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const MI=AI(1),jI=AI(2);function RD(e,t){const r=t===1,i=r?MI:jI,s=r?tpe:npe,l=r?Jhe:epe;return{t:c=>l.test(c),o:df(function(c,f){const d=Whe.exec(f.prevCapture);return d&&(f.list||!f.inline&&!f.simple)?i.exec(c=d[1]+c):null}),u:1,i(c,f,d){const h=r?+c[2]:void 0,m=c[0].replace(ghe,`
|
|
67
|
+
`).match(s),g=l.exec(m[0]),v=RegExp("^ {1,"+(g?g[0].length:0)+"}","gm");let _=!1;return{items:m.map(function(b,S){const w=b.replace(v,"").replace(l,""),x=S===m.length-1,E=zl(w,`
|
|
68
|
+
|
|
69
|
+
`)||x&&_;_=E;const R=d.inline,T=d.list;let C;d.list=!0,E?(d.inline=!1,C=Xb(w)+`
|
|
70
|
+
|
|
71
|
+
`):(d.inline=!0,C=Xb(w));const O=f(C,d);return d.inline=R,d.list=T,O}),ordered:r,start:h}}}}const rpe=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),ape=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function AD(e){return typeof e=="string"}function Xb(e){let t=e.length;for(;t>0&&e[t-1]<=" ";)t--;return e.slice(0,t)}function xO(e,t){return e.startsWith(t)}function zl(e,t){return e.indexOf(t)!==-1}function ipe(e,t,r){if(Array.isArray(r)){for(let i=0;i<r.length;i++)if(xO(e,r[i]))return!0;return!1}return r(e,t)}function xb(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function ope(e){return Hhe.test(e)?"right":Fhe.test(e)?"center":Bhe.test(e)?"left":null}function MD(e,t,r,i){const s=r.inTable;r.inTable=!0;let l=[[]],c="";function f(){if(!c)return;const d=l[l.length-1];d.push.apply(d,t(c,r)),c=""}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((d,h,m)=>{d.trim()==="|"&&(f(),i)?h!==0&&h!==m.length-1&&l.push([]):c+=d}),f(),r.inTable=s,l}function spe(e,t,r){r.inline=!0;const i=e[2]?e[2].replace(Vhe,"").split("|").map(ope):[],s=e[3]?(function(c,f,d){return c.trim().split(`
|
|
72
|
+
`).map(function(h){return MD(h,f,d,!0)})})(e[3],t,r):[],l=MD(e[1],t,r,!!s.length);return r.inline=!1,s.length?{align:i,cells:s,header:l,type:"25"}:{children:l,type:"21"}}function jD(e,t){return e.align[t]==null?{}:{textAlign:e.align[t]}}function df(e){return e.inline=1,e}function tf(e){return df(function(t,r){return r.inline?e.exec(t):null})}function cw(e){return df(function(t,r){return r.inline||r.simple?e.exec(t):null})}function Cc(e){return function(t,r){return r.inline||r.simple?null:e.exec(t)}}function kD(e){return df(function(t){return e.exec(t)})}const lpe=/(javascript|vbscript|data(?!:image)):/i;function upe(e){try{const t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(lpe.test(t))return null}catch{return null}return e}function Pl(e){return e&&e.replace(Yhe,"$1")}function Hw(e,t,r){const i=r.inline||!1,s=r.simple||!1;r.inline=!0,r.simple=!0;const l=e(t,r);return r.inline=i,r.simple=s,l}function cpe(e,t,r){const i=r.inline||!1,s=r.simple||!1;r.inline=!1,r.simple=!0;const l=e(t,r);return r.inline=i,r.simple=s,l}function fpe(e,t,r){const i=r.inline||!1;r.inline=!1;const s=e(t,r);return r.inline=i,s}const dpe=(e,t,r)=>({children:Hw(t,e[2],r)});function vT(){return{}}function hpe(...e){return e.filter(Boolean).join(" ")}function bT(e,t,r){let i=e;const s=t.split(".");for(;s.length&&(i=i[s[0]],i!==void 0);)s.shift();return i||r}function ST(e,t,r,i){if(!t||!t.trim())return null;const s=t.match(mhe);return s?s.reduce(function(l,c){const f=c.indexOf("=");if(f!==-1){const d=(function(g){return g.indexOf("-")!==-1&&g.match(jhe)===null&&(g=g.replace(zhe,function(v,_){return _.toUpperCase()})),g})(c.slice(0,f)).trim(),h=vD[d]||d;if(h==="ref")return l;const m=l[h]=(function(g,v,_,b){return v==="style"?(function(S){const w=[];if(!S)return w;let x="",E=0,R="";for(let C=0;C<S.length;C++){const O=S[C];if(O==='"'||O==="'")R?O===R&&(R="",E--):(R=O,E++);else if(O==="("&&x.endsWith("url"))E++;else if(O===")"&&E>0)E--;else if(O===";"&&E===0){const M=x.indexOf(":");M>0&&w.push([x.slice(0,M).trim(),x.slice(M+1).trim()]),x="";continue}x+=O}const T=x.indexOf(":");return T>0&&w.push([x.slice(0,T).trim(),x.slice(T+1).trim()]),w})(_).reduce(function(S,[w,x]){return S[w.replace(/(-[a-z])/g,E=>E[1].toUpperCase())]=b(x,g,w),S},{}):phe.indexOf(v)!==-1?b(Pl(_),g,v):(_.match(khe)&&(_=Pl(_.slice(1,_.length-1))),_==="true"||_!=="false"&&_)})(e,d,(function(g){const v=g[0];return(v==='"'||v==="'")&&g.length>=2&&g[g.length-1]===v?g.slice(1,-1):g})(c.slice(f+1).trim()),r);typeof m=="string"&&(pM.test(m)||EO.test(m))&&(l[h]=i(m.trim()))}else c!=="style"&&(l[vD[c]||c]=!0);return l},{}):null}function DD(e,t){for(let r=0;r<e.length;r++)if(e[r].test(t))return!0;return!1}function ppe(e="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?Ul({},bD,t.namedCodesToUnicode):bD;const r=t.slugify||xb,i=t.sanitizer||upe,s=t.createElement||j.createElement,l=[SD,wD,ED,t.enforceAtxHeadings?_D:xD,TD,OD,MI,jI],c=[...l,$he,pM,CD,EO];function f(b,S,...w){const x=bT(t.overrides,b+".props",{});return s((function(E,R){const T=bT(R,E);return T?typeof T=="function"||typeof T=="object"&&"render"in T?T:bT(R,E+".component",E):E})(b,t.overrides),Ul({},S,x,{className:hpe(S?.className,x.className)||void 0}),...w)}function d(b){b=b.replace(Ohe,"");let S=!1;t.forceInline?S=!0:t.forceBlock||(S=Uhe.test(b)===!1);const w=v(S?b:Xb(b).replace(Xhe,"")+`
|
|
73
|
+
|
|
74
|
+
`,{inline:S});if(t.ast)return w;const x=_(w);for(;AD(x[x.length-1])&&!x[x.length-1].trim();)x.pop();if(h.length&&x.push(f("footer",{key:"footer"},h.map(function(T){return f("div",{id:r(T.identifier,xb),key:T.identifier},T.identifier,_(v(T.footnote,{inline:!0})))}))),t.wrapper===null)return x;const E=t.wrapper||(S?"span":"div");let R;if(x.length>1||t.forceWrapper)R=x;else{if(x.length===1)return R=x[0],typeof R=="string"?f("span",{key:"outer"},R):R;R=null}return s(E,Ul({key:"outer"},t.wrapperProps),R)}const h=[],m={},g={0:{t:[">"],o:Cc(SD),u:1,i(b,S,w){const[,x,E]=b[0].replace(yhe,"").match(vhe);return{alert:x,children:S(E,w)}}},1:{t:[" "],o:tf(bhe),u:1,i:vT},2:{t:function(b,S){if(S.inline||S.simple)return!1;var w=b[0];return w==="-"||w==="*"||w==="_"},o:Cc(She),u:1,i:vT},3:{t:[" "],o:Cc(ED),u:0,i:b=>({lang:void 0,text:Pl(Xb(b[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:Cc(wD),u:0,i:b=>({attrs:ST("code",b[3]||"",i,d),lang:b[2]||void 0,text:b[4],type:"3"})},5:{t:["`"],o:cw(whe),u:3,i:b=>({text:Pl(b[2])})},6:{t:["[^"],o:Cc(_he),u:0,i:b=>(h.push({footnote:b[2],identifier:b[1]}),{})},7:{t:["[^"],o:tf(The),u:1,i:b=>({target:"#"+r(b[1],xb),text:b[1]})},8:{t:["[ ]","[x]"],o:tf(Rhe),u:1,i:b=>({completed:b[1].toLowerCase()==="x"})},9:{t:["#"],o:Cc(t.enforceAtxHeadings?_D:xD),u:1,i:(b,S,w)=>({children:Hw(S,b[2],w),id:r(b[2],xb),level:b[1].length})},10:{t:b=>{const S=b.indexOf(`
|
|
75
|
+
`);return S>0&&S<b.length-1&&(b[S+1]==="="||b[S+1]==="-")},o:Cc(TD),u:1,i:(b,S,w)=>({children:Hw(S,b[1],w),level:b[2]==="="?1:2,type:"9"})},11:{t:["<"],o:df(Ahe),u:1,i(b,S,w){const[,x]=b[3].match(Qhe),E=RegExp("^"+x,"gm"),R=b[3].replace(E,""),T=DD(c,R)?fpe:Hw,C=b[1].toLowerCase(),O=hhe.indexOf(C)!==-1,M=(O?C:b[1]).trim(),D={attrs:ST(M,b[2],i,d),noInnerParse:O,tag:M};if(w.inAnchor=w.inAnchor||C==="a",O)D.text=b[3];else{const U=w.inHTML;w.inHTML=!0,D.children=T(S,R,w),w.inHTML=U}return w.inAnchor=!1,D}},13:{t:["<"],o:kD(EO),u:1,i(b){const S=b[1].trim();return{attrs:ST(S,b[2]||"",i,d),tag:S}}},12:{t:["<!--"],o:kD(CD),u:1,i:()=>({})},14:{t:["!["],o:cw(ape),u:1,i:b=>({alt:Pl(b[1]),target:Pl(b[2]),title:Pl(b[3])})},15:{t:["["],o:tf(rpe),u:3,i:(b,S,w)=>({children:cpe(S,b[1],w),target:Pl(b[2]),title:Pl(b[3])})},16:{t:function(b,S){return!(!S.inline||S.inAnchor)&&b[0]==="<"&&(zl(b,":")||zl(b,"@")||zl(b,"/"))},o:tf(Nhe),u:0,i(b){let S=b[1],w=!1;return zl(S,"@")&&!zl(S,"//")&&(w=!0,S=S.replace("mailto:","")),{children:[{text:S,type:"27"}],target:w?"mailto:"+S:S,type:"15"}}},17:{t:(b,S)=>!S.inAnchor&&!t.disableAutoLink&&xO(b,"http"),o:tf(Dhe),u:0,i:b=>({children:[{text:b[1],type:"27"}],target:b[1],title:void 0,type:"15"})},20:RD(0,1),30:RD(0,2),19:{t:[`
|
|
76
|
+
`],o:Cc(Ehe),u:3,i:vT},21:{t:function(b,S){return!S.inline&&!S.simple},o:df(function(b,S){if(S.inline||S.simple||S.inHTML&&!zl(b,`
|
|
77
|
+
|
|
78
|
+
`)&&!zl(S.prevCapture,`
|
|
79
|
+
|
|
80
|
+
`))return null;let w="",x=0;for(;;){const R=b.indexOf(`
|
|
81
|
+
`,x),T=b.slice(x,R===-1?void 0:R+1),C=b[x];if((C===">"||C==="#"||C==="|"||C==="`"||C==="~"||C==="*"||C==="-"||C==="_"||C===" ")&&DD(l,T)||(w+=T,R===-1||!T.trim()))break;x=R+1}const E=Xb(w);return E===""?null:[w,,E]}),u:3,i:dpe},22:{t:["["],o:tf(Phe),u:0,i:b=>(m[b[1]]={target:b[2],title:b[4]},{})},23:{t:["!["],o:cw(Ihe),u:0,i:b=>({alt:b[1]?Pl(b[1]):void 0,ref:b[2]})},24:{t:b=>b[0]==="["&&!zl(b,"]("),o:tf(Lhe),u:0,i:(b,S,w)=>({children:S(b[1],w),fallbackChildren:b[0],ref:b[2]})},25:{t:["|"],o:Cc(OD),u:1,i:spe},27:{o:df(function(b,S){let w;return xO(b,":")&&(w=Ghe.exec(b)),w||Zhe.exec(b)}),u:4,i(b){const S=b[0];return{text:zl(S,"&")?S.replace(Mhe,(w,x)=>t.namedCodesToUnicode[x]||w):S}}},34:{t:["*","_","~","="],o:df(fhe),u:2,i:(b,S,w)=>({children:S(b[2],w),tag:b[1]})},28:{t:["\\"],o:cw(Khe),u:1,i:b=>({text:b[1],type:"27"})}};t.disableParsingRawHTML===!0&&(delete g[11],delete g[13]);const v=(function(b){var S=Object.keys(b);function w(x,E){var R=[];if(E.prevCapture=E.prevCapture||"",x.trim())for(;x;)for(var T=0;T<S.length;){var C=S[T],O=b[C];if(!O.t||ipe(x,E,O.t)){var M=O.o(x,E);if(M&&M[0]){x=x.substring(M[0].length);var D=O.i(M,w,E);E.prevCapture+=M[0],D.type||(D.type=C),R.push(D);break}T++}else T++}return E.prevCapture="",R}return S.sort(function(x,E){return b[x].u-b[E].u||(x<E?-1:1)}),function(x,E){return w((function(R){return R.replace(xhe,`
|
|
82
|
+
`).replace(Che,"").replace(qhe," ")})(x),E)}})(g),_=(function(b,S,w,x,E){function R(T){return Array.isArray(T)?T.map(C=>"text"in C?C.text:""):"text"in T?T.text:""}return function T(C,O={}){const M=(O.renderDepth||0)+1;if(M>2500)return R(C);O.renderDepth=M;try{if(Array.isArray(C)){const U=O.key,B=[];let q=!1;for(let V=0;V<C.length;V++){O.key=V;const G=T(C[V],O),ne=AD(G);ne&&q?B[B.length-1]+=G:G!==null&&B.push(G),q=ne}return O.key=U,O.renderDepth=M-1,B}const D=(function(U,B,q){const V=()=>(function(G,ne,oe,K,ee,re,ue){switch(G.type){case"0":{const Q={key:oe.key};return G.alert&&(Q.className="markdown-alert-"+re(G.alert.toLowerCase(),xb),G.children.unshift({attrs:{},children:[{type:"27",text:G.alert}],noInnerParse:!0,type:"11",tag:"header"})),K("blockquote",Q,ne(G.children,oe))}case"1":return K("br",{key:oe.key});case"2":return K("hr",{key:oe.key});case"3":return K("pre",{key:oe.key},K("code",Ul({},G.attrs,{className:G.lang?"lang-"+G.lang:""}),G.text));case"5":return K("code",{key:oe.key},G.text);case"7":return K("a",{key:oe.key,href:ee(G.target,"a","href")},K("sup",{key:oe.key},G.text));case"8":return K("input",{checked:G.completed,key:oe.key,readOnly:!0,type:"checkbox"});case"9":return K("h"+G.level,{id:G.id,key:oe.key},ne(G.children,oe));case"11":return K(G.tag,Ul({key:oe.key},G.attrs),G.text||(G.children?ne(G.children,oe):""));case"13":return K(G.tag,Ul({},G.attrs,{key:oe.key}));case"14":return K("img",{key:oe.key,alt:G.alt||void 0,title:G.title||void 0,src:ee(G.target,"img","src")});case"15":return K("a",{key:oe.key,href:ee(G.target,"a","href"),title:G.title},ne(G.children,oe));case"23":return ue[G.ref]?K("img",{key:oe.key,alt:G.alt,src:ee(ue[G.ref].target,"img","src"),title:ue[G.ref].title}):null;case"24":return ue[G.ref]?K("a",{key:oe.key,href:ee(ue[G.ref].target,"a","href"),title:ue[G.ref].title},ne(G.children,oe)):K("span",{key:oe.key},G.fallbackChildren);case"25":{const Q=G;return K("table",{key:oe.key},K("thead",null,K("tr",null,Q.header.map(function(z,L){return K("th",{key:L,style:jD(Q,L)},ne(z,oe))}))),K("tbody",null,Q.cells.map(function(z,L){return K("tr",{key:L},z.map(function(Y,I){return K("td",{key:I,style:jD(Q,I)},ne(Y,oe))}))})))}case"27":return G.text;case"34":return K(G.tag,{key:oe.key},ne(G.children,oe));case"20":case"30":return K(G.ordered?"ol":"ul",{key:oe.key,start:G.type==="20"?G.start:void 0},G.items.map(function(Q,z){return K("li",{key:z},ne(Q,oe))}));case"19":return`
|
|
83
|
+
`;case"21":return K("p",{key:oe.key},ne(G.children,oe));default:return null}})(U,B,q,S,w,x,E);return b?b(V,U,B,q):V()})(C,T,O);return O.renderDepth=M-1,D}catch(D){if(D instanceof RangeError&&D.message.includes("Maximum call stack"))return R(C);throw D}}})(t.renderRule,f,i,r,m);return d(e)}const J1=e=>{let{children:t,options:r}=e,i=(function(s,l){if(s==null)return{};var c={};for(var f in s)if({}.hasOwnProperty.call(s,f)){if(l.indexOf(f)!==-1)continue;c[f]=s[f]}return c})(e,dhe);return ppe(t??"",Ul({},r,{wrapperProps:Ul({},r?.wrapperProps,i)}))},kI=Symbol("remove-this-key"),ND=Symbol("reset");function mpe(e,t){return Array.isArray(e.required)&&e.required.indexOf(t)!==-1}function gpe(e,t){switch(t){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};default:return e(tn.NewStringDefault)}}function ype(e){const{fieldPathId:t,schema:r,registry:i,uiSchema:s,errorSchema:l,formData:c,onChange:f,onBlur:d,onFocus:h,disabled:m,readonly:g,required:v,hideError:_,propertyName:b,handleKeyRename:S,handleRemoveProperty:w,addedByAdditionalProperties:x}=e,[E,R]=j.useState(!1),{globalFormOptions:T,fields:C}=i,{SchemaField:O}=C,M=Qp(ws(b,T,t.path)),D=j.useCallback((V,G,ne,oe)=>{V===void 0&&x&&(V=""),f(V,G,ne,oe)},[f,x]),U=j.useCallback(V=>{b!==V&&R(!0),S(b,V)},[b,S]),B=j.useCallback(V=>{const{target:{value:G}}=V;U(G)},[U]),q=j.useCallback(()=>{w(b)},[b,w]);return k.jsx(O,{name:b,required:v,schema:r,uiSchema:s,errorSchema:l,fieldPathId:M,formData:c,wasPropertyKeyModified:E,onKeyRename:U,onKeyRenameBlur:B,onRemoveProperty:q,onChange:D,onBlur:d,onFocus:h,registry:i,disabled:m,readonly:g,hideError:_})}function vpe(e){const{schema:t,uiSchema:r={},formData:i,errorSchema:s,fieldPathId:l,name:c,required:f=!1,disabled:d,readonly:h,hideError:m,onBlur:g,onFocus:v,onChange:_,registry:b,title:S}=e,{fields:w,schemaUtils:x,translateString:E,globalUiOptions:R}=b,{OptionalDataControlsField:T}=w,C=x.retrieveSchema(t,i,!0),O=xt(r,R),{properties:M={}}=C,D=e.childFieldPathId??l,U=O.title??C.title??S??c,B=O.description??C.description,q=W1(b,C,f,r),V=zg(i);let G=[];const ne=j.useCallback((z,L)=>{const{duplicateKeySuffixSeparator:Y="-"}=xt(r,R);let I=0,X=z;for(;mn(L,X);)X=`${z}${Y}${++I}`;return X},[r,R]),oe=j.useCallback(()=>{if(!(C.additionalProperties||C.patternProperties))return;const{translateString:z}=b,L={...i},Y=ne("newKey",L);if(C.patternProperties)In(L,Y,null);else{let I,X,J;if(En(C.additionalProperties)){I=C.additionalProperties.type,X=C.additionalProperties.const,J=C.additionalProperties.default;let xe=C.additionalProperties;if(tr in xe){const{schemaUtils:we}=b;xe=we.retrieveSchema({[tr]:xe[tr]},i),I=xe.type,X=xe.const,J=xe.default}!I&&(gn in xe||Qt in xe)&&(I="object")}const he=X??J??gpe(z,I);In(L,Y,he)}_(L,D.path)},[i,_,b,D,ne,C]),K=j.useCallback((z,L)=>{if(z!==L){const Y=ne(L,i),I={...i},X={[z]:Y},J=Object.keys(I).map(xe=>({[X[xe]||xe]:I[xe]})),he=Object.assign({},...J);_(he,D.path)}},[i,_,D,ne]),ee=j.useCallback(z=>{_(kI,[...D.path,z])},[_,D]);if(!q||V)try{const z=Object.keys(M);G=vde(z,O.order)}catch(z){return k.jsxs("div",{children:[k.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:k.jsx(J1,{options:{disableParsingRawHTML:!0},children:E(tn.InvalidObjectField,[c||"root",z.message])})}),k.jsx("pre",{children:JSON.stringify(C)})]})}const re=kt("ObjectFieldTemplate",b,O),ue=q?k.jsx(T,{...e,fieldPathId:D,schema:C}):void 0,Q={title:O.label===!1?"":U,description:O.label===!1?void 0:B,properties:G.map(z=>{const L=mn(C,[Tn,z,jc]),Y=L?r.additionalProperties:r[z],I=xt(Y).widget==="hidden";return{content:k.jsx(ype,{propertyName:z,required:mpe(C,z),schema:Le(C,[Tn,z],{}),uiSchema:Y,errorSchema:Le(s,[z]),fieldPathId:D,formData:Le(i,[z]),handleKeyRename:K,handleRemoveProperty:ee,addedByAdditionalProperties:L,onChange:_,onBlur:g,onFocus:v,registry:b,disabled:d,readonly:h,hideError:m},z),name:z,readonly:h,disabled:d,required:f,hidden:I}}),readonly:h,disabled:d,required:f,fieldPathId:l,uiSchema:r,errorSchema:s,schema:C,formData:i,registry:b,optionalDataControl:ue,className:q?"rjsf-optional-object-field":void 0};return k.jsx(re,{...Q,onAddProperty:oe})}function bpe(e){const{schema:t,uiSchema:r={},formData:i,disabled:s=!1,readonly:l=!1,onChange:c,errorSchema:f,fieldPathId:d,registry:h}=e,{globalUiOptions:m={},schemaUtils:g,translateString:v}=h,_=xt(r,m),b=kt("OptionalDataControlsTemplate",h,_),S=zg(i);let w,x,E,R;if(s||l)w=pT(d,"Msg"),x=S?void 0:v(tn.OptionalObjectEmptyMsg);else{const T=S?tn.OptionalObjectRemove:tn.OptionalObjectAdd;x=v(T),S?(w=pT(d,"Remove"),R=()=>c(void 0,d.path,f)):(w=pT(d,"Add"),E=()=>{let C=g.getDefaultFormState(t,i,"excludeObjectChildren");C===void 0&&(C=El(t)==="array"?[]:{}),c(C,d.path,f)})}return x&&k.jsx(b,{id:w,registry:h,schema:t,uiSchema:r,label:x,onAddClick:E,onRemoveClick:R})}const Spe={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function wpe(e,t,r){const i=t.field,{fields:s}=r;if(typeof i=="function")return i;if(typeof i=="string"&&i in s)return s[i];const l=El(e),c=Array.isArray(l)?l[0]:l||"",f=e.$id;let d=Spe[c];return f&&f in s&&(d=f),!d&&(e.anyOf||e.oneOf)?()=>null:d in s?s[d]:s.FallbackField}function Epe(e){const{schema:t,fieldPathId:r,uiSchema:i,formData:s,errorSchema:l,name:c,onChange:f,onKeyRename:d,onKeyRenameBlur:h,onRemoveProperty:m,required:g=!1,registry:v,wasPropertyKeyModified:_=!1}=e,{schemaUtils:b,globalFormOptions:S,globalUiOptions:w,fields:x}=v,{AnyOfField:E,OneOfField:R}=x,T=wde(t,i,v),C=xt(T,w),O=kt("FieldTemplate",v,C),M=kt("DescriptionFieldTemplate",v,C),D=kt("FieldHelpTemplate",v,C),U=kt("FieldErrorTemplate",v,C),B=b.retrieveSchema(t,s),q=r[er],V=j.useCallback((Ie,$e,Ne,Ue)=>f(Ie,$e,Ne,Ue||q),[q,f]),G=wpe(B,C,v),ne=!!(C.disabled??e.disabled),oe=!!(C.readonly??(e.readonly||e.schema.readOnly||B.readOnly)),K=C.hideError,ee=K===void 0?e.hideError:!!K,re=!!(C.autofocus??e.autofocus);if(Object.keys(B).length===0)return null;let ue=b.getDisplayLabel(B,T,w);const Q=C.field&&C.fieldReplacesAnyOrOneOf===!0;let z,L,Y={fieldPathId:r};if((gn in B||Qt in B)&&!Q&&!b.isSelect(B)){B[gn]?(z=E,L=B[gn].map(Ne=>b.retrieveSchema(En(Ne)?Ne:{},s))):B[Qt]&&(z=R,L=B[Qt].map(Ne=>b.retrieveSchema(En(Ne)?Ne:{},s)));const Ie=W1(v,B,g,T),$e=zg(s);ue=ue&&(!Ie||$e),Y={childFieldPathId:r,fieldPathId:ws("XxxOf",S,r)}}const{__errors:I,...X}=l||{},J=fg(T,["ui:classNames","classNames","ui:style"]);vf in J&&(J[vf]=fg(J[vf],["classNames","style"]));const he=k.jsx(G,{...e,onChange:V,...Y,schema:B,uiSchema:J,disabled:ne,readonly:oe,hideError:ee,autofocus:re,errorSchema:X,rawErrors:I}),xe=r[er];let we;_?we=c:we=jc in B?c:C.title||e.schema.title||B.title||e.title||c;const je=C.description||e.schema.description||B.description||"",de=C.help,se=C.widget==="hidden",ye=["rjsf-field",`rjsf-field-${El(B)}`];!ee&&I&&I.length>0&&ye.push("rjsf-field-error"),C.classNames&&ye.push(C.classNames);const be=k.jsx(D,{help:de,fieldPathId:r,schema:B,uiSchema:T,hasErrors:!ee&&I&&I.length>0,registry:v}),Ae=ee||z&&!b.isSelect(B)?void 0:k.jsx(U,{errors:I,errorSchema:l,fieldPathId:r,schema:B,uiSchema:T,registry:v}),Oe={description:k.jsx(M,{id:Xp(xe),description:je,schema:B,uiSchema:T,registry:v}),rawDescription:je,help:be,rawHelp:typeof de=="string"?de:void 0,errors:Ae,rawErrors:ee?void 0:I,fieldPathId:r,id:xe,label:we,hidden:se,onChange:f,onKeyRename:d,onKeyRenameBlur:h,onRemoveProperty:m,required:g,disabled:ne,readonly:oe,hideError:ee,displayLabel:ue,classNames:ye.join(" ").trim(),style:C.style,formData:s,schema:B,uiSchema:T,registry:v};return k.jsx(O,{...Oe,children:k.jsxs(k.Fragment,{children:[he,z&&k.jsx(z,{name:c,disabled:ne,readonly:oe,hideError:ee,errorSchema:l,formData:s,fieldPathId:r,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:L,registry:v,required:g,schema:B,uiSchema:T})]})})}class xpe extends j.Component{shouldComponentUpdate(t){const{registry:{globalFormOptions:r}}=this.props,{experimental_componentUpdateStrategy:i="customDeep"}=r;return vI(this,t,this.state,i)}render(){return k.jsx(Epe,{...this.props})}}function _pe(e){const{schema:t,name:r,uiSchema:i,fieldPathId:s,formData:l,required:c,disabled:f=!1,readonly:d=!1,autofocus:h=!1,onChange:m,onBlur:g,onFocus:v,registry:_,rawErrors:b,hideError:S,title:w}=e,{title:x,format:E}=t,{widgets:R,schemaUtils:T,globalUiOptions:C}=_,O=T.isSelect(t)?hg(t,i):void 0;let M=O?"select":"text";E&&mde(t,E,R)&&(M=E);const{widget:D=M,placeholder:U="",title:B,...q}=xt(i),V=T.getDisplayLabel(t,i,C),G=B??w??x??r,ne=Jl(t,D,R),oe=j.useCallback((K,ee,re)=>m(K,s.path,ee,re),[m,s]);return k.jsx(ne,{options:{...q,enumOptions:O},schema:t,uiSchema:i,id:s.$id,name:r,label:G,hideLabel:!V,hideError:S,value:l,onChange:oe,onBlur:g,onFocus:v,required:c,disabled:f,readonly:d,autofocus:h,registry:_,placeholder:U,rawErrors:b,htmlName:s.name})}function Tpe(e){const{formData:t,onChange:r,fieldPathId:i}=e;return j.useEffect(()=>{t===void 0&&r(null,i.path)},[i,t,r]),null}function Cpe(){return{AnyOfField:gD,ArrayField:qde,BooleanField:Vde,FallbackField:Gde,LayoutGridField:hM,LayoutHeaderField:ihe,LayoutMultiSchemaField:ohe,NumberField:uhe,ObjectField:vpe,OneOfField:gD,OptionalDataControlsField:bpe,SchemaField:xpe,StringField:_pe,NullField:Tpe}}function Ope(e){const{fieldPathId:t,description:r,registry:i,schema:s,uiSchema:l}=e,c=xt(l,i.globalUiOptions),{label:f=!0}=c;if(!r||!f)return null;const d=kt("DescriptionFieldTemplate",i,c);return k.jsx(d,{id:Xp(t),description:r,schema:s,uiSchema:l,registry:i})}function Rpe(e){const{children:t,className:r,buttonsProps:i,displayLabel:s,hasDescription:l,hasToolbar:c,registry:f,uiSchema:d}=e,h=xt(d),m=kt("ArrayFieldItemButtonsTemplate",f,h),g={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},v=l?31:9,_={display:"flex",alignItems:s?"center":"baseline"},b={display:"flex",justifyContent:"flex-end",marginTop:s?`${v}px`:0};return k.jsxs("div",{className:r,style:_,children:[k.jsx("div",{className:c?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:t}),c&&k.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:k.jsx("div",{className:"btn-group",style:b,children:k.jsx(m,{...i,style:g})})})]})}function Ape(e){const{disabled:t,hasCopy:r,hasMoveDown:i,hasMoveUp:s,hasRemove:l,fieldPathId:c,onCopyItem:f,onRemoveItem:d,onMoveDownItem:h,onMoveUpItem:m,readonly:g,registry:v,uiSchema:_}=e,{CopyButton:b,MoveDownButton:S,MoveUpButton:w,RemoveButton:x}=v.templates.ButtonTemplates;return k.jsxs(k.Fragment,{children:[(s||i)&&k.jsx(w,{id:Gl(c,"moveUp"),className:"rjsf-array-item-move-up",disabled:t||g||!s,onClick:m,uiSchema:_,registry:v}),(s||i)&&k.jsx(S,{id:Gl(c,"moveDown"),className:"rjsf-array-item-move-down",disabled:t||g||!i,onClick:h,uiSchema:_,registry:v}),r&&k.jsx(b,{id:Gl(c,"copy"),className:"rjsf-array-item-copy",disabled:t||g,onClick:f,uiSchema:_,registry:v}),l&&k.jsx(x,{id:Gl(c,"remove"),className:"rjsf-array-item-remove",disabled:t||g,onClick:d,uiSchema:_,registry:v})]})}function Mpe(e){const{canAdd:t,className:r,disabled:i,fieldPathId:s,uiSchema:l,items:c,optionalDataControl:f,onAddClick:d,readonly:h,registry:m,required:g,schema:v,title:_}=e,b=xt(l),S=kt("ArrayFieldDescriptionTemplate",m,b),w=kt("ArrayFieldTitleTemplate",m,b),x=!h&&!i,{ButtonTemplates:{AddButton:E}}=m.templates;return k.jsxs("fieldset",{className:r,id:s.$id,children:[k.jsx(w,{fieldPathId:s,title:b.title||_,required:g,schema:v,uiSchema:l,registry:m,optionalDataControl:x?f:void 0}),k.jsx(S,{fieldPathId:s,description:b.description||v.description,schema:v,uiSchema:l,registry:m}),x?void 0:f,k.jsx("div",{className:"row array-item-list",children:c}),t&&k.jsx(E,{id:Gl(s,"add"),className:"rjsf-array-item-add",onClick:d,disabled:i||h,uiSchema:l,registry:m})]})}function jpe(e){const{fieldPathId:t,title:r,schema:i,uiSchema:s,required:l,registry:c,optionalDataControl:f}=e,d=xt(s,c.globalUiOptions),{label:h=!0}=d;if(!r||!h)return null;const m=kt("TitleFieldTemplate",c,d);return k.jsx(m,{id:yx(t),title:r,required:l,schema:i,uiSchema:s,registry:c,optionalDataControl:f})}function DI(e){const{id:t,schema:r}=e,{examples:i,default:s}=r;return Array.isArray(i)?k.jsx("datalist",{id:gx(t),children:i.concat(s!==void 0&&!i.map(String).includes(String(s))?[s]:[]).map(l=>k.jsx("option",{value:l},String(l)))},`datalist_${t}`):null}function kpe(e){const{id:t,name:r,htmlName:i,value:s,readonly:l,disabled:c,autofocus:f,onBlur:d,onFocus:h,onChange:m,onChangeOverride:g,options:v,schema:_,uiSchema:b,registry:S,rawErrors:w,type:x,hideLabel:E,hideError:R,...T}=e,{ClearButton:C}=S.templates.ButtonTemplates;if(!t)throw console.log("No id for",e),new Error(`no id for props ${JSON.stringify(e)}`);const O={...T,...mI(_,x,v)};let M;O.type==="number"||O.type==="integer"?M=s||s===0?s:"":M=s??"";const D=j.useCallback(({target:{value:V}})=>m(V===""?v.emptyValue:V),[m,v]),U=j.useCallback(({target:V})=>d(t,V&&V.value),[d,t]),B=j.useCallback(({target:V})=>h(t,V&&V.value),[h,t]),q=j.useCallback(V=>{V.preventDefault(),V.stopPropagation(),m(v.emptyValue??"")},[m,v.emptyValue]);return k.jsxs(k.Fragment,{children:[k.jsx("input",{id:t,name:i||t,className:"form-control",readOnly:l,disabled:c,autoFocus:f,value:M,...O,list:_.examples?gx(t):void 0,onChange:g||D,onBlur:U,onFocus:B,"aria-describedby":go(t,!!_.examples)}),v.allowClearTextInputs&&!l&&!c&&M&&k.jsx(C,{registry:S,onClick:q}),k.jsx(DI,{id:t,schema:_})]})}function Dpe({uiSchema:e}){const{submitText:t,norender:r,props:i={}}=gI(e);return r?null:k.jsx("div",{children:k.jsx("button",{type:"submit",...i,className:`btn btn-info ${i.className||""}`,children:t})})}function Mf(e){const{iconType:t="default",icon:r,className:i,uiSchema:s,registry:l,...c}=e;return k.jsx("button",{type:"button",className:`btn btn-${t} ${i}`,...c,children:k.jsx("i",{className:`glyphicon glyphicon-${r}`})})}function Npe(e){const{registry:{translateString:t}}=e;return k.jsx(Mf,{title:t(tn.CopyButton),...e,icon:"copy"})}function zpe(e){const{registry:{translateString:t}}=e;return k.jsx(Mf,{title:t(tn.MoveDownButton),...e,icon:"arrow-down"})}function $pe(e){const{registry:{translateString:t}}=e;return k.jsx(Mf,{title:t(tn.MoveUpButton),...e,icon:"arrow-up"})}function Ppe(e){const{registry:{translateString:t}}=e;return k.jsx(Mf,{title:t(tn.RemoveButton),...e,iconType:"danger",icon:"remove"})}function Ipe({id:e,className:t,onClick:r,disabled:i,registry:s,...l}){const{translateString:c}=s;return k.jsx(Mf,{id:e,iconType:"default",icon:"remove",className:"btn-clear col-xs-12",title:c(tn.ClearButton),onClick:r,disabled:i,registry:s,...l})}function Lpe({id:e,className:t,onClick:r,disabled:i,registry:s}){const{translateString:l}=s;return k.jsx("div",{className:"row",children:k.jsx("p",{className:`col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${t}`,children:k.jsx(Mf,{id:e,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:l(tn.AddButton),onClick:r,disabled:i,registry:s})})})}function Upe(){return{SubmitButton:Dpe,AddButton:Lpe,CopyButton:Npe,MoveDownButton:zpe,MoveUpButton:$pe,RemoveButton:Ppe,ClearButton:Ipe}}const NI=sM();function yM({description:e,registry:t,uiSchema:r={}}){const{globalUiOptions:i}=t;return xt(r,i).enableMarkdownInDescription&&typeof e=="string"?k.jsx(J1,{options:{disableParsingRawHTML:!0},"data-testid":NI.markdown,children:e}):e}yM.TEST_IDS=NI;function qpe(e){const{id:t,description:r,registry:i,uiSchema:s}=e;return r?k.jsx("div",{id:t,className:"field-description",children:k.jsx(yM,{description:r,registry:i,uiSchema:s})}):null}function Vpe({errors:e,registry:t}){const{translateString:r}=t;return k.jsxs("div",{className:"panel panel-danger errors",children:[k.jsx("div",{className:"panel-heading",children:k.jsx("h3",{className:"panel-title",children:r(tn.ErrorsLabel)})}),k.jsx("ul",{className:"list-group",children:e.map((i,s)=>k.jsx("li",{className:"list-group-item text-danger",children:i.stack},s))})]})}function Fpe(e){const{schema:t,registry:r,typeSelector:i,schemaField:s}=e,l=kt("MultiSchemaFieldTemplate",r);return k.jsx(l,{selector:i,optionSchemaField:s,schema:t,registry:r})}const Bpe="*";function zI(e){const{label:t,required:r,id:i}=e;return t?k.jsxs("label",{className:"control-label",htmlFor:i,children:[t,r&&k.jsx("span",{className:"required",children:Bpe})]}):null}function Hpe(e){const{id:t,label:r,children:i,errors:s,help:l,description:c,hidden:f,required:d,displayLabel:h,registry:m,uiSchema:g}=e,v=xt(g),_=kt("WrapIfAdditionalTemplate",m,v);if(f)return k.jsx("div",{className:"hidden",children:i});const b=v.widget==="checkbox";return k.jsxs(_,{...e,children:[h&&!b&&k.jsx(zI,{label:r,required:d,id:t}),h&&c?c:null,i,s,l]})}function Gpe(e){const{errors:t=[],fieldPathId:r}=e;if(t.length===0)return null;const i=lM(r);return k.jsx("div",{children:k.jsx("ul",{id:i,className:"error-detail bs-callout bs-callout-info",children:t.filter(s=>!!s).map((s,l)=>k.jsx("li",{className:"text-danger",children:s},l))})})}const $I=sM();function vM({help:e,registry:t,uiSchema:r={}}){const{globalUiOptions:i}=t;return xt(r,i).enableMarkdownInHelp&&typeof e=="string"?k.jsx(J1,{options:{disableParsingRawHTML:!0},"data-testid":$I.markdown,children:e}):e}vM.TEST_IDS=$I;function Kpe(e){const{fieldPathId:t,help:r,uiSchema:i,registry:s}=e;return r?k.jsx("div",{id:uM(t),className:"help-block",children:k.jsx(vM,{help:r,registry:s,uiSchema:i})}):null}function Ype(e){const{children:t,column:r,className:i,...s}=e;return k.jsx("div",{className:i,...s,children:t})}function Zpe(e){const{selector:t,optionSchemaField:r}=e;return k.jsxs("div",{className:"panel panel-default panel-body",children:[k.jsx("div",{className:"form-group",children:t}),r]})}function Xpe(e){const{className:t,description:r,disabled:i,formData:s,fieldPathId:l,onAddProperty:c,optionalDataControl:f,properties:d,readonly:h,registry:m,required:g,schema:v,title:_,uiSchema:b}=e,S=xt(b),w=kt("TitleFieldTemplate",m,S),x=kt("DescriptionFieldTemplate",m,S);if((v.oneOf||v.anyOf)&&!v.properties&&d.length===0)return null;const R=!h&&!i,{ButtonTemplates:{AddButton:T}}=m.templates;return k.jsxs("fieldset",{className:t,id:l.$id,children:[_&&k.jsx(w,{id:yx(l),title:_,required:g,schema:v,uiSchema:b,registry:m,optionalDataControl:R?f:void 0}),r&&k.jsx(x,{id:Xp(l),description:r,schema:v,uiSchema:b,registry:m}),R?void 0:f,d.map(C=>C.content),V8(v,b,s)&&k.jsx(T,{id:Gl(l,"add"),className:"rjsf-object-property-expand",onClick:c,disabled:i||h,uiSchema:b,registry:m})]})}function Qpe(e){const{id:t,registry:r,label:i,onAddClick:s,onRemoveClick:l}=e;return s?k.jsx(Mf,{id:t,registry:r,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:s,title:i}):l?k.jsx(Mf,{id:t,registry:r,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:l,title:i}):k.jsx("em",{id:t,children:i})}const Wpe="*";function Jpe(e){const{id:t,title:r,required:i,optionalDataControl:s}=e;return k.jsxs("legend",{id:t,children:[r,i&&k.jsx("span",{className:"required",children:Wpe}),s&&k.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:s})]})}function eme(e){const{schema:t,fieldPathId:r,reason:i,registry:s}=e,{translateString:l}=s;let c=tn.UnsupportedField;const f=[];return r&&r.$id&&(c=tn.UnsupportedFieldWithId,f.push(r.$id)),i&&(c=c===tn.UnsupportedField?tn.UnsupportedFieldWithReason:tn.UnsupportedFieldWithIdAndReason,f.push(i)),k.jsxs("div",{className:"unsupported-field",children:[k.jsx("p",{children:k.jsx(J1,{options:{disableParsingRawHTML:!0},children:l(c,f)})}),t&&k.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function tme(e){const{id:t,classNames:r,style:i,disabled:s,displayLabel:l,label:c,onKeyRenameBlur:f,onRemoveProperty:d,rawDescription:h,readonly:m,required:g,schema:v,hideError:_,rawErrors:b,children:S,uiSchema:w,registry:x}=e,{templates:E,translateString:R}=x,{RemoveButton:T}=E.ButtonTemplates,C=R(tn.KeyLabel,[c]),O=jc in v,M=!!h,D=["form-group",r];!_&&b&&b.length>0&&D.push("has-error has-danger");const U=D.join(" ").trim();if(!O)return k.jsx("div",{className:U,style:i,children:S});const B=M?46:26;return k.jsx("div",{className:U,style:i,children:k.jsxs("div",{className:"row",children:[k.jsx("div",{className:"col-xs-5 form-additional",children:k.jsxs("div",{className:"form-group",children:[l&&k.jsx(zI,{label:C,required:g,id:`${t}-key`}),l&&h&&k.jsx("div",{children:" "}),k.jsx("input",{className:"form-control",type:"text",id:`${t}-key`,onBlur:f,defaultValue:c})]})}),k.jsx("div",{className:"form-additional form-group col-xs-5",children:S}),k.jsx("div",{className:"col-xs-2",style:{marginTop:l?`${B}px`:void 0},children:k.jsx(T,{id:Gl(t,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:s||m,onClick:d,uiSchema:w,registry:x})})]})})}function nme(){return{ArrayFieldDescriptionTemplate:Ope,ArrayFieldItemTemplate:Rpe,ArrayFieldItemButtonsTemplate:Ape,ArrayFieldTemplate:Mpe,ArrayFieldTitleTemplate:jpe,ButtonTemplates:Upe(),BaseInputTemplate:kpe,DescriptionFieldTemplate:qpe,ErrorListTemplate:Vpe,FallbackFieldTemplate:Fpe,FieldTemplate:Hpe,FieldErrorTemplate:Gpe,FieldHelpTemplate:Kpe,GridTemplate:Ype,MultiSchemaFieldTemplate:Zpe,ObjectFieldTemplate:Xpe,OptionalDataControlsTemplate:Qpe,TitleFieldTemplate:Jpe,UnsupportedFieldTemplate:eme,WrapIfAdditionalTemplate:tme}}function rme(e){const{disabled:t=!1,readonly:r=!1,autofocus:i=!1,options:s,id:l,name:c,registry:f,onBlur:d,onFocus:h}=e,{translateString:m}=f,{elements:g,handleChange:v,handleClear:_,handleSetNow:b}=Tde(e);return k.jsxs("ul",{className:"list-inline",children:[g.map((S,w)=>k.jsx("li",{className:"list-inline-item",children:k.jsx(_de,{rootId:l,name:c,select:v,...S,disabled:t,readonly:r,registry:f,onBlur:d,onFocus:h,autofocus:i&&w===0})},w)),(s.hideNowButton!=="undefined"?!s.hideNowButton:!0)&&k.jsx("li",{className:"list-inline-item",children:k.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:b,children:m(tn.NowLabel)})}),(s.hideClearButton!=="undefined"?!s.hideClearButton:!0)&&k.jsx("li",{className:"list-inline-item",children:k.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:_,children:m(tn.ClearLabel)})})]})}function ame({time:e=!0,...t}){const{AltDateWidget:r}=t.registry.widgets;return k.jsx(r,{time:e,...t})}function ime({schema:e,uiSchema:t,options:r,id:i,value:s,disabled:l,readonly:c,label:f,hideLabel:d,autofocus:h=!1,onBlur:m,onFocus:g,onChange:v,registry:_,htmlName:b}){const S=kt("DescriptionFieldTemplate",_,r),w=Yb(e),x=j.useCallback(M=>v(M.target.checked),[v]),E=j.useCallback(M=>m(i,M.target.checked),[m,i]),R=j.useCallback(M=>g(i,M.target.checked),[g,i]),O=xt(t).widget==="checkbox"?void 0:r.description??e.description;return k.jsxs("div",{className:`checkbox ${l||c?"disabled":""}`,children:[!d&&O&&k.jsx(S,{id:Xp(i),description:O,schema:e,uiSchema:t,registry:_}),k.jsxs("label",{children:[k.jsx("input",{type:"checkbox",id:i,name:b||i,checked:typeof s>"u"?!1:s,required:w,disabled:l||c,autoFocus:h,onChange:x,onBlur:E,onFocus:R,"aria-describedby":go(i)}),yI(k.jsx("span",{children:f}),d)]})]})}function ome({id:e,disabled:t,options:{inline:r=!1,enumOptions:i,enumDisabled:s,emptyValue:l},value:c,autofocus:f=!1,readonly:d,onChange:h,onBlur:m,onFocus:g,htmlName:v}){const _=Array.isArray(c)?c:[c],b=j.useCallback(({target:w})=>m(e,Da(w&&w.value,i,l)),[m,e,i,l]),S=j.useCallback(({target:w})=>g(e,Da(w&&w.value,i,l)),[g,e,i,l]);return k.jsx("div",{className:"checkboxes",id:e,children:Array.isArray(i)&&i.map((w,x)=>{const E=Q1(w.value,_),R=Array.isArray(s)&&s.indexOf(w.value)!==-1,T=t||R||d?"disabled":"",C=M=>{M.target.checked?h(dI(x,_,i)):h(cI(x,_,i))},O=k.jsxs("span",{children:[k.jsx("input",{type:"checkbox",id:xp(e,x),name:v||e,checked:E,value:String(x),disabled:t||R||d,autoFocus:f&&x===0,onChange:C,onBlur:b,onFocus:S,"aria-describedby":go(e)}),k.jsx("span",{children:w.label})]});return r?k.jsx("label",{className:`checkbox-inline ${T}`,children:O},x):k.jsx("div",{className:`checkbox ${T}`,children:k.jsx("label",{children:O})},x)})})}function sme(e){const{disabled:t,readonly:r,options:i,registry:s}=e,l=kt("BaseInputTemplate",s,i);return k.jsx(l,{type:"color",...e,disabled:t||r})}function lme(e){const{onChange:t,options:r,registry:i}=e,s=kt("BaseInputTemplate",i,r),l=j.useCallback(c=>t(c||void 0),[t]);return k.jsx(s,{type:"date",...e,onChange:l})}function ume(e){const{onChange:t,value:r,options:i,registry:s}=e,l=kt("BaseInputTemplate",s,i);return k.jsx(l,{type:"datetime-local",...e,value:Mde(r),onChange:c=>t(yde(c))})}function cme(e){const{options:t,registry:r}=e,i=kt("BaseInputTemplate",r,t);return k.jsx(i,{type:"email",...e})}function fme({fileInfo:e,registry:t}){const{translateString:r}=t,{dataURL:i,type:s,name:l}=e;return i?["image/jpeg","image/png"].includes(s)?k.jsx("img",{src:i,style:{maxWidth:"100%"},className:"file-preview"}):k.jsxs(k.Fragment,{children:[" ",k.jsx("a",{download:`preview-${l}`,href:i,className:"file-download",children:r(tn.PreviewLabel)})]}):null}function dme({filesInfo:e,registry:t,preview:r,onRemove:i,options:s}){if(e.length===0)return null;const{translateString:l}=t,{RemoveButton:c}=kt("ButtonTemplates",t,s);return k.jsx("ul",{className:"file-info",children:e.map((f,d)=>{const{name:h,size:m,type:g}=f,v=()=>i(d);return k.jsxs("li",{children:[k.jsx(J1,{children:l(tn.FilesInfo,[h,g,String(m)])}),r&&k.jsx(fme,{fileInfo:f,registry:t}),k.jsx(c,{onClick:v,registry:t})]},d)})})}function hme(e){const{disabled:t,readonly:r,required:i,multiple:s,onChange:l,value:c,options:f,registry:d}=e,{filesInfo:h,handleChange:m,handleRemove:g}=Ade(c,l,s),v=kt("BaseInputTemplate",d,f),_=b=>{b.target.files&&m(b.target.files)};return k.jsxs("div",{children:[k.jsx(v,{...e,disabled:t||r,type:"file",required:c?!1:i,onChangeOverride:_,value:"",accept:f.accept?String(f.accept):void 0}),k.jsx(dme,{filesInfo:h,onRemove:g,registry:d,preview:f.filePreview,options:f})]})}function pme({id:e,value:t,htmlName:r}){return k.jsx("input",{type:"hidden",id:e,name:r||e,value:typeof t>"u"?"":t})}function mme(e){const{options:t,registry:r}=e,i=kt("BaseInputTemplate",r,t);return k.jsx(i,{type:"password",...e})}function gme({options:e,value:t,required:r,disabled:i,readonly:s,autofocus:l=!1,onBlur:c,onFocus:f,onChange:d,id:h,htmlName:m}){const{enumOptions:g,enumDisabled:v,inline:_,emptyValue:b}=e,S=j.useCallback(({target:x})=>c(h,Da(x&&x.value,g,b)),[c,g,b,h]),w=j.useCallback(({target:x})=>f(h,Da(x&&x.value,g,b)),[f,g,b,h]);return k.jsx("div",{className:"field-radio-group",id:h,role:"radiogroup",children:Array.isArray(g)&&g.map((x,E)=>{const R=Q1(x.value,t),T=Array.isArray(v)&&v.indexOf(x.value)!==-1,C=i||T||s?"disabled":"",O=()=>d(x.value),M=k.jsxs("span",{children:[k.jsx("input",{type:"radio",id:xp(h,E),checked:R,name:m||h,required:r,value:String(E),disabled:i||T||s,autoFocus:l&&E===0,onChange:O,onBlur:S,onFocus:w,"aria-describedby":go(h)}),k.jsx("span",{children:x.label})]});return _?k.jsx("label",{className:`radio-inline ${C}`,children:M},E):k.jsx("div",{className:`radio ${C}`,children:k.jsx("label",{children:M})},E)})})}function yme(e){const{value:t,registry:{templates:{BaseInputTemplate:r}}}=e;return k.jsxs("div",{className:"field-range-wrapper",children:[k.jsx(r,{type:"range",...e}),k.jsx("span",{className:"range-view",children:t})]})}function vme({id:e,value:t,required:r,disabled:i,readonly:s,autofocus:l,onChange:c,onFocus:f,onBlur:d,schema:h,options:m,htmlName:g}){const{stars:v=5,shape:_="star"}=m,b=h.maximum?Math.min(h.maximum,5):Math.min(Math.max(v,1),5),S=h.minimum||0,w=j.useCallback(T=>{!i&&!s&&c(T)},[c,i,s]),x=j.useCallback(T=>{if(f){const C=Number(T.target.dataset.value);f(e,C)}},[f,e]),E=j.useCallback(T=>{if(d){const C=Number(T.target.dataset.value);d(e,C)}},[d,e]),R=T=>_==="heart"?T?"♥":"♡":T?"★":"☆";return k.jsx(k.Fragment,{children:k.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:i||s?"default":"pointer"},children:[[...Array(b)].map((T,C)=>{const O=S+C,M=O<=t;return k.jsx("span",{onClick:()=>w(O),onFocus:x,onBlur:E,"data-value":O,tabIndex:i||s?-1:0,role:"radio","aria-checked":O===t,"aria-label":`${O} ${_==="heart"?"heart":"star"}${O===1?"":"s"}`,style:{color:M?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:R(M)},C)}),k.jsx("input",{type:"hidden",id:e,name:g||e,value:t||"",required:r,disabled:i||s,"aria-hidden":"true"})]})})}function wT(e,t){return t?Array.from(e.target.options).slice().filter(r=>r.selected).map(r=>r.value):e.target.value}function bme({schema:e,id:t,options:r,value:i,required:s,disabled:l,readonly:c,multiple:f=!1,autofocus:d=!1,onChange:h,onBlur:m,onFocus:g,placeholder:v,htmlName:_}){const{enumOptions:b,enumDisabled:S,emptyValue:w}=r,x=f?[]:"",E=j.useCallback(M=>{const D=wT(M,f);return g(t,Da(D,b,w))},[g,t,f,b,w]),R=j.useCallback(M=>{const D=wT(M,f);return m(t,Da(D,b,w))},[m,t,f,b,w]),T=j.useCallback(M=>{const D=wT(M,f);return h(Da(D,b,w))},[h,f,b,w]),C=fI(i,b,f),O=!f&&e.default===void 0;return k.jsxs("select",{id:t,name:_||t,multiple:f,role:"combobox",className:"form-control",value:typeof C>"u"?x:C,required:s,disabled:l||c,autoFocus:d,onBlur:R,onFocus:E,onChange:T,"aria-describedby":go(t),children:[O&&k.jsx("option",{value:"",children:v}),Array.isArray(b)&&b.map(({value:M,label:D},U)=>{const B=S&&S.indexOf(M)!==-1;return k.jsx("option",{value:String(U),disabled:B,children:D},U)})]})}function Sme({id:e,options:t={},placeholder:r,value:i,required:s,disabled:l,readonly:c,autofocus:f=!1,onChange:d,onBlur:h,onFocus:m,htmlName:g}){const v=j.useCallback(({target:{value:S}})=>d(S===""?t.emptyValue:S),[d,t.emptyValue]),_=j.useCallback(({target:S})=>h(e,S&&S.value),[h,e]),b=j.useCallback(({target:S})=>m(e,S&&S.value),[e,m]);return k.jsx("textarea",{id:e,name:g||e,className:"form-control",value:i||"",placeholder:r,required:s,disabled:l,readOnly:c,autoFocus:f,rows:t.rows,onBlur:_,onFocus:b,onChange:v,"aria-describedby":go(e)})}function wme(e){const{options:t,registry:r}=e,i=kt("BaseInputTemplate",r,t);return k.jsx(i,{...e})}function Eme(e){const{onChange:t,options:r,registry:i}=e,s=kt("BaseInputTemplate",i,r),l=j.useCallback(c=>t(c?`${c}:00`:void 0),[t]);return k.jsx(s,{type:"time",...e,onChange:l})}function xme(e){const{options:t,registry:r}=e,i=kt("BaseInputTemplate",r,t);return k.jsx(i,{type:"url",...e})}function _me(e){const{options:t,registry:r}=e,i=kt("BaseInputTemplate",r,t);return k.jsx(i,{type:"number",...e})}function Tme(){return{AltDateWidget:rme,AltDateTimeWidget:ame,CheckboxWidget:ime,CheckboxesWidget:ome,ColorWidget:sme,DateWidget:lme,DateTimeWidget:ume,EmailWidget:cme,FileWidget:hme,HiddenWidget:pme,PasswordWidget:mme,RadioWidget:gme,RangeWidget:yme,RatingWidget:vme,SelectWidget:bme,TextWidget:wme,TextareaWidget:Sme,TimeWidget:Eme,UpDownWidget:_me,URLWidget:xme}}function Cme(){return{fields:Cpe(),templates:nme(),widgets:Tme(),rootSchema:{},formContext:{},translateString:ode,globalFormOptions:{idPrefix:L8,idSeparator:U8,useFallbackUiForUnsupportedType:!1}}}function wm(e,t){return{...iA(e,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...t!==void 0&&{status:t}}}class Ome extends j.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;static getDerivedStateFromProps(t,r){if(t.extraErrors!==r._prevExtraErrors){const i={errors:r.schemaValidationErrors||[],errorSchema:r.schemaValidationErrorSchema||{}};let{errors:s,errorSchema:l}=i;return t.extraErrors&&({errors:s,errorSchema:l}=Pb(i,t.extraErrors)),r.customErrors&&({errors:s,errorSchema:l}=Pb({errors:s,errorSchema:l},r.customErrors.ErrorSchema,!0)),{_prevExtraErrors:t.extraErrors,errors:s,errorSchema:l}}return null}constructor(t){if(super(t),!t.validator)throw new Error("A validator is required for Form functionality to work");const{formData:r,initialFormData:i,onChange:s}=t,l=r??i;this.state={...this.getStateFromProps(t,l,void 0,void 0,void 0,!0),_prevExtraErrors:t.extraErrors},s&&!ur(this.state.formData,l)&&s(wm(this.state)),this.formElement=j.createRef()}getSnapshotBeforeUpdate(t,r){if(!ur(this.props,t)){const i=aD(this.props.formData,t.formData),s=aD(this.props.formData,this.state.formData),l=!ur(t.schema,this.props.schema),c=i.length>0||!ur(t.formData,this.props.formData),f=s.length>0||!ur(this.state.formData,this.props.formData),d=this.getStateFromProps(this.props,this.props.formData,l||c?void 0:this.state.retrievedSchema,l,i,!f),h=!ur(d,r);return{nextState:d,shouldUpdate:h}}return{shouldUpdate:!1}}componentDidUpdate(t,r,i){if(i.shouldUpdate){const{nextState:s}=i,l=!ur(s.formData,this.props.formData),c=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,c&&l)return;l&&!ur(s.formData,r.formData)&&this.props.onChange&&this.props.onChange(wm(s)),this.setState(s)}}getStateFromProps(t,r,i,s=!1,l=[],c=!1){const f=this.state||{},d="schema"in t?t.schema:this.props.schema,h="validator"in t?t.validator:this.props.validator,m=("uiSchema"in t?t.uiSchema:this.props.uiSchema)||{},g=t.formData===void 0&&this.props.formData===void 0,v=typeof r<"u",_="liveValidate"in t?t.liveValidate:this.props.liveValidate,b=v&&!t.noValidate&&_,S="experimental_defaultFormStateBehavior"in t?t.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,w="experimental_customMergeAllOf"in t?t.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let x=f.schemaUtils;(!x||x.doesSchemaUtilsDiffer(h,d,S,w))&&(x=rde(h,d,S,w));const E=x.getRootSchema();let R=r;r===ND?R=void 0:r===void 0&&g&&(R=f.formData);const T=x.getDefaultFormState(E,R,!1,f.initialDefaultsGenerated),C=this.updateRetrievedSchema(i??x.retrieveSchema(E,T)),O=()=>t.noValidate||s?{errors:[],errorSchema:{}}:t.liveValidate?{errors:f.errors||[],errorSchema:f.errorSchema||{}}:{errors:f.schemaValidationErrors||[],errorSchema:f.schemaValidationErrorSchema||{}};let M,D,U=f.schemaValidationErrors,B=f.schemaValidationErrorSchema;if(b&&!c){const K=this.liveValidate(E,x,f.errorSchema,T,void 0,f.customErrors,i,i!==void 0);M=K.errors,D=K.errorSchema,U=K.schemaValidationErrors,B=K.schemaValidationErrorSchema}else{const K=O();if(M=K.errors,D=K.errorSchema,l.length>0&&!b){const re=l.reduce((ue,Q)=>(ue[Q]=void 0,ue),{});D=B=zp(K.errorSchema,re,"preventDuplicates")}const ee=this.mergeErrors({errorSchema:D,errors:M},t.extraErrors,f.customErrors);M=ee.errors,D=ee.errorSchema}const q=this.getRegistry(t,E,x),V=ur(f.registry,q)?f.registry:q,G=V.uiSchemaDefinitions?Bw(E,m,V):m,ne=f.fieldPathId&&f.fieldPathId?.[er]===V.globalFormOptions.idPrefix?f.fieldPathId:ws("",V.globalFormOptions);return{schemaUtils:x,schema:E,uiSchema:G,fieldPathId:ne,formData:T,edit:v,errors:M,errorSchema:D,schemaValidationErrors:U,schemaValidationErrorSchema:B,retrievedSchema:C,initialDefaultsGenerated:!0,registry:V}}shouldComponentUpdate(t,r){const{experimental_componentUpdateStrategy:i="customDeep"}=this.props;return vI(this,t,r,i)}validate(t,r=this.state.schema,i,s){const l=i||this.state.schemaUtils,{customValidate:c,transformErrors:f,uiSchema:d}=this.props,h=s??l.retrieveSchema(r,t);return l.getValidator().validateFormData(t,h,c,f,d)}renderErrors(t){const{errors:r,errorSchema:i,schema:s,uiSchema:l}=this.state,c=xt(l),f=kt("ErrorListTemplate",t,c);return r&&r.length?k.jsx(f,{errors:r,errorSchema:i||{},schema:s,uiSchema:l,registry:t}):null}mergeErrors(t,r,i){let s=t.errorSchema,l=t.errors;if(r){const c=Pb(t,r);s=c.errorSchema,l=c.errors}if(i){const c=Pb(t,i.ErrorSchema,!0);s=c.errorSchema,l=c.errors}return{errors:l,errorSchema:s}}liveValidate(t,r,i,s,l,c,f,d=!1){const h=this.validate(s,t,r,f),m=h.errors;let g=h.errorSchema;d&&(g=zp(i,h.errorSchema,"preventDuplicates"));const v=m,_=g;return{...this.mergeErrors({errorSchema:g,errors:m},l,c),schemaValidationErrors:v,schemaValidationErrorSchema:_}}getUsedFormData=(t,r)=>sI(t,r);getFieldNames=(t,r)=>lI(t,r);omitExtraData=t=>{const{schema:r,schemaUtils:i}=this.state;return i.omitExtraData(r,t)};setFieldValue=(t,r)=>{const{registry:i}=this.state,s=Array.isArray(t)?t:t.split("."),l=ws("",i.globalFormOptions,s);this.onChange(r,s,void 0,l[er])};onChange=(t,r,i,s)=>{this.pendingChanges.push({newValue:t,path:r,newErrorSchema:i,id:s}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;const{newValue:t,path:r,id:i}=this.pendingChanges[0],{newErrorSchema:s}=this.pendingChanges[0],{extraErrors:l,omitExtraData:c,liveOmit:f,noValidate:d,liveValidate:h,onChange:m}=this.props,{formData:g,schemaUtils:v,schema:_,fieldPathId:b,schemaValidationErrorSchema:S,errors:w}=this.state;let{customErrors:x,errorSchema:E}=this.state;const R=b.path[0]||"",T=!r||r.length===0||r.length===1&&r[0]===R;let C=this.state.retrievedSchema,O=T?t:B1(g);const M=sn(O)&&Object.keys(O).length>0&&Object.values(O).every(G=>G===void 0),D=g==null,U=M&&D?void 0:O;if(sn(O)||Array.isArray(O)){t===kI?Kne(O,r):T||In(O,r,t);const G=this.getStateFromProps(this.props,U,void 0,void 0,void 0,!0);O=G.formData,C=G.retrievedSchema}const B=!d&&(h===!0||h==="onChange");let q={formData:O,schema:_},V=O;if(c===!0&&(f===!0||f==="onChange")&&(V=this.omitExtraData(O),q={formData:V}),s){const G=T?S:Le(S,r);if(!na(G))T?E=s:In(E,r,s);else if(x||(x=new hI),T){const ne=Le(s,yi);ne&&x.setErrors(ne)}else In(x.ErrorSchema,r,s)}else x&&Le(x.ErrorSchema,[...r,yi])&&x.clearErrors(r);if(B&&this.pendingChanges.length===1){const G=this.liveValidate(_,v,E,V,l,x,C);q={formData:V,...G,customErrors:x}}else if(!d&&s){const G=this.mergeErrors({errorSchema:E,errors:w},l,x);q={formData:V,...G,customErrors:x}}this.setState(q,()=>{m&&m(wm({...this.state,...q}),i),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(t){return ur(t,this.state?.retrievedSchema)?this.state.retrievedSchema:t}reset=()=>{const{formData:t,initialFormData:r=ND,onChange:i}=this.props,c={formData:this.getStateFromProps(this.props,t??r,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(c,()=>i&&i(wm({...this.state,...c})))};onBlur=(t,r)=>{const{onBlur:i,omitExtraData:s,liveOmit:l,liveValidate:c}=this.props;if(i&&i(t,r),s===!0&&l==="onBlur"||c==="onBlur"){const{onChange:f,extraErrors:d}=this.props,{formData:h}=this.state;let m=h,g={formData:m};if(s===!0&&l==="onBlur"&&(m=this.omitExtraData(h),g={formData:m}),c==="onBlur"){const{schema:_,schemaUtils:b,errorSchema:S,customErrors:w,retrievedSchema:x}=this.state,E=this.liveValidate(_,b,S,m,d,w,x);g={formData:m,...E,customErrors:w}}const v=Object.keys(g).filter(_=>!_.startsWith("schemaValidation")).some(_=>{const b=Le(this.state,_),S=Le(g,_);return!ur(b,S)});this.setState(g,()=>{f&&v&&f(wm({...this.state,...g}),t)})}};onFocus=(t,r)=>{const{onFocus:i}=this.props;i&&i(t,r)};onSubmit=t=>{if(t.preventDefault(),t.target!==t.currentTarget)return;t.persist();const{omitExtraData:r,extraErrors:i,noValidate:s,onSubmit:l}=this.props;let{formData:c}=this.state;if(r===!0&&(c=this.omitExtraData(c)),s||this.validateFormWithFormData(c)){const f=i||{},d=i?fM(i):[];this.setState({formData:c,errors:d,errorSchema:f,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{l&&l(wm({...this.state,formData:c},"submitted"),t)})}};getGlobalFormOptions(t){const{uiSchema:r={},experimental_componentUpdateStrategy:i,idSeparator:s=U8,idPrefix:l=L8,nameGenerator:c,useFallbackUiForUnsupportedType:f=!1}=t;return{idPrefix:r["ui:rootFieldId"]||l,idSeparator:s,useFallbackUiForUnsupportedType:f,...i!==void 0&&{experimental_componentUpdateStrategy:i},...c!==void 0&&{nameGenerator:c}}}getRegistry(t,r,i){const{translateString:s,uiSchema:l={}}=t,{fields:c,templates:f,widgets:d,formContext:h,translateString:m}=Cme();return{fields:{...c,...t.fields},templates:{...f,...t.templates,ButtonTemplates:{...f.ButtonTemplates,...t.templates?.ButtonTemplates}},widgets:{...d,...t.widgets},rootSchema:r,formContext:t.formContext||h,schemaUtils:i,translateString:s||m,globalUiOptions:l[gO],globalFormOptions:this.getGlobalFormOptions(t),uiSchemaDefinitions:l[ife]??{}}}submit=()=>{if(this.formElement.current){const t=new CustomEvent("submit",{cancelable:!0});t.preventDefault(),this.formElement.current.dispatchEvent(t),this.formElement.current.requestSubmit()}};focusOnError(t){const{idPrefix:r="root",idSeparator:i="_"}=this.props,{property:s}=t,l=u$(s);l[0]===""?l[0]=r:l.unshift(r);const c=l.join(i);let f=this.formElement.current.elements[c];f||(f=this.formElement.current.querySelector(`input[id^="${c}"`)),f&&f.length&&(f=f[0]),f&&f.focus()}validateFormWithFormData=t=>{const{extraErrors:r,extraErrorsBlockSubmit:i,focusOnFirstError:s,onError:l}=this.props,{errors:c}=this.state,f=this.validate(t),{errors:d,errorSchema:h}=r?this.mergeErrors(f,r):f,m=f.errors.length>0||r&&i;return m?(s&&(typeof s=="function"?s(d[0]):this.focusOnError(d[0])),this.setState({errors:d,errorSchema:h,schemaValidationErrors:f.errors,schemaValidationErrorSchema:f.errorSchema},()=>{l?l(d):console.error("Form validation failed",d)})):d.length>0?this.setState({errors:d,errorSchema:h,schemaValidationErrors:[],schemaValidationErrorSchema:{}}):c.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}}),!m};validateForm(){const{omitExtraData:t}=this.props;let{formData:r}=this.state;return t===!0&&(r=this.omitExtraData(r)),this.validateFormWithFormData(r)}render(){const{children:t,id:r,className:i="",tagName:s,name:l,method:c,target:f,action:d,autoComplete:h,enctype:m,acceptCharset:g,noHtml5Validate:v=!1,disabled:_,readonly:b,showErrorList:S="top",_internalFormWrapper:w}=this.props,{schema:x,uiSchema:E,formData:R,errorSchema:T,fieldPathId:C,registry:O}=this.state,{SchemaField:M}=O.fields,{SubmitButton:D}=O.templates.ButtonTemplates,U=w?s:void 0,B=w||s||"form";let{[_E]:q={}}=xt(E);_&&(q={...q,props:{...q.props,disabled:!0}});const V={[vf]:{[_E]:q}};return k.jsxs(B,{className:i||"rjsf",id:r,name:l,method:c,target:f,action:d,autoComplete:h,encType:m,acceptCharset:g,noValidate:v,onSubmit:this.onSubmit,as:U,ref:this.formElement,children:[S==="top"&&this.renderErrors(O),k.jsx(M,{name:"",schema:x,uiSchema:E,errorSchema:T,fieldPathId:C,formData:R,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:O,disabled:_,readonly:b}),t||k.jsx(D,{uiSchema:V,registry:O}),S==="bottom"&&this.renderErrors(O)]})}}function Rme(e){return j.forwardRef(({fields:t,widgets:r,templates:i,...s},l)=>(t={...e?.fields,...t},r={...e?.widgets,...r},i={...e?.templates,...i,ButtonTemplates:{...e?.templates?.ButtonTemplates,...i?.ButtonTemplates}},k.jsx(Ome,{...e,...s,fields:t,widgets:r,templates:i,ref:l})))}var fw={exports:{}},ET={},zD;function Ame(){return zD||(zD=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(U,B){return{validate:U,compare:B}}e.fullFormats={date:t(l,c),time:t(d,h),"date-time":t(g,v),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:S,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:D,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:x,int32:{type:"number",validate:T},int64:{type:"number",validate:C},float:{type:"number",validate:O},double:{type:"number",validate:O},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,c),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,h),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(U){return U%4===0&&(U%100!==0||U%400===0)}const i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function l(U){const B=i.exec(U);if(!B)return!1;const q=+B[1],V=+B[2],G=+B[3];return V>=1&&V<=12&&G>=1&&G<=(V===2&&r(q)?29:s[V])}function c(U,B){if(U&&B)return U>B?1:U<B?-1:0}const f=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function d(U,B){const q=f.exec(U);if(!q)return!1;const V=+q[1],G=+q[2],ne=+q[3],oe=q[5];return(V<=23&&G<=59&&ne<=59||V===23&&G===59&&ne===60)&&(!B||oe!=="")}function h(U,B){if(!(U&&B))return;const q=f.exec(U),V=f.exec(B);if(q&&V)return U=q[1]+q[2]+q[3]+(q[4]||""),B=V[1]+V[2]+V[3]+(V[4]||""),U>B?1:U<B?-1:0}const m=/t|\s/i;function g(U){const B=U.split(m);return B.length===2&&l(B[0])&&d(B[1],!0)}function v(U,B){if(!(U&&B))return;const[q,V]=U.split(m),[G,ne]=B.split(m),oe=c(q,G);if(oe!==void 0)return oe||h(V,ne)}const _=/\/|:/,b=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function S(U){return _.test(U)&&b.test(U)}const w=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function x(U){return w.lastIndex=0,w.test(U)}const E=-2147483648,R=2**31-1;function T(U){return Number.isInteger(U)&&U<=R&&U>=E}function C(U){return Number.isInteger(U)}function O(){return!0}const M=/[^\\]\\Z/;function D(U){if(M.test(U))return!1;try{return new RegExp(U),!0}catch{return!1}}})(ET)),ET}var xT={},$D;function Mme(){return $D||($D=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=dA(),r=Wt(),i=r.operators,s={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},l={message:({keyword:f,schemaCode:d})=>r.str`should be ${s[f].okStr} ${d}`,params:({keyword:f,schemaCode:d})=>r._`{comparison: ${s[f].okStr}, limit: ${d}}`};e.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:l,code(f){const{gen:d,data:h,schemaCode:m,keyword:g,it:v}=f,{opts:_,self:b}=v;if(!_.validateFormats)return;const S=new t.KeywordCxt(v,b.RULES.all.format.definition,"format");S.$data?w():x();function w(){const R=d.scopeValue("formats",{ref:b.formats,code:_.code.formats}),T=d.const("fmt",r._`${R}[${S.schemaCode}]`);f.fail$data(r.or(r._`typeof ${T} != "object"`,r._`${T} instanceof RegExp`,r._`typeof ${T}.compare != "function"`,E(T)))}function x(){const R=S.schema,T=b.formats[R];if(!T||T===!0)return;if(typeof T!="object"||T instanceof RegExp||typeof T.compare!="function")throw new Error(`"${g}": format "${R}" does not define "compare" function`);const C=d.scopeValue("formats",{key:R,ref:T,code:_.code.formats?r._`${_.code.formats}${r.getProperty(R)}`:void 0});f.fail$data(E(C))}function E(R){return r._`${R}.compare(${h}, ${m}) ${s[g].fail} 0`}},dependencies:["format"]};const c=f=>(f.addKeyword(e.formatLimitDefinition),f);e.default=c})(xT)),xT}var PD;function jme(){return PD||(PD=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Ame(),i=Mme(),s=Wt(),l=new s.Name("fullFormats"),c=new s.Name("fastFormats"),f=(h,m={keywords:!0})=>{if(Array.isArray(m))return d(h,m,r.fullFormats,l),h;const[g,v]=m.mode==="fast"?[r.fastFormats,c]:[r.fullFormats,l],_=m.formats||r.formatNames;return d(h,_,g,v),m.keywords&&i.default(h),h};f.get=(h,m="full")=>{const v=(m==="fast"?r.fastFormats:r.fullFormats)[h];if(!v)throw new Error(`Unknown format "${h}"`);return v};function d(h,m,g,v){var _,b;(_=(b=h.opts.code).formats)!==null&&_!==void 0||(b.formats=s._`require("ajv-formats/dist/formats").${v}`);for(const S of m)h.addFormat(S,g[S])}e.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f})(fw,fw.exports)),fw.exports}var kme=jme();const ID=tu(kme),Dme={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},Nme=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,zme=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function $me(e,t,r={},i,s=_$,l){let c=new s({...Dme,...r});return i?ID(c,i):i!==!1&&ID(c),c.addFormat("data-url",zme),c.addFormat("color",Nme),c.addKeyword(jc),c.addKeyword(WA),Array.isArray(e)&&c.addMetaSchema(e),En(t)&&Object.keys(t).forEach(f=>{c.addFormat(f,t[f])}),l&&(c=l(c)),c}function Pme(e=[],t){return e.map(i=>{var s;const{instancePath:l,keyword:c,params:f,schemaPath:d,parentSchema:h,...m}=i;let{message:g=""}=m,v=l.replace(/\//g,"."),_=`${v} ${g}`.trim(),b="";const S=[...((s=f.deps)===null||s===void 0?void 0:s.split(", "))||[],f.missingProperty,f.property].filter(w=>w);if(S.length>0)S.forEach(w=>{const x=v?`${v}.${w}`:w;let E=xt(Le(t,`${x.replace(/^\./,"")}`)).title;if(E===void 0){const R=d.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([w]);E=xt(Le(t,R)).title}if(E)g=g.replace(`'${w}'`,`'${E}'`),b=E;else{const R=Le(h,[Tn,w,"title"]);R&&(g=g.replace(`'${w}'`,`'${R}'`),b=R)}}),_=g;else{const w=xt(Le(t,`${v.replace(/^\./,"")}`)).title;if(w)_=`'${w}' ${g}`.trim(),b=w;else{const x=h?.title;x&&(_=`'${x}' ${g}`.trim(),b=x)}}return"missingProperty"in f&&(v=v?`${v}.${f.missingProperty}`:f.missingProperty),{name:c,property:v,message:g,params:f,stack:_,schemaPath:d,title:b}}).reduce((i,s)=>{const{message:l,schemaPath:c}=s,f=c?.indexOf(`/${gn}/`),d=c?.indexOf(`/${Qt}/`);let h;return f&&f>=0?h=c?.substring(0,f):d&&d>=0&&(h=c?.substring(0,d)),h&&i.find(g=>{var v;return g.message===l&&((v=g.schemaPath)===null||v===void 0?void 0:v.startsWith(h))})||i.push(s),i},[])}function Ime(e,t,r,i,s,l,c){const{validationError:f}=t;let d=Pme(t.errors,c);f&&(d=[...d,{stack:f.message}]),typeof l=="function"&&(d=l(d,c));let h=Ede(d);if(f&&(h={...h,$schema:{__errors:[f.message]}}),typeof s!="function")return{errors:d,errorSchema:h};const m=rI(e,i,r,i,!0),g=s(m,yO(m),c,h),v=bI(g);return Pb({errors:d,errorSchema:h},v)}class Lme{constructor(t,r){const{additionalMetaSchemas:i,customFormats:s,ajvOptionsOverrides:l,ajvFormatOptions:c,AjvClass:f,extenderFn:d}=t;this.ajv=$me(i,s,l,c,f,d),this.localizer=r}reset(){this.ajv.removeSchema()}rawValidation(t,r){var i,s;let l,c;try{t[er]&&(c=this.ajv.getSchema(t[er])),c===void 0&&(c=this.ajv.compile(t)),c(r)}catch(d){l=d}let f;return c&&(typeof this.localizer=="function"&&(((i=c.errors)!==null&&i!==void 0?i:[]).forEach(d=>{var h;["missingProperty","property"].forEach(m=>{var g;!((g=d.params)===null||g===void 0)&&g[m]&&(d.params[m]=`'${d.params[m]}'`)}),!((h=d.params)===null||h===void 0)&&h.deps&&(d.params.deps=d.params.deps.split(", ").map(m=>`'${m}'`).join(", "))}),this.localizer(c.errors),((s=c.errors)!==null&&s!==void 0?s:[]).forEach(d=>{var h;["missingProperty","property"].forEach(m=>{var g;!((g=d.params)===null||g===void 0)&&g[m]&&(d.params[m]=d.params[m].slice(1,-1))}),!((h=d.params)===null||h===void 0)&&h.deps&&(d.params.deps=d.params.deps.split(", ").map(m=>m.slice(1,-1)).join(", "))})),f=c.errors||void 0,c.errors=null),{errors:f,validationError:l}}validateFormData(t,r,i,s,l){const c=this.rawValidation(r,t);return Ime(this,c,t,r,i,s,l)}handleSchemaUpdate(t){var r,i;const s=(r=t[er])!==null&&r!==void 0?r:q8;this.ajv.getSchema(s)===void 0?this.ajv.addSchema(t,s):ur(t,(i=this.ajv.getSchema(s))===null||i===void 0?void 0:i.schema)||(this.ajv.removeSchema(s),this.ajv.addSchema(t,s))}isValid(t,r,i){var s;try{this.handleSchemaUpdate(i);const l=dM(t),c=(s=l[er])!==null&&s!==void 0?s:pde(l);let f;return f=this.ajv.getSchema(c),f===void 0&&(f=this.ajv.addSchema(l,c).getSchema(c)||this.ajv.compile(l)),f(r)}catch(l){return console.warn("Error encountered compiling schema:",l),!1}}}function Ume(e={},t){return new Lme(e,t)}const qme=Ume();const Vme=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Fme=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase()),LD=e=>{const t=Fme(e);return t.charAt(0).toUpperCase()+t.slice(1)},PI=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim(),Bme=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Hme={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 Gme=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:c,...f},d)=>j.createElement("svg",{ref:d,...Hme,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:PI("lucide",s),...!l&&!Bme(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,m])=>j.createElement(h,m)),...Array.isArray(l)?l:[l]]));const au=(e,t)=>{const r=j.forwardRef(({className:i,...s},l)=>j.createElement(Gme,{ref:l,iconNode:t,className:PI(`lucide-${Vme(LD(e))}`,`lucide-${e}`,i),...s}));return r.displayName=LD(e),r};const Kme=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Yme=au("check",Kme);const Zme=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],II=au("chevron-down",Zme);const Xme=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Qme=au("chevron-up",Xme);const Wme=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Jme=au("circle-alert",Wme);const ege=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],LI=au("circle-plus",ege);const tge=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],nge=au("circle",tge);const rge=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],age=au("copy",rge);const ige=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],oge=au("search",ige);const sge=[["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"}]],lge=au("trash-2",sge);const uge=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],UI=au("x",uge);function UD(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jf(...e){return t=>{let r=!1;const i=e.map(s=>{const l=UD(s,t);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():UD(e[s],null)}}}}function ra(...e){return j.useCallback(jf(...e),e)}var cge=Symbol.for("react.lazy"),CE=A1[" use ".trim().toString()];function fge(e){return typeof e=="object"&&e!==null&&"then"in e}function qI(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===cge&&"_payload"in e&&fge(e._payload)}function VI(e){const t=dge(e),r=j.forwardRef((i,s)=>{let{children:l,...c}=i;qI(l)&&typeof CE=="function"&&(l=CE(l._payload));const f=j.Children.toArray(l),d=f.find(pge);if(d){const h=d.props.children,m=f.map(g=>g===d?j.Children.count(h)>1?j.Children.only(null):j.isValidElement(h)?h.props.children:null:g);return k.jsx(t,{...c,ref:s,children:j.isValidElement(h)?j.cloneElement(h,void 0,m):null})}return k.jsx(t,{...c,ref:s,children:l})});return r.displayName=`${e}.Slot`,r}var FI=VI("Slot");function dge(e){const t=j.forwardRef((r,i)=>{let{children:s,...l}=r;if(qI(s)&&typeof CE=="function"&&(s=CE(s._payload)),j.isValidElement(s)){const c=gge(s),f=mge(l,s.props);return s.type!==j.Fragment&&(f.ref=i?jf(i,c):c),j.cloneElement(s,f)}return j.Children.count(s)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hge=Symbol("radix.slottable");function pge(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hge}function mge(e,t){const r={...t};for(const i in t){const s=e[i],l=t[i];/^on[A-Z]/.test(i)?s&&l?r[i]=(...f)=>{const d=l(...f);return s(...f),d}:s&&(r[i]=s):i==="style"?r[i]={...s,...l}:i==="className"&&(r[i]=[s,l].filter(Boolean).join(" "))}return{...e,...r}}function gge(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function ln(...e){return Q$(yA(e))}const yge=Fc("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",xs:"h-6 rounded-md gap-1 px-2 has-[>svg]:px-2",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function bM({className:e,variant:t,size:r,asChild:i=!1,...s}){const l=i?FI:"button";return k.jsx(l,{"data-slot":"button",className:ln(yge({variant:t,size:r,className:e})),...s})}function vge({uiSchema:e,registry:t,className:r,...i}){const{translateString:s}=t;return k.jsx("div",{className:"p-0 m-0",children:k.jsxs(bM,{...i,className:ln("w-fit gap-2",r),variant:"outline",type:"button",children:[k.jsx(LI,{size:16})," ",s(tn.AddItemButton)]})})}function bge(e){const{children:t,buttonsProps:r,displayLabel:i,hasDescription:s,hasToolbar:l,uiSchema:c,registry:f}=e,d=xt(c),h=kt("ArrayFieldItemButtonsTemplate",f,d),m=s?-6:22;return k.jsx("div",{children:k.jsxs("div",{className:"mb-2 flex flex-row flex-wrap items-center",children:[k.jsx("div",{className:"grow shrink",children:t}),k.jsx("div",{className:"flex items-end justify-end p-0.5",children:l&&k.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:i?`${m}px`:void 0},children:k.jsx(h,{...r})})})]})})}function Sge(e){const{canAdd:t,disabled:r,fieldPathId:i,uiSchema:s,items:l,optionalDataControl:c,onAddClick:f,readonly:d,registry:h,required:m,schema:g,title:v}=e,_=xt(s),b=kt("ArrayFieldDescriptionTemplate",h,_),S=kt("ArrayFieldTitleTemplate",h,_),w=!d&&!r,{ButtonTemplates:{AddButton:x}}=h.templates;return k.jsx("div",{children:k.jsx("div",{className:"m-0 flex p-0",children:k.jsxs("div",{className:"m-0 w-full p-0",children:[k.jsx(S,{fieldPathId:i,title:_.title||v,schema:g,uiSchema:s,required:m,registry:h,optionalDataControl:w?c:void 0}),k.jsx(b,{fieldPathId:i,description:_.description||g.description,schema:g,uiSchema:s,registry:h}),k.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[w?void 0:c,l,t&&k.jsx("div",{className:"mt-2 flex justify-end",children:k.jsx(x,{id:Gl(i,"add"),className:"rjsf-array-item-add",onClick:f,disabled:r||d,uiSchema:s,registry:h})})]},`array-item-list-${i.$id}`)]})})})}function BI({className:e,type:t,...r}){return k.jsx("input",{type:t,"data-slot":"input",className:ln("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}function wge({id:e,htmlName:t,placeholder:r,required:i,readonly:s,disabled:l,type:c,value:f,onChange:d,onChangeOverride:h,onBlur:m,onFocus:g,autofocus:v,options:_,schema:b,rawErrors:S=[],children:w,extraProps:x,className:E,registry:R}){const{ClearButton:T}=R.templates.ButtonTemplates,C={...x,...mI(b,c,_)},O=({target:{value:B}})=>d(B===""?_.emptyValue:B),M=({target:B})=>m(e,B&&B.value),D=({target:B})=>g(e,B&&B.value),U=j.useCallback(B=>{var q;B.preventDefault(),B.stopPropagation(),d((q=_.emptyValue)!==null&&q!==void 0?q:"")},[d,_.emptyValue]);return k.jsxs("div",{className:"p-0.5",children:[k.jsx(BI,{id:e,name:t||e,type:c,placeholder:r,autoFocus:v,required:i,disabled:l,readOnly:s,className:ln({"border-destructive focus-visible:ring-0":S.length>0},E),list:b.examples?gx(e):void 0,...C,value:f||f===0?f:"",onChange:h||O,onBlur:M,onFocus:D,"aria-describedby":go(e,!!b.examples)}),_.allowClearTextInputs&&!s&&!l&&f&&k.jsx(T,{onClick:U,registry:R}),w,k.jsx(DI,{id:e,schema:b})]})}function Ege({id:e,description:t,registry:r,uiSchema:i}){return t?k.jsx("div",{children:k.jsx("div",{id:e,className:"text-sm text-muted-foreground",children:k.jsx(yM,{description:t,registry:r,uiSchema:i})})}):null}const xge=Fc("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function _ge({className:e,variant:t,...r}){return k.jsx("div",{"data-slot":"alert",role:"alert",className:ln(xge({variant:t}),e),...r})}function Tge({className:e,...t}){return k.jsx("div",{"data-slot":"alert-title",className:ln("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function Cge({className:e,...t}){return k.jsx("div",{"data-slot":"alert-description",className:ln("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}function Oge({errors:e,registry:t}){const{translateString:r}=t;return k.jsxs(_ge,{variant:"destructive",className:"mb-2",children:[k.jsx(Jme,{className:"h-4 w-4"}),k.jsx(Tge,{children:r(tn.ErrorsLabel)}),k.jsx(Cge,{className:"flex flex-col gap-1",children:e.map((i,s)=>k.jsxs("span",{children:["• ",i.stack]},s))})]})}function Rge(e){const{errors:t=[],fieldPathId:r}=e;if(t.length===0)return null;const i=lM(r);return k.jsx("div",{className:"flex flex-col gap-1",id:i,children:t.map((s,l)=>k.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:s},l))})}function Age(e){const{fieldPathId:t,help:r,uiSchema:i,registry:s,hasErrors:l}=e;return r?k.jsx("span",{className:ln("text-xs font-medium text-muted-foreground",{"text-destructive":l}),id:uM(t),children:k.jsx(vM,{help:r,registry:s,uiSchema:i})}):null}function Mge({id:e,children:t,displayLabel:r,rawErrors:i=[],errors:s,help:l,description:c,rawDescription:f,classNames:d,style:h,disabled:m,label:g,hidden:v,onKeyRename:_,onKeyRenameBlur:b,onRemoveProperty:S,readonly:w,required:x,schema:E,uiSchema:R,registry:T}){const C=xt(R),O=kt("WrapIfAdditionalTemplate",T,C);if(v)return k.jsx("div",{className:"hidden",children:t});const M=C.widget==="checkbox";return k.jsx(O,{classNames:d,style:h,disabled:m,id:e,label:g,displayLabel:r,onKeyRename:_,onKeyRenameBlur:b,onRemoveProperty:S,rawDescription:f,readonly:w,required:x,schema:E,uiSchema:R,registry:T,children:k.jsxs("div",{className:"flex flex-col gap-2",children:[r&&!M&&k.jsxs("label",{className:ln("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":i.length>0}),htmlFor:e,children:[g,x?"*":null]}),t,r&&f&&!M&&k.jsx("span",{className:ln("text-xs font-medium text-muted-foreground",{" text-destructive":i.length>0}),children:c}),s,l]})})}function jge(e){const{children:t,column:r,className:i,...s}=e;return k.jsx("div",{className:ln("grid gap-2",i),...s,children:t})}function $g(e){const{icon:t,iconType:r,className:i,uiSchema:s,registry:l,...c}=e;return k.jsx(bM,{size:"icon",variant:"outline",className:i,...c,type:"button",children:t})}function kge(e){const{registry:{translateString:t}}=e;return k.jsx($g,{title:t(tn.CopyButton),...e,icon:k.jsx(age,{className:"h-4 w-4"})})}function Dge(e){const{registry:{translateString:t}}=e;return k.jsx($g,{title:t(tn.MoveDownButton),...e,icon:k.jsx(II,{className:"h-4 w-4"})})}function Nge(e){const{registry:{translateString:t}}=e;return k.jsx($g,{title:t(tn.MoveUpButton),...e,icon:k.jsx(Qme,{className:"h-4 w-4"})})}function HI(e){const{registry:{translateString:t}}=e;return k.jsx($g,{title:t(tn.RemoveButton),...e,className:"border-destructive",icon:k.jsx(lge,{className:"h-4 w-4 stroke-destructive"})})}function zge(e){const{registry:{translateString:t}}=e;return k.jsx($g,{title:t(tn.ClearButton),...e,icon:k.jsx(UI,{})})}function $ge({selector:e,optionSchemaField:t}){return k.jsxs("div",{className:ln("p-4 border rounded-md bg-background shadow-sm"),children:[k.jsx("div",{className:ln("mb-4"),children:e}),t]})}function Pge({description:e,title:t,properties:r,required:i,uiSchema:s,fieldPathId:l,schema:c,formData:f,optionalDataControl:d,onAddProperty:h,disabled:m,readonly:g,registry:v}){const _=xt(s),b=kt("TitleFieldTemplate",v,_),S=kt("DescriptionFieldTemplate",v,_),w=!g&&!m,{ButtonTemplates:{AddButton:x}}=v.templates;return k.jsxs(k.Fragment,{children:[t&&k.jsx(b,{id:yx(l),title:t,required:i,schema:c,uiSchema:s,registry:v,optionalDataControl:w?d:void 0}),e&&k.jsx(S,{id:Xp(l),description:e,schema:c,uiSchema:s,registry:v}),k.jsxs("div",{className:"flex flex-col gap-2",children:[w?void 0:d,r.map((E,R)=>k.jsx("div",{className:`${E.hidden?"hidden":""} flex`,children:k.jsx("div",{className:"w-full",children:E.content})},R)),V8(c,s,f)?k.jsx("div",{className:"mt-2 flex justify-end",children:k.jsx(x,{id:Gl(l,"add"),onClick:h,disabled:m||g,className:"rjsf-object-property-expand",uiSchema:s,registry:v})}):null]})]})}function Ige(e){const{id:t,registry:r,label:i,onAddClick:s,onRemoveClick:l}=e;return s?k.jsx($g,{id:t,registry:r,className:"rjsf-add-optional-data",onClick:s,title:i,icon:k.jsx(LI,{}),size:"xs"}):l?k.jsx(HI,{id:t,registry:r,className:"rjsf-remove-optional-data",onClick:l,title:i,size:"xs"}):k.jsx("em",{id:t,children:i})}function Lge(e){const{submitText:t,norender:r,props:i}=gI(e.uiSchema);return r?null:k.jsx("div",{children:k.jsx(bM,{type:"submit",...i,className:ln("my-2",i?.className),children:t})})}var Es=vz();const Uge=tu(Es);var qge=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],iu=qge.reduce((e,t)=>{const r=VI(`Primitive.${t}`),i=j.forwardRef((s,l)=>{const{asChild:c,...f}=s,d=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(d,{...f,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{}),Vge="Separator",qD="horizontal",Fge=["horizontal","vertical"],GI=j.forwardRef((e,t)=>{const{decorative:r,orientation:i=qD,...s}=e,l=Bge(i)?i:qD,f=r?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return k.jsx(iu.div,{"data-orientation":l,...f,...s,ref:t})});GI.displayName=Vge;function Bge(e){return Fge.includes(e)}var Hge=GI;function KI({className:e,orientation:t="horizontal",decorative:r=!0,...i}){return k.jsx(Hge,{"data-slot":"separator",decorative:r,orientation:t,className:ln("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...i})}function Gge({id:e,title:t,uiSchema:r,optionalDataControl:i}){const s=xt(r);let l=k.jsx("h5",{children:s.title||t});return i&&(l=k.jsxs("div",{className:"flex flex-row",children:[k.jsx("div",{className:"flex-grow",children:l}),k.jsx("div",{className:"flex",children:i})]})),k.jsxs("div",{id:e,className:"my-1 flex flex-col gap-0.5",children:[l,k.jsx(KI,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function Kge({classNames:e,style:t,children:r,disabled:i,id:s,label:l,displayLabel:c,onRemoveProperty:f,onKeyRenameBlur:d,rawDescription:h,readonly:m,required:g,schema:v,uiSchema:_,registry:b}){const{templates:S,translateString:w}=b,{RemoveButton:x}=S.ButtonTemplates,E=w(tn.KeyLabel,[l]);if(!(jc in v))return k.jsx("div",{className:e,style:t,children:r});const C=c?22+(h?-28:0):0,O=`${s}-key`;return k.jsxs(k.Fragment,{children:[k.jsxs("div",{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${e}`,style:t,children:[k.jsx("div",{className:"grid gap-2 col-span-5",children:k.jsxs("div",{className:"flex flex-col gap-2",children:[c&&k.jsx("label",{htmlFor:O,className:"text-sm font-medium text-muted-foreground leading-none",children:E}),k.jsx("div",{className:"pl-0.5",children:k.jsx(BI,{required:g,defaultValue:l,disabled:i||m,id:O,name:O,onBlur:m?void 0:d,type:"text",className:"w-full border shadow-sm"})}),!!h&&k.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:k.jsx("div",{className:"text-sm text-muted-foreground",children:" "})})]})}),k.jsx("div",{className:"grid gap-2 col-span-6 pr-0.5",children:r}),k.jsx("div",{className:"grid gap-2 col-span-1",style:{marginTop:`${C}px`},children:k.jsx(x,{id:Gl(s,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:i||m,onClick:f,uiSchema:_,registry:b})})]}),k.jsx(KI,{dir:"horizontal",className:"mt-2"})]})}function Yge(){return{ArrayFieldItemTemplate:bge,ArrayFieldTemplate:Sge,BaseInputTemplate:wge,ButtonTemplates:{AddButton:vge,CopyButton:kge,MoveDownButton:Dge,MoveUpButton:Nge,RemoveButton:HI,SubmitButton:Lge,ClearButton:zge},DescriptionFieldTemplate:Ege,ErrorListTemplate:Oge,FieldErrorTemplate:Rge,FieldHelpTemplate:Age,FieldTemplate:Mge,GridTemplate:jge,MultiSchemaFieldTemplate:$ge,ObjectFieldTemplate:Pge,OptionalDataControlsTemplate:Ige,TitleFieldTemplate:Gge,WrapIfAdditionalTemplate:Kge}}function Zge(e,t){const r=j.createContext(t),i=l=>{const{children:c,...f}=l,d=j.useMemo(()=>f,Object.values(f));return k.jsx(r.Provider,{value:d,children:c})};i.displayName=e+"Provider";function s(l){const c=j.useContext(r);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[i,s]}function Wp(e,t=[]){let r=[];function i(l,c){const f=j.createContext(c),d=r.length;r=[...r,c];const h=g=>{const{scope:v,children:_,...b}=g,S=v?.[e]?.[d]||f,w=j.useMemo(()=>b,Object.values(b));return k.jsx(S.Provider,{value:w,children:_})};h.displayName=l+"Provider";function m(g,v){const _=v?.[e]?.[d]||f,b=j.useContext(_);if(b)return b;if(c!==void 0)return c;throw new Error(`\`${g}\` must be used within \`${l}\``)}return[h,m]}const s=()=>{const l=r.map(c=>j.createContext(c));return function(f){const d=f?.[e]||l;return j.useMemo(()=>({[`__scope${e}`]:{...f,[e]:d}}),[f,d])}};return s.scopeName=e,[i,Xge(s,...t)]}function Xge(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(l){const c=i.reduce((f,{useScope:d,scopeName:h})=>{const g=d(l)[`__scope${h}`];return{...f,...g}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}function _r(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e?.(s),r===!1||!s.defaultPrevented)return t?.(s)}}var mg=globalThis?.document?j.useLayoutEffect:()=>{},Qge=A1[" useInsertionEffect ".trim().toString()]||mg;function eS({prop:e,defaultProp:t,onChange:r=()=>{},caller:i}){const[s,l,c]=Wge({defaultProp:t,onChange:r}),f=e!==void 0,d=f?e:s;{const m=j.useRef(e!==void 0);j.useEffect(()=>{const g=m.current;g!==f&&console.warn(`${i} is changing from ${g?"controlled":"uncontrolled"} to ${f?"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.`),m.current=f},[f,i])}const h=j.useCallback(m=>{if(f){const g=Jge(m)?m(e):m;g!==e&&c.current?.(g)}else l(m)},[f,e,l,c]);return[d,h]}function Wge({defaultProp:e,onChange:t}){const[r,i]=j.useState(e),s=j.useRef(r),l=j.useRef(t);return Qge(()=>{l.current=t},[t]),j.useEffect(()=>{s.current!==r&&(l.current?.(r),s.current=r)},[r,s]),[r,i,l]}function Jge(e){return typeof e=="function"}function SM(e){const t=j.useRef({value:e,previous:e});return j.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function wM(e){const[t,r]=j.useState(void 0);return mg(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let c,f;if("borderBoxSize"in l){const d=l.borderBoxSize,h=Array.isArray(d)?d[0]:d;c=h.inlineSize,f=h.blockSize}else c=e.offsetWidth,f=e.offsetHeight;r({width:c,height:f})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else r(void 0)},[e]),t}function eye(e,t){return j.useReducer((r,i)=>t[r][i]??r,e)}var Pg=e=>{const{present:t,children:r}=e,i=tye(t),s=typeof r=="function"?r({present:i.isPresent}):j.Children.only(r),l=ra(i.ref,nye(s));return typeof r=="function"||i.isPresent?j.cloneElement(s,{ref:l}):null};Pg.displayName="Presence";function tye(e){const[t,r]=j.useState(),i=j.useRef(null),s=j.useRef(e),l=j.useRef("none"),c=e?"mounted":"unmounted",[f,d]=eye(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j.useEffect(()=>{const h=dw(i.current);l.current=f==="mounted"?h:"none"},[f]),mg(()=>{const h=i.current,m=s.current;if(m!==e){const v=l.current,_=dw(h);e?d("MOUNT"):_==="none"||h?.display==="none"?d("UNMOUNT"):d(m&&v!==_?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,d]),mg(()=>{if(t){let h;const m=t.ownerDocument.defaultView??window,g=_=>{const S=dw(i.current).includes(CSS.escape(_.animationName));if(_.target===t&&S&&(d("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",h=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},v=_=>{_.target===t&&(l.current=dw(i.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{m.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:j.useCallback(h=>{i.current=h?getComputedStyle(h):null,r(h)},[])}}function dw(e){return e?.animationName||"none"}function nye(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function OE(e){const t=rye(e),r=j.forwardRef((i,s)=>{const{children:l,...c}=i,f=j.Children.toArray(l),d=f.find(iye);if(d){const h=d.props.children,m=f.map(g=>g===d?j.Children.count(h)>1?j.Children.only(null):j.isValidElement(h)?h.props.children:null:g);return k.jsx(t,{...c,ref:s,children:j.isValidElement(h)?j.cloneElement(h,void 0,m):null})}return k.jsx(t,{...c,ref:s,children:l})});return r.displayName=`${e}.Slot`,r}function rye(e){const t=j.forwardRef((r,i)=>{const{children:s,...l}=r;if(j.isValidElement(s)){const c=sye(s),f=oye(l,s.props);return s.type!==j.Fragment&&(f.ref=i?jf(i,c):c),j.cloneElement(s,f)}return j.Children.count(s)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var aye=Symbol("radix.slottable");function iye(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===aye}function oye(e,t){const r={...t};for(const i in t){const s=e[i],l=t[i];/^on[A-Z]/.test(i)?s&&l?r[i]=(...f)=>{const d=l(...f);return s(...f),d}:s&&(r[i]=s):i==="style"?r[i]={...s,...l}:i==="className"&&(r[i]=[s,l].filter(Boolean).join(" "))}return{...e,...r}}function sye(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var lye=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ur=lye.reduce((e,t)=>{const r=OE(`Primitive.${t}`),i=j.forwardRef((s,l)=>{const{asChild:c,...f}=s,d=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(d,{...f,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function uye(e,t){e&&Es.flushSync(()=>e.dispatchEvent(t))}var Sx="Checkbox",[cye]=Wp(Sx),[fye,EM]=cye(Sx);function dye(e){const{__scopeCheckbox:t,checked:r,children:i,defaultChecked:s,disabled:l,form:c,name:f,onCheckedChange:d,required:h,value:m="on",internal_do_not_use_render:g}=e,[v,_]=eS({prop:r,defaultProp:s??!1,onChange:d,caller:Sx}),[b,S]=j.useState(null),[w,x]=j.useState(null),E=j.useRef(!1),R=b?!!c||!!b.closest("form"):!0,T={checked:v,disabled:l,setChecked:_,control:b,setControl:S,name:f,form:c,value:m,hasConsumerStoppedPropagationRef:E,required:h,defaultChecked:wf(s)?!1:s,isFormControl:R,bubbleInput:w,setBubbleInput:x};return k.jsx(fye,{scope:t,...T,children:hye(g)?g(T):i})}var YI="CheckboxTrigger",ZI=j.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...i},s)=>{const{control:l,value:c,disabled:f,checked:d,required:h,setControl:m,setChecked:g,hasConsumerStoppedPropagationRef:v,isFormControl:_,bubbleInput:b}=EM(YI,e),S=ra(s,m),w=j.useRef(d);return j.useEffect(()=>{const x=l?.form;if(x){const E=()=>g(w.current);return x.addEventListener("reset",E),()=>x.removeEventListener("reset",E)}},[l,g]),k.jsx(Ur.button,{type:"button",role:"checkbox","aria-checked":wf(d)?"mixed":d,"aria-required":h,"data-state":tL(d),"data-disabled":f?"":void 0,disabled:f,value:c,...i,ref:S,onKeyDown:_r(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:_r(r,x=>{g(E=>wf(E)?!0:!E),b&&_&&(v.current=x.isPropagationStopped(),v.current||x.stopPropagation())})})});ZI.displayName=YI;var XI=j.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:i,checked:s,defaultChecked:l,required:c,disabled:f,value:d,onCheckedChange:h,form:m,...g}=e;return k.jsx(dye,{__scopeCheckbox:r,checked:s,defaultChecked:l,disabled:f,required:c,onCheckedChange:h,name:i,form:m,value:d,internal_do_not_use_render:({isFormControl:v})=>k.jsxs(k.Fragment,{children:[k.jsx(ZI,{...g,ref:t,__scopeCheckbox:r}),v&&k.jsx(eL,{__scopeCheckbox:r})]})})});XI.displayName=Sx;var QI="CheckboxIndicator",WI=j.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:i,...s}=e,l=EM(QI,r);return k.jsx(Pg,{present:i||wf(l.checked)||l.checked===!0,children:k.jsx(Ur.span,{"data-state":tL(l.checked),"data-disabled":l.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});WI.displayName=QI;var JI="CheckboxBubbleInput",eL=j.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:i,hasConsumerStoppedPropagationRef:s,checked:l,defaultChecked:c,required:f,disabled:d,name:h,value:m,form:g,bubbleInput:v,setBubbleInput:_}=EM(JI,e),b=ra(r,_),S=SM(l),w=wM(i);j.useEffect(()=>{const E=v;if(!E)return;const R=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(R,"checked").set,O=!s.current;if(S!==l&&C){const M=new Event("click",{bubbles:O});E.indeterminate=wf(l),C.call(E,wf(l)?!1:l),E.dispatchEvent(M)}},[v,S,l,s]);const x=j.useRef(wf(l)?!1:l);return k.jsx(Ur.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??x.current,required:f,disabled:d,name:h,value:m,form:g,...t,tabIndex:-1,ref:b,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});eL.displayName=JI;function hye(e){return typeof e=="function"}function wf(e){return e==="indeterminate"}function tL(e){return wf(e)?"indeterminate":e?"checked":"unchecked"}function pye(e,t){if(e==null)return{};var r={},i=Object.keys(e),s,l;for(l=0;l<i.length;l++)s=i[l],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}var mye=["color"],gye=j.forwardRef(function(e,t){var r=e.color,i=r===void 0?"currentColor":r,s=pye(e,mye);return j.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:t}),j.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))});function nL({className:e,...t}){return k.jsx(XI,{"data-slot":"checkbox",className:ln("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:k.jsx(WI,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:k.jsx(gye,{className:"size-3.5"})})})}var yye="Label",rL=j.forwardRef((e,t)=>k.jsx(iu.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));rL.displayName=yye;var vye=rL;function xM({className:e,...t}){return k.jsx(vye,{"data-slot":"label",className:ln("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function bye(e){const{id:t,htmlName:r,value:i,disabled:s,readonly:l,label:c,hideLabel:f,schema:d,autofocus:h,options:m,onChange:g,onBlur:v,onFocus:_,registry:b,uiSchema:S,className:w}=e,x=Yb(d),E=kt("DescriptionFieldTemplate",b,m),R=M=>g(M),T=()=>v(t,i),C=()=>_(t,i),O=m.description||d.description;return k.jsxs("div",{className:`relative ${s||l?"cursor-not-allowed opacity-50":""}`,"aria-describedby":go(t),children:[!f&&O&&k.jsx(E,{id:Xp(t),description:O,schema:d,uiSchema:S,registry:b}),k.jsxs("div",{className:"flex items-center gap-2 my-2",children:[k.jsx(nL,{id:t,name:r||t,checked:typeof i>"u"?!1:!!i,required:x,disabled:s||l,autoFocus:h,onCheckedChange:R,onBlur:T,onFocus:C,className:w}),k.jsx(xM,{className:"leading-tight",htmlFor:t,children:yI(c,f||!c)})]})]})}function Sye({id:e,htmlName:t,disabled:r,options:i,value:s,autofocus:l,readonly:c,required:f,onChange:d,onBlur:h,onFocus:m,className:g}){const{enumOptions:v,enumDisabled:_,inline:b,emptyValue:S}=i,w=Array.isArray(s)?s:[s],x=({target:R})=>h(e,Da(R&&R.value,v,S)),E=({target:R})=>m(e,Da(R&&R.value,v,S));return k.jsx("div",{className:ln({"flex flex-col gap-2":!b,"flex flex-row gap-4 flex-wrap":b}),children:Array.isArray(v)&&v.map((R,T)=>{const C=Q1(R.value,w),O=Array.isArray(_)&&_.indexOf(R.value)!==-1,M=xp(e,T);return k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx(nL,{id:M,name:t||e,required:f,disabled:r||O||c,onCheckedChange:D=>{d(D?dI(T,w,v):cI(T,w,v))},className:g,checked:C,autoFocus:l&&T===0,onBlur:x,onFocus:E,"aria-describedby":go(e)}),k.jsx(xM,{className:"leading-tight",htmlFor:xp(e,T),children:R.label})]},M)})})}function aL(e){const t=e+"CollectionProvider",[r,i]=Wp(t),[s,l]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=S=>{const{scope:w,children:x}=S,E=Qo.useRef(null),R=Qo.useRef(new Map).current;return k.jsx(s,{scope:w,itemMap:R,collectionRef:E,children:x})};c.displayName=t;const f=e+"CollectionSlot",d=OE(f),h=Qo.forwardRef((S,w)=>{const{scope:x,children:E}=S,R=l(f,x),T=ra(w,R.collectionRef);return k.jsx(d,{ref:T,children:E})});h.displayName=f;const m=e+"CollectionItemSlot",g="data-radix-collection-item",v=OE(m),_=Qo.forwardRef((S,w)=>{const{scope:x,children:E,...R}=S,T=Qo.useRef(null),C=ra(w,T),O=l(m,x);return Qo.useEffect(()=>(O.itemMap.set(T,{ref:T,...R}),()=>{O.itemMap.delete(T)})),k.jsx(v,{[g]:"",ref:C,children:E})});_.displayName=m;function b(S){const w=l(e+"CollectionConsumer",S);return Qo.useCallback(()=>{const E=w.collectionRef.current;if(!E)return[];const R=Array.from(E.querySelectorAll(`[${g}]`));return Array.from(w.itemMap.values()).sort((O,M)=>R.indexOf(O.ref.current)-R.indexOf(M.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:c,Slot:h,ItemSlot:_},b,i]}var wye=A1[" useId ".trim().toString()]||(()=>{}),Eye=0;function Zl(e){const[t,r]=j.useState(wye());return mg(()=>{r(i=>i??String(Eye++))},[e]),t?`radix-${t}`:""}function gg(e){const t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...r)=>t.current?.(...r),[])}var xye=j.createContext(void 0);function _M(e){const t=j.useContext(xye);return e||t||"ltr"}var _T="rovingFocusGroup.onEntryFocus",_ye={bubbles:!1,cancelable:!0},tS="RovingFocusGroup",[_O,iL,Tye]=aL(tS),[Cye,oL]=Wp(tS,[Tye]),[Oye,Rye]=Cye(tS),sL=j.forwardRef((e,t)=>k.jsx(_O.Provider,{scope:e.__scopeRovingFocusGroup,children:k.jsx(_O.Slot,{scope:e.__scopeRovingFocusGroup,children:k.jsx(Aye,{...e,ref:t})})}));sL.displayName=tS;var Aye=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:s=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:m=!1,...g}=e,v=j.useRef(null),_=ra(t,v),b=_M(l),[S,w]=eS({prop:c,defaultProp:f??null,onChange:d,caller:tS}),[x,E]=j.useState(!1),R=gg(h),T=iL(r),C=j.useRef(!1),[O,M]=j.useState(0);return j.useEffect(()=>{const D=v.current;if(D)return D.addEventListener(_T,R),()=>D.removeEventListener(_T,R)},[R]),k.jsx(Oye,{scope:r,orientation:i,dir:b,loop:s,currentTabStopId:S,onItemFocus:j.useCallback(D=>w(D),[w]),onItemShiftTab:j.useCallback(()=>E(!0),[]),onFocusableItemAdd:j.useCallback(()=>M(D=>D+1),[]),onFocusableItemRemove:j.useCallback(()=>M(D=>D-1),[]),children:k.jsx(Ur.div,{tabIndex:x||O===0?-1:0,"data-orientation":i,...g,ref:_,style:{outline:"none",...e.style},onMouseDown:_r(e.onMouseDown,()=>{C.current=!0}),onFocus:_r(e.onFocus,D=>{const U=!C.current;if(D.target===D.currentTarget&&U&&!x){const B=new CustomEvent(_T,_ye);if(D.currentTarget.dispatchEvent(B),!B.defaultPrevented){const q=T().filter(K=>K.focusable),V=q.find(K=>K.active),G=q.find(K=>K.id===S),oe=[V,G,...q].filter(Boolean).map(K=>K.ref.current);cL(oe,m)}}C.current=!1}),onBlur:_r(e.onBlur,()=>E(!1))})})}),lL="RovingFocusGroupItem",uL=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:s=!1,tabStopId:l,children:c,...f}=e,d=Zl(),h=l||d,m=Rye(lL,r),g=m.currentTabStopId===h,v=iL(r),{onFocusableItemAdd:_,onFocusableItemRemove:b,currentTabStopId:S}=m;return j.useEffect(()=>{if(i)return _(),()=>b()},[i,_,b]),k.jsx(_O.ItemSlot,{scope:r,id:h,focusable:i,active:s,children:k.jsx(Ur.span,{tabIndex:g?0:-1,"data-orientation":m.orientation,...f,ref:t,onMouseDown:_r(e.onMouseDown,w=>{i?m.onItemFocus(h):w.preventDefault()}),onFocus:_r(e.onFocus,()=>m.onItemFocus(h)),onKeyDown:_r(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){m.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const x=kye(w,m.orientation,m.dir);if(x!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let R=v().filter(T=>T.focusable).map(T=>T.ref.current);if(x==="last")R.reverse();else if(x==="prev"||x==="next"){x==="prev"&&R.reverse();const T=R.indexOf(w.currentTarget);R=m.loop?Dye(R,T+1):R.slice(T+1)}setTimeout(()=>cL(R))}}),children:typeof c=="function"?c({isCurrentTabStop:g,hasTabStop:S!=null}):c})})});uL.displayName=lL;var Mye={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jye(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function kye(e,t,r){const i=jye(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return Mye[i]}function cL(e,t=!1){const r=document.activeElement;for(const i of e)if(i===r||(i.focus({preventScroll:t}),document.activeElement!==r))return}function Dye(e,t){return e.map((r,i)=>e[(t+i)%e.length])}var Nye=sL,zye=uL,TM="Radio",[$ye,fL]=Wp(TM),[Pye,Iye]=$ye(TM),dL=j.forwardRef((e,t)=>{const{__scopeRadio:r,name:i,checked:s=!1,required:l,disabled:c,value:f="on",onCheck:d,form:h,...m}=e,[g,v]=j.useState(null),_=ra(t,w=>v(w)),b=j.useRef(!1),S=g?h||!!g.closest("form"):!0;return k.jsxs(Pye,{scope:r,checked:s,disabled:c,children:[k.jsx(Ur.button,{type:"button",role:"radio","aria-checked":s,"data-state":gL(s),"data-disabled":c?"":void 0,disabled:c,value:f,...m,ref:_,onClick:_r(e.onClick,w=>{s||d?.(),S&&(b.current=w.isPropagationStopped(),b.current||w.stopPropagation())})}),S&&k.jsx(mL,{control:g,bubbles:!b.current,name:i,value:f,checked:s,required:l,disabled:c,form:h,style:{transform:"translateX(-100%)"}})]})});dL.displayName=TM;var hL="RadioIndicator",pL=j.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:i,...s}=e,l=Iye(hL,r);return k.jsx(Pg,{present:i||l.checked,children:k.jsx(Ur.span,{"data-state":gL(l.checked),"data-disabled":l.disabled?"":void 0,...s,ref:t})})});pL.displayName=hL;var Lye="RadioBubbleInput",mL=j.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:i=!0,...s},l)=>{const c=j.useRef(null),f=ra(c,l),d=SM(r),h=wM(t);return j.useEffect(()=>{const m=c.current;if(!m)return;const g=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(g,"checked").set;if(d!==r&&_){const b=new Event("click",{bubbles:i});_.call(m,r),m.dispatchEvent(b)}},[d,r,i]),k.jsx(Ur.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:f,style:{...s.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});mL.displayName=Lye;function gL(e){return e?"checked":"unchecked"}var Uye=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],wx="RadioGroup",[qye]=Wp(wx,[oL,fL]),yL=oL(),vL=fL(),[Vye,Fye]=qye(wx),bL=j.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:i,defaultValue:s,value:l,required:c=!1,disabled:f=!1,orientation:d,dir:h,loop:m=!0,onValueChange:g,...v}=e,_=yL(r),b=_M(h),[S,w]=eS({prop:l,defaultProp:s??null,onChange:g,caller:wx});return k.jsx(Vye,{scope:r,name:i,required:c,disabled:f,value:S,onValueChange:w,children:k.jsx(Nye,{asChild:!0,..._,orientation:d,dir:b,loop:m,children:k.jsx(Ur.div,{role:"radiogroup","aria-required":c,"aria-orientation":d,"data-disabled":f?"":void 0,dir:b,...v,ref:t})})})});bL.displayName=wx;var SL="RadioGroupItem",wL=j.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:i,...s}=e,l=Fye(SL,r),c=l.disabled||i,f=yL(r),d=vL(r),h=j.useRef(null),m=ra(t,h),g=l.value===s.value,v=j.useRef(!1);return j.useEffect(()=>{const _=S=>{Uye.includes(S.key)&&(v.current=!0)},b=()=>v.current=!1;return document.addEventListener("keydown",_),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",_),document.removeEventListener("keyup",b)}},[]),k.jsx(zye,{asChild:!0,...f,focusable:!c,active:g,children:k.jsx(dL,{disabled:c,required:l.required,checked:g,...d,...s,name:l.name,ref:m,onCheck:()=>l.onValueChange(s.value),onKeyDown:_r(_=>{_.key==="Enter"&&_.preventDefault()}),onFocus:_r(s.onFocus,()=>{v.current&&h.current?.click()})})})});wL.displayName=SL;var Bye="RadioGroupIndicator",EL=j.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...i}=e,s=vL(r);return k.jsx(pL,{...s,...i,ref:t})});EL.displayName=Bye;var Hye=bL,Gye=wL,Kye=EL;function Yye({className:e,...t}){return k.jsx(Hye,{"data-slot":"radio-group",className:ln("grid gap-3",e),...t})}function Zye({className:e,...t}){return k.jsx(Gye,{"data-slot":"radio-group-item",className:ln("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:k.jsx(Kye,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:k.jsx(nge,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function Xye({id:e,options:t,value:r,required:i,disabled:s,readonly:l,onChange:c,onBlur:f,onFocus:d,className:h}){const{enumOptions:m,enumDisabled:g,emptyValue:v}=t,_=x=>c(Da(x,m,v)),b=({target:x})=>f(e,Da(x&&x.value,m,v)),S=({target:x})=>d(e,Da(x&&x.value,m,v)),w=!!(t&&t.inline);return k.jsx("div",{className:"mb-0",children:k.jsx(Yye,{defaultValue:r?.toString(),required:i,disabled:s||l,onValueChange:x=>{_(x)},onBlur:b,onFocus:S,"aria-describedby":go(e),orientation:w?"horizontal":"vertical",className:ln("flex flex-wrap",{"flex-col":!w},h),children:Array.isArray(m)&&m.map((x,E)=>{const R=Array.isArray(g)&&g.indexOf(x.value)!==-1,T=Q1(x.value,r);return k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx(Zye,{checked:T,value:E.toString(),id:xp(e,E),disabled:R}),k.jsx(xM,{className:"leading-tight",htmlFor:xp(e,E),children:x.label})]},xp(e,E))})})})}function xL(e,[t,r]){return Math.min(r,Math.max(t,e))}var _L=["PageUp","PageDown"],TL=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],CL={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ig="Slider",[TO,Qye,Wye]=aL(Ig),[OL]=Wp(Ig,[Wye]),[Jye,Ex]=OL(Ig),RL=j.forwardRef((e,t)=>{const{name:r,min:i=0,max:s=100,step:l=1,orientation:c="horizontal",disabled:f=!1,minStepsBetweenThumbs:d=0,defaultValue:h=[i],value:m,onValueChange:g=()=>{},onValueCommit:v=()=>{},inverted:_=!1,form:b,...S}=e,w=j.useRef(new Set),x=j.useRef(0),R=c==="horizontal"?e0e:t0e,[T=[],C]=eS({prop:m,defaultProp:h,onChange:q=>{[...w.current][x.current]?.focus(),g(q)}}),O=j.useRef(T);function M(q){const V=o0e(T,q);B(q,V)}function D(q){B(q,x.current)}function U(){const q=O.current[x.current];T[x.current]!==q&&v(T)}function B(q,V,{commit:G}={commit:!1}){const ne=c0e(l),oe=f0e(Math.round((q-i)/l)*l+i,ne),K=xL(oe,[i,s]);C((ee=[])=>{const re=a0e(ee,K,V);if(u0e(re,d*l)){x.current=re.indexOf(K);const ue=String(re)!==String(ee);return ue&&G&&v(re),ue?re:ee}else return ee})}return k.jsx(Jye,{scope:e.__scopeSlider,name:r,disabled:f,min:i,max:s,valueIndexToChangeRef:x,thumbs:w.current,values:T,orientation:c,form:b,children:k.jsx(TO.Provider,{scope:e.__scopeSlider,children:k.jsx(TO.Slot,{scope:e.__scopeSlider,children:k.jsx(R,{"aria-disabled":f,"data-disabled":f?"":void 0,...S,ref:t,onPointerDown:_r(S.onPointerDown,()=>{f||(O.current=T)}),min:i,max:s,inverted:_,onSlideStart:f?void 0:M,onSlideMove:f?void 0:D,onSlideEnd:f?void 0:U,onHomeKeyDown:()=>!f&&B(i,0,{commit:!0}),onEndKeyDown:()=>!f&&B(s,T.length-1,{commit:!0}),onStepKeyDown:({event:q,direction:V})=>{if(!f){const oe=_L.includes(q.key)||q.shiftKey&&TL.includes(q.key)?10:1,K=x.current,ee=T[K],re=l*oe*V;B(ee+re,K,{commit:!0})}}})})})})});RL.displayName=Ig;var[AL,ML]=OL(Ig,{startEdge:"left",endEdge:"right",size:"width",direction:1}),e0e=j.forwardRef((e,t)=>{const{min:r,max:i,dir:s,inverted:l,onSlideStart:c,onSlideMove:f,onSlideEnd:d,onStepKeyDown:h,...m}=e,[g,v]=j.useState(null),_=ra(t,R=>v(R)),b=j.useRef(void 0),S=_M(s),w=S==="ltr",x=w&&!l||!w&&l;function E(R){const T=b.current||g.getBoundingClientRect(),C=[0,T.width],M=CM(C,x?[r,i]:[i,r]);return b.current=T,M(R-T.left)}return k.jsx(AL,{scope:e.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:k.jsx(jL,{dir:S,"data-orientation":"horizontal",...m,ref:_,style:{...m.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:R=>{const T=E(R.clientX);c?.(T)},onSlideMove:R=>{const T=E(R.clientX);f?.(T)},onSlideEnd:()=>{b.current=void 0,d?.()},onStepKeyDown:R=>{const C=CL[x?"from-left":"from-right"].includes(R.key);h?.({event:R,direction:C?-1:1})}})})}),t0e=j.forwardRef((e,t)=>{const{min:r,max:i,inverted:s,onSlideStart:l,onSlideMove:c,onSlideEnd:f,onStepKeyDown:d,...h}=e,m=j.useRef(null),g=ra(t,m),v=j.useRef(void 0),_=!s;function b(S){const w=v.current||m.current.getBoundingClientRect(),x=[0,w.height],R=CM(x,_?[i,r]:[r,i]);return v.current=w,R(S-w.top)}return k.jsx(AL,{scope:e.__scopeSlider,startEdge:_?"bottom":"top",endEdge:_?"top":"bottom",size:"height",direction:_?1:-1,children:k.jsx(jL,{"data-orientation":"vertical",...h,ref:g,style:{...h.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:S=>{const w=b(S.clientY);l?.(w)},onSlideMove:S=>{const w=b(S.clientY);c?.(w)},onSlideEnd:()=>{v.current=void 0,f?.()},onStepKeyDown:S=>{const x=CL[_?"from-bottom":"from-top"].includes(S.key);d?.({event:S,direction:x?-1:1})}})})}),jL=j.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:i,onSlideMove:s,onSlideEnd:l,onHomeKeyDown:c,onEndKeyDown:f,onStepKeyDown:d,...h}=e,m=Ex(Ig,r);return k.jsx(Ur.span,{...h,ref:t,onKeyDown:_r(e.onKeyDown,g=>{g.key==="Home"?(c(g),g.preventDefault()):g.key==="End"?(f(g),g.preventDefault()):_L.concat(TL).includes(g.key)&&(d(g),g.preventDefault())}),onPointerDown:_r(e.onPointerDown,g=>{const v=g.target;v.setPointerCapture(g.pointerId),g.preventDefault(),m.thumbs.has(v)?v.focus():i(g)}),onPointerMove:_r(e.onPointerMove,g=>{g.target.hasPointerCapture(g.pointerId)&&s(g)}),onPointerUp:_r(e.onPointerUp,g=>{const v=g.target;v.hasPointerCapture(g.pointerId)&&(v.releasePointerCapture(g.pointerId),l(g))})})}),kL="SliderTrack",DL=j.forwardRef((e,t)=>{const{__scopeSlider:r,...i}=e,s=Ex(kL,r);return k.jsx(Ur.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...i,ref:t})});DL.displayName=kL;var CO="SliderRange",NL=j.forwardRef((e,t)=>{const{__scopeSlider:r,...i}=e,s=Ex(CO,r),l=ML(CO,r),c=j.useRef(null),f=ra(t,c),d=s.values.length,h=s.values.map(v=>PL(v,s.min,s.max)),m=d>1?Math.min(...h):0,g=100-Math.max(...h);return k.jsx(Ur.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...i,ref:f,style:{...e.style,[l.startEdge]:m+"%",[l.endEdge]:g+"%"}})});NL.displayName=CO;var OO="SliderThumb",zL=j.forwardRef((e,t)=>{const r=Qye(e.__scopeSlider),[i,s]=j.useState(null),l=ra(t,f=>s(f)),c=j.useMemo(()=>i?r().findIndex(f=>f.ref.current===i):-1,[r,i]);return k.jsx(n0e,{...e,ref:l,index:c})}),n0e=j.forwardRef((e,t)=>{const{__scopeSlider:r,index:i,name:s,...l}=e,c=Ex(OO,r),f=ML(OO,r),[d,h]=j.useState(null),m=ra(t,E=>h(E)),g=d?c.form||!!d.closest("form"):!0,v=wM(d),_=c.values[i],b=_===void 0?0:PL(_,c.min,c.max),S=i0e(i,c.values.length),w=v?.[f.size],x=w?s0e(w,b,f.direction):0;return j.useEffect(()=>{if(d)return c.thumbs.add(d),()=>{c.thumbs.delete(d)}},[d,c.thumbs]),k.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[f.startEdge]:`calc(${b}% + ${x}px)`},children:[k.jsx(TO.ItemSlot,{scope:e.__scopeSlider,children:k.jsx(Ur.span,{role:"slider","aria-label":e["aria-label"]||S,"aria-valuemin":c.min,"aria-valuenow":_,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0,...l,ref:m,style:_===void 0?{display:"none"}:e.style,onFocus:_r(e.onFocus,()=>{c.valueIndexToChangeRef.current=i})})}),g&&k.jsx($L,{name:s??(c.name?c.name+(c.values.length>1?"[]":""):void 0),form:c.form,value:_},i)]})});zL.displayName=OO;var r0e="RadioBubbleInput",$L=j.forwardRef(({__scopeSlider:e,value:t,...r},i)=>{const s=j.useRef(null),l=ra(s,i),c=SM(t);return j.useEffect(()=>{const f=s.current;if(!f)return;const d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(c!==t&&m){const g=new Event("input",{bubbles:!0});m.call(f,t),f.dispatchEvent(g)}},[c,t]),k.jsx(Ur.input,{style:{display:"none"},...r,ref:l,defaultValue:t})});$L.displayName=r0e;function a0e(e=[],t,r){const i=[...e];return i[r]=t,i.sort((s,l)=>s-l)}function PL(e,t,r){const l=100/(r-t)*(e-t);return xL(l,[0,100])}function i0e(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function o0e(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),i=Math.min(...r);return r.indexOf(i)}function s0e(e,t,r){const i=e/2,l=CM([0,50],[0,i]);return(i-l(t)*r)*r}function l0e(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function u0e(e,t){if(t>0){const r=l0e(e);return Math.min(...r)>=t}return!0}function CM(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(r-e[0])}}function c0e(e){return(String(e).split(".")[1]||"").length}function f0e(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var d0e=RL,h0e=DL,p0e=NL,m0e=zL;function g0e({className:e,defaultValue:t,value:r,min:i=0,max:s=100,...l}){const c=j.useMemo(()=>Array.isArray(r)?r:Array.isArray(t)?t:[i,s],[r,t,i,s]);return k.jsxs(d0e,{"data-slot":"slider",defaultValue:t,value:r,min:i,max:s,className:ln("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...l,children:[k.jsx(h0e,{"data-slot":"slider-track",className:ln("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:k.jsx(p0e,{"data-slot":"slider-range",className:ln("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:c.length},(f,d)=>k.jsx(m0e,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},d))]})}const y0e=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function v0e({value:e,readonly:t,disabled:r,options:i,schema:s,onChange:l,label:c,id:f}){const d=g=>l(g[0]),h={...pI(s)},m={id:f,...iA(i.props||{},y0e)};return k.jsxs(k.Fragment,{children:[k.jsx(g0e,{disabled:r||t,min:h.min,max:h.max,step:h.step,value:[e],onValueChange:d,...m,"aria-describedby":go(f)}),e]})}var VD=1,b0e=.9,S0e=.8,w0e=.17,TT=.1,CT=.999,E0e=.9999,x0e=.99,_0e=/[\\\/_+.#"@\[\(\{&]/,T0e=/[\\\/_+.#"@\[\(\{&]/g,C0e=/[\s-]/,IL=/[\s-]/g;function RO(e,t,r,i,s,l,c){if(l===t.length)return s===e.length?VD:x0e;var f=`${s},${l}`;if(c[f]!==void 0)return c[f];for(var d=i.charAt(l),h=r.indexOf(d,s),m=0,g,v,_,b;h>=0;)g=RO(e,t,r,i,h+1,l+1,c),g>m&&(h===s?g*=VD:_0e.test(e.charAt(h-1))?(g*=S0e,_=e.slice(s,h-1).match(T0e),_&&s>0&&(g*=Math.pow(CT,_.length))):C0e.test(e.charAt(h-1))?(g*=b0e,b=e.slice(s,h-1).match(IL),b&&s>0&&(g*=Math.pow(CT,b.length))):(g*=w0e,s>0&&(g*=Math.pow(CT,h-s))),e.charAt(h)!==t.charAt(l)&&(g*=E0e)),(g<TT&&r.charAt(h-1)===i.charAt(l+1)||i.charAt(l+1)===i.charAt(l)&&r.charAt(h-1)!==i.charAt(l))&&(v=RO(e,t,r,i,h+1,l+2,c),v*TT>g&&(g=v*TT)),g>m&&(m=g),h=r.indexOf(d,h+1);return c[f]=m,m}function FD(e){return e.toLowerCase().replace(IL," ")}function O0e(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,RO(e,t,FD(e),FD(t),0,0,{})}function R0e(e,t=globalThis?.document){const r=gg(e);j.useEffect(()=>{const i=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[r,t])}var A0e="DismissableLayer",AO="dismissableLayer.update",M0e="dismissableLayer.pointerDownOutside",j0e="dismissableLayer.focusOutside",BD,LL=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),UL=j.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:c,onDismiss:f,...d}=e,h=j.useContext(LL),[m,g]=j.useState(null),v=m?.ownerDocument??globalThis?.document,[,_]=j.useState({}),b=ra(t,M=>g(M)),S=Array.from(h.layers),[w]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),x=S.indexOf(w),E=m?S.indexOf(m):-1,R=h.layersWithOutsidePointerEventsDisabled.size>0,T=E>=x,C=N0e(M=>{const D=M.target,U=[...h.branches].some(B=>B.contains(D));!T||U||(s?.(M),c?.(M),M.defaultPrevented||f?.())},v),O=z0e(M=>{const D=M.target;[...h.branches].some(B=>B.contains(D))||(l?.(M),c?.(M),M.defaultPrevented||f?.())},v);return R0e(M=>{E===h.layers.size-1&&(i?.(M),!M.defaultPrevented&&f&&(M.preventDefault(),f()))},v),j.useEffect(()=>{if(m)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(BD=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(m)),h.layers.add(m),HD(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=BD)}},[m,v,r,h]),j.useEffect(()=>()=>{m&&(h.layers.delete(m),h.layersWithOutsidePointerEventsDisabled.delete(m),HD())},[m,h]),j.useEffect(()=>{const M=()=>_({});return document.addEventListener(AO,M),()=>document.removeEventListener(AO,M)},[]),k.jsx(Ur.div,{...d,ref:b,style:{pointerEvents:R?T?"auto":"none":void 0,...e.style},onFocusCapture:_r(e.onFocusCapture,O.onFocusCapture),onBlurCapture:_r(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:_r(e.onPointerDownCapture,C.onPointerDownCapture)})});UL.displayName=A0e;var k0e="DismissableLayerBranch",D0e=j.forwardRef((e,t)=>{const r=j.useContext(LL),i=j.useRef(null),s=ra(t,i);return j.useEffect(()=>{const l=i.current;if(l)return r.branches.add(l),()=>{r.branches.delete(l)}},[r.branches]),k.jsx(Ur.div,{...e,ref:s})});D0e.displayName=k0e;function N0e(e,t=globalThis?.document){const r=gg(e),i=j.useRef(!1),s=j.useRef(()=>{});return j.useEffect(()=>{const l=f=>{if(f.target&&!i.current){let d=function(){qL(M0e,r,h,{discrete:!0})};const h={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=d,t.addEventListener("click",s.current,{once:!0})):d()}else t.removeEventListener("click",s.current);i.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>i.current=!0}}function z0e(e,t=globalThis?.document){const r=gg(e),i=j.useRef(!1);return j.useEffect(()=>{const s=l=>{l.target&&!i.current&&qL(j0e,r,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function HD(){const e=new CustomEvent(AO);document.dispatchEvent(e)}function qL(e,t,r,{discrete:i}){const s=r.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),i?uye(s,l):s.dispatchEvent(l)}var OT="focusScope.autoFocusOnMount",RT="focusScope.autoFocusOnUnmount",GD={bubbles:!1,cancelable:!0},$0e="FocusScope",VL=j.forwardRef((e,t)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:l,...c}=e,[f,d]=j.useState(null),h=gg(s),m=gg(l),g=j.useRef(null),v=ra(t,S=>d(S)),_=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(i){let S=function(R){if(_.paused||!f)return;const T=R.target;f.contains(T)?g.current=T:uf(g.current,{select:!0})},w=function(R){if(_.paused||!f)return;const T=R.relatedTarget;T!==null&&(f.contains(T)||uf(g.current,{select:!0}))},x=function(R){if(document.activeElement===document.body)for(const C of R)C.removedNodes.length>0&&uf(f)};document.addEventListener("focusin",S),document.addEventListener("focusout",w);const E=new MutationObserver(x);return f&&E.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",w),E.disconnect()}}},[i,f,_.paused]),j.useEffect(()=>{if(f){YD.add(_);const S=document.activeElement;if(!f.contains(S)){const x=new CustomEvent(OT,GD);f.addEventListener(OT,h),f.dispatchEvent(x),x.defaultPrevented||(P0e(V0e(FL(f)),{select:!0}),document.activeElement===S&&uf(f))}return()=>{f.removeEventListener(OT,h),setTimeout(()=>{const x=new CustomEvent(RT,GD);f.addEventListener(RT,m),f.dispatchEvent(x),x.defaultPrevented||uf(S??document.body,{select:!0}),f.removeEventListener(RT,m),YD.remove(_)},0)}}},[f,h,m,_]);const b=j.useCallback(S=>{if(!r&&!i||_.paused)return;const w=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,x=document.activeElement;if(w&&x){const E=S.currentTarget,[R,T]=I0e(E);R&&T?!S.shiftKey&&x===T?(S.preventDefault(),r&&uf(R,{select:!0})):S.shiftKey&&x===R&&(S.preventDefault(),r&&uf(T,{select:!0})):x===E&&S.preventDefault()}},[r,i,_.paused]);return k.jsx(Ur.div,{tabIndex:-1,...c,ref:v,onKeyDown:b})});VL.displayName=$0e;function P0e(e,{select:t=!1}={}){const r=document.activeElement;for(const i of e)if(uf(i,{select:t}),document.activeElement!==r)return}function I0e(e){const t=FL(e),r=KD(t,e),i=KD(t.reverse(),e);return[r,i]}function FL(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function KD(e,t){for(const r of e)if(!L0e(r,{upTo:t}))return r}function L0e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function U0e(e){return e instanceof HTMLInputElement&&"select"in e}function uf(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&U0e(e)&&t&&e.select()}}var YD=q0e();function q0e(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=ZD(e,t),e.unshift(t)},remove(t){e=ZD(e,t),e[0]?.resume()}}}function ZD(e,t){const r=[...e],i=r.indexOf(t);return i!==-1&&r.splice(i,1),r}function V0e(e){return e.filter(t=>t.tagName!=="A")}var F0e="Portal",BL=j.forwardRef((e,t)=>{const{container:r,...i}=e,[s,l]=j.useState(!1);mg(()=>l(!0),[]);const c=r||s&&globalThis?.document?.body;return c?Uge.createPortal(k.jsx(Ur.div,{...i,ref:t}),c):null});BL.displayName=F0e;var AT=0;function B0e(){j.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??XD()),document.body.insertAdjacentElement("beforeend",e[1]??XD()),AT++,()=>{AT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),AT--}},[])}function XD(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Vl=function(){return Vl=Object.assign||function(t){for(var r,i=1,s=arguments.length;i<s;i++){r=arguments[i];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},Vl.apply(this,arguments)};function HL(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(r[i[s]]=e[i[s]]);return r}function MO(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function H0e(e,t,r){if(r||arguments.length===2)for(var i=0,s=t.length,l;i<s;i++)(l||!(i in t))&&(l||(l=Array.prototype.slice.call(t,0,i)),l[i]=t[i]);return e.concat(l||Array.prototype.slice.call(t))}var Gw="right-scroll-bar-position",Kw="width-before-scroll-bar",G0e="with-scroll-bars-hidden",K0e="--removed-body-scroll-bar-size";function MT(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Y0e(e,t){var r=j.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(i){var s=r.value;s!==i&&(r.value=i,r.callback(i,s))}}}})[0];return r.callback=t,r.facade}var Z0e=typeof window<"u"?j.useLayoutEffect:j.useEffect,QD=new WeakMap;function X0e(e,t){var r=Y0e(null,function(i){return e.forEach(function(s){return MT(s,i)})});return Z0e(function(){var i=QD.get(r);if(i){var s=new Set(i),l=new Set(e),c=r.current;s.forEach(function(f){l.has(f)||MT(f,null)}),l.forEach(function(f){s.has(f)||MT(f,c)})}QD.set(r,e)},[e]),r}function Q0e(e){return e}function W0e(e,t){t===void 0&&(t=Q0e);var r=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(l){var c=t(l,i);return r.push(c),function(){r=r.filter(function(f){return f!==c})}},assignSyncMedium:function(l){for(i=!0;r.length;){var c=r;r=[],c.forEach(l)}r={push:function(f){return l(f)},filter:function(){return r}}},assignMedium:function(l){i=!0;var c=[];if(r.length){var f=r;r=[],f.forEach(l),c=r}var d=function(){var m=c;c=[],m.forEach(l)},h=function(){return Promise.resolve().then(d)};h(),r={push:function(m){c.push(m),h()},filter:function(m){return c=c.filter(m),r}}}};return s}function J0e(e){e===void 0&&(e={});var t=W0e(null);return t.options=Vl({async:!0,ssr:!1},e),t}var GL=function(e){var t=e.sideCar,r=HL(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return j.createElement(i,Vl({},r))};GL.isSideCarExport=!0;function eve(e,t){return e.useMedium(t),GL}var KL=J0e(),jT=function(){},xx=j.forwardRef(function(e,t){var r=j.useRef(null),i=j.useState({onScrollCapture:jT,onWheelCapture:jT,onTouchMoveCapture:jT}),s=i[0],l=i[1],c=e.forwardProps,f=e.children,d=e.className,h=e.removeScrollBar,m=e.enabled,g=e.shards,v=e.sideCar,_=e.noRelative,b=e.noIsolation,S=e.inert,w=e.allowPinchZoom,x=e.as,E=x===void 0?"div":x,R=e.gapMode,T=HL(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=v,O=X0e([r,t]),M=Vl(Vl({},T),s);return j.createElement(j.Fragment,null,m&&j.createElement(C,{sideCar:KL,removeScrollBar:h,shards:g,noRelative:_,noIsolation:b,inert:S,setCallbacks:l,allowPinchZoom:!!w,lockRef:r,gapMode:R}),c?j.cloneElement(j.Children.only(f),Vl(Vl({},M),{ref:O})):j.createElement(E,Vl({},M,{className:d,ref:O}),f))});xx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xx.classNames={fullWidth:Kw,zeroRight:Gw};var tve=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function nve(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=tve();return t&&e.setAttribute("nonce",t),e}function rve(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ave(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ive=function(){var e=0,t=null;return{add:function(r){e==0&&(t=nve())&&(rve(t,r),ave(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ove=function(){var e=ive();return function(t,r){j.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},YL=function(){var e=ove(),t=function(r){var i=r.styles,s=r.dynamic;return e(i,s),null};return t},sve={left:0,top:0,right:0,gap:0},kT=function(e){return parseInt(e||"",10)||0},lve=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[kT(r),kT(i),kT(s)]},uve=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return sve;var t=lve(e),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-r+t[2]-t[0])}},cve=YL(),Qm="data-scroll-locked",fve=function(e,t,r,i){var s=e.left,l=e.top,c=e.right,f=e.gap;return r===void 0&&(r="margin"),`
|
|
84
|
+
.`.concat(G0e,` {
|
|
85
|
+
overflow: hidden `).concat(i,`;
|
|
86
|
+
padding-right: `).concat(f,"px ").concat(i,`;
|
|
87
|
+
}
|
|
88
|
+
body[`).concat(Qm,`] {
|
|
89
|
+
overflow: hidden `).concat(i,`;
|
|
90
|
+
overscroll-behavior: contain;
|
|
91
|
+
`).concat([t&&"position: relative ".concat(i,";"),r==="margin"&&`
|
|
92
|
+
padding-left: `.concat(s,`px;
|
|
93
|
+
padding-top: `).concat(l,`px;
|
|
94
|
+
padding-right: `).concat(c,`px;
|
|
95
|
+
margin-left:0;
|
|
96
|
+
margin-top:0;
|
|
97
|
+
margin-right: `).concat(f,"px ").concat(i,`;
|
|
98
|
+
`),r==="padding"&&"padding-right: ".concat(f,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.`).concat(Gw,` {
|
|
102
|
+
right: `).concat(f,"px ").concat(i,`;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.`).concat(Kw,` {
|
|
106
|
+
margin-right: `).concat(f,"px ").concat(i,`;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.`).concat(Gw," .").concat(Gw,` {
|
|
110
|
+
right: 0 `).concat(i,`;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.`).concat(Kw," .").concat(Kw,` {
|
|
114
|
+
margin-right: 0 `).concat(i,`;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
body[`).concat(Qm,`] {
|
|
118
|
+
`).concat(K0e,": ").concat(f,`px;
|
|
119
|
+
}
|
|
120
|
+
`)},WD=function(){var e=parseInt(document.body.getAttribute(Qm)||"0",10);return isFinite(e)?e:0},dve=function(){j.useEffect(function(){return document.body.setAttribute(Qm,(WD()+1).toString()),function(){var e=WD()-1;e<=0?document.body.removeAttribute(Qm):document.body.setAttribute(Qm,e.toString())}},[])},hve=function(e){var t=e.noRelative,r=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;dve();var l=j.useMemo(function(){return uve(s)},[s]);return j.createElement(cve,{styles:fve(l,!t,s,r?"":"!important")})},jO=!1;if(typeof window<"u")try{var hw=Object.defineProperty({},"passive",{get:function(){return jO=!0,!0}});window.addEventListener("test",hw,hw),window.removeEventListener("test",hw,hw)}catch{jO=!1}var Em=jO?{passive:!1}:!1,pve=function(e){return e.tagName==="TEXTAREA"},ZL=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!pve(e)&&r[t]==="visible")},mve=function(e){return ZL(e,"overflowY")},gve=function(e){return ZL(e,"overflowX")},JD=function(e,t){var r=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=XL(e,i);if(s){var l=QL(e,i),c=l[1],f=l[2];if(c>f)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},yve=function(e){var t=e.scrollTop,r=e.scrollHeight,i=e.clientHeight;return[t,r,i]},vve=function(e){var t=e.scrollLeft,r=e.scrollWidth,i=e.clientWidth;return[t,r,i]},XL=function(e,t){return e==="v"?mve(t):gve(t)},QL=function(e,t){return e==="v"?yve(t):vve(t)},bve=function(e,t){return e==="h"&&t==="rtl"?-1:1},Sve=function(e,t,r,i,s){var l=bve(e,window.getComputedStyle(t).direction),c=l*i,f=r.target,d=t.contains(f),h=!1,m=c>0,g=0,v=0;do{if(!f)break;var _=QL(e,f),b=_[0],S=_[1],w=_[2],x=S-w-l*b;(b||x)&&XL(e,f)&&(g+=x,v+=b);var E=f.parentNode;f=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!d&&f!==document.body||d&&(t.contains(f)||t===f));return(m&&Math.abs(g)<1||!m&&Math.abs(v)<1)&&(h=!0),h},pw=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},eN=function(e){return[e.deltaX,e.deltaY]},tN=function(e){return e&&"current"in e?e.current:e},wve=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Eve=function(e){return`
|
|
121
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
122
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
123
|
+
`)},xve=0,xm=[];function _ve(e){var t=j.useRef([]),r=j.useRef([0,0]),i=j.useRef(),s=j.useState(xve++)[0],l=j.useState(YL)[0],c=j.useRef(e);j.useEffect(function(){c.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var S=H0e([e.lockRef.current],(e.shards||[]).map(tN),!0).filter(Boolean);return S.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),S.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var f=j.useCallback(function(S,w){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!c.current.allowPinchZoom;var x=pw(S),E=r.current,R="deltaX"in S?S.deltaX:E[0]-x[0],T="deltaY"in S?S.deltaY:E[1]-x[1],C,O=S.target,M=Math.abs(R)>Math.abs(T)?"h":"v";if("touches"in S&&M==="h"&&O.type==="range")return!1;var D=window.getSelection(),U=D&&D.anchorNode,B=U?U===O||U.contains(O):!1;if(B)return!1;var q=JD(M,O);if(!q)return!0;if(q?C=M:(C=M==="v"?"h":"v",q=JD(M,O)),!q)return!1;if(!i.current&&"changedTouches"in S&&(R||T)&&(i.current=C),!C)return!0;var V=i.current||C;return Sve(V,w,S,V==="h"?R:T)},[]),d=j.useCallback(function(S){var w=S;if(!(!xm.length||xm[xm.length-1]!==l)){var x="deltaY"in w?eN(w):pw(w),E=t.current.filter(function(C){return C.name===w.type&&(C.target===w.target||w.target===C.shadowParent)&&wve(C.delta,x)})[0];if(E&&E.should){w.cancelable&&w.preventDefault();return}if(!E){var R=(c.current.shards||[]).map(tN).filter(Boolean).filter(function(C){return C.contains(w.target)}),T=R.length>0?f(w,R[0]):!c.current.noIsolation;T&&w.cancelable&&w.preventDefault()}}},[]),h=j.useCallback(function(S,w,x,E){var R={name:S,delta:w,target:x,should:E,shadowParent:Tve(x)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(T){return T!==R})},1)},[]),m=j.useCallback(function(S){r.current=pw(S),i.current=void 0},[]),g=j.useCallback(function(S){h(S.type,eN(S),S.target,f(S,e.lockRef.current))},[]),v=j.useCallback(function(S){h(S.type,pw(S),S.target,f(S,e.lockRef.current))},[]);j.useEffect(function(){return xm.push(l),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",d,Em),document.addEventListener("touchmove",d,Em),document.addEventListener("touchstart",m,Em),function(){xm=xm.filter(function(S){return S!==l}),document.removeEventListener("wheel",d,Em),document.removeEventListener("touchmove",d,Em),document.removeEventListener("touchstart",m,Em)}},[]);var _=e.removeScrollBar,b=e.inert;return j.createElement(j.Fragment,null,b?j.createElement(l,{styles:Eve(s)}):null,_?j.createElement(hve,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Tve(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Cve=eve(KL,_ve);var WL=j.forwardRef(function(e,t){return j.createElement(xx,Vl({},e,{ref:t,sideCar:Cve}))});WL.classNames=xx.classNames;var Ove=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_m=new WeakMap,mw=new WeakMap,gw={},DT=0,JL=function(e){return e&&(e.host||JL(e.parentNode))},Rve=function(e,t){return t.map(function(r){if(e.contains(r))return r;var i=JL(r);return i&&e.contains(i)?i:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Ave=function(e,t,r,i){var s=Rve(t,Array.isArray(e)?e:[e]);gw[r]||(gw[r]=new WeakMap);var l=gw[r],c=[],f=new Set,d=new Set(s),h=function(g){!g||f.has(g)||(f.add(g),h(g.parentNode))};s.forEach(h);var m=function(g){!g||d.has(g)||Array.prototype.forEach.call(g.children,function(v){if(f.has(v))m(v);else try{var _=v.getAttribute(i),b=_!==null&&_!=="false",S=(_m.get(v)||0)+1,w=(l.get(v)||0)+1;_m.set(v,S),l.set(v,w),c.push(v),S===1&&b&&mw.set(v,!0),w===1&&v.setAttribute(r,"true"),b||v.setAttribute(i,"true")}catch(x){console.error("aria-hidden: cannot operate on ",v,x)}})};return m(t),f.clear(),DT++,function(){c.forEach(function(g){var v=_m.get(g)-1,_=l.get(g)-1;_m.set(g,v),l.set(g,_),v||(mw.has(g)||g.removeAttribute(i),mw.delete(g)),_||g.removeAttribute(r)}),DT--,DT||(_m=new WeakMap,_m=new WeakMap,mw=new WeakMap,gw={})}},Mve=function(e,t,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),s=Ove(e);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),Ave(i,s,r,"aria-hidden")):function(){return null}},_x="Dialog",[e7]=Wp(_x),[jve,_l]=e7(_x),t7=e=>{const{__scopeDialog:t,children:r,open:i,defaultOpen:s,onOpenChange:l,modal:c=!0}=e,f=j.useRef(null),d=j.useRef(null),[h,m]=eS({prop:i,defaultProp:s??!1,onChange:l,caller:_x});return k.jsx(jve,{scope:t,triggerRef:f,contentRef:d,contentId:Zl(),titleId:Zl(),descriptionId:Zl(),open:h,onOpenChange:m,onOpenToggle:j.useCallback(()=>m(g=>!g),[m]),modal:c,children:r})};t7.displayName=_x;var n7="DialogTrigger",kve=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=_l(n7,r),l=ra(t,s.triggerRef);return k.jsx(Ur.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":AM(s.open),...i,ref:l,onClick:_r(e.onClick,s.onOpenToggle)})});kve.displayName=n7;var OM="DialogPortal",[Dve,r7]=e7(OM,{forceMount:void 0}),a7=e=>{const{__scopeDialog:t,forceMount:r,children:i,container:s}=e,l=_l(OM,t);return k.jsx(Dve,{scope:t,forceMount:r,children:j.Children.map(i,c=>k.jsx(Pg,{present:r||l.open,children:k.jsx(BL,{asChild:!0,container:s,children:c})}))})};a7.displayName=OM;var RE="DialogOverlay",i7=j.forwardRef((e,t)=>{const r=r7(RE,e.__scopeDialog),{forceMount:i=r.forceMount,...s}=e,l=_l(RE,e.__scopeDialog);return l.modal?k.jsx(Pg,{present:i||l.open,children:k.jsx(zve,{...s,ref:t})}):null});i7.displayName=RE;var Nve=OE("DialogOverlay.RemoveScroll"),zve=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=_l(RE,r);return k.jsx(WL,{as:Nve,allowPinchZoom:!0,shards:[s.contentRef],children:k.jsx(Ur.div,{"data-state":AM(s.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),$p="DialogContent",o7=j.forwardRef((e,t)=>{const r=r7($p,e.__scopeDialog),{forceMount:i=r.forceMount,...s}=e,l=_l($p,e.__scopeDialog);return k.jsx(Pg,{present:i||l.open,children:l.modal?k.jsx($ve,{...s,ref:t}):k.jsx(Pve,{...s,ref:t})})});o7.displayName=$p;var $ve=j.forwardRef((e,t)=>{const r=_l($p,e.__scopeDialog),i=j.useRef(null),s=ra(t,r.contentRef,i);return j.useEffect(()=>{const l=i.current;if(l)return Mve(l)},[]),k.jsx(s7,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_r(e.onCloseAutoFocus,l=>{l.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:_r(e.onPointerDownOutside,l=>{const c=l.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0;(c.button===2||f)&&l.preventDefault()}),onFocusOutside:_r(e.onFocusOutside,l=>l.preventDefault())})}),Pve=j.forwardRef((e,t)=>{const r=_l($p,e.__scopeDialog),i=j.useRef(!1),s=j.useRef(!1);return k.jsx(s7,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(i.current||r.triggerRef.current?.focus(),l.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=l.target;r.triggerRef.current?.contains(c)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&s.current&&l.preventDefault()}})}),s7=j.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,...c}=e,f=_l($p,r),d=j.useRef(null),h=ra(t,d);return B0e(),k.jsxs(k.Fragment,{children:[k.jsx(VL,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:l,children:k.jsx(UL,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":AM(f.open),...c,ref:h,onDismiss:()=>f.onOpenChange(!1)})}),k.jsxs(k.Fragment,{children:[k.jsx(qve,{titleId:f.titleId}),k.jsx(Fve,{contentRef:d,descriptionId:f.descriptionId})]})]})}),RM="DialogTitle",Ive=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=_l(RM,r);return k.jsx(Ur.h2,{id:s.titleId,...i,ref:t})});Ive.displayName=RM;var l7="DialogDescription",Lve=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=_l(l7,r);return k.jsx(Ur.p,{id:s.descriptionId,...i,ref:t})});Lve.displayName=l7;var u7="DialogClose",Uve=j.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,s=_l(u7,r);return k.jsx(Ur.button,{type:"button",...i,ref:t,onClick:_r(e.onClick,()=>s.onOpenChange(!1))})});Uve.displayName=u7;function AM(e){return e?"open":"closed"}var c7="DialogTitleWarning",[g2e,f7]=Zge(c7,{contentName:$p,titleName:RM,docsSlug:"dialog"}),qve=({titleId:e})=>{const t=f7(c7),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
124
|
+
|
|
125
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
126
|
+
|
|
127
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return j.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Vve="DialogDescriptionWarning",Fve=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${f7(Vve).contentName}}.`;return j.useEffect(()=>{const s=e.current?.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},Bve=t7,Hve=a7,Gve=i7,Kve=o7,_b='[cmdk-group=""]',NT='[cmdk-group-items=""]',Yve='[cmdk-group-heading=""]',d7='[cmdk-item=""]',nN=`${d7}:not([aria-disabled="true"])`,kO="cmdk-item-select",Rm="data-value",Zve=(e,t,r)=>O0e(e,t,r),h7=j.createContext(void 0),nS=()=>j.useContext(h7),p7=j.createContext(void 0),MM=()=>j.useContext(p7),m7=j.createContext(void 0),g7=j.forwardRef((e,t)=>{let r=Am(()=>{var L,Y;return{search:"",value:(Y=(L=e.value)!=null?L:e.defaultValue)!=null?Y:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=Am(()=>new Set),s=Am(()=>new Map),l=Am(()=>new Map),c=Am(()=>new Set),f=y7(e),{label:d,children:h,value:m,onValueChange:g,filter:v,shouldFilter:_,loop:b,disablePointerSelection:S=!1,vimBindings:w=!0,...x}=e,E=Zl(),R=Zl(),T=Zl(),C=j.useRef(null),O=obe();Pp(()=>{if(m!==void 0){let L=m.trim();r.current.value=L,M.emit()}},[m]),Pp(()=>{O(6,G)},[]);let M=j.useMemo(()=>({subscribe:L=>(c.current.add(L),()=>c.current.delete(L)),snapshot:()=>r.current,setState:(L,Y,I)=>{var X,J,he,xe;if(!Object.is(r.current[L],Y)){if(r.current[L]=Y,L==="search")V(),B(),O(1,q);else if(L==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let we=document.getElementById(T);we?we.focus():(X=document.getElementById(E))==null||X.focus()}if(O(7,()=>{var we;r.current.selectedItemId=(we=ne())==null?void 0:we.id,M.emit()}),I||O(5,G),((J=f.current)==null?void 0:J.value)!==void 0){let we=Y??"";(xe=(he=f.current).onValueChange)==null||xe.call(he,we);return}}M.emit()}},emit:()=>{c.current.forEach(L=>L())}}),[]),D=j.useMemo(()=>({value:(L,Y,I)=>{var X;Y!==((X=l.current.get(L))==null?void 0:X.value)&&(l.current.set(L,{value:Y,keywords:I}),r.current.filtered.items.set(L,U(Y,I)),O(2,()=>{B(),M.emit()}))},item:(L,Y)=>(i.current.add(L),Y&&(s.current.has(Y)?s.current.get(Y).add(L):s.current.set(Y,new Set([L]))),O(3,()=>{V(),B(),r.current.value||q(),M.emit()}),()=>{l.current.delete(L),i.current.delete(L),r.current.filtered.items.delete(L);let I=ne();O(4,()=>{V(),I?.getAttribute("id")===L&&q(),M.emit()})}),group:L=>(s.current.has(L)||s.current.set(L,new Set),()=>{l.current.delete(L),s.current.delete(L)}),filter:()=>f.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>f.current.disablePointerSelection,listId:E,inputId:T,labelId:R,listInnerRef:C}),[]);function U(L,Y){var I,X;let J=(X=(I=f.current)==null?void 0:I.filter)!=null?X:Zve;return L?J(L,r.current.search,Y):0}function B(){if(!r.current.search||f.current.shouldFilter===!1)return;let L=r.current.filtered.items,Y=[];r.current.filtered.groups.forEach(X=>{let J=s.current.get(X),he=0;J.forEach(xe=>{let we=L.get(xe);he=Math.max(we,he)}),Y.push([X,he])});let I=C.current;oe().sort((X,J)=>{var he,xe;let we=X.getAttribute("id"),je=J.getAttribute("id");return((he=L.get(je))!=null?he:0)-((xe=L.get(we))!=null?xe:0)}).forEach(X=>{let J=X.closest(NT);J?J.appendChild(X.parentElement===J?X:X.closest(`${NT} > *`)):I.appendChild(X.parentElement===I?X:X.closest(`${NT} > *`))}),Y.sort((X,J)=>J[1]-X[1]).forEach(X=>{var J;let he=(J=C.current)==null?void 0:J.querySelector(`${_b}[${Rm}="${encodeURIComponent(X[0])}"]`);he?.parentElement.appendChild(he)})}function q(){let L=oe().find(I=>I.getAttribute("aria-disabled")!=="true"),Y=L?.getAttribute(Rm);M.setState("value",Y||void 0)}function V(){var L,Y,I,X;if(!r.current.search||f.current.shouldFilter===!1){r.current.filtered.count=i.current.size;return}r.current.filtered.groups=new Set;let J=0;for(let he of i.current){let xe=(Y=(L=l.current.get(he))==null?void 0:L.value)!=null?Y:"",we=(X=(I=l.current.get(he))==null?void 0:I.keywords)!=null?X:[],je=U(xe,we);r.current.filtered.items.set(he,je),je>0&&J++}for(let[he,xe]of s.current)for(let we of xe)if(r.current.filtered.items.get(we)>0){r.current.filtered.groups.add(he);break}r.current.filtered.count=J}function G(){var L,Y,I;let X=ne();X&&(((L=X.parentElement)==null?void 0:L.firstChild)===X&&((I=(Y=X.closest(_b))==null?void 0:Y.querySelector(Yve))==null||I.scrollIntoView({block:"nearest"})),X.scrollIntoView({block:"nearest"}))}function ne(){var L;return(L=C.current)==null?void 0:L.querySelector(`${d7}[aria-selected="true"]`)}function oe(){var L;return Array.from(((L=C.current)==null?void 0:L.querySelectorAll(nN))||[])}function K(L){let Y=oe()[L];Y&&M.setState("value",Y.getAttribute(Rm))}function ee(L){var Y;let I=ne(),X=oe(),J=X.findIndex(xe=>xe===I),he=X[J+L];(Y=f.current)!=null&&Y.loop&&(he=J+L<0?X[X.length-1]:J+L===X.length?X[0]:X[J+L]),he&&M.setState("value",he.getAttribute(Rm))}function re(L){let Y=ne(),I=Y?.closest(_b),X;for(;I&&!X;)I=L>0?abe(I,_b):ibe(I,_b),X=I?.querySelector(nN);X?M.setState("value",X.getAttribute(Rm)):ee(L)}let ue=()=>K(oe().length-1),Q=L=>{L.preventDefault(),L.metaKey?ue():L.altKey?re(1):ee(1)},z=L=>{L.preventDefault(),L.metaKey?K(0):L.altKey?re(-1):ee(-1)};return j.createElement(iu.div,{ref:t,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:L=>{var Y;(Y=x.onKeyDown)==null||Y.call(x,L);let I=L.nativeEvent.isComposing||L.keyCode===229;if(!(L.defaultPrevented||I))switch(L.key){case"n":case"j":{w&&L.ctrlKey&&Q(L);break}case"ArrowDown":{Q(L);break}case"p":case"k":{w&&L.ctrlKey&&z(L);break}case"ArrowUp":{z(L);break}case"Home":{L.preventDefault(),K(0);break}case"End":{L.preventDefault(),ue();break}case"Enter":{L.preventDefault();let X=ne();if(X){let J=new Event(kO);X.dispatchEvent(J)}}}}},j.createElement("label",{"cmdk-label":"",htmlFor:D.inputId,id:D.labelId,style:lbe},d),Tx(e,L=>j.createElement(p7.Provider,{value:M},j.createElement(h7.Provider,{value:D},L))))}),Xve=j.forwardRef((e,t)=>{var r,i;let s=Zl(),l=j.useRef(null),c=j.useContext(m7),f=nS(),d=y7(e),h=(i=(r=d.current)==null?void 0:r.forceMount)!=null?i:c?.forceMount;Pp(()=>{if(!h)return f.item(s,c?.id)},[h]);let m=v7(s,l,[e.value,e.children,l],e.keywords),g=MM(),v=kf(O=>O.value&&O.value===m.current),_=kf(O=>h||f.filter()===!1?!0:O.search?O.filtered.items.get(s)>0:!0);j.useEffect(()=>{let O=l.current;if(!(!O||e.disabled))return O.addEventListener(kO,b),()=>O.removeEventListener(kO,b)},[_,e.onSelect,e.disabled]);function b(){var O,M;S(),(M=(O=d.current).onSelect)==null||M.call(O,m.current)}function S(){g.setState("value",m.current,!0)}if(!_)return null;let{disabled:w,value:x,onSelect:E,forceMount:R,keywords:T,...C}=e;return j.createElement(iu.div,{ref:jf(l,t),...C,id:s,"cmdk-item":"",role:"option","aria-disabled":!!w,"aria-selected":!!v,"data-disabled":!!w,"data-selected":!!v,onPointerMove:w||f.getDisablePointerSelection()?void 0:S,onClick:w?void 0:b},e.children)}),Qve=j.forwardRef((e,t)=>{let{heading:r,children:i,forceMount:s,...l}=e,c=Zl(),f=j.useRef(null),d=j.useRef(null),h=Zl(),m=nS(),g=kf(_=>s||m.filter()===!1?!0:_.search?_.filtered.groups.has(c):!0);Pp(()=>m.group(c),[]),v7(c,f,[e.value,e.heading,d]);let v=j.useMemo(()=>({id:c,forceMount:s}),[s]);return j.createElement(iu.div,{ref:jf(f,t),...l,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},r&&j.createElement("div",{ref:d,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),Tx(e,_=>j.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},j.createElement(m7.Provider,{value:v},_))))}),Wve=j.forwardRef((e,t)=>{let{alwaysRender:r,...i}=e,s=j.useRef(null),l=kf(c=>!c.search);return!r&&!l?null:j.createElement(iu.div,{ref:jf(s,t),...i,"cmdk-separator":"",role:"separator"})}),Jve=j.forwardRef((e,t)=>{let{onValueChange:r,...i}=e,s=e.value!=null,l=MM(),c=kf(h=>h.search),f=kf(h=>h.selectedItemId),d=nS();return j.useEffect(()=>{e.value!=null&&l.setState("search",e.value)},[e.value]),j.createElement(iu.input,{ref:t,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":f,id:d.inputId,type:"text",value:s?e.value:c,onChange:h=>{s||l.setState("search",h.target.value),r?.(h.target.value)}})}),ebe=j.forwardRef((e,t)=>{let{children:r,label:i="Suggestions",...s}=e,l=j.useRef(null),c=j.useRef(null),f=kf(h=>h.selectedItemId),d=nS();return j.useEffect(()=>{if(c.current&&l.current){let h=c.current,m=l.current,g,v=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let _=h.offsetHeight;m.style.setProperty("--cmdk-list-height",_.toFixed(1)+"px")})});return v.observe(h),()=>{cancelAnimationFrame(g),v.unobserve(h)}}},[]),j.createElement(iu.div,{ref:jf(l,t),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":f,"aria-label":i,id:d.listId},Tx(e,h=>j.createElement("div",{ref:jf(c,d.listInnerRef),"cmdk-list-sizer":""},h)))}),tbe=j.forwardRef((e,t)=>{let{open:r,onOpenChange:i,overlayClassName:s,contentClassName:l,container:c,...f}=e;return j.createElement(Bve,{open:r,onOpenChange:i},j.createElement(Hve,{container:c},j.createElement(Gve,{"cmdk-overlay":"",className:s}),j.createElement(Kve,{"aria-label":e.label,"cmdk-dialog":"",className:l},j.createElement(g7,{ref:t,...f}))))}),nbe=j.forwardRef((e,t)=>kf(r=>r.filtered.count===0)?j.createElement(iu.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),rbe=j.forwardRef((e,t)=>{let{progress:r,children:i,label:s="Loading...",...l}=e;return j.createElement(iu.div,{ref:t,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},Tx(e,c=>j.createElement("div",{"aria-hidden":!0},c)))}),ss=Object.assign(g7,{List:ebe,Item:Xve,Input:Jve,Group:Qve,Separator:Wve,Dialog:tbe,Empty:nbe,Loading:rbe});function abe(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function ibe(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function y7(e){let t=j.useRef(e);return Pp(()=>{t.current=e}),t}var Pp=typeof window>"u"?j.useEffect:j.useLayoutEffect;function Am(e){let t=j.useRef();return t.current===void 0&&(t.current=e()),t}function kf(e){let t=MM(),r=()=>e(t.snapshot());return j.useSyncExternalStore(t.subscribe,r,r)}function v7(e,t,r,i=[]){let s=j.useRef(),l=nS();return Pp(()=>{var c;let f=(()=>{var h;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(h=m.current.textContent)==null?void 0:h.trim():s.current}})(),d=i.map(h=>h.trim());l.value(e,f,d),(c=t.current)==null||c.setAttribute(Rm,f),s.current=f}),s}var obe=()=>{let[e,t]=j.useState(),r=Am(()=>new Map);return Pp(()=>{r.current.forEach(i=>i()),r.current=new Map},[e]),(i,s)=>{r.current.set(i,s),t({})}};function sbe(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Tx({asChild:e,children:t},r){return e&&j.isValidElement(t)?j.cloneElement(sbe(t),{ref:t.ref},r(t.props.children)):r(t)}var lbe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const ube=Fc("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function cbe({className:e,variant:t,asChild:r=!1,...i}){const s=r?FI:"span";return k.jsx(s,{"data-slot":"badge",className:ln(ube({variant:t}),e),...i})}const b7=j.forwardRef(({className:e,...t},r)=>k.jsx(ss,{ref:r,"data-slot":"command",className:ln("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})),fbe=j.forwardRef(({className:e,...t},r)=>k.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[k.jsx(oge,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),k.jsx(ss.Input,{ref:r,className:ln("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));fbe.displayName=ss.Input.displayName;function S7({className:e,...t}){return k.jsx(ss.List,{"data-slot":"command-list",className:ln("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function w7({className:e,...t}){return k.jsx(ss.Group,{"data-slot":"command-group",className:ln("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function E7({className:e,...t}){return k.jsx(ss.Item,{"data-slot":"command-item",className:ln("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function dbe({multiple:e,items:t=[],selected:r,onValueChange:i,autoFocus:s=!1,disabled:l=!1,ariaDescribedby:c,ariaPlaceholder:f,onFocus:d,onBlur:h,className:m,id:g}){const v=j.useRef(null),[_,b]=j.useState(!1),[S,w]=j.useState(""),x=j.useMemo(()=>t.filter(M=>r.some(D=>gf(M.value,D))),[t,r]),E=j.useMemo(()=>t.filter(M=>!x.some(D=>gf(D.value,M.value))),[t,x]),R=j.useCallback(M=>{if(l)return;const D=x.filter(U=>!gf(U.value,M.value));i?.(D.map(U=>U.index))},[x,i,l]),T=j.useCallback(M=>{if(!(l||!v.current||v.current.value!==""))if(M.key==="Delete"||M.key==="Backspace"){const D=x.slice(0,-1);i?.(D.map(U=>U.index))}else M.key==="Escape"&&v.current.blur()},[x,i,l]),C=j.useCallback(M=>{if(l)return;w("");const D=e?[...x,M]:[M];i?.(D.map(U=>U.index))},[e,x,i,l]),O=j.useCallback(M=>{l||b(!0),d?.(M)},[l,d]);return k.jsxs(b7,{onKeyDown:T,className:ln("overflow-visible bg-transparent",m),autoFocus:s,"aria-disabled":l,onBlur:h,onFocus:O,"aria-describedby":c,"aria-placeholder":f,children:[k.jsx("div",{className:ln("group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1",l&&"opacity-50 cursor-not-allowed"),children:k.jsxs("div",{className:"flex gap-1 flex-wrap",children:[x.map(M=>k.jsxs(cbe,{variant:"secondary",children:[M.label,k.jsx("button",{type:"button",className:"rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1",onKeyDown:D=>D.key==="Enter"&&!l&&R(M),onMouseDown:D=>{D.preventDefault(),D.stopPropagation()},onClick:()=>R(M),disabled:l,children:k.jsx(UI,{className:ln("h-3 w-3 text-muted-foreground hover:text-foreground",l&&"pointer-events-none")})})]},M.value)),k.jsx(ss.Input,{ref:v,value:S,onValueChange:w,onBlur:()=>b(!1),onFocus:()=>!l&&b(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:l,"aria-controls":`command-item-input-${g}`,"aria-labelledby":`command-item-input-${g}`,id:`command-item-input-${g}`})]})}),_&&!l&&E.length>0&&k.jsx("div",{className:"relative mt-2",children:k.jsx("div",{className:"absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",children:k.jsx(w7,{className:"h-full overflow-auto",children:k.jsx(S7,{children:E.map(M=>k.jsx(E7,{disabled:M.disabled,onMouseDown:D=>{D.preventDefault(),D.stopPropagation()},"aria-controls":`${M.value}-command-item`,"aria-labelledby":`${M.value}-command-item`,id:`${M.value}-command-item`,onSelect:()=>C(M),className:"cursor-pointer",children:M.label},`${M.value}-command-item`))})})})})]})}function hbe({items:e,selected:t,onValueChange:r,autoFocus:i=!1,disabled:s=!1,required:l=!1,placeholder:c="Select...",ariaDescribedby:f,ariaPlaceholder:d,onFocus:h,onBlur:m,className:g}){const[v,_]=j.useState(!1),b=e?.find(E=>E.value===t),S=j.useRef(null),w=j.useRef(null);j.useEffect(()=>{v&&S.current&&requestAnimationFrame(()=>{var E;(E=S.current)===null||E===void 0||E.scrollIntoView({block:"nearest"})})},[v]);const x=E=>{w.current&&!w.current.contains(E.relatedTarget)&&_(!1),m?.(E)};return k.jsxs(b7,{ref:w,className:ln("overflow-visible bg-transparent",g),autoFocus:i,"aria-disabled":s,onBlur:x,onFocus:h,"aria-describedby":f,"aria-placeholder":d,children:[k.jsxs("div",{onClick:()=>!s&&_(!v),className:ln("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",!b&&l&&"border-red-500",s&&"opacity-50 cursor-not-allowed",g),children:[k.jsx("span",{className:ln("flex-1 line-clamp-1",!b&&"text-muted-foreground"),children:b?.label||c}),k.jsx(II,{className:"h-4 w-4 opacity-50"})]}),k.jsx("div",{className:"relative",children:v&&e&&e.length>0?k.jsx("div",{style:{top:"0.5rem"},className:"absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none",children:k.jsx(w7,{className:"h-full overflow-auto",children:k.jsx(S7,{children:e.map(E=>k.jsxs(E7,{ref:E.value===t?S:void 0,onMouseDown:R=>{R.preventDefault(),R.stopPropagation()},onSelect:()=>{E.disabled||(r?.(E.value),_(!1))},className:ln("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",E.value===t&&"font-semibold",E.disabled&&"opacity-50 cursor-not-allowed"),children:[k.jsx("span",{children:E.label}),k.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:E.value===t&&k.jsx(Yme,{className:"h-4 w-4"})})]},E.value))})})}):null})]})}function pbe({id:e,options:t,required:r,disabled:i,readonly:s,value:l,multiple:c,autofocus:f,onChange:d,onBlur:h,onFocus:m,defaultValue:g,placeholder:v,rawErrors:_=[],className:b}){const{enumOptions:S,enumDisabled:w,emptyValue:x}=t,E=()=>{m(e,Da(l,S,x))},R=()=>{h(e,Da(l,S,x))},T=S?.map(({value:O,label:M},D)=>({value:c?O:D.toString(),label:M,index:D,disabled:Array.isArray(w)&&w.includes(O)})),C=ln({"border-destructive":_.length>0},b);return k.jsx("div",{className:"p-0.5",children:c?k.jsx(dbe,{id:e,autoFocus:f,disabled:i||s,multiple:!0,className:C,items:T,selected:l,onValueChange:O=>{d(Da(O,S,x))},onFocus:E,onBlur:R}):k.jsx(hbe,{items:T,selected:fI(l??g,S,!1),onValueChange:O=>{d(Da(O,S,x))},autoFocus:f,disabled:i||s,required:r,placeholder:v,className:C,onFocus:E,onBlur:R,ariaDescribedby:go(e)})})}function mbe({className:e,...t}){return k.jsx("textarea",{"data-slot":"textarea",className:ln("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}function gbe({id:e,htmlName:t,placeholder:r,value:i,required:s,disabled:l,autofocus:c,readonly:f,onBlur:d,onFocus:h,onChange:m,options:g,className:v}){const _=({target:{value:w}})=>m(w===""?g.emptyValue:w),b=({target:w})=>d(e,w&&w.value),S=({target:w})=>h(e,w&&w.value);return k.jsx("div",{className:"flex p-0.5",children:k.jsx(mbe,{id:e,name:t||e,placeholder:r,disabled:l,readOnly:f,value:i??"",required:s,autoFocus:c,rows:g.rows||5,onChange:_,onBlur:b,onFocus:S,"aria-describedby":go(e),className:v})})}function ybe(){return{CheckboxWidget:bye,CheckboxesWidget:Sye,RadioWidget:Xye,RangeWidget:v0e,SelectWidget:pbe,TextareaWidget:gbe}}function vbe(){return{templates:Yge(),widgets:ybe()}}function bbe(){return Rme(vbe())}const Sbe=bbe();function S1({controlled:e,default:t,name:r,state:i="value"}){const{current:s}=j.useRef(e!==void 0),[l,c]=j.useState(t),f=s?e:l,d=j.useCallback(h=>{s||c(h)},[]);return[f,d]}const x7=j.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function wbe(){return j.useContext(x7)}function jM(e){const{children:t,elementsRef:r,labelsRef:i,onMapChange:s}=e,l=Je(s),c=j.useRef(0),f=ki(xbe).current,d=ki(Ebe).current,[h,m]=j.useState(0),g=j.useRef(h),v=Je((x,E)=>{d.set(x,E??null),g.current+=1,m(g.current)}),_=Je(x=>{d.delete(x),g.current+=1,m(g.current)}),b=j.useMemo(()=>{const x=new Map;return Array.from(d.keys()).filter(R=>R.isConnected).sort(_be).forEach((R,T)=>{const C=d.get(R)??{};x.set(R,{...C,index:T})}),x},[d,h]);at(()=>{if(typeof MutationObserver!="function"||b.size===0)return;const x=new MutationObserver(E=>{const R=new Set,T=C=>R.has(C)?R.delete(C):R.add(C);E.forEach(C=>{C.removedNodes.forEach(T),C.addedNodes.forEach(T)}),R.size===0&&(g.current+=1,m(g.current))});return b.forEach((E,R)=>{R.parentElement&&x.observe(R.parentElement,{childList:!0})}),()=>{x.disconnect()}},[b]),at(()=>{g.current===h&&(r.current.length!==b.size&&(r.current.length=b.size),i&&i.current.length!==b.size&&(i.current.length=b.size),c.current=b.size),l(b)},[l,b,r,i,h]),at(()=>()=>{r.current=[]},[r]),at(()=>()=>{i&&(i.current=[])},[i]);const S=Je(x=>(f.add(x),()=>{f.delete(x)}));at(()=>{f.forEach(x=>x(b))},[f,b]);const w=j.useMemo(()=>({register:v,unregister:_,subscribeMapChange:S,elementsRef:r,labelsRef:i,nextIndexRef:c}),[v,_,S,r,i,c]);return k.jsx(x7.Provider,{value:w,children:t})}function Ebe(){return new Map}function xbe(){return new Set}function _be(e,t){const r=e.compareDocumentPosition(t);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Tbe=j.createContext(void 0);function kM(){return j.useContext(Tbe)?.direction??"ltr"}const _7=j.createContext(void 0);function DM(){const e=j.useContext(_7);if(e===void 0)throw new Error(xi(64));return e}let Cbe=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const NM={tabActivationDirection:e=>({[Cbe.activationDirection]:e})},Obe=j.forwardRef(function(t,r){const{className:i,defaultValue:s=0,onValueChange:l,orientation:c="horizontal",render:f,value:d,...h}=t,m=kM(),g=Object.hasOwn(t,"defaultValue"),v=j.useRef([]),[_,b]=j.useState(()=>new Map),[S,w]=S1({controlled:d,default:s,name:"Tabs",state:"value"}),x=d!==void 0,[E,R]=j.useState(()=>new Map),[T,C]=j.useState("none"),O=Je((ee,re)=>{l?.(ee,re),!re.isCanceled&&(w(ee),C(re.activationDirection))}),M=Je((ee,re)=>{b(ue=>{if(ue.get(ee)===re)return ue;const Q=new Map(ue);return Q.set(ee,re),Q})}),D=Je((ee,re)=>{b(ue=>{if(!ue.has(ee)||ue.get(ee)!==re)return ue;const Q=new Map(ue);return Q.delete(ee),Q})}),U=j.useCallback(ee=>_.get(ee),[_]),B=j.useCallback(ee=>{for(const re of E.values())if(ee===re?.value)return re?.id},[E]),q=j.useCallback(ee=>{if(ee===void 0)return null;for(const[re,ue]of E.entries())if(ue!=null&&ee===(ue.value??ue.index))return re;return null},[E]),V=j.useMemo(()=>({direction:m,getTabElementBySelectedValue:q,getTabIdByPanelValue:B,getTabPanelIdByValue:U,onValueChange:O,orientation:c,registerMountedTabPanel:M,setTabMap:R,unregisterMountedTabPanel:D,tabActivationDirection:T,value:S}),[m,q,B,U,O,c,M,R,D,T,S]),G=j.useMemo(()=>{for(const ee of E.values())if(ee!=null&&ee.value===S)return ee},[E,S]),ne=j.useMemo(()=>{for(const ee of E.values())if(ee!=null&&!ee.disabled)return ee.value},[E]);at(()=>{if(x||E.size===0)return;const ee=G?.disabled,re=G==null&&S!==null;if(g&&ee&&S===s||!ee&&!re)return;const Q=ne??null;S!==Q&&(w(Q),C("none"))},[s,ne,g,x,G,C,w,E,S]);const K=sr("div",t,{state:{orientation:c,tabActivationDirection:T},ref:r,props:h,stateAttributesMapping:NM});return k.jsx(_7.Provider,{value:V,children:k.jsx(jM,{elementsRef:v,children:K})})});function Rn(e){return e?.ownerDocument||document}let rN=0;function Rbe(e,t="mui"){const[r,i]=j.useState(e),s=e||r;return j.useEffect(()=>{r==null&&(rN+=1,i(`${t}-${rN}`))},[r,t]),s}const aN=Vae.useId;function Lg(e,t){if(aN!==void 0){const r=aN();return e??(t?`${t}-${r}`:r)}return Rbe(e,t)}function Ug(e){return Lg(e,"base-ui")}const T7="data-composite-item-active";let C7=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function zM(e={}){const{label:t,metadata:r,textRef:i,indexGuessBehavior:s,index:l}=e,{register:c,unregister:f,subscribeMapChange:d,elementsRef:h,labelsRef:m,nextIndexRef:g}=wbe(),v=j.useRef(-1),[_,b]=j.useState(l??(s===C7.GuessFromOrder?()=>{if(v.current===-1){const x=g.current;g.current+=1,v.current=x}return v.current}:-1)),S=j.useRef(null),w=j.useCallback(x=>{if(S.current=x,_!==-1&&x!==null&&(h.current[_]=x,m)){const E=t!==void 0;m.current[_]=E?t:i?.current?.textContent??x.textContent}},[_,h,m,t,i]);return at(()=>{if(l!=null)return;const x=S.current;if(x)return c(x,r),()=>{f(x)}},[l,c,f,r]),at(()=>{if(l==null)return d(x=>{const E=S.current?x.get(S.current)?.index:null;E!=null&&b(E)})},[l,d,b]),j.useMemo(()=>({ref:w,index:_}),[_,w])}function Abe(e={}){const{highlightItemOnHover:t,highlightedIndex:r,onHighlightedIndexChange:i}=k$(),{ref:s,index:l}=zM(e),c=r===l,f=j.useRef(null),d=Nc(s,f);return{compositeProps:j.useMemo(()=>({tabIndex:c?0:-1,onFocus(){i(l)},onMouseMove(){const m=f.current;if(!t||!m)return;const g=m.hasAttribute("disabled")||m.ariaDisabled==="true";!c&&!g&&m.focus()}}),[c,i,l,t]),compositeRef:d,index:l}}const O7=j.createContext(void 0);function Mbe(){const e=j.useContext(O7);if(e===void 0)throw new Error(xi(65));return e}const Df="none",yg="trigger-press",Wo="trigger-hover",$M="outside-press",zT="item-press",jbe="close-press",Ip="focus-out",R7="escape-key",$T="list-navigation",kbe="cancel-open",A7="imperative-action",Dbe="window-resize";function en(e,t,r,i){let s=!1,l=!1;const c=i??ka;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){l=!0},get isCanceled(){return s},get isPropagationAllowed(){return l},trigger:r,...c}}const qg=typeof navigator<"u",PT=$be(),M7=Ibe(),j7=Pbe(),PM=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),k7=PT.platform==="MacIntel"&&PT.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(PT.platform),Nbe=qg&&/apple/i.test(navigator.vendor),DO=qg&&/android/i.test(M7)||/android/i.test(j7);qg&&M7.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const zbe=j7.includes("jsdom/");function $be(){if(!qg)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function Pbe(){if(!qg)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:r})=>`${t}/${r}`).join(" "):navigator.userAgent}function Ibe(){if(!qg)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}const NO="data-base-ui-focusable",D7="active",N7="selected",z7="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Ef="ArrowLeft",xf="ArrowRight",IM="ArrowUp",rS="ArrowDown";function yl(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function on(e,t){if(!e||!t)return!1;const r=t.getRootNode?.();if(e.contains(t))return!0;if(r&&UC(r)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function $7(e,t){if(!Zn(e))return!1;const r=e;if(t.hasElement(r))return!r.hasAttribute("data-trigger-disabled");for(const[,i]of t.entries())if(on(i,r))return!i.hasAttribute("data-trigger-disabled");return!1}function Jo(e){return"composedPath"in e?e.composedPath()[0]:e.target}function pl(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}function Lbe(e){return e.matches("html,body")}function LM(e){return Mr(e)&&e.matches(z7)}function zO(e){return e?e.getAttribute("role")==="combobox"&&LM(e):!1}function w1(e){return e?e.hasAttribute(NO)?e:e.querySelector(`[${NO}]`)||e:null}function _p(e,t,r=!0){return e.filter(s=>s.parentId===t&&(!r||s.context?.open)).flatMap(s=>[s,..._p(e,s.id,r)])}function iN(e,t){let r=[],i=e.find(s=>s.id===t)?.parentId;for(;i;){const s=e.find(l=>l.id===i);i=s?.parentId,s&&(r=r.concat(s))}return r}function Mi(e){e.preventDefault(),e.stopPropagation()}function Ube(e){return"nativeEvent"in e}function P7(e){return e.pointerType===""&&e.isTrusted?!0:DO&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function I7(e){return zbe?!1:!DO&&e.width===0&&e.height===0||DO&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function vg(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function L7(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const qbe=["top","right","bottom","left"],bg=Math.min,es=Math.max,AE=Math.round,Fm=Math.floor,Xl=e=>({x:e,y:e}),Vbe={left:"right",right:"left",bottom:"top",top:"bottom"},Fbe={start:"end",end:"start"};function $O(e,t,r){return es(e,bg(t,r))}function Ic(e,t){return typeof e=="function"?e(t):e}function po(e){return e.split("-")[0]}function Bf(e){return e.split("-")[1]}function UM(e){return e==="x"?"y":"x"}function qM(e){return e==="y"?"height":"width"}const Bbe=new Set(["top","bottom"]);function gs(e){return Bbe.has(po(e))?"y":"x"}function VM(e){return UM(gs(e))}function Hbe(e,t,r){r===void 0&&(r=!1);const i=Bf(e),s=VM(e),l=qM(s);let c=s==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=ME(c)),[c,ME(c)]}function Gbe(e){const t=ME(e);return[PO(e),t,PO(t)]}function PO(e){return e.replace(/start|end/g,t=>Fbe[t])}const oN=["left","right"],sN=["right","left"],Kbe=["top","bottom"],Ybe=["bottom","top"];function Zbe(e,t,r){switch(e){case"top":case"bottom":return r?t?sN:oN:t?oN:sN;case"left":case"right":return t?Kbe:Ybe;default:return[]}}function Xbe(e,t,r,i){const s=Bf(e);let l=Zbe(po(e),r==="start",i);return s&&(l=l.map(c=>c+"-"+s),t&&(l=l.concat(l.map(PO)))),l}function ME(e){return e.replace(/left|right|bottom|top/g,t=>Vbe[t])}function Qbe(e){return{top:0,right:0,bottom:0,left:0,...e}}function U7(e){return typeof e!="number"?Qbe(e):{top:e,right:e,bottom:e,left:e}}function jE(e){const{x:t,y:r,width:i,height:s}=e;return{width:i,height:s,top:r,left:t,right:t+i,bottom:r+s,x:t,y:r}}function yw(e,t,r){return Math.floor(e/t)!==r}function Wm(e,t){return t<0||t>=e.current.length}function Yw(e,t){return mi(e,{disabledIndices:t})}function IO(e,t){return mi(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function mi(e,{startingIndex:t=-1,decrement:r=!1,disabledIndices:i,amount:s=1}={}){let l=t;do l+=r?-s:s;while(l>=0&&l<=e.current.length-1&&_f(e,l,i));return l}function q7(e,{event:t,orientation:r,loopFocus:i,rtl:s,cols:l,disabledIndices:c,minIndex:f,maxIndex:d,prevIndex:h,stopEvent:m=!1}){let g=h;const v=[],_={};let b=!1;{let x=null,E=-1;e.current.forEach((R,T)=>{if(R==null)return;const C=R.closest('[role="row"]');C&&(b=!0),(C!==x||E===-1)&&(x=C,E+=1,v[E]=[]),v[E].push(T),_[T]=E})}const S=b&&v.length>0&&v.some(x=>x.length!==l);function w(x){if(!S||h===-1)return;const E=_[h];if(E==null)return;const R=v[E].indexOf(h);let T=x==="up"?E-1:E+1;i&&(T<0?T=v.length-1:T>=v.length&&(T=0));const C=new Set;for(;T>=0&&T<v.length&&!C.has(T);){C.add(T);const O=v[T];if(O.length===0){T=x==="up"?T-1:T+1;continue}const M=Math.min(R,O.length-1);for(let D=M;D>=0;D-=1){const U=O[D];if(!_f(e,U,c))return U}T=x==="up"?T-1:T+1,i&&(T<0?T=v.length-1:T>=v.length&&(T=0))}}if(t.key===IM){const x=w("up");if(x!==void 0)m&&Mi(t),g=x;else{if(m&&Mi(t),h===-1)g=d;else if(g=mi(e,{startingIndex:g,amount:l,decrement:!0,disabledIndices:c}),i&&(h-l<f||g<0)){const E=h%l,R=d%l,T=d-(R-E);R===E?g=d:g=R>E?T:T-l}Wm(e,g)&&(g=h)}}if(t.key===rS){const x=w("down");x!==void 0?(m&&Mi(t),g=x):(m&&Mi(t),h===-1?g=f:(g=mi(e,{startingIndex:h,amount:l,disabledIndices:c}),i&&h+l>d&&(g=mi(e,{startingIndex:h%l-l,amount:l,disabledIndices:c}))),Wm(e,g)&&(g=h))}if(r==="both"){const x=Fm(h/l);t.key===(s?Ef:xf)&&(m&&Mi(t),h%l!==l-1?(g=mi(e,{startingIndex:h,disabledIndices:c}),i&&yw(g,l,x)&&(g=mi(e,{startingIndex:h-h%l-1,disabledIndices:c}))):i&&(g=mi(e,{startingIndex:h-h%l-1,disabledIndices:c})),yw(g,l,x)&&(g=h)),t.key===(s?xf:Ef)&&(m&&Mi(t),h%l!==0?(g=mi(e,{startingIndex:h,decrement:!0,disabledIndices:c}),i&&yw(g,l,x)&&(g=mi(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}))):i&&(g=mi(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c})),yw(g,l,x)&&(g=h));const E=Fm(d/l)===x;Wm(e,g)&&(i&&E?g=t.key===(s?xf:Ef)?d:mi(e,{startingIndex:h-h%l-1,disabledIndices:c}):g=h)}return g}function V7(e,t,r){const i=[];let s=0;return e.forEach(({width:l,height:c},f)=>{let d=!1;for(r&&(s=0);!d;){const h=[];for(let m=0;m<l;m+=1)for(let g=0;g<c;g+=1)h.push(s+m+g*t);s%t+l<=t&&h.every(m=>i[m]==null)?(h.forEach(m=>{i[m]=f}),d=!0):s+=1}}),[...i]}function F7(e,t,r,i,s){if(e===-1)return-1;const l=r.indexOf(e),c=t[e];switch(s){case"tl":return l;case"tr":return c?l+c.width-1:l;case"bl":return c?l+(c.height-1)*i:l;case"br":return r.lastIndexOf(e);default:return-1}}function B7(e,t){return t.flatMap((r,i)=>e.includes(r)?[i]:[])}function _f(e,t,r){if(typeof r=="function")return r(t);if(r)return r.includes(t);const i=e.current[t];return i?i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true":!1}var Wbe=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],kE=Wbe.join(","),H7=typeof Element>"u",Sg=H7?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,DE=!H7&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},NE=function(t,r){var i;r===void 0&&(r=!0);var s=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),l=s===""||s==="true",c=l||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):NE(t.parentNode));return c},Jbe=function(t){var r,i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return i===""||i==="true"},G7=function(t,r,i){if(NE(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(kE));return r&&Sg.call(t,kE)&&s.unshift(t),s=s.filter(i),s},zE=function(t,r,i){for(var s=[],l=Array.from(t);l.length;){var c=l.shift();if(!NE(c,!1))if(c.tagName==="SLOT"){var f=c.assignedElements(),d=f.length?f:c.children,h=zE(d,!0,i);i.flatten?s.push.apply(s,h):s.push({scopeParent:c,candidates:h})}else{var m=Sg.call(c,kE);m&&i.filter(c)&&(r||!t.includes(c))&&s.push(c);var g=c.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(c),v=!NE(g,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(c));if(g&&v){var _=zE(g===!0?c.children:g.children,!0,i);i.flatten?s.push.apply(s,_):s.push({scopeParent:c,candidates:_})}else l.unshift.apply(l,c.children)}}return s},K7=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Y7=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Jbe(t))&&!K7(t)?0:t.tabIndex},e1e=function(t,r){var i=Y7(t);return i<0&&r&&!K7(t)?0:i},t1e=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Z7=function(t){return t.tagName==="INPUT"},n1e=function(t){return Z7(t)&&t.type==="hidden"},r1e=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return r},a1e=function(t,r){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===r)return t[i]},i1e=function(t){if(!t.name)return!0;var r=t.form||DE(t),i=function(f){return r.querySelectorAll('input[type="radio"][name="'+f+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=i(window.CSS.escape(t.name));else try{s=i(t.name)}catch(c){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",c.message),!1}var l=a1e(s,t.form);return!l||l===t},o1e=function(t){return Z7(t)&&t.type==="radio"},s1e=function(t){return o1e(t)&&!i1e(t)},l1e=function(t){var r,i=t&&DE(t),s=(r=i)===null||r===void 0?void 0:r.host,l=!1;if(i&&i!==t){var c,f,d;for(l=!!((c=s)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(s)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!l&&s;){var h,m,g;i=DE(s),s=(h=i)===null||h===void 0?void 0:h.host,l=!!((m=s)!==null&&m!==void 0&&(g=m.ownerDocument)!==null&&g!==void 0&&g.contains(s))}}return l},lN=function(t){var r=t.getBoundingClientRect(),i=r.width,s=r.height;return i===0&&s===0},u1e=function(t,r){var i=r.displayCheck,s=r.getShadowRoot;if(i==="full-native"&&"checkVisibility"in t){var l=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!l}if(getComputedStyle(t).visibility==="hidden")return!0;var c=Sg.call(t,"details>summary:first-of-type"),f=c?t.parentElement:t;if(Sg.call(f,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="full-native"||i==="legacy-full"){if(typeof s=="function"){for(var d=t;t;){var h=t.parentElement,m=DE(t);if(h&&!h.shadowRoot&&s(h)===!0)return lN(t);t.assignedSlot?t=t.assignedSlot:!h&&m!==t.ownerDocument?t=m.host:t=h}t=d}if(l1e(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return lN(t);return!1},c1e=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var i=0;i<r.children.length;i++){var s=r.children.item(i);if(s.tagName==="LEGEND")return Sg.call(r,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}r=r.parentElement}return!1},LO=function(t,r){return!(r.disabled||n1e(r)||u1e(r,t)||r1e(r)||c1e(r))},UO=function(t,r){return!(s1e(r)||Y7(r)<0||!LO(t,r))},f1e=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},X7=function(t){var r=[],i=[];return t.forEach(function(s,l){var c=!!s.scopeParent,f=c?s.scopeParent:s,d=e1e(f,c),h=c?X7(s.candidates):f;d===0?c?r.push.apply(r,h):r.push(f):i.push({documentOrder:l,tabIndex:d,item:s,isScope:c,content:h})}),i.sort(t1e).reduce(function(s,l){return l.isScope?s.push.apply(s,l.content):s.push(l.content),s},[]).concat(r)},aS=function(t,r){r=r||{};var i;return r.getShadowRoot?i=zE([t],r.includeContainer,{filter:UO.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:f1e}):i=G7(t,r.includeContainer,UO.bind(null,r)),X7(i)},d1e=function(t,r){r=r||{};var i;return r.getShadowRoot?i=zE([t],r.includeContainer,{filter:LO.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):i=G7(t,r.includeContainer,LO.bind(null,r)),i},Q7=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return Sg.call(t,kE)===!1?!1:UO(r,t)};const Vg=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function W7(e,t){const r=aS(e,Vg()),i=r.length;if(i===0)return;const s=yl(Rn(e)),l=r.indexOf(s),c=l===-1?t===1?0:i-1:l+t;return r[c]}function FM(e){return W7(Rn(e).body,1)||e}function J7(e){return W7(Rn(e).body,-1)||e}function eU(e,t){if(!e)return null;const r=aS(Rn(e).body,Vg()),i=r.length;if(i===0)return null;const s=r.indexOf(e);if(s===-1)return null;const l=(s+t+i)%i;return r[l]}function h1e(e){return eU(e,1)}function p1e(e){return eU(e,-1)}function Jm(e,t){const r=t||e.currentTarget,i=e.relatedTarget;return!i||!on(r,i)}function m1e(e){aS(e,Vg()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function uN(e){e.querySelectorAll("[data-tabindex]").forEach(r=>{const i=r.dataset.tabindex;delete r.dataset.tabindex,i?r.setAttribute("tabindex",i):r.removeAttribute("tabindex")})}const g1e=j.forwardRef(function(t,r){const{className:i,disabled:s=!1,render:l,value:c,id:f,nativeButton:d=!0,...h}=t,{value:m,getTabPanelIdByValue:g,orientation:v}=DM(),{activateOnFocus:_,highlightedTabIndex:b,onTabActivation:S,setHighlightedTabIndex:w,tabsListElement:x}=Mbe(),E=Ug(f),R=j.useMemo(()=>({disabled:s,id:E,value:c}),[s,E,c]),{compositeProps:T,compositeRef:C,index:O}=Abe({metadata:R}),M=c===m,D=j.useRef(!1);at(()=>{if(D.current){D.current=!1;return}if(!(M&&O>-1&&b!==O))return;const ue=x;if(ue!=null){const Q=yl(Rn(ue));if(Q&&on(ue,Q))return}s||w(O)},[M,O,b,w,s,x]);const{getButtonProps:U,buttonRef:B}=Kp({disabled:s,native:d,focusableWhenDisabled:!0}),q=g(c),V=j.useRef(!1),G=j.useRef(!1);function ne(ue){M||s||S(c,en(Df,ue.nativeEvent,void 0,{activationDirection:"none"}))}function oe(ue){M||(O>-1&&!s&&w(O),!s&&_&&(!V.current||V.current&&G.current)&&S(c,en(Df,ue.nativeEvent,void 0,{activationDirection:"none"})))}function K(ue){if(M||s)return;V.current=!0;function Q(){V.current=!1,G.current=!1}(!ue.button||ue.button===0)&&(G.current=!0,Rn(ue.currentTarget).addEventListener("pointerup",Q,{once:!0}))}return sr("button",t,{state:{disabled:s,active:M,orientation:v},ref:[r,B,C],props:[T,{role:"tab","aria-controls":q,"aria-selected":M,id:E,onClick:ne,onFocus:oe,onPointerDown:K,[T7]:M?"":void 0,onKeyDownCapture(){D.current=!0}},h,U]})}),y1e=[];function Cx(e){j.useEffect(e,y1e)}const v1e=j.createContext(void 0),b1e={disableStyleElements:!1};function S1e(){return j.useContext(v1e)??b1e}function Ox(e){return gA(19)?e:e?"true":void 0}let E1=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const w1e={[E1.startingStyle]:""},E1e={[E1.endingStyle]:""},Fg={transitionStatus(e){return e==="starting"?w1e:e==="ending"?E1e:null}},vw=null;class x1e{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const r=this.callbacks,i=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,i>0)for(let s=0;s<r.length;s+=1)r[s]?.(t)};request(t){const r=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),r}cancel(t){const r=t-this.startId;r<0||r>=this.callbacks.length||(this.callbacks[r]=null,this.callbacksCount-=1)}}const bw=new x1e;class ql{static create(){return new ql}static request(t){return bw.request(t)}static cancel(t){return bw.cancel(t)}currentId=vw;request(t){this.cancel(),this.currentId=bw.request(()=>{this.currentId=vw,t()})}cancel=()=>{this.currentId!==vw&&(bw.cancel(this.currentId),this.currentId=vw)};disposeEffect=()=>this.cancel}function Rx(){const e=ki(ql.create).current;return Cx(e.disposeEffect),e}function Oc(e){return e==null?e:"current"in e?e.current:e}function tU(e,t=!1,r=!0){const i=Rx();return Je((s,l=null)=>{i.cancel();function c(){Es.flushSync(s)}const f=Oc(e);if(f==null)return;const d=f;if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)s();else{let g=function(){const _=E1.startingStyle;if(!d.hasAttribute(_)){i.request(v);return}const b=new MutationObserver(()=>{d.hasAttribute(_)||(b.disconnect(),v())});b.observe(d,{attributes:!0,attributeFilter:[_]}),l?.addEventListener("abort",()=>b.disconnect(),{once:!0})},v=function(){Promise.all(d.getAnimations().map(_=>_.finished)).then(()=>{l?.aborted||c()}).catch(()=>{const _=d.getAnimations();if(r){if(l?.aborted)return;c()}else _.length>0&&_.some(b=>b.pending||b.playState!=="finished")&&v()})};var h=g,m=v;if(t){g();return}i.request(v)}})}function Hf(e){const{enabled:t=!0,open:r,ref:i,onComplete:s}=e,l=Je(s),c=tU(i,r,!1);j.useEffect(()=>{if(!t)return;const f=new AbortController;return c(l,f.signal),()=>{f.abort()}},[t,r,l,c])}function iS(e,t=!1,r=!1){const[i,s]=j.useState(e&&t?"idle":void 0),[l,c]=j.useState(e);return e&&!l&&(c(!0),s("starting")),!e&&l&&i!=="ending"&&!r&&s("ending"),!e&&!l&&i==="ending"&&s(void 0),at(()=>{if(!e&&l&&i!=="ending"&&r){const f=ql.request(()=>{s("ending")});return()=>{ql.cancel(f)}}},[e,l,i,r]),at(()=>{if(!e||t)return;const f=ql.request(()=>{s(void 0)});return()=>{ql.cancel(f)}},[t,e]),at(()=>{if(!e||!t)return;e&&l&&i!=="idle"&&s("starting");const f=ql.request(()=>{s("idle")});return()=>{ql.cancel(f)}},[t,e,l,s,i]),j.useMemo(()=>({mounted:l,setMounted:c,transitionStatus:i}),[l,i])}let _1e=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const T1e={...NM,...Fg},C1e=j.forwardRef(function(t,r){const{className:i,value:s,render:l,keepMounted:c=!1,...f}=t,{value:d,getTabIdByPanelValue:h,orientation:m,tabActivationDirection:g,registerMountedTabPanel:v,unregisterMountedTabPanel:_}=DM(),b=Ug(),S=j.useMemo(()=>({id:b,value:s}),[b,s]),{ref:w,index:x}=zM({metadata:S}),E=s===d,{mounted:R,transitionStatus:T,setMounted:C}=iS(E),O=!R,M=h(s),D={hidden:O,orientation:m,tabActivationDirection:g,transitionStatus:T},U=j.useRef(null),B=sr("div",t,{state:D,ref:[r,w,U],props:[{"aria-labelledby":M,hidden:O,id:b,role:"tabpanel",tabIndex:E?0:-1,inert:Ox(!E),[_1e.index]:x},f],stateAttributesMapping:T1e});return Hf({open:E,ref:U,onComplete(){E||C(!1)}}),at(()=>{if(!(O&&!c)&&b!=null)return v(s,b),()=>{_(s,b)}},[O,c,s,b,v,_]),c||R?B:null});function O1e(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const eg="ArrowUp",Sp="ArrowDown",x1="ArrowLeft",tg="ArrowRight",oS="Home",sS="End",nU=new Set([x1,tg]),R1e=new Set([x1,tg,oS,sS]),rU=new Set([eg,Sp]),A1e=new Set([eg,Sp,oS,sS]),aU=new Set([...nU,...rU]),M1e=new Set([...aU,oS,sS]),BM=new Set([eg,Sp,x1,tg,oS,sS]),j1e="Shift",k1e="Control",D1e="Alt",N1e="Meta",z1e=new Set([j1e,k1e,D1e,N1e]);function $1e(e){return Mr(e)&&e.tagName==="INPUT"}function cN(e){return!!($1e(e)&&e.selectionStart!=null||Mr(e)&&e.tagName==="TEXTAREA")}function fN(e,t,r,i){if(!e||!t||!t.scrollTo)return;let s=e.scrollLeft,l=e.scrollTop;const c=e.clientWidth<e.scrollWidth,f=e.clientHeight<e.scrollHeight;if(c&&i!=="vertical"){const d=dN(e,t,"left"),h=Sw(e),m=Sw(t);r==="ltr"&&(d+t.offsetWidth+m.scrollMarginRight>e.scrollLeft+e.clientWidth-h.scrollPaddingRight?s=d+t.offsetWidth+m.scrollMarginRight-e.clientWidth+h.scrollPaddingRight:d-m.scrollMarginLeft<e.scrollLeft+h.scrollPaddingLeft&&(s=d-m.scrollMarginLeft-h.scrollPaddingLeft)),r==="rtl"&&(d-m.scrollMarginRight<e.scrollLeft+h.scrollPaddingLeft?s=d-m.scrollMarginLeft-h.scrollPaddingLeft:d+t.offsetWidth+m.scrollMarginRight>e.scrollLeft+e.clientWidth-h.scrollPaddingRight&&(s=d+t.offsetWidth+m.scrollMarginRight-e.clientWidth+h.scrollPaddingRight))}if(f&&i!=="horizontal"){const d=dN(e,t,"top"),h=Sw(e),m=Sw(t);d-m.scrollMarginTop<e.scrollTop+h.scrollPaddingTop?l=d-m.scrollMarginTop-h.scrollPaddingTop:d+t.offsetHeight+m.scrollMarginBottom>e.scrollTop+e.clientHeight-h.scrollPaddingBottom&&(l=d+t.offsetHeight+m.scrollMarginBottom-e.clientHeight+h.scrollPaddingBottom)}e.scrollTo({left:s,top:l,behavior:"auto"})}function dN(e,t,r){const i=r==="left"?"offsetLeft":"offsetTop";let s=0;for(;t.offsetParent&&(s+=t[i],t.offsetParent!==e);)t=t.offsetParent;return s}function Sw(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}const P1e=[];function I1e(e){const{itemSizes:t,cols:r=1,loopFocus:i=!0,dense:s=!1,orientation:l="both",direction:c,highlightedIndex:f,onHighlightedIndexChange:d,rootRef:h,enableHomeAndEndKeys:m=!1,stopEventPropagation:g=!1,disabledIndices:v,modifierKeys:_=P1e}=e,[b,S]=j.useState(0),w=r>1,x=j.useRef(null),E=Nc(x,h),R=j.useRef([]),T=j.useRef(!1),C=f??b,O=Je((U,B=!1)=>{if((d??S)(U),B){const q=R.current[U];fN(x.current,q,c,l)}}),M=Je(U=>{if(U.size===0||T.current)return;T.current=!0;const B=Array.from(U.keys()),q=B.find(G=>G?.hasAttribute(T7))??null,V=q?B.indexOf(q):-1;V!==-1&&O(V),fN(x.current,q,c,l)}),D=j.useMemo(()=>({"aria-orientation":l==="both"?void 0:l,ref:E,onFocus(U){!x.current||!cN(U.target)||U.target.setSelectionRange(0,U.target.value.length??0)},onKeyDown(U){const B=m?M1e:aU;if(!B.has(U.key)||L1e(U,_)||!x.current)return;const V=c==="rtl",G=V?x1:tg,ne={horizontal:G,vertical:Sp,both:G}[l],oe=V?tg:x1,K={horizontal:oe,vertical:eg,both:oe}[l];if(cN(U.target)&&!O1e(U.target)){const Y=U.target.selectionStart,I=U.target.selectionEnd,X=U.target.value??"";if(Y==null||U.shiftKey||Y!==I||U.key!==K&&Y<X.length||U.key!==ne&&Y>0)return}let ee=C;const re=Yw(R,v),ue=IO(R,v);if(w){const Y=t||Array.from({length:R.current.length},()=>({width:1,height:1})),I=V7(Y,r,s),X=I.findIndex(he=>he!=null&&!_f(R,he,v)),J=I.reduce((he,xe,we)=>xe!=null&&!_f(R,xe,v)?we:he,-1);ee=I[q7({current:I.map(he=>he?R.current[he]:null)},{event:U,orientation:l,loopFocus:i,cols:r,disabledIndices:B7([...v||R.current.map((he,xe)=>_f(R,xe)?xe:void 0),void 0],I),minIndex:X,maxIndex:J,prevIndex:F7(C>ue?re:C,Y,I,r,U.key===Sp?"bl":U.key===tg?"tr":"tl"),rtl:V})]}const Q={horizontal:[G],vertical:[Sp],both:[G,Sp]}[l],z={horizontal:[oe],vertical:[eg],both:[oe,eg]}[l],L=w?B:{horizontal:m?R1e:nU,vertical:m?A1e:rU,both:B}[l];m&&(U.key===oS?ee=re:U.key===sS&&(ee=ue)),ee===C&&(Q.includes(U.key)||z.includes(U.key))&&(i&&ee===ue&&Q.includes(U.key)?ee=re:i&&ee===re&&z.includes(U.key)?ee=ue:ee=mi(R,{startingIndex:ee,decrement:z.includes(U.key),disabledIndices:v})),ee!==C&&!Wm(R,ee)&&(g&&U.stopPropagation(),L.has(U.key)&&U.preventDefault(),O(ee,!0),queueMicrotask(()=>{R.current[ee]?.focus()}))}}),[r,s,c,v,R,m,C,w,t,i,E,_,O,l,g]);return j.useMemo(()=>({props:D,highlightedIndex:C,onHighlightedIndexChange:O,elementsRef:R,disabledIndices:v,onMapChange:M,relayKeyboardEvent:D.onKeyDown}),[D,C,O,R,v,M])}function L1e(e,t){for(const r of z1e.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}function U1e(e){const{render:t,className:r,refs:i=f1,props:s=f1,state:l=ka,stateAttributesMapping:c,highlightedIndex:f,onHighlightedIndexChange:d,orientation:h,dense:m,itemSizes:g,loopFocus:v,cols:_,enableHomeAndEndKeys:b,onMapChange:S,stopEventPropagation:w=!0,rootRef:x,disabledIndices:E,modifierKeys:R,highlightItemOnHover:T=!1,tag:C="div",...O}=e,M=kM(),{props:D,highlightedIndex:U,onHighlightedIndexChange:B,elementsRef:q,onMapChange:V,relayKeyboardEvent:G}=I1e({itemSizes:g,cols:_,loopFocus:v,dense:m,orientation:h,highlightedIndex:f,onHighlightedIndexChange:d,rootRef:x,stopEventPropagation:w,enableHomeAndEndKeys:b,direction:M,disabledIndices:E,modifierKeys:R}),ne=sr(C,e,{state:l,ref:i,props:[D,...s,O],stateAttributesMapping:c}),oe=j.useMemo(()=>({highlightedIndex:U,onHighlightedIndexChange:B,highlightItemOnHover:T,relayKeyboardEvent:G}),[U,B,T,G]);return k.jsx(j$.Provider,{value:oe,children:k.jsx(jM,{elementsRef:q,onMapChange:K=>{S?.(K),V(K)},children:ne})})}const q1e=j.forwardRef(function(t,r){const{activateOnFocus:i=!1,className:s,loopFocus:l=!0,render:c,...f}=t,{getTabElementBySelectedValue:d,onValueChange:h,orientation:m,value:g,setTabMap:v,tabActivationDirection:_}=DM(),[b,S]=j.useState(0),[w,x]=j.useState(null),E=V1e(g,m,w,d),R=Je((M,D)=>{if(M!==g){const U=E(M);D.activationDirection=U,h(M,D)}}),T={orientation:m,tabActivationDirection:_},C={"aria-orientation":m==="vertical"?"vertical":void 0,role:"tablist"},O=j.useMemo(()=>({activateOnFocus:i,highlightedTabIndex:b,onTabActivation:R,setHighlightedTabIndex:S,tabsListElement:w,value:g}),[i,b,R,S,w,g]);return k.jsx(O7.Provider,{value:O,children:k.jsx(U1e,{render:c,className:s,state:T,refs:[r,x],props:[C,f],stateAttributesMapping:NM,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:l,orientation:m,onHighlightedIndexChange:S,onMapChange:v,disabledIndices:f1})})});function hN(e,t){const{left:r,top:i}=e.getBoundingClientRect(),{left:s,top:l}=t.getBoundingClientRect(),c=r-s,f=i-l;return{left:c,top:f}}function V1e(e,t,r,i){const[s,l]=j.useState(null);return at(()=>{if(e==null||r==null){l(null);return}const c=i(e);if(c==null){l(null);return}const{left:f,top:d}=hN(c,r);l(t==="horizontal"?f:d)},[t,i,r,e]),j.useCallback(c=>{if(c===e)return"none";if(c==null)return l(null),"none";if(c!=null&&r!=null){const f=i(c);if(f!=null){const{left:d,top:h}=hN(f,r);if(s==null)return l(t==="horizontal"?d:h),"none";if(t==="horizontal"){if(d<s)return l(d),"left";if(d>s)return l(d),"right"}else{if(h<s)return l(h),"up";if(h>s)return l(h),"down"}}}return"none"},[i,t,s,r,e])}function iU({className:e,orientation:t="horizontal",...r}){return k.jsx(Obe,{"data-slot":"tabs","data-orientation":t,className:qt("gap-2 group/tabs flex data-[orientation=horizontal]:flex-col",e),...r})}const F1e=Fc("rounded-none p-[3px] group-data-horizontal/tabs:h-8 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function oU({className:e,variant:t="default",...r}){return k.jsx(q1e,{"data-slot":"tabs-list","data-variant":t,className:qt(F1e({variant:t}),e),...r})}function Qb({className:e,...t}){return k.jsx(g1e,{"data-slot":"tabs-trigger",className:qt("gap-1.5 rounded-none border border-transparent px-1.5 py-0.5 text-xs font-medium group-data-vertical/tabs:py-[calc(--spacing(1.25))] [&_svg:not([class*='size-'])]:size-4 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background dark:data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 data-active:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}function Wb({className:e,...t}){return k.jsx(C1e,{"data-slot":"tabs-content",className:qt("text-xs/relaxed flex-1 outline-none",e),...t})}function B1e({className:e,size:t="default",...r}){return k.jsx("div",{"data-slot":"card","data-size":t,className:qt("ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-none py-4 text-xs/relaxed ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-2 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-none *:[img:last-child]:rounded-none group/card flex flex-col",e),...r})}function H1e({className:e,...t}){return k.jsx("div",{"data-slot":"card-content",className:qt("px-4 group-data-[size=sm]/card:px-3",e),...t})}var sU=function(e){return typeof e=="function"},G1e=function(e){return typeof e=="string"},lU=function(e){return typeof e=="number"};function pN(e,t){if(e===t)return!0;for(var r=0;r<e.length;r++)if(!Object.is(e[r],t[r]))return!1;return!0}function qO(e){var t=j.useRef(e);return t.current=e,t}var K1e=function(e){var t=qO(e);j.useEffect(function(){return function(){t.current()}},[])},Y1e=!!(typeof window<"u"&&window.document&&window.document.createElement);function uU(e,t){if(Y1e){if(!e)return t;var r;return sU(e)?r=e():"current"in e?r=e.current:r=e,r}}var Z1e=function(e){var t=function(r,i,s){var l=j.useRef(!1),c=j.useRef([]),f=j.useRef([]),d=j.useRef(void 0);e(function(){var h,m=Array.isArray(s)?s:[s],g=m.map(function(v){return uU(v)});if(!l.current){l.current=!0,c.current=g,f.current=i,d.current=r();return}(g.length!==c.current.length||!pN(c.current,g)||!pN(f.current,i))&&((h=d.current)===null||h===void 0||h.call(d),c.current=g,f.current=i,d.current=r())}),K1e(function(){var h;(h=d.current)===null||h===void 0||h.call(d),l.current=!1})};return t},X1e=Z1e(j.useEffect),IT,mN;function Q1e(){if(mN)return IT;mN=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",i=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function s(l,c){if(l===c)return!0;if(l&&c&&typeof l=="object"&&typeof c=="object"){if(l.constructor!==c.constructor)return!1;var f,d,h;if(Array.isArray(l)){if(f=l.length,f!=c.length)return!1;for(d=f;d--!==0;)if(!s(l[d],c[d]))return!1;return!0}var m;if(t&&l instanceof Map&&c instanceof Map){if(l.size!==c.size)return!1;for(m=l.entries();!(d=m.next()).done;)if(!c.has(d.value[0]))return!1;for(m=l.entries();!(d=m.next()).done;)if(!s(d.value[1],c.get(d.value[0])))return!1;return!0}if(r&&l instanceof Set&&c instanceof Set){if(l.size!==c.size)return!1;for(m=l.entries();!(d=m.next()).done;)if(!c.has(d.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(l)&&ArrayBuffer.isView(c)){if(f=l.length,f!=c.length)return!1;for(d=f;d--!==0;)if(l[d]!==c[d])return!1;return!0}if(l.constructor===RegExp)return l.source===c.source&&l.flags===c.flags;if(l.valueOf!==Object.prototype.valueOf&&typeof l.valueOf=="function"&&typeof c.valueOf=="function")return l.valueOf()===c.valueOf();if(l.toString!==Object.prototype.toString&&typeof l.toString=="function"&&typeof c.toString=="function")return l.toString()===c.toString();if(h=Object.keys(l),f=h.length,f!==Object.keys(c).length)return!1;for(d=f;d--!==0;)if(!Object.prototype.hasOwnProperty.call(c,h[d]))return!1;if(e&&l instanceof Element)return!1;for(d=f;d--!==0;)if(!((h[d]==="_owner"||h[d]==="__v"||h[d]==="__o")&&l.$$typeof)&&!s(l[h[d]],c[h[d]]))return!1;return!0}return l!==l&&c!==c}return IT=function(c,f){try{return s(c,f)}catch(d){if((d.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw d}},IT}var W1e=Q1e();const J1e=tu(W1e);var eSe=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),J1e(e,t)},tSe=function(e,t,r){var i=j.useRef(void 0),s=j.useRef(0);eSe(t,i.current)||(s.current+=1),i.current=t,X1e(e,[s.current],r)},nSe=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator?.platform:""),cU={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:nSe?[91,93]:[91,92],selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},VO={ctrl:function(e){return e.ctrlKey},shift:function(e){return e.shiftKey},alt:function(e){return e.altKey},meta:function(e){return e.type==="keyup"?cU.meta.includes(e.keyCode):e.metaKey}};function fU(e){return G1e(e)||lU(e)}function rSe(e){var t=Object.keys(VO).reduce(function(r,i){return VO[i](e)?r+1:r},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function gN(e,t,r){var i,s;if(!e.key)return!1;if(lU(t))return e.keyCode===t?t:!1;var l=t.split("."),c=0;try{for(var f=MO(l),d=f.next();!d.done;d=f.next()){var h=d.value,m=VO[h],g=cU[h.toLowerCase()];(m&&m(e)||g&&g===e.keyCode)&&c++}}catch(v){i={error:v}}finally{try{d&&!d.done&&(s=f.return)&&s.call(f)}finally{if(i)throw i.error}}return r?c===l.length&&rSe(e)===l.length?t:!1:c===l.length?t:!1}function aSe(e,t){return sU(e)?e:fU(e)?function(r){return gN(r,e,t)}:Array.isArray(e)?function(r){return e.find(function(i){return gN(r,i,t)})}:function(){return!!e}}var iSe=["keydown"];function oSe(e,t,r){var i={},s=i.events,l=s===void 0?iSe:s,c=i.target,f=i.exactMatch,d=f===void 0?!1:f,h=i.useCapture,m=h===void 0?!1:h,g=qO(t),v=qO(e);tSe(function(){var _,b,S,w=uU(c,window);if(w){var x=function(C){var O,M=C,D=aSe(v.current,d),U=D(M),B=fU(U)?U:M.key;if(U)return(O=g.current)===null||O===void 0?void 0:O.call(g,M,B)};try{for(var E=MO(l),R=E.next();!R.done;R=E.next()){var T=R.value;(S=w?.addEventListener)===null||S===void 0||S.call(w,T,x,m)}}catch(C){_={error:C}}finally{try{R&&!R.done&&(b=E.return)&&b.call(E)}finally{if(_)throw _.error}}return function(){var C,O,M;try{for(var D=MO(l),U=D.next();!U.done;U=D.next()){var B=U.value;(M=w?.removeEventListener)===null||M===void 0||M.call(w,B,x,m)}}catch(q){C={error:q}}finally{try{U&&!U.done&&(O=D.return)&&O.call(D)}finally{if(C)throw C.error}}}}},[l],c)}const sSe=({validateForm:e,formData:t})=>{const r=Lf(),{mutateAsync:i,isPending:s}=Aae(),l=async()=>{e&&!await e()||t&&await i({toolName:r.name,args:t})};return oSe("Enter",l),k.jsx("div",{className:"flex flex-col items-end gap-1",children:k.jsxs(bl,{onClick:l,variant:"default",disabled:s,children:[s?k.jsx(lF,{className:"h-4 w-4 animate-spin"}):k.jsx(pF,{className:"h-4 w-4"}),"Call Tool"]})})};var Zw={exports:{}},lSe=Zw.exports,yN;function uSe(){return yN||(yN=1,(function(e,t){(function(r,i){e.exports=i(_g())})(lSe,r=>(()=>{var i={165:(f,d,h)=>{const m=h(877),g={};for(const b of Object.keys(m))g[m[b]]=b;const v={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};f.exports=v;for(const b of Object.keys(v)){if(!("channels"in v[b]))throw new Error("missing channels property: "+b);if(!("labels"in v[b]))throw new Error("missing channel labels property: "+b);if(v[b].labels.length!==v[b].channels)throw new Error("channel and label counts mismatch: "+b);const{channels:S,labels:w}=v[b];delete v[b].channels,delete v[b].labels,Object.defineProperty(v[b],"channels",{value:S}),Object.defineProperty(v[b],"labels",{value:w})}function _(b,S){return(b[0]-S[0])**2+(b[1]-S[1])**2+(b[2]-S[2])**2}v.rgb.hsl=function(b){const S=b[0]/255,w=b[1]/255,x=b[2]/255,E=Math.min(S,w,x),R=Math.max(S,w,x),T=R-E;let C,O;R===E?C=0:S===R?C=(w-x)/T:w===R?C=2+(x-S)/T:x===R&&(C=4+(S-w)/T),C=Math.min(60*C,360),C<0&&(C+=360);const M=(E+R)/2;return O=R===E?0:M<=.5?T/(R+E):T/(2-R-E),[C,100*O,100*M]},v.rgb.hsv=function(b){let S,w,x,E,R;const T=b[0]/255,C=b[1]/255,O=b[2]/255,M=Math.max(T,C,O),D=M-Math.min(T,C,O),U=function(B){return(M-B)/6/D+.5};return D===0?(E=0,R=0):(R=D/M,S=U(T),w=U(C),x=U(O),T===M?E=x-w:C===M?E=.3333333333333333+S-x:O===M&&(E=.6666666666666666+w-S),E<0?E+=1:E>1&&(E-=1)),[360*E,100*R,100*M]},v.rgb.hwb=function(b){const S=b[0],w=b[1];let x=b[2];const E=v.rgb.hsl(b)[0],R=1/255*Math.min(S,Math.min(w,x));return x=1-.00392156862745098*Math.max(S,Math.max(w,x)),[E,100*R,100*x]},v.rgb.cmyk=function(b){const S=b[0]/255,w=b[1]/255,x=b[2]/255,E=Math.min(1-S,1-w,1-x);return[100*((1-S-E)/(1-E)||0),100*((1-w-E)/(1-E)||0),100*((1-x-E)/(1-E)||0),100*E]},v.rgb.keyword=function(b){const S=g[b];if(S)return S;let w,x=1/0;for(const E of Object.keys(m)){const R=_(b,m[E]);R<x&&(x=R,w=E)}return w},v.keyword.rgb=function(b){return m[b]},v.rgb.xyz=function(b){let S=b[0]/255,w=b[1]/255,x=b[2]/255;return S=S>.04045?((S+.055)/1.055)**2.4:S/12.92,w=w>.04045?((w+.055)/1.055)**2.4:w/12.92,x=x>.04045?((x+.055)/1.055)**2.4:x/12.92,[100*(.4124*S+.3576*w+.1805*x),100*(.2126*S+.7152*w+.0722*x),100*(.0193*S+.1192*w+.9505*x)]},v.rgb.lab=function(b){const S=v.rgb.xyz(b);let w=S[0],x=S[1],E=S[2];return w/=95.047,x/=100,E/=108.883,w=w>.008856?w**.3333333333333333:7.787*w+.13793103448275862,x=x>.008856?x**.3333333333333333:7.787*x+.13793103448275862,E=E>.008856?E**.3333333333333333:7.787*E+.13793103448275862,[116*x-16,500*(w-x),200*(x-E)]},v.hsl.rgb=function(b){const S=b[0]/360,w=b[1]/100,x=b[2]/100;let E,R,T;if(w===0)return T=255*x,[T,T,T];E=x<.5?x*(1+w):x+w-x*w;const C=2*x-E,O=[0,0,0];for(let M=0;M<3;M++)R=S+.3333333333333333*-(M-1),R<0&&R++,R>1&&R--,T=6*R<1?C+6*(E-C)*R:2*R<1?E:3*R<2?C+(E-C)*(.6666666666666666-R)*6:C,O[M]=255*T;return O},v.hsl.hsv=function(b){const S=b[0];let w=b[1]/100,x=b[2]/100,E=w;const R=Math.max(x,.01);return x*=2,w*=x<=1?x:2-x,E*=R<=1?R:2-R,[S,100*(x===0?2*E/(R+E):2*w/(x+w)),100*((x+w)/2)]},v.hsv.rgb=function(b){const S=b[0]/60,w=b[1]/100;let x=b[2]/100;const E=Math.floor(S)%6,R=S-Math.floor(S),T=255*x*(1-w),C=255*x*(1-w*R),O=255*x*(1-w*(1-R));switch(x*=255,E){case 0:return[x,O,T];case 1:return[C,x,T];case 2:return[T,x,O];case 3:return[T,C,x];case 4:return[O,T,x];case 5:return[x,T,C]}},v.hsv.hsl=function(b){const S=b[0],w=b[1]/100,x=b[2]/100,E=Math.max(x,.01);let R,T;T=(2-w)*x;const C=(2-w)*E;return R=w*E,R/=C<=1?C:2-C,R=R||0,T/=2,[S,100*R,100*T]},v.hwb.rgb=function(b){const S=b[0]/360;let w=b[1]/100,x=b[2]/100;const E=w+x;let R;E>1&&(w/=E,x/=E);const T=Math.floor(6*S),C=1-x;R=6*S-T,1&T&&(R=1-R);const O=w+R*(C-w);let M,D,U;switch(T){default:case 6:case 0:M=C,D=O,U=w;break;case 1:M=O,D=C,U=w;break;case 2:M=w,D=C,U=O;break;case 3:M=w,D=O,U=C;break;case 4:M=O,D=w,U=C;break;case 5:M=C,D=w,U=O}return[255*M,255*D,255*U]},v.cmyk.rgb=function(b){const S=b[0]/100,w=b[1]/100,x=b[2]/100,E=b[3]/100;return[255*(1-Math.min(1,S*(1-E)+E)),255*(1-Math.min(1,w*(1-E)+E)),255*(1-Math.min(1,x*(1-E)+E))]},v.xyz.rgb=function(b){const S=b[0]/100,w=b[1]/100,x=b[2]/100;let E,R,T;return E=3.2406*S+-1.5372*w+-.4986*x,R=-.9689*S+1.8758*w+.0415*x,T=.0557*S+-.204*w+1.057*x,E=E>.0031308?1.055*E**.4166666666666667-.055:12.92*E,R=R>.0031308?1.055*R**.4166666666666667-.055:12.92*R,T=T>.0031308?1.055*T**.4166666666666667-.055:12.92*T,E=Math.min(Math.max(0,E),1),R=Math.min(Math.max(0,R),1),T=Math.min(Math.max(0,T),1),[255*E,255*R,255*T]},v.xyz.lab=function(b){let S=b[0],w=b[1],x=b[2];return S/=95.047,w/=100,x/=108.883,S=S>.008856?S**.3333333333333333:7.787*S+.13793103448275862,w=w>.008856?w**.3333333333333333:7.787*w+.13793103448275862,x=x>.008856?x**.3333333333333333:7.787*x+.13793103448275862,[116*w-16,500*(S-w),200*(w-x)]},v.lab.xyz=function(b){let S,w,x;w=(b[0]+16)/116,S=b[1]/500+w,x=w-b[2]/200;const E=w**3,R=S**3,T=x**3;return w=E>.008856?E:(w-.13793103448275862)/7.787,S=R>.008856?R:(S-.13793103448275862)/7.787,x=T>.008856?T:(x-.13793103448275862)/7.787,S*=95.047,w*=100,x*=108.883,[S,w,x]},v.lab.lch=function(b){const S=b[0],w=b[1],x=b[2];let E;return E=360*Math.atan2(x,w)/2/Math.PI,E<0&&(E+=360),[S,Math.sqrt(w*w+x*x),E]},v.lch.lab=function(b){const S=b[0],w=b[1],x=b[2]/360*2*Math.PI;return[S,w*Math.cos(x),w*Math.sin(x)]},v.rgb.ansi16=function(b,S=null){const[w,x,E]=b;let R=S===null?v.rgb.hsv(b)[2]:S;if(R=Math.round(R/50),R===0)return 30;let T=30+(Math.round(E/255)<<2|Math.round(x/255)<<1|Math.round(w/255));return R===2&&(T+=60),T},v.hsv.ansi16=function(b){return v.rgb.ansi16(v.hsv.rgb(b),b[2])},v.rgb.ansi256=function(b){const S=b[0],w=b[1],x=b[2];return S===w&&w===x?S<8?16:S>248?231:Math.round((S-8)/247*24)+232:16+36*Math.round(S/255*5)+6*Math.round(w/255*5)+Math.round(x/255*5)},v.ansi16.rgb=function(b){let S=b%10;if(S===0||S===7)return b>50&&(S+=3.5),S=S/10.5*255,[S,S,S];const w=.5*(1+~~(b>50));return[(1&S)*w*255,(S>>1&1)*w*255,(S>>2&1)*w*255]},v.ansi256.rgb=function(b){if(b>=232){const w=10*(b-232)+8;return[w,w,w]}let S;return b-=16,[Math.floor(b/36)/5*255,Math.floor((S=b%36)/6)/5*255,S%6/5*255]},v.rgb.hex=function(b){const S=(((255&Math.round(b[0]))<<16)+((255&Math.round(b[1]))<<8)+(255&Math.round(b[2]))).toString(16).toUpperCase();return"000000".substring(S.length)+S},v.hex.rgb=function(b){const S=b.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!S)return[0,0,0];let w=S[0];S[0].length===3&&(w=w.split("").map(E=>E+E).join(""));const x=parseInt(w,16);return[x>>16&255,x>>8&255,255&x]},v.rgb.hcg=function(b){const S=b[0]/255,w=b[1]/255,x=b[2]/255,E=Math.max(Math.max(S,w),x),R=Math.min(Math.min(S,w),x),T=E-R;let C,O;return C=T<1?R/(1-T):0,O=T<=0?0:E===S?(w-x)/T%6:E===w?2+(x-S)/T:4+(S-w)/T,O/=6,O%=1,[360*O,100*T,100*C]},v.hsl.hcg=function(b){const S=b[1]/100,w=b[2]/100,x=w<.5?2*S*w:2*S*(1-w);let E=0;return x<1&&(E=(w-.5*x)/(1-x)),[b[0],100*x,100*E]},v.hsv.hcg=function(b){const S=b[1]/100,w=b[2]/100,x=S*w;let E=0;return x<1&&(E=(w-x)/(1-x)),[b[0],100*x,100*E]},v.hcg.rgb=function(b){const S=b[0]/360,w=b[1]/100,x=b[2]/100;if(w===0)return[255*x,255*x,255*x];const E=[0,0,0],R=S%1*6,T=R%1,C=1-T;let O=0;switch(Math.floor(R)){case 0:E[0]=1,E[1]=T,E[2]=0;break;case 1:E[0]=C,E[1]=1,E[2]=0;break;case 2:E[0]=0,E[1]=1,E[2]=T;break;case 3:E[0]=0,E[1]=C,E[2]=1;break;case 4:E[0]=T,E[1]=0,E[2]=1;break;default:E[0]=1,E[1]=0,E[2]=C}return O=(1-w)*x,[255*(w*E[0]+O),255*(w*E[1]+O),255*(w*E[2]+O)]},v.hcg.hsv=function(b){const S=b[1]/100,w=S+b[2]/100*(1-S);let x=0;return w>0&&(x=S/w),[b[0],100*x,100*w]},v.hcg.hsl=function(b){const S=b[1]/100,w=b[2]/100*(1-S)+.5*S;let x=0;return w>0&&w<.5?x=S/(2*w):w>=.5&&w<1&&(x=S/(2*(1-w))),[b[0],100*x,100*w]},v.hcg.hwb=function(b){const S=b[1]/100,w=S+b[2]/100*(1-S);return[b[0],100*(w-S),100*(1-w)]},v.hwb.hcg=function(b){const S=b[1]/100,w=1-b[2]/100,x=w-S;let E=0;return x<1&&(E=(w-x)/(1-x)),[b[0],100*x,100*E]},v.apple.rgb=function(b){return[b[0]/65535*255,b[1]/65535*255,b[2]/65535*255]},v.rgb.apple=function(b){return[b[0]/255*65535,b[1]/255*65535,b[2]/255*65535]},v.gray.rgb=function(b){return[b[0]/100*255,b[0]/100*255,b[0]/100*255]},v.gray.hsl=function(b){return[0,0,b[0]]},v.gray.hsv=v.gray.hsl,v.gray.hwb=function(b){return[0,100,b[0]]},v.gray.cmyk=function(b){return[0,0,0,b[0]]},v.gray.lab=function(b){return[b[0],0,0]},v.gray.hex=function(b){const S=255&Math.round(b[0]/100*255),w=((S<<16)+(S<<8)+S).toString(16).toUpperCase();return"000000".substring(w.length)+w},v.rgb.gray=function(b){return[(b[0]+b[1]+b[2])/3/255*100]}},880:(f,d,h)=>{const m=h(165),g=h(985),v={};Object.keys(m).forEach(_=>{v[_]={},Object.defineProperty(v[_],"channels",{value:m[_].channels}),Object.defineProperty(v[_],"labels",{value:m[_].labels});const b=g(_);Object.keys(b).forEach(S=>{const w=b[S];v[_][S]=(function(x){const E=function(...R){const T=R[0];if(T==null)return T;T.length>1&&(R=T);const C=x(R);if(typeof C=="object")for(let O=C.length,M=0;M<O;M++)C[M]=Math.round(C[M]);return C};return"conversion"in x&&(E.conversion=x.conversion),E})(w),v[_][S].raw=(function(x){const E=function(...R){const T=R[0];return T==null?T:(T.length>1&&(R=T),x(R))};return"conversion"in x&&(E.conversion=x.conversion),E})(w)})}),f.exports=v},985:(f,d,h)=>{const m=h(165);function g(b){const S=(function(){const x={},E=Object.keys(m);for(let R=E.length,T=0;T<R;T++)x[E[T]]={distance:-1,parent:null};return x})(),w=[b];for(S[b].distance=0;w.length;){const x=w.pop(),E=Object.keys(m[x]);for(let R=E.length,T=0;T<R;T++){const C=E[T],O=S[C];O.distance===-1&&(O.distance=S[x].distance+1,O.parent=x,w.unshift(C))}}return S}function v(b,S){return function(w){return S(b(w))}}function _(b,S){const w=[S[b].parent,b];let x=m[S[b].parent][b],E=S[b].parent;for(;S[E].parent;)w.unshift(S[E].parent),x=v(m[S[E].parent][E],x),E=S[E].parent;return x.conversion=w,x}f.exports=function(b){const S=g(b),w={},x=Object.keys(S);for(let E=x.length,R=0;R<E;R++){const T=x[R];S[T].parent!==null&&(w[T]=_(T,S))}return w}},877:f=>{f.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},138:(f,d,h)=>{var m=h(877),g=h(403),v=Object.hasOwnProperty,_=Object.create(null);for(var b in m)v.call(m,b)&&(_[m[b]]=b);var S=f.exports={to:{},get:{}};function w(E,R,T){return Math.min(Math.max(R,E),T)}function x(E){var R=Math.round(E).toString(16).toUpperCase();return R.length<2?"0"+R:R}S.get=function(E){var R,T;switch(E.substring(0,3).toLowerCase()){case"hsl":R=S.get.hsl(E),T="hsl";break;case"hwb":R=S.get.hwb(E),T="hwb";break;default:R=S.get.rgb(E),T="rgb"}return R?{model:T,value:R}:null},S.get.rgb=function(E){if(!E)return null;var R,T,C,O=[0,0,0,1];if(R=E.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(C=R[2],R=R[1],T=0;T<3;T++){var M=2*T;O[T]=parseInt(R.slice(M,M+2),16)}C&&(O[3]=parseInt(C,16)/255)}else if(R=E.match(/^#([a-f0-9]{3,4})$/i)){for(C=(R=R[1])[3],T=0;T<3;T++)O[T]=parseInt(R[T]+R[T],16);C&&(O[3]=parseInt(C+C,16)/255)}else if(R=E.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(T=0;T<3;T++)O[T]=parseInt(R[T+1],0);R[4]&&(R[5]?O[3]=.01*parseFloat(R[4]):O[3]=parseFloat(R[4]))}else{if(!(R=E.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(R=E.match(/^(\w+)$/))?R[1]==="transparent"?[0,0,0,0]:v.call(m,R[1])?((O=m[R[1]])[3]=1,O):null:null;for(T=0;T<3;T++)O[T]=Math.round(2.55*parseFloat(R[T+1]));R[4]&&(R[5]?O[3]=.01*parseFloat(R[4]):O[3]=parseFloat(R[4]))}for(T=0;T<3;T++)O[T]=w(O[T],0,255);return O[3]=w(O[3],0,1),O},S.get.hsl=function(E){if(!E)return null;var R=E.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(R){var T=parseFloat(R[4]);return[(parseFloat(R[1])%360+360)%360,w(parseFloat(R[2]),0,100),w(parseFloat(R[3]),0,100),w(isNaN(T)?1:T,0,1)]}return null},S.get.hwb=function(E){if(!E)return null;var R=E.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(R){var T=parseFloat(R[4]);return[(parseFloat(R[1])%360+360)%360,w(parseFloat(R[2]),0,100),w(parseFloat(R[3]),0,100),w(isNaN(T)?1:T,0,1)]}return null},S.to.hex=function(){var E=g(arguments);return"#"+x(E[0])+x(E[1])+x(E[2])+(E[3]<1?x(Math.round(255*E[3])):"")},S.to.rgb=function(){var E=g(arguments);return E.length<4||E[3]===1?"rgb("+Math.round(E[0])+", "+Math.round(E[1])+", "+Math.round(E[2])+")":"rgba("+Math.round(E[0])+", "+Math.round(E[1])+", "+Math.round(E[2])+", "+E[3]+")"},S.to.rgb.percent=function(){var E=g(arguments),R=Math.round(E[0]/255*100),T=Math.round(E[1]/255*100),C=Math.round(E[2]/255*100);return E.length<4||E[3]===1?"rgb("+R+"%, "+T+"%, "+C+"%)":"rgba("+R+"%, "+T+"%, "+C+"%, "+E[3]+")"},S.to.hsl=function(){var E=g(arguments);return E.length<4||E[3]===1?"hsl("+E[0]+", "+E[1]+"%, "+E[2]+"%)":"hsla("+E[0]+", "+E[1]+"%, "+E[2]+"%, "+E[3]+")"},S.to.hwb=function(){var E=g(arguments),R="";return E.length>=4&&E[3]!==1&&(R=", "+E[3]),"hwb("+E[0]+", "+E[1]+"%, "+E[2]+"%"+R+")"},S.to.keyword=function(E){return _[E.slice(0,3)]}},742:(f,d,h)=>{const m=h(138),g=h(880),v=["keyword","gray","hex"],_={};for(const T of Object.keys(g))_[[...g[T].labels].sort().join("")]=T;const b={};function S(T,C){if(!(this instanceof S))return new S(T,C);if(C&&C in v&&(C=null),C&&!(C in g))throw new Error("Unknown model: "+C);let O,M;if(T==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(T instanceof S)this.model=T.model,this.color=[...T.color],this.valpha=T.valpha;else if(typeof T=="string"){const D=m.get(T);if(D===null)throw new Error("Unable to parse color from string: "+T);this.model=D.model,M=g[this.model].channels,this.color=D.value.slice(0,M),this.valpha=typeof D.value[M]=="number"?D.value[M]:1}else if(T.length>0){this.model=C||"rgb",M=g[this.model].channels;const D=Array.prototype.slice.call(T,0,M);this.color=R(D,M),this.valpha=typeof T[M]=="number"?T[M]:1}else if(typeof T=="number")this.model="rgb",this.color=[T>>16&255,T>>8&255,255&T],this.valpha=1;else{this.valpha=1;const D=Object.keys(T);"alpha"in T&&(D.splice(D.indexOf("alpha"),1),this.valpha=typeof T.alpha=="number"?T.alpha:0);const U=D.sort().join("");if(!(U in _))throw new Error("Unable to parse color from object: "+JSON.stringify(T));this.model=_[U];const{labels:B}=g[this.model],q=[];for(O=0;O<B.length;O++)q.push(T[B[O]]);this.color=R(q)}if(b[this.model])for(M=g[this.model].channels,O=0;O<M;O++){const D=b[this.model][O];D&&(this.color[O]=D(this.color[O]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}S.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(T){let C=this.model in m.to?this:this.rgb();C=C.round(typeof T=="number"?T:1);const O=C.valpha===1?C.color:[...C.color,this.valpha];return m.to[C.model](O)},percentString(T){const C=this.rgb().round(typeof T=="number"?T:1),O=C.valpha===1?C.color:[...C.color,this.valpha];return m.to.rgb.percent(O)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const T={},{channels:C}=g[this.model],{labels:O}=g[this.model];for(let M=0;M<C;M++)T[O[M]]=this.color[M];return this.valpha!==1&&(T.alpha=this.valpha),T},unitArray(){const T=this.rgb().color;return T[0]/=255,T[1]/=255,T[2]/=255,this.valpha!==1&&T.push(this.valpha),T},unitObject(){const T=this.rgb().object();return T.r/=255,T.g/=255,T.b/=255,this.valpha!==1&&(T.alpha=this.valpha),T},round(T){return T=Math.max(T||0,0),new S([...this.color.map(w(T)),this.valpha],this.model)},alpha(T){return T!==void 0?new S([...this.color,Math.max(0,Math.min(1,T))],this.model):this.valpha},red:x("rgb",0,E(255)),green:x("rgb",1,E(255)),blue:x("rgb",2,E(255)),hue:x(["hsl","hsv","hsl","hwb","hcg"],0,T=>(T%360+360)%360),saturationl:x("hsl",1,E(100)),lightness:x("hsl",2,E(100)),saturationv:x("hsv",1,E(100)),value:x("hsv",2,E(100)),chroma:x("hcg",1,E(100)),gray:x("hcg",2,E(100)),white:x("hwb",1,E(100)),wblack:x("hwb",2,E(100)),cyan:x("cmyk",0,E(100)),magenta:x("cmyk",1,E(100)),yellow:x("cmyk",2,E(100)),black:x("cmyk",3,E(100)),x:x("xyz",0,E(95.047)),y:x("xyz",1,E(100)),z:x("xyz",2,E(108.833)),l:x("lab",0,E(100)),a:x("lab",1),b:x("lab",2),keyword(T){return T!==void 0?new S(T):g[this.model].keyword(this.color)},hex(T){return T!==void 0?new S(T):m.to.hex(this.rgb().round().color)},hexa(T){if(T!==void 0)return new S(T);const C=this.rgb().round().color;let O=Math.round(255*this.valpha).toString(16).toUpperCase();return O.length===1&&(O="0"+O),m.to.hex(C)+O},rgbNumber(){const T=this.rgb().color;return(255&T[0])<<16|(255&T[1])<<8|255&T[2]},luminosity(){const T=this.rgb().color,C=[];for(const[O,M]of T.entries()){const D=M/255;C[O]=D<=.04045?D/12.92:((D+.055)/1.055)**2.4}return .2126*C[0]+.7152*C[1]+.0722*C[2]},contrast(T){const C=this.luminosity(),O=T.luminosity();return C>O?(C+.05)/(O+.05):(O+.05)/(C+.05)},level(T){const C=this.contrast(T);return C>=7?"AAA":C>=4.5?"AA":""},isDark(){const T=this.rgb().color;return(2126*T[0]+7152*T[1]+722*T[2])/1e4<128},isLight(){return!this.isDark()},negate(){const T=this.rgb();for(let C=0;C<3;C++)T.color[C]=255-T.color[C];return T},lighten(T){const C=this.hsl();return C.color[2]+=C.color[2]*T,C},darken(T){const C=this.hsl();return C.color[2]-=C.color[2]*T,C},saturate(T){const C=this.hsl();return C.color[1]+=C.color[1]*T,C},desaturate(T){const C=this.hsl();return C.color[1]-=C.color[1]*T,C},whiten(T){const C=this.hwb();return C.color[1]+=C.color[1]*T,C},blacken(T){const C=this.hwb();return C.color[2]+=C.color[2]*T,C},grayscale(){const T=this.rgb().color,C=.3*T[0]+.59*T[1]+.11*T[2];return S.rgb(C,C,C)},fade(T){return this.alpha(this.valpha-this.valpha*T)},opaquer(T){return this.alpha(this.valpha+this.valpha*T)},rotate(T){const C=this.hsl();let O=C.color[0];return O=(O+T)%360,O=O<0?360+O:O,C.color[0]=O,C},mix(T,C){if(!T||!T.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof T);const O=T.rgb(),M=this.rgb(),D=C===void 0?.5:C,U=2*D-1,B=O.alpha()-M.alpha(),q=((U*B===-1?U:(U+B)/(1+U*B))+1)/2,V=1-q;return S.rgb(q*O.red()+V*M.red(),q*O.green()+V*M.green(),q*O.blue()+V*M.blue(),O.alpha()*D+M.alpha()*(1-D))}};for(const T of Object.keys(g)){if(v.includes(T))continue;const{channels:C}=g[T];S.prototype[T]=function(...O){return this.model===T?new S(this):O.length>0?new S(O,T):new S([...(M=g[this.model][T].raw(this.color),Array.isArray(M)?M:[M]),this.valpha],T);var M},S[T]=function(...O){let M=O[0];return typeof M=="number"&&(M=R(O,C)),new S(M,T)}}function w(T){return function(C){return(function(O,M){return Number(O.toFixed(M))})(C,T)}}function x(T,C,O){T=Array.isArray(T)?T:[T];for(const M of T)(b[M]||(b[M]=[]))[C]=O;return T=T[0],function(M){let D;return M!==void 0?(O&&(M=O(M)),D=this[T](),D.color[C]=M,D):(D=this[T]().color[C],O&&(D=O(D)),D)}}function E(T){return function(C){return Math.max(0,Math.min(T,C))}}function R(T,C){for(let O=0;O<C;O++)typeof T[O]!="number"&&(T[O]=0);return T}f.exports=S},784:f=>{var d,h=typeof Reflect=="object"?Reflect:null,m=h&&typeof h.apply=="function"?h.apply:function(M,D,U){return Function.prototype.apply.call(M,D,U)};d=h&&typeof h.ownKeys=="function"?h.ownKeys:Object.getOwnPropertySymbols?function(M){return Object.getOwnPropertyNames(M).concat(Object.getOwnPropertySymbols(M))}:function(M){return Object.getOwnPropertyNames(M)};var g=Number.isNaN||function(M){return M!=M};function v(){v.init.call(this)}f.exports=v,f.exports.once=function(M,D){return new Promise(function(U,B){function q(G){M.removeListener(D,V),B(G)}function V(){typeof M.removeListener=="function"&&M.removeListener("error",q),U([].slice.call(arguments))}O(M,D,V,{once:!0}),D!=="error"&&(function(G,ne,oe){typeof G.on=="function"&&O(G,"error",ne,oe)})(M,q,{once:!0})})},v.EventEmitter=v,v.prototype._events=void 0,v.prototype._eventsCount=0,v.prototype._maxListeners=void 0;var _=10;function b(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}function S(M){return M._maxListeners===void 0?v.defaultMaxListeners:M._maxListeners}function w(M,D,U,B){var q,V,G,ne;if(b(U),(V=M._events)===void 0?(V=M._events=Object.create(null),M._eventsCount=0):(V.newListener!==void 0&&(M.emit("newListener",D,U.listener?U.listener:U),V=M._events),G=V[D]),G===void 0)G=V[D]=U,++M._eventsCount;else if(typeof G=="function"?G=V[D]=B?[U,G]:[G,U]:B?G.unshift(U):G.push(U),(q=S(M))>0&&G.length>q&&!G.warned){G.warned=!0;var oe=new Error("Possible EventEmitter memory leak detected. "+G.length+" "+String(D)+" listeners added. Use emitter.setMaxListeners() to increase limit");oe.name="MaxListenersExceededWarning",oe.emitter=M,oe.type=D,oe.count=G.length,ne=oe,console&&console.warn&&console.warn(ne)}return M}function x(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function E(M,D,U){var B={fired:!1,wrapFn:void 0,target:M,type:D,listener:U},q=x.bind(B);return q.listener=U,B.wrapFn=q,q}function R(M,D,U){var B=M._events;if(B===void 0)return[];var q=B[D];return q===void 0?[]:typeof q=="function"?U?[q.listener||q]:[q]:U?(function(V){for(var G=new Array(V.length),ne=0;ne<G.length;++ne)G[ne]=V[ne].listener||V[ne];return G})(q):C(q,q.length)}function T(M){var D=this._events;if(D!==void 0){var U=D[M];if(typeof U=="function")return 1;if(U!==void 0)return U.length}return 0}function C(M,D){for(var U=new Array(D),B=0;B<D;++B)U[B]=M[B];return U}function O(M,D,U,B){if(typeof M.on=="function")B.once?M.once(D,U):M.on(D,U);else{if(typeof M.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof M);M.addEventListener(D,function q(V){B.once&&M.removeEventListener(D,q),U(V)})}}Object.defineProperty(v,"defaultMaxListeners",{enumerable:!0,get:function(){return _},set:function(M){if(typeof M!="number"||M<0||g(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");_=M}}),v.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},v.prototype.setMaxListeners=function(M){if(typeof M!="number"||M<0||g(M))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+M+".");return this._maxListeners=M,this},v.prototype.getMaxListeners=function(){return S(this)},v.prototype.emit=function(M){for(var D=[],U=1;U<arguments.length;U++)D.push(arguments[U]);var B=M==="error",q=this._events;if(q!==void 0)B=B&&q.error===void 0;else if(!B)return!1;if(B){var V;if(D.length>0&&(V=D[0]),V instanceof Error)throw V;var G=new Error("Unhandled error."+(V?" ("+V.message+")":""));throw G.context=V,G}var ne=q[M];if(ne===void 0)return!1;if(typeof ne=="function")m(ne,this,D);else{var oe=ne.length,K=C(ne,oe);for(U=0;U<oe;++U)m(K[U],this,D)}return!0},v.prototype.addListener=function(M,D){return w(this,M,D,!1)},v.prototype.on=v.prototype.addListener,v.prototype.prependListener=function(M,D){return w(this,M,D,!0)},v.prototype.once=function(M,D){return b(D),this.on(M,E(this,M,D)),this},v.prototype.prependOnceListener=function(M,D){return b(D),this.prependListener(M,E(this,M,D)),this},v.prototype.removeListener=function(M,D){var U,B,q,V,G;if(b(D),(B=this._events)===void 0)return this;if((U=B[M])===void 0)return this;if(U===D||U.listener===D)--this._eventsCount===0?this._events=Object.create(null):(delete B[M],B.removeListener&&this.emit("removeListener",M,U.listener||D));else if(typeof U!="function"){for(q=-1,V=U.length-1;V>=0;V--)if(U[V]===D||U[V].listener===D){G=U[V].listener,q=V;break}if(q<0)return this;q===0?U.shift():(function(ne,oe){for(;oe+1<ne.length;oe++)ne[oe]=ne[oe+1];ne.pop()})(U,q),U.length===1&&(B[M]=U[0]),B.removeListener!==void 0&&this.emit("removeListener",M,G||D)}return this},v.prototype.off=v.prototype.removeListener,v.prototype.removeAllListeners=function(M){var D,U,B;if((U=this._events)===void 0)return this;if(U.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):U[M]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete U[M]),this;if(arguments.length===0){var q,V=Object.keys(U);for(B=0;B<V.length;++B)(q=V[B])!=="removeListener"&&this.removeAllListeners(q);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(D=U[M])=="function")this.removeListener(M,D);else if(D!==void 0)for(B=D.length-1;B>=0;B--)this.removeListener(M,D[B]);return this},v.prototype.listeners=function(M){return R(this,M,!0)},v.prototype.rawListeners=function(M){return R(this,M,!1)},v.listenerCount=function(M,D){return typeof M.listenerCount=="function"?M.listenerCount(D):T.call(M,D)},v.prototype.listenerCount=T,v.prototype.eventNames=function(){return this._eventsCount>0?d(this._events):[]}},94:f=>{f.exports=function(d){return!(!d||typeof d=="string")&&(d instanceof Array||Array.isArray(d)||d.length>=0&&(d.splice instanceof Function||Object.getOwnPropertyDescriptor(d,d.length-1)&&d.constructor.name!=="String"))}},403:(f,d,h)=>{var m=h(94),g=Array.prototype.concat,v=Array.prototype.slice,_=f.exports=function(b){for(var S=[],w=0,x=b.length;w<x;w++){var E=b[w];m(E)?S=g.call(S,v.call(E)):S.push(E)}return S};_.wrap=function(b){return function(){return b(_(arguments))}}},119:f=>{f.exports=r}},s={};function l(f){var d=s[f];if(d!==void 0)return d.exports;var h=s[f]={exports:{}};return i[f](h,h.exports,l),h.exports}l.n=f=>{var d=f&&f.__esModule?()=>f.default:()=>f;return l.d(d,{a:d}),d},l.d=(f,d)=>{for(var h in d)l.o(d,h)&&!l.o(f,h)&&Object.defineProperty(f,h,{enumerable:!0,get:d[h]})},l.o=(f,d)=>Object.prototype.hasOwnProperty.call(f,d),l.r=f=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(f,"__esModule",{value:!0})};var c={};return(()=>{function f(P){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},f(P)}function d(P){var $=(function(F,Z){if(f(F)!="object"||!F)return F;var fe=F[Symbol.toPrimitive];if(fe!==void 0){var Se=fe.call(F,Z);if(f(Se)!="object")return Se;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Z==="string"?String:Number)(F)})(P,"string");return f($)=="symbol"?$:$+""}function h(P,$,F){return($=d($))in P?Object.defineProperty(P,$,{value:F,enumerable:!0,configurable:!0,writable:!0}):P[$]=F,P}function m(P,$){var F=Object.keys(P);if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(P);$&&(Z=Z.filter(function(fe){return Object.getOwnPropertyDescriptor(P,fe).enumerable})),F.push.apply(F,Z)}return F}function g(P){for(var $=1;$<arguments.length;$++){var F=arguments[$]!=null?arguments[$]:{};$%2?m(Object(F),!0).forEach(function(Z){h(P,Z,F[Z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(P,Object.getOwnPropertyDescriptors(F)):m(Object(F)).forEach(function(Z){Object.defineProperty(P,Z,Object.getOwnPropertyDescriptor(F,Z))})}return P}function v(P,$){if(!(P instanceof $))throw new TypeError("Cannot call a class as a function")}function _(P,$){for(var F=0;F<$.length;F++){var Z=$[F];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(P,d(Z.key),Z)}}function b(P,$,F){return $&&_(P.prototype,$),F&&_(P,F),Object.defineProperty(P,"prototype",{writable:!1}),P}function S(P){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function($){return $.__proto__||Object.getPrototypeOf($)},S(P)}function w(){try{var P=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(w=function(){return!!P})()}function x(P,$){if($&&(f($)=="object"||typeof $=="function"))return $;if($!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F})(P)}function E(P,$,F){return $=S($),x(P,w()?Reflect.construct($,F||[],S(P).constructor):$.apply(P,F))}function R(P,$){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(F,Z){return F.__proto__=Z,F},R(P,$)}function T(P,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function");P.prototype=Object.create($&&$.prototype,{constructor:{value:P,writable:!0,configurable:!0}}),Object.defineProperty(P,"prototype",{writable:!1}),$&&R(P,$)}l.r(c),l.d(c,{default:()=>Sd});var C=l(119),O=l.n(C);function M(){var P=this.constructor.getDerivedStateFromProps(this.props,this.state);P!=null&&this.setState(P)}function D(P){this.setState((function($){var F=this.constructor.getDerivedStateFromProps(P,$);return F??null}).bind(this))}function U(P,$){try{var F=this.props,Z=this.state;this.props=P,this.state=$,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(F,Z)}finally{this.props=F,this.state=Z}}function B(P){var $=P.prototype;if(!$||!$.isReactComponent)throw new Error("Can only polyfill class components");if(typeof P.getDerivedStateFromProps!="function"&&typeof $.getSnapshotBeforeUpdate!="function")return P;var F=null,Z=null,fe=null;if(typeof $.componentWillMount=="function"?F="componentWillMount":typeof $.UNSAFE_componentWillMount=="function"&&(F="UNSAFE_componentWillMount"),typeof $.componentWillReceiveProps=="function"?Z="componentWillReceiveProps":typeof $.UNSAFE_componentWillReceiveProps=="function"&&(Z="UNSAFE_componentWillReceiveProps"),typeof $.componentWillUpdate=="function"?fe="componentWillUpdate":typeof $.UNSAFE_componentWillUpdate=="function"&&(fe="UNSAFE_componentWillUpdate"),F!==null||Z!==null||fe!==null){var Se=P.displayName||P.name,_e=typeof P.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
128
|
+
|
|
129
|
+
`+Se+" uses "+_e+" but also contains the following legacy lifecycles:"+(F!==null?`
|
|
130
|
+
`+F:"")+(Z!==null?`
|
|
131
|
+
`+Z:"")+(fe!==null?`
|
|
132
|
+
`+fe:"")+`
|
|
133
|
+
|
|
134
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
135
|
+
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof P.getDerivedStateFromProps=="function"&&($.componentWillMount=M,$.componentWillReceiveProps=D),typeof $.getSnapshotBeforeUpdate=="function"){if(typeof $.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");$.componentWillUpdate=U;var ge=$.componentDidUpdate;$.componentDidUpdate=function(Te,Ce,Ve){var He=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:Ve;ge.call(this,Te,Ce,He)}}return P}function q(P,$){if(P==null)return{};var F={};for(var Z in P)if({}.hasOwnProperty.call(P,Z)){if($.indexOf(Z)!==-1)continue;F[Z]=P[Z]}return F}function V(P,$){if(P==null)return{};var F,Z,fe=q(P,$);if(Object.getOwnPropertySymbols){var Se=Object.getOwnPropertySymbols(P);for(Z=0;Z<Se.length;Z++)F=Se[Z],$.indexOf(F)===-1&&{}.propertyIsEnumerable.call(P,F)&&(fe[F]=P[F])}return fe}function G(P,$){($==null||$>P.length)&&($=P.length);for(var F=0,Z=Array($);F<$;F++)Z[F]=P[F];return Z}function ne(P,$){if(P){if(typeof P=="string")return G(P,$);var F={}.toString.call(P).slice(8,-1);return F==="Object"&&P.constructor&&(F=P.constructor.name),F==="Map"||F==="Set"?Array.from(P):F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F)?G(P,$):void 0}}function oe(P){return(function($){if(Array.isArray($))return G($)})(P)||(function($){if(typeof Symbol<"u"&&$[Symbol.iterator]!=null||$["@@iterator"]!=null)return Array.from($)})(P)||ne(P)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
136
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function K(P,$){if($&&P?.constructor===$)return"bigNumber";var F=(function(Z){return{}.toString.call(Z).match(/\s([a-zA-Z]+)/)[1].toLowerCase()})(P);return F==="number"&&(F=isNaN(P)?"nan":(0|P)!==P?"float":"integer"),F}function ee(P){return P.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/\f/g,"\\f")}M.__suppressDeprecationWarning=!0,D.__suppressDeprecationWarning=!0,U.__suppressDeprecationWarning=!0;var re={scheme:"rjv-default",author:"mac gainor",base00:"rgba(0, 0, 0, 0)",base01:"rgb(245, 245, 245)",base02:"rgb(235, 235, 235)",base03:"#93a1a1",base04:"rgba(0, 0, 0, 0.3)",base05:"#586e75",base06:"#073642",base07:"#002b36",base08:"#d33682",base09:"#cb4b16",base0A:"#dc322f",base0B:"#859900",base0C:"#6c71c4",base0D:"#586e75",base0E:"#2aa198",base0F:"#268bd2"},ue={scheme:"rjv-grey",author:"mac gainor",base00:"rgba(1, 1, 1, 0)",base01:"rgba(1, 1, 1, 0.1)",base02:"rgba(0, 0, 0, 0.2)",base03:"rgba(1, 1, 1, 0.3)",base04:"rgba(0, 0, 0, 0.4)",base05:"rgba(1, 1, 1, 0.5)",base06:"rgba(1, 1, 1, 0.6)",base07:"rgba(1, 1, 1, 0.7)",base08:"rgba(1, 1, 1, 0.8)",base09:"rgba(1, 1, 1, 0.8)",base0A:"rgba(1, 1, 1, 0.8)",base0B:"rgba(1, 1, 1, 0.8)",base0C:"rgba(1, 1, 1, 0.8)",base0D:"rgba(1, 1, 1, 0.8)",base0E:"rgba(1, 1, 1, 0.8)",base0F:"rgba(1, 1, 1, 0.8)"};const Q={globalFontFamily:"monospace",globalCursor:"default",braceFontWeight:"bold",braceCursor:"pointer",ellipsisFontSize:"18px",ellipsisLineHeight:"10px",ellipsisCursor:"pointer",keyMargin:"0px 5px",keyLetterSpacing:"0.5px",keyFontStyle:"none",keyVerticalAlign:"top",keyOpacity:"0.85",keyOpacityHover:"1",keyValPaddingTop:"3px",keyValPaddingBottom:"3px",keyValPaddingRight:"5px",keyValBorderLeft:"1px solid",keyValBorderHover:"2px solid",pushedContentMarginLeft:"6px",variableValuePaddingRight:"6px",nullFontSize:"11px",nullFontWeight:"bold",nullPadding:"1px 2px",nullBorderRadius:"3px",nanFontSize:"11px",nanFontWeight:"bold",nanPadding:"1px 2px",nanBorderRadius:"3px",undefinedFontSize:"11px",undefinedPadding:"1px 2px",undefinedBorderRadius:"3px",dataTypeFontSize:"11px",dataTypeMarginRight:"4px",datatypeOpacity:"0.8",objectSizeBorderRadius:"3px",objectSizeFontStyle:"italic",objectSizeMargin:"0px 6px 0px 0px",clipboardCursor:"pointer",clipboardCheckMarginLeft:"-12px",metaDataPadding:"0px 0px 0px 10px",arrayGroupMetaPadding:"0px 0px 0px 4px",iconContainerWidth:"17px",tooltipPadding:"4px",editInputMinWidth:"130px",editInputBorderRadius:"2px",editInputPadding:"5px",editInputMarginRight:"4px",editInputFontFamily:"monospace",iconCursor:"pointer",iconFontSize:"15px",iconPaddingRight:"1px",dateValueMarginLeft:"2px",iconMarginRight:"3px",detectedRowPaddingTop:"3px",addKeyCoverBackground:"rgba(255, 255, 255, 0.3)",addKeyCoverPosition:"absolute",addKeyCoverPositionPx:"0px",addKeyModalWidth:"200px",addKeyModalMargin:"auto",addKeyModalPadding:"10px",addKeyModalRadius:"3px",commaColor:"#666",commaFontSize:"12px",commaMarginRight:"4px"};var z=l(742);const L=function(P){return P},Y=typeof uS=="object"&&uS&&uS.Object===Object&&uS;var I=typeof self=="object"&&self&&self.Object===Object&&self;const X=Y||I||Function("return this")(),J=X.Symbol;var he=Object.prototype,xe=he.hasOwnProperty,we=he.toString,je=J?J.toStringTag:void 0;const de=function(P){var $=xe.call(P,je),F=P[je];try{P[je]=void 0;var Z=!0}catch{}var fe=we.call(P);return Z&&($?P[je]=F:delete P[je]),fe};var se=Object.prototype.toString;const ye=function(P){return se.call(P)};var be=J?J.toStringTag:void 0;const Ae=function(P){return P==null?P===void 0?"[object Undefined]":"[object Null]":be&&be in Object(P)?de(P):ye(P)},Oe=function(P){var $=typeof P;return P!=null&&($=="object"||$=="function")},Ie=function(P){if(!Oe(P))return!1;var $=Ae(P);return $=="[object Function]"||$=="[object GeneratorFunction]"||$=="[object AsyncFunction]"||$=="[object Proxy]"},$e=X["__core-js_shared__"];var Ne,Ue=(Ne=/[^.]+$/.exec($e&&$e.keys&&$e.keys.IE_PROTO||""))?"Symbol(src)_1."+Ne:"";const Re=function(P){return!!Ue&&Ue in P};var Ze=Function.prototype.toString;const ot=function(P){if(P!=null){try{return Ze.call(P)}catch{}try{return P+""}catch{}}return""};var qe=/^\[object .+?Constructor\]$/,xn=Function.prototype,yn=Object.prototype,zn=xn.toString,Dt=yn.hasOwnProperty,Vt=RegExp("^"+zn.call(Dt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const hn=function(P){return!(!Oe(P)||Re(P))&&(Ie(P)?Vt:qe).test(ot(P))},Cn=function(P,$){return P?.[$]},_i=function(P,$){var F=Cn(P,$);return hn(F)?F:void 0};var kr=_i(X,"WeakMap");const Ht=kr&&new kr,Mn=Ht?function(P,$){return Ht.set(P,$),P}:L;var Pt=Object.create;const Gt=(function(){function P(){}return function($){if(!Oe($))return{};if(Pt)return Pt($);P.prototype=$;var F=new P;return P.prototype=void 0,F}})(),qn=function(P){return function(){var $=arguments;switch($.length){case 0:return new P;case 1:return new P($[0]);case 2:return new P($[0],$[1]);case 3:return new P($[0],$[1],$[2]);case 4:return new P($[0],$[1],$[2],$[3]);case 5:return new P($[0],$[1],$[2],$[3],$[4]);case 6:return new P($[0],$[1],$[2],$[3],$[4],$[5]);case 7:return new P($[0],$[1],$[2],$[3],$[4],$[5],$[6])}var F=Gt(P.prototype),Z=P.apply(F,$);return Oe(Z)?Z:F}},qr=function(P,$,F){var Z=1&$,fe=qn(P);return function Se(){return(this&&this!==X&&this instanceof Se?fe:P).apply(Z?F:this,arguments)}},pn=function(P,$,F){switch(F.length){case 0:return P.call($);case 1:return P.call($,F[0]);case 2:return P.call($,F[0],F[1]);case 3:return P.call($,F[0],F[1],F[2])}return P.apply($,F)};var dr=Math.max;const Rr=function(P,$,F,Z){for(var fe=-1,Se=P.length,_e=F.length,ge=-1,Te=$.length,Ce=dr(Se-_e,0),Ve=Array(Te+Ce),He=!Z;++ge<Te;)Ve[ge]=$[ge];for(;++fe<_e;)(He||fe<Se)&&(Ve[F[fe]]=P[fe]);for(;Ce--;)Ve[ge++]=P[fe++];return Ve};var Vn=Math.max;const Xr=function(P,$,F,Z){for(var fe=-1,Se=P.length,_e=-1,ge=F.length,Te=-1,Ce=$.length,Ve=Vn(Se-ge,0),He=Array(Ve+Ce),ut=!Z;++fe<Ve;)He[fe]=P[fe];for(var nt=fe;++Te<Ce;)He[nt+Te]=$[Te];for(;++_e<ge;)(ut||fe<Se)&&(He[nt+F[_e]]=P[fe++]);return He},Vr=function(P,$){for(var F=P.length,Z=0;F--;)P[F]===$&&++Z;return Z},oo=function(){};function Ua(P){this.__wrapped__=P,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}Ua.prototype=Gt(oo.prototype),Ua.prototype.constructor=Ua;const qa=Ua,aa=Ht?function(P){return Ht.get(P)}:function(){},At={};var On=Object.prototype.hasOwnProperty;const Fr=function(P){for(var $=P.name+"",F=At[$],Z=On.call(At,$)?F.length:0;Z--;){var fe=F[Z],Se=fe.func;if(Se==null||Se==P)return fe.name}return $};function hr(P,$){this.__wrapped__=P,this.__actions__=[],this.__chain__=!!$,this.__index__=0,this.__values__=void 0}hr.prototype=Gt(oo.prototype),hr.prototype.constructor=hr;const jn=hr,Ti=Array.isArray,Cs=function(P){return P!=null&&typeof P=="object"},Tl=function(P,$){var F=-1,Z=P.length;for($||($=Array(Z));++F<Z;)$[F]=P[F];return $},ca=function(P){if(P instanceof qa)return P.clone();var $=new jn(P.__wrapped__,P.__chain__);return $.__actions__=Tl(P.__actions__),$.__index__=P.__index__,$.__values__=P.__values__,$};var cn=Object.prototype.hasOwnProperty;function _n(P){if(Cs(P)&&!Ti(P)&&!(P instanceof qa)){if(P instanceof jn)return P;if(cn.call(P,"__wrapped__"))return ca(P)}return new jn(P)}_n.prototype=oo.prototype,_n.prototype.constructor=_n;const Ni=_n,su=function(P){var $=Fr(P),F=Ni[$];if(typeof F!="function"||!($ in qa.prototype))return!1;if(P===F)return!0;var Z=aa(F);return!!Z&&P===Z[0]};var Kg=Date.now;const em=function(P){var $=0,F=0;return function(){var Z=Kg(),fe=16-(Z-F);if(F=Z,fe>0){if(++$>=800)return arguments[0]}else $=0;return P.apply(void 0,arguments)}},Bc=em(Mn);var yo=/\{\n\/\* \[wrapped with (.+)\] \*/,lu=/,? & /;const zi=function(P){var $=P.match(yo);return $?$[1].split(lu):[]};var $i=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;const vo=function(P,$){var F=$.length;if(!F)return P;var Z=F-1;return $[Z]=(F>1?"& ":"")+$[Z],$=$.join(F>2?", ":" "),P.replace($i,`{
|
|
137
|
+
/* [wrapped with `+$+`] */
|
|
138
|
+
`)},Pi=function(P){return function(){return P}},Jt=(function(){try{var P=_i(Object,"defineProperty");return P({},"",{}),P}catch{}})(),Kf=em(Jt?function(P,$){return Jt(P,"toString",{configurable:!0,enumerable:!1,value:Pi($),writable:!0})}:L),Yf=function(P,$){for(var F=-1,Z=P==null?0:P.length;++F<Z&&$(P[F],F,P)!==!1;);return P},Va=function(P,$,F,Z){for(var fe=P.length,Se=F+-1;++Se<fe;)if($(P[Se],Se,P))return Se;return-1},Ii=function(P){return P!=P},Yg=function(P,$,F){for(var Z=F-1,fe=P.length;++Z<fe;)if(P[Z]===$)return Z;return-1},Zf=function(P,$,F){return $==$?Yg(P,$,F):Va(P,Ii,F)},Xf=function(P,$){return!!(P!=null&&P.length)&&Zf(P,$,0)>-1};var Zg=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];const Os=function(P,$){return Yf(Zg,function(F){var Z="_."+F[0];$&F[1]&&!Xf(P,Z)&&P.push(Z)}),P.sort()},ls=function(P,$,F){var Z=$+"";return Kf(P,vo(Z,Os(zi(Z),F)))},Br=function(P,$,F,Z,fe,Se,_e,ge,Te,Ce){var Ve=8&$;$|=Ve?32:64,4&($&=~(Ve?64:32))||($&=-4);var He=[P,$,fe,Ve?Se:void 0,Ve?_e:void 0,Ve?void 0:Se,Ve?void 0:_e,ge,Te,Ce],ut=F.apply(void 0,He);return su(P)&&Bc(ut,He),ut.placeholder=Z,ls(ut,P,$)},Xn=function(P){return P.placeholder};var Qf=/^(?:0|[1-9]\d*)$/;const Xg=function(P,$){var F=typeof P;return!!($=$??9007199254740991)&&(F=="number"||F!="symbol"&&Qf.test(P))&&P>-1&&P%1==0&&P<$};var uu=Math.min;const Wf=function(P,$){for(var F=P.length,Z=uu($.length,F),fe=Tl(P);Z--;){var Se=$[Z];P[Z]=Xg(Se,F)?fe[Se]:void 0}return P};var us="__lodash_placeholder__";const Hc=function(P,$){for(var F=-1,Z=P.length,fe=0,Se=[];++F<Z;){var _e=P[F];_e!==$&&_e!==us||(P[F]=us,Se[fe++]=F)}return Se},Qn=function P($,F,Z,fe,Se,_e,ge,Te,Ce,Ve){var He=128&F,ut=1&F,nt=2&F,mt=24&F,un=512&F,Ke=nt?void 0:qn($);return function _t(){for(var fn=arguments.length,Nt=Array(fn),Gr=fn;Gr--;)Nt[Gr]=arguments[Gr];if(mt)var Kr=Xn(_t),Dr=Vr(Nt,Kr);if(fe&&(Nt=Rr(Nt,fe,Se,mt)),_e&&(Nt=Xr(Nt,_e,ge,mt)),fn-=Dr,mt&&fn<Ve){var co=Hc(Nt,Kr);return Br($,F,P,_t.placeholder,Z,Nt,co,Te,Ce,Ve-fn)}var ha=ut?Z:this,Wn=nt?ha[$]:$;return fn=Nt.length,Te?Nt=Wf(Nt,Te):un&&fn>1&&Nt.reverse(),He&&Ce<fn&&(Nt.length=Ce),this&&this!==X&&this instanceof _t&&(Wn=Ke||qn(Wn)),Wn.apply(ha,Nt)}},cu=function(P,$,F){var Z=qn(P);return function fe(){for(var Se=arguments.length,_e=Array(Se),ge=Se,Te=Xn(fe);ge--;)_e[ge]=arguments[ge];var Ce=Se<3&&_e[0]!==Te&&_e[Se-1]!==Te?[]:Hc(_e,Te);return(Se-=Ce.length)<F?Br(P,$,Qn,fe.placeholder,void 0,_e,Ce,void 0,void 0,F-Se):pn(this&&this!==X&&this instanceof fe?Z:P,this,_e)}},Jf=function(P,$,F,Z){var fe=1&$,Se=qn(P);return function _e(){for(var ge=-1,Te=arguments.length,Ce=-1,Ve=Z.length,He=Array(Ve+Te),ut=this&&this!==X&&this instanceof _e?Se:P;++Ce<Ve;)He[Ce]=Z[Ce];for(;Te--;)He[Ce++]=arguments[++ge];return pn(ut,fe?F:this,He)}};var Cl="__lodash_placeholder__",Fa=128,ed=Math.min;const td=function(P,$){var F=P[1],Z=$[1],fe=F|Z,Se=fe<131,_e=Z==Fa&&F==8||Z==Fa&&F==256&&P[7].length<=$[8]||Z==384&&$[7].length<=$[8]&&F==8;if(!Se&&!_e)return P;1&Z&&(P[2]=$[2],fe|=1&F?0:4);var ge=$[3];if(ge){var Te=P[3];P[3]=Te?Rr(Te,ge,$[4]):ge,P[4]=Te?Hc(P[3],Cl):$[4]}return(ge=$[5])&&(Te=P[5],P[5]=Te?Xr(Te,ge,$[6]):ge,P[6]=Te?Hc(P[5],Cl):$[6]),(ge=$[7])&&(P[7]=ge),Z&Fa&&(P[8]=P[8]==null?$[8]:ed(P[8],$[8])),P[9]==null&&(P[9]=$[9]),P[0]=$[0],P[1]=fe,P};var Li=/\s/;const Qg=function(P){for(var $=P.length;$--&&Li.test(P.charAt($)););return $};var nd=/^\s+/;const rd=function(P){return P&&P.slice(0,Qg(P)+1).replace(nd,"")},fu=function(P){return typeof P=="symbol"||Cs(P)&&Ae(P)=="[object Symbol]"};var Wg=/^[-+]0x[0-9a-f]+$/i,Jg=/^0b[01]+$/i,Rs=/^0o[0-7]+$/i,Qr=parseInt;const du=function(P){if(typeof P=="number")return P;if(fu(P))return NaN;if(Oe(P)){var $=typeof P.valueOf=="function"?P.valueOf():P;P=Oe($)?$+"":$}if(typeof P!="string")return P===0?P:+P;P=rd(P);var F=Jg.test(P);return F||Rs.test(P)?Qr(P.slice(2),F?2:8):Wg.test(P)?NaN:+P};var hu=1/0;const Ui=function(P){return P?(P=du(P))===hu||P===-1/0?17976931348623157e292*(P<0?-1:1):P==P?P:0:P===0?P:0},Ci=function(P){var $=Ui(P),F=$%1;return $==$?F?$-F:$:0};var Gc=Math.max;const pu=function(P,$,F,Z,fe,Se,_e,ge){var Te=2&$;if(!Te&&typeof P!="function")throw new TypeError("Expected a function");var Ce=Z?Z.length:0;if(Ce||($&=-97,Z=fe=void 0),_e=_e===void 0?_e:Gc(Ci(_e),0),ge=ge===void 0?ge:Ci(ge),Ce-=fe?fe.length:0,64&$){var Ve=Z,He=fe;Z=fe=void 0}var ut=Te?void 0:aa(P),nt=[P,$,F,Z,fe,Ve,He,Se,_e,ge];if(ut&&td(nt,ut),P=nt[0],$=nt[1],F=nt[2],Z=nt[3],fe=nt[4],!(ge=nt[9]=nt[9]===void 0?Te?0:P.length:Gc(nt[9]-Ce,0))&&24&$&&($&=-25),$&&$!=1)mt=$==8||$==16?cu(P,$,ge):$!=32&&$!=33||fe.length?Qn.apply(void 0,nt):Jf(P,$,F,Z);else var mt=qr(P,$,F);return ls((ut?Mn:Bc)(mt,nt),P,$)};function mu(P,$,F){var Z=pu(P,8,void 0,void 0,void 0,void 0,void 0,$=F?void 0:$);return Z.placeholder=mu.placeholder,Z}mu.placeholder={};const so=mu,Hr={threezerotwofour:{scheme:"threezerotwofour",author:"jan t. sott (http://github.com/idleberg)",base00:"#090300",base01:"#3a3432",base02:"#4a4543",base03:"#5c5855",base04:"#807d7c",base05:"#a5a2a2",base06:"#d6d5d4",base07:"#f7f7f7",base08:"#db2d20",base09:"#e8bbd0",base0A:"#fded02",base0B:"#01a252",base0C:"#b5e4f4",base0D:"#01a0e4",base0E:"#a16a94",base0F:"#cdab53"},apathy:{scheme:"apathy",author:"jannik siebert (https://github.com/janniks)",base00:"#031A16",base01:"#0B342D",base02:"#184E45",base03:"#2B685E",base04:"#5F9C92",base05:"#81B5AC",base06:"#A7CEC8",base07:"#D2E7E4",base08:"#3E9688",base09:"#3E7996",base0A:"#3E4C96",base0B:"#883E96",base0C:"#963E4C",base0D:"#96883E",base0E:"#4C963E",base0F:"#3E965B"},ashes:{scheme:"ashes",author:"jannik siebert (https://github.com/janniks)",base00:"#1C2023",base01:"#393F45",base02:"#565E65",base03:"#747C84",base04:"#ADB3BA",base05:"#C7CCD1",base06:"#DFE2E5",base07:"#F3F4F5",base08:"#C7AE95",base09:"#C7C795",base0A:"#AEC795",base0B:"#95C7AE",base0C:"#95AEC7",base0D:"#AE95C7",base0E:"#C795AE",base0F:"#C79595"},atelierDune:{scheme:"atelier dune",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)",base00:"#20201d",base01:"#292824",base02:"#6e6b5e",base03:"#7d7a68",base04:"#999580",base05:"#a6a28c",base06:"#e8e4cf",base07:"#fefbec",base08:"#d73737",base09:"#b65611",base0A:"#cfb017",base0B:"#60ac39",base0C:"#1fad83",base0D:"#6684e1",base0E:"#b854d4",base0F:"#d43552"},atelierForest:{scheme:"atelier forest",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)",base00:"#1b1918",base01:"#2c2421",base02:"#68615e",base03:"#766e6b",base04:"#9c9491",base05:"#a8a19f",base06:"#e6e2e0",base07:"#f1efee",base08:"#f22c40",base09:"#df5320",base0A:"#d5911a",base0B:"#5ab738",base0C:"#00ad9c",base0D:"#407ee7",base0E:"#6666ea",base0F:"#c33ff3"},atelierHeath:{scheme:"atelier heath",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)",base00:"#1b181b",base01:"#292329",base02:"#695d69",base03:"#776977",base04:"#9e8f9e",base05:"#ab9bab",base06:"#d8cad8",base07:"#f7f3f7",base08:"#ca402b",base09:"#a65926",base0A:"#bb8a35",base0B:"#379a37",base0C:"#159393",base0D:"#516aec",base0E:"#7b59c0",base0F:"#cc33cc"},atelierLakeside:{scheme:"atelier lakeside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)",base00:"#161b1d",base01:"#1f292e",base02:"#516d7b",base03:"#5a7b8c",base04:"#7195a8",base05:"#7ea2b4",base06:"#c1e4f6",base07:"#ebf8ff",base08:"#d22d72",base09:"#935c25",base0A:"#8a8a0f",base0B:"#568c3b",base0C:"#2d8f6f",base0D:"#257fad",base0E:"#5d5db1",base0F:"#b72dd2"},atelierSeaside:{scheme:"atelier seaside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)",base00:"#131513",base01:"#242924",base02:"#5e6e5e",base03:"#687d68",base04:"#809980",base05:"#8ca68c",base06:"#cfe8cf",base07:"#f0fff0",base08:"#e6193c",base09:"#87711d",base0A:"#c3c322",base0B:"#29a329",base0C:"#1999b3",base0D:"#3d62f5",base0E:"#ad2bee",base0F:"#e619c3"},bespin:{scheme:"bespin",author:"jan t. sott",base00:"#28211c",base01:"#36312e",base02:"#5e5d5c",base03:"#666666",base04:"#797977",base05:"#8a8986",base06:"#9d9b97",base07:"#baae9e",base08:"#cf6a4c",base09:"#cf7d34",base0A:"#f9ee98",base0B:"#54be0d",base0C:"#afc4db",base0D:"#5ea6ea",base0E:"#9b859d",base0F:"#937121"},brewer:{scheme:"brewer",author:"timothée poisot (http://github.com/tpoisot)",base00:"#0c0d0e",base01:"#2e2f30",base02:"#515253",base03:"#737475",base04:"#959697",base05:"#b7b8b9",base06:"#dadbdc",base07:"#fcfdfe",base08:"#e31a1c",base09:"#e6550d",base0A:"#dca060",base0B:"#31a354",base0C:"#80b1d3",base0D:"#3182bd",base0E:"#756bb1",base0F:"#b15928"},bright:{scheme:"bright",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#303030",base02:"#505050",base03:"#b0b0b0",base04:"#d0d0d0",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ffffff",base08:"#fb0120",base09:"#fc6d24",base0A:"#fda331",base0B:"#a1c659",base0C:"#76c7b7",base0D:"#6fb3d2",base0E:"#d381c3",base0F:"#be643c"},chalk:{scheme:"chalk",author:"chris kempson (http://chriskempson.com)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#f5f5f5",base08:"#fb9fb1",base09:"#eda987",base0A:"#ddb26f",base0B:"#acc267",base0C:"#12cfc0",base0D:"#6fc2ef",base0E:"#e1a3ee",base0F:"#deaf8f"},codeschool:{scheme:"codeschool",author:"brettof86",base00:"#232c31",base01:"#1c3657",base02:"#2a343a",base03:"#3f4944",base04:"#84898c",base05:"#9ea7a6",base06:"#a7cfa3",base07:"#b5d8f6",base08:"#2a5491",base09:"#43820d",base0A:"#a03b1e",base0B:"#237986",base0C:"#b02f30",base0D:"#484d79",base0E:"#c59820",base0F:"#c98344"},colors:{scheme:"colors",author:"mrmrs (http://clrs.cc)",base00:"#111111",base01:"#333333",base02:"#555555",base03:"#777777",base04:"#999999",base05:"#bbbbbb",base06:"#dddddd",base07:"#ffffff",base08:"#ff4136",base09:"#ff851b",base0A:"#ffdc00",base0B:"#2ecc40",base0C:"#7fdbff",base0D:"#0074d9",base0E:"#b10dc9",base0F:"#85144b"},default:{scheme:"default",author:"chris kempson (http://chriskempson.com)",base00:"#181818",base01:"#282828",base02:"#383838",base03:"#585858",base04:"#b8b8b8",base05:"#d8d8d8",base06:"#e8e8e8",base07:"#f8f8f8",base08:"#ab4642",base09:"#dc9656",base0A:"#f7ca88",base0B:"#a1b56c",base0C:"#86c1b9",base0D:"#7cafc2",base0E:"#ba8baf",base0F:"#a16946"},eighties:{scheme:"eighties",author:"chris kempson (http://chriskempson.com)",base00:"#2d2d2d",base01:"#393939",base02:"#515151",base03:"#747369",base04:"#a09f93",base05:"#d3d0c8",base06:"#e8e6df",base07:"#f2f0ec",base08:"#f2777a",base09:"#f99157",base0A:"#ffcc66",base0B:"#99cc99",base0C:"#66cccc",base0D:"#6699cc",base0E:"#cc99cc",base0F:"#d27b53"},embers:{scheme:"embers",author:"jannik siebert (https://github.com/janniks)",base00:"#16130F",base01:"#2C2620",base02:"#433B32",base03:"#5A5047",base04:"#8A8075",base05:"#A39A90",base06:"#BEB6AE",base07:"#DBD6D1",base08:"#826D57",base09:"#828257",base0A:"#6D8257",base0B:"#57826D",base0C:"#576D82",base0D:"#6D5782",base0E:"#82576D",base0F:"#825757"},flat:{scheme:"flat",author:"chris kempson (http://chriskempson.com)",base00:"#2C3E50",base01:"#34495E",base02:"#7F8C8D",base03:"#95A5A6",base04:"#BDC3C7",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ECF0F1",base08:"#E74C3C",base09:"#E67E22",base0A:"#F1C40F",base0B:"#2ECC71",base0C:"#1ABC9C",base0D:"#3498DB",base0E:"#9B59B6",base0F:"#be643c"},google:{scheme:"google",author:"seth wright (http://sethawright.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#CC342B",base09:"#F96A38",base0A:"#FBA922",base0B:"#198844",base0C:"#3971ED",base0D:"#3971ED",base0E:"#A36AC7",base0F:"#3971ED"},grayscale:{scheme:"grayscale",author:"alexandre gavioli (https://github.com/alexx2/)",base00:"#101010",base01:"#252525",base02:"#464646",base03:"#525252",base04:"#ababab",base05:"#b9b9b9",base06:"#e3e3e3",base07:"#f7f7f7",base08:"#7c7c7c",base09:"#999999",base0A:"#a0a0a0",base0B:"#8e8e8e",base0C:"#868686",base0D:"#686868",base0E:"#747474",base0F:"#5e5e5e"},greenscreen:{scheme:"green screen",author:"chris kempson (http://chriskempson.com)",base00:"#001100",base01:"#003300",base02:"#005500",base03:"#007700",base04:"#009900",base05:"#00bb00",base06:"#00dd00",base07:"#00ff00",base08:"#007700",base09:"#009900",base0A:"#007700",base0B:"#00bb00",base0C:"#005500",base0D:"#009900",base0E:"#00bb00",base0F:"#005500"},harmonic:{scheme:"harmonic16",author:"jannik siebert (https://github.com/janniks)",base00:"#0b1c2c",base01:"#223b54",base02:"#405c79",base03:"#627e99",base04:"#aabcce",base05:"#cbd6e2",base06:"#e5ebf1",base07:"#f7f9fb",base08:"#bf8b56",base09:"#bfbf56",base0A:"#8bbf56",base0B:"#56bf8b",base0C:"#568bbf",base0D:"#8b56bf",base0E:"#bf568b",base0F:"#bf5656"},hopscotch:{scheme:"hopscotch",author:"jan t. sott",base00:"#322931",base01:"#433b42",base02:"#5c545b",base03:"#797379",base04:"#989498",base05:"#b9b5b8",base06:"#d5d3d5",base07:"#ffffff",base08:"#dd464c",base09:"#fd8b19",base0A:"#fdcc59",base0B:"#8fc13e",base0C:"#149b93",base0D:"#1290bf",base0E:"#c85e7c",base0F:"#b33508"},isotope:{scheme:"isotope",author:"jan t. sott",base00:"#000000",base01:"#404040",base02:"#606060",base03:"#808080",base04:"#c0c0c0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#ff0000",base09:"#ff9900",base0A:"#ff0099",base0B:"#33ff00",base0C:"#00ffff",base0D:"#0066ff",base0E:"#cc00ff",base0F:"#3300ff"},marrakesh:{scheme:"marrakesh",author:"alexandre gavioli (http://github.com/alexx2/)",base00:"#201602",base01:"#302e00",base02:"#5f5b17",base03:"#6c6823",base04:"#86813b",base05:"#948e48",base06:"#ccc37a",base07:"#faf0a5",base08:"#c35359",base09:"#b36144",base0A:"#a88339",base0B:"#18974e",base0C:"#75a738",base0D:"#477ca1",base0E:"#8868b3",base0F:"#b3588e"},mocha:{scheme:"mocha",author:"chris kempson (http://chriskempson.com)",base00:"#3B3228",base01:"#534636",base02:"#645240",base03:"#7e705a",base04:"#b8afad",base05:"#d0c8c6",base06:"#e9e1dd",base07:"#f5eeeb",base08:"#cb6077",base09:"#d28b71",base0A:"#f4bc87",base0B:"#beb55b",base0C:"#7bbda4",base0D:"#8ab3b5",base0E:"#a89bb9",base0F:"#bb9584"},monokai:{scheme:"monokai",author:"wimer hazenberg (http://www.monokai.nl)",base00:"#272822",base01:"#383830",base02:"#49483e",base03:"#75715e",base04:"#a59f85",base05:"#f8f8f2",base06:"#f5f4f1",base07:"#f9f8f5",base08:"#f92672",base09:"#fd971f",base0A:"#f4bf75",base0B:"#a6e22e",base0C:"#a1efe4",base0D:"#66d9ef",base0E:"#ae81ff",base0F:"#cc6633"},nicinabox:{scheme:"nicinabox",author:"nicinabox (http://github.com/nicinabox)",base00:"#2A2F3A",base01:"#3C444F",base02:"#4F5A65",base03:"#BEBEBE",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#FFFFFF",base07:"#f5f5f5",base08:"#fb9fb1",base09:"#FC6D24",base0A:"#ddb26f",base0B:"#A1C659",base0C:"#12cfc0",base0D:"#6FB3D2",base0E:"#D381C3",base0F:"#deaf8f"},ocean:{scheme:"ocean",author:"chris kempson (http://chriskempson.com)",base00:"#2b303b",base01:"#343d46",base02:"#4f5b66",base03:"#65737e",base04:"#a7adba",base05:"#c0c5ce",base06:"#dfe1e8",base07:"#eff1f5",base08:"#bf616a",base09:"#d08770",base0A:"#ebcb8b",base0B:"#a3be8c",base0C:"#96b5b4",base0D:"#8fa1b3",base0E:"#b48ead",base0F:"#ab7967"},paraiso:{scheme:"paraiso",author:"jan t. sott",base00:"#2f1e2e",base01:"#41323f",base02:"#4f424c",base03:"#776e71",base04:"#8d8687",base05:"#a39e9b",base06:"#b9b6b0",base07:"#e7e9db",base08:"#ef6155",base09:"#f99b15",base0A:"#fec418",base0B:"#48b685",base0C:"#5bc4bf",base0D:"#06b6ef",base0E:"#815ba4",base0F:"#e96ba8"},pop:{scheme:"pop",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#eb008a",base09:"#f29333",base0A:"#f8ca12",base0B:"#37b349",base0C:"#00aabb",base0D:"#0e5a94",base0E:"#b31e8d",base0F:"#7a2d00"},railscasts:{scheme:"railscasts",author:"ryan bates (http://railscasts.com)",base00:"#2b2b2b",base01:"#272935",base02:"#3a4055",base03:"#5a647e",base04:"#d4cfc9",base05:"#e6e1dc",base06:"#f4f1ed",base07:"#f9f7f3",base08:"#da4939",base09:"#cc7833",base0A:"#ffc66d",base0B:"#a5c261",base0C:"#519f50",base0D:"#6d9cbe",base0E:"#b6b3eb",base0F:"#bc9458"},shapeshifter:{scheme:"shapeshifter",author:"tyler benziger (http://tybenz.com)",base00:"#000000",base01:"#040404",base02:"#102015",base03:"#343434",base04:"#555555",base05:"#ababab",base06:"#e0e0e0",base07:"#f9f9f9",base08:"#e92f2f",base09:"#e09448",base0A:"#dddd13",base0B:"#0ed839",base0C:"#23edda",base0D:"#3b48e3",base0E:"#f996e2",base0F:"#69542d"},solarized:{scheme:"solarized",author:"ethan schoonover (http://ethanschoonover.com/solarized)",base00:"#002b36",base01:"#073642",base02:"#586e75",base03:"#657b83",base04:"#839496",base05:"#93a1a1",base06:"#eee8d5",base07:"#fdf6e3",base08:"#dc322f",base09:"#cb4b16",base0A:"#b58900",base0B:"#859900",base0C:"#2aa198",base0D:"#268bd2",base0E:"#6c71c4",base0F:"#d33682"},summerfruit:{scheme:"summerfruit",author:"christopher corley (http://cscorley.github.io/)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#B0B0B0",base05:"#D0D0D0",base06:"#E0E0E0",base07:"#FFFFFF",base08:"#FF0086",base09:"#FD8900",base0A:"#ABA800",base0B:"#00C918",base0C:"#1faaaa",base0D:"#3777E6",base0E:"#AD00A1",base0F:"#cc6633"},tomorrow:{scheme:"tomorrow",author:"chris kempson (http://chriskempson.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#cc6666",base09:"#de935f",base0A:"#f0c674",base0B:"#b5bd68",base0C:"#8abeb7",base0D:"#81a2be",base0E:"#b294bb",base0F:"#a3685a"},tube:{scheme:"london tube",author:"jan t. sott",base00:"#231f20",base01:"#1c3f95",base02:"#5a5758",base03:"#737171",base04:"#959ca1",base05:"#d9d8d8",base06:"#e7e7e8",base07:"#ffffff",base08:"#ee2e24",base09:"#f386a1",base0A:"#ffd204",base0B:"#00853e",base0C:"#85cebc",base0D:"#009ddc",base0E:"#98005d",base0F:"#b06110"},twilight:{scheme:"twilight",author:"david hart (http://hart-dev.com)",base00:"#1e1e1e",base01:"#323537",base02:"#464b50",base03:"#5f5a60",base04:"#838184",base05:"#a7a7a7",base06:"#c3c3c3",base07:"#ffffff",base08:"#cf6a4c",base09:"#cda869",base0A:"#f9ee98",base0B:"#8f9d6a",base0C:"#afc4db",base0D:"#7587a6",base0E:"#9b859d",base0F:"#9b703f"}},Ol=Hr.default,lo=Object.keys(Ol),fa=P=>{const $=z(P),[F,Z,fe]=(function(ge){const Te=ge[0]/255,Ce=ge[1]/255,Ve=ge[2]/255;return[.299*Te+.587*Ce+.114*Ve,-.14713*Te+-.28886*Ce+.436*Ve,.615*Te+-.51499*Ce+-.10001*Ve]})($.array());var Se;const _e=(function(ge){const Te=ge[0],Ce=ge[1],Ve=ge[2];let He,ut,nt;return He=1*Te+0*Ce+1.13983*Ve,ut=1*Te+-.39465*Ce+-.5806*Ve,nt=1*Te+2.02311*Ce+0*Ve,He=Math.min(Math.max(0,He),1),ut=Math.min(Math.max(0,ut),1),nt=Math.min(Math.max(0,nt),1),[255*He,255*ut,255*nt]})([(Se=F,Se<.25?1:Se<.5?.9-Se:1.1-Se),Z,fe]);return z.rgb(_e).hex()},uo=P=>$=>({className:[$.className,P.className].filter(Boolean).join(" "),style:{...$.style||{},...P.style||{}}}),As=(P,$)=>{const F=Object.keys($);for(const Z in P)F.indexOf(Z)===-1&&F.push(Z);return F.reduce((Z,fe)=>(Z[fe]=((Se,_e)=>{if(Se===void 0)return _e;if(_e===void 0)return Se;const ge=typeof _e;switch(typeof Se){case"string":switch(ge){case"string":return[_e,Se].filter(Boolean).join(" ");case"object":return uo({className:Se,style:_e});case"function":return(Te,...Ce)=>uo({className:Se})(_e(Te,...Ce))}break;case"object":switch(ge){case"string":return uo({className:_e,style:Se});case"object":return{..._e,...Se};case"function":return(Te,...Ce)=>uo({style:Se})(_e(Te,...Ce))}break;case"function":switch(ge){case"string":return(Te,...Ce)=>Se(uo(Te)({className:_e}),...Ce);case"object":return(Te,...Ce)=>Se(uo(Te)({style:_e}),...Ce);case"function":return(Te,...Ce)=>Se(_e(Te,...Ce),...Ce)}}})(P[fe],$[fe]),Z),{})},ad=(P,$,...F)=>{if($===null)return P;Array.isArray($)||($=[$]);const Z=$.map(fe=>P[fe]).filter(Boolean).reduce((fe,Se)=>(typeof Se=="string"?fe.className=[fe.className,Se].filter(Boolean).join(" "):typeof Se=="object"?fe.style={...fe.style,...Se}:typeof Se=="function"&&(fe={...fe,...Se(fe,...F)}),fe),{className:"",style:{}});return Z.className||delete Z.className,Object.keys(Z.style).length===0&&delete Z.style,Z},Ms=P=>Object.keys(P).reduce(($,F)=>($[F]=/^base/.test(F)?fa(P[F]):F==="scheme"?P[F]+":inverted":P[F],$),{}),js=so((P,$={},F={},...Z)=>{const{defaultBase16:fe=Ol,base16Themes:Se=null}=$,_e=kn(F,Se);_e&&(F={..._e,...F});const ge=lo.reduce((He,ut)=>(He[ut]=F[ut]||fe[ut],He),{}),Te=Object.keys(F).reduce((He,ut)=>(lo.indexOf(ut)===-1&&(He[ut]=F[ut]),He),{}),Ce=P(ge),Ve=As(Te,Ce);return so(ad,2)(Ve,...Z)},3),id=P=>!!P.extend,kn=(P,$)=>{if(P&&id(P)&&P.extend&&(P=P.extend),typeof P=="string"){const[F,Z]=P.split(":");P=$?$[F]:Hr[F],Z==="inverted"&&(P=Ms(P))}return P&&Object.prototype.hasOwnProperty.call(P,"base00")?P:void 0};var Ba=function(P){var $=(function(F){return{backgroundColor:F.base00,ellipsisColor:F.base09,braceColor:F.base07,expandedIcon:F.base0D,collapsedIcon:F.base0E,keyColor:F.base07,arrayKeyColor:F.base0C,objectSize:F.base04,copyToClipboard:F.base0F,copyToClipboardCheck:F.base0D,objectBorder:F.base02,dataTypes:{boolean:F.base0E,date:F.base0D,float:F.base0B,function:F.base0D,integer:F.base0F,string:F.base09,nan:F.base08,null:F.base0A,undefined:F.base05,regexp:F.base0A,background:F.base02,bigNumber:F.base09},editVariable:{editIcon:F.base0E,cancelIcon:F.base09,removeIcon:F.base09,addIcon:F.base0E,checkIcon:F.base0E,background:F.base01,color:F.base0A,border:F.base07},addKeyModal:{background:F.base05,border:F.base04,color:F.base0A,labelColor:F.base01},validationFailure:{background:F.base09,iconColor:F.base01,fontColor:F.base01}}})(P);return{"app-container":{fontFamily:Q.globalFontFamily,cursor:Q.globalCursor,backgroundColor:$.backgroundColor,position:"relative"},ellipsis:{display:"inline-block",color:$.ellipsisColor,fontSize:Q.ellipsisFontSize,lineHeight:Q.ellipsisLineHeight,cursor:Q.ellipsisCursor},"brace-row":{display:"inline-block",cursor:"pointer"},brace:{display:"inline-block",cursor:Q.braceCursor,fontWeight:Q.braceFontWeight,color:$.braceColor},"expanded-icon":{color:$.expandedIcon},"collapsed-icon":{color:$.collapsedIcon},colon:{display:"inline-block",margin:Q.keyMargin,color:$.keyColor,verticalAlign:"top"},objectKeyVal:function(F,Z){return{style:g({paddingTop:Q.keyValPaddingTop,paddingRight:Q.keyValPaddingRight,paddingBottom:Q.keyValPaddingBottom,borderLeft:Q.keyValBorderLeft+" "+$.objectBorder,":hover":{paddingLeft:Z.paddingLeft-1+"px",borderLeft:Q.keyValBorderHover+" "+$.objectBorder}},Z)}},"object-key-val-no-border":{padding:Q.keyValPadding},"pushed-content":{marginLeft:Q.pushedContentMarginLeft},variableValue:function(F,Z){return{style:g({display:"inline-block",paddingRight:Q.variableValuePaddingRight,position:"relative"},Z)}},"object-name":{display:"inline-block",color:$.keyColor,letterSpacing:Q.keyLetterSpacing,fontStyle:Q.keyFontStyle,verticalAlign:Q.keyVerticalAlign,opacity:Q.keyOpacity,":hover":{opacity:Q.keyOpacityHover}},"array-key":{display:"inline-block",color:$.arrayKeyColor,letterSpacing:Q.keyLetterSpacing,fontStyle:Q.keyFontStyle,verticalAlign:Q.keyVerticalAlign,opacity:Q.keyOpacity,":hover":{opacity:Q.keyOpacityHover}},"object-size":{color:$.objectSize,borderRadius:Q.objectSizeBorderRadius,fontStyle:Q.objectSizeFontStyle,margin:Q.objectSizeMargin,cursor:"default"},"data-type-label":{fontSize:Q.dataTypeFontSize,marginRight:Q.dataTypeMarginRight,opacity:Q.datatypeOpacity},boolean:{display:"inline-block",color:$.dataTypes.boolean},date:{display:"inline-block",color:$.dataTypes.date},"date-value":{marginLeft:Q.dateValueMarginLeft},float:{display:"inline-block",color:$.dataTypes.float},function:{display:"inline-block",color:$.dataTypes.function,cursor:"pointer",whiteSpace:"pre-line"},"function-value":{fontStyle:"italic"},integer:{display:"inline-block",color:$.dataTypes.integer},bigNumber:{display:"inline-block",color:$.dataTypes.bigNumber},string:{display:"inline-block",color:$.dataTypes.string},nan:{display:"inline-block",color:$.dataTypes.nan,fontSize:Q.nanFontSize,fontWeight:Q.nanFontWeight,backgroundColor:$.dataTypes.background,padding:Q.nanPadding,borderRadius:Q.nanBorderRadius},null:{display:"inline-block",color:$.dataTypes.null,fontSize:Q.nullFontSize,fontWeight:Q.nullFontWeight,backgroundColor:$.dataTypes.background,padding:Q.nullPadding,borderRadius:Q.nullBorderRadius},undefined:{display:"inline-block",color:$.dataTypes.undefined,fontSize:Q.undefinedFontSize,padding:Q.undefinedPadding,borderRadius:Q.undefinedBorderRadius,backgroundColor:$.dataTypes.background},regexp:{display:"inline-block",color:$.dataTypes.regexp},"copy-to-clipboard":{cursor:Q.clipboardCursor},"copy-icon":{color:$.copyToClipboard,fontSize:Q.iconFontSize,marginRight:Q.iconMarginRight,verticalAlign:"top"},"copy-icon-copied":{color:$.copyToClipboardCheck,marginLeft:Q.clipboardCheckMarginLeft},"array-group-meta-data":{display:"inline-block",padding:Q.arrayGroupMetaPadding},"object-meta-data":{display:"inline-block",padding:Q.metaDataPadding},"icon-container":{display:"inline-block",width:Q.iconContainerWidth},tooltip:{padding:Q.tooltipPadding},removeVarIcon:{verticalAlign:"top",display:"inline-block",color:$.editVariable.removeIcon,cursor:Q.iconCursor,fontSize:Q.iconFontSize,marginRight:Q.iconMarginRight},addVarIcon:{verticalAlign:"top",display:"inline-block",color:$.editVariable.addIcon,cursor:Q.iconCursor,fontSize:Q.iconFontSize,marginRight:Q.iconMarginRight},editVarIcon:{verticalAlign:"top",display:"inline-block",color:$.editVariable.editIcon,cursor:Q.iconCursor,fontSize:Q.iconFontSize,marginRight:Q.iconMarginRight},"edit-icon-container":{display:"inline-block",verticalAlign:"top"},"check-icon":{display:"inline-block",cursor:Q.iconCursor,color:$.editVariable.checkIcon,fontSize:Q.iconFontSize,paddingRight:Q.iconPaddingRight},"cancel-icon":{display:"inline-block",cursor:Q.iconCursor,color:$.editVariable.cancelIcon,fontSize:Q.iconFontSize,paddingRight:Q.iconPaddingRight},"edit-input":{display:"inline-block",minWidth:Q.editInputMinWidth,borderRadius:Q.editInputBorderRadius,backgroundColor:$.editVariable.background,color:$.editVariable.color,padding:Q.editInputPadding,marginRight:Q.editInputMarginRight,fontFamily:Q.editInputFontFamily},"detected-row":{paddingTop:Q.detectedRowPaddingTop},"key-modal-request":{position:Q.addKeyCoverPosition,top:Q.addKeyCoverPositionPx,left:Q.addKeyCoverPositionPx,right:Q.addKeyCoverPositionPx,bottom:Q.addKeyCoverPositionPx,backgroundColor:Q.addKeyCoverBackground},"key-modal":{width:Q.addKeyModalWidth,backgroundColor:$.addKeyModal.background,marginLeft:Q.addKeyModalMargin,marginRight:Q.addKeyModalMargin,padding:Q.addKeyModalPadding,borderRadius:Q.addKeyModalRadius,marginTop:"15px",position:"relative"},"key-modal-label":{color:$.addKeyModal.labelColor,marginLeft:"2px",marginBottom:"5px",fontSize:"11px"},"key-modal-input-container":{overflow:"hidden"},"key-modal-input":{width:"100%",padding:"3px 6px",fontFamily:"monospace",color:$.addKeyModal.color,border:"none",boxSizing:"border-box",borderRadius:"2px"},"key-modal-cancel":{backgroundColor:$.editVariable.removeIcon,position:"absolute",top:"0px",right:"0px",borderRadius:"0px 3px 0px 3px",cursor:"pointer"},"key-modal-cancel-icon":{color:$.addKeyModal.labelColor,fontSize:Q.iconFontSize,transform:"rotate(45deg)"},"key-modal-submit":{color:$.editVariable.addIcon,fontSize:Q.iconFontSize,position:"absolute",right:"2px",top:"3px",cursor:"pointer"},"function-ellipsis":{display:"inline-block",color:$.ellipsisColor,fontSize:Q.ellipsisFontSize,lineHeight:Q.ellipsisLineHeight,cursor:Q.ellipsisCursor},"validation-failure":{float:"right",padding:"3px 6px",borderRadius:"2px",cursor:"pointer",color:$.validationFailure.fontColor,backgroundColor:$.validationFailure.background},"validation-failure-label":{marginRight:"6px"},"validation-failure-clear":{position:"relative",verticalAlign:"top",cursor:"pointer",color:$.validationFailure.iconColor,fontSize:Q.iconFontSize,transform:"rotate(45deg)"},comma:{display:"inline-block",color:Q.commaColor,fontSize:Q.commaFontSize,marginRight:Q.commaMarginRight,cursor:"default"}}};function Fe(P,$,F){return P||console.error("theme has not been set"),(function(Z){var fe=re;return Z!==!1&&Z!=="none"||(fe=ue),js(Ba,{defaultBase16:fe})(Z)})(P)($,F)}var ia=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=F.typeName,fe=F.displayDataTypes,Se=F.theme;return fe?O().createElement("span",Object.assign({className:"data-type-label"},Fe(Se,"data-type-label")),Z):null}}])})(O().PureComponent),tm=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props;return O().createElement("div",Fe(F.theme,"boolean"),O().createElement(ia,Object.assign({typeName:"bool"},F)),F.value?"true":"false")}}])})(O().PureComponent),Rl=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props;return O().createElement("div",Fe(F.theme,"date"),O().createElement(ia,Object.assign({typeName:"date"},F)),O().createElement("span",Object.assign({className:"date-value"},Fe(F.theme,"date-value")),F.value.toLocaleTimeString("en-us",{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})))}}])})(O().PureComponent),Al=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props;return O().createElement("div",Fe(F.theme,"float"),O().createElement(ia,Object.assign({typeName:"float"},F)),this.props.value)}}])})(O().PureComponent),bo=l(784),ks=(function(){return b(function P(){v(this,P),this.handler=function(){}},[{key:"register",value:function(P){this.handler=P}},{key:"dispatch",value:function(P){var $;($=this.handler)===null||$===void 0||$.call(this,P)}}])})();globalThis.__globalDispatcherInstance||(globalThis.__globalDispatcherInstance=new ks);const Oi=globalThis.__globalDispatcherInstance;var od="updated_src",sd=new((function(P){function $(){var F;v(this,$);for(var Z=arguments.length,fe=new Array(Z),Se=0;Se<Z;Se++)fe[Se]=arguments[Se];return(F=E(this,$,[].concat(fe))).objects={},F.set=function(_e,ge,Te,Ce){F.objects[_e]===void 0&&(F.objects[_e]={}),F.objects[_e][ge]===void 0&&(F.objects[_e][ge]={}),F.objects[_e][ge][Te]=Ce},F.get=function(_e,ge,Te,Ce){return F.objects[_e]===void 0||F.objects[_e][ge]===void 0||F.objects[_e][ge][Te]===void 0?Ce:F.objects[_e][ge][Te]},F.handleAction=function(_e){var ge=_e.rjvId,Te=_e.data;switch(_e.name){case"RESET":F.emit("reset-"+ge);break;case"VARIABLE_UPDATED":_e.data[od]=F.updateSrc(ge,Te),F.set(ge,"action","variable-update",g(g({},Te),{},{type:"variable-edited"})),F.emit("variable-update-"+ge);break;case"VARIABLE_REMOVED":_e.data[od]=F.updateSrc(ge,Te),F.set(ge,"action","variable-update",g(g({},Te),{},{type:"variable-removed"})),F.emit("variable-update-"+ge);break;case"VARIABLE_ADDED":_e.data[od]=F.updateSrc(ge,Te),F.set(ge,"action","variable-update",g(g({},Te),{},{type:"variable-added"})),F.emit("variable-update-"+ge);break;case"ADD_VARIABLE_KEY_REQUEST":F.set(ge,"action","new-key-request",Te),F.emit("add-key-request-"+ge)}},F.updateSrc=function(_e,ge){var Te=ge.name,Ce=ge.namespace,Ve=ge.new_value,He=ge.variable_removed;Ce.shift();var ut,nt=F.get(_e,"global","src"),mt=F.deepCopy(nt,oe(Ce)),un=mt,Ke=(function(_t,fn){var Nt=typeof Symbol<"u"&&_t[Symbol.iterator]||_t["@@iterator"];if(!Nt){if(Array.isArray(_t)||(Nt=ne(_t))||fn){Nt&&(_t=Nt);var Gr=0,Kr=function(){};return{s:Kr,n:function(){return Gr>=_t.length?{done:!0}:{done:!1,value:_t[Gr++]}},e:function(Wn){throw Wn},f:Kr}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
139
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Dr,co=!0,ha=!1;return{s:function(){Nt=Nt.call(_t)},n:function(){var Wn=Nt.next();return co=Wn.done,Wn},e:function(Wn){ha=!0,Dr=Wn},f:function(){try{co||Nt.return==null||Nt.return()}finally{if(ha)throw Dr}}}})(Ce);try{for(Ke.s();!(ut=Ke.n()).done;)un=un[ut.value]}catch(_t){Ke.e(_t)}finally{Ke.f()}return He?K(un)==="array"?un.splice(Te,1):delete un[Te]:Te!==null?un[Te]=Ve:mt=Ve,F.set(_e,"global","src",mt),mt},F.deepCopy=function(_e,ge){var Te,Ce=K(_e),Ve=ge.shift();return Ce==="array"?Te=oe(_e):Ce==="object"&&(Te=g({},_e)),Ve!==void 0&&(Te[Ve]=F.deepCopy(_e[Ve],ge)),Te},F}return T($,P),b($)})(bo.EventEmitter));Oi.register(sd.handleAction.bind(sd));const za=sd;var Ml=(function(P){function $(F){var Z;return v(this,$),(Z=E(this,$,[F])).handleToggleCollapsed=function(){Z.setState({collapsed:!Z.state.collapsed},function(){za.set(Z.props.rjvId,Z.props.namespace,"collapsed",Z.state.collapsed)})},Z.getFunctionDisplay=function(fe){var Se=Z.props;return fe?O().createElement("span",null,Z.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,""),O().createElement("span",{className:"function-collapsed",style:{fontWeight:"bold"}},O().createElement("span",null,"{"),O().createElement("span",Fe(Se.theme,"ellipsis"),"..."),O().createElement("span",null,"}"))):Z.props.value.toString().slice(9,-1)},Z.state={collapsed:za.get(F.rjvId,F.namespace,"collapsed",!0)},Z}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=this.state.collapsed;return O().createElement("div",Fe(F.theme,"function"),O().createElement(ia,Object.assign({typeName:"function"},F)),O().createElement("span",Object.assign({},Fe(F.theme,"function-value"),{className:"rjv-function-container",onClick:this.handleToggleCollapsed}),this.getFunctionDisplay(Z)))}}])})(O().PureComponent),nm=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){return O().createElement("div",Fe(this.props.theme,"nan"),"NaN")}}])})(O().PureComponent),rm=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){return O().createElement("div",Fe(this.props.theme,"null"),"NULL")}}])})(O().PureComponent),am=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props;return O().createElement("div",Fe(F.theme,"integer"),O().createElement(ia,Object.assign({typeName:"int"},F)),this.props.value)}}])})(O().PureComponent),ey=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props;return O().createElement("div",Fe(F.theme,"regexp"),O().createElement(ia,Object.assign({typeName:"regexp"},F)),this.props.value.toString())}}])})(O().PureComponent),im=(function(P){function $(F){var Z;return v(this,$),(Z=E(this,$,[F])).handleToggleCollapsed=function(){Z.setState({collapsed:!Z.state.collapsed},function(){za.set(Z.props.rjvId,Z.props.namespace,"collapsed",Z.state.collapsed)})},Z.state={collapsed:za.get(F.rjvId,F.namespace,"collapsed",!0)},Z}return T($,P),b($,[{key:"render",value:function(){var F=this.state.collapsed,Z=this.props,fe=Z.collapseStringsAfterLength,Se=Z.theme,_e=Z.escapeStrings,ge=Z.value,Te=K(fe)==="integer",Ce={style:{cursor:"default",wordBreak:"break-all"}};return _e&&(ge=ee(ge)),Te&&ge.length>fe&&(Ce.style.cursor="pointer",F&&(ge=O().createElement("span",null,ge.substring(0,fe),O().createElement("span",Fe(Se,"ellipsis")," ...")))),O().createElement("div",Fe(Se,"string"),O().createElement(ia,Object.assign({typeName:"string"},Z)),O().createElement("span",Object.assign({className:"string-value"},Ce,{onClick:this.handleToggleCollapsed}),'"',ge,'"'))}}])})(O().PureComponent),Kc=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){return O().createElement("div",Fe(this.props.theme,"undefined"),"undefined")}}])})(O().PureComponent),om=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props;return O().createElement("div",Fe(F.theme,"bigNumber"),O().createElement(ia,Object.assign({typeName:"bigNumber"},F)),this.props.value.toString())}}])})(O().PureComponent);function ld(){return ld=Object.assign?Object.assign.bind():function(P){for(var $=1;$<arguments.length;$++){var F=arguments[$];for(var Z in F)({}).hasOwnProperty.call(F,Z)&&(P[Z]=F[Z])}return P},ld.apply(null,arguments)}var ty=C.useLayoutEffect,sm=function(P,$){typeof P!="function"?P.current=$:P($)},jl={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},lm=function(P){Object.keys(jl).forEach(function($){P.style.setProperty($,jl[$],"important")})},$a=null,um=function(P,$){var F=P.scrollHeight;return $.sizingStyle.boxSizing==="border-box"?F+$.borderSize:F-$.paddingSize},Yc=function(){},ny=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],ry=!!document.documentElement.currentStyle,ay=function(P){var $=window.getComputedStyle(P);if($===null)return null;var F,Z=(F=$,ny.reduce(function(Se,_e){return Se[_e]=F[_e],Se},{})),fe=Z.boxSizing;return fe===""?null:(ry&&fe==="border-box"&&(Z.width=parseFloat(Z.width)+parseFloat(Z.borderRightWidth)+parseFloat(Z.borderLeftWidth)+parseFloat(Z.paddingRight)+parseFloat(Z.paddingLeft)+"px"),{sizingStyle:Z,paddingSize:parseFloat(Z.paddingBottom)+parseFloat(Z.paddingTop),borderSize:parseFloat(Z.borderBottomWidth)+parseFloat(Z.borderTopWidth)})};function ud(P,$,F){var Z,fe,Se=(Z=F,fe=O().useRef(Z),ty(function(){fe.current=Z}),fe);C.useLayoutEffect(function(){var _e=function(ge){return Se.current(ge)};if(P)return P.addEventListener($,_e),function(){return P.removeEventListener($,_e)}},[])}var iy=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],oy=function(P,$){var F=P.cacheMeasurements,Z=P.maxRows,fe=P.minRows,Se=P.onChange,_e=Se===void 0?Yc:Se,ge=P.onHeightChange,Te=ge===void 0?Yc:ge,Ce=q(P,iy),Ve=Ce.value!==void 0,He=C.useRef(null),ut=(function(Ke,_t){var fn=O().useRef();return O().useCallback(function(Nt){Ke.current=Nt,fn.current&&sm(fn.current,null),fn.current=_t,_t&&sm(_t,Nt)},[_t])})(He,$),nt=C.useRef(0),mt=C.useRef(),un=function(){var Ke=He.current,_t=F&&mt.current?mt.current:ay(Ke);if(_t){mt.current=_t;var fn=(function(Kr,Dr,co,ha){co===void 0&&(co=1),ha===void 0&&(ha=1/0),$a||(($a=document.createElement("textarea")).setAttribute("tabindex","-1"),$a.setAttribute("aria-hidden","true"),lm($a)),$a.parentNode===null&&document.body.appendChild($a);var Wn=Kr.paddingSize,mm=Kr.borderSize,Dn=Kr.sizingStyle,Dl=Dn.boxSizing;Object.keys(Dn).forEach(function(xu){var Qc=xu;$a.style[Qc]=Dn[Qc]}),lm($a),$a.value=Dr;var pr=um($a,Kr);$a.value=Dr,pr=um($a,Kr),$a.value="x";var Eu=$a.scrollHeight-Wn,To=Eu*co;Dl==="border-box"&&(To=To+Wn+mm),pr=Math.max(To,pr);var pa=Eu*ha;return Dl==="border-box"&&(pa=pa+Wn+mm),[pr=Math.min(pa,pr),Eu]})(_t,Ke.value||Ke.placeholder||"x",fe,Z),Nt=fn[0],Gr=fn[1];nt.current!==Nt&&(nt.current=Nt,Ke.style.setProperty("height",Nt+"px","important"),Te(Nt,{rowHeight:Gr}))}};return C.useLayoutEffect(un),(function(Ke,_t){ud(document.body,"reset",function(fn){Ke.current.form===fn.target&&_t(fn)})})(He,function(){if(!Ve){var Ke=He.current.value;requestAnimationFrame(function(){var _t=He.current;_t&&Ke!==_t.value&&un()})}}),ud(window,"resize",un),(function(Ke){ud(document.fonts,"loadingdone",Ke)})(un),C.createElement("textarea",ld({},Ce,{onChange:function(Ke){Ve||un(),_e(Ke)},ref:ut}))},sy=C.forwardRef(oy);function cm(P,$){P=P.trim();try{if((P=structuredClone(P))[0]==="[")return da("array",JSON.parse(P));if(P[0]==="{")return da("object",JSON.parse(P));if(P.match(/-?\d+\.\d+/)&&P.match(/-?\d+\.\d+/)[0]===P)return $&&parseFloat(P).toString()!==P?da("bigNumber",P):da("float",parseFloat(P));if(P.match(/-?\d+e-\d+/)&&P.match(/-?\d+e-\d+/)[0]===P)return da("float",Number(P));if(P.match(/-?\d+/)&&P.match(/-?\d+/)[0]===P)return $&&parseInt(P).toString()!==P?da("bigNumber",P):da("integer",parseInt(P));if(P.match(/-?\d+e\+\d+/)&&P.match(/-?\d+e\+\d+/)[0]===P)return da("integer",Number(P))}catch{}switch(P=P.toLowerCase()){case"undefined":return da("undefined",void 0);case"nan":return da("nan",NaN);case"null":return da("null",null);case"true":return da("boolean",!0);case"false":return da("boolean",!1);default:if(P=Date.parse(P))return da("date",new Date(P))}return da(!1,null)}function da(P,$){return{type:P,value:$}}var gu=["style"],So=["style"],ly=["style"],cd=["style"],fd=["style"],dd=["style"],hd=["style"],pd=["style"],qi=["style"],uy=["style"],cy=["style"],fy=["style"],md=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=F.style,fe=V(F,gu);return O().createElement("span",fe,O().createElement("svg",Object.assign({},Pa(Z),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),O().createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7"})))}}])})(O().PureComponent),gd=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=F.style,fe=V(F,So);return O().createElement("span",fe,O().createElement("svg",Object.assign({},Pa(Z),{viewBox:"0 0 24 24",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),O().createElement("path",{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z"})))}}])})(O().PureComponent),wo=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=F.style,fe=V(F,ly),Se=Pa(Z).style;return O().createElement("span",fe,O().createElement("svg",{fill:Se.color,width:Se.height,height:Se.width,style:Se,viewBox:"0 0 1792 1792"},O().createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}])})(O().PureComponent),Eo=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=F.style,fe=V(F,cd),Se=Pa(Z).style;return O().createElement("span",fe,O().createElement("svg",{fill:Se.color,width:Se.height,height:Se.width,style:Se,viewBox:"0 0 1792 1792"},O().createElement("path",{d:"M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"})))}}])})(O().PureComponent),dy=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=F.style,fe=V(F,fd);return O().createElement("span",fe,O().createElement("svg",{style:g(g({},Pa(Z).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},O().createElement("path",{d:"M0 14l6-6-6-6z"})))}}])})(O().PureComponent),Ds=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=F.style,fe=V(F,dd);return O().createElement("span",fe,O().createElement("svg",{style:g(g({},Pa(Z).style),{},{paddingLeft:"2px",verticalAlign:"top"}),viewBox:"0 0 15 15",fill:"currentColor"},O().createElement("path",{d:"M0 5l6 6 6-6z"})))}}])})(O().PureComponent),Zc=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=F.style,fe=V(F,hd);return O().createElement("span",fe,O().createElement("svg",Object.assign({},Pa(Z),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),O().createElement("g",null,O().createElement("path",{d:"m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z"}))))}}])})(O().PureComponent),yu=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=F.style,fe=V(F,pd);return O().createElement("span",fe,O().createElement("svg",Object.assign({},Pa(Z),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),O().createElement("g",null,O().createElement("path",{d:"m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}])})(O().PureComponent),vu=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=F.style,fe=V(F,qi);return O().createElement("span",fe,O().createElement("svg",Object.assign({},Pa(Z),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),O().createElement("g",null,O().createElement("path",{d:"m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}])})(O().PureComponent),kl=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=F.style,fe=V(F,uy);return O().createElement("span",fe,O().createElement("svg",Object.assign({},Pa(Z),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),O().createElement("g",null,O().createElement("path",{d:"m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z"}))))}}])})(O().PureComponent),yd=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=F.style,fe=V(F,cy);return O().createElement("span",fe,O().createElement("svg",Object.assign({},Pa(Z),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),O().createElement("g",null,O().createElement("path",{d:"m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z"}))))}}])})(O().PureComponent),bu=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=F.style,fe=V(F,fy);return O().createElement("span",fe,O().createElement("svg",Object.assign({},Pa(Z),{viewBox:"0 0 40 40",fill:"currentColor",preserveAspectRatio:"xMidYMid meet"}),O().createElement("g",null,O().createElement("path",{d:"m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z"}))))}}])})(O().PureComponent);function Pa(P){return P||(P={}),{style:g(g({verticalAlign:"middle"},P),{},{color:P.color?P.color:"#000000",height:"1em",width:"1em"})}}var fm=(function(P){function $(F){var Z;return v(this,$),(Z=E(this,$,[F])).copiedTimer=null,Z.copyToClipboardFallback=function(fe){var Se=document.createElement("textarea");Se.value=fe,document.body.appendChild(Se),Se.select(),document.execCommand("copy"),document.body.removeChild(Se)},Z.handleCopy=function(){var fe=Z.props,Se=fe.clickCallback,_e=fe.src,ge=fe.namespace,Te=JSON.stringify(Z.clipboardValue(_e),null," ");navigator.clipboard?navigator.clipboard.writeText(Te).catch(function(){Z.copyToClipboardFallback(Te)}):Z.copyToClipboardFallback(Te),Z.copiedTimer=setTimeout(function(){Z.setState({copied:!1})},5500),Z.setState({copied:!0},function(){typeof Se=="function"&&Se({src:_e,namespace:ge,name:ge[ge.length-1]})})},Z.getClippyIcon=function(){var fe=Z.props.theme;return Z.state.copied?O().createElement("span",null,O().createElement(Zc,Object.assign({className:"copy-icon"},Fe(fe,"copy-icon"))),O().createElement("span",Fe(fe,"copy-icon-copied"),"✔")):O().createElement(Zc,Object.assign({className:"copy-icon"},Fe(fe,"copy-icon")))},Z.clipboardValue=function(fe){switch(K(fe)){case"function":case"regexp":return fe.toString();default:return fe}},Z.state={copied:!1},Z}return T($,P),b($,[{key:"componentWillUnmount",value:function(){this.copiedTimer&&(clearTimeout(this.copiedTimer),this.copiedTimer=null)}},{key:"render",value:function(){var F=this.props,Z=F.theme,fe=F.hidden,Se=F.rowHovered,_e=Fe(Z,"copy-to-clipboard").style,ge="inline";return fe&&(ge="none"),O().createElement("span",{className:"copy-to-clipboard-container",title:"Copy to clipboard",style:{verticalAlign:"top",display:Se?"inline-block":"none"}},O().createElement("span",{style:g(g({},_e),{},{display:ge}),onClick:this.handleCopy},this.getClippyIcon()))}}])})(O().PureComponent);const hy=(function(P){function $(F){var Z;return v(this,$),(Z=E(this,$,[F])).handleSelect=function(fe){var Se=Z.props,_e=Se.variable,ge=Se.namespace,Te=Se.onEdit,Ce=Se.onSelect,Ve=Se.keyModifier,He=oe(ge);Ve(fe,"edit")&&Te!==!1?Z.prepopInput(_e):Ce!==!1&&(He.shift(),Ce(g(g({},_e),{},{namespace:He})))},Z.getEditIcon=function(){var fe=Z.props,Se=fe.variable,_e=fe.theme;return O().createElement("div",{className:"click-to-edit",style:{verticalAlign:"top",display:Z.state.hovered?"inline-block":"none"}},O().createElement(yd,Object.assign({className:"click-to-edit-icon"},Fe(_e,"editVarIcon"),{onClick:function(){Z.prepopInput(Se)}})))},Z.prepopInput=function(fe){if(Z.props.onEdit!==!1){var Se=(function(ge,Te){var Ce;switch(K(ge,Te)){case"undefined":Ce="undefined";break;case"nan":Ce="NaN";break;case"string":Ce=ge;break;case"bigNumber":case"date":case"function":case"regexp":Ce=ge.toString();break;default:try{Ce=JSON.stringify(ge,null," ")}catch{Ce=""}}return Ce})(fe.value,Z.props.bigNumber),_e=cm(Se,Z.props.bigNumber);Z.setState({editMode:!0,editValue:Se,parsedInput:{type:_e.type,value:_e.value}})}},Z.getRemoveIcon=function(){var fe=Z.props,Se=fe.variable,_e=fe.namespace,ge=fe.theme,Te=fe.rjvId;return O().createElement("div",{className:"click-to-remove",style:{verticalAlign:"top",display:Z.state.hovered?"inline-block":"none"}},O().createElement(yu,Object.assign({className:"click-to-remove-icon"},Fe(ge,"removeVarIcon"),{onClick:function(){Oi.dispatch({name:"VARIABLE_REMOVED",rjvId:Te,data:{name:Se.name,namespace:_e,existing_value:Se.value,variable_removed:!0}})}})))},Z.getValue=function(fe,Se){var _e=!Se&&fe.type,ge=Z.props;switch(_e){case!1:return Z.getEditInput();case"string":return O().createElement(im,Object.assign({value:fe.value},ge));case"integer":return O().createElement(am,Object.assign({value:fe.value},ge));case"float":return O().createElement(Al,Object.assign({value:fe.value},ge));case"boolean":return O().createElement(tm,Object.assign({value:fe.value},ge));case"function":return O().createElement(Ml,Object.assign({value:fe.value},ge));case"null":return O().createElement(rm,ge);case"nan":return O().createElement(nm,ge);case"undefined":return O().createElement(Kc,ge);case"date":return O().createElement(Rl,Object.assign({value:fe.value},ge));case"regexp":return O().createElement(ey,Object.assign({value:fe.value},ge));case"bigNumber":return O().createElement(om,Object.assign({value:fe.value},ge));default:return O().createElement("div",{className:"object-value"},JSON.stringify(fe.value))}},Z.getEditInput=function(){var fe=Z.props,Se=fe.keyModifier,_e=fe.selectOnFocus,ge=fe.theme,Te=Z.state.editValue;return O().createElement("div",null,O().createElement(sy,Object.assign({type:"text",ref:function(Ce){Ce&&Ce[_e?"select":"focus"]()},value:Te,className:"variable-editor",onChange:function(Ce){var Ve=Ce.target.value,He=cm(Ve,Z.props.bigNumber);Z.setState({editValue:Ve,parsedInput:{type:He.type,value:He.value}})},onKeyDown:function(Ce){switch(Ce.key){case"Escape":Z.setState({editMode:!1,editValue:""});break;case"Enter":Se(Ce,"submit")&&Z.submitEdit(!0)}Ce.stopPropagation()},placeholder:"update this value",minRows:2},Fe(ge,"edit-input"))),O().createElement("div",Fe(ge,"edit-icon-container"),O().createElement(yu,Object.assign({className:"edit-cancel"},Fe(ge,"cancel-icon"),{onClick:function(Ce){Ce&&Ce.stopPropagation(),Z.setState({editMode:!1,editValue:""})}})),O().createElement(bu,Object.assign({className:"edit-check string-value"},Fe(ge,"check-icon"),{onClick:function(Ce){Ce&&Ce.stopPropagation(),Z.submitEdit()}})),O().createElement("div",null,Z.showDetected())))},Z.submitEdit=function(fe){var Se=Z.props,_e=Se.variable,ge=Se.namespace,Te=Se.rjvId,Ce=Se.bigNumber,Ve=Z.state,He=Ve.editValue,ut=Ve.parsedInput,nt=He;fe&&ut.type&&(nt=ut.value,Ce&&ut.type==="bigNumber"&&(nt=new Ce(nt))),Z.setState({editMode:!1}),Oi.dispatch({name:"VARIABLE_UPDATED",rjvId:Te,data:{name:_e.name,namespace:ge,existing_value:_e.value,new_value:nt,variable_removed:!1}})},Z.showDetected=function(){var fe=Z.props.theme,Se=Z.getDetectedInput();if(Se)return O().createElement("div",null,O().createElement("div",Fe(fe,"detected-row"),Se,O().createElement(bu,{className:"edit-check detected",style:g({verticalAlign:"top",paddingLeft:"3px"},Fe(fe,"check-icon").style),onClick:function(_e){_e&&_e.stopPropagation(),Z.submitEdit(!0)}})))},Z.getDetectedInput=function(){var fe=Z.state.parsedInput,Se=fe.type,_e=fe.value,ge=Z.props,Te=ge.theme;if(Se!==!1)switch(Se.toLowerCase()){case"object":return O().createElement("span",null,O().createElement("span",{style:g(g({},Fe(Te,"brace").style),{},{cursor:"default"})},"{"),O().createElement("span",{style:g(g({},Fe(Te,"ellipsis").style),{},{cursor:"default"})},"..."),O().createElement("span",{style:g(g({},Fe(Te,"brace").style),{},{cursor:"default"})},"}"));case"array":return O().createElement("span",null,O().createElement("span",{style:g(g({},Fe(Te,"brace").style),{},{cursor:"default"})},"["),O().createElement("span",{style:g(g({},Fe(Te,"ellipsis").style),{},{cursor:"default"})},"..."),O().createElement("span",{style:g(g({},Fe(Te,"brace").style),{},{cursor:"default"})},"]"));case"string":return O().createElement(im,Object.assign({value:_e},ge));case"integer":return O().createElement(am,Object.assign({value:_e},ge));case"float":return O().createElement(Al,Object.assign({value:_e},ge));case"boolean":return O().createElement(tm,Object.assign({value:_e},ge));case"function":return O().createElement(Ml,Object.assign({value:_e},ge));case"null":return O().createElement(rm,ge);case"nan":return O().createElement(nm,ge);case"undefined":return O().createElement(Kc,ge);case"date":return O().createElement(Rl,Object.assign({value:new Date(_e)},ge));case"bignumber":return O().createElement(om,Object.assign({value:_e},ge))}},Z.state={editMode:!1,editValue:"",hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},Z}return T($,P),b($,[{key:"render",value:function(){var F=this,Z=this.props,fe=Z.variable,Se=Z.singleIndent,_e=Z.type,ge=Z.theme,Te=Z.namespace,Ce=Z.indentWidth,Ve=Z.enableClipboard,He=Z.onEdit,ut=Z.onDelete,nt=Z.onSelect,mt=Z.displayArrayKey,un=Z.quotesOnKeys,Ke=Z.showComma,_t=Z.isLast,fn=this.state.editMode,Nt=nt!==!1||He!==!1;return O().createElement("div",Object.assign({},Fe(ge,"objectKeyVal",{paddingLeft:Ce*Se}),{onMouseEnter:function(){return F.setState(g(g({},F.state),{},{hovered:!0}))},onMouseLeave:function(){return F.setState(g(g({},F.state),{},{hovered:!1}))},className:"variable-row",key:fe.name}),_e==="array"?mt?O().createElement("span",Object.assign({},Fe(ge,"array-key"),{key:fe.name+"_"+Te}),fe.name,O().createElement("div",Fe(ge,"colon"),":")):null:O().createElement("span",null,O().createElement("span",Object.assign({},Fe(ge,"object-name"),{className:"object-key",key:fe.name+"_"+Te,onClick:Nt?this.handleSelect:null}),!!un&&O().createElement("span",{style:{verticalAlign:"top"}},'"'),O().createElement("span",{style:{display:"inline-block"}},ee(fe.name)),!!un&&O().createElement("span",{style:{verticalAlign:"top"}},'"')),O().createElement("span",Fe(ge,"colon"),":")),O().createElement("div",Object.assign({className:"variable-value",onClick:Nt?this.handleSelect:null},Fe(ge,"variableValue",{cursor:nt===!1?"default":"pointer"})),this.getValue(fe,fn)),Ke&&!_t&&O().createElement("span",Fe(ge,"comma"),","),Ve?O().createElement(fm,{rowHovered:this.state.hovered,hidden:fn,src:fe.value,clickCallback:Ve,theme:ge,namespace:[].concat(oe(Te),[fe.name])}):null,He!==!1&&fn===!1?this.getEditIcon():null,ut!==!1&&fn===!1?this.getRemoveIcon():null)}}])})(O().PureComponent);var dm=(function(P){function $(){var F;v(this,$);for(var Z=arguments.length,fe=new Array(Z),Se=0;Se<Z;Se++)fe[Se]=arguments[Se];return(F=E(this,$,[].concat(fe))).getObjectSize=function(){var _e=F.props,ge=_e.size,Te=_e.theme;if(_e.displayObjectSize)return O().createElement("span",Object.assign({className:"object-size"},Fe(Te,"object-size")),ge," item",ge===1?"":"s")},F.getAddAttribute=function(_e){var ge=F.props,Te=ge.theme,Ce=ge.namespace,Ve=ge.name,He=ge.src,ut=ge.rjvId,nt=ge.depth;return O().createElement("span",{className:"click-to-add",style:{verticalAlign:"top",display:_e?"inline-block":"none"}},O().createElement(vu,Object.assign({className:"click-to-add-icon"},Fe(Te,"addVarIcon"),{onClick:function(){var mt={name:nt>0?Ve:null,namespace:Ce.splice(0,Ce.length-1),existing_value:He,variable_removed:!1,key_name:null};K(He)==="object"?Oi.dispatch({name:"ADD_VARIABLE_KEY_REQUEST",rjvId:ut,data:mt}):Oi.dispatch({name:"VARIABLE_ADDED",rjvId:ut,data:g(g({},mt),{},{new_value:[].concat(oe(He),[null])})})}})))},F.getRemoveObject=function(_e){var ge=F.props,Te=ge.theme,Ce=ge.namespace,Ve=ge.name,He=ge.src,ut=ge.rjvId;if(Ce.length!==1)return O().createElement("span",{className:"click-to-remove",style:{display:_e?"inline-block":"none"}},O().createElement(yu,Object.assign({className:"click-to-remove-icon"},Fe(Te,"removeVarIcon"),{onClick:function(){Oi.dispatch({name:"VARIABLE_REMOVED",rjvId:ut,data:{name:Ve,namespace:Ce.splice(0,Ce.length-1),existing_value:He,variable_removed:!0}})}})))},F.render=function(){var _e=F.props,ge=_e.theme,Te=_e.onDelete,Ce=_e.onAdd,Ve=_e.enableClipboard,He=_e.src,ut=_e.namespace,nt=_e.rowHovered;return O().createElement("div",Object.assign({},Fe(ge,"object-meta-data"),{className:"object-meta-data",onClick:function(mt){mt.stopPropagation()}}),F.getObjectSize(),Ve?O().createElement(fm,{rowHovered:nt,clickCallback:Ve,src:He,theme:ge,namespace:ut}):null,Ce!==!1?F.getAddAttribute(nt):null,Te!==!1?F.getRemoveObject(nt):null)},F}return T($,P),b($)})(O().PureComponent);function hm(P){var $=P.parent_type,F=P.namespace,Z=P.quotesOnKeys,fe=P.theme,Se=P.jsvRoot,_e=P.name,ge=P.displayArrayKey,Te=P.onKeyClick,Ce=P.name?P.name:"",Ve=typeof Te=="function"?Te:null;return!Se||_e!==!1&&_e!==null?$==="array"?ge?O().createElement("span",Object.assign({},Fe(fe,"array-key"),{key:F,onClick:Ve}),O().createElement("span",{className:"array-key"},Ce),O().createElement("span",Fe(fe,"colon"),":")):O().createElement("span",null):O().createElement("span",Object.assign({},Fe(fe,"object-name"),{key:F,onClick:Ve}),O().createElement("span",{className:"object-key"},Z&&O().createElement("span",{style:{verticalAlign:"top"}},'"'),O().createElement("span",null,Ce),Z&&O().createElement("span",{style:{verticalAlign:"top"}},'"')),O().createElement("span",Fe(fe,"colon"),":")):O().createElement("span",null)}function pm(P){var $=P.theme;switch(P.iconStyle){case"triangle":return O().createElement(Ds,Object.assign({},Fe($,"expanded-icon"),{className:"expanded-icon"}));case"square":return O().createElement(wo,Object.assign({},Fe($,"expanded-icon"),{className:"expanded-icon"}));default:return O().createElement(md,Object.assign({},Fe($,"expanded-icon"),{className:"expanded-icon"}))}}function $n(P){var $=P.theme;switch(P.iconStyle){case"triangle":return O().createElement(dy,Object.assign({},Fe($,"collapsed-icon"),{className:"collapsed-icon"}));case"square":return O().createElement(Eo,Object.assign({},Fe($,"collapsed-icon"),{className:"collapsed-icon"}));default:return O().createElement(gd,Object.assign({},Fe($,"collapsed-icon"),{className:"collapsed-icon"}))}}var xo=["src","groupArraysAfterLength","depth","name","theme","jsvRoot","namespace"],Xc=(function(P){function $(F){var Z;return v(this,$),(Z=E(this,$,[F])).toggleCollapsed=function(fe){for(var Se=Z.state.expanded,_e=[],ge=Math.max(Se.length||0,fe+1),Te=0;Te<ge;Te++)_e[Te]=Se[Te]===!0;_e[fe]=!_e[fe],Z.setState({expanded:_e})},Z.handleKeySelect=function(){var fe=Z.props,Se=fe.name,_e=fe.namespace,ge=fe.onSelect,Te=fe.src;if(typeof ge=="function"){var Ce=oe(_e);Ce.shift(),Ce.length>0&&Ce.pop(),ge({name:Se,value:Te,type:"array",namespace:Ce})}},Z.state={expanded:[]},Z}return T($,P),b($,[{key:"getExpandedIcon",value:function(F){var Z=this.props,fe=Z.theme,Se=Z.iconStyle;return this.state.expanded[F]?O().createElement(pm,{theme:fe,iconStyle:Se}):O().createElement($n,{theme:fe,iconStyle:Se})}},{key:"render",value:function(){var F=this,Z=this.props,fe=Z.src,Se=Z.groupArraysAfterLength,_e=(Z.depth,Z.name),ge=Z.theme,Te=Z.jsvRoot,Ce=Z.namespace,Ve=V(Z,xo),He=0,ut=5*this.props.indentWidth;Te||(He=5*this.props.indentWidth);var nt=Se,mt=Math.ceil(fe.length/nt);return O().createElement("div",Object.assign({className:"object-key-val"},Fe(ge,Te?"jsv-root":"objectKeyVal",{paddingLeft:He})),O().createElement(hm,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),O().createElement("span",null,O().createElement(dm,Object.assign({size:fe.length},this.props))),oe(Array(mt)).map(function(un,Ke){return O().createElement("div",Object.assign({key:Ke,className:"object-key-val array-group"},Fe(ge,"objectKeyVal",{marginLeft:6,paddingLeft:ut})),O().createElement("span",Fe(ge,"brace-row"),O().createElement("div",Object.assign({className:"icon-container"},Fe(ge,"icon-container"),{onClick:function(_t){F.toggleCollapsed(Ke)}}),F.getExpandedIcon(Ke)),F.state.expanded[Ke]?O().createElement(cs,Object.assign({key:_e+Ke,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:nt,index_offset:Ke*nt,src:fe.slice(Ke*nt,Ke*nt+nt),namespace:Ce,type:"array",parent_type:"array_group",theme:ge,showComma:F.props.showComma,isLast:Ke===mt-1},Ve)):O().createElement("span",Object.assign({},Fe(ge,"brace"),{onClick:function(_t){F.toggleCollapsed(Ke)},className:"array-group-brace"}),"[",O().createElement("div",Object.assign({},Fe(ge,"array-group-meta-data"),{className:"array-group-meta-data"}),O().createElement("span",Object.assign({className:"object-size"},Fe(ge,"object-size")),Ke*nt," - ",Ke*nt+nt>fe.length?fe.length:Ke*nt+nt)),"]")))}))}}])})(O().PureComponent),vd=["depth","src","namespace","name","type","parent_type","theme","jsvRoot","iconStyle","showComma","isLast"],Su=(function(P){function $(F){var Z;v(this,$),(Z=E(this,$,[F])).handleToggleCollapsed=function(){Z.setState({expanded:!Z.state.expanded},function(){za.set(Z.props.rjvId,Z.props.namespace,"expanded",Z.state.expanded)})},Z.handleKeySelect=function(){var Se=Z.props,_e=Se.name,ge=Se.namespace,Te=Se.onSelect,Ce=Se.src,Ve=Z.state.object_type;if(typeof Te=="function"){var He=oe(ge);He.shift(),He.length>0&&He.pop(),Te({name:_e,value:Ce,type:Ve,namespace:He})}},Z.getObjectContent=function(Se,_e,ge){return O().createElement("div",{className:"pushed-content object-container"},O().createElement("div",Object.assign({className:"object-content"},Fe(Z.props.theme,"pushed-content")),Z.renderObjectContents(_e,ge)))},Z.getEllipsis=function(){return Z.state.size===0?null:O().createElement("div",Object.assign({},Fe(Z.props.theme,"ellipsis"),{className:"node-ellipsis",onClick:Z.handleToggleCollapsed}),"...")},Z.getObjectMetaData=function(Se){var _e=Z.state,ge=_e.size,Te=_e.hovered;return O().createElement(dm,Object.assign({rowHovered:Te,size:ge},Z.props))},Z.renderObjectContents=function(Se,_e){var ge,Te=Z.props,Ce=Te.depth,Ve=Te.parent_type,He=Te.index_offset,ut=Te.groupArraysAfterLength,nt=Te.namespace,mt=Te.showComma,un=Z.state.object_type,Ke=[],_t=Object.keys(Se||{});return Z.props.sortKeys&&un!=="array"&&(_t=_t.sort()),_t.forEach(function(fn,Nt){ge=new bd(fn,Se[fn],_e.bigNumber);var Gr=Nt===_t.length-1;if(Ve==="array_group"&&He&&(ge.name=parseInt(ge.name,10)+He),Object.prototype.hasOwnProperty.call(Se,fn))if(ge.type==="object")Ke.push(O().createElement(cs,Object.assign({key:ge.name,depth:Ce+1,name:ge.name,src:ge.value,namespace:nt.concat(ge.name),parent_type:un,isLast:Gr,showComma:mt},_e)));else if(ge.type==="array"){var Kr=cs;ut&&ge.value.length>ut&&(Kr=Xc),Ke.push(O().createElement(Kr,Object.assign({key:ge.name,depth:Ce+1,name:ge.name,src:ge.value,namespace:nt.concat(ge.name),type:"array",parent_type:un,isLast:Gr,showComma:mt},_e)))}else Ke.push(O().createElement(hy,Object.assign({key:ge.name+"_"+nt,variable:ge,singleIndent:5,namespace:nt,type:Z.props.type,isLast:Gr,showComma:mt},_e)))}),Ke};var fe=$.getState(F);return Z.state=g(g({},fe),{},{prevProps:{}}),Z}return T($,P),b($,[{key:"getBraceStart",value:function(F,Z){var fe=this.props,Se=fe.theme,_e=fe.iconStyle;if(fe.parent_type==="array_group")return O().createElement("span",null,O().createElement("span",Fe(Se,"brace"),F==="array"?"[":"{"));var ge=Z?pm:$n;return O().createElement("span",null,O().createElement("span",Object.assign({onClick:this.handleToggleCollapsed},Fe(Se,"brace-row")),O().createElement("div",Object.assign({className:"icon-container"},Fe(Se,"icon-container")),O().createElement(ge,{theme:Se,iconStyle:_e})),O().createElement(hm,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),O().createElement("span",Fe(Se,"brace"),F==="array"?"[":"{")))}},{key:"render",value:function(){var F=this,Z=this.props,fe=Z.depth,Se=Z.src,_e=(Z.namespace,Z.name,Z.type,Z.parent_type),ge=Z.theme,Te=Z.jsvRoot,Ce=Z.iconStyle,Ve=Z.showComma,He=Z.isLast,ut=V(Z,vd),nt=this.state,mt=nt.object_type,un=nt.expanded,Ke={};return Te||_e==="array_group"?_e==="array_group"&&(Ke.borderLeft=0,Ke.display="inline"):Ke.paddingLeft=5*this.props.indentWidth,O().createElement("div",Object.assign({className:"object-key-val",onMouseEnter:function(){return F.setState(g(g({},F.state),{},{hovered:!0}))},onMouseLeave:function(){return F.setState(g(g({},F.state),{},{hovered:!1}))}},Fe(ge,Te?"jsv-root":"objectKeyVal",Ke)),this.getBraceStart(mt,un),un?this.getObjectContent(fe,Se,g({theme:ge,iconStyle:Ce},ut)):this.getEllipsis(),O().createElement("span",{className:"brace-row"},O().createElement("span",{style:g(g({},Fe(ge,"brace").style),{},{paddingLeft:un?"3px":"0px"})},mt==="array"?"]":"}")),Ve&&!He&&!Te&&O().createElement("span",Fe(ge,"comma"),","),this.getObjectMetaData(Se))}}],[{key:"getDerivedStateFromProps",value:function(F,Z){var fe=Z.prevProps;return F.src!==fe.src||F.collapsed!==fe.collapsed||F.name!==fe.name||F.namespace!==fe.namespace||F.rjvId!==fe.rjvId?g(g({},$.getState(F)),{},{prevProps:F}):null}}])})(O().PureComponent);Su.getState=function(P){var $=Object.keys(P.src).length,F=(P.collapsed===!1||P.collapsed!==!0&&P.collapsed>P.depth)&&(!P.shouldCollapse||P.shouldCollapse({name:P.name,src:P.src,type:K(P.src),namespace:P.namespace})===!1)&&$!==0;return{expanded:za.get(P.rjvId,P.namespace,"expanded",F),object_type:P.type==="array"?"array":"object",parent_type:P.type==="array"?"array":"object",size:$,hovered:!1}};var bd=b(function P($,F,Z){v(this,P),this.name=$,this.value=F,this.type=K(F,Z)});B(Su);const cs=Su;var py=(function(P){function $(){var F;v(this,$);for(var Z=arguments.length,fe=new Array(Z),Se=0;Se<Z;Se++)fe[Se]=arguments[Se];return(F=E(this,$,[].concat(fe))).render=function(){var _e,ge,Te,Ce,Ve=F.props,He=[Ve.name],ut=cs;return typeof Ve.name!="object"||Array.isArray(Ve.name)||(He=[((_e=Ve.name)===null||_e===void 0?void 0:_e.displayName)||((ge=Ve.name)===null||ge===void 0?void 0:ge.name)||((Te=Ve.name)===null||Te===void 0||(Ce=Te.type)===null||Ce===void 0?void 0:Ce.name)||"Anonymous"]),Array.isArray(Ve.src)&&Ve.groupArraysAfterLength&&Ve.src.length>Ve.groupArraysAfterLength&&(ut=Xc),O().createElement("div",{className:"pretty-json-container object-container"},O().createElement("div",{className:"object-content"},O().createElement(ut,Object.assign({namespace:He,depth:0,jsvRoot:!0},Ve))))},F}return T($,P),b($)})(O().PureComponent),Vi=(function(P){function $(F){var Z;return v(this,$),(Z=E(this,$,[F])).handleCloseModal=function(){Oi.dispatch({rjvId:Z.props.rjvId,name:"RESET"})},Z.handleSubmit=function(){Z.props.submit(Z.state.input)},Z.state={input:F.input?F.input:""},Z}return T($,P),b($,[{key:"render",value:function(){var F=this,Z=this.props,fe=Z.theme,Se=Z.rjvId,_e=Z.isValid,ge=this.state.input,Te=_e(ge);return O().createElement("div",Object.assign({className:"key-modal-request"},Fe(fe,"key-modal-request"),{onClick:this.handleCloseModal}),O().createElement("div",Object.assign({},Fe(fe,"key-modal"),{onClick:function(Ce){Ce.stopPropagation()}}),O().createElement("div",Fe(fe,"key-modal-label"),"Key Name:"),O().createElement("div",{style:{position:"relative"}},O().createElement("input",Object.assign({},Fe(fe,"key-modal-input"),{className:"key-modal-input",ref:function(Ce){return Ce&&Ce.focus()},spellCheck:!1,value:ge,placeholder:"...",onChange:function(Ce){F.setState({input:Ce.target.value})},onKeyPress:function(Ce){Te&&Ce.key==="Enter"?F.handleSubmit():Ce.key==="Escape"&&F.handleCloseModal()}})),Te?O().createElement(bu,Object.assign({},Fe(fe,"key-modal-submit"),{className:"key-modal-submit",onClick:this.handleSubmit})):null),O().createElement("span",Fe(fe,"key-modal-cancel"),O().createElement(kl,Object.assign({},Fe(fe,"key-modal-cancel-icon"),{className:"key-modal-cancel",onClick:function(){Oi.dispatch({rjvId:Se,name:"RESET"})}})))))}}])})(O().PureComponent),wu=(function(P){function $(){var F;v(this,$);for(var Z=arguments.length,fe=new Array(Z),Se=0;Se<Z;Se++)fe[Se]=arguments[Se];return(F=E(this,$,[].concat(fe))).isValid=function(_e){var ge=F.props.rjvId,Te=za.get(ge,"action","new-key-request");return _e!==""&&Object.keys(Te.existing_value).indexOf(_e)===-1},F.submit=function(_e){var ge=F.props.rjvId,Te=za.get(ge,"action","new-key-request");Te.new_value=g({},Te.existing_value),Te.new_value[_e]=F.props.defaultValue,Oi.dispatch({name:"VARIABLE_ADDED",rjvId:ge,data:Te})},F}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=F.active,fe=F.theme,Se=F.rjvId;return Z?O().createElement(Vi,{rjvId:Se,theme:fe,isValid:this.isValid,submit:this.submit}):null}}])})(O().PureComponent),_o=(function(P){function $(){return v(this,$),E(this,$,arguments)}return T($,P),b($,[{key:"render",value:function(){var F=this.props,Z=F.message,fe=F.active,Se=F.theme,_e=F.rjvId;return fe?O().createElement("div",Object.assign({className:"validation-failure"},Fe(Se,"validation-failure"),{onClick:function(){Oi.dispatch({rjvId:_e,name:"RESET"})}}),O().createElement("span",Fe(Se,"validation-failure-label"),Z),O().createElement(kl,Fe(Se,"validation-failure-clear"))):null}}])})(O().PureComponent),fs=(function(P){function $(F){var Z;return v(this,$),(Z=E(this,$,[F])).rjvId=Date.now().toString()+Math.random().toString(36).slice(2),Z.getListeners=function(){return{reset:Z.resetState,"variable-update":Z.updateSrc,"add-key-request":Z.addKeyRequest}},Z.updateSrc=function(){var fe,Se=za.get(Z.rjvId,"action","variable-update"),_e=Se.name,ge=Se.namespace,Te=Se.new_value,Ce=Se.existing_value,Ve=Se.updated_src,He=Se.type,ut=Z.props,nt=ut.onEdit,mt=ut.onDelete,un=ut.onAdd,Ke={existing_src:Z.state.src,new_value:Te,updated_src:Ve,name:_e,namespace:ge,existing_value:Ce};switch(He){case"variable-added":fe=un(Ke);break;case"variable-edited":fe=nt(Ke);break;case"variable-removed":fe=mt(Ke)}fe!==!1?(za.set(Z.rjvId,"global","src",Ve),Z.setState({src:Ve})):Z.setState({validationFailure:!0})},Z.addKeyRequest=function(){Z.setState({addKeyRequest:!0})},Z.resetState=function(){Z.setState({validationFailure:!1,addKeyRequest:!1})},Z.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:$.defaultProps.src,name:$.defaultProps.name,theme:$.defaultProps.theme,validationMessage:$.defaultProps.validationMessage,prevSrc:$.defaultProps.src,prevName:$.defaultProps.name,prevTheme:$.defaultProps.theme},Z}return T($,P),b($,[{key:"componentDidMount",value:function(){za.set(this.rjvId,"global","src",this.state.src);var F=this.getListeners();for(var Z in F)za.on(Z+"-"+this.rjvId,F[Z]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:"componentDidUpdate",value:function(F,Z){Z.addKeyRequest!==!1&&this.setState({addKeyRequest:!1}),Z.editKeyRequest!==!1&&this.setState({editKeyRequest:!1}),F.src!==this.state.src&&za.set(this.rjvId,"global","src",this.state.src)}},{key:"componentWillUnmount",value:function(){var F=this.getListeners();for(var Z in F)za.removeListener(Z+"-"+this.rjvId,F[Z])}},{key:"render",value:function(){var F=this.state,Z=F.validationFailure,fe=F.validationMessage,Se=F.addKeyRequest,_e=F.theme,ge=F.src,Te=F.name,Ce=this.props,Ve=Ce.style,He=Ce.defaultValue;return O().createElement("div",{className:"react-json-view",style:g(g({},Fe(_e,"app-container").style),Ve)},O().createElement(_o,{message:fe,active:Z,theme:_e,rjvId:this.rjvId}),O().createElement(py,Object.assign({},this.props,{src:ge,name:Te,theme:_e,type:K(ge),rjvId:this.rjvId})),O().createElement(wu,{active:Se,theme:_e,rjvId:this.rjvId,defaultValue:He}))}}],[{key:"getDerivedStateFromProps",value:function(F,Z){if(F.src!==Z.prevSrc||F.name!==Z.prevName||F.theme!==Z.prevTheme){var fe={src:F.src,name:F.name,theme:F.theme,validationMessage:F.validationMessage,prevSrc:F.src,prevName:F.name,prevTheme:F.theme};return $.validateState(fe)}return null}}])})(O().PureComponent);fs.defaultProps={src:{},name:"root",theme:"rjv-default",collapsed:!1,collapseStringsAfterLength:!1,shouldCollapse:!1,sortKeys:!1,quotesOnKeys:!0,groupArraysAfterLength:100,indentWidth:4,enableClipboard:!0,escapeStrings:!0,displayObjectSize:!0,displayDataTypes:!0,onEdit:!1,onDelete:!1,onAdd:!1,onSelect:!1,iconStyle:"triangle",style:{},validationMessage:"Validation Error",defaultValue:null,displayArrayKey:!0,selectOnFocus:!1,keyModifier:function(P){return P.metaKey||P.ctrlKey},bigNumber:null,showComma:!0},fs.validateState=function(P){var $={};return K(P.theme)!=="object"||(function(F){var Z=["base00","base01","base02","base03","base04","base05","base06","base07","base08","base09","base0A","base0B","base0C","base0D","base0E","base0F"];if(K(F)==="object"){for(var fe=0;fe<Z.length;fe++)if(!(Z[fe]in F))return!1;return!0}return!1})(P.theme)||(console.error("react-json-view error:","theme prop must be a theme name or valid base-16 theme object.",'defaulting to "rjv-default" theme'),$.theme="rjv-default"),K(P.src)!=="object"&&K(P.src)!=="array"&&(console.error("react-json-view error:","src property must be a valid json object"),$.name="ERROR",$.src={message:"src property must be a valid json object"}),g(g({},P),$)},B(fs);const Sd=fs})(),c})())})(Zw)),Zw.exports}var cSe=uSe();const Ax=tu(cSe),dU=j.createContext(void 0);function Bg(e){const t=j.useContext(dU);if(e===!1&&t===void 0)throw new Error(xi(27));return t}let wp=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=E1.startingStyle]="startingStyle",e[e.endingStyle=E1.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),FO=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const fSe={[FO.popupOpen]:""},dSe={[FO.popupOpen]:"",[FO.pressed]:""},hSe={[wp.open]:""},pSe={[wp.closed]:""},mSe={[wp.anchorHidden]:""},hU={open(e){return e?fSe:null}},pU={open(e){return e?dSe:null}},Hg={open(e){return e?hSe:pSe},anchorHidden(e){return e?mSe:null}},gSe={...Hg,...Fg},ySe=j.forwardRef(function(t,r){const{render:i,className:s,forceRender:l=!1,...c}=t,{store:f}=Bg(),d=f.useState("open"),h=f.useState("nested"),m=f.useState("mounted"),g=f.useState("transitionStatus");return sr("div",t,{state:{open:d,transitionStatus:g},ref:[f.context.backdropRef,r],stateAttributesMapping:gSe,props:[{role:"presentation",hidden:!m,style:{userSelect:"none",WebkitUserSelect:"none"}},c],enabled:l||!h})}),vSe=j.forwardRef(function(t,r){const{render:i,className:s,disabled:l=!1,nativeButton:c=!0,...f}=t,{store:d}=Bg(),h=d.useState("open");function m(b){h&&d.setOpen(!1,en(jbe,b.nativeEvent))}const{getButtonProps:g,buttonRef:v}=Kp({disabled:l,native:c});return sr("button",t,{state:{disabled:l},ref:[r,v],props:[{onClick:m},f,g]})}),Tb=0;class eu{static create(){return new eu}currentId=Tb;start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Tb,r()},t)}isStarted(){return this.currentId!==Tb}clear=()=>{this.currentId!==Tb&&(clearTimeout(this.currentId),this.currentId=Tb)};disposeEffect=()=>this.clear}function ts(){const e=ki(eu.create).current;return Cx(e.disposeEffect),e}function Ia(e){const t=ki(bSe,e).current;return t.next=e,at(t.effect),t}function bSe(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function mU(){const e=new Map;return{emit(t,r){e.get(t)?.forEach(i=>i(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){e.get(t)?.delete(r)}}}class SSe{nodesRef={current:[]};events=mU();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const r=this.nodesRef.current.findIndex(i=>i===t);r!==-1&&this.nodesRef.current.splice(r,1)}}const gU=j.createContext(null),yU=j.createContext(null),Gf=()=>j.useContext(gU)?.id||null,Jp=e=>{const t=j.useContext(yU);return e??t};function wSe(e){const t=Lg(),r=Jp(e),i=Gf();return at(()=>{if(!t)return;const s={id:t,parentId:i};return r?.addNode(s),()=>{r?.removeNode(s)}},[r,t,i]),t}function ESe(e){const{children:t,id:r}=e,i=Gf();return k.jsx(gU.Provider,{value:j.useMemo(()=>({id:r,parentId:i}),[r,i]),children:t})}function xSe(e){const{children:t,externalTree:r}=e,i=ki(()=>r??new SSe).current;return k.jsx(yU.Provider,{value:i,children:t})}function _1(e){return`data-base-ui-${e}`}function LT(e,t,r){if(r&&!vg(r))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const i=e();return typeof i=="number"?i:i?.[t]}return e?.[t]}const vU={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Mx={...vU,position:"fixed",top:0,left:0},bU={...vU,position:"absolute"},wg=j.forwardRef(function(t,r){const[i,s]=j.useState();at(()=>{Nbe&&s("button")},[]);const l={tabIndex:0,role:i};return k.jsx("span",{...t,ref:r,style:Mx,"aria-hidden":i?void 0:!0,...l,"data-base-ui-focus-guard":""})});let vN=0;function Jb(e,t={}){const{preventScroll:r=!1,cancelPrevious:i=!0,sync:s=!1}=t;i&&cancelAnimationFrame(vN);const l=()=>e?.focus({preventScroll:r});s?l():vN=requestAnimationFrame(l)}const ng={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function bN(e){return e==="inert"?ng.inert:e==="aria-hidden"?ng["aria-hidden"]:ng.none}let ww=new WeakSet,Ew={},UT=0;const SU=e=>e&&(e.host||SU(e.parentNode)),_Se=(e,t)=>t.map(r=>{if(e.contains(r))return r;const i=SU(r);return e.contains(i)?i:null}).filter(r=>r!=null);function TSe(e,t,r,i){const s="data-base-ui-inert",l=i?"inert":r?"aria-hidden":null,c=_Se(t,e),f=new Set,d=new Set(c),h=[];Ew[s]||(Ew[s]=new WeakMap);const m=Ew[s];c.forEach(g),v(t),f.clear();function g(_){!_||f.has(_)||(f.add(_),_.parentNode&&g(_.parentNode))}function v(_){!_||d.has(_)||[].forEach.call(_.children,b=>{if(Uf(b)!=="script")if(f.has(b))v(b);else{const S=l?b.getAttribute(l):null,w=S!==null&&S!=="false",x=bN(l),E=(x.get(b)||0)+1,R=(m.get(b)||0)+1;x.set(b,E),m.set(b,R),h.push(b),E===1&&w&&ww.add(b),R===1&&b.setAttribute(s,""),!w&&l&&b.setAttribute(l,l==="inert"?"":"true")}})}return UT+=1,()=>{h.forEach(_=>{const b=bN(l),w=(b.get(_)||0)-1,x=(m.get(_)||0)-1;b.set(_,w),m.set(_,x),w||(!ww.has(_)&&l&&_.removeAttribute(l),ww.delete(_)),x||_.removeAttribute(s)}),UT-=1,UT||(ng.inert=new WeakMap,ng["aria-hidden"]=new WeakMap,ng.none=new WeakMap,ww=new WeakSet,Ew={})}}function CSe(e,t=!1,r=!1){const i=Rn(e[0]).body;return TSe(e.concat(Array.from(i.querySelectorAll("[aria-live]"))),i,t,r)}const wU=j.createContext(null),EU=()=>j.useContext(wU),OSe=_1("portal");function RSe(e={}){const{ref:t,container:r,componentProps:i=ka,elementProps:s}=e,l=Lg(),f=EU()?.portalNode,[d,h]=j.useState(null),[m,g]=j.useState(null),v=Je(w=>{w!==null&&g(w)}),_=j.useRef(null);at(()=>{if(r===null){_.current&&(_.current=null,g(null),h(null));return}if(l==null)return;const w=(r&&(pA(r)?r:r.current))??f??document.body;if(w==null){_.current&&(_.current=null,g(null),h(null));return}_.current!==w&&(_.current=w,g(null),h(w))},[r,f,l]);const b=sr("div",i,{ref:[t,v],props:[{id:l,[OSe]:""},s]});return{portalNode:m,portalSubtree:d&&b?Es.createPortal(b,d):null}}const HM=j.forwardRef(function(t,r){const{children:i,container:s,className:l,render:c,renderGuards:f,...d}=t,{portalNode:h,portalSubtree:m}=RSe({container:s,ref:r,componentProps:t,elementProps:d}),g=j.useRef(null),v=j.useRef(null),_=j.useRef(null),b=j.useRef(null),[S,w]=j.useState(null),x=S?.modal,E=S?.open,R=typeof f=="boolean"?f:!!S&&!S.modal&&S.open&&!!h;j.useEffect(()=>{if(!h||x)return;function C(O){h&&O.relatedTarget&&Jm(O)&&(O.type==="focusin"?uN:m1e)(h)}return h.addEventListener("focusin",C,!0),h.addEventListener("focusout",C,!0),()=>{h.removeEventListener("focusin",C,!0),h.removeEventListener("focusout",C,!0)}},[h,x]),j.useEffect(()=>{!h||E||uN(h)},[E,h]);const T=j.useMemo(()=>({beforeOutsideRef:g,afterOutsideRef:v,beforeInsideRef:_,afterInsideRef:b,portalNode:h,setFocusManagerState:w}),[h]);return k.jsxs(j.Fragment,{children:[m,k.jsxs(wU.Provider,{value:T,children:[R&&h&&k.jsx(wg,{"data-type":"outside",ref:g,onFocus:C=>{if(Jm(C,h))_.current?.focus();else{const O=S?S.domReference:null;J7(O)?.focus()}}}),R&&h&&k.jsx("span",{"aria-owns":h.id,style:lie}),h&&Es.createPortal(i,h),R&&h&&k.jsx(wg,{"data-type":"outside",ref:v,onFocus:C=>{if(Jm(C,h))b.current?.focus();else{const O=S?S.domReference:null;FM(O)?.focus(),S?.closeOnFocusOut&&S?.onOpenChange(!1,en(Ip,C.nativeEvent))}}})]})]})});function ASe(e,t){const r=ua(e.target);return e instanceof r.KeyboardEvent?"keyboard":e instanceof r.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof r.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const SN=20;let hf=[];function GM(){hf=hf.filter(e=>e.deref()?.isConnected)}function MSe(e){GM(),e&&Uf(e)!=="body"&&(hf.push(new WeakRef(e)),hf.length>SN&&(hf=hf.slice(-SN)))}function qT(){return GM(),hf[hf.length-1]?.deref()}function jSe(e){if(!e)return null;const t=Vg();return Q7(e,t)?e:aS(e,t)[0]||e}function kSe(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():as(e).display!=="none"}function wN(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const r=Vg(),s=d1e(e,r).filter(c=>{const f=c.getAttribute("data-tabindex")||"";return Q7(c,r)||c.hasAttribute("data-tabindex")&&!f.startsWith("-")}),l=e.getAttribute("tabindex");t.current.includes("floating")||s.length===0?l!=="0"&&e.setAttribute("tabindex","0"):(l!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function KM(e){const{context:t,children:r,disabled:i=!1,initialFocus:s=!0,returnFocus:l=!0,restoreFocus:c=!1,modal:f=!0,closeOnFocusOut:d=!0,openInteractionType:h="",nextFocusableElement:m,previousFocusableElement:g,beforeContentFocusGuardRef:v,externalTree:_}=e,b="rootStore"in t?t.rootStore:t,S=b.useState("open"),w=b.useState("domReferenceElement"),x=b.useState("floatingElement"),{events:E,dataRef:R}=b.context,T=Je(()=>R.current.floatingContext?.nodeId),C=s===!1,O=zO(w)&&C,M=j.useRef(["content"]),D=Ia(s),U=Ia(l),B=Ia(h),q=Jp(_),V=EU(),G=j.useRef(null),ne=j.useRef(null),oe=j.useRef(!1),K=j.useRef(!1),ee=j.useRef(!1),re=j.useRef(-1),ue=j.useRef(""),Q=j.useRef(""),z=j.useRef(null),L=j.useRef(null),Y=Nc(z,v,V?.beforeInsideRef),I=Nc(L,V?.afterInsideRef),X=ts(),J=ts(),he=Rx(),xe=V!=null,we=w1(x),je=Je((ye=we)=>ye?aS(ye,Vg()):[]),de=Je(ye=>{const be=je(ye);return M.current.map(()=>be).filter(Boolean).flat()});j.useEffect(()=>{if(i||!f)return;function ye(Ae){Ae.key==="Tab"&&on(we,yl(Rn(we)))&&je().length===0&&!O&&Mi(Ae)}const be=Rn(we);return be.addEventListener("keydown",ye),()=>{be.removeEventListener("keydown",ye)}},[i,w,we,f,M,O,je,de]),j.useEffect(()=>{if(i||!S)return;const ye=Rn(we);function be(){ee.current=!1}function Ae(Ie){const $e=Jo(Ie),Ne=on(x,$e)||on(w,$e)||on(V?.portalNode,$e);ee.current=!Ne,Q.current=Ie.pointerType||"keyboard",$e?.closest(`[${z$}]`)&&(K.current=!0)}function Oe(){Q.current="keyboard"}return ye.addEventListener("pointerdown",Ae,!0),ye.addEventListener("pointerup",be,!0),ye.addEventListener("pointercancel",be,!0),ye.addEventListener("keydown",Oe,!0),()=>{ye.removeEventListener("pointerdown",Ae,!0),ye.removeEventListener("pointerup",be,!0),ye.removeEventListener("pointercancel",be,!0),ye.removeEventListener("keydown",Oe,!0)}},[i,x,w,we,S,V]),j.useEffect(()=>{if(i||!d)return;const ye=Rn(we);function be(){K.current=!0,J.start(0,()=>{K.current=!1})}function Ae(Ue){const Re=Jo(Ue),ot=je().indexOf(Re);ot!==-1&&(re.current=ot)}function Oe(Ue){const Re=Ue.relatedTarget,Ze=Ue.currentTarget,ot=Jo(Ue);queueMicrotask(()=>{const qe=T(),xn=b.context.triggerElements,yn=Re?.hasAttribute(_1("focus-guard"))&&[z.current,L.current,V?.beforeInsideRef.current,V?.afterInsideRef.current,V?.beforeOutsideRef.current,V?.afterOutsideRef.current,Oc(g),Oc(m)].includes(Re),zn=!(on(w,Re)||on(x,Re)||on(Re,x)||on(V?.portalNode,Re)||Re!=null&&xn.hasElement(Re)||xn.hasMatchingElement(Dt=>on(Dt,Re))||yn||q&&(_p(q.nodesRef.current,qe).find(Dt=>on(Dt.context?.elements.floating,Re)||on(Dt.context?.elements.domReference,Re))||iN(q.nodesRef.current,qe).find(Dt=>[Dt.context?.elements.floating,w1(Dt.context?.elements.floating)].includes(Re)||Dt.context?.elements.domReference===Re)));if(Ze===w&&we&&wN(we,M),c&&Ze!==w&&!kSe(ot)&&yl(ye)===ye.body){if(Mr(we)&&(we.focus(),c==="popup")){he.request(()=>{we.focus()});return}const Dt=re.current,Vt=je(),hn=Vt[Dt]||Vt[Vt.length-1]||we;Mr(hn)&&hn.focus()}if(R.current.insideReactTree){R.current.insideReactTree=!1;return}(O||!f)&&Re&&zn&&!K.current&&(O||Re!==qT())&&(oe.current=!0,b.setOpen(!1,en(Ip,Ue)))})}function Ie(){ee.current||(R.current.insideReactTree=!0,X.start(0,()=>{R.current.insideReactTree=!1}))}const $e=Mr(w)?w:null,Ne=[];if(!(!x&&!$e))return $e&&($e.addEventListener("focusout",Oe),$e.addEventListener("pointerdown",be),Ne.push(()=>{$e.removeEventListener("focusout",Oe),$e.removeEventListener("pointerdown",be)})),x&&(x.addEventListener("focusin",Ae),x.addEventListener("focusout",Oe),V&&(x.addEventListener("focusout",Ie,!0),Ne.push(()=>{x.removeEventListener("focusout",Ie,!0)})),Ne.push(()=>{x.removeEventListener("focusin",Ae),x.removeEventListener("focusout",Oe)})),()=>{Ne.forEach(Ue=>{Ue()})}},[i,w,x,we,f,q,V,b,d,c,je,O,T,M,R,X,J,he,m,g]),j.useEffect(()=>{if(i||!x||!S)return;const ye=Array.from(V?.portalNode?.querySelectorAll(`[${_1("portal")}]`)||[]),Ae=(q?iN(q.nodesRef.current,T()):[]).find(Ie=>zO(Ie.context?.elements.domReference||null))?.context?.elements.domReference,Oe=[x,Ae,...ye,G.current,ne.current,z.current,L.current,V?.beforeOutsideRef.current,V?.afterOutsideRef.current,Oc(g),Oc(m),O?w:null].filter(Ie=>Ie!=null);return CSe(Oe,f||O)},[S,i,w,x,f,M,V,O,q,T,m,g]),at(()=>{if(!S||i||!Mr(we))return;const ye=Rn(we),be=yl(ye);queueMicrotask(()=>{const Ae=de(we),Oe=D.current,Ie=typeof Oe=="function"?Oe(B.current||""):Oe;if(Ie===void 0||Ie===!1)return;let $e;Ie===!0||Ie===null?$e=Ae[0]||we:$e=Oc(Ie),$e=$e||Ae[0]||we,!on(we,be)&&Jb($e,{preventScroll:$e===we})})},[i,S,we,C,de,D,B]),at(()=>{if(i||!we)return;const ye=Rn(we),be=yl(ye);MSe(be);function Ae($e){if($e.open||(ue.current=ASe($e.nativeEvent,Q.current)),$e.reason===Wo&&$e.nativeEvent.type==="mouseleave"&&(oe.current=!0),$e.reason===$M)if($e.nested)oe.current=!1;else if(P7($e.nativeEvent)||I7($e.nativeEvent))oe.current=!1;else{let Ne=!1;document.createElement("div").focus({get preventScroll(){return Ne=!0,!1}}),Ne?oe.current=!1:oe.current=!0}}E.on("openchange",Ae);const Oe=ye.createElement("span");Oe.setAttribute("tabindex","-1"),Oe.setAttribute("aria-hidden","true"),Object.assign(Oe.style,Mx),xe&&w&&w.insertAdjacentElement("afterend",Oe);function Ie(){const $e=U.current;let Ne=typeof $e=="function"?$e(ue.current):$e;if(Ne===void 0||Ne===!1)return null;if(Ne===null&&(Ne=!0),typeof Ne=="boolean"){const Re=w||qT();return Re&&Re.isConnected?Re:Oe}const Ue=w||qT()||Oe;return Oc(Ne)||Ue}return()=>{E.off("openchange",Ae);const $e=yl(ye),Ne=on(x,$e)||q&&_p(q.nodesRef.current,T(),!1).some(Re=>on(Re.context?.elements.floating,$e)),Ue=Ie();queueMicrotask(()=>{const Re=jSe(Ue),Ze=typeof U.current!="boolean";U.current&&!oe.current&&Mr(Re)&&(!(!Ze&&Re!==$e&&$e!==ye.body)||Ne)&&Re.focus({preventScroll:!0}),Oe.remove(),oe.current=!1})}},[i,x,we,U,R,E,q,xe,w,T]),at(()=>{if(!PM||S||!x)return;const ye=yl(Rn(x));!Mr(ye)||!LM(ye)||on(x,ye)&&ye.blur()},[S,x]),at(()=>{if(!(i||!V))return V.setFocusManagerState({modal:f,closeOnFocusOut:d,open:S,onOpenChange:b.setOpen,domReference:w}),()=>{V.setFocusManagerState(null)}},[i,V,f,S,b,d,w]),at(()=>{if(!(i||!we))return wN(we,M),()=>{queueMicrotask(GM)}},[i,we,M]);const se=!i&&(f?!O:!0)&&(xe||f);return k.jsxs(j.Fragment,{children:[se&&k.jsx(wg,{"data-type":"inside",ref:Y,onFocus:ye=>{if(f){const be=de();Jb(be[be.length-1])}else V?.portalNode&&(oe.current=!1,Jm(ye,V.portalNode)?FM(w)?.focus():Oc(g??V.beforeOutsideRef)?.focus())}}),r,se&&k.jsx(wg,{"data-type":"inside",ref:I,onFocus:ye=>{f?Jb(de()[0]):V?.portalNode&&(d&&(oe.current=!0),Jm(ye,V.portalNode)?J7(w)?.focus():Oc(m??V.afterOutsideRef)?.focus())}})]})}function xU(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.context.dataRef,{enabled:s=!0,event:l="click",toggle:c=!0,ignoreMouse:f=!1,stickIfOpen:d=!0,touchOpenDelay:h=0,reason:m=yg}=t,g=j.useRef(void 0),v=Rx(),_=ts(),b=j.useMemo(()=>({onPointerDown(S){g.current=S.pointerType},onMouseDown(S){const w=g.current,x=S.nativeEvent,E=r.select("open");if(S.button!==0||l==="click"||vg(w,!0)&&f)return;const R=i.current.openEvent,T=R?.type,C=r.select("domReferenceElement")!==S.currentTarget,O=E&&C||!(E&&c&&(!(R&&d)||T==="click"||T==="mousedown"));if(LM(x.target)){const D=en(m,x,x.target);O&&w==="touch"&&h>0?_.start(h,()=>{r.setOpen(!0,D)}):r.setOpen(O,D);return}const M=S.currentTarget;v.request(()=>{const D=en(m,x,M);O&&w==="touch"&&h>0?_.start(h,()=>{r.setOpen(!0,D)}):r.setOpen(O,D)})},onClick(S){if(l==="mousedown-only")return;const w=g.current;if(l==="mousedown"&&w){g.current=void 0;return}if(vg(w,!0)&&f)return;const x=r.select("open"),E=i.current.openEvent,R=r.select("domReferenceElement")!==S.currentTarget,T=x&&R||!(x&&c&&(!(E&&d)||L7(E))),C=en(m,S.nativeEvent,S.currentTarget);T&&w==="touch"&&h>0?_.start(h,()=>{r.setOpen(!0,C)}):r.setOpen(T,C)},onKeyDown(){g.current=void 0}}),[i,l,f,r,d,c,v,_,h,m]);return j.useMemo(()=>s?{reference:b}:ka,[s,b])}function EN(e,t,r){let{reference:i,floating:s}=e;const l=gs(t),c=VM(t),f=qM(c),d=po(t),h=l==="y",m=i.x+i.width/2-s.width/2,g=i.y+i.height/2-s.height/2,v=i[f]/2-s[f]/2;let _;switch(d){case"top":_={x:m,y:i.y-s.height};break;case"bottom":_={x:m,y:i.y+i.height};break;case"right":_={x:i.x+i.width,y:g};break;case"left":_={x:i.x-s.width,y:g};break;default:_={x:i.x,y:i.y}}switch(Bf(t)){case"start":_[c]-=v*(r&&h?-1:1);break;case"end":_[c]+=v*(r&&h?-1:1);break}return _}const DSe=async(e,t,r)=>{const{placement:i="bottom",strategy:s="absolute",middleware:l=[],platform:c}=r,f=l.filter(Boolean),d=await(c.isRTL==null?void 0:c.isRTL(t));let h=await c.getElementRects({reference:e,floating:t,strategy:s}),{x:m,y:g}=EN(h,i,d),v=i,_={},b=0;for(let S=0;S<f.length;S++){const{name:w,fn:x}=f[S],{x:E,y:R,data:T,reset:C}=await x({x:m,y:g,initialPlacement:i,placement:v,strategy:s,middlewareData:_,rects:h,platform:c,elements:{reference:e,floating:t}});m=E??m,g=R??g,_={..._,[w]:{..._[w],...T}},C&&b<=50&&(b++,typeof C=="object"&&(C.placement&&(v=C.placement),C.rects&&(h=C.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:s}):C.rects),{x:m,y:g}=EN(h,v,d)),S=-1)}return{x:m,y:g,placement:v,strategy:s,middlewareData:_}};async function T1(e,t){var r;t===void 0&&(t={});const{x:i,y:s,platform:l,rects:c,elements:f,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:v=!1,padding:_=0}=Ic(t,e),b=U7(_),w=f[v?g==="floating"?"reference":"floating":g],x=jE(await l.getClippingRect({element:(r=await(l.isElement==null?void 0:l.isElement(w)))==null||r?w:w.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(f.floating)),boundary:h,rootBoundary:m,strategy:d})),E=g==="floating"?{x:i,y:s,width:c.floating.width,height:c.floating.height}:c.reference,R=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f.floating)),T=await(l.isElement==null?void 0:l.isElement(R))?await(l.getScale==null?void 0:l.getScale(R))||{x:1,y:1}:{x:1,y:1},C=jE(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:E,offsetParent:R,strategy:d}):E);return{top:(x.top-C.top+b.top)/T.y,bottom:(C.bottom-x.bottom+b.bottom)/T.y,left:(x.left-C.left+b.left)/T.x,right:(C.right-x.right+b.right)/T.x}}const NSe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,i;const{placement:s,middlewareData:l,rects:c,initialPlacement:f,platform:d,elements:h}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:S=!0,...w}=Ic(e,t);if((r=l.arrow)!=null&&r.alignmentOffset)return{};const x=po(s),E=gs(f),R=po(f)===f,T=await(d.isRTL==null?void 0:d.isRTL(h.floating)),C=v||(R||!S?[ME(f)]:Gbe(f)),O=b!=="none";!v&&O&&C.push(...Xbe(f,S,b,T));const M=[f,...C],D=await T1(t,w),U=[];let B=((i=l.flip)==null?void 0:i.overflows)||[];if(m&&U.push(D[x]),g){const ne=Hbe(s,c,T);U.push(D[ne[0]],D[ne[1]])}if(B=[...B,{placement:s,overflows:U}],!U.every(ne=>ne<=0)){var q,V;const ne=(((q=l.flip)==null?void 0:q.index)||0)+1,oe=M[ne];if(oe&&(!(g==="alignment"?E!==gs(oe):!1)||B.every(re=>gs(re.placement)===E?re.overflows[0]>0:!0)))return{data:{index:ne,overflows:B},reset:{placement:oe}};let K=(V=B.filter(ee=>ee.overflows[0]<=0).sort((ee,re)=>ee.overflows[1]-re.overflows[1])[0])==null?void 0:V.placement;if(!K)switch(_){case"bestFit":{var G;const ee=(G=B.filter(re=>{if(O){const ue=gs(re.placement);return ue===E||ue==="y"}return!0}).map(re=>[re.placement,re.overflows.filter(ue=>ue>0).reduce((ue,Q)=>ue+Q,0)]).sort((re,ue)=>re[1]-ue[1])[0])==null?void 0:G[0];ee&&(K=ee);break}case"initialPlacement":K=f;break}if(s!==K)return{reset:{placement:K}}}return{}}}};function xN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _N(e){return qbe.some(t=>e[t]>=0)}const zSe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:i="referenceHidden",...s}=Ic(e,t);switch(i){case"referenceHidden":{const l=await T1(t,{...s,elementContext:"reference"}),c=xN(l,r.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:_N(c)}}}case"escaped":{const l=await T1(t,{...s,altBoundary:!0}),c=xN(l,r.floating);return{data:{escapedOffsets:c,escaped:_N(c)}}}default:return{}}}}},_U=new Set(["left","top"]);async function $Se(e,t){const{placement:r,platform:i,elements:s}=e,l=await(i.isRTL==null?void 0:i.isRTL(s.floating)),c=po(r),f=Bf(r),d=gs(r)==="y",h=_U.has(c)?-1:1,m=l&&d?-1:1,g=Ic(t,e);let{mainAxis:v,crossAxis:_,alignmentAxis:b}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof b=="number"&&(_=f==="end"?b*-1:b),d?{x:_*m,y:v*h}:{x:v*h,y:_*m}}const PSe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,i;const{x:s,y:l,placement:c,middlewareData:f}=t,d=await $Se(t,e);return c===((r=f.offset)==null?void 0:r.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:s+d.x,y:l+d.y,data:{...d,placement:c}}}}},ISe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:i,placement:s}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:w=>{let{x,y:E}=w;return{x,y:E}}},...d}=Ic(e,t),h={x:r,y:i},m=await T1(t,d),g=gs(po(s)),v=UM(g);let _=h[v],b=h[g];if(l){const w=v==="y"?"top":"left",x=v==="y"?"bottom":"right",E=_+m[w],R=_-m[x];_=$O(E,_,R)}if(c){const w=g==="y"?"top":"left",x=g==="y"?"bottom":"right",E=b+m[w],R=b-m[x];b=$O(E,b,R)}const S=f.fn({...t,[v]:_,[g]:b});return{...S,data:{x:S.x-r,y:S.y-i,enabled:{[v]:l,[g]:c}}}}}},LSe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:i,placement:s,rects:l,middlewareData:c}=t,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=Ic(e,t),m={x:r,y:i},g=gs(s),v=UM(g);let _=m[v],b=m[g];const S=Ic(f,t),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const R=v==="y"?"height":"width",T=l.reference[v]-l.floating[R]+w.mainAxis,C=l.reference[v]+l.reference[R]-w.mainAxis;_<T?_=T:_>C&&(_=C)}if(h){var x,E;const R=v==="y"?"width":"height",T=_U.has(po(s)),C=l.reference[g]-l.floating[R]+(T&&((x=c.offset)==null?void 0:x[g])||0)+(T?0:w.crossAxis),O=l.reference[g]+l.reference[R]+(T?0:((E=c.offset)==null?void 0:E[g])||0)-(T?w.crossAxis:0);b<C?b=C:b>O&&(b=O)}return{[v]:_,[g]:b}}}},USe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,i;const{placement:s,rects:l,platform:c,elements:f}=t,{apply:d=()=>{},...h}=Ic(e,t),m=await T1(t,h),g=po(s),v=Bf(s),_=gs(s)==="y",{width:b,height:S}=l.floating;let w,x;g==="top"||g==="bottom"?(w=g,x=v===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(x=g,w=v==="end"?"top":"bottom");const E=S-m.top-m.bottom,R=b-m.left-m.right,T=bg(S-m[w],E),C=bg(b-m[x],R),O=!t.middlewareData.shift;let M=T,D=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(D=R),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(M=E),O&&!v){const B=es(m.left,0),q=es(m.right,0),V=es(m.top,0),G=es(m.bottom,0);_?D=b-2*(B!==0||q!==0?B+q:es(m.left,m.right)):M=S-2*(V!==0||G!==0?V+G:es(m.top,m.bottom))}await d({...t,availableWidth:D,availableHeight:M});const U=await c.getDimensions(f.floating);return b!==U.width||S!==U.height?{reset:{rects:!0}}:{}}}};function TU(e){const t=as(e);let r=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=Mr(e),l=s?e.offsetWidth:r,c=s?e.offsetHeight:i,f=AE(r)!==l||AE(i)!==c;return f&&(r=l,i=c),{width:r,height:i,$:f}}function YM(e){return Zn(e)?e:e.contextElement}function rg(e){const t=YM(e);if(!Mr(t))return Xl(1);const r=t.getBoundingClientRect(),{width:i,height:s,$:l}=TU(t);let c=(l?AE(r.width):r.width)/i,f=(l?AE(r.height):r.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const qSe=Xl(0);function CU(e){const t=ua(e);return!ux()||!t.visualViewport?qSe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VSe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ua(e)?!1:t}function Lp(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),l=YM(e);let c=Xl(1);t&&(i?Zn(i)&&(c=rg(i)):c=rg(e));const f=VSe(l,r,i)?CU(l):Xl(0);let d=(s.left+f.x)/c.x,h=(s.top+f.y)/c.y,m=s.width/c.x,g=s.height/c.y;if(l){const v=ua(l),_=i&&Zn(i)?ua(i):i;let b=v,S=qC(b);for(;S&&i&&_!==b;){const w=rg(S),x=S.getBoundingClientRect(),E=as(S),R=x.left+(S.clientLeft+parseFloat(E.paddingLeft))*w.x,T=x.top+(S.clientTop+parseFloat(E.paddingTop))*w.y;d*=w.x,h*=w.y,m*=w.x,g*=w.y,d+=R,h+=T,b=ua(S),S=qC(b)}}return jE({width:m,height:g,x:d,y:h})}function jx(e,t){const r=cx(e).scrollLeft;return t?t.left+r:Lp(ru(e)).left+r}function OU(e,t){const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-jx(e,r),s=r.top+t.scrollTop;return{x:i,y:s}}function FSe(e){let{elements:t,rect:r,offsetParent:i,strategy:s}=e;const l=s==="fixed",c=ru(i),f=t?lx(t.floating):!1;if(i===c||f&&l)return r;let d={scrollLeft:0,scrollTop:0},h=Xl(1);const m=Xl(0),g=Mr(i);if((g||!g&&!l)&&((Uf(i)!=="body"||qf(c))&&(d=cx(i)),Mr(i))){const _=Lp(i);h=rg(i),m.x=_.x+i.clientLeft,m.y=_.y+i.clientTop}const v=c&&!g&&!l?OU(c,d):Xl(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-d.scrollLeft*h.x+m.x+v.x,y:r.y*h.y-d.scrollTop*h.y+m.y+v.y}}function BSe(e){return Array.from(e.getClientRects())}function HSe(e){const t=ru(e),r=cx(e),i=e.ownerDocument.body,s=es(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=es(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let c=-r.scrollLeft+jx(e);const f=-r.scrollTop;return as(i).direction==="rtl"&&(c+=es(t.clientWidth,i.clientWidth)-s),{width:s,height:l,x:c,y:f}}const TN=25;function GSe(e,t){const r=ua(e),i=ru(e),s=r.visualViewport;let l=i.clientWidth,c=i.clientHeight,f=0,d=0;if(s){l=s.width,c=s.height;const m=ux();(!m||m&&t==="fixed")&&(f=s.offsetLeft,d=s.offsetTop)}const h=jx(i);if(h<=0){const m=i.ownerDocument,g=m.body,v=getComputedStyle(g),_=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,b=Math.abs(i.clientWidth-g.clientWidth-_);b<=TN&&(l-=b)}else h<=TN&&(l+=h);return{width:l,height:c,x:f,y:d}}const KSe=new Set(["absolute","fixed"]);function YSe(e,t){const r=Lp(e,!0,t==="fixed"),i=r.top+e.clientTop,s=r.left+e.clientLeft,l=Mr(e)?rg(e):Xl(1),c=e.clientWidth*l.x,f=e.clientHeight*l.y,d=s*l.x,h=i*l.y;return{width:c,height:f,x:d,y:h}}function CN(e,t,r){let i;if(t==="viewport")i=GSe(e,r);else if(t==="document")i=HSe(ru(e));else if(Zn(t))i=YSe(t,r);else{const s=CU(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return jE(i)}function RU(e,t){const r=Dc(e);return r===t||!Zn(r)||Mc(r)?!1:as(r).position==="fixed"||RU(r,t)}function ZSe(e,t){const r=t.get(e);if(r)return r;let i=yf(e,[],!1).filter(f=>Zn(f)&&Uf(f)!=="body"),s=null;const l=as(e).position==="fixed";let c=l?Dc(e):e;for(;Zn(c)&&!Mc(c);){const f=as(c),d=mA(c);!d&&f.position==="fixed"&&(s=null),(l?!d&&!s:!d&&f.position==="static"&&!!s&&KSe.has(s.position)||qf(c)&&!d&&RU(e,c))?i=i.filter(m=>m!==c):s=f,c=Dc(c)}return t.set(e,i),i}function XSe(e){let{element:t,boundary:r,rootBoundary:i,strategy:s}=e;const c=[...r==="clippingAncestors"?lx(t)?[]:ZSe(t,this._c):[].concat(r),i],f=c[0],d=c.reduce((h,m)=>{const g=CN(t,m,s);return h.top=es(g.top,h.top),h.right=bg(g.right,h.right),h.bottom=bg(g.bottom,h.bottom),h.left=es(g.left,h.left),h},CN(t,f,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function QSe(e){const{width:t,height:r}=TU(e);return{width:t,height:r}}function WSe(e,t,r){const i=Mr(t),s=ru(t),l=r==="fixed",c=Lp(e,!0,l,t);let f={scrollLeft:0,scrollTop:0};const d=Xl(0);function h(){d.x=jx(s)}if(i||!i&&!l)if((Uf(t)!=="body"||qf(s))&&(f=cx(t)),i){const _=Lp(t,!0,l,t);d.x=_.x+t.clientLeft,d.y=_.y+t.clientTop}else s&&h();l&&!i&&s&&h();const m=s&&!i&&!l?OU(s,f):Xl(0),g=c.left+f.scrollLeft-d.x-m.x,v=c.top+f.scrollTop-d.y-m.y;return{x:g,y:v,width:c.width,height:c.height}}function VT(e){return as(e).position==="static"}function ON(e,t){if(!Mr(e)||as(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ru(e)===r&&(r=r.ownerDocument.body),r}function AU(e,t){const r=ua(e);if(lx(e))return r;if(!Mr(e)){let s=Dc(e);for(;s&&!Mc(s);){if(Zn(s)&&!VT(s))return s;s=Dc(s)}return r}let i=ON(e,t);for(;i&&kae(i)&&VT(i);)i=ON(i,t);return i&&Mc(i)&&VT(i)&&!mA(i)?r:i||Pae(e)||r}const JSe=async function(e){const t=this.getOffsetParent||AU,r=this.getDimensions,i=await r(e.floating);return{reference:WSe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function ewe(e){return as(e).direction==="rtl"}const twe={convertOffsetParentRelativeRectToViewportRelativeRect:FSe,getDocumentElement:ru,getClippingRect:XSe,getOffsetParent:AU,getElementRects:JSe,getClientRects:BSe,getDimensions:QSe,getScale:rg,isElement:Zn,isRTL:ewe};function MU(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nwe(e,t){let r=null,i;const s=ru(e);function l(){var f;clearTimeout(i),(f=r)==null||f.disconnect(),r=null}function c(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),l();const h=e.getBoundingClientRect(),{left:m,top:g,width:v,height:_}=h;if(f||t(),!v||!_)return;const b=Fm(g),S=Fm(s.clientWidth-(m+v)),w=Fm(s.clientHeight-(g+_)),x=Fm(m),R={rootMargin:-b+"px "+-S+"px "+-w+"px "+-x+"px",threshold:es(0,bg(1,d))||1};let T=!0;function C(O){const M=O[0].intersectionRatio;if(M!==d){if(!T)return c();M?c(!1,M):i=setTimeout(()=>{c(!1,1e-7)},1e3)}M===1&&!MU(h,e.getBoundingClientRect())&&c(),T=!1}try{r=new IntersectionObserver(C,{...R,root:s.ownerDocument})}catch{r=new IntersectionObserver(C,R)}r.observe(e)}return c(!0),l}function RN(e,t,r,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,h=YM(e),m=s||l?[...h?yf(h):[],...yf(t)]:[];m.forEach(x=>{s&&x.addEventListener("scroll",r,{passive:!0}),l&&x.addEventListener("resize",r)});const g=h&&f?nwe(h,r):null;let v=-1,_=null;c&&(_=new ResizeObserver(x=>{let[E]=x;E&&E.target===h&&_&&(_.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var R;(R=_)==null||R.observe(t)})),r()}),h&&!d&&_.observe(h),_.observe(t));let b,S=d?Lp(e):null;d&&w();function w(){const x=Lp(e);S&&!MU(S,x)&&r(),S=x,b=requestAnimationFrame(w)}return r(),()=>{var x;m.forEach(E=>{s&&E.removeEventListener("scroll",r),l&&E.removeEventListener("resize",r)}),g?.(),(x=_)==null||x.disconnect(),_=null,d&&cancelAnimationFrame(b)}}const rwe=PSe,awe=ISe,iwe=NSe,owe=USe,swe=zSe,lwe=LSe,uwe=(e,t,r)=>{const i=new Map,s={platform:twe,...r},l={...s.platform,_c:i};return DSe(e,t,{...s,platform:l})};var cwe=typeof document<"u",fwe=function(){},Xw=cwe?j.useLayoutEffect:fwe;function $E(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,i,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(i=r;i--!==0;)if(!$E(e[i],t[i]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(t,s[i]))return!1;for(i=r;i--!==0;){const l=s[i];if(!(l==="_owner"&&e.$$typeof)&&!$E(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function jU(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function AN(e,t){const r=jU(e);return Math.round(t*r)/r}function FT(e){const t=j.useRef(e);return Xw(()=>{t.current=e}),t}function dwe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:i=[],platform:s,elements:{reference:l,floating:c}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[m,g]=j.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,_]=j.useState(i);$E(v,i)||_(i);const[b,S]=j.useState(null),[w,x]=j.useState(null),E=j.useCallback(re=>{re!==O.current&&(O.current=re,S(re))},[]),R=j.useCallback(re=>{re!==M.current&&(M.current=re,x(re))},[]),T=l||b,C=c||w,O=j.useRef(null),M=j.useRef(null),D=j.useRef(m),U=d!=null,B=FT(d),q=FT(s),V=FT(h),G=j.useCallback(()=>{if(!O.current||!M.current)return;const re={placement:t,strategy:r,middleware:v};q.current&&(re.platform=q.current),uwe(O.current,M.current,re).then(ue=>{const Q={...ue,isPositioned:V.current!==!1};ne.current&&!$E(D.current,Q)&&(D.current=Q,Es.flushSync(()=>{g(Q)}))})},[v,t,r,q,V]);Xw(()=>{h===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,g(re=>({...re,isPositioned:!1})))},[h]);const ne=j.useRef(!1);Xw(()=>(ne.current=!0,()=>{ne.current=!1}),[]),Xw(()=>{if(T&&(O.current=T),C&&(M.current=C),T&&C){if(B.current)return B.current(T,C,G);G()}},[T,C,G,B,U]);const oe=j.useMemo(()=>({reference:O,floating:M,setReference:E,setFloating:R}),[E,R]),K=j.useMemo(()=>({reference:T,floating:C}),[T,C]),ee=j.useMemo(()=>{const re={position:r,left:0,top:0};if(!K.floating)return re;const ue=AN(K.floating,m.x),Q=AN(K.floating,m.y);return f?{...re,transform:"translate("+ue+"px, "+Q+"px)",...jU(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ue,top:Q}},[r,f,K.floating,m.x,m.y]);return j.useMemo(()=>({...m,update:G,refs:oe,elements:K,floatingStyles:ee}),[m,G,oe,K,ee])}const hwe=(e,t)=>({...rwe(e),options:[e,t]}),pwe=(e,t)=>({...awe(e),options:[e,t]}),mwe=(e,t)=>({...lwe(e),options:[e,t]}),gwe=(e,t)=>({...iwe(e),options:[e,t]}),ywe=(e,t)=>({...owe(e),options:[e,t]}),vwe=(e,t)=>({...swe(e),options:[e,t]}),bwe={intentional:"onClick",sloppy:"onPointerDown"};function Swe(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function ZM(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingElement"),l=r.useState("referenceElement"),c=r.useState("domReferenceElement"),{onOpenChange:f,dataRef:d}=r.context,{enabled:h=!0,escapeKey:m=!0,outsidePress:g=!0,outsidePressEvent:v="sloppy",referencePress:_=!1,referencePressEvent:b="sloppy",ancestorScroll:S=!1,bubbles:w,externalTree:x}=t,E=Jp(x),R=Je(typeof g=="function"?g:()=>!1),T=typeof g=="function"?R:g,C=j.useRef(!1),{escapeKey:O,outsidePress:M}=Swe(w),D=j.useRef(null),U=ts(),B=ts(),q=Je(()=>{B.clear(),d.current.insideReactTree=!1}),V=j.useRef(!1),G=j.useRef(""),ne=Je(se=>{G.current=se.pointerType}),oe=Je(()=>{const se=G.current,ye=se==="pen"||!se?"mouse":se,be=typeof v=="function"?v():v;return typeof be=="string"?be:be[ye]}),K=Je(se=>{if(!i||!h||!m||se.key!=="Escape"||V.current)return;const ye=d.current.floatingContext?.nodeId,be=E?_p(E.nodesRef.current,ye):[];if(!O&&be.length>0){let Ie=!0;if(be.forEach($e=>{$e.context?.open&&!$e.context.dataRef.current.__escapeKeyBubbles&&(Ie=!1)}),!Ie)return}const Ae=Ube(se)?se.nativeEvent:se,Oe=en(R7,Ae);r.setOpen(!1,Oe),!O&&!Oe.isPropagationAllowed&&se.stopPropagation()}),ee=Je(se=>{const ye=oe();return ye==="intentional"&&se.type!=="click"||ye==="sloppy"&&se.type==="click"}),re=Je(()=>{d.current.insideReactTree=!0,B.start(0,q)}),ue=Je((se,ye=!1)=>{if(ee(se)){q();return}if(d.current.insideReactTree){q();return}if(oe()==="intentional"&&ye||typeof T=="function"&&!T(se))return;const be=Jo(se),Ae=`[${_1("inert")}]`,Oe=Rn(r.select("floatingElement")).querySelectorAll(Ae),Ie=r.context.triggerElements;if(be&&(Ie.hasElement(be)||Ie.hasMatchingElement(Ze=>on(Ze,be))))return;let $e=Zn(be)?be:null;for(;$e&&!Mc($e);){const Ze=Dc($e);if(Mc(Ze)||!Zn(Ze))break;$e=Ze}if(Oe.length&&Zn(be)&&!Lbe(be)&&!on(be,r.select("floatingElement"))&&Array.from(Oe).every(Ze=>!on($e,Ze)))return;if(Mr(be)&&!("touches"in se)){const Ze=Mc(be),ot=as(be),qe=/auto|scroll/,xn=Ze||qe.test(ot.overflowX),yn=Ze||qe.test(ot.overflowY),zn=xn&&be.clientWidth>0&&be.scrollWidth>be.clientWidth,Dt=yn&&be.clientHeight>0&&be.scrollHeight>be.clientHeight,Vt=ot.direction==="rtl",hn=Dt&&(Vt?se.offsetX<=be.offsetWidth-be.clientWidth:se.offsetX>be.clientWidth),Cn=zn&&se.offsetY>be.clientHeight;if(hn||Cn)return}const Ne=d.current.floatingContext?.nodeId,Ue=E&&_p(E.nodesRef.current,Ne).some(Ze=>pl(se,Ze.context?.elements.floating));if(pl(se,r.select("floatingElement"))||pl(se,r.select("domReferenceElement"))||Ue)return;const Re=E?_p(E.nodesRef.current,Ne):[];if(Re.length>0){let Ze=!0;if(Re.forEach(ot=>{ot.context?.open&&!ot.context.dataRef.current.__outsidePressBubbles&&(Ze=!1)}),!Ze)return}r.setOpen(!1,en($M,se)),q()}),Q=Je(se=>{oe()!=="sloppy"||se.pointerType==="touch"||!r.select("open")||!h||pl(se,r.select("floatingElement"))||pl(se,r.select("domReferenceElement"))||ue(se)}),z=Je(se=>{if(oe()!=="sloppy"||!r.select("open")||!h||pl(se,r.select("floatingElement"))||pl(se,r.select("domReferenceElement")))return;const ye=se.touches[0];ye&&(D.current={startTime:Date.now(),startX:ye.clientX,startY:ye.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},U.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}),L=Je(se=>{const ye=Jo(se);function be(){z(se),ye?.removeEventListener(se.type,be)}ye?.addEventListener(se.type,be)}),Y=Je(se=>{const ye=C.current;if(C.current=!1,U.clear(),se.type==="mousedown"&&D.current&&!D.current.dismissOnMouseDown)return;const be=Jo(se);function Ae(){se.type==="pointerdown"?Q(se):ue(se,ye),be?.removeEventListener(se.type,Ae)}be?.addEventListener(se.type,Ae)}),I=Je(se=>{if(oe()!=="sloppy"||!D.current||pl(se,r.select("floatingElement"))||pl(se,r.select("domReferenceElement")))return;const ye=se.touches[0];if(!ye)return;const be=Math.abs(ye.clientX-D.current.startX),Ae=Math.abs(ye.clientY-D.current.startY),Oe=Math.sqrt(be*be+Ae*Ae);Oe>5&&(D.current.dismissOnTouchEnd=!0),Oe>10&&(ue(se),U.clear(),D.current=null)}),X=Je(se=>{const ye=Jo(se);function be(){I(se),ye?.removeEventListener(se.type,be)}ye?.addEventListener(se.type,be)}),J=Je(se=>{oe()!=="sloppy"||!D.current||pl(se,r.select("floatingElement"))||pl(se,r.select("domReferenceElement"))||(D.current.dismissOnTouchEnd&&ue(se),U.clear(),D.current=null)}),he=Je(se=>{const ye=Jo(se);function be(){J(se),ye?.removeEventListener(se.type,be)}ye?.addEventListener(se.type,be)});j.useEffect(()=>{if(!i||!h)return;d.current.__escapeKeyBubbles=O,d.current.__outsidePressBubbles=M;const se=new eu;function ye($e){r.setOpen(!1,en(Df,$e))}function be(){se.clear(),V.current=!0}function Ae(){se.start(ux()?5:0,()=>{V.current=!1})}const Oe=Rn(s);Oe.addEventListener("pointerdown",ne,!0),m&&(Oe.addEventListener("keydown",K),Oe.addEventListener("compositionstart",be),Oe.addEventListener("compositionend",Ae)),T&&(Oe.addEventListener("click",Y,!0),Oe.addEventListener("pointerdown",Y,!0),Oe.addEventListener("touchstart",L,!0),Oe.addEventListener("touchmove",X,!0),Oe.addEventListener("touchend",he,!0),Oe.addEventListener("mousedown",Y,!0));let Ie=[];return S&&(Zn(c)&&(Ie=yf(c)),Zn(s)&&(Ie=Ie.concat(yf(s))),!Zn(l)&&l&&l.contextElement&&(Ie=Ie.concat(yf(l.contextElement)))),Ie=Ie.filter($e=>$e!==Oe.defaultView?.visualViewport),Ie.forEach($e=>{$e.addEventListener("scroll",ye,{passive:!0})}),()=>{Oe.removeEventListener("pointerdown",ne,!0),m&&(Oe.removeEventListener("keydown",K),Oe.removeEventListener("compositionstart",be),Oe.removeEventListener("compositionend",Ae)),T&&(Oe.removeEventListener("click",Y,!0),Oe.removeEventListener("pointerdown",Y,!0),Oe.removeEventListener("touchstart",L,!0),Oe.removeEventListener("touchmove",X,!0),Oe.removeEventListener("touchend",he,!0),Oe.removeEventListener("mousedown",Y,!0)),Ie.forEach($e=>{$e.removeEventListener("scroll",ye)}),se.clear(),C.current=!1}},[d,s,l,c,m,T,i,f,S,h,O,M,K,ue,Y,Q,L,X,he,ne,r]),j.useEffect(q,[T,q]);const xe=j.useMemo(()=>({onKeyDown:K,..._&&{[bwe[b]]:se=>{r.setOpen(!1,en(yg,se.nativeEvent))},...b!=="intentional"&&{onClick(se){r.setOpen(!1,en(yg,se.nativeEvent))}}}}),[K,r,_,b]),we=Je(se=>{const ye=Jo(se.nativeEvent);!on(r.select("floatingElement"),ye)||se.button!==0||(C.current=!0)}),je=Je(se=>{!i||!h||se.button!==0||(C.current=!0)}),de=j.useMemo(()=>({onKeyDown:K,onPointerDown:we,onMouseDown:we,onMouseUp:we,onClickCapture:re,onMouseDownCapture(se){re(),je(se)},onPointerDownCapture(se){re(),je(se)},onMouseUpCapture:re,onTouchEndCapture:re,onTouchMoveCapture:re}),[K,we,re,je]);return j.useMemo(()=>h?{reference:xe,floating:de,trigger:xe}:{},[h,xe,de])}var PE=Symbol("NOT_FOUND");function wwe(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Ewe(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function xwe(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(i=>typeof i=="function"?`function ${i.name||"unnamed"}()`:typeof i).join(", ");throw new TypeError(`${t}[${r}]`)}}var MN=e=>Array.isArray(e)?e:[e];function _we(e){const t=Array.isArray(e[0])?e[0]:e;return xwe(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Twe(e,t){const r=[],{length:i}=e;for(let s=0;s<i;s++)r.push(e[s].apply(null,t));return r}function Cwe(e){let t;return{get(r){return t&&e(t.key,r)?t.value:PE},put(r,i){t={key:r,value:i}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Owe(e,t){let r=[];function i(f){const d=r.findIndex(h=>t(f,h.key));if(d>-1){const h=r[d];return d>0&&(r.splice(d,1),r.unshift(h)),h.value}return PE}function s(f,d){i(f)===PE&&(r.unshift({key:f,value:d}),r.length>e&&r.pop())}function l(){return r}function c(){r=[]}return{get:i,put:s,getEntries:l,clear:c}}var Rwe=(e,t)=>e===t;function Awe(e){return function(r,i){if(r===null||i===null||r.length!==i.length)return!1;const{length:s}=r;for(let l=0;l<s;l++)if(!e(r[l],i[l]))return!1;return!0}}function Mwe(e,t){const r=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:i=Rwe,maxSize:s=1,resultEqualityCheck:l}=r,c=Awe(i);let f=0;const d=s<=1?Cwe(c):Owe(s,c);function h(){let m=d.get(arguments);if(m===PE){if(m=e.apply(null,arguments),f++,l){const v=d.getEntries().find(_=>l(_.value,m));v&&(m=v.value,f!==0&&f--)}d.put(arguments,m)}return m}return h.clearCache=()=>{d.clear(),h.resetResultsCount()},h.resultsCount=()=>f,h.resetResultsCount=()=>{f=0},h}var jwe=class{constructor(e){this.value=e}deref(){return this.value}},kwe=typeof WeakRef<"u"?WeakRef:jwe,Dwe=0,jN=1;function xw(){return{s:Dwe,v:void 0,o:null,p:null}}function kU(e,t={}){let r=xw();const{resultEqualityCheck:i}=t;let s,l=0;function c(){let f=r;const{length:d}=arguments;for(let g=0,v=d;g<v;g++){const _=arguments[g];if(typeof _=="function"||typeof _=="object"&&_!==null){let b=f.o;b===null&&(f.o=b=new WeakMap);const S=b.get(_);S===void 0?(f=xw(),b.set(_,f)):f=S}else{let b=f.p;b===null&&(f.p=b=new Map);const S=b.get(_);S===void 0?(f=xw(),b.set(_,f)):f=S}}const h=f;let m;if(f.s===jN)m=f.v;else if(m=e.apply(null,arguments),l++,i){const g=s?.deref?.()??s;g!=null&&i(g,m)&&(m=g,l!==0&&l--),s=typeof m=="object"&&m!==null||typeof m=="function"?new kwe(m):m}return h.s=jN,h.v=m,m}return c.clearCache=()=>{r=xw(),c.resetResultsCount()},c.resultsCount=()=>l,c.resetResultsCount=()=>{l=0},c}function DU(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,i=(...s)=>{let l=0,c=0,f,d={},h=s.pop();typeof h=="object"&&(d=h,h=s.pop()),wwe(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const m={...r,...d},{memoize:g,memoizeOptions:v=[],argsMemoize:_=kU,argsMemoizeOptions:b=[]}=m,S=MN(v),w=MN(b),x=_we(s),E=g(function(){return l++,h.apply(null,arguments)},...S),R=_(function(){c++;const C=Twe(x,arguments);return f=E.apply(null,C),f},...w);return Object.assign(R,{resultFunc:h,memoizedResultFunc:E,dependencies:x,dependencyRecomputations:()=>c,resetDependencyRecomputations:()=>{c=0},lastResult:()=>f,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:g,argsMemoize:_})};return Object.assign(i,{withTypes:()=>i}),i}var Nwe=DU(kU),zwe=Object.assign((e,t=Nwe)=>{Ewe(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),i=r.map(l=>e[l]);return t(i,(...l)=>l.reduce((c,f,d)=>(c[r[d]]=f,c),{}))},{withTypes:()=>zwe});DU({memoize:Mwe,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const it=(e,t,r,i,s,l,...c)=>{if(c.length>0)throw new Error(xi(1));let f;if(e)f=e;else throw new Error("Missing arguments");return f};var BT={exports:{}},HT={};var kN;function $we(){if(kN)return HT;kN=1;var e=_g();function t(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var r=typeof Object.is=="function"?Object.is:t,i=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue;function f(g,v){var _=v(),b=i({inst:{value:_,getSnapshot:v}}),S=b[0].inst,w=b[1];return l(function(){S.value=_,S.getSnapshot=v,d(S)&&w({inst:S})},[g,_,v]),s(function(){return d(S)&&w({inst:S}),g(function(){d(S)&&w({inst:S})})},[g]),c(_),_}function d(g){var v=g.getSnapshot;g=g.value;try{var _=v();return!r(g,_)}catch{return!0}}function h(g,v){return v()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return HT.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,HT}var DN;function NU(){return DN||(DN=1,BT.exports=$we()),BT.exports}var Pwe=NU(),GT={exports:{}},KT={};var NN;function Iwe(){if(NN)return KT;NN=1;var e=_g(),t=NU();function r(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var i=typeof Object.is=="function"?Object.is:r,s=t.useSyncExternalStore,l=e.useRef,c=e.useEffect,f=e.useMemo,d=e.useDebugValue;return KT.useSyncExternalStoreWithSelector=function(h,m,g,v,_){var b=l(null);if(b.current===null){var S={hasValue:!1,value:null};b.current=S}else S=b.current;b=f(function(){function x(O){if(!E){if(E=!0,R=O,O=v(O),_!==void 0&&S.hasValue){var M=S.value;if(_(M,O))return T=M}return T=O}if(M=T,i(R,O))return M;var D=v(O);return _!==void 0&&_(M,D)?(R=O,M):(R=O,T=D)}var E=!1,R,T,C=g===void 0?null:g;return[function(){return x(m())},C===null?void 0:function(){return x(C())}]},[m,g,v,_]);var w=s(h,b[0],b[1]);return c(function(){S.hasValue=!0,S.value=w},[w]),d(w),w},KT}var zN;function Lwe(){return zN||(zN=1,GT.exports=Iwe()),GT.exports}var Uwe=Lwe();const qwe=gA(19),Vwe=qwe?Bwe:Hwe;function jt(e,t,r,i,s){return Vwe(e,t,r,i,s)}function Fwe(e,t,r,i,s){const l=j.useCallback(()=>t(e.getSnapshot(),r,i,s),[e,t,r,i,s]);return Pwe.useSyncExternalStore(e.subscribe,l,l)}function Bwe(e,t,r,i,s){return Fwe(e,t,r,i,s)}function Hwe(e,t,r,i,s){return Uwe.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,l=>t(l,r,i,s))}class zU{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const r=this.updateTick;for(const i of this.listeners){if(r!==this.updateTick)return;i(t)}}update(t){for(const r in t)if(!Object.is(this.state[r],t[r])){this.setState({...this.state,...t});return}}set(t,r){Object.is(this.state[t],r)||this.setState({...this.state,[t]:r})}notifyAll(){const t={...this.state};this.setState(t)}use(t,r,i,s){return jt(this,t,r,i,s)}}class XM extends zU{constructor(t,r={},i){super(t),this.context=r,this.selectors=i}useSyncedValue(t,r){j.useDebugValue(t),at(()=>{this.state[t]!==r&&this.set(t,r)},[t,r])}useSyncedValueWithCleanup(t,r){const i=this;at(()=>(i.state[t]!==r&&i.set(t,r),()=>{i.set(t,void 0)}),[i,t,r])}useSyncedValues(t){const r=this,i=Object.values(t);at(()=>{r.update(t)},[r,...i])}useControlledProp(t,r){j.useDebugValue(t);const i=r!==void 0;at(()=>{i&&!Object.is(this.state[t],r)&&super.setState({...this.state,[t]:r})},[t,r,i])}select(t,r,i,s){const l=this.selectors[t];return l(this.state,r,i,s)}useState(t,r,i,s){return j.useDebugValue(t),jt(this,this.selectors[t],r,i,s)}useContextCallback(t,r){j.useDebugValue(t);const i=Je(r??fo);this.context[t]=i}useStateSetter(t){const r=j.useRef(void 0);return r.current===void 0&&(r.current=i=>{this.set(t,i)}),r.current}observe(t,r){let i;typeof t=="function"?i=t:i=this.selectors[t];let s=i(this.state);return r(s,s,this),this.subscribe(l=>{const c=i(l);if(!Object.is(s,c)){const f=s;s=c,r(c,f,this)}})}}const Gwe={open:it(e=>e.open),domReferenceElement:it(e=>e.domReferenceElement),referenceElement:it(e=>e.positionReference??e.referenceElement),floatingElement:it(e=>e.floatingElement),floatingId:it(e=>e.floatingId)};class QM extends XM{constructor(t){const{nested:r,noEmit:i,onOpenChange:s,triggerElements:l,...c}=t;super({...c,positionReference:c.referenceElement,domReferenceElement:c.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:mU(),nested:r,noEmit:i,triggerElements:l},Gwe)}setOpen=(t,r)=>{if((!t||!this.state.open||L7(r.event))&&(this.context.dataRef.current.openEvent=t?r.event:void 0),!this.context.noEmit){const i={open:t,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",i)}this.context.onOpenChange?.(t,r)}}function Kwe(e,t){const r=j.useRef(null),i=j.useRef(null);return j.useCallback(s=>{if(e!==void 0){if(r.current!==null){const l=r.current,c=i.current,f=t.context.triggerElements.getById(l);c&&f===c&&t.context.triggerElements.delete(l),r.current=null,i.current=null}s!==null&&(r.current=e,i.current=s,t.context.triggerElements.add(e,s))}},[t,e])}function Ywe(e,t,r,i){const s=r.useState("isMountedByTrigger",e),l=Kwe(e,r),c=Je(f=>{if(l(f),!f||!r.select("open"))return;const d=r.select("activeTriggerId");if(d===e){r.update({activeTriggerElement:f,...i});return}d==null&&r.update({activeTriggerId:e,activeTriggerElement:f,...i})});return at(()=>{s&&r.update({activeTriggerElement:t.current,...i})},[s,r,t,...Object.values(i)]),{registerTrigger:c,isMountedByThisTrigger:s}}function $U(e){const t=e.useState("open");at(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const r=e.context.triggerElements.entries().next();if(!r.done){const[i,s]=r.value;e.update({activeTriggerId:i,activeTriggerElement:s})}}},[t,e])}function PU(e,t,r){const{mounted:i,setMounted:s,transitionStatus:l}=iS(e);t.useSyncedValues({mounted:i,transitionStatus:l});const c=Je(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),r?.(),t.context.onOpenChangeComplete?.(!1)}),f=t.useState("preventUnmountingOnClose");return Hf({enabled:!f,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:l}}class kx{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,r){const i=this.idMap.get(t);i!==r&&(i!==void 0&&this.elementsSet.delete(i),this.elementsSet.add(r),this.idMap.set(t,r))}delete(t){const r=this.idMap.get(t);r&&(this.elementsSet.delete(r),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const r of this.elementsSet)if(t(r))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function Zwe(){return new QM({open:!1,floatingElement:null,referenceElement:null,triggerElements:new kx,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function IU(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:Zwe(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:ka,inactiveTriggerProps:ka,popupProps:ka}}const _w=it(e=>e.triggerIdProp??e.activeTriggerId),LU={open:it(e=>e.openProp??e.open),mounted:it(e=>e.mounted),transitionStatus:it(e=>e.transitionStatus),floatingRootContext:it(e=>e.floatingRootContext),preventUnmountingOnClose:it(e=>e.preventUnmountingOnClose),payload:it(e=>e.payload),activeTriggerId:_w,activeTriggerElement:it(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:it((e,t)=>t!==void 0&&_w(e)===t),isOpenedByTrigger:it((e,t)=>t!==void 0&&_w(e)===t&&e.open),isMountedByTrigger:it((e,t)=>t!==void 0&&_w(e)===t&&e.mounted),triggerProps:it((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:it(e=>e.popupProps),popupElement:it(e=>e.popupElement),positionerElement:it(e=>e.positionerElement)};function UU(e){const{open:t=!1,onOpenChange:r,elements:i={}}=e,s=Lg(),l=Gf()!=null,c=ki(()=>new QM({open:t,onOpenChange:r,referenceElement:i.reference??null,floatingElement:i.floating??null,triggerElements:new kx,floatingId:s,nested:l,noEmit:!1})).current;return at(()=>{const f={open:t,floatingId:s};i.reference!==void 0&&(f.referenceElement=i.reference,f.domReferenceElement=Zn(i.reference)?i.reference:null),i.floating!==void 0&&(f.floatingElement=i.floating),c.update(f)},[t,s,i.reference,i.floating,c]),c.context.onOpenChange=r,c.context.nested=l,c.context.noEmit=!1,c}function Xwe(e={}){const{nodeId:t,externalTree:r}=e,i=UU(e),s=e.rootContext||i,l={reference:s.useState("referenceElement"),floating:s.useState("floatingElement"),domReference:s.useState("domReferenceElement")},[c,f]=j.useState(null),d=j.useRef(null),h=Jp(r);at(()=>{l.domReference&&(d.current=l.domReference)},[l.domReference]);const m=dwe({...e,elements:{...l,...c&&{reference:c}}}),g=j.useCallback(M=>{const D=Zn(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),getClientRects:()=>M.getClientRects(),contextElement:M}:M;f(D),m.refs.setReference(D)},[m.refs]),[v,_]=j.useState(null),[b,S]=j.useState(null);s.useSyncedValue("referenceElement",v),s.useSyncedValue("domReferenceElement",Zn(v)?v:null),s.useSyncedValue("floatingElement",b);const w=j.useCallback(M=>{(Zn(M)||M===null)&&(d.current=M,_(M)),(Zn(m.refs.reference.current)||m.refs.reference.current===null||M!==null&&!Zn(M))&&m.refs.setReference(M)},[m.refs,_]),x=j.useCallback(M=>{S(M),m.refs.setFloating(M)},[m.refs]),E=j.useMemo(()=>({...m.refs,setReference:w,setFloating:x,setPositionReference:g,domReference:d}),[m.refs,w,x,g]),R=j.useMemo(()=>({...m.elements,domReference:l.domReference}),[m.elements,l.domReference]),T=s.useState("open"),C=s.useState("floatingId"),O=j.useMemo(()=>({...m,dataRef:s.context.dataRef,open:T,onOpenChange:s.setOpen,events:s.context.events,floatingId:C,refs:E,elements:R,nodeId:t,rootStore:s}),[m,E,R,t,s,T,C]);return at(()=>{s.context.dataRef.current.floatingContext=O;const M=h?.nodesRef.current.find(D=>D.id===t);M&&(M.context=O)}),j.useMemo(()=>({...m,context:O,refs:E,elements:R,rootStore:s}),[m,E,R,O,s])}function qU(e){const{popupStore:t,noEmit:r=!1,treatPopupAsFloatingElement:i=!1,onOpenChange:s}=e,l=Lg(),c=Gf()!=null,f=t.useState("open"),d=t.useState("activeTriggerElement"),h=t.useState(i?"popupElement":"positionerElement"),m=t.context.triggerElements,g=ki(()=>new QM({open:f,referenceElement:d,floatingElement:h,triggerElements:m,onOpenChange:s,floatingId:l,nested:c,noEmit:r})).current;return at(()=>{const v={open:f,floatingId:l,referenceElement:d,floatingElement:h};Zn(d)&&(v.domReferenceElement=d),g.state.positionReference===g.state.referenceElement&&(v.positionReference=d),g.update(v)},[f,l,d,h,g]),g.context.onOpenChange=s,g.context.nested=c,g.context.noEmit=r,g}const BO=_1("safe-polygon"),Qwe=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${z7}`;function Wwe(e){return e?!!e.closest(Qwe):!1}class WM{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.unbindMouseMove=()=>{},this.restTimeoutPending=!1,this.openChangeTimeout=new eu,this.restTimeout=new eu,this.handleCloseOptions=void 0}static create(){return new WM}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function VU(e){const t=ki(WM.create).current,r=e.context.dataRef.current;return r.hoverInteractionState||(r.hoverInteractionState=t),Cx(r.hoverInteractionState.disposeEffect),r.hoverInteractionState}const Jwe=new Set(["click","mousedown"]);function eEe(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingElement"),l=r.useState("domReferenceElement"),{dataRef:c}=r.context,{enabled:f=!0,closeDelay:d=0}=t,h=VU(r),m=Jp(),g=Gf(),v=Je(()=>h.interactedInside?!0:c.current.openEvent?Jwe.has(c.current.openEvent.type):!1),_=Je(()=>{const R=c.current.openEvent?.type;return R?.includes("mouse")&&R!=="mousedown"}),b=Je(R=>$7(R,r.context.triggerElements)),S=j.useCallback((R,T=!0)=>{const C=tEe(d,h.pointerType);C&&!h.handler?h.openChangeTimeout.start(C,()=>r.setOpen(!1,en(Wo,R))):T&&(h.openChangeTimeout.clear(),r.setOpen(!1,en(Wo,R)))},[d,r,h]),w=Je(()=>{h.unbindMouseMove(),h.handler=void 0}),x=Je(()=>{if(h.performedPointerEventsMutation){const R=Rn(s).body;R.style.pointerEvents="",R.removeAttribute(BO),h.performedPointerEventsMutation=!1}}),E=Je(R=>{const T=Jo(R);if(!Wwe(T)){h.interactedInside=!1;return}h.interactedInside=!0});at(()=>{i||(h.pointerType=void 0,h.restTimeoutPending=!1,h.interactedInside=!1,w(),x())},[i,h,w,x]),j.useEffect(()=>()=>{w()},[w]),j.useEffect(()=>x,[x]),at(()=>{if(f&&i&&h.handleCloseOptions?.blockPointerEvents&&_()&&Zn(l)&&s){h.performedPointerEventsMutation=!0;const R=Rn(s).body;R.setAttribute(BO,"");const T=l,C=s,O=m?.nodesRef.current.find(M=>M.id===g)?.context?.elements.floating;return O&&(O.style.pointerEvents=""),R.style.pointerEvents="none",T.style.pointerEvents="auto",C.style.pointerEvents="auto",()=>{R.style.pointerEvents="",T.style.pointerEvents="",C.style.pointerEvents=""}}},[f,i,l,s,h,_,m,g]),j.useEffect(()=>{if(!f)return;function R(M){v()||!c.current.floatingContext||!r.select("open")||b(M.relatedTarget)||(x(),w(),v()||S(M))}function T(M){h.openChangeTimeout.clear(),x(),h.handler?.(M),w()}function C(M){v()||S(M,!1)}const O=s;return O&&(O.addEventListener("mouseleave",R),O.addEventListener("mouseenter",T),O.addEventListener("mouseleave",C),O.addEventListener("pointerdown",E,!0)),()=>{O&&(O.removeEventListener("mouseleave",R),O.removeEventListener("mouseenter",T),O.removeEventListener("mouseleave",C),O.removeEventListener("pointerdown",E,!0))}},[f,s,r,c,v,b,S,x,w,E,h])}function tEe(e,t){return t&&!vg(t)?0:typeof e=="function"?e():e}function YT(e){return typeof e=="function"?e():e}const nEe={current:null};function rEe(e,t={}){const r="rootStore"in e?e.rootStore:e,{dataRef:i,events:s}=r.context,{enabled:l=!0,delay:c=0,handleClose:f=null,mouseOnly:d=!1,restMs:h=0,move:m=!0,triggerElementRef:g=nEe,externalTree:v,isActiveTrigger:_=!0}=t,b=Jp(v),S=VU(r),w=Ia(f),x=Ia(c),E=Ia(h),R=Ia(l);_&&(S.handleCloseOptions=w.current?.__options);const T=Je(()=>S.interactedInside?!0:i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1),C=Je(B=>$7(B,r.context.triggerElements)),O=j.useCallback((B,q=!0)=>{const V=LT(x.current,"close",S.pointerType);V&&!S.handler?S.openChangeTimeout.start(V,()=>r.setOpen(!1,en(Wo,B))):q&&(S.openChangeTimeout.clear(),r.setOpen(!1,en(Wo,B)))},[x,r,S]),M=Je(()=>{S.unbindMouseMove(),S.handler=void 0}),D=Je(()=>{if(S.performedPointerEventsMutation){const B=Rn(r.select("domReferenceElement")).body;B.style.pointerEvents="",B.removeAttribute(BO),S.performedPointerEventsMutation=!1}});j.useEffect(()=>{if(!l)return;function B(q){q.open||(S.openChangeTimeout.clear(),S.restTimeout.clear(),S.blockMouseMove=!0,S.restTimeoutPending=!1)}return s.on("openchange",B),()=>{s.off("openchange",B)}},[l,s,S]);const U=Je(B=>{if(T()||!i.current.floatingContext||C(B.relatedTarget))return;const q=g.current;w.current?.({...i.current.floatingContext,tree:b,x:B.clientX,y:B.clientY,onClose(){D(),M(),!T()&&q===r.select("domReferenceElement")&&O(B)}})(B)});return j.useEffect(()=>{if(!l)return;const B=g.current??(_?r.select("domReferenceElement"):null);if(!Zn(B))return;function q(ne){if(S.openChangeTimeout.clear(),S.blockMouseMove=!1,d&&!vg(S.pointerType)||YT(E.current)>0&&!LT(x.current,"open"))return;const oe=LT(x.current,"open",S.pointerType),K=r.select("domReferenceElement"),ee=r.context.triggerElements,re=(ee.hasElement(ne.target)||ee.hasMatchingElement(L=>on(L,ne.target)))&&(!K||!on(K,ne.target)),ue=ne.currentTarget??null,Q=r.select("open"),z=!Q||re;re&&Q?r.setOpen(!0,en(Wo,ne,ue)):oe?S.openChangeTimeout.start(oe,()=>{z&&r.setOpen(!0,en(Wo,ne,ue))}):z&&r.setOpen(!0,en(Wo,ne,ue))}function V(ne){if(T()){D();return}S.unbindMouseMove();const oe=r.select("domReferenceElement"),K=Rn(oe);if(S.restTimeout.clear(),S.restTimeoutPending=!1,C(ne.relatedTarget))return;if(w.current&&i.current.floatingContext){r.select("open")||S.openChangeTimeout.clear();const re=g.current;S.handler=w.current({...i.current.floatingContext,tree:b,x:ne.clientX,y:ne.clientY,onClose(){D(),M(),R.current&&!T()&&re===r.select("domReferenceElement")&&O(ne,!0)}});const ue=S.handler;ue(ne),K.addEventListener("mousemove",ue),S.unbindMouseMove=()=>{K.removeEventListener("mousemove",ue)};return}(S.pointerType!=="touch"||!on(r.select("floatingElement"),ne.relatedTarget))&&O(ne)}function G(ne){U(ne)}return r.select("open")&&B.addEventListener("mouseleave",G),m&&B.addEventListener("mousemove",q,{once:!0}),B.addEventListener("mouseenter",q),B.addEventListener("mouseleave",V),()=>{B.removeEventListener("mouseleave",G),m&&B.removeEventListener("mousemove",q),B.removeEventListener("mouseenter",q),B.removeEventListener("mouseleave",V)}},[M,D,i,x,O,r,l,w,U,S,_,T,C,d,m,E,g,b,R]),j.useMemo(()=>{if(!l)return;function B(q){S.pointerType=q.pointerType}return{onPointerDown:B,onPointerEnter:B,onMouseMove(q){const{nativeEvent:V}=q,G=q.currentTarget,ne=r.select("domReferenceElement"),oe=r.context.triggerElements,K=r.select("open"),ee=(oe.hasElement(q.target)||oe.hasMatchingElement(ue=>on(ue,q.target)))&&(!ne||!on(ne,q.target));if(d&&!vg(S.pointerType)||K&&!ee||YT(E.current)===0||!ee&&S.restTimeoutPending&&q.movementX**2+q.movementY**2<2)return;S.restTimeout.clear();function re(){if(S.restTimeoutPending=!1,T())return;const ue=r.select("open");!S.blockMouseMove&&(!ue||ee)&&r.setOpen(!0,en(Wo,V,G))}S.pointerType==="touch"?Es.flushSync(()=>{re()}):ee&&K?re():(S.restTimeoutPending=!0,S.restTimeout.start(YT(E.current),re))}}},[l,S,T,d,r,E])}function Dx(e=[]){const t=e.map(h=>h?.reference),r=e.map(h=>h?.floating),i=e.map(h=>h?.item),s=e.map(h=>h?.trigger),l=j.useCallback(h=>Tw(h,e,"reference"),t),c=j.useCallback(h=>Tw(h,e,"floating"),r),f=j.useCallback(h=>Tw(h,e,"item"),i),d=j.useCallback(h=>Tw(h,e,"trigger"),s);return j.useMemo(()=>({getReferenceProps:l,getFloatingProps:c,getItemProps:f,getTriggerProps:d}),[l,c,f,d])}function Tw(e,t,r){const i=new Map,s=r==="item",l={};r==="floating"&&(l.tabIndex=-1,l[NO]="");for(const c in e)s&&e&&(c===D7||c===N7)||(l[c]=e[c]);for(let c=0;c<t.length;c+=1){let f;const d=t[c]?.[r];typeof d=="function"?f=e?d(e):null:f=d,f&&$N(l,f,s,i)}return $N(l,e,s,i),l}function $N(e,t,r,i){for(const s in t){const l=t[s];r&&(s===D7||s===N7)||(s.startsWith("on")?(i.has(s)||i.set(s,[]),typeof l=="function"&&(i.get(s)?.push(l),e[s]=(...c)=>i.get(s)?.map(f=>f(...c)).find(f=>f!==void 0))):e[s]=l)}}const aEe="Escape";function Nx(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function Cw(e,t){return Nx(t,e===IM||e===rS,e===Ef||e===xf)}function ZT(e,t,r){return Nx(t,e===rS,r?e===Ef:e===xf)||e==="Enter"||e===" "||e===""}function iEe(e,t,r){return Nx(t,r?e===Ef:e===xf,e===rS)}function oEe(e,t,r,i){const s=r?e===xf:e===Ef,l=e===IM;return t==="both"||t==="horizontal"&&i&&i>1?e===aEe:Nx(t,s,l)}function sEe(e,t){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingElement"),l=r.useState("domReferenceElement"),c=r.context.dataRef,{listRef:f,activeIndex:d,onNavigate:h=()=>{},enabled:m=!0,selectedIndex:g=null,allowEscape:v=!1,loopFocus:_=!1,nested:b=!1,rtl:S=!1,virtual:w=!1,focusItemOnOpen:x="auto",focusItemOnHover:E=!0,openOnArrowKeyDown:R=!0,disabledIndices:T=void 0,orientation:C="vertical",parentOrientation:O,cols:M=1,id:D,resetOnPointerLeave:U=!0,externalTree:B}=t,q=w1(s),V=Ia(q),G=Gf(),ne=Jp(B);at(()=>{c.current.orientation=C},[c,C]);const oe=zO(l),K=j.useRef(x),ee=j.useRef(g??-1),re=j.useRef(null),ue=j.useRef(!0),Q=Je(Ne=>{h(ee.current===-1?null:ee.current,Ne)}),z=j.useRef(Q),L=j.useRef(!!s),Y=j.useRef(i),I=j.useRef(!1),X=j.useRef(!1),J=Ia(T),he=Ia(i),xe=Ia(g),we=Ia(U),je=Je(()=>{function Ne(ot){w?ne?.events.emit("virtualfocus",ot):Jb(ot,{sync:I.current,preventScroll:!0})}const Ue=f.current[ee.current],Re=X.current;Ue&&Ne(Ue),(I.current?ot=>ot():requestAnimationFrame)(()=>{const ot=f.current[ee.current]||Ue;if(!ot)return;Ue||Ne(ot),se&&(Re||!ue.current)&&ot.scrollIntoView?.({block:"nearest",inline:"nearest"})})});at(()=>{m&&(i&&s?(ee.current=g??-1,K.current&&g!=null&&(X.current=!0,Q())):L.current&&(ee.current=-1,z.current()))},[m,i,s,g,Q]),at(()=>{if(m){if(!i){I.current=!1;return}if(s)if(d==null){if(I.current=!1,xe.current!=null)return;if(L.current&&(ee.current=-1,je()),(!Y.current||!L.current)&&K.current&&(re.current!=null||K.current===!0&&re.current==null)){let Ne=0;const Ue=()=>{f.current[0]==null?(Ne<2&&(Ne?requestAnimationFrame:queueMicrotask)(Ue),Ne+=1):(ee.current=re.current==null||ZT(re.current,C,S)||b?Yw(f):IO(f),re.current=null,Q())};Ue()}}else Wm(f,d)||(ee.current=d,je(),X.current=!1)}},[m,i,s,d,xe,b,f,C,S,Q,je,J]),at(()=>{if(!m||s||!ne||w||!L.current)return;const Ne=ne.nodesRef.current,Ue=Ne.find(ot=>ot.id===G)?.context?.elements.floating,Re=yl(Rn(s)),Ze=Ne.some(ot=>ot.context&&on(ot.context.elements.floating,Re));Ue&&!Ze&&ue.current&&Ue.focus({preventScroll:!0})},[m,s,ne,G,w]),at(()=>{z.current=Q,Y.current=i,L.current=!!s}),at(()=>{i||(re.current=null,K.current=x)},[i,x]);const de=d!=null,se=j.useMemo(()=>{function Ne(Re){if(!he.current)return;const Ze=f.current.indexOf(Re.currentTarget);Ze!==-1&&ee.current!==Ze&&(ee.current=Ze,Q(Re))}return{onFocus(Re){I.current=!0,Ne(Re)},onClick:({currentTarget:Re})=>Re.focus({preventScroll:!0}),onMouseMove(Re){I.current=!0,X.current=!1,E&&Ne(Re)},onPointerLeave(Re){if(!he.current||!ue.current||Re.pointerType==="touch")return;I.current=!0;const Ze=Re.relatedTarget;!E||f.current.includes(Ze)||we.current&&(Jb(null,{sync:!0}),ee.current=-1,Q(Re),w||V.current?.focus({preventScroll:!0}))}}},[he,V,E,f,Q,we,w]),ye=j.useCallback(()=>O??ne?.nodesRef.current.find(Ne=>Ne.id===G)?.context?.dataRef?.current.orientation,[G,ne,O]),be=Je(Ne=>{if(ue.current=!1,I.current=!0,Ne.which===229||!he.current&&Ne.currentTarget===V.current)return;if(b&&oEe(Ne.key,C,S,M)){Cw(Ne.key,ye())||Mi(Ne),r.setOpen(!1,en($T,Ne.nativeEvent)),Mr(l)&&(w?ne?.events.emit("virtualfocus",l):l.focus());return}const Ue=ee.current,Re=Yw(f,T),Ze=IO(f,T);if(oe||(Ne.key==="Home"&&(Mi(Ne),ee.current=Re,Q(Ne)),Ne.key==="End"&&(Mi(Ne),ee.current=Ze,Q(Ne))),M>1){const ot=Array.from({length:f.current.length},()=>({width:1,height:1})),qe=V7(ot,M,!1),xn=qe.findIndex(Dt=>Dt!=null&&!_f(f,Dt,T)),yn=qe.reduce((Dt,Vt,hn)=>Vt!=null&&!_f(f,Vt,T)?hn:Dt,-1),zn=qe[q7({current:qe.map(Dt=>Dt!=null?f.current[Dt]:null)},{event:Ne,orientation:C,loopFocus:_,rtl:S,cols:M,disabledIndices:B7([...(typeof T!="function"?T:null)||f.current.map((Dt,Vt)=>_f(f,Vt,T)?Vt:void 0),void 0],qe),minIndex:xn,maxIndex:yn,prevIndex:F7(ee.current>Ze?Re:ee.current,ot,qe,M,Ne.key===rS?"bl":Ne.key===(S?Ef:xf)?"tr":"tl"),stopEvent:!0})];if(zn!=null&&(ee.current=zn,Q(Ne)),C==="both")return}if(Cw(Ne.key,C)){if(Mi(Ne),i&&!w&&yl(Ne.currentTarget.ownerDocument)===Ne.currentTarget){ee.current=ZT(Ne.key,C,S)?Re:Ze,Q(Ne);return}ZT(Ne.key,C,S)?_?Ue>=Ze?v&&Ue!==f.current.length?ee.current=-1:(I.current=!1,ee.current=Re):ee.current=mi(f,{startingIndex:Ue,disabledIndices:T}):ee.current=Math.min(Ze,mi(f,{startingIndex:Ue,disabledIndices:T})):_?Ue<=Re?v&&Ue!==-1?ee.current=f.current.length:(I.current=!1,ee.current=Ze):ee.current=mi(f,{startingIndex:Ue,decrement:!0,disabledIndices:T}):ee.current=Math.max(Re,mi(f,{startingIndex:Ue,decrement:!0,disabledIndices:T})),Wm(f,ee.current)&&(ee.current=-1),Q(Ne)}}),Ae=j.useMemo(()=>w&&i&&de&&{"aria-activedescendant":`${D}-${d}`},[w,i,de,D,d]),Oe=j.useMemo(()=>({"aria-orientation":C==="both"?void 0:C,...oe?{}:Ae,onKeyDown(Ne){if(Ne.key==="Tab"&&Ne.shiftKey&&i&&!w){const Ue=Jo(Ne.nativeEvent);if(Ue&&!on(V.current,Ue))return;Mi(Ne),r.setOpen(!1,en(Ip,Ne.nativeEvent)),Mr(l)&&l.focus();return}be(Ne)},onPointerMove(){ue.current=!0}}),[Ae,be,V,C,oe,r,i,w,l]),Ie=j.useMemo(()=>{function Ne(Re){x==="auto"&&P7(Re.nativeEvent)&&(K.current=!w)}function Ue(Re){K.current=x,x==="auto"&&I7(Re.nativeEvent)&&(K.current=!0)}return{onKeyDown(Re){const Ze=r.select("open");ue.current=!1;const ot=Re.key.startsWith("Arrow"),qe=iEe(Re.key,ye(),S),xn=Cw(Re.key,C),yn=(b?qe:xn)||Re.key==="Enter"||Re.key.trim()==="";if(w&&Ze)return be(Re);if(!(!Ze&&!R&&ot)){if(yn){const zn=Cw(Re.key,ye());re.current=b&&zn?null:Re.key}if(b){qe&&(Mi(Re),Ze?(ee.current=Yw(f,J.current),Q(Re)):r.setOpen(!0,en($T,Re.nativeEvent,Re.currentTarget)));return}xn&&(xe.current!=null&&(ee.current=xe.current),Mi(Re),!Ze&&R?r.setOpen(!0,en($T,Re.nativeEvent,Re.currentTarget)):be(Re),Ze&&Q(Re))}},onFocus(Re){r.select("open")&&!w&&(ee.current=-1,Q(Re))},onPointerDown:Ue,onPointerEnter:Ue,onMouseDown:Ne,onClick:Ne}},[be,J,x,f,b,Q,r,R,C,ye,S,xe,w]),$e=j.useMemo(()=>({...Ae,...Ie}),[Ae,Ie]);return j.useMemo(()=>m?{reference:$e,floating:Oe,item:se,trigger:Ie}:{},[m,$e,Oe,Ie,se])}const lEe=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function FU(e,t={}){const r="rootStore"in e?e.rootStore:e,i=r.useState("open"),s=r.useState("floatingId"),l=r.useState("domReferenceElement"),c=r.useState("floatingElement"),{role:f="dialog"}=t,d=Lg(),h=l?.id||d,m=j.useMemo(()=>w1(c)?.id||s,[c,s]),g=lEe.get(f)??f,_=Gf()!=null,b=j.useMemo(()=>g==="tooltip"||f==="label"?ka:{"aria-haspopup":g==="alertdialog"?"dialog":g,"aria-expanded":"false",...g==="listbox"&&{role:"combobox"},...g==="menu"&&_&&{role:"menuitem"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[g,_,f]),S=j.useMemo(()=>g==="tooltip"||f==="label"?{[`aria-${f==="label"?"labelledby":"describedby"}`]:i?m:void 0}:{...b,"aria-expanded":i?"true":"false","aria-controls":i?m:void 0,...g==="menu"&&{id:h}},[g,m,i,h,f,b]),w=j.useMemo(()=>{const E={id:m,...g&&{role:g}};return g==="tooltip"||f==="label"?E:{...E,...g==="menu"&&{"aria-labelledby":h}}},[g,m,h,f]),x=j.useCallback(({active:E,selected:R})=>{const T={role:"option",...E&&{id:`${m}-fui-option`}};switch(f){case"select":case"combobox":return{...T,"aria-selected":R}}return{}},[m,f]);return j.useMemo(()=>({reference:S,floating:w,item:x,trigger:b}),[S,w,b,x])}function uEe(e,t){const r="rootStore"in e?e.rootStore:e,i=r.context.dataRef,s=r.useState("open"),{listRef:l,activeIndex:c,onMatch:f,onTypingChange:d,enabled:h=!0,resetMs:m=750,selectedIndex:g=null}=t,v=ts(),_=j.useRef(""),b=j.useRef(g??c??-1),S=j.useRef(null);at(()=>{!s&&g!==null||(v.clear(),S.current=null,_.current!==""&&(_.current=""))},[s,g,v]),at(()=>{s&&_.current===""&&(b.current=g??c??-1)},[s,g,c]);const w=Je(C=>{C?i.current.typing||(i.current.typing=C,d?.(C)):i.current.typing&&(i.current.typing=C,d?.(C))}),x=Je(C=>{function O(V,G,ne){const oe=G.find(K=>K?.toLocaleLowerCase().indexOf(ne.toLocaleLowerCase())===0);return oe?V.indexOf(oe):-1}const M=l.current;if(_.current.length>0&&_.current[0]!==" "&&(O(M,M,_.current)===-1?w(!1):C.key===" "&&Mi(C)),M==null||C.key.length!==1||C.ctrlKey||C.metaKey||C.altKey)return;s&&C.key!==" "&&(Mi(C),w(!0));const D=_.current==="";D&&(b.current=g??c??-1),M.every(V=>V?V[0]?.toLocaleLowerCase()!==V[1]?.toLocaleLowerCase():!0)&&_.current===C.key&&(_.current="",b.current=S.current),_.current+=C.key,v.start(m,()=>{_.current="",b.current=S.current,w(!1)});const B=D?g??c??-1:b.current,q=O(M,[...M.slice((B||0)+1),...M.slice(0,(B||0)+1)],_.current);q!==-1?(f?.(q),S.current=q):C.key!==" "&&(_.current="",w(!1))}),E=Je(C=>{const O=C.relatedTarget,M=r.select("domReferenceElement"),D=r.select("floatingElement"),U=on(M,O),B=on(D,O);U||B||(v.clear(),_.current="",b.current=S.current,w(!1))}),R=j.useMemo(()=>({onKeyDown:x,onBlur:E}),[x,E]),T=j.useMemo(()=>({onKeyDown:x,onKeyUp(C){C.key===" "&&w(!1)},onBlur:E}),[x,E,w]);return j.useMemo(()=>h?{reference:R,floating:T}:{},[h,R,T])}function PN(e,t){const[r,i]=e;let s=!1;const l=t.length;for(let c=0,f=l-1;c<l;f=c++){const[d,h]=t[c]||[0,0],[m,g]=t[f]||[0,0];h>=i!=g>=i&&r<=(m-d)*(i-h)/(g-h)+d&&(s=!s)}return s}function cEe(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function fEe(e={}){const{buffer:t=.5,blockPointerEvents:r=!1,requireIntent:i=!0}=e,s=new eu;let l=!1,c=null,f=null,d=typeof performance<"u"?performance.now():0;function h(g,v){const _=performance.now(),b=_-d;if(c===null||f===null||b===0)return c=g,f=v,d=_,null;const S=g-c,w=v-f,E=Math.sqrt(S*S+w*w)/b;return c=g,f=v,d=_,E}const m=({x:g,y:v,placement:_,elements:b,onClose:S,nodeId:w,tree:x})=>function(R){function T(){s.clear(),S()}if(s.clear(),!b.domReference||!b.floating||_==null||g==null||v==null)return;const{clientX:C,clientY:O}=R,M=[C,O],D=Jo(R),U=R.type==="mouseleave",B=on(b.floating,D),q=on(b.domReference,D),V=b.domReference.getBoundingClientRect(),G=b.floating.getBoundingClientRect(),ne=_.split("-")[0],oe=g>G.right-G.width/2,K=v>G.bottom-G.height/2,ee=cEe(M,V),re=G.width>V.width,ue=G.height>V.height,Q=(re?V:G).left,z=(re?V:G).right,L=(ue?V:G).top,Y=(ue?V:G).bottom;if(B&&(l=!0,!U))return;if(q&&(l=!1),q&&!U){l=!0;return}if(U&&Zn(R.relatedTarget)&&on(b.floating,R.relatedTarget)||x&&_p(x.nodesRef.current,w).some(({context:J})=>J?.open))return;if(ne==="top"&&v>=V.bottom-1||ne==="bottom"&&v<=V.top+1||ne==="left"&&g>=V.right-1||ne==="right"&&g<=V.left+1)return T();let I=[];switch(ne){case"top":I=[[Q,V.top+1],[Q,G.bottom-1],[z,G.bottom-1],[z,V.top+1]];break;case"bottom":I=[[Q,G.top+1],[Q,V.bottom-1],[z,V.bottom-1],[z,G.top+1]];break;case"left":I=[[G.right-1,Y],[G.right-1,L],[V.left+1,L],[V.left+1,Y]];break;case"right":I=[[V.right-1,Y],[V.right-1,L],[G.left+1,L],[G.left+1,Y]];break}function X([J,he]){switch(ne){case"top":{const xe=[re?J+t/2:oe?J+t*4:J-t*4,he+t+1],we=[re?J-t/2:oe?J+t*4:J-t*4,he+t+1],je=[[G.left,oe||re?G.bottom-t:G.top],[G.right,oe?re?G.bottom-t:G.top:G.bottom-t]];return[xe,we,...je]}case"bottom":{const xe=[re?J+t/2:oe?J+t*4:J-t*4,he-t],we=[re?J-t/2:oe?J+t*4:J-t*4,he-t],je=[[G.left,oe||re?G.top+t:G.bottom],[G.right,oe?re?G.top+t:G.bottom:G.top+t]];return[xe,we,...je]}case"left":{const xe=[J+t+1,ue?he+t/2:K?he+t*4:he-t*4],we=[J+t+1,ue?he-t/2:K?he+t*4:he-t*4];return[...[[K||ue?G.right-t:G.left,G.top],[K?ue?G.right-t:G.left:G.right-t,G.bottom]],xe,we]}case"right":{const xe=[J-t,ue?he+t/2:K?he+t*4:he-t*4],we=[J-t,ue?he-t/2:K?he+t*4:he-t*4],je=[[K||ue?G.left+t:G.right,G.top],[K?ue?G.left+t:G.right:G.left+t,G.bottom]];return[xe,we,...je]}default:return[]}}if(!PN([C,O],I)){if(l&&!ee)return T();if(!U&&i){const J=h(R.clientX,R.clientY);if(J!==null&&J<.1)return T()}PN([C,O],X([g,v]))?!l&&i&&s.start(40,T):T()}};return m.__options={blockPointerEvents:r},m}let dEe=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),hEe=(function(e){return e[e.open=wp.open]="open",e[e.closed=wp.closed]="closed",e[e.startingStyle=wp.startingStyle]="startingStyle",e[e.endingStyle=wp.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const BU=j.createContext(void 0);function pEe(){const e=j.useContext(BU);if(e===void 0)throw new Error(xi(26));return e}const mEe={...Hg,...Fg,nestedDialogOpen(e){return e?{[hEe.nestedDialogOpen]:""}:null}},gEe=j.forwardRef(function(t,r){const{className:i,finalFocus:s,initialFocus:l,render:c,...f}=t,{store:d}=Bg(),h=d.useState("descriptionElementId"),m=d.useState("disablePointerDismissal"),g=d.useState("floatingRootContext"),v=d.useState("popupProps"),_=d.useState("modal"),b=d.useState("mounted"),S=d.useState("nested"),w=d.useState("nestedOpenDialogCount"),x=d.useState("open"),E=d.useState("openMethod"),R=d.useState("titleElementId"),T=d.useState("transitionStatus"),C=d.useState("role");pEe(),Hf({open:x,ref:d.context.popupRef,onComplete(){x&&d.context.onOpenChangeComplete?.(!0)}});function O(q){return q==="touch"?d.context.popupRef.current:!0}const M=l===void 0?O:l,D=w>0,B=sr("div",t,{state:{open:x,nested:S,transitionStatus:T,nestedDialogOpen:D},props:[v,{"aria-labelledby":R??void 0,"aria-describedby":h??void 0,role:C,tabIndex:-1,hidden:!b,onKeyDown(q){BM.has(q.key)&&q.stopPropagation()},style:{[dEe.nestedDialogs]:w}},f],ref:[r,d.context.popupRef,d.useStateSetter("popupElement")],stateAttributesMapping:mEe});return k.jsx(KM,{context:g,openInteractionType:E,disabled:!b,closeOnFocusOut:!m,initialFocus:M,returnFocus:s,modal:_!==!1,restoreFocus:"popup",children:B})}),JM=j.forwardRef(function(t,r){const{cutout:i,...s}=t;let l;if(i){const c=i?.getBoundingClientRect();l=`polygon(
|
|
140
|
+
0% 0%,
|
|
141
|
+
100% 0%,
|
|
142
|
+
100% 100%,
|
|
143
|
+
0% 100%,
|
|
144
|
+
0% 0%,
|
|
145
|
+
${c.left}px ${c.top}px,
|
|
146
|
+
${c.left}px ${c.bottom}px,
|
|
147
|
+
${c.right}px ${c.bottom}px,
|
|
148
|
+
${c.right}px ${c.top}px,
|
|
149
|
+
${c.left}px ${c.top}px
|
|
150
|
+
)`}return k.jsx("div",{ref:r,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:l}})}),yEe=j.forwardRef(function(t,r){const{keepMounted:i=!1,...s}=t,{store:l}=Bg(),c=l.useState("mounted"),f=l.useState("modal"),d=l.useState("open");return c||i?k.jsx(BU.Provider,{value:i,children:k.jsxs(HM,{ref:r,...s,children:[c&&f===!0&&k.jsx(JM,{ref:l.context.internalBackdropRef,inert:Ox(!d)}),t.children]})}):null});function e5(e){const t=j.useRef(!0);t.current&&(t.current=!1,e())}let IN={},LN={},UN="";function vEe(e){if(typeof document>"u")return!1;const t=Rn(e);return ua(t).innerWidth-t.documentElement.clientWidth>0}function bEe(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=Rn(e),i=r.documentElement,s=r.body,l=qf(i)?i:s,c=l.style.overflowY,f=i.style.scrollbarGutter;i.style.scrollbarGutter="stable",l.style.overflowY="scroll";const d=l.offsetWidth;l.style.overflowY="hidden";const h=l.offsetWidth;return l.style.overflowY=c,i.style.scrollbarGutter=f,d===h}function SEe(e){const t=Rn(e),r=t.documentElement,i=t.body,s=qf(r)?r:i,l={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,l)}}function wEe(e){const t=Rn(e),r=t.documentElement,i=t.body,s=ua(r);let l=0,c=0,f=!1;const d=ql.create();if(PM&&(s.visualViewport?.scale??1)!==1)return()=>{};function h(){const v=s.getComputedStyle(r),_=s.getComputedStyle(i),w=(v.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";l=r.scrollTop,c=r.scrollLeft,IN={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY,overflowX:r.style.overflowX},UN=r.style.scrollBehavior,LN={position:i.style.position,height:i.style.height,width:i.style.width,boxSizing:i.style.boxSizing,overflowY:i.style.overflowY,overflowX:i.style.overflowX,scrollBehavior:i.style.scrollBehavior};const x=r.scrollHeight>r.clientHeight,E=r.scrollWidth>r.clientWidth,R=v.overflowY==="scroll"||_.overflowY==="scroll",T=v.overflowX==="scroll"||_.overflowX==="scroll",C=Math.max(0,s.innerWidth-i.clientWidth),O=Math.max(0,s.innerHeight-i.clientHeight),M=parseFloat(_.marginTop)+parseFloat(_.marginBottom),D=parseFloat(_.marginLeft)+parseFloat(_.marginRight),U=qf(r)?r:i;if(f=bEe(e),f){r.style.scrollbarGutter=w,U.style.overflowY="hidden",U.style.overflowX="hidden";return}Object.assign(r.style,{scrollbarGutter:w,overflowY:"hidden",overflowX:"hidden"}),(x||R)&&(r.style.overflowY="scroll"),(E||T)&&(r.style.overflowX="scroll"),Object.assign(i.style,{position:"relative",height:M||O?`calc(100dvh - ${M+O}px)`:"100dvh",width:D||C?`calc(100vw - ${D+C}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),i.scrollTop=l,i.scrollLeft=c,r.setAttribute("data-base-ui-scroll-locked",""),r.style.scrollBehavior="unset"}function m(){Object.assign(r.style,IN),Object.assign(i.style,LN),f||(r.scrollTop=l,r.scrollLeft=c,r.removeAttribute("data-base-ui-scroll-locked"),r.style.scrollBehavior=UN)}function g(){m(),d.request(h)}return h(),s.addEventListener("resize",g),()=>{d.cancel(),m(),typeof s.removeEventListener=="function"&&s.removeEventListener("resize",g)}}class EEe{lockCount=0;restore=null;timeoutLock=eu.create();timeoutUnlock=eu.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const i=Rn(t).documentElement,s=ua(i).getComputedStyle(i).overflowY;if(s==="hidden"||s==="clip"){this.restore=fo;return}const l=k7||!vEe(t);this.restore=l?SEe(t):wEe(t)}}const xEe=new EEe;function t5(e=!0,t=null){at(()=>{if(e)return xEe.acquire(t)},[e,t])}function _Ee(e){const t=j.useRef(""),r=j.useCallback(s=>{s.defaultPrevented||(t.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:j.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s?e(s,s.pointerType):e(s,t.current),t.current=""},[e]),onPointerDown:r}}function n5(e){const[t,r]=j.useState(null),i=Je((f,d)=>{e||r(d||(k7?"touch":""))}),s=j.useCallback(()=>{r(null)},[]),{onClick:l,onPointerDown:c}=_Ee(i);return j.useMemo(()=>({openMethod:t,reset:s,triggerProps:{onClick:l,onPointerDown:c}}),[t,s,l,c])}function TEe(e){const{store:t,parentContext:r,actionsRef:i}=e,s=t.useState("open"),l=t.useState("disablePointerDismissal"),c=t.useState("modal"),f=t.useState("popupElement"),{openMethod:d,triggerProps:h,reset:m}=n5(s);$U(t);const{forceUnmount:g}=PU(s,t,()=>{m()}),v=Je(B=>{const q=en(B);return q.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},q}),_=j.useCallback(()=>{t.setOpen(!1,v(A7))},[t,v]);j.useImperativeHandle(i,()=>({unmount:g,close:_}),[g,_]);const b=qU({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[S,w]=j.useState(0),x=S===0,E=FU(b),R=ZM(b,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:c==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(B){if(!t.context.outsidePressEnabledRef.current||"button"in B&&B.button!==0||"touches"in B&&B.touches.length!==1)return!1;const q=Jo(B);if(x&&!l){const V=q;return c&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===V||t.context.backdropRef.current===V||on(V,f)&&!V?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:x});t5(s&&c===!0,f);const{getReferenceProps:T,getFloatingProps:C,getTriggerProps:O}=Dx([E,R]);t.useContextCallback("onNestedDialogOpen",B=>{w(B+1)}),t.useContextCallback("onNestedDialogClose",()=>{w(0)}),j.useEffect(()=>(r?.onNestedDialogOpen&&s&&r.onNestedDialogOpen(S),r?.onNestedDialogClose&&!s&&r.onNestedDialogClose(),()=>{r?.onNestedDialogClose&&s&&r.onNestedDialogClose()}),[s,r,S]);const M=j.useMemo(()=>T(h),[T,h]),D=j.useMemo(()=>O(h),[O,h]),U=j.useMemo(()=>C(),[C]);t.useSyncedValues({openMethod:d,activeTriggerProps:M,inactiveTriggerProps:D,popupProps:U,floatingRootContext:b,nestedOpenDialogCount:S})}const CEe={...LU,modal:it(e=>e.modal),nested:it(e=>e.nested),nestedOpenDialogCount:it(e=>e.nestedOpenDialogCount),disablePointerDismissal:it(e=>e.disablePointerDismissal),openMethod:it(e=>e.openMethod),descriptionElementId:it(e=>e.descriptionElementId),titleElementId:it(e=>e.titleElementId),viewportElement:it(e=>e.viewportElement),role:it(e=>e.role)};class OEe extends XM{constructor(t){super(REe(t),{popupRef:j.createRef(),backdropRef:j.createRef(),internalBackdropRef:j.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new kx,onOpenChange:void 0,onOpenChangeComplete:void 0},CEe)}setOpen=(t,r)=>{if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,r),r.isCanceled)return;const i={open:t,nativeEvent:r.event,reason:r.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",i);const s={open:t},l=r.trigger?.id??null;(l||t)&&(s.activeTriggerId=l,s.activeTriggerElement=r.trigger??null),this.update(s)}}function REe(e={}){return{...IU(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function AEe(e){const{children:t,open:r,defaultOpen:i=!1,onOpenChange:s,onOpenChangeComplete:l,disablePointerDismissal:c=!1,modal:f=!0,actionsRef:d,handle:h,triggerId:m,defaultTriggerId:g=null}=e,v=Bg(!0),_=!!v,b=ki(()=>h?.store??new OEe({open:i,openProp:r,activeTriggerId:g,triggerIdProp:m,modal:f,disablePointerDismissal:c,nested:_})).current;e5(()=>{r===void 0&&b.state.open===!1&&i===!0&&b.update({open:!0,activeTriggerId:g})}),b.useControlledProp("openProp",r),b.useControlledProp("triggerIdProp",m),b.useSyncedValues({disablePointerDismissal:c,nested:_,modal:f}),b.useContextCallback("onOpenChange",s),b.useContextCallback("onOpenChangeComplete",l);const S=b.useState("payload");TEe({store:b,actionsRef:d,parentContext:v?.store.context});const w=j.useMemo(()=>({store:b}),[b]);return k.jsx(dU.Provider,{value:w,children:typeof t=="function"?t({payload:S}):t})}const MEe=j.forwardRef(function(t,r){const{render:i,className:s,id:l,...c}=t,{store:f}=Bg(),d=Ug(l);return f.useSyncedValueWithCleanup("titleElementId",d),sr("h2",t,{ref:r,props:[{id:d},c]})});function jEe({...e}){return k.jsx(AEe,{"data-slot":"dialog",...e})}function kEe({...e}){return k.jsx(yEe,{"data-slot":"dialog-portal",...e})}function DEe({className:e,...t}){return k.jsx(ySe,{"data-slot":"dialog-overlay",className:qt("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",e),...t})}function NEe({className:e,children:t,showCloseButton:r=!0,...i}){return k.jsxs(kEe,{children:[k.jsx(DEe,{}),k.jsxs(gEe,{"data-slot":"dialog-content",className:qt("bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid max-w-[calc(100%-2rem)] gap-4 rounded-none p-4 text-xs/relaxed ring-1 duration-100 sm:max-w-sm fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none",e),...i,children:[t,r&&k.jsxs(vSe,{"data-slot":"dialog-close",render:k.jsx(bl,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[k.jsx(xF,{}),k.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function zEe({className:e,...t}){return k.jsx(MEe,{"data-slot":"dialog-title",className:qt("text-sm font-medium",e),...t})}const $Ee=()=>{const e=Lf(),[t,r]=j.useState(!1);return e._meta&&Object.keys(e._meta).length>0?k.jsxs(k.Fragment,{children:[k.jsxs(bl,{variant:"ghost",size:"default",onClick:()=>r(!0),"aria-label":"View tool metadata",title:"View tool metadata",children:[k.jsx(oF,{className:"h-4 w-4"}),"Metadata"]}),k.jsx(jEe,{open:t,onOpenChange:r,children:k.jsxs(NEe,{className:"sm:max-w-2xl",children:[k.jsx(zEe,{children:"Tool Metadata"}),k.jsx("div",{className:"text-xs",children:k.jsx(Ax,{src:e._meta,name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",style:{fontSize:"0.75rem"},collapsed:2,collapseStringsAfterLength:80})})]})})]}):null},PEe={"ui:submitButtonOptions":{norender:!0}},IEe=({schema:e,formData:t,setFormData:r,ref:i})=>!e||!e.properties||Object.keys(e.properties).length===0?k.jsx("div",{className:"flex items-center justify-center h-full",children:k.jsx("p",{className:"text-sm text-muted-foreground",children:"This tool requires no input"})}):k.jsx(B1e,{children:k.jsx(H1e,{children:k.jsx(Sbe,{ref:i,schema:e??{},validator:qme,uiSchema:PEe,formData:t,onChange:l=>r(l.formData),showErrorList:!1,templates:{FieldTemplate:l=>{const{id:c,classNames:f,style:d,label:h,required:m,errors:g,children:v}=l;return k.jsxs("div",{className:qt("flex flex-col gap-2",f),style:d,children:[k.jsxs("label",{htmlFor:c,className:"text-sm text-foreground",children:[h,m&&k.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),k.jsxs("div",{className:"flex flex-col gap-2",children:[v,g]})]})},FieldErrorTemplate:l=>l.errors&&l.errors.length>0?k.jsx("div",{className:"text-sm text-destructive mt-1 flex items-center gap-1",children:k.jsx("span",{children:l.errors.join(", ")})}):null}})})}),LEe=({formData:e,setFormData:t})=>{const[r,i]=j.useState(JSON.stringify(e,null,2));j.useEffect(()=>{i(JSON.stringify(e,null,2))},[e]);const s=l=>{i(l);try{const c=JSON.parse(l);t(c)}catch{}};return k.jsx("div",{className:"flex flex-col gap-2",children:k.jsx("textarea",{className:"w-full h-full p-2 rounded-md border border-border",rows:12,value:r,onChange:l=>s(l.target.value)})})},UEe=()=>{const e=j.useRef(null),t=Lf(),{setToolData:r}=Mg(),s=jg(t.name)?.input??{},l=c=>{r(t.name,{input:c??{}})};return k.jsxs("div",{className:qt("flex flex-col h-full overflow-hidden border-r border-border"),children:[k.jsxs("div",{className:"shrink-0 border-b border-border px-6 py-4 flex items-center justify-between h-[72px]",children:[k.jsx("h2",{className:"font-semibold text-foreground",children:t.name}),k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx($Ee,{}),k.jsx(sSe,{validateForm:async()=>e.current===null?!0:await e.current.validateForm(),formData:s})]})]}),k.jsx("div",{className:"flex-1 overflow-auto px-6 py-6 bg-muted/50",children:k.jsxs(iU,{defaultValue:"form",children:[k.jsxs(oU,{children:[k.jsx(Qb,{value:"form",children:"Form"}),k.jsx(Qb,{value:"json",children:"JSON"})]}),k.jsx(Wb,{value:"form",children:k.jsx(IEe,{schema:t.inputSchema,formData:s,setFormData:l,ref:e},t.name)}),k.jsx(Wb,{value:"json",children:k.jsx(LEe,{formData:s,setFormData:l},t.name)})]})})]})},qEe=Fc("rounded-none has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-none flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",{variants:{orientation:{horizontal:"[&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0 [&>[data-slot]]:rounded-r-none",vertical:"flex-col [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0 [&>[data-slot]]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});function VEe({className:e,orientation:t,...r}){return k.jsx("div",{role:"group","data-slot":"button-group","data-orientation":t,className:qt(qEe({orientation:t}),e),...r})}function FEe({className:e,...t}){return k.jsx("label",{"data-slot":"label",className:qt("gap-2 text-xs leading-none group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",e),...t})}function BEe({className:e,...t}){return k.jsx("fieldset",{"data-slot":"field-set",className:qt("gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col",e),...t})}const HEe=Fc("data-[invalid=true]:text-destructive gap-2 group/field flex w-full",{variants:{orientation:{vertical:"flex-col [&>*]:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function nf({className:e,orientation:t="vertical",...r}){return k.jsx("div",{role:"group","data-slot":"field","data-orientation":t,className:qt(HEe({orientation:t}),e),...r})}function rf({className:e,...t}){return k.jsx(FEe,{"data-slot":"field-label",className:qt("has-data-checked:bg-primary/5 has-data-checked:border-primary dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-2 group/field-label peer/field-label flex w-fit leading-snug","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...t})}let qN=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const GEe={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},r5={valid(e){return e===null?null:e?{[qN.valid]:""}:{[qN.invalid]:""}}},KEe=j.createContext({invalid:void 0,name:void 0,validityData:{state:GEe,errors:[],error:"",value:"",initialValue:null},setValidityData:fo,disabled:void 0,touched:!1,setTouched:fo,dirty:!1,setDirty:fo,filled:!1,setFilled:fo,focused:!1,setFocused:fo,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=ka)=>e,getInputValidationProps:(e=ka)=>e,inputRef:{current:null},commit:async()=>{}}});function Gg(e=!0){const t=j.useContext(KEe);if(t.setValidityData===fo&&!e)throw new Error(xi(28));return t}const YEe=j.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:fo,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function a5(){return j.useContext(YEe)}const ZEe=j.createContext({controlId:void 0,registerControlId:fo,labelId:void 0,setLabelId:fo,messageIds:[],setMessageIds:fo,getDescriptionProps:e=>e});function zx(){return j.useContext(ZEe)}function XEe(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function $x(e={}){const{id:t,implicit:r=!1,controlRef:i}=e,{controlId:s,registerControlId:l}=zx(),c=Ug(t),f=r?s:void 0,d=ki(()=>Symbol("labelable-control")),h=j.useRef(!1),m=j.useRef(t!=null),g=Je(()=>{!h.current||l===fo||(h.current=!1,l(d.current,void 0))});return at(()=>{if(l===fo)return;let v;if(r){const _=i?.current;Zn(_)&&_.closest("label")!=null?v=t??null:v=f??c}else if(t!=null)m.current=!0,v=t;else if(m.current)v=c;else{g();return}if(v===void 0){g();return}h.current=!0,l(d.current,v)},[t,i,f,l,r,c,d,g]),j.useEffect(()=>g,[g]),s??c}function i5(e){const{enabled:t=!0,value:r,id:i,name:s,controlRef:l,commit:c}=e,{formRef:f}=a5(),{invalid:d,markedDirtyRef:h,validityData:m,setValidityData:g}=Gg(),v=Je(e.getValue);at(()=>{if(!t)return;let _=r;_===void 0&&(_=v()),m.initialValue===null&&_!==null&&g(b=>({...b,initialValue:_}))},[t,g,r,m.initialValue,v]),at(()=>{!t||!i||f.current.fields.set(i,{getValue:v,name:s,controlRef:l,validityData:XEe(m,d),validate(_=!0){let b=r;b===void 0&&(b=v()),h.current=!0,_?Es.flushSync(()=>c(b)):c(b)}})},[c,l,t,f,v,i,d,h,s,m,r]),at(()=>{const _=f.current.fields;return()=>{i&&_.delete(i)}},[f,i])}const QEe=j.forwardRef(function(t,r){const{render:i,className:s,id:l,name:c,value:f,disabled:d=!1,onValueChange:h,defaultValue:m,autoFocus:g=!1,...v}=t,{state:_,name:b,disabled:S,setTouched:w,setDirty:x,validityData:E,setFocused:R,setFilled:T,validationMode:C,validation:O}=Gg(),M=S||d,D=b??c,U={..._,disabled:M},{labelId:B}=zx(),q=$x({id:l});at(()=>{const ee=f!=null;O.inputRef.current?.value||ee&&f!==""?T(!0):ee&&f===""&&T(!1)},[O.inputRef,T,f]);const V=j.useRef(null);at(()=>{g&&V.current===yl(Rn(V.current))&&R(!0)},[g,R]);const[G]=S1({controlled:f,default:m,name:"FieldControl",state:"value"}),ne=f!==void 0,oe=ne?G:void 0;return i5({id:q,name:D,commit:O.commit,value:oe,getValue:()=>O.inputRef.current?.value,controlRef:O.inputRef}),sr("input",t,{ref:[r,V],state:U,props:[{id:q,disabled:M,name:D,ref:O.inputRef,"aria-labelledby":B,autoFocus:g,...ne?{value:oe}:{defaultValue:m},onChange(ee){const re=ee.currentTarget.value;h?.(re,en(Df,ee.nativeEvent)),x(re!==E.initialValue),T(re!=="")},onFocus(){R(!0)},onBlur(ee){w(!0),R(!1),C==="onBlur"&&O.commit(ee.currentTarget.value)},onKeyDown(ee){ee.currentTarget.tagName==="INPUT"&&ee.key==="Enter"&&(w(!0),O.commit(ee.currentTarget.value))}},O.getInputValidationProps(),v],stateAttributesMapping:r5})}),WEe=j.forwardRef(function(t,r){return k.jsx(QEe,{ref:r,...t})});function XT({className:e,type:t,...r}){return k.jsx(WEe,{type:t,"data-slot":"input",className:qt("dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-none border bg-transparent px-2.5 py-1 text-xs transition-colors file:h-6 file:text-xs file:font-medium focus-visible:ring-1 aria-invalid:ring-1 md:text-xs file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",e),...r})}const HU=j.createContext(null),GU=j.createContext(null);function ou(){const e=j.useContext(HU);if(e===null)throw new Error(xi(60));return e}function KU(){const e=j.useContext(GU);if(e===null)throw new Error(xi(61));return e}const JEe=(e,t)=>Object.is(e,t);function Eg(e,t,r){return e==null||t==null?Object.is(e,t):r(e,t)}function exe(e,t,r){return!e||e.length===0?!1:e.some(i=>i===void 0?!1:Eg(t,i,r))}function e1(e,t,r){return!e||e.length===0?-1:e.findIndex(i=>i===void 0?!1:Eg(i,t,r))}function txe(e,t,r){return e.filter(i=>!Eg(t,i,r))}function HO(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function YU(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function nxe(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(YU(e)){for(const t of e)for(const r of t.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const t of e)if(t&&t.value==null&&t.label!=null)return!0;return!1}function rxe(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return HO(e)}function Mm(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?HO(e.value):HO(e)}function ZU(e,t,r){function i(){return rxe(e,r)}if(r&&e!=null)return r(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??i();if(Array.isArray(t)){const s=YU(t)?t.flatMap(l=>l.items):t;if(e==null||typeof e!="object"){const l=s.find(c=>c.value===e);return l&&l.label!=null?l.label:i()}if("value"in e){const l=s.find(c=>c&&c.value===e.value);if(l&&l.label!=null)return l.label}}return i()}function axe(e,t,r){return e.reduce((i,s,l)=>(l>0&&i.push(", "),i.push(k.jsx(j.Fragment,{children:ZU(s,t,r)},l)),i),[])}const Rt={id:it(e=>e.id),modal:it(e=>e.modal),multiple:it(e=>e.multiple),items:it(e=>e.items),itemToStringLabel:it(e=>e.itemToStringLabel),itemToStringValue:it(e=>e.itemToStringValue),isItemEqualToValue:it(e=>e.isItemEqualToValue),value:it(e=>e.value),hasSelectedValue:it(e=>{const{value:t,multiple:r,itemToStringValue:i}=e;return t==null?!1:r&&Array.isArray(t)?t.length>0:Mm(t,i)!==""}),hasNullItemLabel:it((e,t)=>t?nxe(e.items):!1),open:it(e=>e.open),mounted:it(e=>e.mounted),forceMount:it(e=>e.forceMount),transitionStatus:it(e=>e.transitionStatus),openMethod:it(e=>e.openMethod),activeIndex:it(e=>e.activeIndex),selectedIndex:it(e=>e.selectedIndex),isActive:it((e,t)=>e.activeIndex===t),isSelected:it((e,t,r)=>{const i=e.isItemEqualToValue,s=e.value;return e.multiple?Array.isArray(s)&&s.some(l=>Eg(r,l,i)):e.selectedIndex===t&&e.selectedIndex!==null?!0:Eg(r,s,i)}),isSelectedByFocus:it((e,t)=>e.selectedIndex===t),popupProps:it(e=>e.popupProps),triggerProps:it(e=>e.triggerProps),triggerElement:it(e=>e.triggerElement),positionerElement:it(e=>e.positionerElement),listElement:it(e=>e.listElement),scrollUpArrowVisible:it(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:it(e=>e.scrollDownArrowVisible),hasScrollArrows:it(e=>e.hasScrollArrows)};function XU(e,t){const r=j.useRef(e),i=Je(t);at(()=>{r.current!==e&&i(r.current)},[e,i]),at(()=>{r.current=e},[e])}function ixe(e){const{id:t,value:r,defaultValue:i=null,onValueChange:s,open:l,defaultOpen:c=!1,onOpenChange:f,name:d,autoComplete:h,disabled:m=!1,readOnly:g=!1,required:v=!1,modal:_=!0,actionsRef:b,inputRef:S,onOpenChangeComplete:w,items:x,multiple:E=!1,itemToStringLabel:R,itemToStringValue:T,isItemEqualToValue:C=JEe,highlightItemOnHover:O=!0,children:M}=e,{clearErrors:D}=a5(),{setDirty:U,setTouched:B,setFocused:q,shouldValidateOnChange:V,validityData:G,setFilled:ne,name:oe,disabled:K,validation:ee,validationMode:re}=Gg(),ue=$x({id:t}),Q=K||m,z=oe??d,[L,Y]=S1({controlled:r,default:E?i??f1:i,name:"Select",state:"value"}),[I,X]=S1({controlled:l,default:c,name:"Select",state:"open"}),J=j.useRef([]),he=j.useRef([]),xe=j.useRef(null),we=j.useRef(null),je=j.useRef(0),de=j.useRef(null),se=j.useRef([]),ye=j.useRef(!1),be=j.useRef(!1),Ae=j.useRef(null),Oe=j.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Ie=j.useRef(!1),{mounted:$e,setMounted:Ne,transitionStatus:Ue}=iS(I),{openMethod:Re,triggerProps:Ze,reset:ot}=n5(I),qe=ki(()=>new zU({id:ue,modal:_,multiple:E,itemToStringLabel:R,itemToStringValue:T,isItemEqualToValue:C,value:L,open:I,mounted:$e,transitionStatus:Ue,items:x,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,xn=jt(qe,Rt.activeIndex),yn=jt(qe,Rt.selectedIndex),zn=jt(qe,Rt.triggerElement),Dt=jt(qe,Rt.positionerElement),Vt=j.useMemo(()=>E&&Array.isArray(L)&&L.length===0?"":Mm(L,T),[E,L,T]),hn=j.useMemo(()=>E&&Array.isArray(L)?L.map(At=>Mm(At,T)):Mm(L,T),[E,L,T]),Cn=Ia(qe.state.triggerElement);i5({id:ue,commit:ee.commit,value:L,controlRef:Cn,name:z,getValue:()=>hn});const _i=j.useRef(L);at(()=>{L!==_i.current&&qe.set("forceMount",!0)},[qe,L]),at(()=>{ne(E?Array.isArray(L)&&L.length>0:L!=null)},[E,L,ne]),at(function(){if(I)return;const On=se.current;if(E){const hr=Array.isArray(L)?L:[];if(hr.length===0){qe.set("selectedIndex",null);return}const jn=hr[hr.length-1],Ti=e1(On,jn,C);qe.set("selectedIndex",Ti===-1?null:Ti);return}const Fr=e1(On,L,C);qe.set("selectedIndex",Fr===-1?null:Fr)},[E,I,L,se,C,qe]),XU(L,()=>{D(z),U(L!==G.initialValue),V()?ee.commit(L):ee.commit(L,!0)});const kr=Je((At,On)=>{if(f?.(At,On),!On.isCanceled&&(X(At),!At&&(On.reason===Ip||On.reason===$M)&&(B(!0),q(!1),re==="onBlur"&&ee.commit(L)),!At&&qe.state.activeIndex!==null)){const Fr=J.current[qe.state.activeIndex];queueMicrotask(()=>{Fr?.setAttribute("tabindex","-1")})}}),Ht=Je(()=>{Ne(!1),qe.set("activeIndex",null),ot(),w?.(!1)});Hf({enabled:!b,open:I,ref:xe,onComplete(){I||Ht()}}),j.useImperativeHandle(b,()=>({unmount:Ht}),[Ht]);const Mn=Je((At,On)=>{s?.(At,On),!On.isCanceled&&Y(At)}),Pt=Je(()=>{const At=qe.state.listElement||xe.current;if(!At)return;const On=At.scrollTop,Fr=At.scrollTop+At.clientHeight,hr=On>1,jn=Fr<At.scrollHeight-1;qe.state.scrollUpArrowVisible!==hr&&qe.set("scrollUpArrowVisible",hr),qe.state.scrollDownArrowVisible!==jn&&qe.set("scrollDownArrowVisible",jn)}),Gt=UU({open:I,onOpenChange:kr,elements:{reference:zn,floating:Dt}}),qn=xU(Gt,{enabled:!g&&!Q,event:"mousedown"}),qr=ZM(Gt,{bubbles:!1}),pn=sEe(Gt,{enabled:!g&&!Q,listRef:J,activeIndex:xn,selectedIndex:yn,disabledIndices:f1,onNavigate(At){At===null&&!I||qe.set("activeIndex",At)},focusItemOnHover:!1}),dr=uEe(Gt,{enabled:!g&&!Q&&(I||!E),listRef:he,activeIndex:xn,selectedIndex:yn,onMatch(At){I?qe.set("activeIndex",At):Mn(se.current[At],en("none"))},onTypingChange(At){ye.current=At}}),{getReferenceProps:Rr,getFloatingProps:Vn,getItemProps:Xr}=Dx([qn,qr,pn,dr]),Vr=j.useMemo(()=>G1(Rr(),Ze,ue?{id:ue}:ka),[Rr,Ze,ue]);e5(()=>{qe.update({popupProps:Vn(),triggerProps:Vr})}),at(()=>{qe.update({id:ue,modal:_,multiple:E,value:L,open:I,mounted:$e,transitionStatus:Ue,popupProps:Vn(),triggerProps:Vr,items:x,itemToStringLabel:R,itemToStringValue:T,isItemEqualToValue:C,openMethod:Re})},[qe,ue,_,E,L,I,$e,Ue,Vn,Vr,x,R,T,C,Re]);const oo=j.useMemo(()=>({store:qe,name:z,required:v,disabled:Q,readOnly:g,multiple:E,itemToStringLabel:R,itemToStringValue:T,highlightItemOnHover:O,setValue:Mn,setOpen:kr,listRef:J,popupRef:xe,scrollHandlerRef:we,handleScrollArrowVisibility:Pt,scrollArrowsMountedCountRef:je,getItemProps:Xr,events:Gt.context.events,valueRef:de,valuesRef:se,labelsRef:he,typingRef:ye,selectionRef:Oe,selectedItemTextRef:Ae,validation:ee,onOpenChangeComplete:w,keyboardActiveRef:be,alignItemWithTriggerActiveRef:Ie,initialValueRef:_i}),[qe,z,v,Q,g,E,R,T,O,Mn,kr,Xr,Gt.context.events,ee,w,Pt]),Ua=Nc(S,ee.inputRef),qa=E&&Array.isArray(L)&&L.length>0,aa=j.useMemo(()=>!E||!Array.isArray(L)||!z?null:L.map(At=>{const On=Mm(At,T);return k.jsx("input",{type:"hidden",name:z,value:On},On)}),[E,L,z,T]);return k.jsx(HU.Provider,{value:oo,children:k.jsxs(GU.Provider,{value:Gt,children:[M,k.jsx("input",{...ee.getInputValidationProps({onFocus(){qe.state.triggerElement?.focus({focusVisible:!0})},onChange(At){if(At.nativeEvent.defaultPrevented)return;const On=At.target.value,Fr=en(Df,At.nativeEvent);function hr(){if(E)return;const jn=se.current.find(Ti=>Mm(Ti,T).toLowerCase()===On.toLowerCase());jn!=null&&(U(jn!==G.initialValue),Mn(jn,Fr),V()&&ee.commit(jn))}qe.set("forceMount",!0),queueMicrotask(hr)}}),name:E?void 0:z,autoComplete:h,value:Vt,disabled:Q,required:v&&!qa,readOnly:g,ref:Ua,style:z?bU:Mx,tabIndex:-1,"aria-hidden":!0}),aa]})})}function oxe(e){const t=e.getBoundingClientRect(),r=window.getComputedStyle(e,"::before"),i=window.getComputedStyle(e,"::after");if(!(r.content!=="none"||i.content!=="none"))return t;const l=parseFloat(r.width)||0,c=parseFloat(r.height)||0,f=parseFloat(i.width)||0,d=parseFloat(i.height)||0,h=Math.max(t.width,l,f),m=Math.max(t.height,c,d),g=h-t.width,v=m-t.height;return{left:t.left-g/2,right:t.right+g/2,top:t.top-v/2,bottom:t.bottom+v/2}}const Ow=2,sxe=400,VN=200,lxe={...pU,...r5,value:()=>null},uxe=j.forwardRef(function(t,r){const{render:i,className:s,id:l,disabled:c=!1,nativeButton:f=!0,...d}=t,{setTouched:h,setFocused:m,validationMode:g,state:v,disabled:_}=Gg(),{labelId:b}=zx(),{store:S,setOpen:w,selectionRef:x,validation:E,readOnly:R,required:T,alignItemWithTriggerActiveRef:C,disabled:O,keyboardActiveRef:M}=ou(),D=_||O||c,U=jt(S,Rt.open),B=jt(S,Rt.value),q=jt(S,Rt.triggerProps),V=jt(S,Rt.positionerElement),G=jt(S,Rt.listElement),ne=jt(S,Rt.id),oe=jt(S,Rt.hasSelectedValue),K=!oe&&U,ee=jt(S,Rt.hasNullItemLabel,K),re=l??ne;$x({id:re});const ue=Ia(V),Q=j.useRef(null),{getButtonProps:z,buttonRef:L}=Kp({disabled:D,native:f}),Y=Je(se=>{S.set("triggerElement",se)}),I=Nc(r,Q,L,Y),X=ts(),J=ts(),he=ts(),xe=ts();j.useEffect(()=>{if(U)return!(oe||ee)?he.start(sxe,()=>{x.current.allowUnselectedMouseUp=!0,x.current.allowSelectedMouseUp=!0}):xe.start(VN,()=>{x.current.allowUnselectedMouseUp=!0,he.start(VN,()=>{x.current.allowSelectedMouseUp=!0})}),()=>{he.clear(),xe.clear()};x.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},J.clear()},[U,oe,ee,x,J,he,xe]);const we=j.useMemo(()=>G?.id??w1(V)?.id,[G,V]),je=G1(q,{id:re,role:"combobox","aria-expanded":U?"true":"false","aria-haspopup":"listbox","aria-controls":U?we:void 0,"aria-labelledby":b,"aria-readonly":R||void 0,"aria-required":T||void 0,tabIndex:D?-1:0,ref:I,onFocus(se){m(!0),U&&C.current&&w(!1,en(Df,se.nativeEvent)),X.start(0,()=>{S.set("forceMount",!0)})},onBlur(se){on(V,se.relatedTarget)||(h(!0),m(!1),g==="onBlur"&&E.commit(B))},onPointerMove(){M.current=!1},onKeyDown(){M.current=!0},onMouseDown(se){if(U)return;const ye=Rn(se.currentTarget);function be(Ae){if(!Q.current)return;const Oe=Ae.target;if(on(Q.current,Oe)||on(ue.current,Oe)||Oe===Q.current)return;const Ie=oxe(Q.current);Ae.clientX>=Ie.left-Ow&&Ae.clientX<=Ie.right+Ow&&Ae.clientY>=Ie.top-Ow&&Ae.clientY<=Ie.bottom+Ow||w(!1,en(kbe,Ae))}J.start(0,()=>{ye.addEventListener("mouseup",be,{once:!0})})}},E.getValidationProps,d,z);je.role="combobox";const de={...v,open:U,disabled:D,value:B,readOnly:R,placeholder:!oe};return sr("button",t,{ref:[r,Q],state:de,stateAttributesMapping:lxe,props:je})}),cxe={value:()=>null},fxe=j.forwardRef(function(t,r){const{className:i,render:s,children:l,placeholder:c,...f}=t,{store:d,valueRef:h}=ou(),m=jt(d,Rt.value),g=jt(d,Rt.items),v=jt(d,Rt.itemToStringLabel),_=jt(d,Rt.hasSelectedValue),b=!_&&c!=null&&l==null,S=jt(d,Rt.hasNullItemLabel,b),w={value:m,placeholder:!_};let x=null;return typeof l=="function"?x=l(m):l!=null?x=l:!_&&c!=null&&!S?x=c:Array.isArray(m)?x=axe(m,g,v):x=ZU(m,g,v),sr("span",t,{state:w,ref:[r,h],props:[{children:x},f],stateAttributesMapping:cxe})}),dxe=j.forwardRef(function(t,r){const{className:i,render:s,...l}=t,{store:c}=ou(),d={open:jt(c,Rt.open)};return sr("span",t,{state:d,ref:r,props:[{"aria-hidden":!0,children:"▼"},l],stateAttributesMapping:hU})}),hxe=j.createContext(void 0),pxe=j.forwardRef(function(t,r){const{store:i}=ou(),s=jt(i,Rt.mounted),l=jt(i,Rt.forceMount);return s||l?k.jsx(hxe.Provider,{value:!0,children:k.jsx(HM,{ref:r,...t})}):null}),mxe=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:i,placement:s,rects:l,platform:c,elements:f,middlewareData:d}=t,{element:h,padding:m=0,offsetParent:g="real"}=Ic(e,t)||{};if(h==null)return{};const v=U7(m),_={x:r,y:i},b=VM(s),S=qM(b),w=await c.getDimensions(h),x=b==="y",E=x?"top":"left",R=x?"bottom":"right",T=x?"clientHeight":"clientWidth",C=l.reference[S]+l.reference[b]-_[b]-l.floating[S],O=_[b]-l.reference[b],M=g==="real"?await c.getOffsetParent?.(h):f.floating;let D=f.floating[T]||l.floating[S];(!D||!await c.isElement?.(M))&&(D=f.floating[T]||l.floating[S]);const U=C/2-O/2,B=D/2-w[S]/2-1,q=Math.min(v[E],B),V=Math.min(v[R],B),G=q,ne=D-w[S]-V,oe=D/2-w[S]/2+U,K=$O(G,oe,ne),ee=!d.arrow&&Bf(s)!=null&&oe!==K&&l.reference[S]/2-(oe<G?q:V)-w[S]/2<0,re=ee?oe<G?oe-G:oe-ne:0;return{[b]:_[b]+re,data:{[b]:K,centerOffset:oe-K-re,...ee&&{alignmentOffset:re}},reset:ee}}}),gxe=(e,t)=>({...mxe(e),options:[e,t]}),yxe={name:"hide",async fn(e){const{width:t,height:r,x:i,y:s}=e.rects.reference,l=t===0&&r===0&&i===0&&s===0;return{data:{referenceHidden:(await vwe().fn(e)).data?.referenceHidden||l}}}},Qw={sideX:"left",sideY:"top"},vxe={name:"adaptiveOrigin",async fn(e){const{x:t,y:r,rects:{floating:i},elements:{floating:s},platform:l,strategy:c,placement:f}=e,d=ua(s),h=d.getComputedStyle(s);if(!(h.transitionDuration!=="0s"&&h.transitionDuration!==""))return{x:t,y:r,data:Qw};const g=await l.getOffsetParent?.(s);let v={width:0,height:0};if(c==="fixed"&&d?.visualViewport)v={width:d.visualViewport.width,height:d.visualViewport.height};else if(g===d){const E=Rn(s);v={width:E.documentElement.clientWidth,height:E.documentElement.clientHeight}}else await l.isElement?.(g)&&(v=await l.getDimensions(g));const _=po(f);let b=t,S=r;_==="left"&&(b=v.width-(t+i.width)),_==="top"&&(S=v.height-(r+i.height));const w=_==="left"?"right":Qw.sideX,x=_==="top"?"bottom":Qw.sideY;return{x:b,y:S,data:{sideX:w,sideY:x}}}};function QU(e,t,r){const i=e==="inline-start"||e==="inline-end";return{top:"top",right:i?r?"inline-start":"inline-end":"right",bottom:"bottom",left:i?r?"inline-end":"inline-start":"left"}[t]}function FN(e,t,r){const{rects:i,placement:s}=e;return{side:QU(t,po(s),r),align:Bf(s)||"center",anchor:{width:i.reference.width,height:i.reference.height},positioner:{width:i.floating.width,height:i.floating.height}}}function WU(e){const{anchor:t,positionMethod:r="absolute",side:i="bottom",sideOffset:s=0,align:l="center",alignOffset:c=0,collisionBoundary:f,collisionPadding:d=5,sticky:h=!1,arrowPadding:m=5,disableAnchorTracking:g=!1,keepMounted:v=!1,floatingRootContext:_,mounted:b,collisionAvoidance:S,shiftCrossAxis:w=!1,nodeId:x,adaptiveOrigin:E,lazyFlip:R=!1,externalTree:T}=e,[C,O]=j.useState(null);!b&&C!==null&&O(null);const M=S.side||"flip",D=S.align||"flip",U=S.fallbackAxisSide||"end",B=typeof t=="function"?t:void 0,q=Je(B),V=B?q:t,G=Ia(t),oe=kM()==="rtl",K=C||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":oe?"left":"right","inline-start":oe?"right":"left"}[i],ee=l==="center"?K:`${K}-${l}`;let re=d;const ue=1,Q=i==="bottom"?ue:0,z=i==="top"?ue:0,L=i==="right"?ue:0,Y=i==="left"?ue:0;typeof re=="number"?re={top:re+Q,right:re+Y,bottom:re+z,left:re+L}:re&&(re={top:(re.top||0)+Q,right:(re.right||0)+Y,bottom:(re.bottom||0)+z,left:(re.left||0)+L});const I={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:re},X=j.useRef(null),J=Ia(s),he=Ia(c),je=[hwe(Gt=>{const qn=FN(Gt,i,oe),qr=typeof J.current=="function"?J.current(qn):J.current,pn=typeof he.current=="function"?he.current(qn):he.current;return{mainAxis:qr,crossAxis:pn,alignmentAxis:pn}},[typeof s!="function"?s:0,typeof c!="function"?c:0,oe,i])],de=D==="none"&&M!=="shift",se=!de&&(h||w||M==="shift"),ye=M==="none"?null:gwe({...I,padding:{top:re.top+ue,right:re.right+ue,bottom:re.bottom+ue,left:re.left+ue},mainAxis:!w&&M==="flip",crossAxis:D==="flip"?"alignment":!1,fallbackAxisSideDirection:U}),be=de?null:pwe(Gt=>{const qn=Rn(Gt.elements.floating).documentElement;return{...I,rootBoundary:w?{x:0,y:0,width:qn.clientWidth,height:qn.clientHeight}:void 0,mainAxis:D!=="none",crossAxis:se,limiter:h||w?void 0:mwe(qr=>{if(!X.current)return{};const{width:pn,height:dr}=X.current.getBoundingClientRect(),Rr=gs(po(qr.placement)),Vn=Rr==="y"?pn:dr,Xr=Rr==="y"?re.left+re.right:re.top+re.bottom;return{offset:Vn/2+Xr/2}})}},[I,h,w,re,D]);M==="shift"||D==="shift"||l==="center"?je.push(be,ye):je.push(ye,be),je.push(ywe({...I,apply({elements:{floating:Gt},rects:{reference:qn},availableWidth:qr,availableHeight:pn}){const dr=Gt.style;dr.setProperty("--available-width",`${qr}px`),dr.setProperty("--available-height",`${pn}px`),dr.setProperty("--anchor-width",`${qn.width}px`),dr.setProperty("--anchor-height",`${qn.height}px`)}}),gxe(()=>({element:X.current||document.createElement("div"),padding:m,offsetParent:"floating"}),[m]),{name:"transformOrigin",fn(Gt){const{elements:qn,middlewareData:qr,placement:pn,rects:dr,y:Rr}=Gt,Vn=po(pn),Xr=gs(Vn),Vr=X.current,oo=qr.arrow?.x||0,Ua=qr.arrow?.y||0,qa=Vr?.clientWidth||0,aa=Vr?.clientHeight||0,At=oo+qa/2,On=Ua+aa/2,Fr=Math.abs(qr.shift?.y||0),hr=dr.reference.height/2,jn=typeof s=="function"?s(FN(Gt,i,oe)):s,Ti=Fr>jn,Cs={top:`${At}px calc(100% + ${jn}px)`,bottom:`${At}px ${-jn}px`,left:`calc(100% + ${jn}px) ${On}px`,right:`${-jn}px ${On}px`}[Vn],Tl=`${At}px ${dr.reference.y+hr-Rr}px`;return qn.floating.style.setProperty("--transform-origin",se&&Xr==="y"&&Ti?Tl:Cs),{}}},yxe,E),at(()=>{!b&&_&&_.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,_]);const Ae=j.useMemo(()=>({elementResize:!g&&typeof ResizeObserver<"u",layoutShift:!g&&typeof IntersectionObserver<"u"}),[g]),{refs:Oe,elements:Ie,x:$e,y:Ne,middlewareData:Ue,update:Re,placement:Ze,context:ot,isPositioned:qe,floatingStyles:xn}=Xwe({rootContext:_,placement:ee,middleware:je,strategy:r,whileElementsMounted:v?void 0:(...Gt)=>RN(...Gt,Ae),nodeId:x,externalTree:T}),{sideX:yn,sideY:zn}=Ue.adaptiveOrigin||Qw,Dt=qe?r:"fixed",Vt=j.useMemo(()=>{const Gt=E?{position:Dt,[yn]:$e,[zn]:Ne}:{position:Dt,...xn};return qe||(Gt.opacity=0),Gt},[E,Dt,yn,$e,zn,Ne,xn,qe]),hn=j.useRef(null);at(()=>{if(!b)return;const Gt=G.current,qn=typeof Gt=="function"?Gt():Gt,pn=(BN(qn)?qn.current:qn)||null||null;pn!==hn.current&&(Oe.setPositionReference(pn),hn.current=pn)},[b,Oe,V,G]),j.useEffect(()=>{if(!b)return;const Gt=G.current;typeof Gt!="function"&&BN(Gt)&&Gt.current!==hn.current&&(Oe.setPositionReference(Gt.current),hn.current=Gt.current)},[b,Oe,V,G]),j.useEffect(()=>{if(v&&b&&Ie.domReference&&Ie.floating)return RN(Ie.domReference,Ie.floating,Re,Ae)},[v,b,Ie,Re,Ae]);const Cn=po(Ze),_i=QU(i,Cn,oe),kr=Bf(Ze)||"center",Ht=!!Ue.hide?.referenceHidden;at(()=>{R&&b&&qe&&O(Cn)},[R,b,qe,Cn]);const Mn=j.useMemo(()=>({position:"absolute",top:Ue.arrow?.y,left:Ue.arrow?.x}),[Ue.arrow]),Pt=Ue.arrow?.centerOffset!==0;return j.useMemo(()=>({positionerStyles:Vt,arrowStyles:Mn,arrowRef:X,arrowUncentered:Pt,side:_i,align:kr,physicalSide:Cn,anchorHidden:Ht,refs:Oe,context:ot,isPositioned:qe,update:Re}),[Vt,Mn,X,Pt,_i,kr,Cn,Ht,Oe,ot,qe,Re])}function BN(e){return e!=null&&"current"in e}const JU=j.createContext(void 0);function o5(){const e=j.useContext(JU);if(!e)throw new Error(xi(59));return e}function Px(e){return e==="starting"?iie:ka}function IE(e,t){e&&Object.assign(e.style,t)}const eq={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},bxe={position:"fixed"},Sxe=j.forwardRef(function(t,r){const{anchor:i,positionMethod:s="absolute",className:l,render:c,side:f="bottom",align:d="center",sideOffset:h=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v,arrowPadding:_=5,sticky:b=!1,disableAnchorTracking:S,alignItemWithTrigger:w=!0,collisionAvoidance:x=oie,...E}=t,{store:R,listRef:T,labelsRef:C,alignItemWithTriggerActiveRef:O,selectedItemTextRef:M,valuesRef:D,initialValueRef:U,popupRef:B,setValue:q}=ou(),V=KU(),G=jt(R,Rt.open),ne=jt(R,Rt.mounted),oe=jt(R,Rt.modal),K=jt(R,Rt.value),ee=jt(R,Rt.openMethod),re=jt(R,Rt.positionerElement),ue=jt(R,Rt.triggerElement),Q=jt(R,Rt.isItemEqualToValue),z=jt(R,Rt.transitionStatus),L=j.useRef(null),Y=j.useRef(null),[I,X]=j.useState(w),J=ne&&I&&ee!=="touch";!ne&&I!==w&&X(w),at(()=>{ne||(Rt.scrollUpArrowVisible(R.state)&&R.set("scrollUpArrowVisible",!1),Rt.scrollDownArrowVisible(R.state)&&R.set("scrollDownArrowVisible",!1))},[R,ne]),j.useImperativeHandle(O,()=>J),t5((J||oe)&&G&&ee!=="touch",ue);const he=WU({anchor:i,floatingRootContext:V,positionMethod:s,mounted:ne,side:f,sideOffset:h,align:d,alignOffset:m,arrowPadding:_,collisionBoundary:g,collisionPadding:v,sticky:b,disableAnchorTracking:S??J,collisionAvoidance:x,keepMounted:!0}),xe=J?"none":he.side,we=J?bxe:he.positionerStyles,je=j.useMemo(()=>{const Ie={};return G||(Ie.pointerEvents="none"),{role:"presentation",hidden:!ne,style:{...we,...Ie}}},[G,ne,we]),de={open:G,side:xe,align:he.align,anchorHidden:he.anchorHidden},se=Je(Ie=>{R.set("positionerElement",Ie)}),ye=sr("div",t,{ref:[r,se],state:de,stateAttributesMapping:Hg,props:[je,Px(z),E]}),be=j.useRef(0),Ae=Je(Ie=>{if(Ie.size===0&&be.current===0||D.current.length===0)return;const $e=be.current;if(be.current=Ie.size,Ie.size===$e)return;const Ne=en(Df);if($e!==0&&!R.state.multiple&&K!==null&&e1(D.current,K,Q)===-1){const Re=U.current,ot=Re!=null&&e1(D.current,Re,Q)!==-1?Re:null;q(ot,Ne),ot===null&&(R.set("selectedIndex",null),M.current=null)}if($e!==0&&R.state.multiple&&Array.isArray(K)){const Ue=Ze=>e1(D.current,Ze,Q)!==-1,Re=K.filter(Ze=>Ue(Ze));(Re.length!==K.length||Re.some(Ze=>!exe(K,Ze,Q)))&&(q(Re,Ne),Re.length===0&&(R.set("selectedIndex",null),M.current=null))}if(G&&J){R.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Ue={height:""};IE(re,Ue),IE(B.current,Ue)}}),Oe=j.useMemo(()=>({...he,side:xe,alignItemWithTriggerActive:J,setControlledAlignItemWithTrigger:X,scrollUpArrowRef:L,scrollDownArrowRef:Y}),[he,xe,J,X]);return k.jsx(jM,{elementsRef:T,labelsRef:C,onMapChange:Ae,children:k.jsxs(JU.Provider,{value:Oe,children:[ne&&oe&&k.jsx(JM,{inert:Ox(!G),cutout:ue}),ye]})})});function tq(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const Rw="base-ui-disable-scrollbar",GO={className:Rw,getElement(e){return k.jsx("style",{nonce:e,href:Rw,precedence:"base-ui:low",children:`.${Rw}{scrollbar-width:none}.${Rw}::-webkit-scrollbar{display:none}`})}},wxe=j.createContext(void 0);function nq(e){return j.useContext(wxe)}function QT(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const dp=1,Exe={...Hg,...Fg},xxe=j.forwardRef(function(t,r){const{render:i,className:s,finalFocus:l,...c}=t,{store:f,popupRef:d,onOpenChangeComplete:h,setOpen:m,valueRef:g,selectedItemTextRef:v,keyboardActiveRef:_,multiple:b,handleScrollArrowVisibility:S,scrollHandlerRef:w,highlightItemOnHover:x}=ou(),{side:E,align:R,alignItemWithTriggerActive:T,setControlledAlignItemWithTrigger:C,scrollDownArrowRef:O,scrollUpArrowRef:M}=o5(),D=nq()!=null,U=KU(),{nonce:B,disableStyleElements:q}=S1e(),V=ts(),G=jt(f,Rt.id),ne=jt(f,Rt.open),oe=jt(f,Rt.mounted),K=jt(f,Rt.popupProps),ee=jt(f,Rt.transitionStatus),re=jt(f,Rt.triggerElement),ue=jt(f,Rt.positionerElement),Q=jt(f,Rt.listElement),z=j.useRef(0),L=j.useRef(!1),Y=j.useRef(0),I=j.useRef(!1),X=j.useRef({}),J=Rx(),he=Je(de=>{if(!ue||!d.current||!I.current)return;if(L.current||!T){S();return}const se=ue.style.top==="0px",ye=ue.style.bottom==="0px",be=ue.getBoundingClientRect().height,Ae=Rn(ue),Oe=getComputedStyle(ue),Ie=parseFloat(Oe.marginTop),$e=parseFloat(Oe.marginBottom),Ne=HN(getComputedStyle(d.current)),Ue=Math.min(Ae.documentElement.clientHeight-Ie-$e,Ne),Re=de.scrollTop,Ze=GN(de);let ot=0,qe=null,xn=!1,yn=!1;const zn=Vt=>{ue.style.height=`${Vt}px`},Dt=(Vt,hn)=>{const Cn=QT(Vt,0,Ue-be);Cn>0&&zn(be+Cn),de.scrollTop=hn,Ue-(be+Cn)<=dp&&(L.current=!0),S()};if(se){const Vt=Ze-Re,hn=be+Vt,Cn=Math.min(hn,Ue);if(ot=Cn,Vt<=dp){Dt(Vt,Ze);return}Ue-Cn>dp?yn=!0:xn=!0}else if(ye){const Vt=Re,hn=be+Vt,Cn=Math.min(hn,Ue),_i=hn-Ue;if(ot=Cn,Vt<=dp){Dt(Vt,0);return}Ue-Cn>dp?qe=0:(xn=!0,Re<Ze&&(qe=Re-(Vt-_i)))}if(ot=Math.ceil(ot),ot!==0&&zn(ot),yn||qe!=null){const Vt=GN(de),hn=yn?Vt:QT(qe,0,Vt);Math.abs(de.scrollTop-hn)>dp&&(de.scrollTop=hn)}(xn||ot>=Ue-dp)&&(L.current=!0),S()});j.useImperativeHandle(w,()=>he,[he]),Hf({open:ne,ref:d,onComplete(){ne&&h?.(!0)}});const xe={open:ne,transitionStatus:ee,side:E,align:R};at(()=>{!ue||!d.current||Object.keys(X.current).length||(X.current={top:ue.style.top||"0",left:ue.style.left||"0",right:ue.style.right,height:ue.style.height,bottom:ue.style.bottom,minHeight:ue.style.minHeight,maxHeight:ue.style.maxHeight,marginTop:ue.style.marginTop,marginBottom:ue.style.marginBottom})},[d,ue]),at(()=>{ne||T||(I.current=!1,L.current=!1,z.current=0,Y.current=0,IE(ue,X.current))},[ne,T,ue,d]),at(()=>{const de=d.current;if(!(!ne||!re||!ue||!de||f.state.transitionStatus==="ending")){if(!T){I.current=!0,J.request(S),de.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{const se=_xe(de);de.style.removeProperty("--transform-origin");try{const ye=getComputedStyle(ue),be=getComputedStyle(de),Ae=Rn(re),Oe=ua(ue),Ie=re.getBoundingClientRect(),$e=ue.getBoundingClientRect(),Ne=Ie.left,Ue=Ie.height,Re=Q||de,Ze=Re.scrollHeight,ot=parseFloat(be.borderBottomWidth),qe=parseFloat(ye.marginTop)||10,xn=parseFloat(ye.marginBottom)||10,yn=parseFloat(ye.minHeight)||100,zn=HN(be),Dt=5,Vt=5,hn=20,Cn=Ae.documentElement.clientHeight-qe-xn,_i=Ae.documentElement.clientWidth,kr=Cn-Ie.bottom+Ue,Ht=v.current,Mn=g.current;let Pt,Gt=0,qn=0;if(Ht&&Mn){const At=Mn.getBoundingClientRect();Pt=Ht.getBoundingClientRect();const On=At.left-Ne,Fr=Pt.left-$e.left,hr=At.top-Ie.top+At.height/2,jn=Pt.top-$e.top+Pt.height/2;Gt=On-Fr,qn=jn-hr}const qr=kr+qn+xn+ot;let pn=Math.min(Cn,qr);const dr=Cn-qe-xn,Rr=qr-pn,Vn=Math.max(Dt,Ne+Gt),Xr=_i-Vt,Vr=Math.max(0,Vn+$e.width-Xr);ue.style.left=`${Vn-Vr}px`,ue.style.height=`${pn}px`,ue.style.maxHeight="auto",ue.style.marginTop=`${qe}px`,ue.style.marginBottom=`${xn}px`,de.style.height="100%";const oo=Re.scrollHeight-Re.clientHeight,Ua=Rr>=oo;Ua&&(pn=Math.min(Cn,$e.height)-(Rr-oo));const qa=Ie.top<hn||Ie.bottom>Cn-hn||pn<Math.min(Ze,yn),aa=(Oe.visualViewport?.scale??1)!==1&&PM;if(qa||aa){I.current=!0,IE(ue,X.current),Es.flushSync(()=>C(!1));return}if(Ua){const At=Math.max(0,Cn-qr);ue.style.top=$e.height>=dr?"0":`${At}px`,ue.style.height=`${pn}px`,Re.scrollTop=Re.scrollHeight-Re.clientHeight,z.current=Math.max(yn,pn)}else ue.style.bottom="0",z.current=Math.max(yn,pn),Re.scrollTop=Rr;if(Pt){const At=$e.top,On=$e.height,Fr=Pt.top+Pt.height/2,hr=On>0?(Fr-At)/On*100:50,jn=QT(hr,0,100);de.style.setProperty("--transform-origin",`50% ${jn}%`)}(z.current===Cn||pn>=zn)&&(L.current=!0),S(),setTimeout(()=>{I.current=!0})}finally{se()}})}},[f,ne,ue,re,g,v,d,S,T,C,J,O,M,Q]),j.useEffect(()=>{if(!T||!ue||!ne)return;const de=ua(ue);function se(ye){m(!1,en(Dbe,ye))}return de.addEventListener("resize",se),()=>{de.removeEventListener("resize",se)}},[m,T,ue,ne]);const we={...Q?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":b||void 0,id:`${G}-list`},onKeyDown(de){_.current=!0,D&&BM.has(de.key)&&de.stopPropagation()},onMouseMove(){_.current=!1},onPointerLeave(de){if(!x||tq(de)||de.pointerType==="touch")return;const se=de.currentTarget;V.start(0,()=>{f.set("activeIndex",null),se.focus({preventScroll:!0})})},onScroll(de){Q||he(de.currentTarget)},...T&&{style:Q?{height:"100%"}:eq}},je=sr("div",t,{ref:[r,d],state:xe,stateAttributesMapping:Exe,props:[K,we,Px(ee),{className:!Q&&T?GO.className:void 0},c]});return k.jsxs(j.Fragment,{children:[!q&&GO.getElement(B),k.jsx(KM,{context:U,modal:!1,disabled:!oe,returnFocus:l,restoreFocus:!0,children:je})]})});function HN(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function GN(e){return Math.max(0,e.scrollHeight-e.clientHeight)}const KN=[["transform","none"],["scale","1"],["translate","0 0"]];function _xe(e){const{style:t}=e,r={};for(const[i,s]of KN)r[i]=t.getPropertyValue(i),t.setProperty(i,s,"important");return()=>{for(const[i]of KN){const s=r[i];s?t.setProperty(i,s):t.removeProperty(i)}}}const Txe=j.forwardRef(function(t,r){const{className:i,render:s,...l}=t,{store:c,scrollHandlerRef:f}=ou(),{alignItemWithTriggerActive:d}=o5(),h=jt(c,Rt.hasScrollArrows),m=jt(c,Rt.openMethod),g=jt(c,Rt.multiple),_={id:`${jt(c,Rt.id)}-list`,role:"listbox","aria-multiselectable":g||void 0,onScroll(S){f.current?.(S.currentTarget)},...d&&{style:eq},className:h&&m!=="touch"?GO.className:void 0},b=Je(S=>{c.set("listElement",S)});return sr("div",t,{ref:[r,b],props:[_,l]})}),rq=j.createContext(void 0);function s5(){const e=j.useContext(rq);if(!e)throw new Error(xi(57));return e}const Cxe=j.memo(j.forwardRef(function(t,r){const{render:i,className:s,value:l=null,label:c,disabled:f=!1,nativeButton:d=!1,...h}=t,m=j.useRef(null),g=zM({label:c,textRef:m,indexGuessBehavior:C7.GuessFromOrder}),{store:v,getItemProps:_,setOpen:b,setValue:S,selectionRef:w,typingRef:x,valuesRef:E,keyboardActiveRef:R,multiple:T,highlightItemOnHover:C}=ou(),O=ts(),M=jt(v,Rt.isActive,g.index),D=jt(v,Rt.isSelected,g.index,l),U=jt(v,Rt.isSelectedByFocus,g.index),B=jt(v,Rt.isItemEqualToValue),q=g.index,V=q!==-1,G=j.useRef(null),ne=Ia(q);at(()=>{if(!V)return;const J=E.current;return J[q]=l,()=>{delete J[q]}},[V,q,l,E]),at(()=>{if(!V)return;const J=v.state.value;let he=J;T&&Array.isArray(J)&&J.length>0&&(he=J[J.length-1]),he!==void 0&&Eg(l,he,B)&&v.set("selectedIndex",q)},[V,q,T,B,v,l]);const oe={disabled:f,selected:D,highlighted:M},K=_({active:M,selected:D});K.onFocus=void 0,K.id=void 0;const ee=j.useRef(null),re=j.useRef("mouse"),ue=j.useRef(!1),{getButtonProps:Q,buttonRef:z}=Kp({disabled:f,focusableWhenDisabled:!0,native:d});function L(J){const he=v.state.value;if(T){const xe=Array.isArray(he)?he:[],we=D?txe(xe,l,B):[...xe,l];S(we,en(zT,J))}else S(l,en(zT,J)),b(!1,en(zT,J))}const Y={role:"option","aria-selected":D,tabIndex:M?0:-1,onFocus(){v.set("activeIndex",q)},onMouseEnter(){!R.current&&v.state.selectedIndex===null&&C&&v.set("activeIndex",q)},onMouseMove(){C&&v.set("activeIndex",q)},onMouseLeave(J){!C||R.current||tq(J)||O.start(0,()=>{v.state.activeIndex===q&&v.set("activeIndex",null)})},onTouchStart(){w.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(J){ee.current=J.key,v.set("activeIndex",q)},onClick(J){ue.current=!1,!(J.type==="keydown"&&ee.current===null)&&(f||ee.current===" "&&x.current||re.current!=="touch"&&!M||(ee.current=null,L(J.nativeEvent)))},onPointerEnter(J){re.current=J.pointerType},onPointerDown(J){re.current=J.pointerType,ue.current=!0},onMouseUp(J){if(f)return;if(ue.current){ue.current=!1;return}const he=!w.current.allowSelectedMouseUp&&D,xe=!w.current.allowUnselectedMouseUp&&!D;he||xe||re.current!=="touch"&&!M||L(J.nativeEvent)}},I=sr("div",t,{ref:[z,r,g.ref,G],state:oe,props:[K,Y,h,Q]}),X=j.useMemo(()=>({selected:D,indexRef:ne,textRef:m,selectedByFocus:U,hasRegistered:V}),[D,ne,m,U,V]);return k.jsx(rq.Provider,{value:X,children:I})})),Oxe=j.forwardRef(function(t,r){const i=t.keepMounted??!1,{selected:s}=s5();return i||s?k.jsx(Rxe,{...t,ref:r}):null}),Rxe=j.memo(j.forwardRef((e,t)=>{const{render:r,className:i,keepMounted:s,...l}=e,{selected:c}=s5(),f=j.useRef(null),{transitionStatus:d,setMounted:h}=iS(c),g=sr("span",e,{ref:[t,f],state:{selected:c,transitionStatus:d},props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:Fg});return Hf({open:c,ref:f,onComplete(){c||h(!1)}}),g})),Axe=j.memo(j.forwardRef(function(t,r){const{indexRef:i,textRef:s,selectedByFocus:l,hasRegistered:c}=s5(),{selectedItemTextRef:f}=ou(),{className:d,render:h,...m}=t,g=j.useCallback(_=>{if(!_||!c)return;const b=f.current===null||!f.current.isConnected;(l||b&&i.current===0)&&(f.current=_)},[f,i,l,c]);return sr("div",t,{ref:[g,r,s],props:m})})),aq=j.forwardRef(function(t,r){const{render:i,className:s,direction:l,keepMounted:c=!1,...f}=t,{store:d,popupRef:h,listRef:m,handleScrollArrowVisibility:g,scrollArrowsMountedCountRef:v}=ou(),{side:_,scrollDownArrowRef:b,scrollUpArrowRef:S}=o5(),w=l==="up"?Rt.scrollUpArrowVisible:Rt.scrollDownArrowVisible,x=jt(d,w),E=jt(d,Rt.openMethod),R=x&&E!=="touch",T=ts(),C=l==="up"?S:b,{transitionStatus:O,setMounted:M}=iS(R);at(()=>(v.current+=1,d.state.hasScrollArrows||d.set("hasScrollArrows",!0),()=>{v.current=Math.max(0,v.current-1),v.current===0&&d.state.hasScrollArrows&&d.set("hasScrollArrows",!1)}),[d,v]),Hf({open:R,ref:C,onComplete(){R||M(!1)}});const B=sr("div",t,{ref:[r,C],state:{direction:l,visible:R,side:_,transitionStatus:O},props:[{"aria-hidden":!0,children:l==="up"?"▲":"▼",style:{position:"absolute"},onMouseMove(V){if(V.movementX===0&&V.movementY===0||T.isStarted())return;d.set("activeIndex",null);function G(){const ne=d.state.listElement??h.current;if(!ne)return;d.set("activeIndex",null),g();const oe=ne.scrollTop===0,K=Math.round(ne.scrollTop+ne.clientHeight)>=ne.scrollHeight;if(m.current.length===0&&(l==="up"?d.set("scrollUpArrowVisible",!oe):d.set("scrollDownArrowVisible",!K)),l==="up"&&oe||l==="down"&&K){T.clear();return}if((d.state.listElement||h.current)&&m.current&&m.current.length>0){const re=m.current,ue=C.current?.offsetHeight||0;if(l==="up"){let Q=0;const z=ne.scrollTop+ue;for(let Y=0;Y<re.length;Y+=1){const I=re[Y];if(I&&I.offsetTop>=z){Q=Y;break}}const L=Math.max(0,Q-1);if(L<Q){const Y=re[L];Y&&(ne.scrollTop=Math.max(0,Y.offsetTop-ue))}else ne.scrollTop=0}else{let Q=re.length-1;const z=ne.scrollTop+ne.clientHeight-ue;for(let Y=0;Y<re.length;Y+=1){const I=re[Y];if(I&&I.offsetTop+I.offsetHeight>z){Q=Math.max(0,Y-1);break}}const L=Math.min(re.length-1,Q+1);if(L>Q){const Y=re[L];Y&&(ne.scrollTop=Y.offsetTop+Y.offsetHeight-ne.clientHeight+ue)}else ne.scrollTop=ne.scrollHeight-ne.clientHeight}}T.start(40,G)}T.start(40,G)},onMouseLeave(){T.clear()}},f]});return R||c?B:null}),Mxe=j.forwardRef(function(t,r){return k.jsx(aq,{...t,ref:r,direction:"down"})}),jxe=j.forwardRef(function(t,r){return k.jsx(aq,{...t,ref:r,direction:"up"})}),kxe=j.createContext(void 0),Dxe=j.forwardRef(function(t,r){const{className:i,render:s,...l}=t,[c,f]=j.useState(),d=j.useMemo(()=>({labelId:c,setLabelId:f}),[c,f]),h=sr("div",t,{ref:r,props:[{role:"group","aria-labelledby":c},l]});return k.jsx(kxe.Provider,{value:d,children:h})}),YN=ixe;function ZN({className:e,...t}){return k.jsx(Dxe,{"data-slot":"select-group",className:qt("scroll-my-1",e),...t})}function XN({className:e,...t}){return k.jsx(fxe,{"data-slot":"select-value",className:qt("flex flex-1 text-left",e),...t})}function QN({className:e,size:t="default",children:r,...i}){return k.jsxs(uxe,{"data-slot":"select-trigger","data-size":t,className:qt("border-input data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-none border bg-transparent py-2 pr-2 pl-2.5 text-xs transition-colors select-none focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-none *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...i,children:[r,k.jsx(dxe,{render:k.jsx($z,{className:"text-muted-foreground size-4 pointer-events-none"})})]})}function WN({className:e,children:t,side:r="bottom",sideOffset:i=4,align:s="center",alignOffset:l=0,alignItemWithTrigger:c=!0,...f}){return k.jsx(pxe,{children:k.jsx(Sxe,{side:r,sideOffset:i,align:s,alignOffset:l,alignItemWithTrigger:c,className:"isolate z-50",children:k.jsxs(xxe,{"data-slot":"select-content",className:qt("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-none shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto",e),...f,children:[k.jsx(Nxe,{}),k.jsx(Txe,{children:t}),k.jsx(zxe,{})]})})})}function Tm({className:e,children:t,...r}){return k.jsxs(Cxe,{"data-slot":"select-item",className:qt("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-none py-2 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r,children:[k.jsx(Axe,{className:"flex flex-1 gap-2 shrink-0 whitespace-nowrap",children:t}),k.jsx(Oxe,{render:k.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:k.jsx(iR,{className:"pointer-events-none"})})]})}function Nxe({className:e,...t}){return k.jsx(jxe,{"data-slot":"select-scroll-up-button",className:qt("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full",e),...t,children:k.jsx(WV,{})})}function zxe({className:e,...t}){return k.jsx(Mxe,{"data-slot":"select-scroll-down-button",className:qt("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full",e),...t,children:k.jsx($z,{})})}const iq=j.createContext(void 0);function $xe(){const e=j.useContext(iq);if(e===void 0)throw new Error(xi(63));return e}let JN=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const oq={...r5,checked(e){return e?{[JN.checked]:""}:{[JN.unchecked]:""}}},Pxe=j.forwardRef(function(t,r){const{checked:i,className:s,defaultChecked:l,id:c,inputRef:f,name:d,nativeButton:h=!1,onCheckedChange:m,readOnly:g=!1,required:v=!1,disabled:_=!1,render:b,uncheckedValue:S,value:w,...x}=t,{clearErrors:E}=a5(),{state:R,setTouched:T,setDirty:C,validityData:O,setFilled:M,setFocused:D,shouldValidateOnChange:U,validationMode:B,disabled:q,name:V,validation:G}=Gg(),{labelId:ne}=zx(),oe=q||_,K=V??d,ee=Je(m),re=j.useRef(null),ue=Nc(re,f,G.inputRef),Q=j.useRef(null),z=Ug(),L=$x({id:c,implicit:!1,controlRef:Q}),Y=h?void 0:L,[I,X]=S1({controlled:i,default:!!l,name:"Switch",state:"checked"});i5({id:z,commit:G.commit,value:I,controlRef:Q,name:K,getValue:()=>I}),at(()=>{re.current&&M(re.current.checked)},[re,M]),XU(I,()=>{E(K),C(I!==O.initialValue),M(I),U()?G.commit(I):G.commit(I,!0)});const{getButtonProps:J,buttonRef:he}=Kp({disabled:oe,native:h}),xe={id:h?L:z,role:"switch","aria-checked":I,"aria-readonly":g||void 0,"aria-required":v||void 0,"aria-labelledby":ne,onFocus(){oe||D(!0)},onBlur(){const se=re.current;!se||oe||(T(!0),D(!1),B==="onBlur"&&G.commit(se.checked))},onClick(se){g||oe||(se.preventDefault(),re.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:se.shiftKey,ctrlKey:se.ctrlKey,altKey:se.altKey,metaKey:se.metaKey})))}},we=j.useMemo(()=>G1({checked:I,disabled:oe,id:Y,name:K,required:v,style:K?bU:Mx,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:ue,onChange(se){if(se.nativeEvent.defaultPrevented)return;const ye=se.target.checked,be=en(Df,se.nativeEvent);ee?.(ye,be),!be.isCanceled&&X(ye)},onFocus(){Q.current?.focus()}},G.getInputValidationProps,w!==void 0?{value:w}:ka),[I,oe,ue,Y,K,ee,v,X,G,w]),je=j.useMemo(()=>({...R,checked:I,disabled:oe,readOnly:g,required:v}),[R,I,oe,g,v]),de=sr("span",t,{state:je,ref:[r,Q,he],props:[xe,G.getValidationProps,x,J],stateAttributesMapping:oq});return k.jsxs(iq.Provider,{value:je,children:[de,!I&&K&&S!==void 0&&k.jsx("input",{type:"hidden",name:K,value:S}),k.jsx("input",{...we})]})}),Ixe=j.forwardRef(function(t,r){const{render:i,className:s,...l}=t,{state:c}=Gg(),f=$xe(),d={...c,...f};return sr("span",t,{state:d,ref:r,stateAttributesMapping:oq,props:l})});function ez({className:e,size:t="default",...r}){return k.jsx(Pxe,{"data-slot":"switch","data-size":t,className:qt("cursor-pointer data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-1 aria-invalid:ring-1 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...r,children:k.jsx(Ixe,{"data-slot":"switch-thumb",className:"bg-background dark:data-unchecked:bg-foreground dark:data-checked:bg-primary-foreground rounded-full group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 pointer-events-none block ring-0 transition-transform"})})}function Lxe({className:e,...t}){return k.jsx("div",{"data-slot":"input-group",role:"group",className:qt("border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-disabled:bg-input/50 dark:has-disabled:bg-input/80 h-8 rounded-none border transition-colors has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot][aria-invalid=true]]:ring-1 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto",e),...t})}const Uxe=Fc("text-muted-foreground h-auto gap-2 py-1.5 text-xs font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-none [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none",{variants:{align:{"inline-start":"pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first","inline-end":"pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last","block-start":"px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start","block-end":"px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start"}},defaultVariants:{align:"inline-start"}});function qxe({className:e,align:t="inline-start",...r}){return k.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:qt(Uxe({align:t}),e),onClick:i=>{i.target.closest("button")||i.currentTarget.parentElement?.querySelector("input")?.focus()},...r})}function Vxe({className:e,...t}){return k.jsx(ss,{"data-slot":"command",className:qt("bg-popover text-popover-foreground rounded-none flex size-full flex-col overflow-hidden",e),...t})}function Fxe({className:e,...t}){return k.jsx("div",{"data-slot":"command-input-wrapper",className:"border-b pb-0",children:k.jsxs(Lxe,{className:"bg-input/30 border-input/30 h-8 border-none shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[k.jsx(ss.Input,{"data-slot":"command-input",className:qt("w-full text-xs outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),k.jsx(qxe,{children:k.jsx(yF,{className:"size-4 shrink-0 opacity-50"})})]})})}function Bxe({className:e,...t}){return k.jsx(ss.List,{"data-slot":"command-list",className:qt("no-scrollbar max-h-72 scroll-py-0 outline-none overflow-x-hidden overflow-y-auto",e),...t})}function Hxe({className:e,...t}){return k.jsx(ss.Empty,{"data-slot":"command-empty",className:qt("py-6 text-center text-xs",e),...t})}function Gxe({className:e,...t}){return k.jsx(ss.Group,{"data-slot":"command-group",className:qt("text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs",e),...t})}function Kxe({className:e,children:t,...r}){return k.jsxs(ss.Item,{"data-slot":"command-item",className:qt("data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none [&_svg:not([class*='size-'])]:size-4 in-data-[slot=dialog-content]:rounded-none! group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...r,children:[t,k.jsx(iR,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}const sq=j.createContext(void 0);function lS(e){const t=j.useContext(sq);if(t===void 0&&!e)throw new Error(xi(47));return t}function Yxe(){return{...IU(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}const Zxe={...LU,disabled:it(e=>e.disabled),instantType:it(e=>e.instantType),openMethod:it(e=>e.openMethod),openChangeReason:it(e=>e.openChangeReason),modal:it(e=>e.modal),stickIfOpen:it(e=>e.stickIfOpen),titleElementId:it(e=>e.titleElementId),descriptionElementId:it(e=>e.descriptionElementId),openOnHover:it(e=>e.openOnHover),closeDelay:it(e=>e.closeDelay),hasViewport:it(e=>e.hasViewport)};class l5 extends XM{constructor(t){const r={...Yxe(),...t};r.open&&t?.mounted===void 0&&(r.mounted=!0),super(r,{popupRef:j.createRef(),backdropRef:j.createRef(),internalBackdropRef:j.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:j.createRef(),beforeContentFocusGuardRef:j.createRef(),stickIfOpenTimeout:new eu,triggerElements:new kx},Zxe)}setOpen=(t,r)=>{const i=r.reason===Wo,s=r.reason===yg&&r.event.detail===0,l=!t&&(r.reason===R7||r.reason==null);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,r),r.isCanceled)return;const c={open:t,nativeEvent:r.event,reason:r.reason,nested:this.state.nested,triggerElement:r.trigger};this.state.floatingRootContext.context.events?.emit("openchange",c);const d=()=>{const h={open:t,openChangeReason:r.reason},m=r.trigger?.id??null;(m||t)&&(h.activeTriggerId=m,h.activeTriggerElement=r.trigger??null),this.update(h)};i?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(aie,()=>{this.set("stickIfOpen",!1)}),Es.flushSync(d)):d(),s||l?this.set("instantType",s?"click":"dismiss"):r.reason===Ip?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(t,r){const i=ki(()=>new l5(r)).current,s=t??i;return Cx(i.disposeEffect),s}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}function tz({props:e}){const{children:t,open:r,defaultOpen:i=!1,onOpenChange:s,onOpenChangeComplete:l,modal:c=!1,handle:f,triggerId:d,defaultTriggerId:h=null}=e,m=l5.useStore(f?.store,{modal:c,open:i,openProp:r,activeTriggerId:h,triggerIdProp:d});e5(()=>{r===void 0&&m.state.open===!1&&i===!0&&m.update({open:!0,activeTriggerId:h})}),m.useControlledProp("openProp",r),m.useControlledProp("triggerIdProp",d);const g=m.useState("open"),v=m.useState("positionerElement"),_=m.useState("payload"),b=m.useState("openChangeReason");m.useContextCallback("onOpenChange",s),m.useContextCallback("onOpenChangeComplete",l);const{openMethod:S,triggerProps:w,reset:x}=n5(g);$U(m);const{forceUnmount:E}=PU(g,m,()=>{m.update({stickIfOpen:!0,openChangeReason:null}),x()});t5(g&&c===!0&&b!==Wo&&S!=="touch",v),j.useEffect(()=>{g||m.context.stickIfOpenTimeout.clear()},[m,g]);const R=j.useCallback(oe=>{const K=en(oe);return K.preventUnmountOnClose=()=>{m.set("preventUnmountingOnClose",!0)},K},[m]),T=j.useCallback(()=>{m.setOpen(!1,R(A7))},[m,R]);j.useImperativeHandle(e.actionsRef,()=>({unmount:E,close:T}),[E,T]);const C=qU({popupStore:m,onOpenChange:m.setOpen}),O=ZM(C,{outsidePressEvent:{mouse:c==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),M=FU(C),{getReferenceProps:D,getFloatingProps:U,getTriggerProps:B}=Dx([O,M]),q=j.useMemo(()=>D(w),[D,w]),V=j.useMemo(()=>B(w),[B,w]),G=j.useMemo(()=>U(),[U]);m.useSyncedValues({modal:c,openMethod:S,activeTriggerProps:q,inactiveTriggerProps:V,popupProps:G,floatingRootContext:C,nested:Gf()!=null});const ne=j.useMemo(()=>({store:m}),[m]);return k.jsx(sq.Provider,{value:ne,children:typeof t=="function"?t({payload:_}):t})}function Xxe(e){return lS(!0)?k.jsx(tz,{props:e}):k.jsx(xSe,{children:k.jsx(tz,{props:e})})}const Qxe=300,Wxe=j.forwardRef(function(t,r){const{render:i,className:s,disabled:l=!1,nativeButton:c=!0,handle:f,payload:d,openOnHover:h=!1,delay:m=Qxe,closeDelay:g=0,id:v,..._}=t,b=lS(!0),S=f?.store??b?.store;if(!S)throw new Error(xi(74));const w=Ug(v),x=S.useState("isTriggerActive",w),E=S.useState("floatingRootContext"),R=S.useState("isOpenedByTrigger",w),T=j.useRef(null),{registerTrigger:C,isMountedByThisTrigger:O}=Ywe(w,T,S,{payload:d,disabled:l,openOnHover:h,closeDelay:g}),M=S.useState("openChangeReason"),D=S.useState("stickIfOpen"),U=S.useState("openMethod"),B=rEe(E,{enabled:E!=null&&h&&(U!=="touch"||M!==yg),mouseOnly:!0,move:!1,handleClose:fEe(),restMs:m,delay:{close:g},triggerElementRef:T,isActiveTrigger:x}),q=xU(E,{enabled:E!=null,stickIfOpen:D}),V=Dx([q]),G=S.useState("triggerProps",O),ne={disabled:l,open:R},{getButtonProps:oe,buttonRef:K}=Kp({disabled:l,native:c}),ee=j.useMemo(()=>({open(L){return L&&M===yg?pU.open(L):hU.open(L)}}),[M]),re=sr("button",t,{state:ne,ref:[K,r,C,T],props:[V.getReferenceProps(),B,G,{[z$]:"",id:w},_,oe],stateAttributesMapping:ee}),ue=j.useRef(null),Q=Je(L=>{Es.flushSync(()=>{S.setOpen(!1,en(Ip,L.nativeEvent,L.currentTarget))}),p1e(ue.current)?.focus()}),z=Je(L=>{const Y=S.select("positionerElement");if(Y&&Jm(L,Y))S.context.beforeContentFocusGuardRef.current?.focus();else{Es.flushSync(()=>{S.setOpen(!1,en(Ip,L.nativeEvent,L.currentTarget))});let I=h1e(S.context.triggerFocusTargetRef.current||T.current);for(;I!==null&&on(Y,I);){const X=I;if(I=FM(I),I===X)break}I?.focus()}});return x?k.jsxs(j.Fragment,{children:[k.jsx(wg,{ref:ue,onFocus:Q}),k.jsx(j.Fragment,{children:re},w),k.jsx(wg,{ref:S.context.triggerFocusTargetRef,onFocus:z})]}):k.jsx(j.Fragment,{children:re},w)}),lq=j.createContext(void 0);function Jxe(){const e=j.useContext(lq);if(e===void 0)throw new Error(xi(45));return e}const e_e=j.forwardRef(function(t,r){const{keepMounted:i=!1,...s}=t,{store:l}=lS();return l.useState("mounted")||i?k.jsx(lq.Provider,{value:i,children:k.jsx(HM,{ref:r,...s})}):null}),uq=j.createContext(void 0);function t_e(){const e=j.useContext(uq);if(!e)throw new Error(xi(46));return e}const n_e=j.forwardRef(function(t,r){const{render:i,className:s,anchor:l,positionMethod:c="absolute",side:f="bottom",align:d="center",sideOffset:h=0,alignOffset:m=0,collisionBoundary:g="clipping-ancestors",collisionPadding:v=5,arrowPadding:_=5,sticky:b=!1,disableAnchorTracking:S=!1,collisionAvoidance:w=sie,...x}=t,{store:E}=lS(),R=Jxe(),T=wSe(),C=E.useState("floatingRootContext"),O=E.useState("mounted"),M=E.useState("open"),D=E.useState("openChangeReason"),U=E.useState("activeTriggerElement"),B=E.useState("modal"),q=E.useState("positionerElement"),V=E.useState("instantType"),G=E.useState("transitionStatus"),ne=E.useState("hasViewport"),oe=j.useRef(null),K=tU(q,!1,!1),ee=WU({anchor:l,floatingRootContext:C,positionMethod:c,mounted:O,side:f,sideOffset:h,align:d,alignOffset:m,arrowPadding:_,collisionBoundary:g,collisionPadding:v,sticky:b,disableAnchorTracking:S,keepMounted:R,nodeId:T,collisionAvoidance:w,adaptiveOrigin:ne?vxe:void 0}),re=j.useMemo(()=>{const I={};return M||(I.pointerEvents="none"),{role:"presentation",hidden:!O,style:{...ee.positionerStyles,...I}}},[M,O,ee.positionerStyles]),ue=j.useMemo(()=>({props:re,...ee}),[re,ee]),Q=C.useState("domReferenceElement");at(()=>{const I=Q,X=oe.current;if(I&&(oe.current=I),X&&I&&I!==X){E.set("instantType",void 0);const J=new AbortController;return K(()=>{E.set("instantType","trigger-change")},J.signal),()=>{J.abort()}}},[Q,K,E]);const z={open:M,side:ue.side,align:ue.align,anchorHidden:ue.anchorHidden,instant:V},L=j.useCallback(I=>{E.set("positionerElement",I)},[E]),Y=sr("div",t,{state:z,props:[ue.props,Px(G),x],ref:[r,L],stateAttributesMapping:Hg});return k.jsxs(uq.Provider,{value:ue,children:[O&&B===!0&&D!==Wo&&k.jsx(JM,{ref:E.context.internalBackdropRef,inert:Ox(!M),cutout:U}),k.jsx(ESe,{id:T,children:Y})]})}),r_e={...Hg,...Fg},a_e=j.forwardRef(function(t,r){const{className:i,render:s,initialFocus:l,finalFocus:c,...f}=t,{store:d}=lS(),h=t_e(),m=nq()!=null,g=d.useState("open"),v=d.useState("openMethod"),_=d.useState("instantType"),b=d.useState("transitionStatus"),S=d.useState("popupProps"),w=d.useState("titleElementId"),x=d.useState("descriptionElementId"),E=d.useState("modal"),R=d.useState("mounted"),T=d.useState("openChangeReason"),C=d.useState("activeTriggerElement"),O=d.useState("floatingRootContext");Hf({open:g,ref:d.context.popupRef,onComplete(){g&&d.context.onOpenChangeComplete?.(!0)}});const M=d.useState("disabled"),D=d.useState("openOnHover"),U=d.useState("closeDelay");eEe(O,{enabled:D&&!M,closeDelay:U});function B(oe){return oe==="touch"?d.context.popupRef.current:!0}const q=l===void 0?B:l,V={open:g,side:h.side,align:h.align,instant:_,transitionStatus:b},G=j.useCallback(oe=>{d.set("popupElement",oe)},[d]),ne=sr("div",t,{state:V,ref:[r,d.context.popupRef,G],props:[S,{"aria-labelledby":w,"aria-describedby":x,onKeyDown(oe){m&&BM.has(oe.key)&&oe.stopPropagation()}},Px(b),f],stateAttributesMapping:r_e});return k.jsx(KM,{context:O,openInteractionType:v,modal:E==="trap-focus",disabled:!R||T===Wo,initialFocus:q,returnFocus:c,restoreFocus:"popup",previousFocusableElement:Mr(C)?C:void 0,nextFocusableElement:d.context.triggerFocusTargetRef,beforeContentFocusGuardRef:d.context.beforeContentFocusGuardRef,children:ne})});function i_e({...e}){return k.jsx(Xxe,{"data-slot":"popover",...e})}function o_e({...e}){return k.jsx(Wxe,{"data-slot":"popover-trigger",...e})}function s_e({className:e,align:t="center",alignOffset:r=0,side:i="bottom",sideOffset:s=4,...l}){return k.jsx(e_e,{children:k.jsx(n_e,{align:t,alignOffset:r,side:i,sideOffset:s,className:"isolate z-50",children:k.jsx(a_e,{"data-slot":"popover-content",className:qt("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 flex flex-col gap-2.5 rounded-none p-2.5 text-xs shadow-md ring-1 duration-100 z-50 w-72 origin-(--transform-origin) outline-hidden",e),...l})})})}const nz=[{value:"en-US",label:"English (US)"},{value:"es-ES",label:"español (España)"},{value:"fr-FR",label:"français (France)"},{value:"de-DE",label:"Deutsch"},{value:"it-IT",label:"italiano"},{value:"am-ET",label:"አማርኛ"},{value:"ar",label:"العربية"},{value:"bg-BG",label:"български"},{value:"bn-BD",label:"বাংলা"},{value:"bs-BA",label:"bosanski"},{value:"ca-ES",label:"català"},{value:"cs-CZ",label:"čeština"},{value:"da-DK",label:"dansk"},{value:"el-GR",label:"Ελληνικά"},{value:"es-419",label:"español (Latinoamérica)"},{value:"et-EE",label:"eesti"},{value:"fi-FI",label:"suomi"},{value:"fr-CA",label:"français (Canada)"},{value:"gu-IN",label:"ગુજરાતી"},{value:"hi-IN",label:"हिन्दी"},{value:"hr-HR",label:"hrvatski"},{value:"hu-HU",label:"magyar"},{value:"hy-AM",label:"հայերեն"},{value:"id-ID",label:"Indonesia"},{value:"is-IS",label:"íslenska"},{value:"ja-JP",label:"日本語"},{value:"ka-GE",label:"ქართული"},{value:"kk-KZ",label:"қазақ тілі"},{value:"kn-IN",label:"ಕನ್ನಡ"},{value:"ko-KR",label:"한국어"},{value:"lt-LT",label:"lietuvių"},{value:"lv-LV",label:"latviešu"},{value:"mk-MK",label:"македонски"},{value:"ml-IN",label:"മലയാളം"},{value:"mn-MN",label:"монгол"},{value:"mr-IN",label:"मराठी"},{value:"ms-MY",label:"Bahasa Melayu"},{value:"my-MM",label:"မြန်မာ"},{value:"nb-NO",label:"norsk bokmål"},{value:"nl-NL",label:"Nederlands"},{value:"pa-IN",label:"ਪੰਜਾਬੀ"},{value:"pl-PL",label:"polski"},{value:"pt-BR",label:"português (Brasil)"},{value:"pt-PT",label:"português (Portugal)"},{value:"ro-RO",label:"română"},{value:"ru-RU",label:"русский"},{value:"sk-SK",label:"slovenčina"},{value:"sl-SI",label:"slovenščina"},{value:"so-SO",label:"Soomaali"},{value:"sq-AL",label:"shqip"},{value:"sr-RS",label:"српски"},{value:"sv-SE",label:"svenska"},{value:"sw-KE",label:"Kiswahili"},{value:"ta-IN",label:"தமிழ்"},{value:"te-IN",label:"తెలుగు"},{value:"th-TH",label:"ไทย"},{value:"tl-PH",label:"Tagalog"},{value:"tr-TR",label:"Türkçe"},{value:"uk-UA",label:"українська"},{value:"ur-PK",label:"اردو"},{value:"vi-VN",label:"Tiếng Việt"},{value:"zh-Hans",label:"简体中文"},{value:"zh-Hant-HK",label:"繁體中文(香港)"},{value:"zh-Hant-TW",label:"繁體中文(台灣)"}],l_e=({value:e,onValueChange:t})=>{const[r,i]=j.useState(!1),s=nz.find(l=>l.value===e);return k.jsxs(i_e,{open:r,onOpenChange:i,children:[k.jsx(o_e,{children:k.jsxs(bl,{variant:"outline",role:"combobox","aria-expanded":r,className:"w-full justify-between",children:[s?k.jsxs("span",{children:[s.value,k.jsxs("span",{className:"text-muted-foreground",children:[" ","- ",s.label]})]}):"Select locale...",k.jsx(eF,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),k.jsx(s_e,{className:"w-full p-0",children:k.jsxs(Vxe,{children:[k.jsx(Fxe,{placeholder:"Search locale..."}),k.jsxs(Bxe,{children:[k.jsx(Hxe,{children:"No locale found."}),k.jsx(Gxe,{children:nz.map(l=>k.jsxs(Kxe,{value:l.value,onSelect:c=>{t(c===e?"":c),i(!1)},children:[k.jsxs("span",{children:[l.label," ",k.jsxs("span",{className:"text-muted-foreground",children:["(",l.value,")"]})]}),k.jsx(iR,{className:qt("ml-auto h-4 w-4",e===l.value?"opacity-100":"opacity-0")})]},l.value))})]})]})})]})};function u_e({resourceUri:e}){const{data:t}=O$(e);return t?k.jsx("div",{className:"text-xs",children:k.jsx(Ax,{src:t.contents[0],name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",style:{fontSize:"0.75rem"},collapsed:4,collapseStringsAfterLength:80})}):null}const c_e=()=>{const e=Lf(),{openaiRef:t,openaiObject:r,openInAppUrl:i}=jg(e.name),{setToolData:s}=Mg(),l=e._meta?.["openai/outputTemplate"],c=(f,d)=>{const h=t?.current?.contentWindow?.openai;h&&r&&(h[f]=d,s(e.name,{openaiObject:{...r,[f]:d}}))};return r?k.jsx("div",{className:"overflow-auto max-h-full min-h-0",children:k.jsxs(iU,{defaultValue:"widget-state",className:"gap-0",children:[k.jsxs(oU,{className:"border-b border-border w-full",children:[k.jsx(Qb,{value:"properties",children:"Properties"}),k.jsx(Qb,{value:"widget-state",children:"Widget State"}),l&&k.jsx(Qb,{value:"resource",children:"Resource"})]}),k.jsx(Wb,{value:"properties",className:"p-4",children:k.jsxs(BEe,{children:[k.jsxs(nf,{children:[k.jsx(rf,{children:"Display Mode"}),k.jsxs(YN,{value:r.displayMode,onValueChange:f=>c("displayMode",f),"aria-label":"Select framework",items:[{label:"Inline",value:"inline"},{label:"Fullscreen",value:"fullscreen"},{label:"Pip",value:"pip"},{label:"Modal",value:"modal"}],name:"displayMode",required:!0,children:[k.jsx(QN,{children:k.jsx(XN,{})}),k.jsx(WN,{children:k.jsxs(ZN,{children:[k.jsx(Tm,{value:"inline",children:"Inline"}),k.jsx(Tm,{value:"fullscreen",children:"Fullscreen"}),k.jsx(Tm,{value:"pip",children:"Pip"}),k.jsx(Tm,{value:"modal",children:"Modal"})]})})]})]}),k.jsxs(nf,{children:[k.jsx(rf,{children:"Theme"}),k.jsxs(VEe,{children:[k.jsx(bl,{variant:r.theme==="light"?"default":"outline",onClick:()=>c("theme","light"),children:k.jsx(bF,{})}),k.jsx(bl,{variant:r.theme==="dark"?"default":"outline",onClick:()=>c("theme","dark"),children:k.jsx(dF,{})})]})]}),k.jsxs(nf,{children:[k.jsx(rf,{children:"Locale"}),k.jsx(l_e,{value:r.locale,onValueChange:f=>c("locale",f)})]}),k.jsxs(nf,{children:[k.jsx(rf,{children:"Max Height"}),k.jsx(XT,{type:"number",value:r.maxHeight!==void 0?String(r.maxHeight):"",onChange:f=>{const d=f.target.value.trim();c("maxHeight",d===""?void 0:Number(d))}})]}),k.jsxs(nf,{children:[k.jsx(rf,{children:"Safe Area Insets"}),k.jsx("div",{className:"grid grid-cols-2 gap-4",children:["top","bottom","left","right"].map(f=>{const d=f.charAt(0).toUpperCase()+f.slice(1);return k.jsxs("div",{children:[k.jsx("label",{htmlFor:`safeArea-${f}`,className:"text-xs text-muted-foreground block mb-1",children:d}),k.jsx(XT,{id:`safeArea-${f}`,type:"number",value:r.safeArea?.insets?.[f]!==void 0?String(r.safeArea.insets[f]):"0",onChange:h=>{const m=h.target.value.trim();c("safeArea",{...r.safeArea,insets:{...r.safeArea?.insets,[f]:m===""?0:Number(m)}})}})]},f)})})]}),k.jsxs(nf,{children:[k.jsx(rf,{children:"Device Type"}),k.jsxs(YN,{value:r.userAgent?.device?.type??"desktop",onValueChange:f=>c("userAgent",{...r.userAgent,device:{...r.userAgent?.device,type:f}}),"aria-label":"Select device type",items:[{label:"Mobile",value:"mobile"},{label:"Desktop",value:"desktop"}],name:"deviceType",required:!0,children:[k.jsx(QN,{children:k.jsx(XN,{})}),k.jsx(WN,{children:k.jsxs(ZN,{children:[k.jsx(Tm,{value:"mobile",children:"Mobile"}),k.jsx(Tm,{value:"desktop",children:"Desktop"})]})})]})]}),k.jsxs(nf,{children:[k.jsx(rf,{children:"Capabilities"}),k.jsxs("div",{className:"flex gap-8",children:[k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx("label",{htmlFor:"hover",className:"text-xs text-muted-foreground cursor-pointer",children:"Hover"}),k.jsx(ez,{id:"hover",checked:r.userAgent?.capabilities?.hover??!1,onCheckedChange:f=>c("userAgent",{...r.userAgent,capabilities:{...r.userAgent?.capabilities,hover:f}})})]}),k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx("label",{htmlFor:"touch",className:"text-xs text-muted-foreground cursor-pointer",children:"Touch"}),k.jsx(ez,{id:"touch",checked:r.userAgent?.capabilities?.touch??!1,onCheckedChange:f=>c("userAgent",{...r.userAgent,capabilities:{...r.userAgent?.capabilities,touch:f}})})]})]})]}),k.jsxs(nf,{children:[k.jsx(rf,{children:"Open in App URL"}),k.jsx(XT,{type:"text",value:i??"",readOnly:!0,placeholder:"Not set",className:"font-mono text-xs"})]})]})}),k.jsx(Wb,{value:"widget-state",className:"p-4",children:k.jsx(Ax,{src:r.widgetState??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",collapsed:3,collapseStringsAfterLength:80})}),l&&k.jsx(Wb,{value:"resource",className:"p-4",children:k.jsx(j.Suspense,{fallback:k.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading resource..."}),children:k.jsx(u_e,{resourceUri:l})})})]})}):null};function rz(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function f_e(e,t=60){const r=JSON.stringify(e);return r.length>t?`${r.slice(0,t)}…`:r}function d_e({log:e}){const[t,r]=j.useState(!1),i=Object.keys(e.args).length>0,s=i?f_e(e.args):null;return k.jsxs(k.Fragment,{children:[i?k.jsxs("button",{type:"button",onClick:()=>r(!t),className:"flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800/30 w-full text-left",children:[k.jsx("span",{className:"text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]",children:rz(e.timestamp)}),k.jsx("span",{className:qt("font-semibold shrink-0 min-w-[120px]",e.type==="response"?"text-green-600 dark:text-green-400":"text-blue-600 dark:text-blue-400"),children:e.command}),k.jsx("span",{className:"text-gray-500 dark:text-gray-600 mr-1",children:t?"▼":"▶"}),k.jsx("span",{className:"text-gray-600 dark:text-gray-400 truncate flex-1 min-w-0",children:s})]}):k.jsxs("div",{className:"flex items-center gap-2 py-1.5 px-2 text-xs font-mono border-b border-gray-200 dark:border-gray-800/50",children:[k.jsx("span",{className:"text-gray-600 dark:text-gray-500 shrink-0 min-w-[80px]",children:rz(e.timestamp)}),k.jsx("span",{className:"text-blue-600 dark:text-blue-400 font-semibold shrink-0 min-w-[120px]",children:e.command})]}),t&&i&&k.jsx("div",{className:"px-2 py-2 bg-gray-50 dark:bg-gray-900/30 border-b border-gray-200 dark:border-gray-800/50",children:k.jsx("pre",{className:"text-xs font-mono text-gray-800 dark:text-gray-200 whitespace-pre-wrap overflow-x-auto",children:JSON.stringify(e.args,null,2)})})]})}function h_e(){const e=Lf(),{setToolData:t}=Mg(),{openaiLogs:r}=jg(e.name),i=j.useRef(null),s=()=>{t(e.name,{openaiLogs:[]})};return j.useEffect(()=>{const l=i.current;l&&(l.scrollTop=l.scrollHeight)},[]),k.jsxs("div",{className:"flex flex-col h-full overflow-hidden min-h-0",children:[k.jsxs("div",{className:"flex items-center justify-between mb-3 h-8 flex-none",children:[k.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-gray-200",children:"MCP client logs"}),k.jsx("div",{className:"flex items-center gap-2",children:r.length>0&&k.jsxs(bl,{variant:"ghost",size:"sm",onClick:s,children:[k.jsx(wF,{className:"w-3 h-3"}),"Clear"]})})]}),k.jsx("div",{ref:i,className:"overflow-auto flex-1 bg-gray-50 rounded-lg border border-gray-200 min-h-0",children:r.map(l=>k.jsx(d_e,{log:l},l.id))})]})}const p_e=Fc("relative grid w-full items-start gap-x-2 gap-y-0.5 rounded-xl border px-3.5 py-3 text-card-foreground text-sm has-[>svg]:has-data-[slot=alert-action]:grid-cols-[calc(var(--spacing)*4)_1fr_auto] has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-data-[slot=alert-action]:grid-cols-[1fr_auto] has-[>svg]:gap-x-2 [&>svg]:h-[1lh] [&>svg]:w-4",{defaultVariants:{variant:"default"},variants:{variant:{default:"bg-transparent dark:bg-input/32 [&>svg]:text-muted-foreground",error:"border-destructive/32 bg-destructive/4 [&>svg]:text-destructive",info:"border-info/32 bg-info/4 [&>svg]:text-info",success:"border-success/32 bg-success/4 [&>svg]:text-success",warning:"border-warning/32 bg-warning/4 [&>svg]:text-warning"}}});function m_e({className:e,variant:t,...r}){return k.jsx("div",{className:qt(p_e({variant:t}),e),"data-slot":"alert",role:"alert",...r})}function g_e({className:e,...t}){return k.jsx("div",{className:qt("font-medium [svg~&]:col-start-2",e),"data-slot":"alert-title",...t})}function y_e({className:e,...t}){return k.jsx("div",{className:qt("flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2",e),"data-slot":"alert-description",...t})}const v_e=()=>{const e=Lf(),t=jg(e.name);if(!t)return null;const r=()=>{const i=[];return t.response.content.forEach(s=>{s.type==="text"&&i.push(s.text)}),i.join(`
|
|
151
|
+
`)};return k.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-card",children:k.jsx("div",{className:"p-4 overflow-auto",children:t.response?t.response.isError?k.jsxs(m_e,{variant:"error",children:[k.jsx(nF,{}),k.jsx(g_e,{children:"Error"}),k.jsx(y_e,{children:r()})]}):k.jsx("div",{className:"text-xs",children:k.jsx(Ax,{src:t.response??{},name:null,quotesOnKeys:!1,displayDataTypes:!1,displayObjectSize:!1,enableClipboard:!1,theme:"rjv-default",style:{fontSize:"0.75rem"},collapsed:3,collapseStringsAfterLength:80})}):null})})},cq="openai:set_globals";class b_e extends CustomEvent{type=cq}var WT={exports:{}},Lt={};var az;function S_e(){if(az)return Lt;az=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function _(z){return z===null||typeof z!="object"?null:(z=v&&z[v]||z["@@iterator"],typeof z=="function"?z:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,w={};function x(z,L,Y){this.props=z,this.context=L,this.refs=w,this.updater=Y||b}x.prototype.isReactComponent={},x.prototype.setState=function(z,L){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,L,"setState")},x.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function E(){}E.prototype=x.prototype;function R(z,L,Y){this.props=z,this.context=L,this.refs=w,this.updater=Y||b}var T=R.prototype=new E;T.constructor=R,S(T,x.prototype),T.isPureReactComponent=!0;var C=Array.isArray;function O(){}var M={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function U(z,L,Y){var I=Y.ref;return{$$typeof:e,type:z,key:L,ref:I!==void 0?I:null,props:Y}}function B(z,L){return U(z.type,L,z.props)}function q(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function V(z){var L={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(Y){return L[Y]})}var G=/\/+/g;function ne(z,L){return typeof z=="object"&&z!==null&&z.key!=null?V(""+z.key):L.toString(36)}function oe(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(O,O):(z.status="pending",z.then(function(L){z.status==="pending"&&(z.status="fulfilled",z.value=L)},function(L){z.status==="pending"&&(z.status="rejected",z.reason=L)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function K(z,L,Y,I,X){var J=typeof z;(J==="undefined"||J==="boolean")&&(z=null);var he=!1;if(z===null)he=!0;else switch(J){case"bigint":case"string":case"number":he=!0;break;case"object":switch(z.$$typeof){case e:case t:he=!0;break;case m:return he=z._init,K(he(z._payload),L,Y,I,X)}}if(he)return X=X(z),he=I===""?"."+ne(z,0):I,C(X)?(Y="",he!=null&&(Y=he.replace(G,"$&/")+"/"),K(X,L,Y,"",function(je){return je})):X!=null&&(q(X)&&(X=B(X,Y+(X.key==null||z&&z.key===X.key?"":(""+X.key).replace(G,"$&/")+"/")+he)),L.push(X)),1;he=0;var xe=I===""?".":I+":";if(C(z))for(var we=0;we<z.length;we++)I=z[we],J=xe+ne(I,we),he+=K(I,L,Y,J,X);else if(we=_(z),typeof we=="function")for(z=we.call(z),we=0;!(I=z.next()).done;)I=I.value,J=xe+ne(I,we++),he+=K(I,L,Y,J,X);else if(J==="object"){if(typeof z.then=="function")return K(oe(z),L,Y,I,X);throw L=String(z),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return he}function ee(z,L,Y){if(z==null)return z;var I=[],X=0;return K(z,I,"","",function(J){return L.call(Y,J,X++)}),I}function re(z){if(z._status===-1){var L=z._result;L=L(),L.then(function(Y){(z._status===0||z._status===-1)&&(z._status=1,z._result=Y)},function(Y){(z._status===0||z._status===-1)&&(z._status=2,z._result=Y)}),z._status===-1&&(z._status=0,z._result=L)}if(z._status===1)return z._result.default;throw z._result}var ue=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},Q={map:ee,forEach:function(z,L,Y){ee(z,function(){L.apply(this,arguments)},Y)},count:function(z){var L=0;return ee(z,function(){L++}),L},toArray:function(z){return ee(z,function(L){return L})||[]},only:function(z){if(!q(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Lt.Activity=g,Lt.Children=Q,Lt.Component=x,Lt.Fragment=r,Lt.Profiler=s,Lt.PureComponent=R,Lt.StrictMode=i,Lt.Suspense=d,Lt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Lt.__COMPILER_RUNTIME={__proto__:null,c:function(z){return M.H.useMemoCache(z)}},Lt.cache=function(z){return function(){return z.apply(null,arguments)}},Lt.cacheSignal=function(){return null},Lt.cloneElement=function(z,L,Y){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var I=S({},z.props),X=z.key;if(L!=null)for(J in L.key!==void 0&&(X=""+L.key),L)!D.call(L,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&L.ref===void 0||(I[J]=L[J]);var J=arguments.length-2;if(J===1)I.children=Y;else if(1<J){for(var he=Array(J),xe=0;xe<J;xe++)he[xe]=arguments[xe+2];I.children=he}return U(z.type,X,I)},Lt.createContext=function(z){return z={$$typeof:c,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:l,_context:z},z},Lt.createElement=function(z,L,Y){var I,X={},J=null;if(L!=null)for(I in L.key!==void 0&&(J=""+L.key),L)D.call(L,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(X[I]=L[I]);var he=arguments.length-2;if(he===1)X.children=Y;else if(1<he){for(var xe=Array(he),we=0;we<he;we++)xe[we]=arguments[we+2];X.children=xe}if(z&&z.defaultProps)for(I in he=z.defaultProps,he)X[I]===void 0&&(X[I]=he[I]);return U(z,J,X)},Lt.createRef=function(){return{current:null}},Lt.forwardRef=function(z){return{$$typeof:f,render:z}},Lt.isValidElement=q,Lt.lazy=function(z){return{$$typeof:m,_payload:{_status:-1,_result:z},_init:re}},Lt.memo=function(z,L){return{$$typeof:h,type:z,compare:L===void 0?null:L}},Lt.startTransition=function(z){var L=M.T,Y={};M.T=Y;try{var I=z(),X=M.S;X!==null&&X(Y,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(O,ue)}catch(J){ue(J)}finally{L!==null&&Y.types!==null&&(L.types=Y.types),M.T=L}},Lt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Lt.use=function(z){return M.H.use(z)},Lt.useActionState=function(z,L,Y){return M.H.useActionState(z,L,Y)},Lt.useCallback=function(z,L){return M.H.useCallback(z,L)},Lt.useContext=function(z){return M.H.useContext(z)},Lt.useDebugValue=function(){},Lt.useDeferredValue=function(z,L){return M.H.useDeferredValue(z,L)},Lt.useEffect=function(z,L){return M.H.useEffect(z,L)},Lt.useEffectEvent=function(z){return M.H.useEffectEvent(z)},Lt.useId=function(){return M.H.useId()},Lt.useImperativeHandle=function(z,L,Y){return M.H.useImperativeHandle(z,L,Y)},Lt.useInsertionEffect=function(z,L){return M.H.useInsertionEffect(z,L)},Lt.useLayoutEffect=function(z,L){return M.H.useLayoutEffect(z,L)},Lt.useMemo=function(z,L){return M.H.useMemo(z,L)},Lt.useOptimistic=function(z,L){return M.H.useOptimistic(z,L)},Lt.useReducer=function(z,L,Y){return M.H.useReducer(z,L,Y)},Lt.useRef=function(z){return M.H.useRef(z)},Lt.useState=function(z){return M.H.useState(z)},Lt.useSyncExternalStore=function(z,L,Y){return M.H.useSyncExternalStore(z,L,Y)},Lt.useTransition=function(){return M.H.useTransition()},Lt.version="19.2.3",Lt}var iz;function u5(){return iz||(iz=1,WT.exports=S_e()),WT.exports}var w_e=u5(),oz;(function(e){e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError"})(oz||(oz={}));class E_e{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,r){this.keyToValue.set(t,r),this.valueToKey.set(r,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class fq{constructor(t){this.generateIdentifier=t,this.kv=new E_e}register(t,r){this.kv.getByValue(t)||(r||(r=this.generateIdentifier(t)),this.kv.set(r,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}}class x_e extends fq{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,r){typeof r=="object"?(r.allowProps&&this.classToAllowedProps.set(t,r.allowProps),super.register(t,r.identifier)):super.register(t,r)}getAllowedProps(t){return this.classToAllowedProps.get(t)}}function __e(e){if("values"in Object)return Object.values(e);const t=[];for(const r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}function T_e(e,t){const r=__e(e);if("find"in r)return r.find(t);const i=r;for(let s=0;s<i.length;s++){const l=i[s];if(t(l))return l}}function xg(e,t){Object.entries(e).forEach(([r,i])=>t(i,r))}function Ww(e,t){return e.indexOf(t)!==-1}function sz(e,t){for(let r=0;r<e.length;r++){const i=e[r];if(t(i))return i}}class C_e{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return T_e(this.transfomers,r=>r.isApplicable(t))}findByName(t){return this.transfomers[t]}}const O_e=e=>Object.prototype.toString.call(e).slice(8,-1),dq=e=>typeof e>"u",R_e=e=>e===null,C1=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,KO=e=>C1(e)&&Object.keys(e).length===0,Nf=e=>Array.isArray(e),A_e=e=>typeof e=="string",M_e=e=>typeof e=="number"&&!isNaN(e),j_e=e=>typeof e=="boolean",k_e=e=>e instanceof RegExp,O1=e=>e instanceof Map,R1=e=>e instanceof Set,hq=e=>O_e(e)==="Symbol",D_e=e=>e instanceof Date&&!isNaN(e.valueOf()),pq=e=>e instanceof Error,lz=e=>typeof e=="number"&&isNaN(e),N_e=e=>j_e(e)||R_e(e)||dq(e)||M_e(e)||A_e(e)||hq(e),z_e=e=>typeof e=="bigint",$_e=e=>e===1/0||e===-1/0,P_e=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),I_e=e=>e instanceof URL,YO=e=>e.replace(/\\/g,"\\\\").replace(/\./g,"\\."),JT=e=>e.map(String).map(YO).join("."),t1=(e,t)=>{const r=[];let i="";for(let l=0;l<e.length;l++){let c=e.charAt(l);if(!t&&c==="\\"){const h=e.charAt(l+1);if(h==="\\"){i+="\\",l++;continue}else if(h!==".")throw Error("invalid path")}if(c==="\\"&&e.charAt(l+1)==="."){i+=".",l++;continue}if(c==="."){r.push(i),i="";continue}i+=c}const s=i;return r.push(s),r};function Nl(e,t,r,i){return{isApplicable:e,annotation:t,transform:r,untransform:i}}const mq=[Nl(dq,"undefined",()=>null,()=>{}),Nl(z_e,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),Nl(D_e,"Date",e=>e.toISOString(),e=>new Date(e)),Nl(pq,"Error",(e,t)=>{const r={name:e.name,message:e.message};return"cause"in e&&(r.cause=e.cause),t.allowedErrorProps.forEach(i=>{r[i]=e[i]}),r},(e,t)=>{const r=new Error(e.message,{cause:e.cause});return r.name=e.name,r.stack=e.stack,t.allowedErrorProps.forEach(i=>{r[i]=e[i]}),r}),Nl(k_e,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),r=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,r)}),Nl(R1,"set",e=>[...e.values()],e=>new Set(e)),Nl(O1,"map",e=>[...e.entries()],e=>new Map(e)),Nl(e=>lz(e)||$_e(e),"number",e=>lz(e)?"NaN":e>0?"Infinity":"-Infinity",Number),Nl(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),Nl(I_e,"URL",e=>e.toString(),e=>new URL(e))];function Ix(e,t,r,i){return{isApplicable:e,annotation:t,transform:r,untransform:i}}const gq=Ix((e,t)=>hq(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,r)=>{const i=r.symbolRegistry.getValue(t[1]);if(!i)throw new Error("Trying to deserialize unknown symbol");return i}),L_e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),yq=Ix(P_e,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const r=L_e[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function vq(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const bq=Ix(vq,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const r=t.classRegistry.getAllowedProps(e.constructor);if(!r)return{...e};const i={};return r.forEach(s=>{i[s]=e[s]}),i},(e,t,r)=>{const i=r.classRegistry.getValue(t[1]);if(!i)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(i.prototype),e)}),Sq=Ix((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,r)=>{const i=r.customTransformerRegistry.findByName(t[1]);if(!i)throw new Error("Trying to deserialize unknown custom value");return i.deserialize(e)}),U_e=[bq,gq,Sq,yq],uz=(e,t)=>{const r=sz(U_e,s=>s.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};const i=sz(mq,s=>s.isApplicable(e,t));if(i)return{value:i.transform(e,t),type:i.annotation}},wq={};mq.forEach(e=>{wq[e.annotation]=e});const q_e=(e,t,r)=>{if(Nf(t))switch(t[0]){case"symbol":return gq.untransform(e,t,r);case"class":return bq.untransform(e,t,r);case"custom":return Sq.untransform(e,t,r);case"typed-array":return yq.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}else{const i=wq[t];if(!i)throw new Error("Unknown transformation: "+t);return i.untransform(e,r)}},Bm=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const r=e.keys();for(;t>0;)r.next(),t--;return r.next().value};function Eq(e){if(Ww(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Ww(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Ww(e,"constructor"))throw new Error("constructor is not allowed as a property")}const V_e=(e,t)=>{Eq(t);for(let r=0;r<t.length;r++){const i=t[r];if(R1(e))e=Bm(e,+i);else if(O1(e)){const s=+i,l=+t[++r]==0?"key":"value",c=Bm(e,s);switch(l){case"key":e=c;break;case"value":e=e.get(c);break}}else e=e[i]}return e},ZO=(e,t,r)=>{if(Eq(t),t.length===0)return r(e);let i=e;for(let l=0;l<t.length-1;l++){const c=t[l];if(Nf(i)){const f=+c;i=i[f]}else if(C1(i))i=i[c];else if(R1(i)){const f=+c;i=Bm(i,f)}else if(O1(i)){if(l===t.length-2)break;const d=+c,h=+t[++l]==0?"key":"value",m=Bm(i,d);switch(h){case"key":i=m;break;case"value":i=i.get(m);break}}}const s=t[t.length-1];if(Nf(i)?i[+s]=r(i[+s]):C1(i)&&(i[s]=r(i[s])),R1(i)){const l=Bm(i,+s),c=r(l);l!==c&&(i.delete(l),i.add(c))}if(O1(i)){const l=+t[t.length-2],c=Bm(i,l);switch(+s==0?"key":"value"){case"key":{const d=r(c);i.set(d,i.get(c)),d!==c&&i.delete(c);break}case"value":{i.set(c,r(i.get(c)));break}}}return e},xq=e=>e<1;function XO(e,t,r,i=[]){if(!e)return;const s=xq(r);if(!Nf(e)){xg(e,(f,d)=>XO(f,t,r,[...i,...t1(d,s)]));return}const[l,c]=e;c&&xg(c,(f,d)=>{XO(f,t,r,[...i,...t1(d,s)])}),t(l,i)}function F_e(e,t,r,i){return XO(t,(s,l)=>{e=ZO(e,l,c=>q_e(c,s,i))},r),e}function B_e(e,t,r){const i=xq(r);function s(l,c){const f=V_e(e,t1(c,i));l.map(d=>t1(d,i)).forEach(d=>{e=ZO(e,d,()=>f)})}if(Nf(t)){const[l,c]=t;l.forEach(f=>{e=ZO(e,t1(f,i),()=>e)}),c&&xg(c,s)}else xg(t,s);return e}const H_e=(e,t)=>C1(e)||Nf(e)||O1(e)||R1(e)||pq(e)||vq(e,t);function G_e(e,t,r){const i=r.get(e);i?i.push(t):r.set(e,[t])}function K_e(e,t){const r={};let i;return e.forEach(s=>{if(s.length<=1)return;t||(s=s.map(f=>f.map(String)).sort((f,d)=>f.length-d.length));const[l,...c]=s;l.length===0?i=c.map(JT):r[JT(l)]=c.map(JT)}),i?KO(r)?[i]:[i,r]:KO(r)?void 0:r}const _q=(e,t,r,i,s=[],l=[],c=new Map)=>{const f=N_e(e);if(!f){G_e(e,s,t);const _=c.get(e);if(_)return i?{transformedValue:null}:_}if(!H_e(e,r)){const _=uz(e,r),b=_?{transformedValue:_.value,annotations:[_.type]}:{transformedValue:e};return f||c.set(e,b),b}if(Ww(l,e))return{transformedValue:null};const d=uz(e,r),h=d?.value??e,m=Nf(h)?[]:{},g={};xg(h,(_,b)=>{if(b==="__proto__"||b==="constructor"||b==="prototype")throw new Error(`Detected property ${b}. This is a prototype pollution risk, please remove it from your object.`);const S=_q(_,t,r,i,[...s,b],[...l,e],c);m[b]=S.transformedValue,Nf(S.annotations)?g[YO(b)]=S.annotations:C1(S.annotations)&&xg(S.annotations,(w,x)=>{g[YO(b)+"."+x]=w})});const v=KO(g)?{transformedValue:m,annotations:d?[d.type]:void 0}:{transformedValue:m,annotations:d?[d.type,g]:g};return f||c.set(e,v),v};function Tq(e){return Object.prototype.toString.call(e).slice(8,-1)}function cz(e){return Tq(e)==="Array"}function Y_e(e){if(Tq(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function Z_e(e,t,r,i,s){const l={}.propertyIsEnumerable.call(i,t)?"enumerable":"nonenumerable";l==="enumerable"&&(e[t]=r),s&&l==="nonenumerable"&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}function QO(e,t={}){if(cz(e))return e.map(s=>QO(s,t));if(!Y_e(e))return e;const r=Object.getOwnPropertyNames(e),i=Object.getOwnPropertySymbols(e);return[...r,...i].reduce((s,l)=>{if(l==="__proto__"||cz(t.props)&&!t.props.includes(l))return s;const c=e[l],f=QO(c,t);return Z_e(s,l,f,e,t.nonenumerable),s},{})}class fr{constructor({dedupe:t=!1}={}){this.classRegistry=new x_e,this.symbolRegistry=new fq(r=>r.description??""),this.customTransformerRegistry=new C_e,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const r=new Map,i=_q(t,r,this,this.dedupe),s={json:i.transformedValue};i.annotations&&(s.meta={...s.meta,values:i.annotations});const l=K_e(r,this.dedupe);return l&&(s.meta={...s.meta,referentialEqualities:l}),s.meta&&(s.meta.v=1),s}deserialize(t,r){const{json:i,meta:s}=t;let l=r?.inPlace?i:QO(i);return s?.values&&(l=F_e(l,s.values,s.v??0,this)),s?.referentialEqualities&&(l=B_e(l,s.referentialEqualities,s.v??0)),l}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t),{inPlace:!0})}registerClass(t,r){this.classRegistry.register(t,r)}registerSymbol(t,r){this.symbolRegistry.register(t,r)}registerCustom(t,r){this.customTransformerRegistry.register({name:r,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}}fr.defaultInstance=new fr;fr.serialize=fr.defaultInstance.serialize.bind(fr.defaultInstance);fr.deserialize=fr.defaultInstance.deserialize.bind(fr.defaultInstance);fr.stringify=fr.defaultInstance.stringify.bind(fr.defaultInstance);fr.parse=fr.defaultInstance.parse.bind(fr.defaultInstance);fr.registerClass=fr.defaultInstance.registerClass.bind(fr.defaultInstance);fr.registerSymbol=fr.defaultInstance.registerSymbol.bind(fr.defaultInstance);fr.registerCustom=fr.defaultInstance.registerCustom.bind(fr.defaultInstance);fr.allowErrorProps=fr.defaultInstance.allowErrorProps.bind(fr.defaultInstance);var eC={exports:{}},Cb={};var fz;function X_e(){if(fz)return Cb;fz=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var f in s)f!=="key"&&(l[f]=s[f])}else l=s;return s=l.ref,{$$typeof:e,type:i,key:c,ref:s!==void 0?s:null,props:l}}return Cb.Fragment=t,Cb.jsx=r,Cb.jsxs=r,Cb}var dz;function Q_e(){return dz||(dz=1,eC.exports=X_e()),eC.exports}Q_e();w_e.createContext(null);var tC={exports:{}},Ob={},nC={exports:{}},Ai={};var hz;function W_e(){if(hz)return Ai;hz=1;var e=u5();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(d,h,m){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:d,containerInfo:h,implementation:m}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Ai.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Ai.createPortal=function(d,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(d,h,null,m)},Ai.flushSync=function(d){var h=c.T,m=i.p;try{if(c.T=null,i.p=2,d)return d()}finally{c.T=h,i.p=m,i.d.f()}},Ai.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(d,h))},Ai.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},Ai.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var m=h.as,g=f(m,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,_=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?i.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:_}):m==="script"&&i.d.X(d,{crossOrigin:g,integrity:v,fetchPriority:_,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Ai.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=f(h.as,h.crossOrigin);i.d.M(d,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(d)},Ai.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,g=f(m,h.crossOrigin);i.d.L(d,m,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Ai.preloadModule=function(d,h){if(typeof d=="string")if(h){var m=f(h.as,h.crossOrigin);i.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(d)},Ai.requestFormReset=function(d){i.d.r(d)},Ai.unstable_batchedUpdates=function(d,h){return d(h)},Ai.useFormState=function(d,h,m){return c.H.useFormState(d,h,m)},Ai.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ai.version="19.2.3",Ai}var pz;function J_e(){if(pz)return nC.exports;pz=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),nC.exports=W_e(),nC.exports}var mz;function e2e(){if(mz)return Ob;mz=1;var e=yz(),t=u5(),r=J_e();function i(n){var a="https://react.dev/errors/"+n;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){var a=n,o=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(o=a.return),n=a.return;while(n)}return a.tag===3?o:null}function c(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function f(n){if(n.tag===31){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function d(n){if(l(n)!==n)throw Error(i(188))}function h(n){var a=n.alternate;if(!a){if(a=l(n),a===null)throw Error(i(188));return a!==n?null:n}for(var o=n,u=a;;){var p=o.return;if(p===null)break;var y=p.alternate;if(y===null){if(u=p.return,u!==null){o=u;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===o)return d(p),n;if(y===u)return d(p),a;y=y.sibling}throw Error(i(188))}if(o.return!==u.return)o=p,u=y;else{for(var A=!1,N=p.child;N;){if(N===o){A=!0,o=p,u=y;break}if(N===u){A=!0,u=p,o=y;break}N=N.sibling}if(!A){for(N=y.child;N;){if(N===o){A=!0,o=y,u=p;break}if(N===u){A=!0,u=y,o=p;break}N=N.sibling}if(!A)throw Error(i(189))}}if(o.alternate!==u)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?n:a}function m(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n;for(n=n.child;n!==null;){if(a=m(n),a!==null)return a;n=n.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),R=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function V(n){return n===null||typeof n!="object"?null:(n=q&&n[q]||n["@@iterator"],typeof n=="function"?n:null)}var G=Symbol.for("react.client.reference");function ne(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===G?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case S:return"Fragment";case x:return"Profiler";case w:return"StrictMode";case C:return"Suspense";case O:return"SuspenseList";case U:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case b:return"Portal";case R:return n.displayName||"Context";case E:return(n._context.displayName||"Context")+".Consumer";case T:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case M:return a=n.displayName||null,a!==null?a:ne(n.type)||"Memo";case D:a=n._payload,n=n._init;try{return ne(n(a))}catch{}}return null}var oe=Array.isArray,K=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},ue=[],Q=-1;function z(n){return{current:n}}function L(n){0>Q||(n.current=ue[Q],ue[Q]=null,Q--)}function Y(n,a){Q++,ue[Q]=n.current,n.current=a}var I=z(null),X=z(null),J=z(null),he=z(null);function xe(n,a){switch(Y(J,a),Y(X,n),Y(I,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?Pv(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=Pv(a),n=Iv(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}L(I),Y(I,n)}function we(){L(I),L(X),L(J)}function je(n){n.memoizedState!==null&&Y(he,n);var a=I.current,o=Iv(a,n.type);a!==o&&(Y(X,n),Y(I,o))}function de(n){X.current===n&&(L(I),L(X)),he.current===n&&(L(he),ll._currentValue=re)}var se,ye;function be(n){if(se===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);se=a&&a[1]||"",ye=-1<o.stack.indexOf(`
|
|
152
|
+
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
153
|
+
`+se+n+ye}var Ae=!1;function Oe(n,a){if(!n||Ae)return"";Ae=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(ce){var le=ce}Reflect.construct(n,[],ve)}else{try{ve.call()}catch(ce){le=ce}n.call(ve.prototype)}}else{try{throw Error()}catch(ce){le=ce}(ve=n())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(ce){if(ce&&le&&typeof ce.stack=="string")return[ce.stack,le.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),A=y[0],N=y[1];if(A&&N){var H=A.split(`
|
|
154
|
+
`),ie=N.split(`
|
|
155
|
+
`);for(p=u=0;u<H.length&&!H[u].includes("DetermineComponentFrameRoot");)u++;for(;p<ie.length&&!ie[p].includes("DetermineComponentFrameRoot");)p++;if(u===H.length||p===ie.length)for(u=H.length-1,p=ie.length-1;1<=u&&0<=p&&H[u]!==ie[p];)p--;for(;1<=u&&0<=p;u--,p--)if(H[u]!==ie[p]){if(u!==1||p!==1)do if(u--,p--,0>p||H[u]!==ie[p]){var pe=`
|
|
156
|
+
`+H[u].replace(" at new "," at ");return n.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",n.displayName)),pe}while(1<=u&&0<=p);break}}}finally{Ae=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?be(o):""}function Ie(n,a){switch(n.tag){case 26:case 27:case 5:return be(n.type);case 16:return be("Lazy");case 13:return n.child!==a&&a!==null?be("Suspense Fallback"):be("Suspense");case 19:return be("SuspenseList");case 0:case 15:return Oe(n.type,!1);case 11:return Oe(n.type.render,!1);case 1:return Oe(n.type,!0);case 31:return be("Activity");default:return""}}function $e(n){try{var a="",o=null;do a+=Ie(n,o),o=n,n=n.return;while(n);return a}catch(u){return`
|
|
157
|
+
Error generating stack: `+u.message+`
|
|
158
|
+
`+u.stack}}var Ne=Object.prototype.hasOwnProperty,Ue=e.unstable_scheduleCallback,Re=e.unstable_cancelCallback,Ze=e.unstable_shouldYield,ot=e.unstable_requestPaint,qe=e.unstable_now,xn=e.unstable_getCurrentPriorityLevel,yn=e.unstable_ImmediatePriority,zn=e.unstable_UserBlockingPriority,Dt=e.unstable_NormalPriority,Vt=e.unstable_LowPriority,hn=e.unstable_IdlePriority,Cn=e.log,_i=e.unstable_setDisableYieldValue,kr=null,Ht=null;function Mn(n){if(typeof Cn=="function"&&_i(n),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(kr,n)}catch{}}var Pt=Math.clz32?Math.clz32:qr,Gt=Math.log,qn=Math.LN2;function qr(n){return n>>>=0,n===0?32:31-(Gt(n)/qn|0)|0}var pn=256,dr=262144,Rr=4194304;function Vn(n){var a=n&42;if(a!==0)return a;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Xr(n,a,o){var u=n.pendingLanes;if(u===0)return 0;var p=0,y=n.suspendedLanes,A=n.pingedLanes;n=n.warmLanes;var N=u&134217727;return N!==0?(u=N&~y,u!==0?p=Vn(u):(A&=N,A!==0?p=Vn(A):o||(o=N&~n,o!==0&&(p=Vn(o))))):(N=u&~y,N!==0?p=Vn(N):A!==0?p=Vn(A):o||(o=u&~n,o!==0&&(p=Vn(o)))),p===0?0:a!==0&&a!==p&&(a&y)===0&&(y=p&-p,o=a&-a,y>=o||y===32&&(o&4194048)!==0)?a:p}function Vr(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function oo(n,a){switch(n){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Ua(){var n=Rr;return Rr<<=1,(Rr&62914560)===0&&(Rr=4194304),n}function qa(n){for(var a=[],o=0;31>o;o++)a.push(n);return a}function aa(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function At(n,a,o,u,p,y){var A=n.pendingLanes;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=o,n.entangledLanes&=o,n.errorRecoveryDisabledLanes&=o,n.shellSuspendCounter=0;var N=n.entanglements,H=n.expirationTimes,ie=n.hiddenUpdates;for(o=A&~o;0<o;){var pe=31-Pt(o),ve=1<<pe;N[pe]=0,H[pe]=-1;var le=ie[pe];if(le!==null)for(ie[pe]=null,pe=0;pe<le.length;pe++){var ce=le[pe];ce!==null&&(ce.lane&=-536870913)}o&=~ve}u!==0&&On(n,u,0),y!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=y&~(A&~a))}function On(n,a,o){n.pendingLanes|=a,n.suspendedLanes&=~a;var u=31-Pt(a);n.entangledLanes|=a,n.entanglements[u]=n.entanglements[u]|1073741824|o&261930}function Fr(n,a){var o=n.entangledLanes|=a;for(n=n.entanglements;o;){var u=31-Pt(o),p=1<<u;p&a|n[u]&a&&(n[u]|=a),o&=~p}}function hr(n,a){var o=a&-a;return o=(o&42)!==0?1:jn(o),(o&(n.suspendedLanes|a))!==0?0:o}function jn(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Ti(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Cs(){var n=ee.p;return n!==0?n:(n=window.event,n===void 0?32:sb(n.type))}function Tl(n,a){var o=ee.p;try{return ee.p=n,a()}finally{ee.p=o}}var ca=Math.random().toString(36).slice(2),cn="__reactFiber$"+ca,_n="__reactProps$"+ca,Ni="__reactContainer$"+ca,su="__reactEvents$"+ca,Kg="__reactListeners$"+ca,em="__reactHandles$"+ca,Bc="__reactResources$"+ca,yo="__reactMarker$"+ca;function lu(n){delete n[cn],delete n[_n],delete n[su],delete n[Kg],delete n[em]}function zi(n){var a=n[cn];if(a)return a;for(var o=n.parentNode;o;){if(a=o[Ni]||o[cn]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(n=Hv(n);n!==null;){if(o=n[cn])return o;n=Hv(n)}return a}n=o,o=n.parentNode}return null}function $i(n){if(n=n[cn]||n[Ni]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}function vo(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(i(33))}function Pi(n){var a=n[Bc];return a||(a=n[Bc]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Jt(n){n[yo]=!0}var Kf=new Set,Yf={};function Va(n,a){Ii(n,a),Ii(n+"Capture",a)}function Ii(n,a){for(Yf[n]=a,n=0;n<a.length;n++)Kf.add(a[n])}var Yg=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]*$"),Zf={},Xf={};function Zg(n){return Ne.call(Xf,n)?!0:Ne.call(Zf,n)?!1:Yg.test(n)?Xf[n]=!0:(Zf[n]=!0,!1)}function Os(n,a,o){if(Zg(a))if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+o)}}function ls(n,a,o){if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttribute(a,""+o)}}function Br(n,a,o,u){if(u===null)n.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(a,o,""+u)}}function Xn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Qf(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Xg(n,a,o){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,a);if(!n.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,y=u.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return p.call(this)},set:function(A){o=""+A,y.call(this,A)}}),Object.defineProperty(n,a,{enumerable:u.enumerable}),{getValue:function(){return o},setValue:function(A){o=""+A},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function uu(n){if(!n._valueTracker){var a=Qf(n)?"checked":"value";n._valueTracker=Xg(n,a,""+n[a])}}function Wf(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var o=a.getValue(),u="";return n&&(u=Qf(n)?n.checked?"true":"false":n.value),n=u,n!==o?(a.setValue(n),!0):!1}function us(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Hc=/[\n"\\]/g;function Qn(n){return n.replace(Hc,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function cu(n,a,o,u,p,y,A,N){n.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?n.type=A:n.removeAttribute("type"),a!=null?A==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+Xn(a)):n.value!==""+Xn(a)&&(n.value=""+Xn(a)):A!=="submit"&&A!=="reset"||n.removeAttribute("value"),a!=null?Cl(n,A,Xn(a)):o!=null?Cl(n,A,Xn(o)):u!=null&&n.removeAttribute("value"),p==null&&y!=null&&(n.defaultChecked=!!y),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?n.name=""+Xn(N):n.removeAttribute("name")}function Jf(n,a,o,u,p,y,A,N){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.type=y),a!=null||o!=null){if(!(y!=="submit"&&y!=="reset"||a!=null)){uu(n);return}o=o!=null?""+Xn(o):"",a=a!=null?""+Xn(a):o,N||a===n.value||(n.value=a),n.defaultValue=a}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=N?n.checked:!!u,n.defaultChecked=!!u,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(n.name=A),uu(n)}function Cl(n,a,o){a==="number"&&us(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function Fa(n,a,o,u){if(n=n.options,a){a={};for(var p=0;p<o.length;p++)a["$"+o[p]]=!0;for(o=0;o<n.length;o++)p=a.hasOwnProperty("$"+n[o].value),n[o].selected!==p&&(n[o].selected=p),p&&u&&(n[o].defaultSelected=!0)}else{for(o=""+Xn(o),a=null,p=0;p<n.length;p++){if(n[p].value===o){n[p].selected=!0,u&&(n[p].defaultSelected=!0);return}a!==null||n[p].disabled||(a=n[p])}a!==null&&(a.selected=!0)}}function ed(n,a,o){if(a!=null&&(a=""+Xn(a),a!==n.value&&(n.value=a),o==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=o!=null?""+Xn(o):""}function td(n,a,o,u){if(a==null){if(u!=null){if(o!=null)throw Error(i(92));if(oe(u)){if(1<u.length)throw Error(i(93));u=u[0]}o=u}o==null&&(o=""),a=o}o=Xn(a),n.defaultValue=o,u=n.textContent,u===o&&u!==""&&u!==null&&(n.value=u),uu(n)}function Li(n,a){if(a){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=a;return}}n.textContent=a}var Qg=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 nd(n,a,o){var u=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":u?n.setProperty(a,o):typeof o!="number"||o===0||Qg.has(a)?a==="float"?n.cssFloat=o:n[a]=(""+o).trim():n[a]=o+"px"}function rd(n,a,o){if(a!=null&&typeof a!="object")throw Error(i(62));if(n=n.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var p in a)u=a[p],a.hasOwnProperty(p)&&o[p]!==u&&nd(n,p,u)}else for(var y in a)a.hasOwnProperty(y)&&nd(n,y,a[y])}function fu(n){if(n.indexOf("-")===-1)return!1;switch(n){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 Wg=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"]]),Jg=/^[\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 Rs(n){return Jg.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Qr(){}var du=null;function hu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ui=null,Ci=null;function Gc(n){var a=$i(n);if(a&&(n=a.stateNode)){var o=n[_n]||null;e:switch(n=a.stateNode,a.type){case"input":if(cu(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Qn(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var u=o[a];if(u!==n&&u.form===n.form){var p=u[_n]||null;if(!p)throw Error(i(90));cu(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)u=o[a],u.form===n.form&&Wf(u)}break e;case"textarea":ed(n,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&Fa(n,!!o.multiple,a,!1)}}}var pu=!1;function mu(n,a,o){if(pu)return n(a,o);pu=!0;try{var u=n(a);return u}finally{if(pu=!1,(Ui!==null||Ci!==null)&&(Ju(),Ui&&(a=Ui,n=Ci,Ci=Ui=null,Gc(a),n)))for(a=0;a<n.length;a++)Gc(n[a])}}function so(n,a){var o=n.stateNode;if(o===null)return null;var u=o[_n]||null;if(u===null)return null;o=u[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(i(231,a,typeof o));return o}var Hr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ol=!1;if(Hr)try{var lo={};Object.defineProperty(lo,"passive",{get:function(){Ol=!0}}),window.addEventListener("test",lo,lo),window.removeEventListener("test",lo,lo)}catch{Ol=!1}var fa=null,uo=null,As=null;function ad(){if(As)return As;var n,a=uo,o=a.length,u,p="value"in fa?fa.value:fa.textContent,y=p.length;for(n=0;n<o&&a[n]===p[n];n++);var A=o-n;for(u=1;u<=A&&a[o-u]===p[y-u];u++);return As=p.slice(n,1<u?1-u:void 0)}function Ms(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}function js(){return!0}function id(){return!1}function kn(n){function a(o,u,p,y,A){this._reactName=o,this._targetInst=p,this.type=u,this.nativeEvent=y,this.target=A,this.currentTarget=null;for(var N in n)n.hasOwnProperty(N)&&(o=n[N],this[N]=o?o(y):y[N]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?js:id,this.isPropagationStopped=id,this}return g(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=js)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=js)},persist:function(){},isPersistent:js}),a}var Ba={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fe=kn(Ba),ia=g({},Ba,{view:0,detail:0}),tm=kn(ia),Rl,Al,bo,ks=g({},ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jl,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==bo&&(bo&&n.type==="mousemove"?(Rl=n.screenX-bo.screenX,Al=n.screenY-bo.screenY):Al=Rl=0,bo=n),Rl)},movementY:function(n){return"movementY"in n?n.movementY:Al}}),Oi=kn(ks),od=g({},ks,{dataTransfer:0}),sd=kn(od),za=g({},ia,{relatedTarget:0}),Ml=kn(za),nm=g({},Ba,{animationName:0,elapsedTime:0,pseudoElement:0}),rm=kn(nm),am=g({},Ba,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),ey=kn(am),im=g({},Ba,{data:0}),Kc=kn(im),om={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ld={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"},ty={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sm(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=ty[n])?!!a[n]:!1}function jl(){return sm}var lm=g({},ia,{key:function(n){if(n.key){var a=om[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=Ms(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?ld[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jl,charCode:function(n){return n.type==="keypress"?Ms(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Ms(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),$a=kn(lm),um=g({},ks,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yc=kn(um),ny=g({},ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jl}),ry=kn(ny),ay=g({},Ba,{propertyName:0,elapsedTime:0,pseudoElement:0}),ud=kn(ay),iy=g({},ks,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),oy=kn(iy),sy=g({},Ba,{newState:0,oldState:0}),cm=kn(sy),da=[9,13,27,32],gu=Hr&&"CompositionEvent"in window,So=null;Hr&&"documentMode"in document&&(So=document.documentMode);var ly=Hr&&"TextEvent"in window&&!So,cd=Hr&&(!gu||So&&8<So&&11>=So),fd=" ",dd=!1;function hd(n,a){switch(n){case"keyup":return da.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pd(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var qi=!1;function uy(n,a){switch(n){case"compositionend":return pd(a);case"keypress":return a.which!==32?null:(dd=!0,fd);case"textInput":return n=a.data,n===fd&&dd?null:n;default:return null}}function cy(n,a){if(qi)return n==="compositionend"||!gu&&hd(n,a)?(n=ad(),As=uo=fa=null,qi=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return cd&&a.locale!=="ko"?null:a.data;default:return null}}var fy={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 md(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!fy[n.type]:a==="textarea"}function gd(n,a,o,u){Ui?Ci?Ci.push(u):Ci=[u]:Ui=u,a=oc(a,"onChange"),0<a.length&&(o=new Fe("onChange","change",null,o,u),n.push({event:o,listeners:a}))}var wo=null,Eo=null;function dy(n){jv(n,0)}function Ds(n){var a=vo(n);if(Wf(a))return n}function Zc(n,a){if(n==="change")return a}var yu=!1;if(Hr){var vu;if(Hr){var kl="oninput"in document;if(!kl){var yd=document.createElement("div");yd.setAttribute("oninput","return;"),kl=typeof yd.oninput=="function"}vu=kl}else vu=!1;yu=vu&&(!document.documentMode||9<document.documentMode)}function bu(){wo&&(wo.detachEvent("onpropertychange",Pa),Eo=wo=null)}function Pa(n){if(n.propertyName==="value"&&Ds(Eo)){var a=[];gd(a,Eo,n,hu(n)),mu(dy,a)}}function fm(n,a,o){n==="focusin"?(bu(),wo=a,Eo=o,wo.attachEvent("onpropertychange",Pa)):n==="focusout"&&bu()}function hy(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ds(Eo)}function dm(n,a){if(n==="click")return Ds(a)}function hm(n,a){if(n==="input"||n==="change")return Ds(a)}function pm(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var $n=typeof Object.is=="function"?Object.is:pm;function xo(n,a){if($n(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var o=Object.keys(n),u=Object.keys(a);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var p=o[u];if(!Ne.call(a,p)||!$n(n[p],a[p]))return!1}return!0}function Xc(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function vd(n,a){var o=Xc(n);n=0;for(var u;o;){if(o.nodeType===3){if(u=n+o.textContent.length,n<=a&&u>=a)return{node:o,offset:a-n};n=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Xc(o)}}function Su(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?Su(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function bd(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=us(n.document);a instanceof n.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)n=a.contentWindow;else break;a=us(n.document)}return a}function cs(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}var py=Hr&&"documentMode"in document&&11>=document.documentMode,Vi=null,wu=null,_o=null,fs=!1;function Sd(n,a,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;fs||Vi==null||Vi!==us(u)||(u=Vi,"selectionStart"in u&&cs(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),_o&&xo(_o,u)||(_o=u,u=oc(wu,"onSelect"),0<u.length&&(a=new Fe("onSelect","select",null,a,o),n.push({event:a,listeners:u}),a.target=Vi)))}function P(n,a){var o={};return o[n.toLowerCase()]=a.toLowerCase(),o["Webkit"+n]="webkit"+a,o["Moz"+n]="moz"+a,o}var $={animationend:P("Animation","AnimationEnd"),animationiteration:P("Animation","AnimationIteration"),animationstart:P("Animation","AnimationStart"),transitionrun:P("Transition","TransitionRun"),transitionstart:P("Transition","TransitionStart"),transitioncancel:P("Transition","TransitionCancel"),transitionend:P("Transition","TransitionEnd")},F={},Z={};Hr&&(Z=document.createElement("div").style,"AnimationEvent"in window||(delete $.animationend.animation,delete $.animationiteration.animation,delete $.animationstart.animation),"TransitionEvent"in window||delete $.transitionend.transition);function fe(n){if(F[n])return F[n];if(!$[n])return n;var a=$[n],o;for(o in a)if(a.hasOwnProperty(o)&&o in Z)return F[n]=a[o];return n}var Se=fe("animationend"),_e=fe("animationiteration"),ge=fe("animationstart"),Te=fe("transitionrun"),Ce=fe("transitionstart"),Ve=fe("transitioncancel"),He=fe("transitionend"),ut=new Map,nt="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(" ");nt.push("scrollEnd");function mt(n,a){ut.set(n,a),Va(a,[n])}var un=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Ke=[],_t=0,fn=0;function Nt(){for(var n=_t,a=fn=_t=0;a<n;){var o=Ke[a];Ke[a++]=null;var u=Ke[a];Ke[a++]=null;var p=Ke[a];Ke[a++]=null;var y=Ke[a];if(Ke[a++]=null,u!==null&&p!==null){var A=u.pending;A===null?p.next=p:(p.next=A.next,A.next=p),u.pending=p}y!==0&&co(o,p,y)}}function Gr(n,a,o,u){Ke[_t++]=n,Ke[_t++]=a,Ke[_t++]=o,Ke[_t++]=u,fn|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function Kr(n,a,o,u){return Gr(n,a,o,u),ha(n)}function Dr(n,a){return Gr(n,null,null,a),ha(n)}function co(n,a,o){n.lanes|=o;var u=n.alternate;u!==null&&(u.lanes|=o);for(var p=!1,y=n.return;y!==null;)y.childLanes|=o,u=y.alternate,u!==null&&(u.childLanes|=o),y.tag===22&&(n=y.stateNode,n===null||n._visibility&1||(p=!0)),n=y,y=y.return;return n.tag===3?(y=n.stateNode,p&&a!==null&&(p=31-Pt(o),n=y.hiddenUpdates,u=n[p],u===null?n[p]=[a]:u.push(a),a.lane=o|536870912),y):null}function ha(n){if(50<tl)throw tl=0,Oh=null,Error(i(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var Wn={};function mm(n,a,o,u){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dn(n,a,o,u){return new mm(n,a,o,u)}function Dl(n){return n=n.prototype,!(!n||!n.isReactComponent)}function pr(n,a){var o=n.alternate;return o===null?(o=Dn(n.tag,a,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=a,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&65011712,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,a=n.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o.refCleanup=n.refCleanup,o}function Eu(n,a){n.flags&=65011714;var o=n.alternate;return o===null?(n.childLanes=0,n.lanes=a,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,a=o.dependencies,n.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),n}function To(n,a,o,u,p,y){var A=0;if(u=n,typeof n=="function")Dl(n)&&(A=1);else if(typeof n=="string")A=F_(n,o,I.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case U:return n=Dn(31,o,a,p),n.elementType=U,n.lanes=y,n;case S:return pa(o.children,p,y,a);case w:A=8,p|=24;break;case x:return n=Dn(12,o,a,p|2),n.elementType=x,n.lanes=y,n;case C:return n=Dn(13,o,a,p),n.elementType=C,n.lanes=y,n;case O:return n=Dn(19,o,a,p),n.elementType=O,n.lanes=y,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case R:A=10;break e;case E:A=9;break e;case T:A=11;break e;case M:A=14;break e;case D:A=16,u=null;break e}A=29,o=Error(i(130,n===null?"null":typeof n,"")),u=null}return a=Dn(A,o,a,p),a.elementType=n,a.type=u,a.lanes=y,a}function pa(n,a,o,u){return n=Dn(7,n,u,a),n.lanes=o,n}function xu(n,a,o){return n=Dn(6,n,null,a),n.lanes=o,n}function Qc(n){var a=Dn(18,null,null,0);return a.stateNode=n,a}function wd(n,a,o){return a=Dn(4,n.children!==null?n.children:[],n.key,a),a.lanes=o,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var my=new WeakMap;function mr(n,a){if(typeof n=="object"&&n!==null){var o=my.get(n);return o!==void 0?o:(a={value:n,source:a,stack:$e(a)},my.set(n,a),a)}return{value:n,source:a,stack:$e(a)}}var Co=[],Oo=0,_u=null,Ns=0,gr=[],yr=0,Ha=null,Wr=1,Jr="";function ma(n,a){Co[Oo++]=Ns,Co[Oo++]=_u,_u=n,Ns=a}function gy(n,a,o){gr[yr++]=Wr,gr[yr++]=Jr,gr[yr++]=Ha,Ha=n;var u=Wr;n=Jr;var p=32-Pt(u)-1;u&=~(1<<p),o+=1;var y=32-Pt(a)+p;if(30<y){var A=p-p%5;y=(u&(1<<A)-1).toString(32),u>>=A,p-=A,Wr=1<<32-Pt(a)+p|o<<p|u,Jr=y+n}else Wr=1<<y|o<<p|u,Jr=n}function Ed(n){n.return!==null&&(ma(n,1),gy(n,1,0))}function xd(n){for(;n===_u;)_u=Co[--Oo],Co[Oo]=null,Ns=Co[--Oo],Co[Oo]=null;for(;n===Ha;)Ha=gr[--yr],gr[yr]=null,Jr=gr[--yr],gr[yr]=null,Wr=gr[--yr],gr[yr]=null}function yy(n,a){gr[yr++]=Wr,gr[yr++]=Jr,gr[yr++]=Ha,Wr=a.id,Jr=a.overflow,Ha=n}var vn=null,Tt=null,rt=!1,Ga=null,vr=!1,_d=Error(i(519));function Ka(n){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zs(mr(a,n)),_d}function vy(n){var a=n.stateNode,o=n.type,u=n.memoizedProps;switch(a[cn]=n,a[_n]=u,o){case"dialog":Qe("cancel",a),Qe("close",a);break;case"iframe":case"object":case"embed":Qe("load",a);break;case"video":case"audio":for(o=0;o<rl.length;o++)Qe(rl[o],a);break;case"source":Qe("error",a);break;case"img":case"image":case"link":Qe("error",a),Qe("load",a);break;case"details":Qe("toggle",a);break;case"input":Qe("invalid",a),Jf(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Qe("invalid",a);break;case"textarea":Qe("invalid",a),td(a,u.value,u.defaultValue,u.children)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||u.suppressHydrationWarning===!0||zv(a.textContent,o)?(u.popover!=null&&(Qe("beforetoggle",a),Qe("toggle",a)),u.onScroll!=null&&Qe("scroll",a),u.onScrollEnd!=null&&Qe("scrollend",a),u.onClick!=null&&(a.onclick=Qr),a=!0):a=!1,a||Ka(n,!0)}function by(n){for(vn=n.return;vn;)switch(vn.tag){case 5:case 31:case 13:vr=!1;return;case 27:case 3:vr=!0;return;default:vn=vn.return}}function Ro(n){if(n!==vn)return!1;if(!rt)return by(n),rt=!0,!1;var a=n.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||Vh(n.type,n.memoizedProps)),o=!o),o&&Tt&&Ka(n),by(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Tt=Bv(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Tt=Bv(n)}else a===27?(a=Tt,si(n.type)?(n=Kh,Kh=null,Tt=n):Tt=a):Tt=vn?Sr(n.stateNode.nextSibling):null;return!0}function Fi(){Tt=vn=null,rt=!1}function Td(){var n=Ga;return n!==null&&(Gn===null?Gn=n:Gn.push.apply(Gn,n),Ga=null),n}function zs(n){Ga===null?Ga=[n]:Ga.push(n)}var Cd=z(null),Bi=null,ga=null;function Ya(n,a,o){Y(Cd,a._currentValue),a._currentValue=o}function ya(n){n._currentValue=Cd.current,L(Cd)}function Od(n,a,o){for(;n!==null;){var u=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),n===o)break;n=n.return}}function Rd(n,a,o,u){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var y=p.dependencies;if(y!==null){var A=p.child;y=y.firstContext;e:for(;y!==null;){var N=y;y=p;for(var H=0;H<a.length;H++)if(N.context===a[H]){y.lanes|=o,N=y.alternate,N!==null&&(N.lanes|=o),Od(y.return,o,n),u||(A=null);break e}y=N.next}}else if(p.tag===18){if(A=p.return,A===null)throw Error(i(341));A.lanes|=o,y=A.alternate,y!==null&&(y.lanes|=o),Od(A,o,n),A=null}else A=p.child;if(A!==null)A.return=p;else for(A=p;A!==null;){if(A===n){A=null;break}if(p=A.sibling,p!==null){p.return=A.return,A=p;break}A=A.return}p=A}}function Ao(n,a,o,u){n=null;for(var p=a,y=!1;p!==null;){if(!y){if((p.flags&524288)!==0)y=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var A=p.alternate;if(A===null)throw Error(i(387));if(A=A.memoizedProps,A!==null){var N=p.type;$n(p.pendingProps.value,A.value)||(n!==null?n.push(N):n=[N])}}else if(p===he.current){if(A=p.alternate,A===null)throw Error(i(387));A.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(ll):n=[ll])}p=p.return}n!==null&&Rd(a,n,o,u),a.flags|=262144}function Tu(n){for(n=n.firstContext;n!==null;){if(!$n(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Hi(n){Bi=n,ga=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function bn(n){return Sy(Bi,n)}function Cu(n,a){return Bi===null&&Hi(n),Sy(n,a)}function Sy(n,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},ga===null){if(n===null)throw Error(i(308));ga=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else ga=ga.next=a;return o}var Lx=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(o,u){n.push(u)}};this.abort=function(){a.aborted=!0,n.forEach(function(o){return o()})}},Ux=e.unstable_scheduleCallback,qx=e.unstable_NormalPriority,Kt={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ad(){return{controller:new Lx,data:new Map,refCount:0}}function $s(n){n.refCount--,n.refCount===0&&Ux(qx,function(){n.controller.abort()})}var Ps=null,Md=0,Mo=0,jo=null;function Vx(n,a){if(Ps===null){var o=Ps=[];Md=0,Mo=Dh(),jo={status:"pending",value:void 0,then:function(u){o.push(u)}}}return Md++,a.then(wy,wy),a}function wy(){if(--Md===0&&Ps!==null){jo!==null&&(jo.status="fulfilled");var n=Ps;Ps=null,Mo=0,jo=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function Fx(n,a){var o=[],u={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return n.then(function(){u.status="fulfilled",u.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(u.status="rejected",u.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),u}var Ey=K.S;K.S=function(n,a){iv=qe(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&Vx(n,a),Ey!==null&&Ey(n,a)};var Gi=z(null);function jd(){var n=Gi.current;return n!==null?n:Et.pooledCache}function Ou(n,a){a===null?Y(Gi,Gi.current):Y(Gi,a.pool)}function xy(){var n=jd();return n===null?null:{parent:Kt._currentValue,pool:n}}var ko=Error(i(460)),kd=Error(i(474)),Ru=Error(i(542)),Au={then:function(){}};function _y(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Ty(n,a,o){switch(o=n[o],o===void 0?n.push(a):o!==a&&(a.then(Qr,Qr),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Oy(n),n;default:if(typeof a.status=="string")a.then(Qr,Qr);else{if(n=Et,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=a,n.status="pending",n.then(function(u){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=u}},function(u){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Oy(n),n}throw Yi=a,ko}}function Ki(n){try{var a=n._init;return a(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Yi=o,ko):o}}var Yi=null;function Cy(){if(Yi===null)throw Error(i(459));var n=Yi;return Yi=null,n}function Oy(n){if(n===ko||n===Ru)throw Error(i(483))}var Do=null,Is=0;function Mu(n){var a=Is;return Is+=1,Do===null&&(Do=[]),Ty(Do,n,a)}function Ls(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function ju(n,a){throw a.$$typeof===v?Error(i(525)):(n=Object.prototype.toString.call(a),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n)))}function Ry(n){function a(te,W){if(n){var ae=te.deletions;ae===null?(te.deletions=[W],te.flags|=16):ae.push(W)}}function o(te,W){if(!n)return null;for(;W!==null;)a(te,W),W=W.sibling;return null}function u(te){for(var W=new Map;te!==null;)te.key!==null?W.set(te.key,te):W.set(te.index,te),te=te.sibling;return W}function p(te,W){return te=pr(te,W),te.index=0,te.sibling=null,te}function y(te,W,ae){return te.index=ae,n?(ae=te.alternate,ae!==null?(ae=ae.index,ae<W?(te.flags|=67108866,W):ae):(te.flags|=67108866,W)):(te.flags|=1048576,W)}function A(te){return n&&te.alternate===null&&(te.flags|=67108866),te}function N(te,W,ae,me){return W===null||W.tag!==6?(W=xu(ae,te.mode,me),W.return=te,W):(W=p(W,ae),W.return=te,W)}function H(te,W,ae,me){var ze=ae.type;return ze===S?pe(te,W,ae.props.children,me,ae.key):W!==null&&(W.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===D&&Ki(ze)===W.type)?(W=p(W,ae.props),Ls(W,ae),W.return=te,W):(W=To(ae.type,ae.key,ae.props,null,te.mode,me),Ls(W,ae),W.return=te,W)}function ie(te,W,ae,me){return W===null||W.tag!==4||W.stateNode.containerInfo!==ae.containerInfo||W.stateNode.implementation!==ae.implementation?(W=wd(ae,te.mode,me),W.return=te,W):(W=p(W,ae.children||[]),W.return=te,W)}function pe(te,W,ae,me,ze){return W===null||W.tag!==7?(W=pa(ae,te.mode,me,ze),W.return=te,W):(W=p(W,ae),W.return=te,W)}function ve(te,W,ae){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=xu(""+W,te.mode,ae),W.return=te,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case _:return ae=To(W.type,W.key,W.props,null,te.mode,ae),Ls(ae,W),ae.return=te,ae;case b:return W=wd(W,te.mode,ae),W.return=te,W;case D:return W=Ki(W),ve(te,W,ae)}if(oe(W)||V(W))return W=pa(W,te.mode,ae,null),W.return=te,W;if(typeof W.then=="function")return ve(te,Mu(W),ae);if(W.$$typeof===R)return ve(te,Cu(te,W),ae);ju(te,W)}return null}function le(te,W,ae,me){var ze=W!==null?W.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return ze!==null?null:N(te,W,""+ae,me);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case _:return ae.key===ze?H(te,W,ae,me):null;case b:return ae.key===ze?ie(te,W,ae,me):null;case D:return ae=Ki(ae),le(te,W,ae,me)}if(oe(ae)||V(ae))return ze!==null?null:pe(te,W,ae,me,null);if(typeof ae.then=="function")return le(te,W,Mu(ae),me);if(ae.$$typeof===R)return le(te,W,Cu(te,ae),me);ju(te,ae)}return null}function ce(te,W,ae,me,ze){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return te=te.get(ae)||null,N(W,te,""+me,ze);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case _:return te=te.get(me.key===null?ae:me.key)||null,H(W,te,me,ze);case b:return te=te.get(me.key===null?ae:me.key)||null,ie(W,te,me,ze);case D:return me=Ki(me),ce(te,W,ae,me,ze)}if(oe(me)||V(me))return te=te.get(ae)||null,pe(W,te,me,ze,null);if(typeof me.then=="function")return ce(te,W,ae,Mu(me),ze);if(me.$$typeof===R)return ce(te,W,ae,Cu(W,me),ze);ju(W,me)}return null}function Me(te,W,ae,me){for(var ze=null,st=null,De=W,Ge=W=0,tt=null;De!==null&&Ge<ae.length;Ge++){De.index>Ge?(tt=De,De=null):tt=De.sibling;var lt=le(te,De,ae[Ge],me);if(lt===null){De===null&&(De=tt);break}n&&De&<.alternate===null&&a(te,De),W=y(lt,W,Ge),st===null?ze=lt:st.sibling=lt,st=lt,De=tt}if(Ge===ae.length)return o(te,De),rt&&ma(te,Ge),ze;if(De===null){for(;Ge<ae.length;Ge++)De=ve(te,ae[Ge],me),De!==null&&(W=y(De,W,Ge),st===null?ze=De:st.sibling=De,st=De);return rt&&ma(te,Ge),ze}for(De=u(De);Ge<ae.length;Ge++)tt=ce(De,te,Ge,ae[Ge],me),tt!==null&&(n&&tt.alternate!==null&&De.delete(tt.key===null?Ge:tt.key),W=y(tt,W,Ge),st===null?ze=tt:st.sibling=tt,st=tt);return n&&De.forEach(function(di){return a(te,di)}),rt&&ma(te,Ge),ze}function Pe(te,W,ae,me){if(ae==null)throw Error(i(151));for(var ze=null,st=null,De=W,Ge=W=0,tt=null,lt=ae.next();De!==null&&!lt.done;Ge++,lt=ae.next()){De.index>Ge?(tt=De,De=null):tt=De.sibling;var di=le(te,De,lt.value,me);if(di===null){De===null&&(De=tt);break}n&&De&&di.alternate===null&&a(te,De),W=y(di,W,Ge),st===null?ze=di:st.sibling=di,st=di,De=tt}if(lt.done)return o(te,De),rt&&ma(te,Ge),ze;if(De===null){for(;!lt.done;Ge++,lt=ae.next())lt=ve(te,lt.value,me),lt!==null&&(W=y(lt,W,Ge),st===null?ze=lt:st.sibling=lt,st=lt);return rt&&ma(te,Ge),ze}for(De=u(De);!lt.done;Ge++,lt=ae.next())lt=ce(De,te,Ge,lt.value,me),lt!==null&&(n&<.alternate!==null&&De.delete(lt.key===null?Ge:lt.key),W=y(lt,W,Ge),st===null?ze=lt:st.sibling=lt,st=lt);return n&&De.forEach(function(e2){return a(te,e2)}),rt&&ma(te,Ge),ze}function wt(te,W,ae,me){if(typeof ae=="object"&&ae!==null&&ae.type===S&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case _:e:{for(var ze=ae.key;W!==null;){if(W.key===ze){if(ze=ae.type,ze===S){if(W.tag===7){o(te,W.sibling),me=p(W,ae.props.children),me.return=te,te=me;break e}}else if(W.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===D&&Ki(ze)===W.type){o(te,W.sibling),me=p(W,ae.props),Ls(me,ae),me.return=te,te=me;break e}o(te,W);break}else a(te,W);W=W.sibling}ae.type===S?(me=pa(ae.props.children,te.mode,me,ae.key),me.return=te,te=me):(me=To(ae.type,ae.key,ae.props,null,te.mode,me),Ls(me,ae),me.return=te,te=me)}return A(te);case b:e:{for(ze=ae.key;W!==null;){if(W.key===ze)if(W.tag===4&&W.stateNode.containerInfo===ae.containerInfo&&W.stateNode.implementation===ae.implementation){o(te,W.sibling),me=p(W,ae.children||[]),me.return=te,te=me;break e}else{o(te,W);break}else a(te,W);W=W.sibling}me=wd(ae,te.mode,me),me.return=te,te=me}return A(te);case D:return ae=Ki(ae),wt(te,W,ae,me)}if(oe(ae))return Me(te,W,ae,me);if(V(ae)){if(ze=V(ae),typeof ze!="function")throw Error(i(150));return ae=ze.call(ae),Pe(te,W,ae,me)}if(typeof ae.then=="function")return wt(te,W,Mu(ae),me);if(ae.$$typeof===R)return wt(te,W,Cu(te,ae),me);ju(te,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,W!==null&&W.tag===6?(o(te,W.sibling),me=p(W,ae),me.return=te,te=me):(o(te,W),me=xu(ae,te.mode,me),me.return=te,te=me),A(te)):o(te,W)}return function(te,W,ae,me){try{Is=0;var ze=wt(te,W,ae,me);return Do=null,ze}catch(De){if(De===ko||De===Ru)throw De;var st=Dn(29,De,null,te.mode);return st.lanes=me,st.return=te,st}}}var Zi=Ry(!0),Ay=Ry(!1),Za=!1;function Dd(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Nd(n,a){n=n.updateQueue,a.updateQueue===n&&(a.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Xa(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Qa(n,a,o){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(dt&2)!==0){var p=u.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),u.pending=a,a=ha(n),co(n,null,o),a}return Gr(n,u,a,o),ha(n)}function Us(n,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var u=a.lanes;u&=n.pendingLanes,o|=u,a.lanes=o,Fr(n,o)}}function zd(n,a){var o=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var p=null,y=null;if(o=o.firstBaseUpdate,o!==null){do{var A={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};y===null?p=y=A:y=y.next=A,o=o.next}while(o!==null);y===null?p=y=a:y=y.next=a}else p=y=a;o={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=a:n.next=a,o.lastBaseUpdate=a}var $d=!1;function qs(){if($d){var n=jo;if(n!==null)throw n}}function Vs(n,a,o,u){$d=!1;var p=n.updateQueue;Za=!1;var y=p.firstBaseUpdate,A=p.lastBaseUpdate,N=p.shared.pending;if(N!==null){p.shared.pending=null;var H=N,ie=H.next;H.next=null,A===null?y=ie:A.next=ie,A=H;var pe=n.alternate;pe!==null&&(pe=pe.updateQueue,N=pe.lastBaseUpdate,N!==A&&(N===null?pe.firstBaseUpdate=ie:N.next=ie,pe.lastBaseUpdate=H))}if(y!==null){var ve=p.baseState;A=0,pe=ie=H=null,N=y;do{var le=N.lane&-536870913,ce=le!==N.lane;if(ce?(et&le)===le:(u&le)===le){le!==0&&le===Mo&&($d=!0),pe!==null&&(pe=pe.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var Me=n,Pe=N;le=a;var wt=o;switch(Pe.tag){case 1:if(Me=Pe.payload,typeof Me=="function"){ve=Me.call(wt,ve,le);break e}ve=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=Pe.payload,le=typeof Me=="function"?Me.call(wt,ve,le):Me,le==null)break e;ve=g({},ve,le);break e;case 2:Za=!0}}le=N.callback,le!==null&&(n.flags|=64,ce&&(n.flags|=8192),ce=p.callbacks,ce===null?p.callbacks=[le]:ce.push(le))}else ce={lane:le,tag:N.tag,payload:N.payload,callback:N.callback,next:null},pe===null?(ie=pe=ce,H=ve):pe=pe.next=ce,A|=le;if(N=N.next,N===null){if(N=p.shared.pending,N===null)break;ce=N,N=ce.next,ce.next=null,p.lastBaseUpdate=ce,p.shared.pending=null}}while(!0);pe===null&&(H=ve),p.baseState=H,p.firstBaseUpdate=ie,p.lastBaseUpdate=pe,y===null&&(p.shared.lanes=0),ni|=A,n.lanes=A,n.memoizedState=ve}}function My(n,a){if(typeof n!="function")throw Error(i(191,n));n.call(a)}function jy(n,a){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)My(o[n],a)}var No=z(null),ku=z(0);function ky(n,a){n=Ca,Y(ku,n),Y(No,a),Ca=n|a.baseLanes}function Pd(){Y(ku,Ca),Y(No,No.current)}function Id(){Ca=ku.current,L(No),L(ku)}var nr=z(null),br=null;function Wa(n){var a=n.alternate;Y(Ft,Ft.current&1),Y(nr,n),br===null&&(a===null||No.current!==null||a.memoizedState!==null)&&(br=n)}function Ld(n){Y(Ft,Ft.current),Y(nr,n),br===null&&(br=n)}function Dy(n){n.tag===22?(Y(Ft,Ft.current),Y(nr,n),br===null&&(br=n)):Ja()}function Ja(){Y(Ft,Ft.current),Y(nr,nr.current)}function rr(n){L(nr),br===n&&(br=null),L(Ft)}var Ft=z(0);function Du(n){for(var a=n;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Hh(o)||Gh(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var va=0,Be=null,bt=null,Yt=null,Nu=!1,zo=!1,Xi=!1,zu=0,Fs=0,$o=null,Bx=0;function zt(){throw Error(i(321))}function Ud(n,a){if(a===null)return!1;for(var o=0;o<a.length&&o<n.length;o++)if(!$n(n[o],a[o]))return!1;return!0}function qd(n,a,o,u,p,y){return va=y,Be=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,K.H=n===null||n.memoizedState===null?g0:nh,Xi=!1,y=o(u,p),Xi=!1,zo&&(y=zy(a,o,u,p)),Ny(n),y}function Ny(n){K.H=Gs;var a=bt!==null&&bt.next!==null;if(va=0,Yt=bt=Be=null,Nu=!1,Fs=0,$o=null,a)throw Error(i(300));n===null||Zt||(n=n.dependencies,n!==null&&Tu(n)&&(Zt=!0))}function zy(n,a,o,u){Be=n;var p=0;do{if(zo&&($o=null),Fs=0,zo=!1,25<=p)throw Error(i(301));if(p+=1,Yt=bt=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}K.H=y0,y=a(o,u)}while(zo);return y}function Hx(){var n=K.H,a=n.useState()[0];return a=typeof a.then=="function"?Bs(a):a,n=n.useState()[0],(bt!==null?bt.memoizedState:null)!==n&&(Be.flags|=1024),a}function Vd(){var n=zu!==0;return zu=0,n}function Fd(n,a,o){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~o}function Bd(n){if(Nu){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}Nu=!1}va=0,Yt=bt=Be=null,zo=!1,Fs=zu=0,$o=null}function Nn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yt===null?Be.memoizedState=Yt=n:Yt=Yt.next=n,Yt}function Bt(){if(bt===null){var n=Be.alternate;n=n!==null?n.memoizedState:null}else n=bt.next;var a=Yt===null?Be.memoizedState:Yt.next;if(a!==null)Yt=a,bt=n;else{if(n===null)throw Be.alternate===null?Error(i(467)):Error(i(310));bt=n,n={memoizedState:bt.memoizedState,baseState:bt.baseState,baseQueue:bt.baseQueue,queue:bt.queue,next:null},Yt===null?Be.memoizedState=Yt=n:Yt=Yt.next=n}return Yt}function $u(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bs(n){var a=Fs;return Fs+=1,$o===null&&($o=[]),n=Ty($o,n,a),a=Be,(Yt===null?a.memoizedState:Yt.next)===null&&(a=a.alternate,K.H=a===null||a.memoizedState===null?g0:nh),n}function Pu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Bs(n);if(n.$$typeof===R)return bn(n)}throw Error(i(438,String(n)))}function Hd(n){var a=null,o=Be.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var u=Be.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=$u(),Be.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(n),u=0;u<n;u++)o[u]=B;return a.index++,o}function ba(n,a){return typeof a=="function"?a(n):a}function Iu(n){var a=Bt();return Gd(a,bt,n)}function Gd(n,a,o){var u=n.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=o;var p=n.baseQueue,y=u.pending;if(y!==null){if(p!==null){var A=p.next;p.next=y.next,y.next=A}a.baseQueue=p=y,u.pending=null}if(y=n.baseState,p===null)n.memoizedState=y;else{a=p.next;var N=A=null,H=null,ie=a,pe=!1;do{var ve=ie.lane&-536870913;if(ve!==ie.lane?(et&ve)===ve:(va&ve)===ve){var le=ie.revertLane;if(le===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),ve===Mo&&(pe=!0);else if((va&le)===le){ie=ie.next,le===Mo&&(pe=!0);continue}else ve={lane:0,revertLane:ie.revertLane,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},H===null?(N=H=ve,A=y):H=H.next=ve,Be.lanes|=le,ni|=le;ve=ie.action,Xi&&o(y,ve),y=ie.hasEagerState?ie.eagerState:o(y,ve)}else le={lane:ve,revertLane:ie.revertLane,gesture:ie.gesture,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},H===null?(N=H=le,A=y):H=H.next=le,Be.lanes|=ve,ni|=ve;ie=ie.next}while(ie!==null&&ie!==a);if(H===null?A=y:H.next=N,!$n(y,n.memoizedState)&&(Zt=!0,pe&&(o=jo,o!==null)))throw o;n.memoizedState=y,n.baseState=A,n.baseQueue=H,u.lastRenderedState=y}return p===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function Kd(n){var a=Bt(),o=a.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=n;var u=o.dispatch,p=o.pending,y=a.memoizedState;if(p!==null){o.pending=null;var A=p=p.next;do y=n(y,A.action),A=A.next;while(A!==p);$n(y,a.memoizedState)||(Zt=!0),a.memoizedState=y,a.baseQueue===null&&(a.baseState=y),o.lastRenderedState=y}return[y,u]}function $y(n,a,o){var u=Be,p=Bt(),y=rt;if(y){if(o===void 0)throw Error(i(407));o=o()}else o=a();var A=!$n((bt||p).memoizedState,o);if(A&&(p.memoizedState=o,Zt=!0),p=p.queue,Xd(Ly.bind(null,u,p,n),[n]),p.getSnapshot!==a||A||Yt!==null&&Yt.memoizedState.tag&1){if(u.flags|=2048,Po(9,{destroy:void 0},Iy.bind(null,u,p,o,a),null),Et===null)throw Error(i(349));y||(va&127)!==0||Py(u,a,o)}return o}function Py(n,a,o){n.flags|=16384,n={getSnapshot:a,value:o},a=Be.updateQueue,a===null?(a=$u(),Be.updateQueue=a,a.stores=[n]):(o=a.stores,o===null?a.stores=[n]:o.push(n))}function Iy(n,a,o,u){a.value=o,a.getSnapshot=u,Uy(a)&&qy(n)}function Ly(n,a,o){return o(function(){Uy(a)&&qy(n)})}function Uy(n){var a=n.getSnapshot;n=n.value;try{var o=a();return!$n(n,o)}catch{return!0}}function qy(n){var a=Dr(n,2);a!==null&&Kn(a,n,2)}function Yd(n){var a=Nn();if(typeof n=="function"){var o=n;if(n=o(),Xi){Mn(!0);try{o()}finally{Mn(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:n},a}function Vy(n,a,o,u){return n.baseState=o,Gd(n,bt,typeof u=="function"?u:ba)}function Gx(n,a,o,u,p){if(qu(n))throw Error(i(485));if(n=a.action,n!==null){var y={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){y.listeners.push(A)}};K.T!==null?o(!0):y.isTransition=!1,u(y),o=a.pending,o===null?(y.next=a.pending=y,Fy(a,y)):(y.next=o.next,a.pending=o.next=y)}}function Fy(n,a){var o=a.action,u=a.payload,p=n.state;if(a.isTransition){var y=K.T,A={};K.T=A;try{var N=o(p,u),H=K.S;H!==null&&H(A,N),By(n,a,N)}catch(ie){Zd(n,a,ie)}finally{y!==null&&A.types!==null&&(y.types=A.types),K.T=y}}else try{y=o(p,u),By(n,a,y)}catch(ie){Zd(n,a,ie)}}function By(n,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){Hy(n,a,u)},function(u){return Zd(n,a,u)}):Hy(n,a,o)}function Hy(n,a,o){a.status="fulfilled",a.value=o,Gy(a),n.state=o,a=n.pending,a!==null&&(o=a.next,o===a?n.pending=null:(o=o.next,a.next=o,Fy(n,o)))}function Zd(n,a,o){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=o,Gy(a),a=a.next;while(a!==u)}n.action=null}function Gy(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function Ky(n,a){return a}function Yy(n,a){if(rt){var o=Et.formState;if(o!==null){e:{var u=Be;if(rt){if(Tt){t:{for(var p=Tt,y=vr;p.nodeType!==8;){if(!y){p=null;break t}if(p=Sr(p.nextSibling),p===null){p=null;break t}}y=p.data,p=y==="F!"||y==="F"?p:null}if(p){Tt=Sr(p.nextSibling),u=p.data==="F!";break e}}Ka(u)}u=!1}u&&(a=o[0])}}return o=Nn(),o.memoizedState=o.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ky,lastRenderedState:a},o.queue=u,o=h0.bind(null,Be,u),u.dispatch=o,u=Yd(!1),y=th.bind(null,Be,!1,u.queue),u=Nn(),p={state:a,dispatch:null,action:n,pending:null},u.queue=p,o=Gx.bind(null,Be,p,y,o),p.dispatch=o,u.memoizedState=n,[a,o,!1]}function Zy(n){var a=Bt();return Xy(a,bt,n)}function Xy(n,a,o){if(a=Gd(n,a,Ky)[0],n=Iu(ba)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=Bs(a)}catch(A){throw A===ko?Ru:A}else u=a;a=Bt();var p=a.queue,y=p.dispatch;return o!==a.memoizedState&&(Be.flags|=2048,Po(9,{destroy:void 0},Kx.bind(null,p,o),null)),[u,y,n]}function Kx(n,a){n.action=a}function Qy(n){var a=Bt(),o=bt;if(o!==null)return Xy(a,o,n);Bt(),a=a.memoizedState,o=Bt();var u=o.queue.dispatch;return o.memoizedState=n,[a,u,!1]}function Po(n,a,o,u){return n={tag:n,create:o,deps:u,inst:a,next:null},a=Be.updateQueue,a===null&&(a=$u(),Be.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=n.next=n:(u=o.next,o.next=n,n.next=u,a.lastEffect=n),n}function Wy(){return Bt().memoizedState}function Lu(n,a,o,u){var p=Nn();Be.flags|=n,p.memoizedState=Po(1|a,{destroy:void 0},o,u===void 0?null:u)}function Uu(n,a,o,u){var p=Bt();u=u===void 0?null:u;var y=p.memoizedState.inst;bt!==null&&u!==null&&Ud(u,bt.memoizedState.deps)?p.memoizedState=Po(a,y,o,u):(Be.flags|=n,p.memoizedState=Po(1|a,y,o,u))}function Jy(n,a){Lu(8390656,8,n,a)}function Xd(n,a){Uu(2048,8,n,a)}function Yx(n){Be.flags|=4;var a=Be.updateQueue;if(a===null)a=$u(),Be.updateQueue=a,a.events=[n];else{var o=a.events;o===null?a.events=[n]:o.push(n)}}function e0(n){var a=Bt().memoizedState;return Yx({ref:a,nextImpl:n}),function(){if((dt&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function t0(n,a){return Uu(4,2,n,a)}function n0(n,a){return Uu(4,4,n,a)}function r0(n,a){if(typeof a=="function"){n=n();var o=a(n);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return n=n(),a.current=n,function(){a.current=null}}function a0(n,a,o){o=o!=null?o.concat([n]):null,Uu(4,4,r0.bind(null,a,n),o)}function Qd(){}function i0(n,a){var o=Bt();a=a===void 0?null:a;var u=o.memoizedState;return a!==null&&Ud(a,u[1])?u[0]:(o.memoizedState=[n,a],n)}function o0(n,a){var o=Bt();a=a===void 0?null:a;var u=o.memoizedState;if(a!==null&&Ud(a,u[1]))return u[0];if(u=n(),Xi){Mn(!0);try{n()}finally{Mn(!1)}}return o.memoizedState=[u,a],u}function Wd(n,a,o){return o===void 0||(va&1073741824)!==0&&(et&261930)===0?n.memoizedState=a:(n.memoizedState=o,n=sv(),Be.lanes|=n,ni|=n,o)}function s0(n,a,o,u){return $n(o,a)?o:No.current!==null?(n=Wd(n,o,u),$n(n,a)||(Zt=!0),n):(va&42)===0||(va&1073741824)!==0&&(et&261930)===0?(Zt=!0,n.memoizedState=o):(n=sv(),Be.lanes|=n,ni|=n,a)}function l0(n,a,o,u,p){var y=ee.p;ee.p=y!==0&&8>y?y:8;var A=K.T,N={};K.T=N,th(n,!1,a,o);try{var H=p(),ie=K.S;if(ie!==null&&ie(N,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var pe=Fx(H,u);Hs(n,a,pe,or(n))}else Hs(n,a,u,or(n))}catch(ve){Hs(n,a,{then:function(){},status:"rejected",reason:ve},or())}finally{ee.p=y,A!==null&&N.types!==null&&(A.types=N.types),K.T=A}}function Zx(){}function Jd(n,a,o,u){if(n.tag!==5)throw Error(i(476));var p=u0(n).queue;l0(n,p,a,re,o===null?Zx:function(){return c0(n),o(u)})}function u0(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:re},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:o},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function c0(n){var a=u0(n);a.next===null&&(a=n.alternate.memoizedState),Hs(n,a.next.queue,{},or())}function eh(){return bn(ll)}function f0(){return Bt().memoizedState}function d0(){return Bt().memoizedState}function Xx(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var o=or();n=Xa(o);var u=Qa(a,n,o);u!==null&&(Kn(u,a,o),Us(u,a,o)),a={cache:Ad()},n.payload=a;return}a=a.return}}function Qx(n,a,o){var u=or();o={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},qu(n)?p0(a,o):(o=Kr(n,a,o,u),o!==null&&(Kn(o,n,u),m0(o,a,u)))}function h0(n,a,o){var u=or();Hs(n,a,o,u)}function Hs(n,a,o,u){var p={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(qu(n))p0(a,p);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=a.lastRenderedReducer,y!==null))try{var A=a.lastRenderedState,N=y(A,o);if(p.hasEagerState=!0,p.eagerState=N,$n(N,A))return Gr(n,a,p,0),Et===null&&Nt(),!1}catch{}if(o=Kr(n,a,p,u),o!==null)return Kn(o,n,u),m0(o,a,u),!0}return!1}function th(n,a,o,u){if(u={lane:2,revertLane:Dh(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},qu(n)){if(a)throw Error(i(479))}else a=Kr(n,o,u,2),a!==null&&Kn(a,n,2)}function qu(n){var a=n.alternate;return n===Be||a!==null&&a===Be}function p0(n,a){zo=Nu=!0;var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}function m0(n,a,o){if((o&4194048)!==0){var u=a.lanes;u&=n.pendingLanes,o|=u,a.lanes=o,Fr(n,o)}}var Gs={readContext:bn,use:Pu,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useLayoutEffect:zt,useInsertionEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useSyncExternalStore:zt,useId:zt,useHostTransitionStatus:zt,useFormState:zt,useActionState:zt,useOptimistic:zt,useMemoCache:zt,useCacheRefresh:zt};Gs.useEffectEvent=zt;var g0={readContext:bn,use:Pu,useCallback:function(n,a){return Nn().memoizedState=[n,a===void 0?null:a],n},useContext:bn,useEffect:Jy,useImperativeHandle:function(n,a,o){o=o!=null?o.concat([n]):null,Lu(4194308,4,r0.bind(null,a,n),o)},useLayoutEffect:function(n,a){return Lu(4194308,4,n,a)},useInsertionEffect:function(n,a){Lu(4,2,n,a)},useMemo:function(n,a){var o=Nn();a=a===void 0?null:a;var u=n();if(Xi){Mn(!0);try{n()}finally{Mn(!1)}}return o.memoizedState=[u,a],u},useReducer:function(n,a,o){var u=Nn();if(o!==void 0){var p=o(a);if(Xi){Mn(!0);try{o(a)}finally{Mn(!1)}}}else p=a;return u.memoizedState=u.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},u.queue=n,n=n.dispatch=Qx.bind(null,Be,n),[u.memoizedState,n]},useRef:function(n){var a=Nn();return n={current:n},a.memoizedState=n},useState:function(n){n=Yd(n);var a=n.queue,o=h0.bind(null,Be,a);return a.dispatch=o,[n.memoizedState,o]},useDebugValue:Qd,useDeferredValue:function(n,a){var o=Nn();return Wd(o,n,a)},useTransition:function(){var n=Yd(!1);return n=l0.bind(null,Be,n.queue,!0,!1),Nn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,o){var u=Be,p=Nn();if(rt){if(o===void 0)throw Error(i(407));o=o()}else{if(o=a(),Et===null)throw Error(i(349));(et&127)!==0||Py(u,a,o)}p.memoizedState=o;var y={value:o,getSnapshot:a};return p.queue=y,Jy(Ly.bind(null,u,y,n),[n]),u.flags|=2048,Po(9,{destroy:void 0},Iy.bind(null,u,y,o,a),null),o},useId:function(){var n=Nn(),a=Et.identifierPrefix;if(rt){var o=Jr,u=Wr;o=(u&~(1<<32-Pt(u)-1)).toString(32)+o,a="_"+a+"R_"+o,o=zu++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=Bx++,a="_"+a+"r_"+o.toString(32)+"_";return n.memoizedState=a},useHostTransitionStatus:eh,useFormState:Yy,useActionState:Yy,useOptimistic:function(n){var a=Nn();a.memoizedState=a.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=th.bind(null,Be,!0,o),o.dispatch=a,[n,a]},useMemoCache:Hd,useCacheRefresh:function(){return Nn().memoizedState=Xx.bind(null,Be)},useEffectEvent:function(n){var a=Nn(),o={impl:n};return a.memoizedState=o,function(){if((dt&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}},nh={readContext:bn,use:Pu,useCallback:i0,useContext:bn,useEffect:Xd,useImperativeHandle:a0,useInsertionEffect:t0,useLayoutEffect:n0,useMemo:o0,useReducer:Iu,useRef:Wy,useState:function(){return Iu(ba)},useDebugValue:Qd,useDeferredValue:function(n,a){var o=Bt();return s0(o,bt.memoizedState,n,a)},useTransition:function(){var n=Iu(ba)[0],a=Bt().memoizedState;return[typeof n=="boolean"?n:Bs(n),a]},useSyncExternalStore:$y,useId:f0,useHostTransitionStatus:eh,useFormState:Zy,useActionState:Zy,useOptimistic:function(n,a){var o=Bt();return Vy(o,bt,n,a)},useMemoCache:Hd,useCacheRefresh:d0};nh.useEffectEvent=e0;var y0={readContext:bn,use:Pu,useCallback:i0,useContext:bn,useEffect:Xd,useImperativeHandle:a0,useInsertionEffect:t0,useLayoutEffect:n0,useMemo:o0,useReducer:Kd,useRef:Wy,useState:function(){return Kd(ba)},useDebugValue:Qd,useDeferredValue:function(n,a){var o=Bt();return bt===null?Wd(o,n,a):s0(o,bt.memoizedState,n,a)},useTransition:function(){var n=Kd(ba)[0],a=Bt().memoizedState;return[typeof n=="boolean"?n:Bs(n),a]},useSyncExternalStore:$y,useId:f0,useHostTransitionStatus:eh,useFormState:Qy,useActionState:Qy,useOptimistic:function(n,a){var o=Bt();return bt!==null?Vy(o,bt,n,a):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:Hd,useCacheRefresh:d0};y0.useEffectEvent=e0;function rh(n,a,o,u){a=n.memoizedState,o=o(u,a),o=o==null?a:g({},a,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var ah={enqueueSetState:function(n,a,o){n=n._reactInternals;var u=or(),p=Xa(u);p.payload=a,o!=null&&(p.callback=o),a=Qa(n,p,u),a!==null&&(Kn(a,n,u),Us(a,n,u))},enqueueReplaceState:function(n,a,o){n=n._reactInternals;var u=or(),p=Xa(u);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=Qa(n,p,u),a!==null&&(Kn(a,n,u),Us(a,n,u))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var o=or(),u=Xa(o);u.tag=2,a!=null&&(u.callback=a),a=Qa(n,u,o),a!==null&&(Kn(a,n,o),Us(a,n,o))}};function v0(n,a,o,u,p,y,A){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,y,A):a.prototype&&a.prototype.isPureReactComponent?!xo(o,u)||!xo(p,y):!0}function b0(n,a,o,u){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,u),a.state!==n&&ah.enqueueReplaceState(a,a.state,null)}function Qi(n,a){var o=a;if("ref"in a){o={};for(var u in a)u!=="ref"&&(o[u]=a[u])}if(n=n.defaultProps){o===a&&(o=g({},o));for(var p in n)o[p]===void 0&&(o[p]=n[p])}return o}function S0(n){un(n)}function w0(n){console.error(n)}function E0(n){un(n)}function Vu(n,a){try{var o=n.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function x0(n,a,o){try{var u=n.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function ih(n,a,o){return o=Xa(o),o.tag=3,o.payload={element:null},o.callback=function(){Vu(n,a)},o}function _0(n){return n=Xa(n),n.tag=3,n}function T0(n,a,o,u){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var y=u.value;n.payload=function(){return p(y)},n.callback=function(){x0(a,o,u)}}var A=o.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(n.callback=function(){x0(a,o,u),typeof p!="function"&&(ri===null?ri=new Set([this]):ri.add(this));var N=u.stack;this.componentDidCatch(u.value,{componentStack:N!==null?N:""})})}function Wx(n,a,o,u,p){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=o.alternate,a!==null&&Ao(a,o,p,!0),o=nr.current,o!==null){switch(o.tag){case 31:case 13:return br===null?ec():o.alternate===null&&$t===0&&($t=3),o.flags&=-257,o.flags|=65536,o.lanes=p,u===Au?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([u]):a.add(u),Mh(n,u,p)),!1;case 22:return o.flags|=65536,u===Au?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([u]):o.add(u)),Mh(n,u,p)),!1}throw Error(i(435,o.tag))}return Mh(n,u,p),ec(),!1}if(rt)return a=nr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,u!==_d&&(n=Error(i(422),{cause:u}),zs(mr(n,o)))):(u!==_d&&(a=Error(i(423),{cause:u}),zs(mr(a,o))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,u=mr(u,o),p=ih(n.stateNode,u,p),zd(n,p),$t!==4&&($t=2)),!1;var y=Error(i(520),{cause:u});if(y=mr(y,o),el===null?el=[y]:el.push(y),$t!==4&&($t=2),a===null)return!0;u=mr(u,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,n=p&-p,o.lanes|=n,n=ih(o.stateNode,u,n),zd(o,n),!1;case 1:if(a=o.type,y=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ri===null||!ri.has(y))))return o.flags|=65536,p&=-p,o.lanes|=p,p=_0(p),T0(p,n,o,u),zd(o,p),!1}o=o.return}while(o!==null);return!1}var oh=Error(i(461)),Zt=!1;function Sn(n,a,o,u){a.child=n===null?Ay(a,null,o,u):Zi(a,n.child,o,u)}function C0(n,a,o,u,p){o=o.render;var y=a.ref;if("ref"in u){var A={};for(var N in u)N!=="ref"&&(A[N]=u[N])}else A=u;return Hi(a),u=qd(n,a,o,A,y,p),N=Vd(),n!==null&&!Zt?(Fd(n,a,p),Sa(n,a,p)):(rt&&N&&Ed(a),a.flags|=1,Sn(n,a,u,p),a.child)}function O0(n,a,o,u,p){if(n===null){var y=o.type;return typeof y=="function"&&!Dl(y)&&y.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=y,R0(n,a,y,u,p)):(n=To(o.type,null,u,a,a.mode,p),n.ref=a.ref,n.return=a,a.child=n)}if(y=n.child,!ph(n,p)){var A=y.memoizedProps;if(o=o.compare,o=o!==null?o:xo,o(A,u)&&n.ref===a.ref)return Sa(n,a,p)}return a.flags|=1,n=pr(y,u),n.ref=a.ref,n.return=a,a.child=n}function R0(n,a,o,u,p){if(n!==null){var y=n.memoizedProps;if(xo(y,u)&&n.ref===a.ref)if(Zt=!1,a.pendingProps=u=y,ph(n,p))(n.flags&131072)!==0&&(Zt=!0);else return a.lanes=n.lanes,Sa(n,a,p)}return sh(n,a,o,u,p)}function A0(n,a,o,u){var p=u.children,y=n!==null?n.memoizedState:null;if(n===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((a.flags&128)!==0){if(y=y!==null?y.baseLanes|o:o,n!==null){for(u=a.child=n.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~y}else u=0,a.child=null;return M0(n,a,y,o,u)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ou(a,y!==null?y.cachePool:null),y!==null?ky(a,y):Pd(),Dy(a);else return u=a.lanes=536870912,M0(n,a,y!==null?y.baseLanes|o:o,o,u)}else y!==null?(Ou(a,y.cachePool),ky(a,y),Ja(),a.memoizedState=null):(n!==null&&Ou(a,null),Pd(),Ja());return Sn(n,a,p,o),a.child}function Ks(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function M0(n,a,o,u,p){var y=jd();return y=y===null?null:{parent:Kt._currentValue,pool:y},a.memoizedState={baseLanes:o,cachePool:y},n!==null&&Ou(a,null),Pd(),Dy(a),n!==null&&Ao(n,a,u,!0),a.childLanes=p,null}function Fu(n,a){return a=Hu({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}function j0(n,a,o){return Zi(a,n.child,null,o),n=Fu(a,a.pendingProps),n.flags|=2,rr(a),a.memoizedState=null,n}function Jx(n,a,o){var u=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(rt){if(u.mode==="hidden")return n=Fu(a,u),a.lanes=536870912,Ks(null,n);if(Ld(a),(n=Tt)?(n=Fv(n,vr),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Ha!==null?{id:Wr,overflow:Jr}:null,retryLane:536870912,hydrationErrors:null},o=Qc(n),o.return=a,a.child=o,vn=a,Tt=null)):n=null,n===null)throw Ka(a);return a.lanes=536870912,null}return Fu(a,u)}var y=n.memoizedState;if(y!==null){var A=y.dehydrated;if(Ld(a),p)if(a.flags&256)a.flags&=-257,a=j0(n,a,o);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(i(558));else if(Zt||Ao(n,a,o,!1),p=(o&n.childLanes)!==0,Zt||p){if(u=Et,u!==null&&(A=hr(u,o),A!==0&&A!==y.retryLane))throw y.retryLane=A,Dr(n,A),Kn(u,n,A),oh;ec(),a=j0(n,a,o)}else n=y.treeContext,Tt=Sr(A.nextSibling),vn=a,rt=!0,Ga=null,vr=!1,n!==null&&yy(a,n),a=Fu(a,u),a.flags|=4096;return a}return n=pr(n.child,{mode:u.mode,children:u.children}),n.ref=a.ref,a.child=n,n.return=a,n}function Bu(n,a){var o=a.ref;if(o===null)n!==null&&n.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(n===null||n.ref!==o)&&(a.flags|=4194816)}}function sh(n,a,o,u,p){return Hi(a),o=qd(n,a,o,u,void 0,p),u=Vd(),n!==null&&!Zt?(Fd(n,a,p),Sa(n,a,p)):(rt&&u&&Ed(a),a.flags|=1,Sn(n,a,o,p),a.child)}function k0(n,a,o,u,p,y){return Hi(a),a.updateQueue=null,o=zy(a,u,o,p),Ny(n),u=Vd(),n!==null&&!Zt?(Fd(n,a,y),Sa(n,a,y)):(rt&&u&&Ed(a),a.flags|=1,Sn(n,a,o,y),a.child)}function D0(n,a,o,u,p){if(Hi(a),a.stateNode===null){var y=Wn,A=o.contextType;typeof A=="object"&&A!==null&&(y=bn(A)),y=new o(u,y),a.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=ah,a.stateNode=y,y._reactInternals=a,y=a.stateNode,y.props=u,y.state=a.memoizedState,y.refs={},Dd(a),A=o.contextType,y.context=typeof A=="object"&&A!==null?bn(A):Wn,y.state=a.memoizedState,A=o.getDerivedStateFromProps,typeof A=="function"&&(rh(a,o,A,u),y.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(A=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),A!==y.state&&ah.enqueueReplaceState(y,y.state,null),Vs(a,u,y,p),qs(),y.state=a.memoizedState),typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(n===null){y=a.stateNode;var N=a.memoizedProps,H=Qi(o,N);y.props=H;var ie=y.context,pe=o.contextType;A=Wn,typeof pe=="object"&&pe!==null&&(A=bn(pe));var ve=o.getDerivedStateFromProps;pe=typeof ve=="function"||typeof y.getSnapshotBeforeUpdate=="function",N=a.pendingProps!==N,pe||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(N||ie!==A)&&b0(a,y,u,A),Za=!1;var le=a.memoizedState;y.state=le,Vs(a,u,y,p),qs(),ie=a.memoizedState,N||le!==ie||Za?(typeof ve=="function"&&(rh(a,o,ve,u),ie=a.memoizedState),(H=Za||v0(a,o,H,u,le,ie,A))?(pe||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(a.flags|=4194308)):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=ie),y.props=u,y.state=ie,y.context=A,u=H):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{y=a.stateNode,Nd(n,a),A=a.memoizedProps,pe=Qi(o,A),y.props=pe,ve=a.pendingProps,le=y.context,ie=o.contextType,H=Wn,typeof ie=="object"&&ie!==null&&(H=bn(ie)),N=o.getDerivedStateFromProps,(ie=typeof N=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(A!==ve||le!==H)&&b0(a,y,u,H),Za=!1,le=a.memoizedState,y.state=le,Vs(a,u,y,p),qs();var ce=a.memoizedState;A!==ve||le!==ce||Za||n!==null&&n.dependencies!==null&&Tu(n.dependencies)?(typeof N=="function"&&(rh(a,o,N,u),ce=a.memoizedState),(pe=Za||v0(a,o,pe,u,le,ce,H)||n!==null&&n.dependencies!==null&&Tu(n.dependencies))?(ie||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,ce,H),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,ce,H)),typeof y.componentDidUpdate=="function"&&(a.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=ce),y.props=u,y.state=ce,y.context=H,u=pe):(typeof y.componentDidUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&le===n.memoizedState||(a.flags|=1024),u=!1)}return y=u,Bu(n,a),u=(a.flags&128)!==0,y||u?(y=a.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:y.render(),a.flags|=1,n!==null&&u?(a.child=Zi(a,n.child,null,p),a.child=Zi(a,null,o,p)):Sn(n,a,o,p),a.memoizedState=y.state,n=a.child):n=Sa(n,a,p),n}function N0(n,a,o,u){return Fi(),a.flags|=256,Sn(n,a,o,u),a.child}var lh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function uh(n){return{baseLanes:n,cachePool:xy()}}function ch(n,a,o){return n=n!==null?n.childLanes&~o:0,a&&(n|=ir),n}function z0(n,a,o){var u=a.pendingProps,p=!1,y=(a.flags&128)!==0,A;if((A=y)||(A=n!==null&&n.memoizedState===null?!1:(Ft.current&2)!==0),A&&(p=!0,a.flags&=-129),A=(a.flags&32)!==0,a.flags&=-33,n===null){if(rt){if(p?Wa(a):Ja(),(n=Tt)?(n=Fv(n,vr),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:Ha!==null?{id:Wr,overflow:Jr}:null,retryLane:536870912,hydrationErrors:null},o=Qc(n),o.return=a,a.child=o,vn=a,Tt=null)):n=null,n===null)throw Ka(a);return Gh(n)?a.lanes=32:a.lanes=536870912,null}var N=u.children;return u=u.fallback,p?(Ja(),p=a.mode,N=Hu({mode:"hidden",children:N},p),u=pa(u,p,o,null),N.return=a,u.return=a,N.sibling=u,a.child=N,u=a.child,u.memoizedState=uh(o),u.childLanes=ch(n,A,o),a.memoizedState=lh,Ks(null,u)):(Wa(a),fh(a,N))}var H=n.memoizedState;if(H!==null&&(N=H.dehydrated,N!==null)){if(y)a.flags&256?(Wa(a),a.flags&=-257,a=dh(n,a,o)):a.memoizedState!==null?(Ja(),a.child=n.child,a.flags|=128,a=null):(Ja(),N=u.fallback,p=a.mode,u=Hu({mode:"visible",children:u.children},p),N=pa(N,p,o,null),N.flags|=2,u.return=a,N.return=a,u.sibling=N,a.child=u,Zi(a,n.child,null,o),u=a.child,u.memoizedState=uh(o),u.childLanes=ch(n,A,o),a.memoizedState=lh,a=Ks(null,u));else if(Wa(a),Gh(N)){if(A=N.nextSibling&&N.nextSibling.dataset,A)var ie=A.dgst;A=ie,u=Error(i(419)),u.stack="",u.digest=A,zs({value:u,source:null,stack:null}),a=dh(n,a,o)}else if(Zt||Ao(n,a,o,!1),A=(o&n.childLanes)!==0,Zt||A){if(A=Et,A!==null&&(u=hr(A,o),u!==0&&u!==H.retryLane))throw H.retryLane=u,Dr(n,u),Kn(A,n,u),oh;Hh(N)||ec(),a=dh(n,a,o)}else Hh(N)?(a.flags|=192,a.child=n.child,a=null):(n=H.treeContext,Tt=Sr(N.nextSibling),vn=a,rt=!0,Ga=null,vr=!1,n!==null&&yy(a,n),a=fh(a,u.children),a.flags|=4096);return a}return p?(Ja(),N=u.fallback,p=a.mode,H=n.child,ie=H.sibling,u=pr(H,{mode:"hidden",children:u.children}),u.subtreeFlags=H.subtreeFlags&65011712,ie!==null?N=pr(ie,N):(N=pa(N,p,o,null),N.flags|=2),N.return=a,u.return=a,u.sibling=N,a.child=u,Ks(null,u),u=a.child,N=n.child.memoizedState,N===null?N=uh(o):(p=N.cachePool,p!==null?(H=Kt._currentValue,p=p.parent!==H?{parent:H,pool:H}:p):p=xy(),N={baseLanes:N.baseLanes|o,cachePool:p}),u.memoizedState=N,u.childLanes=ch(n,A,o),a.memoizedState=lh,Ks(n.child,u)):(Wa(a),o=n.child,n=o.sibling,o=pr(o,{mode:"visible",children:u.children}),o.return=a,o.sibling=null,n!==null&&(A=a.deletions,A===null?(a.deletions=[n],a.flags|=16):A.push(n)),a.child=o,a.memoizedState=null,o)}function fh(n,a){return a=Hu({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function Hu(n,a){return n=Dn(22,n,null,a),n.lanes=0,n}function dh(n,a,o){return Zi(a,n.child,null,o),n=fh(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function $0(n,a,o){n.lanes|=a;var u=n.alternate;u!==null&&(u.lanes|=a),Od(n.return,a,o)}function hh(n,a,o,u,p,y){var A=n.memoizedState;A===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:p,treeForkCount:y}:(A.isBackwards=a,A.rendering=null,A.renderingStartTime=0,A.last=u,A.tail=o,A.tailMode=p,A.treeForkCount=y)}function P0(n,a,o){var u=a.pendingProps,p=u.revealOrder,y=u.tail;u=u.children;var A=Ft.current,N=(A&2)!==0;if(N?(A=A&1|2,a.flags|=128):A&=1,Y(Ft,A),Sn(n,a,u,o),u=rt?Ns:0,!N&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&$0(n,o,a);else if(n.tag===19)$0(n,o,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(o=a.child,p=null;o!==null;)n=o.alternate,n!==null&&Du(n)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),hh(a,!1,p,o,y,u);break;case"backwards":case"unstable_legacy-backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(n=p.alternate,n!==null&&Du(n)===null){a.child=p;break}n=p.sibling,p.sibling=o,o=p,p=n}hh(a,!0,o,null,y,u);break;case"together":hh(a,!1,null,null,void 0,u);break;default:a.memoizedState=null}return a.child}function Sa(n,a,o){if(n!==null&&(a.dependencies=n.dependencies),ni|=a.lanes,(o&a.childLanes)===0)if(n!==null){if(Ao(n,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(n!==null&&a.child!==n.child)throw Error(i(153));if(a.child!==null){for(n=a.child,o=pr(n,n.pendingProps),a.child=o,o.return=a;n.sibling!==null;)n=n.sibling,o=o.sibling=pr(n,n.pendingProps),o.return=a;o.sibling=null}return a.child}function ph(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&Tu(n)))}function e_(n,a,o){switch(a.tag){case 3:xe(a,a.stateNode.containerInfo),Ya(a,Kt,n.memoizedState.cache),Fi();break;case 27:case 5:je(a);break;case 4:xe(a,a.stateNode.containerInfo);break;case 10:Ya(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Ld(a),null;break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(Wa(a),a.flags|=128,null):(o&a.child.childLanes)!==0?z0(n,a,o):(Wa(a),n=Sa(n,a,o),n!==null?n.sibling:null);Wa(a);break;case 19:var p=(n.flags&128)!==0;if(u=(o&a.childLanes)!==0,u||(Ao(n,a,o,!1),u=(o&a.childLanes)!==0),p){if(u)return P0(n,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Y(Ft,Ft.current),u)break;return null;case 22:return a.lanes=0,A0(n,a,o,a.pendingProps);case 24:Ya(a,Kt,n.memoizedState.cache)}return Sa(n,a,o)}function I0(n,a,o){if(n!==null)if(n.memoizedProps!==a.pendingProps)Zt=!0;else{if(!ph(n,o)&&(a.flags&128)===0)return Zt=!1,e_(n,a,o);Zt=(n.flags&131072)!==0}else Zt=!1,rt&&(a.flags&1048576)!==0&&gy(a,Ns,a.index);switch(a.lanes=0,a.tag){case 16:e:{var u=a.pendingProps;if(n=Ki(a.elementType),a.type=n,typeof n=="function")Dl(n)?(u=Qi(n,u),a.tag=1,a=D0(null,a,n,u,o)):(a.tag=0,a=sh(null,a,n,u,o));else{if(n!=null){var p=n.$$typeof;if(p===T){a.tag=11,a=C0(null,a,n,u,o);break e}else if(p===M){a.tag=14,a=O0(null,a,n,u,o);break e}}throw a=ne(n)||n,Error(i(306,a,""))}}return a;case 0:return sh(n,a,a.type,a.pendingProps,o);case 1:return u=a.type,p=Qi(u,a.pendingProps),D0(n,a,u,p,o);case 3:e:{if(xe(a,a.stateNode.containerInfo),n===null)throw Error(i(387));u=a.pendingProps;var y=a.memoizedState;p=y.element,Nd(n,a),Vs(a,u,null,o);var A=a.memoizedState;if(u=A.cache,Ya(a,Kt,u),u!==y.cache&&Rd(a,[Kt],o,!0),qs(),u=A.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:A.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=N0(n,a,u,o);break e}else if(u!==p){p=mr(Error(i(424)),a),zs(p),a=N0(n,a,u,o);break e}else for(n=a.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Tt=Sr(n.firstChild),vn=a,rt=!0,Ga=null,vr=!0,o=Ay(a,null,u,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Fi(),u===p){a=Sa(n,a,o);break e}Sn(n,a,u,o)}a=a.child}return a;case 26:return Bu(n,a),n===null?(o=Zv(a.type,null,a.pendingProps,null))?a.memoizedState=o:rt||(o=a.type,n=a.pendingProps,u=sc(J.current).createElement(o),u[cn]=a,u[_n]=n,wn(u,o,n),Jt(u),a.stateNode=u):a.memoizedState=Zv(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return je(a),n===null&&rt&&(u=a.stateNode=Gv(a.type,a.pendingProps,J.current),vn=a,vr=!0,p=Tt,si(a.type)?(Kh=p,Tt=Sr(u.firstChild)):Tt=p),Sn(n,a,a.pendingProps.children,o),Bu(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&rt&&((p=u=Tt)&&(u=M_(u,a.type,a.pendingProps,vr),u!==null?(a.stateNode=u,vn=a,Tt=Sr(u.firstChild),vr=!1,p=!0):p=!1),p||Ka(a)),je(a),p=a.type,y=a.pendingProps,A=n!==null?n.memoizedProps:null,u=y.children,Vh(p,y)?u=null:A!==null&&Vh(p,A)&&(a.flags|=32),a.memoizedState!==null&&(p=qd(n,a,Hx,null,null,o),ll._currentValue=p),Bu(n,a),Sn(n,a,u,o),a.child;case 6:return n===null&&rt&&((n=o=Tt)&&(o=j_(o,a.pendingProps,vr),o!==null?(a.stateNode=o,vn=a,Tt=null,n=!0):n=!1),n||Ka(a)),null;case 13:return z0(n,a,o);case 4:return xe(a,a.stateNode.containerInfo),u=a.pendingProps,n===null?a.child=Zi(a,null,u,o):Sn(n,a,u,o),a.child;case 11:return C0(n,a,a.type,a.pendingProps,o);case 7:return Sn(n,a,a.pendingProps,o),a.child;case 8:return Sn(n,a,a.pendingProps.children,o),a.child;case 12:return Sn(n,a,a.pendingProps.children,o),a.child;case 10:return u=a.pendingProps,Ya(a,a.type,u.value),Sn(n,a,u.children,o),a.child;case 9:return p=a.type._context,u=a.pendingProps.children,Hi(a),p=bn(p),u=u(p),a.flags|=1,Sn(n,a,u,o),a.child;case 14:return O0(n,a,a.type,a.pendingProps,o);case 15:return R0(n,a,a.type,a.pendingProps,o);case 19:return P0(n,a,o);case 31:return Jx(n,a,o);case 22:return A0(n,a,o,a.pendingProps);case 24:return Hi(a),u=bn(Kt),n===null?(p=jd(),p===null&&(p=Et,y=Ad(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=o),p=y),a.memoizedState={parent:u,cache:p},Dd(a),Ya(a,Kt,p)):((n.lanes&o)!==0&&(Nd(n,a),Vs(a,null,null,o),qs()),p=n.memoizedState,y=a.memoizedState,p.parent!==u?(p={parent:u,cache:u},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),Ya(a,Kt,u)):(u=y.cache,Ya(a,Kt,u),u!==p.cache&&Rd(a,[Kt],o,!0))),Sn(n,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function wa(n){n.flags|=4}function mh(n,a,o,u,p){if((a=(n.mode&32)!==0)&&(a=!1),a){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(fv())n.flags|=8192;else throw Yi=Au,kd}else n.flags&=-16777217}function L0(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!eb(a))if(fv())n.flags|=8192;else throw Yi=Au,kd}function Gu(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?Ua():536870912,n.lanes|=a,qo|=a)}function Ys(n,a){if(!rt)switch(n.tailMode){case"hidden":a=n.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function Ct(n){var a=n.alternate!==null&&n.alternate.child===n.child,o=0,u=0;if(a)for(var p=n.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=u,n.childLanes=o,a}function t_(n,a,o){var u=a.pendingProps;switch(xd(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ct(a),null;case 1:return Ct(a),null;case 3:return o=a.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),ya(Kt),we(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(Ro(a)?wa(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Td())),Ct(a),null;case 26:var p=a.type,y=a.memoizedState;return n===null?(wa(a),y!==null?(Ct(a),L0(a,y)):(Ct(a),mh(a,p,null,u,o))):y?y!==n.memoizedState?(wa(a),Ct(a),L0(a,y)):(Ct(a),a.flags&=-16777217):(n=n.memoizedProps,n!==u&&wa(a),Ct(a),mh(a,p,n,u,o)),null;case 27:if(de(a),o=J.current,p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return Ct(a),null}n=I.current,Ro(a)?vy(a):(n=Gv(p,u,o),a.stateNode=n,wa(a))}return Ct(a),null;case 5:if(de(a),p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(!u){if(a.stateNode===null)throw Error(i(166));return Ct(a),null}if(y=I.current,Ro(a))vy(a);else{var A=sc(J.current);switch(y){case 1:y=A.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:y=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":y=A.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":y=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":y=A.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?A.createElement("select",{is:u.is}):A.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?A.createElement(p,{is:u.is}):A.createElement(p)}}y[cn]=a,y[_n]=u;e:for(A=a.child;A!==null;){if(A.tag===5||A.tag===6)y.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===a)break e;for(;A.sibling===null;){if(A.return===null||A.return===a)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}a.stateNode=y;e:switch(wn(y,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&wa(a)}}return Ct(a),mh(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,o),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==u&&wa(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(i(166));if(n=J.current,Ro(a)){if(n=a.stateNode,o=a.memoizedProps,u=null,p=vn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}n[cn]=a,n=!!(n.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||zv(n.nodeValue,o)),n||Ka(a,!0)}else n=sc(n).createTextNode(u),n[cn]=a,a.stateNode=n}return Ct(a),null;case 31:if(o=a.memoizedState,n===null||n.memoizedState!==null){if(u=Ro(a),o!==null){if(n===null){if(!u)throw Error(i(318));if(n=a.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[cn]=a}else Fi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ct(a),n=!1}else o=Td(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return a.flags&256?(rr(a),a):(rr(a),null);if((a.flags&128)!==0)throw Error(i(558))}return Ct(a),null;case 13:if(u=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=Ro(a),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(i(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[cn]=a}else Fi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ct(a),p=!1}else p=Td(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(rr(a),a):(rr(a),null)}return rr(a),(a.flags&128)!==0?(a.lanes=o,a):(o=u!==null,n=n!==null&&n.memoizedState!==null,o&&(u=a.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==p&&(u.flags|=2048)),o!==n&&o&&(a.child.flags|=8192),Gu(a,a.updateQueue),Ct(a),null);case 4:return we(),n===null&&Ph(a.stateNode.containerInfo),Ct(a),null;case 10:return ya(a.type),Ct(a),null;case 19:if(L(Ft),u=a.memoizedState,u===null)return Ct(a),null;if(p=(a.flags&128)!==0,y=u.rendering,y===null)if(p)Ys(u,!1);else{if($t!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(y=Du(n),y!==null){for(a.flags|=128,Ys(u,!1),n=y.updateQueue,a.updateQueue=n,Gu(a,n),a.subtreeFlags=0,n=o,o=a.child;o!==null;)Eu(o,n),o=o.sibling;return Y(Ft,Ft.current&1|2),rt&&ma(a,u.treeForkCount),a.child}n=n.sibling}u.tail!==null&&qe()>Qu&&(a.flags|=128,p=!0,Ys(u,!1),a.lanes=4194304)}else{if(!p)if(n=Du(y),n!==null){if(a.flags|=128,p=!0,n=n.updateQueue,a.updateQueue=n,Gu(a,n),Ys(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!rt)return Ct(a),null}else 2*qe()-u.renderingStartTime>Qu&&o!==536870912&&(a.flags|=128,p=!0,Ys(u,!1),a.lanes=4194304);u.isBackwards?(y.sibling=a.child,a.child=y):(n=u.last,n!==null?n.sibling=y:a.child=y,u.last=y)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=qe(),n.sibling=null,o=Ft.current,Y(Ft,p?o&1|2:o&1),rt&&ma(a,u.treeForkCount),n):(Ct(a),null);case 22:case 23:return rr(a),Id(),u=a.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(o&536870912)!==0&&(a.flags&128)===0&&(Ct(a),a.subtreeFlags&6&&(a.flags|=8192)):Ct(a),o=a.updateQueue,o!==null&&Gu(a,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==o&&(a.flags|=2048),n!==null&&L(Gi),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),ya(Kt),Ct(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function n_(n,a){switch(xd(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return ya(Kt),we(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return de(a),null;case 31:if(a.memoizedState!==null){if(rr(a),a.alternate===null)throw Error(i(340));Fi()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(rr(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Fi()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return L(Ft),null;case 4:return we(),null;case 10:return ya(a.type),null;case 22:case 23:return rr(a),Id(),n!==null&&L(Gi),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return ya(Kt),null;case 25:return null;default:return null}}function U0(n,a){switch(xd(a),a.tag){case 3:ya(Kt),we();break;case 26:case 27:case 5:de(a);break;case 4:we();break;case 31:a.memoizedState!==null&&rr(a);break;case 13:rr(a);break;case 19:L(Ft);break;case 10:ya(a.type);break;case 22:case 23:rr(a),Id(),n!==null&&L(Gi);break;case 24:ya(Kt)}}function Zs(n,a){try{var o=a.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var p=u.next;o=p;do{if((o.tag&n)===n){u=void 0;var y=o.create,A=o.inst;u=y(),A.destroy=u}o=o.next}while(o!==p)}}catch(N){yt(a,a.return,N)}}function ei(n,a,o){try{var u=a.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var y=p.next;u=y;do{if((u.tag&n)===n){var A=u.inst,N=A.destroy;if(N!==void 0){A.destroy=void 0,p=a;var H=o,ie=N;try{ie()}catch(pe){yt(p,H,pe)}}}u=u.next}while(u!==y)}}catch(pe){yt(a,a.return,pe)}}function q0(n){var a=n.updateQueue;if(a!==null){var o=n.stateNode;try{jy(a,o)}catch(u){yt(n,n.return,u)}}}function V0(n,a,o){o.props=Qi(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(u){yt(n,a,u)}}function Xs(n,a){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof o=="function"?n.refCleanup=o(u):o.current=u}}catch(p){yt(n,a,p)}}function ea(n,a){var o=n.ref,u=n.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(p){yt(n,a,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(p){yt(n,a,p)}else o.current=null}function F0(n){var a=n.type,o=n.memoizedProps,u=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break e;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(p){yt(n,n.return,p)}}function gh(n,a,o){try{var u=n.stateNode;__(u,n.type,o,a),u[_n]=a}catch(p){yt(n,n.return,p)}}function B0(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&si(n.type)||n.tag===4}function yh(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||B0(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&si(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function vh(n,a,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(n,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(n),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=Qr));else if(u!==4&&(u===27&&si(n.type)&&(o=n.stateNode,a=null),n=n.child,n!==null))for(vh(n,a,o),n=n.sibling;n!==null;)vh(n,a,o),n=n.sibling}function Ku(n,a,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?o.insertBefore(n,a):o.appendChild(n);else if(u!==4&&(u===27&&si(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(Ku(n,a,o),n=n.sibling;n!==null;)Ku(n,a,o),n=n.sibling}function H0(n){var a=n.stateNode,o=n.memoizedProps;try{for(var u=n.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);wn(a,u,o),a[cn]=n,a[_n]=o}catch(y){yt(n,n.return,y)}}var Ea=!1,Xt=!1,bh=!1,G0=typeof WeakSet=="function"?WeakSet:Set,dn=null;function r_(n,a){if(n=n.containerInfo,Uh=pc,n=bd(n),cs(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var p=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var A=0,N=-1,H=-1,ie=0,pe=0,ve=n,le=null;t:for(;;){for(var ce;ve!==o||p!==0&&ve.nodeType!==3||(N=A+p),ve!==y||u!==0&&ve.nodeType!==3||(H=A+u),ve.nodeType===3&&(A+=ve.nodeValue.length),(ce=ve.firstChild)!==null;)le=ve,ve=ce;for(;;){if(ve===n)break t;if(le===o&&++ie===p&&(N=A),le===y&&++pe===u&&(H=A),(ce=ve.nextSibling)!==null)break;ve=le,le=ve.parentNode}ve=ce}o=N===-1||H===-1?null:{start:N,end:H}}else o=null}o=o||{start:0,end:0}}else o=null;for(qh={focusedElem:n,selectionRange:o},pc=!1,dn=a;dn!==null;)if(a=dn,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,dn=n;else for(;dn!==null;){switch(a=dn,y=a.alternate,n=a.flags,a.tag){case 0:if((n&4)!==0&&(n=a.updateQueue,n=n!==null?n.events:null,n!==null))for(o=0;o<n.length;o++)p=n[o],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&y!==null){n=void 0,o=a,p=y.memoizedProps,y=y.memoizedState,u=o.stateNode;try{var Me=Qi(o.type,p);n=u.getSnapshotBeforeUpdate(Me,y),u.__reactInternalSnapshotBeforeUpdate=n}catch(Pe){yt(o,o.return,Pe)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,o=n.nodeType,o===9)Bh(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Bh(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(i(163))}if(n=a.sibling,n!==null){n.return=a.return,dn=n;break}dn=a.return}}function K0(n,a,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:_a(n,o),u&4&&Zs(5,o);break;case 1:if(_a(n,o),u&4)if(n=o.stateNode,a===null)try{n.componentDidMount()}catch(A){yt(o,o.return,A)}else{var p=Qi(o.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(p,a,n.__reactInternalSnapshotBeforeUpdate)}catch(A){yt(o,o.return,A)}}u&64&&q0(o),u&512&&Xs(o,o.return);break;case 3:if(_a(n,o),u&64&&(n=o.updateQueue,n!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{jy(n,a)}catch(A){yt(o,o.return,A)}}break;case 27:a===null&&u&4&&H0(o);case 26:case 5:_a(n,o),a===null&&u&4&&F0(o),u&512&&Xs(o,o.return);break;case 12:_a(n,o);break;case 31:_a(n,o),u&4&&X0(n,o);break;case 13:_a(n,o),u&4&&Q0(n,o),u&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=d_.bind(null,o),k_(n,o))));break;case 22:if(u=o.memoizedState!==null||Ea,!u){a=a!==null&&a.memoizedState!==null||Xt,p=Ea;var y=Xt;Ea=u,(Xt=a)&&!y?Ta(n,o,(o.subtreeFlags&8772)!==0):_a(n,o),Ea=p,Xt=y}break;case 30:break;default:_a(n,o)}}function Y0(n){var a=n.alternate;a!==null&&(n.alternate=null,Y0(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&lu(a)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Mt=null,Fn=!1;function xa(n,a,o){for(o=o.child;o!==null;)Z0(n,a,o),o=o.sibling}function Z0(n,a,o){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(kr,o)}catch{}switch(o.tag){case 26:Xt||ea(o,a),xa(n,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Xt||ea(o,a);var u=Mt,p=Fn;si(o.type)&&(Mt=o.stateNode,Fn=!1),xa(n,a,o),il(o.stateNode),Mt=u,Fn=p;break;case 5:Xt||ea(o,a);case 6:if(u=Mt,p=Fn,Mt=null,xa(n,a,o),Mt=u,Fn=p,Mt!==null)if(Fn)try{(Mt.nodeType===9?Mt.body:Mt.nodeName==="HTML"?Mt.ownerDocument.body:Mt).removeChild(o.stateNode)}catch(y){yt(o,a,y)}else try{Mt.removeChild(o.stateNode)}catch(y){yt(o,a,y)}break;case 18:Mt!==null&&(Fn?(n=Mt,qv(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),Zo(n)):qv(Mt,o.stateNode));break;case 4:u=Mt,p=Fn,Mt=o.stateNode.containerInfo,Fn=!0,xa(n,a,o),Mt=u,Fn=p;break;case 0:case 11:case 14:case 15:ei(2,o,a),Xt||ei(4,o,a),xa(n,a,o);break;case 1:Xt||(ea(o,a),u=o.stateNode,typeof u.componentWillUnmount=="function"&&V0(o,a,u)),xa(n,a,o);break;case 21:xa(n,a,o);break;case 22:Xt=(u=Xt)||o.memoizedState!==null,xa(n,a,o),Xt=u;break;default:xa(n,a,o)}}function X0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Zo(n)}catch(o){yt(a,a.return,o)}}}function Q0(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Zo(n)}catch(o){yt(a,a.return,o)}}function a_(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new G0),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new G0),a;default:throw Error(i(435,n.tag))}}function Yu(n,a){var o=a_(n);a.forEach(function(u){if(!o.has(u)){o.add(u);var p=h_.bind(null,n,u);u.then(p,p)}})}function Bn(n,a){var o=a.deletions;if(o!==null)for(var u=0;u<o.length;u++){var p=o[u],y=n,A=a,N=A;e:for(;N!==null;){switch(N.tag){case 27:if(si(N.type)){Mt=N.stateNode,Fn=!1;break e}break;case 5:Mt=N.stateNode,Fn=!1;break e;case 3:case 4:Mt=N.stateNode.containerInfo,Fn=!0;break e}N=N.return}if(Mt===null)throw Error(i(160));Z0(y,A,p),Mt=null,Fn=!1,y=p.alternate,y!==null&&(y.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)W0(a,n),a=a.sibling}var Nr=null;function W0(n,a){var o=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Bn(a,n),Hn(n),u&4&&(ei(3,n,n.return),Zs(3,n),ei(5,n,n.return));break;case 1:Bn(a,n),Hn(n),u&512&&(Xt||o===null||ea(o,o.return)),u&64&&Ea&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var p=Nr;if(Bn(a,n),Hn(n),u&512&&(Xt||o===null||ea(o,o.return)),u&4){var y=o!==null?o.memoizedState:null;if(u=n.memoizedState,o===null)if(u===null)if(n.stateNode===null){e:{u=n.type,o=n.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":y=p.getElementsByTagName("title")[0],(!y||y[yo]||y[cn]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=p.createElement(u),p.head.insertBefore(y,p.querySelector("head > title"))),wn(y,u,o),y[cn]=n,Jt(y),u=y;break e;case"link":var A=Wv("link","href",p).get(u+(o.href||""));if(A){for(var N=0;N<A.length;N++)if(y=A[N],y.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&y.getAttribute("rel")===(o.rel==null?null:o.rel)&&y.getAttribute("title")===(o.title==null?null:o.title)&&y.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){A.splice(N,1);break t}}y=p.createElement(u),wn(y,u,o),p.head.appendChild(y);break;case"meta":if(A=Wv("meta","content",p).get(u+(o.content||""))){for(N=0;N<A.length;N++)if(y=A[N],y.getAttribute("content")===(o.content==null?null:""+o.content)&&y.getAttribute("name")===(o.name==null?null:o.name)&&y.getAttribute("property")===(o.property==null?null:o.property)&&y.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&y.getAttribute("charset")===(o.charSet==null?null:o.charSet)){A.splice(N,1);break t}}y=p.createElement(u),wn(y,u,o),p.head.appendChild(y);break;default:throw Error(i(468,u))}y[cn]=n,Jt(y),u=y}n.stateNode=u}else Jv(p,n.type,n.stateNode);else n.stateNode=Qv(p,u,n.memoizedProps);else y!==u?(y===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):y.count--,u===null?Jv(p,n.type,n.stateNode):Qv(p,u,n.memoizedProps)):u===null&&n.stateNode!==null&&gh(n,n.memoizedProps,o.memoizedProps)}break;case 27:Bn(a,n),Hn(n),u&512&&(Xt||o===null||ea(o,o.return)),o!==null&&u&4&&gh(n,n.memoizedProps,o.memoizedProps);break;case 5:if(Bn(a,n),Hn(n),u&512&&(Xt||o===null||ea(o,o.return)),n.flags&32){p=n.stateNode;try{Li(p,"")}catch(Me){yt(n,n.return,Me)}}u&4&&n.stateNode!=null&&(p=n.memoizedProps,gh(n,p,o!==null?o.memoizedProps:p)),u&1024&&(bh=!0);break;case 6:if(Bn(a,n),Hn(n),u&4){if(n.stateNode===null)throw Error(i(162));u=n.memoizedProps,o=n.stateNode;try{o.nodeValue=u}catch(Me){yt(n,n.return,Me)}}break;case 3:if(cc=null,p=Nr,Nr=lc(a.containerInfo),Bn(a,n),Nr=p,Hn(n),u&4&&o!==null&&o.memoizedState.isDehydrated)try{Zo(a.containerInfo)}catch(Me){yt(n,n.return,Me)}bh&&(bh=!1,J0(n));break;case 4:u=Nr,Nr=lc(n.stateNode.containerInfo),Bn(a,n),Hn(n),Nr=u;break;case 12:Bn(a,n),Hn(n);break;case 31:Bn(a,n),Hn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Yu(n,u)));break;case 13:Bn(a,n),Hn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Xu=qe()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Yu(n,u)));break;case 22:p=n.memoizedState!==null;var H=o!==null&&o.memoizedState!==null,ie=Ea,pe=Xt;if(Ea=ie||p,Xt=pe||H,Bn(a,n),Xt=pe,Ea=ie,Hn(n),u&8192)e:for(a=n.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||H||Ea||Xt||Wi(n)),o=null,a=n;;){if(a.tag===5||a.tag===26){if(o===null){H=o=a;try{if(y=H.stateNode,p)A=y.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{N=H.stateNode;var ve=H.memoizedProps.style,le=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;N.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(Me){yt(H,H.return,Me)}}}else if(a.tag===6){if(o===null){H=a;try{H.stateNode.nodeValue=p?"":H.memoizedProps}catch(Me){yt(H,H.return,Me)}}}else if(a.tag===18){if(o===null){H=a;try{var ce=H.stateNode;p?Vv(ce,!0):Vv(H.stateNode,!1)}catch(Me){yt(H,H.return,Me)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===n)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=n.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Yu(n,o))));break;case 19:Bn(a,n),Hn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Yu(n,u)));break;case 30:break;case 21:break;default:Bn(a,n),Hn(n)}}function Hn(n){var a=n.flags;if(a&2){try{for(var o,u=n.return;u!==null;){if(B0(u)){o=u;break}u=u.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var p=o.stateNode,y=yh(n);Ku(n,y,p);break;case 5:var A=o.stateNode;o.flags&32&&(Li(A,""),o.flags&=-33);var N=yh(n);Ku(n,N,A);break;case 3:case 4:var H=o.stateNode.containerInfo,ie=yh(n);vh(n,ie,H);break;default:throw Error(i(161))}}catch(pe){yt(n,n.return,pe)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function J0(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;J0(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function _a(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)K0(n,a.alternate,a),a=a.sibling}function Wi(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:ei(4,a,a.return),Wi(a);break;case 1:ea(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&V0(a,a.return,o),Wi(a);break;case 27:il(a.stateNode);case 26:case 5:ea(a,a.return),Wi(a);break;case 22:a.memoizedState===null&&Wi(a);break;case 30:Wi(a);break;default:Wi(a)}n=n.sibling}}function Ta(n,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,p=n,y=a,A=y.flags;switch(y.tag){case 0:case 11:case 15:Ta(p,y,o),Zs(4,y);break;case 1:if(Ta(p,y,o),u=y,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(ie){yt(u,u.return,ie)}if(u=y,p=u.updateQueue,p!==null){var N=u.stateNode;try{var H=p.shared.hiddenCallbacks;if(H!==null)for(p.shared.hiddenCallbacks=null,p=0;p<H.length;p++)My(H[p],N)}catch(ie){yt(u,u.return,ie)}}o&&A&64&&q0(y),Xs(y,y.return);break;case 27:H0(y);case 26:case 5:Ta(p,y,o),o&&u===null&&A&4&&F0(y),Xs(y,y.return);break;case 12:Ta(p,y,o);break;case 31:Ta(p,y,o),o&&A&4&&X0(p,y);break;case 13:Ta(p,y,o),o&&A&4&&Q0(p,y);break;case 22:y.memoizedState===null&&Ta(p,y,o),Xs(y,y.return);break;case 30:break;default:Ta(p,y,o)}a=a.sibling}}function Sh(n,a){var o=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==o&&(n!=null&&n.refCount++,o!=null&&$s(o))}function wh(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&$s(n))}function zr(n,a,o,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)ev(n,a,o,u),a=a.sibling}function ev(n,a,o,u){var p=a.flags;switch(a.tag){case 0:case 11:case 15:zr(n,a,o,u),p&2048&&Zs(9,a);break;case 1:zr(n,a,o,u);break;case 3:zr(n,a,o,u),p&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&$s(n)));break;case 12:if(p&2048){zr(n,a,o,u),n=a.stateNode;try{var y=a.memoizedProps,A=y.id,N=y.onPostCommit;typeof N=="function"&&N(A,a.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(H){yt(a,a.return,H)}}else zr(n,a,o,u);break;case 31:zr(n,a,o,u);break;case 13:zr(n,a,o,u);break;case 23:break;case 22:y=a.stateNode,A=a.alternate,a.memoizedState!==null?y._visibility&2?zr(n,a,o,u):Qs(n,a):y._visibility&2?zr(n,a,o,u):(y._visibility|=2,Io(n,a,o,u,(a.subtreeFlags&10256)!==0||!1)),p&2048&&Sh(A,a);break;case 24:zr(n,a,o,u),p&2048&&wh(a.alternate,a);break;default:zr(n,a,o,u)}}function Io(n,a,o,u,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var y=n,A=a,N=o,H=u,ie=A.flags;switch(A.tag){case 0:case 11:case 15:Io(y,A,N,H,p),Zs(8,A);break;case 23:break;case 22:var pe=A.stateNode;A.memoizedState!==null?pe._visibility&2?Io(y,A,N,H,p):Qs(y,A):(pe._visibility|=2,Io(y,A,N,H,p)),p&&ie&2048&&Sh(A.alternate,A);break;case 24:Io(y,A,N,H,p),p&&ie&2048&&wh(A.alternate,A);break;default:Io(y,A,N,H,p)}a=a.sibling}}function Qs(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=n,u=a,p=u.flags;switch(u.tag){case 22:Qs(o,u),p&2048&&Sh(u.alternate,u);break;case 24:Qs(o,u),p&2048&&wh(u.alternate,u);break;default:Qs(o,u)}a=a.sibling}}var Ws=8192;function Lo(n,a,o){if(n.subtreeFlags&Ws)for(n=n.child;n!==null;)tv(n,a,o),n=n.sibling}function tv(n,a,o){switch(n.tag){case 26:Lo(n,a,o),n.flags&Ws&&n.memoizedState!==null&&B_(o,Nr,n.memoizedState,n.memoizedProps);break;case 5:Lo(n,a,o);break;case 3:case 4:var u=Nr;Nr=lc(n.stateNode.containerInfo),Lo(n,a,o),Nr=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=Ws,Ws=16777216,Lo(n,a,o),Ws=u):Lo(n,a,o));break;default:Lo(n,a,o)}}function nv(n){var a=n.alternate;if(a!==null&&(n=a.child,n!==null)){a.child=null;do a=n.sibling,n.sibling=null,n=a;while(n!==null)}}function Js(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];dn=u,av(u,n)}nv(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)rv(n),n=n.sibling}function rv(n){switch(n.tag){case 0:case 11:case 15:Js(n),n.flags&2048&&ei(9,n,n.return);break;case 3:Js(n);break;case 12:Js(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,Zu(n)):Js(n);break;default:Js(n)}}function Zu(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var u=a[o];dn=u,av(u,n)}nv(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:ei(8,a,a.return),Zu(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,Zu(a));break;default:Zu(a)}n=n.sibling}}function av(n,a){for(;dn!==null;){var o=dn;switch(o.tag){case 0:case 11:case 15:ei(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:$s(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,dn=u;else e:for(o=n;dn!==null;){u=dn;var p=u.sibling,y=u.return;if(Y0(u),u===o){dn=null;break e}if(p!==null){p.return=y,dn=p;break e}dn=y}}}var i_={getCacheForType:function(n){var a=bn(Kt),o=a.data.get(n);return o===void 0&&(o=n(),a.data.set(n,o)),o},cacheSignal:function(){return bn(Kt).controller.signal}},o_=typeof WeakMap=="function"?WeakMap:Map,dt=0,Et=null,Xe=null,et=0,gt=0,ar=null,ti=!1,Uo=!1,Eh=!1,Ca=0,$t=0,ni=0,Ji=0,xh=0,ir=0,qo=0,el=null,Gn=null,_h=!1,Xu=0,iv=0,Qu=1/0,Wu=null,ri=null,nn=0,ai=null,Vo=null,Oa=0,Th=0,Ch=null,ov=null,tl=0,Oh=null;function or(){return(dt&2)!==0&&et!==0?et&-et:K.T!==null?Dh():Cs()}function sv(){if(ir===0)if((et&536870912)===0||rt){var n=dr;dr<<=1,(dr&3932160)===0&&(dr=262144),ir=n}else ir=536870912;return n=nr.current,n!==null&&(n.flags|=32),ir}function Kn(n,a,o){(n===Et&&(gt===2||gt===9)||n.cancelPendingCommit!==null)&&(Fo(n,0),ii(n,et,ir,!1)),aa(n,o),((dt&2)===0||n!==Et)&&(n===Et&&((dt&2)===0&&(Ji|=o),$t===4&&ii(n,et,ir,!1)),ta(n))}function lv(n,a,o){if((dt&6)!==0)throw Error(i(327));var u=!o&&(a&127)===0&&(a&n.expiredLanes)===0||Vr(n,a),p=u?u_(n,a):Ah(n,a,!0),y=u;do{if(p===0){Uo&&!u&&ii(n,a,0,!1);break}else{if(o=n.current.alternate,y&&!s_(o)){p=Ah(n,a,!1),y=!1;continue}if(p===2){if(y=a,n.errorRecoveryDisabledLanes&y)var A=0;else A=n.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){a=A;e:{var N=n;p=el;var H=N.current.memoizedState.isDehydrated;if(H&&(Fo(N,A).flags|=256),A=Ah(N,A,!1),A!==2){if(Eh&&!H){N.errorRecoveryDisabledLanes|=y,Ji|=y,p=4;break e}y=Gn,Gn=p,y!==null&&(Gn===null?Gn=y:Gn.push.apply(Gn,y))}p=A}if(y=!1,p!==2)continue}}if(p===1){Fo(n,0),ii(n,a,0,!0);break}e:{switch(u=n,y=p,y){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:ii(u,a,ir,!ti);break e;case 2:Gn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(p=Xu+300-qe(),10<p)){if(ii(u,a,ir,!ti),Xr(u,0,!0)!==0)break e;Oa=a,u.timeoutHandle=Lv(uv.bind(null,u,o,Gn,Wu,_h,a,ir,Ji,qo,ti,y,"Throttled",-0,0),p);break e}uv(u,o,Gn,Wu,_h,a,ir,Ji,qo,ti,y,null,-0,0)}}break}while(!0);ta(n)}function uv(n,a,o,u,p,y,A,N,H,ie,pe,ve,le,ce){if(n.timeoutHandle=-1,ve=a.subtreeFlags,ve&8192||(ve&16785408)===16785408){ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qr},tv(a,y,ve);var Me=(y&62914560)===y?Xu-qe():(y&4194048)===y?iv-qe():0;if(Me=H_(ve,Me),Me!==null){Oa=y,n.cancelPendingCommit=Me(yv.bind(null,n,a,y,o,u,p,A,N,H,pe,ve,null,le,ce)),ii(n,y,A,!ie);return}}yv(n,a,y,o,u,p,A,N,H)}function s_(n){for(var a=n;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var p=o[u],y=p.getSnapshot;p=p.value;try{if(!$n(y(),p))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ii(n,a,o,u){a&=~xh,a&=~Ji,n.suspendedLanes|=a,n.pingedLanes&=~a,u&&(n.warmLanes|=a),u=n.expirationTimes;for(var p=a;0<p;){var y=31-Pt(p),A=1<<y;u[y]=-1,p&=~A}o!==0&&On(n,o,a)}function Ju(){return(dt&6)===0?(nl(0),!1):!0}function Rh(){if(Xe!==null){if(gt===0)var n=Xe.return;else n=Xe,ga=Bi=null,Bd(n),Do=null,Is=0,n=Xe;for(;n!==null;)U0(n.alternate,n),n=n.return;Xe=null}}function Fo(n,a){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,O_(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),Oa=0,Rh(),Et=n,Xe=o=pr(n.current,null),et=a,gt=0,ar=null,ti=!1,Uo=Vr(n,a),Eh=!1,qo=ir=xh=Ji=ni=$t=0,Gn=el=null,_h=!1,(a&8)!==0&&(a|=a&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=a;0<u;){var p=31-Pt(u),y=1<<p;a|=n[p],u&=~y}return Ca=a,Nt(),o}function cv(n,a){Be=null,K.H=Gs,a===ko||a===Ru?(a=Cy(),gt=3):a===kd?(a=Cy(),gt=4):gt=a===oh?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,ar=a,Xe===null&&($t=1,Vu(n,mr(a,n.current)))}function fv(){var n=nr.current;return n===null?!0:(et&4194048)===et?br===null:(et&62914560)===et||(et&536870912)!==0?n===br:!1}function dv(){var n=K.H;return K.H=Gs,n===null?Gs:n}function hv(){var n=K.A;return K.A=i_,n}function ec(){$t=4,ti||(et&4194048)!==et&&nr.current!==null||(Uo=!0),(ni&134217727)===0&&(Ji&134217727)===0||Et===null||ii(Et,et,ir,!1)}function Ah(n,a,o){var u=dt;dt|=2;var p=dv(),y=hv();(Et!==n||et!==a)&&(Wu=null,Fo(n,a)),a=!1;var A=$t;e:do try{if(gt!==0&&Xe!==null){var N=Xe,H=ar;switch(gt){case 8:Rh(),A=6;break e;case 3:case 2:case 9:case 6:nr.current===null&&(a=!0);var ie=gt;if(gt=0,ar=null,Bo(n,N,H,ie),o&&Uo){A=0;break e}break;default:ie=gt,gt=0,ar=null,Bo(n,N,H,ie)}}l_(),A=$t;break}catch(pe){cv(n,pe)}while(!0);return a&&n.shellSuspendCounter++,ga=Bi=null,dt=u,K.H=p,K.A=y,Xe===null&&(Et=null,et=0,Nt()),A}function l_(){for(;Xe!==null;)pv(Xe)}function u_(n,a){var o=dt;dt|=2;var u=dv(),p=hv();Et!==n||et!==a?(Wu=null,Qu=qe()+500,Fo(n,a)):Uo=Vr(n,a);e:do try{if(gt!==0&&Xe!==null){a=Xe;var y=ar;t:switch(gt){case 1:gt=0,ar=null,Bo(n,a,y,1);break;case 2:case 9:if(_y(y)){gt=0,ar=null,mv(a);break}a=function(){gt!==2&>!==9||Et!==n||(gt=7),ta(n)},y.then(a,a);break e;case 3:gt=7;break e;case 4:gt=5;break e;case 7:_y(y)?(gt=0,ar=null,mv(a)):(gt=0,ar=null,Bo(n,a,y,7));break;case 5:var A=null;switch(Xe.tag){case 26:A=Xe.memoizedState;case 5:case 27:var N=Xe;if(A?eb(A):N.stateNode.complete){gt=0,ar=null;var H=N.sibling;if(H!==null)Xe=H;else{var ie=N.return;ie!==null?(Xe=ie,tc(ie)):Xe=null}break t}}gt=0,ar=null,Bo(n,a,y,5);break;case 6:gt=0,ar=null,Bo(n,a,y,6);break;case 8:Rh(),$t=6;break e;default:throw Error(i(462))}}c_();break}catch(pe){cv(n,pe)}while(!0);return ga=Bi=null,K.H=u,K.A=p,dt=o,Xe!==null?0:(Et=null,et=0,Nt(),$t)}function c_(){for(;Xe!==null&&!Ze();)pv(Xe)}function pv(n){var a=I0(n.alternate,n,Ca);n.memoizedProps=n.pendingProps,a===null?tc(n):Xe=a}function mv(n){var a=n,o=a.alternate;switch(a.tag){case 15:case 0:a=k0(o,a,a.pendingProps,a.type,void 0,et);break;case 11:a=k0(o,a,a.pendingProps,a.type.render,a.ref,et);break;case 5:Bd(a);default:U0(o,a),a=Xe=Eu(a,Ca),a=I0(o,a,Ca)}n.memoizedProps=n.pendingProps,a===null?tc(n):Xe=a}function Bo(n,a,o,u){ga=Bi=null,Bd(a),Do=null,Is=0;var p=a.return;try{if(Wx(n,p,a,o,et)){$t=1,Vu(n,mr(o,n.current)),Xe=null;return}}catch(y){if(p!==null)throw Xe=p,y;$t=1,Vu(n,mr(o,n.current)),Xe=null;return}a.flags&32768?(rt||u===1?n=!0:Uo||(et&536870912)!==0?n=!1:(ti=n=!0,(u===2||u===9||u===3||u===6)&&(u=nr.current,u!==null&&u.tag===13&&(u.flags|=16384))),gv(a,n)):tc(a)}function tc(n){var a=n;do{if((a.flags&32768)!==0){gv(a,ti);return}n=a.return;var o=t_(a.alternate,a,Ca);if(o!==null){Xe=o;return}if(a=a.sibling,a!==null){Xe=a;return}Xe=a=n}while(a!==null);$t===0&&($t=5)}function gv(n,a){do{var o=n_(n.alternate,n);if(o!==null){o.flags&=32767,Xe=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(n=n.sibling,n!==null)){Xe=n;return}Xe=n=o}while(n!==null);$t=6,Xe=null}function yv(n,a,o,u,p,y,A,N,H){n.cancelPendingCommit=null;do nc();while(nn!==0);if((dt&6)!==0)throw Error(i(327));if(a!==null){if(a===n.current)throw Error(i(177));if(y=a.lanes|a.childLanes,y|=fn,At(n,o,y,A,N,H),n===Et&&(Xe=Et=null,et=0),Vo=a,ai=n,Oa=o,Th=y,Ch=p,ov=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,p_(Dt,function(){return Ev(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=K.T,K.T=null,p=ee.p,ee.p=2,A=dt,dt|=4;try{r_(n,a,o)}finally{dt=A,ee.p=p,K.T=u}}nn=1,vv(),bv(),Sv()}}function vv(){if(nn===1){nn=0;var n=ai,a=Vo,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=K.T,K.T=null;var u=ee.p;ee.p=2;var p=dt;dt|=4;try{W0(a,n);var y=qh,A=bd(n.containerInfo),N=y.focusedElem,H=y.selectionRange;if(A!==N&&N&&N.ownerDocument&&Su(N.ownerDocument.documentElement,N)){if(H!==null&&cs(N)){var ie=H.start,pe=H.end;if(pe===void 0&&(pe=ie),"selectionStart"in N)N.selectionStart=ie,N.selectionEnd=Math.min(pe,N.value.length);else{var ve=N.ownerDocument||document,le=ve&&ve.defaultView||window;if(le.getSelection){var ce=le.getSelection(),Me=N.textContent.length,Pe=Math.min(H.start,Me),wt=H.end===void 0?Pe:Math.min(H.end,Me);!ce.extend&&Pe>wt&&(A=wt,wt=Pe,Pe=A);var te=vd(N,Pe),W=vd(N,wt);if(te&&W&&(ce.rangeCount!==1||ce.anchorNode!==te.node||ce.anchorOffset!==te.offset||ce.focusNode!==W.node||ce.focusOffset!==W.offset)){var ae=ve.createRange();ae.setStart(te.node,te.offset),ce.removeAllRanges(),Pe>wt?(ce.addRange(ae),ce.extend(W.node,W.offset)):(ae.setEnd(W.node,W.offset),ce.addRange(ae))}}}}for(ve=[],ce=N;ce=ce.parentNode;)ce.nodeType===1&&ve.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<ve.length;N++){var me=ve[N];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}pc=!!Uh,qh=Uh=null}finally{dt=p,ee.p=u,K.T=o}}n.current=a,nn=2}}function bv(){if(nn===2){nn=0;var n=ai,a=Vo,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=K.T,K.T=null;var u=ee.p;ee.p=2;var p=dt;dt|=4;try{K0(n,a.alternate,a)}finally{dt=p,ee.p=u,K.T=o}}nn=3}}function Sv(){if(nn===4||nn===3){nn=0,ot();var n=ai,a=Vo,o=Oa,u=ov;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?nn=5:(nn=0,Vo=ai=null,wv(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(ri=null),Ti(o),a=a.stateNode,Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(kr,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=K.T,p=ee.p,ee.p=2,K.T=null;try{for(var y=n.onRecoverableError,A=0;A<u.length;A++){var N=u[A];y(N.value,{componentStack:N.stack})}}finally{K.T=a,ee.p=p}}(Oa&3)!==0&&nc(),ta(n),p=n.pendingLanes,(o&261930)!==0&&(p&42)!==0?n===Oh?tl++:(tl=0,Oh=n):tl=0,nl(0)}}function wv(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,$s(a)))}function nc(){return vv(),bv(),Sv(),Ev()}function Ev(){if(nn!==5)return!1;var n=ai,a=Th;Th=0;var o=Ti(Oa),u=K.T,p=ee.p;try{ee.p=32>o?32:o,K.T=null,o=Ch,Ch=null;var y=ai,A=Oa;if(nn=0,Vo=ai=null,Oa=0,(dt&6)!==0)throw Error(i(331));var N=dt;if(dt|=4,rv(y.current),ev(y,y.current,A,o),dt=N,nl(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(kr,y)}catch{}return!0}finally{ee.p=p,K.T=u,wv(n,a)}}function xv(n,a,o){a=mr(o,a),a=ih(n.stateNode,a,2),n=Qa(n,a,2),n!==null&&(aa(n,2),ta(n))}function yt(n,a,o){if(n.tag===3)xv(n,n,o);else for(;a!==null;){if(a.tag===3){xv(a,n,o);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ri===null||!ri.has(u))){n=mr(o,n),o=_0(2),u=Qa(a,o,2),u!==null&&(T0(o,u,a,n),aa(u,2),ta(u));break}}a=a.return}}function Mh(n,a,o){var u=n.pingCache;if(u===null){u=n.pingCache=new o_;var p=new Set;u.set(a,p)}else p=u.get(a),p===void 0&&(p=new Set,u.set(a,p));p.has(o)||(Eh=!0,p.add(o),n=f_.bind(null,n,a,o),a.then(n,n))}function f_(n,a,o){var u=n.pingCache;u!==null&&u.delete(a),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,Et===n&&(et&o)===o&&($t===4||$t===3&&(et&62914560)===et&&300>qe()-Xu?(dt&2)===0&&Fo(n,0):xh|=o,qo===et&&(qo=0)),ta(n)}function _v(n,a){a===0&&(a=Ua()),n=Dr(n,a),n!==null&&(aa(n,a),ta(n))}function d_(n){var a=n.memoizedState,o=0;a!==null&&(o=a.retryLane),_v(n,o)}function h_(n,a){var o=0;switch(n.tag){case 31:case 13:var u=n.stateNode,p=n.memoizedState;p!==null&&(o=p.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(i(314))}u!==null&&u.delete(a),_v(n,o)}function p_(n,a){return Ue(n,a)}var rc=null,Ho=null,jh=!1,ac=!1,kh=!1,oi=0;function ta(n){n!==Ho&&n.next===null&&(Ho===null?rc=Ho=n:Ho=Ho.next=n),ac=!0,jh||(jh=!0,g_())}function nl(n,a){if(!kh&&ac){kh=!0;do for(var o=!1,u=rc;u!==null;){if(n!==0){var p=u.pendingLanes;if(p===0)var y=0;else{var A=u.suspendedLanes,N=u.pingedLanes;y=(1<<31-Pt(42|n)+1)-1,y&=p&~(A&~N),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(o=!0,Rv(u,y))}else y=et,y=Xr(u,u===Et?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||Vr(u,y)||(o=!0,Rv(u,y));u=u.next}while(o);kh=!1}}function m_(){Tv()}function Tv(){ac=jh=!1;var n=0;oi!==0&&C_()&&(n=oi);for(var a=qe(),o=null,u=rc;u!==null;){var p=u.next,y=Cv(u,a);y===0?(u.next=null,o===null?rc=p:o.next=p,p===null&&(Ho=o)):(o=u,(n!==0||(y&3)!==0)&&(ac=!0)),u=p}nn!==0&&nn!==5||nl(n),oi!==0&&(oi=0)}function Cv(n,a){for(var o=n.suspendedLanes,u=n.pingedLanes,p=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var A=31-Pt(y),N=1<<A,H=p[A];H===-1?((N&o)===0||(N&u)!==0)&&(p[A]=oo(N,a)):H<=a&&(n.expiredLanes|=N),y&=~N}if(a=Et,o=et,o=Xr(n,n===a?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,o===0||n===a&&(gt===2||gt===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&Re(u),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||Vr(n,o)){if(a=o&-o,a===n.callbackPriority)return a;switch(u!==null&&Re(u),Ti(o)){case 2:case 8:o=zn;break;case 32:o=Dt;break;case 268435456:o=hn;break;default:o=Dt}return u=Ov.bind(null,n),o=Ue(o,u),n.callbackPriority=a,n.callbackNode=o,a}return u!==null&&u!==null&&Re(u),n.callbackPriority=2,n.callbackNode=null,2}function Ov(n,a){if(nn!==0&&nn!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(nc()&&n.callbackNode!==o)return null;var u=et;return u=Xr(n,n===Et?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(lv(n,u,a),Cv(n,qe()),n.callbackNode!=null&&n.callbackNode===o?Ov.bind(null,n):null)}function Rv(n,a){if(nc())return null;lv(n,a,!0)}function g_(){R_(function(){(dt&6)!==0?Ue(yn,m_):Tv()})}function Dh(){if(oi===0){var n=Mo;n===0&&(n=pn,pn<<=1,(pn&261888)===0&&(pn=256)),oi=n}return oi}function Av(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Rs(""+n)}function Mv(n,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,n.id&&o.setAttribute("form",n.id),a.parentNode.insertBefore(o,a),n=new FormData(n),o.parentNode.removeChild(o),n}function y_(n,a,o,u,p){if(a==="submit"&&o&&o.stateNode===p){var y=Av((p[_n]||null).action),A=u.submitter;A&&(a=(a=A[_n]||null)?Av(a.formAction):A.getAttribute("formAction"),a!==null&&(y=a,A=null));var N=new Fe("action","action",null,u,p);n.push({event:N,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(oi!==0){var H=A?Mv(p,A):new FormData(p);Jd(o,{pending:!0,data:H,method:p.method,action:y},null,H)}}else typeof y=="function"&&(N.preventDefault(),H=A?Mv(p,A):new FormData(p),Jd(o,{pending:!0,data:H,method:p.method,action:y},y,H))},currentTarget:p}]})}}for(var Nh=0;Nh<nt.length;Nh++){var zh=nt[Nh],v_=zh.toLowerCase(),b_=zh[0].toUpperCase()+zh.slice(1);mt(v_,"on"+b_)}mt(Se,"onAnimationEnd"),mt(_e,"onAnimationIteration"),mt(ge,"onAnimationStart"),mt("dblclick","onDoubleClick"),mt("focusin","onFocus"),mt("focusout","onBlur"),mt(Te,"onTransitionRun"),mt(Ce,"onTransitionStart"),mt(Ve,"onTransitionCancel"),mt(He,"onTransitionEnd"),Ii("onMouseEnter",["mouseout","mouseover"]),Ii("onMouseLeave",["mouseout","mouseover"]),Ii("onPointerEnter",["pointerout","pointerover"]),Ii("onPointerLeave",["pointerout","pointerover"]),Va("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Va("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Va("onBeforeInput",["compositionend","keypress","textInput","paste"]),Va("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Va("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Va("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var rl="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(" "),S_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(rl));function jv(n,a){a=(a&4)!==0;for(var o=0;o<n.length;o++){var u=n[o],p=u.event;u=u.listeners;e:{var y=void 0;if(a)for(var A=u.length-1;0<=A;A--){var N=u[A],H=N.instance,ie=N.currentTarget;if(N=N.listener,H!==y&&p.isPropagationStopped())break e;y=N,p.currentTarget=ie;try{y(p)}catch(pe){un(pe)}p.currentTarget=null,y=H}else for(A=0;A<u.length;A++){if(N=u[A],H=N.instance,ie=N.currentTarget,N=N.listener,H!==y&&p.isPropagationStopped())break e;y=N,p.currentTarget=ie;try{y(p)}catch(pe){un(pe)}p.currentTarget=null,y=H}}}}function Qe(n,a){var o=a[su];o===void 0&&(o=a[su]=new Set);var u=n+"__bubble";o.has(u)||(kv(a,n,2,!1),o.add(u))}function $h(n,a,o){var u=0;a&&(u|=4),kv(o,n,u,a)}var ic="_reactListening"+Math.random().toString(36).slice(2);function Ph(n){if(!n[ic]){n[ic]=!0,Kf.forEach(function(o){o!=="selectionchange"&&(S_.has(o)||$h(o,!1,n),$h(o,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[ic]||(a[ic]=!0,$h("selectionchange",!1,a))}}function kv(n,a,o,u){switch(sb(a)){case 2:var p=Y_;break;case 8:p=Z_;break;default:p=Wh}o=p.bind(null,a,o,n),p=void 0,!Ol||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),u?p!==void 0?n.addEventListener(a,o,{capture:!0,passive:p}):n.addEventListener(a,o,!0):p!==void 0?n.addEventListener(a,o,{passive:p}):n.addEventListener(a,o,!1)}function Ih(n,a,o,u,p){var y=u;if((a&1)===0&&(a&2)===0&&u!==null)e:for(;;){if(u===null)return;var A=u.tag;if(A===3||A===4){var N=u.stateNode.containerInfo;if(N===p)break;if(A===4)for(A=u.return;A!==null;){var H=A.tag;if((H===3||H===4)&&A.stateNode.containerInfo===p)return;A=A.return}for(;N!==null;){if(A=zi(N),A===null)return;if(H=A.tag,H===5||H===6||H===26||H===27){u=y=A;continue e}N=N.parentNode}}u=u.return}mu(function(){var ie=y,pe=hu(o),ve=[];e:{var le=ut.get(n);if(le!==void 0){var ce=Fe,Me=n;switch(n){case"keypress":if(Ms(o)===0)break e;case"keydown":case"keyup":ce=$a;break;case"focusin":Me="focus",ce=Ml;break;case"focusout":Me="blur",ce=Ml;break;case"beforeblur":case"afterblur":ce=Ml;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=Oi;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=sd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=ry;break;case Se:case _e:case ge:ce=rm;break;case He:ce=ud;break;case"scroll":case"scrollend":ce=tm;break;case"wheel":ce=oy;break;case"copy":case"cut":case"paste":ce=ey;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=Yc;break;case"toggle":case"beforetoggle":ce=cm}var Pe=(a&4)!==0,wt=!Pe&&(n==="scroll"||n==="scrollend"),te=Pe?le!==null?le+"Capture":null:le;Pe=[];for(var W=ie,ae;W!==null;){var me=W;if(ae=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||ae===null||te===null||(me=so(W,te),me!=null&&Pe.push(al(W,me,ae))),wt)break;W=W.return}0<Pe.length&&(le=new ce(le,Me,null,o,pe),ve.push({event:le,listeners:Pe}))}}if((a&7)===0){e:{if(le=n==="mouseover"||n==="pointerover",ce=n==="mouseout"||n==="pointerout",le&&o!==du&&(Me=o.relatedTarget||o.fromElement)&&(zi(Me)||Me[Ni]))break e;if((ce||le)&&(le=pe.window===pe?pe:(le=pe.ownerDocument)?le.defaultView||le.parentWindow:window,ce?(Me=o.relatedTarget||o.toElement,ce=ie,Me=Me?zi(Me):null,Me!==null&&(wt=l(Me),Pe=Me.tag,Me!==wt||Pe!==5&&Pe!==27&&Pe!==6)&&(Me=null)):(ce=null,Me=ie),ce!==Me)){if(Pe=Oi,me="onMouseLeave",te="onMouseEnter",W="mouse",(n==="pointerout"||n==="pointerover")&&(Pe=Yc,me="onPointerLeave",te="onPointerEnter",W="pointer"),wt=ce==null?le:vo(ce),ae=Me==null?le:vo(Me),le=new Pe(me,W+"leave",ce,o,pe),le.target=wt,le.relatedTarget=ae,me=null,zi(pe)===ie&&(Pe=new Pe(te,W+"enter",Me,o,pe),Pe.target=ae,Pe.relatedTarget=wt,me=Pe),wt=me,ce&&Me)t:{for(Pe=w_,te=ce,W=Me,ae=0,me=te;me;me=Pe(me))ae++;me=0;for(var ze=W;ze;ze=Pe(ze))me++;for(;0<ae-me;)te=Pe(te),ae--;for(;0<me-ae;)W=Pe(W),me--;for(;ae--;){if(te===W||W!==null&&te===W.alternate){Pe=te;break t}te=Pe(te),W=Pe(W)}Pe=null}else Pe=null;ce!==null&&Dv(ve,le,ce,Pe,!1),Me!==null&&wt!==null&&Dv(ve,wt,Me,Pe,!0)}}e:{if(le=ie?vo(ie):window,ce=le.nodeName&&le.nodeName.toLowerCase(),ce==="select"||ce==="input"&&le.type==="file")var st=Zc;else if(md(le))if(yu)st=hm;else{st=hy;var De=fm}else ce=le.nodeName,!ce||ce.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?ie&&fu(ie.elementType)&&(st=Zc):st=dm;if(st&&(st=st(n,ie))){gd(ve,st,o,pe);break e}De&&De(n,le,ie),n==="focusout"&&ie&&le.type==="number"&&ie.memoizedProps.value!=null&&Cl(le,"number",le.value)}switch(De=ie?vo(ie):window,n){case"focusin":(md(De)||De.contentEditable==="true")&&(Vi=De,wu=ie,_o=null);break;case"focusout":_o=wu=Vi=null;break;case"mousedown":fs=!0;break;case"contextmenu":case"mouseup":case"dragend":fs=!1,Sd(ve,o,pe);break;case"selectionchange":if(py)break;case"keydown":case"keyup":Sd(ve,o,pe)}var Ge;if(gu)e:{switch(n){case"compositionstart":var tt="onCompositionStart";break e;case"compositionend":tt="onCompositionEnd";break e;case"compositionupdate":tt="onCompositionUpdate";break e}tt=void 0}else qi?hd(n,o)&&(tt="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(tt="onCompositionStart");tt&&(cd&&o.locale!=="ko"&&(qi||tt!=="onCompositionStart"?tt==="onCompositionEnd"&&qi&&(Ge=ad()):(fa=pe,uo="value"in fa?fa.value:fa.textContent,qi=!0)),De=oc(ie,tt),0<De.length&&(tt=new Kc(tt,n,null,o,pe),ve.push({event:tt,listeners:De}),Ge?tt.data=Ge:(Ge=pd(o),Ge!==null&&(tt.data=Ge)))),(Ge=ly?uy(n,o):cy(n,o))&&(tt=oc(ie,"onBeforeInput"),0<tt.length&&(De=new Kc("onBeforeInput","beforeinput",null,o,pe),ve.push({event:De,listeners:tt}),De.data=Ge)),y_(ve,n,ie,o,pe)}jv(ve,a)})}function al(n,a,o){return{instance:n,listener:a,currentTarget:o}}function oc(n,a){for(var o=a+"Capture",u=[];n!==null;){var p=n,y=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||y===null||(p=so(n,o),p!=null&&u.unshift(al(n,p,y)),p=so(n,a),p!=null&&u.push(al(n,p,y))),n.tag===3)return u;n=n.return}return[]}function w_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Dv(n,a,o,u,p){for(var y=a._reactName,A=[];o!==null&&o!==u;){var N=o,H=N.alternate,ie=N.stateNode;if(N=N.tag,H!==null&&H===u)break;N!==5&&N!==26&&N!==27||ie===null||(H=ie,p?(ie=so(o,y),ie!=null&&A.unshift(al(o,ie,H))):p||(ie=so(o,y),ie!=null&&A.push(al(o,ie,H)))),o=o.return}A.length!==0&&n.push({event:a,listeners:A})}var E_=/\r\n?/g,x_=/\u0000|\uFFFD/g;function Nv(n){return(typeof n=="string"?n:""+n).replace(E_,`
|
|
159
|
+
`).replace(x_,"")}function zv(n,a){return a=Nv(a),Nv(n)===a}function St(n,a,o,u,p,y){switch(o){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Li(n,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Li(n,""+u);break;case"className":ls(n,"class",u);break;case"tabIndex":ls(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":ls(n,o,u);break;case"style":rd(n,u,y);break;case"data":if(a!=="object"){ls(n,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||o!=="href")){n.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(o);break}u=Rs(""+u),n.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(o,"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 y=="function"&&(o==="formAction"?(a!=="input"&&St(n,a,"name",p.name,p,null),St(n,a,"formEncType",p.formEncType,p,null),St(n,a,"formMethod",p.formMethod,p,null),St(n,a,"formTarget",p.formTarget,p,null)):(St(n,a,"encType",p.encType,p,null),St(n,a,"method",p.method,p,null),St(n,a,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(o);break}u=Rs(""+u),n.setAttribute(o,u);break;case"onClick":u!=null&&(n.onclick=Qr);break;case"onScroll":u!=null&&Qe("scroll",n);break;case"onScrollEnd":u!=null&&Qe("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}o=Rs(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,""+u):n.removeAttribute(o);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":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":u===!0?n.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,u):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(o,u):n.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(o):n.setAttribute(o,u);break;case"popover":Qe("beforetoggle",n),Qe("toggle",n),Os(n,"popover",u);break;case"xlinkActuate":Br(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Br(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Br(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Br(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Br(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Br(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Br(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Br(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Br(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Os(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=Wg.get(o)||o,Os(n,o,u))}}function Lh(n,a,o,u,p,y){switch(o){case"style":rd(n,u,y);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(p.children!=null)throw Error(i(60));n.innerHTML=o}}break;case"children":typeof u=="string"?Li(n,u):(typeof u=="number"||typeof u=="bigint")&&Li(n,""+u);break;case"onScroll":u!=null&&Qe("scroll",n);break;case"onScrollEnd":u!=null&&Qe("scrollend",n);break;case"onClick":u!=null&&(n.onclick=Qr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yf.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),a=o.slice(2,p?o.length-7:void 0),y=n[_n]||null,y=y!=null?y[o]:null,typeof y=="function"&&n.removeEventListener(a,y,p),typeof u=="function")){typeof y!="function"&&y!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(a,u,p);break e}o in n?n[o]=u:u===!0?n.setAttribute(o,""):Os(n,o,u)}}}function wn(n,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",n),Qe("load",n);var u=!1,p=!1,y;for(y in o)if(o.hasOwnProperty(y)){var A=o[y];if(A!=null)switch(y){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:St(n,a,y,A,o,null)}}p&&St(n,a,"srcSet",o.srcSet,o,null),u&&St(n,a,"src",o.src,o,null);return;case"input":Qe("invalid",n);var N=y=A=p=null,H=null,ie=null;for(u in o)if(o.hasOwnProperty(u)){var pe=o[u];if(pe!=null)switch(u){case"name":p=pe;break;case"type":A=pe;break;case"checked":H=pe;break;case"defaultChecked":ie=pe;break;case"value":y=pe;break;case"defaultValue":N=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(i(137,a));break;default:St(n,a,u,pe,o,null)}}Jf(n,y,N,H,ie,A,p,!1);return;case"select":Qe("invalid",n),u=A=y=null;for(p in o)if(o.hasOwnProperty(p)&&(N=o[p],N!=null))switch(p){case"value":y=N;break;case"defaultValue":A=N;break;case"multiple":u=N;default:St(n,a,p,N,o,null)}a=y,o=A,n.multiple=!!u,a!=null?Fa(n,!!u,a,!1):o!=null&&Fa(n,!!u,o,!0);return;case"textarea":Qe("invalid",n),y=p=u=null;for(A in o)if(o.hasOwnProperty(A)&&(N=o[A],N!=null))switch(A){case"value":u=N;break;case"defaultValue":p=N;break;case"children":y=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(i(91));break;default:St(n,a,A,N,o,null)}td(n,u,p,y);return;case"option":for(H in o)o.hasOwnProperty(H)&&(u=o[H],u!=null)&&(H==="selected"?n.selected=u&&typeof u!="function"&&typeof u!="symbol":St(n,a,H,u,o,null));return;case"dialog":Qe("beforetoggle",n),Qe("toggle",n),Qe("cancel",n),Qe("close",n);break;case"iframe":case"object":Qe("load",n);break;case"video":case"audio":for(u=0;u<rl.length;u++)Qe(rl[u],n);break;case"image":Qe("error",n),Qe("load",n);break;case"details":Qe("toggle",n);break;case"embed":case"source":case"link":Qe("error",n),Qe("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ie in o)if(o.hasOwnProperty(ie)&&(u=o[ie],u!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:St(n,a,ie,u,o,null)}return;default:if(fu(a)){for(pe in o)o.hasOwnProperty(pe)&&(u=o[pe],u!==void 0&&Lh(n,a,pe,u,o,void 0));return}}for(N in o)o.hasOwnProperty(N)&&(u=o[N],u!=null&&St(n,a,N,u,o,null))}function __(n,a,o,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,y=null,A=null,N=null,H=null,ie=null,pe=null;for(ce in o){var ve=o[ce];if(o.hasOwnProperty(ce)&&ve!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":H=ve;default:u.hasOwnProperty(ce)||St(n,a,ce,null,u,ve)}}for(var le in u){var ce=u[le];if(ve=o[le],u.hasOwnProperty(le)&&(ce!=null||ve!=null))switch(le){case"type":y=ce;break;case"name":p=ce;break;case"checked":ie=ce;break;case"defaultChecked":pe=ce;break;case"value":A=ce;break;case"defaultValue":N=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(i(137,a));break;default:ce!==ve&&St(n,a,le,ce,u,ve)}}cu(n,A,N,H,ie,pe,y,p);return;case"select":ce=A=N=le=null;for(y in o)if(H=o[y],o.hasOwnProperty(y)&&H!=null)switch(y){case"value":break;case"multiple":ce=H;default:u.hasOwnProperty(y)||St(n,a,y,null,u,H)}for(p in u)if(y=u[p],H=o[p],u.hasOwnProperty(p)&&(y!=null||H!=null))switch(p){case"value":le=y;break;case"defaultValue":N=y;break;case"multiple":A=y;default:y!==H&&St(n,a,p,y,u,H)}a=N,o=A,u=ce,le!=null?Fa(n,!!o,le,!1):!!u!=!!o&&(a!=null?Fa(n,!!o,a,!0):Fa(n,!!o,o?[]:"",!1));return;case"textarea":ce=le=null;for(N in o)if(p=o[N],o.hasOwnProperty(N)&&p!=null&&!u.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:St(n,a,N,null,u,p)}for(A in u)if(p=u[A],y=o[A],u.hasOwnProperty(A)&&(p!=null||y!=null))switch(A){case"value":le=p;break;case"defaultValue":ce=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(i(91));break;default:p!==y&&St(n,a,A,p,u,y)}ed(n,le,ce);return;case"option":for(var Me in o)le=o[Me],o.hasOwnProperty(Me)&&le!=null&&!u.hasOwnProperty(Me)&&(Me==="selected"?n.selected=!1:St(n,a,Me,null,u,le));for(H in u)le=u[H],ce=o[H],u.hasOwnProperty(H)&&le!==ce&&(le!=null||ce!=null)&&(H==="selected"?n.selected=le&&typeof le!="function"&&typeof le!="symbol":St(n,a,H,le,u,ce));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 Pe in o)le=o[Pe],o.hasOwnProperty(Pe)&&le!=null&&!u.hasOwnProperty(Pe)&&St(n,a,Pe,null,u,le);for(ie in u)if(le=u[ie],ce=o[ie],u.hasOwnProperty(ie)&&le!==ce&&(le!=null||ce!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(i(137,a));break;default:St(n,a,ie,le,u,ce)}return;default:if(fu(a)){for(var wt in o)le=o[wt],o.hasOwnProperty(wt)&&le!==void 0&&!u.hasOwnProperty(wt)&&Lh(n,a,wt,void 0,u,le);for(pe in u)le=u[pe],ce=o[pe],!u.hasOwnProperty(pe)||le===ce||le===void 0&&ce===void 0||Lh(n,a,pe,le,u,ce);return}}for(var te in o)le=o[te],o.hasOwnProperty(te)&&le!=null&&!u.hasOwnProperty(te)&&St(n,a,te,null,u,le);for(ve in u)le=u[ve],ce=o[ve],!u.hasOwnProperty(ve)||le===ce||le==null&&ce==null||St(n,a,ve,le,u,ce)}function $v(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function T_(){if(typeof performance.getEntriesByType=="function"){for(var n=0,a=0,o=performance.getEntriesByType("resource"),u=0;u<o.length;u++){var p=o[u],y=p.transferSize,A=p.initiatorType,N=p.duration;if(y&&N&&$v(A)){for(A=0,N=p.responseEnd,u+=1;u<o.length;u++){var H=o[u],ie=H.startTime;if(ie>N)break;var pe=H.transferSize,ve=H.initiatorType;pe&&$v(ve)&&(H=H.responseEnd,A+=pe*(H<N?1:(N-ie)/(H-ie)))}if(--u,a+=8*(y+A)/(p.duration/1e3),n++,10<n)break}}if(0<n)return a/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Uh=null,qh=null;function sc(n){return n.nodeType===9?n:n.ownerDocument}function Pv(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Iv(n,a){if(n===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&a==="foreignObject"?0:n}function Vh(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Fh=null;function C_(){var n=window.event;return n&&n.type==="popstate"?n===Fh?!1:(Fh=n,!0):(Fh=null,!1)}var Lv=typeof setTimeout=="function"?setTimeout:void 0,O_=typeof clearTimeout=="function"?clearTimeout:void 0,Uv=typeof Promise=="function"?Promise:void 0,R_=typeof queueMicrotask=="function"?queueMicrotask:typeof Uv<"u"?function(n){return Uv.resolve(null).then(n).catch(A_)}:Lv;function A_(n){setTimeout(function(){throw n})}function si(n){return n==="head"}function qv(n,a){var o=a,u=0;do{var p=o.nextSibling;if(n.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"||o==="/&"){if(u===0){n.removeChild(p),Zo(a);return}u--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")u++;else if(o==="html")il(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,il(o);for(var y=o.firstChild;y;){var A=y.nextSibling,N=y.nodeName;y[yo]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&y.rel.toLowerCase()==="stylesheet"||o.removeChild(y),y=A}}else o==="body"&&il(n.ownerDocument.body);o=p}while(o);Zo(a)}function Vv(n,a){var o=n;n=0;do{var u=o.nextSibling;if(o.nodeType===1?a?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(a?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),u&&u.nodeType===8)if(o=u.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=u}while(o)}function Bh(n){var a=n.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Bh(o),lu(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function M_(n,a,o,u){for(;n.nodeType===1;){var p=o;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[yo])switch(a){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(y=n.getAttribute("rel"),y==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(y!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(y=n.getAttribute("src"),(y!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&y&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(a==="input"&&n.type==="hidden"){var y=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===y)return n}else return n;if(n=Sr(n.nextSibling),n===null)break}return null}function j_(n,a,o){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=Sr(n.nextSibling),n===null))return null;return n}function Fv(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=Sr(n.nextSibling),n===null))return null;return n}function Hh(n){return n.data==="$?"||n.data==="$~"}function Gh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function k_(n,a){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=a;else if(n.data!=="$?"||o.readyState!=="loading")a();else{var u=function(){a(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function Sr(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return n}var Kh=null;function Bv(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(a===0)return Sr(n.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}n=n.nextSibling}return null}function Hv(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(a===0)return n;a--}else o!=="/$"&&o!=="/&"||a++}n=n.previousSibling}return null}function Gv(n,a,o){switch(a=sc(o),n){case"html":if(n=a.documentElement,!n)throw Error(i(452));return n;case"head":if(n=a.head,!n)throw Error(i(453));return n;case"body":if(n=a.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function il(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);lu(n)}var wr=new Map,Kv=new Set;function lc(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Ra=ee.d;ee.d={f:D_,r:N_,D:z_,C:$_,L:P_,m:I_,X:U_,S:L_,M:q_};function D_(){var n=Ra.f(),a=Ju();return n||a}function N_(n){var a=$i(n);a!==null&&a.tag===5&&a.type==="form"?c0(a):Ra.r(n)}var Go=typeof document>"u"?null:document;function Yv(n,a,o){var u=Go;if(u&&typeof a=="string"&&a){var p=Qn(a);p='link[rel="'+n+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),Kv.has(p)||(Kv.add(p),n={rel:n,crossOrigin:o,href:a},u.querySelector(p)===null&&(a=u.createElement("link"),wn(a,"link",n),Jt(a),u.head.appendChild(a)))}}function z_(n){Ra.D(n),Yv("dns-prefetch",n,null)}function $_(n,a){Ra.C(n,a),Yv("preconnect",n,a)}function P_(n,a,o){Ra.L(n,a,o);var u=Go;if(u&&n&&a){var p='link[rel="preload"][as="'+Qn(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+Qn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+Qn(o.imageSizes)+'"]')):p+='[href="'+Qn(n)+'"]';var y=p;switch(a){case"style":y=Ko(n);break;case"script":y=Yo(n)}wr.has(y)||(n=g({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:n,as:a},o),wr.set(y,n),u.querySelector(p)!==null||a==="style"&&u.querySelector(ol(y))||a==="script"&&u.querySelector(sl(y))||(a=u.createElement("link"),wn(a,"link",n),Jt(a),u.head.appendChild(a)))}}function I_(n,a){Ra.m(n,a);var o=Go;if(o&&n){var u=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+Qn(u)+'"][href="'+Qn(n)+'"]',y=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Yo(n)}if(!wr.has(y)&&(n=g({rel:"modulepreload",href:n},a),wr.set(y,n),o.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(sl(y)))return}u=o.createElement("link"),wn(u,"link",n),Jt(u),o.head.appendChild(u)}}}function L_(n,a,o){Ra.S(n,a,o);var u=Go;if(u&&n){var p=Pi(u).hoistableStyles,y=Ko(n);a=a||"default";var A=p.get(y);if(!A){var N={loading:0,preload:null};if(A=u.querySelector(ol(y)))N.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":a},o),(o=wr.get(y))&&Yh(n,o);var H=A=u.createElement("link");Jt(H),wn(H,"link",n),H._p=new Promise(function(ie,pe){H.onload=ie,H.onerror=pe}),H.addEventListener("load",function(){N.loading|=1}),H.addEventListener("error",function(){N.loading|=2}),N.loading|=4,uc(A,a,u)}A={type:"stylesheet",instance:A,count:1,state:N},p.set(y,A)}}}function U_(n,a){Ra.X(n,a);var o=Go;if(o&&n){var u=Pi(o).hoistableScripts,p=Yo(n),y=u.get(p);y||(y=o.querySelector(sl(p)),y||(n=g({src:n,async:!0},a),(a=wr.get(p))&&Zh(n,a),y=o.createElement("script"),Jt(y),wn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function q_(n,a){Ra.M(n,a);var o=Go;if(o&&n){var u=Pi(o).hoistableScripts,p=Yo(n),y=u.get(p);y||(y=o.querySelector(sl(p)),y||(n=g({src:n,async:!0,type:"module"},a),(a=wr.get(p))&&Zh(n,a),y=o.createElement("script"),Jt(y),wn(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function Zv(n,a,o,u){var p=(p=J.current)?lc(p):null;if(!p)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=Ko(o.href),o=Pi(p).hoistableStyles,u=o.get(a),u||(u={type:"style",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=Ko(o.href);var y=Pi(p).hoistableStyles,A=y.get(n);if(A||(p=p.ownerDocument||p,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(n,A),(y=p.querySelector(ol(n)))&&!y._p&&(A.instance=y,A.state.loading=5),wr.has(n)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},wr.set(n,o),y||V_(p,n,o,A.state))),a&&u===null)throw Error(i(528,""));return A}if(a&&u!==null)throw Error(i(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Yo(o),o=Pi(p).hoistableScripts,u=o.get(a),u||(u={type:"script",instance:null,count:0,state:null},o.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function Ko(n){return'href="'+Qn(n)+'"'}function ol(n){return'link[rel="stylesheet"]['+n+"]"}function Xv(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function V_(n,a,o,u){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=n.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),wn(a,"link",o),Jt(a),n.head.appendChild(a))}function Yo(n){return'[src="'+Qn(n)+'"]'}function sl(n){return"script[async]"+n}function Qv(n,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var u=n.querySelector('style[data-href~="'+Qn(o.href)+'"]');if(u)return a.instance=u,Jt(u),u;var p=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),Jt(u),wn(u,"style",p),uc(u,o.precedence,n),a.instance=u;case"stylesheet":p=Ko(o.href);var y=n.querySelector(ol(p));if(y)return a.state.loading|=4,a.instance=y,Jt(y),y;u=Xv(o),(p=wr.get(p))&&Yh(u,p),y=(n.ownerDocument||n).createElement("link"),Jt(y);var A=y;return A._p=new Promise(function(N,H){A.onload=N,A.onerror=H}),wn(y,"link",u),a.state.loading|=4,uc(y,o.precedence,n),a.instance=y;case"script":return y=Yo(o.src),(p=n.querySelector(sl(y)))?(a.instance=p,Jt(p),p):(u=o,(p=wr.get(y))&&(u=g({},o),Zh(u,p)),n=n.ownerDocument||n,p=n.createElement("script"),Jt(p),wn(p,"link",u),n.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,uc(u,o.precedence,n));return a.instance}function uc(n,a,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,y=p,A=0;A<u.length;A++){var N=u[A];if(N.dataset.precedence===a)y=N;else if(y!==p)break}y?y.parentNode.insertBefore(n,y.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(n,a.firstChild))}function Yh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function Zh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var cc=null;function Wv(n,a,o){if(cc===null){var u=new Map,p=cc=new Map;p.set(o,u)}else p=cc,u=p.get(o),u||(u=new Map,p.set(o,u));if(u.has(n))return u;for(u.set(n,null),o=o.getElementsByTagName(n),p=0;p<o.length;p++){var y=o[p];if(!(y[yo]||y[cn]||n==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var A=y.getAttribute(a)||"";A=n+A;var N=u.get(A);N?N.push(y):u.set(A,[y])}}return u}function Jv(n,a,o){n=n.ownerDocument||n,n.head.insertBefore(o,a==="title"?n.querySelector("head > title"):null)}function F_(n,a,o){if(o===1||a.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(n=a.disabled,typeof a.precedence=="string"&&n==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function eb(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function B_(n,a,o,u){if(o.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=Ko(u.href),y=a.querySelector(ol(p));if(y){a=y._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=fc.bind(n),a.then(n,n)),o.state.loading|=4,o.instance=y,Jt(y);return}y=a.ownerDocument||a,u=Xv(u),(p=wr.get(p))&&Yh(u,p),y=y.createElement("link"),Jt(y);var A=y;A._p=new Promise(function(N,H){A.onload=N,A.onerror=H}),wn(y,"link",u),o.instance=y}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(n.count++,o=fc.bind(n),a.addEventListener("load",o),a.addEventListener("error",o))}}var Xh=0;function H_(n,a){return n.stylesheets&&n.count===0&&hc(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var u=setTimeout(function(){if(n.stylesheets&&hc(n,n.stylesheets),n.unsuspend){var y=n.unsuspend;n.unsuspend=null,y()}},6e4+a);0<n.imgBytes&&Xh===0&&(Xh=62500*T_());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&hc(n,n.stylesheets),n.unsuspend)){var y=n.unsuspend;n.unsuspend=null,y()}},(n.imgBytes>Xh?50:800)+a);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function fc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var dc=null;function hc(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,dc=new Map,a.forEach(G_,n),dc=null,fc.call(n))}function G_(n,a){if(!(a.state.loading&4)){var o=dc.get(n);if(o)var u=o.get(null);else{o=new Map,dc.set(n,o);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<p.length;y++){var A=p[y];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(o.set(A.dataset.precedence,A),u=A)}u&&o.set(null,u)}p=a.instance,A=p.getAttribute("data-precedence"),y=o.get(A)||u,y===u&&o.set(null,p),o.set(A,p),this.count++,u=fc.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),y?y.parentNode.insertBefore(p,y.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),a.state.loading|=4}}var ll={$$typeof:R,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function K_(n,a,o,u,p,y,A,N,H){this.tag=1,this.containerInfo=n,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=qa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qa(0),this.hiddenUpdates=qa(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=y,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function tb(n,a,o,u,p,y,A,N,H,ie,pe,ve){return n=new K_(n,a,o,A,H,ie,pe,ve,N),a=1,y===!0&&(a|=24),y=Dn(3,null,null,a),n.current=y,y.stateNode=n,a=Ad(),a.refCount++,n.pooledCache=a,a.refCount++,y.memoizedState={element:u,isDehydrated:o,cache:a},Dd(y),n}function nb(n){return n?(n=Wn,n):Wn}function rb(n,a,o,u,p,y){p=nb(p),u.context===null?u.context=p:u.pendingContext=p,u=Xa(a),u.payload={element:o},y=y===void 0?null:y,y!==null&&(u.callback=y),o=Qa(n,u,a),o!==null&&(Kn(o,n,a),Us(o,n,a))}function ab(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<a?o:a}}function Qh(n,a){ab(n,a),(n=n.alternate)&&ab(n,a)}function ib(n){if(n.tag===13||n.tag===31){var a=Dr(n,67108864);a!==null&&Kn(a,n,67108864),Qh(n,67108864)}}function ob(n){if(n.tag===13||n.tag===31){var a=or();a=jn(a);var o=Dr(n,a);o!==null&&Kn(o,n,a),Qh(n,a)}}var pc=!0;function Y_(n,a,o,u){var p=K.T;K.T=null;var y=ee.p;try{ee.p=2,Wh(n,a,o,u)}finally{ee.p=y,K.T=p}}function Z_(n,a,o,u){var p=K.T;K.T=null;var y=ee.p;try{ee.p=8,Wh(n,a,o,u)}finally{ee.p=y,K.T=p}}function Wh(n,a,o,u){if(pc){var p=Jh(u);if(p===null)Ih(n,a,u,mc,o),lb(n,u);else if(Q_(p,n,a,o,u))u.stopPropagation();else if(lb(n,u),a&4&&-1<X_.indexOf(n)){for(;p!==null;){var y=$i(p);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var A=Vn(y.pendingLanes);if(A!==0){var N=y;for(N.pendingLanes|=2,N.entangledLanes|=2;A;){var H=1<<31-Pt(A);N.entanglements[1]|=H,A&=~H}ta(y),(dt&6)===0&&(Qu=qe()+500,nl(0))}}break;case 31:case 13:N=Dr(y,2),N!==null&&Kn(N,y,2),Ju(),Qh(y,2)}if(y=Jh(u),y===null&&Ih(n,a,u,mc,o),y===p)break;p=y}p!==null&&u.stopPropagation()}else Ih(n,a,u,null,o)}}function Jh(n){return n=hu(n),ep(n)}var mc=null;function ep(n){if(mc=null,n=zi(n),n!==null){var a=l(n);if(a===null)n=null;else{var o=a.tag;if(o===13){if(n=c(a),n!==null)return n;n=null}else if(o===31){if(n=f(a),n!==null)return n;n=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}return mc=n,null}function sb(n){switch(n){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(xn()){case yn:return 2;case zn:return 8;case Dt:case Vt:return 32;case hn:return 268435456;default:return 32}default:return 32}}var tp=!1,li=null,ui=null,ci=null,ul=new Map,cl=new Map,fi=[],X_="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 lb(n,a){switch(n){case"focusin":case"focusout":li=null;break;case"dragenter":case"dragleave":ui=null;break;case"mouseover":case"mouseout":ci=null;break;case"pointerover":case"pointerout":ul.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":cl.delete(a.pointerId)}}function fl(n,a,o,u,p,y){return n===null||n.nativeEvent!==y?(n={blockedOn:a,domEventName:o,eventSystemFlags:u,nativeEvent:y,targetContainers:[p]},a!==null&&(a=$i(a),a!==null&&ib(a)),n):(n.eventSystemFlags|=u,a=n.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),n)}function Q_(n,a,o,u,p){switch(a){case"focusin":return li=fl(li,n,a,o,u,p),!0;case"dragenter":return ui=fl(ui,n,a,o,u,p),!0;case"mouseover":return ci=fl(ci,n,a,o,u,p),!0;case"pointerover":var y=p.pointerId;return ul.set(y,fl(ul.get(y)||null,n,a,o,u,p)),!0;case"gotpointercapture":return y=p.pointerId,cl.set(y,fl(cl.get(y)||null,n,a,o,u,p)),!0}return!1}function ub(n){var a=zi(n.target);if(a!==null){var o=l(a);if(o!==null){if(a=o.tag,a===13){if(a=c(o),a!==null){n.blockedOn=a,Tl(n.priority,function(){ob(o)});return}}else if(a===31){if(a=f(o),a!==null){n.blockedOn=a,Tl(n.priority,function(){ob(o)});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}function gc(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var o=Jh(n.nativeEvent);if(o===null){o=n.nativeEvent;var u=new o.constructor(o.type,o);du=u,o.target.dispatchEvent(u),du=null}else return a=$i(o),a!==null&&ib(a),n.blockedOn=o,!1;a.shift()}return!0}function cb(n,a,o){gc(n)&&o.delete(a)}function W_(){tp=!1,li!==null&&gc(li)&&(li=null),ui!==null&&gc(ui)&&(ui=null),ci!==null&&gc(ci)&&(ci=null),ul.forEach(cb),cl.forEach(cb)}function yc(n,a){n.blockedOn===a&&(n.blockedOn=null,tp||(tp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,W_)))}var vc=null;function fb(n){vc!==n&&(vc=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){vc===n&&(vc=null);for(var a=0;a<n.length;a+=3){var o=n[a],u=n[a+1],p=n[a+2];if(typeof u!="function"){if(ep(u||o)===null)continue;break}var y=$i(o);y!==null&&(n.splice(a,3),a-=3,Jd(y,{pending:!0,data:p,method:o.method,action:u},u,p))}}))}function Zo(n){function a(H){return yc(H,n)}li!==null&&yc(li,n),ui!==null&&yc(ui,n),ci!==null&&yc(ci,n),ul.forEach(a),cl.forEach(a);for(var o=0;o<fi.length;o++){var u=fi[o];u.blockedOn===n&&(u.blockedOn=null)}for(;0<fi.length&&(o=fi[0],o.blockedOn===null);)ub(o),o.blockedOn===null&&fi.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var p=o[u],y=o[u+1],A=p[_n]||null;if(typeof y=="function")A||fb(o);else if(A){var N=null;if(y&&y.hasAttribute("formAction")){if(p=y,A=y[_n]||null)N=A.formAction;else if(ep(p)!==null)continue}else N=A.action;typeof N=="function"?o[u+1]=N:(o.splice(u,3),u-=3),fb(o)}}}function db(){function n(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(A){return p=A})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),u||setTimeout(o,20)}function o(){if(!u&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function np(n){this._internalRoot=n}bc.prototype.render=np.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(i(409));var o=a.current,u=or();rb(o,u,n,a,null,null)},bc.prototype.unmount=np.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;rb(n.current,2,null,n,null,null),Ju(),a[Ni]=null}};function bc(n){this._internalRoot=n}bc.prototype.unstable_scheduleHydration=function(n){if(n){var a=Cs();n={blockedOn:null,target:n,priority:a};for(var o=0;o<fi.length&&a!==0&&a<fi[o].priority;o++);fi.splice(o,0,n),o===0&&ub(n)}};var hb=t.version;if(hb!=="19.2.3")throw Error(i(527,hb,"19.2.3"));ee.findDOMNode=function(n){var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=h(a),n=n!==null?m(n):null,n=n===null?null:n.stateNode,n};var J_={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:K,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Sc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sc.isDisabled&&Sc.supportsFiber)try{kr=Sc.inject(J_),Ht=Sc}catch{}}return Ob.createRoot=function(n,a){if(!s(n))throw Error(i(299));var o=!1,u="",p=S0,y=w0,A=E0;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(A=a.onRecoverableError)),a=tb(n,1,!1,null,null,o,u,null,p,y,A,db),n[Ni]=a.current,Ph(n),new np(a)},Ob.hydrateRoot=function(n,a,o){if(!s(n))throw Error(i(299));var u=!1,p="",y=S0,A=w0,N=E0,H=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(A=o.onCaughtError),o.onRecoverableError!==void 0&&(N=o.onRecoverableError),o.formState!==void 0&&(H=o.formState)),a=tb(n,1,!0,a,o??null,u,p,H,y,A,N,db),a.context=nb(null),o=a.current,u=or(),u=jn(u),p=Xa(u),p.callback=null,Qa(o,p,u),o=u,a.current.lanes=o,aa(a,o),ta(a),n[Ni]=a.current,Ph(n),new bc(a)},Ob.version="19.2.3",Ob}var gz;function t2e(){if(gz)return tC.exports;gz=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),tC.exports=e2e(),tC.exports}t2e();function n2e(e,t,r,i,s){return{callTool:async(c,f)=>{t("callTool",{name:c,args:f});const d=await i(c,f??{});return t("← callTool response",d,"response"),d},sendFollowUpMessage:async c=>{t("sendFollowUpMessage",c)},openExternal:c=>{t("openExternal",c)},requestDisplayMode:async c=>(t("requestDisplayMode",c),e.displayMode=c.mode,r("displayMode",c.mode),{mode:c.mode}),setWidgetState:async c=>{t("setWidgetState",c),e.widgetState=c,r("widgetState",c)},requestModal:async c=>{t("requestModal",c),e.displayMode="modal",e.view={mode:"modal"},r("displayMode","modal")},uploadFile:async c=>(t("uploadFile",{name:c.name,size:c.size}),{fileId:"123"}),getFileDownloadUrl:async c=>(t("getFileDownloadUrl",c),{downloadUrl:"https://example.com/file.pdf"}),setOpenInAppUrl:async c=>{t("setOpenInAppUrl",c),s(c.href)}}}function r2e(e,t){const r=["theme","userAgent","locale","maxHeight","displayMode","safeArea","toolInput","toolOutput","toolResponseMetadata","view","widgetState"];return new Proxy(e||{},{set(i,s,l,c){const f=Reflect.set(i,s,l,c);if(r.includes(s)){const d=new b_e(cq,{detail:{globals:{[s]:l}}});t.dispatchEvent(d)}return f}})}function a2e(e,t,r,i,s,l){const c=B1(t),f=r2e(c,e),d=n2e(f,r,i,s,l);ZW(f,d),e.openai=f}function i2e(e){const t=new DOMParser().parseFromString(e,"text/html"),r=t.querySelector('script[type="module"]#dev-widget-entry');if(!r)throw new Error("dev-widget-entry script not found");const i=`
|
|
160
|
+
const waitForOpenAI = () => new Promise((resolve, reject) => {
|
|
161
|
+
if (typeof window === "undefined") { reject(new Error("window is not available")); return; }
|
|
162
|
+
if ("openai" in window && window.openai != null) { resolve(); return; }
|
|
163
|
+
Object.defineProperty(window, "openai", {
|
|
164
|
+
configurable: true,
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get() { return undefined; },
|
|
167
|
+
set(value) {
|
|
168
|
+
Object.defineProperty(window, "openai", {
|
|
169
|
+
configurable: true,
|
|
170
|
+
enumerable: true,
|
|
171
|
+
writable: true,
|
|
172
|
+
value,
|
|
173
|
+
});
|
|
174
|
+
resolve();
|
|
175
|
+
},
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
`;return r.textContent=`
|
|
179
|
+
${i}
|
|
180
|
+
await waitForOpenAI();
|
|
181
|
+
${r.textContent}
|
|
182
|
+
`,t.head.innerHTML+t.body.innerHTML}const o2e=()=>{const e=Lf(),t=jg(e.name),{openaiObject:r}=t??{},{data:i}=O$(e._meta?.["openai/outputTemplate"]),{setToolData:s,pushOpenAiLog:l,updateOpenaiObject:c,setOpenInAppUrl:f}=Mg(),d=j.useRef(null),h=j.useRef(null),m=j.useRef(!1),g=i.contents[0].text,v=j.useCallback(()=>{if(m.current)return;const _=d.current;if(!_||!_.contentWindow||!_.contentDocument)return;m.current=!0;const b=i.contents[0]._meta?.["openai/widgetDomain"];b&&typeof b=="string"&&f(e.name,b),a2e(_.contentWindow,r,(S,w,x="default")=>{l(e.name,{timestamp:Date.now(),command:S,args:w,type:x})},(S,w)=>{c(e.name,S,w)},(S,w)=>Ac.callTool(S,w),S=>{f(e.name,S)}),_.contentDocument.open(),_.contentDocument.write(i2e(g)),_.contentDocument.close(),s(e.name,{openaiRef:d})},[r,l,s,c,f,e.name,g,i]);return j.useEffect(()=>{v()},[v]),k.jsx("div",{ref:h,className:"relative overflow-auto",style:{width:"100%",height:"100%"},children:k.jsx("iframe",{ref:d,src:"about:blank",onLoad:v,style:{width:"100%",height:"100%",border:"none",display:"block"},sandbox:"allow-scripts allow-same-origin allow-forms",title:"html-preview"})})},s2e=()=>{const e=Lf(),t=jg(e.name),{defaultLayout:r,onLayoutChange:i}=Rb({id:"skybridge-devtools-input-column",storage:localStorage}),{defaultLayout:s,onLayoutChange:l}=Rb({id:"skybridge-devtools-widget-section",storage:localStorage}),{defaultLayout:c,onLayoutChange:f}=Rb({id:"skybridge-devtools-inspector-section",storage:localStorage}),{defaultLayout:d,onLayoutChange:h}=Rb({id:"skybridge-devtools-main-section",storage:localStorage}),m=!!(e._meta?.["openai/outputTemplate"]&&t?.response&&!t.response.isError);return k.jsx("div",{className:"flex-1 flex flex-col overflow-hidden relative z-10",children:k.jsxs(km,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:d,onLayoutChange:h,children:[k.jsx(gl,{id:"top-section",minSize:"30",children:k.jsxs(km,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:r,onLayoutChange:i,children:[k.jsx(gl,{id:"input-column",minSize:"20",maxSize:"60",children:k.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:k.jsx(UEe,{})})}),k.jsx(Dm,{className:"w-px bg-border"}),k.jsx(gl,{id:"output-column",minSize:"30",children:k.jsx("div",{className:"flex flex-col overflow-hidden h-full",children:k.jsx(v_e,{})})})]})}),m&&k.jsxs(k.Fragment,{children:[k.jsx(Dm,{className:"h-px bg-border"}),k.jsx(gl,{id:"widget-section",minSize:"20",children:k.jsxs(km,{orientation:"horizontal",className:"flex-1 overflow-hidden bg-card",defaultLayout:c,onLayoutChange:f,children:[k.jsx(gl,{id:"widget-logs-panel",minSize:"30",children:k.jsx("div",{className:"flex flex-col h-full overflow-hidden",children:k.jsxs(km,{orientation:"vertical",className:"flex-1 overflow-hidden",defaultLayout:s,onLayoutChange:l,children:[k.jsx(gl,{id:"widget-panel",minSize:"20",maxSize:"80",children:k.jsx("div",{className:"h-full overflow-hidden",children:k.jsx(j.Suspense,{children:k.jsx(o2e,{})})})}),k.jsx(Dm,{className:"h-px bg-border"}),k.jsx(gl,{id:"logs-panel",minSize:"20",children:k.jsx("div",{className:"p-4 flex flex-col h-full min-h-0",children:k.jsx(h_e,{})})})]})})}),k.jsx(Dm,{className:"w-px bg-border"}),k.jsx(gl,{id:"inspector-panel",minSize:"20",maxSize:"50",defaultSize:30,children:k.jsx("div",{className:"flex flex-col overflow-hidden h-full min-h-0",children:k.jsx("div",{className:"overflow-auto",children:k.jsx(c_e,{})})})})]})})]})]})})};function l2e(){const e=C$(),[,t]=sA(),r=hA();return k.jsx("div",{className:"h-full border-r border-border bg-card flex flex-col",children:k.jsxs("aside",{className:"h-full flex flex-col",children:[k.jsxs("div",{className:"p-4 border-b border-border h-[72px] flex flex-col justify-center",children:[k.jsx("h2",{className:"text-sm font-semibold text-foreground mb-1",children:"Tools"}),k.jsxs("p",{className:"text-xs text-muted-foreground",children:[e?.length," ",e?.length===1?"tool":"tools"]})]}),k.jsx("div",{className:"flex-1 overflow-y-auto",children:k.jsx("div",{className:"p-2",children:e?.length===0?k.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No tools registered yet."}):k.jsx("div",{className:"space-y-1",children:e?.map(i=>{const s=i.name===r?.name;return k.jsxs("button",{type:"button",onClick:()=>t(i.name),className:qt("w-full text-left px-3 py-3 rounded-md transition-colors cursor-pointer relative","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1",s&&"bg-accent text-accent-foreground"),children:[k.jsxs("div",{className:"pr-6 flex flex-col gap-1",children:[k.jsx("div",{className:qt("font-semibold text-sm leading-tight truncate",s&&"text-accent-foreground"),children:i.name}),i.description&&k.jsx("div",{className:qt("text-xs leading-snug text-muted-foreground","line-clamp-2",s&&"text-accent-foreground/80"),children:i.description})]}),s&&k.jsx("div",{className:"absolute top-3 right-3 w-1.5 h-1.5 rounded-full bg-primary"})]},i.name)})})})})]})})}function u2e(){const e=hA(),{status:t,requiresAuth:r}=Rc(),{defaultLayout:i,onLayoutChange:s}=Rb({id:"skybridge-devtools-tools-list",storage:localStorage}),l=t==="authenticated";return k.jsxs("div",{className:"flex h-screen w-full flex-col overflow-hidden bg-background",children:[k.jsx(ioe,{}),l?k.jsxs(km,{orientation:"horizontal",className:"flex-1 overflow-hidden",defaultLayout:i,onLayoutChange:s,children:[k.jsx(gl,{id:"tools-list",minSize:"15",maxSize:"40",children:k.jsx(l2e,{})}),k.jsx(Dm,{className:"w-px bg-border"}),k.jsx(gl,{id:"main-content",minSize:"30",children:k.jsx("div",{className:"flex flex-1 flex-col overflow-hidden relative h-full",children:e?k.jsx(s2e,{}):k.jsx(Wce,{})})})]}):k.jsx("div",{className:"flex-1 flex items-center justify-center",children:k.jsxs("div",{className:"text-center space-y-4",children:[k.jsx("p",{className:"text-sm text-muted-foreground",children:t==="connecting"?"Connecting to server...":r?"Authentication required to access this server.":"Not connected to a server."}),t!=="connecting"&&k.jsxs(bl,{variant:"outline",size:"sm",onClick:ox,children:[k.jsx(Pz,{className:"h-3.5 w-3.5"}),"Connect"]})]})})]})}function c2e(){return k.jsx(oV,{client:lA,children:k.jsx(FV,{children:k.jsx(u2e,{})})})}async function f2e(){const e=new URLSearchParams(window.location.search);if(e.get("oauth_callback")==="true"){const t=e.get("code"),r=new URL(window.location.href);if(r.searchParams.delete("oauth_callback"),r.searchParams.delete("code"),r.searchParams.delete("state"),window.history.replaceState({},"",r.toString()),t)try{await Tae(t)}catch(i){console.error("OAuth callback failed:",i),Rc.getState().setStatus("error"),Rc.getState().setError(i instanceof Error?i.message:"OAuth callback failed")}else Rc.getState().setStatus("error"),Rc.getState().setError("OAuth callback missing authorization code")}else ox().catch(t=>{console.error("Connection failed:",t)})}f2e();zq.createRoot(document.getElementById("root")).render(k.jsx(j.StrictMode,{children:k.jsx(c2e,{})}))});export default d2e();
|