@skybridge/devtools 0.0.0-dev.b42ed66 → 0.0.0-dev.b4419f2

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,287 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var f=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),p=s(((e,t)=>{t.exports=f()})),m=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),h=s(((e,t)=>{t.exports=m()})),g=s((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),_=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=s((e=>{var t=h(),n=p(),r=_();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},te=[],ne=-1;function R(e){return{current:e}}function z(e){0>ne||(e.current=te[ne],te[ne]=null,ne--)}function B(e,t){ne++,te[ne]=e.current,e.current=t}var re=R(null),ie=R(null),ae=R(null),oe=R(null);function se(e,t){switch(B(ae,t),B(ie,e),B(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zd(t),e=Qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(re),B(re,e)}function ce(){z(re),z(ie),z(ae)}function le(e){e.memoizedState!==null&&B(oe,e);var t=re.current,n=Qd(t,e.type);t!==n&&(B(ie,e),B(re,n))}function ue(e){ie.current===e&&(z(re),z(ie)),oe.current===e&&(z(oe),cp._currentValue=ee)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+de+e+fe}var me=!1;function V(e,t){if(!e||me)return``;me=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?pe(n):``}function he(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe(`Lazy`);case 13:return e.child!==t&&t!==null?pe(`Suspense Fallback`):pe(`Suspense`);case 19:return pe(`SuspenseList`);case 0:case 15:return V(e.type,!1);case 11:return V(e.type.render,!1);case 1:return V(e.type,!0);case 31:return pe(`Activity`);default:return``}}function ge(e){try{var t=``,n=null;do t+=he(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var _e=Object.prototype.hasOwnProperty,ve=t.unstable_scheduleCallback,ye=t.unstable_cancelCallback,be=t.unstable_shouldYield,xe=t.unstable_requestPaint,Se=t.unstable_now,Ce=t.unstable_getCurrentPriorityLevel,we=t.unstable_ImmediatePriority,Te=t.unstable_UserBlockingPriority,Ee=t.unstable_NormalPriority,De=t.unstable_LowPriority,Oe=t.unstable_IdlePriority,ke=t.log,Ae=t.unstable_setDisableYieldValue,je=null,Me=null;function Ne(e){if(typeof ke==`function`&&Ae(e),Me&&typeof Me.setStrictMode==`function`)try{Me.setStrictMode(je,e)}catch{}}var Pe=Math.clz32?Math.clz32:Le,Fe=Math.log,Ie=Math.LN2;function Le(e){return e>>>=0,e===0?32:31-(Fe(e)/Ie|0)|0}var Re=256,ze=262144,Be=4194304;function Ve(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function He(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ve(n))):i=Ve(o):i=Ve(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ve(n))):i=Ve(o)):i=Ve(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ue(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function H(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function We(){var e=Be;return Be<<=1,!(Be&62914560)&&(Be=4194304),e}function Ge(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ke(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Pe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Je(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Je(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Pe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ye(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Xe(e,t){var n=t&-t;return n=n&42?1:Ze(n),(n&(e.suspendedLanes|t))===0?n:0}function Ze(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Qe(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function $e(){var e=L.p;return e===0?(e=window.event,e===void 0?32:wp(e.type)):e}function et(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var tt=Math.random().toString(36).slice(2),nt=`__reactFiber$`+tt,rt=`__reactProps$`+tt,it=`__reactContainer$`+tt,at=`__reactEvents$`+tt,ot=`__reactListeners$`+tt,st=`__reactHandles$`+tt,ct=`__reactResources$`+tt,lt=`__reactMarker$`+tt;function ut(e){delete e[nt],delete e[rt],delete e[at],delete e[ot],delete e[st]}function dt(e){var t=e[nt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[it]||n[nt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xf(e);e!==null;){if(n=e[nt])return n;e=xf(e)}return t}e=n,n=e.parentNode}return null}function ft(e){if(e=e[nt]||e[it]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function mt(e){var t=e[ct];return t||=e[ct]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ht(e){e[lt]=!0}var gt=new Set,_t={};function vt(e,t){yt(e,t),yt(e+`Capture`,t)}function yt(e,t){for(_t[e]=t,e=0;e<t.length;e++)gt.add(t[e])}var bt=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]*$`),xt={},St={};function Ct(e){return _e.call(St,e)?!0:_e.call(xt,e)?!1:bt.test(e)?St[e]=!0:(xt[e]=!0,!1)}function wt(e,t,n){if(Ct(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Tt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Et(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Dt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ot(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function kt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function At(e){if(!e._valueTracker){var t=Ot(e)?`checked`:`value`;e._valueTracker=kt(e,t,``+e[t])}}function jt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ot(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Mt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Nt=/[\n"\\]/g;function Pt(e){return e.replace(Nt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ft(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Dt(t)):e.value!==``+Dt(t)&&(e.value=``+Dt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Lt(e,o,Dt(n)):Lt(e,o,Dt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Dt(s):e.removeAttribute(`name`)}function It(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){At(e);return}n=n==null?``:``+Dt(n),t=t==null?n:``+Dt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),At(e)}function Lt(e,t,n){t===`number`&&Mt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Rt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Dt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function zt(e,t,n){if(t!=null&&(t=``+Dt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Dt(n)}function Bt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(F(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Dt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),At(e)}function Vt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ht=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 Ut(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Ht.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Wt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Ut(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Ut(e,o,t[o])}function Gt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Kt=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`]]),qt=/^[\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 Jt(e){return qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Yt(){}var Xt=null;function Zt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qt=null,$t=null;function en(e){var t=ft(e);if(t&&(e=t.stateNode)){var n=e[rt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ft(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Pt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[rt]||null;if(!a)throw Error(i(90));Ft(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&jt(r)}break a;case`textarea`:zt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Rt(e,!!n.multiple,t,!1)}}}var tn=!1;function nn(e,t,n){if(tn)return e(t,n);tn=!0;try{return e(t)}finally{if(tn=!1,(Qt!==null||$t!==null)&&(Du(),Qt&&(t=Qt,e=$t,$t=Qt=null,en(t),e)))for(t=0;t<e.length;t++)en(e[t])}}function rn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[rt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var an=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),on=!1;if(an)try{var sn={};Object.defineProperty(sn,"passive",{get:function(){on=!0}}),window.addEventListener(`test`,sn,sn),window.removeEventListener(`test`,sn,sn)}catch{on=!1}var cn=null,ln=null,un=null;function dn(){if(un)return un;var e,t=ln,n=t.length,r,i=`value`in cn?cn.value:cn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return un=i.slice(e,1<r?1-r:void 0)}function fn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function pn(){return!0}function mn(){return!1}function hn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?pn:mn,this.isPropagationStopped=mn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=pn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=pn)},persist:function(){},isPersistent:pn}),t}var gn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_n=hn(gn),vn=f({},gn,{view:0,detail:0}),yn=hn(vn),bn,xn,Sn,Cn=f({},vn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Sn&&(Sn&&e.type===`mousemove`?(bn=e.screenX-Sn.screenX,xn=e.screenY-Sn.screenY):xn=bn=0,Sn=e),bn)},movementY:function(e){return`movementY`in e?e.movementY:xn}}),wn=hn(Cn),Tn=hn(f({},Cn,{dataTransfer:0})),En=hn(f({},vn,{relatedTarget:0})),Dn=hn(f({},gn,{animationName:0,elapsedTime:0,pseudoElement:0})),On=hn(f({},gn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),kn=hn(f({},gn,{data:0})),An={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},jn={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`},Mn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Nn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Mn[e])?!!t[e]:!1}function Pn(){return Nn}var Fn=hn(f({},vn,{key:function(e){if(e.key){var t=An[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=fn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?jn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pn,charCode:function(e){return e.type===`keypress`?fn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?fn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),In=hn(f({},Cn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ln=hn(f({},vn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pn})),Rn=hn(f({},gn,{propertyName:0,elapsedTime:0,pseudoElement:0})),zn=hn(f({},Cn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Bn=hn(f({},gn,{newState:0,oldState:0})),Vn=[9,13,27,32],Hn=an&&`CompositionEvent`in window,Un=null;an&&`documentMode`in document&&(Un=document.documentMode);var Wn=an&&`TextEvent`in window&&!Un,Gn=an&&(!Hn||Un&&8<Un&&11>=Un),Kn=` `,qn=!1;function Jn(e,t){switch(e){case`keyup`:return Vn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Yn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Xn=!1;function Zn(e,t){switch(e){case`compositionend`:return Yn(t);case`keypress`:return t.which===32?(qn=!0,Kn):null;case`textInput`:return e=t.data,e===Kn&&qn?null:e;default:return null}}function Qn(e,t){if(Xn)return e===`compositionend`||!Hn&&Jn(e,t)?(e=dn(),un=ln=cn=null,Xn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Gn&&t.locale!==`ko`?null:t.data;default:return null}}var $n={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 er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!$n[e.type]:t===`textarea`}function tr(e,t,n,r){Qt?$t?$t.push(r):$t=[r]:Qt=r,t=Fd(t,`onChange`),0<t.length&&(n=new _n(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var nr=null,rr=null;function ir(e){Dd(e,0)}function ar(e){if(jt(pt(e)))return e}function or(e,t){if(e===`change`)return t}var sr=!1;if(an){var cr;if(an){var lr=`oninput`in document;if(!lr){var ur=document.createElement(`div`);ur.setAttribute(`oninput`,`return;`),lr=typeof ur.oninput==`function`}cr=lr}else cr=!1;sr=cr&&(!document.documentMode||9<document.documentMode)}function dr(){nr&&(nr.detachEvent(`onpropertychange`,fr),rr=nr=null)}function fr(e){if(e.propertyName===`value`&&ar(rr)){var t=[];tr(t,rr,e,Zt(e)),nn(ir,t)}}function pr(e,t,n){e===`focusin`?(dr(),nr=t,rr=n,nr.attachEvent(`onpropertychange`,fr)):e===`focusout`&&dr()}function mr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ar(rr)}function hr(e,t){if(e===`click`)return ar(t)}function gr(e,t){if(e===`input`||e===`change`)return ar(t)}function _r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var vr=typeof Object.is==`function`?Object.is:_r;function yr(e,t){if(vr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!_e.call(t,i)||!vr(e[i],t[i]))return!1}return!0}function br(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xr(e,t){var n=br(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=br(n)}}function Sr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Mt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mt(e.document)}return t}function wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Tr=an&&`documentMode`in document&&11>=document.documentMode,Er=null,Dr=null,Or=null,kr=!1;function Ar(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kr||Er==null||Er!==Mt(r)||(r=Er,`selectionStart`in r&&wr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Or&&yr(Or,r)||(Or=r,r=Fd(Dr,`onSelect`),0<r.length&&(t=new _n(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Er)))}function jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Mr={animationend:jr(`Animation`,`AnimationEnd`),animationiteration:jr(`Animation`,`AnimationIteration`),animationstart:jr(`Animation`,`AnimationStart`),transitionrun:jr(`Transition`,`TransitionRun`),transitionstart:jr(`Transition`,`TransitionStart`),transitioncancel:jr(`Transition`,`TransitionCancel`),transitionend:jr(`Transition`,`TransitionEnd`)},Nr={},Pr={};an&&(Pr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Mr.animationend.animation,delete Mr.animationiteration.animation,delete Mr.animationstart.animation),`TransitionEvent`in window||delete Mr.transitionend.transition);function Fr(e){if(Nr[e])return Nr[e];if(!Mr[e])return e;var t=Mr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Pr)return Nr[e]=t[n];return e}var Ir=Fr(`animationend`),Lr=Fr(`animationiteration`),Rr=Fr(`animationstart`),zr=Fr(`transitionrun`),Br=Fr(`transitionstart`),Vr=Fr(`transitioncancel`),Hr=Fr(`transitionend`),Ur=new Map,Wr=`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(` `);Wr.push(`scrollEnd`);function Gr(e,t){Ur.set(e,t),vt(t,[e])}var Kr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},qr=[],Jr=0,Yr=0;function Xr(){for(var e=Jr,t=Yr=Jr=0;t<e;){var n=qr[t];qr[t++]=null;var r=qr[t];qr[t++]=null;var i=qr[t];qr[t++]=null;var a=qr[t];if(qr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ei(n,i,a)}}function Zr(e,t,n,r){qr[Jr++]=e,qr[Jr++]=t,qr[Jr++]=n,qr[Jr++]=r,Yr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Qr(e,t,n,r){return Zr(e,t,n,r),ti(e)}function $r(e,t){return Zr(e,null,null,t),ti(e)}function ei(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Pe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ti(e){if(50<vu)throw vu=0,yu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ni={};function ri(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ii(e,t,n,r){return new ri(e,t,n,r)}function ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,t){var n=e.alternate;return n===null?(n=ii(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function si(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ci(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ai(e)&&(s=1);else if(typeof e==`string`)s=$f(e,n,re.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ii(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return li(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ii(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ii(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ii(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ii(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function li(e,t,n,r){return e=ii(7,e,r,t),e.lanes=n,e}function ui(e,t,n){return e=ii(6,e,null,t),e.lanes=n,e}function di(e){var t=ii(18,null,null,0);return t.stateNode=e,t}function fi(e,t,n){return t=ii(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pi=new WeakMap;function mi(e,t){if(typeof e==`object`&&e){var n=pi.get(e);return n===void 0?(t={value:e,source:t,stack:ge(t)},pi.set(e,t),t):n}return{value:e,source:t,stack:ge(t)}}var hi=[],gi=0,_i=null,vi=0,yi=[],bi=0,xi=null,Si=1,Ci=``;function wi(e,t){hi[gi++]=vi,hi[gi++]=_i,_i=e,vi=t}function Ti(e,t,n){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,xi=e;var r=Si;e=Ci;var i=32-Pe(r)-1;r&=~(1<<i),n+=1;var a=32-Pe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Si=1<<32-Pe(t)+i|n<<i|r,Ci=a+e}else Si=1<<a|n<<i|r,Ci=e}function Ei(e){e.return!==null&&(wi(e,1),Ti(e,1,0))}function Di(e){for(;e===_i;)_i=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null;for(;e===xi;)xi=yi[--bi],yi[bi]=null,Ci=yi[--bi],yi[bi]=null,Si=yi[--bi],yi[bi]=null}function Oi(e,t){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,Si=t.id,Ci=t.overflow,xi=e}var ki=null,Ai=null,ji=!1,Mi=null,Ni=!1,Pi=Error(i(519));function Fi(e){throw Vi(mi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Pi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[nt]=e,t[rt]=r,n){case`dialog`:Od(`cancel`,t),Od(`close`,t);break;case`iframe`:case`object`:case`embed`:Od(`load`,t);break;case`video`:case`audio`:for(n=0;n<Td.length;n++)Od(Td[n],t);break;case`source`:Od(`error`,t);break;case`img`:case`image`:case`link`:Od(`error`,t),Od(`load`,t);break;case`details`:Od(`toggle`,t);break;case`input`:Od(`invalid`,t),It(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Od(`invalid`,t);break;case`textarea`:Od(`invalid`,t),Bt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Vd(t.textContent,n)?(r.popover!=null&&(Od(`beforetoggle`,t),Od(`toggle`,t)),r.onScroll!=null&&Od(`scroll`,t),r.onScrollEnd!=null&&Od(`scrollend`,t),r.onClick!=null&&(t.onclick=Yt),t=!0):t=!1,t||Fi(e,!0)}function Li(e){for(ki=e.return;ki;)switch(ki.tag){case 5:case 31:case 13:Ni=!1;return;case 27:case 3:Ni=!0;return;default:ki=ki.return}}function Ri(e){if(e!==ki)return!1;if(!ji)return Li(e),ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||$d(e.type,e.memoizedProps)),n=!n),n&&Ai&&Fi(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=bf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=bf(e)}else t===27?(t=Ai,cf(e.type)?(e=yf,yf=null,Ai=e):Ai=t):Ai=ki?vf(e.stateNode.nextSibling):null;return!0}function zi(){Ai=ki=null,ji=!1}function Bi(){var e=Mi;return e!==null&&(iu===null?iu=e:iu.push.apply(iu,e),Mi=null),e}function Vi(e){Mi===null?Mi=[e]:Mi.push(e)}var Hi=R(null),Ui=null,Wi=null;function Gi(e,t,n){B(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,z(Hi)}function qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ji(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),qi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),qi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Yi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;vr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===oe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[cp]:e.push(cp))}a=a.return}e!==null&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!vr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return ea(Ui,e)}function $i(e,t){return Ui===null&&Zi(e),ea(e,t)}function ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(i(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ta=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},na=t.unstable_scheduleCallback,ra=t.unstable_NormalPriority,ia={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aa(){return{controller:new ta,data:new Map,refCount:0}}function oa(e){e.refCount--,e.refCount===0&&na(ra,function(){e.controller.abort()})}var sa=null,ca=0,la=0,ua=null;function da(e,t){if(sa===null){var n=sa=[];ca=0,la=yd(),ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ca++,t.then(fa,fa),t}function fa(){if(--ca===0&&sa!==null){ua!==null&&(ua.status=`fulfilled`);var e=sa;sa=null,la=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ma=I.S;I.S=function(e,t){su=Se(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=R(null);function ga(){var e=ha.current;return e===null?Hl.pooledCache:e}function _a(e,t){t===null?B(ha,ha.current):B(ha,t.pool)}function va(){var e=ga();return e===null?null:{parent:ia._currentValue,pool:e}}var ya=Error(i(460)),ba=Error(i(474)),xa=Error(i(542)),Sa={then:function(){}};function Ca(e){return e=e.status,e===`fulfilled`||e===`rejected`}function wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Yt,Yt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e;default:if(typeof t.status==`string`)t.then(Yt,Yt);else{if(e=Hl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e}throw Ea=t,ya}}function Ta(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ea=e,ya):e}}var Ea=null;function Da(){if(Ea===null)throw Error(i(459));var e=Ea;return Ea=null,e}function Oa(e){if(e===ya||e===xa)throw Error(i(483))}var ka=null,Aa=0;function ja(e){var t=Aa;return Aa+=1,ka===null&&(ka=[]),wa(ka,e,t)}function Ma(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Na(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Pa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=oi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ui(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Ta(i)===t.type)?(t=a(t,n.props),Ma(t,n),t.return=e,t):(t=ci(n.type,n.key,n.props,null,e.mode,r),Ma(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=fi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=li(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ui(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=ci(t.type,t.key,t.props,null,e.mode,n),Ma(n,t),n.return=e,n;case v:return t=fi(t,e.mode,n),t.return=e,t;case O:return t=Ta(t),f(e,t,n)}if(F(t)||M(t))return t=li(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ja(t),n);if(t.$$typeof===C)return f(e,$i(e,t),n);Na(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Ta(n),p(e,t,n,r)}if(F(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ja(n),r);if(n.$$typeof===C)return p(e,t,$i(e,n),r);Na(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Ta(r),m(e,t,n,r,i)}if(F(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ja(r),i);if(r.$$typeof===C)return m(e,t,n,$i(t,r),i);Na(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),ji&&wi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return ji&&wi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),ji&&wi(i,h),l}function _(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),ji&&wi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return ji&&wi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),ji&&wi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Ta(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=li(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ci(o.type,o.key,o.props,null,e.mode,c),Ma(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=fi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ta(o),b(e,r,o,c)}if(F(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),_(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,ja(o),c);if(o.$$typeof===C)return b(e,r,$i(e,o),c);Na(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ui(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=b(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=ii(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Vl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ti(e),ei(e,null,n),t}return Zr(e,r,t,n),ti(e)}function Ha(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ye(e,n)}}function Ua(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Wa=!1;function Ga(){if(Wa){var e=ua;if(e!==null)throw e}}function Ka(e,t,n,r){Wa=!1;var i=e.updateQueue;La=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Wl&p)===p:(r&p)===p){p!==0&&p===la&&(Wa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:La=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Ql|=o,e.lanes=o,e.memoizedState=d}}function qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)qa(n[e],t)}var Ya=R(null),Xa=R(0);function Za(e,t){e=Xl,B(Xa,e),B(Ya,t),Xl=e|t.baseLanes}function Qa(){B(Xa,Xl),B(Ya,Ya.current)}function $a(){Xl=Xa.current,z(Ya),z(Xa)}var eo=R(null),to=null;function no(e){var t=e.alternate;B(so,so.current&1),B(eo,e),to===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(to=e)}function ro(e){B(so,so.current),B(eo,e),to===null&&(to=e)}function io(e){e.tag===22?(B(so,so.current),B(eo,e),to===null&&(to=e)):ao(e)}function ao(){B(so,so.current),B(eo,eo.current)}function oo(e){z(eo),to===e&&(to=null),z(so)}var so=R(0);function co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||hf(n)||gf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var lo=0,uo=null,fo=null,po=null,mo=!1,ho=!1,go=!1,_o=0,vo=0,yo=null,bo=0;function xo(){throw Error(i(321))}function So(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vr(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,i,a){return lo=a,uo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?zs:Bs,go=!1,a=n(r,i),go=!1,ho&&(a=To(t,n,r,i)),wo(e),a}function wo(e){I.H=Rs;var t=fo!==null&&fo.next!==null;if(lo=0,po=fo=uo=null,mo=!1,vo=0,yo=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&Xi(e)&&(rc=!0))}function To(e,t,n,r){uo=e;var a=0;do{if(ho&&(yo=null),vo=0,ho=!1,25<=a)throw Error(i(301));if(a+=1,po=fo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=Vs,o=t(n,r)}while(ho);return o}function Eo(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(fo===null?null:fo.memoizedState)!==e&&(uo.flags|=1024),t}function Do(){var e=_o!==0;return _o=0,e}function Oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mo=!1}lo=0,po=fo=uo=null,ho=!1,vo=_o=0,yo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return po===null?uo.memoizedState=po=e:po=po.next=e,po}function jo(){if(fo===null){var e=uo.alternate;e=e===null?null:e.memoizedState}else e=fo.next;var t=po===null?uo.memoizedState:po.next;if(t!==null)po=t,fo=e;else{if(e===null)throw uo.alternate===null?Error(i(467)):Error(i(310));fo=e,e={memoizedState:fo.memoizedState,baseState:fo.baseState,baseQueue:fo.baseQueue,queue:fo.queue,next:null},po===null?uo.memoizedState=po=e:po=po.next=e}return po}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=vo;return vo+=1,yo===null&&(yo=[]),e=wa(yo,e,t),t=uo,(po===null?t.memoizedState:po.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?zs:Bs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===C)return Qi(e)}throw Error(i(438,String(e)))}function Fo(e){var t=null,n=uo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=uo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Mo(),uo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function Io(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(jo(),fo,e)}function Ro(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(lo&f)===f:(Wl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===la&&(d=!0);else if((lo&p)===p){u=u.next,p===la&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,uo.lanes|=p,Ql|=p;f=u.action,go&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,uo.lanes|=f,Ql|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!vr(o,e.memoizedState)&&(rc=!0,d&&(n=ua,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function zo(e){var t=jo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);vr(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bo(e,t,n){var r=uo,a=jo(),o=ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!vr((fo||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,ds(Uo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||po!==null&&po.memoizedState.tag&1){if(r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,a,n,t),null),Hl===null)throw Error(i(349));o||lo&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=uo.updateQueue,t===null?(t=Mo(),uo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ho(e,t,n,r){t.value=n,t.getSnapshot=r,Wo(t)&&Go(e)}function Uo(e,t,n){return n(function(){Wo(t)&&Go(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vr(e,n)}catch{return!0}}function Go(e){var t=$r(e,2);t!==null&&Su(t,e,2)}function Ko(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),go){Ne(!0);try{n()}finally{Ne(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t}function qo(e,t,n,r){return e.baseState=n,Ro(e,fo,typeof r==`function`?r:Io)}function Jo(e,t,n,r,a){if(Is(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Yo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Yo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),Xo(e,t,s)}catch(n){Qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),Xo(e,t,a)}catch(n){Qo(e,t,n)}}function Xo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Zo(e,t,n)},function(n){return Qo(e,t,n)}):Zo(e,t,n)}function Zo(e,t,n){t.status=`fulfilled`,t.value=n,$o(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Yo(e,n)))}function Qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,$o(t),t=t.next;while(t!==r)}e.action=null}function $o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function es(e,t){return t}function ts(e,t){if(ji){var n=Hl.formState;if(n!==null){a:{var r=uo;if(ji){if(Ai){b:{for(var i=Ai,a=Ni;i.nodeType!==8;){if(!a){i=null;break b}if(i=vf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ai=vf(i.nextSibling),r=i.data===`F!`;break a}}Fi(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:t},n.queue=r,n=Ns.bind(null,uo,r),r.dispatch=n,r=Ko(!1),a=Fs.bind(null,uo,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Jo.bind(null,uo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ns(e){return rs(jo(),fo,e)}function rs(e,t,n){if(t=Ro(e,t,es)[0],e=Lo(Io)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===ya?xa:e}else r=t;t=jo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(uo.flags|=2048,os(9,{destroy:void 0},is.bind(null,i,n),null)),[r,a,e]}function is(e,t){e.action=t}function as(e){var t=jo(),n=fo;if(n!==null)return rs(t,n,e);jo(),t=t.memoizedState,n=jo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=uo.updateQueue,t===null&&(t=Mo(),uo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ss(){return jo().memoizedState}function cs(e,t,n,r){var i=Ao();uo.flags|=e,i.memoizedState=os(1|t,{destroy:void 0},n,r===void 0?null:r)}function ls(e,t,n,r){var i=jo();r=r===void 0?null:r;var a=i.memoizedState.inst;fo!==null&&r!==null&&So(r,fo.memoizedState.deps)?i.memoizedState=os(t,a,n,r):(uo.flags|=e,i.memoizedState=os(1|t,a,n,r))}function us(e,t){cs(8390656,8,e,t)}function ds(e,t){ls(2048,8,e,t)}function fs(e){uo.flags|=4;var t=uo.updateQueue;if(t===null)t=Mo(),uo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ps(e){var t=jo().memoizedState;return fs({ref:t,nextImpl:e}),function(){if(Vl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ms(e,t){return ls(4,2,e,t)}function hs(e,t){return ls(4,4,e,t)}function gs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _s(e,t,n){n=n==null?null:n.concat([e]),ls(4,4,gs.bind(null,t,e),n)}function vs(){}function ys(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bs(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&So(t,r[1]))return r[0];if(r=e(),go){Ne(!0);try{e()}finally{Ne(!1)}}return n.memoizedState=[r,t],r}function xs(e,t,n){return n===void 0||lo&1073741824&&!(Wl&261930)?e.memoizedState=t:(e.memoizedState=n,e=xu(),uo.lanes|=e,Ql|=e,n)}function Ss(e,t,n,r){return vr(n,t)?n:Ya.current===null?!(lo&42)||lo&1073741824&&!(Wl&261930)?(rc=!0,e.memoizedState=n):(e=xu(),uo.lanes|=e,Ql|=e,t):(e=xs(e,n,r),vr(e,t)||(rc=!0),e)}function Cs(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};I.T=s,Fs(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,pa(c,r),bu(e)):Ps(e,t,r,bu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},bu())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Es(e).queue;Cs(e,a,t,ee,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:ee},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},bu())}function Os(){return Qi(cp)}function ks(){return jo().memoizedState}function As(){return jo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=bu();e=Ba(n);var r=Va(t,e,n);r!==null&&(Su(r,t,n),Ha(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=bu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=Qr(e,t,n,r),n!==null&&(Su(n,e,r),U(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,bu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,vr(s,o))return Zr(e,t,i,0),Hl===null&&Xr(),!1}catch{}if(n=Qr(e,t,i,r),n!==null)return Su(n,e,r),U(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:yd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(i(479))}else t=Qr(e,n,r,2),t!==null&&Su(t,e,2)}function Is(e){var t=e.alternate;return e===uo||t!==null&&t===uo}function Ls(e,t){ho=mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function U(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ye(e,n)}}var Rs={readContext:Qi,use:Po,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useLayoutEffect:xo,useInsertionEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useSyncExternalStore:xo,useId:xo,useHostTransitionStatus:xo,useFormState:xo,useActionState:xo,useOptimistic:xo,useMemoCache:xo,useCacheRefresh:xo};Rs.useEffectEvent=xo;var zs={readContext:Qi,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(go){Ne(!0);try{e()}finally{Ne(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(go){Ne(!0);try{n(t)}finally{Ne(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ms.bind(null,uo,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,uo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,uo,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=uo,a=Ao();if(ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Hl===null)throw Error(i(349));Wl&127||Vo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=Hl.identifierPrefix;if(ji){var n=Ci,r=Si;n=(r&~(1<<32-Pe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=_o++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=bo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Os,useFormState:ts,useActionState:ts,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fs.bind(null,uo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Ao().memoizedState=js.bind(null,uo)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(Vl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Bs={readContext:Qi,use:Po,useCallback:ys,useContext:Qi,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:Lo,useRef:ss,useState:function(){return Lo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){return Ss(jo(),fo.memoizedState,e,t)},useTransition:function(){var e=Lo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){return qo(jo(),fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Bs.useEffectEvent=ps;var Vs={readContext:Qi,use:Po,useCallback:ys,useContext:Qi,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:zo,useRef:ss,useState:function(){return zo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){var n=jo();return fo===null?xs(n,e,t):Ss(n,fo.memoizedState,e,t)},useTransition:function(){var e=zo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:as,useActionState:as,useOptimistic:function(e,t){var n=jo();return fo===null?(n.baseState=e,[e,n.queue.dispatch]):qo(n,fo,e,t)},useMemoCache:Fo,useCacheRefresh:As};Vs.useEffectEvent=ps;function Hs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Us={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=bu(),i=Ba(r);i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(Su(t,e,r),Ha(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=bu(),i=Ba(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(Su(t,e,r),Ha(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=bu(),r=Ba(n);r.tag=2,t!=null&&(r.callback=t),t=Va(e,r,n),t!==null&&(Su(t,e,n),Ha(t,e,n))}};function Ws(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!yr(n,r)||!yr(i,a):!0}function Gs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Us.enqueueReplaceState(t,t.state,null)}function Ks(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function qs(e){Kr(e)}function Js(e){console.error(e)}function Ys(e){Kr(e)}function Xs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Qs(e,t,n){return n=Ba(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=Ba(e),e.tag=3,e}function ec(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Zs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Zs(t,n,r),typeof i!=`function`&&(uu===null?uu=new Set([this]):uu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function tc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Yi(t,n,a,!0),n=eo.current,n!==null){switch(n.tag){case 31:case 13:return to===null?Pu():n.alternate===null&&Zl===0&&(Zl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),$u(e,r,a)),!1;case 22:return n.flags|=65536,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),$u(e,r,a)),!1}throw Error(i(435,n.tag))}return $u(e,r,a),Pu(),!1}if(ji)return t=eo.current,t===null?(r!==Pi&&(t=Error(i(423),{cause:r}),Vi(mi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=mi(r,n),a=Qs(e.stateNode,r,a),Ua(e,a),Zl!==4&&(Zl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Pi&&(e=Error(i(422),{cause:r}),Vi(mi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=mi(o,n),ru===null?ru=[o]:ru.push(o),Zl!==4&&(Zl=2),t===null)return!0;r=mi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Qs(n.stateNode,r,e),Ua(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(uu===null||!uu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=$s(a),ec(a,e,n,r),Ua(n,a),!1}n=n.return}while(n!==null);return!1}var nc=Error(i(461)),rc=!1;function ic(e,t,n,r){t.child=e===null?Ia(t,null,n,r):Fa(t,e.child,n,r)}function ac(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Zi(t),r=Co(e,t,n,o,a,i),s=Do(),e!==null&&!rc?(Oo(e,t,i),kc(e,t,i)):(ji&&s&&Ei(t),t.flags|=1,ic(e,t,r,i),t.child)}function oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=ci(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ac(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?yr:n,n(o,r)&&e.ref===t.ref)return kc(e,t,i)}return t.flags|=1,e=oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function sc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(yr(a,r)&&e.ref===t.ref)if(rc=!1,t.pendingProps=r=a,Ac(e,i))e.flags&131072&&(rc=!0);else return t.lanes=e.lanes,kc(e,t,i)}return hc(e,t,n,r,i)}function cc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_a(t,a===null?null:a.cachePool),a===null?Qa():Za(t,a),io(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&_a(t,null),Qa(),ao(t)):(_a(t,a.cachePool),Za(t,a),ao(t),t.memoizedState=null);return ic(e,t,i,n),t.child}function lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uc(e,t,n,r,i){var a=ga();return a=a===null?null:{parent:ia._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&_a(t,null),Qa(),io(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function dc(e,t){return t=wc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fc(e,t,n){return Fa(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,oo(t),t.memoizedState=null,e}function pc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(ji){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(ro(t),(e=Ai)?(e=mf(e,Ni),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ro(t),a)if(t.flags&256)t.flags&=-257,t=fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(rc||Yi(e,t,n,!1),a=(n&e.childLanes)!==0,rc||a){if(r=Hl,r!==null&&(s=Xe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,$r(e,s),Su(r,e,s),nc;Pu(),t=fc(e,t,n)}else e=o.treeContext,Ai=vf(s.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=dc(t,r),t.flags|=4096;return t}return e=oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function mc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function hc(e,t,n,r,i){return Zi(t),n=Co(e,t,n,r,void 0,i),r=Do(),e!==null&&!rc?(Oo(e,t,i),kc(e,t,i)):(ji&&r&&Ei(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=To(t,r,n,i),wo(e),r=Do(),e!==null&&!rc?(Oo(e,t,a),kc(e,t,a)):(ji&&r&&Ei(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ni,o=n.contextType;typeof o==`object`&&o&&(a=Qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Us,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ra(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Hs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Us.enqueueReplaceState(a,a.state,null),Ka(t,r,a,i),Ga(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ks(n,s);a.props=c;var l=a.context,u=n.contextType;o=ni,typeof u==`object`&&u&&(o=Qi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Gs(t,a,r,o),La=!1;var f=t.memoizedState;a.state=f,Ka(t,r,a,i),Ga(),l=t.memoizedState,s||f!==l||La?(typeof d==`function`&&(Hs(t,n,d,r),l=t.memoizedState),(c=La||Ws(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,za(e,t),o=t.memoizedProps,u=Ks(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ni,typeof l==`object`&&l&&(c=Qi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Gs(t,a,r,c),La=!1,f=t.memoizedState,a.state=f,Ka(t,r,a,i),Ga();var p=t.memoizedState;o!==d||f!==p||La||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Hs(t,n,s,r),p=t.memoizedState),(u=La||Ws(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,mc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Fa(t,e.child,null,i),t.child=Fa(t,null,n,i)):ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=kc(e,t,i),e}function vc(e,t,n,r){return zi(),t.flags|=256,ic(e,t,n,r),t.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bc(e){return{baseLanes:e,cachePool:va()}}function xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=tu),e}function Sc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(so.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(ji){if(a?no(t):ao(t),(e=Ai)?(e=mf(e,Ni),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return gf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ao(t),a=t.mode,c=wc({mode:`hidden`,children:c},a),r=li(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(null,r)):(no(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(no(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(ao(t),c=r.fallback,a=t.mode,r=wc({mode:`visible`,children:r.children},a),c=li(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Fa(t,e.child,null,n),r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,t=lc(null,r)):(ao(t),t.child=e.child,t.flags|=128,t=null);else if(no(t),gf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Vi({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(rc||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=Hl,s!==null&&(r=Xe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,$r(e,r),Su(s,e,r),nc;hf(c)||Pu(),t=Tc(e,t,n)}else hf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ai=vf(c.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return a?(ao(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=oi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=li(c,a,n,null),c.flags|=2):c=oi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,lc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=bc(n):(a=c.cachePool,a===null?a=va():(l=ia._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(e.child,r)):(no(t),n=e.child,e=n.sibling,n=oi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Cc(e,t){return t=wc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function wc(e,t){return e=ii(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return Fa(t,e.child,null,n),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ec(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function Dc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=so.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,B(so,o),ic(e,t,r,n),r=ji?vi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ec(e,n,t);else if(e.tag===19)Ec(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&co(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&co(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dc(t,!0,n,null,a,r);break;case`together`:Dc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function kc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ql|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Yi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ac(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Xi(e))):!0}function jc(e,t,n){switch(t.tag){case 3:se(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:le(t);break;case 4:se(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(no(t),e=kc(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(no(t),t.flags|=128,null);no(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Yi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(so,so.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:Gi(t,ia,e.memoizedState.cache)}return kc(e,t,n)}function Mc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rc=!0;else{if(!Ac(e,n)&&!(t.flags&128))return rc=!1,jc(e,t,n);rc=!!(e.flags&131072)}else rc=!1,ji&&t.flags&1048576&&Ti(t,vi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ta(t.elementType),t.type=e,typeof e==`function`)ai(e)?(r=Ks(e,r),t.tag=1,t=_c(null,t,e,r,n)):(t.tag=0,t=hc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ac(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=oc(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ks(r,t.pendingProps),_c(e,t,r,a,n);case 3:a:{if(se(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,za(e,t),Ka(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ia,r),r!==o.cache&&Ji(t,[ia],n,!0),Ga(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=vc(e,t,r,n);break a}else if(r!==a){a=mi(Error(i(424)),t),Vi(a),t=vc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ai=vf(e.firstChild),ki=t,ji=!0,Mi=null,Ni=!0,n=Ia(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===a){t=kc(e,t,n);break a}ic(e,t,r,n)}t=t.child}return t;case 26:return mc(e,t),e===null?(n=zf(t.type,null,t.pendingProps,null))?t.memoizedState=n:ji||(n=t.type,e=t.pendingProps,r=Xd(ae.current).createElement(n),r[nt]=t,r[rt]=e,Wd(r,n,e),ht(r),t.stateNode=r):t.memoizedState=zf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&ji&&(r=t.stateNode=Sf(t.type,t.pendingProps,ae.current),ki=t,Ni=!0,a=Ai,cf(t.type)?(yf=a,Ai=vf(r.firstChild)):Ai=a),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ji&&((a=r=Ai)&&(r=ff(r,t.type,t.pendingProps,Ni),r===null?a=!1:(t.stateNode=r,ki=t,Ai=vf(r.firstChild),Ni=!1,a=!0)),a||Fi(t)),le(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,$d(a,o)?r=null:s!==null&&$d(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Co(e,t,Eo,null,null,n),cp._currentValue=a),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&ji&&((e=n=Ai)&&(n=pf(n,t.pendingProps,Ni),n===null?e=!1:(t.stateNode=n,ki=t,Ai=null,e=!0)),e||Fi(t)),null;case 13:return Sc(e,t,n);case 4:return se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fa(t,null,r,n):ic(e,t,r,n),t.child;case 11:return ac(e,t,t.type,t.pendingProps,n);case 7:return ic(e,t,t.pendingProps,n),t.child;case 8:return ic(e,t,t.pendingProps.children,n),t.child;case 12:return ic(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Zi(t),a=Qi(a),r=r(a),t.flags|=1,ic(e,t,r,n),t.child;case 14:return oc(e,t,t.type,t.pendingProps,n);case 15:return sc(e,t,t.type,t.pendingProps,n);case 19:return Oc(e,t,n);case 31:return pc(e,t,n);case 22:return cc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ia),e===null?(a=ga(),a===null&&(a=Hl,o=aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ra(t),Gi(t,ia,a)):((e.lanes&n)!==0&&(za(e,t),Ka(t,null,null,n),Ga()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Gi(t,ia,r),r!==a.cache&&Ji(t,[ia],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Gi(t,ia,r))),ic(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Nc(e){e.flags|=4}function Pc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(ju())e.flags|=8192;else throw Ea=Sa,ba}else e.flags&=-16777217}function Fc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!ep(t))if(ju())e.flags|=8192;else throw Ea=Sa,ba}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:We(),e.lanes|=t,nu|=t)}function Lc(e,t){if(!ji)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Rc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function zc(e,t,n){var r=t.pendingProps;switch(Di(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rc(t),null;case 1:return Rc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ki(ia),ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?Nc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),Rc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Nc(t),o===null?(Rc(t),Pc(t,a,null,r,n)):(Rc(t),Fc(t,o))):o?o===e.memoizedState?(Rc(t),t.flags&=-16777217):(Nc(t),Rc(t),Fc(t,o)):(e=e.memoizedProps,e!==r&&Nc(t),Rc(t),Pc(t,a,e,r,n)),null;case 27:if(ue(t),n=ae.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}e=re.current,Ri(t)?Ii(t,e):(e=Sf(a,r,n),t.stateNode=e,Nc(t))}return Rc(t),null;case 5:if(ue(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}if(o=re.current,Ri(t))Ii(t,o);else{var s=Xd(ae.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[nt]=t,o[rt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Wd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Nc(t)}}return Rc(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[nt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Vd(e.nodeValue,n)),e||Fi(t,!0)}else e=Xd(e).createTextNode(r),e[nt]=t,t.stateNode=e}return Rc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[nt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(oo(t),t):(oo(t),null);if(t.flags&128)throw Error(i(558))}return Rc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ri(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[nt]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),a=!1}else a=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(oo(t),t):(oo(t),null)}return oo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ic(t,t.updateQueue),Rc(t),null);case 4:return ce(),e===null&&jd(t.stateNode.containerInfo),Rc(t),null;case 10:return Ki(t.type),Rc(t),null;case 19:if(z(so),r=t.memoizedState,r===null)return Rc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Lc(r,!1);else{if(Zl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=co(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)si(n,e),n=n.sibling;return B(so,so.current&1|2),ji&&wi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Se()>cu&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}else{if(!a)if(e=co(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ji)return Rc(t),null}else 2*Se()-r.renderingStartTime>cu&&n!==536870912&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Rc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Se(),e.sibling=null,n=so.current,B(so,a?n&1|2:n&1),ji&&wi(t,r.treeForkCount),e);case 22:case 23:return oo(t),$a(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Rc(t),t.subtreeFlags&6&&(t.flags|=8192)):Rc(t),n=t.updateQueue,n!==null&&Ic(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&z(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),Rc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Bc(e,t){switch(Di(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(oo(t),t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(so),null;case 4:return ce(),null;case 10:return Ki(t.type),null;case 22:case 23:return oo(t),$a(),e!==null&&z(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function Vc(e,t){switch(Di(t),t.tag){case 3:Ki(ia),ce();break;case 26:case 27:case 5:ue(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&oo(t);break;case 13:oo(t);break;case 19:z(so);break;case 10:Ki(t.type);break;case 22:case 23:oo(t),$a(),e!==null&&z(ha);break;case 24:Ki(ia)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Qu(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Qu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Qu(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ja(t,n)}catch(t){Qu(e,e.return,t)}}}function Gc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Qu(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Qu(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Qu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Qu(e,t,n)}else n.current=null}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Qu(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Gd(r,e.type,n,t),r[rt]=t}catch(t){Qu(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&cf(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&cf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Yt));else if(r!==4&&(r===27&&cf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&cf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Wd(t,r,n),t[nt]=e,t[rt]=n}catch(t){Qu(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Jd=_p,e=Cr(e),wr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Yd={focusedElem:e,selectionRange:n},_p=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ks(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Qu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)df(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:df(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Sl(e,n),r&4&&Hc(5,n);break;case 1:if(Sl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Qu(n,n.return,e)}else{var i=Ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Qu(n,n.return,e)}}r&64&&Wc(n),r&512&&Kc(n,n.return);break;case 3:if(Sl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ja(e,t)}catch(e){Qu(n,n.return,e)}}break;case 27:t===null&&r&4&&el(n);case 26:case 5:Sl(e,n),t===null&&r&4&&Jc(n),r&512&&Kc(n,n.return);break;case 12:Sl(e,n);break;case 31:Sl(e,n),r&4&&pl(e,n);break;case 13:Sl(e,n),r&4&&ml(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=nd.bind(null,n),_f(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||nl,i=tl;var a=nl;tl=r,(nl=t)&&!a?wl(e,n,(n.subtreeFlags&8772)!=0):Sl(e,n),tl=i,nl=a}break;case 30:break;default:Sl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ut(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ll=null,ul=!1;function dl(e,t,n){for(n=n.child;n!==null;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(Me&&typeof Me.onCommitFiberUnmount==`function`)try{Me.onCommitFiberUnmount(je,n)}catch{}switch(n.tag){case 26:nl||qc(n,t),dl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nl||qc(n,t);var r=ll,i=ul;cf(n.type)&&(ll=n.stateNode,ul=!1),dl(e,t,n),Cf(n.stateNode),ll=r,ul=i;break;case 5:nl||qc(n,t);case 6:if(r=ll,i=ul,ll=null,dl(e,t,n),ll=r,ul=i,ll!==null)if(ul)try{(ll.nodeType===9?ll.body:ll.nodeName===`HTML`?ll.ownerDocument.body:ll).removeChild(n.stateNode)}catch(e){Qu(n,t,e)}else try{ll.removeChild(n.stateNode)}catch(e){Qu(n,t,e)}break;case 18:ll!==null&&(ul?(e=ll,lf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hp(e)):lf(ll,n.stateNode));break;case 4:r=ll,i=ul,ll=n.stateNode.containerInfo,ul=!0,dl(e,t,n),ll=r,ul=i;break;case 0:case 11:case 14:case 15:Uc(2,n,t),nl||Uc(4,n,t),dl(e,t,n);break;case 1:nl||(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Gc(n,t,r)),dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:nl=(r=nl)||n.memoizedState!==null,dl(e,t,n),nl=r;break;default:dl(e,t,n)}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hp(e)}catch(e){Qu(t,t.return,e)}}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hp(e)}catch(e){Qu(t,t.return,e)}}function hl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(i(435,e.tag))}}function gl(e,t){var n=hl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=rd.bind(null,e,t);t.then(r,r)}})}function _l(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(cf(c.type)){ll=c.stateNode,ul=!1;break a}break;case 5:ll=c.stateNode,ul=!1;break a;case 3:case 4:ll=c.stateNode.containerInfo,ul=!0;break a}c=c.return}if(ll===null)throw Error(i(160));fl(o,s,a),ll=null,ul=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yl(t,e),t=t.sibling}var vl=null;function yl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_l(t,e),bl(e),r&4&&(Uc(3,e,e.return),Hc(3,e),Uc(5,e,e.return));break;case 1:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&64&&tl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=vl;if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[lt]||o[nt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Wd(o,r,n),o[nt]=e,ht(o),r=o;break a;case`link`:var s=Zf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Wd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Zf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Wd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[nt]=e,ht(o),r=o}e.stateNode=r}else Qf(a,e.type,e.stateNode);else e.stateNode=Kf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Qf(a,e.type,e.stateNode):Kf(a,r,e.memoizedProps))}break;case 27:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),e.flags&32){a=e.stateNode;try{Vt(a,``)}catch(t){Qu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Yc(e,a,n===null?a:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(_l(t,e),bl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Qu(e,e.return,t)}}break;case 3:if(Xf=null,a=vl,vl=Ef(t.containerInfo),_l(t,e),vl=a,bl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Hp(t.containerInfo)}catch(t){Qu(e,e.return,t)}rl&&(rl=!1,xl(e));break;case 4:r=vl,vl=Ef(e.stateNode.containerInfo),_l(t,e),bl(e),vl=r;break;case 12:_l(t,e),bl(e);break;case 31:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 13:_l(t,e),bl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ou=Se()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=tl,d=nl;if(tl=u||a,nl=d||l,_l(t,e),nl=d,tl=u,bl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||tl||nl||Cl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Qu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Qu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?uf(m,!0):uf(l.stateNode,!1)}catch(e){Qu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,gl(e,n))));break;case 19:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 30:break;case 21:break;default:_l(t,e),bl(e)}}function bl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;$c(e,Zc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Vt(o,``),n.flags&=-33),$c(e,Zc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Qc(e,Zc(e),s);break;default:throw Error(i(161))}}catch(t){Qu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Cl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Uc(4,t,t.return),Cl(t);break;case 1:qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Gc(t,t.return,n),Cl(t);break;case 27:Cf(t.stateNode);case 26:case 5:qc(t,t.return),Cl(t);break;case 22:t.memoizedState===null&&Cl(t);break;case 30:Cl(t);break;default:Cl(t)}e=e.sibling}}function wl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:wl(i,a,n),Hc(4,a);break;case 1:if(wl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Qu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)qa(c[i],s)}catch(e){Qu(r,r.return,e)}}n&&o&64&&Wc(a),Kc(a,a.return);break;case 27:el(a);case 26:case 5:wl(i,a,n),n&&r===null&&o&4&&Jc(a),Kc(a,a.return);break;case 12:wl(i,a,n);break;case 31:wl(i,a,n),n&&o&4&&pl(i,a);break;case 13:wl(i,a,n),n&&o&4&&ml(i,a);break;case 22:a.memoizedState===null&&wl(i,a,n),Kc(a,a.return);break;case 30:break;default:wl(i,a,n)}t=t.sibling}}function Tl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&oa(n))}function El(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e))}function Dl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ol(e,t,n,r),t=t.sibling}function Ol(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Dl(e,t,n,r),i&2048&&Hc(9,t);break;case 1:Dl(e,t,n,r);break;case 3:Dl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e)));break;case 12:if(i&2048){Dl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Qu(t,t.return,e)}}else Dl(e,t,n,r);break;case 31:Dl(e,t,n,r);break;case 13:Dl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Dl(e,t,n,r):(a._visibility|=2,kl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Dl(e,t,n,r):Al(e,t),i&2048&&Tl(o,t);break;case 24:Dl(e,t,n,r),i&2048&&El(t.alternate,t);break;default:Dl(e,t,n,r)}}function kl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:kl(a,o,s,c,i),Hc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,kl(a,o,s,c,i)):u._visibility&2?kl(a,o,s,c,i):Al(a,o),i&&l&2048&&Tl(o.alternate,o);break;case 24:kl(a,o,s,c,i),i&&l&2048&&El(o.alternate,o);break;default:kl(a,o,s,c,i)}t=t.sibling}}function Al(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Al(n,r),i&2048&&Tl(r.alternate,r);break;case 24:Al(n,r),i&2048&&El(r.alternate,r);break;default:Al(n,r)}t=t.sibling}}var jl=8192;function Ml(e,t,n){if(e.subtreeFlags&jl)for(e=e.child;e!==null;)Nl(e,t,n),e=e.sibling}function Nl(e,t,n){switch(e.tag){case 26:Ml(e,t,n),e.flags&jl&&e.memoizedState!==null&&tp(n,vl,e.memoizedState,e.memoizedProps);break;case 5:Ml(e,t,n);break;case 3:case 4:var r=vl;vl=Ef(e.stateNode.containerInfo),Ml(e,t,n),vl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=jl,jl=16777216,Ml(e,t,n),jl=r):Ml(e,t,n));break;default:Ml(e,t,n)}}function Pl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Il(e),e=e.sibling}function Il(e){switch(e.tag){case 0:case 11:case 15:Fl(e),e.flags&2048&&Uc(9,e,e.return);break;case 3:Fl(e);break;case 12:Fl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ll(e)):Fl(e);break;default:Fl(e)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Uc(8,t,t.return),Ll(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ll(t));break;default:Ll(t)}e=e.sibling}}function Rl(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Uc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var zl={getCacheForType:function(e){var t=Qi(ia),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ia).controller.signal}},Bl=typeof WeakMap==`function`?WeakMap:Map,Vl=0,Hl=null,Ul=null,Wl=0,Gl=0,Kl=null,ql=!1,Jl=!1,Yl=!1,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=null,iu=null,au=!1,ou=0,su=0,cu=1/0,lu=null,uu=null,du=0,fu=null,pu=null,mu=0,hu=0,gu=null,_u=null,vu=0,yu=null;function bu(){return Vl&2&&Wl!==0?Wl&-Wl:I.T===null?$e():yd()}function xu(){if(tu===0)if(!(Wl&536870912)||ji){var e=ze;ze<<=1,!(ze&3932160)&&(ze=262144),tu=e}else tu=536870912;return e=eo.current,e!==null&&(e.flags|=32),tu}function Su(e,t,n){(e===Hl&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)&&(ku(e,0),Eu(e,Wl,tu,!1)),Ke(e,n),(!(Vl&2)||e!==Hl)&&(e===Hl&&(!(Vl&2)&&($l|=n),Zl===4&&Eu(e,Wl,tu,!1)),dd(e))}function Cu(e,t,n){if(Vl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ue(e,t),a=r?Lu(e,t):Fu(e,t,!0),o=r;do{if(a===0){Jl&&!r&&Eu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Tu(n)){a=Fu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ru;var l=c.current.memoizedState.isDehydrated;if(l&&(ku(c,s).flags|=256),s=Fu(c,s,!1),s!==2){if(Yl&&!l){c.errorRecoveryDisabledLanes|=o,$l|=o,a=4;break a}o=iu,iu=a,o!==null&&(iu===null?iu=o:iu.push.apply(iu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){ku(e,0),Eu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Eu(r,t,tu,!ql);break a;case 2:iu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=ou+300-Se(),10<a)){if(Eu(r,t,tu,!ql),He(r,0,!0)!==0)break a;mu=t,r.timeoutHandle=nf(wu.bind(null,r,n,iu,lu,au,t,tu,$l,nu,ql,o,`Throttled`,-0,0),a);break a}wu(r,n,iu,lu,au,t,tu,$l,nu,ql,o,null,-0,0)}}break}while(1);dd(e)}function wu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yt},Nl(t,a,d);var m=(a&62914560)===a?ou-Se():(a&4194048)===a?su-Se():0;if(m=rp(d,m),m!==null){mu=a,e.cancelPendingCommit=m(Wu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Eu(e,a,o,!l);return}}Wu(e,t,a,n,r,i,o,s,c)}function Tu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!vr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Eu(e,t,n,r){t&=~eu,t&=~$l,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Pe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Je(e,n,t)}function Du(){return Vl&6?!0:(fd(0,!1),!1)}function Ou(){if(Ul!==null){if(Gl===0)var e=Ul.return;else e=Ul,Wi=Ui=null,ko(e),ka=null,Aa=0,e=Ul;for(;e!==null;)Vc(e.alternate,e),e=e.return;Ul=null}}function ku(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,rf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),mu=0,Ou(),Hl=e,Ul=n=oi(e.current,null),Wl=t,Gl=0,Kl=null,ql=!1,Jl=Ue(e,t),Yl=!1,nu=tu=eu=$l=Ql=Zl=0,iu=ru=null,au=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Pe(r),a=1<<i;t|=e[i],r&=~a}return Xl=t,Xr(),n}function Au(e,t){uo=null,I.H=Rs,t===ya||t===xa?(t=Da(),Gl=3):t===ba?(t=Da(),Gl=4):Gl=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Kl=t,Ul===null&&(Zl=1,Xs(e,mi(t,e.current)))}function ju(){var e=eo.current;return e===null?!0:(Wl&4194048)===Wl?to===null:(Wl&62914560)===Wl||Wl&536870912?e===to:!1}function Mu(){var e=I.H;return I.H=Rs,e===null?Rs:e}function Nu(){var e=I.A;return I.A=zl,e}function Pu(){Zl=4,ql||(Wl&4194048)!==Wl&&eo.current!==null||(Jl=!0),!(Ql&134217727)&&!($l&134217727)||Hl===null||Eu(Hl,Wl,tu,!1)}function Fu(e,t,n){var r=Vl;Vl|=2;var i=Mu(),a=Nu();(Hl!==e||Wl!==t)&&(lu=null,ku(e,t)),t=!1;var o=Zl;a:do try{if(Gl!==0&&Ul!==null){var s=Ul,c=Kl;switch(Gl){case 8:Ou(),o=6;break a;case 3:case 2:case 9:case 6:eo.current===null&&(t=!0);var l=Gl;if(Gl=0,Kl=null,Vu(e,s,c,l),n&&Jl){o=0;break a}break;default:l=Gl,Gl=0,Kl=null,Vu(e,s,c,l)}}Iu(),o=Zl;break}catch(t){Au(e,t)}while(1);return t&&e.shellSuspendCounter++,Wi=Ui=null,Vl=r,I.H=i,I.A=a,Ul===null&&(Hl=null,Wl=0,Xr()),o}function Iu(){for(;Ul!==null;)zu(Ul)}function Lu(e,t){var n=Vl;Vl|=2;var r=Mu(),a=Nu();Hl!==e||Wl!==t?(lu=null,cu=Se()+500,ku(e,t)):Jl=Ue(e,t);a:do try{if(Gl!==0&&Ul!==null){t=Ul;var o=Kl;b:switch(Gl){case 1:Gl=0,Kl=null,Vu(e,t,o,1);break;case 2:case 9:if(Ca(o)){Gl=0,Kl=null,Bu(t);break}t=function(){Gl!==2&&Gl!==9||Hl!==e||(Gl=7),dd(e)},o.then(t,t);break a;case 3:Gl=7;break a;case 4:Gl=5;break a;case 7:Ca(o)?(Gl=0,Kl=null,Bu(t)):(Gl=0,Kl=null,Vu(e,t,o,7));break;case 5:var s=null;switch(Ul.tag){case 26:s=Ul.memoizedState;case 5:case 27:var c=Ul;if(s?ep(s):c.stateNode.complete){Gl=0,Kl=null;var l=c.sibling;if(l!==null)Ul=l;else{var u=c.return;u===null?Ul=null:(Ul=u,Hu(u))}break b}}Gl=0,Kl=null,Vu(e,t,o,5);break;case 6:Gl=0,Kl=null,Vu(e,t,o,6);break;case 8:Ou(),Zl=6;break a;default:throw Error(i(462))}}Ru();break}catch(t){Au(e,t)}while(1);return Wi=Ui=null,I.H=r,I.A=a,Vl=n,Ul===null?(Hl=null,Wl=0,Xr(),Zl):0}function Ru(){for(;Ul!==null&&!be();)zu(Ul)}function zu(e){var t=Mc(e.alternate,e,Xl);e.memoizedProps=e.pendingProps,t===null?Hu(e):Ul=t}function Bu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=gc(n,t,t.pendingProps,t.type,void 0,Wl);break;case 11:t=gc(n,t,t.pendingProps,t.type.render,t.ref,Wl);break;case 5:ko(t);default:Vc(n,t),t=Ul=si(t,Xl),t=Mc(n,t,Xl)}e.memoizedProps=e.pendingProps,t===null?Hu(e):Ul=t}function Vu(e,t,n,r){Wi=Ui=null,ko(t),ka=null,Aa=0;var i=t.return;try{if(tc(e,i,t,n,Wl)){Zl=1,Xs(e,mi(n,e.current)),Ul=null;return}}catch(t){if(i!==null)throw Ul=i,t;Zl=1,Xs(e,mi(n,e.current)),Ul=null;return}t.flags&32768?(ji||r===1?e=!0:Jl||Wl&536870912?e=!1:(ql=e=!0,(r===2||r===9||r===3||r===6)&&(r=eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Uu(t,e)):Hu(t)}function Hu(e){var t=e;do{if(t.flags&32768){Uu(t,ql);return}e=t.return;var n=zc(t.alternate,t,Xl);if(n!==null){Ul=n;return}if(t=t.sibling,t!==null){Ul=t;return}Ul=t=e}while(t!==null);Zl===0&&(Zl=5)}function Uu(e,t){do{var n=Bc(e.alternate,e);if(n!==null){n.flags&=32767,Ul=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ul=e;return}Ul=e=n}while(e!==null);Zl=6,Ul=null}function Wu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Yu();while(du!==0);if(Vl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Yr,qe(e,n,o,s,c,l),e===Hl&&(Ul=Hl=null,Wl=0),pu=t,fu=e,mu=n,hu=o,gu=a,_u=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,id(Ee,function(){return Xu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=I.T,I.T=null,a=L.p,L.p=2,s=Vl,Vl|=4;try{ol(e,t,n)}finally{Vl=s,L.p=a,I.T=r}}du=1,Gu(),Ku(),qu()}}function Gu(){if(du===1){du=0;var e=fu,t=pu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=Vl;Vl|=4;try{yl(t,e);var a=Yd,o=Cr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Sr(s.ownerDocument.documentElement,s)){if(c!==null&&wr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=xr(s,h),v=xr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}_p=!!Jd,Yd=Jd=null}finally{Vl=i,L.p=r,I.T=n}}e.current=t,du=2}}function Ku(){if(du===2){du=0;var e=fu,t=pu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=Vl;Vl|=4;try{sl(e,t.alternate,t)}finally{Vl=i,L.p=r,I.T=n}}du=3}}function qu(){if(du===4||du===3){du=0,xe();var e=fu,t=pu,n=mu,r=_u;t.subtreeFlags&10256||t.flags&10256?du=5:(du=0,pu=fu=null,Ju(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(uu=null),Qe(n),t=t.stateNode,Me&&typeof Me.onCommitFiberRoot==`function`)try{Me.onCommitFiberRoot(je,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=I.T,i=L.p,L.p=2,I.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{I.T=t,L.p=i}}mu&3&&Yu(),dd(e),i=e.pendingLanes,n&261930&&i&42?e===yu?vu++:(vu=0,yu=e):vu=0,fd(0,!1)}}function Ju(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,oa(t)))}function Yu(){return Gu(),Ku(),qu(),Xu()}function Xu(){if(du!==5)return!1;var e=fu,t=hu;hu=0;var n=Qe(mu),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=gu,gu=null;var o=fu,s=mu;if(du=0,pu=fu=null,mu=0,Vl&6)throw Error(i(331));var c=Vl;if(Vl|=4,Il(o.current),Ol(o,o.current,s,n),Vl=c,fd(0,!1),Me&&typeof Me.onPostCommitFiberRoot==`function`)try{Me.onPostCommitFiberRoot(je,o)}catch{}return!0}finally{L.p=a,I.T=r,Ju(e,t)}}function Zu(e,t,n){t=mi(n,t),t=Qs(e.stateNode,t,2),e=Va(e,t,2),e!==null&&(Ke(e,2),dd(e))}function Qu(e,t,n){if(e.tag===3)Zu(e,e,n);else for(;t!==null;){if(t.tag===3){Zu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(uu===null||!uu.has(r))){e=mi(n,e),n=$s(2),r=Va(t,n,2),r!==null&&(ec(n,r,t,e),Ke(r,2),dd(r));break}}t=t.return}}function $u(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Bl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Yl=!0,i.add(n),e=ed.bind(null,e,t,n),t.then(e,e))}function ed(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Hl===e&&(Wl&n)===n&&(Zl===4||Zl===3&&(Wl&62914560)===Wl&&300>Se()-ou?!(Vl&2)&&ku(e,0):eu|=n,nu===Wl&&(nu=0)),dd(e)}function td(e,t){t===0&&(t=We()),e=$r(e,t),e!==null&&(Ke(e,t),dd(e))}function nd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),td(e,n)}function rd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),td(e,n)}function id(e,t){return ve(e,t)}var ad=null,od=null,sd=!1,cd=!1,ld=!1,ud=0;function dd(e){e!==od&&e.next===null&&(od===null?ad=od=e:od=od.next=e),cd=!0,sd||(sd=!0,vd())}function fd(e,t){if(!ld&&cd){ld=!0;do for(var n=!1,r=ad;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Pe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,_d(r,a))}else a=Wl,a=He(r,r===Hl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ue(r,a)||(n=!0,_d(r,a));r=r.next}while(n);ld=!1}}function pd(){md()}function md(){cd=sd=!1;var e=0;ud!==0&&tf()&&(e=ud);for(var t=Se(),n=null,r=ad;r!==null;){var i=r.next,a=hd(r,t);a===0?(r.next=null,n===null?ad=i:n.next=i,i===null&&(od=n)):(n=r,(e!==0||a&3)&&(cd=!0)),r=i}du!==0&&du!==5||fd(e,!1),ud!==0&&(ud=0)}function hd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Pe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=H(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Hl,n=Wl,n=He(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ye(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ue(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ye(r),Qe(n)){case 2:case 8:n=Te;break;case 32:n=Ee;break;case 268435456:n=Oe;break;default:n=Ee}return r=gd.bind(null,e),n=ve(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ye(r),e.callbackPriority=2,e.callbackNode=null,2}function gd(e,t){if(du!==0&&du!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Yu()&&e.callbackNode!==n)return null;var r=Wl;return r=He(e,e===Hl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Cu(e,r,t),hd(e,Se()),e.callbackNode!=null&&e.callbackNode===n?gd.bind(null,e):null)}function _d(e,t){if(Yu())return null;Cu(e,t,!0)}function vd(){of(function(){Vl&6?ve(we,pd):md()})}function yd(){if(ud===0){var e=la;e===0&&(e=Re,Re<<=1,!(Re&261888)&&(Re=256)),ud=e}return ud}function bd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Jt(``+e)}function xd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Sd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=bd((i[rt]||null).action),o=r.submitter;o&&(t=(t=o[rt]||null)?bd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new _n(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ud!==0){var e=o?xd(i,o):new FormData(i);Ts(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?xd(i,o):new FormData(i),Ts(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Cd=0;Cd<Wr.length;Cd++){var wd=Wr[Cd];Gr(wd.toLowerCase(),`on`+(wd[0].toUpperCase()+wd.slice(1)))}Gr(Ir,`onAnimationEnd`),Gr(Lr,`onAnimationIteration`),Gr(Rr,`onAnimationStart`),Gr(`dblclick`,`onDoubleClick`),Gr(`focusin`,`onFocus`),Gr(`focusout`,`onBlur`),Gr(zr,`onTransitionRun`),Gr(Br,`onTransitionStart`),Gr(Vr,`onTransitionCancel`),Gr(Hr,`onTransitionEnd`),yt(`onMouseEnter`,[`mouseout`,`mouseover`]),yt(`onMouseLeave`,[`mouseout`,`mouseover`]),yt(`onPointerEnter`,[`pointerout`,`pointerover`]),yt(`onPointerLeave`,[`pointerout`,`pointerover`]),vt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),vt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),vt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),vt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),vt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),vt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Td=`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(` `),Ed=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Td));function Dd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Kr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Kr(e)}i.currentTarget=null,a=c}}}}function Od(e,t){var n=t[at];n===void 0&&(n=t[at]=new Set);var r=e+`__bubble`;n.has(r)||(Md(t,e,2,!1),n.add(r))}function kd(e,t,n){var r=0;t&&(r|=4),Md(n,e,r,t)}var Ad=`_reactListening`+Math.random().toString(36).slice(2);function jd(e){if(!e[Ad]){e[Ad]=!0,gt.forEach(function(t){t!==`selectionchange`&&(Ed.has(t)||kd(t,!1,e),kd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ad]||(t[Ad]=!0,kd(`selectionchange`,!1,t))}}function Md(e,t,n,r){switch(wp(t)){case 2:var i=vp;break;case 8:i=yp;break;default:i=bp}n=i.bind(null,t,n,e),i=void 0,!on||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Nd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=dt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}nn(function(){var r=a,i=Zt(n),s=[];a:{var c=Ur.get(e);if(c!==void 0){var l=_n,u=e;switch(e){case`keypress`:if(fn(n)===0)break a;case`keydown`:case`keyup`:l=Fn;break;case`focusin`:u=`focus`,l=En;break;case`focusout`:u=`blur`,l=En;break;case`beforeblur`:case`afterblur`:l=En;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=wn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Tn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Ln;break;case Ir:case Lr:case Rr:l=Dn;break;case Hr:l=Rn;break;case`scroll`:case`scrollend`:l=yn;break;case`wheel`:l=zn;break;case`copy`:case`cut`:case`paste`:l=On;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=In;break;case`toggle`:case`beforetoggle`:l=Bn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=rn(m,p),g!=null&&d.push(Pd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Xt&&(u=n.relatedTarget||n.fromElement)&&(dt(u)||u[it]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?dt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=wn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=In,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:pt(l),h=u==null?c:pt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,dt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Id,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Ld(s,c,l,d,!1),u!==null&&f!==null&&Ld(s,f,u,d,!0)}}a:{if(c=r?pt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=or;else if(er(c))if(sr)v=gr;else{v=mr;var y=pr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Gt(r.elementType)&&(v=or):v=hr;if(v&&=v(e,r)){tr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Lt(c,`number`,c.value)}switch(y=r?pt(r):window,e){case`focusin`:(er(y)||y.contentEditable===`true`)&&(Er=y,Dr=r,Or=null);break;case`focusout`:Or=Dr=Er=null;break;case`mousedown`:kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:kr=!1,Ar(s,n,i);break;case`selectionchange`:if(Tr)break;case`keydown`:case`keyup`:Ar(s,n,i)}var b;if(Hn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Xn?Jn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Gn&&n.locale!==`ko`&&(Xn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Xn&&(b=dn()):(cn=i,ln=`value`in cn?cn.value:cn.textContent,Xn=!0)),y=Fd(r,x),0<y.length&&(x=new kn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Yn(n),b!==null&&(x.data=b)))),(b=Wn?Zn(e,n):Qn(e,n))&&(x=Fd(r,`onBeforeInput`),0<x.length&&(y=new kn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Sd(s,e,r,n,i)}Dd(s,t)})}function Pd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=rn(e,n),i!=null&&r.unshift(Pd(e,i,a)),i=rn(e,t),i!=null&&r.push(Pd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Id(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ld(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=rn(n,a),l!=null&&o.unshift(Pd(n,l,c))):i||(l=rn(n,a),l!=null&&o.push(Pd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Rd=/\r\n?/g,zd=/\u0000|\uFFFD/g;function Bd(e){return(typeof e==`string`?e:``+e).replace(Rd,`
9
+ `).replace(zd,``)}function Vd(e,t){return t=Bd(t),Bd(e)===t}function Hd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Vt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Vt(e,``+r);break;case`className`:Tt(e,`class`,r);break;case`tabIndex`:Tt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Tt(e,n,r);break;case`style`:Wt(e,r,o);break;case`data`:if(t!==`object`){Tt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Jt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Hd(e,t,`name`,a.name,a,null),Hd(e,t,`formEncType`,a.formEncType,a,null),Hd(e,t,`formMethod`,a.formMethod,a,null),Hd(e,t,`formTarget`,a.formTarget,a,null)):(Hd(e,t,`encType`,a.encType,a,null),Hd(e,t,`method`,a.method,a,null),Hd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Jt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Yt);break;case`onScroll`:r!=null&&Od(`scroll`,e);break;case`onScrollEnd`:r!=null&&Od(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Jt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Od(`beforetoggle`,e),Od(`toggle`,e),wt(e,`popover`,r);break;case`xlinkActuate`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Et(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Et(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Et(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Et(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:wt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Kt.get(n)||n,wt(e,n,r))}}function Ud(e,t,n,r,a,o){switch(n){case`style`:Wt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Vt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Vt(e,``+r);break;case`onScroll`:r!=null&&Od(`scroll`,e);break;case`onScrollEnd`:r!=null&&Od(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Yt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!_t.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[rt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):wt(e,n,r)}}}function Wd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Od(`error`,e),Od(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Hd(e,t,o,s,n,null)}}a&&Hd(e,t,`srcSet`,n.srcSet,n,null),r&&Hd(e,t,`src`,n.src,n,null);return;case`input`:Od(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Hd(e,t,r,d,n,null)}}It(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Od(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Hd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Rt(e,!!r,n,!0):Rt(e,!!r,t,!1);return;case`textarea`:for(s in Od(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Hd(e,t,s,c,n,null)}Bt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Hd(e,t,l,r,n,null)}return;case`dialog`:Od(`beforetoggle`,e),Od(`toggle`,e),Od(`cancel`,e),Od(`close`,e);break;case`iframe`:case`object`:Od(`load`,e);break;case`video`:case`audio`:for(r=0;r<Td.length;r++)Od(Td[r],e);break;case`image`:Od(`error`,e),Od(`load`,e);break;case`details`:Od(`toggle`,e);break;case`embed`:case`source`:case`link`:Od(`error`,e),Od(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Hd(e,t,u,r,n,null)}return;default:if(Gt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Ud(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Hd(e,t,c,r,n,null))}function Gd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Hd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Hd(e,t,p,m,r,f)}}Ft(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Hd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Hd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Rt(e,!!n,n?[]:``,!1):Rt(e,!!n,t,!0)):Rt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Hd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Hd(e,t,s,a,r,o)}zt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Hd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Hd(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Hd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Hd(e,t,u,p,r,m)}return;default:if(Gt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Ud(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Ud(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Hd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Hd(e,t,f,p,r,m)}function Kd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function qd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Kd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Kd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Jd=null,Yd=null;function Xd(e){return e.nodeType===9?e:e.ownerDocument}function Zd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Qd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function $d(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ef=null;function tf(){var e=window.event;return e&&e.type===`popstate`?e===ef?!1:(ef=e,!0):(ef=null,!1)}var nf=typeof setTimeout==`function`?setTimeout:void 0,rf=typeof clearTimeout==`function`?clearTimeout:void 0,af=typeof Promise==`function`?Promise:void 0,of=typeof queueMicrotask==`function`?queueMicrotask:af===void 0?nf:function(e){return af.resolve(null).then(e).catch(sf)};function sf(e){setTimeout(function(){throw e})}function cf(e){return e===`head`}function lf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Cf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Cf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[lt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Cf(e.ownerDocument.body);n=i}while(n);Hp(t)}function uf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function df(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:df(n),ut(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function ff(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[lt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=vf(e.nextSibling),e===null)break}return null}function pf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=vf(e.nextSibling),e===null))return null;return e}function mf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=vf(e.nextSibling),e===null))return null;return e}function hf(e){return e.data===`$?`||e.data===`$~`}function gf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function _f(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function vf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var yf=null;function bf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return vf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function xf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Sf(e,t,n){switch(t=Xd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Cf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ut(e)}var wf=new Map,Tf=new Set;function Ef(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Df=L.d;L.d={f:Of,r:kf,D:Mf,C:Nf,L:Pf,m:Ff,X:Lf,S:If,M:Rf};function Of(){var e=Df.f(),t=Du();return e||t}function kf(e){var t=ft(e);t!==null&&t.tag===5&&t.type===`form`?Ds(t):Df.r(e)}var Af=typeof document>`u`?null:document;function jf(e,t,n){var r=Af;if(r&&typeof t==`string`&&t){var i=Pt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Tf.has(i)||(Tf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Wd(t,`link`,e),ht(t),r.head.appendChild(t)))}}function Mf(e){Df.D(e),jf(`dns-prefetch`,e,null)}function Nf(e,t){Df.C(e,t),jf(`preconnect`,e,t)}function Pf(e,t,n){Df.L(e,t,n);var r=Af;if(r&&e&&t){var i=`link[rel="preload"][as="`+Pt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Pt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Pt(n.imageSizes)+`"]`)):i+=`[href="`+Pt(e)+`"]`;var a=i;switch(t){case`style`:a=Bf(e);break;case`script`:a=Wf(e)}wf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),wf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Gf(a))||(t=r.createElement(`link`),Wd(t,`link`,e),ht(t),r.head.appendChild(t)))}}function Ff(e,t){Df.m(e,t);var n=Af;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Pt(r)+`"][href="`+Pt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wf(e)}if(!wf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),wf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gf(a)))return}r=n.createElement(`link`),Wd(r,`link`,e),ht(r),n.head.appendChild(r)}}}function If(e,t,n){Df.S(e,t,n);var r=Af;if(r&&e){var i=mt(r).hoistableStyles,a=Bf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=wf.get(a))&&Jf(e,n);var c=o=r.createElement(`link`);ht(c),Wd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lf(e,t){Df.X(e,t);var n=Af;if(n&&e){var r=mt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),ht(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t){Df.M(e,t);var n=Af;if(n&&e){var r=mt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),ht(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t,n,r){var a=(a=ae.current)?Ef(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Bf(n.href),n=mt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Bf(n.href);var o=mt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),wf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wf.set(e,n),o||Uf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Wf(n),n=mt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Bf(e){return`href="`+Pt(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Uf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Wd(t,`link`,n),ht(t),e.head.appendChild(t))}function Wf(e){return`[src="`+Pt(e)+`"]`}function Gf(e){return`script[async]`+e}function Kf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Pt(n.href)+`"]`);if(r)return t.instance=r,ht(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ht(r),Wd(r,`style`,a),qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bf(n.href);var o=e.querySelector(Vf(a));if(o)return t.state.loading|=4,t.instance=o,ht(o),o;r=Hf(n),(a=wf.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),ht(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Wd(o,`link`,r),t.state.loading|=4,qf(o,n.precedence,e),t.instance=o;case`script`:return o=Wf(n.src),(a=e.querySelector(Gf(o)))?(t.instance=a,ht(a),a):(r=n,(a=wf.get(o))&&(r=f({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ht(a),Wd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,qf(r,n.precedence,e));return t.instance}function qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Jf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Yf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Xf=null;function Zf(e,t,n){if(Xf===null){var r=new Map,i=Xf=new Map;i.set(n,r)}else i=Xf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[lt]||a[nt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Qf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Bf(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ip.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ht(a);return}a=t.ownerDocument||t,r=Hf(r),(i=wf.get(i))&&Jf(r,i),a=a.createElement(`link`),ht(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Wd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ip.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&op(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&op(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&np===0&&(np=62500*qd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&op(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ip(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)op(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ap=null;function op(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ap=new Map,t.forEach(sp,e),ap=null,ip.call(e))}function sp(e,t){if(!(t.state.loading&4)){var n=ap.get(e);if(n)var r=n.get(null);else{n=new Map,ap.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ip.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var cp={$$typeof:C,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function lp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ge(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ge(0),this.hiddenUpdates=Ge(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function up(e,t,n,r,i,a,o,s,c,l,u,d){return e=new lp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ii(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ra(a),e}function dp(e){return e?(e=ni,e):ni}function fp(e,t,n,r,i,a){i=dp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ba(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Va(e,r,t),n!==null&&(Su(n,e,t),Ha(n,e,t))}function pp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function mp(e,t){pp(e,t),(e=e.alternate)&&pp(e,t)}function hp(e){if(e.tag===13||e.tag===31){var t=$r(e,67108864);t!==null&&Su(t,e,67108864),mp(e,67108864)}}function gp(e){if(e.tag===13||e.tag===31){var t=bu();t=Ze(t);var n=$r(e,t);n!==null&&Su(n,e,t),mp(e,t)}}var _p=!0;function vp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,bp(e,t,n,r)}finally{L.p=a,I.T=i}}function yp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,bp(e,t,n,r)}finally{L.p=a,I.T=i}}function bp(e,t,n,r){if(_p){var i=xp(r);if(i===null)Nd(e,t,r,Sp,n),Np(e,r);else if(W(i,e,t,n,r))r.stopPropagation();else if(Np(e,r),t&4&&-1<Mp.indexOf(e)){for(;i!==null;){var a=ft(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ve(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Pe(o);s.entanglements[1]|=c,o&=~c}dd(a),!(Vl&6)&&(cu=Se()+500,fd(0,!1))}}break;case 31:case 13:s=$r(a,2),s!==null&&Su(s,a,2),Du(),mp(a,2)}if(a=xp(r),a===null&&Nd(e,t,r,Sp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Nd(e,t,r,null,n)}}function xp(e){return e=Zt(e),Cp(e)}var Sp=null;function Cp(e){if(Sp=null,e=dt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Sp=e,null}function wp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ce()){case we:return 2;case Te:return 8;case Ee:case De:return 32;case Oe:return 268435456;default:return 32}default:return 32}}var Tp=!1,Ep=null,Dp=null,Op=null,kp=new Map,Ap=new Map,jp=[],Mp=`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 Np(e,t){switch(e){case`focusin`:case`focusout`:Ep=null;break;case`dragenter`:case`dragleave`:Dp=null;break;case`mouseover`:case`mouseout`:Op=null;break;case`pointerover`:case`pointerout`:kp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Ap.delete(t.pointerId)}}function Pp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ft(t),t!==null&&hp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function W(e,t,n,r,i){switch(t){case`focusin`:return Ep=Pp(Ep,e,t,n,r,i),!0;case`dragenter`:return Dp=Pp(Dp,e,t,n,r,i),!0;case`mouseover`:return Op=Pp(Op,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return kp.set(a,Pp(kp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Ap.set(a,Pp(Ap.get(a)||null,e,t,n,r,i)),!0}return!1}function Fp(e){var t=dt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,et(e.priority,function(){gp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,et(e.priority,function(){gp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ip(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Xt=r,n.target.dispatchEvent(r),Xt=null}else return t=ft(n),t!==null&&hp(t),e.blockedOn=n,!1;t.shift()}return!0}function Lp(e,t,n){Ip(e)&&n.delete(t)}function Rp(){Tp=!1,Ep!==null&&Ip(Ep)&&(Ep=null),Dp!==null&&Ip(Dp)&&(Dp=null),Op!==null&&Ip(Op)&&(Op=null),kp.forEach(Lp),Ap.forEach(Lp)}function zp(e,n){e.blockedOn===n&&(e.blockedOn=null,Tp||(Tp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rp)))}var Bp=null;function Vp(e){Bp!==e&&(Bp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bp===e&&(Bp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Cp(r||n)===null)continue;break}var a=ft(n);a!==null&&(e.splice(t,3),t-=3,Ts(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hp(e){function t(t){return zp(t,e)}Ep!==null&&zp(Ep,e),Dp!==null&&zp(Dp,e),Op!==null&&zp(Op,e),kp.forEach(t),Ap.forEach(t);for(var n=0;n<jp.length;n++){var r=jp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<jp.length&&(n=jp[0],n.blockedOn===null);)Fp(n),n.blockedOn===null&&jp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[rt]||null;if(typeof a==`function`)o||Vp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[rt]||null)s=o.formAction;else if(Cp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vp(n)}}}function Up(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wp(e){this._internalRoot=e}Gp.prototype.render=Wp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;fp(n,bu(),e,t,null,null)},Gp.prototype.unmount=Wp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fp(e.current,2,null,e,null,null),Du(),t[it]=null}};function Gp(e){this._internalRoot=e}Gp.prototype.unstable_scheduleHydration=function(e){if(e){var t=$e();e={blockedOn:null,target:e,priority:t};for(var n=0;n<jp.length&&t!==0&&t<jp[n].priority;n++);jp.splice(n,0,e),n===0&&Fp(e)}};var Kp=n.version;if(Kp!==`19.2.7`)throw Error(i(527,Kp,`19.2.7`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var qp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jp.isDisabled&&Jp.supportsFiber)try{je=Jp.inject(qp),Me=Jp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=qs,s=Js,c=Ys;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=up(e,1,!1,null,null,n,r,null,o,s,c,Up),e[it]=t.current,jd(e),new Wp(t)}})),y=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=v()})),b=u(p(),1),x=y(),S=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(){}},C=new class extends S{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let 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(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},w={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},T=new class{#e=w;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)}};function E(e){setTimeout(e,0)}var D=typeof window>`u`||`Deno`in globalThis;function O(){}function k(e,t){return typeof e==`function`?e(t):e}function A(e){return typeof e==`number`&&e>=0&&e!==1/0}function j(e,t){return Math.max(e+(t||0)-Date.now(),0)}function M(e,t){return typeof e==`function`?e(t):e}function N(e,t){return typeof e==`function`?e(t):e}function P(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==I(o,t.options))return!1}else if(!ee(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function F(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(L(t.options.mutationKey)!==L(a))return!1}else if(!ee(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function I(e,t){return(t?.queryKeyHashFn||L)(e)}function L(e){return JSON.stringify(e,(e,t)=>B(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function ee(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>ee(e[n],t[n])):!1}var te=Object.prototype.hasOwnProperty;function ne(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=z(e)&&z(t);if(!r&&!(B(e)&&B(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:te.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=ne(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function R(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function z(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function B(e){if(!re(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!re(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function re(e){return Object.prototype.toString.call(e)===`[object Object]`}function ie(e){return new Promise(t=>{T.setTimeout(t,e)})}function ae(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ne(e,t)}function oe(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function se(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ce=Symbol();function le(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ce?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ue(e,t){return typeof e==`function`?e(...t):!!e}function de(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var fe=(()=>{let e=()=>D;return{isServer(){return e()},setIsServer(t){e=t}}})();function pe(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var me=E;function V(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=me,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var he=V(),ge=new class extends S{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}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(t=>{t(e)}))}isOnline(){return this.#e}};function _e(e){return Math.min(1e3*2**e,3e4)}function ve(e){return(e??`online`)!==`online`||ge.isOnline()}var ye=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function be(e){let t=!1,n=0,r,i=pe(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new ye(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>C.isFocused()&&(e.networkMode===`always`||ge.isOnline())&&e.canRun(),u=()=>ve(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(fe.isServer()?0:3),o=e.retryDelay??_e,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),ie(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var xe=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),A(this.gcTime)&&(this.#e=T.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(fe.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(T.clearTimeout(this.#e),this.#e=void 0)}};function Se(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{de(e,()=>t.signal,()=>n=!0)},u=le(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?se:oe;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?we:Ce,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Ce(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Ce(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function we(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Te=class extends xe{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Oe(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Oe(this.options);e.data!==void 0&&(this.setState(De(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=ae(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(O).catch(O):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>N(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ce||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>M(e.options.staleTime,this)===`static`)}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:!j(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.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.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=le(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Se(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=be({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ye&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ye){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Ee(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...De(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),he.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Ee(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ve(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function De(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Oe(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ke=class extends S{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=pe(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),je(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Me(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Me(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=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 N(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!R(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Ne(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||N(this.options.enabled,this.#t)!==N(t.enabled,this.#t)||M(this.options.staleTime,this.#t)!==M(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||N(this.options.enabled,this.#t)!==N(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Fe(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(O)),t}#g(){this.#b();let e=M(this.options.staleTime,this.#t);if(fe.isServer()||this.#r.isStale||!A(e))return;let t=j(this.#r.dataUpdatedAt,e)+1;this.#d=T.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(fe.isServer()||N(this.options.enabled,this.#t)===!1||!A(this.#p)||this.#p===0)&&(this.#f=T.setInterval(()=>{(this.options.refetchIntervalInBackground||C.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(T.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(T.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&je(e,t),o=i&&Ne(e,n,t,r);(a||o)&&(l={...l,...Ee(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=ae(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=ae(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Pe(e,t),refetch:this.refetch,promise:this.#o,isEnabled:N(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=pe();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!R(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){he.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Ae(e,t){return N(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&N(t.retryOnMount,e)===!1)}function je(e,t){return Ae(e,t)||e.state.data!==void 0&&Me(e,t,t.refetchOnMount)}function Me(e,t,n){if(N(t.enabled,e)!==!1&&M(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Pe(e,t)}return!1}function Ne(e,t,n,r){return(e!==t||N(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Pe(e,n)}function Pe(e,t){return N(t.enabled,e)!==!1&&e.isStaleByTime(M(t.staleTime,e))}function Fe(e,t){return!R(e.getCurrentResult(),t)}var Ie=class extends xe{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Le(),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.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=be({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,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{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),he.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Le(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Re=class extends S{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Ie({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=ze(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=ze(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=ze(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=ze(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){he.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){let t={exact:!0,...e};return this.getAll().find(e=>F(t,e))}findAll(e={}){return this.getAll().filter(t=>F(e,t))}notify(e){he.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return he.batch(()=>Promise.all(e.map(e=>e.continue().catch(O))))}};function ze(e){return e.options.scope?.id}var Be=class extends S{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),R(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&L(t.mutationKey)!==L(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Le();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){he.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Ve=class extends S{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??I(r,t),a=this.get(i);return a||(a=new Te({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){he.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>P(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>P(e,t)):t}notify(e){he.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){he.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){he.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},He=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Ve,this.#t=e.mutationCache||new Re,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=C.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ge.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(M(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=k(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return he.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;he.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return he.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=he.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(O).catch(O)}invalidateQueries(e,t={}){return he.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=he.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(O)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(O)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(M(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(O).catch(O)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(O).catch(O)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return ge.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.#r.set(L(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{ee(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(L(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{ee(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=I(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===ce&&(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()}},Ue=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),H=s(((e,t)=>{t.exports=Ue()}))(),We=b.createContext(void 0),Ge=e=>{let t=b.useContext(We);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Ke=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,H.jsx)(We.Provider,{value:e,children:t})),qe=b.createContext(!1),Je=()=>b.useContext(qe);qe.Provider;function Ye(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xe=b.createContext(Ye()),Ze=()=>b.useContext(Xe),Qe=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?ue(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},$e=e=>{b.useEffect(()=>{e.clearReset()},[e])},et=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||ue(n,[e.error,r])),tt=(e,t)=>t.state.data===void 0,nt=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},rt=(e,t)=>e.isLoading&&e.isFetching&&!t,it=(e,t)=>e?.suspense&&t.isPending,at=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ot(e,t,n){let r=Je(),i=Ze(),a=Ge(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,nt(o),Qe(o,i,s),$e(i);let l=!a.getQueryCache().get(o.queryHash),[u]=b.useState(()=>new t(a,o)),d=u.getOptimisticResult(o),f=!r&&c;if(b.useSyncExternalStore(b.useCallback(e=>{let t=f?u.subscribe(he.batchCalls(e)):O;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),b.useEffect(()=>{u.setOptions(o)},[o,u]),it(o,d))throw at(o,u,i);if(et({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!fe.isServer()&&rt(d,r)&&(l?at(o,u,i):s?.promise)?.catch(O).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function st(e,t){return ot({...e,enabled:!0,suspense:!0,throwOnError:tt,placeholderData:void 0},ke,t)}function ct(e,t){let n=Ge(t),[r]=b.useState(()=>new Be(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);let i=b.useSyncExternalStore(b.useCallback(e=>r.subscribe(he.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=b.useCallback((e,t)=>{r.mutate(e,t).catch(O)},[r]);if(i.error&&ue(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var lt=null;function ut(e,...t){lt?.(e,t)}function dt(e,...t){lt?.(e,t,!0)}var ft={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.`,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 pt(e){return`[nuqs] ${ft[e]}
10
+ See https://nuqs.dev/NUQS-${e}`}function mt(e){if(e.size===0)return``;let t=[];for(let[n,r]of e.entries()){let e=n.replace(/#/g,`%23`).replace(/&/g,`%26`).replace(/\+/g,`%2B`).replace(/=/g,`%3D`).replace(/\?/g,`%3F`);t.push(`${e}=${ht(r)}`)}return`?`+t.join(`&`)}function ht(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,e=>encodeURIComponent(e))}var gt=`2.9.1`,_t={};function vt(e,t){let n=Symbol.for(`nuqs.${gt}.${e}`),r=globalThis;if(r[n]!=null)return r[n];let i=Object.isExtensible(r)?r:_t;return i[n]??=t()}function yt(e,t,n){let r=vt(e,()=>new WeakMap);return r.has(t)||r.set(t,n()),r.get(t)}var bt=yt(`adapter-context`,b.createContext,()=>{let e=(0,b.createContext)({useAdapter(){throw Error(pt(404))}});return e.displayName=`NuqsAdapterContext`,e});typeof window<`u`&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==bt&&console.error(pt(303)),window.__NuqsAdapterContext=bt);function xt(e){return({children:t,defaultOptions:n,processUrlSearchParams:r,...i})=>(0,b.createElement)(bt.Provider,{...i,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:r}},t)}function St(e){let t=(0,b.useContext)(bt);if(!(`useAdapter`in t))throw Error(pt(404));return t.useAdapter(e)}var Ct=()=>(0,b.useContext)(bt).defaultOptions,wt=()=>(0,b.useContext)(bt).processUrlSearchParams;function Tt(e,t){return e===t?!0:e===null||t===null||typeof e==`string`||typeof t==`string`||e.length!==t.length?!1:e.every((e,n)=>e===t[n])}function Et(e,t,n){if(t.length===0)return e;let r=n?new URLSearchParams(e):e;for(let n of Array.from(e.keys()))t.includes(n)||r.delete(n);return r}function Dt(){if(typeof window>`u`||!window.GestureEvent)return 50;try{let e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}function Ot(e){return{method:`throttle`,timeMs:e}}var kt=Ot(Dt());function At(e){return e===null||Array.isArray(e)&&e.length===0}function jt(e,t,n){if(typeof n==`string`)e.set(t,n);else{e.delete(t);for(let r of n)e.append(t,r);e.has(t)||e.set(t,``)}return e}function Mt(){let e=new Map;return{on(t,n){let r=e.get(t)||[];return r.push(n),e.set(t,r),()=>this.off(t,n)},off(t,n){let r=e.get(t);r&&e.set(t,r.filter(e=>e!==n))},emit(t,n){e.get(t)?.forEach(e=>e(n))}}}function Nt(e,t,n){function r(){e(),n.removeEventListener(`abort`,a)}let i=setTimeout(r,t);function a(){clearTimeout(i),n.removeEventListener(`abort`,a)}n.addEventListener(`abort`,a)}function Pt(){let e=Promise;if(Promise.hasOwnProperty(`withResolvers`))return Promise.withResolvers();let t=()=>{},n=()=>{};return{promise:new e((e,r)=>{t=e,n=r}),resolve:t,reject:n}}function Ft(e,t){let n=t;for(let t=e.length-1;t>=0;t--){let r=e[t];if(!r)continue;let i=n;n=()=>r(i)}n()}function It(){return new URLSearchParams(location.search)}var Lt=class{updateMap=new Map;options={history:`replace`,scroll:!1,shallow:!0};timeMs=kt.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:e,query:t,options:n},r=kt.timeMs){this.resetQueueOnNextPush&&=(this.reset(),!1),ut(7,e,t,n),this.updateMap.set(e,t),n.history===`push`&&(this.options.history=`push`),n.scroll&&(this.options.scroll=!0),n.shallow===!1&&(this.options.shallow=!1),n.startTransition&&this.transitions.add(n.startTransition),(!Number.isFinite(this.timeMs)||r>this.timeMs)&&(this.timeMs=r)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=It}){return this.resolvers?.promise??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=It,rateLimitFactor:t=1,...n},r){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return ut(8),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=Pt();let i=()=>{this.lastFlushedAt=performance.now();let[t,i]=this.applyPendingUpdates({...n,autoResetQueueOnUpdate:n.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},r);i===null?(this.resolvers.resolve(t),this.resetQueueOnNextPush=!0):this.resolvers.reject(t),this.resolvers=null};return Nt(()=>{let e=performance.now()-this.lastFlushedAt,n=this.timeMs,r=t*Math.max(0,n-e);ut(9,r,n,t),r===0?i():Nt(i,r,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(){let e=Array.from(this.updateMap.keys());return ut(10,JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:`replace`,scroll:!1,shallow:!0},this.timeMs=kt.timeMs,e}applyPendingUpdates(e,t){let{updateUrl:n,getSearchParamsSnapshot:r}=e,i=r();if(ut(11,this.updateMap.size,i.toString()),this.updateMap.size===0)return[i,null];let a=Array.from(this.updateMap.entries()),o={...this.options},s=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),ut(12,a,o);for(let[e,t]of a)t===null?i.delete(e):i=jt(i,e,t);t&&(i=t(i));try{return Ft(s,()=>n(i,o)),[i,null]}catch(e){return console.error(pt(429),a.map(([e])=>e).join(),e),[i,e]}}},Rt=vt(`throttle-queue`,()=>new Lt);function zt(e,t,n){let r=(0,b.useCallback)(()=>{let t=Object.fromEntries(e.map(e=>[e,n(e)]));return[JSON.stringify(t),t]},[e.join(`,`),n]),i=(0,b.useRef)(null);return i.current===null&&(i.current=r()),(0,b.useSyncExternalStore)((0,b.useCallback)(n=>{let r=e.map(e=>t(e,n));return()=>r.forEach(e=>e())},[e.join(`,`),t]),()=>{let[e,t]=r();return i.current[0]===e?i.current[1]:(i.current=[e,t],t)},()=>i.current[1])}var Bt=class{callback;resolvers=Pt();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,Nt(()=>{let t=this.resolvers;try{ut(13,e);let n=this.callback(e);ut(14,this.queuedValue),this.queuedValue=void 0,this.resolvers=Pt(),n.then(e=>t.resolve(e)).catch(e=>t.reject(e))}catch(e){this.queuedValue=void 0,t.reject(e)}},t,this.controller.signal),this.resolvers.promise}},Vt=class{throttleQueue;queues=new Map;queuedQuerySync=Mt();constructor(e=new Lt){this.throttleQueue=e}push(e,t,n,r){if(!Number.isFinite(t)){let e=n.getSearchParamsSnapshot??It;return Promise.resolve(e())}let i=e.key;if(!this.queues.has(i)){ut(15,i);let e=new Bt(e=>(this.throttleQueue.push(e),this.throttleQueue.flush(n,r).finally(()=>{this.queues.get(e.key)?.queuedValue===void 0&&(ut(16,e.key),this.queues.delete(e.key)),this.queuedQuerySync.emit(e.key)})));this.queues.set(i,e)}ut(17,e);let a=this.queues.get(i).push(e,t);return this.queuedQuerySync.emit(i),a}abort(e){let t=this.queues.get(e);return t?(ut(18,e,t.queuedValue?.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),e=>(e.then(t.resolvers.resolve,t.resolvers.reject),e)):e=>e}abortAll(){for(let[e,t]of this.queues.entries())ut(18,e,t.queuedValue?.query),t.abort(),t.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(e);this.queues.clear()}getQueuedQuery(e){let t=this.queues.get(e)?.queuedValue?.query;return t===void 0?this.throttleQueue.getQueuedQuery(e):t}},Ht=vt(`debounce-controller`,()=>new Vt(Rt));function Ut(e){return zt(e,(e,t)=>Ht.queuedQuerySync.on(e,t),e=>Ht.getQueuedQuery(e))}function Wt(e){return vt(`history-emitter.${e}`,()=>Mt())}var Gt=`__nuqs__`,Kt=Wt(`react`);function qt(e){return function(t,n){let r=new URL(location.href);r.search=mt(t),ut(20,`react`,r),e&&n.shallow===!1?(n.history===`push`?location.assign:location.replace).call(location,r):(n.history===`push`?history.pushState:history.replaceState).call(history,history.state,Gt,r),Kt.emit(`update`,t),n.scroll===!0&&window.scrollTo({top:0})}}var Jt=(0,b.createContext)({fullPageNavigationOnShallowFalseUpdates:!1}),Yt=new URLSearchParams;function Xt(){return Yt}function Zt(e){return Kt.on(`update`,e),window.addEventListener(`popstate`,e),()=>{Kt.off(`update`,e),window.removeEventListener(`popstate`,e)}}function Qt(e){let{fullPageNavigationOnShallowFalseUpdates:t}=(0,b.useContext)(Jt),n=(0,b.useRef)(null);return{searchParams:(0,b.useSyncExternalStore)(Zt,()=>{let t=Et(new URLSearchParams(location.search),e,!1),r=t.toString();return n.current?.key===r?n.current.search:(n.current={key:r,search:t},t)},Xt),updateUrl:(0,b.useMemo)(()=>qt(t),[t])}}var $t=xt(Qt);function en({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...n}){return(0,b.createElement)(Jt.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},(0,b.createElement)($t,{...n,children:e}))}function tn(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=tn(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function nn(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=tn(e))&&(r&&(r+=` `),r+=t);return r}var rn=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},an=(e,t)=>({classGroupId:e,validator:t}),on=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),sn=`-`,cn=[],ln=`arbitrary..`,un=e=>{let t=pn(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return fn(e);let n=e.split(sn);return dn(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?rn(i,t):t:i||cn}return n[e]||cn}}},dn=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=dn(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(sn):e.slice(t).join(sn),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},fn=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?ln+r:void 0})(),pn=e=>{let{theme:t,classGroups:n}=e;return mn(n,t)},mn=(e,t)=>{let n=on();for(let r in e){let i=e[r];hn(i,n,r,t)}return n},hn=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];gn(i,t,n,r)}},gn=(e,t,n,r)=>{if(typeof e==`string`){_n(e,t,n);return}if(typeof e==`function`){vn(e,t,n,r);return}yn(e,t,n,r)},_n=(e,t,n)=>{let r=e===``?t:bn(t,e);r.classGroupId=n},vn=(e,t,n,r)=>{if(xn(e)){hn(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(an(n,e))},yn=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];hn(o,bn(t,a),n,r)}},bn=(e,t)=>{let n=e,r=t.split(sn),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=on(),n.nextPart.set(t,i)),n=i}return n},xn=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Sn=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Cn=`!`,wn=`:`,Tn=[],En=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Dn=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===wn){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Cn)?(c=s.slice(0,-1),l=!0):s.startsWith(Cn)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return En(t,l,c,u)};if(t){let e=t+wn,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):En(Tn,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},On=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},kn=e=>({cache:Sn(e.cacheSize),parseClassName:Dn(e),sortModifiers:On(e),postfixLookupClassGroupIds:An(e),...un(e)}),An=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},jn=/\s+/,Mn=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(jn),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Cn:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Nn=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Pn(n))&&(i&&(i+=` `),i+=r);return i},Pn=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Pn(e[r]))&&(n&&(n+=` `),n+=t);return n},Fn=(e,...t)=>{let n,r,i,a,o=o=>(n=kn(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Mn(e,n);return i(e,a),a};return a=o,(...e)=>a(Nn(...e))},In=[],Ln=e=>{let t=t=>t[e]||In;return t.isThemeGetter=!0,t},Rn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Bn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Vn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hn=/\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$/,Un=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Wn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Kn=e=>Bn.test(e),qn=e=>!!e&&!Number.isNaN(Number(e)),Jn=e=>!!e&&Number.isInteger(Number(e)),Yn=e=>e.endsWith(`%`)&&qn(e.slice(0,-1)),Xn=e=>Vn.test(e),Zn=()=>!0,Qn=e=>Hn.test(e)&&!Un.test(e),$n=()=>!1,er=e=>Wn.test(e),tr=e=>Gn.test(e),nr=e=>!ar(e)&&!pr(e),rr=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),ir=e=>xr(e,Tr,$n),ar=e=>Rn.test(e),or=e=>xr(e,Er,Qn),sr=e=>xr(e,Dr,qn),cr=e=>xr(e,kr,Zn),lr=e=>xr(e,Or,$n),ur=e=>xr(e,Cr,$n),dr=e=>xr(e,wr,tr),fr=e=>xr(e,Ar,er),pr=e=>zn.test(e),mr=e=>Sr(e,Er),hr=e=>Sr(e,Or),gr=e=>Sr(e,Cr),_r=e=>Sr(e,Tr),vr=e=>Sr(e,wr),yr=e=>Sr(e,Ar,!0),br=e=>Sr(e,kr,!0),xr=(e,t,n)=>{let r=Rn.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Sr=(e,t,n=!1)=>{let r=zn.exec(e);return r?r[1]?t(r[1]):n:!1},Cr=e=>e===`position`||e===`percentage`,wr=e=>e===`image`||e===`url`,Tr=e=>e===`length`||e===`size`||e===`bg-size`,Er=e=>e===`length`,Dr=e=>e===`number`,Or=e=>e===`family-name`,kr=e=>e===`number`||e===`weight`,Ar=e=>e===`shadow`,jr=Fn(()=>{let e=Ln(`color`),t=Ln(`font`),n=Ln(`text`),r=Ln(`font-weight`),i=Ln(`tracking`),a=Ln(`leading`),o=Ln(`breakpoint`),s=Ln(`container`),c=Ln(`spacing`),l=Ln(`radius`),u=Ln(`shadow`),d=Ln(`inset-shadow`),f=Ln(`text-shadow`),p=Ln(`drop-shadow`),m=Ln(`blur`),h=Ln(`perspective`),g=Ln(`aspect`),_=Ln(`ease`),v=Ln(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),pr,ar],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[pr,ar,c],T=()=>[Kn,`full`,`auto`,...w()],E=()=>[Jn,`none`,`subgrid`,pr,ar],D=()=>[`auto`,{span:[`full`,Jn,pr,ar]},Jn,pr,ar],O=()=>[Jn,`auto`,pr,ar],k=()=>[`auto`,`min`,`max`,`fr`,pr,ar],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[Kn,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[Kn,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[Kn,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,pr,ar],L=()=>[...b(),gr,ur,{position:[pr,ar]}],ee=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],te=()=>[`auto`,`cover`,`contain`,_r,ir,{size:[pr,ar]}],ne=()=>[Yn,mr,or],R=()=>[``,`none`,`full`,l,pr,ar],z=()=>[``,qn,mr,or],B=()=>[`solid`,`dashed`,`dotted`,`double`],re=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ie=()=>[qn,Yn,gr,ur],ae=()=>[``,`none`,m,pr,ar],oe=()=>[`none`,qn,pr,ar],se=()=>[`none`,qn,pr,ar],ce=()=>[qn,pr,ar],le=()=>[Kn,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Xn],breakpoint:[Xn],color:[Zn],container:[Xn],"drop-shadow":[Xn],ease:[`in`,`out`,`in-out`],font:[nr],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Xn],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Xn],shadow:[Xn],spacing:[`px`,qn],text:[Xn],"text-shadow":[Xn],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Kn,ar,pr,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,pr,ar]}],"container-named":[rr],columns:[{columns:[qn,ar,pr,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Jn,`auto`,pr,ar]}],basis:[{basis:[Kn,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[qn,Kn,`auto`,`initial`,`none`,ar]}],grow:[{grow:[``,qn,pr,ar]}],shrink:[{shrink:[``,qn,pr,ar]}],order:[{order:[Jn,`first`,`last`,`none`,pr,ar]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,mr,or]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,br,cr]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Yn,ar]}],"font-family":[{font:[hr,lr,t]}],"font-features":[{"font-features":[ar]}],"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:[i,pr,ar]}],"line-clamp":[{"line-clamp":[qn,`none`,pr,sr]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,pr,ar]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,pr,ar]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...B(),`wavy`]}],"text-decoration-thickness":[{decoration:[qn,`from-font`,`auto`,pr,or]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[qn,`auto`,pr,ar]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Jn,pr,ar]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,pr,ar]}],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`,pr,ar]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:te()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Jn,pr,ar],radial:[``,pr,ar],conic:[Jn,pr,ar]},vr,dr]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-bs":[{"border-bs":z()}],"border-w-be":[{"border-be":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":z()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...B(),`hidden`,`none`]}],"divide-style":[{divide:[...B(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...B(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[qn,pr,ar]}],"outline-w":[{outline:[``,qn,mr,or]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,yr,fr]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,yr,fr]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:z()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[qn,or]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,yr,fr]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[qn,pr,ar]}],"mix-blend":[{"mix-blend":[...re(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":re()}],"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":[qn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[pr,ar]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[qn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,pr,ar]}],filter:[{filter:[``,`none`,pr,ar]}],blur:[{blur:ae()}],brightness:[{brightness:[qn,pr,ar]}],contrast:[{contrast:[qn,pr,ar]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,yr,fr]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,qn,pr,ar]}],"hue-rotate":[{"hue-rotate":[qn,pr,ar]}],invert:[{invert:[``,qn,pr,ar]}],saturate:[{saturate:[qn,pr,ar]}],sepia:[{sepia:[``,qn,pr,ar]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,pr,ar]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[qn,pr,ar]}],"backdrop-contrast":[{"backdrop-contrast":[qn,pr,ar]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,qn,pr,ar]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qn,pr,ar]}],"backdrop-invert":[{"backdrop-invert":[``,qn,pr,ar]}],"backdrop-opacity":[{"backdrop-opacity":[qn,pr,ar]}],"backdrop-saturate":[{"backdrop-saturate":[qn,pr,ar]}],"backdrop-sepia":[{"backdrop-sepia":[``,qn,pr,ar]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,pr,ar]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[qn,`initial`,pr,ar]}],ease:[{ease:[`linear`,`initial`,_,pr,ar]}],delay:[{delay:[qn,pr,ar]}],animate:[{animate:[`none`,v,pr,ar]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,pr,ar]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":[`scale-3d`],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[pr,ar,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":[`translate-none`],zoom:[{zoom:[Jn,pr,ar]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,pr,ar]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,pr,ar]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[qn,mr,or,sr]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],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`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Mr(...e){return jr(nn(e))}var Nr=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Pr=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Fr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ir=e=>{let t=Fr(e);return t.charAt(0).toUpperCase()+t.slice(1)},Lr={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`},Rr=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},zr=(0,b.createContext)({}),Br=()=>(0,b.useContext)(zr),Vr=(0,b.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Br()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,b.createElement)(`svg`,{ref:c,...Lr,width:t??l??Lr.width,height:t??l??Lr.height,stroke:e??f,strokeWidth:m,className:Nr(`lucide`,p,i),...!a&&!Rr(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Hr=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)(Vr,{ref:i,iconNode:t,className:Nr(`lucide-${Pr(Ir(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Ir(e),n},Ur=Hr(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Wr=Hr(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Gr=Hr(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),Kr=Hr(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),qr=Hr(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Jr=Hr(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Yr=Hr(`clipboard-check`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`m9 14 2 2 4-4`,key:`df797q`}]]),Xr=Hr(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),Zr=Hr(`copy`,[[`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`}]]),Qr=Hr(`external-link`,[[`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`}]]),$r=Hr(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),ei=Hr(`file-braces`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),ti=Hr(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),ni=Hr(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),ri=Hr(`languages`,[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),ii=Hr(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ai=Hr(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]),oi=Hr(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),si=Hr(`log-out`,[[`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`}]]),ci=Hr(`logs`,[[`path`,{d:`M3 5h1`,key:`1mv5vm`}],[`path`,{d:`M3 12h1`,key:`lp3yf2`}],[`path`,{d:`M3 19h1`,key:`w6f3n9`}],[`path`,{d:`M8 5h1`,key:`1nxr5w`}],[`path`,{d:`M8 12h1`,key:`1con00`}],[`path`,{d:`M8 19h1`,key:`k7p10e`}],[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}]]),li=Hr(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),ui=Hr(`messages-square`,[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]),di=Hr(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),fi=Hr(`moon`,[[`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`}]]),pi=Hr(`picture-in-picture-2`,[[`path`,{d:`M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4`,key:`daa4of`}],[`rect`,{width:`10`,height:`7`,x:`12`,y:`13`,rx:`2`,key:`1nb8gs`}]]),mi=Hr(`play`,[[`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`}]]),hi=Hr(`plug-zap`,[[`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`}]]),gi=Hr(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),_i=Hr(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),vi=Hr(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),yi=Hr(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),bi=Hr(`sliders-vertical`,[[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M12 21v-9`,key:`17s77i`}],[`path`,{d:`M12 8V3`,key:`13r4qs`}],[`path`,{d:`M17 16h4`,key:`h1uq16`}],[`path`,{d:`M19 12V3`,key:`o1uvq1`}],[`path`,{d:`M19 21v-5`,key:`qua636`}],[`path`,{d:`M3 14h4`,key:`bcjad9`}],[`path`,{d:`M5 10V3`,key:`cb8scm`}],[`path`,{d:`M5 21v-7`,key:`1w1uti`}]]),xi=Hr(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),Si=Hr(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),Ci=Hr(`square-split-vertical`,[[`path`,{d:`M5 8V5c0-1 1-2 2-2h10c1 0 2 1 2 2v3`,key:`1pi83i`}],[`path`,{d:`M19 16v3c0 1-1 2-2 2H7c-1 0-2-1-2-2v-3`,key:`ido5k7`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]),wi=Hr(`sun`,[[`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`}]]),Ti=Hr(`trash-2`,[[`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`}]]),Ei=Hr(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Di=Hr(`unplug`,[[`path`,{d:`m19 5 3-3`,key:`yk6iyv`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`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:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z`,key:`1snsnr`}]]),Oi=Hr(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ki=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Ai=nn,ji=(e,t)=>n=>{if(t?.variants==null)return Ai(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=ki(t)||ki(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Ai(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Mi=Object.defineProperty,Ni=(e,t)=>Mi(e,`name`,{value:t,configurable:!0});function Pi(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Ni(Pi,`setRef`);function Fi(...e){return t=>{let n=!1,r=e.map(e=>{let r=Pi(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Pi(e[t],null)}}}}Ni(Fi,`composeRefs`);function Ii(...e){return b.useCallback(Fi(...e),e)}Ni(Ii,`useComposedRefs`);var Li=Object.defineProperty,Ri=(e,t)=>Li(e,`name`,{value:t,configurable:!0}),zi=Ri(((e,t)=>{let n={...t};for(let r in t){let i=e[r],a=t[r];if(/^on[A-Z]/.test(r))if(i&&a){let e=typeof i==`function`,t=typeof a==`function`;n[r]=(...n)=>{let r=t?a(...n):void 0;return e&&i(...n),r}}else i&&(n[r]=i);else r===`style`?n[r]={...typeof i==`object`?i:null,...typeof a==`object`?a:null}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=Bi(a,i))}return{...e,...n}}),`mergeProps`);function Bi(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Ri(Bi,`concatAriaDescribedby`);var Vi=b.createContext(zi);Vi.displayName=`SlotContext`;function Hi(e){let t=b.forwardRef((t,n)=>{let r=b.useContext(Vi),{children:i,mergeProps:a=r,...o}=t,s=null,c=!1,l=[];Zi(i)&&typeof ta==`function`&&(i=ta(i._payload)),b.Children.forEach(i,e=>{if(Yi(e)){c=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Zi(n)&&typeof ta==`function`&&(n=ta(n._payload)),s=qi(t,n),l.push(s?.props?.children)}else l.push(e)}),s?s=b.cloneElement(s,void 0,l):!c&&b.Children.count(i)===1&&b.isValidElement(i)&&(s=i);let u=s?Ji(s):void 0,d=Ii(n,u);if(!s){if(i||i===0)throw Error(c?ea(e):$i(e));return i}let f=a(o,s.props??{});return s.type!==b.Fragment&&(f.ref=n?d:u),b.cloneElement(s,f)});return t.displayName=`${e}.Slot`,t}Ri(Hi,`createSlot`);var Ui=Hi(`Slot`),Wi=Symbol.for(`radix.slottable`);function Gi(e){let t=Ri(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Wi,t}Ri(Gi,`createSlottable`);var Ki=Gi(`Slottable`),qi=Ri((e,t)=>{if(`child`in e.props){let t=e.props.child;return b.isValidElement(t)?b.cloneElement(t,void 0,e.props.children(t.props.children)):null}return b.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function Ji(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Ri(Ji,`getElementRef`);function Yi(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Wi}Ri(Yi,`isSlottable`);var Xi=Symbol.for(`react.lazy`);function Zi(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Xi&&`_payload`in e&&Qi(e._payload)}Ri(Zi,`isLazyComponent`);function Qi(e){return typeof e==`object`&&!!e&&`then`in e}Ri(Qi,`isPromiseLike`);var $i=Ri(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),ea=Ri(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),ta=b.use,na=ji([`inline-flex items-center justify-center gap-1 whitespace-nowrap`,`h-8 px-2 rounded-md`,`font-medium`,`transition-colors`,`outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,`[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0`,`disabled:pointer-events-none disabled:opacity-50`].join(` `),{variants:{variant:{primary:[`bg-primary text-primary-foreground`,`[@media(hover:hover)]:hover:bg-primary-hover`].join(` `),secondary:[`border border-border bg-background text-muted-foreground`,`[@media(hover:hover)]:hover:bg-background-hover [@media(hover:hover)]:hover:text-muted-foreground-hover`].join(` `),tertiary:[`text-muted-foreground`,`[@media(hover:hover)]:hover:bg-background-hover [@media(hover:hover)]:hover:text-muted-foreground-hover`,`focus-visible:bg-background`].join(` `),link:[`h-auto px-0 rounded-xs underline-offset-4`,`text-link`,`[@media(hover:hover)]:hover:underline`,`focus-visible:bg-background`].join(` `),"link-muted":[`h-auto px-0 rounded-xs underline-offset-4`,`text-link-muted`,`[@media(hover:hover)]:hover:underline`,`focus-visible:bg-background`].join(` `),destructive:[`bg-destructive text-destructive-foreground`,`[@media(hover:hover)]:hover:bg-destructive-hover`].join(` `),cta:[`button-cta`,`h-9 px-4 gap-2 rounded-md`,`dark:bg-inverted text-foreground`,`transition-[transform,filter] duration-300 ease-out`,`active:scale-[0.99]`].join(` `)},size:{default:`type-text-sm`,icon:`size-8 p-0 type-text-sm`,"icon-rounded":`size-8 p-0 rounded-full type-text-sm`,pill:`h-7 px-3 rounded-full type-text-xs`}},defaultVariants:{variant:`primary`,size:`default`}});function ra({className:e,variant:t,size:n,type:r=`button`,asChild:i=!1,loading:a=!1,icon:o,iconTrailing:s,disabled:c,children:l,...u}){return(0,H.jsxs)(i?Ui:`button`,{"data-slot":`button`,className:Mr(na({variant:t,size:n}),e),type:r,disabled:c||a,"aria-busy":a||void 0,...u,children:[a?(0,H.jsx)(ii,{className:`motion-safe:animate-spin`}):o,i?(0,H.jsx)(Ki,{children:l}):l,!a&&s?(0,H.jsx)(`span`,{"data-cta-icon-trailing":!0,children:s}):null]})}function ia(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function aa(e,t){let n=getComputedStyle(e.ownerDocument.documentElement);return t*parseFloat(n.fontSize)}function oa(e){return e/100*window.innerHeight}function sa(e){return e/100*window.innerWidth}function ca(e){switch(typeof e){case`number`:return[e,`px`];case`string`:{let 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 la({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=ca(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=aa(t,i);break;case`em`:r=ia(t,i);break;case`vh`:r=oa(i);break;case`vw`:r=sa(i);break}return r}function ua(e){return parseFloat(e.toFixed(3))}function da({group:e}){let{orientation:t,panels:n}=e;return n.reduce((e,n)=>(e+=t===`horizontal`?n.element.offsetWidth:n.element.offsetHeight,e),0)}function fa(e){let{panels:t}=e,n=da({group:e});return n===0?t.map(e=>({groupResizeBehavior:e.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:e.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:e.panelConstraints.disabled,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let{element:t,panelConstraints:r}=e,i=0;r.collapsedSize!==void 0&&(i=ua(la({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize!==void 0&&(a=ua(la({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize!==void 0&&(o=ua(la({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize!==void 0&&(s=ua(la({groupSize:n,panelElement:t,styleProp:r.maxSize})/n*100)),{groupResizeBehavior:r.groupResizeBehavior,collapsedSize:i,collapsible:r.collapsible===!0,defaultSize:a,disabled:r.disabled,minSize:o,maxSize:s,panelId:e.id}})}function pa(e,t=`Assertion error`){if(!e)throw Error(t)}function ma(e,t){return Array.from(t).sort(e===`horizontal`?ha:ga)}function ha(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function ga(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function _a(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function va(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 ya({orientation:e,rects:t,targetRect:n}){let r={x:n.x+n.width/2,y:n.y+n.height/2},i,a=Number.MAX_VALUE;for(let n of t){let{x:t,y:o}=va(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return pa(i,`No rect found`),i}var ba;function xa(){return ba===void 0&&(ba=typeof matchMedia==`function`&&!!matchMedia(`(pointer:coarse)`).matches),ba}function Sa(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=ma(n,Array.from(t.children).filter(_a).map(e=>({element:e}))).map(({element:e})=>e),o=[],s=!1,c=!1,l=-1,u=-1,d=0,f,p=[];{let e=-1;for(let t of a)t.hasAttribute(`data-panel`)&&(e++,t.hasAttribute(`data-disabled`)||(d++,l===-1&&(l=e),u=e))}if(d>1){let t=-1;for(let d of a)if(d.hasAttribute(`data-panel`)){t++;let i=r.find(e=>e.element===d);if(i){if(f){let r=f.element.getBoundingClientRect(),a=d.getBoundingClientRect(),m;if(c){let e=n===`horizontal`?new DOMRect(r.right,r.top,0,r.height):new DOMRect(r.left,r.bottom,r.width,0),t=n===`horizontal`?new DOMRect(a.left,a.top,0,a.height):new DOMRect(a.left,a.top,a.width,0);switch(p.length){case 0:m=[e,t];break;case 1:{let i=p[0];m=[i,ya({orientation:n,rects:[r,a],targetRect:i.element.getBoundingClientRect()})===r?t:e];break}default:m=p;break}}else m=p.length?p:[n===`horizontal`?new DOMRect(r.right,a.top,a.left-r.right,a.height):new DOMRect(a.left,r.bottom,a.width,a.top-r.bottom)];for(let n of m){let r=`width`in n?n:n.element.getBoundingClientRect(),a=xa()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(r.width<a){let e=a-r.width;r=new DOMRect(r.x-e/2,r.y,r.width+e,r.height)}if(r.height<a){let e=a-r.height;r=new DOMRect(r.x,r.y-e/2,r.width,r.height+e)}!s&&!(t<=l||t>u)&&o.push({group:e,groupSize:da({group:e}),panels:[f,i],separator:`width`in n?void 0:n,rect:r}),s=!1}}c=!1,f=i,p=[]}}else if(d.hasAttribute(`data-separator`)){d.ariaDisabled!==null&&(s=!0);let e=i.find(e=>e.element===d);e?p.push(e):(f=void 0,p=[])}else c=!0}return o}var Ca=class{#e={};addListener(e,t){let n=this.#e[e];return n===void 0?this.#e[e]=[t]:n.includes(t)||n.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let n=this.#e[e];if(n!==void 0)if(n.length===1)n[0].call(null,t);else{let e=!1,r=null,i=Array.from(n);for(let n=0;n<i.length;n++){let a=i[n];try{a.call(null,t)}catch(t){r===null&&(e=!0,r=t)}}if(e)throw r}}removeAllListeners(){this.#e={}}removeListener(e,t){let n=this.#e[e];if(n!==void 0){let e=n.indexOf(t);e>=0&&n.splice(e,1)}}},wa={cursorFlags:0,state:`inactive`},Ta=new Ca;function Ea(){return wa}function Da(e){return Ta.addListener(`change`,e)}function Oa(e){let t=wa,n={...wa};n.cursorFlags=e,wa=n,Ta.emit(`change`,{prev:t,next:n})}function ka(e){let t=wa;wa=e,Ta.emit(`change`,{prev:t,next:e})}var Aa=e=>e,ja=()=>{},Ma=1,Na=2,Pa=4,Fa=8,Ia=3,La=12,Ra;function za(){return Ra===void 0&&(Ra=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(Ra=!0)),Ra}function Ba({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case`active`:case`hover`:t.forEach(e=>{if(!e.mutableState.disableCursor)switch(e.orientation){case`horizontal`:r++;break;case`vertical`:i++;break}})}if(!(r===0&&i===0)){switch(n){case`active`:if(e&&za()){let t=(e&Ma)!==0,n=(e&Na)!==0,r=(e&Pa)!==0,i=(e&Fa)!==0;if(t)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}break}return za()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var Va=new WeakMap;function Ha(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=Va.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));let r=Ea();switch(r.state){case`active`:case`hover`:{let e=Ba({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(e=>e.group),state:r.state}),i=`*, *:hover {cursor: ${e} !important; }`;if(t===i)return;t=i,e?n.cssRules.length===0?n.insertRule(i):n.replaceSync(i):n.cssRules.length===1&&n.deleteRule(0);break}case`inactive`:t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}Va.set(e,{prevStyle:t,styleSheet:n})}var Ua=new Map,Wa=new Ca;function Ga(e){Ua=new Map(Ua),Ua.delete(e)}function Ka(e,t){for(let[t]of Ua)if(t.id===e)return t}function qa(e,t){for(let[t,n]of Ua)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Ja(){return Ua}function Ya(e,t){return Wa.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function Xa(e,t,n){let r=Ua.get(e);Ua=new Map(Ua),Ua.set(e,t),Wa.emit(`groupChange`,{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:r,next:t})}function Za(e){let t=Ea(),n=!1;switch(t.state){case`active`:ka({cursorFlags:0,state:`inactive`}),t.hitRegions.length>0&&(Ha(e),n=!0,t.hitRegions.forEach(e=>{let t=qa(e.group.id,!0);Xa(e.group,t,{isUserInteraction:!0})}))}return n}function Qa(e){e.defaultPrevented||Za(e.currentTarget)}function $a(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=va(n,a.rect);switch(e){case`horizontal`:t.x<=i.x&&(r=a,i=t);break;case`vertical`:t.y<=i.y&&(r=a,i=t);break}}return r?{distance:i,hitRegion:r}:void 0}function eo(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function to(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:so(e),b:so(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();pa(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:oo(ao(n.a)),b:oo(ao(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var no=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function ro(e){let t=getComputedStyle(co(e)??e).display;return t===`flex`||t===`inline-flex`}function io(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||ro(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`||no.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function ao(e){let t=e.length;for(;t--;){let n=e[t];if(pa(n,`Missing node`),io(n))return n}return null}function oo(e){return e&&Number(getComputedStyle(e).zIndex)||0}function so(e){let t=[];for(;e;)t.push(e),e=co(e);return t}function co(e){let{parentNode:t}=e;return eo(t)?t.host:t}function lo(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 uo({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!_a(n)||n.contains(e)||e.contains(n))return!0;if(to(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(lo(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function fo(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=Sa(r),a=$a(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&uo({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function po(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function mo(e,t,n=0){return Math.abs(ua(e)-ua(t))<=n}function ho(e,t){return mo(e,t)?0:e>t?1:-1}function go({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){let{collapsedSize:i=0,collapsible:a,disabled:o,maxSize:s=100,minSize:c=0}=t;if(o&&!e)return n;if(ho(r,c)<0)if(a){let e=(i+c)/2;r=ho(r,e)<0?i:c}else r=c;return r=Math.min(s,r),r=ua(r),r}function _o({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(mo(e,0))return t;let o=a===`imperative-api`,s=Object.values(t),c=Object.values(i),l=[...s],[u,d]=r;pa(u!=null,`Invalid first pivot index`),pa(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];pa(r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(pa(n!=null,`Previous layout not found for panel index ${t}`),mo(n,i)){let t=o-n;ho(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];pa(r,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(pa(n!=null,`Previous layout not found for panel index ${t}`),mo(n,o)){let t=n-i;ho(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];pa(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsible:a,collapsedSize:o,minSize:c}=r;if(a&&ho(i,c)<0)if(e>0){let t=c-o,n=t/2;ho(i+e,c)<0&&(e=ho(e,n)<=0?0:t)}else{let t=c-o,n=100-t/2;ho(i-e,c)<0&&(e=ho(100+e,n)>0?0:-t)}break}}{let t=e<0?1:-1,r=e<0?d:u,i=0;for(;;){let e=s[r];pa(e!=null,`Previous layout not found for panel index ${r}`);let a=go({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:e,size:100})-e;if(i+=a,r+=t,r<0||r>=n.length)break}let a=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-a:a}{let t=e<0?u:d;for(;t>=0&&t<n.length;){let r=Math.abs(e)-Math.abs(f),i=s[t];pa(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=go({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!mo(i,c)&&(f+=i-c,l[t]=c,f.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(po(c,l))return i;{let t=e<0?d:u,r=s[t];pa(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=go({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!mo(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];pa(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=go({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(mo(i,s)||(t-=s-i,l[r]=s),mo(t,0))break;e>0?r--:r++}}}if(!mo(Object.values(l).reduce((e,t)=>t+e,0),100,.1))return i;let p=Object.keys(i);return l.reduce((e,t,n)=>(e[p[n]]=t,e),{})}function vo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||ho(e[n],t[n])!==0)return!1;return!0}function yo({layout:e,panelConstraints:t}){let n=Object.values(e),r=[...n],i=r.reduce((e,t)=>e+t,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(e=>`${e}%`).join(`, `)}`);if(!mo(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];pa(t!=null,`No layout data found for index ${e}`),r[e]=100/i*t}let a=0;for(let e=0;e<t.length;e++){let i=n[e];pa(i!=null,`No layout data found for index ${e}`);let o=r[e];pa(o!=null,`No layout data found for index ${e}`);let s=go({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!mo(a,0))for(let e=0;e<t.length;e++){let n=r[e];pa(n!=null,`No layout data found for index ${e}`);let i=n+a,o=go({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,mo(a,0)))break}let o=Object.keys(e);return r.reduce((e,t,n)=>(e[o[n]]=t,e),{})}function bo({groupId:e,panelId:t}){let n=()=>{let t=Ja();for(let[n,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:a,groupSize:o,separatorToPanels:s}]of t)if(n.id===e)return{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:n,groupSize:o,layout:a,separatorToPanels:s};throw Error(`Group ${e} not found`)},r=()=>{let e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(e!==void 0)return e;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{let e=n().group.panels.find(e=>e.id===t);if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},a=()=>{let e=n().layout[t];if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},o=({nextSize:e,panels:n,prevLayout:r,derivedPanelConstraints:i})=>{let o=a(),s=n.findIndex(e=>e.id===t),c=s===0,l=s===n.length-1;if(l&&e<o&&(c||n.slice(0,s).every((e,t)=>{let n=i[t];return n?.collapsible&&mo(n.collapsedSize,r[n.panelId])}))){let e=n.slice(0,s).reduce((e,t)=>e+r[t.id],0);return{...r,[t]:ua(100-e)}}return _o({delta:l?o-e:e-o,initialLayout:r,panelConstraints:i,pivotIndices:l?[s-1,s]:[s,s+1],prevLayout:r,trigger:`imperative-api`})},s=e=>{if(e===a())return;let{defaultLayoutDeferred:t,derivedPanelConstraints:r,group:i,groupSize:s,layout:c,separatorToPanels:l}=n(),u=yo({layout:o({nextSize:e,panels:i.panels,prevLayout:c,derivedPanelConstraints:r}),panelConstraints:r});vo(c,u)||Xa(i,{defaultLayoutDeferred:t,derivedPanelConstraints:r,groupSize:s,layout:u,separatorToPanels:l})};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),o=a();e&&o!==t&&(n.expandToSize=o,s(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:o}=i(),c=a();if(e&&c===t){let e=o.expandToSize??n;e===0&&(e=1),s(e)}},getSize:()=>{let{group:e}=n(),t=a(),{element:r}=i();return{asPercentage:t,inPixels:e.orientation===`horizontal`?r.offsetWidth:r.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=r(),n=a();return e&&mo(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=da({group:t}),o=ua(la({groupSize:a,panelElement:r,styleProp:e})/a*100);s(o)}}}function xo(e){e.defaultPrevented||fo(e,Ja()).forEach(t=>{if(t.separator&&!t.separator.disableDoubleClick){let n=t.panels.find(e=>e.panelConstraints.defaultSize!==void 0);if(n){let r=n.panelConstraints.defaultSize,i=bo({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function So(e){let t=Ja();for(let[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error(`Could not find parent Group for separator element`)}function Co({groupId:e}){let t=()=>{let t=Ja();for(let[n,r]of t)if(n.id===e)return{group:n,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){let{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:i,groupSize:a,layout:o,separatorToPanels:s}=t(),c=yo({layout:e,panelConstraints:r});return n?o:(vo(o,c)||Xa(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function wo(e,t){let n=So(e),r=qa(n.id,!0),i=n.separators.find(t=>t.element===e);pa(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);pa(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=Co({groupId:n.id}).getLayout(),c=yo({layout:_o({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});vo(s,c)||Xa(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels},{isUserInteraction:!0})}function To(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=So(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&wo(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&wo(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&wo(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&wo(t,-5);break;case`End`:e.preventDefault(),wo(t,100);break;case`Enter`:{e.preventDefault();let n=So(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=qa(n.id,!0),o=n.separators.find(e=>e.element===t);pa(o,`Matching separator not found`);let s=a.get(o);pa(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(pa(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];wo(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=So(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);pa(r!==null,`Index not found`),n[e.shiftKey?r>0?r-1:n.length-1:r+1<n.length?r+1:0].focus({preventScroll:!0});break}case`Home`:e.preventDefault(),wo(t,-100);break}}function Eo(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=Ja(),n=fo(e,t),r=new Map,i=!1;n.forEach(e=>{e.separator&&(i||(i=!0,e.separator.element.focus({focusVisible:!1,preventScroll:!0})));let n=t.get(e.group);n&&r.set(e.group,n.layout)}),ka({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}),n.length&&e.preventDefault()}function Do({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:a,prevCursorFlags:o}){let s=0;n.forEach(e=>{let{group:n,groupSize:o}=e,{orientation:c,panels:l}=n,{disableCursor:u}=n.mutableState,d=0;d=a?c===`horizontal`?(t.clientX-a.x)/o*100:(t.clientY-a.y)/o*100:c===`horizontal`?t.clientX<0?-100:100:t.clientY<0?-100:100;let f=r.get(n),p=i.get(n);if(!f||!p)return;let{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:_,separatorToPanels:v}=p;if(h&&_&&v){let t=_o({delta:d,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>l.indexOf(e)),prevLayout:_,trigger:`mouse-or-touch`});if(vo(t,_)){if(d!==0&&!u)switch(c){case`horizontal`:s|=d<0?Ma:Na;break;case`vertical`:s|=d<0?Pa:Fa;break}}else Xa(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:t,separatorToPanels:v})}});let c=0;t.movementX===0?c|=o&Ia:c|=s&Ia,t.movementY===0?c|=o&La:c|=s&La,Oa(c),Ha(e)}function Oo(e){let t=Ja(),n=Ea();switch(n.state){case`active`:Do({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}}function ko(e){if(e.defaultPrevented)return;let t=Ea(),n=Ja();switch(t.state){case`active`:if(e.buttons===0){ka({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{let t=qa(e.group.id,!0);Xa(e.group,t,{isUserInteraction:!0})});return}for(let n of t.hitRegions)if(n.separator){let{element:t}=n.separator;t.hasPointerCapture?.(e.pointerId)||t.setPointerCapture?.(e.pointerId)}Do({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=fo(e,n);r.length===0?t.state!==`inactive`&&ka({cursorFlags:0,state:`inactive`}):ka({cursorFlags:0,hitRegions:r,state:`hover`}),Ha(e.currentTarget);break}}}function Ao(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(Ea().state){case`hover`:ka({cursorFlags:0,state:`inactive`})}}function jo(e){e.defaultPrevented||e.pointerType===`mouse`&&e.button>0||Za(e.currentTarget)&&e.preventDefault()}function Mo(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=ua(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=ua((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function No(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=da({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:ua(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function Po(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Fo({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let i=0,a=0,o=!1,s=new Map,c=[];for(let l of e.panels){let e=r[l.id]??0;switch(l.panelConstraints.groupResizeBehavior){case`preserve-pixel-size`:{o=!0;let r=ua(e/100*n/t*100);s.set(l.id,r),i+=r;break}default:c.push(l.id),a+=e;break}}if(!o||c.length===0)return r;let l=100-i,u={...r};if(s.forEach((e,t)=>{u[t]=e}),a>0)for(let e of c)u[e]=ua((r[e]??0)/a*l);else{let e=ua(l/c.length);for(let t of c)u[t]=e}return u}function Io(e,t){let n=e.map(e=>e.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;return!0}var Lo=new Map;function Ro(e){let t=!0;pa(e.element.ownerDocument.defaultView,`Cannot register an unmounted Group`);let n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,a=new n(n=>{for(let r of n){let{borderBoxSize:n,target:i}=r;if(i===e.element){if(t){let t=da({group:e});if(t===0)return;let n=qa(e.id);if(!n)return;let r=fa(e),i=n.defaultLayoutDeferred?Mo(r):n.layout,a=yo({layout:Fo({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&vo(n.layout,a)&&Po(n.derivedPanelConstraints,r)&&n.groupSize===t)return;Xa(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else No(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{pa(!r.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.onResize&&a.observe(e.element)});let o=da({group:e}),s=fa(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.mutableState.defaultLayout;l&&(Io(e.panels,l)||(l=void 0));let u=yo({layout:e.mutableState.layouts[c]??l??Mo(s),panelConstraints:s}),d=e.element.ownerDocument;Lo.set(d,(Lo.get(d)??0)+1);let f=new Map;return Sa(e).forEach(e=>{e.separator&&f.set(e.separator,e.panels)}),Xa(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:u,separatorToPanels:f}),e.separators.forEach(e=>{pa(!i.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.element.addEventListener(`keydown`,To)}),Lo.get(d)===1&&(d.addEventListener(`contextmenu`,Qa,!0),d.addEventListener(`dblclick`,xo,!0),d.addEventListener(`pointerdown`,Eo,!0),d.addEventListener(`pointerleave`,Oo),d.addEventListener(`pointermove`,ko),d.addEventListener(`pointerout`,Ao),d.addEventListener(`pointerup`,jo,!0)),function(){t=!1,Lo.set(d,Math.max(0,(Lo.get(d)??0)-1)),Ga(e),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,To)}),Lo.get(d)||(d.removeEventListener(`contextmenu`,Qa,!0),d.removeEventListener(`dblclick`,xo,!0),d.removeEventListener(`pointerdown`,Eo,!0),d.removeEventListener(`pointerleave`,Oo),d.removeEventListener(`pointermove`,ko),d.removeEventListener(`pointerout`,Ao),d.removeEventListener(`pointerup`,jo,!0)),a.disconnect()}}function zo(){let[e,t]=(0,b.useState)({});return[e,(0,b.useCallback)(()=>t({}),[])]}function Bo(e){let t=(0,b.useId)();return`${e??t}`}var Vo=typeof window<`u`?b.useLayoutEffect:b.useEffect;function Ho(e){let t=(0,b.useRef)(e);return Vo(()=>{t.current=e},[e]),(0,b.useCallback)((...e)=>t.current?.(...e),[t])}function Uo(...e){return Ho(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t;break}})})}function Wo(e){let t=(0,b.useRef)({...e});return Vo(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var Go=(0,b.createContext)(null);function Ko(e,t){let n=(0,b.useRef)({getLayout:()=>({}),setLayout:Aa});(0,b.useImperativeHandle)(t,()=>n.current,[]),Vo(()=>{Object.assign(n.current,Co({groupId:e}))})}function qo({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:a,groupRef:o,id:s,onLayoutChange:c,onLayoutChanged:l,orientation:u=`horizontal`,resizeTargetMinimumSize:d={coarse:20,fine:10},style:f,...p}){let m=(0,b.useRef)({onLayoutChange:{},onLayoutChanged:{}}),h=Ho(e=>{vo(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,c?.(e))}),g=Ho((e,t)=>{vo(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,l?.(e,{isUserInteraction:t}))}),_=Bo(s),v=(0,b.useRef)(null),[y,x]=zo(),S=(0,b.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:d,separators:[]}),C=Uo(v,a);Ko(_,o);let w=Ho((e,t)=>{let r=Ea(),i=Ka(e),a=qa(e);if(a){let e=!1;switch(r.state){case`active`:e=r.hitRegions.some(e=>e.group===i);break}return{flexGrow:a.layout[t]??1,pointerEvents:e?`none`:void 0}}if(n?.[t])return{flexGrow:n?.[t]}}),T=Wo({defaultLayout:n,disableCursor:r}),E=(0,b.useMemo)(()=>({get disableCursor(){return!!T.disableCursor},getPanelStyles:w,id:_,orientation:u,registerPanel:e=>{let t=S.current;return t.panels=ma(u,[...t.panels,e]),x(),()=>{t.panels=t.panels.filter(t=>t!==e),x()}},registerSeparator:e=>{let t=S.current;return t.separators=ma(u,[...t.separators,e]),x(),()=>{t.separators=t.separators.filter(t=>t!==e),x()}},updatePanelProps:(e,{disabled:t})=>{let n=S.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);let r=Ka(_),i=qa(_);r&&i&&Xa(r,{...i,derivedPanelConstraints:fa(r)})},updateSeparatorProps:(e,{disabled:t,disableDoubleClick:n})=>{let r=S.current.separators.find(t=>t.id===e);r&&(r.disabled=t,r.disableDoubleClick=n)}}),[w,_,x,u,T]),D=(0,b.useRef)(null);return Vo(()=>{let e=v.current;if(e===null)return;let t=S.current,n;if(T.defaultLayout!==void 0&&Object.keys(T.defaultLayout).length===t.panels.length){n={};for(let e of t.panels){let t=T.defaultLayout[e.id];t!==void 0&&(n[e.id]=t)}}let r={disabled:!!i,element:e,id:_,mutableState:{defaultLayout:n,disableCursor:!!T.disableCursor,expandedPanelSizes:S.current.lastExpandedPanelSizes,layouts:S.current.layouts},orientation:u,panels:t.panels,resizeTargetMinimumSize:t.resizeTargetMinimumSize,separators:t.separators};D.current=r;let a=Ro(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=qa(r.id,!0);!o&&s.length>0&&(h(c),g(c,!1));let l=Ya(_,e=>{let{defaultLayoutDeferred:t,derivedPanelConstraints:n,layout:i}=e.next;if(t||n.length===0)return;let a=r.panels.map(({id:e})=>e).join(`,`);r.mutableState.layouts[a]=i,n.forEach(t=>{if(t.collapsible){let{layout:n}=e.prev??{};if(n){let e=mo(t.collapsedSize,i[t.panelId]),a=mo(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=Ea().state!==`active`;h(i),o&&g(i,e.isUserInteraction)});return()=>{D.current=null,a(),l()}},[i,_,g,h,u,y,T]),(0,b.useEffect)(()=>{let e=D.current;e&&(e.mutableState.defaultLayout=n,e.mutableState.disableCursor=!!r)}),(0,H.jsx)(Go.Provider,{value:E,children:(0,H.jsx)(`div`,{...p,className:t,"data-group":!0,"data-testid":_,id:_,ref:C,style:{height:`100%`,width:`100%`,overflow:`hidden`,...f,display:`flex`,flexDirection:u===`horizontal`?`row`:`column`,flexWrap:`nowrap`,touchAction:u===`horizontal`?`pan-y`:`pan-x`},children:e})})}qo.displayName=`Group`;function Jo(e,t){return`react-resizable-panels:${[e,...t].join(`:`)}`}function Yo({id:e,panelIds:t,storage:n}){let r=Jo(e,[]),i=n.getItem(r);if(i)try{let e=JSON.parse(i);if(t){let n=e[t.join(`,`)];if(n&&Array.isArray(n.layout)&&t.length===n.layout.length){let e={};for(let r=0;r<t.length;r++)e[t[r]]=n.layout[r];return e}}else{let t=Object.keys(e);if(t.length===1){let n=e[t[0]];if(n&&Array.isArray(n.layout)){let e=t[0].split(`,`);if(e.length===n.layout.length){let t={};for(let r=0;r<e.length;r++)t[e[r]]=n.layout[r];return t}}}}}catch{}}function Xo({debounceSaveMs:e=100,onlySaveAfterUserInteractions:t,panelIds:n,storage:r=localStorage,...i}){let a=n!==void 0,o=`id`in i?i.id:i.groupId,s=Jo(o,n??[]),c=(0,b.useSyncExternalStore)(Zo,()=>r.getItem(s),()=>r.getItem(s)),l=(0,b.useMemo)(()=>{if(c){let e=JSON.parse(c),t=Object.values(e);if(Array.from(t).every(e=>typeof e==`number`))return e}},[c]),u=(0,b.useMemo)(()=>{if(!l)return Yo({id:o,panelIds:n,storage:r})},[l,o,n,r]),d=l??u,f=(0,b.useRef)(null),p=(0,b.useCallback)(()=>{let e=f.current;e&&(f.current=null,clearTimeout(e))},[]);(0,b.useLayoutEffect)(()=>()=>{p()},[p]);let m=(0,b.useCallback)((e,n)=>{if(t&&!n.isUserInteraction)return;p();let i;i=a?Jo(o,Object.keys(e)):Jo(o,[]);try{r.setItem(i,JSON.stringify(e))}catch(e){console.error(e)}},[p,a,o,t,r]);return{defaultLayout:d,onLayoutChange:(0,b.useCallback)(t=>{p(),e===0?m(t,{isUserInteraction:!1}):f.current=setTimeout(()=>{m(t,{isUserInteraction:!1})},e)},[p,e,m]),onLayoutChanged:m}}function Zo(){return function(){}}function Qo(){let e=(0,b.useContext)(Go);return pa(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function $o(e,t){let{id:n}=Qo(),r=(0,b.useRef)({collapse:ja,expand:ja,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:ja});(0,b.useImperativeHandle)(t,()=>r.current,[]),Vo(()=>{Object.assign(r.current,bo({groupId:n,panelId:e}))})}function es({children:e,className:t,collapsedSize:n=`0%`,collapsible:r=!1,defaultSize:i,disabled:a,elementRef:o,groupResizeBehavior:s=`preserve-relative-size`,id:c,maxSize:l=`100%`,minSize:u=`0%`,onResize:d,panelRef:f,style:p,...m}){let h=!!c,g=Bo(c),_=Wo({disabled:a}),v=(0,b.useRef)(null),y=Uo(v,o),{getPanelStyles:x,id:S,orientation:C,registerPanel:w,updatePanelProps:T}=Qo(),E=d!==null,D=Ho((e,t,n)=>{d?.(e,c,n)});Vo(()=>{let e=v.current;if(e!==null){let t={element:e,id:g,idIsStable:h,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:E?D:void 0,panelConstraints:{groupResizeBehavior:s,collapsedSize:n,collapsible:r,defaultSize:i,disabled:_.disabled,maxSize:l,minSize:u}};return w(t)}},[s,n,r,i,E,g,h,l,u,D,w,_]),(0,b.useEffect)(()=>{T(g,{disabled:a})},[a,g,T]),$o(g,f);let O=()=>{let e=x(S,g);if(e)return JSON.stringify(e)},k=(0,b.useSyncExternalStore)(e=>Ya(S,e),O,O),A;return A=k?JSON.parse(k):i===void 0?{flexGrow:1}:{flexGrow:void 0,flexShrink:void 0,flexBasis:i},(0,H.jsx)(`div`,{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:y,style:{...ts,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...A},children:(0,H.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...p,touchAction:C===`horizontal`?`pan-y`:`pan-x`},children:e})})}es.displayName=`Panel`;var ts={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function ns({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,a,o=e[n],s=t.find(e=>e.panelId===n);if(s){let c=s.maxSize,l=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];a=yo({layout:_o({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=yo({layout:_o({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function rs({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:i,id:a,style:o,...s}){let c=Bo(a),l=Wo({disabled:n,disableDoubleClick:r}),[u,d]=(0,b.useState)({}),[f,p]=(0,b.useState)(`inactive`),[m,h]=(0,b.useState)(!1),g=(0,b.useRef)(null),_=Uo(g,i),{disableCursor:v,id:y,orientation:x,registerSeparator:S,updateSeparatorProps:C}=Qo(),w=x===`horizontal`?`vertical`:`horizontal`;Vo(()=>{let e=g.current;if(e!==null){let t={disabled:l.disabled,disableDoubleClick:l.disableDoubleClick,element:e,id:c},n=S(t),r=Da(e=>{p(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=Ya(y,e=>{let{derivedPanelConstraints:n,layout:r,separatorToPanels:i}=e.next,a=i.get(t);if(a){let e=a[0],t=a.indexOf(e);d(ns({layout:r,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{r(),i(),n()}}},[y,c,S,l]),(0,b.useEffect)(()=>{C(c,{disabled:n,disableDoubleClick:r})},[n,r,c,C]);let T;n&&!v&&(T=`not-allowed`);let E;if(n)E=`disabled`;else switch(f){case`active`:E=`active`;break;default:E=m?`focus`:f}return(0,H.jsx)(`div`,{...s,"aria-controls":u.valueControls,"aria-disabled":n||void 0,"aria-orientation":w,"aria-valuemax":u.valueMax,"aria-valuemin":u.valueMin,"aria-valuenow":u.valueNow,children:e,className:t,"data-separator":E,"data-testid":c,id:c,onBlur:()=>h(!1),onFocus:()=>h(!0),ref:_,role:`separator`,style:{flexBasis:`auto`,cursor:T,...o,flexGrow:0,flexShrink:0,touchAction:`none`},tabIndex:n?void 0:0})}rs.displayName=`Separator`;var is=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},as=(e=>e?is(e):is),os=e=>e;function ss(e,t=os){let n=b.useSyncExternalStore(e.subscribe,b.useCallback(()=>t(e.getState()),[e,t]),b.useCallback(()=>t(e.getInitialState()),[e,t]));return b.useDebugValue(n),n}var cs=e=>{let t=as(e),n=e=>ss(t,e);return Object.assign(n,t),n},ls=(e=>e?cs(e):cs),us=ls()(e=>({status:`idle`,requiresAuth:!1,hasAuthRequiredTools:!1,isSignedIn:!1,error:null,setStatus:t=>e({status:t}),setRequiresAuth:t=>e({requiresAuth:t}),setHasAuthRequiredTools:t=>e({hasAuthRequiredTools:t}),setIsSignedIn:t=>e({isSignedIn:t}),setError:t=>e({error:t}),reset:()=>e({status:`idle`,requiresAuth:!1,hasAuthRequiredTools:!1,isSignedIn:!1,error:null})}));function ds(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var fs=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return fs(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return fs(t)(e)}}}},ps=(e,t)=>(n,r,i)=>{let a={storage:ds(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return fs(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},ms={theme:`light`,locale:`en-US`,displayMode:`inline`,maxHeight:void 0,safeArea:{insets:{top:0,bottom:0,left:0,right:0}},userAgent:{device:{type:`desktop`},capabilities:{hover:!0,touch:!1}}},hs=ls()(ps(e=>({...ms,previewClient:null,setPreference:(t,n)=>e({[t]:n}),setPreviewClient:t=>e({previewClient:t})}),{name:`skybridge-devtools-inspector-preferences`,version:2,migrate:(e,t)=>{let n=e;return t<2&&delete n.displayMode,n},partialize:({displayMode:e,previewClient:t,setPreference:n,setPreviewClient:r,...i})=>i})),gs=()=>{let{setPreference:e,setPreviewClient:t,previewClient:n,...r}=hs.getState();return r},_s=e=>e?.device?.type===`mobile`,vs=()=>hs(e=>_s(e.userAgent)),ys=(e,t)=>e===`pip`?t.previewClient===`claude`?t.displayMode===`modal`?`inline`:t.displayMode:t.previewClient===`chatgpt`&&_s(t.userAgent)?`fullscreen`:e:e,bs=Object.create,xs=Object.defineProperty,Ss=Object.getOwnPropertyDescriptor,Cs=Object.getOwnPropertyNames,ws=Object.getPrototypeOf,Ts=Object.prototype.hasOwnProperty,Es=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ds=(e,t)=>{let n={};for(var r in e)xs(n,r,{get:e[r],enumerable:!0});return t&&xs(n,Symbol.toStringTag,{value:`Module`}),n},Os=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Cs(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Ts.call(e,s)&&s!==n&&xs(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Ss(t,s))||r.enumerable});return e},ks=(e,t,n)=>(n=e==null?{}:bs(ws(e)),Os(t||!e||!e.__esModule?xs(n,`default`,{value:e,enumerable:!0}):n,e)),As=new Set([`https://json-schema.org/draft/2020-12/schema`,`http://json-schema.org/draft/2020-12/schema`]),js=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]),Ms=new Set([`https://json-schema.org/draft-07/schema`,`http://json-schema.org/draft-07/schema`]),Ns=new Set([`https://json-schema.org/draft-06/schema`,`http://json-schema.org/draft-06/schema`]);function Ps(e){return typeof e==`string`&&js.has(e.replace(/#$/,``))}function Fs(e,t){if(!(`$schema`in e)||typeof e.$schema!=`string`)return`2020-12`;let n=e.$schema.replace(/#$/,``);if(As.has(n))return`2020-12`;if(js.has(n))return`2019-09`;if(Ms.has(n)||Ns.has(n))return`draft-7`;throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}var Is,Ls=Object.freeze({status:`aborted`});function U(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var Rs=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},zs=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Is=globalThis).__zod_globalConfig??(Is.__zod_globalConfig={});var Bs=globalThis.__zod_globalConfig;function Vs(e){return e&&Object.assign(Bs,e),Bs}function Hs(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Us(e,t){return typeof t==`bigint`?t.toString():t}function Ws(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function Gs(e){return e==null}function Ks(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function qs(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var Js=Symbol(`evaluating`);function Ys(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Js)return r===void 0&&(r=Js,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Xs(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Zs(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Qs(e){return JSON.stringify(e)}function $s(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ec=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function tc(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var nc=Ws(()=>{if(Bs.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function rc(e){if(tc(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(tc(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function ic(e){return rc(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ac=new Set([`string`,`number`,`symbol`]);function oc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function sc(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function cc(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw 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 lc(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var uc={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function dc(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return sc(e,Zs(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Xs(this,`shape`,e),e},checks:[]}))}function fc(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return sc(e,Zs(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Xs(this,`shape`,r),r},checks:[]}))}function pc(e,t){if(!rc(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return sc(e,Zs(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Xs(this,`shape`,n),n}}))}function mc(e,t){if(!rc(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return sc(e,Zs(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Xs(this,`shape`,n),n}}))}function hc(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return sc(e,Zs(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Xs(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function gc(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return sc(t,Zs(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Xs(this,`shape`,i),i},checks:[]}))}function _c(e,t,n){return sc(t,Zs(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Xs(this,`shape`,i),i}}))}function vc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function yc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function bc(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function xc(e){return typeof e==`string`?e:e?.message}function Sc(e,t,n){let r=e.message?e.message:xc(e.inst?._zod.def?.error?.(e))??xc(t?.error?.(e))??xc(n.customError?.(e))??xc(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function Cc(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function wc(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Tc=(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,Us,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ec=U(`$ZodError`,Tc),Dc=U(`$ZodError`,Tc,{Parent:Error});function Oc(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function kc(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var Ac=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Rs;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Sc(e,a,Vs())));throw ec(t,i?.callee),t}return o.value},jc=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Sc(e,a,Vs())));throw ec(t,i?.callee),t}return o.value},Mc=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Rs;return a.issues.length?{success:!1,error:new(e??Ec)(a.issues.map(e=>Sc(e,i,Vs())))}:{success:!0,data:a.value}},Nc=Mc(Dc),Pc=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Sc(e,i,Vs())))}:{success:!0,data:a.value}},Fc=Pc(Dc),Ic=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ac(e)(t,n,i)},Lc=e=>(t,n,r)=>Ac(e)(t,n,r),Rc=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return jc(e)(t,n,i)},zc=e=>async(t,n,r)=>jc(e)(t,n,r),Bc=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Mc(e)(t,n,i)},Vc=e=>(t,n,r)=>Mc(e)(t,n,r),Hc=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Pc(e)(t,n,i)},Uc=e=>async(t,n,r)=>Pc(e)(t,n,r),Wc=/^[cC][0-9a-z]{6,}$/,Gc=/^[0-9a-z]+$/,Kc=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,qc=/^[0-9a-vA-V]{20}$/,Jc=/^[A-Za-z0-9]{27}$/,Yc=/^[a-zA-Z0-9_-]{21}$/,Xc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Zc=/^([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})$/,Qc=e=>e?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)$/,$c=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,el=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function tl(){return new RegExp(el,`u`)}var nl=/^(?:(?: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])$/,rl=/^(([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}|:))$/,il=/^((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])$/,al=/^(([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])$/,ol=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,sl=/^[A-Za-z0-9_-]*$/,cl=/^https?$/,ll=/^\+[1-9]\d{6,14}$/,ul=`(?:(?:\\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])))`,dl=RegExp(`^${ul}$`);function fl(e){let 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 pl(e){return RegExp(`^${fl(e)}$`)}function ml(e){let t=fl({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${ul}T(?:${r})$`)}var hl=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},gl=/^-?\d+$/,_l=/^-?\d+(?:\.\d+)?$/,vl=/^(?:true|false)$/i,yl=/^null$/i,bl=/^[^A-Z]*$/,xl=/^[^a-z]*$/,Sl=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Cl={number:`number`,bigint:`bigint`,object:`date`},wl=U(`$ZodCheckLessThan`,(e,t)=>{Sl.init(e,t);let n=Cl[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Tl=U(`$ZodCheckGreaterThan`,(e,t)=>{Sl.init(e,t);let n=Cl[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),El=U(`$ZodCheckMultipleOf`,(e,t)=>{Sl.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):qs(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Dl=U(`$ZodCheckNumberFormat`,(e,t)=>{Sl.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=uc[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=gl)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Ol=U(`$ZodCheckMaxLength`,(e,t)=>{var n;Sl.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Gs(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Cc(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),kl=U(`$ZodCheckMinLength`,(e,t)=>{var n;Sl.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Gs(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Cc(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Al=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;Sl.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Gs(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Cc(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),jl=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Sl.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Ml=U(`$ZodCheckRegex`,(e,t)=>{jl.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Nl=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=bl,jl.init(e,t)}),Pl=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=xl,jl.init(e,t)}),Fl=U(`$ZodCheckIncludes`,(e,t)=>{Sl.init(e,t);let n=oc(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Il=U(`$ZodCheckStartsWith`,(e,t)=>{Sl.init(e,t);let n=RegExp(`^${oc(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Ll=U(`$ZodCheckEndsWith`,(e,t)=>{Sl.init(e,t);let n=RegExp(`.*${oc(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Rl=U(`$ZodCheckOverwrite`,(e,t)=>{Sl.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),zl=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
11
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
12
+ `))}},Bl={major:4,minor:4,patch:3},Vl=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Bl;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=vc(e),i;for(let a of t){if(a._zod.def.when){if(yc(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Rs;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=vc(e,t))});else{if(e.issues.length===t)continue;r||=vc(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(vc(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Rs;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Rs;return o.then(e=>t(e,r,a))}return t(o,r,a)}}Ys(e,`~standard`,()=>({validate:t=>{try{let n=Nc(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Fc(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Hl=U(`$ZodString`,(e,t)=>{Vl.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??hl(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Ul=U(`$ZodStringFormat`,(e,t)=>{jl.init(e,t),Hl.init(e,t)}),Wl=U(`$ZodGUID`,(e,t)=>{t.pattern??=Zc,Ul.init(e,t)}),Gl=U(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Qc(e)}else t.pattern??=Qc();Ul.init(e,t)}),Kl=U(`$ZodEmail`,(e,t)=>{t.pattern??=$c,Ul.init(e,t)}),ql=U(`$ZodURL`,(e,t)=>{Ul.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===cl.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Jl=U(`$ZodEmoji`,(e,t)=>{t.pattern??=tl(),Ul.init(e,t)}),Yl=U(`$ZodNanoID`,(e,t)=>{t.pattern??=Yc,Ul.init(e,t)}),Xl=U(`$ZodCUID`,(e,t)=>{t.pattern??=Wc,Ul.init(e,t)}),Zl=U(`$ZodCUID2`,(e,t)=>{t.pattern??=Gc,Ul.init(e,t)}),Ql=U(`$ZodULID`,(e,t)=>{t.pattern??=Kc,Ul.init(e,t)}),$l=U(`$ZodXID`,(e,t)=>{t.pattern??=qc,Ul.init(e,t)}),eu=U(`$ZodKSUID`,(e,t)=>{t.pattern??=Jc,Ul.init(e,t)}),tu=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=ml(t),Ul.init(e,t)}),nu=U(`$ZodISODate`,(e,t)=>{t.pattern??=dl,Ul.init(e,t)}),ru=U(`$ZodISOTime`,(e,t)=>{t.pattern??=pl(t),Ul.init(e,t)}),iu=U(`$ZodISODuration`,(e,t)=>{t.pattern??=Xc,Ul.init(e,t)}),au=U(`$ZodIPv4`,(e,t)=>{t.pattern??=nl,Ul.init(e,t),e._zod.bag.format=`ipv4`}),ou=U(`$ZodIPv6`,(e,t)=>{t.pattern??=rl,Ul.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),su=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=il,Ul.init(e,t)}),cu=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=al,Ul.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function lu(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var uu=U(`$ZodBase64`,(e,t)=>{t.pattern??=ol,Ul.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{lu(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function du(e){if(!sl.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return lu(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var fu=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=sl,Ul.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{du(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),pu=U(`$ZodE164`,(e,t)=>{t.pattern??=ll,Ul.init(e,t)});function mu(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var hu=U(`$ZodJWT`,(e,t)=>{Ul.init(e,t),e._zod.check=n=>{mu(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),gu=U(`$ZodNumber`,(e,t)=>{Vl.init(e,t),e._zod.pattern=e._zod.bag.pattern??_l,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),_u=U(`$ZodNumberFormat`,(e,t)=>{Dl.init(e,t),gu.init(e,t)}),vu=U(`$ZodBoolean`,(e,t)=>{Vl.init(e,t),e._zod.pattern=vl,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),yu=U(`$ZodNull`,(e,t)=>{Vl.init(e,t),e._zod.pattern=yl,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),bu=U(`$ZodAny`,(e,t)=>{Vl.init(e,t),e._zod.parse=e=>e}),xu=U(`$ZodUnknown`,(e,t)=>{Vl.init(e,t),e._zod.parse=e=>e}),Su=U(`$ZodNever`,(e,t)=>{Vl.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Cu(e,t,n){e.issues.length&&t.issues.push(...bc(n,e.issues)),t.value[n]=e.value}var wu=U(`$ZodArray`,(e,t)=>{Vl.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Cu(t,n,e))):Cu(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Tu(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...bc(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function Eu(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=lc(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Du(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Tu(e,n,i,t,u,d))):Tu(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var Ou=U(`$ZodObject`,(e,t)=>{if(Vl.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=Ws(()=>Eu(t));Ys(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=tc,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>Tu(n,t,e,s,r,i))):Tu(a,t,e,s,r,i)}return i?Du(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),ku=U(`$ZodObjectJIT`,(e,t)=>{Ou.init(e,t);let n=e._zod.parse,r=Ws(()=>Eu(t)),i=e=>{let t=new zl([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Qs(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Qs(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
13
+ if (${n}.issues.length) {
14
+ if (${o} in input) {
15
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
16
+ ...iss,
17
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
18
+ })));
19
+ }
20
+ }
21
+
22
+ if (${n}.value === undefined) {
23
+ if (${o} in input) {
24
+ newResult[${o}] = undefined;
25
+ }
26
+ } else {
27
+ newResult[${o}] = ${n}.value;
28
+ }
29
+
30
+ `):c?t.write(`
31
+ if (${n}.issues.length) {
32
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
33
+ ...iss,
34
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
35
+ })));
36
+ }
37
+
38
+ if (${n}.value === undefined) {
39
+ if (${o} in input) {
40
+ newResult[${o}] = undefined;
41
+ }
42
+ } else {
43
+ newResult[${o}] = ${n}.value;
44
+ }
45
+
46
+ `):t.write(`
47
+ const ${n}_present = ${o} in input;
48
+ if (${n}.issues.length) {
49
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
50
+ ...iss,
51
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
52
+ })));
53
+ }
54
+ if (!${n}_present && !${n}.issues.length) {
55
+ payload.issues.push({
56
+ code: "invalid_type",
57
+ expected: "nonoptional",
58
+ input: undefined,
59
+ path: [${o}]
60
+ });
61
+ }
62
+
63
+ if (${n}_present) {
64
+ if (${n}.value === undefined) {
65
+ newResult[${o}] = undefined;
66
+ } else {
67
+ newResult[${o}] = ${n}.value;
68
+ }
69
+ }
70
+
71
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=tc,s=!Bs.jitless,c=s&&nc.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Du([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Au(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!vc(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Sc(e,r,Vs())))}),t)}var ju=U(`$ZodUnion`,(e,t)=>{Vl.init(e,t),Ys(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),Ys(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),Ys(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),Ys(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Ks(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Au(t,r,e,i)):Au(o,r,e,i)}}),Mu=U(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,ju.init(e,t);let n=e._zod.parse;Ys(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=Ws(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!tc(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Nu=U(`$ZodIntersection`,(e,t)=>{Vl.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Fu(e,t,n)):Fu(e,i,a)}});function Pu(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(rc(e)&&rc(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Pu(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Pu(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Fu(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),vc(e))return e;let o=Pu(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Iu=U(`$ZodRecord`,(e,t)=>{Vl.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!rc(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>Sc(e,r,Vs())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...bc(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...bc(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&_l.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Sc(e,r,Vs())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...bc(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...bc(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Lu=U(`$ZodEnum`,(e,t)=>{Vl.init(e,t);let n=Hs(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ac.has(typeof e)).map(e=>typeof e==`string`?oc(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Ru=U(`$ZodLiteral`,(e,t)=>{if(Vl.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?oc(e):e?oc(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),zu=U(`$ZodTransform`,(e,t)=>{Vl.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new zs(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new Rs;return n.value=i,n.fallback=!0,n}});function Bu(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Vu=U(`$ZodOptional`,(e,t)=>{Vl.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,Ys(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ys(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ks(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>Bu(e,r)):Bu(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Hu=U(`$ZodExactOptional`,(e,t)=>{Vu.init(e,t),Ys(e._zod,`values`,()=>t.innerType._zod.values),Ys(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Uu=U(`$ZodNullable`,(e,t)=>{Vl.init(e,t),Ys(e._zod,`optin`,()=>t.innerType._zod.optin),Ys(e._zod,`optout`,()=>t.innerType._zod.optout),Ys(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ks(e.source)}|null)$`):void 0}),Ys(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Wu=U(`$ZodDefault`,(e,t)=>{Vl.init(e,t),e._zod.optin=`optional`,Ys(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Gu(e,t)):Gu(r,t)}});function Gu(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Ku=U(`$ZodPrefault`,(e,t)=>{Vl.init(e,t),e._zod.optin=`optional`,Ys(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),qu=U(`$ZodNonOptional`,(e,t)=>{Vl.init(e,t),Ys(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Ju(t,e)):Ju(i,e)}});function Ju(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Yu=U(`$ZodCatch`,(e,t)=>{Vl.init(e,t),e._zod.optin=`optional`,Ys(e._zod,`optout`,()=>t.innerType._zod.optout),Ys(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Sc(e,n,Vs()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Sc(e,n,Vs()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Xu=U(`$ZodPipe`,(e,t)=>{Vl.init(e,t),Ys(e._zod,`values`,()=>t.in._zod.values),Ys(e._zod,`optin`,()=>t.in._zod.optin),Ys(e._zod,`optout`,()=>t.out._zod.optout),Ys(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Zu(e,t.in,n)):Zu(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Zu(e,t.out,n)):Zu(r,t.out,n)}});function Zu(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Qu=U(`$ZodPreprocess`,(e,t)=>{Xu.init(e,t)}),$u=U(`$ZodReadonly`,(e,t)=>{Vl.init(e,t),Ys(e._zod,`propValues`,()=>t.innerType._zod.propValues),Ys(e._zod,`values`,()=>t.innerType._zod.values),Ys(e._zod,`optin`,()=>t.innerType?._zod?.optin),Ys(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(ed):ed(r)}});function ed(e){return e.value=Object.freeze(e.value),e}var td=U(`$ZodLazy`,(e,t)=>{Vl.init(e,t),Ys(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),Ys(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),Ys(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),Ys(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),Ys(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),nd=U(`$ZodCustom`,(e,t)=>{Sl.init(e,t),Vl.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>rd(t,n,r,e));rd(i,n,r,e)}});function rd(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(wc(e))}}var id,ad=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function od(){return new ad}(id=globalThis).__zod_globalRegistry??(id.__zod_globalRegistry=od());var sd=globalThis.__zod_globalRegistry;function cd(e,t){return new e({type:`string`,...cc(t)})}function ld(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...cc(t)})}function ud(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...cc(t)})}function dd(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...cc(t)})}function fd(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...cc(t)})}function pd(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...cc(t)})}function md(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...cc(t)})}function hd(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...cc(t)})}function gd(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...cc(t)})}function _d(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...cc(t)})}function vd(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...cc(t)})}function yd(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...cc(t)})}function bd(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...cc(t)})}function xd(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...cc(t)})}function Sd(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...cc(t)})}function Cd(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...cc(t)})}function wd(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...cc(t)})}function Td(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...cc(t)})}function Ed(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...cc(t)})}function Dd(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...cc(t)})}function Od(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...cc(t)})}function kd(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...cc(t)})}function Ad(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...cc(t)})}function jd(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...cc(t)})}function Md(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...cc(t)})}function Nd(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...cc(t)})}function Pd(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...cc(t)})}function Fd(e,t){return new e({type:`number`,checks:[],...cc(t)})}function Id(e,t){return new e({type:`number`,coerce:!0,checks:[],...cc(t)})}function Ld(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...cc(t)})}function Rd(e,t){return new e({type:`boolean`,...cc(t)})}function zd(e,t){return new e({type:`null`,...cc(t)})}function Bd(e){return new e({type:`any`})}function Vd(e){return new e({type:`unknown`})}function Hd(e,t){return new e({type:`never`,...cc(t)})}function Ud(e,t){return new wl({check:`less_than`,...cc(t),value:e,inclusive:!1})}function Wd(e,t){return new wl({check:`less_than`,...cc(t),value:e,inclusive:!0})}function Gd(e,t){return new Tl({check:`greater_than`,...cc(t),value:e,inclusive:!1})}function Kd(e,t){return new Tl({check:`greater_than`,...cc(t),value:e,inclusive:!0})}function qd(e,t){return new El({check:`multiple_of`,...cc(t),value:e})}function Jd(e,t){return new Ol({check:`max_length`,...cc(t),maximum:e})}function Yd(e,t){return new kl({check:`min_length`,...cc(t),minimum:e})}function Xd(e,t){return new Al({check:`length_equals`,...cc(t),length:e})}function Zd(e,t){return new Ml({check:`string_format`,format:`regex`,...cc(t),pattern:e})}function Qd(e){return new Nl({check:`string_format`,format:`lowercase`,...cc(e)})}function $d(e){return new Pl({check:`string_format`,format:`uppercase`,...cc(e)})}function ef(e,t){return new Fl({check:`string_format`,format:`includes`,...cc(t),includes:e})}function tf(e,t){return new Il({check:`string_format`,format:`starts_with`,...cc(t),prefix:e})}function nf(e,t){return new Ll({check:`string_format`,format:`ends_with`,...cc(t),suffix:e})}function rf(e){return new Rl({check:`overwrite`,tx:e})}function af(e){return rf(t=>t.normalize(e))}function of(){return rf(e=>e.trim())}function sf(){return rf(e=>e.toLowerCase())}function cf(){return rf(e=>e.toUpperCase())}function lf(){return rf(e=>$s(e))}function uf(e,t,n){return new e({type:`array`,element:t,...cc(n)})}function df(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...cc(n)})}function ff(e,t){let n=pf(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(wc(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(wc(r))}},e(t.value,t)),t);return n}function pf(e,t){let n=new Sl({check:`custom`,...cc(t)});return n._zod.check=e,n}function mf(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??sd,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 hf(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,hf(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&vf(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function gf(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
72
+
73
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function _f(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:bf(t,`input`,e.processors),output:bf(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function vf(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return vf(r.element,n);if(r.type===`set`)return vf(r.valueType,n);if(r.type===`lazy`)return vf(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return vf(r.innerType,n);if(r.type===`intersection`)return vf(r.left,n)||vf(r.right,n);if(r.type===`record`||r.type===`map`)return vf(r.keyType,n)||vf(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:vf(r.in,n)||vf(r.out,n);if(r.type===`object`){for(let e in r.shape)if(vf(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(vf(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(vf(e,n))return!0;return!!(r.rest&&vf(r.rest,n))}return!1}var yf=(e,t={})=>n=>{let r=mf({...n,processors:t});return hf(e,r),gf(r,e),_f(r,e)},bf=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=mf({...i??{},target:a,io:t,processors:n});return hf(e,o),gf(o,e),_f(o,e)},xf={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Sf=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=xf[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Cf=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},wf=(e,t,n,r)=>{n.type=`boolean`},Tf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},Ef=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},Df=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Of=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},kf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},Af=(e,t,n,r)=>{n.not={}},jf=(e,t,n,r)=>{},Mf=(e,t,n,r)=>{},Nf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},Pf=(e,t,n,r)=>{let i=e._zod.def,a=Hs(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Ff=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},If=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},Lf=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Rf=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},zf=(e,t,n,r)=>{n.type=`boolean`},Bf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Vf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},Hf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Uf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},Wf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},Gf=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=hf(a.element,t,{...r,path:[...r.path,`items`]})},Kf=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=hf(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=hf(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},qf=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>hf(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Jf=(e,t,n,r)=>{let i=e._zod.def,a=hf(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=hf(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Yf=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>hf(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?hf(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},Xf=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=hf(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=hf(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=hf(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Zf=(e,t,n,r)=>{let i=e._zod.def,a=hf(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Qf=(e,t,n,r)=>{let i=e._zod.def;hf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},$f=(e,t,n,r)=>{let i=e._zod.def;hf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},ep=(e,t,n,r)=>{let i=e._zod.def;hf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},tp=(e,t,n,r)=>{let i=e._zod.def;hf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},np=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;hf(o,t,r);let s=t.seen.get(e);s.ref=o},rp=(e,t,n,r)=>{let i=e._zod.def;hf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ip=(e,t,n,r)=>{let i=e._zod.def;hf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ap=(e,t,n,r)=>{let i=e._zod.def;hf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},op=(e,t,n,r)=>{let i=e._zod.innerType;hf(i,t,r);let a=t.seen.get(e);a.ref=i},sp={string:Sf,number:Cf,boolean:wf,bigint:Tf,symbol:Ef,null:Df,undefined:Of,void:kf,never:Af,any:jf,unknown:Mf,date:Nf,enum:Pf,literal:Ff,nan:If,template_literal:Lf,file:Rf,success:zf,custom:Bf,function:Vf,transform:Hf,map:Uf,set:Wf,array:Gf,object:Kf,union:qf,intersection:Jf,tuple:Yf,record:Xf,nullable:Zf,nonoptional:Qf,default:$f,prefault:ep,catch:tp,pipe:np,readonly:rp,promise:ip,optional:ap,lazy:op};function cp(e,t){if(`_idmap`in e){let n=e,r=mf({...t,processors:sp}),i={};for(let e of n._idmap.entries()){let[t,n]=e;hf(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;gf(r,n),a[t]=_f(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=mf({...t,processors:sp});return hf(e,n),gf(n,e),_f(n,e)}var lp=U(`ZodISODateTime`,(e,t)=>{tu.init(e,t),Fp.init(e,t)});function up(e){return jd(lp,e)}var dp=U(`ZodISODate`,(e,t)=>{nu.init(e,t),Fp.init(e,t)});function fp(e){return Md(dp,e)}var pp=U(`ZodISOTime`,(e,t)=>{ru.init(e,t),Fp.init(e,t)});function mp(e){return Nd(pp,e)}var hp=U(`ZodISODuration`,(e,t)=>{iu.init(e,t),Fp.init(e,t)});function gp(e){return Pd(hp,e)}var _p=U(`ZodError`,(e,t)=>{Ec.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>kc(e,t)},flatten:{value:t=>Oc(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Us,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Us,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),vp=Ac(_p),yp=jc(_p),bp=Mc(_p),xp=Pc(_p),Sp=Ic(_p),Cp=Lc(_p),wp=Rc(_p),Tp=zc(_p),Ep=Bc(_p),Dp=Vc(_p),Op=Hc(_p),kp=Uc(_p),Ap=new WeakMap;function jp(e,t,n){let r=Object.getPrototypeOf(e),i=Ap.get(r);if(i||(i=new Set,Ap.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var Mp=U(`ZodType`,(e,t)=>(Vl.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:bf(e,`input`),output:bf(e,`output`)}}),e.toJSONSchema=yf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>vp(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>bp(e,t,n),e.parseAsync=async(t,n)=>yp(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>xp(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Sp(e,t,n),e.decode=(t,n)=>Cp(e,t,n),e.encodeAsync=async(t,n)=>wp(e,t,n),e.decodeAsync=async(t,n)=>Tp(e,t,n),e.safeEncode=(t,n)=>Ep(e,t,n),e.safeDecode=(t,n)=>Dp(e,t,n),e.safeEncodeAsync=async(t,n)=>Op(e,t,n),e.safeDecodeAsync=async(t,n)=>kp(e,t,n),jp(e,`ZodType`,{check(...e){let t=this.def;return this.clone(Zs(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return sc(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(uee(e,t))},superRefine(e,t){return this.check(dee(e,t))},overwrite(e){return this.check(rf(e))},optional(){return Om(this)},exactOptional(){return Am(this)},nullable(){return Mm(this)},nullish(){return Om(Mm(this))},nonoptional(e){return Rm(this,e)},array(){return K(this)},or(e){return hm([this,e])},and(e){return ym(this,e)},transform(e){return Hm(this,Em(e))},default(e){return Pm(this,e)},prefault(e){return Im(this,e)},catch(e){return Bm(this,e)},pipe(e){return Hm(this,e)},readonly(){return see(this)},describe(e){let t=this.clone();return sd.add(t,{description:e}),t},meta(...e){if(e.length===0)return sd.get(this);let t=this.clone();return sd.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return sd.get(e)?.description},configurable:!0}),e)),Np=U(`_ZodString`,(e,t)=>{Hl.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sf(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,jp(e,`_ZodString`,{regex(...e){return this.check(Zd(...e))},includes(...e){return this.check(ef(...e))},startsWith(...e){return this.check(tf(...e))},endsWith(...e){return this.check(nf(...e))},min(...e){return this.check(Yd(...e))},max(...e){return this.check(Jd(...e))},length(...e){return this.check(Xd(...e))},nonempty(...e){return this.check(Yd(1,...e))},lowercase(e){return this.check(Qd(e))},uppercase(e){return this.check($d(e))},trim(){return this.check(of())},normalize(...e){return this.check(af(...e))},toLowerCase(){return this.check(sf())},toUpperCase(){return this.check(cf())},slugify(){return this.check(lf())}})}),Pp=U(`ZodString`,(e,t)=>{Hl.init(e,t),Np.init(e,t),e.email=t=>e.check(ld(Ip,t)),e.url=t=>e.check(hd(Bp,t)),e.jwt=t=>e.check(Ad(ree,t)),e.emoji=t=>e.check(gd(Hp,t)),e.guid=t=>e.check(ud(Rp,t)),e.uuid=t=>e.check(dd(zp,t)),e.uuidv4=t=>e.check(fd(zp,t)),e.uuidv6=t=>e.check(pd(zp,t)),e.uuidv7=t=>e.check(md(zp,t)),e.nanoid=t=>e.check(_d(Up,t)),e.guid=t=>e.check(ud(Rp,t)),e.cuid=t=>e.check(vd(Wp,t)),e.cuid2=t=>e.check(yd(Gp,t)),e.ulid=t=>e.check(bd(Kp,t)),e.base64=t=>e.check(Dd(Xp,t)),e.base64url=t=>e.check(Od(Zp,t)),e.xid=t=>e.check(xd(qp,t)),e.ksuid=t=>e.check(Sd(Jp,t)),e.ipv4=t=>e.check(Cd(eee,t)),e.ipv6=t=>e.check(wd(tee,t)),e.cidrv4=t=>e.check(Td(nee,t)),e.cidrv6=t=>e.check(Ed(Yp,t)),e.e164=t=>e.check(kd(Qp,t)),e.datetime=t=>e.check(up(t)),e.date=t=>e.check(fp(t)),e.time=t=>e.check(mp(t)),e.duration=t=>e.check(gp(t))});function W(e){return cd(Pp,e)}var Fp=U(`ZodStringFormat`,(e,t)=>{Ul.init(e,t),Np.init(e,t)}),Ip=U(`ZodEmail`,(e,t)=>{Kl.init(e,t),Fp.init(e,t)});function Lp(e){return ld(Ip,e)}var Rp=U(`ZodGUID`,(e,t)=>{Wl.init(e,t),Fp.init(e,t)}),zp=U(`ZodUUID`,(e,t)=>{Gl.init(e,t),Fp.init(e,t)}),Bp=U(`ZodURL`,(e,t)=>{ql.init(e,t),Fp.init(e,t)});function Vp(e){return hd(Bp,e)}var Hp=U(`ZodEmoji`,(e,t)=>{Jl.init(e,t),Fp.init(e,t)}),Up=U(`ZodNanoID`,(e,t)=>{Yl.init(e,t),Fp.init(e,t)}),Wp=U(`ZodCUID`,(e,t)=>{Xl.init(e,t),Fp.init(e,t)}),Gp=U(`ZodCUID2`,(e,t)=>{Zl.init(e,t),Fp.init(e,t)}),Kp=U(`ZodULID`,(e,t)=>{Ql.init(e,t),Fp.init(e,t)}),qp=U(`ZodXID`,(e,t)=>{$l.init(e,t),Fp.init(e,t)}),Jp=U(`ZodKSUID`,(e,t)=>{eu.init(e,t),Fp.init(e,t)}),eee=U(`ZodIPv4`,(e,t)=>{au.init(e,t),Fp.init(e,t)}),tee=U(`ZodIPv6`,(e,t)=>{ou.init(e,t),Fp.init(e,t)}),nee=U(`ZodCIDRv4`,(e,t)=>{su.init(e,t),Fp.init(e,t)}),Yp=U(`ZodCIDRv6`,(e,t)=>{cu.init(e,t),Fp.init(e,t)}),Xp=U(`ZodBase64`,(e,t)=>{uu.init(e,t),Fp.init(e,t)}),Zp=U(`ZodBase64URL`,(e,t)=>{fu.init(e,t),Fp.init(e,t)}),Qp=U(`ZodE164`,(e,t)=>{pu.init(e,t),Fp.init(e,t)}),ree=U(`ZodJWT`,(e,t)=>{hu.init(e,t),Fp.init(e,t)}),$p=U(`ZodNumber`,(e,t)=>{gu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cf(e,t,n,r),jp(e,`ZodNumber`,{gt(e,t){return this.check(Gd(e,t))},gte(e,t){return this.check(Kd(e,t))},min(e,t){return this.check(Kd(e,t))},lt(e,t){return this.check(Ud(e,t))},lte(e,t){return this.check(Wd(e,t))},max(e,t){return this.check(Wd(e,t))},int(e){return this.check(em(e))},safe(e){return this.check(em(e))},positive(e){return this.check(Gd(0,e))},nonnegative(e){return this.check(Kd(0,e))},negative(e){return this.check(Ud(0,e))},nonpositive(e){return this.check(Wd(0,e))},multipleOf(e,t){return this.check(qd(e,t))},step(e,t){return this.check(qd(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function G(e){return Fd($p,e)}var iee=U(`ZodNumberFormat`,(e,t)=>{_u.init(e,t),$p.init(e,t)});function em(e){return Ld(iee,e)}var tm=U(`ZodBoolean`,(e,t)=>{vu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wf(e,t,n,r)});function nm(e){return Rd(tm,e)}var rm=U(`ZodNull`,(e,t)=>{yu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Df(e,t,n,r)});function im(e){return zd(rm,e)}var am=U(`ZodAny`,(e,t)=>{bu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function om(){return Bd(am)}var sm=U(`ZodUnknown`,(e,t)=>{xu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function cm(){return Vd(sm)}var lm=U(`ZodNever`,(e,t)=>{Su.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Af(e,t,n,r)});function um(e){return Hd(lm,e)}var dm=U(`ZodArray`,(e,t)=>{wu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gf(e,t,n,r),e.element=t.element,jp(e,`ZodArray`,{min(e,t){return this.check(Yd(e,t))},nonempty(e){return this.check(Yd(1,e))},max(e,t){return this.check(Jd(e,t))},length(e,t){return this.check(Xd(e,t))},unwrap(){return this.element}})});function K(e,t){return uf(dm,e,t)}var fm=U(`ZodObject`,(e,t)=>{ku.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kf(e,t,n,r),Ys(e,`shape`,()=>t.shape),jp(e,`ZodObject`,{keyof(){return Cm(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:cm()})},loose(){return this.clone({...this._zod.def,catchall:cm()})},strict(){return this.clone({...this._zod.def,catchall:um()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return pc(this,e)},safeExtend(e){return mc(this,e)},merge(e){return hc(this,e)},pick(e){return dc(this,e)},omit(e){return fc(this,e)},partial(...e){return gc(Dm,this,e[0])},required(...e){return _c(Lm,this,e[0])}})});function q(e,t){return new fm({type:`object`,shape:e??{},...cc(t)})}function pm(e,t){return new fm({type:`object`,shape:e,catchall:cm(),...cc(t)})}var mm=U(`ZodUnion`,(e,t)=>{ju.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qf(e,t,n,r),e.options=t.options});function hm(e,t){return new mm({type:`union`,options:e,...cc(t)})}var gm=U(`ZodDiscriminatedUnion`,(e,t)=>{mm.init(e,t),Mu.init(e,t)});function _m(e,t,n){return new gm({type:`union`,options:t,discriminator:e,...cc(n)})}var vm=U(`ZodIntersection`,(e,t)=>{Nu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jf(e,t,n,r)});function ym(e,t){return new vm({type:`intersection`,left:e,right:t})}var bm=U(`ZodRecord`,(e,t)=>{Iu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xf(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function xm(e,t,n){return!t||!t._zod?new bm({type:`record`,keyType:W(),valueType:e,...cc(t)}):new bm({type:`record`,keyType:e,valueType:t,...cc(n)})}var Sm=U(`ZodEnum`,(e,t)=>{Lu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pf(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Sm({...t,checks:[],...cc(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Sm({...t,checks:[],...cc(r),entries:i})}});function Cm(e,t){return new Sm({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...cc(t)})}var wm=U(`ZodLiteral`,(e,t)=>{Ru.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ff(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function J(e,t){return new wm({type:`literal`,values:Array.isArray(e)?e:[e],...cc(t)})}var Tm=U(`ZodTransform`,(e,t)=>{zu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hf(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new zs(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(wc(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(wc(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function Em(e){return new Tm({type:`transform`,transform:e})}var Dm=U(`ZodOptional`,(e,t)=>{Vu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ap(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Om(e){return new Dm({type:`optional`,innerType:e})}var km=U(`ZodExactOptional`,(e,t)=>{Hu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ap(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Am(e){return new km({type:`optional`,innerType:e})}var jm=U(`ZodNullable`,(e,t)=>{Uu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Mm(e){return new jm({type:`nullable`,innerType:e})}var Nm=U(`ZodDefault`,(e,t)=>{Wu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$f(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Pm(e,t){return new Nm({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ic(t)}})}var Fm=U(`ZodPrefault`,(e,t)=>{Ku.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ep(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Im(e,t){return new Fm({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ic(t)}})}var Lm=U(`ZodNonOptional`,(e,t)=>{qu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Rm(e,t){return new Lm({type:`nonoptional`,innerType:e,...cc(t)})}var zm=U(`ZodCatch`,(e,t)=>{Yu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tp(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Bm(e,t){return new zm({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Vm=U(`ZodPipe`,(e,t)=>{Xu.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>np(e,t,n,r),e.in=t.in,e.out=t.out});function Hm(e,t){return new Vm({type:`pipe`,in:e,out:t})}var aee=U(`ZodPreprocess`,(e,t)=>{Vm.init(e,t),Qu.init(e,t)}),oee=U(`ZodReadonly`,(e,t)=>{$u.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rp(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function see(e){return new oee({type:`readonly`,innerType:e})}var cee=U(`ZodLazy`,(e,t)=>{td.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>op(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Um(e){return new cee({type:`lazy`,getter:e})}var lee=U(`ZodCustom`,(e,t)=>{nd.init(e,t),Mp.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bf(e,t,n,r)});function uee(e,t={}){return df(lee,e,t)}function dee(e,t){return ff(e,t)}function Wm(e,t){return new aee({type:`pipe`,in:Em(e),out:t})}var fee={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},pee;pee||={};function mee(e){return Id($p,e)}var Gm=`2025-11-25`,hee=[Gm,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],gee=`io.modelcontextprotocol/related-task`,Km=`io.modelcontextprotocol/protocolVersion`,qm=`io.modelcontextprotocol/clientInfo`,Jm=`io.modelcontextprotocol/serverInfo`,Ym=`io.modelcontextprotocol/clientCapabilities`,Xm=`io.modelcontextprotocol/subscriptionId`,Zm=`io.modelcontextprotocol/logLevel`,Qm=Um(()=>hm([W(),G(),nm(),im(),xm(W(),Qm),K(Qm)])),$m=xm(W(),Qm),eh=K(Qm),th=hm([W(),G().int()]),nh=W(),rh=q({ttl:G().optional()}),ih=q({taskId:W()}),ah=pm({progressToken:th.optional(),[gee]:ih.optional()}),oh=q({_meta:ah.optional()}),sh=oh.extend({task:rh.optional()}),ch=q({method:W(),params:oh.loose().optional()}),lh=q({_meta:ah.optional()}),uh=q({method:W(),params:lh.loose().optional()}),dh=pm({get[Jm](){return Th.optional().catch(void 0)}}),fh=pm({_meta:dh.optional()}),ph=hm([W(),G().int()]),mh=q({jsonrpc:J(`2.0`),id:ph,...ch.shape}).strict(),hh=q({jsonrpc:J(`2.0`),...uh.shape}).strict(),gh=q({jsonrpc:J(`2.0`),id:ph,result:fh}).strict(),_h=q({jsonrpc:J(`2.0`),id:ph.optional(),error:q({code:G().int(),message:W(),data:cm().optional()})}).strict(),vh=hm([mh,hh,gh,_h]),_ee=hm([gh,_h]),yh=fh.strict(),bh=lh.extend({requestId:ph.optional(),reason:W().optional()}),xh=uh.extend({method:J(`notifications/cancelled`),params:bh}),Sh=q({src:W(),mimeType:W().optional(),sizes:K(W()).optional(),theme:Cm([`light`,`dark`]).optional()}),Ch=q({icons:K(Sh).optional()}),wh=q({name:W(),title:W().optional()}),Th=wh.extend({...wh.shape,...Ch.shape,version:W(),websiteUrl:W().optional(),description:W().optional()}),vee=Wm(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ym(q({form:ym(q({applyDefaults:nm().optional()}),$m).optional(),url:$m.optional()}),$m.optional())),Eh=pm({list:$m.optional(),cancel:$m.optional(),requests:pm({sampling:pm({createMessage:$m.optional()}).optional(),elicitation:pm({create:$m.optional()}).optional()}).optional()}),Dh=pm({list:$m.optional(),cancel:$m.optional(),requests:pm({tools:pm({call:$m.optional()}).optional()}).optional()}),Oh=q({experimental:xm(W(),$m).optional(),sampling:q({context:$m.optional(),tools:$m.optional()}).optional(),elicitation:vee.optional(),roots:q({listChanged:nm().optional()}).optional(),tasks:Eh.optional(),extensions:xm(W(),$m).optional()}),kh=oh.extend({protocolVersion:W(),capabilities:Oh,clientInfo:Th}),Ah=ch.extend({method:J(`initialize`),params:kh}),jh=q({experimental:xm(W(),$m).optional(),logging:$m.optional(),completions:$m.optional(),prompts:q({listChanged:nm().optional()}).optional(),resources:q({subscribe:nm().optional(),listChanged:nm().optional()}).optional(),tools:q({listChanged:nm().optional()}).optional(),tasks:Dh.optional(),extensions:xm(W(),$m).optional()}),Mh=fh.extend({protocolVersion:W(),capabilities:jh,serverInfo:Th,instructions:W().optional()}),Nh=uh.extend({method:J(`notifications/initialized`),params:lh.optional()}),Ph=ch.extend({method:J(`server/discover`),params:oh.optional()}),Fh=fh.extend({supportedVersions:K(W()),capabilities:jh,instructions:W().optional()}),Ih=ch.extend({method:J(`ping`),params:oh.optional()}),Lh=q({progress:G(),total:Om(G()),message:Om(W())}),Rh=q({...lh.shape,...Lh.shape,progressToken:th}),zh=uh.extend({method:J(`notifications/progress`),params:Rh}),Bh=oh.extend({cursor:nh.optional()}),Vh=ch.extend({params:Bh.optional()}),Hh=fh.extend({nextCursor:nh.optional()}),Uh=q({uri:W(),mimeType:Om(W()),_meta:xm(W(),cm()).optional()}),Wh=Uh.extend({text:W()}),Gh=W().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Kh=Uh.extend({blob:Gh}),qh=Cm([`user`,`assistant`]),Jh=q({audience:K(qh).optional(),priority:G().min(0).max(1).optional(),lastModified:up({offset:!0}).optional()}),Yh=q({...wh.shape,...Ch.shape,uri:W(),description:Om(W()),mimeType:Om(W()),size:Om(G()),annotations:Jh.optional(),_meta:Om(pm({}))}),Xh=q({...wh.shape,...Ch.shape,uriTemplate:W(),description:Om(W()),mimeType:Om(W()),annotations:Jh.optional(),_meta:Om(pm({}))}),Zh=Vh.extend({method:J(`resources/list`)}),Qh=Hh.extend({resources:K(Yh)}),$h=Vh.extend({method:J(`resources/templates/list`)}),eg=Hh.extend({resourceTemplates:K(Xh)}),tg=oh.extend({uri:W()}),ng=tg,rg=ch.extend({method:J(`resources/read`),params:ng}),ig=fh.extend({contents:K(hm([Wh,Kh]))}),ag=uh.extend({method:J(`notifications/resources/list_changed`),params:lh.optional()}),og=tg,sg=ch.extend({method:J(`resources/subscribe`),params:og}),cg=tg,lg=ch.extend({method:J(`resources/unsubscribe`),params:cg}),ug=q({toolsListChanged:nm().optional(),promptsListChanged:nm().optional(),resourcesListChanged:nm().optional(),resourceSubscriptions:K(W()).optional()}),dg=oh.extend({notifications:ug}),fg=ch.extend({method:J(`subscriptions/listen`),params:dg}),pg=lh.extend({notifications:ug}),mg=uh.extend({method:J(`notifications/subscriptions/acknowledged`),params:pg}),hg=dh.extend({[Xm]:ph}),gg=fh.extend({_meta:hg}),_g=lh.extend({uri:W()}),vg=uh.extend({method:J(`notifications/resources/updated`),params:_g}),yg=q({name:W(),description:Om(W()),required:Om(nm())}),bg=q({...wh.shape,...Ch.shape,description:Om(W()),arguments:Om(K(yg)),_meta:Om(pm({}))}),xg=Vh.extend({method:J(`prompts/list`)}),Sg=Hh.extend({prompts:K(bg)}),Cg=oh.extend({name:W(),arguments:xm(W(),W()).optional()}),wg=ch.extend({method:J(`prompts/get`),params:Cg}),Tg=q({type:J(`text`),text:W(),annotations:Jh.optional(),_meta:xm(W(),cm()).optional()}),Eg=q({type:J(`image`),data:Gh,mimeType:W(),annotations:Jh.optional(),_meta:xm(W(),cm()).optional()}),Dg=q({type:J(`audio`),data:Gh,mimeType:W(),annotations:Jh.optional(),_meta:xm(W(),cm()).optional()}),Og=q({type:J(`tool_use`),name:W(),id:W(),input:xm(W(),cm()),_meta:xm(W(),cm()).optional()}),kg=q({type:J(`resource`),resource:hm([Wh,Kh]),annotations:Jh.optional(),_meta:xm(W(),cm()).optional()}),Ag=Yh.extend({type:J(`resource_link`)}),jg=hm([Tg,Eg,Dg,Ag,kg]),Mg=q({role:qh,content:jg}),Ng=fh.extend({description:W().optional(),messages:K(Mg)}),Pg=uh.extend({method:J(`notifications/prompts/list_changed`),params:lh.optional()}),Fg=q({title:W().optional(),readOnlyHint:nm().optional(),destructiveHint:nm().optional(),idempotentHint:nm().optional(),openWorldHint:nm().optional()}),Ig=q({taskSupport:Cm([`required`,`optional`,`forbidden`]).optional()}),Lg=q({...wh.shape,...Ch.shape,description:W().optional(),inputSchema:q({type:J(`object`),properties:xm(W(),Qm).optional(),required:K(W()).optional()}).catchall(cm()),outputSchema:pm({$schema:W().optional()}).optional(),annotations:Fg.optional(),execution:Ig.optional(),_meta:xm(W(),cm()).optional()}),Rg=Vh.extend({method:J(`tools/list`)}),zg=Hh.extend({tools:K(Lg)}),Bg=fh.extend({content:K(jg).default([]),structuredContent:cm().optional(),isError:nm().optional()}),Vg=Bg.or(fh.extend({toolResult:cm()})),Hg=sh.extend({name:W(),arguments:xm(W(),cm()).optional()}),Ug=ch.extend({method:J(`tools/call`),params:Hg}),Wg=uh.extend({method:J(`notifications/tools/list_changed`),params:lh.optional()}),Gg=q({autoRefresh:nm().default(!0),debounceMs:G().int().nonnegative().default(300)}),Kg=Cm([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),qg=oh.extend({level:Kg}),Jg=ch.extend({method:J(`logging/setLevel`),params:qg}),Yg=lh.extend({level:Kg,logger:W().optional(),data:cm()}),Xg=uh.extend({method:J(`notifications/message`),params:Yg}),Zg=q({name:W().optional()}),Qg=q({hints:K(Zg).optional(),costPriority:G().min(0).max(1).optional(),speedPriority:G().min(0).max(1).optional(),intelligencePriority:G().min(0).max(1).optional()}),$g=q({mode:Cm([`auto`,`required`,`none`]).optional()}),e_=q({type:J(`tool_result`),toolUseId:W().describe(`The unique identifier for the corresponding tool call.`),content:K(jg),structuredContent:cm().optional(),isError:nm().optional(),_meta:xm(W(),cm()).optional()}),t_=_m(`type`,[Tg,Eg,Dg]),n_=_m(`type`,[Tg,Eg,Dg,Og,e_]),r_=q({role:qh,content:hm([n_,K(n_)]),_meta:xm(W(),cm()).optional()}),i_=sh.extend({messages:K(r_),modelPreferences:Qg.optional(),systemPrompt:W().optional(),includeContext:Cm([`none`,`thisServer`,`allServers`]).optional(),temperature:G().optional(),maxTokens:G().int(),stopSequences:K(W()).optional(),metadata:$m.optional(),tools:K(Lg).optional(),toolChoice:$g.optional()}),a_=ch.extend({method:J(`sampling/createMessage`),params:i_}),o_=fh.extend({model:W(),stopReason:Om(Cm([`endTurn`,`stopSequence`,`maxTokens`]).or(W())),role:qh,content:t_}),s_=fh.extend({model:W(),stopReason:Om(Cm([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(W())),role:qh,content:hm([n_,K(n_)])}),c_=q({type:J(`boolean`),title:W().optional(),description:W().optional(),default:nm().optional()}),l_=q({type:J(`string`),title:W().optional(),description:W().optional(),minLength:G().optional(),maxLength:G().optional(),format:Cm([`email`,`uri`,`date`,`date-time`]).optional(),default:W().optional()}),u_=q({type:Cm([`number`,`integer`]),title:W().optional(),description:W().optional(),minimum:G().optional(),maximum:G().optional(),default:G().optional()}),d_=q({type:J(`string`),title:W().optional(),description:W().optional(),enum:K(W()),default:W().optional()}),f_=q({type:J(`string`),title:W().optional(),description:W().optional(),oneOf:K(q({const:W(),title:W()})),default:W().optional()}),p_=q({type:J(`string`),title:W().optional(),description:W().optional(),enum:K(W()),enumNames:K(W()).optional(),default:W().optional()}),m_=hm([d_,f_]),h_=q({type:J(`array`),title:W().optional(),description:W().optional(),minItems:G().optional(),maxItems:G().optional(),items:q({type:J(`string`),enum:K(W())}),default:K(W()).optional()}),g_=q({type:J(`array`),title:W().optional(),description:W().optional(),minItems:G().optional(),maxItems:G().optional(),items:q({anyOf:K(q({const:W(),title:W()}))}),default:K(W()).optional()}),__=hm([h_,g_]),v_=hm([p_,m_,__]),y_=hm([v_,c_,l_,u_]),b_=sh.extend({mode:J(`form`).optional(),message:W(),requestedSchema:q({type:J(`object`),properties:xm(W(),y_),required:K(W()).optional()}).catchall(cm())}),x_=sh.extend({mode:J(`url`),message:W(),elicitationId:W(),url:W().url()}),S_=hm([b_,x_]),C_=ch.extend({method:J(`elicitation/create`),params:S_}),w_=lh.extend({elicitationId:W()}),T_=uh.extend({method:J(`notifications/elicitation/complete`),params:w_}),E_=fh.extend({action:Cm([`accept`,`decline`,`cancel`]),content:Wm(e=>e===null?void 0:e,xm(W(),hm([W(),G(),nm(),K(W())])).optional())}),D_=q({type:J(`ref/resource`),uri:W()}),O_=q({type:J(`ref/prompt`),name:W()}),k_=oh.extend({ref:hm([O_,D_]),argument:q({name:W(),value:W()}),context:q({arguments:xm(W(),W()).optional()}).optional()}),A_=ch.extend({method:J(`completion/complete`),params:k_}),j_=fh.extend({completion:pm({values:K(W()).max(100),total:Om(G().int()),hasMore:Om(nm())})}),M_=q({uri:W().startsWith(`file://`),name:W().optional(),_meta:xm(W(),cm()).optional()}),N_=ch.extend({method:J(`roots/list`),params:oh.optional()}),P_=fh.extend({roots:K(M_)}),F_=uh.extend({method:J(`notifications/roots/list_changed`),params:lh.optional()}),I_=pm({ttl:G().optional(),pollInterval:G().optional()}),L_=Cm([`working`,`input_required`,`completed`,`failed`,`cancelled`]),R_=q({taskId:W(),status:L_,ttl:hm([G(),im()]),createdAt:W(),lastUpdatedAt:W(),pollInterval:Om(G()),statusMessage:Om(W())}),z_=fh.extend({task:R_}),B_=lh.merge(R_),V_=uh.extend({method:J(`notifications/tasks/status`),params:B_}),H_=ch.extend({method:J(`tasks/get`),params:oh.extend({taskId:W()})}),U_=fh.merge(R_),W_=ch.extend({method:J(`tasks/result`),params:oh.extend({taskId:W()})}),G_=fh.loose(),K_=Vh.extend({method:J(`tasks/list`)}),q_=Hh.extend({tasks:K(R_)}),J_=ch.extend({method:J(`tasks/cancel`),params:oh.extend({taskId:W()})}),Y_=fh.merge(R_),X_=hm([Ih,Ah,Ph,A_,Jg,wg,xg,Zh,$h,rg,sg,lg,fg,Ug,Rg]),Z_=hm([xh,zh,Nh,F_]),Q_=hm([yh,o_,s_,E_,P_]),$_=hm([Ih,a_,C_,N_]),ev=hm([xh,zh,Xg,vg,ag,Wg,Pg,mg,T_]),tv=hm([yh,Mh,Fh,j_,Ng,Sg,Qh,eg,ig,Bg,zg,gg]),nv=Vp().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:fee.custom,message:`URL must be parseable`,fatal:!0}),Ls}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),rv=pm({resource:W().url(),authorization_servers:K(nv).optional(),jwks_uri:W().url().optional(),scopes_supported:K(W()).optional(),bearer_methods_supported:K(W()).optional(),resource_signing_alg_values_supported:K(W()).optional(),resource_name:W().optional(),resource_documentation:W().optional(),resource_policy_uri:W().url().optional(),resource_tos_uri:W().url().optional(),tls_client_certificate_bound_access_tokens:nm().optional(),authorization_details_types_supported:K(W()).optional(),dpop_signing_alg_values_supported:K(W()).optional(),dpop_bound_access_tokens_required:nm().optional()}),iv=pm({issuer:W(),authorization_endpoint:nv,token_endpoint:nv,registration_endpoint:nv.optional(),scopes_supported:K(W()).optional(),response_types_supported:K(W()),response_modes_supported:K(W()).optional(),grant_types_supported:K(W()).optional(),token_endpoint_auth_methods_supported:K(W()).optional(),token_endpoint_auth_signing_alg_values_supported:K(W()).optional(),service_documentation:nv.optional(),revocation_endpoint:nv.optional(),revocation_endpoint_auth_methods_supported:K(W()).optional(),revocation_endpoint_auth_signing_alg_values_supported:K(W()).optional(),introspection_endpoint:W().optional(),introspection_endpoint_auth_methods_supported:K(W()).optional(),introspection_endpoint_auth_signing_alg_values_supported:K(W()).optional(),code_challenge_methods_supported:K(W()).optional(),client_id_metadata_document_supported:nm().optional(),authorization_response_iss_parameter_supported:nm().optional().catch(void 0)}),av=pm({issuer:W(),authorization_endpoint:nv,token_endpoint:nv,userinfo_endpoint:nv.optional(),jwks_uri:nv,registration_endpoint:nv.optional(),scopes_supported:K(W()).optional(),response_types_supported:K(W()),response_modes_supported:K(W()).optional(),grant_types_supported:K(W()).optional(),acr_values_supported:K(W()).optional(),subject_types_supported:K(W()),id_token_signing_alg_values_supported:K(W()),id_token_encryption_alg_values_supported:K(W()).optional(),id_token_encryption_enc_values_supported:K(W()).optional(),userinfo_signing_alg_values_supported:K(W()).optional(),userinfo_encryption_alg_values_supported:K(W()).optional(),userinfo_encryption_enc_values_supported:K(W()).optional(),request_object_signing_alg_values_supported:K(W()).optional(),request_object_encryption_alg_values_supported:K(W()).optional(),request_object_encryption_enc_values_supported:K(W()).optional(),token_endpoint_auth_methods_supported:K(W()).optional(),token_endpoint_auth_signing_alg_values_supported:K(W()).optional(),display_values_supported:K(W()).optional(),claim_types_supported:K(W()).optional(),claims_supported:K(W()).optional(),service_documentation:W().optional(),claims_locales_supported:K(W()).optional(),ui_locales_supported:K(W()).optional(),claims_parameter_supported:nm().optional(),request_parameter_supported:nm().optional(),request_uri_parameter_supported:nm().optional(),require_request_uri_registration:nm().optional(),op_policy_uri:nv.optional(),op_tos_uri:nv.optional(),client_id_metadata_document_supported:nm().optional(),authorization_response_iss_parameter_supported:nm().optional().catch(void 0)}),ov=q({...av.shape,...iv.pick({code_challenge_methods_supported:!0}).shape}),sv=q({access_token:W(),id_token:W().optional(),token_type:W(),expires_in:mee().optional(),scope:W().optional(),refresh_token:W().optional()}).strip(),cv=q({issued_token_type:J(`urn:ietf:params:oauth:token-type:id-jag`),access_token:W(),token_type:W().optional(),expires_in:G().optional(),scope:W().optional()}).strip(),lv=q({error:W(),error_description:W().optional(),error_uri:W().optional()}),uv=nv.optional().or(J(``).transform(()=>void 0)),dv=q({redirect_uris:K(nv),token_endpoint_auth_method:W().optional(),grant_types:K(W()).optional(),response_types:K(W()).optional(),application_type:W().optional(),client_name:W().optional(),client_uri:nv.optional(),logo_uri:uv,scope:W().optional(),contacts:K(W()).optional(),tos_uri:uv,policy_uri:W().optional(),jwks_uri:nv.optional(),jwks:om().optional(),software_id:W().optional(),software_version:W().optional(),software_statement:W().optional()}).strip(),fv=q({client_id:W(),client_secret:W().optional(),client_id_issued_at:G().optional(),client_secret_expires_at:G().optional()}).strip(),pv=dv.merge(fv),yee=q({error:W(),error_description:W().optional()}).strip(),bee=q({token:W(),token_type_hint:W().optional()}).strip(),mv=Symbol.for(`mcp.sdk.errorBrands`);function hv(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,mv,{value:n,enumerable:!1,configurable:!0})}function gv(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,mv)){let n=t[mv];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var _v=function(e){return e.InvalidRequest=`invalid_request`,e.InvalidClient=`invalid_client`,e.InvalidGrant=`invalid_grant`,e.UnauthorizedClient=`unauthorized_client`,e.UnsupportedGrantType=`unsupported_grant_type`,e.InvalidScope=`invalid_scope`,e.AccessDenied=`access_denied`,e.ServerError=`server_error`,e.TemporarilyUnavailable=`temporarily_unavailable`,e.UnsupportedResponseType=`unsupported_response_type`,e.UnsupportedTokenType=`unsupported_token_type`,e.InvalidToken=`invalid_token`,e.MethodNotAllowed=`method_not_allowed`,e.TooManyRequests=`too_many_requests`,e.InvalidClientMetadata=`invalid_client_metadata`,e.InvalidRedirectUri=`invalid_redirect_uri`,e.InsufficientScope=`insufficient_scope`,e.InvalidTarget=`invalid_target`,e}({}),vv=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return gv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return gv(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,hv(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}},yv=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),bv=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return gv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return gv(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`SdkError`,hv(this,new.target)}},xv=class extends bv{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n){super(e,t,n),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}};function xee(e){let t=typeof e==`string`?new URL(e):new URL(e.href);return t.hash=``,t}function See({requestedResource:e,configuredResource:t}){let n=typeof e==`string`?new URL(e):new URL(e.href),r=typeof t==`string`?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;let i=n.pathname.endsWith(`/`)?n.pathname:n.pathname+`/`,a=r.pathname.endsWith(`/`)?r.pathname:r.pathname+`/`;return i.startsWith(a)}var Sv=`2026-07-28`,Cv=[Sv];function wv(e){return e>=Sv}function Tv(e){return e.filter(e=>!wv(e))}function Ev(e){return e.filter(e=>wv(e))}function Dv(e){let t=e.structuredContent;return t===void 0||!(typeof t!=`object`||!t||Array.isArray(t))||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var Ov=[`task`,`inputRequests`,`requestState`];function Cee(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||Ov.some(t=>t in e)?e:{...e,content:[]}}function wee(){let e=Um(()=>hm([W(),G(),nm(),im(),xm(W(),e),K(e)])),t=xm(W(),e),n=hm([W(),G().int()]),r=W(),i=q({ttl:G().optional()}),a=q({taskId:W()}),o=pm({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=q({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=q({method:W(),params:s.loose().optional()}),u=q({_meta:o.optional()}),d=q({method:W(),params:u.loose().optional()}),f=pm({_meta:o.optional()}),p=hm([W(),G().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:W().optional()}),g=d.extend({method:J(`notifications/cancelled`),params:h}),_=q({src:W(),mimeType:W().optional(),sizes:K(W()).optional(),theme:Cm([`light`,`dark`]).optional()}),v=q({icons:K(_).optional()}),y=q({name:W(),title:W().optional()}),b=y.extend({...y.shape,...v.shape,version:W(),websiteUrl:W().optional(),description:W().optional()}),x=Wm(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ym(q({form:ym(q({applyDefaults:nm().optional()}),t).optional(),url:t.optional()}),t.optional())),S=pm({list:t.optional(),cancel:t.optional(),requests:pm({sampling:pm({createMessage:t.optional()}).optional(),elicitation:pm({create:t.optional()}).optional()}).optional()}),C=pm({list:t.optional(),cancel:t.optional(),requests:pm({tools:pm({call:t.optional()}).optional()}).optional()}),w=q({experimental:xm(W(),t).optional(),sampling:q({context:t.optional(),tools:t.optional()}).optional(),elicitation:x.optional(),roots:q({listChanged:nm().optional()}).optional(),tasks:S.optional(),extensions:xm(W(),t).optional()}),T=s.extend({protocolVersion:W(),capabilities:w,clientInfo:b}),E=l.extend({method:J(`initialize`),params:T}),D=q({experimental:xm(W(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:q({listChanged:nm().optional()}).optional(),resources:q({subscribe:nm().optional(),listChanged:nm().optional()}).optional(),tools:q({listChanged:nm().optional()}).optional(),tasks:C.optional(),extensions:xm(W(),t).optional()}),O=f.extend({protocolVersion:W(),capabilities:D,serverInfo:b,instructions:W().optional()}),k=d.extend({method:J(`notifications/initialized`),params:u.optional()}),A=l.extend({method:J(`ping`),params:s.optional()}),j=q({progress:G(),total:Om(G()),message:Om(W())}),M=q({...u.shape,...j.shape,progressToken:n}),N=d.extend({method:J(`notifications/progress`),params:M}),P=s.extend({cursor:r.optional()}),F=l.extend({params:P.optional()}),I=f.extend({nextCursor:r.optional()}),L=q({uri:W(),mimeType:Om(W()),_meta:xm(W(),cm()).optional()}),ee=L.extend({text:W()}),te=W().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),ne=L.extend({blob:te}),R=Cm([`user`,`assistant`]),z=q({audience:K(R).optional(),priority:G().min(0).max(1).optional(),lastModified:up({offset:!0}).optional()}),B=q({...y.shape,...v.shape,uri:W(),description:Om(W()),mimeType:Om(W()),size:Om(G()),annotations:z.optional(),_meta:Om(pm({}))}),re=q({...y.shape,...v.shape,uriTemplate:W(),description:Om(W()),mimeType:Om(W()),annotations:z.optional(),_meta:Om(pm({}))}),ie=F.extend({method:J(`resources/list`)}),ae=I.extend({resources:K(B)}),oe=F.extend({method:J(`resources/templates/list`)}),se=I.extend({resourceTemplates:K(re)}),ce=s.extend({uri:W()}),le=ce,ue=l.extend({method:J(`resources/read`),params:le}),de=f.extend({contents:K(hm([ee,ne]))}),fe=d.extend({method:J(`notifications/resources/list_changed`),params:u.optional()}),pe=ce,me=l.extend({method:J(`resources/subscribe`),params:pe}),V=ce,he=l.extend({method:J(`resources/unsubscribe`),params:V}),ge=u.extend({uri:W()}),_e=d.extend({method:J(`notifications/resources/updated`),params:ge}),ve=q({name:W(),description:Om(W()),required:Om(nm())}),ye=q({...y.shape,...v.shape,description:Om(W()),arguments:Om(K(ve)),_meta:Om(pm({}))}),be=F.extend({method:J(`prompts/list`)}),xe=I.extend({prompts:K(ye)}),Se=s.extend({name:W(),arguments:xm(W(),W()).optional()}),Ce=l.extend({method:J(`prompts/get`),params:Se}),we=q({type:J(`text`),text:W(),annotations:z.optional(),_meta:xm(W(),cm()).optional()}),Te=q({type:J(`image`),data:te,mimeType:W(),annotations:z.optional(),_meta:xm(W(),cm()).optional()}),Ee=q({type:J(`audio`),data:te,mimeType:W(),annotations:z.optional(),_meta:xm(W(),cm()).optional()}),De=q({type:J(`tool_use`),name:W(),id:W(),input:xm(W(),cm()),_meta:xm(W(),cm()).optional()}),Oe=q({type:J(`resource`),resource:hm([ee,ne]),annotations:z.optional(),_meta:xm(W(),cm()).optional()}),ke=B.extend({type:J(`resource_link`)}),Ae=hm([we,Te,Ee,ke,Oe]),je=q({role:R,content:Ae}),Me=f.extend({description:W().optional(),messages:K(je)}),Ne=d.extend({method:J(`notifications/prompts/list_changed`),params:u.optional()}),Pe=q({title:W().optional(),readOnlyHint:nm().optional(),destructiveHint:nm().optional(),idempotentHint:nm().optional(),openWorldHint:nm().optional()}),Fe=q({taskSupport:Cm([`required`,`optional`,`forbidden`]).optional()}),Ie=q({...y.shape,...v.shape,description:W().optional(),inputSchema:q({type:J(`object`),properties:xm(W(),e).optional(),required:K(W()).optional()}).catchall(cm()),outputSchema:q({type:J(`object`),properties:xm(W(),e).optional(),required:K(W()).optional()}).catchall(cm()).optional(),annotations:Pe.optional(),execution:Fe.optional(),_meta:xm(W(),cm()).optional()}),Le=F.extend({method:J(`tools/list`)}),Re=I.extend({tools:K(Ie)}),ze=f.extend({content:K(Ae),structuredContent:xm(W(),cm()).optional(),isError:nm().optional()}),Be=c.extend({name:W(),arguments:xm(W(),cm()).optional()}),Ve=l.extend({method:J(`tools/call`),params:Be}),He=d.extend({method:J(`notifications/tools/list_changed`),params:u.optional()}),Ue=Cm([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),H=s.extend({level:Ue}),We=l.extend({method:J(`logging/setLevel`),params:H}),Ge=u.extend({level:Ue,logger:W().optional(),data:cm()}),Ke=d.extend({method:J(`notifications/message`),params:Ge}),qe=q({name:W().optional()}),Je=q({hints:K(qe).optional(),costPriority:G().min(0).max(1).optional(),speedPriority:G().min(0).max(1).optional(),intelligencePriority:G().min(0).max(1).optional()}),Ye=q({mode:Cm([`auto`,`required`,`none`]).optional()}),Xe=q({type:J(`tool_result`),toolUseId:W().describe(`The unique identifier for the corresponding tool call.`),content:K(Ae),structuredContent:q({}).loose().optional(),isError:nm().optional(),_meta:xm(W(),cm()).optional()}),Ze=_m(`type`,[we,Te,Ee]),Qe=_m(`type`,[we,Te,Ee,De,Xe]),$e=q({role:R,content:hm([Qe,K(Qe)]),_meta:xm(W(),cm()).optional()}),et=c.extend({messages:K($e),modelPreferences:Je.optional(),systemPrompt:W().optional(),includeContext:Cm([`none`,`thisServer`,`allServers`]).optional(),temperature:G().optional(),maxTokens:G().int(),stopSequences:K(W()).optional(),metadata:t.optional(),tools:K(Ie).optional(),toolChoice:Ye.optional()}),tt=l.extend({method:J(`sampling/createMessage`),params:et}),nt=f.extend({model:W(),stopReason:Om(Cm([`endTurn`,`stopSequence`,`maxTokens`]).or(W())),role:R,content:Ze}),rt=f.extend({model:W(),stopReason:Om(Cm([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(W())),role:R,content:hm([Qe,K(Qe)])}),it=q({type:J(`boolean`),title:W().optional(),description:W().optional(),default:nm().optional()}),at=q({type:J(`string`),title:W().optional(),description:W().optional(),minLength:G().optional(),maxLength:G().optional(),format:Cm([`email`,`uri`,`date`,`date-time`]).optional(),default:W().optional()}),ot=q({type:Cm([`number`,`integer`]),title:W().optional(),description:W().optional(),minimum:G().optional(),maximum:G().optional(),default:G().optional()}),st=q({type:J(`string`),title:W().optional(),description:W().optional(),enum:K(W()),default:W().optional()}),ct=q({type:J(`string`),title:W().optional(),description:W().optional(),oneOf:K(q({const:W(),title:W()})),default:W().optional()}),lt=q({type:J(`string`),title:W().optional(),description:W().optional(),enum:K(W()),enumNames:K(W()).optional(),default:W().optional()}),ut=hm([st,ct]),dt=q({type:J(`array`),title:W().optional(),description:W().optional(),minItems:G().optional(),maxItems:G().optional(),items:q({type:J(`string`),enum:K(W())}),default:K(W()).optional()}),ft=q({type:J(`array`),title:W().optional(),description:W().optional(),minItems:G().optional(),maxItems:G().optional(),items:q({anyOf:K(q({const:W(),title:W()}))}),default:K(W()).optional()}),pt=hm([dt,ft]),mt=hm([lt,ut,pt]),ht=hm([mt,it,at,ot]),gt=c.extend({mode:J(`form`).optional(),message:W(),requestedSchema:q({type:J(`object`),properties:xm(W(),ht),required:K(W()).optional()}).catchall(cm())}),_t=c.extend({mode:J(`url`),message:W(),elicitationId:W(),url:W().url()}),vt=hm([gt,_t]),yt=l.extend({method:J(`elicitation/create`),params:vt}),bt=u.extend({elicitationId:W()}),xt=d.extend({method:J(`notifications/elicitation/complete`),params:bt}),St=f.extend({action:Cm([`accept`,`decline`,`cancel`]),content:Wm(e=>e===null?void 0:e,xm(W(),hm([W(),G(),nm(),K(W())])).optional())}),Ct=q({type:J(`ref/resource`),uri:W()}),wt=q({type:J(`ref/prompt`),name:W()}),Tt=s.extend({ref:hm([wt,Ct]),argument:q({name:W(),value:W()}),context:q({arguments:xm(W(),W()).optional()}).optional()}),Et=l.extend({method:J(`completion/complete`),params:Tt}),Dt=f.extend({completion:pm({values:K(W()).max(100),total:Om(G().int()),hasMore:Om(nm())})}),Ot=q({uri:W().startsWith(`file://`),name:W().optional(),_meta:xm(W(),cm()).optional()}),kt=l.extend({method:J(`roots/list`),params:s.optional()}),At=f.extend({roots:K(Ot)}),jt=d.extend({method:J(`notifications/roots/list_changed`),params:u.optional()}),Mt=pm({ttl:G().optional(),pollInterval:G().optional()}),Nt=Cm([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Pt=q({taskId:W(),status:Nt,ttl:hm([G(),im()]),createdAt:W(),lastUpdatedAt:W(),pollInterval:Om(G()),statusMessage:Om(W())}),Ft=f.extend({task:Pt}),It=u.merge(Pt),Lt=d.extend({method:J(`notifications/tasks/status`),params:It}),Rt=l.extend({method:J(`tasks/get`),params:s.extend({taskId:W()})}),zt=f.merge(Pt),Bt=l.extend({method:J(`tasks/result`),params:s.extend({taskId:W()})}),Vt=f.loose(),Ht=F.extend({method:J(`tasks/list`)}),Ut=I.extend({tasks:K(Pt)}),Wt=l.extend({method:J(`tasks/cancel`),params:s.extend({taskId:W()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:h,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:y,ImplementationSchema:b,ClientTasksCapabilitySchema:S,ServerTasksCapabilitySchema:C,ClientCapabilitiesSchema:w,InitializeRequestParamsSchema:T,InitializeRequestSchema:E,ServerCapabilitiesSchema:D,InitializeResultSchema:O,InitializedNotificationSchema:k,PingRequestSchema:A,ProgressSchema:j,ProgressNotificationParamsSchema:M,ProgressNotificationSchema:N,PaginatedRequestParamsSchema:P,PaginatedRequestSchema:F,PaginatedResultSchema:I,ResourceContentsSchema:L,TextResourceContentsSchema:ee,BlobResourceContentsSchema:ne,RoleSchema:R,AnnotationsSchema:z,ResourceSchema:B,ResourceTemplateSchema:re,ListResourcesRequestSchema:ie,ListResourcesResultSchema:ae,ListResourceTemplatesRequestSchema:oe,ListResourceTemplatesResultSchema:se,ResourceRequestParamsSchema:ce,ReadResourceRequestParamsSchema:le,ReadResourceRequestSchema:ue,ReadResourceResultSchema:de,ResourceListChangedNotificationSchema:fe,SubscribeRequestParamsSchema:pe,SubscribeRequestSchema:me,UnsubscribeRequestParamsSchema:V,UnsubscribeRequestSchema:he,ResourceUpdatedNotificationParamsSchema:ge,ResourceUpdatedNotificationSchema:_e,PromptArgumentSchema:ve,PromptSchema:ye,ListPromptsRequestSchema:be,ListPromptsResultSchema:xe,GetPromptRequestParamsSchema:Se,GetPromptRequestSchema:Ce,TextContentSchema:we,ImageContentSchema:Te,AudioContentSchema:Ee,ToolUseContentSchema:De,EmbeddedResourceSchema:Oe,ResourceLinkSchema:ke,ContentBlockSchema:Ae,PromptMessageSchema:je,GetPromptResultSchema:Me,PromptListChangedNotificationSchema:Ne,ToolAnnotationsSchema:Pe,ToolExecutionSchema:Fe,ToolSchema:Ie,ListToolsRequestSchema:Le,ListToolsResultSchema:Re,CallToolResultSchema:ze,CallToolRequestParamsSchema:Be,CallToolRequestSchema:Ve,ToolListChangedNotificationSchema:He,LoggingLevelSchema:Ue,SetLevelRequestParamsSchema:H,SetLevelRequestSchema:We,LoggingMessageNotificationParamsSchema:Ge,LoggingMessageNotificationSchema:Ke,ModelHintSchema:qe,ModelPreferencesSchema:Je,ToolChoiceSchema:Ye,ToolResultContentSchema:Xe,SamplingContentSchema:Ze,SamplingMessageContentBlockSchema:Qe,SamplingMessageSchema:$e,CreateMessageRequestParamsSchema:et,CreateMessageRequestSchema:tt,CreateMessageResultSchema:nt,CreateMessageResultWithToolsSchema:rt,BooleanSchemaSchema:it,StringSchemaSchema:at,NumberSchemaSchema:ot,UntitledSingleSelectEnumSchemaSchema:st,TitledSingleSelectEnumSchemaSchema:ct,LegacyTitledEnumSchemaSchema:lt,SingleSelectEnumSchemaSchema:ut,UntitledMultiSelectEnumSchemaSchema:dt,TitledMultiSelectEnumSchemaSchema:ft,MultiSelectEnumSchemaSchema:pt,EnumSchemaSchema:mt,PrimitiveSchemaDefinitionSchema:ht,ElicitRequestFormParamsSchema:gt,ElicitRequestURLParamsSchema:_t,ElicitRequestParamsSchema:vt,ElicitRequestSchema:yt,ElicitationCompleteNotificationParamsSchema:bt,ElicitationCompleteNotificationSchema:xt,ElicitResultSchema:St,ResourceTemplateReferenceSchema:Ct,PromptReferenceSchema:wt,CompleteRequestParamsSchema:Tt,CompleteRequestSchema:Et,CompleteResultSchema:Dt,RootSchema:Ot,ListRootsRequestSchema:kt,ListRootsResultSchema:At,RootsListChangedNotificationSchema:jt,TaskCreationParamsSchema:Mt,TaskStatusSchema:Nt,TaskSchema:Pt,CreateTaskResultSchema:Ft,TaskStatusNotificationParamsSchema:It,TaskStatusNotificationSchema:Lt,GetTaskRequestSchema:Rt,GetTaskResultSchema:zt,GetTaskPayloadRequestSchema:Bt,GetTaskPayloadResultSchema:Vt,ListTasksRequestSchema:Ht,ListTasksResultSchema:Ut,CancelTaskRequestSchema:Wt,CancelTaskResultSchema:f.merge(Pt),ClientRequestSchema:hm([A,E,Et,We,Ce,be,ie,oe,ue,me,he,Ve,Le,Rt,Bt,Ht,Wt]),ClientNotificationSchema:hm([g,N,k,jt,Lt]),ClientResultSchema:hm([m,nt,rt,St,At,zt,Ut,Ft]),ServerRequestSchema:hm([A,tt,yt,kt,Rt,Bt,Ht,Wt]),ServerNotificationSchema:hm([g,N,Ke,_e,fe,He,Ne,Lt,xt]),ServerResultSchema:hm([m,O,Dt,Me,xe,ae,se,de,ze,Re,zt,Ut,Ft]),CallToolResultWireSchema:cm().superRefine((e,t)=>{if(!(typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0)){for(let n of Ov)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries '${n}' — another result family cannot default into an empty tools/call success`});return}}}).transform(Cee).pipe(ze)}}var Tee;function kv(){return Tee??=wee()}function Av(e){return e.type!==`object`}var Eee=new Set([`const`,`enum`,`default`,`examples`]),Dee=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function jv(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function Oee(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(jv(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=Ps(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&jv(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:Eee.has(o)?i[o]=s:Dee.has(o)?i[o]=r(s,!0):i[o]=r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var Mv={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Nv={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},Pv={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Fv;function Iv(){if(Fv)return Fv;let e=kv();return Fv={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},Fv}function Lv(e){return Object.prototype.hasOwnProperty.call(Mv,e)}function Rv(e){return Object.prototype.hasOwnProperty.call(Nv,e)}function zv(e){return Object.prototype.hasOwnProperty.call(Pv,e)}function Bv(e){return zv(e)?Iv().resultSchemas[e]:void 0}function Vv(e){return Lv(e)?Iv().requestSchemas[e]:void 0}function Hv(e){return Rv(e)?Iv().notificationSchemas[e]:void 0}Object.keys(Mv),Object.keys(Nv);function Uv(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Wv(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var Gv={ok:!1,reason:`not-in-era`};function Kv(e){return Uv(e)&&Uv(e.outputSchema)&&Av(e.outputSchema)}function qv(e){return e}var Jv={era:`2025-11-25`,hasRequestMethod:Lv,hasNotificationMethod:Rv,validateRequest:(e,t)=>Wv(Vv(e),t),validateResult:(e,t)=>Wv(Bv(e),t),validateNotification:(e,t)=>Wv(Hv(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Gv,validateInputResponse:()=>Gv,samplingResultVariant:((e,t)=>{let n=kv();return Wv(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=Dv(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&Av(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(Uv(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:qv(e)}}return{kind:`complete`,result:qv(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>Kv(e))?t:{...t,tools:n.map(e=>Kv(e)?{...e,outputSchema:Oee(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function Yv(){let e=Um(()=>hm([W(),G(),nm(),im(),xm(W(),e),K(e)])),t=xm(W(),e),n=hm([W(),G().int()]),r=W(),i=hm([W(),G().int()]),a=Cm([`user`,`assistant`]),o=Cm([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=W().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=q({ttl:G().optional()}),l=q({taskId:W()}),u=pm({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=q({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=q({_meta:u.optional()}),m=q({method:W(),params:p.loose().optional()}),h=q({src:W(),mimeType:W().optional(),sizes:K(W()).optional(),theme:Cm([`light`,`dark`]).optional()}),g=q({icons:K(h).optional()}),_=q({name:W(),title:W().optional()}),v=_.extend({..._.shape,...g.shape,version:W(),websiteUrl:W().optional(),description:W().optional()}),y=Wm(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ym(q({form:ym(q({applyDefaults:nm().optional()}),t).optional(),url:t.optional()}),t.optional())),b=pm({list:t.optional(),cancel:t.optional(),requests:pm({sampling:pm({createMessage:t.optional()}).optional(),elicitation:pm({create:t.optional()}).optional()}).optional()}),x=pm({list:t.optional(),cancel:t.optional(),requests:pm({tools:pm({call:t.optional()}).optional()}).optional()}),S=q({experimental:xm(W(),t).optional(),sampling:q({context:t.optional(),tools:t.optional()}).optional(),elicitation:y.optional(),roots:q({listChanged:nm().optional()}).optional(),tasks:b.optional(),extensions:xm(W(),t).optional()}),C=q({experimental:xm(W(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:q({listChanged:nm().optional()}).optional(),resources:q({subscribe:nm().optional(),listChanged:nm().optional()}).optional(),tools:q({listChanged:nm().optional()}).optional(),tasks:x.optional(),extensions:xm(W(),t).optional()}),w=q({progress:G(),total:Om(G()),message:Om(W())}),T=q({...p.shape,...w.shape,progressToken:n}),E=m.extend({method:J(`notifications/progress`),params:T}),D=p.extend({level:o,logger:W().optional(),data:cm()}),O=m.extend({method:J(`notifications/message`),params:D}),k=q({uri:W(),mimeType:Om(W()),_meta:xm(W(),cm()).optional()}),A=k.extend({text:W()}),j=k.extend({blob:s}),M=q({audience:K(a).optional(),priority:G().min(0).max(1).optional(),lastModified:up({offset:!0}).optional()}),N=q({..._.shape,...g.shape,uri:W(),description:Om(W()),mimeType:Om(W()),size:Om(G()),annotations:M.optional(),_meta:Om(pm({}))}),P=q({..._.shape,...g.shape,uriTemplate:W(),description:Om(W()),mimeType:Om(W()),annotations:M.optional(),_meta:Om(pm({}))}),F=m.extend({method:J(`notifications/resources/list_changed`),params:p.optional()}),I=p.extend({uri:W()}),L=m.extend({method:J(`notifications/resources/updated`),params:I}),ee=q({name:W(),description:Om(W()),required:Om(nm())}),te=q({..._.shape,...g.shape,description:Om(W()),arguments:Om(K(ee)),_meta:Om(pm({}))}),ne=m.extend({method:J(`notifications/prompts/list_changed`),params:p.optional()}),R=q({type:J(`text`),text:W(),annotations:M.optional(),_meta:xm(W(),cm()).optional()}),z=q({type:J(`image`),data:s,mimeType:W(),annotations:M.optional(),_meta:xm(W(),cm()).optional()}),B=q({type:J(`audio`),data:s,mimeType:W(),annotations:M.optional(),_meta:xm(W(),cm()).optional()}),re=q({type:J(`tool_use`),name:W(),id:W(),input:xm(W(),cm()),_meta:xm(W(),cm()).optional()}),ie=q({type:J(`resource`),resource:hm([A,j]),annotations:M.optional(),_meta:xm(W(),cm()).optional()}),ae=N.extend({type:J(`resource_link`)}),oe=hm([R,z,B,ae,ie]),se=q({role:a,content:oe}),ce=q({title:W().optional(),readOnlyHint:nm().optional(),destructiveHint:nm().optional(),idempotentHint:nm().optional(),openWorldHint:nm().optional()}),le=m.extend({method:J(`notifications/tools/list_changed`),params:p.optional()}),ue=q({name:W().optional()}),de=q({hints:K(ue).optional(),costPriority:G().min(0).max(1).optional(),speedPriority:G().min(0).max(1).optional(),intelligencePriority:G().min(0).max(1).optional()}),fe=q({mode:Cm([`auto`,`required`,`none`]).optional()}),pe=q({type:J(`boolean`),title:W().optional(),description:W().optional(),default:nm().optional()}),me=q({type:J(`string`),title:W().optional(),description:W().optional(),minLength:G().optional(),maxLength:G().optional(),format:Cm([`email`,`uri`,`date`,`date-time`]).optional(),default:W().optional()}),V=q({type:Cm([`number`,`integer`]),title:W().optional(),description:W().optional(),minimum:G().optional(),maximum:G().optional(),default:G().optional()}),he=q({type:J(`string`),title:W().optional(),description:W().optional(),enum:K(W()),default:W().optional()}),ge=q({type:J(`string`),title:W().optional(),description:W().optional(),oneOf:K(q({const:W(),title:W()})),default:W().optional()}),_e=q({type:J(`string`),title:W().optional(),description:W().optional(),enum:K(W()),enumNames:K(W()).optional(),default:W().optional()}),ve=hm([he,ge]),ye=q({type:J(`array`),title:W().optional(),description:W().optional(),minItems:G().optional(),maxItems:G().optional(),items:q({type:J(`string`),enum:K(W())}),default:K(W()).optional()}),be=q({type:J(`array`),title:W().optional(),description:W().optional(),minItems:G().optional(),maxItems:G().optional(),items:q({anyOf:K(q({const:W(),title:W()}))}),default:K(W()).optional()}),xe=hm([ye,be]),Se=hm([_e,ve,xe]),Ce=hm([Se,pe,me,V]),we=f.extend({mode:J(`form`).optional(),message:W(),requestedSchema:q({type:J(`object`),properties:xm(W(),Ce),required:K(W()).optional()}).catchall(cm())}),Te=q({type:J(`ref/resource`),uri:W()}),Ee=q({type:J(`ref/prompt`),name:W()}),De=q({uri:W().startsWith(`file://`),name:W().optional(),_meta:xm(W(),cm()).optional()}),Oe=S.shape,ke=q({experimental:Oe.experimental,sampling:Oe.sampling,elicitation:Oe.elicitation,roots:Oe.roots,extensions:Oe.extensions}),Ae=C.shape,je=q({experimental:Ae.experimental,logging:Ae.logging,completions:Ae.completions,prompts:Ae.prompts,resources:Ae.resources,tools:Ae.tools,extensions:Ae.extensions}),Me=pm({progressToken:n.optional(),[Km]:W(),[qm]:v.optional(),[Ym]:ke,[Zm]:o.optional()}),Ne=q({..._.shape,...g.shape,description:W().optional(),inputSchema:pm({$schema:W().optional(),type:J(`object`)}),outputSchema:pm({$schema:W().optional()}).optional(),annotations:ce.optional(),_meta:xm(W(),cm()).optional()}),Pe=q({type:J(`tool_result`),toolUseId:W(),content:K(oe),structuredContent:cm().optional(),isError:nm().optional(),_meta:xm(W(),cm()).optional()}),Fe=hm([R,z,B,re,Pe]),Ie=q({role:a,content:hm([Fe,K(Fe)]),_meta:xm(W(),cm()).optional()}),Le=W(),Re=pm({[Jm]:v.optional().catch(void 0)}),ze=Re.optional();function Be(e){return pm({_meta:ze,resultType:Le.default(`complete`),...e})}let Ve=Be({}),He=Be({nextCursor:r.optional()}),Ue=Be({content:K(oe),structuredContent:cm().optional(),isError:nm().optional()}),H=Be({ttlMs:G().int().min(0),cacheScope:Cm([`public`,`private`]),tools:K(Ne),nextCursor:r.optional()}),We=Be({ttlMs:G().int().min(0),cacheScope:Cm([`public`,`private`]),prompts:K(te),nextCursor:r.optional()}),Ge=Be({description:W().optional(),messages:K(se)}),Ke=Be({ttlMs:G().int().min(0),cacheScope:Cm([`public`,`private`]),resources:K(N),nextCursor:r.optional()}),qe=Be({ttlMs:G().int().min(0),cacheScope:Cm([`public`,`private`]),resourceTemplates:K(P),nextCursor:r.optional()}),Je=Be({ttlMs:G().int().min(0),cacheScope:Cm([`public`,`private`]),contents:K(hm([A,j]))}),Ye=Be({completion:q({values:K(W()).max(100),total:G().int().optional(),hasMore:nm().optional()}).loose()}),Xe=Be({ttlMs:G().int().min(0),cacheScope:Cm([`public`,`private`])}),Ze=Be({ttlMs:G().int().min(0).catch(0),cacheScope:Cm([`public`,`private`]).catch(`private`),supportedVersions:K(W()),capabilities:je,instructions:W().optional()}),Qe=q({messages:K(Ie),modelPreferences:de.optional(),systemPrompt:W().optional(),includeContext:Cm([`none`,`thisServer`,`allServers`]).optional(),temperature:G().optional(),maxTokens:G().int(),stopSequences:K(W()).optional(),metadata:t.optional(),tools:K(Ne).optional(),toolChoice:fe.optional()}),$e=q({method:J(`sampling/createMessage`),params:Qe}),et=q({method:J(`roots/list`),params:q({_meta:xm(W(),cm()).optional()}).optional()}),tt=q({...Ie.shape,model:W(),stopReason:W().optional()}),nt=q({roots:K(De)}),rt=q({action:Cm([`accept`,`decline`,`cancel`]),content:xm(W(),hm([W(),G(),nm(),K(W())])).optional()}),it=q({mode:J(`url`),message:W(),url:W().url()}),at=hm([we,it]),ot=q({method:J(`elicitation/create`),params:at}),st=hm([$e,et,ot]),ct=hm([tt,nt,rt]),lt=xm(W(),st),ut=xm(W(),ct),dt=Be({inputRequests:lt.optional(),requestState:W().optional()}),ft={inputResponses:ut.optional(),requestState:W().optional()},pt=q({_meta:Me,...ft}),mt=pm({progressToken:n.optional()});function ht(e,t){return q({method:J(e),params:q({_meta:Me,...t})})}function gt(e,t){return q({method:J(e),params:q({_meta:mt.optional(),...t}).optional()})}let _t={name:W(),arguments:xm(W(),cm()).optional(),...ft},vt={cursor:r.optional()},yt=ht(`tools/call`,_t),bt=ht(`tools/list`,vt),xt=ht(`prompts/list`,vt),St=ht(`prompts/get`,{name:W(),arguments:xm(W(),W()).optional(),...ft}),Ct=ht(`resources/list`,vt),wt=ht(`resources/templates/list`,vt),Tt=ht(`resources/read`,{uri:W(),...ft}),Et={ref:hm([Ee,Te]),argument:q({name:W(),value:W()}),context:q({arguments:xm(W(),W()).optional()}).optional()},Dt=ht(`completion/complete`,Et),Ot=ht(`server/discover`,{}),kt=q({toolsListChanged:nm().optional(),promptsListChanged:nm().optional(),resourcesListChanged:nm().optional(),resourceSubscriptions:K(W()).optional()}),At={notifications:kt},jt=ht(`subscriptions/listen`,At),Mt=Re.extend({"io.modelcontextprotocol/subscriptionId":i}),Nt=pm({_meta:Mt,resultType:Le.default(`complete`)}),Pt={"tools/call":gt(`tools/call`,_t),"tools/list":gt(`tools/list`,vt),"prompts/get":gt(`prompts/get`,{name:W(),arguments:xm(W(),W()).optional()}),"prompts/list":gt(`prompts/list`,vt),"resources/list":gt(`resources/list`,vt),"resources/templates/list":gt(`resources/templates/list`,vt),"resources/read":gt(`resources/read`,{uri:W()}),"completion/complete":gt(`completion/complete`,Et),"server/discover":gt(`server/discover`,{}),"subscriptions/listen":gt(`subscriptions/listen`,At)};function Ft(e){return pm({_meta:ze,...e})}let It={"tools/call":Ft({content:K(oe),structuredContent:cm().optional(),isError:nm().optional()}),"tools/list":Ft({ttlMs:G().int().min(0),cacheScope:Cm([`public`,`private`]),tools:K(Ne),nextCursor:r.optional()}),"prompts/get":Ft({description:W().optional(),messages:K(se)}),"prompts/list":Ft({ttlMs:G().int().min(0),cacheScope:Cm([`public`,`private`]),prompts:K(te),nextCursor:r.optional()}),"resources/list":Ft({ttlMs:G().int().min(0),cacheScope:Cm([`public`,`private`]),resources:K(N),nextCursor:r.optional()}),"resources/templates/list":Ft({ttlMs:G().int().min(0),cacheScope:Cm([`public`,`private`]),resourceTemplates:K(P),nextCursor:r.optional()}),"resources/read":Ft({ttlMs:G().int().min(0),cacheScope:Cm([`public`,`private`]),contents:K(hm([A,j]))}),"completion/complete":Ft({completion:q({values:K(W()).max(100),total:G().int().optional(),hasMore:nm().optional()}).loose()}),"server/discover":Ft({ttlMs:G().int().min(0).catch(0),cacheScope:Cm([`public`,`private`]).catch(`private`),supportedVersions:K(W()),capabilities:je,instructions:W().optional()}),"subscriptions/listen":Ft({})},Lt=pm({"io.modelcontextprotocol/subscriptionId":i.optional()}),Rt=q({method:J(`notifications/subscriptions/acknowledged`),params:q({_meta:Lt.optional(),notifications:kt})}),zt=q({_meta:Lt.optional(),requestId:i,reason:W().optional()}),Bt=q({method:J(`notifications/cancelled`),params:zt}),Vt={"notifications/cancelled":Bt,"notifications/progress":E,"notifications/message":O,"notifications/resources/updated":L,"notifications/resources/list_changed":F,"notifications/tools/list_changed":le,"notifications/prompts/list_changed":ne,"notifications/subscriptions/acknowledged":Rt},Ht=e=>q({jsonrpc:J(`2.0`),id:hm([W(),G().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:h,IconsSchema:g,BaseMetadataSchema:_,ImplementationSchema:v,ClientTasksCapabilitySchema:b,ServerTasksCapabilitySchema:x,ClientCapabilitiesSchema:S,ServerCapabilitiesSchema:C,ProgressSchema:w,ProgressNotificationParamsSchema:T,ProgressNotificationSchema:E,LoggingMessageNotificationParamsSchema:D,LoggingMessageNotificationSchema:O,ResourceContentsSchema:k,TextResourceContentsSchema:A,BlobResourceContentsSchema:j,AnnotationsSchema:M,ResourceSchema:N,ResourceTemplateSchema:P,ResourceListChangedNotificationSchema:F,ResourceUpdatedNotificationParamsSchema:I,ResourceUpdatedNotificationSchema:L,PromptArgumentSchema:ee,PromptSchema:te,PromptListChangedNotificationSchema:ne,TextContentSchema:R,ImageContentSchema:z,AudioContentSchema:B,ToolUseContentSchema:re,EmbeddedResourceSchema:ie,ResourceLinkSchema:ae,ContentBlockSchema:oe,PromptMessageSchema:se,ToolAnnotationsSchema:ce,ToolListChangedNotificationSchema:le,ModelHintSchema:ue,ModelPreferencesSchema:de,ToolChoiceSchema:fe,BooleanSchemaSchema:pe,StringSchemaSchema:me,NumberSchemaSchema:V,UntitledSingleSelectEnumSchemaSchema:he,TitledSingleSelectEnumSchemaSchema:ge,LegacyTitledEnumSchemaSchema:_e,SingleSelectEnumSchemaSchema:ve,UntitledMultiSelectEnumSchemaSchema:ye,TitledMultiSelectEnumSchemaSchema:be,MultiSelectEnumSchemaSchema:xe,EnumSchemaSchema:Se,PrimitiveSchemaDefinitionSchema:Ce,ElicitRequestFormParamsSchema:we,ResourceTemplateReferenceSchema:Te,PromptReferenceSchema:Ee,RootSchema:De,ClientCapabilities2026Schema:ke,ServerCapabilities2026Schema:je,RequestMetaEnvelopeSchema:Me,ToolSchema:Ne,ToolResultContentSchema:Pe,SamplingMessageContentBlockSchema:Fe,SamplingMessageSchema:Ie,ResultTypeSchema:Le,ResultMetaSchema:Re,ResultSchema:Ve,PaginatedResultSchema:He,CallToolResultSchema:Ue,ListToolsResultSchema:H,ListPromptsResultSchema:We,GetPromptResultSchema:Ge,ListResourcesResultSchema:Ke,ListResourceTemplatesResultSchema:qe,ReadResourceResultSchema:Je,CompleteResultSchema:Ye,CacheableResultSchema:Xe,DiscoverResultSchema:Ze,CreateMessageRequestParamsSchema:Qe,CreateMessageRequestSchema:$e,ListRootsRequestSchema:et,CreateMessageResultSchema:tt,ListRootsResultSchema:nt,ElicitResultSchema:rt,ElicitRequestURLParamsSchema:it,ElicitRequestParamsSchema:at,ElicitRequestSchema:ot,InputRequestSchema:st,InputResponseSchema:ct,InputRequestsSchema:lt,InputResponsesSchema:ut,InputRequiredResultSchema:dt,InputResponseRequestParamsSchema:pt,CallToolRequestSchema:yt,ListToolsRequestSchema:bt,ListPromptsRequestSchema:xt,GetPromptRequestSchema:St,ListResourcesRequestSchema:Ct,ListResourceTemplatesRequestSchema:wt,ReadResourceRequestSchema:Tt,CompleteRequestSchema:Dt,DiscoverRequestSchema:Ot,SubscriptionFilterSchema:kt,SubscriptionsListenRequestSchema:jt,SubscriptionsListenResultMetaSchema:Mt,SubscriptionsListenResultSchema:Nt,dispatchRequestSchemas:Pt,dispatchResultSchemas:It,NotificationMetaSchema:Lt,SubscriptionsAcknowledgedNotificationSchema:Rt,CancelledNotificationParamsSchema:zt,CancelledNotificationSchema:Bt,notificationSchemas2026:Vt,JSONRPCResultResponseSchema:Ht(Ve),CallToolResultResponseSchema:Ht(hm([Ue,dt])),ListToolsResultResponseSchema:Ht(H),ListPromptsResultResponseSchema:Ht(We),GetPromptResultResponseSchema:Ht(hm([Ge,dt])),ListResourcesResultResponseSchema:Ht(Ke),ListResourceTemplatesResultResponseSchema:Ht(qe),ReadResourceResultResponseSchema:Ht(hm([Je,dt])),CompleteResultResponseSchema:Ht(Ye),DiscoverResultResponseSchema:Ht(Ze)}}var Xv;function Zv(){return Xv??=Yv()}var Qv=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function $v(e){return Qv.includes(e)}var ey=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function ty(e){return e[ey]}function ny(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function ry(e){return e===`public`||e===`private`}var iy=function(e){return 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.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),ay=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return gv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return gv(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,hv(this,new.target)}static fromError(t,n,r){if(t===iy.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new sy(e.elicitations,n)}if(t===iy.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new cy({supported:e.supported,requested:e.requested},n)}if(t===iy.InvalidParams||t===iy.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===iy.ResourceNotFound||Object.keys(e).length===1))return new oy(e.uri,n)}if(t===iy.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new ly({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},oy=class extends ay{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(iy.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},sy=class extends ay{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(iy.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},cy=class extends ay{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(iy.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},ly=class extends ay{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(iy.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},uy=0,dy=`private`,fy=[`tools/call`,`prompts/get`,`resources/read`];function py(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||fy.includes(e))return t;throw new ay(iy.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function my(e,t){let n=ty(t);if(t.resultType!==`complete`||!$v(e))return n===void 0?t:yy(t);let r=t,i=ny(r.ttlMs)?r.ttlMs:_y(n),a=ry(r.cacheScope)?r.cacheScope:vy(n),o={...r,ttlMs:i,cacheScope:a};return delete o[ey],o}function hy(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function gy(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[Jm]:t}}:!hy(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[Jm]:t}}}function _y(e){return e!==void 0&&ny(e.ttlMs)?e.ttlMs:uy}function vy(e){return e!==void 0&&ry(e.cacheScope)?e.cacheScope:dy}function yy(e){let t={...e};return delete t[ey],t}var by=[`elicitation/create`,`sampling/createMessage`,`roots/list`],xy;function Sy(){if(xy)return xy;let e=Zv();return xy={request:{"elicitation/create":q({method:J(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":q({method:J(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":q({method:J(`roots/list`),params:pm({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},xy}function Cy(e){return by.includes(e)}function wy(e){return Cy(e)?Sy().request[e]:void 0}function Ty(e){return Cy(e)?Sy().response[e]:void 0}var Ey={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},Dy={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function Oy(e){return Object.prototype.hasOwnProperty.call(Ey,e)}function ky(e){return Object.prototype.hasOwnProperty.call(Dy,e)}function Ay(e){return Object.prototype.hasOwnProperty.call(Ey,e)}function jy(e){return Oy(e)?Zv().dispatchRequestSchemas[e]:void 0}function My(e){return Ay(e)?Zv().dispatchResultSchemas[e]:void 0}function Ny(e){return ky(e)?Zv().notificationSchemas2026[e]:void 0}Object.keys(Ey),Object.keys(Dy);function Py(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Fy(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var Iy={ok:!1,reason:`not-in-era`},Ly=[Km,Ym];function Ry(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>Py(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!Py(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(Py(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var zy={era:`2026-07-28`,hasRequestMethod:Oy,hasNotificationMethod:ky,hasInputRequestMethod:e=>wy(e)!==void 0,validateRequest:(e,t)=>Fy(jy(e),t),validateResult:(e,t)=>Fy(My(e),t),validateNotification:(e,t)=>Fy(Ny(e),t),validateInputRequest:(e,t)=>Fy(wy(e),t),validateInputResponse:(e,t)=>Fy(Ty(e),t),samplingResultVariant:()=>Iy,outboundEnvelope(e){return{[Km]:e.protocolVersion,[qm]:e.clientInfo,[Ym]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of Ly)n in e||t.push({key:n,problem:`missing`});let n=Zv().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>Dv(e),inputRequestSchema:wy,decodeResult(e,t){if(!Py(t))return{kind:`invalid`,error:new bv(yv.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new bv(yv.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new bv(yv.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=Py(n)?n:{},i=t.requestState;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new bv(yv.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i}}}if(n!==`complete`)return{kind:`invalid`,error:new bv(yv.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let r=Vy(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new bv(yv.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return gy(my(e,py(e,Ry(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=Zv().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},By;function Vy(){if(By)return By;let e=Zv();return By={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},By}var Hy=`2026-07-28`;function Uy(e){return e!==void 0&&wv(e)?zy:Jv}function Wy(e){return e.revision===void 0?e.era===`modern`?zy.era:Jv.era:Uy(e.revision).era}function Gy(e){return qy.some(t=>t.hasRequestMethod(e))}function Ky(e){return qy.some(t=>t.hasNotificationMethod(e))}var qy=[Jv,zy],Jy=Ds({AnnotationsSchema:()=>Jh,AudioContentSchema:()=>Dg,BaseMetadataSchema:()=>wh,BaseRequestParamsSchema:()=>oh,BlobResourceContentsSchema:()=>Kh,BooleanSchemaSchema:()=>c_,CallToolRequestParamsSchema:()=>Hg,CallToolRequestSchema:()=>Ug,CallToolResultSchema:()=>Bg,CancelTaskRequestSchema:()=>J_,CancelTaskResultSchema:()=>Y_,CancelledNotificationParamsSchema:()=>bh,CancelledNotificationSchema:()=>xh,ClientCapabilitiesSchema:()=>Oh,ClientNotificationSchema:()=>Z_,ClientRequestSchema:()=>X_,ClientResultSchema:()=>Q_,ClientTasksCapabilitySchema:()=>Eh,CompatibilityCallToolResultSchema:()=>Vg,CompleteRequestParamsSchema:()=>k_,CompleteRequestSchema:()=>A_,CompleteResultSchema:()=>j_,ContentBlockSchema:()=>jg,CreateMessageRequestParamsSchema:()=>i_,CreateMessageRequestSchema:()=>a_,CreateMessageResultSchema:()=>o_,CreateMessageResultWithToolsSchema:()=>s_,CreateTaskResultSchema:()=>z_,CursorSchema:()=>nh,DiscoverRequestSchema:()=>Ph,DiscoverResultSchema:()=>Fh,ElicitRequestFormParamsSchema:()=>b_,ElicitRequestParamsSchema:()=>S_,ElicitRequestSchema:()=>C_,ElicitRequestURLParamsSchema:()=>x_,ElicitResultSchema:()=>E_,ElicitationCompleteNotificationParamsSchema:()=>w_,ElicitationCompleteNotificationSchema:()=>T_,EmbeddedResourceSchema:()=>kg,EmptyResultSchema:()=>yh,EnumSchemaSchema:()=>v_,GetPromptRequestParamsSchema:()=>Cg,GetPromptRequestSchema:()=>wg,GetPromptResultSchema:()=>Ng,GetTaskPayloadRequestSchema:()=>W_,GetTaskPayloadResultSchema:()=>G_,GetTaskRequestSchema:()=>H_,GetTaskResultSchema:()=>U_,IconSchema:()=>Sh,IconsSchema:()=>Ch,ImageContentSchema:()=>Eg,ImplementationSchema:()=>Th,InitializeRequestParamsSchema:()=>kh,InitializeRequestSchema:()=>Ah,InitializeResultSchema:()=>Mh,InitializedNotificationSchema:()=>Nh,JSONArraySchema:()=>eh,JSONObjectSchema:()=>$m,JSONRPCErrorResponseSchema:()=>_h,JSONRPCMessageSchema:()=>vh,JSONRPCNotificationSchema:()=>hh,JSONRPCRequestSchema:()=>mh,JSONRPCResponseSchema:()=>_ee,JSONRPCResultResponseSchema:()=>gh,JSONValueSchema:()=>Qm,LegacyTitledEnumSchemaSchema:()=>p_,ListChangedOptionsBaseSchema:()=>Gg,ListPromptsRequestSchema:()=>xg,ListPromptsResultSchema:()=>Sg,ListResourceTemplatesRequestSchema:()=>$h,ListResourceTemplatesResultSchema:()=>eg,ListResourcesRequestSchema:()=>Zh,ListResourcesResultSchema:()=>Qh,ListRootsRequestSchema:()=>N_,ListRootsResultSchema:()=>P_,ListTasksRequestSchema:()=>K_,ListTasksResultSchema:()=>q_,ListToolsRequestSchema:()=>Rg,ListToolsResultSchema:()=>zg,LoggingLevelSchema:()=>Kg,LoggingMessageNotificationParamsSchema:()=>Yg,LoggingMessageNotificationSchema:()=>Xg,ModelHintSchema:()=>Zg,ModelPreferencesSchema:()=>Qg,MultiSelectEnumSchemaSchema:()=>__,NotificationSchema:()=>uh,NotificationsParamsSchema:()=>lh,NumberSchemaSchema:()=>u_,PaginatedRequestParamsSchema:()=>Bh,PaginatedRequestSchema:()=>Vh,PaginatedResultSchema:()=>Hh,PingRequestSchema:()=>Ih,PrimitiveSchemaDefinitionSchema:()=>y_,ProgressNotificationParamsSchema:()=>Rh,ProgressNotificationSchema:()=>zh,ProgressSchema:()=>Lh,ProgressTokenSchema:()=>th,PromptArgumentSchema:()=>yg,PromptListChangedNotificationSchema:()=>Pg,PromptMessageSchema:()=>Mg,PromptReferenceSchema:()=>O_,PromptSchema:()=>bg,ReadResourceRequestParamsSchema:()=>ng,ReadResourceRequestSchema:()=>rg,ReadResourceResultSchema:()=>ig,RelatedTaskMetadataSchema:()=>ih,RequestIdSchema:()=>ph,RequestMetaSchema:()=>ah,RequestSchema:()=>ch,ResourceContentsSchema:()=>Uh,ResourceLinkSchema:()=>Ag,ResourceListChangedNotificationSchema:()=>ag,ResourceRequestParamsSchema:()=>tg,ResourceSchema:()=>Yh,ResourceTemplateReferenceSchema:()=>D_,ResourceTemplateSchema:()=>Xh,ResourceUpdatedNotificationParamsSchema:()=>_g,ResourceUpdatedNotificationSchema:()=>vg,ResultMetaObjectSchema:()=>dh,ResultSchema:()=>fh,RoleSchema:()=>qh,RootSchema:()=>M_,RootsListChangedNotificationSchema:()=>F_,SamplingContentSchema:()=>t_,SamplingMessageContentBlockSchema:()=>n_,SamplingMessageSchema:()=>r_,ServerCapabilitiesSchema:()=>jh,ServerNotificationSchema:()=>ev,ServerRequestSchema:()=>$_,ServerResultSchema:()=>tv,ServerTasksCapabilitySchema:()=>Dh,SetLevelRequestParamsSchema:()=>qg,SetLevelRequestSchema:()=>Jg,SingleSelectEnumSchemaSchema:()=>m_,StringSchemaSchema:()=>l_,SubscribeRequestParamsSchema:()=>og,SubscribeRequestSchema:()=>sg,SubscriptionFilterSchema:()=>ug,SubscriptionsAcknowledgedNotificationParamsSchema:()=>pg,SubscriptionsAcknowledgedNotificationSchema:()=>mg,SubscriptionsListenRequestParamsSchema:()=>dg,SubscriptionsListenRequestSchema:()=>fg,SubscriptionsListenResultMetaSchema:()=>hg,SubscriptionsListenResultSchema:()=>gg,TaskAugmentedRequestParamsSchema:()=>sh,TaskCreationParamsSchema:()=>I_,TaskMetadataSchema:()=>rh,TaskSchema:()=>R_,TaskStatusNotificationParamsSchema:()=>B_,TaskStatusNotificationSchema:()=>V_,TaskStatusSchema:()=>L_,TextContentSchema:()=>Tg,TextResourceContentsSchema:()=>Wh,TitledMultiSelectEnumSchemaSchema:()=>g_,TitledSingleSelectEnumSchemaSchema:()=>f_,ToolAnnotationsSchema:()=>Fg,ToolChoiceSchema:()=>$g,ToolExecutionSchema:()=>Ig,ToolListChangedNotificationSchema:()=>Wg,ToolResultContentSchema:()=>e_,ToolSchema:()=>Lg,ToolUseContentSchema:()=>Og,UnsubscribeRequestParamsSchema:()=>cg,UnsubscribeRequestSchema:()=>lg,UntitledMultiSelectEnumSchemaSchema:()=>h_,UntitledSingleSelectEnumSchemaSchema:()=>d_}),Yy=e=>mh.safeParse(e).success,Xy=e=>hh.safeParse(e).success,Zy=e=>gh.safeParse(e).success,Qy=e=>_h.safeParse(e).success,$y=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&e.resultType===`input_required`,eb=e=>Ah.safeParse(e).success,tb=e=>Nh.safeParse(e).success,nb=`Mcp-Param-`,rb=`x-mcp-header`,ib=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,ab=new Set([`string`,`integer`,`boolean`,`number`]);function ob(e){let t=[],n=new Map,r=(e,i,a)=>{if(typeof e!=`object`||!e)return;let o=e;if(rb in o){if(!a||i.length===0)return`${lb(i)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let e=o[rb];if(typeof e!=`string`||e.length===0)return`${lb(i)}: x-mcp-header MUST be a non-empty string`;if(!ib.test(e))return`${lb(i)}: x-mcp-header '${e}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let r=typeof o.type==`string`?o.type:void 0;if(r===void 0||!ab.has(r))return`${lb(i)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${r??`<none>`}`;let s=e.toLowerCase(),c=n.get(s);if(c!==void 0)return`x-mcp-header '${e}' is not case-insensitively unique (also declared as '${c}')`;n.set(s,e),t.push({path:i,headerName:e,type:r})}let s=o.properties;if(typeof s==`object`&&s)for(let[e,t]of Object.entries(s)){let n=r(t,[...i,e],a);if(n!==void 0)return n}for(let e of sb){let t=o[e];if(t===void 0)continue;let n=Array.isArray(t)?t:typeof t==`object`&&t&&cb.has(e)?Object.values(t):[t];for(let t of n){let n=r(t,[...i,`<${e}>`],!1);if(n!==void 0)return n}}},i=r(e,[],!0);return i===void 0?{valid:!0,declarations:t}:{valid:!1,reason:i}}var sb=[`items`,`prefixItems`,`contains`,`additionalProperties`,`unevaluatedProperties`,`unevaluatedItems`,`propertyNames`,`patternProperties`,`dependentSchemas`,`oneOf`,`anyOf`,`allOf`,`not`,`if`,`then`,`else`,`$defs`,`definitions`],cb=new Set([`patternProperties`,`dependentSchemas`,`$defs`,`definitions`]);function lb(e){return e.length===0?`<root>`:e.join(`.`)}var ub=`=?base64?`,db=`?=`;function kee(e){if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e)?void 0:String(e)}function Aee(e){if(e.length===0||e.startsWith(ub)&&e.endsWith(db)||e!==e.trim())return!0;for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(!(n===9||n>=32&&n<=126))return!0}return!1}function jee(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function fb(e){return Aee(e)?`${ub}${jee(e)}${db}`:e}function Mee(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}function Nee(e,t){let n={};for(let r of e){let e=Mee(t,r.path);if(e==null)continue;let i=kee(e);i!==void 0&&(n[`${nb}${r.headerName}`]=fb(i))}return n}iy.InvalidRequest,iy.UnsupportedProtocolVersion,iy.InvalidParams,iy.MethodNotFound,iy.InvalidParams,iy.MissingRequiredClientCapability,iy.ParseError,iy.InvalidRequest,iy.MethodNotFound,iy.UnsupportedProtocolVersion,iy.MissingRequiredClientCapability;function pb(e,t){return bp(e,t)}function mb(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function hb(e){if(e==null)return!1;let t=typeof e;return t!==`object`&&t!==`function`||!(`~standard`in e)?!1:typeof e[`~standard`]?.validate==`function`}var gb=!1,_b=`draft-2020-12`;function Pee(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:_b});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);gb||(gb=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=cp(e,{target:_b,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&vb(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}function vb(e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;for(let t of[`oneOf`,`anyOf`,`allOf`]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||vb(e)))}return!1}function Fee(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function yb(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>Fee(e)).join(`, `)}:{success:!0,data:n.value}}function Iee(e){let t=cp(e,{target:_b,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var Lee=/\\\.\\d\{(\d+)\}/;function Ree(e){let t=Lee.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>up({local:e,offset:t,precision:n}))))}function zee(e,t){let n;switch(e){case`email`:n=[Lp()];break;case`uri`:n=[Vp()];break;case`date`:n=[fp()];break;case`date-time`:n=Ree(t);break}return new Set(n.map(e=>Iee(e)).filter(e=>e!==void 0))}function Bee(e,t,n){return n!==`zod`||zee(e,t).has(t)}function bb(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Vee(e){try{return Pee(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new ay(iy.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var Hee=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function xb(e){return Hee.has(e)||e.startsWith(`x-`)}var Uee=new Set([`$schema`,...Object.keys(b_.shape.requestedSchema.shape)]),Sb={string:mb([l_,d_,f_,p_]),number:mb([u_]),integer:mb([u_]),boolean:mb([c_]),array:mb([h_,g_])},Wee=new Set(l_.shape.format.unwrap().options);function Gee(e,t,n,r){if(!bb(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(Sb,e.type)?Sb[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||xb(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?Wee.has(e.format)?(typeof s!=`string`||!Bee(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function Kee(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&bb(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,Gee(n,`properties.${e}`,t,r)])):Uee.has(i)?n[i]=a:xb(i)||r.push(i);if(r.length>0)throw new ay(iy.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function qee(e,t){if(!bb(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!pb(y_,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function Cb(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>Cb(e,t[r],`${n}[${r}]`)):!bb(e)||!bb(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?Cb(r,t[e],i):xb(e)?[]:[i]})}function Jee(e){if(!hb(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=Kee(Vee(e.requestedSchema),t),r=pb(b_.shape.requestedSchema,n);if(!r.success)throw new ay(iy.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${qee(n,r.error.message)}`);let i=Cb(n,r.data);if(i.length>0)throw new ay(iy.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new ay(iy.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function Yee(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(Yee,{elicit(e){try{return{method:`elicitation/create`,params:Jee(e)}}catch(e){throw e instanceof ay?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var Xee=!0,Zee=10,Qee=250;function $ee(e){return{autoFulfill:e?.autoFulfill??Xee,maxRounds:e?.maxRounds??Zee}}function ete(e,t,n){let r=t!==void 0&&Object.keys(t).length>0;return!r&&n===void 0?e:{...e,...r&&{inputResponses:t},...n!==void 0&&{requestState:n}}}function tte(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function nte(e,t){return new Promise((n,r)=>{if(t?.aborted){r(t.reason instanceof bv?t.reason:new bv(yv.RequestTimeout,String(t.reason)));return}let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e),a=()=>{clearTimeout(i),r(t?.reason instanceof bv?t.reason:new bv(yv.RequestTimeout,String(t?.reason)))};t?.addEventListener(`abort`,a,{once:!0})})}function rte(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener(`abort`,n,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener(`abort`,n)}}async function ite(e){let{config:t,method:n,originalParams:r,requestOptions:i,hooks:a,signal:o}=e,s=e.flowStartedAt??Date.now(),c=e.firstPayload,l=0;for(;;){if(l+=1,l>t.maxRounds)throw new bv(yv.InputRequiredRoundsExceeded,tte(n,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:c.inputRequests,...c.requestState!==void 0&&{requestState:c.requestState}}});i.onprogress?.({progress:l,message:`Fulfilling input required by '${n}' (round ${l})`});let e=Object.entries(c.inputRequests??{}),u;if(e.length>0){let t=rte(o);try{let n=await Promise.all(e.map(async([e,n])=>{try{return[e,await a.dispatchInputRequest(e,n,t.signal)]}catch(e){throw t.abort(e),e}}));u=Object.fromEntries(n)}finally{t.dispose()}}else await nte(Qee,o);let d={...i.timeout!==void 0&&{timeout:i.timeout}};if(i.maxTotalTimeout!==void 0){let e=Date.now()-s,t=i.maxTotalTimeout-e;if(t<=0)throw new bv(yv.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:e});d.maxTotalTimeout=t}let f=await a.retry(ete(r,u,c.requestState),d);if($y(f)){c={inputRequests:f.inputRequests??{},...f.requestState!==void 0&&{requestState:f.requestState}};continue}return f}}var ate=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),ote={IdJagTokenExchangeResponseSchema:cv,OAuthClientInformationFullSchema:pv,OAuthClientInformationSchema:fv,OAuthClientMetadataSchema:dv,OAuthClientRegistrationErrorSchema:yee,OAuthErrorResponseSchema:lv,OAuthMetadataSchema:iv,OAuthProtectedResourceMetadataSchema:rv,OAuthTokenRevocationRequestSchema:bee,OAuthTokensSchema:sv,OpenIdProviderDiscoveryMetadataSchema:ov,OpenIdProviderMetadataSchema:av},wb={},Tb={};function Eb(e,t){let n=e.slice(0,-6);wb[n]=t,Tb[n]=e=>t.safeParse(e).success}for(let e of ate)Eb(e,Jy[e]);for(let[e,t]of Object.entries(ote))Eb(e,t);Object.freeze(wb);var ste=Object.freeze(Tb);function cte(e){switch(e){case`initialize`:case`notifications/initialized`:return Uy(void 0);case`server/discover`:return Uy(Hy);default:return}}var lte=[Km,qm,Ym,Zm],ute=[`inputResponses`,`requestState`];function Db(e,t){let n=e.params;if(!Ab(n))return{message:e,lifted:{}};let r=n._meta,i=Ab(r)?lte.filter(e=>e in r):[],a=t===`request`?ute.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&Ab(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function Ob(e,t){let n=e.validateResult(t,void 0);if(!(!n.ok&&n.reason===`not-in-era`))return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function kb(e){return()=>e}var dte=kb(void 0),fte=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??hee,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new bv(yv.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new bv(yv.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Zy(e)||Qy(e)?this._onresponse(e):Yy(e)?this._onrequest(e,t):Xy(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new bv(yv.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=Db(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=Wy(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification '${n.method}': classified as ${e} but this instance serves ${r.era}`));return}}if(Ky(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;i===void 0&&a===void 0||Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=Db(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=Wy(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request '${n.method}': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(iy.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(Gy(n.method)&&!i.hasRequestMethod(n.method)){o(iy.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(iy.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(iy.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:mte(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?dte:kb(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),hb(t))return u(e,t,n);let i=Ob(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(iy.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:iy.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Zy(e)?n(e):n(ay.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),hb(t))return this._requestWithSchemaViaCodec(r,e,t,n);let i=Ob(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return Uy(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=cte(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Gy(t)&&!e.hasRequestMethod(t))throw new bv(yv.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof bv?e:new bv(yv.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let _=this._envelopeOutbound(g),v=!1,y=e=>{v||(this._progressHandlers.delete(h),m===void 0?this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof bv?e:new bv(yv.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(v=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(yte(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;yb(n,o).then(e=>{e.success?d(e.data):f(new bv(yv.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>y(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let b=r?.timeout??6e4;this._setupTimeout(h,b,r?.maxTotalTimeout,()=>y(new bv(yv.RequestTimeout,`Request timed out`,{timeout:b})),r?.resetTimeoutOnProgress??!1),this._transport.send(_,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new bv(yv.NotConnected,`Not connected`);if(Ky(t.method)&&!e.hasNotificationMethod(t.method))throw new bv(yv.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!Gy(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new ay(iy.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await yb(t.params,{...r.params});if(!a.success)throw new ay(iy.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!Ky(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new ay(iy.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await yb(t.params,{...r.params});if(!i.success)throw new ay(iy.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function Ab(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function pte(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=Ab(a)&&Ab(i)?{...a,...i}:i}return n}function jb(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function mte(e){let t={},n=[];if(!jb(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!jb(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function Mb(e){throw new bv(yv.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}function hte(e,t,n,r,i){return{sessionId:i,mcpReq:{id:e,method:t,_meta:n?._meta,requestState:kb(void 0),signal:r,send:(()=>Mb(`send`)),notify:()=>Mb(`notify`)}}}async function gte(e,t,n,r,i){if(!jb(r)||typeof r.method!=`string`)throw new bv(yv.InvalidResult,`Invalid input request '${n}': each inputRequests entry must be an embedded request object with a method`,{key:n});let a=r.method;if(!t.hasInputRequestMethod(a))throw new bv(yv.InvalidResult,`Invalid input request '${n}': '${a}' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:n,method:a});let o=e.getRequestHandler(a);if(o===void 0)throw new bv(yv.CapabilityNotSupported,`Cannot fulfil input request '${n}': no handler is registered for '${a}' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:n,method:a});let s=jb(r.params)?r.params:void 0;return await o({jsonrpc:`2.0`,id:n,method:a,...s!==void 0&&{params:s}},e.buildContext(hte(n,a,s,i,e.sessionId)))}function _te(e,t){return{...e?.signal!==void 0&&{signal:e.signal},...e?.onprogress!==void 0&&{onprogress:e.onprogress},...e?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:e.resetTimeoutOnProgress},...e?.headers!==void 0&&{headers:e.headers},...t.timeout!==void 0&&{timeout:t.timeout},...t.maxTotalTimeout!==void 0&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0}}function vte(e,t,n,r){let{codec:i,request:a,options:o,flowStartedAt:s}=r,c={inputRequests:n.inputRequests,...n.requestState!==void 0&&{requestState:n.requestState}},l={dispatchInputRequest:(t,n,r)=>gte(e,i,t,n,r),retry:(e,t)=>r.retry(e,_te(o,t))};return ite({config:t,method:a.method,originalParams:a.params,firstPayload:c,flowStartedAt:s,signal:o?.signal,requestOptions:{...o?.timeout!==void 0&&{timeout:o.timeout},...o?.maxTotalTimeout!==void 0&&{maxTotalTimeout:o.maxTotalTimeout},...o?.onprogress!==void 0&&{onprogress:o.onprogress}},hooks:l})}function yte(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}var bte=ks(Es((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))(),1);function xte(e){if(e)try{return bte.parse(e).type}catch{let t=(e.split(`;`,1)[0]??``).trim().toLowerCase();return t===``||e.slice(t.length).includes(`,`)?void 0:t}}function Nb(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function Ste(e=fetch,t){return t?async(n,r)=>e(n,{...t,...r,headers:r?.headers?{...Nb(t.headers),...Nb(r.headers)}:t.headers}):e}function Pb(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(!Pb(e[r],t[r]))return!1;return!0}if(n===`object`){if(!e||!t)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Pb(e[r],t[r]))return!1;return!0}return e===t}function Fb(e){return encodeURI(Cte(e))}function Cte(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}var wte={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},Tte={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},Ete={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!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},Dte=typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`);function Ib(e,t=Object.create(null),n=Dte,r=``){if(e&&typeof e==`object`&&!Array.isArray(e)){let i=e.$id||e.id;if(i){let a=new URL(i,n.href);a.hash.length>1?t[a.href]=e:(a.hash=``,r===``?n=a:Ib(e,t,n))}}else if(e!==!0&&e!==!1)return t;let i=n.href+(r?`#`+r:``);if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i}),e.$ref&&e.__absolute_ref__===void 0){let t=new URL(e.$ref,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let t=new URL(e.$recursiveRef,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}if(e.$anchor){let r=new URL(`#`+e.$anchor,n.href);t[r.href]=e}for(let i in e){if(Ete[i])continue;let a=`${r}/${Fb(i)}`,o=e[i];if(Array.isArray(o)){if(wte[i]){let e=o.length;for(let r=0;r<e;r++)Ib(o[r],t,n,`${a}/${r}`)}}else if(Tte[i])for(let e in o)Ib(o[e],t,n,`${a}/${Fb(e)}`);else Ib(o,t,n,a)}return t}var Ote=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,kte=[0,31,28,31,30,31,30,31,31,30,31,30,31],Ate=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,jte=/^(?=.{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,Mte=/^(?:[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,Nte=/^(?:(?:[^\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,Pte=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!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-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,Fte=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Ite=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Lte=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Rte=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,zte=e=>{if(e[0]===`"`)return!1;let[t,n,...r]=e.split(`@`);return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]===`.`||t.endsWith(`.`)||t.includes(`..`)||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},Bte=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,Vte=/^((([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,Hte=e=>e.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));function Lb(e){return e.test.bind(e)}var Rb={date:zb,time:Bb.bind(void 0,!1),"date-time":Gte,duration:Hte,uri:Vb,"uri-reference":Lb(Mte),"uri-template":Lb(Nte),url:Lb(Pte),email:zte,hostname:Lb(jte),ipv4:Lb(Bte),ipv6:Lb(Vte),regex:Ub,uuid:Lb(Fte),"json-pointer":Lb(Ite),"json-pointer-uri-fragment":Lb(Lte),"relative-json-pointer":Lb(Rte)};function Ute(e){return e%4==0&&(e%100!=0||e%400==0)}function zb(e){let t=e.match(Ote);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&Ute(n)?29:kte[r])}function Bb(e,t){let n=t.match(Ate);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}var Wte=/t|\s/i;function Gte(e){let t=e.split(Wte);return t.length==2&&zb(t[0])&&Bb(!0,t[1])}var Kte=/\/|:/,qte=/^(?:[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 Vb(e){return Kte.test(e)&&qte.test(e)}var Hb=/[^\\]\\Z/;function Ub(e){if(Hb.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}function Wb(e){let t=0,n=e.length,r=0,i;for(;r<n;)t++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<n&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return t}function Gb(e,t,n=`2019-09`,r=Ib(t),i=!0,a=null,o=`#`,s=`#`,c=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:o,keyword:`false`,keywordLocation:o,error:`False boolean schema.`}]};let l=typeof e,u;switch(l){case`boolean`:case`number`:case`string`:u=l;break;case`object`:u=e===null?`null`:Array.isArray(e)?`array`:`object`;break;default:throw Error(`Instances of "${l}" type are not supported.`)}let{$ref:d,$recursiveRef:f,$recursiveAnchor:p,type:m,const:h,enum:g,required:_,not:v,anyOf:y,allOf:b,oneOf:x,if:S,then:C,else:w,format:T,properties:E,patternProperties:D,additionalProperties:O,unevaluatedProperties:k,minProperties:A,maxProperties:j,propertyNames:M,dependentRequired:N,dependentSchemas:P,dependencies:F,prefixItems:I,items:L,additionalItems:ee,unevaluatedItems:te,contains:ne,minContains:R,maxContains:z,minItems:B,maxItems:re,uniqueItems:ie,minimum:ae,maximum:oe,exclusiveMinimum:se,exclusiveMaximum:ce,multipleOf:le,minLength:ue,maxLength:de,pattern:fe,__absolute_ref__:pe,__absolute_recursive_ref__:me}=t,V=[];if(p===!0&&a===null&&(a=t),f===`#`){let l=a===null?r[me]:a,u=`${s}/$recursiveRef`,d=Gb(e,a===null?t:a,n,r,i,l,o,u,c);d.valid||V.push({instanceLocation:o,keyword:`$recursiveRef`,keywordLocation:u,error:`A subschema had errors.`},...d.errors)}if(d!==void 0){let t=r[pe||d];if(t===void 0){let e=`Unresolved $ref "${d}".`;throw pe&&pe!==d&&(e+=` Absolute URI "${pe}".`),e+=`\nKnown schemas:\n- ${Object.keys(r).join(`
74
+ - `)}`,Error(e)}let l=`${s}/$ref`,u=Gb(e,t,n,r,i,a,o,l,c);if(u.valid||V.push({instanceLocation:o,keyword:`$ref`,keywordLocation:l,error:`A subschema had errors.`},...u.errors),n===`4`||n===`7`)return{valid:V.length===0,errors:V}}if(Array.isArray(m)){let t=m.length,n=!1;for(let r=0;r<t;r++)if(u===m[r]||m[r]===`integer`&&u===`number`&&e%1==0&&e===e){n=!0;break}n||V.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m.join(`", "`)}".`})}else m===`integer`?(u!==`number`||e%1||e!==e)&&V.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`}):m!==void 0&&u!==m&&V.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`});if(h!==void 0&&(u===`object`||u===`array`?Pb(e,h)||V.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`}):e!==h&&V.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`})),g!==void 0&&(u===`object`||u===`array`?g.some(t=>Pb(e,t))||V.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(t=>e===t)||V.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),v!==void 0){let t=`${s}/not`;Gb(e,v,n,r,i,a,o,t).valid&&V.push({instanceLocation:o,keyword:`not`,keywordLocation:t,error:`Instance matched "not" schema.`})}let he=[];if(y!==void 0){let t=`${s}/anyOf`,l=V.length,u=!1;for(let s=0;s<y.length;s++){let l=y[s],d=Object.create(c),f=Gb(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);V.push(...f.errors),u||=f.valid,f.valid&&he.push(d)}u?V.length=l:V.splice(l,0,{instanceLocation:o,keyword:`anyOf`,keywordLocation:t,error:`Instance does not match any subschemas.`})}if(b!==void 0){let t=`${s}/allOf`,l=V.length,u=!0;for(let s=0;s<b.length;s++){let l=b[s],d=Object.create(c),f=Gb(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);V.push(...f.errors),u&&=f.valid,f.valid&&he.push(d)}u?V.length=l:V.splice(l,0,{instanceLocation:o,keyword:`allOf`,keywordLocation:t,error:`Instance does not match every subschema.`})}if(x!==void 0){let t=`${s}/oneOf`,l=V.length,u=x.filter((s,l)=>{let u=Object.create(c),d=Gb(e,s,n,r,i,p===!0?a:null,o,`${t}/${l}`,u);return V.push(...d.errors),d.valid&&he.push(u),d.valid}).length;u===1?V.length=l:V.splice(l,0,{instanceLocation:o,keyword:`oneOf`,keywordLocation:t,error:`Instance does not match exactly one subschema (${u} matches).`})}if((u===`object`||u===`array`)&&Object.assign(c,...he),S!==void 0){let t=`${s}/if`;if(Gb(e,S,n,r,i,a,o,t,c).valid){if(C!==void 0){let l=Gb(e,C,n,r,i,a,o,`${s}/then`,c);l.valid||V.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "then" schema.`},...l.errors)}}else if(w!==void 0){let l=Gb(e,w,n,r,i,a,o,`${s}/else`,c);l.valid||V.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "else" schema.`},...l.errors)}}if(u===`object`){if(_!==void 0)for(let t of _)t in e||V.push({instanceLocation:o,keyword:`required`,keywordLocation:`${s}/required`,error:`Instance does not have required property "${t}".`});let t=Object.keys(e);if(A!==void 0&&t.length<A&&V.push({instanceLocation:o,keyword:`minProperties`,keywordLocation:`${s}/minProperties`,error:`Instance does not have at least ${A} properties.`}),j!==void 0&&t.length>j&&V.push({instanceLocation:o,keyword:`maxProperties`,keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${j} properties.`}),M!==void 0){let t=`${s}/propertyNames`;for(let s in e){let e=`${o}/${Fb(s)}`,c=Gb(s,M,n,r,i,a,e,t);c.valid||V.push({instanceLocation:o,keyword:`propertyNames`,keywordLocation:t,error:`Property name "${s}" does not match schema.`},...c.errors)}}if(N!==void 0){let t=`${s}/dependantRequired`;for(let n in N)if(n in e){let r=N[n];for(let i of r)i in e||V.push({instanceLocation:o,keyword:`dependentRequired`,keywordLocation:t,error:`Instance has "${n}" but does not have "${i}".`})}}if(P!==void 0)for(let t in P){let l=`${s}/dependentSchemas`;if(t in e){let s=Gb(e,P[t],n,r,i,a,o,`${l}/${Fb(t)}`,c);s.valid||V.push({instanceLocation:o,keyword:`dependentSchemas`,keywordLocation:l,error:`Instance has "${t}" but does not match dependant schema.`},...s.errors)}}if(F!==void 0){let t=`${s}/dependencies`;for(let s in F)if(s in e){let c=F[s];if(Array.isArray(c))for(let n of c)n in e||V.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not have "${n}".`});else{let l=Gb(e,c,n,r,i,a,o,`${t}/${Fb(s)}`);l.valid||V.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),u=!1;if(E!==void 0){let t=`${s}/properties`;for(let s in E){if(!(s in e))continue;let d=`${o}/${Fb(s)}`,f=Gb(e[s],E[s],n,r,i,a,d,`${t}/${Fb(s)}`);if(f.valid)c[s]=l[s]=!0;else if(u=i,V.push({instanceLocation:o,keyword:`properties`,keywordLocation:t,error:`Property "${s}" does not match schema.`},...f.errors),u)break}}if(!u&&D!==void 0){let t=`${s}/patternProperties`;for(let s in D){let d=new RegExp(s,`u`),f=D[s];for(let p in e){if(!d.test(p))continue;let m=`${o}/${Fb(p)}`,h=Gb(e[p],f,n,r,i,a,m,`${t}/${Fb(s)}`);h.valid?c[p]=l[p]=!0:(u=i,V.push({instanceLocation:o,keyword:`patternProperties`,keywordLocation:t,error:`Property "${p}" matches pattern "${s}" but does not match associated schema.`},...h.errors))}}}if(!u&&O!==void 0){let t=`${s}/additionalProperties`;for(let s in e){if(l[s])continue;let d=`${o}/${Fb(s)}`,f=Gb(e[s],O,n,r,i,a,d,t);f.valid?c[s]=!0:(u=i,V.push({instanceLocation:o,keyword:`additionalProperties`,keywordLocation:t,error:`Property "${s}" does not match additional properties schema.`},...f.errors))}}else if(!u&&k!==void 0){let t=`${s}/unevaluatedProperties`;for(let s in e)if(!c[s]){let l=`${o}/${Fb(s)}`,u=Gb(e[s],k,n,r,i,a,l,t);u.valid?c[s]=!0:V.push({instanceLocation:o,keyword:`unevaluatedProperties`,keywordLocation:t,error:`Property "${s}" does not match unevaluated properties schema.`},...u.errors)}}}else if(u===`array`){re!==void 0&&e.length>re&&V.push({instanceLocation:o,keyword:`maxItems`,keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${re}).`}),B!==void 0&&e.length<B&&V.push({instanceLocation:o,keyword:`minItems`,keywordLocation:`${s}/minItems`,error:`Array has too few items (${e.length} < ${B}).`});let t=e.length,l=0,u=!1;if(I!==void 0){let d=`${s}/prefixItems`,f=Math.min(I.length,t);for(;l<f;l++){let t=Gb(e[l],I[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,V.push({instanceLocation:o,keyword:`prefixItems`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}if(L!==void 0){let d=`${s}/items`;if(Array.isArray(L)){let s=Math.min(L.length,t);for(;l<s;l++){let t=Gb(e[l],L[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,V.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}else for(;l<t;l++){let t=Gb(e[l],L,n,r,i,a,`${o}/${l}`,d);if(c[l]=!0,!t.valid&&(u=i,V.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}if(!u&&ee!==void 0){let d=`${s}/additionalItems`;for(;l<t;l++){let t=Gb(e[l],ee,n,r,i,a,`${o}/${l}`,d);c[l]=!0,t.valid||(u=i,V.push({instanceLocation:o,keyword:`additionalItems`,keywordLocation:d,error:`Items did not match additional items schema.`},...t.errors))}}}if(ne!==void 0)if(t===0&&R===void 0)V.push({instanceLocation:o,keyword:`contains`,keywordLocation:`${s}/contains`,error:`Array is empty. It must contain at least one item matching the schema.`});else if(R!==void 0&&t<R)V.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array has less items (${t}) than minContains (${R}).`});else{let l=`${s}/contains`,u=V.length,d=0;for(let s=0;s<t;s++){let t=Gb(e[s],ne,n,r,i,a,`${o}/${s}`,l);t.valid?(c[s]=!0,d++):V.push(...t.errors)}d>=(R||0)&&(V.length=u),R===void 0&&z===void 0&&d===0?V.splice(u,0,{instanceLocation:o,keyword:`contains`,keywordLocation:l,error:`Array does not contain item matching schema.`}):R!==void 0&&d<R?V.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array must contain at least ${R} items matching schema. Only ${d} items were found.`}):z!==void 0&&d>z&&V.push({instanceLocation:o,keyword:`maxContains`,keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${z} items matching schema. ${d} items were found.`})}if(!u&&te!==void 0){let u=`${s}/unevaluatedItems`;for(;l<t;l++){if(c[l])continue;let t=Gb(e[l],te,n,r,i,a,`${o}/${l}`,u);c[l]=!0,t.valid||V.push({instanceLocation:o,keyword:`unevaluatedItems`,keywordLocation:u,error:`Items did not match unevaluated items schema.`},...t.errors)}}if(ie)for(let n=0;n<t;n++){let r=e[n],i=typeof r==`object`&&!!r;for(let a=0;a<t;a++){if(n===a)continue;let t=e[a];(r===t||i&&typeof t==`object`&&t&&Pb(r,t))&&(V.push({instanceLocation:o,keyword:`uniqueItems`,keywordLocation:`${s}/uniqueItems`,error:`Duplicate items at indexes ${n} and ${a}.`}),n=2**53-1,a=2**53-1)}}}else if(u===`number`){if(n===`4`?(ae!==void 0&&(se===!0&&e<=ae||e<ae)&&V.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${se?`or equal to `:``} ${ae}.`}),oe!==void 0&&(ce===!0&&e>=oe||e>oe)&&V.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${ce?`or equal to `:``} ${oe}.`})):(ae!==void 0&&e<ae&&V.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${ae}.`}),oe!==void 0&&e>oe&&V.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${oe}.`}),se!==void 0&&e<=se&&V.push({instanceLocation:o,keyword:`exclusiveMinimum`,keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${se}.`}),ce!==void 0&&e>=ce&&V.push({instanceLocation:o,keyword:`exclusiveMaximum`,keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${ce}.`})),le!==void 0){let t=e%le;Math.abs(0-t)>=1.1920929e-7&&Math.abs(le-t)>=1.1920929e-7&&V.push({instanceLocation:o,keyword:`multipleOf`,keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${le}.`})}}else if(u===`string`){let t=ue===void 0&&de===void 0?0:Wb(e);ue!==void 0&&t<ue&&V.push({instanceLocation:o,keyword:`minLength`,keywordLocation:`${s}/minLength`,error:`String is too short (${t} < ${ue}).`}),de!==void 0&&t>de&&V.push({instanceLocation:o,keyword:`maxLength`,keywordLocation:`${s}/maxLength`,error:`String is too long (${t} > ${de}).`}),fe!==void 0&&!new RegExp(fe,`u`).test(e)&&V.push({instanceLocation:o,keyword:`pattern`,keywordLocation:`${s}/pattern`,error:`String does not match pattern.`}),T!==void 0&&Rb[T]&&!Rb[T](e)&&V.push({instanceLocation:o,keyword:`format`,keywordLocation:`${s}/format`,error:`String does not match format "${T}".`})}return{valid:V.length===0,errors:V}}var Kb=class{schema;draft;shortCircuit;lookup;constructor(e,t=`2019-09`,n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=Ib(e)}validate(e){return Gb(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),Ib(e,this.lookup)}},qb=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=Fs(e,`pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`);return t===`draft-7`?`7`:t}getValidator(e){let t=new Kb(e,this.draft??this._draftFor(e),this.shortcircuit);return e=>{let n=t.validate(e);return n.valid?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:n.errors.map(e=>`${e.instanceLocation}: ${e.error}`).join(`; `)}}}},Jb=globalThis.crypto;async function Yb(e){return(await Jb).getRandomValues(new Uint8Array(e))}async function Xb(e){let t=``;for(;t.length<e;){let n=await Yb(e-t.length);for(let e of n)e<198&&(t+=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~`[e%66])}return t}async function Zb(e){return await Xb(e)}async function Qb(e){let t=await(await Jb).subtle.digest(`SHA-256`,new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,`_`).replace(/\+/g,`-`).replace(/=/g,``)}async function $b(e){if(e||=43,e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await Zb(e);return{code_verifier:t,code_challenge:await Qb(t)}}var ex=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}};function tx(e){}function nx(e){if(typeof e==`function`)throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=tx,onError:n=tx,onRetry:r=tx,onComment:i}=e,a=``,o=!0,s,c=``,l=``;function u(e){let t=o?e.replace(/^\xEF\xBB\xBF/,``):e,[n,r]=rx(`${a}${t}`);for(let e of n)d(e);a=r,o=!1}function d(e){if(e===``){p();return}if(e.startsWith(`:`)){i&&i(e.slice(e.startsWith(`: `)?2:1));return}let t=e.indexOf(`:`);if(t!==-1){let n=e.slice(0,t),r=e[t+1]===` `?2:1;f(n,e.slice(t+r),e);return}f(e,``,e)}function f(e,t,i){switch(e){case`event`:l=t;break;case`data`:c=`${c}${t}
75
+ `;break;case`id`:s=t.includes(`\0`)?void 0:t;break;case`retry`:/^\d+$/.test(t)?r(parseInt(t,10)):n(new ex(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new ex(`Unknown field "${e.length>20?`${e.slice(0,20)}\u2026`:e}"`,{type:`unknown-field`,field:e,value:t,line:i}));break}}function p(){c.length>0&&t({id:s,event:l||void 0,data:c.endsWith(`
76
+ `)?c.slice(0,-1):c}),s=void 0,c=``,l=``}function m(e={}){a&&e.consume&&d(a),o=!0,s=void 0,c=``,l=``,a=``}return{feed:u,reset:m}}function rx(e){let t=[],n=``,r=0;for(;r<e.length;){let i=e.indexOf(`\r`,r),a=e.indexOf(`
77
+ `,r),o=-1;if(i!==-1&&a!==-1?o=Math.min(i,a):i===-1?a!==-1&&(o=a):o=i===e.length-1?-1:i,o===-1){n=e.slice(r);break}else{let n=e.slice(r,o);t.push(n),r=o+1,e[r-1]===`\r`&&e[r]===`
78
+ `&&r++}}return[t,n]}var ix=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n}={}){let r;super({start(i){r=nx({onEvent:e=>{i.enqueue(e)},onError(t){e===`terminate`?i.error(t):typeof e==`function`&&e(t)},onRetry:t,onComment:n})},transform(e){r.feed(e)}})}},ax=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return gv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return gv(this,e)}constructor(e){super(e),this.name=new.target.name,hv(this,new.target)}},ox=class extends ax{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.IssuerMismatchError`})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 §3.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),this.kind=e,this.expected=t,this.received=n}},sx=class extends ax{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.RegistrationRejectedError`})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},cx=class extends ax{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},lx=class extends ax{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server changed between redirect and callback (redirected to ${JSON.stringify(e)}, callback resolved ${JSON.stringify(t)}); refusing to send authorization_code/code_verifier to a different token endpoint`),this.recordedIssuer=e,this.currentIssuer=t}},ux=class extends ax{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsufficientScopeError`})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};function dx(e,t,n){if(e!==void 0)return e.issuer===void 0?(n?.canPersistStamp!==!1&&console.warn(`[mcp-sdk] SEP-2352: stored OAuth credential has no 'issuer' stamp (pre-upgrade storage or provider not round-tripping the value). SEP-2352 isolation is inactive for this read; ensure your provider round-trips the issuer field.`),e):fx(e.issuer,t)?e:void 0}function fx(e,t){return e===t||e.endsWith(`/`)&&e.slice(0,-1)===t||t.endsWith(`/`)&&t.slice(0,-1)===e}function px(e){if(e==null)return!1;let t=e;return typeof t.tokens==`function`&&typeof t.clientInformation==`function`}async function mx(e,t,n){let{resourceMetadataUrl:r,scope:i}=Bx(t.response);if(await Fx(e,{serverUrl:t.serverUrl,resourceMetadataUrl:r,scope:i,fetchFn:t.fetchFn,...n})!==`AUTHORIZED`)throw new gx}function hx(e,t){return{token:async()=>(await e.tokens())?.access_token,onUnauthorized:async n=>mx(e,n,t)}}var gx=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return gv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return gv(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,hv(this,new.target)}};function _x(e){return e?.authorization_response_iss_parameter_supported===!0}function vx({iss:e,expectedIssuer:t,issParameterSupported:n}){if(t!==void 0){if(e===void 0){if(n)throw new ox(`authorization_response`,t,void 0);return}if(e!==t)throw new ox(`authorization_response`,t,e)}}function yx(...e){let t=new Set;for(let n of e)if(n)for(let e of n.split(/\s+/))e&&t.add(e);return t.size>0?[...t].join(` `):void 0}function bx(e,t){if(!e)return!1;let n=new Set((t??``).split(/\s+/).filter(Boolean));for(let t of e.split(/\s+/))if(t&&!n.has(t))return!0;return!1}async function xx(e,t,n,r,i){if(typeof e==`string`)return{authorizationCode:e,iss:t};let a=e.get(`iss`)??void 0,o=e.get(`code`);if(o)return{authorizationCode:o,iss:a};let s=(await n.discoveryState?.())?.authorizationServerMetadata;if(!s)try{s=(await Xx(r,i)).authorizationServerMetadata}catch{s=void 0}if(!s)throw new gx(`Authorization callback failed and the issuer could not be verified`);vx({iss:a,expectedIssuer:s.issuer,issParameterSupported:_x(s)});let c=e.get(`error`);throw c?new vv(c,e.get(`error_description`)??c,e.get(`error_uri`)??void 0):new gx("Authorization callback contained neither `code` nor `error`")}function Sx(e){return[`client_secret_basic`,`client_secret_post`,`none`].includes(e)}var Cx=`code`,wx=`S256`;function Tx(e,t){let n=e.client_secret!==void 0;return`token_endpoint_auth_method`in e&&e.token_endpoint_auth_method&&Sx(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?`client_secret_basic`:`none`:n&&t.includes(`client_secret_basic`)?`client_secret_basic`:n&&t.includes(`client_secret_post`)?`client_secret_post`:t.includes(`none`)?`none`:n?`client_secret_post`:`none`}function Ex(e,t,n,r){let{client_id:i,client_secret:a}=t;switch(e){case`client_secret_basic`:Dx(i,a,n);return;case`client_secret_post`:Ox(i,a,r);return;case`none`:kx(i,r);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}function Dx(e,t,n){if(!t)throw Error(`client_secret_basic authentication requires a client_secret`);let r=btoa(`${e}:${t}`);n.set(`Authorization`,`Basic ${r}`)}function Ox(e,t,n){n.set(`client_id`,e),t&&n.set(`client_secret`,t)}function kx(e,t){t.set(`client_id`,e)}function Ax(e){return e===`localhost`||e===`127.0.0.1`||e===`[::1]`||e===`::1`}function jx(e){let t=new URL(String(e));if(t.protocol!==`https:`&&!Ax(t.hostname))throw new cx(t.href);return t}function Mx(e){for(let t of e??[]){let e;try{e=new URL(t)}catch{continue}if(e.protocol!==`http:`&&e.protocol!==`https:`||Ax(e.hostname))return`native`}return`web`}function Nx(e){let t=e.clientMetadata;return{...t,grant_types:t.grant_types??(e.redirectUrl===void 0?void 0:[`authorization_code`,`refresh_token`]),application_type:t.application_type??Mx(t.redirect_uris)}}async function Px(e){let t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{let e=lv.parse(JSON.parse(n));return vv.fromResponse(e)}catch(e){let r=`${t?`HTTP ${t}: `:``}Invalid OAuth error response: ${e}. Raw body: ${n}`;return new vv(_v.ServerError,r)}}async function Fx(e,t){try{return await Lx(e,t)}catch(n){if(n instanceof vv){if(n.code===_v.InvalidClient||n.code===_v.UnauthorizedClient)return await e.invalidateCredentials?.(`client`),await e.invalidateCredentials?.(`tokens`),await Lx(e,t);if(n.code===_v.InvalidGrant)return await e.invalidateCredentials?.(`tokens`),await Lx(e,t)}throw n}}function Ix(e){let{requestedScope:t,resourceMetadata:n,authServerMetadata:r,clientMetadata:i}=e,a=t||n?.scopes_supported?.join(` `)||i.scope;return a&&r?.scopes_supported?.includes(`offline_access`)&&!a.split(` `).includes(`offline_access`)&&i.grant_types?.includes(`refresh_token`)&&(a=`${a} offline_access`),a}async function Lx(e,{serverUrl:t,authorizationCode:n,iss:r,scope:i,resourceMetadataUrl:a,fetchFn:o,skipIssuerMetadataValidation:s,forceReauthorization:c}){let l=Nx(e),u=await e.discoveryState?.(),d,f,p,m,h=a;if(!h&&u?.resourceMetadataUrl&&(h=new URL(u.resourceMetadataUrl)),u?.authorizationServerUrl){if(f=u.authorizationServerUrl,d=u.resourceMetadata,p=u.authorizationServerMetadata??await Yx(f,{fetchFn:o,skipIssuerValidation:s}),!d)try{d=await Hx(t,{resourceMetadataUrl:h},o)}catch(e){if(e instanceof TypeError)throw e}(p!==u.authorizationServerMetadata||d!==u.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(f),resourceMetadataUrl:h?.toString(),resourceMetadata:d,authorizationServerMetadata:p})}else{let e=await Xx(t,{resourceMetadataUrl:h,fetchFn:o,skipIssuerMetadataValidation:s});f=e.authorizationServerUrl,p=e.authorizationServerMetadata,d=e.resourceMetadata,m={authorizationServerUrl:String(f),resourceMetadataUrl:h?.toString(),resourceMetadata:d,authorizationServerMetadata:p}}let g=p?.issuer??String(f),_={issuer:g};if(await e.saveAuthorizationServerUrl?.(g),n!==void 0){let t=u?.authorizationServerMetadata?.issuer??u?.authorizationServerUrl;if(t===void 0){if(e.saveDiscoveryState!==void 0)throw new lx(`discoveryState was not available on the callback leg; ensure your provider persists discoveryState alongside codeVerifier`,g);console.warn(`[mcp-sdk] OAuthClientProvider does not implement saveDiscoveryState()/discoveryState(); the SEP-2352 callback-leg authorization-server binding cannot be checked. Implement discoveryState (persist alongside codeVerifier) — see docs/migration/upgrade-to-v2.md §SEP-2352.`)}else if(!fx(t,g))throw new lx(t,g)}m&&await e.saveDiscoveryState?.(m);let v=await zx(t,e,d);v&&await e.saveResourceUrl?.(String(v));let y=Ix({requestedScope:i,resourceMetadata:d,authServerMetadata:p,clientMetadata:e.clientMetadata}),b=await Promise.resolve(e.clientInformation(_)),x=dx(b,g,{canPersistStamp:e.saveClientInformation!==void 0});if(x===void 0&&b?.issuer&&e.saveClientInformation===void 0)throw new lx(b.issuer,g);if(x&&x.issuer===void 0&&(x={...x,issuer:g},await e.saveClientInformation?.(x,_)),!x){if(n!==void 0)throw Error(`Existing OAuth client information is required when exchanging an authorization code`);let t=p?.client_id_metadata_document_supported===!0,r=e.clientMetadataUrl;if(r&&!Rx(r))throw new vv(_v.InvalidClientMetadata,`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${r}`);if(t&&r)x={client_id:r,issuer:g},await e.saveClientInformation?.(x,_);else{if(!e.saveClientInformation)throw Error(`OAuth client information must be saveable for dynamic registration`);x={...await nS(f,{metadata:p,clientMetadata:l,scope:y,fetchFn:o}),issuer:g},await e.saveClientInformation(x,_)}}let S=!e.redirectUrl;if(n!==void 0||S){n!==void 0&&vx({iss:r,expectedIssuer:p?.issuer,issParameterSupported:_x(p)});let t=await tS(e,f,{metadata:p,resource:v,authorizationCode:n,iss:r,scope:y,fetchFn:o});return await e.saveTokens({...t,issuer:g},_),`AUTHORIZED`}let C=dx(await e.tokens(_),g);if(C&&C.issuer===void 0&&(C={...C,issuer:g},await e.saveTokens(C,_)),C?.refresh_token&&!c)try{let t=await eS(f,{metadata:p,clientInformation:x,refreshToken:C.refresh_token,resource:v,addClientAuthentication:e.addClientAuthentication,fetchFn:o});return await e.saveTokens({...t,issuer:g},_),`AUTHORIZED`}catch(e){if(e instanceof cx||!(!(e instanceof vv)||e.code===_v.ServerError))throw e}let w=e.state?await e.state():void 0,{authorizationUrl:T,codeVerifier:E}=await Zx(f,{metadata:p,clientInformation:x,state:w,redirectUrl:e.redirectUrl,scope:y,resource:v});return await e.saveCodeVerifier(E),await e.redirectToAuthorization(T),`REDIRECT`}function Rx(e){if(!e)return!1;try{let t=new URL(e);return t.protocol===`https:`&&t.pathname!==`/`}catch{return!1}}async function zx(e,t,n){let r=xee(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!See({requestedResource:r,configuredResource:n.resource}))throw Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Bx(e){let t=e.headers.get(`WWW-Authenticate`);if(!t)return{};let[n,r]=t.split(` `);if(n?.toLowerCase()!==`bearer`||!r)return{};let i=Vx(e,`resource_metadata`)||void 0,a;if(i)try{a=new URL(i)}catch{}let o=Vx(e,`scope`)||void 0,s=Vx(e,`error`)||void 0,c=Vx(e,`error_description`)||void 0;return{resourceMetadataUrl:a,scope:o,error:s,errorDescription:c}}function Vx(e,t){let n=e.headers.get(`WWW-Authenticate`);if(!n)return null;let r=new RegExp(String.raw`${t}=(?:"([^"]+)"|([^\s,]+))`),i=n.match(r);if(i){let e=i[1]||i[2];if(e)return e}return null}async function Hx(e,t,n=fetch){let r=await qx(e,`oauth-protected-resource`,n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.text?.().catch(()=>{}),Error(`Resource server does not implement OAuth 2.0 Protected Resource Metadata.`);if(!r.ok)throw await r.text?.().catch(()=>{}),Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return rv.parse(await r.json())}async function Ux(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(!(r instanceof TypeError))throw r;if(t)try{return await n(e,{})}catch(e){if(!(e instanceof TypeError))throw e;return}return}}function Wx(e,t=``,n={}){return t.endsWith(`/`)&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function Gx(e,t,n=fetch){return await Ux(e,{"MCP-Protocol-Version":t},n)}function Kx(e,t){return e?t===`/`?!1:e.status>=400&&e.status<500||e.status===502:!0}async function qx(e,t,n,r){let i=new URL(e),a=r?.protocolVersion??`2025-11-25`,o;if(r?.metadataUrl)o=new URL(r.metadataUrl);else{let e=Wx(t,i.pathname);o=new URL(e,r?.metadataServerUrl??i),o.search=i.search}let s=await Gx(o,a,n);return!r?.metadataUrl&&Kx(s,i.pathname)&&(s=await Gx(new URL(`/.well-known/${t}`,i),a,n)),s}function Jx(e){let t=typeof e==`string`?new URL(e):e,n=t.pathname!==`/`,r=[];if(!n)return r.push({url:new URL(`/.well-known/oauth-authorization-server`,t.origin),type:`oauth`},{url:new URL(`/.well-known/openid-configuration`,t.origin),type:`oidc`}),r;let i=t.pathname;return i.endsWith(`/`)&&(i=i.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${i}`,t.origin),type:`oauth`},{url:new URL(`/.well-known/openid-configuration${i}`,t.origin),type:`oidc`},{url:new URL(`${i}/.well-known/openid-configuration`,t.origin),type:`oidc`}),r}async function Yx(e,{fetchFn:t=fetch,protocolVersion:n=Gm,skipIssuerValidation:r=!1}={}){let i={"MCP-Protocol-Version":n,Accept:`application/json`},a=Jx(e);for(let{url:n,type:o}of a){let a=await Ux(n,i,t);if(!a)continue;if(!a.ok){if(await a.text?.().catch(()=>{}),a.status>=400&&a.status<500||a.status===502)continue;throw Error(`HTTP ${a.status} trying to load ${o===`oauth`?`OAuth`:`OpenID provider`} metadata from ${n}`)}let s=o===`oauth`?iv.parse(await a.json()):ov.parse(await a.json());if(!r){let t=typeof e==`string`?e:e.href;if(!(s.issuer===t||t.endsWith(`/`)&&s.issuer===t.slice(0,-1)))throw new ox(`metadata`,t,s.issuer)}return s}}async function Xx(e,t){let n,r;try{n=await Hx(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch(e){if(e instanceof TypeError)throw e}r||=String(new URL(`/`,e));let i=await Yx(r,{fetchFn:t?.fetchFn,skipIssuerValidation:t?.skipIssuerMetadataValidation});return{authorizationServerUrl:r,authorizationServerMetadata:i,resourceMetadata:n}}async function Zx(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:i,state:a,resource:o}){let s;if(t){if(s=new URL(t.authorization_endpoint),!t.response_types_supported.includes(Cx))throw Error(`Incompatible auth server: does not support response type ${Cx}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(wx))throw Error(`Incompatible auth server: does not support code challenge method ${wx}`)}else s=new URL(`/authorize`,e);let c=await $b(),l=c.code_verifier,u=c.code_challenge;return s.searchParams.set(`response_type`,Cx),s.searchParams.set(`client_id`,n.client_id),s.searchParams.set(`code_challenge`,u),s.searchParams.set(`code_challenge_method`,wx),s.searchParams.set(`redirect_uri`,String(r)),a&&s.searchParams.set(`state`,a),i&&s.searchParams.set(`scope`,i),i?.split(` `).includes(`offline_access`)&&s.searchParams.append(`prompt`,`consent`),o&&s.searchParams.set(`resource`,o.href),{authorizationUrl:s,codeVerifier:l}}function Qx(e,t,n){return new URLSearchParams({grant_type:`authorization_code`,code:e,code_verifier:t,redirect_uri:String(n)})}async function $x(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:i,resource:a,fetchFn:o}){let s=jx(t?.token_endpoint??new URL(`/token`,e)),c=new Headers({"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`});a&&n.set(`resource`,a.href),i?await i(c,n,s,t):r&&Ex(Tx(r,t?.token_endpoint_auth_methods_supported??[]),r,c,n);let l=await(o??fetch)(s,{method:`POST`,headers:c,body:n});if(!l.ok)throw await Px(l);let u=await l.json();try{return sv.parse(u)}catch(e){throw typeof u==`object`&&u&&`error`in u?await Px(JSON.stringify(u)):e}}async function eS(e,{metadata:t,clientInformation:n,refreshToken:r,resource:i,addClientAuthentication:a,fetchFn:o}){return{refresh_token:r,...await $x(e,{metadata:t,tokenRequestParams:new URLSearchParams({grant_type:`refresh_token`,refresh_token:r}),clientInformation:n,addClientAuthentication:a,resource:i,fetchFn:o})}}async function tS(e,t,{metadata:n,resource:r,authorizationCode:i,iss:a,scope:o,fetchFn:s}={}){i!==void 0&&vx({iss:a,expectedIssuer:n?.issuer,issParameterSupported:_x(n)});let c=o??e.clientMetadata.scope,l;if(e.prepareTokenRequest&&(l=await e.prepareTokenRequest(c)),!l){if(!i)throw Error(`Either provider.prepareTokenRequest() or authorizationCode is required`);if(!e.redirectUrl)throw Error(`redirectUrl is required for authorization_code flow`);l=Qx(i,await e.codeVerifier(),e.redirectUrl)}let u=await e.clientInformation({issuer:n?.issuer??String(t)});return $x(t,{metadata:n,tokenRequestParams:l,clientInformation:u??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:s})}async function nS(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:i}){let a;if(t){if(!t.registration_endpoint)throw Error(`Incompatible auth server: does not support dynamic client registration`);a=new URL(t.registration_endpoint)}else a=new URL(`/register`,e);let o={...n,...r===void 0?{}:{scope:r}},s=await(i??fetch)(a,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(o)});if(!s.ok)throw new sx({status:s.status,body:await s.text(),submittedMetadata:o});return pv.parse(await s.json())}var rS=new Set([`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`server/discover`]),iS=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(aS(e))}set(e,t){let n=aS(e),r=rS.has(e.method),i=!this._entries.has(n);if(!r&&i&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let e of this._entries.keys())if(!rS.has(e.slice(0,e.indexOf(`\0`)))){this._entries.delete(e),this._cappedSize--;break}}let a=++this._stamp;return this._entries.set(n,{...t,stamp:a}),i&&!r&&this._cappedSize++,a}delete(e){this._entries.delete(aS(e))&&!rS.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\0`,n=rS.has(e);for(let e of this._entries.keys())e.startsWith(t)&&(this._entries.delete(e),n||this._cappedSize--)}clear(){this._entries.clear(),this._cappedSize=0}};function aS(e){return`${e.method}\0${JSON.stringify([e.partition??``,e.params??``])}`}function oS(e,t){return t===void 0?e:`${e}\0${t}`}var sS=864e5,cS=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity=``;constructor(e,t,n=()=>{},r=``,i=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=n,this._cachePartition=r,this._now=i}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,e===`public`?``:this._cachePartition])}async _probe(e,t){let n={method:e,params:t??``},r=this._partitionFor(`private`),i=await this._store.get({...n,partition:r});if(i!==void 0)return i;let a=this._partitionFor(`public`);if(a===r)return;let o=await this._store.get({...n,partition:a});return o?.scope===`public`?o:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,``)}async _deleteBoth(e,t){let n=this._partitionFor(`private`),r=this._partitionFor(`public`);try{await this._store.delete({method:e,params:t,partition:n})}catch(e){this._reportError(e)}if(r!==n)try{await this._store.delete({method:e,params:t,partition:r})}catch(e){this._reportError(e)}}async evictKey(e,t){let n=oS(e,t),r=this._evictionGeneration.get(n);r!==void 0&&this._evictionGeneration.set(n,r+1),await this._deleteBoth(e,t)}captureGeneration(e,t){let n=oS(e,t),r=this._evictionGeneration.get(n)??0;return this._evictionGeneration.set(n,r),r}async write(e,t,n,r){if((this._evictionGeneration.get(oS(e,r?.params))??0)!==n)return;let i=r?.params??``,a=this._partitionFor(`private`),o=this._partitionFor(`public`),s=(r?.scope??`private`)===`public`?o:a;try{await this._store.set({method:e,params:i,partition:s},{value:lS(t),expiresAt:r?.expiresAt,scope:r?.scope})}catch(e){this._reportError(e)}if(o!==a)try{await this._store.delete({method:e,params:i,partition:s===a?o:a})}catch(e){this._reportError(e)}}async read(e,t){let n=await this._probe(e,t);if(!(n?.expiresAt===void 0||!(n.expiresAt>this.now())))try{let e=JSON.parse(n.value);if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`cached document is not an object`);return{value:e}}catch(n){this._reportError(n),await this._deleteBoth(e,t??``);return}}resetForReconnect(){this._isUserSupplied||this._store.clear(),this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=``}async toolDefinition(e){let t=await this._probe(`tools/list`);if(t===void 0){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let e=this._decodeListTools(t),n=new Map;if(e!==void 0)for(let t of e.tools)n.set(t.name,t);this._toolIndex={stamp:t.stamp,byName:n}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let n=await this._probe(`tools/list`);if(n===void 0){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==n.stamp){let e=this._decodeListTools(n)??{tools:[]},r=new Map;for(let n of e.tools){let e=t(n);e!==void 0&&r.set(n.name,e)}this._toolOutputValidatorIndex={stamp:n.stamp,byName:r}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every(e=>typeof e==`object`&&!!e))throw TypeError(`cached tools/list document has a malformed tools array`);return t}catch(e){this._reportError(e);return}}};function lS(e){let t;try{t=JSON.stringify(e)}catch(e){throw TypeError(`cache value is not JSON-serializable: ${e instanceof Error?e.message:String(e)}`)}if(typeof t!=`string`)throw TypeError(`cache value is not JSON-serializable: it has no JSON representation`);return t}var uS=Symbol.for(`mcp.authSeamEscape`);function dS(e){if(typeof e==`object`&&e||typeof e==`function`)try{Object.defineProperty(e,uS,{value:!0,configurable:!0})}catch{}return e}function fS(e){return(typeof e==`object`&&!!e||typeof e==`function`)&&e[uS]===!0}var pS=-32022,mS=new Set([-32001,-32020,-32021]);function hS(e,t){switch(e.kind){case`result`:return gS(e.result,t);case`rpc-error`:return _S(e,t);case`http-error`:return vS(e,t);case`network-error`:return yS(e.error,t);case`auth-required`:return{kind:`error`,error:e.error};case`closed`:return t.transportKind===`stdio`?{kind:`legacy`}:yS(Error(`Connection closed during the version negotiation probe`),t);case`timeout`:return t.transportKind===`stdio`?{kind:`legacy`}:{kind:`error`,error:new bv(yv.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}function gS(e,t){let n=Uy(Hy).validateResult(`server/discover`,e);if(!n.ok)return{kind:`legacy`};let r=n.value.supportedVersions,i=t.clientModernVersions.find(e=>r.includes(e));return i===void 0?t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:new cy({supported:[...r],requested:t.requestedVersion})}:{kind:`modern`,version:i,discover:n.value}}function _S(e,t){let{code:n,message:r,data:i}=e;if(n===pS){let e=SS(i);if(e===void 0)return{kind:`legacy`};let n=new cy({supported:e,requested:CS(i)??t.requestedVersion},r),a=Ev(e),o=t.clientModernVersions.find(e=>a.includes(e));return o===void 0?a.length>0?{kind:`error`,error:n}:t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:n}:{kind:`corrective`,version:o,error:n}}return mS.has(n),{kind:`legacy`}}function vS(e,t){if(e.status===401||e.status===403){let t=e.status===403;return{kind:`error`,error:new xv(t?yv.ClientHttpForbidden:yv.ClientHttpAuthentication,`Version negotiation failed: ${t?`the server denied access (HTTP 403)`:`the server requires authorization (HTTP 401)`}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:`error`,error:new xv(yv.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let n=wS(e.body);return n===void 0?{kind:`legacy`}:_S(n,t)}function yS(e,t){return t.environment===`browser`&&bS(e)?{kind:`legacy`}:{kind:`error`,error:new bv(yv.EraNegotiationFailed,`Version negotiation probe failed: ${xS(e)}`,{cause:e})}}function bS(e){return e instanceof TypeError||e instanceof Error&&e.name===`TypeError`}function xS(e){return e instanceof Error?e.message:String(e)}function SS(e){if(typeof e!=`object`||!e)return;let t=e.supported;if(!(!Array.isArray(t)||t.length===0||!t.every(e=>typeof e==`string`)))return t}function CS(e){if(typeof e!=`object`||!e)return;let t=e.requested;return typeof t==`string`?t:void 0}function wS(e){if(e===void 0||e===``)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=`object`||!t)return;let n=t.error;if(typeof n!=`object`||!n)return;let{code:r,message:i,data:a}=n;if(typeof r==`number`)return{code:r,message:typeof i==`string`?i:``,data:a}}var TS=`legacy`;function ES(e,t){let n=e?.mode??TS;if(n===`legacy`)return{kind:`legacy`};let r=e?.probe??{};if(typeof n==`object`){if(!wv(n.pin))throw TypeError(`versionNegotiation: { pin: '${n.pin}' } is not a modern protocol revision — pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: 'legacy') for 2025-era servers.`);return{kind:`pin`,version:n.pin,probe:r}}let i=t?Ev(t):[];return{kind:`auto`,modernVersions:i.length>0?i:[...Cv],fallbackAvailable:!t||Tv(t).length>0,probe:r}}function DS(){let e=globalThis;return e.window!==void 0&&e.document!==void 0?`browser`:`node`}function OS(e){return`stderr`in e&&`pid`in e?`stdio`:`http`}var kS=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(e){this._transport=e,this._savedOnMessage=e.onmessage,this._savedOnError=e.onerror,this._savedOnClose=e.onclose}static async open(t){let n=new e(t);t.onmessage=e=>{let t=n._pending;if(t!==void 0&&(Zy(e)||Qy(e))&&e.id===t.id){n._pending=void 0,Zy(e)?t.resolve({kind:`response`,result:e.result}):t.resolve({kind:`response`,error:e.error});return}},t.onerror=e=>{n._savedOnError?.(e)},t.onclose=()=>{let e=n._pending;e!==void 0&&(n._pending=void 0,e.resolve({kind:`closed`})),n._closeDelivered=!0,n._savedOnClose?.()};try{await t.start()}catch(e){throw n.detach(),e}return n}async exchange(e,t){let n=`server-discover-probe-${++this._probeCounter}`;return new Promise(r=>{let i=!1,a=e=>{i||(i=!0,clearTimeout(o),this._pending?.id===n&&(this._pending=void 0),r(e))},o=setTimeout(()=>a({kind:`timeout`}),t);this._pending={id:n,resolve:a},this._transport.send(e(n)).catch(e=>a({kind:`send-error`,error:e}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&this._savedOnClose!==void 0){let e=this._savedOnClose,t=this._transport,n=!1,r=()=>{if(!n){n=!0;return}e()};t.onclose=r,AS.set(t,()=>{t.onclose===r&&(t.onclose=e)})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let e=this._transport,t=e.start,n=!0;e.start=async function(){if(n){n=!1,e.start=t;return}return t.call(e)}}},AS=new WeakMap;function jS(e){let t=AS.get(e);AS.delete(e),t?.()}function MS(e,t,n,r){return{jsonrpc:`2.0`,id:e,method:`server/discover`,params:{_meta:Uy(t).outboundEnvelope({protocolVersion:t,clientInfo:n,clientCapabilities:r})}}}function NS(e,t){switch(e.kind){case`response`:return e.error===void 0?{kind:`result`,result:e.result}:{kind:`rpc-error`,...e.error};case`send-error`:{let t=e.error;if(fS(t)||t instanceof gx||t instanceof Error&&t.name===`UnauthorizedError`)return{kind:`auth-required`,error:t};if(t instanceof xv){let e=t.data?.text;return{kind:`http-error`,status:t.data.status,body:typeof e==`string`?e:void 0,statusText:t.data.statusText}}return{kind:`network-error`,error:t}}case`closed`:return{kind:`closed`};case`timeout`:return{kind:`timeout`,timeoutMs:t}}}async function PS(e,t){let n=e.probe.timeoutMs??t.defaultTimeoutMs,r=Math.max(0,e.probe.maxRetries??0),i=e.kind===`pin`?[e.version]:e.modernVersions,a=e.kind===`auto`&&e.fallbackAvailable,o=await kS.open(t.transport),s=async()=>{let s=i[0],c=!1,l=r;for(;;){let r=await o.exchange(e=>MS(e,s,t.clientInfo,t.capabilities),n);if(r.kind===`timeout`&&l>0){l--;continue}let u=NS(r,n),d=hS(u,{clientModernVersions:i,requestedVersion:s,fallbackAvailable:a,environment:t.environment,transportKind:t.transportKind});switch(d.kind){case`modern`:return{era:`modern`,version:d.version,discover:d.discover};case`corrective`:if(c)throw d.error;c=!0,s=d.version;continue;case`legacy`:{let n=u.kind===`closed`?`the connection closed during the server/discover probe`:void 0;if(e.kind===`pin`)throw new bv(yv.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${n} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new bv(yv.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to`:`Version negotiation failed: ${n} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(n!==void 0&&t.disposableProbe!==!0)throw new bv(yv.EraNegotiationFailed,`Version negotiation failed: ${n} (this transport probed in place — the disposable sibling probe requires the SDK's base StdioClientTransport)`);return{era:`legacy`}}case`error`:throw d.error}}},c;try{c=await s()}catch(e){throw o.detach(),e}return o.release(),c}function FS(e){let t=Object.getPrototypeOf(e);if(t===null||!Object.prototype.hasOwnProperty.call(t,`_dispose`))return;let n=e._serverParams;return typeof n==`object`&&n&&typeof n.command==`string`?n:void 0}async function IS(e,t,n,r){let i=t.constructor,a=new i({...n,stderr:`ignore`}),o=t.close,s=!1,c,l=new Promise((e,t)=>{c=()=>t(LS())});t.close=async function(){return s=!0,c?.(),o.call(t)};let u;try{let t=PS(e,{...r,transport:a,transportKind:`stdio`,disposableProbe:!0});t.catch(()=>{}),u=await Promise.race([t,l])}finally{await RS(a),t.close=o}if(s)throw LS();return u}function LS(){return new bv(yv.EraNegotiationFailed,`Version negotiation failed: the transport was closed during the server/discover probe`)}async function RS(e){try{let t=e._dispose;await(typeof t==`function`?t.call(e):e.close())}catch{}}function zS(e){let t=e._meta?.[Jm];return ste.Implementation(t)?t:void 0}function BS(e,t){if(!(!e||typeof t!=`object`||!t)){if(e.type===`object`&&e.properties&&typeof e.properties==`object`){let n=t,r=e.properties;for(let e of Object.keys(r)){let t=r[e];n[e]===void 0&&Object.prototype.hasOwnProperty.call(t,`default`)&&(n[e]=t.default),n[e]!==void 0&&BS(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&BS(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&BS(n,t)}}function VS(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}function HS(e){if(typeof e==`object`&&e&&(e.kind===`legacy`&&!(`supportedVersions`in e)&&!(`discover`in e)||e.kind===`modern`&&Fh.safeParse(e.discover).success))return e;throw new bv(yv.EraNegotiationFailed,`connect({ prior }): unrecognized prior — expected { kind: 'modern', discover } or { kind: 'legacy' }`)}var US={"notifications/tools/list_changed":[`tools/list`],"notifications/prompts/list_changed":[`prompts/list`],"notifications/resources/list_changed":[`resources/list`,`resources/templates/list`]},WS=64,GS=class extends fte{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new bv(yv.ConnectionClosed,`subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e})}this._listenState.clear();for(let e of this._listChangedDebounceTimers.values())clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){super(t),this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new qb,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=$ee(t?.inputRequired),this._cache=new cS(t?.responseCacheStore??new iS,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??``),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??WS,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(this._negotiatedProtocolVersion!==void 0&&wv(this._negotiatedProtocolVersion)&&Yy(e))return`drop`}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){return this._inputRequiredDriverConfig.autoFulfill?vte({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new bv(yv.UnsupportedResultType,`Unsupported result type 'input_required' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance — pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:`input_required`,method:t.request.method}))}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler(`tools`,`notifications/tools/list_changed`,e.tools,async()=>(await this.listTools(void 0,{cacheMode:`refresh`})).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler(`prompts`,`notifications/prompts/list_changed`,e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:`refresh`})).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler(`resources`,`notifications/resources/list_changed`,e.resources,async()=>(await this.listResources(void 0,{cacheMode:`refresh`})).resources)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after connecting to transport`);this._capabilities=pte(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error(`Cannot configure version negotiation after connecting to transport`);this._versionNegotiation=e}_wrapHandler(e,t){return e===`elicitation/create`?async(e,n)=>{let r=Uy(this._negotiatedProtocolVersion),i=r.validateRequest(`elicitation/create`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`elicitation/create`,e)),!i.ok)throw new ay(i.reason===`not-in-era`?iy.InternalError:iy.InvalidParams,i.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation request: ${i.message}`);let{params:a}=i.value;a.mode=a.mode??`form`;let{supportsFormMode:o,supportsUrlMode:s}=VS(this._capabilities.elicitation);if(a.mode===`form`&&!o)throw new ay(iy.InvalidParams,`Client does not support form-mode elicitation requests`);if(a.mode===`url`&&!s)throw new ay(iy.InvalidParams,`Client does not support URL-mode elicitation requests`);let c=await t(e,n),l=r.validateResult(`elicitation/create`,c);if(!l.ok&&l.reason===`not-in-era`&&(l=r.validateInputResponse(`elicitation/create`,c)),!l.ok)throw new ay(l.reason===`not-in-era`?iy.InternalError:iy.InvalidParams,l.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation result: ${l.message}`);let u=l.value,d=a.mode===`form`?a.requestedSchema:void 0;if(a.mode===`form`&&u.action===`accept`&&u.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{BS(d,u.content)}catch{}return u}:e===`sampling/createMessage`?async(e,n)=>{let r=Uy(this._negotiatedProtocolVersion),i=r.validateRequest(`sampling/createMessage`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`sampling/createMessage`,e)),!i.ok)throw new ay(i.reason===`not-in-era`?iy.InternalError:iy.InvalidParams,i.reason===`not-in-era`?`No wire schema for sampling/createMessage in the resolved era`:`Invalid sampling request: ${i.message}`);let{params:a}=i.value,o=await t(e,n),s=!!(a.tools||a.toolChoice),c=r.samplingResultVariant(s,o);if(!c.ok&&c.reason===`not-in-era`&&(c=r.validateInputResponse(`sampling/createMessage`,o)),!c.ok)throw new ay(c.reason===`not-in-era`?iy.InternalError:iy.InvalidParams,c.reason===`not-in-era`?`No result schema for sampling/createMessage in the resolved era`:`Invalid sampling result: ${c.message}`);return c.value}:t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new bv(yv.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,HS(t.prior),t);let n=ES(this._versionNegotiation,this._supportedProtocolVersionsOption);return n.kind===`legacy`?this._connectPlainLegacy(e,t):this._connectNegotiated(e,n,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),e.sessionId!==void 0){let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion?.(t);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let n=Tv(this._supportedProtocolVersions);try{let r=n[0];if(r===void 0)throw new bv(yv.EraNegotiationFailed,`Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version`);let i=await this.request({method:`initialize`,params:{protocolVersion:r,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(i===void 0)throw Error(`Server sent invalid initialize result: ${i}`);if(!n.includes(i.protocolVersion))throw Error(`Server's protocol version is not supported: ${i.protocolVersion}`);this._serverCapabilities=i.capabilities,this._serverVersion=i.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion&&e.setProtocolVersion(i.protocolVersion),this._instructions=i.instructions,await this.notification({method:`notifications/initialized`}),this._negotiatedProtocolVersion=i.protocolVersion,this._listChangedConfig&&this._setupListChangedHandlers(this._listChangedConfig)}catch(e){throw this.close(),e}}async _connectNegotiated(e,t,n){if(e.sessionId!==void 0){await super.connect(e);let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion&&e.setProtocolVersion(t);return}this._resetConnectionState();let r;try{let i=OS(e),a={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:DS(),defaultTimeoutMs:n?.timeout??6e4},o=i===`stdio`?FS(e):void 0;r=o===void 0?await PS(t,{...a,transport:e,transportKind:i}):await IS(t,e,o,a)}catch(t){throw await e.close().catch(()=>{}),jS(e),t}if(jS(e),await super.connect(e),r.era===`legacy`){await this._legacyHandshake(e,n);return}if(this._serverCapabilities=r.discover.capabilities,this._serverVersion=zS(r.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.discover.instructions,this._discoverResult=r.discover,this._negotiatedProtocolVersion=r.version,e.setProtocolVersion&&e.setProtocolVersion(r.version),this._listChangedConfig){let e=this._listChangedConfig,t=this._serverCapabilities,r={...e.tools&&t?.tools?.listChanged&&{tools:e.tools},...e.prompts&&t?.prompts?.listChanged&&{prompts:e.prompts},...e.resources&&t?.resources?.listChanged&&{resources:e.resources}},i=!0;try{this._setupListChangedHandlers(r)}catch(e){i=!1,this.onerror?.(e instanceof Error?e:Error(String(e)))}let a=i?{...r.tools&&{toolsListChanged:!0},...r.prompts&&{promptsListChanged:!0},...r.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(a).length>0){let e=new AbortController,t=()=>e.abort(n?.signal?.reason);n?.signal?.aborted&&t(),n?.signal?.addEventListener(`abort`,t);try{this._autoOpenedSubscription=await this.listen(a,{timeout:n?.timeout,signal:e.signal})}catch(e){if(n?.signal?.aborted)throw await this.close().catch(()=>{}),e;this.onerror?.(e instanceof Error?e:Error(String(e)))}finally{n?.signal?.removeEventListener(`abort`,t)}}}}async _connectFromPrior(e,t,n){if(t.kind===`legacy`)return this._connectPlainLegacy(e,n);let r=t.discover;this._resetConnectionState();let i=this._supportedProtocolVersionsOption,a=(i&&Ev(i).length>0?Ev(i):Cv).find(e=>r.supportedVersions.includes(e));if(a===void 0)throw new bv(yv.EraNegotiationFailed,`connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client's supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: 'legacy' } to skip the probe and initialize directly, or use versionNegotiation: { mode: 'auto' } to re-probe with legacy fallback.`);if(await super.connect(e),this._discoverResult=r,this._serverCapabilities=r.capabilities,this._serverVersion=zS(r),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.instructions,this._negotiatedProtocolVersion=a,e.setProtocolVersion?.(a),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;return t===void 0?e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`:`${t.name}@${t.version}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return wv(e)?`modern`:`legacy`}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw new bv(yv.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw new bv(yv.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case`resources/list`:case`resources/templates/list`:case`resources/read`:case`resources/subscribe`:case`resources/unsubscribe`:if(!this._serverCapabilities?.resources)throw new bv(yv.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw new bv(yv.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw new bv(yv.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw new bv(yv.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case`initialize`:break;case`server/discover`:break;case`ping`:break}}assertNotificationCapability(e){switch(e){case`notifications/roots/list_changed`:if(!this._capabilities.roots?.listChanged)throw new bv(yv.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`);break;case`notifications/initialized`:break;case`notifications/cancelled`:break;case`notifications/progress`:break}}assertRequestHandlerCapability(e){switch(e){case`sampling/createMessage`:if(!this._capabilities.sampling)throw new bv(yv.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw new bv(yv.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw new bv(yv.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`);break;case`ping`:break}}async ping(e){return this.request({method:`ping`},e)}async discover(e){let t=await this._requestWithSchema({method:`server/discover`},Fh,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:`completion/complete`,params:e},t)}async setLoggingLevel(e,t){return this.request({method:`logging/setLevel`,params:{level:e}},t)}async getPrompt(e,t){return this.request({method:`prompts/get`,params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug(`Client.listPrompts() called but server does not advertise prompts capability - returning empty list`),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:`prompts/list`,params:e},t);let n=await this._serveFromCache(`prompts/list`,void 0,t);return n===void 0?this._listAllPages(`prompts/list`,e,t,(e,t)=>e.prompts.push(...t.prompts)):n}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResources() called but server does not advertise resources capability - returning empty list`),{resources:[]};if(e?.cursor!==void 0)return this.request({method:`resources/list`,params:e},t);let n=await this._serveFromCache(`resources/list`,void 0,t);return n===void 0?this._listAllPages(`resources/list`,e,t,(e,t)=>e.resources.push(...t.resources)):n}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list`),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:`resources/templates/list`,params:e},t);let n=await this._serveFromCache(`resources/templates/list`,void 0,t);return n===void 0?this._listAllPages(`resources/templates/list`,e,t,(e,t)=>e.resourceTemplates.push(...t.resourceTemplates)):n}async _listAllPages(e,t,n,r,i){let a=n?.cacheMode===`bypass`,o=this._cache.captureGeneration(e),s=await this.request({method:e,...t&&{params:{...t}}},n),c=s.nextCursor,l=new Set,u=1;for(;c!==void 0&&!l.has(c);){if(this._listMaxPages!==0&&u>=this._listMaxPages)throw new bv(yv.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});l.add(c);let i=await this.request({method:e,params:{...t,cursor:c}},n);r(s,i),c=i.nextCursor,u++}return delete s.nextCursor,i?.(s),a||await this._cache.write(e,s,o,this._freshness(s)),s}_freshness(e,t){let n=e,r=typeof n.ttlMs==`number`?n.ttlMs:this._defaultCacheTtlMs,i=n.cacheScope===`public`?`public`:`private`;return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),sS),scope:i,params:t}}async _serveFromCache(e,t,n){if(n?.cacheMode===`bypass`||n?.cacheMode===`refresh`)return;let r=await this._cache.read(e,t).catch(e=>void this._reportStoreError(e));if(r!==void 0){if(n?.signal?.aborted){let e=n.signal.reason;throw e instanceof bv?e:new bv(yv.RequestTimeout,String(e))}return r.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(e.outputSchema)try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(e){return{ok:!1,compileError:e}}}async _resolveXMcpHeaderScan(e,t){let n=t??await this._cache.toolDefinition(e);return n===void 0?void 0:ob(n.inputSchema)}async readResource(e,t){let n=await this._serveFromCache(`resources/read`,e.uri,t);if(n!==void 0)return n;let r=this._cache.captureGeneration(`resources/read`,e.uri),i=await this.request({method:`resources/read`,params:e},t);if(t?.cacheMode!==`bypass`){let n=this._freshness(i,e.uri);n.expiresAt>this._cache.now()?await this._cache.write(`resources/read`,i,r,n):t?.cacheMode===`refresh`&&await this._cache.evictKey(`resources/read`,e.uri)}return i}async subscribeResource(e,t){return this.request({method:`resources/subscribe`,params:e},t)}async unsubscribeResource(e,t){return this.request({method:`resources/unsubscribe`,params:e},t)}async listen(e,t){if(this.transport===void 0)throw new bv(yv.NotConnected,`Not connected`);let n=this._negotiatedProtocolVersion;if(n===void 0||!wv(n))throw new bv(yv.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${n??`none`}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:`subscriptions/listen`,protocolVersion:n});if(t?.signal?.aborted){let e=t.signal.reason;throw e instanceof bv?e:new bv(yv.RequestTimeout,String(e))}let r=new AbortController,i=`listen:${this._nextListenId++}`,a=`opening`,o,s,c,l,u=new Promise((e,t)=>{c=e,l=t}),d,f=new Promise(e=>{d=e}),p=e=>{if(a===`closed`)return;let n=a===`opening`;if(o!==void 0&&(clearTimeout(o),o=void 0),`ack`in e){a=`open`,c(e.ack);return}a=`closed`,s!==void 0&&t?.signal?.removeEventListener(`abort`,s),this._listenState.delete(i),r.abort(),d(e.cause),n&&l(e.error??new bv(yv.ConnectionClosed,`subscriptions/listen closed before the server acknowledged`))},m=async()=>{r.abort(),await this.notification({method:`notifications/cancelled`,params:{requestId:i}}).catch(()=>{})},h=async()=>{a!==`closed`&&(p({cause:`local`}),await m())};this._listenState.set(i,{settle:p});let g=t?.timeout??6e4;if(o=setTimeout(()=>{p({cause:`remote`,error:new bv(yv.RequestTimeout,`subscriptions/listen ack timed out`,{timeout:g})}),m().catch(()=>{})},g),t?.signal){let e=t.signal;s=()=>{if(a===`closed`)return;let t=e.reason;p({cause:`local`,error:t instanceof Error?t:Error(String(t??`Aborted`))}),m().catch(()=>{})},e.addEventListener(`abort`,s,{once:!0})}let _={jsonrpc:`2.0`,id:i,method:`subscriptions/listen`,params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}};try{await this.transport.send(_,{requestSignal:r.signal,onRequestStreamEnd:()=>p({cause:`remote`,error:Error(`subscriptions/listen: stream ended`)})})}catch(e){p({cause:`remote`,error:e instanceof Error?e:Error(String(e))})}return{honoredFilter:await u,close:h,closed:f}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let n=Object.hasOwn(US,e.method)?US[e.method]:void 0;if(e.method===`notifications/resources/updated`){let t=e.params?.uri;typeof t==`string`&&this._cache.evictKey(`resources/read`,t)}else if(n!==void 0)for(let e of n)this._cache.evict(e);if(e.method===`notifications/subscriptions/acknowledged`){let t=e.params?._meta?.[Xm],n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){let t=this._wireCodec().validateNotification(`notifications/subscriptions/acknowledged`,e);n.settle({ack:t.ok?t.value.params.notifications:{}});return}}if(e.method===`notifications/cancelled`){let t=e.params?.requestId,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){n.settle({cause:`remote`,error:Error(`subscriptions/listen: server cancelled the subscription`)});return}}super._onnotification(e,t)}_onresponse(e){let t=e.id,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){Qy(e)?n.settle({cause:`remote`,error:ay.fromError(e.error.code,e.error.message,e.error.data)}):n.settle({cause:`graceful`,error:new bv(yv.ConnectionClosed,`subscriptions/listen: server closed the subscription gracefully before acknowledging`)});return}super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new bv(yv.ConnectionClosed,`Connection closed`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let n=this.getProtocolEra()===`modern`&&DS()!==`browser`,r=async()=>{if(!n)return t;let r;try{r=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(e){this._reportStoreError(e)}if(!r?.valid||r.declarations.length===0)return t;let i=Nee(r.declarations,e.arguments);return Object.keys(i).length===0?t:{...t,headers:{...t?.headers,...i}}},i=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(i===void 0||i.ok)return;let t=i.compileError,n=(t instanceof Error?t.message:String(t)).slice(0,200);throw new ay(iy.InvalidParams,`Tool '${e.name}' has an invalid outputSchema: ${n}`)};a();let o;try{o=await this.request({method:`tools/call`,params:e},await r())}catch(s){let c=s instanceof ay&&s.code===-32020;if(!n||!c||t?.toolDefinition!==void 0)throw s;let l={signal:t?.signal,timeout:t?.timeout,cacheMode:`refresh`};await this._cache.evict(`tools/list`),await this.listTools(void 0,l).catch(e=>this._reportStoreError(e)),i=await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)),a(),o=await this.request({method:`tools/call`,params:e},await r())}let s=i!==void 0&&i.ok?i.validator:void 0;if(s){if(o.structuredContent===void 0&&!o.isError)throw new ay(iy.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent!==void 0&&!o.isError)try{let e=s(o.structuredContent);if(!e.valid)throw new ay(iy.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)}catch(e){throw e instanceof ay?e:new ay(iy.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return o}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug(`Client.listTools() called but server does not advertise tools capability - returning empty list`),{tools:[]};if(e?.cursor!==void 0){let n=await this.request({method:`tools/list`,params:e},t);return this._excludeInvalidXMcpHeaderTools(n),n}let n=await this._serveFromCache(`tools/list`,void 0,t);return n===void 0?this._listAllPages(`tools/list`,e,t,(e,t)=>e.tools.push(...t.tools),e=>this._excludeInvalidXMcpHeaderTools(e)):n}_excludeInvalidXMcpHeaderTools(e){if(this.getProtocolEra()!==`modern`||!this.transport||OS(this.transport)===`stdio`)return;let t=e.tools.filter(e=>{let t=ob(e.inputSchema);return t.valid?!0:(console.warn(`[mcp-sdk] excluding tool '${e.name}' from tools/list: invalid x-mcp-header declaration — ${t.reason}`),!1)});t.length!==e.tools.length&&(e.tools=t)}_setupListChangedHandler(e,t,n,r){let i=pb(Gg,n);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof n.onChanged!=`function`)throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:o}=i.data,{onChanged:s}=n,c=async()=>{if(!a){s(null,null);return}try{s(null,await r())}catch(e){s(e instanceof Error?e:Error(String(e)),null)}};this.setNotificationHandler(t,()=>{if(o){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let n=setTimeout(c,o);this._listChangedDebounceTimers.set(e,n)}else c()})}async sendRootsListChanged(){return this.notification({method:`notifications/roots/list_changed`})}};(class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return gv(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return gv(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,hv(this,new.target)}});var KS=1,qS={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},JS=new Set([`authorization`,`content-type`,`mcp-protocol-version`,`mcp-method`,`mcp-name`,`mcp-session-id`]);function YS(e,t){if(typeof AbortSignal.any==`function`)return AbortSignal.any([e,t]);let n=new AbortController;if(e.aborted)return n.abort(e.reason),n.signal;if(t.aborted)return n.abort(t.reason),n.signal;let r=()=>{e.removeEventListener(`abort`,i),t.removeEventListener(`abort`,a)};function i(){r(),n.abort(e.reason)}function a(){r(),n.abort(t.reason)}return e.addEventListener(`abort`,i,{once:!0}),t.addEventListener(`abort`,a,{once:!0}),n.signal}var XS=class{_abortController;_url;_resourceMetadataUrl;_scope;_requestInit;_authProvider;_oauthProvider;_skipIssuerMetadataValidation;_fetch;_fetchWithInit;_sessionId;_reconnectionOptions;_protocolVersion;_onInsufficientScope;_maxStepUpRetries;_serverRetryMs;_reconnectionScheduler;_cancelReconnection;onclose;onerror;onmessage;hasPerRequestStream=!0;constructor(e,t){this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=t?.requestInit,this._skipIssuerMetadataValidation=t?.skipIssuerMetadataValidation,px(t?.authProvider)?(this._oauthProvider=t.authProvider,this._authProvider=hx(t.authProvider,{skipIssuerMetadataValidation:t.skipIssuerMetadataValidation})):this._authProvider=t?.authProvider,this._fetch=t?.fetch,this._fetchWithInit=Ste(t?.fetch,t?.requestInit),this._sessionId=t?.sessionId,this._protocolVersion=t?.protocolVersion,this._reconnectionOptions=t?.reconnectionOptions??qS,this._reconnectionScheduler=t?.reconnectionScheduler,this._onInsufficientScope=t?.onInsufficientScope??`reauthorize`,this._maxStepUpRetries=Math.max(0,t?.maxStepUpRetries??KS)}async _stepUpAuthorize(e,t){try{return await this._stepUpAuthorizeInner(e,t)}catch(e){throw dS(e)}}async _stepUpAuthorizeInner(e,t){if(this._onInsufficientScope===`throw`||!this._oauthProvider)throw new ux({requiredScope:e.scope,resourceMetadataUrl:e.resourceMetadataUrl,errorDescription:e.errorDescription});if(t>=this._maxStepUpRetries)throw new xv(yv.ClientHttpForbidden,`Server returned 403 insufficient_scope after step-up re-authorization (retry limit ${this._maxStepUpRetries} reached)`,{status:403,statusText:e.statusText??`Forbidden`,text:e.text});e.resourceMetadataUrl&&(this._resourceMetadataUrl=e.resourceMetadataUrl);let n=await this._oauthProvider.tokens(),r=yx(this._scope,n?.scope,e.scope);this._scope=r;let i=bx(r,n?.scope);return Fx(this._oauthProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:r,forceReauthorization:i,fetchFn:this._fetchWithInit,skipIssuerMetadataValidation:this._skipIssuerMetadataValidation})}async _commonHeaders(){let e={},t;try{t=await this._authProvider?.token()}catch(e){throw dS(e)}t&&(e.Authorization=`Bearer ${t}`),this._sessionId&&(e[`mcp-session-id`]=this._sessionId),this._protocolVersion&&(e[`mcp-protocol-version`]=this._protocolVersion);let n=Nb(this._requestInit?.headers);return new Headers({...e,...n})}_applyBodyDerivedHeaders(e,t){if(Array.isArray(t)||!Yy(t))return;let n=t.params?._meta?.[Km];if(typeof n!=`string`)return;e.set(`mcp-protocol-version`,n),e.set(`mcp-method`,t.method);let r=t.params,i=t.method===`resources/read`?typeof r?.uri==`string`?r.uri:void 0:typeof r?.name==`string`?r.name:void 0;i!==void 0&&e.set(`mcp-name`,fb(i))}_isModernEnvelopedRequest(e){if(Array.isArray(e)||!Yy(e))return!1;let t=e.params?._meta?.[Km];return typeof t==`string`&&wv(t)}async _startOrAuthSse(e,t=!1,n=0){let{resumptionToken:r,requestSignal:i}=e,a=()=>this._abortController?.signal.aborted===!0||i?.aborted===!0;try{let a=await this._commonHeaders(),o=[...a.get(`accept`)?.split(`,`).map(e=>e.trim().toLowerCase())??[],`text/event-stream`];a.set(`accept`,[...new Set(o)].join(`, `)),r&&a.set(`last-event-id`,r);let s=this._abortController?.signal,c=i!==void 0&&s!==void 0?YS(s,i):i??s,l=await(this._fetch??fetch)(this._url,{...this._requestInit,method:`GET`,headers:a,signal:c});if(!l.ok){if(l.status===401&&this._authProvider){if(l.headers.has(`www-authenticate`)){let{resourceMetadataUrl:e,scope:t}=Bx(l);this._resourceMetadataUrl=e,this._scope=yx(this._scope,t)}if(this._authProvider.onUnauthorized&&!t){try{await this._authProvider.onUnauthorized({response:l,serverUrl:this._url,fetchFn:this._fetchWithInit})}catch(e){throw dS(e)}return await l.text?.().catch(()=>{}),this._startOrAuthSse(e,!0,n)}throw await l.text?.().catch(()=>{}),dS(t?new xv(yv.ClientHttpAuthentication,`Server returned 401 after re-authentication`,{status:401,statusText:l.statusText}):new gx)}if(l.status===403){let{resourceMetadataUrl:r,scope:i,error:a,errorDescription:o}=Bx(l);if(a===`insufficient_scope`){let a=await l.text?.().catch(()=>null);if(await this._stepUpAuthorize({scope:i,resourceMetadataUrl:r,errorDescription:o,statusText:l.statusText,text:a},n)!==`AUTHORIZED`)throw dS(new gx);return this._startOrAuthSse(e,t,n+1)}}if(await l.text?.().catch(()=>{}),l.status===405){e.onRequestStreamEnd?.();return}throw new xv(yv.ClientHttpFailedToOpenStream,`Failed to open SSE stream: ${l.statusText}`,{status:l.status,statusText:l.statusText})}this._handleSseStream(l.body,e,!0)}catch(e){throw a()||this.onerror?.(e),e}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;let t=this._reconnectionOptions.initialReconnectionDelay,n=this._reconnectionOptions.reconnectionDelayGrowFactor,r=this._reconnectionOptions.maxReconnectionDelay;return Math.min(t*n**+e,r)}_scheduleReconnection(e,t=0){let n=this._reconnectionOptions.maxRetries;if(t>=n){this.onerror?.(Error(`Maximum reconnection attempts (${n}) exceeded.`)),e.onRequestStreamEnd?.();return}let r=this._getNextReconnectionDelay(t),i=()=>{this._cancelReconnection=void 0,!(this._abortController?.signal.aborted||e.requestSignal?.aborted)&&this._startOrAuthSse(e).catch(n=>{if(!(this._abortController?.signal.aborted||e.requestSignal?.aborted)){this.onerror?.(Error(`Failed to reconnect SSE stream: ${n instanceof Error?n.message:String(n)}`));try{this._scheduleReconnection(e,t+1)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}})};if(this._reconnectionScheduler){let e=this._reconnectionScheduler(i,r,t);this._cancelReconnection=typeof e==`function`?e:void 0}else{let e=setTimeout(i,r);this._cancelReconnection=()=>clearTimeout(e)}}_handleSseStream(e,t,n){if(!e){t.onRequestStreamEnd?.();return}let{onresumptiontoken:r,replayMessageId:i,requestSignal:a,onRequestStreamEnd:o}=t,s=()=>this._abortController?.signal.aborted===!0||a?.aborted===!0,c,l=!1,u=!1;(async()=>{try{let t=e.pipeThrough(new TextDecoderStream).pipeThrough(new ix({onRetry:e=>{this._serverRetryMs=e}})).getReader();for(;;){let{value:e,done:n}=await t.read();if(n)break;if(e.id&&(c=e.id,l=!0,r?.(e.id)),e.data&&(!e.event||e.event===`message`))try{let t=vh.parse(JSON.parse(e.data));(Zy(t)||Qy(t))&&(u=!0,i!==void 0&&(t.id=i)),this.onmessage?.(t)}catch(e){this.onerror?.(e)}}(n||l)&&!u&&this._abortController&&!s()?this._scheduleReconnection({resumptionToken:c,onresumptiontoken:r,replayMessageId:i,requestSignal:a,onRequestStreamEnd:o},0):s()||o?.()}catch(e){if(s())return;if(this.onerror?.(Error(`SSE stream disconnected: ${e}`)),(n||l)&&!u&&this._abortController&&!s())try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:r,replayMessageId:i,requestSignal:a,onRequestStreamEnd:o},0)}catch(e){this.onerror?.(Error(`Failed to reconnect: ${e instanceof Error?e.message:String(e)}`)),o?.()}else o?.()}})()}async start(){if(this._abortController)throw Error(`StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.`);this._abortController=new AbortController}async finishAuth(e,t){if(!this._oauthProvider)throw new gx(`finishAuth requires an OAuthClientProvider`);let{authorizationCode:n,iss:r}=await xx(e,t,this._oauthProvider,this._url,{fetchFn:this._fetchWithInit,resourceMetadataUrl:this._resourceMetadataUrl});if(await Fx(this._oauthProvider,{serverUrl:this._url,authorizationCode:n,iss:r,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit,skipIssuerMetadataValidation:this._skipIssuerMetadataValidation})!==`AUTHORIZED`)throw new gx(`Failed to authorize`)}async close(){try{this._cancelReconnection?.()}finally{this._cancelReconnection=void 0,this._abortController?.abort(),this.onclose?.()}}async send(e,t){return this._send(e,t,!1)}async _send(e,t,n,r=0){try{let{resumptionToken:i,onresumptiontoken:a}=t||{};if(i){this._startOrAuthSse({resumptionToken:i,replayMessageId:Yy(e)?e.id:void 0,requestSignal:t?.requestSignal}).catch(e=>this.onerror?.(e));return}let o=await this._commonHeaders();this._applyBodyDerivedHeaders(o,e);let s=Array.isArray(e)?e.some(e=>eb(e)):eb(e);if(s&&o.delete(`mcp-session-id`),t?.headers!==void 0)for(let[e,n]of Object.entries(t.headers))JS.has(e.toLowerCase())||o.set(e,n);o.set(`content-type`,`application/json`);let c=[...o.get(`accept`)?.split(`,`).map(e=>e.trim().toLowerCase())??[],`application/json`,`text/event-stream`];o.set(`accept`,[...new Set(c)].join(`, `));let l=this._abortController?.signal,u=t?.requestSignal!==void 0&&l!==void 0?YS(l,t.requestSignal):t?.requestSignal??l,d={...this._requestInit,method:`POST`,headers:o,body:JSON.stringify(e),signal:u},f=await(this._fetch??fetch)(this._url,d);if(s&&f.ok&&(this._sessionId=f.headers.get(`mcp-session-id`)||void 0),!f.ok){if(f.status===401&&this._authProvider){if(f.headers.has(`www-authenticate`)){let{resourceMetadataUrl:e,scope:t}=Bx(f);this._resourceMetadataUrl=e,this._scope=yx(this._scope,t)}if(this._authProvider.onUnauthorized&&!n){try{await this._authProvider.onUnauthorized({response:f,serverUrl:this._url,fetchFn:this._fetchWithInit})}catch(e){throw dS(e)}return await f.text?.().catch(()=>{}),this._send(e,t,!0,r)}throw await f.text?.().catch(()=>{}),dS(n?new xv(yv.ClientHttpAuthentication,`Server returned 401 after re-authentication`,{status:401,statusText:f.statusText}):new gx)}let i=await f.text?.().catch(()=>null);if(f.status===403){let{resourceMetadataUrl:a,scope:o,error:s,errorDescription:c}=Bx(f);if(s===`insufficient_scope`){if(await this._stepUpAuthorize({scope:o,resourceMetadataUrl:a,errorDescription:c,statusText:f.statusText,text:i},r)!==`AUTHORIZED`)throw dS(new gx);return this._send(e,t,n,r+1)}}if(f.status===400&&typeof i==`string`&&this._isModernEnvelopedRequest(e))try{let t=vh.parse(JSON.parse(i)),n=(Array.isArray(e)?e:[e]).filter(e=>Yy(e));if(Qy(t)&&n.some(e=>e.id===t.id)){this.onmessage?.(t);return}}catch{}throw new xv(yv.ClientHttpNotImplemented,`Error POSTing to endpoint: ${i}`,{status:f.status,statusText:f.statusText,text:i})}if(f.status===202){await f.text?.().catch(()=>{}),tb(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(e=>this.onerror?.(e));return}let p=(Array.isArray(e)?e:[e]).some(e=>`method`in e&&`id`in e&&e.id!==void 0),m=f.headers.get(`content-type`),h=xte(m);if(p)if(h===`text/event-stream`)this._handleSseStream(f.body,{onresumptiontoken:a,requestSignal:t?.requestSignal,onRequestStreamEnd:t?.onRequestStreamEnd},!1);else if(h===`application/json`){let e=await f.json(),t=Array.isArray(e)?e.map(e=>vh.parse(e)):[vh.parse(e)];for(let e of t)this.onmessage?.(e)}else throw await f.text?.().catch(()=>{}),new bv(yv.ClientHttpUnexpectedContent,`Unexpected content type: ${m}`,{contentType:m});else await f.text?.().catch(()=>{})}catch(e){throw t?.requestSignal?.aborted!==!0&&this.onerror?.(e),e}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{let e=await this._commonHeaders(),t={...this._requestInit,method:`DELETE`,headers:e,signal:this._abortController?.signal},n=await(this._fetch??fetch)(this._url,t);if(await n.text?.().catch(()=>{}),!n.ok&&n.status!==405)throw new xv(yv.ClientHttpFailedToTerminateSession,`Failed to terminate session: ${n.statusText}`,{status:n.status,statusText:n.statusText});this._sessionId=void 0}catch(e){throw this.onerror?.(e),e}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}async resumeStream(e,t){await this._startOrAuthSse({resumptionToken:e,onresumptiontoken:t?.onresumptiontoken})}},ZS=5e3,QS=2e4;function $S(e){try{let t=JSON.stringify(e);return t?Math.ceil(new TextEncoder().encode(t).length/4):0}catch{return 0}}function eC(e){let{meta:t,...n}=e;return $S(n)}function tC(e){return $S(e?.modelContent)}function nC(e,t){let n=eC(e);n>=5e3&&console.warn(`[skybridge] Tool "${t}" returned ${n} estimated model-visible tokens; this reaches the ${ZS}-token warning threshold and may overload model context. Content and structured content are included in this estimate.`)}function rC(e,t){let n=$S(e);n>=2e4&&console.warn(`[skybridge] ${t} is persisting ${n} estimated tokens in model-visible view state; this reaches the ${QS}-token warning threshold and may overload model context. Persisted view state and data-llm context are included in this estimate.`)}function iC(e,t){if(e instanceof Promise)throw Error(t)}function aC(e,t){let n={},r=[];for(let i in e){let a=e[i][`~standard`].validate(t[i]);if(iC(a,`Validation must be synchronous, but ${i} returned a Promise.`),a.issues){r.push(...a.issues.map(e=>({...e,message:e.message,path:[i,...e.path??[]]})));continue}n[i]=a.value}return r.length?{issues:r}:{value:n}}function oC(e){let t=e.runtimeEnvStrict??e.runtimeEnv??{};if(e.emptyStringAsUndefined??!1)for(let[e,n]of Object.entries(t))n===``&&delete t[e];if(e.skipValidation){if(e.extends)for(let t of e.extends)t.skipValidation=!0;return t}let n=typeof e.client==`object`?e.client:{},r=typeof e.server==`object`?e.server:{},i=typeof e.shared==`object`?e.shared:{},a=e.isServer??(typeof window>`u`||`Deno`in window),o=a?{...r,...i,...n}:{...n,...i},s=(e.createFinalSchema?.(o,a))?.[`~standard`].validate(t)??aC(o,t);iC(s,`Validation must be synchronous`);let c=e.onValidationError??(e=>{throw console.error(`❌ Invalid environment variables:`,e),Error(`Invalid environment variables`)}),l=e.onInvalidAccess??(()=>{throw Error(`❌ Attempted to access a server-side environment variable on the client`)});if(s.issues)return c(s.issues);let u=t=>!e.clientPrefix||!t.startsWith(e.clientPrefix)&&!(t in i),d=e=>a||!u(e),f=e=>e==="__esModule"||e===`$$typeof`,p=(e.extends??[]).reduce((e,t)=>Object.assign(e,t),{}),m=Object.assign(p,s.value);return new Proxy(m,{get(e,t){if(typeof t==`string`&&!f(t))return d(t)?Reflect.get(e,t):l(t)}})}var sC=oC({clientPrefix:`VITE_`,client:{VITE_MCP_SERVER_URL:W().default(`${window.location.origin}/mcp`)},runtimeEnv:{BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1},emptyStringAsUndefined:!0}),cC=u(_(),1),lC=typeof global==`object`&&global&&global.Object===Object&&global,uC=typeof self==`object`&&self&&self.Object===Object&&self,dC=lC||uC||Function(`return this`)(),fC=dC.Symbol,pC=Object.prototype,mC=pC.hasOwnProperty,hC=pC.toString,gC=fC?fC.toStringTag:void 0;function _C(e){var t=mC.call(e,gC),n=e[gC];try{e[gC]=void 0;var r=!0}catch{}var i=hC.call(e);return r&&(t?e[gC]=n:delete e[gC]),i}var vC=Object.prototype.toString;function yC(e){return vC.call(e)}var bC=`[object Null]`,xC=`[object Undefined]`,SC=fC?fC.toStringTag:void 0;function CC(e){return e==null?e===void 0?xC:bC:SC&&SC in Object(e)?_C(e):yC(e)}function wC(e){return typeof e==`object`&&!!e}var TC=`[object Symbol]`;function EC(e){return typeof e==`symbol`||wC(e)&&CC(e)==TC}function DC(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var OC=Array.isArray,kC=1/0,AC=fC?fC.prototype:void 0,jC=AC?AC.toString:void 0;function MC(e){if(typeof e==`string`)return e;if(OC(e))return DC(e,MC)+``;if(EC(e))return jC?jC.call(e):``;var t=e+``;return t==`0`&&1/e==-kC?`-0`:t}var NC=/\s/;function PC(e){for(var t=e.length;t--&&NC.test(e.charAt(t)););return t}var FC=/^\s+/;function IC(e){return e&&e.slice(0,PC(e)+1).replace(FC,``)}function LC(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var RC=NaN,zC=/^[-+]0x[0-9a-f]+$/i,BC=/^0b[01]+$/i,VC=/^0o[0-7]+$/i,HC=parseInt;function UC(e){if(typeof e==`number`)return e;if(EC(e))return RC;if(LC(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=LC(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=IC(e);var n=BC.test(e);return n||VC.test(e)?HC(e.slice(2),n?2:8):zC.test(e)?RC:+e}var WC=1/0,GC=17976931348623157e292;function KC(e){return e?(e=UC(e),e===WC||e===-WC?(e<0?-1:1)*GC:e===e?e:0):e===0?e:0}function qC(e){var t=KC(e),n=t%1;return t===t?n?t-n:t:0}function JC(e){return e}var YC=`[object AsyncFunction]`,XC=`[object Function]`,ZC=`[object GeneratorFunction]`,QC=`[object Proxy]`;function $C(e){if(!LC(e))return!1;var t=CC(e);return t==XC||t==ZC||t==YC||t==QC}var ew=dC[`__core-js_shared__`],tw=function(){var e=/[^.]+$/.exec(ew&&ew.keys&&ew.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function nw(e){return!!tw&&tw in e}var rw=Function.prototype.toString;function iw(e){if(e!=null){try{return rw.call(e)}catch{}try{return e+``}catch{}}return``}var aw=/[\\^$.*+?()[\]{}|]/g,ow=/^\[object .+?Constructor\]$/,sw=Function.prototype,cw=Object.prototype,lw=sw.toString,uw=cw.hasOwnProperty,dw=RegExp(`^`+lw.call(uw).replace(aw,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function fw(e){return!LC(e)||nw(e)?!1:($C(e)?dw:ow).test(iw(e))}function pw(e,t){return e?.[t]}function mw(e,t){var n=pw(e,t);return fw(n)?n:void 0}var hw=mw(dC,`WeakMap`),gw=Object.create,_w=function(){function e(){}return function(t){if(!LC(t))return{};if(gw)return gw(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function vw(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function yw(){}function bw(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var xw=800,Sw=16,Cw=Date.now;function ww(e){var t=0,n=0;return function(){var r=Cw(),i=Sw-(r-n);if(n=r,i>0){if(++t>=xw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Tw(e){return function(){return e}}var Ew=function(){try{var e=mw(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),Dw=ww(Ew?function(e,t){return Ew(e,`toString`,{configurable:!0,enumerable:!1,value:Tw(t),writable:!0})}:JC);function Ow(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function kw(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Aw(e){return e!==e}function jw(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Mw(e,t,n){return t===t?jw(e,t,n):kw(e,Aw,n)}function Nw(e,t){return!!(e!=null&&e.length)&&Mw(e,t,0)>-1}var Pw=9007199254740991,Fw=/^(?:0|[1-9]\d*)$/;function Iw(e,t){var n=typeof e;return t??=Pw,!!t&&(n==`number`||n!=`symbol`&&Fw.test(e))&&e>-1&&e%1==0&&e<t}function Lw(e,t,n){t==`__proto__`&&Ew?Ew(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Rw(e,t){return e===t||e!==e&&t!==t}var Jte=Object.prototype.hasOwnProperty;function zw(e,t,n){var r=e[t];(!(Jte.call(e,t)&&Rw(r,n))||n===void 0&&!(t in e))&&Lw(e,t,n)}function Bw(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?Lw(n,s,c):zw(n,s,c)}return n}var Vw=Math.max;function Hw(e,t,n){return t=Vw(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Vw(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),vw(e,this,s)}}function Uw(e,t){return Dw(Hw(e,t,JC),e+``)}var Yte=9007199254740991;function Ww(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Yte}function Gw(e){return e!=null&&Ww(e.length)&&!$C(e)}function Xte(e,t,n){if(!LC(n))return!1;var r=typeof t;return(r==`number`?Gw(n)&&Iw(t,n.length):r==`string`&&t in n)?Rw(n[t],e):!1}function Kw(e){return Uw(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&Xte(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var Zte=Object.prototype;function qw(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Zte)}function Jw(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Qte=`[object Arguments]`;function Yw(e){return wC(e)&&CC(e)==Qte}var Xw=Object.prototype,$te=Xw.hasOwnProperty,ene=Xw.propertyIsEnumerable,Zw=Yw(function(){return arguments}())?Yw:function(e){return wC(e)&&$te.call(e,`callee`)&&!ene.call(e,`callee`)};function tne(){return!1}var Qw=typeof exports==`object`&&exports&&!exports.nodeType&&exports,$w=Qw&&typeof module==`object`&&module&&!module.nodeType&&module,eT=$w&&$w.exports===Qw?dC.Buffer:void 0,tT=(eT?eT.isBuffer:void 0)||tne,nne=`[object Arguments]`,rne=`[object Array]`,ine=`[object Boolean]`,ane=`[object Date]`,one=`[object Error]`,sne=`[object Function]`,cne=`[object Map]`,lne=`[object Number]`,une=`[object Object]`,dne=`[object RegExp]`,fne=`[object Set]`,pne=`[object String]`,mne=`[object WeakMap]`,hne=`[object ArrayBuffer]`,gne=`[object DataView]`,_ne=`[object Float32Array]`,vne=`[object Float64Array]`,yne=`[object Int8Array]`,bne=`[object Int16Array]`,xne=`[object Int32Array]`,Sne=`[object Uint8Array]`,Cne=`[object Uint8ClampedArray]`,wne=`[object Uint16Array]`,Tne=`[object Uint32Array]`,nT={};nT[_ne]=nT[vne]=nT[yne]=nT[bne]=nT[xne]=nT[Sne]=nT[Cne]=nT[wne]=nT[Tne]=!0,nT[nne]=nT[rne]=nT[hne]=nT[ine]=nT[gne]=nT[ane]=nT[one]=nT[sne]=nT[cne]=nT[lne]=nT[une]=nT[dne]=nT[fne]=nT[pne]=nT[mne]=!1;function Ene(e){return wC(e)&&Ww(e.length)&&!!nT[CC(e)]}function rT(e){return function(t){return e(t)}}var iT=typeof exports==`object`&&exports&&!exports.nodeType&&exports,aT=iT&&typeof module==`object`&&module&&!module.nodeType&&module,oT=aT&&aT.exports===iT&&lC.process,sT=function(){try{return aT&&aT.require&&aT.require(`util`).types||oT&&oT.binding&&oT.binding(`util`)}catch{}}(),cT=sT&&sT.isTypedArray,lT=cT?rT(cT):Ene,Dne=Object.prototype.hasOwnProperty;function uT(e,t){var n=OC(e),r=!n&&Zw(e),i=!n&&!r&&tT(e),a=!n&&!r&&!i&&lT(e),o=n||r||i||a,s=o?Jw(e.length,String):[],c=s.length;for(var l in e)(t||Dne.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Iw(l,c)))&&s.push(l);return s}function dT(e,t){return function(n){return e(t(n))}}var One=dT(Object.keys,Object),kne=Object.prototype.hasOwnProperty;function fT(e){if(!qw(e))return One(e);var t=[];for(var n in Object(e))kne.call(e,n)&&n!=`constructor`&&t.push(n);return t}function pT(e){return Gw(e)?uT(e):fT(e)}var Ane=Object.prototype.hasOwnProperty,jne=Kw(function(e,t){if(qw(t)||Gw(t)){Bw(t,pT(t),e);return}for(var n in t)Ane.call(t,n)&&zw(e,n,t[n])});function Mne(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Nne=Object.prototype.hasOwnProperty;function Pne(e){if(!LC(e))return Mne(e);var t=qw(e),n=[];for(var r in e)r==`constructor`&&(t||!Nne.call(e,r))||n.push(r);return n}function mT(e){return Gw(e)?uT(e,!0):Pne(e)}var Fne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ine=/^\w*$/;function hT(e,t){if(OC(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||EC(e)?!0:Ine.test(e)||!Fne.test(e)||t!=null&&e in Object(t)}var gT=mw(Object,`create`);function Lne(){this.__data__=gT?gT(null):{},this.size=0}function Rne(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var zne=`__lodash_hash_undefined__`,Bne=Object.prototype.hasOwnProperty;function Vne(e){var t=this.__data__;if(gT){var n=t[e];return n===zne?void 0:n}return Bne.call(t,e)?t[e]:void 0}var Hne=Object.prototype.hasOwnProperty;function Une(e){var t=this.__data__;return gT?t[e]!==void 0:Hne.call(t,e)}var Wne=`__lodash_hash_undefined__`;function Gne(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=gT&&t===void 0?Wne:t,this}function _T(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_T.prototype.clear=Lne,_T.prototype.delete=Rne,_T.prototype.get=Vne,_T.prototype.has=Une,_T.prototype.set=Gne;function Kne(){this.__data__=[],this.size=0}function vT(e,t){for(var n=e.length;n--;)if(Rw(e[n][0],t))return n;return-1}var qne=Array.prototype.splice;function Jne(e){var t=this.__data__,n=vT(t,e);return n<0?!1:(n==t.length-1?t.pop():qne.call(t,n,1),--this.size,!0)}function Yne(e){var t=this.__data__,n=vT(t,e);return n<0?void 0:t[n][1]}function Xne(e){return vT(this.__data__,e)>-1}function Zne(e,t){var n=this.__data__,r=vT(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function yT(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yT.prototype.clear=Kne,yT.prototype.delete=Jne,yT.prototype.get=Yne,yT.prototype.has=Xne,yT.prototype.set=Zne;var bT=mw(dC,`Map`);function Qne(){this.size=0,this.__data__={hash:new _T,map:new(bT||yT),string:new _T}}function $ne(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function xT(e,t){var n=e.__data__;return $ne(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function ere(e){var t=xT(this,e).delete(e);return this.size-=+!!t,t}function tre(e){return xT(this,e).get(e)}function nre(e){return xT(this,e).has(e)}function rre(e,t){var n=xT(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ST(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ST.prototype.clear=Qne,ST.prototype.delete=ere,ST.prototype.get=tre,ST.prototype.has=nre,ST.prototype.set=rre;var ire=`Expected a function`;function CT(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(ire);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(CT.Cache||ST),n}CT.Cache=ST;var are=500;function ore(e){var t=CT(e,function(e){return n.size===are&&n.clear(),e}),n=t.cache;return t}var sre=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cre=/\\(\\)?/g,wT=ore(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(sre,function(e,n,r,i){t.push(r?i.replace(cre,`$1`):n||e)}),t});function TT(e){return e==null?``:MC(e)}function ET(e,t){return OC(e)?e:hT(e,t)?[e]:wT(TT(e))}var lre=1/0;function DT(e){if(typeof e==`string`||EC(e))return e;var t=e+``;return t==`0`&&1/e==-lre?`-0`:t}function OT(e,t){t=ET(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[DT(t[n++])];return n&&n==r?e:void 0}function Y(e,t,n){var r=e==null?void 0:OT(e,t);return r===void 0?n:r}function kT(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var AT=fC?fC.isConcatSpreadable:void 0;function ure(e){return OC(e)||Zw(e)||!!(AT&&e&&e[AT])}function jT(e,t,n,r,i){var a=-1,o=e.length;for(n||=ure,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?jT(s,t-1,n,r,i):kT(i,s):r||(i[i.length]=s)}return i}function MT(e){return e!=null&&e.length?jT(e,1):[]}function NT(e){return Dw(Hw(e,void 0,MT),e+``)}var PT=dT(Object.getPrototypeOf,Object),dre=`[object Object]`,fre=Function.prototype,pre=Object.prototype,FT=fre.toString,mre=pre.hasOwnProperty,hre=FT.call(Object);function IT(e){if(!wC(e)||CC(e)!=dre)return!1;var t=PT(e);if(t===null)return!0;var n=mre.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&FT.call(n)==hre}function gre(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function _re(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function vre(){this.__data__=new yT,this.size=0}function yre(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function bre(e){return this.__data__.get(e)}function xre(e){return this.__data__.has(e)}var Sre=200;function Cre(e,t){var n=this.__data__;if(n instanceof yT){var r=n.__data__;if(!bT||r.length<Sre-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ST(r)}return n.set(e,t),this.size=n.size,this}function LT(e){var t=this.__data__=new yT(e);this.size=t.size}LT.prototype.clear=vre,LT.prototype.delete=yre,LT.prototype.get=bre,LT.prototype.has=xre,LT.prototype.set=Cre;function wre(e,t){return e&&Bw(t,pT(t),e)}function Tre(e,t){return e&&Bw(t,mT(t),e)}var RT=typeof exports==`object`&&exports&&!exports.nodeType&&exports,zT=RT&&typeof module==`object`&&module&&!module.nodeType&&module,BT=zT&&zT.exports===RT?dC.Buffer:void 0,VT=BT?BT.allocUnsafe:void 0;function HT(e,t){if(t)return e.slice();var n=e.length,r=VT?VT(n):new e.constructor(n);return e.copy(r),r}function Ere(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function UT(){return[]}var Dre=Object.prototype.propertyIsEnumerable,WT=Object.getOwnPropertySymbols,GT=WT?function(e){return e==null?[]:(e=Object(e),Ere(WT(e),function(t){return Dre.call(e,t)}))}:UT;function Ore(e,t){return Bw(e,GT(e),t)}var KT=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)kT(t,GT(e)),e=PT(e);return t}:UT;function kre(e,t){return Bw(e,KT(e),t)}function qT(e,t,n){var r=t(e);return OC(e)?r:kT(r,n(e))}function JT(e){return qT(e,pT,GT)}function YT(e){return qT(e,mT,KT)}var XT=mw(dC,`DataView`),ZT=mw(dC,`Promise`),QT=mw(dC,`Set`),$T=`[object Map]`,Are=`[object Object]`,eE=`[object Promise]`,tE=`[object Set]`,nE=`[object WeakMap]`,rE=`[object DataView]`,jre=iw(XT),Mre=iw(bT),Nre=iw(ZT),Pre=iw(QT),Fre=iw(hw),iE=CC;(XT&&iE(new XT(new ArrayBuffer(1)))!=rE||bT&&iE(new bT)!=$T||ZT&&iE(ZT.resolve())!=eE||QT&&iE(new QT)!=tE||hw&&iE(new hw)!=nE)&&(iE=function(e){var t=CC(e),n=t==Are?e.constructor:void 0,r=n?iw(n):``;if(r)switch(r){case jre:return rE;case Mre:return $T;case Nre:return eE;case Pre:return tE;case Fre:return nE}return t});var aE=iE,Ire=Object.prototype.hasOwnProperty;function Lre(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&Ire.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var oE=dC.Uint8Array;function sE(e){var t=new e.constructor(e.byteLength);return new oE(t).set(new oE(e)),t}function Rre(e,t){var n=t?sE(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var zre=/\w*$/;function Bre(e){var t=new e.constructor(e.source,zre.exec(e));return t.lastIndex=e.lastIndex,t}var cE=fC?fC.prototype:void 0,lE=cE?cE.valueOf:void 0;function Vre(e){return lE?Object(lE.call(e)):{}}function uE(e,t){var n=t?sE(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Hre=`[object Boolean]`,Ure=`[object Date]`,Wre=`[object Map]`,Gre=`[object Number]`,Kre=`[object RegExp]`,qre=`[object Set]`,Jre=`[object String]`,Yre=`[object Symbol]`,Xre=`[object ArrayBuffer]`,Zre=`[object DataView]`,Qre=`[object Float32Array]`,$re=`[object Float64Array]`,eie=`[object Int8Array]`,tie=`[object Int16Array]`,nie=`[object Int32Array]`,rie=`[object Uint8Array]`,iie=`[object Uint8ClampedArray]`,aie=`[object Uint16Array]`,oie=`[object Uint32Array]`;function sie(e,t,n){var r=e.constructor;switch(t){case Xre:return sE(e);case Hre:case Ure:return new r(+e);case Zre:return Rre(e,n);case Qre:case $re:case eie:case tie:case nie:case rie:case iie:case aie:case oie:return uE(e,n);case Wre:return new r;case Gre:case Jre:return new r(e);case Kre:return Bre(e);case qre:return new r;case Yre:return Vre(e)}}function dE(e){return typeof e.constructor==`function`&&!qw(e)?_w(PT(e)):{}}var cie=`[object Map]`;function lie(e){return wC(e)&&aE(e)==cie}var fE=sT&&sT.isMap,uie=fE?rT(fE):lie,die=`[object Set]`;function fie(e){return wC(e)&&aE(e)==die}var pE=sT&&sT.isSet,pie=pE?rT(pE):fie,mie=1,hie=2,gie=4,mE=`[object Arguments]`,_ie=`[object Array]`,vie=`[object Boolean]`,yie=`[object Date]`,bie=`[object Error]`,hE=`[object Function]`,xie=`[object GeneratorFunction]`,Sie=`[object Map]`,Cie=`[object Number]`,gE=`[object Object]`,wie=`[object RegExp]`,Tie=`[object Set]`,Eie=`[object String]`,Die=`[object Symbol]`,Oie=`[object WeakMap]`,kie=`[object ArrayBuffer]`,Aie=`[object DataView]`,jie=`[object Float32Array]`,Mie=`[object Float64Array]`,Nie=`[object Int8Array]`,Pie=`[object Int16Array]`,Fie=`[object Int32Array]`,Iie=`[object Uint8Array]`,Lie=`[object Uint8ClampedArray]`,Rie=`[object Uint16Array]`,zie=`[object Uint32Array]`,_E={};_E[mE]=_E[_ie]=_E[kie]=_E[Aie]=_E[vie]=_E[yie]=_E[jie]=_E[Mie]=_E[Nie]=_E[Pie]=_E[Fie]=_E[Sie]=_E[Cie]=_E[gE]=_E[wie]=_E[Tie]=_E[Eie]=_E[Die]=_E[Iie]=_E[Lie]=_E[Rie]=_E[zie]=!0,_E[bie]=_E[hE]=_E[Oie]=!1;function vE(e,t,n,r,i,a){var o,s=t&mie,c=t&hie,l=t&gie;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!LC(e))return e;var u=OC(e);if(u){if(o=Lre(e),!s)return bw(e,o)}else{var d=aE(e),f=d==hE||d==xie;if(tT(e))return HT(e,s);if(d==gE||d==mE||f&&!i){if(o=c||f?{}:dE(e),!s)return c?kre(e,Tre(o,e)):Ore(e,wre(o,e))}else{if(!_E[d])return i?e:{};o=sie(e,d,s)}}a||=new LT;var p=a.get(e);if(p)return p;a.set(e,o),pie(e)?e.forEach(function(r){o.add(vE(r,t,n,r,e,a))}):uie(e)&&e.forEach(function(r,i){o.set(i,vE(r,t,n,i,e,a))});var m=u?void 0:(l?c?YT:JT:c?mT:pT)(e);return Ow(m||e,function(r,i){m&&(i=r,r=e[i]),zw(o,i,vE(r,t,n,i,e,a))}),o}var Bie=1,Vie=4;function yE(e){return vE(e,Bie|Vie)}var Hie=`__lodash_hash_undefined__`;function Uie(e){return this.__data__.set(e,Hie),this}function Wie(e){return this.__data__.has(e)}function bE(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ST;++t<n;)this.add(e[t])}bE.prototype.add=bE.prototype.push=Uie,bE.prototype.has=Wie;function Gie(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function xE(e,t){return e.has(t)}var Kie=1,qie=2;function SE(e,t,n,r,i,a){var o=n&Kie,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&qie?new bE:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Gie(t,function(e,t){if(!xE(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function Jie(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function CE(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Yie=1,Xie=2,Zie=`[object Boolean]`,Qie=`[object Date]`,$ie=`[object Error]`,eae=`[object Map]`,tae=`[object Number]`,nae=`[object RegExp]`,rae=`[object Set]`,iae=`[object String]`,aae=`[object Symbol]`,oae=`[object ArrayBuffer]`,sae=`[object DataView]`,wE=fC?fC.prototype:void 0,TE=wE?wE.valueOf:void 0;function cae(e,t,n,r,i,a,o){switch(n){case sae:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case oae:return!(e.byteLength!=t.byteLength||!a(new oE(e),new oE(t)));case Zie:case Qie:case tae:return Rw(+e,+t);case $ie:return e.name==t.name&&e.message==t.message;case nae:case iae:return e==t+``;case eae:var s=Jie;case rae:var c=r&Yie;if(s||=CE,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Xie,o.set(e,t);var u=SE(s(e),s(t),r,i,a,o);return o.delete(e),u;case aae:if(TE)return TE.call(e)==TE.call(t)}return!1}var lae=1,uae=Object.prototype.hasOwnProperty;function dae(e,t,n,r,i,a){var o=n&lae,s=JT(e),c=s.length;if(c!=JT(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:uae.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var fae=1,EE=`[object Arguments]`,DE=`[object Array]`,OE=`[object Object]`,kE=Object.prototype.hasOwnProperty;function pae(e,t,n,r,i,a){var o=OC(e),s=OC(t),c=o?DE:aE(e),l=s?DE:aE(t);c=c==EE?OE:c,l=l==EE?OE:l;var u=c==OE,d=l==OE,f=c==l;if(f&&tT(e)){if(!tT(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new LT,o||lT(e)?SE(e,t,n,r,i,a):cae(e,t,c,n,r,i,a);if(!(n&fae)){var p=u&&kE.call(e,`__wrapped__`),m=d&&kE.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new LT,i(h,g,n,r,a)}}return f?(a||=new LT,dae(e,t,n,r,i,a)):!1}function AE(e,t,n,r,i){return e===t?!0:e==null||t==null||!wC(e)&&!wC(t)?e!==e&&t!==t:pae(e,t,n,r,AE,i)}var jE=1,ME=2;function NE(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new LT;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?AE(u,l,jE|ME,r,d):f))return!1}}return!0}function PE(e){return e===e&&!LC(e)}function FE(e){for(var t=pT(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,PE(i)]}return t}function IE(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function LE(e){var t=FE(e);return t.length==1&&t[0][2]?IE(t[0][0],t[0][1]):function(n){return n===e||NE(n,e,t)}}function RE(e,t){return e!=null&&t in Object(e)}function zE(e,t,n){t=ET(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=DT(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&Ww(i)&&Iw(o,i)&&(OC(e)||Zw(e)))}function BE(e,t){return e!=null&&zE(e,t,RE)}var VE=1,HE=2;function UE(e,t){return hT(e)&&PE(t)?IE(DT(e),t):function(n){var r=Y(n,e);return r===void 0&&r===t?BE(n,e):AE(t,r,VE|HE)}}function WE(e){return function(t){return t?.[e]}}function GE(e){return function(t){return OT(t,e)}}function KE(e){return hT(e)?WE(DT(e)):GE(e)}function qE(e){return typeof e==`function`?e:e==null?JC:typeof e==`object`?OC(e)?UE(e[0],e[1]):LE(e):KE(e)}function JE(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var YE=JE();function XE(e,t){return e&&YE(e,t,pT)}function ZE(e,t){return function(n,r){if(n==null)return n;if(!Gw(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var QE=ZE(XE);function $E(e,t,n){(n!==void 0&&!Rw(e[t],n)||n===void 0&&!(t in e))&&Lw(e,t,n)}function eD(e){return wC(e)&&Gw(e)}function tD(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}function nD(e){return Bw(e,mT(e))}function rD(e,t,n,r,i,a,o){var s=tD(e,n),c=tD(t,n),l=o.get(c);if(l){$E(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=OC(c),p=!f&&tT(c),m=!f&&!p&&lT(c);u=c,f||p||m?OC(s)?u=s:eD(s)?u=bw(s):p?(d=!1,u=HT(c,!0)):m?(d=!1,u=uE(c,!0)):u=[]:IT(c)||Zw(c)?(u=s,Zw(s)?u=nD(s):(!LC(s)||$C(s))&&(u=dE(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),$E(e,n,u)}function iD(e,t,n,r,i){e!==t&&YE(t,function(a,o){if(i||=new LT,LC(a))rD(e,t,o,n,iD,r,i);else{var s=r?r(tD(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),$E(e,o,s)}},mT)}function aD(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var oD=200;function sD(e,t,n,r){var i=-1,a=Nw,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=DC(t,rT(n))),r?(a=aD,o=!1):t.length>=oD&&(a=xE,o=!1,t=new bE(t));outer:for(;++i<s;){var u=e[i],d=n==null?u:n(u);if(u=r||u!==0?u:0,o&&d===d){for(var f=l;f--;)if(t[f]===d)continue outer;c.push(u)}else a(t,d,r)||c.push(u)}return c}var cD=Uw(function(e,t){return eD(e)?sD(e,jT(t,1,eD,!0)):[]});function lD(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function uD(e){return typeof e==`function`?e:JC}function dD(e,t){return(OC(e)?Ow:QE)(e,uD(t))}var fD=1/0;function pD(e){return e!=null&&e.length?jT(e,fD):[]}var mD=Object.prototype.hasOwnProperty;function hD(e,t){return e!=null&&mD.call(e,t)}function gD(e,t){return e!=null&&zE(e,t,hD)}var _D=`[object String]`;function vD(e){return typeof e==`string`||!OC(e)&&wC(e)&&CC(e)==_D}function yD(e,t){return DC(t,function(t){return e[t]})}function bD(e){return e==null?[]:yD(e,pT(e))}var xD=Math.max;function SD(e,t,n,r){e=Gw(e)?e:bD(e),n=n&&!r?qC(n):0;var i=e.length;return n<0&&(n=xD(i+n,0)),vD(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Mw(e,t,n)>-1}var CD=Math.min;function wD(e,t,n){for(var r=n?aD:Nw,i=e[0].length,a=e.length,o=a,s=Array(a),c=1/0,l=[];o--;){var u=e[o];o&&t&&(u=DC(u,rT(t))),c=CD(u.length,c),s[o]=!n&&(t||i>=120&&u.length>=120)?new bE(o&&u):void 0}u=e[0];var d=-1,f=s[0];outer:for(;++d<i&&l.length<c;){var p=u[d],m=t?t(p):p;if(p=n||p!==0?p:0,!(f?xE(f,m):r(l,m,n))){for(o=a;--o;){var h=s[o];if(!(h?xE(h,m):r(e[o],m,n)))continue outer}f&&f.push(m),l.push(p)}}return l}function TD(e){return eD(e)?e:[]}var ED=Uw(function(e){var t=DC(e,TD);return t.length&&t[0]===e[0]?wD(t):[]});function DD(e,t){return t.length<2?e:OT(e,gre(t,0,-1))}var OD=`[object Map]`,kD=`[object Set]`,AD=Object.prototype.hasOwnProperty;function jD(e){if(e==null)return!0;if(Gw(e)&&(OC(e)||typeof e==`string`||typeof e.splice==`function`||tT(e)||lT(e)||Zw(e)))return!e.length;var t=aE(e);if(t==OD||t==kD)return!e.size;if(qw(e))return!fT(e).length;for(var n in e)if(AD.call(e,n))return!1;return!0}function MD(e,t){return AE(e,t)}var ND=`[object Number]`;function PD(e){return typeof e==`number`||wC(e)&&CC(e)==ND}function FD(e){return e==null}function ID(e){return e===void 0}var LD=Kw(function(e,t,n){iD(e,t,n)}),RD=Object.prototype.hasOwnProperty;function zD(e,t){t=ET(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=DT(t[n]);if(i===`__proto__`&&!RD.call(e,`__proto__`)||(i===`constructor`||i===`prototype`)&&n<r-1)return!1}var a=DD(e,t);return a==null||delete a[DT(lD(t))]}function BD(e){return IT(e)?void 0:e}var VD=1,HD=2,UD=4,WD=NT(function(e,t){var n={};if(e==null)return n;var r=!1;t=DC(t,function(t){return t=ET(t,e),r||=t.length>1,t}),Bw(e,YT(e),n),r&&(n=vE(n,VD|HD|UD,BD));for(var i=t.length;i--;)zD(n,t[i]);return n});function GD(e,t,n,r){if(!LC(e))return e;t=ET(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=DT(t[i]),l=n;if(c===`__proto__`||c===`constructor`||c===`prototype`)return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=LC(u)?u:Iw(t[i+1])?[]:{})}zw(s,c,l),s=s[c]}return e}function KD(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=OT(e,o);n(s,o)&&GD(a,ET(o,e),s)}return a}function qD(e,t){if(e==null)return{};var n=DC(YT(e),function(e){return[e]});return t=qE(t),KD(e,n,function(e,n){return t(e,n[0])})}function JD(e,t){return KD(e,t,function(t,n){return BE(e,n)})}var YD=NT(function(e,t){return e==null?{}:JD(e,t)});function XD(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function ZD(e,t,n){var r=OC(e)?_re:XD,i=arguments.length<3;return r(e,qE(t,4),n,i,QE)}function QD(e,t,n){return e==null?e:GD(e,t,n)}function $D(e,t,n,r){return r=typeof r==`function`?r:void 0,e==null?e:GD(e,t,n,r)}var eO=9007199254740991,tO=4294967295,nO=Math.min;function rO(e,t){if(e=qC(e),e<1||e>eO)return[];var n=tO,r=nO(e,tO);t=uD(t),e-=tO;for(var i=Jw(r,t);++n<e;)t(n);return i}function iO(e){return OC(e)?DC(e,DT):EC(e)?[e]:bw(wT(TT(e)))}function aO(e,t,n){var r=OC(e),i=r||tT(e)||lT(e);if(t=qE(t,4),n==null){var a=e&&e.constructor;n=i?r?new a:[]:LC(e)&&$C(a)?_w(PT(e)):{}}return(i?Ow:XE)(e,function(e,r,i){return t(n,e,r,i)}),n}var oO=QT&&1/CE(new QT([,-0]))[1]==1/0?function(e){return new QT(e)}:yw,sO=200;function cO(e,t,n){var r=-1,i=Nw,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=aD;else if(a>=sO){var l=t?null:oO(e);if(l)return CE(l);o=!1,i=xE,c=new bE}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}var lO=Uw(function(e){return cO(jT(e,1,eD,!0))});function uO(e){return e&&e.length?cO(e):[]}var dO=0;function fO(e){var t=++dO;return TT(e)+t}function pO(e,t){return e==null||zD(e,t)}var mO=ls()(e=>({tools:{},setToolData:(t,n)=>e(e=>{let r=e.tools[t];if(r){let t=!0;for(let e of Object.keys(n))if(r[e]!==n[e]){t=!1;break}if(t)return e}return gO(e,`tools.${t}`,{...r??{},...n})}),updateOpenaiObject:(t,n,r)=>e(e=>e.tools[t]?.openaiObject?gO(e,`tools.${t}.openaiObject.${n}`,r):e),pushOpenAiLog:(t,n)=>e(e=>{let r=e.tools[t]?.openaiLogs||[];return gO(e,`tools.${t}.openaiLogs`,[...r,{...n,id:crypto.randomUUID()}])}),clearOpenAiLogs:t=>e(e=>e.tools[t]?.openaiLogs?.length?gO(e,`tools.${t}.openaiLogs`,[]):e),setOpenInAppUrl:(t,n)=>e(e=>e.tools[t]?.openInAppUrl===n?e:gO(e,`tools.${t}.openInAppUrl`,n))})),hO=e=>{let{tools:t}=mO();return t[e]},gO=(e,t,n)=>{let r=yE(e);return QD(r,t,n),r};function _O(e,t,n){try{return e(t)}catch(e){return n?dt(25,t,e,n):dt(24,t,e),null}}function vO(e){function t(t){if(t===void 0)return null;let n=``;if(Array.isArray(t)){if(t[0]===void 0)return null;n=t[0]}return typeof t==`string`&&(n=t),_O(e.parse,n)}return{type:`single`,eq:(e,t)=>e===t,...e,parseServerSide:t,withDefault(e){return{...this,defaultValue:e,parseServerSide(n){return t(n)??e}}},withOptions(e){return{...this,...e}}}}var yO=vO({parse:e=>e,serialize:String});vO({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>``+Math.round(e)}),vO({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>``+Math.round(e+1)}),vO({parse:e=>{let t=parseInt(e,16);return t==t?t:null},serialize:e=>{let t=Math.round(e).toString(16);return(t.length&1?`0`:``)+t}}),vO({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String});var bO=vO({parse:e=>e.toLowerCase()===`true`,serialize:String});function xO(e,t){return e.valueOf()===t.valueOf()}vO({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>``+e.valueOf(),eq:xO}),vO({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:xO}),vO({parse:e=>{let t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:xO});var SO=vt(`sync-emitter`,()=>Mt()),CO={};function wO(e,t={}){let n=(0,b.useId)(),r=Ct(),i=wt(),{history:a=r?.history??`replace`,scroll:o=r?.scroll??!1,shallow:s=r?.shallow??!0,throttleMs:c=kt.timeMs,limitUrlUpdates:l=r?.limitUrlUpdates,clearOnDefault:u=r?.clearOnDefault??!0,startTransition:d,urlKeys:f=CO}=t,p=Object.keys(e).join(`,`),m=(0,b.useMemo)(()=>Object.fromEntries(Object.keys(e).map(e=>[e,f[e]??e])),[p,JSON.stringify(f)]),h=St(Object.values(m)),g=h.searchParams,_=(0,b.useRef)({}),v=(0,b.useRef)(null),y=(0,b.useRef)(null),x=(0,b.useMemo)(()=>Object.fromEntries(Object.keys(e).map(t=>[t,e[t].defaultValue??null])),[Object.values(e).map(({defaultValue:e})=>e).join(`,`)]),S=Ut(Object.values(m)),[C,w]=(0,b.useState)(()=>TO(e,f,g,S).state),T=(0,b.useRef)(C),E=Object.values(m).map(e=>`${e}=${g.getAll(e)}`).join(`&`)+JSON.stringify(S),D=()=>{let{state:t,hasChanged:r}=TO(e,f,g,S,_.current,T.current);r&&(ut(1,n,p,t),T.current=t,w(t))},O=Object.keys(_.current).join(`&`)!==Object.values(m).join(`&`),k=y.current===null||y.current===(h.pathname??location.pathname);(O||k&&v.current!==E)&&(v.current=E,D(),O&&(_.current=Object.fromEntries(Object.entries(m).map(([t,n])=>[n,e[t]?.type===`multi`?g.getAll(n):g.get(n)??null])))),(0,b.useEffect)(()=>{y.current=h.pathname??location.pathname,D()},[E,h.pathname]),(0,b.useEffect)(()=>{let t=Object.keys(e).reduce((t,r)=>(t[r]=({state:t,query:i})=>{w(a=>{let{defaultValue:o}=e[r],s=m[r],c=t??o??null,l=a[r]??o??null;return Object.is(l,c)?(ut(2,n,p,s,t,o,T.current),a):(T.current={...T.current,[r]:c},_.current[s]=i,ut(3,n,p,s,t,o,T.current),T.current)})},t),{});for(let r of Object.keys(e)){let e=m[r];ut(4,n,e,p),SO.on(e,t[r])}return()=>{for(let r of Object.keys(e)){let e=m[r];ut(5,n,e,p),SO.off(e,t[r])}}},[p,m]);let A=(0,b.useCallback)((t,r={})=>{let f=Object.fromEntries(Object.keys(e).map(e=>[e,null])),g=typeof t==`function`?t(EO(T.current,x))??f:t??f;ut(6,n,p,g);let _,v=0,y=!1,b=[];for(let[t,n]of Object.entries(g)){let f=e[t],p=m[t];if(!f||n===void 0)continue;(r.clearOnDefault??f.clearOnDefault??u)&&n!==null&&f.defaultValue!==void 0&&(f.eq??((e,t)=>e===t))(n,f.defaultValue)&&(n=null);let g=n===null?null:(f.serialize??String)(n);SO.emit(p,{state:n,query:g});let x={key:p,query:g,options:{history:r.history??f.history??a,shallow:r.shallow??f.shallow??s,scroll:r.scroll??f.scroll??o,startTransition:r.startTransition??f.startTransition??d}},S=r.limitUrlUpdates??f.limitUrlUpdates??l;if(S?.method===`debounce`){let e=S.timeMs??kt.timeMs,t=Ht.push(x,e,h,i);v<e&&(_=t,v=e)}else{let e=S?.timeMs??r.throttleMs??f.throttleMs??c;b.push(Ht.abort(p)),Rt.push(x,e),y=!0}}let S=b.reduce((e,t)=>t(e),y?Rt.flush(h,i):Rt.getPendingPromise(h));return _??S},[p,a,s,o,c,l?.method,l?.timeMs,d,m,h.updateUrl,h.getSearchParamsSnapshot,h.rateLimitFactor,i,x]);return[(0,b.useMemo)(()=>EO(C,x),[C,x]),A]}function TO(e,t,n,r,i,a){let o=!1,s=Object.entries(e).reduce((e,[s,c])=>{let l=t?.[s]??s,u=r[l],d=c.type===`multi`?[]:null,f=u===void 0?(c.type===`multi`?n.getAll(l):n.get(l))??d:u;return i&&a&&Tt(i[l]??d,f)?(e[s]=a[s]??null,e):(o=!0,e[s]=(At(f)?null:_O(c.parse,f,l))??null,i&&(i[l]=f),e)},{});if(!o){let t=Object.keys(e),n=Object.keys(a??{});o=t.length!==n.length||t.some(e=>!n.includes(e))}return{state:s,hasChanged:o}}function EO(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}function DO(e,t={}){let{parse:n,type:r,serialize:i,eq:a,defaultValue:o,...s}=t,[{[e]:c},l]=wO({[e]:{parse:n??(e=>e),type:r,serialize:i,eq:a,defaultValue:o}},s);return[c,(0,b.useCallback)((t,n={})=>l(n=>({[e]:typeof t==`function`?t(n[e]):t}),n),[e,l])]}function OO(){return DO(`tool`,yO)}function kO(){return DO(`evals`,bO.withDefault(!1))}var AO=new He,jO=`skybridge-devtools-oauth`,MO={clientInfo:`${jO}:client-info`,tokens:`${jO}:tokens`,codeVerifier:`${jO}:code-verifier`,state:`${jO}:state`,discovery:`${jO}:discovery`},NO=class{get redirectUrl(){let e=new URL(window.location.origin+window.location.pathname);return e.searchParams.set(`oauth_callback`,`true`),e.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(){let e=localStorage.getItem(MO.clientInfo);return e?JSON.parse(e):void 0}saveClientInformation(e){localStorage.setItem(MO.clientInfo,JSON.stringify(e))}tokens(){let e=localStorage.getItem(MO.tokens);return e?JSON.parse(e):void 0}saveTokens(e){localStorage.setItem(MO.tokens,JSON.stringify(e))}state(){let e=localStorage.getItem(MO.state);if(e)return e;let t=crypto.randomUUID();return localStorage.setItem(MO.state,t),t}expectedState(){return localStorage.getItem(MO.state)??void 0}redirectToAuthorization(e){window.location.href=e.toString()}saveCodeVerifier(e){localStorage.setItem(MO.codeVerifier,e)}codeVerifier(){let e=localStorage.getItem(MO.codeVerifier);if(!e)throw Error(`Missing PKCE code verifier: the sign-in flow was not started in this browser, or its storage was cleared. Retry signing in.`);return e}saveDiscoveryState(e){localStorage.setItem(MO.discovery,JSON.stringify(e))}discoveryState(){let e=localStorage.getItem(MO.discovery);return e?JSON.parse(e):void 0}invalidateCredentials(e){(e===`all`||e===`tokens`)&&localStorage.removeItem(MO.tokens),(e===`all`||e===`client`)&&localStorage.removeItem(MO.clientInfo),(e===`all`||e===`verifier`)&&(localStorage.removeItem(MO.codeVerifier),localStorage.removeItem(MO.state)),(e===`all`||e===`discovery`)&&localStorage.removeItem(MO.discovery)}},PO=new class{client=null;transport=null;async connect(e,t){let n=typeof e==`string`?new URL(e):e;this.transport=new XS(n,{authProvider:t,fetch:(e,t)=>{let r=e instanceof Request?e.url:String(e);if(new URL(r).origin!==n.origin)return fetch(e,t);let i=new Headers(t?.headers);return i.set(`x-forwarded-host`,n.host),i.set(`x-forwarded-proto`,n.protocol.replace(/:$/,``)),fetch(e,{...t,headers:i})}}),this.client=new GS({name:`mcp-client`,version:`1.0.0`},{capabilities:{experimental:{tools:{},resources:{},prompts:{}}}}),await this.client.connect(this.transport)}async listTools(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);try{return(await this.client.listTools()).tools}catch(e){if(e instanceof ay&&e.code===-32601)return[];throw e}}async callTool(e,t){if(!this.client)throw Error(`Client not connected. Call connect() first.`);let{_meta:n,...r}=await this.client.callTool({name:e,arguments:t??{}});return{...r,meta:n}}async listResources(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return(await this.client.listResources()).resources}async readResource(e){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return await this.client.readResource({uri:e})}async listPrompts(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return(await this.client.listPrompts()).prompts}async getPrompt(e,t){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return await this.client.getPrompt({name:e,...t&&{arguments:t}})}getServerInfo(){if(!this.client)throw Error(`Client not connected. Call connect() first.`);return this.client.getServerVersion()}async close(){this.client&&=(await this.client.close(),null),this.transport=null}},FO=null,IO=()=>sC.VITE_MCP_SERVER_URL;function LO(e){let t=e._meta?.securitySchemes;return!!t?.length&&t.every(e=>e?.type!==`noauth`)}function RO(e){return e instanceof gx||e instanceof xv&&e.status===401}async function zO(){let e=IO(),{setStatus:t,setRequiresAuth:n,setHasAuthRequiredTools:r,setIsSignedIn:i,setError:a}=us.getState();t(`connecting`),a(null),await PO.close();let o=!1;try{(await Hx(e))?.authorization_servers?.length&&(o=!0)}catch{}n(o);let s=o?new NO:null,c=!!s?.tokens();FO=s;let l=(e,n)=>{i(!1),r(!1),t(n),n===`error`&&a(e instanceof Error?e.message:`Connection failed`)};try{await PO.connect(e,c&&s?s:void 0)}catch(t){if(!RO(t)||!s){l(t,`error`);return}try{await PO.close(),await PO.connect(e,s)}catch(e){l(e,RO(e)?`unauthenticated`:`error`);return}}let u=null;try{u=await PO.listTools()}catch{}i(!!s?.tokens()),r((u??[]).some(LO)),t(`authenticated`),u?AO.setQueryData([`list-tools`],u):AO.invalidateQueries({queryKey:[`list-tools`]})}async function BO(){let e=IO(),t=FO??new NO;FO=t,t.invalidateCredentials(`all`),await Fx(t,{serverUrl:e})}async function VO(e,t,n){let r=IO(),i=new NO,a=i.expectedState();if(!a||n!==a)throw i.invalidateCredentials(`verifier`),Error(`OAuth callback state mismatch: the response does not match the sign-in this browser started. Retry signing in.`);await Fx(i,{serverUrl:r,authorizationCode:e,iss:t}),i.invalidateCredentials(`verifier`),await zO()}async function HO(){FO?.invalidateCredentials(`all`),FO=null,await PO.close(),us.getState().reset(),AO.invalidateQueries({queryKey:[`list-tools`]})}var UO=()=>{let e=gs();return{...e,view:{mode:e.displayMode},toolInput:{},toolOutput:null,toolResponseMetadata:null,widgetState:null}},WO=()=>{let{data:e}=st({queryKey:[`list-tools`],queryFn:()=>PO.listTools()});return e},GO=()=>{if(us(e=>e.status)===`authenticated`)return PO.getServerInfo()},KO=()=>{let{setToolData:e}=mO();return ct({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,durationMs:null,openaiRef:null,openaiLogs:[],openaiObject:null,openInAppUrl:null});let r=performance.now(),i=await PO.callTool(t,n);nC(i,t);let a=Math.round(performance.now()-r),o=Date.now();return e(t,{input:n??{},response:i,durationMs:a,openaiRef:null,openaiLogs:[{id:crypto.randomUUID(),timestamp:o-a,source:`server`,command:`callTool`,args:{name:t,args:n??{}},type:`default`},{id:crypto.randomUUID(),timestamp:o,source:`server`,command:`callTool response`,args:i,type:`response`}],openaiObject:{...UO(),toolInput:n??{},toolOutput:i.structuredContent,toolResponseMetadata:i.meta??null,widgetState:null},openInAppUrl:null}),i}})},qO=()=>{let[e]=OO();return WO().find(t=>t.name===e)??null},JO=()=>{let e=qO();if(!e)throw Error(`No tool is currently selected`);return e},YO=e=>st({queryKey:[`resource`,e],queryFn:async()=>{if(!e)throw Error(`Resource URI is required`);return await PO.readResource(e)}});function XO(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ZO(e,t){if(e==null)return{};var n,r,i=XO(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function QO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $O(e){if(Array.isArray(e))return QO(e)}function ek(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function tk(e,t){if(e){if(typeof e==`string`)return QO(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?QO(e,t):void 0}}function nk(){throw TypeError(`Invalid attempt to spread non-iterable instance.
79
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rk(e){return $O(e)||ek(e)||tk(e)||nk()}function ik(e){"@babel/helpers - typeof";return ik=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ik(e)}function ak(e,t){if(ik(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ik(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ok(e){var t=ak(e,`string`);return ik(t)==`symbol`?t:t+``}function sk(e,t,n){return(t=ok(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ck(){return ck=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ck.apply(null,arguments)}function lk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?lk(Object(n),!0).forEach(function(t){sk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dk(e){var t=e.length;if(t===0||t===1)return e;if(t===2)return[e[0],e[1],`${e[0]}.${e[1]}`,`${e[1]}.${e[0]}`];if(t===3)return[e[0],e[1],e[2],`${e[0]}.${e[1]}`,`${e[0]}.${e[2]}`,`${e[1]}.${e[0]}`,`${e[1]}.${e[2]}`,`${e[2]}.${e[0]}`,`${e[2]}.${e[1]}`,`${e[0]}.${e[1]}.${e[2]}`,`${e[0]}.${e[2]}.${e[1]}`,`${e[1]}.${e[0]}.${e[2]}`,`${e[1]}.${e[2]}.${e[0]}`,`${e[2]}.${e[0]}.${e[1]}`,`${e[2]}.${e[1]}.${e[0]}`];if(t>=4)return[e[0],e[1],e[2],e[3],`${e[0]}.${e[1]}`,`${e[0]}.${e[2]}`,`${e[0]}.${e[3]}`,`${e[1]}.${e[0]}`,`${e[1]}.${e[2]}`,`${e[1]}.${e[3]}`,`${e[2]}.${e[0]}`,`${e[2]}.${e[1]}`,`${e[2]}.${e[3]}`,`${e[3]}.${e[0]}`,`${e[3]}.${e[1]}`,`${e[3]}.${e[2]}`,`${e[0]}.${e[1]}.${e[2]}`,`${e[0]}.${e[1]}.${e[3]}`,`${e[0]}.${e[2]}.${e[1]}`,`${e[0]}.${e[2]}.${e[3]}`,`${e[0]}.${e[3]}.${e[1]}`,`${e[0]}.${e[3]}.${e[2]}`,`${e[1]}.${e[0]}.${e[2]}`,`${e[1]}.${e[0]}.${e[3]}`,`${e[1]}.${e[2]}.${e[0]}`,`${e[1]}.${e[2]}.${e[3]}`,`${e[1]}.${e[3]}.${e[0]}`,`${e[1]}.${e[3]}.${e[2]}`,`${e[2]}.${e[0]}.${e[1]}`,`${e[2]}.${e[0]}.${e[3]}`,`${e[2]}.${e[1]}.${e[0]}`,`${e[2]}.${e[1]}.${e[3]}`,`${e[2]}.${e[3]}.${e[0]}`,`${e[2]}.${e[3]}.${e[1]}`,`${e[3]}.${e[0]}.${e[1]}`,`${e[3]}.${e[0]}.${e[2]}`,`${e[3]}.${e[1]}.${e[0]}`,`${e[3]}.${e[1]}.${e[2]}`,`${e[3]}.${e[2]}.${e[0]}`,`${e[3]}.${e[2]}.${e[1]}`,`${e[0]}.${e[1]}.${e[2]}.${e[3]}`,`${e[0]}.${e[1]}.${e[3]}.${e[2]}`,`${e[0]}.${e[2]}.${e[1]}.${e[3]}`,`${e[0]}.${e[2]}.${e[3]}.${e[1]}`,`${e[0]}.${e[3]}.${e[1]}.${e[2]}`,`${e[0]}.${e[3]}.${e[2]}.${e[1]}`,`${e[1]}.${e[0]}.${e[2]}.${e[3]}`,`${e[1]}.${e[0]}.${e[3]}.${e[2]}`,`${e[1]}.${e[2]}.${e[0]}.${e[3]}`,`${e[1]}.${e[2]}.${e[3]}.${e[0]}`,`${e[1]}.${e[3]}.${e[0]}.${e[2]}`,`${e[1]}.${e[3]}.${e[2]}.${e[0]}`,`${e[2]}.${e[0]}.${e[1]}.${e[3]}`,`${e[2]}.${e[0]}.${e[3]}.${e[1]}`,`${e[2]}.${e[1]}.${e[0]}.${e[3]}`,`${e[2]}.${e[1]}.${e[3]}.${e[0]}`,`${e[2]}.${e[3]}.${e[0]}.${e[1]}`,`${e[2]}.${e[3]}.${e[1]}.${e[0]}`,`${e[3]}.${e[0]}.${e[1]}.${e[2]}`,`${e[3]}.${e[0]}.${e[2]}.${e[1]}`,`${e[3]}.${e[1]}.${e[0]}.${e[2]}`,`${e[3]}.${e[1]}.${e[2]}.${e[0]}`,`${e[3]}.${e[2]}.${e[0]}.${e[1]}`,`${e[3]}.${e[2]}.${e[1]}.${e[0]}`]}var fk={};function pk(e){if(e.length===0||e.length===1)return e;var t=e.join(`.`);return fk[t]||(fk[t]=dk(e)),fk[t]}function mk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return pk(e.filter(function(e){return e!==`token`})).reduce(function(e,t){return uk(uk({},e),n[t])},t)}function hk(e){return e.join(` `)}function gk(e,t){var n=0;return function(r){return n+=1,r.map(function(r,i){return _k({node:r,stylesheet:e,useInlineStyles:t,key:`code-segment-${n}-${i}`})})}}function _k(e){var t=e.node,n=e.stylesheet,r=e.style,i=r===void 0?{}:r,a=e.useInlineStyles,o=e.key,s=t.properties,c=t.type,l=t.tagName,u=t.value;if(c===`text`)return u;if(l){var d=gk(n,a),f;if(!a)f=uk(uk({},s),{},{className:hk(s.className)});else{var p=Object.keys(n).reduce(function(e,t){return t.split(`.`).forEach(function(t){e.includes(t)||e.push(t)}),e},[]),m=s.className&&s.className.includes(`token`)?[`token`]:[],h=s.className&&m.concat(s.className.filter(function(e){return!p.includes(e)}));f=uk(uk({},s),{},{className:hk(h)||void 0,style:mk(s.className,Object.assign({},s.style,i),n)})}var g=d(t.children);return b.createElement(l,ck({key:o},f),g)}}var vk=(function(e,t){return e.listLanguages().indexOf(t)!==-1}),yk=[`language`,`children`,`style`,`customStyle`,`codeTagProps`,`useInlineStyles`,`showLineNumbers`,`showInlineLineNumbers`,`startingLineNumber`,`lineNumberContainerStyle`,`lineNumberStyle`,`wrapLines`,`wrapLongLines`,`lineProps`,`renderer`,`PreTag`,`CodeTag`,`code`,`astGenerator`];function bk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?bk(Object(n),!0).forEach(function(t){sk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Sk=/\n/g;function Ck(e){return e.match(Sk)}function wk(e){var t=e.lines,n=e.startingLineNumber,r=e.style;return t.map(function(e,t){var i=t+n;return b.createElement(`span`,{key:`line-${t}`,className:`react-syntax-highlighter-line-number`,style:typeof r==`function`?r(i):r},`${i}
80
+ `)})}function Tk(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,i=r===void 0?{float:`left`,paddingRight:`10px`}:r,a=e.numberStyle,o=a===void 0?{}:a,s=e.startingLineNumber;return b.createElement(`code`,{style:Object.assign({},n,i)},wk({lines:t.replace(/\n$/,``).split(`
81
+ `),style:o,startingLineNumber:s}))}function Ek(e){return`${e.toString().length}.25em`}function Dk(e,t){return{type:`element`,tagName:`span`,properties:{key:`line-number--${e}`,className:[`comment`,`linenumber`,`react-syntax-highlighter-line-number`],style:t},children:[{type:`text`,value:e}]}}function Ok(e,t,n){var r={display:`inline-block`,minWidth:Ek(n),paddingRight:`1em`,textAlign:`right`,userSelect:`none`},i=typeof e==`function`?e(t):e;return xk(xk({},r),i)}function kk(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,a=e.showInlineLineNumbers,o=e.lineProps,s=o===void 0?{}:o,c=e.className,l=c===void 0?[]:c,u=e.showLineNumbers,d=e.wrapLongLines,f=e.wrapLines,p=f!==void 0&&f?xk({},typeof s==`function`?s(n):s):{};if(p.className=p.className?[].concat(rk(p.className.trim().split(/\s+/)),rk(l)):l,n&&a){var m=Ok(r,n,i);t.unshift(Dk(n,m))}return d&u&&(p.style=xk({display:`flex`},p.style)),{type:`element`,tagName:`span`,properties:p,children:t}}function Ak(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];e.length===void 0&&(e=[e]);for(var r=0;r<e.length;r++){var i=e[r];if(i.type===`text`)n.push(kk({children:[i],className:rk(new Set(t))}));else if(i.children){var a=t.concat(i.properties?.className||[]);Ak(i.children,a).forEach(function(e){return n.push(e)})}}return n}function jk(e,t,n,r,i,a,o,s,c){var l,u=Ak(e.value),d=[],f=-1,p=0;function m(e,a){return kk({children:e,lineNumber:a,lineNumberStyle:s,largestLineNumber:o,showInlineLineNumbers:i,lineProps:n,className:arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],showLineNumbers:r,wrapLongLines:c,wrapLines:t})}function h(e,t){if(r&&t&&i){var n=Ok(s,t,o);e.unshift(Dk(t,n))}return e}function g(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return t||r.length>0?m(e,n,r):h(e,n)}for(var _=function(){var e=u[p],t=e.children[0].value;if(Ck(t)){var n=t.split(`
82
+ `);n.forEach(function(t,i){var o=r&&d.length+a,s={type:`text`,value:`${t}
83
+ `};if(i===0){var c=g(u.slice(f+1,p).concat(kk({children:[s],className:e.properties.className})),o);d.push(c)}else if(i===n.length-1){var l=u[p+1]&&u[p+1].children&&u[p+1].children[0],m={type:`text`,value:`${t}`};if(l){var h=kk({children:[m],className:e.properties.className});u.splice(p+1,0,h)}else{var _=g([m],o,e.properties.className);d.push(_)}}else{var v=g([s],o,e.properties.className);d.push(v)}}),f=p}p++};p<u.length;)_();if(f!==u.length-1){var v=u.slice(f+1,u.length);if(v&&v.length){var y=g(v,r&&d.length+a);d.push(y)}}return t?d:(l=[]).concat.apply(l,d)}function Mk(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return _k({node:e,stylesheet:n,useInlineStyles:r,key:`code-segment-${t}`})})}function Nk(e){return e&&e.highlightAuto!==void 0}function Pk(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(Nk(t)){var a=vk(t,n);return n===`text`?{value:i,language:`text`}:a?t.highlight(n,r):t.highlightAuto(r)}try{return n&&n!==`text`?{value:t.highlight(r,n)}:{value:i}}catch{return{value:i}}}function Fk(e,t){return function(n){var r=n.language,i=n.children,a=n.style,o=a===void 0?t:a,s=n.customStyle,c=s===void 0?{}:s,l=n.codeTagProps,u=l===void 0?{className:r?`language-${r}`:void 0,style:xk(xk({},o[`code[class*="language-"]`]),o[`code[class*="language-${r}"]`])}:l,d=n.useInlineStyles,f=d===void 0||d,p=n.showLineNumbers,m=p!==void 0&&p,h=n.showInlineLineNumbers,g=h===void 0||h,_=n.startingLineNumber,v=_===void 0?1:_,y=n.lineNumberContainerStyle,x=n.lineNumberStyle,S=x===void 0?{}:x,C=n.wrapLines,w=n.wrapLongLines,T=w!==void 0&&w,E=n.lineProps,D=E===void 0?{}:E,O=n.renderer,k=n.PreTag,A=k===void 0?`pre`:k,j=n.CodeTag,M=j===void 0?`code`:j,N=n.code,P=N===void 0?(Array.isArray(i)?i[0]:i)||``:N,F=n.astGenerator,I=ZO(n,yk);F||=e;var L=m?b.createElement(Tk,{containerStyle:y,codeStyle:u.style||{},numberStyle:S,startingLineNumber:v,codeString:P}):null,ee=o.hljs||o[`pre[class*="language-"]`]||{backgroundColor:`#fff`},te=Nk(F)?`hljs`:`prismjs`,ne=f?Object.assign({},I,{style:Object.assign({},ee,c)}):Object.assign({},I,{className:I.className?`${te} ${I.className}`:te,style:Object.assign({},c)});if(T?u.style=xk({whiteSpace:`pre-wrap`},u.style):u.style=xk({whiteSpace:`pre`},u.style),!F)return b.createElement(A,ne,L,b.createElement(M,u,P));(C===void 0&&O||T)&&(C=!0),O||=Mk;var R=[{type:`text`,value:P}],z=Pk({astGenerator:F,language:r,code:P,defaultCodeValue:R});z.language===null&&(z.value=R);var B=v+(P.match(/\n/g)?.length??0),re=jk(z,C,D,m,g,v,B,S,T);return b.createElement(A,ne,b.createElement(M,u,!g&&L,O({rows:re,stylesheet:o,useInlineStyles:f})))}}var Ik=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Ik.prototype.normal={},Ik.prototype.property={},Ik.prototype.space=void 0;function Lk(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Ik(n,r,t)}function Rk(e){return e.toLowerCase()}var zk=class{constructor(e,t){this.attribute=t,this.property=e}};zk.prototype.attribute=``,zk.prototype.booleanish=!1,zk.prototype.boolean=!1,zk.prototype.commaOrSpaceSeparated=!1,zk.prototype.commaSeparated=!1,zk.prototype.defined=!1,zk.prototype.mustUseProperty=!1,zk.prototype.number=!1,zk.prototype.overloadedBoolean=!1,zk.prototype.property=``,zk.prototype.spaceSeparated=!1,zk.prototype.space=void 0;var Bk=c({boolean:()=>Hk,booleanish:()=>Uk,commaOrSpaceSeparated:()=>qk,commaSeparated:()=>Kk,number:()=>X,overloadedBoolean:()=>Wk,spaceSeparated:()=>Gk}),Vk=0,Hk=Jk(),Uk=Jk(),Wk=Jk(),X=Jk(),Gk=Jk(),Kk=Jk(),qk=Jk();function Jk(){return 2**++Vk}var Yk=Object.keys(Bk),Xk=class extends zk{constructor(e,t,n,r){let i=-1;if(super(e,t),Zk(this,`space`,r),typeof n==`number`)for(;++i<Yk.length;){let e=Yk[i];Zk(this,Yk[i],(n&Bk[e])===Bk[e])}}};Xk.prototype.defined=!0;function Zk(e,t,n){n&&(e[t]=n)}function Qk(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Xk(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Rk(r)]=r,n[Rk(a.attribute)]=r}return new Ik(t,n,e.space)}var $k=Qk({properties:{ariaActiveDescendant:null,ariaAtomic:Uk,ariaAutoComplete:null,ariaBusy:Uk,ariaChecked:Uk,ariaColCount:X,ariaColIndex:X,ariaColSpan:X,ariaControls:Gk,ariaCurrent:null,ariaDescribedBy:Gk,ariaDetails:null,ariaDisabled:Uk,ariaDropEffect:Gk,ariaErrorMessage:null,ariaExpanded:Uk,ariaFlowTo:Gk,ariaGrabbed:Uk,ariaHasPopup:null,ariaHidden:Uk,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Gk,ariaLevel:X,ariaLive:null,ariaModal:Uk,ariaMultiLine:Uk,ariaMultiSelectable:Uk,ariaOrientation:null,ariaOwns:Gk,ariaPlaceholder:null,ariaPosInSet:X,ariaPressed:Uk,ariaReadOnly:Uk,ariaRelevant:null,ariaRequired:Uk,ariaRoleDescription:Gk,ariaRowCount:X,ariaRowIndex:X,ariaRowSpan:X,ariaSelected:Uk,ariaSetSize:X,ariaSort:null,ariaValueMax:X,ariaValueMin:X,ariaValueNow:X,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function eA(e,t){return t in e?e[t]:t}function tA(e,t){return eA(e,t.toLowerCase())}var nA=Qk({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Kk,acceptCharset:Gk,accessKey:Gk,action:null,allow:null,allowFullScreen:Hk,allowPaymentRequest:Hk,allowUserMedia:Hk,alt:null,as:null,async:Hk,autoCapitalize:null,autoComplete:Gk,autoFocus:Hk,autoPlay:Hk,blocking:Gk,capture:null,charSet:null,checked:Hk,cite:null,className:Gk,cols:X,colSpan:null,content:null,contentEditable:Uk,controls:Hk,controlsList:Gk,coords:X|Kk,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Hk,defer:Hk,dir:null,dirName:null,disabled:Hk,download:Wk,draggable:Uk,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Hk,formTarget:null,headers:Gk,height:X,hidden:Wk,high:X,href:null,hrefLang:null,htmlFor:Gk,httpEquiv:Gk,id:null,imageSizes:null,imageSrcSet:null,inert:Hk,inputMode:null,integrity:null,is:null,isMap:Hk,itemId:null,itemProp:Gk,itemRef:Gk,itemScope:Hk,itemType:Gk,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Hk,low:X,manifest:null,max:null,maxLength:X,media:null,method:null,min:null,minLength:X,multiple:Hk,muted:Hk,name:null,nonce:null,noModule:Hk,noValidate:Hk,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Hk,optimum:X,pattern:null,ping:Gk,placeholder:null,playsInline:Hk,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Hk,referrerPolicy:null,rel:Gk,required:Hk,reversed:Hk,rows:X,rowSpan:X,sandbox:Gk,scope:null,scoped:Hk,seamless:Hk,selected:Hk,shadowRootClonable:Hk,shadowRootDelegatesFocus:Hk,shadowRootMode:null,shape:null,size:X,sizes:null,slot:null,span:X,spellCheck:Uk,src:null,srcDoc:null,srcLang:null,srcSet:null,start:X,step:null,style:null,tabIndex:X,target:null,title:null,translate:null,type:null,typeMustMatch:Hk,useMap:null,value:Uk,width:X,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Gk,axis:null,background:null,bgColor:null,border:X,borderColor:null,bottomMargin:X,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Hk,declare:Hk,event:null,face:null,frame:null,frameBorder:null,hSpace:X,leftMargin:X,link:null,longDesc:null,lowSrc:null,marginHeight:X,marginWidth:X,noResize:Hk,noHref:Hk,noShade:Hk,noWrap:Hk,object:null,profile:null,prompt:null,rev:null,rightMargin:X,rules:null,scheme:null,scrolling:Uk,standby:null,summary:null,text:null,topMargin:X,valueType:null,version:null,vAlign:null,vLink:null,vSpace:X,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Hk,disableRemotePlayback:Hk,prefix:null,property:null,results:X,security:null,unselectable:null},space:`html`,transform:tA}),rA=Qk({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,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`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,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`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,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`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:qk,accentHeight:X,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:X,amplitude:X,arabicForm:null,ascent:X,attributeName:null,attributeType:null,azimuth:X,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:X,by:null,calcMode:null,capHeight:X,className:Gk,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:X,diffuseConstant:X,direction:null,display:null,dur:null,divisor:X,dominantBaseline:null,download:Hk,dx:null,dy:null,edgeMode:null,editable:null,elevation:X,enableBackground:null,end:null,event:null,exponent:X,externalResourcesRequired:null,fill:null,fillOpacity:X,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Kk,g2:Kk,glyphName:Kk,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:X,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:X,horizOriginX:X,horizOriginY:X,id:null,ideographic:X,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:X,k:X,k1:X,k2:X,k3:X,k4:X,kernelMatrix:qk,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:X,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:X,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:X,overlineThickness:X,paintOrder:null,panose1:null,path:null,pathLength:X,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Gk,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:X,pointsAtY:X,pointsAtZ:X,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qk,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qk,rev:qk,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qk,requiredFeatures:qk,requiredFonts:qk,requiredFormats:qk,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:X,specularExponent:X,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:X,strikethroughThickness:X,string:null,stroke:null,strokeDashArray:qk,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:X,strokeOpacity:X,strokeWidth:null,style:null,surfaceScale:X,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qk,tabIndex:X,tableValues:null,target:null,targetX:X,targetY:X,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qk,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:X,underlineThickness:X,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:X,values:null,vAlphabetic:X,vMathematical:X,vectorEffect:null,vHanging:X,vIdeographic:X,version:null,vertAdvY:X,vertOriginX:X,vertOriginY:X,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:X,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:eA}),iA=Qk({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),aA=Qk({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:tA}),oA=Qk({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),sA=/[A-Z]/g,cA=/-[a-z]/g,lA=/^data[-\w.:]+$/i;function uA(e,t){let n=Rk(t),r=t,i=zk;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&lA.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(cA,fA);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!cA.test(e)){let n=e.replace(sA,dA);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Xk}return new i(r,t)}function dA(e){return`-`+e.toLowerCase()}function fA(e){return e.charAt(1).toUpperCase()}var pA=Lk([$k,nA,iA,aA,oA],`html`),mA=Lk([$k,rA,iA,aA,oA],`svg`);function hA(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}var gA=/[#.]/g;function _A(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){gA.lastIndex=i;let e=gA.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function vA(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function yA(e,t,n){let r=n?TA(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=_A(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,bA(i))a.unshift(i);else for(let[t,n]of Object.entries(i))xA(e,o.properties,t,n)}for(let e of a)SA(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function bA(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function xA(e,t,n,r){let i=uA(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?vA(r):i.commaSeparated?hA(r):i.commaOrSpaceSeparated?vA(hA(r).join(` `)):CA(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?wA(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(CA(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function SA(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)SA(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?SA(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function CA(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||Rk(n)===Rk(t)))return!0}return n}function wA(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function TA(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var EA=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),DA=yA(pA,`div`);yA(mA,`g`,EA);var OA=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),kA={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function AA(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function jA(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function MA(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function NA(e){return MA(e)||AA(e)}var PA=document.createElement(`i`);function FA(e){let t=`&`+e+`;`;PA.innerHTML=t;let n=PA.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}var IA=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function LA(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?NA:u===`decimal`?AA:jA;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&OA.includes(y)&&(_=y,v=FA(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`&&FA(y);e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1))if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):NA(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(RA(e))h(7,S),C=`�`;else if(e in kA)h(6,S),C=kA[e];else{let t=``;zA(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,IA[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function RA(e){return e>=55296&&e<=57343||e>1114111}function zA(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}var BA=0,VA={},HA={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++BA}),e.__id},clone:function e(t,n){n||={};var r,i;switch(HA.util.type(t)){case`Object`:if(i=HA.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case`Array`:return i=HA.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}}},languages:{plain:VA,plaintext:VA,text:VA,txt:VA,extend:function(e,t){var n=HA.util.clone(HA.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r||=HA.languages;var i=r[e],a={};for(var o in i)if(i.hasOwnProperty(o)){if(o==t)for(var s in n)n.hasOwnProperty(s)&&(a[s]=n[s]);n.hasOwnProperty(o)||(a[o]=i[o])}var c=r[e];return r[e]=a,HA.languages.DFS(HA.languages,function(t,n){n===c&&t!=e&&(this[t]=a)}),a},DFS:function e(t,n,r,i){i||={};var a=HA.util.objId;for(var o in t)if(t.hasOwnProperty(o)){n.call(t,o,t[o],r||o);var s=t[o],c=HA.util.type(s);c===`Object`&&!i[a(s)]?(i[a(s)]=!0,e(s,n,null,i)):c===`Array`&&!i[a(s)]&&(i[a(s)]=!0,e(s,n,o,i))}}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(HA.hooks.run(`before-tokenize`,r),!r.grammar)throw Error(`The language "`+r.language+`" has no grammar.`);return r.tokens=HA.tokenize(r.code,r.grammar),HA.hooks.run(`after-tokenize`,r),UA.stringify(HA.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new KA;return qA(i,i.head,e),GA(e,i,t,i.head,0),YA(i)},hooks:{all:{},add:function(e,t){var n=HA.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=HA.hooks.all[e];if(!(!n||!n.length))for(var r=0,i;i=n[r++];)i(t)}},Token:UA};function UA(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}function WA(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function GA(e,t,n,r,i,a){for(var o in n)if(!(!n.hasOwnProperty(o)||!n[o])){var s=n[o];s=Array.isArray(s)?s:[s];for(var c=0;c<s.length;++c){if(a&&a.cause==o+`,`+c)return;var l=s[c],u=l.inside,d=!!l.lookbehind,f=!!l.greedy,p=l.alias;if(f&&!l.pattern.global){var m=l.pattern.toString().match(/[imsuy]*$/)[0];l.pattern=RegExp(l.pattern.source,m+`g`)}for(var h=l.pattern||l,g=r.next,_=i;g!==t.tail&&!(a&&_>=a.reach);_+=g.value.length,g=g.next){var v=g.value;if(t.length>e.length)return;if(!(v instanceof UA)){var y=1,b;if(f){if(b=WA(h,_,e,d),!b||b.index>=e.length)break;var x=b.index,S=b.index+b[0].length,C=_;for(C+=g.value.length;x>=C;)g=g.next,C+=g.value.length;if(C-=g.value.length,_=C,g.value instanceof UA)continue;for(var w=g;w!==t.tail&&(C<S||typeof w.value==`string`);w=w.next)y++,C+=w.value.length;y--,v=e.slice(_,C),b.index-=_}else if(b=WA(h,0,v,d),!b)continue;var x=b.index,T=b[0],E=v.slice(0,x),D=v.slice(x+T.length),O=_+v.length;a&&O>a.reach&&(a.reach=O);var k=g.prev;E&&(k=qA(t,k,E),_+=E.length),JA(t,k,y);var A=new UA(o,u?HA.tokenize(T,u):T,p,T);if(g=qA(t,k,A),D&&qA(t,g,D),y>1){var j={cause:o+`,`+c,reach:O};GA(e,t,n,g.prev,_,j),a&&j.reach>a.reach&&(a.reach=j.reach)}}}}}}function KA(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function qA(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function JA(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function YA(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}var XA=HA;function ZA(){}ZA.prototype=XA;var QA=new ZA;QA.highlight=$A,QA.register=ej,QA.alias=tj,QA.registered=nj,QA.listLanguages=rj,QA.util.encode=aj,QA.Token.stringify=ij;function $A(e,t){if(typeof e!=`string`)throw TypeError("Expected `string` for `value`, got `"+e+"`");let n,r;if(t&&typeof t==`object`)n=t;else{if(r=t,typeof r!=`string`)throw TypeError("Expected `string` for `name`, got `"+r+"`");if(Object.hasOwn(QA.languages,r))n=QA.languages[r];else throw Error("Unknown language: `"+r+"` is not registered")}return{type:`root`,children:XA.highlight.call(QA,e,n,r)}}function ej(e){if(typeof e!=`function`||!e.displayName)throw Error("Expected `function` for `syntax`, got `"+e+"`");Object.hasOwn(QA.languages,e.displayName)||e(QA)}function tj(e,t){let n=QA.languages,r={};typeof e==`string`?t&&(r[e]=t):r=e;let i;for(i in r)if(Object.hasOwn(r,i)){let e=r[i],t=typeof e==`string`?[e]:e,a=-1;for(;++a<t.length;)n[t[a]]=n[i]}}function nj(e){if(typeof e!=`string`)throw TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Object.hasOwn(QA.languages,e)}function rj(){let e=QA.languages,t=[],n;for(n in e)Object.hasOwn(e,n)&&typeof e[n]==`object`&&t.push(n);return t}function ij(e,t){if(typeof e==`string`)return{type:`text`,value:e};if(Array.isArray(e)){let n=[],r=-1;for(;++r<e.length;)e[r]!==null&&e[r]!==void 0&&e[r]!==``&&n.push(ij(e[r],t));return n}let n={attributes:{},classes:[`token`,e.type],content:ij(e.content,t),language:t,tag:`span`,type:e.type};return e.alias&&n.classes.push(...typeof e.alias==`string`?[e.alias]:e.alias),QA.hooks.run(`wrap`,n),DA(n.tag+`.`+n.classes.join(`.`),oj(n.attributes),n.content)}function aj(e){return e}function oj(e){let t;for(t in e)Object.hasOwn(e,t)&&(e[t]=LA(e[t]));return e}var sj=Fk(QA,{});sj.registerLanguage=function(e,t){return QA.register(t)},sj.alias=function(e,t){return QA.alias(e,t)},cj.displayName=`clike`,cj.aliases=[];function cj(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}lj.displayName=`javascript`,lj.aliases=[`js`];function lj(e){e.register(cj),e.languages.javascript=e.languages.extend(`clike`,{"class-name":[e.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),e.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),e.languages.markup&&(e.languages.markup.tag.addInlined(`script`,`javascript`),e.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),e.languages.js=e.languages.javascript}uj.displayName=`json`,uj.aliases=[`webmanifest`];function uj(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:`keyword`}},e.languages.webmanifest=e.languages.json}dj.displayName=`typescript`,dj.aliases=[`ts`];function dj(e){e.register(lj),(function(e){e.languages.typescript=e.languages.extend(`javascript`,{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript[`literal-property`];var t=e.languages.extend(`typescript`,{});delete t[`class-name`],e.languages.typescript[`class-name`].inside=t,e.languages.insertBefore(`typescript`,`function`,{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:`operator`},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:`class-name`,inside:t}}}}),e.languages.ts=e.languages.typescript})(e)}var fj=dj;function pj(...e){return jr(nn(e))}function mj(e){let t=new DOMParser().parseFromString(e,`text/html`),n=t.querySelector(`script[type="module"]#dev-view-entry`);if(!n)throw Error(`dev-view-entry script not found`);return n.textContent=`
84
+
85
+ const waitForOpenAI = () => new Promise((resolve, reject) => {
86
+ if (typeof window === "undefined") { reject(new Error("window is not available")); return; }
87
+ if ("openai" in window && window.openai != null) { resolve(); return; }
88
+ Object.defineProperty(window, "openai", {
89
+ configurable: true,
90
+ enumerable: true,
91
+ get() { return undefined; },
92
+ set(value) {
93
+ Object.defineProperty(window, "openai", {
94
+ configurable: true,
95
+ enumerable: true,
96
+ writable: true,
97
+ value,
98
+ });
99
+ resolve();
100
+ },
101
+ });
102
+ });
103
+
104
+ await waitForOpenAI();
105
+ ${n.textContent}
106
+ `,t.head.innerHTML+t.body.innerHTML}var hj=e=>typeof e==`string`?e:void 0,gj=(e,t)=>{let n=e.contentDocument;if(!n?.body)return 0;let r=t?.parentElement?.clientHeight??0,i=r>0?r:1/0,a=n.getElementById(`root`),o=n.defaultView;if(!a||!o)return 0;let s=a.getBoundingClientRect().bottom+o.scrollY,c=_j(o,n.body)+_j(o,n.documentElement);return Math.min(s+c,i)},_j=(e,t)=>{let{paddingBottom:n,borderBottomWidth:r,marginBottom:i}=e.getComputedStyle(t);return parseFloat(n)+parseFloat(r)+parseFloat(i)};function vj(e){if(e<1024)return`${e}b`;let t=e/1024;if(t<1024)return`${t<10?t.toFixed(1):Math.round(t)}kb`;let n=t/1024;return`${n<10?n.toFixed(1):Math.round(n)}mb`}var yj={width:390,height:844},bj=1500;function xj(){let[e,t]=(0,b.useState)(!1),n=(0,b.useRef)(null);return(0,b.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),{copied:e,copy:(0,b.useCallback)(async e=>{try{await navigator.clipboard.writeText(e),t(!0),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>t(!1),bj)}catch(e){console.error(`Clipboard write failed`,e)}},[])}}function Sj({value:e,label:t,className:n,stopPropagation:r}){let{copied:i,copy:a}=xj();return(0,H.jsx)(`button`,{type:`button`,"aria-label":t,onClick:t=>{r&&t.stopPropagation(),a(e)},className:pj(`text-quaternary-foreground hover:text-foreground`,n),children:i?(0,H.jsx)(Kr,{className:`size-3.5`}):(0,H.jsx)(Zr,{className:`size-3.5`})})}var Cj={'code[class*="language-"]':{background:`hsl(230, 1%, 98%)`,color:`hsl(230, 8%, 24%)`,fontFamily:`"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace`,direction:`ltr`,textAlign:`left`,whiteSpace:`pre`,wordSpacing:`normal`,wordBreak:`normal`,lineHeight:`1.5`,MozTabSize:`2`,OTabSize:`2`,tabSize:`2`,WebkitHyphens:`none`,MozHyphens:`none`,msHyphens:`none`,hyphens:`none`},'pre[class*="language-"]':{background:`hsl(230, 1%, 98%)`,color:`hsl(230, 8%, 24%)`,fontFamily:`"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace`,direction:`ltr`,textAlign:`left`,whiteSpace:`pre`,wordSpacing:`normal`,wordBreak:`normal`,lineHeight:`1.5`,MozTabSize:`2`,OTabSize:`2`,tabSize:`2`,WebkitHyphens:`none`,MozHyphens:`none`,msHyphens:`none`,hyphens:`none`,padding:`1em`,margin:`0.5em 0`,overflow:`auto`,borderRadius:`0.3em`},'code[class*="language-"]::-moz-selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},'code[class*="language-"] *::-moz-selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},'pre[class*="language-"] *::-moz-selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},'code[class*="language-"]::selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},'code[class*="language-"] *::selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},'pre[class*="language-"] *::selection':{background:`hsl(230, 1%, 90%)`,color:`inherit`},':not(pre) > code[class*="language-"]':{padding:`0.2em 0.3em`,borderRadius:`0.3em`,whiteSpace:`normal`},comment:{color:`hsl(230, 4%, 64%)`,fontStyle:`italic`},prolog:{color:`hsl(230, 4%, 64%)`},cdata:{color:`hsl(230, 4%, 64%)`},doctype:{color:`hsl(230, 8%, 24%)`},punctuation:{color:`hsl(230, 8%, 24%)`},entity:{color:`hsl(230, 8%, 24%)`,cursor:`help`},"attr-name":{color:`hsl(35, 99%, 36%)`},"class-name":{color:`hsl(35, 99%, 36%)`},boolean:{color:`hsl(35, 99%, 36%)`},constant:{color:`hsl(35, 99%, 36%)`},number:{color:`hsl(35, 99%, 36%)`},atrule:{color:`hsl(35, 99%, 36%)`},keyword:{color:`hsl(301, 63%, 40%)`},property:{color:`hsl(5, 74%, 59%)`},tag:{color:`hsl(5, 74%, 59%)`},symbol:{color:`hsl(5, 74%, 59%)`},deleted:{color:`hsl(5, 74%, 59%)`},important:{color:`hsl(5, 74%, 59%)`},selector:{color:`hsl(119, 34%, 47%)`},string:{color:`hsl(119, 34%, 47%)`},char:{color:`hsl(119, 34%, 47%)`},builtin:{color:`hsl(119, 34%, 47%)`},inserted:{color:`hsl(119, 34%, 47%)`},regex:{color:`hsl(119, 34%, 47%)`},"attr-value":{color:`hsl(119, 34%, 47%)`},"attr-value > .token.punctuation":{color:`hsl(119, 34%, 47%)`},variable:{color:`hsl(221, 87%, 60%)`},operator:{color:`hsl(221, 87%, 60%)`},function:{color:`hsl(221, 87%, 60%)`},url:{color:`hsl(198, 99%, 37%)`},"attr-value > .token.punctuation.attr-equals":{color:`hsl(230, 8%, 24%)`},"special-attr > .token.attr-value > .token.value.css":{color:`hsl(230, 8%, 24%)`},".language-css .token.selector":{color:`hsl(5, 74%, 59%)`},".language-css .token.property":{color:`hsl(230, 8%, 24%)`},".language-css .token.function":{color:`hsl(198, 99%, 37%)`},".language-css .token.url > .token.function":{color:`hsl(198, 99%, 37%)`},".language-css .token.url > .token.string.url":{color:`hsl(119, 34%, 47%)`},".language-css .token.important":{color:`hsl(301, 63%, 40%)`},".language-css .token.atrule .token.rule":{color:`hsl(301, 63%, 40%)`},".language-javascript .token.operator":{color:`hsl(301, 63%, 40%)`},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:`hsl(344, 84%, 43%)`},".language-json .token.operator":{color:`hsl(230, 8%, 24%)`},".language-json .token.null.keyword":{color:`hsl(35, 99%, 36%)`},".language-markdown .token.url":{color:`hsl(230, 8%, 24%)`},".language-markdown .token.url > .token.operator":{color:`hsl(230, 8%, 24%)`},".language-markdown .token.url-reference.url > .token.string":{color:`hsl(230, 8%, 24%)`},".language-markdown .token.url > .token.content":{color:`hsl(221, 87%, 60%)`},".language-markdown .token.url > .token.url":{color:`hsl(198, 99%, 37%)`},".language-markdown .token.url-reference.url":{color:`hsl(198, 99%, 37%)`},".language-markdown .token.blockquote.punctuation":{color:`hsl(230, 4%, 64%)`,fontStyle:`italic`},".language-markdown .token.hr.punctuation":{color:`hsl(230, 4%, 64%)`,fontStyle:`italic`},".language-markdown .token.code-snippet":{color:`hsl(119, 34%, 47%)`},".language-markdown .token.bold .token.content":{color:`hsl(35, 99%, 36%)`},".language-markdown .token.italic .token.content":{color:`hsl(301, 63%, 40%)`},".language-markdown .token.strike .token.content":{color:`hsl(5, 74%, 59%)`},".language-markdown .token.strike .token.punctuation":{color:`hsl(5, 74%, 59%)`},".language-markdown .token.list.punctuation":{color:`hsl(5, 74%, 59%)`},".language-markdown .token.title.important > .token.punctuation":{color:`hsl(5, 74%, 59%)`},bold:{fontWeight:`bold`},italic:{fontStyle:`italic`},namespace:{Opacity:`0.8`},"token.tab:not(:empty):before":{color:`hsla(230, 8%, 24%, 0.2)`},"token.cr:before":{color:`hsla(230, 8%, 24%, 0.2)`},"token.lf:before":{color:`hsla(230, 8%, 24%, 0.2)`},"token.space:before":{color:`hsla(230, 8%, 24%, 0.2)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:`0.4em`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:`hsl(230, 1%, 90%)`,color:`hsl(230, 6%, 44%)`,padding:`0.1em 0.4em`,borderRadius:`0.3em`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:`hsl(230, 1%, 90%)`,color:`hsl(230, 6%, 44%)`,padding:`0.1em 0.4em`,borderRadius:`0.3em`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:`hsl(230, 1%, 90%)`,color:`hsl(230, 6%, 44%)`,padding:`0.1em 0.4em`,borderRadius:`0.3em`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:`hsl(230, 1%, 78%)`,color:`hsl(230, 8%, 24%)`},".line-highlight.line-highlight":{background:`hsla(230, 8%, 24%, 0.05)`},".line-highlight.line-highlight:before":{background:`hsl(230, 1%, 90%)`,color:`hsl(230, 8%, 24%)`,padding:`0.1em 0.6em`,borderRadius:`0.3em`,boxShadow:`0 2px 0 0 rgba(0, 0, 0, 0.2)`},".line-highlight.line-highlight[data-end]:after":{background:`hsl(230, 1%, 90%)`,color:`hsl(230, 8%, 24%)`,padding:`0.1em 0.6em`,borderRadius:`0.3em`,boxShadow:`0 2px 0 0 rgba(0, 0, 0, 0.2)`},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:`hsla(230, 8%, 24%, 0.05)`},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:`hsla(230, 8%, 24%, 0.2)`},".command-line .command-line-prompt":{borderRightColor:`hsla(230, 8%, 24%, 0.2)`},".line-numbers .line-numbers-rows > span:before":{color:`hsl(230, 1%, 62%)`},".command-line .command-line-prompt > span:before":{color:`hsl(230, 1%, 62%)`},".rainbow-braces .token.token.punctuation.brace-level-1":{color:`hsl(5, 74%, 59%)`},".rainbow-braces .token.token.punctuation.brace-level-5":{color:`hsl(5, 74%, 59%)`},".rainbow-braces .token.token.punctuation.brace-level-9":{color:`hsl(5, 74%, 59%)`},".rainbow-braces .token.token.punctuation.brace-level-2":{color:`hsl(119, 34%, 47%)`},".rainbow-braces .token.token.punctuation.brace-level-6":{color:`hsl(119, 34%, 47%)`},".rainbow-braces .token.token.punctuation.brace-level-10":{color:`hsl(119, 34%, 47%)`},".rainbow-braces .token.token.punctuation.brace-level-3":{color:`hsl(221, 87%, 60%)`},".rainbow-braces .token.token.punctuation.brace-level-7":{color:`hsl(221, 87%, 60%)`},".rainbow-braces .token.token.punctuation.brace-level-11":{color:`hsl(221, 87%, 60%)`},".rainbow-braces .token.token.punctuation.brace-level-4":{color:`hsl(301, 63%, 40%)`},".rainbow-braces .token.token.punctuation.brace-level-8":{color:`hsl(301, 63%, 40%)`},".rainbow-braces .token.token.punctuation.brace-level-12":{color:`hsl(301, 63%, 40%)`},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:`hsla(353, 100%, 66%, 0.15)`},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:`hsla(353, 100%, 66%, 0.15)`},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:`hsla(353, 95%, 66%, 0.25)`},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:`hsla(137, 100%, 55%, 0.15)`},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:`hsla(137, 100%, 55%, 0.15)`},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:`hsla(135, 73%, 55%, 0.25)`},".prism-previewer.prism-previewer:before":{borderColor:`hsl(0, 0, 95%)`},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:`hsl(0, 0, 95%)`,borderRadius:`0.3em`},".prism-previewer-color.prism-previewer-color:before":{borderRadius:`0.3em`},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:`0.3em`},".prism-previewer.prism-previewer:after":{borderTopColor:`hsl(0, 0, 95%)`},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:`hsl(0, 0, 95%)`},".prism-previewer-angle.prism-previewer-angle:before":{background:`hsl(0, 0%, 100%)`},".prism-previewer-time.prism-previewer-time:before":{background:`hsl(0, 0%, 100%)`},".prism-previewer-easing.prism-previewer-easing":{background:`hsl(0, 0%, 100%)`},".prism-previewer-angle.prism-previewer-angle circle":{stroke:`hsl(230, 8%, 24%)`,strokeOpacity:`1`},".prism-previewer-time.prism-previewer-time circle":{stroke:`hsl(230, 8%, 24%)`,strokeOpacity:`1`},".prism-previewer-easing.prism-previewer-easing circle":{stroke:`hsl(230, 8%, 24%)`,fill:`transparent`},".prism-previewer-easing.prism-previewer-easing path":{stroke:`hsl(230, 8%, 24%)`},".prism-previewer-easing.prism-previewer-easing line":{stroke:`hsl(230, 8%, 24%)`}},wj=`#121212`,Tj=`#3d6b69`,Ej=`#c55a44`,Dj=`#707070`,Oj=`transparent`,kj=`"JetBrains Mono Variable", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,Aj={...Cj,'code[class*="language-"]':{...Cj[`code[class*="language-"]`],background:Oj,color:wj,fontFamily:kj},'pre[class*="language-"]':{...Cj[`pre[class*="language-"]`],background:Oj,color:wj,fontFamily:kj,padding:0,margin:0,overflow:`visible`},property:{color:wj},string:{color:Tj},number:{color:Ej},boolean:{color:Ej},punctuation:{color:Dj},operator:{color:Dj},".language-json .token.operator":{color:Dj},".language-json .token.null.keyword":{color:Dj}};sj.registerLanguage(`typescript`,fj);var jj=`https://docs.skybridge.tech/test/evals`,Mj=`import { anthropic } from "@ai-sdk/anthropic";
107
+ import { start } from "@skybridge/test";
108
+ import { expect, it } from "vitest";
109
+ import { app } from "../src/server.js";
110
+
111
+ it("reaches the search tool from a natural prompt", async () => {
112
+ const chat = await start({ app, model: anthropic("claude-sonnet-4-5") });
113
+ await chat.send("Find me running shoes under 100 dollars");
114
+
115
+ expect.chat(chat).toHaveCalledToolWith("search-products", {
116
+ query: "running shoes",
117
+ });
118
+ });`,Nj=`First, make sure the Skybridge skill is installed and up to date:
119
+
120
+ npx skills add alpic-ai/skybridge -s skybridge
121
+
122
+ Then set up evals for this app, following the skill's evals reference.`;function Pj({label:e,code:t,action:n,wrap:r,highlight:i}){return(0,H.jsxs)(`div`,{className:`overflow-hidden rounded-lg border bg-background`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b bg-light-gray px-4 py-2`,children:[(0,H.jsx)(`span`,{className:`text-xs font-medium text-light-gray-foreground`,children:e}),n]}),i?(0,H.jsx)(`div`,{className:`overflow-x-auto px-4 py-3 text-xs leading-relaxed`,children:(0,H.jsx)(sj,{language:`typescript`,style:Aj,customStyle:{margin:0,padding:0,background:`transparent`,fontSize:`0.75rem`},codeTagProps:{className:`font-mono whitespace-pre`},children:t})}):(0,H.jsx)(`pre`,{className:pj(`overflow-x-auto px-4 py-3 font-mono text-xs leading-relaxed`,r&&`whitespace-pre-wrap`),children:t})]})}function Fj(){let{copied:e,copy:t}=xj();return(0,H.jsx)(Pj,{label:`Paste this to your coding agent`,code:Nj,wrap:!0,action:(0,H.jsxs)(ra,{variant:`cta`,onClick:()=>t(Nj),children:[e?(0,H.jsx)(Kr,{className:`size-3.5`}):(0,H.jsx)(Zr,{className:`size-3.5`}),e?`Copied`:`Copy`]})})}function Ij(){let[,e]=kO();return(0,H.jsxs)(`div`,{className:`relative min-h-0 overflow-y-auto bg-background`,children:[(0,H.jsx)(`div`,{className:`preview-region evals-grid-fade pointer-events-none absolute inset-0`,"aria-hidden":!0}),(0,H.jsx)(`div`,{className:`evals-wash pointer-events-none absolute inset-0`,"aria-hidden":!0}),(0,H.jsxs)(`div`,{className:`relative mx-auto flex max-w-2xl flex-col gap-6 px-6 py-10`,children:[(0,H.jsxs)(ra,{variant:`tertiary`,className:`self-start`,onClick:()=>e(null),children:[(0,H.jsx)(Ur,{className:`size-3.5`}),`Back`]}),(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-md border bg-background px-2 py-1 text-xs text-light-gray-foreground`,children:[(0,H.jsx)(Si,{className:`size-3.5`,"aria-hidden":!0}),`Evals`]}),(0,H.jsx)(`h1`,{className:`text-2xl font-medium`,children:`Check what the model does with your app, in a test`}),(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`A tool that works is not the same as a tool the model decides to call. An eval runs a real conversation against your app and asserts on the tools it reached for, so you catch a change that quietly breaks discovery.`})]}),(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsx)(`h2`,{className:`text-sm font-medium`,children:`What an eval looks like`}),(0,H.jsx)(Pj,{label:`evals/search.eval.ts`,code:Mj,highlight:!0})]}),(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsx)(`h2`,{className:`text-sm font-medium`,children:`Getting started`}),(0,H.jsx)(Fj,{})]}),(0,H.jsx)(ra,{asChild:!0,variant:`tertiary`,className:`self-start`,children:(0,H.jsxs)(`a`,{href:jj,target:`_blank`,rel:`noreferrer noopener`,children:[(0,H.jsx)(Qr,{className:`size-3.5`}),`Read the evals docs`]})})]})]})}var Lj=Object.defineProperty,Rj=(e,t)=>Lj(e,`name`,{value:t,configurable:!0}),zj=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Hi(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Bj(e,t){e&&cC.flushSync(()=>e.dispatchEvent(t))}Rj(Bj,`dispatchDiscreteCustomEvent`);var Vj=Object.defineProperty,Hj=(e,t)=>Vj(e,`name`,{value:t,configurable:!0}),Uj=`horizontal`,Wj=[`horizontal`,`vertical`],Gj=b.forwardRef(Hj(function(e,t){let{decorative:n,orientation:r=Uj,...i}=e,a=Kj(r)?r:Uj,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,H.jsx)(zj.div,{"data-orientation":a,...o,...i,ref:t})},`Separator`));function Kj(e){return Wj.includes(e)}Hj(Kj,`isValidOrientation`);function qj({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,H.jsx)(Gj,{"data-slot":`separator`,decorative:n,orientation:t,className:Mr(`shrink-0 bg-border-secondary`,`data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full`,`data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}var Jj={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 Yj({status:e}){let t=Jj[e];return(0,H.jsxs)(`span`,{className:`flex items-center gap-1 rounded-full ${t.bg} px-2 py-0.5 text-xs font-semibold ${t.text}`,children:[(0,H.jsx)(`span`,{className:`h-2 w-2 rounded-full ${t.dot} mr-1 inline-block`}),t.label]})}var Xj=ji([`w-full rounded-md border px-4 py-3`,`grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 items-start`,`[&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:mt-0.5`,`[&>:not(svg)]:col-start-2`].join(` `),{variants:{variant:{default:`bg-muted border-border [&>svg]:text-muted-foreground`,destructive:`bg-destructive/10 border-destructive/30 [&>svg]:text-destructive`,warning:`bg-badge-warning/10 border-badge-warning/30 [&>svg]:text-badge-warning`,success:`bg-badge-success/10 border-badge-success/30 [&>svg]:text-badge-success`}},defaultVariants:{variant:`default`}});function Zj({className:e,variant:t,...n}){return(0,H.jsx)(`div`,{role:`alert`,className:Mr(Xj({variant:t}),e),...n})}function Qj({className:e,...t}){return(0,H.jsx)(`p`,{className:Mr(`type-text-sm font-semibold leading-snug`,e),...t})}function $j({className:e,...t}){return(0,H.jsx)(`div`,{className:Mr(`type-text-sm text-muted-foreground [&_p]:leading-relaxed`,e),...t})}function eM({title:e,description:t,className:n}){return(0,H.jsxs)(Zj,{variant:`warning`,className:n,children:[(0,H.jsx)(Ei,{}),(0,H.jsx)(Qj,{children:e}),(0,H.jsx)($j,{children:t})]})}var tM=globalThis?.document?b.useLayoutEffect:()=>{},nM=Object.defineProperty,rM=(e,t)=>nM(e,`name`,{value:t,configurable:!0}),iM=!!(typeof window<`u`&&window.document&&window.document.createElement);function aM(e,t,{checkForDefaultPrevented:n=!0}={}){return rM(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}rM(aM,`composeEventHandlers`);function oM(e){if(!iM)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}rM(oM,`getOwnerWindow`);function sM(e){if(!iM)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}rM(sM,`getOwnerDocument`);function cM(e,t=!1){let{activeElement:n}=sM(e);if(!n?.nodeName)return null;if(lM(n)&&n.contentDocument)return cM(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=sM(n).getElementById(e);if(t)return t}}return n}rM(cM,`getActiveElement`);function lM(e){return e.tagName===`IFRAME`}rM(lM,`isFrame`);var uM=Object.defineProperty,dM=(e,t)=>uM(e,`name`,{value:t,configurable:!0});function fM(e,t){let n=b.createContext(t);n.displayName=e+`Context`;let r=dM(e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,H.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=b.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return dM(i,`useContext`),[r,i]}dM(fM,`createContext`);function pM(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=dM(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=b.useMemo(()=>o,Object.values(o));return(0,H.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=b.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return dM(s,`useContext`),[o,s]}dM(r,`createContext`);let i=dM(()=>{let t=n.map(e=>b.createContext(e));return dM(function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,mM(i,...t)]}dM(pM,`createContextScope`);function mM(...e){let t=e[0];if(e.length===1)return t;let n=dM(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return dM(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}dM(mM,`composeContextScopes`);var hM=Object.defineProperty,gM=(e,t)=>hM(e,`name`,{value:t,configurable:!0});function _M(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}gM(_M,`useCallbackRef`);var vM=Object.defineProperty,yM=(e,t)=>vM(e,`name`,{value:t,configurable:!0}),bM=`dismissableLayer.update`,xM=`dismissableLayer.pointerDownOutside`,SM=`dismissableLayer.focusOutside`,CM,wM=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),TM=b.forwardRef(yM(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=b.useContext(wM),[d,f]=b.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=b.useState({}),h=Ii(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=y>=v,C=b.useRef(!1),w=OM(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:b.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return S&&!t},[u.branches,S])}),T=kM(e=>{if(r&&C.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?y===g.length-1:!1,D=_M(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return b.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),b.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(CM=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),AM(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=CM))}},[d,p,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),AM())},[d,u]),b.useEffect(()=>{let e=yM(()=>m({}),`handleUpdate`);return document.addEventListener(bM,e),()=>document.removeEventListener(bM,e)},[]),(0,H.jsx)(zj.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:aM(e.onFocusCapture,T.onFocusCapture),onBlurCapture:aM(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:aM(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function EM(){let e=b.useContext(wM),[t,n]=b.useState(null);return b.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}yM(EM,`useDismissableLayerSurface`);var DM=yM(()=>!0,`IS_TRUE`);function OM(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=DM}=t,s=_M(e),c=b.useRef(!1),l=b.useRef(!1),u=b.useRef(new Map),d=b.useRef(()=>{});return b.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}yM(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}yM(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}yM(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}yM(p,`handleInteractionBubble`);let m=yM(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||jM(xM,s,p,{discrete:!0})};if(yM(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:yM(()=>c.current=!0,`onPointerDownCapture`)}}yM(OM,`usePointerDownOutside`);function kM(e,t=globalThis?.document){let n=_M(e),r=b.useRef(!1);return b.useEffect(()=>{let e=yM(e=>{e.target&&!r.current&&jM(SM,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:yM(()=>r.current=!0,`onFocusCapture`),onBlurCapture:yM(()=>r.current=!1,`onBlurCapture`)}}yM(kM,`useFocusOutside`);function AM(){let e=new CustomEvent(bM);document.dispatchEvent(e)}yM(AM,`dispatchUpdate`);function jM(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Bj(i,a):i.dispatchEvent(a)}yM(jM,`handleAndDispatchCustomEvent`);var MM=Object.defineProperty,NM=(e,t)=>MM(e,`name`,{value:t,configurable:!0}),PM=0,FM=null;function IM(e){return LM(),e.children}NM(IM,`FocusGuards`);function LM(){b.useEffect(()=>{FM||={start:RM(),end:RM()};let{start:e,end:t}=FM;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),PM++,()=>{PM===1&&(FM?.start.remove(),FM?.end.remove(),FM=null),PM=Math.max(0,PM-1)}},[])}NM(LM,`useFocusGuards`);function RM(){let 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}NM(RM,`createFocusGuard`);var zM=Object.defineProperty,BM=(e,t)=>zM(e,`name`,{value:t,configurable:!0}),VM=`focusScope.autoFocusOnMount`,HM=`focusScope.autoFocusOnUnmount`,UM={bubbles:!1,cancelable:!0},WM=b.forwardRef(BM(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=_M(i),u=_M(a),d=b.useRef(null),f=Ii(t,c),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:ZM(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||ZM(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&ZM(s)};BM(e,`handleFocusIn`),BM(t,`handleFocusOut`),BM(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),b.useEffect(()=>{if(s){QM.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(VM,UM);s.addEventListener(VM,l),s.dispatchEvent(t),t.defaultPrevented||(GM(tN(qM(s)),{select:!0}),document.activeElement===e&&ZM(s))}return()=>{s.removeEventListener(VM,l),setTimeout(()=>{let t=new CustomEvent(HM,UM);s.addEventListener(HM,u),s.dispatchEvent(t),t.defaultPrevented||ZM(e??document.body,{select:!0}),s.removeEventListener(HM,u),QM.remove(p)},0)}}},[s,l,u,p]);let m=b.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=KM(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&ZM(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&ZM(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,H.jsx)(zj.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function GM(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(ZM(r,{select:t}),document.activeElement!==n)return}BM(GM,`focusFirst`);function KM(e){let t=qM(e);return[JM(t,e),JM(t.reverse(),e)]}BM(KM,`getTabbableEdges`);function qM(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:BM(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}BM(qM,`getTabbableCandidates`);function JM(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):YM(r,{upTo:t})))return r}BM(JM,`findVisible`);function YM(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}BM(YM,`isHidden`);function XM(e){return e instanceof HTMLInputElement&&`select`in e}BM(XM,`isSelectableInput`);function ZM(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&XM(e)&&t&&e.select()}}BM(ZM,`focus`);var QM=$M();function $M(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=eN(e,t),e.unshift(t)},remove(t){e=eN(e,t),e[0]?.resume()}}}BM($M,`createFocusScopesStack`);function eN(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}BM(eN,`arrayRemove`);function tN(e){return e.filter(e=>e.tagName!==`A`)}BM(tN,`removeLinks`);var nN=Object.defineProperty,rN=(e,t)=>nN(e,`name`,{value:t,configurable:!0}),iN=b.useId||(()=>void 0),aN=0;function oN(e){let[t,n]=b.useState(iN());return tM(()=>{e||n(e=>e??String(aN++))},[e]),e||(t?`radix-${t}`:``)}rN(oN,`useId`);var sN=[`top`,`right`,`bottom`,`left`],cN=Math.min,lN=Math.max,uN=Math.round,dN=Math.floor,fN=e=>({x:e,y:e}),pN={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function mN(e,t,n){return lN(e,cN(t,n))}function hN(e,t){return typeof e==`function`?e(t):e}function gN(e){return e.split(`-`)[0]}function _N(e){return e.split(`-`)[1]}function vN(e){return e===`x`?`y`:`x`}function yN(e){return e===`y`?`height`:`width`}function bN(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function xN(e){return vN(bN(e))}function SN(e,t,n){n===void 0&&(n=!1);let r=_N(e),i=xN(e),a=yN(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=jN(o)),[o,jN(o)]}function CN(e){let t=jN(e);return[wN(e),t,wN(t)]}function wN(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var TN=[`left`,`right`],EN=[`right`,`left`],DN=[`top`,`bottom`],ON=[`bottom`,`top`];function kN(e,t,n){switch(e){case`top`:case`bottom`:return n?t?EN:TN:t?TN:EN;case`left`:case`right`:return t?DN:ON;default:return[]}}function AN(e,t,n,r){let i=_N(e),a=kN(gN(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(wN)))),a}function jN(e){let t=gN(e);return pN[t]+e.slice(t.length)}function MN(e){return{top:0,right:0,bottom:0,left:0,...e}}function NN(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:MN(e)}function PN(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function FN(e,t,n){let{reference:r,floating:i}=e,a=bN(t),o=xN(t),s=yN(o),c=gN(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(_N(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function IN(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=hN(t,e),p=NN(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=PN(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=PN(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var LN=50,RN=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:IN},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=FN(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<LN&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=FN(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},zN=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=hN(e,t)||{};if(l==null)return{};let d=NN(u),f={x:n,y:r},p=xN(i),m=yN(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=cN(d[_],T),D=cN(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=mN(O,A,k),M=!c.arrow&&_N(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),BN=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=hN(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=gN(r),_=bN(o),v=gN(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[jN(o)]:CN(o)),x=p!==`none`;!d&&x&&b.push(...AN(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=SN(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==bN(t))||T.every(e=>bN(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=bN(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function VN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function HN(e){return sN.some(t=>e[t]>=0)}var mae=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=hN(e,t);switch(i){case`referenceHidden`:{let e=VN(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:HN(e)}}}case`escaped`:{let e=VN(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:HN(e)}}}default:return{}}}}},UN=new Set([`left`,`top`]);async function hae(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=gN(n),s=_N(n),c=bN(n)===`y`,l=UN.has(o)?-1:1,u=a&&c?-1:1,d=hN(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var gae=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await hae(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},_ae=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=hN(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=bN(gN(i)),p=vN(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=mN(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=mN(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},vae=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=hN(e,t),u={x:n,y:r},d=bN(i),f=vN(d),p=u[f],m=u[d],h=hN(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=UN.has(gN(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},yae=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=hN(e,t),u=await o.detectOverflow(t,l),d=gN(i),f=_N(i),p=bN(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=cN(h-u[g],v),x=cN(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=lN(u.left,0),t=lN(u.right,0),n=lN(u.top,0),r=lN(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:lN(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:lN(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function WN(){return typeof window<`u`}function GN(e){return JN(e)?(e.nodeName||``).toLowerCase():`#document`}function KN(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qN(e){return((JN(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function JN(e){return WN()?e instanceof Node||e instanceof KN(e).Node:!1}function YN(e){return WN()?e instanceof Element||e instanceof KN(e).Element:!1}function XN(e){return WN()?e instanceof HTMLElement||e instanceof KN(e).HTMLElement:!1}function ZN(e){return!WN()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof KN(e).ShadowRoot}function QN(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=aP(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function bae(e){return/^(table|td|th)$/.test(GN(e))}function $N(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var xae=/transform|translate|scale|rotate|perspective|filter/,Sae=/paint|layout|strict|content/,eP=e=>!!e&&e!==`none`,tP;function nP(e){let t=YN(e)?aP(e):e;return eP(t.transform)||eP(t.translate)||eP(t.scale)||eP(t.rotate)||eP(t.perspective)||!rP()&&(eP(t.backdropFilter)||eP(t.filter))||xae.test(t.willChange||``)||Sae.test(t.contain||``)}function Cae(e){let t=sP(e);for(;XN(t)&&!iP(t);){if(nP(t))return t;if($N(t))return null;t=sP(t)}return null}function rP(){return tP??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),tP}function iP(e){return/^(html|body|#document)$/.test(GN(e))}function aP(e){return KN(e).getComputedStyle(e)}function oP(e){return YN(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sP(e){if(GN(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ZN(e)&&e.host||qN(e);return ZN(t)?t.host:t}function cP(e){let t=sP(e);return iP(t)?e.ownerDocument?e.ownerDocument.body:e.body:XN(t)&&QN(t)?t:cP(t)}function lP(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=cP(e),i=r===e.ownerDocument?.body,a=KN(r);if(i){let e=uP(a);return t.concat(a,a.visualViewport||[],QN(r)?r:[],e&&n?lP(e):[])}else return t.concat(r,lP(r,[],n))}function uP(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function dP(e){let t=aP(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=XN(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=uN(n)!==a||uN(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function fP(e){return YN(e)?e:e.contextElement}function pP(e){let t=fP(e);if(!XN(t))return fN(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=dP(t),o=(a?uN(n.width):n.width)/r,s=(a?uN(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var wae=fN(0);function mP(e){let t=KN(e);return!rP()||!t.visualViewport?wae:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Tae(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==KN(e)?!1:t}function hP(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=fP(e),o=fN(1);t&&(r?YN(r)&&(o=pP(r)):o=pP(e));let s=Tae(a,n,r)?mP(a):fN(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=KN(a),t=r&&YN(r)?KN(r):r,n=e,i=uP(n);for(;i&&r&&t!==n;){let e=pP(i),t=i.getBoundingClientRect(),r=aP(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=KN(i),i=uP(n)}}return PN({width:u,height:d,x:c,y:l})}function gP(e,t){let n=oP(e).scrollLeft;return t?t.left+n:hP(qN(e)).left+n}function _P(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-gP(e,n),y:n.top+t.scrollTop}}function Eae(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=qN(r),s=t?$N(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=fN(1),u=fN(0),d=XN(r);if((d||!d&&!a)&&((GN(r)!==`body`||QN(o))&&(c=oP(r)),d)){let e=hP(r);l=pP(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?_P(o,c):fN(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Dae(e){return Array.from(e.getClientRects())}function Oae(e){let t=qN(e),n=oP(e),r=e.ownerDocument.body,i=lN(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=lN(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+gP(e),s=-n.scrollTop;return aP(r).direction===`rtl`&&(o+=lN(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var vP=25;function kae(e,t){let n=KN(e),r=qN(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=rP();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=gP(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=vP&&(a-=o)}else l<=vP&&(a+=l);return{width:a,height:o,x:s,y:c}}function Aae(e,t){let n=hP(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=XN(e)?pP(e):fN(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function yP(e,t,n){let r;if(t===`viewport`)r=kae(e,n);else if(t===`document`)r=Oae(qN(e));else if(YN(t))r=Aae(t,n);else{let n=mP(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return PN(r)}function bP(e,t){let n=sP(e);return n===t||!YN(n)||iP(n)?!1:aP(n).position===`fixed`||bP(n,t)}function jae(e,t){let n=t.get(e);if(n)return n;let r=lP(e,[],!1).filter(e=>YN(e)&&GN(e)!==`body`),i=null,a=aP(e).position===`fixed`,o=a?sP(e):e;for(;YN(o)&&!iP(o);){let t=aP(o),n=nP(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||QN(o)&&!n&&bP(e,o))?r=r.filter(e=>e!==o):i=t,o=sP(o)}return t.set(e,r),r}function Mae(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?$N(t)?[]:jae(t,this._c):[].concat(n),r],o=yP(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=yP(t,a[e],i);s=lN(n.top,s),c=cN(n.right,c),l=cN(n.bottom,l),u=lN(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Nae(e){let{width:t,height:n}=dP(e);return{width:t,height:n}}function Pae(e,t,n){let r=XN(t),i=qN(t),a=n===`fixed`,o=hP(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=fN(0);function l(){c.x=gP(i)}if(r||!r&&!a)if((GN(t)!==`body`||QN(i))&&(s=oP(t)),r){let e=hP(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?_P(i,s):fN(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function xP(e){return aP(e).position===`static`}function SP(e,t){if(!XN(e)||aP(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return qN(e)===n&&(n=n.ownerDocument.body),n}function CP(e,t){let n=KN(e);if($N(e))return n;if(!XN(e)){let t=sP(e);for(;t&&!iP(t);){if(YN(t)&&!xP(t))return t;t=sP(t)}return n}let r=SP(e,t);for(;r&&bae(r)&&xP(r);)r=SP(r,t);return r&&iP(r)&&xP(r)&&!nP(r)?n:r||Cae(e)||n}var Fae=async function(e){let t=this.getOffsetParent||CP,n=this.getDimensions,r=await n(e.floating);return{reference:Pae(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Iae(e){return aP(e).direction===`rtl`}var Lae={convertOffsetParentRelativeRectToViewportRelativeRect:Eae,getDocumentElement:qN,getClippingRect:Mae,getOffsetParent:CP,getElementRects:Fae,getClientRects:Dae,getDimensions:Nae,getScale:pP,isElement:YN,isRTL:Iae};function wP(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Rae(e,t){let n=null,r,i=qN(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=dN(d),h=dN(i.clientWidth-(u+f)),g=dN(i.clientHeight-(d+p)),_=dN(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:lN(0,cN(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!wP(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function zae(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=fP(e),u=i||a?[...l?lP(l):[],...t?lP(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Rae(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?hP(e):null;c&&g();function g(){let t=hP(e);h&&!wP(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Bae=gae,Vae=_ae,Hae=BN,Uae=yae,Wae=mae,TP=zN,Gae=vae,Kae=(e,t,n)=>{let r=new Map,i={platform:Lae,...n},a={...i.platform,_c:r};return RN(e,t,{...i,platform:a})},EP=typeof document<`u`?b.useLayoutEffect:function(){};function DP(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 n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!DP(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!DP(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function OP(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function kP(e,t){let n=OP(e);return Math.round(t*n)/n}function AP(e){let t=b.useRef(e);return EP(()=>{t.current=e}),t}function qae(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=b.useState(r);DP(f,r)||p(r);let[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=b.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=b.useRef(null),w=b.useRef(null),T=b.useRef(u),E=c!=null,D=AP(c),O=AP(i),k=AP(l),A=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Kae(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!DP(T.current,t)&&(T.current=t,cC.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);EP(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=b.useRef(!1);EP(()=>(j.current=!0,()=>{j.current=!1}),[]),EP(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=b.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),N=b.useMemo(()=>({reference:x,floating:S}),[x,S]),P=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=kP(N.floating,u.x),r=kP(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...OP(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var Jae=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:TP({element:r.current,padding:i}).fn(n):r?TP({element:r,padding:i}).fn(n):{}}}},Yae=(e,t)=>{let n=Bae(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xae=(e,t)=>{let n=Vae(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zae=(e,t)=>({fn:Gae(e).fn,options:[e,t]}),Qae=(e,t)=>{let n=Hae(e);return{name:n.name,fn:n.fn,options:[e,t]}},$ae=(e,t)=>{let n=Uae(e);return{name:n.name,fn:n.fn,options:[e,t]}},eoe=(e,t)=>{let n=Wae(e);return{name:n.name,fn:n.fn,options:[e,t]}},toe=(e,t)=>{let n=Jae(e);return{name:n.name,fn:n.fn,options:[e,t]}},noe=Object.defineProperty,roe=b.forwardRef(((e,t)=>noe(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,H.jsx)(zj.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,H.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),ioe=Object.defineProperty,aoe=(e,t)=>ioe(e,`name`,{value:t,configurable:!0});function jP(e){let[t,n]=b.useState(void 0);return tM(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}aoe(jP,`useSize`);var ooe=Object.defineProperty,MP=(e,t)=>ooe(e,`name`,{value:t,configurable:!0}),NP=`Popper`,[PP,FP]=pM(NP),[soe,IP]=PP(NP),LP=MP(e=>{let{__scopePopper:t,children:n}=e,[r,i]=b.useState(null),[a,o]=b.useState(void 0);return(0,H.jsx)(soe,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),coe=`PopperAnchor`,RP=b.forwardRef(MP(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=IP(coe,n),o=b.useRef(null),s=a.onAnchorChange,c=Ii(t,b.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=b.useRef(null);b.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&HP(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,H.jsx)(zj.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),zP=`PopperContent`,[loe,uoe]=PP(zP),BP=b.forwardRef(MP(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=IP(zP,n),[_,v]=b.useState(null),y=Ii(t,v),[x,S]=b.useState(null),C=jP(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(VP),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=qae({strategy:`fixed`,placement:E,whileElementsMounted:MP((...e)=>zae(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[Yae({mainAxis:i+T,alignmentAxis:o}),c&&Xae({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Zae():void 0,...A}),c&&Qae({...A}),$ae({...A,apply:MP(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&toe({element:x,padding:s}),moe({arrowWidth:w,arrowHeight:T}),f&&eoe({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),I=g.setPlacementState;tM(()=>(I(N),()=>{I(void 0)}),[N,I]);let[L,ee]=HP(N),te=_M(m);tM(()=>{P&&te?.()},[P,te]);let ne=F.arrow?.x,R=F.arrow?.y,z=F.arrow?.centerOffset!==0,[B,re]=b.useState();return tM(()=>{_&&re(window.getComputedStyle(_).zIndex)},[_]),(0,H.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:B,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,H.jsx)(loe,{scope:n,placedSide:L,placedAlign:ee,onArrowChange:S,arrowX:ne,arrowY:R,shouldHideArrow:z,children:(0,H.jsx)(zj.div,{"data-side":L,"data-align":ee,...h,ref:y,style:{...h.style,animation:P?h.style?.animation:`none`}})})})},`PopperContent`)),doe=`PopperArrow`,foe={top:`bottom`,right:`left`,bottom:`top`,left:`right`},poe=b.forwardRef(MP(function(e,t){let{__scopePopper:n,...r}=e,i=uoe(doe,n),a=foe[i.placedSide];return(0,H.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,H.jsx)(roe,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function VP(e){return e!==null}MP(VP,`isNotNull`);var moe=MP(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=HP(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function HP(e){let[t,n=`center`]=e.split(`-`);return[t,n]}MP(HP,`getSideAndAlignFromPlacement`);var hoe=Object.defineProperty,UP=b.forwardRef(((e,t)=>hoe(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=b.useState(!1);tM(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?cC.createPortal((0,H.jsx)(zj.div,{...r,ref:t}),o):null},`Portal`)),goe=Object.defineProperty,WP=(e,t)=>goe(e,`name`,{value:t,configurable:!0});function GP(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}WP(GP,`useStateMachine`);var KP=WP(e=>{let{present:t,children:n}=e,r=qP(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=YP(r.ref,ZP(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null},`Presence`);function qP(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),o=b.useRef(void 0),[s,c]=GP(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{s===`mounted`?(a.current=o.current??XP(r.current),o.current=void 0):a.current=`none`},[s]),tM(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=XP(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),tM(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=WP(a=>{let o=XP(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=WP(e=>{e.target===t&&(a.current=XP(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:b.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=XP(t)}else r.current=null;n(e)},[])}}WP(qP,`usePresence`);function JP(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}WP(JP,`setRef`);function YP(...e){let t=b.useRef(e);return t.current=e,b.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=JP(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():JP(n[e],null)}}},[])}WP(YP,`useStableComposedRefs`);function XP(e){return e?.animationName||`none`}WP(XP,`getAnimationName`);function ZP(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}WP(ZP,`getElementRef`);var _oe=Object.defineProperty,voe=(e,t)=>_oe(e,`name`,{value:t,configurable:!0}),QP=b.useEffectEvent,$P=b.useInsertionEffect;function eF(e){if(typeof QP==`function`)return QP(e);let t=b.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof $P==`function`?$P(()=>{t.current=e}):tM(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}voe(eF,`useEffectEvent`);var yoe=Object.defineProperty,tF=(e,t)=>yoe(e,`name`,{value:t,configurable:!0}),boe=b.useInsertionEffect||tM;function nF({prop:e,defaultProp:t,onChange:n=tF(()=>{},`onChange`),caller:r}){let[i,a,o]=rF({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,b.useCallback(t=>{if(s){let n=iF(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}tF(nF,`useControllableState`);function rF({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return boe(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}tF(rF,`useUncontrolledState`);function iF(e){return typeof e==`function`}tF(iF,`isFunction`);var aF=Symbol(`RADIX:SYNC_STATE`);function xoe(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=eF(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=b.useReducer((t,n)=>{if(n.type===aF)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=b.useRef(p);b.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=b.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return b.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:aF,state:i})},[i,d.state,c]),[h,f]}tF(xoe,`useControllableStateReducer`);var Soe=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},oF=new WeakMap,sF=new WeakMap,cF={},lF=0,uF=function(e){return e&&(e.host||uF(e.parentNode))},Coe=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=uF(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},woe=function(e,t,n,r){var i=Coe(t,Array.isArray(e)?e:[e]);cF[n]||(cF[n]=new WeakMap);var a=cF[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(oF.get(e)||0)+1,l=(a.get(e)||0)+1;oF.set(e,c),a.set(e,l),o.push(e),c===1&&i&&sF.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),lF++,function(){o.forEach(function(e){var t=oF.get(e)-1,i=a.get(e)-1;oF.set(e,t),a.set(e,i),t||(sF.has(e)||e.removeAttribute(r),sF.delete(e)),i||e.removeAttribute(n)}),lF--,lF||(oF=new WeakMap,oF=new WeakMap,sF=new WeakMap,cF={})}},dF=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Soe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),woe(r,i,n,`aria-hidden`)):function(){return null}},fF=function(){return fF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},fF.apply(this,arguments)};function pF(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function mF(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function Toe(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function Eoe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var hF=`right-scroll-bar-position`,gF=`width-before-scroll-bar`,Doe=`with-scroll-bars-hidden`,Ooe=`--removed-body-scroll-bar-size`;function _F(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function koe(e,t){var n=(0,b.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Aoe=typeof window<`u`?b.useLayoutEffect:b.useEffect,vF=new WeakMap;function joe(e,t){var n=koe(t||null,function(t){return e.forEach(function(e){return _F(e,t)})});return Aoe(function(){var t=vF.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||_F(e,null)}),i.forEach(function(e){r.has(e)||_F(e,a)})}vF.set(n,e)},[e]),n}function Moe(e){return e}function Noe(e,t){t===void 0&&(t=Moe);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Poe(e){e===void 0&&(e={});var t=Noe(null);return t.options=fF({async:!0,ssr:!1},e),t}var yF=function(e){var t=e.sideCar,n=pF(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return b.createElement(r,fF({},n))};yF.isSideCarExport=!0;function Foe(e,t){return e.useMedium(t),yF}var bF=Poe(),xF=function(){},SF=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:xF,onWheelCapture:xF,onTouchMoveCapture:xF}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,x=pF(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=joe([n,t]),w=fF(fF({},x),i);return b.createElement(b.Fragment,null,u&&b.createElement(S,{sideCar:bF,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?b.cloneElement(b.Children.only(s),fF(fF({},w),{ref:C})):b.createElement(v,fF({},w,{className:c,ref:C}),s))});SF.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},SF.classNames={fullWidth:gF,zeroRight:hF};var CF,Ioe=function(){if(CF)return CF;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Loe(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Ioe();return t&&e.setAttribute(`nonce`,t),e}function Roe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function zoe(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Boe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Loe())&&(Roe(t,n),zoe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Voe=function(){var e=Boe();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},wF=function(){var e=Voe();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Hoe={left:0,top:0,right:0,gap:0},TF=function(e){return parseInt(e||``,10)||0},Uoe=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[TF(n),TF(r),TF(i)]},Woe=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Hoe;var t=Uoe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Goe=wF(),EF=`data-scroll-locked`,Koe=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
123
+ .${Doe} {
124
+ overflow: hidden ${r};
125
+ padding-right: ${s}px ${r};
126
+ }
127
+ body[${EF}] {
128
+ overflow: hidden ${r};
129
+ overscroll-behavior: contain;
130
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
131
+ padding-left: ${i}px;
132
+ padding-top: ${a}px;
133
+ padding-right: ${o}px;
134
+ margin-left:0;
135
+ margin-top:0;
136
+ margin-right: ${s}px ${r};
137
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
138
+ }
139
+
140
+ .${hF} {
141
+ right: ${s}px ${r};
142
+ }
143
+
144
+ .${gF} {
145
+ margin-right: ${s}px ${r};
146
+ }
147
+
148
+ .${hF} .${hF} {
149
+ right: 0 ${r};
150
+ }
151
+
152
+ .${gF} .${gF} {
153
+ margin-right: 0 ${r};
154
+ }
155
+
156
+ body[${EF}] {
157
+ ${Ooe}: ${s}px;
158
+ }
159
+ `},DF=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},qoe=function(){b.useEffect(function(){return document.body.setAttribute(EF,(DF()+1).toString()),function(){var e=DF()-1;e<=0?document.body.removeAttribute(EF):document.body.setAttribute(EF,e.toString())}},[])},Joe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;qoe();var a=b.useMemo(function(){return Woe(i)},[i]);return b.createElement(Goe,{styles:Koe(a,!t,i,n?``:`!important`)})},OF=!1;if(typeof window<`u`)try{var kF=Object.defineProperty({},"passive",{get:function(){return OF=!0,!0}});window.addEventListener(`test`,kF,kF),window.removeEventListener(`test`,kF,kF)}catch{OF=!1}var AF=OF?{passive:!1}:!1,Yoe=function(e){return e.tagName===`TEXTAREA`},jF=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Yoe(e)&&n[t]===`visible`)},Xoe=function(e){return jF(e,`overflowY`)},Zoe=function(e){return jF(e,`overflowX`)},MF=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),NF(e,r)){var i=PF(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Qoe=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},$oe=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},NF=function(e,t){return e===`v`?Xoe(t):Zoe(t)},PF=function(e,t){return e===`v`?Qoe(t):$oe(t)},ese=function(e,t){return e===`h`&&t===`rtl`?-1:1},tse=function(e,t,n,r,i){var a=ese(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=PF(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&NF(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},FF=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},IF=function(e){return[e.deltaX,e.deltaY]},LF=function(e){return e&&`current`in e?e.current:e},nse=function(e,t){return e[0]===t[0]&&e[1]===t[1]},rse=function(e){return`
160
+ .block-interactivity-${e} {pointer-events: none;}
161
+ .allow-interactivity-${e} {pointer-events: all;}
162
+ `},ise=0,RF=[];function ase(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState(ise++)[0],a=b.useState(wF)[0],o=b.useRef(e);b.useEffect(function(){o.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Eoe([e.lockRef.current],(e.shards||[]).map(LF),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=b.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=FF(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=MF(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=MF(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return tse(h,t,e,h===`h`?s:c,!0)},[]),c=b.useCallback(function(e){var n=e;if(!(!RF.length||RF[RF.length-1]!==a)){var r=`deltaY`in n?IF(n):FF(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&nse(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(LF).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=b.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:ose(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=b.useCallback(function(e){n.current=FF(e),r.current=void 0},[]),d=b.useCallback(function(t){l(t.type,IF(t),t.target,s(t,e.lockRef.current))},[]),f=b.useCallback(function(t){l(t.type,FF(t),t.target,s(t,e.lockRef.current))},[]);b.useEffect(function(){return RF.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,AF),document.addEventListener(`touchmove`,c,AF),document.addEventListener(`touchstart`,u,AF),function(){RF=RF.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,AF),document.removeEventListener(`touchmove`,c,AF),document.removeEventListener(`touchstart`,u,AF)}},[]);var p=e.removeScrollBar,m=e.inert;return b.createElement(b.Fragment,null,m?b.createElement(a,{styles:rse(i)}):null,p?b.createElement(Joe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ose(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var sse=Foe(bF,ase),zF=b.forwardRef(function(e,t){return b.createElement(SF,fF({},e,{ref:t,sideCar:sse}))});zF.classNames=SF.classNames;var cse=Object.defineProperty,BF=(e,t)=>cse(e,`name`,{value:t,configurable:!0}),VF=`Popover`,[HF,lse]=pM(VF,[FP]),UF=FP(),[use,WF]=HF(VF),dse=BF(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=UF(t),c=b.useRef(null),[l,u]=b.useState(!1),[d,f]=b.useState(0),[p,m]=b.useState(0),[h,g]=nF({prop:r,defaultProp:i??!1,onChange:a,caller:VF});return(0,H.jsx)(LP,{...s,children:(0,H.jsx)(use,{scope:t,contentId:oN(),titleId:oN(),descriptionId:oN(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,triggerRef:c,open:h,onOpenChange:g,onOpenToggle:b.useCallback(()=>g(e=>!e),[g]),hasCustomAnchor:l,onCustomAnchorAdd:b.useCallback(()=>u(!0),[]),onCustomAnchorRemove:b.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),fse=`PopoverAnchor`,pse=b.forwardRef(BF(function(e,t){let{__scopePopover:n,...r}=e,i=WF(fse,n),a=UF(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return b.useEffect(()=>(o(),()=>s()),[o,s]),(0,H.jsx)(RP,{...a,...r,ref:t})},`PopoverAnchor`)),mse=`PopoverTrigger`,hse=b.forwardRef(BF(function(e,t){let{__scopePopover:n,...r}=e,i=WF(mse,n),a=UF(n),o=Ii(t,i.triggerRef),s=(0,H.jsx)(zj.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":JF(i.open),...r,ref:o,onClick:aM(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,H.jsx)(RP,{asChild:!0,...a,children:s})},`PopoverTrigger`)),GF=`PopoverPortal`,[gse,_se]=HF(GF,{forceMount:void 0}),vse=BF(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=WF(GF,t);return(0,H.jsx)(gse,{scope:t,forceMount:n,children:(0,H.jsx)(KP,{present:n||a.open,children:(0,H.jsx)(UP,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),KF=`PopoverContent`,yse=b.forwardRef(BF(function(e,t){let n=_se(KF,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=WF(KF,e.__scopePopover);return(0,H.jsx)(KP,{present:r||a.open,children:a.modal?(0,H.jsx)(xse,{...i,ref:t}):(0,H.jsx)(Sse,{...i,ref:t})})},`PopoverContent`)),bse=Hi(`PopoverContent.RemoveScroll`),xse=b.forwardRef(BF(function(e,t){let n=WF(KF,e.__scopePopover),r=b.useRef(null),i=Ii(t,r),a=b.useRef(!1);return b.useEffect(()=>{let e=r.current;if(e)return dF(e)},[]),(0,H.jsx)(zF,{as:bse,allowPinchZoom:!0,children:(0,H.jsx)(qF,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:aM(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:aM(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:aM(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),Sse=b.forwardRef(BF(function(e,t){let n=WF(KF,e.__scopePopover),r=b.useRef(!1),i=b.useRef(!1);return(0,H.jsx)(qF,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),qF=b.forwardRef(BF(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,"aria-describedby":d,...f}=e,p=WF(KF,n),m=UF(n);return LM(),(0,H.jsx)(WM,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(TM,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>p.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,H.jsx)(BP,{"data-state":JF(p.open),role:`dialog`,id:p.contentId,"aria-labelledby":p.titlePresent?p.titleId:void 0,"aria-describedby":p.descriptionPresent?YF(d,p.descriptionId):d,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})},`PopoverContentImpl`));function JF(e){return e?`open`:`closed`}BF(JF,`getState`);function YF(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}BF(YF,`concatAriaDescribedby`);function XF({...e}){return(0,H.jsx)(dse,{"data-slot":`popover`,...e})}function ZF({...e}){return(0,H.jsx)(hse,{"data-slot":`popover-trigger`,...e})}function Cse({...e}){return(0,H.jsx)(pse,{"data-slot":`popover-anchor`,...e})}function QF({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,H.jsx)(vse,{children:(0,H.jsx)(yse,{"data-slot":`popover-content`,align:t,sideOffset:n,className:Mr(`bg-popover text-popover-foreground`,`z-50 w-72 rounded-md border border-border-secondary p-4 shadow-lg outline-hidden`,`origin-(--radix-popover-content-transform-origin)`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=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`,e),...r})})}var wse=ji(`motion-safe:animate-spin`,{variants:{variant:{primary:`text-primary`,secondary:`text-muted-foreground`},size:{sm:`size-3.5`,md:`size-4`,lg:`size-5`,xl:`size-8`}},defaultVariants:{variant:`primary`,size:`md`}});function $F({className:e,variant:t,size:n,...r}){return(0,H.jsx)(ai,{role:`status`,"aria-label":`Loading`,className:Mr(wse({variant:t,size:n}),e),...r})}var Tse=ji(`size-2.5 rounded-full`,{variants:{variant:{success:`bg-success`,destructive:`bg-destructive`,warning:`bg-warning`,muted:`bg-muted-foreground`},pulse:{true:`animate-pulse`,false:``}},defaultVariants:{variant:`muted`,pulse:!1}});function eI({className:e,variant:t,pulse:n,...r}){return(0,H.jsx)(`div`,{className:Mr(Tse({variant:t,pulse:n}),e),...r})}var Ese=q({id:W(),name:W()}),Dse=_m(`state`,[q({state:J(`signedOut`)}),q({state:J(`noTeam`)}),q({state:J(`needsProject`),teams:K(Ese),defaultTeamId:W(),staleConfig:nm().optional()}),q({state:J(`ready`),lastDeployGit:q({ref:W().nullable(),commitMessage:W().nullable(),author:W().nullable()}).nullable().optional(),lastDeployStatus:Cm([`ongoing`,`deployed`,`failed`,`canceled`]).optional(),lastDeployStartedAt:G().optional(),mcpServerUrl:W().optional(),deploymentPageUrl:W().nullable().optional()}),q({state:J(`error`),message:W()})]),Ose=_m(`status`,[q({status:J(`idle`)}),q({status:J(`deploying`),startedAt:G(),deploymentPageUrl:W().nullable()}),q({status:J(`deployed`),mcpServerUrl:W(),deploymentPageUrl:W().nullable()}),q({status:J(`failed`),message:W(),deploymentPageUrl:W().nullable()})]),tI=`/__skybridge/deploy`;async function nI(e,t,n=`Request failed`){let r=await fetch(e,{method:`POST`,...t!==void 0&&{headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}});if(!r.ok){let{message:e}=await r.json().catch(()=>({}));throw Error(e??`${n} (${r.status})`)}}var rI=()=>({status:`deploying`,startedAt:Date.now(),deploymentPageUrl:null}),iI=ls()((e,t)=>({status:{state:`loading`},progress:{status:`idle`},async refreshStatus(){try{let t=await fetch(`${tI}/status`),n=Dse.safeParse(await t.json());e({status:n.success?n.data:{state:`error`,message:`Unexpected status response`}})}catch{e({status:{state:`error`,message:`Can't reach the dev server.`}})}},async signIn(){await nI(`${tI}/login`,void 0,`Sign-in failed`),await t().refreshStatus()},async createAndDeploy(t,n,r){e({progress:rI()});try{await nI(`${tI}/project`,{name:t,teamId:n,teamName:r},`Failed to create project`)}catch(t){throw e({progress:{status:`idle`}}),t}},async redeploy(){e({progress:rI()});try{await nI(tI,void 0,`Failed to deploy`)}catch(t){throw e({progress:{status:`idle`}}),t}},connect(){let n=new EventSource(`${tI}/events`);return n.addEventListener(`state`,n=>{try{let r=Ose.safeParse(JSON.parse(n.data));if(r.success){let n=t().progress.status;e({progress:r.data}),(r.data.status===`deployed`||r.data.status===`failed`)&&r.data.status!==n&&t().refreshStatus()}}catch{}}),()=>{n.close()}}}));function kse(){let e=iI(e=>e.connect),t=iI(e=>e.refreshStatus),n=iI(e=>e.status.state===`ready`&&e.status.lastDeployStatus===`ongoing`);(0,b.useEffect)(()=>(t(),e()),[e,t]),(0,b.useEffect)(()=>{if(!n)return;let e=setInterval(()=>void t(),4e3);return()=>clearInterval(e)},[n,t])}var Ase=_m(`status`,[q({status:J(`idle`)}),q({status:J(`starting`),message:W()}),q({status:J(`connected`),url:W()}),q({status:J(`error`),message:W()})]),aI=`/__skybridge/tunnel`,oI=ls()((e,t)=>({state:{status:`idle`},async start(){if(!(t().state.status===`starting`||t().state.status===`connected`)){e({state:{status:`starting`,message:`Starting tunnel…`}});try{let e=await fetch(aI,{method:`POST`});if(!e.ok)throw Error(`Tunnel start failed (${e.status})`)}catch(n){t().state.status!==`connected`&&e({state:{status:`error`,message:n instanceof Error?n.message:`Failed to start tunnel`}})}}},async stop(){try{await fetch(aI,{method:`DELETE`})}catch{}},connect(){let t=new EventSource(`${aI}/events`);return t.addEventListener(`state`,t=>{if(t instanceof MessageEvent)try{let n=Ase.safeParse(JSON.parse(t.data));n.success&&e({state:n.data})}catch{}}),t.addEventListener(`error`,()=>{t.readyState===EventSource.CLOSED&&e({state:{status:`error`,message:`Lost tunnel connection`}})}),()=>{t.close()}}}));function jse(){let e=oI(e=>e.connect);(0,b.useEffect)(()=>e(),[e])}var Mse=Object.defineProperty,sI=(e,t)=>Mse(e,`name`,{value:t,configurable:!0}),cI=`Dialog`,[lI,Nse]=pM(cI),[Pse,uI]=lI(cI),Fse=sI(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=b.useRef(null),c=b.useRef(null),[l,u]=nF({prop:r,defaultProp:i??!1,onChange:a,caller:cI}),[d,f]=b.useState(0),[p,m]=b.useState(0);return(0,H.jsx)(Pse,{scope:t,triggerRef:s,contentRef:c,contentId:oN(),titleId:oN(),descriptionId:oN(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),dI=`DialogPortal`,[Ise,fI]=lI(dI,{forceMount:void 0}),Lse=sI(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=uI(dI,t);return(0,H.jsx)(Ise,{scope:t,forceMount:n,children:b.Children.map(r,e=>(0,H.jsx)(KP,{present:n||a.open,children:(0,H.jsx)(UP,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),pI=`DialogOverlay`,Rse=b.forwardRef(sI(function(e,t){let n=fI(pI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=uI(pI,e.__scopeDialog);return a.modal?(0,H.jsx)(KP,{present:r||a.open,children:(0,H.jsx)(Bse,{...i,ref:t})}):null},`DialogOverlay`)),zse=Hi(`DialogOverlay.RemoveScroll`),Bse=b.forwardRef(sI(function(e,t){let{__scopeDialog:n,...r}=e,i=uI(pI,n),a=Ii(t,EM());return(0,H.jsx)(zF,{as:zse,allowPinchZoom:!0,shards:[i.contentRef],children:(0,H.jsx)(zj.div,{"data-state":_I(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),mI=`DialogContent`,Vse=b.forwardRef(sI(function(e,t){let n=fI(mI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=uI(mI,e.__scopeDialog);return(0,H.jsx)(KP,{present:r||a.open,children:a.modal?(0,H.jsx)(Hse,{...i,ref:t}):(0,H.jsx)(Use,{...i,ref:t})})},`DialogContent`)),Hse=b.forwardRef(sI(function(e,t){let n=uI(mI,e.__scopeDialog),r=b.useRef(null),i=Ii(t,n.contentRef,r);return b.useEffect(()=>{let e=r.current;if(e)return dF(e)},[]),(0,H.jsx)(hI,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:aM(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:aM(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:aM(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),Use=b.forwardRef(sI(function(e,t){let n=uI(mI,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return(0,H.jsx)(hI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),hI=b.forwardRef(sI(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,...s}=e,c=uI(mI,n);return LM(),(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(WM,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(TM,{role:`dialog`,id:c.contentId,"aria-labelledby":c.titlePresent?c.titleId:void 0,"aria-describedby":c.descriptionPresent?gI(o,c.descriptionId):o,"data-state":_I(c.open),...s,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})},`DialogContentImpl`)),Wse=b.forwardRef(sI(function(e,t){let{__scopeDialog:n,...r}=e,i=uI(`DialogTitle`,n),{setTitleCount:a}=i;return tM(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,H.jsx)(zj.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),Gse=b.forwardRef(sI(function(e,t){let{__scopeDialog:n,...r}=e,i=uI(`DialogDescription`,n),{setDescriptionCount:a}=i;return tM(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,H.jsx)(zj.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),Kse=`DialogClose`,qse=b.forwardRef(sI(function(e,t){let{__scopeDialog:n,...r}=e,i=uI(Kse,n);return(0,H.jsx)(zj.button,{type:`button`,...r,ref:t,onClick:aM(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function gI(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}sI(gI,`concatAriaDescribedby`);function _I(e){return e?`open`:`closed`}sI(_I,`getState`);function vI({...e}){return(0,H.jsx)(Fse,{"data-slot":`dialog`,...e})}function Jse({...e}){return(0,H.jsx)(Lse,{"data-slot":`dialog-portal`,...e})}function Yse({className:e,...t}){return(0,H.jsx)(Rse,{"data-slot":`dialog-overlay`,className:Mr(`fixed inset-0 z-50 bg-overlay`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t})}var Xse=ji([`bg-background fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2`,`max-h-[calc(100vh-4rem)] overflow-hidden rounded-2xl px-6 shadow-lg outline-none`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`duration-200`].join(` `),{variants:{size:{sm:`max-w-[400px]`,lg:`max-w-[544px]`}},defaultVariants:{size:`sm`}});function yI({className:e,children:t,size:n,showCloseButton:r=!0,...i}){return(0,H.jsxs)(Jse,{children:[(0,H.jsx)(Yse,{}),(0,H.jsxs)(Vse,{"data-slot":`dialog-content`,className:Mr(Xse({size:n}),e),...i,children:[t,r&&(0,H.jsxs)(qse,{"data-slot":`dialog-close`,className:Mr(`absolute top-3 right-4 flex size-8 items-center justify-center rounded-md`,`text-subtle-foreground transition-colors`,`[@media(hover:hover)]:hover:text-foreground`,`focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,`disabled:pointer-events-none`),children:[(0,H.jsx)(Oi,{className:`size-4`}),(0,H.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function bI({className:e,...t}){return(0,H.jsx)(`div`,{"data-slot":`dialog-header`,className:Mr(`flex flex-col gap-0.5 py-6 pr-10`,e),...t})}var Zse=ji(`pb-6 pt-6`,{variants:{layout:{horizontal:`flex gap-3 [&>*]:flex-1`,vertical:`flex flex-col gap-3`}},defaultVariants:{layout:`horizontal`}});function xI({className:e,layout:t,...n}){return(0,H.jsx)(`div`,{"data-slot":`dialog-footer`,className:Mr(Zse({layout:t}),e),...n})}function SI({className:e,...t}){return(0,H.jsx)(Wse,{"data-slot":`dialog-title`,className:Mr(`type-text-md font-semibold text-foreground`,e),...t})}function CI({className:e,...t}){return(0,H.jsx)(Gse,{"data-slot":`dialog-description`,className:Mr(`type-text-sm text-subtle-foreground`,e),...t})}var Qse=Object.defineProperty,$se=(e,t)=>Qse(e,`name`,{value:t,configurable:!0}),wI=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),ece=b.forwardRef($se(function(e,t){return(0,H.jsx)(zj.span,{...e,ref:t,style:{...wI,...e.style}})},`VisuallyHidden`)),tce=Object.defineProperty,TI=(e,t)=>tce(e,`name`,{value:t,configurable:!0}),[EI,nce]=pM(`Tooltip`,[FP]),DI=FP(),rce=`TooltipProvider`,ice=700,OI=`tooltip.open`,[ace,kI]=EI(rce),oce=TI(e=>{let{__scopeTooltip:t,delayDuration:n=ice,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=b.useRef(!0),s=b.useRef(!1),c=b.useRef(0);return b.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,H.jsx)(ace,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:b.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:b.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),AI=`Tooltip`,[sce,jI]=EI(AI),cce=TI(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=kI(AI,e.__scopeTooltip),l=DI(t),[u,d]=b.useState(null),[f,p]=b.useState(void 0),m=oN(),h=b.useRef(0),g=o??c.disableHoverableContent,_=s??c.delayDuration,v=b.useRef(!1),[y,x]=nF({prop:r,defaultProp:i??!1,onChange:TI(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(OI))):c.onClose(),a?.(e)},`onChange`),caller:AI}),S=b.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),C=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,x(!0)},[x]),w=b.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),T=b.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,x(!0),h.current=0},_)},[_,x]);b.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]);let E=f??m;return(0,H.jsx)(LP,{...l,children:(0,H.jsx)(sce,{scope:t,contentId:E,setContentId:p,open:y,stateAttribute:S,trigger:u,onTriggerChange:d,onTriggerEnter:b.useCallback(()=>{c.isOpenDelayedRef.current?T():C()},[c.isOpenDelayedRef,T,C]),onTriggerLeave:b.useCallback(()=>{g?w():(window.clearTimeout(h.current),h.current=0)},[w,g]),onOpen:C,onClose:w,disableHoverableContent:g,children:n})})},`Tooltip`),MI=`TooltipTrigger`,lce=b.forwardRef(TI(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=jI(MI,n),o=kI(MI,n),s=DI(n),c=Ii(t,b.useRef(null),a.onTriggerChange),l=b.useRef(!1),u=b.useRef(!1),d=b.useCallback(()=>l.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,H.jsx)(RP,{asChild:!0,...s,children:(0,H.jsx)(zj.button,{"aria-describedby":a.open?GI(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:aM(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:aM(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:aM(e.onPointerDown,()=>{a.open&&a.onClose(),l.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:aM(e.onFocus,()=>{l.current||a.onOpen()}),onBlur:aM(e.onBlur,a.onClose),onClick:aM(e.onClick,a.onClose)})})},`TooltipTrigger`)),NI=`TooltipPortal`,[uce,dce]=EI(NI,{forceMount:void 0}),PI=TI(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=jI(NI,t);return(0,H.jsx)(uce,{scope:t,forceMount:n,children:(0,H.jsx)(KP,{present:n||a.open,children:(0,H.jsx)(UP,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),FI=`TooltipContent`,II=b.forwardRef(TI(function(e,t){let n=dce(FI,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=jI(FI,e.__scopeTooltip);return(0,H.jsx)(KP,{present:r||o.open,children:o.disableHoverableContent?(0,H.jsx)(LI,{side:i,...a,ref:t}):(0,H.jsx)(fce,{side:i,...a,ref:t})})},`TooltipContent`)),fce=b.forwardRef(TI(function(e,t){let n=jI(FI,e.__scopeTooltip),r=kI(FI,e.__scopeTooltip),i=b.useRef(null),a=Ii(t,i),[o,s]=b.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=b.useCallback(()=>{s(null),d(!1)},[d]),p=b.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=BI(r,zI(r,n.getBoundingClientRect())),a=VI(t.getBoundingClientRect()),o=UI([...i,...a]);s(o),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(c&&u){let e=TI(e=>p(e,u),`handleTriggerLeave`),t=TI(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),b.useEffect(()=>{if(o){let e=TI(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!HI(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,H.jsx)(LI,{...e,ref:a})},`TooltipContentHoverable`)),pce=Gi(`TooltipContent`),LI=b.forwardRef(TI(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=jI(FI,n),u=DI(n),{onClose:d}=l;b.useEffect(()=>(document.addEventListener(OI,d),()=>document.removeEventListener(OI,d)),[d]),b.useEffect(()=>{if(l.trigger){let e=TI(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:f}=l;return tM(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,H.jsx)(TM,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,H.jsxs)(BP,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,H.jsx)(pce,{children:r}),i?(0,H.jsx)(ece,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),RI=b.forwardRef(TI(function(e,t){let{__scopeTooltip:n,...r}=e,i=DI(n);return(0,H.jsx)(poe,{...i,...r,ref:t})},`TooltipArrow`));function zI(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}TI(zI,`getExitSideFromRect`);function BI(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}TI(BI,`getPaddedExitPoints`);function VI(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}TI(VI,`getPointsFromRect`);function HI(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}TI(HI,`isPointInPolygon`);function UI(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),WI(t)}TI(UI,`getHull`);function WI(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}TI(WI,`getHullPresorted`);function GI(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}TI(GI,`concatAriaDescribedby`);function mce({delayDuration:e=0,...t}){return(0,H.jsx)(oce,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function KI({...e}){return(0,H.jsx)(mce,{children:(0,H.jsx)(cce,{"data-slot":`tooltip`,...e})})}function qI({...e}){return(0,H.jsx)(lce,{"data-slot":`tooltip-trigger`,...e})}function JI({className:e,sideOffset:t=6,children:n,...r}){return(0,H.jsx)(PI,{children:(0,H.jsxs)(II,{"data-slot":`tooltip-content`,sideOffset:t,className:Mr(`bg-inverted text-inverted-foreground dark:bg-subtle dark:text-foreground`,`z-50 w-fit rounded-md px-3 py-2 shadow-lg dark:shadow-none dark:drop-shadow-[0_0_0.5px_var(--color-border)]`,`type-text-xs font-semibold text-balance text-center whitespace-pre-line`,`animate-in fade-in-0 zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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`,`origin-(--radix-tooltip-content-transform-origin)`,e),...r,children:[n,(0,H.jsx)(RI,{className:`bg-inverted fill-inverted dark:bg-subtle dark:fill-subtle z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]`})]})})}var hce=Object.defineProperty,gce=b.forwardRef(((e,t)=>hce(e,`name`,{value:t,configurable:!0}))(function(e,t){return(0,H.jsx)(zj.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},`Label`));function YI({className:e,...t}){return(0,H.jsx)(gce,{"data-slot":`label`,className:Mr(`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 _ce({fieldId:e,label:t,required:n,hint:r,error:i,tooltip:a,children:o}){return(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[t&&(0,H.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,H.jsx)(YI,{htmlFor:e,className:`type-text-sm font-medium text-muted-foreground`,children:t}),n&&(0,H.jsx)(`span`,{"aria-hidden":!0,className:`type-text-sm font-medium text-required`,children:`*`}),a&&(0,H.jsxs)(KI,{children:[(0,H.jsx)(qI,{asChild:!0,children:(0,H.jsx)(ni,{className:`size-4 text-muted-foreground`})}),(0,H.jsx)(JI,{children:a})]})]}),o,(r||i)&&(0,H.jsx)(`p`,{id:e?`${e}-description`:void 0,className:Mr(`type-text-sm`,i?`text-destructive`:`text-subtle-foreground`),children:i??r})]})}var vce={sm:{standalone:`h-8 px-2 py-1.5 type-text-sm`,wrapper:`h-8`,inner:`px-2 py-1.5`,text:`type-text-sm`,leadingText:`pl-2 pr-2 type-text-sm`,leadingIcon:`pl-2 [&_svg]:size-4`},md:{standalone:`h-8 px-2.5 py-1.5 type-text-md`,wrapper:`h-8`,inner:`px-2.5 py-1.5`,text:`type-text-md`,leadingText:`pl-2.5 pr-2 type-text-md`,leadingIcon:`pl-2.5 [&_svg]:size-5`}};function XI({className:e,id:t,label:n,required:r,hint:i,error:a,tooltip:o,leadingText:s,leadingIcon:c,size:l=`md`,...u}){let d=b.useId(),f=t??d,p=s||c,m=vce[l],h=(0,H.jsx)(`input`,{id:f,"data-slot":`input`,className:Mr(`w-full min-w-0 bg-transparent outline-none`,m.text,`text-foreground placeholder:text-placeholder`,`disabled:cursor-not-allowed`,!p&&[`flex`,m.standalone,`bg-background border border-border rounded-md`,`transition-colors`,`focus-visible:border-ring focus-visible:border-2`,`disabled:bg-disabled disabled:text-disabled-foreground`,`aria-invalid:border-border-error`,a&&`border-border-error`],p&&`flex-1 min-h-0`,e),required:r,"aria-invalid":a?!0:void 0,"aria-describedby":f&&(i||a)?`${f}-description`:void 0,...u});return(0,H.jsx)(_ce,{fieldId:f,label:n,required:r,hint:i,error:a,tooltip:o,children:p?(0,H.jsxs)(`div`,{className:Mr(`flex items-center w-full overflow-hidden`,m.wrapper,`bg-background border border-border rounded-md`,`transition-colors`,`has-[input:focus-visible]:border-ring has-[input:focus-visible]:border-2`,`has-[input:disabled]:bg-disabled has-[input:disabled]:text-disabled-foreground has-[input:disabled]:cursor-not-allowed`,a&&`border-border-error`),children:[c&&(0,H.jsx)(`span`,{className:Mr(`flex items-center text-subtle-foreground [&_svg]:shrink-0`,m.leadingIcon),children:c}),s&&(0,H.jsx)(`span`,{className:Mr(`flex items-center text-subtle-foreground whitespace-nowrap border-r border-border self-stretch`,m.leadingText),children:s}),(0,H.jsx)(`div`,{className:Mr(`flex flex-1 items-center min-w-0`,m.inner),children:h})]}):h})}var ZI=ji([`flex w-full items-center gap-2 rounded-md border bg-background text-foreground shadow-xs outline-hidden`,`transition-colors`,`focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,`data-[state=open]:ring-2 data-[state=open]:ring-ring data-[state=open]:ring-offset-2 data-[state=open]:ring-offset-background`,`disabled:pointer-events-none disabled:bg-disabled disabled:text-disabled-foreground disabled:border-disabled`,`aria-invalid:border-border-error`,`[&_svg:not([class*='size-'])]:size-5 [&_svg]:shrink-0`].join(` `),{variants:{size:{sm:`min-h-8 px-2 py-1.5 type-text-sm`,md:`min-h-10 px-3.5 type-text-md`}},defaultVariants:{size:`md`}}),yce=Object.defineProperty,bce=(e,t)=>yce(e,`name`,{value:t,configurable:!0});function QI(e,[t,n]){return Math.min(n,Math.max(t,e))}bce(QI,`clamp`);var xce=Object.defineProperty,$I=(e,t)=>xce(e,`name`,{value:t,configurable:!0});function eL(e){let t=e+`CollectionProvider`,[n,r]=pM(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=$I(e=>{let{scope:t,children:n}=e,r=b.useRef(null),a=b.useRef(new Map).current;return(0,H.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=Hi(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Ii(t,a(s,n).collectionRef);return(0,H.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Hi(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=Ii(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,H.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return $I(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}$I(eL,`createCollection`);var tL=new WeakMap,nL=class e extends Map{static{$I(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],tL.set(this,!0)}set(e,t){return tL.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=aL(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=rL(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=rL(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return rL(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function rL(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=iL(e,t);return n===-1?void 0:e[n]}$I(rL,`at`);function iL(e,t){let n=e.length,r=aL(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}$I(iL,`toSafeIndex`);function aL(e){return e!==e||e===0?0:Math.trunc(e)}$I(aL,`toSafeInteger`);function Sce(e){let t=e+`CollectionProvider`,[n,r]=pM(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new nL,setItemMap:$I(()=>void 0,`setItemMap`)}),o=$I(({state:e,...t})=>e?(0,H.jsx)(c,{...t,state:e}):(0,H.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=$I(e=>{let t=h();return(0,H.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=$I(e=>{let{scope:t,children:n,state:r}=e,a=b.useRef(null),[o,s]=b.useState(null),c=Ii(a,s),[l,u]=r;return b.useEffect(()=>{if(!o)return;let e=lL(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,H.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=Hi(l),d=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Ii(t,a(l,n).collectionRef);return(0,H.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=Hi(f),m=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),[s,c]=b.useState(null),l=Ii(t,o,c),{setItemMap:u}=a(f,n),d=b.useRef(i);oL(d.current,i)||(d.current=i);let m=d.current;return b.useEffect(()=>{let e=m;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(cL):(t.set(s,{...e,element:s}),t.toSorted(cL)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new nL(e)))}},[s,m,u]),(0,H.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});m.displayName=f;function h(){return b.useState(new nL)}$I(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return $I(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}$I(Sce,`createCollection`);function oL(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}$I(oL,`shallowEqual`);function sL(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}$I(sL,`isElementPreceding`);function cL(e,t){return!e[1].element||!t[1].element?0:sL(e[1].element,t[1].element)?-1:1}$I(cL,`sortByDocumentPosition`);function lL(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}$I(lL,`getChildListObserver`);var Cce=Object.defineProperty,wce=(e,t)=>Cce(e,`name`,{value:t,configurable:!0}),Tce=b.createContext(void 0);function uL(e){let t=b.useContext(Tce);return e||t||`ltr`}wce(uL,`useDirection`);var Ece=Object.defineProperty,Dce=(e,t)=>Ece(e,`name`,{value:t,configurable:!0});function dL(e){let t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}Dce(dL,`usePrevious`);var Oce=Object.defineProperty,fL=(e,t)=>Oce(e,`name`,{value:t,configurable:!0}),kce=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Ace=[` `,`Enter`],pL=`Select`,[mL,hL,jce]=eL(pL),[gL,Mce]=pM(pL,[jce,FP]),_L=FP(),[Nce,vL]=gL(pL),[Pce,Fce]=gL(pL);function yL(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=_L(t),[_,v]=b.useState(null),[y,x]=b.useState(null),[S,C]=b.useState(!1),w=uL(l),[T,E]=nF({prop:r,defaultProp:i??!1,onChange:a,caller:pL}),[D,O]=nF({prop:o,defaultProp:s,onChange:c,caller:pL}),k=b.useRef(null),A=b.useRef(D);b.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=fL(()=>O(A.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,O]);let j=!_||!!m||!!_.closest(`form`),[M,N]=b.useState(new Set),P=oN(),F=Array.from(M).map(e=>e.props.value).join(`;`),I=b.useCallback(e=>{N(t=>new Set(t).add(e))},[]),L=b.useCallback(e=>{N(t=>{let n=new Set(t);return n.delete(e),n})},[]),ee={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:P,value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:M,nativeSelectKey:F,isFormControl:j};return(0,H.jsx)(LP,{...g,children:(0,H.jsx)(Nce,{scope:t,...ee,children:(0,H.jsx)(mL.Provider,{scope:t,children:(0,H.jsx)(Pce,{scope:t,onNativeOptionAdd:I,onNativeOptionRemove:L,children:kL(h)?h(ee):n})})})})}fL(yL,`SelectProvider`);var Ice=fL(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,H.jsx)(yL,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[n,e?(0,H.jsx)(sle,{__scopeSelect:t}):null]})})},`Select`),Lce=`SelectTrigger`,Rce=b.forwardRef(fL(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=_L(n),o=vL(Lce,n),s=o.disabled||r,c=Ii(t,o.onTriggerChange),l=hL(n),u=b.useRef(`touch`),[d,f,p]=jL(e=>{let t=l().filter(e=>!e.disabled),n=ML(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=fL(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,H.jsx)(RP,{asChild:!0,...a,children:(0,H.jsx)(zj.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":AL(o.value)?``:void 0,...i,ref:c,onClick:aM(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:aM(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:aM(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&kce.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),zce=`SelectValue`,Bce=b.forwardRef(fL(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=vL(zce,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Ii(t,c.onValueNodeChange);tM(()=>{l(u)},[l,u]);let f=AL(c.value);return(0,H.jsx)(zj.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,H.jsx)(b.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),Vce=b.forwardRef(fL(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,H.jsx)(zj.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[Hce,Uce]=gL(`SelectPortal`,{forceMount:void 0}),Wce=fL(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,H.jsx)(Hce,{scope:e.__scopeSelect,forceMount:n,children:(0,H.jsx)(UP,{asChild:!0,...r})})},`SelectPortal`),bL=`SelectContent`,Gce=b.forwardRef(fL(function(e,t){let n=Uce(bL,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=vL(bL,e.__scopeSelect),[o,s]=b.useState();return tM(()=>{s(new DocumentFragment)},[]),(0,H.jsx)(KP,{present:r||a.open,children:({present:e})=>e?(0,H.jsx)(Jce,{...i,ref:t}):(0,H.jsx)(Kce,{...i,fragment:o})})},`SelectContent`)),Kce=b.forwardRef(fL(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?cC.createPortal((0,H.jsx)(SL,{scope:n,children:(0,H.jsx)(mL.Slot,{scope:n,children:(0,H.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),xL=10,[SL,CL]=gL(bL),qce=Hi(`SelectContent.RemoveScroll`),Jce=b.forwardRef(fL(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=vL(bL,n),[y,x]=b.useState(null),[S,C]=b.useState(null),w=Ii(t,x),[T,E]=b.useState(null),[D,O]=b.useState(null),k=hL(n),[A,j]=b.useState(!1),M=b.useRef(!1);b.useEffect(()=>{if(y)return dF(y)},[y]),LM();let N=b.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),P=b.useCallback(()=>N([T,y]),[N,T,y]);b.useEffect(()=>{A&&P()},[A,P]);let{onOpenChange:F,triggerPointerDownPosRef:I}=v;b.useEffect(()=>{if(y){let e={x:0,y:0},t=fL(t=>{e={x:Math.abs(Math.round(t.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(I.current?.y??0))}},`handlePointerMove`),n=fL(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||F(!1),document.removeEventListener(`pointermove`,t),I.current=null},`handlePointerUp`);return I.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,F,I]),b.useEffect(()=>{let e=fL(()=>F(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[F]);let[L,ee]=jL(e=>{let t=k().filter(e=>!e.disabled),n=ML(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),te=b.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&(E(e),r&&(M.current=!0))},[v.value]),ne=b.useCallback(()=>y?.focus(),[y]),R=b.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&O(e)},[v.value]),z=r===`popper`?wL:Yce,B=z===wL?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,H.jsx)(SL,{scope:n,content:y,viewport:S,onViewportChange:C,itemRefCallback:te,selectedItem:T,onItemLeave:ne,itemTextRefCallback:R,focusSelectedItem:P,selectedItemText:D,position:r,isPositioned:A,searchRef:L,children:(0,H.jsx)(zF,{as:qce,allowPinchZoom:!0,children:(0,H.jsx)(WM,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:aM(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,H.jsx)(TM,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,H.jsx)(z,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...B,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:aM(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ee(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>N(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),Yce=b.forwardRef(fL(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=vL(bL,n),o=CL(bL,n),[s,c]=b.useState(null),[l,u]=b.useState(null),d=Ii(t,u),f=hL(n),p=b.useRef(!1),m=b.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=b.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-xL,d=QI(a,[xL,Math.max(xL,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-xL,d=QI(a,[xL,Math.max(xL,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-xL*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-xL,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${xL}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);tM(()=>y(),[y]);let[x,S]=b.useState();return tM(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,H.jsx)(Xce,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:b.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,H.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,H.jsx)(zj.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),wL=b.forwardRef(fL(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=xL,...a}=e,o=_L(n);return(0,H.jsx)(BP,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[Xce,Zce]=gL(bL,{}),TL=`SelectViewport`,Qce=b.forwardRef(fL(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=CL(TL,n),o=Zce(TL,n),s=Ii(t,a.onViewportChange),c=b.useRef(0);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,H.jsx)(mL.Slot,{scope:n,children:(0,H.jsx)(zj.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:aM(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-xL*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[$ce,ele]=gL(`SelectGroup`),EL=`SelectItem`,[tle,DL]=gL(EL),nle=b.forwardRef(fL(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=vL(EL,n),c=CL(EL,n),l=s.value===r,[u,d]=b.useState(a??``),[f,p]=b.useState(!1),m=Ii(t,_M(e=>c.itemRefCallback?.(e,r,i))),h=oN(),g=b.useRef(`touch`),_=fL(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,H.jsx)(tle,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:b.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,H.jsx)(mL.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,H.jsx)(zj.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:aM(o.onFocus,()=>p(!0)),onBlur:aM(o.onBlur,()=>p(!1)),onClick:aM(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:aM(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:aM(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:aM(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:aM(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:aM(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(Ace.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),OL=`SelectItemText`,rle=b.forwardRef(fL(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=vL(OL,n),s=CL(OL,n),c=DL(OL,n),l=Fce(OL,n),[u,d]=b.useState(null),f=_M(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=Ii(t,d,c.onItemTextChange,f),m=u?.textContent,h=b.useMemo(()=>(0,H.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return tM(()=>(g(h),()=>_(h)),[g,_,h]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(zj.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!AL(o.value)?cC.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),ile=`SelectItemIndicator`,ale=b.forwardRef(fL(function(e,t){let{__scopeSelect:n,...r}=e;return DL(ile,n).isSelected?(0,H.jsx)(zj.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),ole=`SelectBubbleInput`,sle=b.forwardRef(fL(function({__scopeSelect:e,...t},n){let r=vL(ole,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=b.useRef(null),m=Ii(n,p),h=i??``,g=dL(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return b.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,H.jsxs)(zj.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...wI,...t.style},ref:m,defaultValue:h,children:[AL(i)&&!_?(0,H.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function kL(e){return typeof e==`function`}fL(kL,`isFunction`);function AL(e){return e===``||e===void 0}fL(AL,`shouldShowPlaceholder`);function jL(e){let t=_M(e),n=b.useRef(``),r=b.useRef(0),i=b.useCallback(e=>{let i=n.current+e;t(i),fL((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=b.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}fL(jL,`useTypeaheadSearch`);function ML(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=NL(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}fL(ML,`findNextItem`);function NL(e,t){return e.map((n,r)=>e[(t+r)%e.length])}fL(NL,`wrapArray`);function PL({...e}){return(0,H.jsx)(Ice,{"data-slot":`select`,...e})}function FL({...e}){return(0,H.jsx)(Bce,{"data-slot":`select-value`,...e})}function IL({className:e,size:t=`md`,children:n,...r}){return(0,H.jsxs)(Rce,{"data-slot":`select-trigger`,className:Mr(ZI({size:t}),`justify-between data-[placeholder]:text-placeholder`,`*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2`,e),...r,children:[n,(0,H.jsx)(Vce,{asChild:!0,children:(0,H.jsx)(qr,{className:`size-5 shrink-0 text-muted-foreground`})})]})}function LL({className:e,children:t,position:n=`popper`,...r}){return(0,H.jsx)(Wce,{children:(0,H.jsx)(Gce,{"data-slot":`select-content`,className:Mr(`bg-popover text-popover-foreground`,`relative z-50 max-h-[min(var(--radix-select-content-available-height),300px)] min-w-[8rem] overflow-hidden rounded-md border border-border-secondary py-1 shadow-lg`,`origin-(--radix-select-content-transform-origin)`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=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`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:(0,H.jsx)(Qce,{className:Mr(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t})})})}function RL({className:e,children:t,...n}){return(0,H.jsxs)(nle,{"data-slot":`select-item`,className:Mr(`relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pl-2 outline-hidden select-none`,`type-text-md font-medium text-foreground mx-1 my-px`,`[@media(hover:hover)]:hover:bg-background-hover`,`focus:bg-background-hover`,`data-[disabled]:pointer-events-none data-[disabled]:text-disabled-foreground`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n,children:[(0,H.jsx)(`span`,{className:`absolute right-2 flex size-4 items-center justify-center`,children:(0,H.jsx)(ale,{children:(0,H.jsx)(Kr,{className:`size-4 text-primary`})})}),(0,H.jsx)(rle,{children:t})]})}function cle({open:e,onOpenChange:t,defaultName:n,teams:r,defaultTeamId:i,staleConfig:a,onCreate:o}){let s=(0,b.useId)(),[c,l]=(0,b.useState)(n),[u,d]=(0,b.useState)(i),[f,p]=(0,b.useState)(null),[m,h]=(0,b.useState)(!1);(0,b.useEffect)(()=>{e&&(l(n),d(i),p(null))},[e,n,i]);let g=c.trim(),_=r.find(e=>e.id===u)??r[0];return(0,H.jsx)(vI,{open:e,onOpenChange:t,children:(0,H.jsxs)(yI,{children:[(0,H.jsxs)(bI,{children:[(0,H.jsx)(SI,{children:`Deploy to Alpic`}),(0,H.jsx)(CI,{children:a?`The linked project is no longer available. Create a new one to deploy.`:`Name your project to create it and run the first deployment.`})]}),(0,H.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),!(!g||m)){h(!0),p(null);try{await o(g,u,_?.name),t(!1)}catch(e){p(e instanceof Error?e.message:`Failed to create project`)}finally{h(!1)}}},className:`space-y-3`,children:[(0,H.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,H.jsx)(YI,{htmlFor:s,children:`Project name`}),(0,H.jsx)(XI,{id:s,value:c,onChange:e=>l(e.target.value),placeholder:`my-mcp-app`,autoFocus:!0}),r.length>1?(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,H.jsx)(`span`,{children:`Team:`}),(0,H.jsxs)(PL,{value:u,onValueChange:d,children:[(0,H.jsx)(IL,{size:`sm`,className:`h-6 gap-1 border-none bg-transparent px-1 font-medium text-foreground text-xs shadow-none hover:bg-background-hover`,children:(0,H.jsx)(FL,{})}),(0,H.jsx)(LL,{align:`start`,className:`min-w-48`,children:r.map(e=>(0,H.jsx)(RL,{value:e.id,className:`cursor-pointer text-xs`,children:e.name},e.id))})]})]}):(0,H.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Team: `,(0,H.jsx)(`span`,{className:`font-medium`,children:_?.name})]}),f&&(0,H.jsx)(`p`,{className:`text-destructive text-xs`,children:f})]}),(0,H.jsxs)(xI,{children:[(0,H.jsx)(ra,{type:`button`,variant:`secondary`,onClick:()=>t(!1),children:`Cancel`}),(0,H.jsx)(ra,{type:`submit`,variant:`primary`,disabled:!g||m,children:m?`Creating…`:`Create & deploy`})]})]})]})})}var lle={idle:{variant:`muted`,pulse:!1},starting:{variant:`warning`,pulse:!0},connected:{variant:`success`,pulse:!1},error:{variant:`destructive`,pulse:!1}},ule=120,zL=`max-w-[200px]`;function dle(){let[e,t]=(0,b.useState)(!1),n=(0,b.useRef)(null);return(0,b.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),{open:e,setOpen:t,onEnter:(0,b.useCallback)(()=>{n.current&&=(clearTimeout(n.current),null),t(!0)},[]),onLeave:(0,b.useCallback)(()=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>t(!1),ule)},[])}}function BL({trigger:e,className:t,children:n}){let{open:r,setOpen:i,onEnter:a,onLeave:o}=dle(),s=(0,b.useId)();return(0,H.jsxs)(XF,{open:r,onOpenChange:i,children:[(0,H.jsx)(Cse,{asChild:!0,children:(0,b.cloneElement)(e,{onMouseEnter:a,onMouseLeave:o,"data-popover-anchor":s})}),(0,H.jsx)(QF,{align:`end`,sideOffset:0,className:pj(`p-4`,t),onMouseEnter:a,onMouseLeave:o,onOpenAutoFocus:e=>e.preventDefault(),onPointerDownOutside:e=>{e.target?.closest?.(`[data-popover-anchor="${CSS.escape(s)}"]`)&&e.preventDefault()},children:n})]})}function VL({label:e,icon:t,buildUrl:n,description:r}){let i=oI(e=>e.state),a=oI(e=>e.start),[o,s]=(0,b.useState)(!1),c=i.status===`connected`?n(i.url):null;(0,b.useEffect)(()=>{o&&i.status===`connected`?(window.open(n(i.url),`_blank`,`noreferrer,noopener`),s(!1)):o&&(i.status===`error`||i.status===`idle`)&&s(!1)},[o,i,n]);let l=()=>{if(c){window.open(c,`_blank`,`noreferrer,noopener`);return}s(!0),a()},u=o,d=!c&&i.status===`starting`;return(0,H.jsx)(BL,{className:`w-72`,trigger:(0,H.jsx)(ra,{variant:`secondary`,"aria-disabled":d,className:pj(d&&`opacity-50 cursor-not-allowed`),icon:u?(0,H.jsx)($F,{size:`sm`,className:`text-current`}):t,onClick:d?void 0:l,children:e}),children:c?(0,H.jsx)(`p`,{className:pj(`text-sm text-muted-foreground text-center mx-auto`,zL),children:r}):(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground text-center`,children:u?`Starting the tunnel, ${e} will open shortly…`:`Click to start the tunnel and open ${e}.`})})}function fle(){return(0,H.jsx)(VL,{label:`Playground`,icon:(0,H.jsx)(ui,{className:`size-3.5`}),buildUrl:e=>`${e}/try`,description:`Chat with your MCP server with a real LLM and share it`})}function ple(){return(0,H.jsx)(VL,{label:`Audit`,icon:(0,H.jsx)(Yr,{className:`size-3.5`}),buildUrl:e=>`https://app.alpic.ai/beacon?url=${encodeURIComponent(`${e}/mcp`)}`,description:`Audit your MCP server's tools, prompts, and resources`})}var mle=`https://app.alpic.ai`;function hle(){let e=iI(e=>e.status.state===`ready`&&e.status.mcpServerUrl?e.status.mcpServerUrl:e.progress.status===`deployed`?e.progress.mcpServerUrl:null),{copied:t,copy:n}=xj();if(!e)return null;let r=e.replace(/^https?:\/\//,``);return(0,H.jsxs)(`button`,{type:`button`,"aria-label":`Copy live MCP server URL`,onClick:()=>n(e),className:`inline-flex h-8 items-center gap-2 rounded-md border bg-light-gray px-2.5 text-sm hover:bg-background-hover`,children:[(0,H.jsx)(ti,{className:`size-3.5 text-quaternary-foreground`,"aria-hidden":!0}),(0,H.jsx)(`span`,{className:`max-w-48 truncate font-mono text-xs`,children:r}),(0,H.jsx)(`span`,{className:`text-quaternary-foreground`,children:t?(0,H.jsx)(Kr,{className:`size-3.5`}):(0,H.jsx)(Zr,{className:`size-3.5`})})]})}function gle(){let{status:e,progress:t,redeploy:n,createAndDeploy:r,signIn:i}=iI(),a=GO(),[o,s]=(0,b.useState)(!1),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(null),f=t.status===`deploying`||e.state===`ready`&&e.lastDeployStatus===`ongoing`,p=e.state===`ready`&&!!e.lastDeployGit,m=c||f||p||e.state===`loading`||e.state===`noTeam`||e.state===`error`,h=()=>{d(null),l(!0),i().catch(e=>d(e instanceof Error?e.message:`Sign-in failed`)).finally(()=>l(!1))},g=()=>{d(null),n().catch(e=>d(e instanceof Error?e.message:`Deploy failed`))},_=()=>{if(d(null),e.state===`signedOut`){h();return}if(e.state===`ready`){g();return}e.state===`needsProject`&&s(!0)};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(BL,{className:`w-72`,trigger:(0,H.jsx)(ra,{variant:`cta`,className:pj(`h-8 px-2 gap-1`,m&&`opacity-50 cursor-not-allowed`),"aria-disabled":m,icon:c?(0,H.jsx)($F,{size:`sm`,className:`text-current`}):(0,H.jsx)(eI,{className:`size-2`,...yle(e,t),"aria-hidden":!0}),onClick:m?void 0:_,children:`Deploy`}),children:(0,H.jsx)(_le,{status:e,progress:t,signingIn:c,actionError:u,onRedeploy:g,onSignIn:h})}),e.state===`needsProject`&&(0,H.jsx)(cle,{open:o,onOpenChange:s,defaultName:a?.name??`my-mcp-app`,teams:e.teams,defaultTeamId:e.defaultTeamId,staleConfig:e.staleConfig,onCreate:r})]})}function _le({status:e,progress:t,signingIn:n,actionError:r,onRedeploy:i,onSignIn:a}){if(t.status===`deploying`)return(0,H.jsx)(HL,{startedAt:t.startedAt,deploymentPageUrl:t.deploymentPageUrl});let o=e.state===`ready`&&!!e.lastDeployGit;if(t.status===`deployed`&&!o)return(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium`,children:`Deployed`}),(0,H.jsx)(UL,{url:t.mcpServerUrl}),t.deploymentPageUrl&&(0,H.jsx)(WL,{href:t.deploymentPageUrl})]});if(t.status===`failed`&&!o)return(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium text-destructive`,children:`Deployment failed`}),(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t.message}),t.deploymentPageUrl&&(0,H.jsx)(GL,{href:t.deploymentPageUrl,label:`Go to logs`})]});switch(e.state){case`loading`:return(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Checking Alpic…`});case`signedOut`:return(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium`,children:`Sign in to Alpic to deploy`}),(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Connect your Alpic account to deploy this server.`}),(0,H.jsx)(ra,{variant:`primary`,className:`h-7 w-full`,disabled:n,onClick:a,children:n?`Signing in…`:`Sign in to Alpic`}),r&&(0,H.jsx)(`p`,{className:`text-xs text-destructive`,children:r})]});case`noTeam`:return(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium`,children:`No team yet`}),(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Create a team on Alpic before deploying.`}),(0,H.jsx)(GL,{href:mle,label:`Open Alpic`})]});case`needsProject`:return(0,H.jsx)(`p`,{className:`text-sm`,children:`Click to deploy to Alpic`});case`ready`:return e.lastDeployStatus===`ongoing`?(0,H.jsx)(HL,{startedAt:e.lastDeployStartedAt??null,deploymentPageUrl:e.deploymentPageUrl??null}):(0,H.jsxs)(`div`,{className:`space-y-2`,children:[!e.lastDeployGit&&(0,H.jsx)(`p`,{className:`text-sm`,children:`Click to deploy to Alpic`}),e.mcpServerUrl&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:`Last Deployment:`}),(0,H.jsx)(UL,{url:e.mcpServerUrl})]}),e.deploymentPageUrl&&(0,H.jsx)(WL,{href:e.deploymentPageUrl}),e.lastDeployGit&&(0,H.jsx)(eM,{className:`px-3 py-2`,title:`Last deployed from Git`,description:(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(ble,{git:e.lastDeployGit}),(0,H.jsx)(ra,{variant:`primary`,className:`h-7 w-full`,onClick:i,children:`Deploy anyway`})]})}),r&&(0,H.jsx)(`p`,{className:`text-xs text-destructive`,children:r})]});case`error`:return(0,H.jsx)(`p`,{className:`text-xs text-destructive`,children:e.message})}}function vle(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/60),r=t%60;return n>0?`${n}m ${String(r).padStart(2,`0`)}s`:`${r}s`}function HL({startedAt:e,deploymentPageUrl:t}){let[n,r]=(0,b.useState)(()=>e==null?0:Date.now()-e);return(0,b.useEffect)(()=>{if(e==null)return;let t=()=>r(Date.now()-e);t();let n=setInterval(t,1e3);return()=>clearInterval(n)},[e]),(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)($F,{size:`sm`,className:`shrink-0 text-current`}),(0,H.jsx)(`p`,{className:`text-sm`,children:`Deploying…`}),e!=null&&(0,H.jsx)(`span`,{className:`ml-auto font-mono text-xs text-muted-foreground`,children:vle(n)})]}),t&&(0,H.jsx)(GL,{href:t,label:`Go to logs`})]})}function yle(e,t){if(t.status===`deploying`)return{variant:`warning`,pulse:!0};let n=e.state===`ready`&&!!e.lastDeployGit;if(t.status===`failed`&&!n)return{variant:`destructive`,pulse:!1};if(t.status===`deployed`&&!n)return{variant:`success`,pulse:!1};if(e.state===`ready`)switch(e.lastDeployStatus){case`ongoing`:return{variant:`warning`,pulse:!0};case`failed`:case`canceled`:return{variant:`destructive`,pulse:!1};case`deployed`:return{variant:`success`,pulse:!1}}return{variant:`muted`,pulse:!1}}function UL({url:e}){let{copied:t,copy:n}=xj();return(0,H.jsxs)(`button`,{type:`button`,"aria-label":`Copy MCP server URL`,onClick:()=>n(e),className:`flex w-full items-center gap-2 rounded-md border bg-light-gray px-2 py-1.5 text-left hover:bg-background-hover`,children:[(0,H.jsx)(`span`,{className:`flex-1 truncate font-mono text-xs`,children:e}),(0,H.jsx)(`span`,{className:`text-quaternary-foreground`,children:t?(0,H.jsx)(Kr,{className:`size-3.5`}):(0,H.jsx)(Zr,{className:`size-3.5`})})]})}function WL({href:e}){return(0,H.jsx)(ra,{asChild:!0,variant:`tertiary`,className:`w-full`,children:(0,H.jsxs)(`a`,{href:e,target:`_blank`,rel:`noreferrer noopener`,children:[(0,H.jsx)(Qr,{className:`size-3.5`}),`Go to deployment page`]})})}function ble({git:e}){return!e.ref&&!e.commitMessage&&!e.author?null:(0,H.jsxs)(`div`,{className:`space-y-0.5 text-xs`,children:[e.ref&&(0,H.jsxs)(`p`,{children:[`Branch `,(0,H.jsx)(`span`,{className:`font-mono`,children:e.ref}),e.author&&(0,H.jsxs)(H.Fragment,{children:[` · by `,e.author]})]}),e.commitMessage&&(0,H.jsxs)(`p`,{className:`truncate`,children:[`“`,e.commitMessage,`”`]})]})}function GL({href:e,label:t}){return(0,H.jsxs)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:`flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground`,children:[(0,H.jsx)(Qr,{className:`size-3.5`}),t]})}function xle(){let{state:e,start:t,stop:n}=oI(),{copied:r,copy:i}=xj(),a=e.status===`connected`?`${e.url}/mcp`:null,o=a?()=>i(a):e.status===`starting`?n:t;return(0,H.jsxs)(BL,{className:pj(`w-60 text-center`,e.status===`starting`&&`animate-pulse w-60`),trigger:(0,H.jsxs)(ra,{variant:`secondary`,onClick:o,children:[(0,H.jsx)(eI,{className:`size-2`,...lle[e.status],"aria-hidden":!0}),a?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`mx-2 font-mono text-xs`,children:a.replace(/^https?:\/\//,``)}),r?(0,H.jsx)(Kr,{className:`size-3.5`}):(0,H.jsx)(Zr,{className:`size-3.5`})]}):`Tunnel`]}),children:[e.status===`idle`&&(0,H.jsx)(Sle,{}),e.status===`error`&&(0,H.jsx)(Cle,{message:e.message,onRetry:t}),e.status===`starting`&&(0,H.jsx)(wle,{message:e.message}),e.status===`connected`&&(0,H.jsx)(Tle,{onStop:n})]})}function Sle(){return(0,H.jsx)(`div`,{className:`space-y-3`,children:(0,H.jsx)(`p`,{className:pj(`text-sm text-muted-foreground mx-auto`,zL),children:`Get a public URL that you can use in Claude or ChatGPT.`})})}function Cle({message:e,onRetry:t}){return(0,H.jsxs)(`div`,{className:`space-y-3 text-left`,children:[(0,H.jsx)(`p`,{className:`text-sm text-destructive`,children:e}),(0,H.jsx)(ra,{variant:`primary`,className:`w-full`,onClick:t,children:`Retry`})]})}function wle({message:e}){return(0,H.jsx)(`div`,{className:`space-y-3`,children:(0,H.jsxs)(`div`,{className:`flex items-center justify-center gap-2`,children:[(0,H.jsx)(eI,{className:`size-2`,variant:`warning`,pulse:!0,"aria-hidden":!0}),(0,H.jsx)(`p`,{className:pj(`text-sm text-muted-foreground`,zL),children:e}),(0,H.jsx)($F,{size:`sm`,className:`text-current`})]})})}function Tle({onStop:e}){return(0,H.jsxs)(`div`,{className:`space-y-3 text-left`,children:[(0,H.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Click to copy the tunnel URL to use in Claude or ChatGPT`})}),(0,H.jsx)(qj,{}),(0,H.jsx)(ra,{variant:`tertiary`,className:`w-full`,onClick:e,icon:(0,H.jsx)(Di,{}),children:`Stop tunnel`})]})}var Ele=[{id:`webmcp`,title:`Drive DevTools from your coding agent`,body:`DevTools exposes its actions as WebMCP tools. An agent driving your browser through chrome-devtools-mcp can run a tool, screenshot the rendered view, and fix what is wrong — without you touching DevTools.`,note:`WebMCP is experimental and requires Chrome 149 or newer.`,links:[{label:`Set it up`,href:`https://docs.skybridge.tech/test/devtools#set-it-up`},{label:`What is WebMCP?`,href:`https://www.webfuse.com/blog/what-is-webmcp-the-practical-guide-to-the-web-model-context-protocol`}]}];function Dle({tip:e}){return(0,H.jsxs)(`section`,{className:`rounded-lg border border-border bg-light-gray p-4`,children:[(0,H.jsx)(`h3`,{className:`font-medium text-sm`,children:e.title}),(0,H.jsx)(`p`,{className:`mt-1.5 text-muted-foreground text-sm leading-relaxed`,children:e.body}),e.note&&(0,H.jsx)(`p`,{className:`mt-2 text-quaternary-foreground text-xs`,children:e.note}),(0,H.jsx)(`div`,{className:`-mx-2 mt-3 flex flex-wrap items-center gap-1`,children:e.links.map(e=>(0,H.jsx)(ra,{asChild:!0,variant:`tertiary`,children:(0,H.jsxs)(`a`,{href:e.href,target:`_blank`,rel:`noreferrer noopener`,children:[(0,H.jsx)(Qr,{className:`size-3.5`}),e.label]})},e.href))})]})}function Ole(){let[e,t]=(0,b.useState)(!1);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ra,{variant:`tertiary`,onClick:()=>t(!0),children:`webmcp`}),(0,H.jsx)(vI,{open:e,onOpenChange:t,children:(0,H.jsxs)(yI,{size:`lg`,children:[(0,H.jsxs)(bI,{children:[(0,H.jsx)(SI,{children:`WebMCP`}),(0,H.jsx)(CI,{className:`sr-only`,children:`Features of DevTools that are easy to miss.`})]}),(0,H.jsx)(`div`,{className:`space-y-3 overflow-y-auto pb-6`,children:Ele.map(e=>(0,H.jsx)(Dle,{tip:e},e.id))})]})})]})}var kle=[{label:`discord`,href:`https://discord.gg/awV4gu74wK`},{label:`docs`,href:`https://docs.skybridge.tech/`},{label:`github`,href:`https://github.com/alpic-ai/skybridge`}];function Ale({children:e}){return(0,H.jsx)(`div`,{className:`inline-flex h-8 items-center gap-2 rounded-md px-2.5 text-sm bg-light-gray border`,children:e})}function jle(){let[,e]=kO();return(0,H.jsxs)(ra,{variant:`tertiary`,className:`sparkle-twinkle`,onClick:()=>e(!0),children:[(0,H.jsx)(Si,{className:`size-3.5`,"aria-hidden":!0}),`Discover Evals`]})}function Mle(){let e=GO(),t=e?.name??`skybridge`,n=e?.version;return(0,H.jsxs)(Ale,{children:[(0,H.jsx)(`img`,{src:`/skybridge.svg`,alt:``,"aria-hidden":!0,className:`size-3.5`}),(0,H.jsx)(`span`,{children:t}),(0,H.jsx)(qj,{orientation:`vertical`,className:`h-4 self-center!`}),n&&(0,H.jsx)(`span`,{className:`font-mono text-xs text-quaternary-foreground`,children:n})]})}var Nle=()=>{let{status:e,requiresAuth:t,hasAuthRequiredTools:n,isSignedIn:r,error:i}=us();return(0,H.jsxs)(`header`,{className:`flex h-13 items-center justify-between gap-3 border-b border-border px-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(Mle,{}),(0,H.jsx)(jle,{}),(0,H.jsx)(hle,{})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(xle,{}),(0,H.jsx)(fle,{}),(0,H.jsx)(ple,{}),(0,H.jsx)(gle,{})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[i&&(0,H.jsx)(`span`,{className:`max-w-48 truncate text-xs text-destructive`,children:i}),t&&(0,H.jsx)(Yj,{status:e}),t&&e===`authenticated`&&n&&!r&&(0,H.jsxs)(ra,{variant:`tertiary`,onClick:()=>BO(),children:[(0,H.jsx)(oi,{className:`size-3.5`}),`Sign in`]}),t&&e===`authenticated`&&r&&(0,H.jsxs)(ra,{variant:`tertiary`,onClick:()=>HO(),children:[(0,H.jsx)(si,{className:`size-3.5`}),`Sign out`]}),(0,H.jsxs)(`nav`,{className:`flex items-center gap-1 text-xs`,children:[(0,H.jsx)(Ole,{}),kle.map(e=>(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,H.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,H.jsx)(ra,{asChild:!0,variant:`tertiary`,children:(0,H.jsx)(`a`,{href:e.href,target:`_blank`,rel:`noreferrer noopener`,children:e.label})})]},e.label))]})]})]})},KL=1,Ple=.9,Fle=.8,Ile=.17,qL=.1,JL=.999,Lle=.9999,Rle=.99,zle=/[\\\/_+.#"@\[\(\{&]/,Ble=/[\\\/_+.#"@\[\(\{&]/g,Vle=/[\s-]/,YL=/[\s-]/g;function XL(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?KL:Rle;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=XL(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=KL:zle.test(e.charAt(l-1))?(d*=Fle,p=e.slice(i,l-1).match(Ble),p&&i>0&&(d*=JL**+p.length)):Vle.test(e.charAt(l-1))?(d*=Ple,m=e.slice(i,l-1).match(YL),m&&i>0&&(d*=JL**+m.length)):(d*=Ile,i>0&&(d*=JL**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Lle)),(d<qL&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=XL(e,t,n,r,l+1,a+2,o),f*qL>d&&(d=f*qL)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function ZL(e){return e.toLowerCase().replace(YL,` `)}function Hle(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,XL(e,t,ZL(e),ZL(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function QL(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function $L(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function eR(...e){return t=>{let n=!1,r=e.map(e=>{let r=$L(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():$L(e[t],null)}}}}function tR(...e){return b.useCallback(eR(...e),e)}function Ule(e,t){let n=b.createContext(t),r=e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,H.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=b.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function nR(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=b.useMemo(()=>o,Object.values(o));return(0,H.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=b.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>b.createContext(e));return function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Wle(i,...t)]}function Wle(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var rR=globalThis?.document?b.useLayoutEffect:()=>{},Gle=b.useId||(()=>void 0),Kle=0;function iR(e){let[t,n]=b.useState(Gle());return rR(()=>{e||n(e=>e??String(Kle++))},[e]),e||(t?`radix-${t}`:``)}var qle=b.useInsertionEffect||rR;function aR({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Jle({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=b.useRef(e!==void 0);b.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`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.`),t.current=s},[s,r])}return[c,b.useCallback(t=>{if(s){let n=Yle(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Jle({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return qle(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Yle(e){return typeof e==`function`}function oR(e){let t=Xle(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e,a=b.Children.toArray(r),o=a.find(Qle);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,H.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,H.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Xle(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(b.isValidElement(n)){let e=eue(n),i=$le(r,n.props);return n.type!==b.Fragment&&(i.ref=t?eR(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Zle=Symbol(`radix.slottable`);function Qle(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Zle}function $le(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function eue(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sR=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=oR(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function tue(e,t){e&&cC.flushSync(()=>e.dispatchEvent(t))}function cR(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...e)=>t.current?.(...e),[])}function nue(e,t=globalThis?.document){let n=cR(e);b.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var rue=`DismissableLayer`,lR=`dismissableLayer.update`,iue=`dismissableLayer.pointerDownOutside`,aue=`dismissableLayer.focusOutside`,uR,dR=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),fR=b.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=b.useContext(dR),[u,d]=b.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=b.useState({}),m=tR(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,x=v>=_,S=cue(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=lue(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return nue(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),b.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(uR=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),pR(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=uR)}},[u,f,n,l]),b.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),pR())},[u,l]),b.useEffect(()=>{let e=()=>p({});return document.addEventListener(lR,e),()=>document.removeEventListener(lR,e)},[]),(0,H.jsx)(sR.div,{...c,ref:m,style:{pointerEvents:y?x?`auto`:`none`:void 0,...e.style},onFocusCapture:QL(e.onFocusCapture,C.onFocusCapture),onBlurCapture:QL(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:QL(e.onPointerDownCapture,S.onPointerDownCapture)})});fR.displayName=rue;var oue=`DismissableLayerBranch`,sue=b.forwardRef((e,t)=>{let n=b.useContext(dR),r=b.useRef(null),i=tR(t,r);return b.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,H.jsx)(sR.div,{...e,ref:i})});sue.displayName=oue;function cue(e,t=globalThis?.document){let n=cR(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){mR(iue,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function lue(e,t=globalThis?.document){let n=cR(e),r=b.useRef(!1);return b.useEffect(()=>{let e=e=>{e.target&&!r.current&&mR(aue,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function pR(){let e=new CustomEvent(lR);document.dispatchEvent(e)}function mR(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?tue(i,a):i.dispatchEvent(a)}var hR=`focusScope.autoFocusOnMount`,gR=`focusScope.autoFocusOnUnmount`,_R={bubbles:!1,cancelable:!0},uue=`FocusScope`,vR=b.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=cR(i),u=cR(a),d=b.useRef(null),f=tR(t,e=>c(e)),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:xR(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||xR(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&xR(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),b.useEffect(()=>{if(s){SR.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(hR,_R);s.addEventListener(hR,l),s.dispatchEvent(t),t.defaultPrevented||(due(gue(yR(s)),{select:!0}),document.activeElement===e&&xR(s))}return()=>{s.removeEventListener(hR,l),setTimeout(()=>{let t=new CustomEvent(gR,_R);s.addEventListener(gR,u),s.dispatchEvent(t),t.defaultPrevented||xR(e??document.body,{select:!0}),s.removeEventListener(gR,u),SR.remove(p)},0)}}},[s,l,u,p]);let m=b.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=fue(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&xR(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&xR(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,H.jsx)(sR.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});vR.displayName=uue;function due(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(xR(r,{select:t}),document.activeElement!==n)return}function fue(e){let t=yR(e);return[bR(t,e),bR(t.reverse(),e)]}function yR(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function bR(e,t){for(let n of e)if(!pue(n,{upTo:t}))return n}function pue(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 mue(e){return e instanceof HTMLInputElement&&`select`in e}function xR(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mue(e)&&t&&e.select()}}var SR=hue();function hue(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=CR(e,t),e.unshift(t)},remove(t){e=CR(e,t),e[0]?.resume()}}}function CR(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function gue(e){return e.filter(e=>e.tagName!==`A`)}var _ue=`Portal`,wR=b.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=b.useState(!1);rR(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?cC.createPortal((0,H.jsx)(sR.div,{...r,ref:t}),o):null});wR.displayName=_ue;function vue(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var TR=e=>{let{present:t,children:n}=e,r=yue(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=tR(r.ref,bue(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};TR.displayName=`Presence`;function yue(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=vue(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=ER(r.current);a.current=o===`mounted`?e:`none`},[o]),rR(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=ER(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),rR(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=ER(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=ER(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:b.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function ER(e){return e?.animationName||`none`}function bue(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var DR=0;function xue(){b.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??OR()),document.body.insertAdjacentElement(`beforeend`,e[1]??OR()),DR++,()=>{DR===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),DR--}},[])}function OR(){let 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 kR=`Dialog`,[AR,Sue]=nR(kR),[Cue,jR]=AR(kR),MR=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=b.useRef(null),c=b.useRef(null),[l,u]=aR({prop:r,defaultProp:i??!1,onChange:a,caller:kR});return(0,H.jsx)(Cue,{scope:t,triggerRef:s,contentRef:c,contentId:iR(),titleId:iR(),descriptionId:iR(),open:l,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};MR.displayName=kR;var NR=`DialogTrigger`,wue=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=jR(NR,n),a=tR(t,i.triggerRef);return(0,H.jsx)(sR.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":GR(i.open),...r,ref:a,onClick:QL(e.onClick,i.onOpenToggle)})});wue.displayName=NR;var PR=`DialogPortal`,[Tue,FR]=AR(PR,{forceMount:void 0}),IR=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=jR(PR,t);return(0,H.jsx)(Tue,{scope:t,forceMount:n,children:b.Children.map(r,e=>(0,H.jsx)(TR,{present:n||a.open,children:(0,H.jsx)(wR,{asChild:!0,container:i,children:e})}))})};IR.displayName=PR;var LR=`DialogOverlay`,RR=b.forwardRef((e,t)=>{let n=FR(LR,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=jR(LR,e.__scopeDialog);return a.modal?(0,H.jsx)(TR,{present:r||a.open,children:(0,H.jsx)(Due,{...i,ref:t})}):null});RR.displayName=LR;var Eue=oR(`DialogOverlay.RemoveScroll`),Due=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=jR(LR,n);return(0,H.jsx)(zF,{as:Eue,allowPinchZoom:!0,shards:[i.contentRef],children:(0,H.jsx)(sR.div,{"data-state":GR(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),zR=`DialogContent`,BR=b.forwardRef((e,t)=>{let n=FR(zR,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=jR(zR,e.__scopeDialog);return(0,H.jsx)(TR,{present:r||a.open,children:a.modal?(0,H.jsx)(Oue,{...i,ref:t}):(0,H.jsx)(kue,{...i,ref:t})})});BR.displayName=zR;var Oue=b.forwardRef((e,t)=>{let n=jR(zR,e.__scopeDialog),r=b.useRef(null),i=tR(t,n.contentRef,r);return b.useEffect(()=>{let e=r.current;if(e)return dF(e)},[]),(0,H.jsx)(VR,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:QL(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:QL(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:QL(e.onFocusOutside,e=>e.preventDefault())})}),kue=b.forwardRef((e,t)=>{let n=jR(zR,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return(0,H.jsx)(VR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),VR=b.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=jR(zR,n),c=b.useRef(null),l=tR(t,c);return xue(),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(vR,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(fR,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":GR(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Pue,{titleId:s.titleId}),(0,H.jsx)(Iue,{contentRef:c,descriptionId:s.descriptionId})]})]})}),HR=`DialogTitle`,Aue=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=jR(HR,n);return(0,H.jsx)(sR.h2,{id:i.titleId,...r,ref:t})});Aue.displayName=HR;var UR=`DialogDescription`,jue=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=jR(UR,n);return(0,H.jsx)(sR.p,{id:i.descriptionId,...r,ref:t})});jue.displayName=UR;var WR=`DialogClose`,Mue=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=jR(WR,n);return(0,H.jsx)(sR.button,{type:`button`,...r,ref:t,onClick:QL(e.onClick,()=>i.onOpenChange(!1))})});Mue.displayName=WR;function GR(e){return e?`open`:`closed`}var KR=`DialogTitleWarning`,[Nue,qR]=Ule(KR,{contentName:zR,titleName:HR,docsSlug:`dialog`}),Pue=({titleId:e})=>{let t=qR(KR),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
163
+
164
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
165
+
166
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Fue=`DialogDescriptionWarning`,Iue=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qR(Fue).contentName}}.`;return b.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Lue=MR,Rue=IR,zue=RR,Bue=BR,Vue=Symbol.for(`react.lazy`),JR=b.use;function Hue(e){return typeof e==`object`&&!!e&&`then`in e}function YR(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Vue&&`_payload`in e&&Hue(e._payload)}function Uue(e){let t=Wue(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e;YR(r)&&typeof JR==`function`&&(r=JR(r._payload));let a=b.Children.toArray(r),o=a.find(Kue);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,H.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,H.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Wue(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(YR(n)&&typeof JR==`function`&&(n=JR(n._payload)),b.isValidElement(n)){let e=Jue(n),i=que(r,n.props);return n.type!==b.Fragment&&(i.ref=t?eR(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gue=Symbol(`radix.slottable`);function Kue(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Gue}function que(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Jue(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var XR=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Uue(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ZR=`[cmdk-group=""]`,QR=`[cmdk-group-items=""]`,Yue=`[cmdk-group-heading=""]`,$R=`[cmdk-item=""]`,ez=`${$R}:not([aria-disabled="true"])`,tz=`cmdk-item-select`,nz=`data-value`,rz=(e,t,n)=>Hle(e,t,n),iz=b.createContext(void 0),az=()=>b.useContext(iz),oz=b.createContext(void 0),sz=()=>b.useContext(oz),cz=b.createContext(void 0),lz=b.forwardRef((e,t)=>{let n=Cz(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=Cz(()=>new Set),i=Cz(()=>new Map),a=Cz(()=>new Map),o=Cz(()=>new Set),s=xz(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=iR(),y=iR(),x=iR(),S=b.useRef(null),C=Ez();Sz(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),Sz(()=>{C(6,A)},[]);let w=b.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)k(),D(),C(1,O);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=j()?.id,w.emit()}),r||C(5,A),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),T=b.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,E(t,r)),C(2,()=>{D(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{k(),D(),n.current.value||O(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=j();C(4,()=>{k(),t?.getAttribute(`id`)===e&&O(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:x,labelId:y,listInnerRef:S}),[]);function E(e,t){let r=s.current?.filter??rz;return e?r(e,n.current.search,t):0}function D(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;M().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(QR);t?t.appendChild(e.parentElement===t?e:e.closest(`${QR} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${QR} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${ZR}[${nz}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(nz);w.setState(`value`,e||void 0)}function k(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=E(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function A(){var e;let t=j();t&&(t.parentElement?.firstChild===t&&((e=t.closest(ZR)?.querySelector(Yue))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${$R}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(ez)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(nz))}function P(e){var t;let n=j(),r=M(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(nz))}function F(e){let t=j()?.closest(ZR),n;for(;t&&!n;)t=e>0?yz(t,ZR):bz(t,ZR),n=t?.querySelector(ez);n?w.setState(`value`,n.getAttribute(nz)):P(e)}let I=()=>N(M().length-1),L=e=>{e.preventDefault(),e.metaKey?I():e.altKey?F(1):P(1)},ee=e=>{e.preventDefault(),e.metaKey?N(0):e.altKey?F(-1):P(-1)};return b.createElement(XR.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&L(e);break;case`ArrowDown`:L(e);break;case`p`:case`k`:g&&e.ctrlKey&&ee(e);break;case`ArrowUp`:ee(e);break;case`Home`:e.preventDefault(),N(0);break;case`End`:e.preventDefault(),I();break;case`Enter`:{e.preventDefault();let t=j();if(t){let e=new Event(tz);t.dispatchEvent(e)}}}}},b.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:kz},c),Oz(e,e=>b.createElement(oz.Provider,{value:w},b.createElement(iz.Provider,{value:T},e))))}),uz=b.forwardRef((e,t)=>{let n=iR(),r=b.useRef(null),i=b.useContext(cz),a=az(),o=xz(e),s=o.current?.forceMount??i?.forceMount;Sz(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=Tz(n,r,[e.value,e.children,r],e.keywords),l=sz(),u=wz(e=>e.value&&e.value===c.current),d=wz(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);b.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(tz,f),()=>t.removeEventListener(tz,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return b.createElement(XR.div,{ref:eR(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),dz=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=iR(),s=b.useRef(null),c=b.useRef(null),l=iR(),u=az(),d=wz(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));Sz(()=>u.group(o),[]),Tz(o,s,[e.value,e.heading,c]);let f=b.useMemo(()=>({id:o,forceMount:i}),[i]);return b.createElement(XR.div,{ref:eR(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&b.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),Oz(e,e=>b.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},b.createElement(cz.Provider,{value:f},e))))}),fz=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=b.useRef(null),a=wz(e=>!e.search);return!n&&!a?null:b.createElement(XR.div,{ref:eR(i,t),...r,"cmdk-separator":``,role:`separator`})}),pz=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=sz(),o=wz(e=>e.search),s=wz(e=>e.selectedItemId),c=az();return b.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),b.createElement(XR.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),mz=b.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=b.useRef(null),o=b.useRef(null),s=wz(e=>e.selectedItemId),c=az();return b.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),b.createElement(XR.div,{ref:eR(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},Oz(e,e=>b.createElement(`div`,{ref:eR(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),hz=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return b.createElement(Lue,{open:n,onOpenChange:r},b.createElement(Rue,{container:o},b.createElement(zue,{"cmdk-overlay":``,className:i}),b.createElement(Bue,{"aria-label":e.label,"cmdk-dialog":``,className:a},b.createElement(lz,{ref:t,...s}))))}),gz=b.forwardRef((e,t)=>wz(e=>e.filtered.count===0)?b.createElement(XR.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),_z=b.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return b.createElement(XR.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Oz(e,e=>b.createElement(`div`,{"aria-hidden":!0},e)))}),vz=Object.assign(lz,{List:mz,Item:uz,Input:pz,Group:dz,Separator:fz,Dialog:hz,Empty:gz,Loading:_z});function yz(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function bz(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function xz(e){let t=b.useRef(e);return Sz(()=>{t.current=e}),t}var Sz=typeof window>`u`?b.useEffect:b.useLayoutEffect;function Cz(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function wz(e){let t=sz(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function Tz(e,t,n,r=[]){let i=b.useRef(),a=az();return Sz(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(nz,s),i.current=s}),i}var Ez=()=>{let[e,t]=b.useState(),n=Cz(()=>new Map);return Sz(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function Dz(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function Oz({asChild:e,children:t},n){return e&&b.isValidElement(t)?b.cloneElement(Dz(t),{ref:t.ref},n(t.props.children)):n(t)}var kz={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function Az({className:e,...t}){return(0,H.jsx)(vz,{"data-slot":`command`,className:Mr(`bg-popover text-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})}function jz({className:e,...t}){return(0,H.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-14 items-center gap-2 border-b p-3`,children:[(0,H.jsx)(yi,{className:`size-5 shrink-0 text-muted-foreground`}),(0,H.jsx)(vz.Input,{"data-slot":`command-input`,className:Mr(`placeholder:text-placeholder flex h-full w-full bg-transparent type-text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function Mz({className:e,...t}){return(0,H.jsx)(vz.List,{"data-slot":`command-list`,className:Mr(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function Nz({...e}){return(0,H.jsx)(vz.Empty,{"data-slot":`command-empty`,className:`py-6 text-center type-text-sm text-muted-foreground`,...e})}function Pz({className:e,...t}){return(0,H.jsx)(vz.Group,{"data-slot":`command-group`,className:Mr(`text-foreground [&_[cmdk-group-heading]]:text-subtle-foreground overflow-hidden px-2 py-1 [&_[cmdk-group-heading]]:p-2 [&_[cmdk-group-heading]]:type-text-xs [&_[cmdk-group-heading]]:font-medium`,e),...t})}function Fz({className:e,...t}){return(0,H.jsx)(vz.Item,{"data-slot":`command-item`,className:Mr(`data-[selected=true]:bg-background-hover [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-xs px-2 py-3 type-text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:text-disabled-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-5`,e),...t})}function Iz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`path`,{d:`M8.167 2.501a.665.665 0 0 1 0 1.33H5.834a2 2 0 0 0-2.002 2.002v8.333c0 1.106.896 2.002 2.002 2.002h8.333a2 2 0 0 0 2.002-2.002v-2.333a.665.665 0 0 1 1.33 0v2.333a3.33 3.33 0 0 1-3.332 3.332H5.834a3.33 3.33 0 0 1-3.332-3.332V5.833a3.333 3.333 0 0 1 3.332-3.332z`}),(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M13.427 3.104a2.451 2.451 0 0 1 3.46 3.472l-5.163 5.203a3.13 3.13 0 0 1-1.55.853l-2.386.524a.815.815 0 0 1-.97-.971l.525-2.38c.13-.59.429-1.131.86-1.556zm2.512.953a1.12 1.12 0 0 0-1.579-.006L9.136 9.197c-.247.244-.42.554-.495.894l-.351 1.594 1.598-.352c.338-.074.648-.245.892-.49l5.162-5.204a1.12 1.12 0 0 0-.003-1.582`,clipRule:`evenodd`})]})})}function Lz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,...e,children:(0,H.jsx)(`path`,{d:`M6.95 2.668a3 3 0 0 1 1.763.574l1.064.774c.286.207.63.32.982.32h4.408a3 3 0 0 1 2.998 2.997v7a3 3 0 0 1-2.998 2.998H4.833a3 3 0 0 1-2.998-2.997V5.667a3 3 0 0 1 2.998-2.999zM3.164 9.831v4.503c0 .92.747 1.667 1.668 1.668h10.334c.921 0 1.668-.747 1.668-1.668V9.83zm1.668-5.832c-.921 0-1.668.746-1.668 1.668V8.5h13.67V7.334c0-.922-.747-1.668-1.668-1.668h-4.408a3 3 0 0 1-1.764-.575l-1.064-.773a1.67 1.67 0 0 0-.982-.32z`})})}function Rz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M6.001 14.167a1.002 1.002 0 1 0-2.003-.001 1.002 1.002 0 0 0 2.003 0m10.665-.665.135.013a.665.665 0 0 1 0 1.303l-.135.014h-5.833a.665.665 0 0 1 0-1.33zM6.643 3.669a.666.666 0 0 1 1.042.78l-.07.117-2.5 3.333a.666.666 0 0 1-.958.111l-1.25-1.04-.094-.097a.665.665 0 0 1 .835-1.001l.111.076.712.593 2.08-2.774zm10.023 1.5.135.013a.665.665 0 0 1 0 1.303l-.135.014h-5.833a.665.665 0 0 1 0-1.33zm-9.335 8.998a2.332 2.332 0 1 1-4.663 0 2.332 2.332 0 0 1 4.663 0`})})}function zz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,...e,children:(0,H.jsx)(`path`,{strokeWidth:`1.33`,d:`M6.804 15.133V4.867m0 10.266c0 .847-.687 1.534-1.534 1.534H3.754a1.533 1.533 0 0 1-1.534-1.534V4.867c0-.847.687-1.534 1.534-1.534H5.27c.847 0 1.534.687 1.534 1.534m0 10.266c0 .847.686 1.534 1.533 1.534h1.517c.847 0 1.533-.687 1.533-1.534V4.867c0-.847-.686-1.534-1.533-1.534H8.337c-.847 0-1.533.687-1.533 1.534m8.536 11.83 1.493-.263a1.533 1.533 0 0 0 1.244-1.777l-1.783-10.11a1.533 1.533 0 0 0-1.776-1.244l-1.494.263a1.533 1.533 0 0 0-1.243 1.777l1.782 10.11c.147.834.943 1.391 1.777 1.244Z`})})}function Bz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`none`,stroke:`currentColor`,...e,children:(0,H.jsxs)(`g`,{strokeLinecap:`round`,strokeWidth:`1.33`,children:[(0,H.jsx)(`path`,{d:`M12.524 12.192c1.803 1.946 4.692.822 4.893-2.058.286-4.087-2.553-7.613-7.104-7.613-3.98 0-7.46 3.038-7.731 6.934-.3 4.3 2.766 7.974 7.416 7.974 1.57 0 3.184-.37 4.381-1.218M6.374 8.96l1.098 1.141M9.124 6.313l1.099 1.14`}),(0,H.jsx)(`path`,{d:`m11.028 6.89-4.142 3.987a.21.21 0 0 0-.006.295c.534.557 1.303 1.37 1.303 1.37 1.185 1.23 2.815.978 4.064-.224 1.25-1.203 1.606-2.795.38-4.053l-1.304-1.368a.21.21 0 0 0-.295-.007Z`})]})})}function Vz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`path`,{d:`M8.195 10.381c.423 0 .767.344.767.767v1.038a.768.768 0 0 1-1.534 0v-1.038c0-.423.344-.766.767-.767M11.715 10.381c.424 0 .767.344.767.767v1.038a.767.767 0 0 1-1.533 0v-1.038c0-.423.343-.766.766-.767`}),(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M10 1.667a1.694 1.694 0 0 1 .665 3.252v.884c1.425.028 2.833.145 4.24.368 1.299.207 2.394 1.182 2.623 2.529q.08.477.125.93a2.053 2.053 0 0 1 .03 4.068 15 15 0 0 1-.155 1.248c-.229 1.347-1.324 2.322-2.622 2.528A31 31 0 0 1 10 17.85c-1.653 0-3.28-.116-4.906-.375-1.298-.206-2.393-1.181-2.622-2.528a15 15 0 0 1-.155-1.248 2.052 2.052 0 0 1 .03-4.068q.045-.453.125-.93c.229-1.347 1.324-2.322 2.622-2.529a31 31 0 0 1 4.241-.368V4.92A1.693 1.693 0 0 1 10 1.667m0 5.46c-1.59 0-3.147.111-4.698.358-.786.125-1.394.702-1.518 1.436-.173 1.018-.202 1.945-.202 2.902l.006.714a15 15 0 0 0 .196 2.187c.124.734.732 1.311 1.518 1.437 1.551.246 3.108.358 4.698.358 1.589 0 3.146-.112 4.697-.358.786-.125 1.395-.703 1.52-1.437.172-1.018.201-1.944.202-2.901l-.008-.714a15 15 0 0 0-.195-2.188c-.124-.734-.733-1.311-1.52-1.436A30 30 0 0 0 10 7.126`,clipRule:`evenodd`})]})})}function Hz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`path`,{d:`M13.334 11.417a.666.666 0 0 1 0 1.33h-2.5a.665.665 0 0 1 0-1.33zM6.742 7.346a.665.665 0 0 1 .912.228l1.121 1.868c.206.343.206.771 0 1.114l-1.12 1.869a.666.666 0 0 1-1.141-.685L7.558 10 6.514 8.258a.665.665 0 0 1 .228-.912`}),(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M7.798 1.78a4.49 4.49 0 0 1 4.14.979 4.488 4.488 0 0 1 5.301 5.3 4.487 4.487 0 0 1-1.94 7.239 4.485 4.485 0 0 1-7.238 1.94 4.486 4.486 0 0 1-5.301-5.3A4.487 4.487 0 0 1 4.7 4.7 4.49 4.49 0 0 1 7.798 1.78m3.311 2.02a3.16 3.16 0 0 0-5.17 1.385c-.111.359-.393.642-.752.753A3.16 3.16 0 0 0 3.8 11.11c.255.277.358.662.275 1.029a3.16 3.16 0 0 0 3.785 3.785L8 15.9c.323-.032.649.075.89.298a3.16 3.16 0 0 0 5.17-1.385l.05-.13c.133-.297.389-.526.704-.623a3.16 3.16 0 0 0 1.385-5.17 1.15 1.15 0 0 1-.275-1.03 3.16 3.16 0 0 0-3.785-3.785 1.15 1.15 0 0 1-1.03-.275`,clipRule:`evenodd`})]})})}function Uz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M9.79 18.51a1.8 1.8 0 0 1-.99.27 1.74 1.74 0 0 1-.97-.32l-3.48-2.38a2 2 0 0 1-.64-.71 1.9 1.9 0 0 1-.23-.91V6.53q0-.49.22-.89.23-.399.66-.66l5.72-3.52q.49-.3 1.06-.29.57 0 1.05.32l3.52 2.4q.39.28.6.67.21.381.21.84v7.89q0 .5-.25.95t-.69.71zm4.59-13.85-2.96-2.02a.52.52 0 0 0-.31-.1.5.5 0 0 0-.3.08L5.5 5.89l3.27 2.22zM8.14 9.33 4.86 7.11v3.1l3.28 2.24zm0 4.71L4.86 11.8v2.66q0 .15.06.28.06.12.19.21l3.03 2.07zm7-5.15V5.81L9.52 9.26v3.09zm-.28 4.9a.6.6 0 0 0 .21-.21.6.6 0 0 0 .07-.29v-2.81l-5.62 3.46v3.13z`})})}function Wz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,...e,children:(0,H.jsx)(`path`,{d:`M9.162 2.38a6.707 6.707 0 0 1 5.155 10.993l3.243 3.243a.665.665 0 1 1-.94.94l-3.25-3.249A6.707 6.707 0 1 1 9.162 2.38m0 1.33a5.377 5.377 0 1 0 0 10.754 5.377 5.377 0 0 0 0-10.754`})})}function Gz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M6.835 4c-.451.004-.82.012-1.137.038-.386.032-.659.085-.876.162l-.2.086c-.44.224-.807.564-1.063.982l-.103.184c-.126.247-.206.562-.248 1.076-.043.523-.043 1.19-.043 2.135v2.664c0 .944 0 1.612.043 2.135.042.515.122.829.248 1.076l.103.184c.256.418.624.758 1.063.982l.2.086c.217.077.49.13.876.162.316.026.685.034 1.136.038zm11.33 7.327c0 .922 0 1.654-.048 2.243-.043.522-.125.977-.305 1.395l-.082.177a4 4 0 0 1-1.473 1.593l-.276.155c-.465.237-.974.338-1.57.387-.59.048-1.322.048-2.244.048H7.833c-.922 0-1.654 0-2.243-.048-.522-.042-.977-.126-1.395-.305l-.176-.082a4 4 0 0 1-1.594-1.473l-.154-.275c-.238-.466-.34-.975-.388-1.572-.048-.589-.048-1.32-.048-2.243V8.663c0-.922 0-1.654.048-2.243.049-.597.15-1.106.388-1.571l.154-.276a4 4 0 0 1 1.594-1.472l.176-.083c.418-.18.873-.263 1.395-.305.589-.048 1.32-.048 2.243-.048h4.334c.922 0 1.654 0 2.243.048.597.049 1.106.15 1.571.388l.276.154a4 4 0 0 1 1.473 1.594l.082.176c.18.418.262.873.305 1.395.048.589.048 1.32.048 2.243zm-10 4.668h4.002c.944 0 1.612 0 2.135-.043.514-.042.829-.122 1.076-.248l.184-.103c.418-.256.758-.624.982-1.063l.086-.2c.077-.217.13-.49.162-.876.043-.523.043-1.19.043-2.135V8.663c0-.944 0-1.612-.043-2.135-.032-.386-.085-.659-.162-.876l-.086-.2a2.67 2.67 0 0 0-.982-1.063l-.184-.103c-.247-.126-.562-.206-1.076-.248-.523-.043-1.19-.043-2.135-.043H8.164L8.165 4z`})})}function Kz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M10 2.533a.8.8 0 0 1 .8.8V9.2h5.866a.8.8 0 1 1 0 1.6H10.8v5.866a.8.8 0 1 1-1.6 0V10.8H3.333a.8.8 0 0 1 0-1.6H9.2V3.333a.8.8 0 0 1 .8-.8`})})}function qz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`path`,{d:`M18.585 13.412a.9.9 0 0 1 1.668.676 8.91 8.91 0 0 1-7.353 5.516V22a.9.9 0 0 1-1.8 0v-2.396a8.91 8.91 0 0 1-7.352-5.516.9.9 0 0 1 1.668-.676 7.104 7.104 0 0 0 13.169 0`}),(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M12 1.35a4.9 4.9 0 0 1 4.9 4.9v4.483a4.9 4.9 0 0 1-9.8 0V6.25a4.9 4.9 0 0 1 4.9-4.9m0 1.8a3.1 3.1 0 0 0-3.1 3.1v4.483a3.1 3.1 0 1 0 6.2 0V6.25a3.1 3.1 0 0 0-3.1-3.1`,clipRule:`evenodd`})]})})}function Jz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M7.167 15.416V4.583a.75.75 0 0 1 1.5 0v10.833a.75.75 0 0 1-1.5 0m4.166-2.5V7.083a.75.75 0 0 1 1.5 0v5.833a.75.75 0 0 1-1.5 0M3 11.25v-2.5a.75.75 0 0 1 1.5 0v2.5a.75.75 0 0 1-1.5 0m12.5 0v-2.5a.75.75 0 0 1 1.5 0v2.5a.75.75 0 0 1-1.5 0`})})}function Yz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M14.255 4.755a.7.7 0 0 1 .99.99L10.99 10l4.255 4.255.09.11a.7.7 0 0 1-.97.97l-.11-.09L10 10.99l-4.255 4.255a.7.7 0 0 1-.99-.99L9.01 10 4.755 5.745l-.09-.11a.7.7 0 0 1 .97-.97l.11.09L10 9.01z`})})}function Xz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M11.248 18.25q-.825 0-1.568-.314a4.3 4.3 0 0 1-1.32-.874 4 4 0 0 1-1.303.214 4 4 0 0 1-2.046-.544 4.27 4.27 0 0 1-1.518-1.485 4 4 0 0 1-.561-2.095q0-.48.132-1.04A4.4 4.4 0 0 1 2.04 10.71a4.07 4.07 0 0 1 .016-3.4 4.2 4.2 0 0 1 1.056-1.418 3.8 3.8 0 0 1 1.6-.842 3.9 3.9 0 0 1 .76-1.683q.594-.759 1.452-1.188a4.04 4.04 0 0 1 1.831-.429q.825 0 1.568.313.742.314 1.32.875a4 4 0 0 1 1.303-.215q1.106 0 2.046.545a4.14 4.14 0 0 1 1.502 1.485q.577.941.577 2.095 0 .48-.132 1.04.66.61 1.023 1.419.363.792.363 1.666 0 .892-.38 1.717a4.3 4.3 0 0 1-1.072 1.435 3.8 3.8 0 0 1-1.584.825 3.8 3.8 0 0 1-.775 1.683 4.06 4.06 0 0 1-1.436 1.188 4.04 4.04 0 0 1-1.831.429m-4.076-2.062q.825 0 1.436-.347l3.102-1.782a.36.36 0 0 0 .165-.313v-1.42L7.882 14.62a.67.67 0 0 1-.726 0l-3.119-1.798a.5.5 0 0 1-.016.115v.198q0 .841.396 1.551.412.693 1.138 1.089a3.2 3.2 0 0 0 1.617.412m.165-2.69a.4.4 0 0 0 .182.05q.082 0 .165-.05l1.237-.71-3.976-2.31a.7.7 0 0 1-.363-.643v-3.58q-.825.362-1.32 1.122a2.9 2.9 0 0 0-.495 1.65q0 .809.412 1.55.413.743 1.073 1.123zm3.91 3.663q.876 0 1.585-.396a2.96 2.96 0 0 0 1.534-2.64v-3.564a.32.32 0 0 0-.165-.297l-1.254-.726v4.604a.7.7 0 0 1-.363.643l-3.118 1.799a3 3 0 0 0 1.782.577m.628-6.039V8.878L10.01 7.822 8.13 8.878v2.244l1.88 1.056zM7.057 5.859a.7.7 0 0 1 .363-.644l3.118-1.798a3 3 0 0 0-1.782-.578q-.874 0-1.584.396A2.96 2.96 0 0 0 6.05 4.324a3.07 3.07 0 0 0-.396 1.551v3.547q0 .199.165.314l1.238.726zm8.382 7.887q.825-.364 1.303-1.123.495-.758.495-1.65a3.15 3.15 0 0 0-.412-1.55q-.413-.743-1.073-1.123l-3.085-1.782q-.1-.065-.182-.049a.3.3 0 0 0-.165.05l-1.237.692 3.993 2.327a.6.6 0 0 1 .264.264.64.64 0 0 1 .099.363zm-3.317-8.382a.63.63 0 0 1 .726 0l3.135 1.831v-.297q0-.792-.396-1.501a2.86 2.86 0 0 0-1.105-1.155q-.71-.43-1.65-.43-.825 0-1.436.347L8.294 5.941a.36.36 0 0 0-.165.314v1.418z`})})}function Zz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M16.835 10c0-3.51-3.024-6.418-6.835-6.418S3.165 6.49 3.165 10c0 1.414.567 2.35 1.282 3.765.087.171.111.367.07.555l-.327 1.469 1.59-.412.145-.024a.8.8 0 0 1 .287.028l.136.051.459.212c1.062.472 2.06.775 3.193.775 3.811 0 6.835-2.91 6.835-6.42m1.33 0c0 4.314-3.692 7.749-8.165 7.749-1.52 0-2.804-.453-4.06-1.04l-2.204.572a.832.832 0 0 1-1.02-.986l.463-2.089C2.537 12.954 1.835 11.73 1.835 10 1.835 5.685 5.527 2.25 10 2.25S18.165 5.685 18.165 10`})})}function Qz(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M2.5 6.25h15a.75.75 0 0 1 0 1.5h-15a.75.75 0 0 1 0-1.5m0 5.25h10a.75.75 0 0 1 0 1.5h-10a.75.75 0 0 1 0-1.5`})})}function $z(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,fill:`currentColor`,...e,children:(0,H.jsx)(`path`,{d:`M5.5 10a1.6 1.6 0 1 1-3.2 0 1.6 1.6 0 0 1 3.2 0m6.1 0a1.6 1.6 0 1 1-3.2 0 1.6 1.6 0 0 1 3.2 0m6.1 0a1.6 1.6 0 1 1-3.2 0 1.6 1.6 0 0 1 3.2 0`})})}function eB(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M471.88739013671875 665.9563838413783Q471.88739013671875 704.3330688476562 457.7486114501953 738.6877461887846Q443.6098327636719 773.042423529913 417.35210091727123 799.3136473790112Q390.08445630754744 826.5953029146131 355.74742235456193 840.7413465256659Q321.4103884015764 854.8873901367188 284.04361615862166 854.8873901367188Q245.66693115234375 854.8873901367188 211.31225381121538 840.7486114501953Q176.95757647008705 826.6098327636719 150.68635262098888 799.3421881539481Q123.40469708538696 773.0844563075475 109.2586534743341 738.747422354562Q95.11260986328125 704.4103884015765 95.11260986328125 666.0337033952985Q95.11260986328125 628.6669311523438 109.25138854980469 594.3122538112154Q123.39016723632812 559.957576470087 150.65781184605189 532.6759209344851Q176.91554369245256 506.40469708538694 211.25257764543807 492.2586534743341Q245.58961159842355 478.11260986328125 283.9662966047014 478.11260986328125Q321.33306884765625 478.11260986328125 355.6877461887846 492.2513885498047Q390.042423529913 506.3901672363281 417.32407906551487 532.6478990827288Q443.59530291461306 559.9155436924525 457.7413465256659 594.252577645438Q471.88739013671875 628.5896115984235 471.88739013671875 665.9563838413783ZM412.11260986328125 666.0401287768261Q412.11260986328125 631.5551147460938 394.3774597903332 602.4688213147615Q376.64230971738516 573.3825278834292 347.5763693200537 555.634959010074Q318.51042892272216 537.8873901367188 284.02541489198984 537.8873901367188Q248.55511474609375 537.8873901367188 219.4688213147615 555.6225402096668Q190.38252788342928 573.3576902826148 172.634959010074 602.4236306799463Q154.88739013671875 631.4895710772778 154.88739013671875 665.9745851080102Q154.88739013671875 701.4448852539062 172.6225402096668 730.5311786852385Q190.35769028261484 759.6174721165708 219.42363067994637 777.365040989926Q248.48957107727787 795.1126098632812 283.95987122317393 795.1126098632812Q318.44488525390625 795.1126098632812 347.5311786852385 777.3774597903332Q376.6174721165707 759.6423097173852 394.365040989926 730.5763693200537Q412.11260986328125 701.5104289227222 412.11260986328125 666.0401287768261ZM601.0 395.11260986328125H849.0Q871.7689367223669 395.11260986328125 888.3281634295429 411.6718365704572Q904.8873901367188 428.2310632776331 904.8873901367188 451.0V799.0Q904.8873901367188 821.7689367223669 888.3281634295429 838.3281634295429Q871.7689367223669 854.8873901367188 849.0 854.8873901367188H601.0Q578.2310632776331 854.8873901367188 561.6718365704571 838.3281634295429Q545.1126098632812 821.7689367223669 545.1126098632812 799.0V451.0Q545.1126098632812 428.2310632776331 561.6718365704571 411.6718365704572Q578.2310632776331 395.11260986328125 601.0 395.11260986328125ZM601.0 454.88739013671875 604.8873901367188 451.0V799.0L601.0 795.1126098632812H849.0L845.1126098632812 799.0V451.0L849.0 454.88739013671875ZM325.33465576171875 511.77716064453125V512.7771606445312Q303.1718221028646 461.44838945942536 299.1422159830729 409.11317178049393Q295.11260986328125 356.7779541015625 308.202328408731 307.9240358737713Q321.29204695418076 259.0701176459801 350.995639038086 218.77822632409038Q380.69923112199115 178.4863350022007 425.00289389120564 153.30390292601965Q470.31345808699325 127.2236328125 519.6516279890731 121.7236328125Q568.9897978911529 116.2236328125 618.3279677932327 129.2236328125Q667.6661376953125 142.2236328125 710.9897978184587 171.91258533184345Q754.3134579416048 201.6015378511869 786.5543212890625 246.8897705078125Q801.8873901367188 268.6151204427083 794.8873901367188 293.444091796875Q788.6568040114182 317.24662911551343 767.88818359375 329.66534423828125L406.88818359375 537.6653442382812Q393.4617545387962 545.8873901367188 377.4533198963512 545.8873901367188Q361.44488525390625 545.8873901367188 348.0325142996652 537.6098327636719L334.6201433454241 527.2628860473633ZM380.66534423828125 488.22283935546875 378.88818359375 486.33465576171875 377.00079345703125 485.4456787109375 738.0007934570312 277.4456787109375 737.1126098632812 278.555908203125 737.5567016601562 282.1102294921875Q703.8421892438616 234.41767765925476 655.2536272321429 208.08741466815655Q606.6650652204241 181.75715167705835 554.110089983259 180.26675943227917Q501.55511474609375 178.7763671875 455.0165774806016 205.55561225358827Q409.46822185905614 231.34303342834005 384.2185899384168 277.9587563211604Q358.9689580177774 324.5744792139808 357.48368555185743 379.6207051831623Q355.9984130859375 434.66693115234375 380.66534423828125 487.2310632776331Z`})})}function tB(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M500.045285676655 120.11260986328125Q578.444091796875 120.11260986328125 647.273644917806 149.76344038310805Q716.103198038737 179.41427090293485 768.3533697509765 231.68014164974818Q820.6035414632162 283.9460123965615 850.2454657999674 352.79624597649826Q879.8873901367188 421.646479556435 879.8873901367188 500.045285676655Q879.8873901367188 578.444091796875 850.2400938165251 643.7852350408381Q820.5927974963314 709.1263782848011 768.8356530729425 756.3730510919745Q717.0785086495536 803.6197238991477 647.7339850531685 829.2535570179332Q578.3894614567832 854.8873901367188 500.0 854.8873901367188H150.0Q136.15392855940195 854.8873901367188 128.16581042059536 846.340815617488Q120.1776922817888 837.7942410982572 119.64515107253501 825.508540226863Q119.11260986328125 813.2228393554688 128.667724609375 803.667724609375L228.667724609375 703.667724609375Q220.11260986328125 712.1950836181641 220.11260986328125 724.9861221313477Q220.11260986328125 737.7771606445312 228.667724609375 746.332275390625Q178.410727041739 696.0572959498355 149.26166845251012 638.2410695929277Q120.11260986328125 580.4248432360198 120.11260986328125 499.98487613075656Q120.11260986328125 421.555908203125 149.76344038310805 352.726355082194Q179.41427090293482 283.896801961263 231.68014164974812 231.64663024902342Q283.94601239656146 179.39645853678383 352.79624597649826 149.75453420003254Q421.64647955643505 120.11260986328125 500.045285676655 120.11260986328125ZM500.0425254998293 179.88739013671875Q433.444091796875 179.88739013671875 375.7723714192708 204.7367776087088Q318.10065104166665 229.58616508069883 273.85252075195314 273.8180747808412Q229.6043904622396 318.04998448098354 204.74589029947919 375.7005634160005Q179.88739013671875 433.3511423510174 179.88739013671875 499.9475007759508Q179.88739013671875 564.555908203125 203.2455945222274 611.7545601981027Q226.60379890773606 658.9532121930804 271.332275390625 703.667724609375Q279.88739013671875 712.1950836181641 279.88739013671875 724.9861221313477Q279.88739013671875 737.7771606445312 271.332275390625 746.332275390625L171.332275390625 846.332275390625Q180.7763671875 836.7702217102051 180.2763671875 824.5520420074463Q179.7763671875 812.3338623046875 171.80055454799106 803.7232360839844Q163.82474190848214 795.1126098632812 150.0 795.1126098632812H500.0Q565.6131436365732 795.1126098632812 623.7702482235359 774.2471184363732Q681.9273528104984 753.3816270094651 726.1665178381879 714.1346312302809Q770.4056828658773 674.8876354510967 795.2591463645792 620.7367172241211Q820.1126098632812 566.5857989971455 820.1126098632812 500.0149453970102Q820.1126098632812 433.444091796875 795.2624480338206 375.7723714192708Q770.4122862043602 318.10065104166665 726.1789981479203 273.85252075195314Q681.9457100914806 229.60439046223962 624.293334647132 204.74589029947919Q566.6409592027836 179.88739013671875 500.0425254998293 179.88739013671875Z`})})}function nB(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M399.9508586946081 95.11260986328125Q463.33306884765625 95.11260986328125 518.6892674763997 118.75518031719605Q574.0454661051432 142.39775077111085 615.8142341613769 184.1495241258965Q657.5830022176107 225.90129748068216 681.2351961771647 281.23497301112104Q704.8873901367188 336.5686485415599 704.8873901367188 399.9508586946081Q704.8873901367188 463.33306884765625 681.2410083934419 518.6892674763998Q657.594626650165 574.0454661051433 615.8361227205485 615.814234161377Q574.0776187909319 657.5830022176107 518.7350232215605 681.2351961771647Q463.39242765218904 704.8873901367188 400.0 704.8873901367188H125.0Q111.15392855940193 704.8873901367188 103.16581042059536 696.340815617488Q95.1776922817888 687.7942410982572 94.64515107253501 675.508540226863Q94.11260986328125 663.2228393554688 103.667724609375 653.667724609375L184.667724609375 573.667724609375Q175.2236328125 582.2120951990928 175.2236328125 594.494627921812Q175.2236328125 606.7771606445312 184.667724609375 615.332275390625Q142.40576034717344 574.0857803950671 118.75918510522735 518.7551163766359Q95.11260986328125 463.4244523582046 95.11260986328125 400.0456917552741Q95.11260986328125 336.66693115234375 118.75518031719604 281.3107325236003Q142.39775077111082 225.9545338948568 184.1495241258965 184.18576583862307Q225.90129748068222 142.41699778238933 281.23497301112104 118.76480382283529Q336.5686485415599 95.11260986328125 399.9508586946081 95.11260986328125ZM399.95305741073304 154.88739013671875Q349.33306884765625 154.88739013671875 304.68992832728793 173.74581724845325Q260.04678780691967 192.60424436018775 226.31641496930803 226.35090340223888Q192.58604213169642 260.09756244429 173.7367161342076 304.7622582352401Q154.88739013671875 349.4269540261902 154.88739013671875 400.046942589267Q154.88739013671875 450.66693115234375 174.23704655965167 495.30431587465347Q193.58670298258463 539.9417005969632 226.332275390625 573.667724609375Q235.88739013671875 582.2120951990928 235.88739013671875 594.494627921812Q235.88739013671875 606.7771606445312 226.332275390625 615.332275390625L146.332275390625 696.332275390625Q155.7763671875 686.7702217102051 155.2763671875 674.5520420074463Q154.7763671875 662.3338623046875 146.80055454799106 653.7232360839844Q138.82474190848214 645.1126098632812 125.0 645.1126098632812H400.0Q450.6102959636735 645.1126098632812 495.2664394610324 626.2541827515468Q539.9225829583913 607.3957556398123 573.662780267507 573.6490965977611Q607.4029775766226 539.9024375557099 626.2577937199519 495.23774176475985Q645.1126098632812 450.5730459738098 645.1126098632812 399.953057410733Q645.1126098632812 349.33306884765625 626.2541827515468 304.68992832728793Q607.3957556398123 260.0467878069196 573.6490965977612 226.31641496930803Q539.90243755571 192.58604213169644 495.2377417647599 173.7367161342076Q450.57304597380977 154.88739013671875 399.95305741073304 154.88739013671875ZM364.55670166015625 794.2212524414062Q357.0015869140625 784.5551147460938 358.07375183105466 772.2823365864001Q359.1459167480469 760.0095584267065 368.79540100097654 751.471973619963Q378.44488525390625 744.0015869140625 390.6862320438508 745.0722378817471Q402.92757883379534 746.1428888494318 411.44329833984375 755.7787475585938Q444.19262020713404 796.4752848307292 493.3166030080695 820.7939473470052Q542.4405858090049 845.1126098632812 600.0 845.1126098632812H802.4480590820312L773.667724609375 815.332275390625Q764.1126098632812 806.7879048009072 764.1126098632812 794.505372078188Q764.1126098632812 782.2228393554688 773.667724609375 773.667724609375Q806.4132970174154 739.9269369886669 825.7629534403484 695.2700121965531Q845.1126098632812 650.6130874044394 845.1126098632812 600.0019059733771Q845.1126098632812 542.444091796875 820.7939473470052 493.3187942504883Q796.4752848307292 444.19349670410156 755.7787475585938 411.44329833984375Q746.1428888494319 402.92757883379534 745.0722378817472 390.6862320438508Q744.0015869140625 378.44488525390625 751.471973619963 368.79540100097654Q760.0095584267065 359.14591674804683 772.2823365864001 358.07375183105466Q784.5551147460938 357.0015869140625 794.2212524414062 364.55670166015625Q845.530098100142 406.81575520833337 875.2087441184303 468.1919996473525Q904.8873901367188 529.5682440863716 904.8873901367188 600.0Q904.8873901367188 654.9370488432264 886.5634408133371 704.3803928021302Q868.2394914899554 753.8237367610342 835.5535278320312 793.7779541015625L896.332275390625 853.667724609375Q905.7763671875 863.2297782897949 905.2763671875 875.4479579925537Q904.7763671875 887.6661376953125 896.800554547991 896.2767639160156Q888.8247419084821 904.8873901367188 875.0 904.8873901367188H600.0Q529.5682440863716 904.8873901367188 468.1919996473524 875.2087441184303Q406.8157552083333 845.530098100142 364.55670166015625 794.2212524414062Z`})})}function rB(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M803.667724609375 328.667724609375Q812.1950836181641 320.11260986328125 824.9861221313477 320.11260986328125Q837.7771606445312 320.11260986328125 846.332275390625 328.6455200195312Q854.8873901367188 337.1784301757813 854.8873901367188 349.97779541015626Q854.8873901367188 362.77716064453125 846.332275390625 371.332275390625L521.332275390625 696.332275390625Q512.8049163818359 704.8873901367188 500.01387786865234 704.8873901367188Q487.22283935546875 704.8873901367188 478.667724609375 696.332275390625L153.667724609375 371.332275390625Q145.11260986328125 362.80491638183594 145.11260986328125 350.01387786865234Q145.11260986328125 337.22283935546875 153.64552001953126 328.667724609375Q162.17843017578124 320.11260986328125 174.97779541015626 320.11260986328125Q187.77716064453125 320.11260986328125 196.332275390625 328.667724609375L500.0 632.33544921875Z`})})}function iB(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 256 257`,fill:`#D97757`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M50.2278481,170.321013 L100.585316,142.063797 L101.427848,139.601013 L100.585316,138.24 L98.1225316,138.24 L89.6972152,137.721519 L60.921519,136.943797 L35.9696203,135.906835 L11.795443,134.610633 L5.70329114,133.31443 L0,125.796456 L0.583291139,122.037468 L5.70329114,118.602532 L13.0268354,119.250633 L29.2293671,120.352405 L53.5331646,122.037468 L71.161519,123.07443 L97.28,125.796456 L101.427848,125.796456 L102.011139,124.111392 L100.585316,123.07443 L99.4835443,122.037468 L74.3372152,104.992405 L47.116962,86.9751899 L32.8587342,76.6055696 L25.1463291,71.3559494 L21.2577215,66.4303797 L19.5726582,55.6718987 L26.5721519,47.9594937 L35.9696203,48.6075949 L38.3675949,49.2556962 L47.8946835,56.5792405 L68.2450633,72.3281013 L94.8172152,91.9007595 L98.7058228,95.1412658 L100.261266,94.0394937 L100.455696,93.2617722 L98.7058228,90.3453165 L84.2531646,64.2268354 L68.8283544,37.6546835 L61.958481,26.636962 L60.1437975,20.0263291 C59.4956962,17.3043038 59.0420253,15.0359494 59.0420253,12.2491139 L67.0136709,1.42582278 L71.4207595,0 L82.0496203,1.42582278 L86.521519,5.31443038 L93.1321519,20.4151899 L103.825823,44.2005063 L120.417215,76.5407595 L125.277975,86.1326582 L127.87038,95.0116456 L128.842532,97.7336709 L130.527595,97.7336709 L130.527595,96.1782278 L131.888608,77.9665823 L134.416203,55.6070886 L136.878987,26.8313924 L137.721519,18.7301266 L141.739747,9.00860759 L149.711392,3.75898734 L155.933165,6.74025316 L161.053165,14.0637975 L160.340253,18.7949367 L157.294177,38.5620253 L151.331646,69.5412658 L147.443038,90.2805063 L149.711392,90.2805063 L152.303797,87.6881013 L162.803038,73.7539241 L180.431392,51.718481 L188.208608,42.9691139 L197.282025,33.3124051 L203.114937,28.7108861 L214.132658,28.7108861 L222.233924,40.7655696 L218.604557,53.2091139 L207.262785,67.596962 L197.865316,79.7812658 L184.38481,97.9281013 L175.959494,112.44557 L176.737215,113.612152 L178.746329,113.417722 L209.207089,106.936709 L225.668861,103.955443 L245.306329,100.585316 L254.185316,104.733165 L255.157468,108.945823 L251.657722,117.56557 L230.659241,122.75038 L206.031392,127.675949 L169.348861,136.360506 L168.89519,136.684557 L169.413671,137.332658 L185.940253,138.888101 L193.004557,139.276962 L210.308861,139.276962 L242.519494,141.674937 L250.94481,147.248608 L256,154.053671 L255.157468,159.238481 L242.195443,165.849114 L224.696709,161.701266 L183.866329,151.979747 L169.867342,148.48 L167.923038,148.48 L167.923038,149.646582 L179.588861,161.053165 L200.976203,180.366582 L227.742785,205.253671 L229.103797,211.410633 L225.668861,216.271392 L222.039494,215.752911 L198.513418,198.059747 L189.44,190.088101 L168.89519,172.783797 L167.534177,172.783797 L167.534177,174.598481 L172.265316,181.533165 L197.282025,219.123038 L198.578228,230.659241 L196.763544,234.418228 L190.282532,236.686582 L183.153418,235.39038 L168.506329,214.84557 L153.40557,191.708354 L141.221266,170.969114 L139.730633,171.811646 L132.536709,249.259747 L129.166582,253.213165 L121.389367,256.19443 L114.908354,251.268861 L111.473418,243.297215 L114.908354,227.548354 L119.056203,207.003544 L122.426329,190.671392 L125.472405,170.385823 L127.287089,163.64557 L127.157468,163.191899 L125.666835,163.386329 L110.371646,184.38481 L87.1048101,215.817722 L68.6987342,235.52 L64.2916456,237.269873 L56.6440506,233.316456 L57.356962,226.252152 L61.6344304,219.96557 L87.1048101,187.560506 L102.46481,167.469367 L112.380759,155.868354 L112.315949,154.183291 L111.732658,154.183291 L44.0708861,198.124557 L32.0162025,199.68 L26.8313924,194.819241 L27.4794937,186.847595 L29.9422785,184.25519 L50.2926582,170.256203 L50.2278481,170.321013 Z`})})}function aB(e){return(0,H.jsxs)(`svg`,{viewBox:`0 0 21.2 21.2`,fill:`none`,"aria-hidden":`true`,...e,children:[(0,H.jsx)(`rect`,{x:`0`,y:`7.6`,height:`6`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,H.jsx)(`rect`,{x:`4`,y:`5.6`,height:`10`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,H.jsx)(`rect`,{x:`8`,y:`2.6`,height:`16`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,H.jsx)(`rect`,{x:`12`,y:`5.6`,height:`10`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,H.jsx)(`rect`,{x:`16`,y:`2.6`,height:`16`,width:`1.2`,rx:`0.6`,fill:`currentColor`}),(0,H.jsx)(`rect`,{x:`20`,y:`7.6`,height:`6`,width:`1.2`,rx:`0.6`,fill:`currentColor`})]})}function oB(e){return(0,H.jsx)(`svg`,{viewBox:`30 0 82 24`,height:`20`,fill:`currentColor`,"aria-hidden":`true`,shapeRendering:`geometricPrecision`,...e,children:(0,H.jsx)(`path`,{d:`M39.504 21.2643C37.688 21.2643 36.06 20.9003 34.62 20.1723C33.18 19.4443 32.048 18.4163 31.224 17.0883C30.408 15.7603 30 14.2243 30 12.4803C30 10.6563 30.412 9.03233 31.236 7.60833C32.06 6.17633 33.196 5.06833 34.644 4.28433C36.1 3.49233 37.74 3.09633 39.564 3.09633C40.692 3.09633 41.82 3.22033 42.948 3.46833C44.084 3.71633 45.072 4.09633 45.912 4.60833V8.56833H44.832C44.536 7.16833 43.96 6.12433 43.104 5.43633C42.256 4.74833 41.076 4.40433 39.564 4.40433C38.164 4.40433 36.996 4.73233 36.06 5.38833C35.132 6.03633 34.444 6.93633 33.996 8.08833C33.548 9.24033 33.324 10.5643 33.324 12.0603C33.324 13.5483 33.576 14.8883 34.08 16.0803C34.584 17.2723 35.328 18.2163 36.312 18.9123C37.296 19.6003 38.476 19.9443 39.852 19.9443C40.796 19.9443 41.608 19.7483 42.288 19.3563C42.968 18.9643 43.54 18.4363 44.004 17.7723C44.468 17.1003 44.908 16.2803 45.324 15.3123H46.464L45.684 19.6803C44.892 20.2003 43.936 20.5963 42.816 20.8683C41.704 21.1323 40.6 21.2643 39.504 21.2643ZM47.964 21.0003V19.9563C48.356 19.9003 48.668 19.8403 48.9 19.7763C49.14 19.7043 49.332 19.5883 49.476 19.4283C49.628 19.2683 49.704 19.0443 49.704 18.7563V5.83233L47.964 5.08833V4.28433L51.612 2.73633H52.56V18.7563C52.56 19.0523 52.632 19.2803 52.776 19.4403C52.928 19.6003 53.12 19.7123 53.352 19.7763C53.592 19.8403 53.912 19.9003 54.312 19.9563V21.0003H47.964ZM59.028 21.2643C58.38 21.2643 57.792 21.1363 57.264 20.8803C56.736 20.6243 56.32 20.2563 56.016 19.7763C55.712 19.2963 55.56 18.7363 55.56 18.0963C55.56 17.1203 55.86 16.3443 56.46 15.7683C57.068 15.1843 57.916 14.7403 59.004 14.4363L63.24 13.2363V11.7123C63.24 10.8883 63.048 10.2523 62.664 9.80433C62.288 9.34833 61.708 9.12033 60.924 9.12033C60.228 9.12033 59.704 9.33233 59.352 9.75633C59.008 10.1723 58.836 10.7483 58.836 11.4843V12.6123H56.988C56.764 12.4683 56.588 12.2763 56.46 12.0363C56.34 11.7883 56.28 11.5163 56.28 11.2203C56.28 10.5563 56.516 9.98833 56.988 9.51633C57.46 9.03633 58.06 8.67633 58.788 8.43633C59.516 8.19633 60.256 8.07633 61.008 8.07633C62.592 8.07633 63.836 8.44033 64.74 9.16833C65.644 9.89633 66.096 11.0003 66.096 12.4803V18.5403C66.096 18.8603 66.168 19.1043 66.312 19.2723C66.456 19.4403 66.644 19.5603 66.876 19.6323C67.116 19.6963 67.44 19.7563 67.848 19.8123V20.8563C67.536 20.9683 67.208 21.0563 66.864 21.1203C66.528 21.1843 66.204 21.2163 65.892 21.2163C65.148 21.2163 64.548 21.0483 64.092 20.7123C63.644 20.3683 63.372 19.8643 63.276 19.2003C62.716 19.8643 62.08 20.3763 61.368 20.7363C60.664 21.0883 59.884 21.2643 59.028 21.2643ZM60.444 19.3443C60.948 19.3443 61.44 19.2283 61.92 18.9963C62.408 18.7563 62.848 18.4403 63.24 18.0483V14.3403L60.168 15.2523C59.592 15.4283 59.152 15.7003 58.848 16.0683C58.544 16.4363 58.392 16.9003 58.392 17.4603C58.392 17.8203 58.48 18.1443 58.656 18.4323C58.832 18.7203 59.076 18.9443 59.388 19.1043C59.7 19.2643 60.052 19.3443 60.444 19.3443ZM73.608 21.2643C72.32 21.2643 71.356 20.9283 70.716 20.2563C70.084 19.5843 69.768 18.6363 69.768 17.4123V10.9083L68.016 10.2603L68.112 9.45633L71.664 8.07633H72.624V16.9323C72.624 17.6923 72.812 18.2563 73.188 18.6243C73.564 18.9923 74.14 19.1763 74.916 19.1763C75.428 19.1763 75.964 19.0603 76.524 18.8283C77.084 18.5883 77.6 18.2803 78.072 17.9043V10.9083L76.32 10.2603V9.45633L79.98 8.07633H80.928V17.8323C80.928 18.1523 81 18.4003 81.144 18.5763C81.288 18.7443 81.476 18.8643 81.708 18.9363C81.948 19.0083 82.272 19.0723 82.68 19.1283V20.1603L79.02 21.1803H78.072V19.0803C77.44 19.7363 76.728 20.2643 75.936 20.6643C75.144 21.0643 74.368 21.2643 73.608 21.2643ZM89.328 21.2643C88.264 21.2643 87.312 21.0083 86.472 20.4963C85.632 19.9763 84.976 19.2683 84.504 18.3723C84.032 17.4763 83.796 16.4843 83.796 15.3963C83.796 13.9643 84.08 12.6963 84.648 11.5923C85.224 10.4883 86.032 9.62833 87.072 9.01233C88.112 8.38833 89.32 8.07633 90.696 8.07633C91.12 8.07633 91.556 8.12433 92.004 8.22033C92.46 8.30833 92.896 8.43633 93.312 8.60433V5.82033L91.56 5.08833V4.28433L95.22 2.73633H96.168V17.8323C96.168 18.1523 96.24 18.4003 96.384 18.5763C96.536 18.7443 96.728 18.8643 96.96 18.9363C97.2 19.0083 97.52 19.0723 97.92 19.1283V20.1603L94.26 21.1803H93.312V19.5843C92.752 20.1123 92.132 20.5243 91.452 20.8203C90.78 21.1163 90.072 21.2643 89.328 21.2643ZM90.504 19.3323C90.976 19.3323 91.456 19.2363 91.944 19.0443C92.432 18.8523 92.888 18.5883 93.312 18.2523V10.3563C92.584 9.76433 91.776 9.46833 90.888 9.46833C89.992 9.46833 89.236 9.69633 88.62 10.1523C88.004 10.6083 87.54 11.2283 87.228 12.0123C86.924 12.7883 86.772 13.6563 86.772 14.6163C86.772 15.5283 86.908 16.3403 87.18 17.0523C87.452 17.7563 87.868 18.3123 88.428 18.7203C88.988 19.1283 89.68 19.3323 90.504 19.3323ZM105.252 21.2643C104.068 21.2643 103.004 20.9883 102.06 20.4363C101.116 19.8843 100.376 19.1163 99.84 18.1323C99.304 17.1483 99.036 16.0443 99.036 14.8203C99.036 13.5563 99.308 12.4123 99.852 11.3883C100.404 10.3563 101.156 9.54833 102.108 8.96433C103.068 8.37233 104.136 8.07633 105.312 8.07633C106.216 8.07633 107.048 8.26433 107.808 8.64033C108.568 9.01633 109.2 9.54433 109.704 10.2243C110.216 10.9043 110.552 11.6883 110.712 12.5763L101.928 15.2883C102.168 16.4003 102.644 17.2763 103.356 17.9163C104.076 18.5563 104.968 18.8763 106.032 18.8763C106.92 18.8763 107.716 18.6523 108.42 18.2043C109.124 17.7483 109.748 17.0603 110.292 16.1403L111.228 16.4403C111.012 17.4003 110.62 18.2443 110.052 18.9723C109.484 19.7003 108.784 20.2643 107.952 20.6643C107.128 21.0643 106.228 21.2643 105.252 21.2643ZM107.628 12.2043C107.516 11.6523 107.324 11.1683 107.052 10.7523C106.788 10.3283 106.46 10.0003 106.068 9.76833C105.676 9.53633 105.244 9.42033 104.772 9.42033C104.18 9.42033 103.656 9.60033 103.2 9.96033C102.752 10.3123 102.4 10.8163 102.144 11.4723C101.896 12.1203 101.772 12.8723 101.772 13.7283C101.772 13.8803 101.776 13.9963 101.784 14.0763L107.628 12.2043Z`})})}function sB(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M708.332275390625 696.332275390625Q699.7879048009073 704.8873901367188 687.505372078188 704.8873901367188Q675.2228393554688 704.8873901367188 666.7003784179688 696.3544799804688Q657.1126098632812 687.8215698242187 657.1126098632812 675.0222045898438Q657.1126098632812 662.2228393554688 666.667724609375 653.667724609375L820.33544921875 500.0L666.667724609375 346.332275390625Q657.1126098632812 337.80491638183594 657.1126098632812 325.01387786865234Q657.1126098632812 312.22283935546875 666.7121337890625 303.667724609375Q675.2450439453125 295.11260986328125 687.5111022949219 295.11260986328125Q699.7771606445312 295.11260986328125 708.332275390625 303.667724609375L883.332275390625 478.667724609375Q892.8873901367188 487.19508361816406 892.8873901367188 499.98612213134766Q892.8873901367188 512.7771606445312 883.332275390625 521.332275390625ZM479.7763671875 805.2220458984375Q477.65525124289775 816.9654169497283 467.57995050603694 824.3708920686141Q457.5046497691761 831.7763671875 444.7779541015625 829.7763671875Q433.03458305027175 827.6552512428977 425.6291079313859 817.579950506037Q418.2236328125 807.5046497691761 420.2236328125 794.7779541015625L520.2236328125 194.7779541015625Q522.3447487571023 183.03458305027175 532.420049493963 175.62910793138587Q542.4953502308239 168.2236328125 555.2220458984375 170.2236328125Q566.9654169497283 172.34474875710225 574.3708920686141 182.42004949396306Q581.7763671875 192.49535023082387 579.7763671875 205.2220458984375ZM333.332275390625 653.667724609375Q342.88739013671875 662.1950836181641 342.88739013671875 674.9861221313477Q342.88739013671875 687.7771606445312 333.2878662109375 696.332275390625Q324.7549560546875 704.8873901367188 312.4888977050781 704.8873901367188Q300.22283935546875 704.8873901367188 291.667724609375 696.332275390625L116.667724609375 521.332275390625Q107.11260986328125 512.8049163818359 107.11260986328125 500.01387786865234Q107.11260986328125 487.22283935546875 116.667724609375 478.667724609375L291.667724609375 303.667724609375Q300.21209519909274 295.11260986328125 312.494627921812 295.11260986328125Q324.77716064453125 295.11260986328125 333.29962158203125 303.6455200195312Q342.88739013671875 312.1784301757813 342.88739013671875 324.97779541015626Q342.88739013671875 337.77716064453125 333.332275390625 346.332275390625L179.66455078125 500.0Z`})})}function cB(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M225.0 295.11260986328125H775.0Q810.516083240509 295.11260986328125 840.4510676860809 312.3632788658142Q870.3860521316528 329.61394786834717 887.6367211341858 359.54893231391907Q904.8873901367188 389.48391675949097 904.8873901367188 425.0V775.0Q904.8873901367188 797.5323408077925 894.133318387545 815.4557937230819Q883.3792466383713 833.3792466383713 865.4557937230819 844.133318387545Q847.5323408077925 854.8873901367188 825.0 854.8873901367188H175.0Q152.46765919220752 854.8873901367188 134.54420627691806 844.133318387545Q116.6207533616286 833.3792466383713 105.86668161245493 815.4557937230819Q95.11260986328125 797.5323408077925 95.11260986328125 775.0V425.0Q95.11260986328125 389.48391675949097 112.36327886581421 359.54893231391907Q129.61394786834717 329.61394786834717 159.54893231391907 312.3632788658142Q189.48391675949097 295.11260986328125 225.0 295.11260986328125ZM225.0 354.88739013671875Q195.78641255696616 354.88739013671875 175.33690134684247 375.33690134684247Q154.88739013671875 395.7864125569662 154.88739013671875 425.0V775.0Q154.88739013671875 783.2278858531605 160.82975214177912 789.1702478582208Q166.7721141468395 795.1126098632812 175.0 795.1126098632812H825.0Q833.2278858531605 795.1126098632812 839.1702478582208 789.1702478582208Q845.1126098632812 783.2278858531605 845.1126098632812 775.0V425.0Q845.1126098632812 395.7864125569662 824.6630986531575 375.33690134684247Q804.2135874430338 354.88739013671875 775.0 354.88739013671875ZM125.0 604.8873901367188V545.1126098632812H275.0Q287.77716064453125 545.1126098632812 296.332275390625 553.6455200195312Q304.88739013671875 562.1784301757813 304.88739013671875 574.9777954101562Q304.88739013671875 587.7771606445312 296.348135811942 596.332275390625Q287.8088814871652 604.8873901367188 275.0 604.8873901367188ZM375.0 604.8873901367188Q362.1911185128348 604.8873901367188 353.651864188058 596.3544799804688Q345.11260986328125 587.8215698242187 345.11260986328125 575.0222045898438Q345.11260986328125 562.2228393554688 353.651864188058 553.667724609375Q362.1911185128348 545.1126098632812 375.0 545.1126098632812H625.0Q637.8088814871652 545.1126098632812 646.348135811942 553.6455200195312Q654.8873901367188 562.1784301757813 654.8873901367188 574.9777954101562Q654.8873901367188 587.7771606445312 646.348135811942 596.332275390625Q637.8088814871652 604.8873901367188 625.0 604.8873901367188ZM354.88739013671875 325.0H295.11260986328125V225.0Q295.11260986328125 202.555908203125 305.86668161245495 184.60487747192383Q316.6207533616286 166.65384674072266 334.5442062769181 155.88322830200195Q352.4676591922075 145.11260986328125 375.0 145.11260986328125H625.0Q647.5323408077925 145.11260986328125 665.4557937230819 155.86668161245495Q683.3792466383713 166.62075336162866 694.133318387545 184.5442062769181Q704.8873901367188 202.46765919220752 704.8873901367188 225.0V325.0H645.1126098632812V225.0Q645.1126098632812 216.77716064453125 639.1702478582208 210.832275390625Q633.2278858531605 204.88739013671875 625.0 204.88739013671875H375.0Q366.7721141468395 204.88739013671875 360.8297521417791 210.82975214177912Q354.88739013671875 216.7721141468395 354.88739013671875 225.0ZM725.0 604.8873901367188Q712.2228393554688 604.8873901367188 703.667724609375 596.3544799804688Q695.1126098632812 587.8215698242187 695.1126098632812 575.0222045898438Q695.1126098632812 562.2228393554688 703.651864188058 553.667724609375Q712.1911185128348 545.1126098632812 725.0 545.1126098632812H875.0V604.8873901367188Z`})})}function lB(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M120.11260986328125 500.0Q120.11260986328125 421.61053854321676 149.76344038310805 352.76851149463147Q179.41427090293482 283.9264844460462 231.68014164974812 231.6668434748574Q283.94601239656146 179.4072025036686 352.79624597649826 149.75990618347493Q421.64647955643505 120.11260986328125 500.045285676655 120.11260986328125Q578.444091796875 120.11260986328125 647.2545028997927 149.77072185647899Q716.0649140027105 179.42883384967672 768.300554547991 231.70753973599136Q820.5361950932717 283.986245622306 850.1562811403858 352.85338703023973Q879.7763671875 421.72052843817346 879.7763671875 500.13858726764545L876.7763671875 539.3476166823814Q873.7763671875 557.444091796875 867.6836138375198 572.67919921875Q861.5908604875395 587.914306640625 852.4517304625692 600.6102294921875Q843.3126004375989 613.30615234375 831.1270937376385 622.447216796875H832.1425526293018Q819.9570459293413 631.58828125 806.7560803377175 637.68232421875Q793.5551147460938 643.7763671875 781.4743707830256 646.8066461736505Q768.3868981563684 650.8470181551847 754.7960611979167 652.36215764826Q741.205224239465 653.8772971413352 727.1110229492188 654.8873901367188L605.1110229492188 652.8873901367188L580.444091796875 655.8873901367188L568.0791430664062 661.5701817103795Q560.4699438476563 667.2529732840402 556.6653442382812 675.7771606445312L549.7763671875 701.3330688476562L543.7763671875 794.4244417173672L539.7763671875 814.444091796875L531.6067141415028 833.9011362711589L518.3310279417574 852.334125773112Q501.991721849763 869.7430603027344 475.4403494502721 874.863335164388L448.88897705078125 875.8873901367188L418.72600758403814 870.8621576482599Q390.57390274841123 864.8318786621094 364.4326625439005 854.7814136851918Q293.0469681392751 827.6451582475142 237.7481907835794 774.8802171186967Q182.44941342788368 722.1152759898793 151.28101164558245 651.2594979026101Q120.11260986328125 580.403719815341 120.11260986328125 500.0ZM179.88739013671875 499.96734619140625Q179.88739013671875 568.555908203125 206.2155882007014 627.7110236600699Q232.5437862646841 686.8661391170149 279.2390809442005 731.6053020676455Q325.9343756237169 776.3444650182762 385.545390108206 799.2111483041541L431.2471678796476 812.1357953787808L452.11102294921875 816.1126098632812L465.51890055338544 815.1866251627604L472.22283935546875 813.3346557617188L478.33465576171875 806.2228393554688L484.11260986328125 785.7779541015625L487.11260986328125 733.7779541015625L490.11260986328125 692.7779541015625L494.1894719050481 671.4213745117188L502.3431959885817 651.0817749023438Q506.42005803034857 641.928955078125 513.5545666034405 631.7591552734375Q520.6890751765325 621.58935546875 531.9004457913912 613.453515625L543.11181640625 606.3346557617188L566.4200007997711 598.1980121319111L601.8889770507812 593.1126098632812L724.7870679257521 595.1126098632812Q735.7779541015625 594.1126098632812 746.1268395317925 592.6459167480468Q756.4757249620226 591.1792236328125 765.3461981879341 589.2236328125Q775.2022795500578 586.2902465820313 782.1015365035446 582.8679626464843Q789.0007934570312 579.4456787109375 793.8527628580729 575.5396212064303Q799.675126139323 570.6570493257963 804.0418986002604 564.7979630690354Q808.4086710611979 558.9388768122747 812.2902465820313 550.1502474271334L818.1126098632812 528.6669311523438L820.1126098632812 499.85038787754854Q820.1126098632812 433.2742361737113 795.2571978901708 375.6411496241208Q770.4017859170604 318.00806307453036 726.169876216918 273.7895742563101Q681.9379665167756 229.57108543808988 624.2873875817587 204.72923778740432Q566.6368086467418 179.88739013671875 500.0404502218084 179.88739013671875Q433.444091796875 179.88739013671875 375.7723714192708 204.73831840183425Q318.10065104166665 229.58924666694975 273.85252075195314 273.8238989788553Q229.6043904622396 318.0585512907609 204.74589029947919 375.7127048658288Q179.88739013671875 433.36685844089675 179.88739013671875 499.96734619140625ZM546.7779541015625 245.11260986328125Q558.5921223958334 244.11260986328125 568.2582600911459 252.61659561960323Q577.9243977864584 261.1205813759252 577.9243977864584 272.8597604851974Q578.9984130859375 285.6661376953125 570.9741380479601 294.74284023708765Q562.9498630099827 303.8195427788628 550.1110229492188 304.88739013671875L554.8873901367188 300.0L550.0 295.11260986328125L545.1126098632812 300.0L549.8889770507812 304.88739013671875Q537.0691152719351 303.8207763671875 529.0908625676082 294.7545593261719Q521.1126098632812 285.6883422851563 522.1126098632812 272.88897705078125Q522.1126098632812 261.137437086839 531.767262425916 252.62502347506012Q541.4219149885506 244.11260986328125 553.2220458984375 245.11260986328125Q574.9214904785156 246.14813720703125 589.9044403076172 262.19881103515627Q604.8873901367188 278.2494848632813 604.8873901367188 299.99555908203126Q604.8873901367188 322.77716064453125 588.8367163085937 338.832275390625Q572.7860424804687 354.88739013671875 550.0044409179687 354.88739013671875Q527.2228393554688 354.88739013671875 511.167724609375 338.82927477037583Q495.11260986328125 322.7711594040329 495.11260986328125 299.97899565825594Q495.11260986328125 278.22283935546875 510.09555969238284 262.18507194519043Q525.0785095214844 246.1473045349121 546.7779541015625 245.11260986328125ZM696.7779541015625 395.11260986328125Q708.5921223958334 394.11260986328125 718.2582600911459 402.61659561960323Q727.9243977864584 411.1205813759252 727.9243977864584 422.8597604851974Q728.9984130859375 435.6661376953125 720.9741380479601 444.74284023708765Q712.9498630099827 453.8195427788628 700.1110229492188 454.88739013671875L704.8873901367188 450.0L700.0 445.11260986328125L695.1126098632812 450.0L699.8889770507812 454.88739013671875Q687.0691152719351 453.8207763671875 679.0908625676082 444.7545593261719Q671.1126098632812 435.6883422851563 672.1126098632812 422.88897705078125Q672.1126098632812 411.137437086839 681.767262425916 402.6250234750601Q691.4219149885506 394.11260986328125 703.2220458984375 395.11260986328125Q724.9214904785156 396.14813720703125 739.9044403076172 412.19881103515627Q754.8873901367188 428.2494848632813 754.8873901367188 449.99555908203126Q754.8873901367188 472.77716064453125 738.8367163085937 488.832275390625Q722.7860424804687 504.88739013671875 700.0044409179687 504.88739013671875Q677.2228393554688 504.88739013671875 661.167724609375 488.82927477037583Q645.1126098632812 472.7711594040329 645.1126098632812 449.97899565825594Q645.1126098632812 428.22283935546875 660.0955596923828 412.18507194519043Q675.0785095214844 396.1473045349121 696.7779541015625 395.11260986328125ZM346.7779541015625 295.11260986328125Q358.5921223958333 294.11260986328125 368.2582600911458 302.61659561960323Q377.9243977864583 311.1205813759252 377.9243977864583 322.8597604851974Q378.9984130859375 335.6661376953125 370.9741380479601 344.74284023708765Q362.94986300998266 353.8195427788628 350.11102294921875 354.88739013671875L354.88739013671875 350.0L350.0 345.11260986328125L345.11260986328125 350.0L349.88897705078125 354.88739013671875Q337.0691152719351 353.8207763671875 329.09086256760816 344.7545593261719Q321.11260986328125 335.6883422851563 322.11260986328125 322.88897705078125Q322.11260986328125 311.137437086839 331.767262425916 302.6250234750601Q341.42191498855067 294.11260986328125 353.2220458984375 295.11260986328125Q374.92149047851564 296.14813720703125 389.90444030761716 312.19881103515627Q404.88739013671875 328.2494848632813 404.88739013671875 349.99555908203126Q404.88739013671875 372.77716064453125 388.83671630859374 388.832275390625Q372.7860424804687 404.88739013671875 350.00444091796874 404.88739013671875Q327.22283935546875 404.88739013671875 311.167724609375 388.82927477037583Q295.11260986328125 372.7711594040329 295.11260986328125 349.97899565825594Q295.11260986328125 328.22283935546875 310.09555969238284 312.18507194519043Q325.07850952148436 296.1473045349121 346.7779541015625 295.11260986328125ZM296.7779541015625 495.11260986328125Q308.5921223958333 494.11260986328125 318.2582600911458 502.61659561960323Q327.9243977864583 511.12058137592516 327.9243977864583 522.8597604851973Q328.9984130859375 535.6661376953125 320.9741380479601 544.7428402370876Q312.94986300998266 553.8195427788628 300.11102294921875 554.8873901367188L304.88739013671875 550.0L300.0 545.1126098632812L295.11260986328125 550.0L299.88897705078125 554.8873901367188Q287.0691152719351 553.8207763671875 279.09086256760816 544.7545593261718Q271.11260986328125 535.6883422851563 272.11260986328125 522.8889770507812Q272.11260986328125 511.13743708683893 281.767262425916 502.62502347506006Q291.42191498855067 494.11260986328125 303.2220458984375 495.11260986328125Q324.92149047851564 496.14813720703125 339.90444030761716 512.1988110351563Q354.88739013671875 528.2494848632812 354.88739013671875 549.9955590820313Q354.88739013671875 572.7771606445312 338.83671630859374 588.832275390625Q322.7860424804687 604.8873901367188 300.00444091796874 604.8873901367188Q277.22283935546875 604.8873901367188 261.167724609375 588.8292747703758Q245.11260986328125 572.7711594040329 245.11260986328125 549.9789956582559Q245.11260986328125 528.2228393554688 260.09555969238284 512.1850719451904Q275.07850952148436 496.1473045349121 296.7779541015625 495.11260986328125Z`})})}function uB(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M444.667724609375 124.55670166015625Q460.0378011067708 109.29024658203127 480.0189005533854 104.20142822265626Q500.0 99.11260986328125 519.9810994466145 104.20142822265626Q539.9621988932291 109.29024658203127 555.332275390625 124.55670166015625L830.332275390625 388.667724609375Q854.8873901367188 412.21490914481024 854.8873901367188 446.0V775.0Q854.8873901367188 796.5081434983474 844.133318387545 814.9436950683594Q833.3792466383713 833.3792466383713 815.4557937230819 844.133318387545Q797.5323408077925 854.8873901367188 775.0 854.8873901367188H600.0Q587.1911185128348 854.8873901367188 578.651864188058 846.348135811942Q570.1126098632812 837.8088814871652 570.1126098632812 825.0V600.0Q570.1126098632812 591.7721141468395 564.1702478582208 585.8297521417792Q558.2278858531605 579.8873901367188 550.0 579.8873901367188H450.0Q441.7721141468395 579.8873901367188 435.8297521417791 585.8297521417792Q429.88739013671875 591.7721141468395 429.88739013671875 600.0V825.0Q429.88739013671875 837.8088814871652 421.348135811942 846.348135811942Q412.8088814871652 854.8873901367188 400.0 854.8873901367188H225.0Q202.46765919220752 854.8873901367188 184.54420627691806 844.133318387545Q166.6207533616286 833.3792466383713 155.86668161245493 814.9436950683594Q145.11260986328125 796.5081434983474 145.11260986328125 775.0V446.0Q145.11260986328125 412.21490914481024 169.667724609375 388.667724609375ZM486.332275390625 167.332275390625 211.332275390625 432.332275390625Q204.88739013671875 437.79936523437505 204.88739013671875 446.0V775.0Q204.88739013671875 783.2278858531605 210.82975214177912 789.1702478582208Q216.7721141468395 795.1126098632812 225.0 795.1126098632812H400.0Q387.1911185128348 795.1126098632812 378.651864188058 803.651864188058Q370.11260986328125 812.1911185128348 370.11260986328125 825.0V600.0Q370.11260986328125 577.4676591922075 380.86668161245495 559.5442062769181Q391.6207533616286 541.6207533616287 409.5442062769181 530.866681612455Q427.4676591922075 520.1126098632812 450.0 520.1126098632812H550.0Q572.5323408077925 520.1126098632812 590.4557937230819 530.866681612455Q608.3792466383713 541.6207533616287 619.133318387545 559.5442062769181Q629.8873901367188 577.4676591922075 629.8873901367188 600.0V825.0Q629.8873901367188 812.1911185128348 621.348135811942 803.651864188058Q612.8088814871652 795.1126098632812 600.0 795.1126098632812H775.0Q783.2278858531605 795.1126098632812 789.1702478582208 789.1702478582208Q795.1126098632812 783.2278858531605 795.1126098632812 775.0V446.0Q795.1126098632812 437.79936523437505 788.7787475585938 432.332275390625L513.667724609375 167.332275390625Q508.19508361816406 161.88739013671875 499.98612213134766 161.88739013671875Q491.77716064453125 161.88739013671875 486.332275390625 167.332275390625Z`})})}function dB(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M470.11260986328125 725.0H529.8873901367188V875.0Q529.8873901367188 887.8088814871652 521.348135811942 896.348135811942Q512.8088814871652 904.8873901367188 500.0 904.8873901367188H325.0Q312.1911185128348 904.8873901367188 303.651864188058 896.3544799804688Q295.11260986328125 887.8215698242187 295.11260986328125 875.0222045898438Q295.11260986328125 862.2228393554688 303.651864188058 853.667724609375Q312.1911185128348 845.1126098632812 325.0 845.1126098632812H470.11260986328125ZM675.0 845.1126098632812Q687.7771606445312 845.1126098632812 696.332275390625 853.6455200195312Q704.8873901367188 862.1784301757813 704.8873901367188 874.9777954101562Q704.8873901367188 887.7771606445312 696.348135811942 896.332275390625Q687.8088814871652 904.8873901367188 675.0 904.8873901367188H500.0V845.1126098632812ZM654.8873901367188 225.0V450.0Q654.8873901367188 492.5181070963542 634.1306139823719 527.9498630099827Q613.3738378280249 563.3816189236111 577.9354395157252 584.1345045301649Q542.4970412034255 604.8873901367188 499.9709632286659 604.8873901367188Q457.44488525390625 604.8873901367188 422.0247984190245 584.1345045301649Q386.60471158414276 563.3816189236111 365.858660723712 527.9498630099827Q345.11260986328125 492.5181070963542 345.11260986328125 450.0V225.0Q345.11260986328125 182.48189290364587 365.86938601762824 147.0501369900174Q386.6261621719752 111.61838107638891 422.06456048427486 90.86549546983508Q457.50295879657455 70.11260986328125 500.0290367713341 70.11260986328125Q542.5551147460938 70.11260986328125 577.9752015809755 90.86549546983508Q613.3952884158573 111.61838107638891 634.141339276288 147.0501369900174Q654.8873901367188 182.48189290364587 654.8873901367188 225.0ZM595.1126098632812 225.0Q595.1126098632812 198.52535601743716 582.3686789235761 176.95342388349707Q569.624747983871 155.38149174955697 548.05809562437 142.63444094313786Q526.491443264869 129.88739013671875 500.02327900548136 129.88739013671875Q473.55511474609375 129.88739013671875 451.97382986886157 142.63444094313786Q430.39254499162945 155.38149174955697 417.63996756417407 176.95342388349707Q404.88739013671875 198.52535601743716 404.88739013671875 225.0V450.0Q404.88739013671875 476.47464398256284 417.6313210764239 498.04657611650293Q430.375252016129 519.618508250443 451.94190437563003 532.3655590568621Q473.50855673513104 545.1126098632812 499.97672099451864 545.1126098632812Q526.4448852539062 545.1126098632812 548.0261701311383 532.3655590568621Q569.6074550083705 519.618508250443 582.3600324358258 498.04657611650293Q595.1126098632812 476.47464398256284 595.1126098632812 450.0ZM195.11260986328125 425.0Q195.11260986328125 412.1911185128348 203.64552001953126 403.651864188058Q212.17843017578124 395.11260986328125 224.97779541015626 395.11260986328125Q237.77716064453125 395.11260986328125 246.332275390625 403.651864188058Q254.88739013671875 412.1911185128348 254.88739013671875 425.0V449.8265266418457Q254.88739013671875 500.47264099121094 273.74581724845325 545.1603889465332Q292.6042443601877 589.8481369018555 326.3509034022389 623.6122131347656Q360.0975624442901 657.3762893676758 404.76225823524015 676.2444496154785Q449.42695402619023 695.1126098632812 500.04694258926696 695.1126098632812Q550.6669311523438 695.1126098632812 595.3100716727121 676.2444496154785Q639.9532121930804 657.3762893676758 673.683585030692 623.6122131347656Q707.4139578683036 589.8481369018555 726.2632838657923 545.1603889465332Q745.1126098632812 500.47264099121094 745.1126098632812 449.8265266418457V425.0Q745.1126098632812 412.1911185128348 753.6455200195312 403.651864188058Q762.1784301757813 395.11260986328125 774.9777954101562 395.11260986328125Q787.7771606445312 395.11260986328125 796.332275390625 403.651864188058Q804.8873901367188 412.1911185128348 804.8873901367188 425.0V450.14385595554256Q804.8873901367188 513.5063729635099 781.244819682804 568.8228560657036Q757.6022492288891 624.1393391678973 715.8504758741035 665.878140054098Q674.0987025193178 707.6169409402987 618.765026988879 731.2521655385087Q563.4313514584401 754.8873901367188 500.0491413053919 754.8873901367188Q436.66693115234375 754.8873901367188 381.3107325236002 731.2521655385087Q325.95453389485675 707.6169409402987 284.18576583862307 665.878140054098Q242.41699778238933 624.1393391678973 218.7648038228353 568.8228560657036Q195.11260986328125 513.5063729635099 195.11260986328125 450.14385595554256Z`})})}function fB(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M470.11260986328125 225.0Q470.11260986328125 212.1911185128348 478.64552001953126 203.65186418805803Q487.1784301757813 195.11260986328125 499.97779541015626 195.11260986328125Q512.7771606445312 195.11260986328125 521.332275390625 203.65186418805803Q529.8873901367188 212.1911185128348 529.8873901367188 225.0V775.0Q529.8873901367188 787.8088814871652 521.3544799804688 796.348135811942Q512.8215698242187 804.8873901367188 500.02220458984374 804.8873901367188Q487.22283935546875 804.8873901367188 478.667724609375 796.348135811942Q470.11260986328125 787.8088814871652 470.11260986328125 775.0ZM775.0 470.11260986328125Q787.8088814871652 470.11260986328125 796.348135811942 478.64552001953126Q804.8873901367188 487.1784301757813 804.8873901367188 499.97779541015626Q804.8873901367188 512.7771606445312 796.348135811942 521.332275390625Q787.8088814871652 529.8873901367188 775.0 529.8873901367188H225.0Q212.19111851283483 529.8873901367188 203.65186418805803 521.3544799804688Q195.11260986328125 512.8215698242187 195.11260986328125 500.02220458984374Q195.11260986328125 487.22283935546875 203.65186418805803 478.667724609375Q212.19111851283483 470.11260986328125 225.0 470.11260986328125Z`})})}function pB(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M225.0 304.88739013671875Q212.19111851283483 304.88739013671875 203.65186418805803 296.35447998046874Q195.11260986328125 287.8215698242187 195.11260986328125 275.0222045898438Q195.11260986328125 262.22283935546875 203.65186418805803 253.667724609375Q212.19111851283483 245.11260986328125 225.0 245.11260986328125H775.0Q787.8088814871652 245.11260986328125 796.348135811942 253.64552001953126Q804.8873901367188 262.1784301757813 804.8873901367188 274.9777954101562Q804.8873901367188 287.77716064453125 796.348135811942 296.332275390625Q787.8088814871652 304.88739013671875 775.0 304.88739013671875ZM300.0 154.88739013671875Q287.1911185128348 154.88739013671875 278.651864188058 146.35447998046874Q270.11260986328125 137.82156982421873 270.11260986328125 125.0222045898438Q270.11260986328125 112.22283935546875 278.651864188058 103.667724609375Q287.1911185128348 95.11260986328125 300.0 95.11260986328125H700.0Q712.8088814871652 95.11260986328125 721.348135811942 103.64552001953126Q729.8873901367188 112.17843017578127 729.8873901367188 124.9777954101562Q729.8873901367188 137.77716064453125 721.348135811942 146.332275390625Q712.8088814871652 154.88739013671875 700.0 154.88739013671875ZM209.0 395.11260986328125H791.0Q815.588277445211 395.11260986328125 835.0539970893365 408.4298182896205Q854.5197167334619 421.7470267159598 864.2035534350903 442.7472400036487Q873.8873901367188 463.7474532913376 869.8873901367188 488.33306884765625L811.7763671875 838.3330688476562Q806.6610186688312 867.0026226337139 784.1534851866884 885.9450063852164Q761.6459517045455 904.8873901367188 733.0 904.8873901367188H267.0Q238.35404829545453 904.8873901367188 215.84651481331167 885.9450063852164Q193.33898133116884 867.0026226337139 188.2236328125 838.3330688476562L130.11260986328125 488.33306884765625Q126.11260986328125 463.7474532913376 135.7964465649097 442.7472400036487Q145.48028326653815 421.7470267159598 164.94600291066354 408.4298182896205Q184.41172255478895 395.11260986328125 209.0 395.11260986328125ZM209.0 454.88739013671875Q199.85790460759944 454.88739013671875 193.8726473721591 462.2041719876803Q187.88739013671875 469.52095383864184 188.88739013671875 478.66693115234375L247.7763671875 828.6669311523438Q248.69177827380952 835.9761216905382 254.18424479166666 840.5443657769097Q259.6767113095238 845.1126098632812 267.0 845.1126098632812H733.0Q740.3232886904761 845.1126098632812 745.8157552083333 840.5443657769097Q751.3082217261905 835.9761216905382 752.2236328125 828.6669311523438L811.1126098632812 478.66693115234375Q812.1126098632812 469.52095383864184 806.127352627841 462.2041719876803Q800.1420953924006 454.88739013671875 791.0 454.88739013671875Z`})})}function mB(e){return(0,H.jsxs)(`svg`,{viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,...e,children:[(0,H.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5.5`}),(0,H.jsx)(`line`,{x1:`8`,y1:`8`,x2:`10`,y2:`9`}),(0,H.jsx)(`line`,{x1:`8`,y1:`8`,x2:`8`,y2:`5.5`})]})}function hB(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M754.8873901367188 425.0584777366114Q754.8873901367188 490.444091796875 729.7390770366173 551.276105293303Q704.5907639365159 612.108118789731 658.3178678323294 658.3605588035439Q612.0449717281429 704.6129988173568 551.1860540258975 729.7501944770378Q490.3271363236522 754.8873901367188 424.9415222633886 754.8873901367188Q359.555908203125 754.8873901367188 298.7238947066971 729.7390770366173Q237.89188121026913 704.5907639365159 191.63944119645615 658.3178678323295Q145.3870011826432 612.0449717281429 120.24980552296222 551.1860540258975Q95.11260986328125 490.3271363236522 95.11260986328125 424.9415222633886Q95.11260986328125 359.555908203125 120.26092296338264 298.7238947066971Q145.40923606348403 237.89188121026916 191.68213216767057 191.63944119645612Q237.95502827185712 145.3870011826432 298.81394597410247 120.24980552296222Q359.6728636763478 95.11260986328125 425.0584777366114 95.11260986328125Q490.444091796875 95.11260986328125 551.2761052933029 120.26092296338265Q612.1081187897308 145.40923606348406 658.3605588035439 191.6821321676706Q704.6129988173568 237.95502827185715 729.7501944770378 298.81394597410247Q754.8873901367188 359.6728636763478 754.8873901367188 425.0584777366114ZM695.1126098632812 424.96526275821986Q695.1126098632812 371.33306884765625 674.2556455647286 321.6895645561568Q653.3986812661761 272.0460602646574 615.6575077735573 234.31699700311788Q577.9163342809385 196.58793374157824 528.256895474861 175.7376619391485Q478.59745666878354 154.88739013671875 424.9652627582199 154.88739013671875Q371.33306884765625 154.88739013671875 321.6895645561568 175.7443544352713Q272.0460602646574 196.60131873382386 234.31699700311782 234.3424922264427Q196.58793374157827 272.0836657190615 175.7376619391485 321.74310452513896Q154.88739013671875 371.4025433312164 154.88739013671875 425.03473724178014Q154.88739013671875 478.66693115234375 175.74435443527128 528.3104354438432Q196.6013187338238 577.9539397353426 234.3424922264427 615.6830029968821Q272.0836657190615 653.4120662584218 321.74310452513896 674.2623380608516Q371.40254333121646 695.1126098632812 425.0347372417801 695.1126098632812Q478.66693115234375 695.1126098632812 528.3104354438432 674.2556455647288Q577.9539397353426 653.3986812661763 615.6830029968821 615.6575077735573Q653.4120662584218 577.9163342809385 674.2623380608516 528.256895474861Q695.1126098632812 478.5974566687836 695.1126098632812 424.96526275821986ZM616.667724609375 658.332275390625 658.332275390625 616.667724609375 896.332275390625 853.667724609375Q904.8873901367188 862.1950836181641 904.8873901367188 874.9861221313477Q904.8873901367188 887.7771606445312 896.3544799804688 896.332275390625Q887.8215698242187 904.8873901367188 875.0222045898438 904.8873901367188Q862.2228393554688 904.8873901367188 853.667724609375 896.332275390625Z`})})}function gB(e){return(0,H.jsx)(`svg`,{viewBox:`0 0 1000 1000`,fill:`currentColor`,"aria-hidden":`true`,...e,children:(0,H.jsx)(`path`,{d:`M295.11260986328125 175.0H354.88739013671875V825.0H295.11260986328125ZM175.0 145.11260986328125H825.0Q847.5323408077925 145.11260986328125 865.4557937230819 155.86668161245495Q883.3792466383713 166.62075336162866 894.133318387545 184.5442062769181Q904.8873901367188 202.46765919220752 904.8873901367188 225.0V775.0Q904.8873901367188 797.5323408077925 894.133318387545 815.4557937230819Q883.3792466383713 833.3792466383713 865.4557937230819 844.133318387545Q847.5323408077925 854.8873901367188 825.0 854.8873901367188H175.0Q152.46765919220752 854.8873901367188 134.54420627691806 844.133318387545Q116.6207533616286 833.3792466383713 105.86668161245493 815.4557937230819Q95.11260986328125 797.5323408077925 95.11260986328125 775.0V225.0Q95.11260986328125 202.46765919220752 105.86668161245493 184.5442062769181Q116.6207533616286 166.62075336162866 134.54420627691806 155.86668161245495Q152.46765919220752 145.11260986328125 175.0 145.11260986328125ZM175.0 204.88739013671875Q166.7721141468395 204.88739013671875 160.82975214177912 210.82975214177912Q154.88739013671875 216.7721141468395 154.88739013671875 225.0V775.0Q154.88739013671875 783.2278858531605 160.82975214177912 789.1702478582208Q166.7721141468395 795.1126098632812 175.0 795.1126098632812H825.0Q833.2278858531605 795.1126098632812 839.1702478582208 789.1702478582208Q845.1126098632812 783.2278858531605 845.1126098632812 775.0V225.0Q845.1126098632812 216.7721141468395 839.1702478582208 210.82975214177912Q833.2278858531605 204.88739013671875 825.0 204.88739013671875Z`})})}var _B=[{code:`am`,englishName:`Amharic`,localeName:`አማርኛ`},{code:`ar`,englishName:`Arabic`,localeName:`العربية`},{code:`bg`,englishName:`Bulgarian`,localeName:`български`},{code:`bn`,englishName:`Bengali`,localeName:`বাংলা`},{code:`bs`,englishName:`Bosnian`,localeName:`bosanski`},{code:`ca`,englishName:`Catalan`,localeName:`català`},{code:`cs`,englishName:`Czech`,localeName:`čeština`},{code:`da`,englishName:`Danish`,localeName:`dansk`},{code:`de`,englishName:`German`,localeName:`Deutsch`},{code:`el`,englishName:`Greek`,localeName:`Ελληνικά`},{code:`en-US`,englishName:`English (US)`,localeName:`English (US)`},{code:`es-419`,englishName:`Spanish (Latin America)`,localeName:`español (Latinoamérica)`},{code:`es-ES`,englishName:`Spanish (Spain)`,localeName:`español (España)`},{code:`et`,englishName:`Estonian`,localeName:`eesti`},{code:`fa`,englishName:`Persian`,localeName:`فارسی`},{code:`fi`,englishName:`Finnish`,localeName:`suomi`},{code:`fr-CA`,englishName:`French (Canada)`,localeName:`français (Canada)`},{code:`fr-FR`,englishName:`French (France)`,localeName:`français (France)`},{code:`gu`,englishName:`Gujarati`,localeName:`ગુજરાતી`},{code:`hi`,englishName:`Hindi`,localeName:`हिन्दी`},{code:`hr`,englishName:`Croatian`,localeName:`hrvatski`},{code:`hu`,englishName:`Hungarian`,localeName:`magyar`},{code:`hy`,englishName:`Armenian`,localeName:`հայերեն`},{code:`id`,englishName:`Indonesian`,localeName:`Indonesia`},{code:`is`,englishName:`Icelandic`,localeName:`íslenska`},{code:`it`,englishName:`Italian`,localeName:`italiano`},{code:`ja`,englishName:`Japanese`,localeName:`日本語`},{code:`ka`,englishName:`Georgian`,localeName:`ქართული`},{code:`kk`,englishName:`Kazakh`,localeName:`қазақ тілі`},{code:`kn`,englishName:`Kannada`,localeName:`ಕನ್ನಡ`},{code:`ko`,englishName:`Korean`,localeName:`한국어`},{code:`lt`,englishName:`Lithuanian`,localeName:`lietuvių`},{code:`lv`,englishName:`Latvian`,localeName:`latviešu`},{code:`mk`,englishName:`Macedonian`,localeName:`македонски`},{code:`ml`,englishName:`Malayalam`,localeName:`മലയാളം`},{code:`mn`,englishName:`Mongolian`,localeName:`монгол`},{code:`mr`,englishName:`Marathi`,localeName:`मराठी`},{code:`ms`,englishName:`Malay`,localeName:`Bahasa Melayu`},{code:`my`,englishName:`Burmese`,localeName:`မြန်မာ`},{code:`nb`,englishName:`Norwegian Bokmål`,localeName:`norsk bokmål`},{code:`nl`,englishName:`Dutch`,localeName:`Nederlands`},{code:`pa`,englishName:`Punjabi`,localeName:`ਪੰਜਾਬੀ`},{code:`pl`,englishName:`Polish`,localeName:`polski`},{code:`pt-BR`,englishName:`Portuguese (Brazil)`,localeName:`português (Brasil)`},{code:`pt-PT`,englishName:`Portuguese (Portugal)`,localeName:`português (Portugal)`},{code:`ro`,englishName:`Romanian`,localeName:`română`},{code:`ru`,englishName:`Russian`,localeName:`русский`},{code:`sk`,englishName:`Slovak`,localeName:`slovenčina`},{code:`sl`,englishName:`Slovenian`,localeName:`slovenščina`},{code:`so`,englishName:`Somali`,localeName:`Soomaali`},{code:`sq`,englishName:`Albanian`,localeName:`shqip`},{code:`sr`,englishName:`Serbian`,localeName:`српски`},{code:`sv`,englishName:`Swedish`,localeName:`svenska`},{code:`sw`,englishName:`Swahili`,localeName:`Kiswahili`},{code:`ta`,englishName:`Tamil`,localeName:`தமிழ்`},{code:`te`,englishName:`Telugu`,localeName:`తెలుగు`},{code:`th`,englishName:`Thai`,localeName:`ไทย`},{code:`tl`,englishName:`Tagalog`,localeName:`Tagalog`},{code:`tr`,englishName:`Turkish`,localeName:`Türkçe`},{code:`uk`,englishName:`Ukrainian`,localeName:`українська`},{code:`ur`,englishName:`Urdu`,localeName:`اردو`},{code:`vi`,englishName:`Vietnamese`,localeName:`Tiếng Việt`},{code:`zh-CN`,englishName:`Chinese (Simplified)`,localeName:`简体中文`},{code:`zh-HK`,englishName:`Chinese (Traditional, Hong Kong)`,localeName:`繁體中文(香港)`},{code:`zh-TW`,englishName:`Chinese (Traditional, Taiwan)`,localeName:`繁體中文(台灣)`}];function vB(e,t){return typeof e==`string`&&t.includes(e)}var yB=[{mode:`fullscreen`,icon:li},{mode:`pip`,icon:pi},{mode:`inline`,icon:Ci}];function bB(e){let{userAgent:t,displayMode:n,previewClient:r,setPreference:i}=hs.getState();i(`theme`,e.has(`darkTheme`)?`dark`:`light`);let a=e.has(`mobileDevice`);i(`userAgent`,{...t,device:{...t?.device,type:a?`mobile`:`desktop`},capabilities:{hover:!a,touch:a}}),a&&n===`pip`&&r===`chatgpt`&&i(`displayMode`,`fullscreen`);let o=e.get(`locale`);vB(o,_B.map(e=>e.code))&&i(`locale`,o);let s=hs.getState();return`View preview options: displayMode=${s.displayMode}, theme=${s.theme}, locale=${s.locale}, device=${s.userAgent?.device?.type??`desktop`}.`}function xB({name:e,description:t,value:n,options:r}){return(0,H.jsx)(`select`,{name:e,toolparamdescription:t,value:n,tabIndex:-1,onChange:e=>e.currentTarget.form?.requestSubmit(),children:r.map(e=>(0,H.jsx)(`option`,{value:e,children:e},e))})}var SB=`inline-flex h-7 cursor-pointer items-center gap-1.5 rounded-md px-2.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,CB=`text-light-gray-foreground hover:bg-light-gray hover:text-foreground`,wB=`bg-muted text-foreground`;function TB({icon:e,label:t,selected:n,onClick:r,className:i,ariaLabel:a}){return(0,H.jsxs)(`button`,{type:`button`,onClick:r,"aria-pressed":n,"aria-label":a,className:pj(SB,`border border-border bg-background`,n?wB:CB,i),children:[(0,H.jsx)(e,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:t})]})}function EB({icon:e,label:t,name:n,description:r,checked:i}){return(0,H.jsxs)(`label`,{className:pj(SB,`border border-border bg-background`,CB,`has-focus-visible:ring-1 has-focus-visible:ring-ring`),children:[(0,H.jsx)(`input`,{type:`checkbox`,name:n,toolparamdescription:r,checked:i,onChange:e=>e.currentTarget.form?.requestSubmit(),className:`sr-only`}),(0,H.jsx)(e,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:t})]})}var DB=({variant:e=`panel`,logsOpen:t,onOpenLogs:n,fullscreenInspectorOpen:r,onToggleFullscreenInspector:i})=>{let a=hs(e=>e.displayMode),o=hs(e=>e.theme),s=hs(e=>e.locale),c=hs(e=>e.userAgent),l=hs(e=>e.previewClient),u=hs(e=>e.setPreviewClient),d=hs(e=>e.setPreference),f=(0,b.useRef)(null),[p,m]=(0,b.useState)(!1),h=e=>{let t=f.current,n=t?.elements.namedItem(`locale`);n instanceof HTMLSelectElement&&(n.value=e),t?.requestSubmit()},g=o===`dark`,_=(c?.device?.type??`desktop`)===`mobile`,v=_B.find(e=>e.code===s)?.englishName??s,y=yB.find(e=>e.mode===a)?.icon??Ci;return(0,H.jsxs)(`form`,{ref:f,toolname:`devtools_set_view_options`,tooldescription:e===`panel`?`Set the Skybridge devtools view preview options. Any subset of fields can be changed: theme, locale, and device type.`:`Set the Skybridge devtools preview options: theme and device type.`,toolautosubmit:``,onSubmit:e=>{e.preventDefault();let t=bB(new FormData(e.currentTarget)),n=e.nativeEvent;n instanceof SubmitEvent&&n.agentInvoked&&typeof n.respondWith==`function`&&n.respondWith(Promise.resolve({content:[{type:`text`,text:t}]}))},className:pj(`flex w-full shrink-0 items-center gap-1.5`,e===`panel`?`mt-3 px-3`:`justify-end`),children:[e===`panel`&&(0,H.jsxs)(`div`,{title:`Display mode (driven by the view)`,className:`inline-flex h-7 cursor-default items-center gap-1.5 rounded-md bg-muted px-2.5 text-xs font-medium text-muted-foreground`,children:[(0,H.jsx)(y,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:a})]}),(0,H.jsx)(EB,{icon:g?fi:wi,label:g?`dark`:`light`,name:`darkTheme`,description:`Preview the view in dark theme (true) or light theme (false).`,checked:g}),e===`panel`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(XF,{open:p,onOpenChange:m,children:[(0,H.jsx)(ZF,{asChild:!0,children:(0,H.jsxs)(`button`,{type:`button`,"aria-label":`Locale`,className:pj(SB,`border border-border bg-background`,CB,`aria-expanded:bg-muted aria-expanded:text-foreground`),children:[(0,H.jsx)(ri,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:v})]})}),(0,H.jsx)(QF,{className:`w-[260px] p-0`,align:`start`,children:(0,H.jsxs)(Az,{children:[(0,H.jsx)(jz,{placeholder:`Search locale...`}),(0,H.jsxs)(Mz,{children:[(0,H.jsx)(Nz,{children:`No locale found.`}),(0,H.jsx)(Pz,{children:_B.map(e=>(0,H.jsxs)(Fz,{value:e.code,keywords:[e.englishName,e.localeName],onSelect:e=>{h(e),m(!1)},children:[(0,H.jsxs)(`span`,{className:`truncate`,children:[e.englishName,e.localeName===e.englishName?null:(0,H.jsx)(`span`,{className:`ml-1.5 text-muted-foreground`,children:e.localeName})]}),(0,H.jsx)(Kr,{className:pj(`ml-auto h-4 w-4`,s===e.code?`opacity-100`:`opacity-0`)})]},e.code))})]})]})})]}),(0,H.jsx)(`div`,{className:`sr-only`,"aria-hidden":!0,children:(0,H.jsx)(xB,{name:`locale`,description:`The BCP 47 locale code to preview the view in.`,value:s,options:_B.map(e=>e.code)})})]}),(0,H.jsx)(EB,{icon:_?xi:di,label:_?`mobile`:`desktop`,name:`mobileDevice`,description:`Preview the view on a mobile device (true) or desktop (false).`,checked:_}),e===`panel`&&a!==`fullscreen`&&(0,H.jsxs)(`div`,{className:`ml-auto flex items-center gap-1.5`,children:[(0,H.jsx)(TB,{icon:$r,label:`preview`,onClick:()=>u(`chatgpt`)}),!t&&(0,H.jsx)(TB,{icon:ci,label:`logs`,onClick:n})]}),e===`panel`&&a===`fullscreen`&&(0,H.jsxs)(`div`,{className:`ml-auto flex items-center gap-1.5`,children:[(0,H.jsx)(TB,{icon:Gr,label:`inspector`,ariaLabel:r?`Close DevTools inspector`:`Open DevTools inspector`,selected:r,onClick:i}),(0,H.jsx)(TB,{icon:Oi,label:`exit`,ariaLabel:`Exit fullscreen`,onClick:()=>d(`displayMode`,`inline`)})]}),e===`preview`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(TB,{icon:l===`claude`?Xz:iB,label:l===`claude`?`switch to ChatGPT`:`switch to Claude`,onClick:()=>{u(l===`claude`?`chatgpt`:`claude`),d(`displayMode`,`inline`)}}),(0,H.jsx)(TB,{icon:Oi,label:`quit preview`,onClick:()=>{u(null),d(`displayMode`,`inline`)}})]})]})},OB=({iframeRef:e,containerRef:t,enabled:n,onHeightChange:r,documentKey:i,clampToContainer:a=!0})=>{(0,b.useEffect)(()=>{if(!n||!i)return;let o=e.current;if(!o?.contentDocument?.body)return;let s=()=>{let e=gj(o,a?t.current:null),n=a?e:Math.min(e,window.innerHeight);n>0&&r(n)},c=new ResizeObserver(s),l=o.contentDocument.getElementById(`root`);l&&c.observe(l),c.observe(o.contentDocument.body),c.observe(o.contentDocument.documentElement);let u=t.current?.parentElement;return u&&c.observe(u),s(),()=>{c.disconnect()}},[t,n,e,r,i,a])},kB=({iframeRef:e,documentKey:t})=>{let[n,r]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(r(!1),!t)return;let n=e.current?.contentDocument;if(!n)return;let i=()=>{let e=n.getElementById(`root`);return!!(e&&e.childNodes.length>0)};if(i()){r(!0);return}let a=new MutationObserver(()=>{i()&&(r(!0),a.disconnect())});return a.observe(n.documentElement,{childList:!0,subtree:!0}),()=>a.disconnect()},[e,t]),n},AB=32,jB=2,MB={"--color-background-primary":`#fff`,"--color-background-secondary":`#f9f9f9`,"--color-background-tertiary":`#f3f3f3`,"--color-background-inverse":`#181818`,"--color-background-ghost":`color-mix(in oklab,#0d0d0d 0.0%,transparent)`,"--color-background-disabled":`color-mix(in oklab,#0d0d0d 5.0%,transparent)`,"--color-text-primary":`#0d0d0d`,"--color-text-secondary":`#5d5d5d`,"--color-text-tertiary":`#8f8f8f`,"--color-text-inverse":`#fff`,"--color-text-ghost":`#0d0d0d`,"--color-text-info":`#3a83f7`,"--color-text-danger":`#fa423e`,"--color-text-success":`#2c6732`,"--color-text-warning":`#87401d`,"--color-text-disabled":`#8f8f8f`,"--color-border-primary":`color-mix(in oklab,#0d0d0d 10.0%,transparent)`,"--color-border-secondary":`color-mix(in oklab,#0d0d0d 5.0%,transparent)`,"--color-border-tertiary":`color-mix(in oklab,#0d0d0d 15%,transparent)`,"--color-border-inverse":`#fff`,"--color-border-ghost":`color-mix(in oklab,#0d0d0d 0.0%,transparent)`,"--color-border-disabled":`color-mix(in oklab,#0d0d0d 6.0%,transparent)`,"--color-ring-primary":`#2c67c5`,"--color-ring-secondary":`#2c67c5`,"--color-ring-inverse":`#2c67c5`,"--color-ring-info":`#2c67c5`,"--color-ring-danger":`#ff8583`,"--color-ring-success":`#2c67c5`,"--color-ring-warning":`#2c67c5`,"--font-sans":`"ui-sans-serif", "-apple-system", "system-ui", "Segoe UI", "Helvetica", "Apple Color Emoji", "Arial", "sans-serif", "Segoe UI Emoji", "Segoe UI Symbol"`,"--font-mono":`"ui-monospace", "SFMono-Regular", "SF Mono", "Menlo", "Consolas", "Liberation Mono", "monospace"`,"--font-weight-normal":`400`,"--font-weight-medium":`500`,"--font-weight-semibold":`600`,"--font-weight-bold":`700`,"--font-text-xs-size":`.75rem`,"--font-text-sm-size":`.875rem`,"--font-text-md-size":`1rem`,"--font-text-lg-size":`1.125rem`,"--font-heading-xs-size":`1rem`,"--font-heading-sm-size":`1.125rem`,"--font-heading-md-size":`1.25rem`,"--font-heading-lg-size":`1.5rem`,"--font-heading-xl-size":`2rem`,"--font-heading-2xl-size":`2.25rem`,"--font-heading-3xl-size":`3rem`,"--font-text-xs-line-height":`1.125rem`,"--font-text-sm-line-height":`1.25rem`,"--font-text-md-line-height":`1.5rem`,"--font-text-lg-line-height":`1.8125rem`,"--font-heading-xs-line-height":`1.5rem`,"--font-heading-sm-line-height":`1.625rem`,"--font-heading-md-line-height":`1.625rem`,"--font-heading-lg-line-height":`1.75rem`,"--font-heading-xl-line-height":`2.375rem`,"--font-heading-2xl-line-height":`2.625rem`,"--font-heading-3xl-line-height":`3rem`,"--border-radius-xs":`.25rem`,"--border-radius-sm":`.375rem`,"--border-radius-md":`.5rem`,"--border-radius-lg":`.625rem`,"--border-radius-xl":`.75rem`,"--border-radius-full":`9999px`,"--border-width-regular":`.5px`,"--shadow-hairline":`0 0 0 .5px #0000001a`,"--shadow-sm":`0 1px 2px -1px rgb(0 0 0 / .08)`,"--shadow-md":`0 2px 4px -1px rgb(0 0 0 / .08)`,"--shadow-lg":`0 4px 8px -2px rgb(0 0 0 / .1)`},NB={"--color-background-primary":`#212121`,"--color-background-secondary":`#303030`,"--color-background-tertiary":`#414141`,"--color-background-inverse":`#f3f3f3`,"--color-background-ghost":`color-mix(in oklab,#fff 0.0%,transparent)`,"--color-background-disabled":`color-mix(in oklab,#fff 5.0%,transparent)`,"--color-text-primary":`#fff`,"--color-text-secondary":`#cdcdcd`,"--color-text-tertiary":`#afafaf`,"--color-text-inverse":`#0d0d0d`,"--color-text-ghost":`#fff`,"--color-border-primary":`color-mix(in oklab,#fff 10.0%,transparent)`,"--color-border-secondary":`color-mix(in oklab,#fff 5.0%,transparent)`,"--color-border-tertiary":`color-mix(in oklab,#fff 15%,transparent)`,"--color-border-inverse":`#181818`,"--color-border-ghost":`color-mix(in oklab,#fff 0.0%,transparent)`,"--color-border-disabled":`color-mix(in oklab,#fff 6.0%,transparent)`};function PB(e){return e===`dark`?{...MB,...NB}:MB}function FB(e,t){return{styles:{variables:PB(e)},containerDimensions:{maxWidth:t?yj.width-AB-jB:768},availableDisplayModes:t?[`inline`,`fullscreen`]:[`inline`,`fullscreen`,`pip`],userAgent:`chatgpt`,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}}var IB=32,LB={"--color-background-primary":`light-dark(rgba(255, 255, 255, 1), rgba(48, 48, 46, 1))`,"--color-background-secondary":`light-dark(rgba(245, 244, 237, 1), rgba(38, 38, 36, 1))`,"--color-background-tertiary":`light-dark(rgba(250, 249, 245, 1), rgba(20, 20, 19, 1))`,"--color-background-inverse":`light-dark(rgba(20, 20, 19, 1), rgba(250, 249, 245, 1))`,"--color-background-ghost":`light-dark(rgba(255, 255, 255, 0), rgba(48, 48, 46, 0))`,"--color-background-info":`light-dark(rgba(214, 228, 246, 1), rgba(37, 62, 95, 1))`,"--color-background-danger":`light-dark(rgba(247, 236, 236, 1), rgba(96, 42, 40, 1))`,"--color-background-success":`light-dark(rgba(233, 241, 220, 1), rgba(27, 70, 20, 1))`,"--color-background-warning":`light-dark(rgba(246, 238, 223, 1), rgba(72, 58, 15, 1))`,"--color-background-disabled":`light-dark(rgba(255, 255, 255, 0.5), rgba(48, 48, 46, 0.5))`,"--color-text-primary":`light-dark(rgba(20, 20, 19, 1), rgba(250, 249, 245, 1))`,"--color-text-secondary":`light-dark(rgba(61, 61, 58, 1), rgba(194, 192, 182, 1))`,"--color-text-tertiary":`light-dark(rgba(115, 114, 108, 1), rgba(156, 154, 146, 1))`,"--color-text-inverse":`light-dark(rgba(255, 255, 255, 1), rgba(20, 20, 19, 1))`,"--color-text-ghost":`light-dark(rgba(115, 114, 108, 0.5), rgba(156, 154, 146, 0.5))`,"--color-text-info":`light-dark(rgba(50, 102, 173, 1), rgba(128, 170, 221, 1))`,"--color-text-danger":`light-dark(rgba(127, 44, 40, 1), rgba(238, 136, 132, 1))`,"--color-text-success":`light-dark(rgba(38, 91, 25, 1), rgba(122, 185, 72, 1))`,"--color-text-warning":`light-dark(rgba(90, 72, 21, 1), rgba(209, 160, 65, 1))`,"--color-text-disabled":`light-dark(rgba(20, 20, 19, 0.5), rgba(250, 249, 245, 0.5))`,"--color-border-primary":`light-dark(rgba(31, 30, 29, 0.4), rgba(222, 220, 209, 0.4))`,"--color-border-secondary":`light-dark(rgba(31, 30, 29, 0.3), rgba(222, 220, 209, 0.3))`,"--color-border-tertiary":`light-dark(rgba(31, 30, 29, 0.15), rgba(222, 220, 209, 0.15))`,"--color-border-inverse":`light-dark(rgba(255, 255, 255, 0.3), rgba(20, 20, 19, 0.15))`,"--color-border-ghost":`light-dark(rgba(31, 30, 29, 0), rgba(222, 220, 209, 0))`,"--color-border-info":`light-dark(rgba(70, 130, 213, 1), rgba(70, 130, 213, 1))`,"--color-border-danger":`light-dark(rgba(167, 61, 57, 1), rgba(205, 92, 88, 1))`,"--color-border-success":`light-dark(rgba(67, 116, 38, 1), rgba(89, 145, 48, 1))`,"--color-border-warning":`light-dark(rgba(128, 92, 31, 1), rgba(168, 120, 41, 1))`,"--color-border-disabled":`light-dark(rgba(31, 30, 29, 0.1), rgba(222, 220, 209, 0.1))`,"--color-ring-primary":`light-dark(rgba(20, 20, 19, 0.7), rgba(250, 249, 245, 0.7))`,"--color-ring-secondary":`light-dark(rgba(61, 61, 58, 0.7), rgba(194, 192, 182, 0.7))`,"--color-ring-inverse":`light-dark(rgba(255, 255, 255, 0.7), rgba(20, 20, 19, 0.7))`,"--color-ring-info":`light-dark(rgba(50, 102, 173, 0.5), rgba(128, 170, 221, 0.5))`,"--color-ring-danger":`light-dark(rgba(167, 61, 57, 0.5), rgba(205, 92, 88, 0.5))`,"--color-ring-success":`light-dark(rgba(67, 116, 38, 0.5), rgba(89, 145, 48, 0.5))`,"--color-ring-warning":`light-dark(rgba(128, 92, 31, 0.5), rgba(168, 120, 41, 0.5))`,"--font-sans":`Anthropic Sans, sans-serif`,"--font-mono":`ui-monospace, monospace`,"--font-weight-normal":`400`,"--font-weight-medium":`500`,"--font-weight-semibold":`600`,"--font-weight-bold":`700`,"--font-text-xs-size":`12px`,"--font-text-sm-size":`14px`,"--font-text-md-size":`16px`,"--font-text-lg-size":`20px`,"--font-heading-xs-size":`12px`,"--font-heading-sm-size":`14px`,"--font-heading-md-size":`16px`,"--font-heading-lg-size":`20px`,"--font-heading-xl-size":`24px`,"--font-heading-2xl-size":`28px`,"--font-heading-3xl-size":`36px`,"--font-text-xs-line-height":`1.4`,"--font-text-sm-line-height":`1.4`,"--font-text-md-line-height":`1.4`,"--font-text-lg-line-height":`1.25`,"--font-heading-xs-line-height":`1.4`,"--font-heading-sm-line-height":`1.4`,"--font-heading-md-line-height":`1.4`,"--font-heading-lg-line-height":`1.25`,"--font-heading-xl-line-height":`1.25`,"--font-heading-2xl-line-height":`1.1`,"--font-heading-3xl-line-height":`1`,"--border-radius-xs":`4px`,"--border-radius-sm":`6px`,"--border-radius-md":`8px`,"--border-radius-lg":`10px`,"--border-radius-xl":`12px`,"--border-radius-full":`9999px`,"--border-width-regular":`0.5px`,"--shadow-hairline":`0 1px 2px 0 rgba(0, 0, 0, 0.05)`,"--shadow-sm":`0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)`,"--shadow-md":`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`,"--shadow-lg":`0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)`},RB=`
167
+ @font-face {
168
+ font-family: "Anthropic Sans";
169
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Regular-Static.otf") format("opentype");
170
+ font-weight: 400;
171
+ font-style: normal;
172
+ font-display: swap;
173
+ }
174
+ @font-face {
175
+ font-family: "Anthropic Sans";
176
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-RegularItalic-Static.otf") format("opentype");
177
+ font-weight: 400;
178
+ font-style: italic;
179
+ font-display: swap;
180
+ }
181
+ @font-face {
182
+ font-family: "Anthropic Sans";
183
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Medium-Static.otf") format("opentype");
184
+ font-weight: 500;
185
+ font-style: normal;
186
+ font-display: swap;
187
+ }
188
+ @font-face {
189
+ font-family: "Anthropic Sans";
190
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-MediumItalic-Static.otf") format("opentype");
191
+ font-weight: 500;
192
+ font-style: italic;
193
+ font-display: swap;
194
+ }
195
+ @font-face {
196
+ font-family: "Anthropic Sans";
197
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Semibold-Static.otf") format("opentype");
198
+ font-weight: 600;
199
+ font-style: normal;
200
+ font-display: swap;
201
+ }
202
+ @font-face {
203
+ font-family: "Anthropic Sans";
204
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-SemiboldItalic-Static.otf") format("opentype");
205
+ font-weight: 600;
206
+ font-style: italic;
207
+ font-display: swap;
208
+ }
209
+ @font-face {
210
+ font-family: "Anthropic Sans";
211
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Bold-Static.otf") format("opentype");
212
+ font-weight: 700;
213
+ font-style: normal;
214
+ font-display: swap;
215
+ }
216
+ @font-face {
217
+ font-family: "Anthropic Sans";
218
+ src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-BoldItalic-Static.otf") format("opentype");
219
+ font-weight: 700;
220
+ font-style: italic;
221
+ font-display: swap;
222
+ }
223
+ `;function zB(e){return{styles:{variables:LB,css:{fonts:RB}},containerDimensions:{width:e?yj.width-IB:720,maxHeight:5e3},availableDisplayModes:[`inline`,`fullscreen`],userAgent:navigator.userAgent,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}}function BB(e,t){e.contentWindow?.postMessage(t,`*`)}function VB(e,t,n){e({jsonrpc:`2.0`,id:t,result:n})}function HB(e,t,n,r){e({jsonrpc:`2.0`,id:t,error:{code:n,message:r}})}function UB(e,t,n){switch(e){case`chatgpt`:return FB(t,n);case`claude`:return zB(n);case null:return{}}}function WB(){let e=hs.getState(),t=_s(e.userAgent);return{...UB(e.previewClient,e.theme,t),theme:e.theme,locale:e.locale,displayMode:e.displayMode,safeAreaInsets:e.safeArea?.insets??{top:0,right:0,bottom:0,left:0},platform:t?`mobile`:`web`,deviceCapabilities:e.userAgent?.capabilities}}function GB(e,t,n,r){let i=t=>BB(e,t),a=async a=>{if(a.source!==e.contentWindow)return;let o=a.data;if(o?.jsonrpc!==`2.0`)return;let{id:s,method:c,params:l}=o;if(c!==`ui/notifications/size-changed`&&c!==`ui/notifications/request-teardown`&&s!==void 0)switch(c){case`ui/initialize`:{VB(i,s,{protocolVersion:`2025-06-18`,hostInfo:{name:`skybridge-devtools`,version:`0.0.1`},hostCapabilities:{openLinks:{},serverTools:{}},hostContext:WB()});let e=r();e.toolInput!=null&&i({jsonrpc:`2.0`,method:`ui/notifications/tool-input`,params:{arguments:e.toolInput}}),(e.toolOutput!=null||e.toolResponseMetadata!=null)&&i({jsonrpc:`2.0`,method:`ui/notifications/tool-result`,params:{content:[],structuredContent:e.toolOutput??{},isError:!1,_meta:e.toolResponseMetadata??{}}});break}case`ui/update-model-context`:n(`mcp:updateModelContext`,l??{}),VB(i,s,{});break;case`ui/request-display-mode`:{let e=l?.mode??`inline`,t=hs.getState(),n=ys(e,t);t.setPreference(`displayMode`,n),VB(i,s,{mode:n});break}case`ui/open-link`:{let e=l?.url;e&&window.open(e,`_blank`,`noopener,noreferrer`),VB(i,s,{});break}case`ui/download-file`:HB(i,s,-32603,`downloadFile capability disabled in devtools`);break;case`tools/call`:{let e=l?.name??``,r=l?.arguments??{};n(`mcp:tools/call`,{name:e,args:r});try{let a=await t(e,r);n(`mcp:tools/call response`,a,`response`),VB(i,s,a)}catch(e){let t=e instanceof Error?e.message:String(e);HB(i,s,-32603,t)}break}default:s!==void 0&&HB(i,s,-32601,`Method not found: ${c}`)}};window.addEventListener(`message`,a);let o=hs.subscribe((e,t)=>{let n={};e.theme!==t.theme&&(n.theme=e.theme,e.previewClient===`chatgpt`&&(n.styles={variables:PB(e.theme)})),(e.previewClient!==t.previewClient||e.previewClient!==null&&e.userAgent!==t.userAgent)&&Object.assign(n,UB(e.previewClient,e.theme,_s(e.userAgent))),e.locale!==t.locale&&(n.locale=e.locale),e.displayMode!==t.displayMode&&(n.displayMode=e.displayMode),e.safeArea!==t.safeArea&&(n.safeAreaInsets=e.safeArea?.insets),e.userAgent!==t.userAgent&&(n.platform=e.userAgent?.device?.type===`mobile`?`mobile`:`web`,n.deviceCapabilities=e.userAgent?.capabilities),Object.keys(n).length>0&&i({jsonrpc:`2.0`,method:`ui/notifications/host-context-changed`,params:n})});return()=>{window.removeEventListener(`message`,a),o()}}function KB(e,t){e.contentWindow?.postMessage({jsonrpc:`2.0`,method:`ui/notifications/tool-input`,params:{arguments:t}},`*`)}function qB(e,t){e.contentWindow?.postMessage({jsonrpc:`2.0`,method:`ui/notifications/tool-result`,params:{content:t.content??[],structuredContent:t.structuredContent??{},isError:t.isError??!1,_meta:t._meta??{}}},`*`)}var JB=`openai:set_globals`,YB=class extends CustomEvent{type=JB};function XB(e,t,n,r,i){return{callTool:async(e,n)=>{t(`callTool`,{name:e,args:n});let i=await r(e,n??{});return t(`← callTool response`,i,`response`),i},sendFollowUpMessage:async e=>{t(`sendFollowUpMessage`,e)},requestClose:async()=>{t(`requestClose`,{});let e=hs.getState();e.displayMode===`modal`&&e.setPreference(`displayMode`,`inline`)},openExternal:e=>{window.open(e.href,`_blank`,`noopener,noreferrer`),t(`openExternal`,e)},requestDisplayMode:async r=>{t(`requestDisplayMode`,r);let i=hs.getState(),a=ys(r.mode,i);return e.displayMode=a,n(`displayMode`,a),i.setPreference(`displayMode`,a),{mode:a}},setWidgetState:async r=>{rC(r.modelContent,`setWidgetState`),t(`setWidgetState`,r),e.widgetState=r,n(`widgetState`,r)},requestModal:async r=>{t(`requestModal`,r),e.view={mode:`modal`,params:r.params},n(`displayMode`,`modal`),hs.getState().setPreference(`displayMode`,`modal`)},uploadFile:async e=>(t(`uploadFile`,{name:e.name,size:e.size}),{fileId:`123`}),getFileDownloadUrl:async e=>(t(`getFileDownloadUrl`,e),{downloadUrl:`https://example.com/file.pdf`}),setOpenInAppUrl:async e=>{t(`setOpenInAppUrl`,e),i(e.href)}}}function ZB(e,t){let n=[`theme`,`userAgent`,`locale`,`maxHeight`,`displayMode`,`safeArea`,`toolInput`,`toolOutput`,`toolResponseMetadata`,`view`,`widgetState`];return new Proxy(e||{},{set(e,r,i,a){let o=Reflect.set(e,r,i,a);if(n.includes(r)){let e=new YB(JB,{detail:{globals:{[r]:i}}});t.dispatchEvent(e)}return o}})}function QB(e,t,n,r,i,a){let o=ZB(yE(t),e);return jne(o,XB(o,n,r,i,a)),e.openai=o,hs.subscribe(({displayMode:e})=>{let t=o.view;e===`modal`||t?.mode!==`modal`||(o.view={mode:e},r(`view`,{mode:e}))})}var $B=`__host-fonts`,eV=({iframeRef:e,theme:t,previewClient:n,documentKey:r})=>{(0,b.useEffect)(()=>{let i=e.current,a=i?.contentDocument,o=a?.documentElement;if(!i||!a||!o||!r||n===null)return;i.style.colorScheme=t,o.style.colorScheme=t;let s=n===`chatgpt`?PB(t):LB,c=Object.entries(s);for(let[e,t]of c)o.style.setProperty(e,t);if(n===`claude`&&!a.getElementById($B)){let e=a.createElement(`style`);e.id=$B,e.textContent=RB,a.head?.appendChild(e)}return()=>{i.style.removeProperty(`color-scheme`),o.style.removeProperty(`color-scheme`);for(let[e]of c)o.style.removeProperty(e)}},[e,t,n,r])},tV=({iframeRef:e,toolName:t,globalKey:n,value:r,updateOpenaiObject:i})=>{(0,b.useEffect)(()=>{let a=e.current?.contentWindow?.openai;!a||a[n]===r||(a[n]=r,i(t,n,r))},[e,n,r,t,i])},nV=345,rV=770,iV=420,aV=()=>{let e=JO(),{openaiObject:t}=hO(e.name)??{},{data:n}=YO(e._meta?.ui?.resourceUri),{setToolData:r,pushOpenAiLog:i,updateOpenaiObject:a,setOpenInAppUrl:o}=mO(),s=(0,b.useRef)(null),c=(0,b.useRef)(null),l=(0,b.useRef)(t);l.current=t;let[u,d]=(0,b.useState)(null),f=hs(e=>e.previewClient),p=f!==null,m=vs()&&!p,h=(0,b.useRef)(m);(0,b.useEffect)(()=>{h.current!==m&&(h.current=m,d(null))},[m]);let g=hs(e=>e.displayMode),_=g===`fullscreen`,v=g===`pip`,y=g===`modal`,x=_&&!m,S=x||y,C=S||p?`100%`:`${m?nV:rV}px`,w=hs(e=>e.theme),T=hs(e=>e.locale),E=hs(e=>e.userAgent),D=n.contents[0],O=D.text,k=hj(D._meta?.ui?.domain??D._meta?.[`openai/widgetDomain`]);(0,b.useEffect)(()=>{let t=s.current;if(!t?.contentWindow||!t.contentDocument)return;k&&o(e.name,k);let n=(t,n,r=`default`)=>{i(e.name,{timestamp:Date.now(),source:`view`,command:t,args:n,type:r})},c=QB(t.contentWindow,l.current,n,(t,n)=>{a(e.name,t,n)},(e,t)=>PO.callTool(e,t),t=>{o(e.name,t)}),u=GB(t,(e,t)=>PO.callTool(e,t),n,()=>({toolInput:l.current?.toolInput,toolOutput:l.current?.toolOutput,toolResponseMetadata:l.current?.toolResponseMetadata}));return t.contentDocument.open(),t.contentDocument.write(mj(O)),t.contentDocument.close(),r(e.name,{openaiRef:s}),()=>{c(),u()}},[O,k,e.name,i,r,a,o]),OB({iframeRef:s,containerRef:c,enabled:!!O&&!S,onHeightChange:d,documentKey:O,clampToContainer:!p});let A=kB({iframeRef:s,documentKey:O});return tV({iframeRef:s,toolName:e.name,globalKey:`theme`,value:w,updateOpenaiObject:a}),tV({iframeRef:s,toolName:e.name,globalKey:`locale`,value:T,updateOpenaiObject:a}),tV({iframeRef:s,toolName:e.name,globalKey:`displayMode`,value:g,updateOpenaiObject:a}),tV({iframeRef:s,toolName:e.name,globalKey:`userAgent`,value:E,updateOpenaiObject:a}),eV({iframeRef:s,theme:w,previewClient:f,documentKey:O}),(0,b.useEffect)(()=>{let e=s.current;!e||!t||(t.toolInput!=null&&KB(e,t.toolInput),(t.toolOutput!=null||t.toolResponseMetadata!=null)&&qB(e,{content:[],structuredContent:t.toolOutput,isError:!1,_meta:t.toolResponseMetadata}))},[t]),(0,H.jsx)(`div`,{ref:c,className:pj(`relative transition-[width] duration-150 ease-out`,S?`h-full w-full`:`mx-auto`,x&&!p&&`bg-background`),style:{width:S?void 0:C,height:S?`100%`:u==null?`auto`:`${v&&!p?Math.min(u,iV):u}px`,opacity:+!!A},children:(0,H.jsx)(`iframe`,{ref:s,src:`about:blank`,style:{width:`100%`,height:S||u==null?`100%`:`${v&&!p?Math.min(u,iV):u}px`,border:`none`,display:`block`},sandbox:`allow-scripts allow-same-origin allow-forms`,title:`html-preview`})})},oV=`ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif`,sV={light:{"--main-surface-primary":`#fcfcfc`,"--sidebar-surface":`#fcfcfc`,"--message-surface":`#e9e9e980`,"--composer-surface-primary":`#fff`,"--text-primary":`#0d0d0d`,"--text-secondary":`#5d5d5d`,"--text-tertiary":`#8f8f8f`,"--border-default":`#0000001a`,"--bg-elevated-primary":`#fff`,"--sidebar-surface-secondary":`#ececec`},dark:{"--main-surface-primary":`#000`,"--sidebar-surface":`#000`,"--message-surface":`#323232d9`,"--composer-surface-primary":`#212121`,"--text-primary":`#fff`,"--text-secondary":`#cdcdcd`,"--text-tertiary":`#afafaf`,"--border-default":`#ffffff26`,"--bg-elevated-primary":`#1b1b1b`,"--sidebar-surface-secondary":`#303030`}};function cV({className:e}){return(0,H.jsx)(`div`,{className:pj(`rounded-md bg-[color-mix(in_oklab,var(--text-primary)_10%,transparent)]`,e)})}var lV=[{icon:Iz,label:`New chat`},{icon:Lz,label:`Projects`},{icon:Rz,label:`Tasks`},{icon:zz,label:`Library`},{icon:Bz,label:`Plugins`},{icon:Vz,label:`Agents`},{icon:Hz,label:`Codex`},{icon:Uz,label:`GPTs`}],uV=[`w-[85%]`,`w-[70%]`,`w-[78%]`,`w-[62%]`,`w-[82%]`,`w-[68%]`,`w-[75%]`,`w-[60%]`];function dV(){return(0,H.jsxs)(`div`,{"aria-hidden":!0,className:`absolute inset-x-0 top-0 z-10 flex h-[52px] cursor-not-allowed items-center justify-between px-3`,children:[(0,H.jsx)(`div`,{className:`flex size-10 items-center justify-center rounded-xl bg-[color-mix(in_oklab,var(--text-primary)_4%,transparent)] backdrop-blur-sm`,children:(0,H.jsx)(Qz,{className:`size-6`})}),(0,H.jsxs)(`div`,{className:`flex h-10 items-center gap-5 rounded-xl bg-[color-mix(in_oklab,var(--text-primary)_4%,transparent)] px-4 backdrop-blur-sm`,children:[(0,H.jsx)(Iz,{className:`size-6`}),(0,H.jsx)($z,{className:`size-6`})]})]})}function fV(){return(0,H.jsxs)(`div`,{className:`rounded-[28px] bg-(--composer-surface-primary) p-2 shadow-[0_2px_12px_rgba(0,0,0,0.08)]`,children:[(0,H.jsx)(`div`,{className:`px-2.5 pt-1.5 pb-3 text-(--text-tertiary)`,children:`Ask ChatGPT`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-1.5 pb-0.5`,children:[(0,H.jsx)(Kz,{className:`size-5 shrink-0`}),(0,H.jsx)(cV,{className:`h-4 w-16`}),(0,H.jsx)(`div`,{className:`flex-1`}),(0,H.jsx)(cV,{className:`h-4 w-14`}),(0,H.jsx)(qz,{className:`size-6 shrink-0`}),(0,H.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-full bg-(--text-primary) text-(--main-surface-primary)`,children:(0,H.jsx)(Jz,{className:`size-5`})})]})]})}function pV(){return(0,H.jsxs)(`div`,{className:`flex h-[52px] items-center gap-3 rounded-full border border-(--border-default) bg-(--composer-surface-primary) px-4 shadow-[0_4px_16px_rgba(0,0,0,0.06)]`,children:[(0,H.jsx)(Kz,{className:`size-5 shrink-0`}),(0,H.jsx)(`span`,{className:`flex-1 text-(--text-tertiary)`,children:`Ask ChatGPT`}),(0,H.jsx)(qz,{className:`size-6 shrink-0`}),(0,H.jsx)(`div`,{className:`flex size-9.5 shrink-0 items-center justify-center rounded-full bg-(--text-primary) text-(--main-surface-primary)`,children:(0,H.jsx)(Jz,{className:`size-5.5`})})]})}function mV({className:e}){return(0,H.jsx)(`div`,{className:pj(`h-11 w-2/5 self-end rounded-3xl bg-(--message-surface)`,e)})}function hV({children:e}){let t=hs(e=>e.theme),n=hs(e=>e.displayMode),r=hs(e=>e.setPreference),i=vs(),a=n===`pip`,o=n===`fullscreen`,s=n===`modal`,c=(0,b.useRef)(null),l=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=c.current,t=l.current;if(!e||!t||o)return;let n=()=>{e.scrollTop=e.scrollHeight};n();let r=new ResizeObserver(n);r.observe(t);let i=()=>r.disconnect(),a=[`wheel`,`touchstart`,`pointerdown`];for(let t of a)e.addEventListener(t,i,{once:!0,passive:!0});return()=>{r.disconnect();for(let t of a)e.removeEventListener(t,i)}},[o]),(0,H.jsxs)(`div`,{className:`@container/shell relative isolate flex h-full w-full overflow-hidden bg-(--main-surface-primary) text-(--text-primary)`,style:{fontFamily:oV,...sV[t]},children:[(0,H.jsxs)(`aside`,{"aria-hidden":!0,className:pj(`h-full shrink-0 cursor-not-allowed border-(--border-default) border-r bg-(--sidebar-surface) @max-[640px]/shell:hidden`,o?`w-[52px]`:`w-[260px]`,i&&`hidden`),children:[(0,H.jsxs)(`div`,{className:pj(`h-full flex-col px-1.5 pb-2`,o?`hidden`:`flex`),children:[(0,H.jsxs)(`div`,{className:`flex h-[52px] shrink-0 items-center justify-between pr-2.5 pl-3`,children:[(0,H.jsx)(`span`,{className:`font-semibold text-base`,children:`ChatGPT`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-4 text-(--text-secondary)`,children:[(0,H.jsx)(Wz,{className:`size-5`}),(0,H.jsx)(Gz,{className:`size-5`})]})]}),lV.map(({icon:e,label:t})=>(0,H.jsxs)(`div`,{className:`flex h-9 shrink-0 items-center gap-1.5 rounded-[10px] px-2.5 text-sm leading-5`,children:[(0,H.jsx)(e,{className:`size-5 shrink-0`}),(0,H.jsx)(`span`,{children:t})]},t)),(0,H.jsx)(cV,{className:`mt-6 mb-2 ml-2 h-3 w-14`}),uV.map(e=>(0,H.jsx)(`div`,{className:`px-2 py-2`,children:(0,H.jsx)(cV,{className:pj(`h-3.5`,e)})},e)),(0,H.jsxs)(`div`,{className:`mt-auto flex items-center gap-2 px-2 py-2`,children:[(0,H.jsx)(cV,{className:`size-8 rounded-full`}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,H.jsx)(cV,{className:`h-3 w-24`}),(0,H.jsx)(cV,{className:`h-2.5 w-16`})]})]})]}),(0,H.jsxs)(`div`,{className:pj(`h-full flex-col items-center gap-5 py-4`,o?`flex`:`hidden`),children:[(0,H.jsx)(Xz,{className:`size-6`}),(0,H.jsx)(Iz,{className:`mt-4 size-5`}),(0,H.jsx)(Wz,{className:`size-5`}),(0,H.jsx)(Zz,{className:`size-5`}),(0,H.jsx)(zz,{className:`size-5`}),(0,H.jsx)(cV,{className:`mt-auto size-8 rounded-full`})]})]}),(0,H.jsxs)(`div`,{className:`relative flex h-full min-w-0 flex-1 flex-col`,children:[i&&!o&&(0,H.jsx)(dV,{}),(0,H.jsxs)(`div`,{className:pj(`h-[52px] shrink-0 items-center px-4`,o?`flex`:`hidden`),children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Exit fullscreen`,onClick:()=>r(`displayMode`,`inline`),className:`-ml-2 flex size-9 cursor-pointer items-center justify-center rounded-lg text-(--text-primary) transition-colors hover:bg-[color-mix(in_oklab,var(--text-primary)_5%,transparent)]`,children:(0,H.jsx)(Yz,{className:`size-5`})}),(0,H.jsxs)(`div`,{"aria-hidden":!0,className:`flex flex-1 items-center justify-center gap-2`,children:[(0,H.jsx)(cV,{className:`size-5 rounded-md`}),(0,H.jsx)(cV,{className:`h-4 w-28`})]}),(0,H.jsx)(`div`,{className:`w-5`})]}),(0,H.jsx)(`div`,{ref:c,className:`min-h-0 flex-1 overflow-y-auto [container-type:size]`,children:(0,H.jsxs)(`div`,{ref:l,className:pj(`mx-auto flex w-full max-w-[768px] flex-col px-4 py-6`,i&&!o&&`pt-16`,o&&`h-full max-w-none p-0`),children:[[[`w-[92%]`,`w-[80%]`,`w-[55%]`],[`w-[88%]`,`w-[76%]`,`w-[50%]`],[`w-[95%]`,`w-[70%]`,`w-[62%]`]].map((e,t)=>(0,H.jsxs)(`div`,{className:pj(`flex flex-col`,o&&`hidden`,t>0&&`mt-10`),children:[(0,H.jsx)(mV,{}),(0,H.jsx)(`div`,{className:`mt-6 flex flex-col gap-3`,children:e.map(e=>(0,H.jsx)(cV,{className:pj(`h-4`,e)},e))})]},e[0])),(0,H.jsx)(mV,{className:pj(`mt-10`,o&&`hidden`)}),(0,H.jsx)(cV,{className:pj(`mt-6 h-4 w-40`,o&&`hidden`)}),(0,H.jsxs)(`div`,{className:pj(`mt-6 flex items-center gap-2`,o&&`hidden`),children:[(0,H.jsx)(cV,{className:`size-5 rounded-md`}),(0,H.jsx)(cV,{className:`h-4 w-[110px]`})]}),(0,H.jsxs)(`div`,{className:pj(`relative mt-3 w-full`,!a&&!o&&!s&&!i&&`-mx-4 w-[calc(100%+2rem)]`,a&&`absolute top-4 left-1/2 z-30 mt-0 w-[min(768px,calc(100%-32px))] translate-x-[calc(-50%-8px)] rounded-3xl border border-(--border-default) bg-(--main-surface-primary) shadow-[0_8px_32px_rgba(0,0,0,0.12)]`,o&&`mt-0 min-h-0 flex-1`,s&&`absolute inset-0 z-30 mt-0`),children:[a?(0,H.jsx)(`button`,{type:`button`,"aria-label":`Exit picture-in-picture`,onClick:()=>r(`displayMode`,`inline`),className:`-top-2.5 -left-2.5 absolute z-10 flex size-8 cursor-pointer items-center justify-center rounded-full bg-[#414141] text-white`,children:(0,H.jsx)(Yz,{className:`size-4.5`})}):null,s?(0,H.jsx)(`button`,{type:`button`,"aria-label":`Close modal`,onClick:()=>r(`displayMode`,`inline`),className:`absolute top-4 right-4 z-40 flex size-8 cursor-pointer items-center justify-center rounded-full bg-[#414141] text-white`,children:(0,H.jsx)(Yz,{className:`size-4.5`})}):null,(0,H.jsx)(`div`,{className:pj(`w-full`,a&&`max-h-[80cqh] overflow-y-auto rounded-3xl`,(o||s)&&`h-full min-h-0`,i&&!a&&!o&&!s&&`overflow-hidden rounded-xl border border-(--border-default)`),children:e??(0,H.jsx)(cV,{className:`h-96 w-full rounded-2xl`})})]}),(0,H.jsx)(`div`,{className:pj(`mt-6 border-(--border-default) border-t`,o&&`hidden`)}),(0,H.jsxs)(`div`,{className:pj(`mt-6 flex flex-col gap-3`,o&&`hidden`),children:[(0,H.jsx)(cV,{className:`h-4 w-[95%]`}),(0,H.jsx)(cV,{className:`h-4 w-[88%]`}),(0,H.jsx)(cV,{className:`h-4 w-[60%]`})]}),(0,H.jsxs)(`div`,{className:pj(`mt-4 flex items-center gap-3 pb-4`,o&&`hidden`),children:[(0,H.jsx)(cV,{className:`size-4 rounded-full`}),(0,H.jsx)(cV,{className:`size-4 rounded-full`}),(0,H.jsx)(cV,{className:`size-4 rounded-full`}),(0,H.jsx)(cV,{className:`size-4 rounded-full`})]})]})}),(0,H.jsx)(`div`,{"aria-hidden":!0,className:pj(`w-full cursor-not-allowed px-4`,i?`pb-4`:`pb-6`,o?`pointer-events-none absolute inset-x-0 bottom-0 z-30`:`shrink-0`),children:(0,H.jsx)(`div`,{className:`mx-auto w-full max-w-[768px]`,children:i?(0,H.jsx)(fV,{}):(0,H.jsx)(pV,{})})})]})]})}var gV=`"Anthropic Sans", ui-sans-serif, system-ui, sans-serif`,_V=24,vV={light:{"--shell-surface":`#faf9f5`,"--shell-sidebar":`#fbfbf9`,"--shell-card":`#ffffff`,"--shell-panel":`#ffffff`,"--shell-text":`#141413`,"--shell-text-secondary":`#3d3d3a`,"--shell-text-tertiary":`#73726c`,"--shell-nav-text":`#52514e`,"--shell-icon-muted":`#898781`,"--shell-segment-bg":`#edece8`,"--shell-segment-active":`#f9f9f7`,"--shell-btn-bg":`#f3f3f3`,"--shell-border":`rgba(31, 30, 29, 0.08)`,"--shell-composer-border":`rgba(31, 30, 29, 0.08)`,"--shell-accent":`#d97757`},dark:{"--shell-surface":`#1a1a19`,"--shell-sidebar":`#1a1a19`,"--shell-card":`#383835`,"--shell-panel":`#383835`,"--shell-text":`#faf9f5`,"--shell-text-secondary":`#c2c0b6`,"--shell-text-tertiary":`#9c9a92`,"--shell-nav-text":`#c2c0b6`,"--shell-icon-muted":`#9c9a92`,"--shell-segment-bg":`#3a3a38`,"--shell-segment-active":`#4a4a47`,"--shell-btn-bg":`#3a3a38`,"--shell-border":`rgba(222, 220, 209, 0.1)`,"--shell-composer-border":`transparent`,"--shell-accent":`#d97757`}};function yV({className:e}){return(0,H.jsx)(`div`,{className:pj(`rounded-md bg-[color-mix(in_oklab,var(--shell-text)_10%,transparent)]`,e)})}function bV(){return(0,H.jsxs)(`div`,{"aria-hidden":!0,className:`flex h-12 shrink-0 cursor-not-allowed items-center gap-2.5 px-3`,children:[(0,H.jsx)(gB,{className:`size-4.5 text-[#7b7974]`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(yV,{className:`h-3.5 w-24`}),(0,H.jsx)(rB,{className:`size-2.5 text-(--shell-text-tertiary)`})]}),(0,H.jsx)(`div`,{className:`ml-auto flex h-7 items-center rounded-[7px] bg-(--shell-btn-bg) px-3 text-(--shell-text) text-sm`,children:`Share`})]})}function xV(){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`flex min-h-[100px] flex-col justify-between rounded-[20px] bg-(--shell-card) p-3 shadow-[0_4px_20px_rgba(0,0,0,0.05)]`,children:[(0,H.jsx)(`span`,{className:`px-1.5 pt-1 text-[15px] text-(--shell-text-tertiary)`,children:`Write a message...`}),(0,H.jsxs)(`div`,{className:`flex items-center px-1 pb-0.5 text-(--shell-text-secondary)`,children:[(0,H.jsx)(fB,{className:`size-5`}),(0,H.jsx)(`div`,{className:`flex-1`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(yV,{className:`h-3.5 w-14`}),(0,H.jsx)(yV,{className:`h-3.5 w-9`}),(0,H.jsx)(rB,{className:`size-3`})]}),(0,H.jsx)(`div`,{className:`flex-1`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(dB,{className:`size-5`}),(0,H.jsx)(`div`,{className:`flex size-8 items-center justify-center rounded-lg bg-(--shell-accent) text-white`,children:(0,H.jsx)(Wr,{className:`size-4.5`})})]})]})]}),(0,H.jsx)(`div`,{className:`pt-1.5 pb-1 text-center text-(--shell-text-tertiary) text-xs`,children:`Claude can make mistakes. Please double-check responses.`})]})}function SV(){return(0,H.jsxs)(`div`,{className:`flex min-h-[100px] flex-col justify-between rounded-[20px] border border-(--shell-composer-border) bg-(--shell-card) p-4 shadow-[0_4px_16px_rgba(0,0,0,0.04)]`,children:[(0,H.jsx)(`span`,{className:`text-(--shell-text-tertiary)`,children:`Reply to Claude...`}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsx)(fB,{className:`size-5 text-(--shell-text-secondary)`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-4 text-(--shell-text-secondary)`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(yV,{className:`h-3.5 w-14`}),(0,H.jsx)(yV,{className:`h-3.5 w-9`}),(0,H.jsx)(rB,{className:`size-3`})]}),(0,H.jsx)(dB,{className:`size-5`}),(0,H.jsx)(aB,{className:`size-5`})]})]})]})}var CV=[`w-[80%]`,`w-[65%]`,`w-[74%]`,`w-[58%]`,`w-[70%]`,`w-[62%]`];function wV({children:e}){let t=hs(e=>e.theme),n=hs(e=>e.displayMode),r=hs(e=>e.setPreference),i=vs(),a=n===`fullscreen`,o=n===`modal`,[s,c]=(0,b.useState)(!1),[l,u]=(0,b.useState)(!1),d=(0,b.useRef)(null),f=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=d.current;if(!e||a){u(!1);return}let t=()=>{let t=e.scrollHeight-e.scrollTop-e.clientHeight;u(t>_V)};return t(),e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},[a]),(0,b.useEffect)(()=>{let e=d.current,t=f.current;if(!e||!t||a)return;let n=()=>{e.scrollTop=e.scrollHeight};n();let r=new ResizeObserver(n);r.observe(t);let i=()=>r.disconnect(),o=[`wheel`,`touchstart`,`pointerdown`];for(let t of o)e.addEventListener(t,i,{once:!0,passive:!0});return()=>{r.disconnect();for(let t of o)e.removeEventListener(t,i)}},[a]),(0,H.jsxs)(`div`,{className:`@container/shell relative isolate flex h-full w-full overflow-hidden bg-(--shell-surface) text-(--shell-text)`,style:{fontFamily:gV,...vV[t]},children:[(0,H.jsx)(`style`,{children:RB}),(0,H.jsx)(`aside`,{"aria-hidden":!0,className:pj(`h-full w-[288px] shrink-0 cursor-not-allowed border-(--shell-border) border-r bg-(--shell-sidebar) @max-[640px]/shell:hidden`,(s||i)&&`hidden`),children:(0,H.jsxs)(`div`,{className:`flex h-full flex-col px-2 pb-2`,children:[(0,H.jsxs)(`div`,{className:`flex h-11 shrink-0 items-center justify-between px-2`,children:[(0,H.jsx)(oB,{className:`h-5`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1 text-[#7b7974]`,children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Collapse sidebar`,onClick:()=>c(!0),className:`flex size-7 cursor-pointer items-center justify-center rounded-md transition-colors hover:bg-[color-mix(in_oklab,var(--shell-text)_5%,transparent)]`,children:(0,H.jsx)(gB,{className:`size-4`})}),(0,H.jsx)(`div`,{className:`flex size-7 items-center justify-center`,children:(0,H.jsx)(hB,{className:`size-4`})})]})]}),(0,H.jsxs)(`div`,{className:`mb-2 flex h-8 shrink-0 rounded-lg bg-(--shell-segment-bg) p-px`,children:[(0,H.jsxs)(`div`,{className:`flex flex-[1.1] items-center justify-center gap-1.5 rounded-[7px] bg-(--shell-segment-active) text-(--shell-text) text-sm shadow-[inset_0_0_0_0.5px_rgba(11,11,11,0.1),0_1px_2px_rgba(0,0,0,0.06),0_2px_6px_-1px_rgba(0,0,0,0.05)]`,children:[(0,H.jsx)(uB,{className:`size-4`}),(0,H.jsx)(`span`,{children:`Home`})]}),(0,H.jsxs)(`div`,{className:`flex flex-1 items-center justify-center gap-1.5 text-(--shell-text-tertiary) text-sm`,children:[(0,H.jsx)(sB,{className:`size-4`}),(0,H.jsx)(`span`,{children:`Code`})]})]}),(0,H.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 rounded-lg px-1.5 text-(--shell-nav-text) text-sm`,children:[(0,H.jsx)(fB,{className:`size-4`}),(0,H.jsx)(`span`,{children:`New`})]}),[{icon:nB,label:`Chats and tasks`},{icon:pB,label:`Projects`},{icon:eB,label:`Artifacts`},{icon:mB,label:`Scheduled`},{icon:cB,label:`Customize`}].map(({icon:e,label:t})=>(0,H.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 px-1.5 text-(--shell-nav-text) text-sm`,children:[(0,H.jsx)(e,{className:`size-5`}),(0,H.jsx)(`span`,{children:t})]},t)),(0,H.jsx)(`div`,{className:`mt-5 mb-1 px-1.5 text-(--shell-text-tertiary) text-xs`,children:`Pinned`}),(0,H.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 px-1.5`,children:[(0,H.jsx)(tB,{className:`size-5 shrink-0 text-(--shell-icon-muted)`}),(0,H.jsx)(yV,{className:`h-3.5 w-32`})]}),(0,H.jsxs)(`div`,{className:`mt-5 mb-1 flex items-center justify-between px-1.5`,children:[(0,H.jsx)(`span`,{className:`text-(--shell-text-tertiary) text-xs`,children:`Recents`}),(0,H.jsx)(bi,{className:`size-3.5 text-(--shell-text-tertiary)`})]}),CV.map(e=>(0,H.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 px-1.5`,children:[(0,H.jsx)(tB,{className:`size-5 shrink-0 text-(--shell-icon-muted)`}),(0,H.jsx)(yV,{className:pj(`h-3.5`,e)})]},e)),(0,H.jsxs)(`div`,{className:`mt-auto flex shrink-0 flex-col`,children:[(0,H.jsxs)(`div`,{className:`flex h-10 items-center gap-2.5 border-(--shell-border) border-t px-1.5 text-(--shell-nav-text) text-sm`,children:[(0,H.jsx)(lB,{className:`size-5`}),(0,H.jsx)(`span`,{children:`Design`})]}),(0,H.jsxs)(`div`,{className:`flex h-11 items-center gap-2.5 border-(--shell-border) border-t px-1.5`,children:[(0,H.jsx)(yV,{className:`size-7 rounded-full`}),(0,H.jsx)(yV,{className:`h-3.5 w-24`})]})]})]})}),(0,H.jsxs)(`div`,{className:`relative flex h-full min-w-0 flex-1 flex-col`,children:[i&&!a&&(0,H.jsx)(bV,{}),s&&!i&&(0,H.jsx)(`button`,{type:`button`,"aria-label":`Expand sidebar`,onClick:()=>c(!1),className:`absolute top-2 left-2 z-40 flex size-8 cursor-pointer items-center justify-center rounded-md text-[#7b7974] transition-colors hover:bg-[color-mix(in_oklab,var(--shell-text)_5%,transparent)]`,children:(0,H.jsx)(gB,{className:`size-4`})}),(0,H.jsx)(`div`,{ref:d,className:`min-h-0 flex-1 overflow-y-auto [container-type:size]`,children:(0,H.jsxs)(`div`,{ref:f,className:pj(`mx-auto flex w-full max-w-[720px] flex-col px-4 pt-6 pb-24`,a&&`h-full max-w-none px-5 pt-2 pb-4`,a&&s&&!i&&`pl-12`),children:[[[`w-[92%]`,`w-[80%]`,`w-[55%]`],[`w-[88%]`,`w-[76%]`,`w-[50%]`]].map((e,t)=>(0,H.jsxs)(`div`,{className:pj(`flex flex-col`,a&&`hidden`,t>0&&`mt-10`),children:[(0,H.jsx)(`div`,{className:`h-16 w-[55%] self-end rounded-xl bg-[color-mix(in_oklab,var(--shell-text)_5%,transparent)]`}),(0,H.jsx)(`div`,{className:`mt-6 flex flex-col gap-3`,children:e.map(e=>(0,H.jsx)(yV,{className:pj(`h-4`,e)},e))})]},e[0])),(0,H.jsx)(`div`,{className:pj(`mt-10 h-12 w-[45%] self-end rounded-xl bg-[color-mix(in_oklab,var(--shell-text)_5%,transparent)]`,a&&`hidden`)}),(0,H.jsx)(yV,{className:pj(`mt-6 h-4 w-40`,a&&`hidden`)}),(0,H.jsxs)(`div`,{className:pj(`relative mt-3 w-full`,!a&&!o&&!i&&`-mx-4 w-[calc(100%+2rem)]`,a&&`mt-0 flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border border-(--shell-border) bg-(--shell-panel)`,o&&`absolute inset-0 z-30 mt-0`),children:[o?(0,H.jsx)(`button`,{type:`button`,"aria-label":`Close modal`,onClick:()=>r(`displayMode`,`inline`),className:`absolute top-4 right-4 z-40 flex size-8 cursor-pointer items-center justify-center rounded-lg bg-(--shell-btn-bg) text-(--shell-text) transition-colors hover:bg-[color-mix(in_oklab,var(--shell-text)_10%,transparent)]`,children:(0,H.jsx)(Yz,{className:`size-4.5`})}):null,a?(0,H.jsxs)(`div`,{className:`flex h-14 shrink-0 items-center gap-2.5 border-(--shell-border) border-b px-4`,children:[(0,H.jsx)(`div`,{className:`flex size-7 items-center justify-center rounded-lg border border-(--shell-border) bg-(--shell-segment-active)`,children:(0,H.jsx)(yV,{className:`size-3.5 rounded`})}),(0,H.jsx)(yV,{className:`h-4 w-44`}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Exit fullscreen`,onClick:()=>r(`displayMode`,`inline`),className:`ml-auto flex size-8 cursor-pointer items-center justify-center rounded-lg bg-(--shell-btn-bg) text-(--shell-text) transition-colors hover:bg-[color-mix(in_oklab,var(--shell-text)_10%,transparent)]`,children:(0,H.jsx)(Yz,{className:`size-4.5`})})]}):null,(0,H.jsx)(`div`,{className:pj(`w-full`,a&&`min-h-0 flex-1`,o&&`h-full min-h-0`),children:e??(0,H.jsx)(yV,{className:`h-96 w-full rounded-2xl`})}),a?(0,H.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-4 mx-auto w-[min(680px,85%)]`,children:(0,H.jsxs)(`div`,{className:`flex min-h-[100px] flex-col justify-between rounded-[20px] border border-(--shell-composer-border) bg-(--shell-card) p-4 shadow-[0_4px_16px_rgba(0,0,0,0.08)]`,children:[(0,H.jsx)(`span`,{className:`text-(--shell-text-tertiary)`,children:`Write a message...`}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsx)(fB,{className:`size-5 text-(--shell-text-secondary)`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-4 text-(--shell-text-secondary)`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(yV,{className:`h-3.5 w-14`}),(0,H.jsx)(yV,{className:`h-3.5 w-9`}),(0,H.jsx)(rB,{className:`size-3`})]}),(0,H.jsx)(dB,{className:`size-5`}),(0,H.jsx)(aB,{className:`size-5`})]})]})]})}):null]}),(0,H.jsxs)(`div`,{className:pj(`mt-6 flex flex-col gap-3`,a&&`hidden`),children:[(0,H.jsx)(yV,{className:`h-4 w-[95%]`}),(0,H.jsx)(yV,{className:`h-4 w-[60%]`})]})]})}),l&&(0,H.jsx)(`button`,{type:`button`,"aria-label":`Scroll to bottom`,onClick:()=>{let e=d.current;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},className:pj(`absolute left-1/2 z-20 flex size-8 -translate-x-1/2 cursor-pointer items-center justify-center rounded-full border border-(--shell-border) bg-(--shell-card) text-(--shell-text-secondary) shadow-[0_2px_8px_rgba(0,0,0,0.12)]`,i?`bottom-24`:`bottom-32`),children:(0,H.jsx)(rB,{className:`size-3.5`})}),(0,H.jsx)(`div`,{className:pj(`w-full shrink-0 cursor-not-allowed`,i?`px-2 pb-1`:`px-4 pb-5`,a&&`hidden`),children:(0,H.jsx)(`div`,{className:`mx-auto w-full max-w-[768px]`,children:i?(0,H.jsx)(xV,{}):(0,H.jsx)(SV,{})})})]})]})}var TV=24,EV=44,DV={light:{backdrop:`#e8e8e6`,label:`#6f6f6f`},dark:{backdrop:`#111110`,label:`#8f8f8f`}},OV=({theme:e,children:t})=>{let n=(0,b.useRef)(null),[r,i]=(0,b.useState)(1);return(0,b.useLayoutEffect)(()=>{let e=n.current;if(!e)return;let t=()=>{let{width:t,height:n}=e.getBoundingClientRect();i(Math.min(1,(t-TV)/yj.width,(n-EV)/yj.height))};t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[]),(0,H.jsxs)(`div`,{ref:n,className:`flex h-full min-h-0 w-full flex-col items-center justify-center overflow-hidden`,style:{backgroundColor:DV[e].backdrop},children:[(0,H.jsxs)(`div`,{className:`pb-1.5 font-mono text-xs`,style:{color:DV[e].label},children:[yj.width,` × `,yj.height]}),(0,H.jsx)(`div`,{style:{width:yj.width*r,height:yj.height*r},children:(0,H.jsx)(`div`,{className:`overflow-hidden shadow-[0_2px_16px_rgba(0,0,0,0.2)]`,style:{width:yj.width,height:yj.height,transform:`scale(${r})`,transformOrigin:`top left`},children:t})})]})},kV=()=>{let e=qO(),t=hO(e?.name??``),n=hs(e=>e.previewClient),r=hs(e=>e.theme),i=vs(),a=e?._meta?.ui?.resourceUri,o=!!(e&&t?.response&&a),s=(0,H.jsx)(n===`claude`?wV:hV,{children:o?(0,H.jsx)(b.Suspense,{fallback:null,children:(0,H.jsx)(aV,{})}):null});return(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 w-full flex-col`,children:[(0,H.jsxs)(`div`,{className:`flex h-11 shrink-0 items-center gap-3 bg-primary px-3 text-primary-foreground`,children:[(0,H.jsx)(`span`,{className:`font-medium text-xs`,children:`Preview mode`}),(0,H.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,H.jsx)(DB,{variant:`preview`})})]}),(0,H.jsx)(`div`,{className:`min-h-0 flex-1`,children:i?(0,H.jsx)(OV,{theme:r,children:s}):s})]})},AV=function(e){return function(t,n){var r=(0,b.useRef)(!1);e(function(){return function(){r.current=!1}},[]),e(function(){if(!r.current)r.current=!0;else return t()},n)}},jV=function(e){return typeof e==`function`},MV=function(e){return typeof e==`string`},NV=function(e){return typeof e==`number`},PV=function(e){return e===void 0},FV=function(e){var t=(0,b.useRef)(e);t.current=(0,b.useMemo)(function(){return e},[e]);var n=(0,b.useRef)(void 0);return n.current||=function(){var e=[...arguments];return t.current.apply(this,e)},n.current},IV=AV(b.useEffect);function LV(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function RV(e){var t=(0,b.useRef)(e);return t.current=e,t}var zV=function(e){var t=RV(e);(0,b.useEffect)(function(){return function(){t.current()}},[])},BV=!!(typeof window<`u`&&window.document&&window.document.createElement);function VV(e,t){if(BV)return e?jV(e)?e():`current`in e?e.current:e:t}var HV=function(e){return function(t,n,r){var i=(0,b.useRef)(!1),a=(0,b.useRef)([]),o=(0,b.useRef)([]),s=(0,b.useRef)(void 0);e(function(){var e,c=(Array.isArray(r)?r:[r]).map(function(e){return VV(e)});if(!i.current){i.current=!0,a.current=c,o.current=n,s.current=t();return}(c.length!==a.current.length||!LV(a.current,c)||!LV(o.current,n))&&((e=s.current)==null||e.call(s),a.current=c,o.current=n,s.current=t())}),zV(function(){var e;(e=s.current)==null||e.call(s),i.current=!1})}}(b.useEffect),UV=u(s(((e,t)=>{var n=typeof Element<`u`,r=typeof Map==`function`,i=typeof Set==`function`,a=typeof ArrayBuffer==`function`&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;var s,c,l;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(!o(e[c],t[c]))return!1;return!0}var u;if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!o(c.value[1],t.get(c.value[0])))return!1;return!0}if(i&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!t.has(c.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(s=e.length,s!=t.length)return!1;for(c=s;c--!==0;)if(e[c]!==t[c])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf==`function`&&typeof t.valueOf==`function`)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString==`function`&&typeof t.toString==`function`)return e.toString()===t.toString();if(l=Object.keys(e),s=l.length,s!==Object.keys(t).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[c]))return!1;if(n&&e instanceof Element)return!1;for(c=s;c--!==0;)if(!((l[c]===`_owner`||l[c]===`__v`||l[c]===`__o`)&&e.$$typeof)&&!o(e[l[c]],t[l[c]]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||``).match(/stack|recursion/i))return console.warn(`react-fast-compare cannot handle circular refs`),!1;throw e}}}))()),WV=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),(0,UV.default)(e,t)};function GV(e,t,n){n===void 0&&(n={});var r=n.enable,i=r===void 0||r,a=RV(t);HV(function(){if(i){var t=VV(n.target,window);if(t?.addEventListener){var r=function(e){return a.current(e)},o=Array.isArray(e)?e:[e];return o.forEach(function(e){t.addEventListener(e,r,{capture:n.capture,once:n.once,passive:n.passive})}),function(){o.forEach(function(e){t.removeEventListener(e,r,{capture:n.capture})})}}}},[e,n.capture,n.once,n.passive,i],n.target)}var KV=function(e,t,n){var r=(0,b.useRef)(void 0),i=(0,b.useRef)(0);WV(t,r.current)||(i.current+=1),r.current=t,HV(e,[i.current],n)},qV={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,control:17,alt:18,pausebreak:19,pause:19,capslock:20,esc:27,escape:27,space:32,spacebar:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,arrowleft:37,uparrow:38,arrowup:38,rightarrow:39,arrowright:39,downarrow:40,arrowdown: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:/(mac|iphone|ipod|ipad)/i.test(typeof navigator<`u`?navigator==null?void 0:navigator.platform:``)?[91,93]:[91,92],selectkey:93,contextmenu: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},JV={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`?qV.meta.includes(e.keyCode):e.metaKey}};function YV(e){return MV(e)||NV(e)}function XV(e){var t=Object.keys(JV).reduce(function(t,n){return JV[n](e)?t+1:t},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function ZV(e,t,n){var r,i;if(!e.key)return!1;if(NV(t))return e.keyCode===t&&t;var a=t.split(`.`),o=0;try{for(var s=mF(a),c=s.next();!c.done;c=s.next()){var l=c.value,u=JV[l],d=qV[l.toLowerCase()];(u&&u(e)||d&&d===e.keyCode)&&o++}}catch(e){r={error:e}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return n?o===a.length&&XV(e)===a.length&&t:o===a.length&&t}function QV(e,t){return jV(e)?e:YV(e)?function(n){return ZV(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(e){return ZV(n,e,t)})}:function(){return!!e}}var $V=[`keydown`];function eH(e,t,n){var r=n||{},i=r.events,a=i===void 0?$V:i,o=r.target,s=r.exactMatch,c=s!==void 0&&s,l=r.useCapture,u=l!==void 0&&l,d=RV(t),f=RV(e);KV(function(){var e,t,n,r=VV(o,window);if(r){var i=function(e){var t=e,n=QV(f.current,c)(t),r=YV(n)?n:t.key;if(n)return d.current?.call(d,t,r)};try{for(var s=mF(a),l=s.next();!l.done;l=s.next()){var p=l.value;(n=r?.addEventListener)==null||n.call(r,p,i,u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return function(){var e,t,n;try{for(var o=mF(a),s=o.next();!s.done;s=o.next()){var c=s.value;(n=r?.removeEventListener)==null||n.call(r,c,i,u)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}}},[a],o)}var tH=`AHOOKS_SYNC_STORAGE_EVENT_NAME`,nH=function(e){return function(t,n){n===void 0&&(n={});var r,i=n.listenStorageChange,a=i!==void 0&&i,o=jV(n.serializer)?n.serializer:JSON.stringify,s=jV(n.deserializer)?n.deserializer:JSON.parse,c=jV(n.onError)?n.onError:console.error;try{r=e()}catch(e){c(e)}var l=function(){try{var e=r?.getItem(t);if(e)return s(e)}catch(e){c(e)}return jV(n.defaultValue)?n.defaultValue():n.defaultValue},u=Toe((0,b.useState)(l),2),d=u[0],f=u[1],p=(0,b.useRef)(d);p.current=d,IV(function(){var e=l();Object.is(e,p.current)||(p.current=e,f(e))},[t]);var m=function(e){var n=p.current,i=jV(e)?e(n):e;if(!Object.is(i,n)){a||(p.current=i,f(i));try{var s=void 0,l=r?.getItem(t);PV(i)?(s=null,r?.removeItem(t)):(s=o(i),r?.setItem(t,s)),dispatchEvent(new CustomEvent(tH,{detail:{key:t,newValue:s,oldValue:l,storageArea:r}}))}catch(e){c(e)}}},h=function(e){if(!(e.key!==t||e.storageArea!==r)){var n=l();Object.is(n,p.current)||(p.current=n,f(n))}};return GV(`storage`,h,{enable:a}),GV(tH,function(e){h(e.detail)},{enable:a}),[d,FV(m)]}}(function(){return BV?localStorage:void 0}),rH=function(e,t){var n=FV(e),r=(0,b.useRef)(null),i=(0,b.useCallback)(function(){r.current&&clearTimeout(r.current)},[]);return(0,b.useEffect)(function(){if(!(!NV(t)||t<0))return r.current=setTimeout(n,t),i},[t]),i},iH=ji(`inline-flex items-center justify-center rounded-full border font-medium whitespace-nowrap shrink-0 [&>svg]:shrink-0 [&>svg]:pointer-events-none`,{variants:{variant:{secondary:`border-border bg-background text-muted-foreground`,primary:`border-transparent bg-primary text-primary-foreground`,success:`border-badge-success/30 bg-badge-success/10 text-badge-success`,warning:`border-badge-warning/30 bg-badge-warning/10 text-badge-warning`,error:`border-badge-error/30 bg-badge-error/10 text-badge-error`},size:{sm:`px-1.5 py-px gap-0.5 type-text-xs [&>svg]:size-2.5`,md:`px-[9px] py-0.5 gap-1 type-text-sm [&>svg]:size-3`}},defaultVariants:{variant:`secondary`,size:`md`}});function aH({className:e,variant:t,size:n,children:r,...i}){return(0,H.jsx)(`span`,{className:Mr(iH({variant:t,size:n}),e),...i,children:r})}var oH=new Intl.NumberFormat(`en`,{notation:`compact`,maximumFractionDigits:1}),sH=e=>`skybridge-devtools-dismissed-${e}-warning`,cH={"tool-output":{badge:`Large response`,title:`Large model-visible output`,description:`Content and structured content count toward this estimate. Large responses can consume significant context or exceed limits in some clients and models.`},"view-state":{badge:`Large context`,title:`Large model-visible view state`,description:`Persisted view state and data-llm context count toward this estimate. Keep only content the model needs.`}};function lH({kind:e}){return(0,H.jsx)(aH,{size:`sm`,variant:`warning`,children:cH[e].badge})}function uH({kind:e,tokenCount:t}){let n=cH[e],[r,i]=(0,b.useState)(()=>sessionStorage.getItem(sH(e))===`true`);return r?null:(0,H.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,H.jsx)(eM,{className:`rounded-none border-x-0 border-t-0 py-2 pl-3 pr-10`,title:`${n.title} (~${oH.format(t)} tokens)`,description:n.description}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Dismiss ${n.badge.toLowerCase()} warning for this session`,onClick:()=>{sessionStorage.setItem(sH(e),`true`),i(!0)},className:`absolute right-2 top-2 inline-flex size-6 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-badge-warning/10 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:(0,H.jsx)(Oi,{className:`size-3.5`})})]})}var dH=(0,b.createContext)({});function fH(e){let t=(0,b.useRef)(null);return t.current===null&&(t.current=e()),t.current}var pH=typeof window<`u`?b.useLayoutEffect:b.useEffect,mH=(0,b.createContext)(null);function hH(e,t){e.indexOf(t)===-1&&e.push(t)}function gH(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var _H=(e,t,n)=>n>t?t:n<e?e:n,vH={},yH=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),bH=e=>typeof e==`object`&&!!e,xH=e=>/^0[^.\s]+$/u.test(e);function SH(e){let t;return()=>(t===void 0&&(t=e()),t)}var CH=e=>e,wH=(...e)=>e.reduce((e,t)=>n=>t(e(n))),TH=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},EH=class{constructor(){this.subscriptions=[]}add(e){return hH(this.subscriptions,e),()=>gH(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},DH=e=>e*1e3,OH=e=>e/1e3,kH=(e,t)=>t?1e3/t*e:0,AH=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,jH=1e-7,MH=12;function NH(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=AH(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>jH&&++s<MH);return o}function PH(e,t,n,r){if(e===t&&n===r)return CH;let i=t=>NH(t,0,1,e,n);return e=>e===0||e===1?e:AH(i(e),t,r)}var FH=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,IH=e=>t=>1-e(1-t),LH=PH(.33,1.53,.69,.99),RH=IH(LH),zH=FH(RH),BH=e=>e>=1?1:(e*=2)<1?.5*RH(e):.5*(2-2**(-10*(e-1))),VH=e=>1-Math.sin(Math.acos(e)),HH=IH(VH),UH=FH(VH),WH=PH(.42,0,1,1),GH=PH(0,0,.58,1),KH=PH(.42,0,.58,1),qH=e=>Array.isArray(e)&&typeof e[0]!=`number`,JH=e=>Array.isArray(e)&&typeof e[0]==`number`,YH={linear:CH,easeIn:WH,easeInOut:KH,easeOut:GH,circIn:VH,circInOut:UH,circOut:HH,backIn:RH,backInOut:zH,backOut:LH,anticipate:BH},XH=e=>typeof e==`string`,ZH=e=>{if(JH(e)){e.length;let[t,n,r,i]=e;return PH(t,n,r,i)}else if(XH(e))return YH[e],`${e}`,YH[e];return e},QH=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function $H(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var eU=40;function tU(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=QH.reduce((e,t)=>(e[t]=$H(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=vH.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,eU),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:QH.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<QH.length;t++)o[QH[t]].cancel(e)},state:i,steps:o}}var{schedule:nU,cancel:rU,state:iU,steps:aU}=tU(typeof requestAnimationFrame<`u`?requestAnimationFrame:CH,!0),oU;function sU(){oU=void 0}var cU={now:()=>(oU===void 0&&cU.set(iU.isProcessing||vH.useManualTiming?iU.timestamp:performance.now()),oU),set:e=>{oU=e,queueMicrotask(sU)}},lU=e=>t=>typeof t==`string`&&t.startsWith(e),uU=lU(`--`),dU=lU(`var(--`),fU=e=>dU(e)?pU.test(e.split(`/*`)[0].trim()):!1,pU=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function mU(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var hU={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},gU={...hU,transform:e=>_H(0,1,e)},_U={...hU,default:1},vU=e=>Math.round(e*1e5)/1e5,yU=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function bU(e){return e==null}var xU=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,SU=(e,t)=>n=>!!(typeof n==`string`&&xU.test(n)&&n.startsWith(e)||t&&!bU(n)&&Object.prototype.hasOwnProperty.call(n,t)),CU=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(yU);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},wU=e=>_H(0,255,e),TU={...hU,transform:e=>Math.round(wU(e))},EU={test:SU(`rgb`,`red`),parse:CU(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+TU.transform(e)+`, `+TU.transform(t)+`, `+TU.transform(n)+`, `+vU(gU.transform(r))+`)`};function DU(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var OU={test:SU(`#`),parse:DU,transform:EU.transform},kU=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),AU=kU(`deg`),jU=kU(`%`),MU=kU(`px`),NU=kU(`vh`),PU=kU(`vw`),FU={...jU,parse:e=>jU.parse(e)/100,transform:e=>jU.transform(e*100)},IU={test:SU(`hsl`,`hue`),parse:CU(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+jU.transform(vU(t))+`, `+jU.transform(vU(n))+`, `+vU(gU.transform(r))+`)`},LU={test:e=>EU.test(e)||OU.test(e)||IU.test(e),parse:e=>EU.test(e)?EU.parse(e):IU.test(e)?IU.parse(e):OU.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?EU.transform(e):IU.transform(e),getAnimatableNone:e=>{let t=LU.parse(e);return t.alpha=0,LU.transform(t)}},RU=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function zU(e){return isNaN(e)&&typeof e==`string`&&(e.match(yU)?.length||0)+(e.match(RU)?.length||0)>0}var BU=`number`,VU=`color`,HU=`var`,UU=`var(`,WU="${}",GU=/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 KU(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(GU,e=>(LU.test(e)?(r.color.push(a),i.push(VU),n.push(LU.parse(e))):e.startsWith(UU)?(r.var.push(a),i.push(HU),n.push(e)):(r.number.push(a),i.push(BU),n.push(parseFloat(e))),++a,WU)).split(WU),indexes:r,types:i}}function qU(e){return KU(e).values}function JU({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===BU?i+=vU(r[a]):e===VU?i+=LU.transform(r[a]):i+=r[a]}return i}}function YU(e){return JU(KU(e))}var XU=e=>typeof e==`number`?0:LU.test(e)?LU.getAnimatableNone(e):e,ZU=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:XU(e);function QU(e){let t=KU(e);return JU(t)(t.values.map((e,n)=>ZU(e,t.split[n])))}var $U={test:zU,parse:qU,createTransformer:YU,getAnimatableNone:QU};function eW(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function tW({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=eW(s,r,e+1/3),a=eW(s,r,e),o=eW(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function nW(e,t){return n=>n>0?t:e}var rW=(e,t,n)=>e+(t-e)*n,iW=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},aW=[OU,EU,IU],oW=e=>aW.find(t=>t.test(e));function sW(e){let t=oW(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===IU&&(n=tW(n)),n}var cW=(e,t)=>{let n=sW(e),r=sW(t);if(!n||!r)return nW(e,t);let i={...n};return e=>(i.red=iW(n.red,r.red,e),i.green=iW(n.green,r.green,e),i.blue=iW(n.blue,r.blue,e),i.alpha=rW(n.alpha,r.alpha,e),EU.transform(i))},lW=new Set([`none`,`hidden`]);function uW(e,t){return lW.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function dW(e,t){return n=>rW(e,t,n)}function fW(e){return typeof e==`number`?dW:typeof e==`string`?fU(e)?nW:LU.test(e)?cW:gW:Array.isArray(e)?pW:typeof e==`object`?LU.test(e)?cW:mW:nW}function pW(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>fW(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function mW(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=fW(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function hW(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var gW=(e,t)=>{let n=$U.createTransformer(t),r=KU(e),i=KU(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?lW.has(e)&&!i.values.length||lW.has(t)&&!r.values.length?uW(e,t):wH(pW(hW(r,i),i.values),n):(`${e}${t}`,nW(e,t))};function _W(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?rW(e,t,n):fW(e)(e,t)}var vW=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>nU.update(t,e),stop:()=>rU(t),now:()=>iU.isProcessing?iU.timestamp:cU.now()}},yW=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},bW=2e4;function xW(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function SW(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(xW(r),bW);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:OH(i)}}var CW={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};function wW(e,t){return e*Math.sqrt(1-t*t)}var TW=12;function EW(e,t,n){let r=n;for(let n=1;n<TW;n++)r-=e(r)/t(r);return r}var DW=.001;function OW({duration:e=CW.duration,bounce:t=CW.bounce,velocity:n=CW.velocity,mass:r=CW.mass}){let i,a;CW.maxDuration;let o=1-t;o=_H(CW.minDamping,CW.maxDamping,o),e=_H(CW.minDuration,CW.maxDuration,OH(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=wW(t,o),c=Math.exp(-i);return DW-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=wW(t**2,o);return(-i(t)+DW>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=EW(i,a,s);if(e=DH(e),isNaN(c))return{stiffness:CW.stiffness,damping:CW.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var kW=[`duration`,`bounce`],AW=[`stiffness`,`damping`,`mass`];function jW(e,t){return t.some(t=>e[t]!==void 0)}function MW(e){let t={velocity:CW.velocity,stiffness:CW.stiffness,damping:CW.damping,mass:CW.mass,isResolvedFromDuration:!1,...e};if(!jW(e,AW)&&jW(e,kW))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*_H(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:CW.mass,stiffness:i,damping:a}}else{let n=OW({...e,velocity:0});t={...t,...n,mass:CW.mass},t.isResolvedFromDuration=!0}return t}function NW(e=CW.visualDuration,t=CW.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=MW({...n,velocity:-OH(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=OH(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?CW.restSpeed.granular:CW.restSpeed.default,i||=v?CW.restDelta.granular:CW.restDelta.default;let y,b,x,S,C,w;if(h<1)x=wW(_,h),S=(m+h*_*g)/x,y=e=>{let t=Math.exp(-h*_*e);return o-t*(S*Math.sin(x*e)+g*Math.cos(x*e))},C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>DH(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=DH(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=DH(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(xW(T),bW),t=yW(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}NW.applyToOptions=e=>{let t=SW(e,100,NW);return e.ease=t.ease,e.duration=DH(t.duration),e.type=`keyframes`,e};var PW=5;function FW(e,t,n){let r=Math.max(t-PW,0);return kH(n-e(r),t-r)}function IW({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=NW({keyframes:[f.value,m(f.value)],velocity:FW(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function LW(e,t,n){let r=[],i=n||vH.mix||_W,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=wH(Array.isArray(t)?t[n]||CH:t,a)),r.push(a)}return r}function RW(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=LW(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=TH(e[r],e[r+1],n);return s[r](i)};return n?t=>l(_H(e[0],e[a-1],t)):l}function zW(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=TH(0,t,r);e.push(rW(n,1,i))}}function BW(e){let t=[0];return zW(t,e.length-1),t}function VW(e,t){return e.map(e=>e*t)}function HW(e,t){return e.map(()=>t||KH).splice(0,e.length-1)}function UW({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=qH(r)?r.map(ZH):ZH(r),a={done:!1,value:t[0]},o=RW(VW(n&&n.length===t.length?n:BW(t),e),t,{ease:Array.isArray(i)?i:HW(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var WW=e=>e!==null;function GW(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(WW),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var KW={decay:IW,inertia:IW,tween:UW,keyframes:UW,spring:NW};function qW(e){typeof e.type==`string`&&(e.type=KW[e.type])}var JW=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},YW=e=>e/100,XW=class extends JW{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==cU.now()&&this.tick(cU.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;qW(e);let{type:t=UW,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||UW;s!==UW&&typeof o[0]!=`number`&&(this.mixKeyframes=wH(YW,_W(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=xW(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=_H(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==IW&&(b.value=GW(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return OH(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+OH(e)}get time(){return OH(this.currentTime)}set time(e){e=DH(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return FW(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(cU.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=OH(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=vW,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,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(cU.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(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function ZW(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var QW=e=>e*180/Math.PI,$W=e=>tG(QW(Math.atan2(e[1],e[0]))),eG={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:$W,rotateZ:$W,skewX:e=>QW(Math.atan(e[1])),skewY:e=>QW(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},tG=e=>(e%=360,e<0&&(e+=360),e),nG=$W,rG=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),iG=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),aG={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:rG,scaleY:iG,scale:e=>(rG(e)+iG(e))/2,rotateX:e=>tG(QW(Math.atan2(e[6],e[5]))),rotateY:e=>tG(QW(Math.atan2(-e[2],e[0]))),rotateZ:nG,rotate:nG,skewX:e=>QW(Math.atan(e[4])),skewY:e=>QW(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function oG(e){return+!!e.includes(`scale`)}function sG(e,t){if(!e||e===`none`)return oG(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=aG,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=eG,i=t}if(!i)return oG(t);let a=r[t],o=i[1].split(`,`).map(lG);return typeof a==`function`?a(o):o[a]}var cG=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return sG(n,t)};function lG(e){return parseFloat(e.trim())}var uG=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],dG=new Set([...uG,`pathRotation`]),fG=e=>e===hU||e===MU,pG=new Set([`x`,`y`,`z`]),mG=uG.filter(e=>!pG.has(e));function hG(e){let t=[];return mG.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var gG={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},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})=>sG(t,`x`),y:(e,{transform:t})=>sG(t,`y`)};gG.translateX=gG.x,gG.translateY=gG.y;var _G=new Set,vG=!1,yG=!1,bG=!1;function xG(){if(yG){let e=Array.from(_G).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=hG(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}yG=!1,vG=!1,_G.forEach(e=>e.complete(bG)),_G.clear()}function SG(){_G.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(yG=!0)})}function CG(){bG=!0,SG(),xG(),bG=!1}var wG=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(_G.add(this),vG||(vG=!0,nU.read(SG),nU.resolveKeyframes(xG))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}ZW(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),_G.delete(this)}cancel(){this.state===`scheduled`&&(_G.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},TG=e=>e.startsWith(`--`);function EG(e,t,n){TG(t)?e.style.setProperty(t,n):e.style[t]=n}var DG={};function OG(e,t){let n=SH(e);return()=>DG[t]??n()}var kG=OG(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),AG=OG(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),jG=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,MG={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:jG([0,.65,.55,1]),circOut:jG([.55,0,1,.45]),backIn:jG([.31,.01,.66,-.59]),backOut:jG([.33,1.53,.69,.99])};function NG(e,t){if(e)return typeof e==`function`?AG()?yW(e,t):`ease-out`:JH(e)?jG(e):Array.isArray(e)?e.map(e=>NG(e,t)||MG.easeOut):MG[e]}function PG(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=NG(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function FG(e){return typeof e==`function`&&`applyToOptions`in e}function IG({type:e,...t}){return FG(e)&&AG()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var LG=class extends JW{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=IG(e);this.animation=PG(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=GW(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),EG(t,n,e),this.animation.cancel()}s?.(),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;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return OH(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+OH(e)}get time(){return OH(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=DH(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&kG()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),CH):r(this)}},RG={anticipate:BH,backInOut:zH,circInOut:UH};function zG(e){return e in RG}function BG(e){typeof e.ease==`string`&&zG(e.ease)&&(e.ease=RG[e.ease])}var VG=10,HG=class extends LG{constructor(e){BG(e),qW(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new XW({...a,autoplay:!1}),s=Math.max(VG,cU.now()-this.startTime),c=_H(0,VG,s-VG),l=o.sample(s).value,{name:u}=this.options;i&&u&&EG(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},UG=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&($U.test(e)||e===`0`)&&!e.startsWith(`url(`));function WG(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function GG(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=UG(i,t),s=UG(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:WG(e)||(n===`spring`||FG(n))&&r}function KG(e){e.duration=0,e.type=`keyframes`}var qG=new Set([`opacity`,`clipPath`,`filter`,`transform`]),JG=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function YG(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&JG.test(e[t]))return!0;return!1}var XG=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),ZG=SH(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function QG(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return ZG()&&n&&(qG.has(n)||XG.has(n)&&YG(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var $G=40,eK=class extends JW{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=cU.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||wG;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=cU.now();let u=!0;GG(e,i,a,o)||(u=!1,(vH.instantAnimations||!s)&&l?.(GW(e,n,t)),e[0]=e[e.length-1],KG(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>$G?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&QG(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new HG({...d,element:p})}catch{m=new XW(d)}else m=new XW(d);m.finished.then(()=>{this.notifyFinished()}).catch(CH),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),CG()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function tK(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var nK=30,rK=e=>!isNaN(parseFloat(e)),iK={current:void 0},aK=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=cU.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=cU.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=rK(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new EH);let n=this.events[e].add(t);return e===`change`?()=>{n(),nU.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return iK.current&&iK.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=cU.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>nK)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,nK);return kH(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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 oK(e,t){return new aK(e,t)}function sK(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function cK(e,t){let n=e?.[t]??e?.default??e;return n===e?n:sK(n,e)}var lK={type:`spring`,stiffness:500,damping:25,restSpeed:10},uK=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),dK={type:`keyframes`,duration:.8},fK={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},pK=(e,{keyframes:t})=>t.length>2?dK:dG.has(e)?e.startsWith(`scale`)?uK(t[1]):lK:fK,mK=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function hK(e){for(let t in e)if(!mK.has(t))return!0;return!1}var gK=(e,t,n,r={},i,a)=>o=>{let s=cK(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=DH(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};hK(s)||Object.assign(u,pK(e,u)),u.duration&&=DH(u.duration),u.repeatDelay&&=DH(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(KG(u),u.delay===0&&(d=!0)),(vH.instantAnimations||vH.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,KG(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=GW(u.keyframes,s);if(e!==void 0){nU.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new XW(u):new eK(u)},_K=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vK(e){let t=_K.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function yK(e,t,n=1){`${e}`;let[r,i]=vK(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return yH(e)?parseFloat(e):e}return fU(i)?yK(i,t,n+1):i}function bK(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function xK(e,t,n,r){if(typeof t==`function`){let[i,a]=bK(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=bK(r);t=t(n===void 0?e.custom:n,i,a)}return t}function SK(e,t,n){let r=e.getProps();return xK(r,t,n===void 0?r.custom:n,e)}var CK=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...uG]),wK=e=>Array.isArray(e);function TK(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,oK(n))}function EK(e){return wK(e)?e[e.length-1]||0:e}function DK(e,t){let{transitionEnd:n={},transition:r={},...i}=SK(e,t)||{};i={...i,...n};for(let t in i)TK(e,t,EK(i[t]))}var OK=e=>!!(e&&e.getVelocity);function kK(e){return!!(OK(e)&&e.add)}function AK(e,t){let n=e.getValue(`willChange`);if(kK(n))return n.add(t);if(!n&&vH.WillChange){let n=new vH.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function jK(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var MK=`data-`+jK(`framerAppearId`);function NK(e){return e.props[MK]}function PK({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function FK(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?sK(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&PK(f,t))continue;let o={delay:n,...cK(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){nU.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=NK(e);if(n){let e=window.MotionHandoffAnimation(n,t,nU);e!==null&&(o.startTime=e,p=!0)}}AK(e,t);let m=l??e.shouldReduceMotion;r.start(gK(t,r,i,m&&CK.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>nU.update(()=>{o&&DK(e,o)});d.length?Promise.all(d).then(t):t()}return d}function IK(e,t,n={}){let r=SK(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(FK(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return LK(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function LK(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(IK(c,t,{...o,delay:n+(typeof r==`function`?0:r)+tK(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function RK(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>IK(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=IK(e,t,n);else{let i=typeof t==`function`?SK(e,t,n.custom):t;r=Promise.all(FK(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var zK={test:e=>e===`auto`,parse:e=>e},BK=e=>t=>t.test(e),VK=[hU,MU,jU,AU,PU,NU,zK],HK=e=>VK.find(BK(e));function UK(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||xH(e)}var WK=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function GK(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(yU)||[];if(!r)return e;let i=n.replace(r,``),a=+!!WK.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var KK=/\b([a-z-]*)\(.*?\)/gu,qK={...$U,getAnimatableNone:e=>{let t=e.match(KK);return t?t.map(GK).join(` `):e}},JK={...$U,getAnimatableNone:e=>{let t=$U.parse(e);return $U.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},YK={...hU,transform:Math.round},XK={borderWidth:MU,borderTopWidth:MU,borderRightWidth:MU,borderBottomWidth:MU,borderLeftWidth:MU,borderRadius:MU,borderTopLeftRadius:MU,borderTopRightRadius:MU,borderBottomRightRadius:MU,borderBottomLeftRadius:MU,width:MU,maxWidth:MU,height:MU,maxHeight:MU,top:MU,right:MU,bottom:MU,left:MU,inset:MU,insetBlock:MU,insetBlockStart:MU,insetBlockEnd:MU,insetInline:MU,insetInlineStart:MU,insetInlineEnd:MU,padding:MU,paddingTop:MU,paddingRight:MU,paddingBottom:MU,paddingLeft:MU,paddingBlock:MU,paddingBlockStart:MU,paddingBlockEnd:MU,paddingInline:MU,paddingInlineStart:MU,paddingInlineEnd:MU,margin:MU,marginTop:MU,marginRight:MU,marginBottom:MU,marginLeft:MU,marginBlock:MU,marginBlockStart:MU,marginBlockEnd:MU,marginInline:MU,marginInlineStart:MU,marginInlineEnd:MU,fontSize:MU,backgroundPositionX:MU,backgroundPositionY:MU,rotate:AU,pathRotation:AU,rotateX:AU,rotateY:AU,rotateZ:AU,scale:_U,scaleX:_U,scaleY:_U,scaleZ:_U,skew:AU,skewX:AU,skewY:AU,distance:MU,translateX:MU,translateY:MU,translateZ:MU,x:MU,y:MU,z:MU,perspective:MU,transformPerspective:MU,opacity:gU,originX:FU,originY:FU,originZ:MU,zIndex:YK,fillOpacity:gU,strokeOpacity:gU,numOctaves:YK},ZK={...XK,color:LU,backgroundColor:LU,outlineColor:LU,fill:LU,stroke:LU,borderColor:LU,borderTopColor:LU,borderRightColor:LU,borderBottomColor:LU,borderLeftColor:LU,filter:qK,WebkitFilter:qK,mask:JK,WebkitMask:JK},QK=e=>ZK[e],$K=new Set([qK,JK]);function eq(e,t){let n=QK(e);return $K.has(n)||(n=$U),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var tq=new Set([`auto`,`none`,`0`]);function nq(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!tq.has(t)&&KU(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=eq(n,i)}var rq=class extends wG{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),fU(r))){let i=yK(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!CK.has(n)||e.length!==2)return;let[r,i]=e,a=HK(r),o=HK(i);if(mU(r)!==mU(i)&&gG[n]){this.needsMeasurement=!0;return}if(a!==o)if(fG(a)&&fG(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else gG[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||UK(e[t]))&&n.push(t);n.length&&nq(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=gG[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=gG[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},iq=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function aq(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var oq=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function sq(e){return bH(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:cq,cancel:Xue}=tU(queueMicrotask,!1),lq={x:!1,y:!1};function uq(){return lq.x||lq.y}function dq(e){return e===`x`||e===`y`?lq[e]?null:(lq[e]=!0,()=>{lq[e]=!1}):lq.x||lq.y?null:(lq.x=lq.y=!0,()=>{lq.x=lq.y=!1})}function fq(e,t){let n=aq(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function pq(e){return!(e.pointerType===`touch`||uq())}function mq(e,t,n={}){let[r,i,a]=fq(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!pq(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var hq=(e,t)=>t?e===t||hq(e,t.parentElement):!1,gq=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,_q=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function vq(e){return _q.has(e.tagName)||e.isContentEditable===!0}var yq=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function bq(e){return yq.has(e.tagName)||e.isContentEditable===!0}var xq=new WeakSet;function Sq(e){return t=>{t.key===`Enter`&&e(t)}}function Cq(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var wq=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Sq(()=>{if(xq.has(n))return;Cq(n,`down`);let e=Sq(()=>{Cq(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Cq(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Tq(e){return gq(e)&&!uq()}var Eq=new WeakSet;function Dq(e,t,n={}){let[r,i,a]=fq(e,n),o=e=>{let r=e.currentTarget;if(!Tq(e)||Eq.has(e))return;xq.add(r),n.stopPropagation&&Eq.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),xq.has(r)&&xq.delete(r),Tq(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||hq(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),sq(e)&&(e.addEventListener(`focus`,e=>wq(e,i)),!vq(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Oq(e){return bH(e)&&`ownerSVGElement`in e}var kq=new WeakMap,Aq,jq=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Oq(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Mq=jq(`inline`,`width`,`offsetWidth`),Nq=jq(`block`,`height`,`offsetHeight`);function Pq({target:e,borderBoxSize:t}){kq.get(e)?.forEach(n=>{n(e,{get width(){return Mq(e,t)},get height(){return Nq(e,t)}})})}function Fq(e){e.forEach(Pq)}function Iq(){typeof ResizeObserver>`u`||(Aq=new ResizeObserver(Fq))}function Lq(e,t){Aq||Iq();let n=aq(e);return n.forEach(e=>{let n=kq.get(e);n||(n=new Set,kq.set(e,n)),n.add(t),Aq?.observe(e)}),()=>{n.forEach(e=>{let n=kq.get(e);n?.delete(t),n?.size||Aq?.unobserve(e)})}}var Rq=new Set,zq;function Bq(){zq=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Rq.forEach(t=>t(e))},window.addEventListener(`resize`,zq)}function Vq(e){return Rq.add(e),zq||Bq(),()=>{Rq.delete(e),!Rq.size&&typeof zq==`function`&&(window.removeEventListener(`resize`,zq),zq=void 0)}}function Hq(e,t){return typeof e==`function`?Vq(e):Lq(e,t)}var Uq={value:null,addProjectionMetrics:null};function Wq(e){return Oq(e)&&e.tagName===`svg`}var Gq=[...VK,LU,$U],Kq=e=>Gq.find(BK(e)),qq=()=>({translate:0,scale:1,origin:0,originPoint:0}),Jq=()=>({x:qq(),y:qq()}),Yq=()=>({min:0,max:0}),Xq=()=>({x:Yq(),y:Yq()}),Zq=new WeakMap;function Qq(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function $q(e){return typeof e==`string`||Array.isArray(e)}var eJ=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],tJ=[`initial`,...eJ];function nJ(e){return Qq(e.animate)||tJ.some(t=>$q(e[t]))}function rJ(e){return!!(nJ(e)||e.variants)}function iJ(e,t,n){for(let r in t){let i=t[r],a=n[r];if(OK(i))e.addValue(r,i);else if(OK(a))e.addValue(r,oK(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,oK(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var aJ={current:null},oJ={current:!1},sJ=typeof window<`u`;function cJ(){if(oJ.current=!0,sJ)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>aJ.current=e.matches;e.addEventListener(`change`,t),t()}else aJ.current=!1}var lJ=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],uJ={};function dJ(e){uJ=e}function fJ(){return uJ}var pJ=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){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=wG,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=()=>{let e=cU.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,nU.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=nJ(t),this.isVariantNode=rJ(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&OK(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,Zq.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(oJ.current||cJ(),this.shouldReduceMotion=aJ.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(),rU(this.notifyUpdate),rU(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&qG.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new LG({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:DH(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=dG.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&nU.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in uJ){let t=uJ[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Xq()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<lJ.length;t++){let n=lJ[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=iJ(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=oK(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(yH(n)||xH(n))?n=parseFloat(n):!Kq(n)&&$U.test(t)&&(n=eq(e,t)),this.setBaseTarget(e,OK(n)?n.get():n)),OK(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=xK(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!OK(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new EH),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){cq.render(this.render)}},mJ=class extends pJ{constructor(){super(...arguments),this.KeyframeResolver=rq}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;OK(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},hJ=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function gJ({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function _J({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function vJ(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function yJ(e){return e===void 0||e===1}function bJ({scale:e,scaleX:t,scaleY:n}){return!yJ(e)||!yJ(t)||!yJ(n)}function xJ(e){return bJ(e)||SJ(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function SJ(e){return CJ(e.x)||CJ(e.y)}function CJ(e){return e&&e!==`0%`}function wJ(e,t,n){return n+t*(e-n)}function TJ(e,t,n,r,i){return i!==void 0&&(e=wJ(e,i,r)),wJ(e,n,r)+t}function EJ(e,t=0,n=1,r,i){e.min=TJ(e.min,t,n,r,i),e.max=TJ(e.max,t,n,r,i)}function DJ(e,{x:t,y:n}){EJ(e.x,t.translate,t.scale,t.originPoint),EJ(e.y,n.translate,n.scale,n.originPoint)}var OJ=.999999999999,kJ=1.0000000000001;function AJ(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(jJ(e.x,-a.scroll.offset.x),jJ(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,DJ(e,o)),r&&xJ(a.latestValues)&&PJ(e,a.latestValues,a.layout?.layoutBox))}t.x<kJ&&t.x>OJ&&(t.x=1),t.y<kJ&&t.y>OJ&&(t.y=1)}function jJ(e,t){e.min+=t,e.max+=t}function MJ(e,t,n,r,i=.5){EJ(e,t,n,rW(e.min,e.max,i),r)}function NJ(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function PJ(e,t,n){let r=n??e;MJ(e.x,NJ(t.x,r.x),t.scaleX,t.scale,t.originX),MJ(e.y,NJ(t.y,r.y),t.scaleY,t.scale,t.originY)}function FJ(e,t){return gJ(vJ(e.getBoundingClientRect(),t))}function IJ(e,t,n){let r=FJ(e,n),{scroll:i}=t;return i&&(jJ(r.x,i.offset.x),jJ(r.y,i.offset.y)),r}var LJ={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},RJ=uG.length;function zJ(e,t,n){let r=``,i=!0;for(let a=0;a<RJ;a++){let o=uG[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=oq(s,XK[o]);if(!c){i=!1;let t=LJ[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${oq(a,XK.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function BJ(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(dG.has(e)){o=!0;continue}else if(uU(e)){i[e]=n;continue}else{let t=oq(n,XK[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=zJ(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function VJ(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function HJ(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var UJ={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(MU.test(e))e=parseFloat(e);else return e;return`${HJ(e,t.target.x)}% ${HJ(e,t.target.y)}%`}},WJ={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=$U.parse(e);if(i.length>5)return r;let a=$U.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=rW(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},GJ={borderRadius:{...UJ,applyTo:[...iq]},borderTopLeftRadius:UJ,borderTopRightRadius:UJ,borderBottomLeftRadius:UJ,borderBottomRightRadius:UJ,boxShadow:WJ};function KJ(e,{layout:t,layoutId:n}){return dG.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!GJ[e]||e===`opacity`)}function qJ(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(OK(r[t])||i&&OK(i[t])||KJ(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function JJ(e){return window.getComputedStyle(e)}var YJ=class extends mJ{constructor(){super(...arguments),this.type=`html`,this.renderInstance=VJ}readValueFromInstance(e,t){if(dG.has(t))return this.projection?.isProjecting?oG(t):cG(e,t);{let n=JJ(e),r=(uU(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return FJ(e,t)}build(e,t,n){BJ(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return qJ(e,t,n)}},XJ={offset:`stroke-dashoffset`,array:`stroke-dasharray`},ZJ={offset:`strokeDashoffset`,array:`strokeDasharray`};function QJ(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?XJ:ZJ;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var $J=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function eY(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(BJ(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of $J)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&QJ(d,i,a,o,!1)}var tY=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`]),nY=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function rY(e,t,n,r){VJ(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(tY.has(n)?n:jK(n),t.attrs[n])}function iY(e,t,n){let r=qJ(e,t,n);for(let n in e)if(OK(e[n])||OK(t[n])){let t=uG.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var aY=class extends mJ{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Xq}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(dG.has(t)){let e=QK(t);return e&&e.default||0}return t=tY.has(t)?t:jK(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return iY(e,t,n)}build(e,t,n){eY(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){rY(e,t,n,r)}mount(e){this.isSVGTag=nY(e.tagName),super.mount(e)}},oY=tJ.length;function sY(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&sY(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<oY;n++){let r=tJ[n],i=e.props[r];($q(i)||i===!1)&&(t[r]=i)}return t}function cY(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var lY=[...eJ].reverse(),uY=eJ.length;function dY(e){return t=>Promise.all(t.map(({animation:t,options:n})=>RK(e,t,n)))}function fY(e){let t=dY(e),n=hY(),r=!0,i=!1,a=t=>(n,r)=>{let i=SK(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=sY(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<uY;t++){let p=lY[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=$q(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||Qq(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=pY(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=wK(t)&&wK(n)?!cY(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=SK(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=tK(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=SK(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=hY(),i=!0}}}function pY(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!cY(t,e):!1}function mY(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function hY(){return{animate:mY(!0),whileInView:mY(),whileHover:mY(),whileTap:mY(),whileDrag:mY(),whileFocus:mY(),exit:mY()}}function gY(e,t){e.min=t.min,e.max=t.max}function _Y(e,t){gY(e.x,t.x),gY(e.y,t.y)}function vY(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var yY=.9999,bY=1.0001,xY=-.01,SY=.01;function CY(e){return e.max-e.min}function wY(e,t,n){return Math.abs(e-t)<=n}function TY(e,t,n,r=.5){e.origin=r,e.originPoint=rW(t.min,t.max,e.origin),e.scale=CY(n)/CY(t),e.translate=rW(n.min,n.max,e.origin)-e.originPoint,(e.scale>=yY&&e.scale<=bY||isNaN(e.scale))&&(e.scale=1),(e.translate>=xY&&e.translate<=SY||isNaN(e.translate))&&(e.translate=0)}function EY(e,t,n,r){TY(e.x,t.x,n.x,r?r.originX:void 0),TY(e.y,t.y,n.y,r?r.originY:void 0)}function DY(e,t,n,r=0){e.min=(r?rW(n.min,n.max,r):n.min)+t.min,e.max=e.min+CY(t)}function OY(e,t,n,r){DY(e.x,t.x,n.x,r?.x),DY(e.y,t.y,n.y,r?.y)}function kY(e,t,n,r=0){let i=r?rW(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+CY(t)}function AY(e,t,n,r){kY(e.x,t.x,n.x,r?.x),kY(e.y,t.y,n.y,r?.y)}function jY(e,t,n,r,i){return e-=t,e=wJ(e,1/n,r),i!==void 0&&(e=wJ(e,1/i,r)),e}function MY(e,t=0,n=1,r=.5,i,a=e,o=e){if(jU.test(t)&&(t=parseFloat(t),t=rW(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=rW(a.min,a.max,r);e===a&&(s-=t),e.min=jY(e.min,t,n,s,i),e.max=jY(e.max,t,n,s,i)}function NY(e,t,[n,r,i],a,o){MY(e,t[n],t[r],t[i],t.scale,a,o)}var PY=[`x`,`scaleX`,`originX`],FY=[`y`,`scaleY`,`originY`];function IY(e,t,n,r){NY(e.x,t,PY,n?n.x:void 0,r?r.x:void 0),NY(e.y,t,FY,n?n.y:void 0,r?r.y:void 0)}function LY(e){return e.translate===0&&e.scale===1}function RY(e){return LY(e.x)&&LY(e.y)}function zY(e,t){return e.min===t.min&&e.max===t.max}function BY(e,t){return zY(e.x,t.x)&&zY(e.y,t.y)}function VY(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function HY(e,t){return VY(e.x,t.x)&&VY(e.y,t.y)}function UY(e){return CY(e.x)/CY(e.y)}function WY(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function GY(e){return[e(`x`),e(`y`)]}function KY(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var qY=iq.length,JY=e=>typeof e==`string`?parseFloat(e):e,YY=e=>typeof e==`number`||MU.test(e);function XY(e,t,n,r,i,a){i?(e.opacity=rW(0,n.opacity??1,QY(r)),e.opacityExit=rW(t.opacity??1,0,$Y(r))):a&&(e.opacity=rW(t.opacity??1,n.opacity??1,r));for(let i=0;i<qY;i++){let a=iq[i],o=ZY(t,a),s=ZY(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||YY(o)===YY(s)?(e[a]=Math.max(rW(JY(o),JY(s),r),0),(jU.test(s)||jU.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=rW(t.rotate||0,n.rotate||0,r))}function ZY(e,t){return e[t]===void 0?e.borderRadius:e[t]}var QY=eX(0,.5,HH),$Y=eX(.5,.95,CH);function eX(e,t,n){return r=>r<e?0:r>t?1:n(TH(e,t,r))}function tX(e,t,n){let r=OK(e)?e:oK(e);return r.start(gK(``,r,t,n)),r.animation}function nX(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var rX=(e,t)=>e.depth-t.depth,iX=class{constructor(){this.children=[],this.isDirty=!1}add(e){hH(this.children,e),this.isDirty=!0}remove(e){gH(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(rX),this.isDirty=!1,this.children.forEach(e)}};function aX(e,t){let n=cU.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(rU(r),e(a-t))};return nU.setup(r,!0),()=>rU(r)}function oX(e){return OK(e)?e.get():e}var sX=class{constructor(){this.members=[]}add(e){hH(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(gH(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(gH(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},cX={hasAnimatedSinceResize:!0,hasEverUpdated:!1},lX={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},uX=[``,`X`,`Y`,`Z`],dX=1e3,fX=0;function pX(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function mX(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=NK(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,nU,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&mX(r)}function hX({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=fX++,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,Uq.value&&(lX.nodes=lX.calculatedTargetDeltas=lX.calculatedProjections=0),this.nodes.forEach(vX),this.nodes.forEach(DX),this.nodes.forEach(OX),this.nodes.forEach(yX),Uq.addProjectionMetrics&&Uq.addProjectionMetrics(lX)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new iX)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new EH),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Oq(t)&&!Wq(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;nU.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=aX(i,250),cX.hasAnimatedSinceResize&&(cX.hasAnimatedSinceResize=!1,this.nodes.forEach(EX)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||FX,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!HY(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...cK(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||EX(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),rU(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(kX),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&mX(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(SX),this.nodes.forEach(xX);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(CX);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(wX),this.nodes.forEach(TX),this.nodes.forEach(gX),this.nodes.forEach(_X)):this.nodes.forEach(CX),this.clearAllSnapshots();let e=cU.now();iU.delta=_H(0,1e3/60,e-iU.timestamp),iU.timestamp=e,iU.isProcessing=!0,aU.update.process(iU),aU.preRender.process(iU),aU.render.process(iU),iU.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,cq.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(bX),this.sharedNodes.forEach(AX)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,nU.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){nU.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!CY(this.snapshot.measuredBox.x)&&!CY(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 e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=Xq(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!RY(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||xJ(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),zX(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Xq();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(VX))){let{scroll:e}=this.root;e&&(jJ(t.x,e.offset.x),jJ(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Xq();if(_Y(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&_Y(t,e),jJ(t.x,i.offset.x),jJ(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Xq();_Y(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(jJ(r.x,-n.scroll.offset.x),jJ(r.y,-n.scroll.offset.y)),xJ(n.latestValues)&&PJ(r,n.latestValues,n.layout?.layoutBox)}return xJ(this.latestValues)&&PJ(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Xq();_Y(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!xJ(n.latestValues))continue;let r;n.instance&&(bJ(n.latestValues)&&n.updateSnapshot(),r=Xq(),_Y(r,n.measurePageBox())),IY(t,n.latestValues,n.snapshot?.layoutBox,r)}return xJ(this.latestValues)&&IY(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}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!==iU.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=iU.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Xq(),this.targetWithTransforms=Xq()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),OY(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):_Y(this.target,this.layout.layoutBox),DJ(this.target,this.targetDelta)):_Y(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Uq.value&&lX.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||bJ(this.parent.latestValues)||SJ(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Xq(),this.relativeTargetOrigin=Xq(),AY(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),_Y(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===iU.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;_Y(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;AJ(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Xq());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(vY(this.prevProjectionDelta.x,this.projectionDelta.x),vY(this.prevProjectionDelta.y,this.projectionDelta.y)),EY(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!WY(this.projectionDelta.x,this.prevProjectionDelta.x)||!WY(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Uq.value&&lX.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Jq(),this.projectionDelta=Jq(),this.projectionDeltaWithTransform=Jq()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Jq();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=Xq(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(c&&!u&&this.options.crossfade===!0&&!this.path.some(PX));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=rW(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=rW(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(jX(o.x,e.x,n),jX(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(AY(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),NX(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&BY(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=Xq(),_Y(f,this.relativeTarget)),c&&(this.animationValues=a,XY(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(rU(this.pendingAnimation),void 0),this.pendingAnimation=nU.update(()=>{cX.hasAnimatedSinceResize=!0,this.motionValue||=oK(0),this.motionValue.jump(0,!1),this.currentAnimation=tX(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.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);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(dX),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&BX(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Xq();let t=CY(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=CY(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}_Y(t,n),PJ(t,i),EY(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new sX),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&pX(`z`,e,r,this.animationValues);for(let t=0;t<uX.length;t++)pX(`rotate${uX[t]}`,e,r,this.animationValues),pX(`skew${uX[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=oX(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=oX(t?.pointerEvents)||``),this.hasProjected&&!xJ(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=KY(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in GJ){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=GJ[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?oX(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(xX),this.root.sharedNodes.clear()}}}function gX(e){e.updateLayout()}function _X(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)GY(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=CY(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;gY(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else BX(i,t.layoutBox,n)&&GY(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=CY(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Jq();EY(o,n,t.layoutBox);let s=Jq();a?EY(s,e.applyTransform(r,!0),t.measuredBox):EY(s,n,t.layoutBox);let c=!RY(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Xq();AY(s,t.layoutBox,i.layoutBox,o);let c=Xq();AY(c,n,a.layoutBox,o),HY(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function vX(e){Uq.value&&lX.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function yX(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function bX(e){e.clearSnapshot()}function xX(e){e.clearMeasurements()}function SX(e){e.isLayoutDirty=!0,e.updateLayout()}function CX(e){e.isLayoutDirty=!1}function wX(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function TX(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function EX(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function DX(e){e.resolveTargetDelta()}function OX(e){e.calcProjection()}function kX(e){e.resetSkewAndRotation()}function AX(e){e.removeLeadSnapshot()}function jX(e,t,n){e.translate=rW(t.translate,0,n),e.scale=rW(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function MX(e,t,n,r){e.min=rW(t.min,n.min,r),e.max=rW(t.max,n.max,r)}function NX(e,t,n,r){MX(e.x,t.x,n.x,r),MX(e.y,t.y,n.y,r)}function PX(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var FX={duration:.45,ease:[.4,0,.1,1]},IX=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),LX=IX(`applewebkit/`)&&!IX(`chrome/`)?Math.round:CH;function RX(e){e.min=LX(e.min),e.max=LX(e.max)}function zX(e){RX(e.x),RX(e.y)}function BX(e,t,n){return e===`position`||e===`preserve-aspect`&&!wY(UY(t),UY(n),.2)}function VX(e){return e!==e.root&&e.scroll?.wasRoot}var HX=hX({attachResizeListener:(e,t)=>nX(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),UX={current:void 0},WX=hX({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!UX.current){let e=new HX({});e.mount(window),e.setOptions({layoutScroll:!0}),UX.current=e}return UX.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),GX=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function KX(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function qX(...e){return t=>{let n=!1,r=e.map(e=>{let r=KX(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():KX(e[t],null)}}}}function JX(...e){return b.useCallback(qX(...e),e)}var YX=class extends b.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(sq(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=sq(e)&&e.offsetWidth||0,r=sq(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function XX({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,b.useId)(),s=(0,b.useRef)(null),c=(0,b.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,b.useContext)(GX),u=JX(s,e.props?.ref??e?.ref);return(0,b.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
224
+ [data-motion-pop-id="${o}"] {
225
+ position: absolute !important;
226
+ width: ${e}px !important;
227
+ height: ${u}px !important;
228
+ ${_}px !important;
229
+ ${v}px !important;
230
+ }
231
+ `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,H.jsx)(YX,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:b.cloneElement(e,{ref:u})})}var ZX=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=fH(QX),d=(0,b.useId)(),f=(0,b.useRef)(n),p=(0,b.useRef)(r);pH(()=>{f.current=n,p.current=r});let m=!0,h=(0,b.useMemo)(()=>(m=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>{u.delete(e),!f.current&&!u.size&&p.current?.()})}),[n,u,r]);return a&&m&&(h={...h}),(0,b.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),b.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,H.jsx)(XX,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,H.jsx)(mH.Provider,{value:h,children:e})};function QX(){return new Map}function $X(e=!0){let t=(0,b.useContext)(mH);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,b.useId)();(0,b.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,b.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var eZ=e=>e.key||``;function tZ(e){let t=[];return b.Children.forEach(e,e=>{(0,b.isValidElement)(e)&&t.push(e)}),t}var nZ=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=$X(o),f=(0,b.useMemo)(()=>tZ(e),[e]),p=o&&!u?[]:f.map(eZ),m=(0,b.useRef)(!0),h=(0,b.useRef)(f),g=fH(()=>new Map),_=(0,b.useRef)(new Set),[v,y]=(0,b.useState)(f),[x,S]=(0,b.useState)(f);pH(()=>{m.current=!1,h.current=f;for(let e=0;e<x.length;e++){let t=eZ(x[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[x,p.length,p.join(`-`)]);let C=[];if(f!==v){let e=[...f];for(let t=0;t<x.length;t++){let n=x[t],r=eZ(n);p.includes(r)||(e.splice(t,0,n),C.push(n))}return a===`wait`&&C.length&&(e=C),S(tZ(e)),y(f),null}let{forceRender:w}=(0,b.useContext)(dH);return(0,H.jsx)(H.Fragment,{children:x.map(e=>{let v=eZ(e),y=o&&!u?!1:f===x||p.includes(v);return(0,H.jsx)(ZX,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(w?.(),S(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})},rZ=(0,b.createContext)({strict:!1}),iZ={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`]},aZ=!1;function oZ(){if(aZ)return;let e={};for(let t in iZ)e[t]={isEnabled:e=>iZ[t].some(t=>!!e[t])};dJ(e),aZ=!0}function sZ(){return oZ(),fJ()}function cZ(e){let t=sZ();for(let n in e)t[n]={...t[n],...e[n]};dJ(t)}var lZ=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`.split(`.`));function uZ(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||lZ.has(e)}var dZ=c({default:()=>fZ}),fZ,pZ=o((()=>{throw fZ={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),mZ=e=>!uZ(e);function hZ(e){typeof e==`function`&&(mZ=t=>t.startsWith(`on`)?!uZ(t):e(t))}try{hZ((pZ(),d(dZ)).default)}catch{}function gZ(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||OK(e[i])||(mZ(i)||n===!0&&uZ(i)||!t&&!uZ(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var _Z=(0,b.createContext)({});function vZ(e,t){if(nJ(e)){let{initial:t,animate:n}=e;return{initial:t===!1||$q(t)?t:void 0,animate:$q(n)?n:void 0}}return e.inherit===!1?{}:t}function yZ(e){let{initial:t,animate:n}=vZ(e,(0,b.useContext)(_Z));return(0,b.useMemo)(()=>({initial:t,animate:n}),[bZ(t),bZ(n)])}function bZ(e){return Array.isArray(e)?e.join(` `):e}var xZ=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function SZ(e,t,n){for(let r in t)!OK(t[r])&&!KJ(r,n)&&(e[r]=t[r])}function CZ({transformTemplate:e},t){return(0,b.useMemo)(()=>{let n=xZ();return BJ(n,t,e),Object.assign({},n.vars,n.style)},[t])}function wZ(e,t){let n=e.style||{},r={};return SZ(r,n,e),Object.assign(r,CZ(e,t)),r}function TZ(e,t){let n={},r=wZ(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var EZ=()=>({...xZ(),attrs:{}});function DZ(e,t,n,r){let i=(0,b.useMemo)(()=>{let n=EZ();return eY(n,t,nY(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};SZ(t,e.style,e),i.style={...t,...i.style}}return i}var OZ=[`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 kZ(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(OZ.indexOf(e)>-1||/[A-Z]/u.test(e))}function AZ(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??kZ(e)?DZ:TZ)(t,r,i,e),c=gZ(t,typeof e==`string`,a),l=e===b.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,b.useMemo)(()=>OK(u)?u.get():u,[u]);return(0,b.createElement)(e,{...l,children:d})}function jZ({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:MZ(n,r,i,e),renderState:t()}}function MZ(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=oX(a[e]);let{initial:o,animate:s}=e,c=nJ(e),l=rJ(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Qq(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=xK(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var NZ=e=>(t,n)=>{let r=(0,b.useContext)(_Z),i=(0,b.useContext)(mH),a=()=>jZ(e,t,r,i);return n?a():fH(a)},PZ=NZ({scrapeMotionValuesFromProps:qJ,createRenderState:xZ}),FZ=NZ({scrapeMotionValuesFromProps:iY,createRenderState:EZ}),IZ=Symbol.for(`motionComponentSymbol`);function LZ(e,t,n){let r=(0,b.useRef)(n);(0,b.useInsertionEffect)(()=>{r.current=n});let i=(0,b.useRef)(null);return(0,b.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var RZ=(0,b.createContext)({});function zZ(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function BZ(e,t,n,r,i,a){let{visualElement:o}=(0,b.useContext)(_Z),s=(0,b.useContext)(rZ),c=(0,b.useContext)(mH),l=(0,b.useContext)(GX),u=l.reducedMotion,d=l.skipAnimations,f=(0,b.useRef)(null),p=(0,b.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,b.useContext)(RZ);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&VZ(f.current,n,i,h);let g=(0,b.useRef)(!1);(0,b.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[MK],v=(0,b.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return pH(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,b.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function VZ(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:HZ(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&zZ(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function HZ(e){if(e)return e.options.allowProjection===!1?HZ(e.parent):e.projection}function UZ(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&cZ(r);let a=n?n===`svg`:kZ(e),o=a?FZ:PZ;function s(n,s){let c,l={...(0,b.useContext)(GX),...n,layoutId:WZ(n)},{isStatic:u}=l,d=yZ(n),f=o(n,u);if(!u&&typeof window<`u`){GZ(l,r);let t=KZ(l);c=t.MeasureLayout,d.visualElement=BZ(e,f,l,i,t.ProjectionNode,a)}return(0,H.jsxs)(_Z.Provider,{value:d,children:[c&&d.visualElement?(0,H.jsx)(c,{visualElement:d.visualElement,...l}):null,AZ(e,n,LZ(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,b.forwardRef)(s);return c[IZ]=e,c}function WZ({layoutId:e}){let t=(0,b.useContext)(dH).id;return t&&e!==void 0?t+`-`+e:e}function GZ(e,t){(0,b.useContext)(rZ).strict}function KZ(e){let{drag:t,layout:n}=sZ();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function qZ(e,t){if(typeof Proxy>`u`)return UZ;let n=new Map,r=(n,r)=>UZ(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,UZ(a,void 0,e,t)),n.get(a))})}var JZ=(e,t)=>t.isSVG??kZ(e)?new aY(t):new YJ(t,{allowProjection:e!==b.Fragment}),YZ=class extends hJ{constructor(e){super(e),e.animationState||=fY(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Qq(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},XZ=0,ZZ={animation:{Feature:YZ},exit:{Feature:class extends hJ{constructor(){super(...arguments),this.id=XZ++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=SK(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function QZ(e){return{point:{x:e.pageX,y:e.pageY}}}var $Z=e=>t=>gq(t)&&e(t,QZ(t));function eQ(e,t,n,r){return nX(e,t,$Z(n),r)}var tQ=({current:e})=>e?e.ownerDocument.defaultView:null,nQ=(e,t)=>Math.abs(e-t);function rQ(e,t){let n=nQ(e.x,t.x),r=nQ(e.y,t.y);return Math.sqrt(n**2+r**2)}var iQ=new Set([`auto`,`scroll`]),aQ=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=oQ(this.lastRawMoveEventInfo,this.transformPagePoint));let e=cQ(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=rQ(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=iU;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=oQ(t,this.transformPagePoint),nU.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=cQ(e.type===`pointercancel`?this.lastMoveEventInfo:oQ(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!gq(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=oQ(QZ(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=iU;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,cQ(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=wH(eQ(this.contextWindow,`pointermove`,this.handlePointerMove,d),eQ(this.contextWindow,`pointerup`,this.handlePointerUp,d),eQ(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(iQ.has(e.overflowX)||iQ.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.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(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),nU.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),rU(this.updatePoint)}};function oQ(e,t){return t?{point:t(e.point)}:e}function sQ(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cQ({point:e},t){return{point:e,delta:sQ(e,uQ(t)),offset:sQ(e,lQ(t)),velocity:dQ(t,.1)}}function lQ(e){return e[0]}function uQ(e){return e[e.length-1]}function dQ(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=uQ(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>DH(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>DH(t)*2&&(r=e[1]);let a=OH(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function fQ(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?rW(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?rW(n,e,r.max):Math.min(e,n)),e}function pQ(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function mQ(e,{top:t,left:n,bottom:r,right:i}){return{x:pQ(e.x,n,i),y:pQ(e.y,t,r)}}function hQ(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function gQ(e,t){return{x:hQ(e.x,t.x),y:hQ(e.y,t.y)}}function _Q(e,t){let n=.5,r=CY(e),i=CY(t);return i>r?n=TH(t.min,t.max-r,e.min):r>i&&(n=TH(e.min,e.max-i,t.min)),_H(0,1,n)}function vQ(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var yQ=.35;function bQ(e=yQ){return e===!1?e=0:e===!0&&(e=yQ),{x:xQ(e,`left`,`right`),y:xQ(e,`top`,`bottom`)}}function xQ(e,t,n){return{min:SQ(e,t),max:SQ(e,n)}}function SQ(e,t){return typeof e==`number`?e:e[t]||0}var CQ=new WeakMap,wQ=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Xq(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(QZ(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=dq(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),GY(e=>{let t=this.getAxisMotionValue(e).get()||0;if(jU.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=CY(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&nU.update(()=>i(e,t),!1,!0),AK(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=OQ(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&nU.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new aQ(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:tQ(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&nU.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!DQ(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=fQ(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&zZ(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=mQ(n.layoutBox,e):this.constraints=!1,this.elastic=bQ(t),r!==this.constraints&&!zZ(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&GY(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=vQ(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!zZ(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=IJ(n,r.root,this.visualElement.getTransformPagePoint()),a=gQ(r.layout.layoutBox,i);if(t){let e=t(_J(a));this.hasMutatedConstraints=!!e,e&&(a=gJ(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=GY(o=>{if(!DQ(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return AK(this.visualElement,e),n.start(gK(e,n,0,t,this.visualElement,!1))}stopAnimation(){GY(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){GY(t=>{let{drag:n}=this.getProps();if(!DQ(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-rW(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!zZ(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};GY(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=_Q({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),GY(t=>{if(!DQ(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(rW(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;CQ.set(this.visualElement,this);let e=this.visualElement.current,t=eQ(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&bq(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();zZ(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=EQ(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),nU.read(r);let o=nX(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(GY(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=yQ,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function TQ(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function EQ(e,t,n){let r=Hq(e,TQ(n)),i=Hq(t,TQ(n));return()=>{r(),i()}}function DQ(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function OQ(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var kQ=class extends hJ{constructor(e){super(e),this.removeGroupControls=CH,this.removeListeners=CH,this.controls=new wQ(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||CH}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},AQ=e=>(t,n)=>{e&&nU.update(()=>e(t,n),!1,!0)},jQ=class extends hJ{constructor(){super(...arguments),this.removePointerDownListener=CH}onPointerDown(e){this.session=new aQ(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:tQ(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:AQ(e),onStart:AQ(t),onMove:AQ(n),onEnd:(e,t)=>{delete this.session,r&&nU.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=eQ(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},MQ=!1,NQ=class extends b.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),MQ&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),cX.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),MQ=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||nU.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),cq.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;MQ=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function PQ(e){let[t,n]=$X(),r=(0,b.useContext)(dH);return(0,H.jsx)(NQ,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(RZ),isPresent:t,safeToRemove:n})}var FQ={pan:{Feature:jQ},drag:{Feature:kQ,ProjectionNode:WX,MeasureLayout:PQ}};function IQ(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&nU.postRender(()=>i(t,QZ(t)))}var LQ=class extends hJ{mount(){let{current:e}=this.node;e&&(this.unmount=mq(e,(e,t)=>(IQ(this.node,t,`Start`),e=>IQ(this.node,e,`End`))))}unmount(){}},RQ=class extends hJ{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!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=wH(nX(this.node.current,`focus`,()=>this.onFocus()),nX(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function zQ(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&nU.postRender(()=>i(t,QZ(t)))}var BQ=class extends hJ{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Dq(e,(e,t)=>(zQ(this.node,t,`Start`),(e,{success:t})=>zQ(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},VQ=new WeakMap,HQ=new WeakMap,UQ=e=>{let t=VQ.get(e.target);t&&t(e)},WQ=e=>{e.forEach(UQ)};function GQ({root:e,...t}){let n=e||document;HQ.has(n)||HQ.set(n,{});let r=HQ.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(WQ,{root:e,...t})),r[i]}function KQ(e,t,n){let r=GQ(t);return VQ.set(e,n),r.observe(e),()=>{VQ.delete(e),r.unobserve(e)}}var qQ={some:0,all:1},JQ=class extends hJ{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:qQ[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=KQ(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(YQ(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function YQ({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var XQ={inView:{Feature:JQ},tap:{Feature:BQ},focus:{Feature:RQ},hover:{Feature:LQ}},ZQ={layout:{ProjectionNode:WX,MeasureLayout:PQ}},QQ=qZ({...ZZ,...XQ,...FQ,...ZQ},JZ),$Q=uj;sj.registerLanguage(`json`,$Q);function e$({code:e}){return(0,H.jsx)(sj,{language:`json`,style:Aj,customStyle:{margin:0,padding:0,background:`transparent`,fontSize:`0.75rem`},codeTagProps:{className:`font-mono whitespace-pre`},showLineNumbers:!1,wrapLongLines:!0,children:e})}var t$=e=>new Date(e).toLocaleTimeString(`en-US`,{hour12:!1,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,fractionalSecondDigits:3}),n$=e=>e.source===`view`?`view`:e.type===`response`?`res`:`req`,r$={duration:.2,ease:[.4,0,.2,1]},i$={req:{label:`req`,badge:`bg-sky-100 text-sky-700`,command:`text-sky-600`},res:{label:`res`,badge:`bg-emerald-100 text-emerald-700`,command:`text-emerald-600`},view:{label:`view`,badge:`bg-violet-100 text-violet-700`,command:`text-violet-600`}},a$=({log:e,expanded:t,onToggle:n})=>{let r=Object.keys(e.args).length>0,i=i$[n$(e)];return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>r&&n(),disabled:!r,className:pj(`flex w-full items-center gap-2 border-b border-border px-2 py-1.5 text-left font-mono text-xs bg-background`,r?`cursor-pointer hover:bg-light-gray`:`cursor-default`),children:[(0,H.jsx)(Jr,{className:pj(`size-3 shrink-0 text-muted-foreground transition-transform duration-200 ease-in-out`,!r&&`invisible`,t&&`rotate-90`)}),(0,H.jsx)(`span`,{className:`min-w-[80px] shrink-0 text-muted-foreground`,children:t$(e.timestamp)}),(0,H.jsx)(`span`,{className:pj(`shrink-0 rounded px-1 text-[10px] font-medium uppercase tracking-wide`,i.badge),children:i.label}),(0,H.jsx)(`span`,{className:pj(`min-w-[120px] shrink-0 font-semibold`,i.command),children:e.command})]}),(0,H.jsx)(nZ,{initial:!1,children:t&&r?(0,H.jsx)(QQ.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:r$,className:`overflow-hidden border-b border-border bg-muted/40`,children:(0,H.jsx)(`div`,{className:`px-2 py-2`,children:(0,H.jsx)(`div`,{className:`overflow-x-auto`,children:(0,H.jsx)(e$,{code:JSON.stringify(e.args,null,2)})})})},`args`):null})]})},o$=({onClose:e})=>{let t=qO(),n=hO(t?.name??``)?.openaiLogs??[],r=mO(e=>e.clearOpenAiLogs),[i,a]=(0,b.useState)(new Set);return(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col overflow-hidden border-l-2 border-border bg-background`,children:[(0,H.jsxs)(`div`,{className:`flex h-10 shrink-0 items-center justify-between border-b border-border px-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,H.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:`Logs`}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Clear logs`,onClick:()=>t&&r(t.name),disabled:n.length===0,className:`inline-flex size-6 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-light-gray hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent disabled:hover:text-muted-foreground`,children:(0,H.jsx)(Ti,{className:`size-3.5`})}),(0,H.jsx)(Sj,{value:JSON.stringify(n,null,2),label:`Copy logs`,className:`inline-flex size-6 items-center justify-center rounded-md transition-colors hover:bg-light-gray focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`})]}),e?(0,H.jsx)(`button`,{type:`button`,"aria-label":`Close logs`,onClick:e,className:`inline-flex size-6 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-light-gray hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:(0,H.jsx)(Oi,{className:`size-3.5`})}):null]}),(0,H.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto bg-light-gray`,children:n.map(e=>(0,H.jsx)(a$,{log:e,expanded:i.has(e.id),onToggle:()=>a(t=>{let n=new Set(t);return n.has(e.id)?n.delete(e.id):n.add(e.id),n})},e.id))})]})},s$=({expanded:e,onToggle:t})=>{let n=qO(),r=hO(n?.name??``);if(!n||!r?.response)return null;let{response:i,openaiObject:a,durationMs:o}=r,s=JSON.stringify(i,null,2),c=new TextEncoder().encode(s).length,l=eC(i),u=tC(a?.widgetState),d=l>=ZS,f=u>=QS,p=i.isError===!0;return(0,H.jsxs)(`button`,{type:`button`,"aria-expanded":e,onClick:t,className:pj(`flex h-9 w-full shrink-0 cursor-pointer items-center border-border bg-white text-left outline-none hover:bg-light-gray focus-visible:ring-1`,e?`border-b`:`border-b-2`),children:[(0,H.jsxs)(`div`,{className:`text-sm text-muted-foreground flex-1 border-r border-dashed border-light-gray-foreground/40 px-3 h-full flex items-center`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[`Tool output`,d&&(0,H.jsx)(lH,{kind:`tool-output`})]}),(0,H.jsxs)(`div`,{className:`text-xs text-light-gray-foreground flex items-center ml-auto gap-2 font-mono`,children:[(0,H.jsx)(`span`,{className:p?`text-destructive`:`text-success`,children:p?`Error`:`OK`}),o==null?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{children:`·`}),(0,H.jsxs)(`span`,{children:[o,`ms`]})]}),(0,H.jsx)(`span`,{children:`·`}),(0,H.jsx)(`span`,{children:vj(c)})]})]}),(0,H.jsxs)(`div`,{className:`text-sm text-muted-foreground flex-1 px-3 h-full flex items-center`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[`View state`,f&&(0,H.jsx)(lH,{kind:`view-state`})]}),(0,H.jsx)(`div`,{className:`text-xs text-light-gray-foreground flex items-center ml-auto gap-2 font-mono`,children:(0,H.jsxs)(`span`,{children:[u,` token`,u>1?`s`:``]})})]})]})},Zue=()=>(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 w-full flex-row overflow-hidden bg-light-gray`,children:[(0,H.jsx)(c$,{}),(0,H.jsx)(l$,{className:`border-l border-border`})]}),c$=()=>{let e=qO(),t=hO(e?.name??``);if(!e||!t?.response)return null;let{response:n}=t,r=JSON.stringify(n,null,2),i=eC(n);return(0,H.jsxs)(`section`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden`,children:[i>=5e3&&(0,H.jsx)(uH,{kind:`tool-output`,tokenCount:i}),(0,H.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-auto p-3`,children:[(0,H.jsx)(Sj,{value:r,label:`Copy tool output`,className:`absolute right-2 top-2 z-10`}),(0,H.jsx)(e$,{code:r})]})]})},l$=({className:e})=>{let t=qO(),n=hO(t?.name??``);if(!t||!n?.response)return null;let r=JSON.stringify(n.openaiObject?.widgetState??null,null,2),i=tC(n.openaiObject?.widgetState),a=i>=QS;return(0,H.jsxs)(`section`,{className:pj(`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden`,e),children:[a&&(0,H.jsx)(uH,{kind:`view-state`,tokenCount:i}),(0,H.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-auto p-3`,children:[(0,H.jsx)(Sj,{value:r,label:`Copy view state`,className:`absolute right-2 top-2 z-10`}),(0,H.jsx)(e$,{code:r})]})]})},Que=[{id:`output`,label:`Output`,icon:ei},{id:`state`,label:`State`,icon:Gr},{id:`logs`,label:`Logs`,icon:ci}],$ue=({onClose:e})=>{let[t,n]=(0,b.useState)(`output`);return(0,H.jsxs)(`aside`,{"aria-label":`DevTools inspector`,className:`absolute bottom-4 right-4 top-16 z-[60] flex w-96 max-w-[calc(100%-2rem)] flex-col overflow-hidden rounded-lg border border-border bg-background shadow-xl`,children:[(0,H.jsxs)(`div`,{className:`flex h-10 shrink-0 items-center border-b border-border px-2`,children:[(0,H.jsx)(`div`,{role:`tablist`,"aria-label":`Inspector panels`,className:`flex gap-1`,children:Que.map(({id:e,label:r,icon:i})=>(0,H.jsxs)(`button`,{id:`fullscreen-inspector-${e}-tab`,type:`button`,role:`tab`,"aria-controls":`fullscreen-inspector-${e}-panel`,"aria-selected":t===e,onClick:()=>n(e),className:pj(`inline-flex h-7 cursor-pointer items-center gap-1.5 rounded-md px-2 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,t===e?`bg-muted text-foreground`:`text-muted-foreground hover:bg-light-gray hover:text-foreground`),children:[(0,H.jsx)(i,{className:`size-3.5`}),r]},e))}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Close DevTools inspector`,onClick:e,className:`ml-auto inline-flex size-7 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-light-gray hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:(0,H.jsx)(Oi,{className:`size-3.5`})})]}),(0,H.jsx)(`div`,{id:`fullscreen-inspector-${t}-panel`,role:`tabpanel`,"aria-labelledby":`fullscreen-inspector-${t}-tab`,className:`min-h-0 flex-1 overflow-hidden bg-light-gray`,children:t===`output`?(0,H.jsx)(c$,{}):t===`state`?(0,H.jsx)(l$,{}):(0,H.jsx)(o$,{})})]})},u$=({text:e})=>(0,H.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,H.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e})}),d$=`devtools-tool-panel-view-logs`,f$=`view`,p$=`logs`,m$=`devtools-tool-panel-output-logs`,h$=`output`,g$=`devtools-tool-panel-header-output`,_$=`header-output`,v$=`header-view`,ede=()=>{let e=qO(),t=hO(e?.name??``),[n,r]=nH(`devtools-tool-panel-logs-open`,{defaultValue:!1}),[i,a]=nH(`devtools-tool-panel-header-expanded`,{defaultValue:!1}),[o,s]=nH(`devtools-tool-panel-fullscreen-inspector-open`,{defaultValue:!1}),{defaultLayout:c,onLayoutChanged:l}=Xo({id:d$,panelIds:[f$,p$],storage:localStorage}),{defaultLayout:u,onLayoutChanged:d}=Xo({id:g$,panelIds:[_$,v$],storage:localStorage}),{defaultLayout:f,onLayoutChanged:p}=Xo({id:m$,panelIds:[h$,p$],storage:localStorage}),m=hs(e=>e.displayMode),h=hs(e=>e.theme),g=hs(e=>e.setPreference),_=hs(e=>e.userAgent?.device?.type??`desktop`)===`mobile`,v=m===`fullscreen`,y=m===`modal`,x=v&&!_,S=v||y;eH(`esc`,e=>{e.defaultPrevented||S&&g(`displayMode`,`inline`)});let C=e?._meta?.ui?.resourceUri,w=!!(e&&t?.response),T=!!C;if(!e)return(0,H.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-col overflow-hidden preview-region transition-colors duration-150 ease-out`,"data-theme":h,children:(0,H.jsx)(u$,{text:`Choose a tool from the sidebar to begin`})});if(!w)return(0,H.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-col overflow-hidden preview-region transition-colors duration-150 ease-out`,"data-theme":h});if(!T){let n=t?.response,r=JSON.stringify(n??null,null,2),i=new TextEncoder().encode(r).length,a=eC(n),o=a>=ZS,s=n?.isError===!0,c=t?.durationMs;return(0,H.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-col overflow-hidden preview-region transition-colors duration-150 ease-out`,"data-theme":h,children:(0,H.jsxs)(qo,{orientation:`horizontal`,id:m$,className:`flex min-h-0 min-w-0 flex-1 overflow-hidden`,defaultLayout:f,onLayoutChanged:p,children:[(0,H.jsx)(es,{id:h$,minSize:320,className:`min-h-0 min-w-0`,children:(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,children:[(0,H.jsxs)(`div`,{className:`flex h-9 w-full shrink-0 items-center border-b-2 border-border bg-white px-3 text-sm text-muted-foreground`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[`Tool output`,o&&(0,H.jsx)(lH,{kind:`tool-output`})]}),(0,H.jsxs)(`div`,{className:`ml-auto flex items-center gap-2 font-mono text-xs text-light-gray-foreground`,children:[(0,H.jsx)(`span`,{className:s?`text-destructive`:`text-success`,children:s?`Error`:`OK`}),c==null?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{children:`·`}),(0,H.jsxs)(`span`,{children:[c,`ms`]})]}),(0,H.jsx)(`span`,{children:`·`}),(0,H.jsx)(`span`,{children:vj(i)})]})]}),(0,H.jsxs)(`section`,{className:`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-light-gray`,children:[o&&(0,H.jsx)(uH,{kind:`tool-output`,tokenCount:a}),(0,H.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-auto p-3`,children:[(0,H.jsx)(Sj,{value:r,label:`Copy tool output`,className:`absolute right-2 top-2 z-10`}),(0,H.jsx)(e$,{code:r})]})]})]})}),(0,H.jsx)(rs,{className:`w-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`}),(0,H.jsx)(es,{id:p$,defaultSize:360,minSize:240,maxSize:640,className:`min-h-0`,children:(0,H.jsx)(o$,{},e.name)})]})})}return(0,H.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-col overflow-hidden preview-region transition-colors duration-150 ease-out`,"data-theme":h,children:[(0,H.jsx)(s$,{expanded:i??!1,onToggle:()=>a(!i)}),(0,H.jsxs)(qo,{orientation:`vertical`,id:g$,className:`flex min-h-0 min-w-0 flex-1 overflow-hidden`,defaultLayout:u,onLayoutChanged:d,children:[i&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(es,{id:_$,defaultSize:200,minSize:80,maxSize:500,className:`min-h-0`,children:(0,H.jsx)(Zue,{})}),(0,H.jsx)(rs,{className:`h-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`})]}),(0,H.jsx)(es,{id:v$,minSize:200,className:`min-h-0 min-w-0`,children:(0,H.jsxs)(qo,{orientation:`horizontal`,id:d$,className:`flex h-full min-h-0 min-w-0 overflow-hidden`,defaultLayout:c,onLayoutChanged:l,children:[(0,H.jsx)(es,{id:f$,minSize:320,className:`min-h-0 min-w-0`,children:(0,H.jsxs)(`div`,{className:pj(`flex flex-col overflow-hidden`,S?`absolute inset-0 z-50 bg-background`:`relative h-full min-h-0`),children:[(0,H.jsx)(DB,{logsOpen:n??!1,onOpenLogs:()=>r(!0),fullscreenInspectorOpen:o??!1,onToggleFullscreenInspector:()=>s(!o)}),(0,H.jsxs)(`div`,{className:pj(`relative flex min-h-0 flex-1 items-center justify-center`,y?`overflow-hidden`:x?`overflow-hidden pt-3`:v?`overflow-y-auto pt-3`:`mx-3 overflow-y-auto py-3`),children:[(0,H.jsx)(b.Suspense,{fallback:(0,H.jsx)(u$,{text:`Loading view…`}),children:(0,H.jsx)(aV,{})}),y&&(0,H.jsx)(`button`,{type:`button`,"aria-label":`Close modal`,onClick:()=>g(`displayMode`,`inline`),className:`absolute right-4 top-4 z-10 inline-flex size-8 cursor-pointer items-center justify-center rounded-full border border-border bg-background text-light-gray-foreground shadow-md transition-colors hover:bg-light-gray hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:(0,H.jsx)(Oi,{className:`size-4`})})]}),v&&o&&(0,H.jsx)($ue,{onClose:()=>s(!1)})]})}),n&&!v&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(rs,{className:`w-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`}),(0,H.jsx)(es,{id:p$,defaultSize:360,minSize:240,maxSize:640,className:`min-h-0`,children:(0,H.jsx)(o$,{onClose:()=>r(!1)},e.name)})]})]})})]})]})},tde=Object.defineProperty,y$=(e,t)=>tde(e,`name`,{value:t,configurable:!0}),b$=`Collapsible`,[nde,x$]=pM(b$),[rde,S$]=nde(b$),ide=b.forwardRef(y$(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=nF({prop:r,defaultProp:i??!1,onChange:o,caller:b$});return(0,H.jsx)(rde,{scope:n,disabled:a,contentId:oN(),open:c,onOpenToggle:b.useCallback(()=>l(e=>!e),[l]),children:(0,H.jsx)(zj.div,{"data-state":w$(c),"data-disabled":a?``:void 0,...s,ref:t})})},`Collapsible`)),ade=`CollapsibleTrigger`,ode=b.forwardRef(y$(function(e,t){let{__scopeCollapsible:n,...r}=e,i=S$(ade,n);return(0,H.jsx)(zj.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":w$(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:aM(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),C$=`CollapsibleContent`,sde=b.forwardRef(y$(function(e,t){let{forceMount:n,...r}=e,i=S$(C$,e.__scopeCollapsible);return(0,H.jsx)(KP,{present:n||i.open,children:({present:e})=>(0,H.jsx)(cde,{...r,ref:t,present:e})})},`CollapsibleContent`)),cde=b.forwardRef(y$(function(e,t){let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=S$(C$,n),[s,c]=b.useState(r),l=b.useRef(null),u=Ii(t,l),d=b.useRef(0),f=d.current,p=b.useRef(0),m=p.current,h=o.open||s,g=b.useRef(h),_=b.useRef(void 0);return b.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),tM(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,H.jsx)(zj.div,{"data-state":w$(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})},`CollapsibleContentImpl`));function w$(e){return e?`open`:`closed`}y$(w$,`getState`);var lde=Object.defineProperty,T$=(e,t)=>lde(e,`name`,{value:t,configurable:!0}),E$=`Accordion`,ude=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[D$,dde,fde]=eL(E$),[O$,pde]=pM(E$,[fde,x$]),k$=x$(),mde=b.forwardRef(T$(function(e,t){let{type:n,...r}=e,i=r,a=r;return(0,H.jsx)(D$.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,H.jsx)(vde,{...a,ref:t}):(0,H.jsx)(_de,{...i,ref:t})})},`Accordion`)),[A$,hde]=O$(E$),[j$,gde]=O$(E$,{collapsible:!1}),_de=b.forwardRef(T$(function(e,t){let{value:n,defaultValue:r,onValueChange:i=T$(()=>{},`onValueChange`),collapsible:a=!1,...o}=e,[s,c]=nF({prop:n,defaultProp:r??``,onChange:i,caller:E$});return(0,H.jsx)(A$,{scope:e.__scopeAccordion,value:b.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:b.useCallback(()=>a&&c(``),[a,c]),children:(0,H.jsx)(j$,{scope:e.__scopeAccordion,collapsible:a,children:(0,H.jsx)(N$,{...o,ref:t})})})},`AccordionImplSingle`)),vde=b.forwardRef(T$(function(e,t){let{value:n,defaultValue:r,onValueChange:i=T$(()=>{},`onValueChange`),...a}=e,[o,s]=nF({prop:n,defaultProp:r??[],onChange:i,caller:E$}),c=b.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=b.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,H.jsx)(A$,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:l,children:(0,H.jsx)(j$,{scope:e.__scopeAccordion,collapsible:!0,children:(0,H.jsx)(N$,{...a,ref:t})})})},`AccordionImplMultiple`)),[yde,M$]=O$(E$),N$=b.forwardRef(T$(function(e,t){let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...o}=e,s=Ii(b.useRef(null),t),c=dde(n),l=uL(i)===`ltr`,u=aM(e.onKeyDown,e=>{if(!ude.includes(e.key))return;let t=e.target,n=c().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let o=r,s=i-1,u=T$(()=>{o=r+1,o>s&&(o=0)},`moveNext`),d=T$(()=>{o=r-1,o<0&&(o=s)},`movePrev`);switch(e.key){case`Home`:o=0;break;case`End`:o=s;break;case`ArrowRight`:a===`horizontal`&&(l?u():d());break;case`ArrowDown`:a===`vertical`&&u();break;case`ArrowLeft`:a===`horizontal`&&(l?d():u());break;case`ArrowUp`:a===`vertical`&&d();break}n[o%i].ref.current?.focus()});return(0,H.jsx)(yde,{scope:n,disabled:r,direction:i,orientation:a,children:(0,H.jsx)(D$.Slot,{scope:n,children:(0,H.jsx)(zj.div,{...o,"data-orientation":a,ref:s,onKeyDown:r?void 0:u})})})},`AccordionImpl`)),P$=`AccordionItem`,[bde,F$]=O$(P$),xde=b.forwardRef(T$(function(e,t){let{__scopeAccordion:n,value:r,...i}=e,a=M$(P$,n),o=hde(P$,n),s=k$(n),c=oN(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,H.jsx)(bde,{scope:n,open:l,disabled:u,triggerId:c,children:(0,H.jsx)(ide,{"data-orientation":a.orientation,"data-state":L$(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})},`AccordionItem`)),Sde=`AccordionHeader`,Cde=b.forwardRef(T$(function(e,t){let{__scopeAccordion:n,...r}=e,i=M$(E$,n),a=F$(Sde,n);return(0,H.jsx)(zj.h3,{"data-orientation":i.orientation,"data-state":L$(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})},`AccordionHeader`)),I$=`AccordionTrigger`,wde=b.forwardRef(T$(function(e,t){let{__scopeAccordion:n,...r}=e,i=M$(E$,n),a=F$(I$,n),o=gde(I$,n),s=k$(n);return(0,H.jsx)(D$.ItemSlot,{scope:n,children:(0,H.jsx)(ode,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})},`AccordionTrigger`)),Tde=`AccordionContent`,Ede=b.forwardRef(T$(function(e,t){let{__scopeAccordion:n,...r}=e,i=M$(E$,n),a=F$(Tde,n),o=k$(n);return(0,H.jsx)(sde,{role:`region`,"aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})},`AccordionContent`));function L$(e){return e?`open`:`closed`}T$(L$,`getState`);function Dde({...e}){return(0,H.jsx)(mde,{"data-slot":`accordion`,...e})}function Ode({className:e,...t}){return(0,H.jsx)(xde,{"data-slot":`accordion-item`,className:Mr(`border-b border-border-secondary`,e),...t})}function kde({className:e,children:t,...n}){return(0,H.jsx)(Ede,{"data-slot":`accordion-content`,className:`overflow-hidden data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...n,children:(0,H.jsx)(`div`,{className:Mr(`pb-4 type-text-sm text-muted-foreground`,e),children:t})})}var Ade=Object.defineProperty,R$=(e,t)=>Ade(e,`name`,{value:t,configurable:!0}),z$=!1;function B$(){let[e,t]=b.useState(z$);return b.useEffect(()=>{z$||(z$=!0,t(!0))},[]),e}R$(B$,`useIsHydrated`);var V$=b.useSyncExternalStore;function H$(){return()=>{}}R$(H$,`subscribe`);function U$(){return V$(H$,()=>!0,()=>!1)}R$(U$,`useIsHydratedModern`);var jde=typeof V$==`function`?U$:B$,Mde=Object.defineProperty,W$=(e,t)=>Mde(e,`name`,{value:t,configurable:!0}),G$=`rovingFocusGroup.onEntryFocus`,Nde={bubbles:!1,cancelable:!0},K$=`RovingFocusGroup`,[q$,J$,Pde]=eL(K$),[Fde,Y$]=pM(K$,[Pde]),[Ide,Lde]=Fde(K$),Rde=b.forwardRef(W$(function(e,t){return(0,H.jsx)(q$.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(q$.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(zde,{...e,ref:t})})})},`RovingFocusGroup`)),zde=b.forwardRef(W$(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=b.useRef(null),p=Ii(t,f),m=uL(a),[h,g]=nF({prop:o,defaultProp:s??null,onChange:c,caller:K$}),[_,v]=b.useState(!1),y=_M(l),x=J$(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(G$,y),()=>e.removeEventListener(G$,y)},[y]),(0,H.jsx)(Ide,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:b.useCallback(e=>g(e),[g]),onItemShiftTab:b.useCallback(()=>v(!0),[]),onFocusableItemAdd:b.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:b.useCallback(()=>w(e=>e-1),[]),children:(0,H.jsx)(zj.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:aM(e.onMouseDown,()=>{S.current=!0}),onFocus:aM(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(G$,Nde);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);Q$([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:aM(e.onBlur,()=>v(!1))})})},`RovingFocusGroupImpl`)),Bde=`RovingFocusGroupItem`,Vde=b.forwardRef(W$(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=oN(),l=a||c,u=Lde(Bde,n),d=u.currentTabStopId===l,f=J$(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=jde();return tM(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),b.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,H.jsx)(q$.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,H.jsx)(zj.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:aM(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:aM(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:aM(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Z$(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?$$(n,r+1):n.slice(r+1)}setTimeout(()=>Q$(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),Hde={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function X$(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}W$(X$,`getDirectionAwareKey`);function Z$(e,t,n){let r=X$(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Hde[r]}W$(Z$,`getFocusIntent`);function Q$(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}W$(Q$,`focusFirst`);function $$(e,t){return e.map((n,r)=>e[(t+r)%e.length])}W$($$,`wrapArray`);var Ude=Object.defineProperty,e1=(e,t)=>Ude(e,`name`,{value:t,configurable:!0}),t1=`Tabs`,[Wde,Gde]=pM(t1,[Y$]);Y$();var[Kde,qde]=Wde(t1),Jde=b.forwardRef(e1(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=uL(s),[d,f]=nF({prop:r,onChange:i,defaultProp:a??``,caller:t1});return(0,H.jsx)(Kde,{scope:n,baseId:oN(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,H.jsx)(zj.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),Yde=`TabsContent`,Xde=b.forwardRef(e1(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=qde(Yde,n),c=n1(s.baseId,r),l=r1(s.baseId,r),u=r===s.value,d=b.useRef(u);return b.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,H.jsx)(KP,{present:i||u,children:({present:n})=>(0,H.jsx)(zj.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function n1(e,t){return`${e}-trigger-${t}`}e1(n1,`makeTriggerId`);function r1(e,t){return`${e}-content-${t}`}e1(r1,`makeContentId`);function Zde({className:e,orientation:t=`horizontal`,...n}){return(0,H.jsx)(Jde,{"data-slot":`tabs`,"data-orientation":t,orientation:t,className:Mr(`group/tabs flex gap-4`,`data-[orientation=horizontal]:flex-col`,`data-[orientation=vertical]:flex-row`,e),...n})}(0,b.createContext)(`default`);function i1({className:e,...t}){return(0,H.jsx)(Xde,{"data-slot":`tabs-content`,className:Mr(`flex-1 outline-none`,e),...t})}(0,b.createContext)({orientation:`horizontal`,variant:`line`});function a1(e){return typeof e!=`object`||!e||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 Qde(e){return e.additionalItems===!0&&console.warn(`additionalItems=true is currently not supported`),a1(e.additionalItems)}function o1(e){if(e===``)return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;let t=Number(e);return typeof t==`number`&&!Number.isNaN(t)?t:e}var s1=Symbol(`__additional_property`),$de=`additionalProperties`,c1=`allOf`,l1=`anyOf`,u1=`const`,d1=`default`,f1=`__errors`,p1=`items`,efe=`_$junk_option_schema_id$_`,m1=`$name`,h1=`oneOf`,g1=`properties`,_1=`readonly`,tfe=`required`,v1=`submitButtonOptions`,y1=`$ref`,b1=Symbol(`__rjsf_ref`),x1=Symbol(`__rjsf_ref_cycle`),S1=`root`,nfe=[`discriminator`,`propertyName`],rfe=`formContext`,ife=`layoutGridLookupMap`,C1=`__rjsf`,w1=`${C1}_additionalProperties`,T1=`${C1}_rootSchema`,E1=`ui:options`,D1=`ui:globalOptions`;function O1(e={},t={}){return e?Object.keys(e).filter(e=>e.startsWith(`ui:`)).reduce((t,n)=>{let r=e[n];return n===`ui:widget`&&a1(r)?(console.error(`Setting options via ui:widget object is no longer supported, use ui:options instead`),t):n===`ui:options`&&a1(r)?{...t,...r}:{...t,[n.substring(3)]:r}},{...t}):{...t}}function k1(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;let{expandable:r=!0}=O1(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function A1(e){let t={[f1]:[],addError(e){this[f1].push(e)}};if(Array.isArray(e))return e.reduce((e,t,n)=>({...e,[n]:A1(t)}),t);if(IT(e)){let n=e;return Object.keys(n).reduce((e,t)=>({...e,[t]:A1(n[t])}),t)}return t}var{getOwnPropertyNames:afe,getOwnPropertySymbols:ofe}=Object,{hasOwnProperty:sfe}=Object.prototype;function j1(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function M1(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function N1(e){return afe(e).concat(ofe(e))}var cfe=Object.hasOwn||((e,t)=>sfe.call(e,t)),lfe=`__v`,ufe=`__o`,dfe=`_owner`,{getOwnPropertyDescriptor:P1,keys:F1}=Object,I1=Object.is||function(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t};function ffe(e,t){return e===t}function pfe(e,t){return e.byteLength===t.byteLength&&B1(new Uint8Array(e),new Uint8Array(t))}function mfe(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-->0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function hfe(e,t){return e.byteLength===t.byteLength&&B1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function gfe(e,t){return I1(e.getTime(),t.getTime())}function _fe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function L1(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}function vfe(e,t,n){let r=F1(e),i=r.length;if(F1(t).length!==i)return!1;for(;i-->0;)if(!V1(e,t,n,r[i]))return!1;return!0}function R1(e,t,n){let r=N1(e),i=r.length;if(N1(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!V1(e,t,n,a)||(o=P1(e,a),s=P1(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function yfe(e,t){return I1(e.valueOf(),t.valueOf())}function bfe(e,t){return e.source===t.source&&e.flags===t.flags}function z1(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function B1(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-->0;)if(e[n]!==t[n])return!1;return!0}function xfe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function V1(e,t,n,r){return(r===dfe||r===ufe||r===lfe)&&(e.$$typeof||t.$$typeof)?!0:cfe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var Sfe=Object.prototype.toString;function Cfe(e){let t=Dfe(e),{areArraysEqual:n,areDatesEqual:r,areFunctionsEqual:i,areMapsEqual:a,areNumbersEqual:o,areObjectsEqual:s,areRegExpsEqual:c,areSetsEqual:l,getUnsupportedCustomComparator:u}=e;return function(e,d,f){if(e===d)return!0;if(e==null||d==null)return!1;let p=typeof e;if(p!==typeof d)return!1;if(p!==`object`)return p===`number`||p===`bigint`?o(e,d,f):p===`function`&&i(e,d,f);let m=e.constructor;if(m!==d.constructor)return!1;if(m===Object)return s(e,d,f);if(m===Array)return n(e,d,f);if(m===Date)return r(e,d,f);if(m===RegExp)return c(e,d,f);if(m===Map)return a(e,d,f);if(m===Set)return l(e,d,f);if(m===Promise)return!1;if(Array.isArray(e))return n(e,d,f);let h=Sfe.call(e),g=t[h];if(g)return g(e,d,f);let _=u&&u(e,d,f,h);return _?_(e,d,f):!1}}function wfe({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:pfe,areArraysEqual:n?R1:mfe,areDataViewsEqual:hfe,areDatesEqual:gfe,areErrorsEqual:_fe,areFunctionsEqual:ffe,areMapsEqual:n?j1(L1,R1):L1,areNumbersEqual:I1,areObjectsEqual:n?R1:vfe,arePrimitiveWrappersEqual:yfe,areRegExpsEqual:bfe,areSetsEqual:n?j1(z1,R1):z1,areTypedArraysEqual:n?j1(B1,R1):B1,areUrlsEqual:xfe,getUnsupportedCustomComparator:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=M1(r.areArraysEqual),t=M1(r.areMapsEqual),n=M1(r.areObjectsEqual),i=M1(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function Tfe(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function Efe({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}function Dfe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p}){return{"[object Arguments]":c,"[object Array]":t,"[object ArrayBuffer]":e,"[object AsyncGeneratorFunction]":a,"[object BigInt]":s,"[object BigInt64Array]":f,"[object BigUint64Array]":f,"[object Boolean]":l,"[object DataView]":n,"[object Date]":r,"[object Error]":i,"[object Float16Array]":f,"[object Float32Array]":f,"[object Float64Array]":f,"[object Function]":a,"[object GeneratorFunction]":a,"[object Int8Array]":f,"[object Int16Array]":f,"[object Int32Array]":f,"[object Map]":o,"[object Number]":l,"[object Object]":(e,t,n)=>typeof e.then!=`function`&&typeof t.then!=`function`&&c(e,t,n),"[object RegExp]":u,"[object Set]":d,"[object String]":l,"[object URL]":p,"[object Uint8Array]":f,"[object Uint8ClampedArray]":f,"[object Uint16Array]":f,"[object Uint32Array]":f}}H1(),H1({strict:!0}),H1({circular:!0}),H1({circular:!0,strict:!0}),H1({createInternalComparator:()=>I1}),H1({strict:!0,createInternalComparator:()=>I1}),H1({circular:!0,createInternalComparator:()=>I1}),H1({circular:!0,createInternalComparator:()=>I1,strict:!0});function H1(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=Cfe(wfe(e));return Efe({circular:t,comparator:a,createState:r,equals:n?n(a):Tfe(a),strict:i})}var U1=H1({circular:!0,createCustomConfig:()=>({areFunctionsEqual(e,t){return typeof t==`function`}})}),W1=s(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=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),i=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu),s=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/?]$/iu);function c(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var l=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function u(e){return e.length=0,!0}function d(e,t,n){if(e.length){let r=c(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function f(e){let t=0,n={error:!1,address:``,zone:``},r=[],i=[],a=!1,o=!1,s=d;for(let c=0;c<e.length;c++){let l=e[c];if(!(l===`[`||l===`]`))if(l===`:`){if(a===!0&&(o=!0),!s(i,r,n))break;if(++t>7){n.error=!0;break}c>0&&e[c-1]===`:`&&(a=!0),r.push(`:`);continue}else if(l===`%`){if(!s(i,r,n))break;s=u}else{i.push(l);continue}}return i.length&&(s===u?n.zone=i.join(``):o?r.push(i.join(``)):r.push(c(i))),n.address=r.join(``),n}function p(e){if(m(e,`:`)<2)return{host:e,isIPV6:!1};let t=f(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+=`%`+t.zone,n+=`%25`+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}function m(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function h(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}else{n.push(t);break}}else if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}else if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}else n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}var g={"@":`%40`,"/":`%2F`,"?":`%3F`,"#":`%23`,":":`%3A`},_=/[@/?#:]/g,v=/[@/?#]/g;function y(e,t){let n=t?v:_;return n.lastIndex=0,e.replace(n,e=>g[e])}function b(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r<e.length;r++){if(e[r]===`%`&&r+2<e.length){let o=e.slice(r+1,r+3);if(i(o)){let e=o.toUpperCase(),i=String.fromCharCode(parseInt(e,16));t&&a(i)?n+=i:n+=`%`+e,r+=2;continue}}n+=e[r]}return n}var x=Array(256);{let e=`0123456789ABCDEF`;for(let t=0;t<256;t++)x[t]=`%`+e[t>>4]+e[t&15]}function S(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function C(e){return e<2048?x[192|e>>6]+x[128|e&63]:e<65536?x[224|e>>12]+x[128|e>>6&63]+x[128|e&63]:x[240|e>>18]+x[128|e>>12&63]+x[128|e>>6&63]+x[128|e&63]}function w(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));i!==`.`&&a(i)?t+=i:t+=`%`+e,n+=2;continue}}if(o(r))t+=r;else{let i=e.charCodeAt(n);if(i<128)t+=S(i)?r:x[i];else if(i<55296||i>57343)t+=C(i);else if(i<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=C(65536+(i-55296<<10)+(r-56320)),n++):t+=C(65533)}else t+=C(65533)}}return t}function T(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));a(i)?t+=i:t+=`%`+e,n+=2;continue}}if(s(r))t+=r;else{let i=e.charCodeAt(n);if(i<128)t+=S(i)?r:x[i];else if(i<55296||i>57343)t+=C(i);else if(i<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=C(65536+(i-55296<<10)+(r-56320)),n++):t+=C(65533)}else t+=C(65533)}}return t}function E(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){t+=`%`+r.toUpperCase(),n+=2;continue}}let a=e.charCodeAt(n);if(a<128)t+=S(a)?r:x[a];else if(a<55296||a>57343)t+=C(a);else if(a<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=C(65536+(a-55296<<10)+(r-56320)),n++):t+=C(65533)}else t+=C(65533)}return t}function D(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push(`@`)),e.host!==void 0){let n=unescape(e.host);if(!r(n)){let e=p(n);n=e.isIPV6===!0?`[${e.escapedHost}]`:y(n,!1)}t.push(n)}return(typeof e.port==`number`||typeof e.port==`string`)&&(t.push(`:`),t.push(String(e.port))),t.length?t.join(``):void 0}t.exports={nonSimpleDomain:l,recomposeAuthority:D,reescapeHostDelimiters:y,normalizePercentEncoding:b,normalizePathEncoding:w,normalizeQueryFragmentEncoding:T,escapePreservingEscapes:E,removeDotSegments:h,isIPv4:r,isUUID:n,normalizeIPv6:p,stringArrayToHexStripped:c}})),Ofe=s(((e,t)=>{var{isUUID:n}=W1(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split(`?`);e.path=t&&t!==`/`?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),kfe=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,normalizeQueryFragmentEncoding:s,escapePreservingEscapes:c,reescapeHostDelimiters:l,isIPv4:u,nonSimpleDomain:d}=W1(),{SCHEMES:f,getSchemeHandler:p}=Ofe();function m(e,t){return typeof e==`string`?e=w(e,t):typeof e==`object`&&(e=C(v(e,t),t)),e}function h(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=g(C(e,r),C(t,r),r,!0);return r.skipEscape=!0,v(i,r)}function g(e,t,n,i){let a={};return i||(e=C(v(e,n),n),t=C(v(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path=`/`+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:a.path=t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,t.query===void 0?a.query=e.query:a.query=t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function _(e,t,n){let r=E(e,n),i=E(t,n);return r!==void 0&&i!==void 0&&r.toLowerCase()===i.toLowerCase()}function v(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},o=Object.assign({},t),s=[],l=p(o.scheme||n.scheme);l&&l.serialize&&l.serialize(n,o),n.path!==void 0&&(o.skipEscape?n.path=a(n.path):(n.path=c(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),o.reference!==`suffix`&&n.scheme&&s.push(n.scheme,`:`);let u=i(n);if(u!==void 0&&(o.reference!==`suffix`&&s.push(`//`),s.push(u),n.path&&n.path[0]!==`/`&&s.push(`/`)),n.path!==void 0){let e=n.path;!o.absolutePath&&(!l||!l.absolutePath)&&(e=r(e)),u===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),s.push(e)}return n.query!==void 0&&s.push(`?`,n.query),n.fragment!==void 0&&s.push(`#`,n.fragment),s.join(``)}var y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,b=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;function x(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function S(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1,c=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let f=e.match(b);f!==null&&f[1].indexOf(`\\`)!==-1&&(i.error=`URI authority must not contain a literal backslash.`,a=!0);let m=e.match(y);if(m){i.scheme=m[1]===void 0?void 0:m[1].toLowerCase(),i.userinfo=m[3],i.host=m[4],i.port=parseInt(m[5],10),i.path=m[6]||``,i.query=m[7],i.fragment=m[8],isNaN(i.port)&&(i.port=m[5]);let t=x(i,m);if(t!==void 0&&(i.error=i.error||t,a=!0),i.host)if(u(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),c=e.isIPV6}else c=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference=`same-document`:i.scheme===void 0?i.reference=`relative`:i.fragment===void 0?i.reference=`absolute`:i.reference=`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let f=p(r.scheme||i.scheme);if(!r.unicodeSupport&&(!f||!f.unicodeSupport)&&i.host&&(r.domainHost||f&&f.domainHost)&&c===!1&&d(i.host))try{i.host=new URL(`http://`+i.host).hostname}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}(!f||f&&!f.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=l(unescape(i.host),c))),i.path&&=o(i.path),i.query&&=s(i.query),i.fragment&&=s(i.fragment)),f&&f.parse&&f.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:a}}function C(e,t){return S(e,t).parsed}function w(e,t){return T(e,t).normalized}function T(e,t){let{parsed:n,malformedAuthorityOrPort:r}=S(e,t);return{normalized:r?e:v(n,t),malformedAuthorityOrPort:r}}function E(e,t){if(typeof e==`string`){let{normalized:n,malformedAuthorityOrPort:r}=T(e,t);return r?void 0:n}if(typeof e==`object`)return v(e,t)}var D={SCHEMES:f,normalize:m,resolve:h,resolveComponent:g,equal:_,serialize:v,parse:C};t.exports=D,t.exports.default=D,t.exports.fastUri=D})),Afe=s((e=>{var t=/~/,n=/~[01]/g;function r(e){switch(e){case`~1`:return`/`;case`~0`:return`~`}throw Error(`Invalid tilde escape: `+e)}function i(e){return t.test(e)?e.replace(n,r):e}function a(e){if(typeof e==`string`){if(e=e.split(`/`),e[0]===``)return e;throw Error(`Invalid JSON pointer.`)}else if(Array.isArray(e)){for(let t of e)if(typeof t!=`string`&&typeof t!=`number`)throw Error(`Invalid JSON pointer. Must be of type string or number.`);return e}throw Error(`Invalid JSON pointer.`)}function o(e,t){if(typeof e!=`object`)throw Error(`Invalid input object.`);t=a(t);var n=t.length;if(n===1)return e;for(var r=1;r<n;){if(e=e[i(t[r++])],n===r)return e;if(typeof e!=`object`||!e)return}}e.get=o})),G1=u(kfe(),1),K1=u(Afe(),1);function q1(e,t){if(`$id`in e&&G1.default.equal(e.$id,t))return e;for(let n of Object.values(e))if(Array.isArray(n)){for(let e of n)if(LC(e)){let n=q1(e,t);if(n!==void 0)return n}}else if(LC(n)){let e=q1(n,t);if(e!==void 0)return e}}function J1(e,t){let n=Y(e,`$id`,t),r=e;`$ref`in r&&(r={...r,[y1]:G1.default.resolve(n,r[y1])});for(let[e,t]of Object.entries(r))Array.isArray(t)?r={...r,[e]:t.map(e=>LC(e)?J1(e,n):e)}:LC(t)&&(r={...r,[e]:J1(t,n)});return r}function Y1(e,t){let n=t[e];return[WD(t,[e]),n]}function X1(e,t={},n=[],r=Y(t,[`$id`])){let i=e||``,a,o=r;if(i.startsWith(`#`)){let e=decodeURIComponent(i.substring(1));o===void 0||`$id`in t&&t.$id===o?a=K1.get(t,e):t.$schema===`https://json-schema.org/draft/2020-12/schema`&&(a=q1(t,o.replace(/\/$/,``)),a!==void 0&&(a=K1.get(a,e)))}else if(t.$schema===`https://json-schema.org/draft/2020-12/schema`){let[e,...n]=(o?G1.default.resolve(o,i):i).replace(/#\/?$/,``).split(`#`);a=q1(t,e.replace(/\/$/,``)),a!==void 0&&(o=a.$id,jD(n)||(a=K1.get(a,decodeURIComponent(n.join(`#`)))))}if(a===void 0)throw Error(`Could not find a definition for ${e}.`);let s=a[y1];if(s){if(n.includes(s)){if(n.length===1)throw Error(`Definition for ${e} is a circular reference`);let[t,...r]=n,a=[...r,i,t].join(` -> `);throw Error(`Definition for ${t} contains a circular reference through ${a}`)}let[r,c]=Y1(y1,a),l=X1(c,t,[...n,i],o);return Object.keys(r).length>0?t.$schema===`https://json-schema.org/draft/2019-09/schema`||t.$schema===`https://json-schema.org/draft/2020-12/schema`?{[c1]:[r,l]}:{...r,...l}:l}return a}function Z1(e,t={},n=Y(t,[`$id`])){return X1(e,t,[],n)}function Q1(e){let t,n=Y(e,nfe);return vD(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function $1(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:e==null?`null`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?`number`:typeof e==`object`?`object`:`string`}function e0(e){let{type:t}=e;return!t&&e.const?$1(e.const):!t&&e.enum?`string`:!t&&(e.properties||e.additionalProperties||e.patternProperties)?`object`:(Array.isArray(t)&&(t=t.length===2&&t.includes(`null`)?t.find(e=>e!==`null`):t[0]),t)}function t0(e,t){let n={...e},r=Object.keys(t).reduce((n,r)=>{let i=e?e[r]:{},a=t[r];return e&&r in e&&a1(a)?n[r]=t0(i,a):e&&t&&(e0(e)===`object`||e0(t)===`object`)&&r===`required`&&Array.isArray(i)&&Array.isArray(a)?n[r]=lO(i,a):n[r]=a,n},n);for(let e of Object.getOwnPropertySymbols(t))r[e]=t[e];return r}function n0(e,t,n){if(e&&n){let r=Y(e,n);if(r===void 0)return;for(let e=0;e<t.length;e+=1){let i=t[e],a=Y(i,[g1,n],{});if(a.type!==`object`&&a.type!==`array`&&(a.const===r||a.enum?.includes(r)))return e}}}function r0(e,t,n,r,i){if(t===void 0)return 0;let a=n0(t,n,i);if(PD(a))return a;for(let a=0;a<n.length;a+=1){let o=n[a];if(i&&gD(o,[`properties`,i])){let n=Y(t,i),s=Y(o,[g1,i],{});if(e.isValid(s,n,r))return a}else if(o.properties){let n={anyOf:Object.keys(o[g1]).map(e=>({required:[e]}))},i;if(o.anyOf){let{...e}=o;e.allOf?e.allOf=e.allOf.slice():e.allOf=[],e.allOf.push(n),i=e}else i={...o,...n};if(delete i.required,e.isValid(i,t,r))return a}else if(e.isValid(o,t,r))return a}return 0}var jfe=Object.prototype;function i0(e){for(let t in e)if(jfe.hasOwnProperty.call(e,t))return!1;return!0}var a0=[`$defs`,`definitions`,`properties`,`patternProperties`,`dependencies`];new Set(a0);var o0=[`items`,`allOf`,`oneOf`,`anyOf`];new Set(o0);var s0=[`items`,`additionalItems`,`additionalProperties`,`propertyNames`,`contains`,`if`,`then`,`else`,`not`];new Set(s0),[...a0,...o0,...s0];function c0(e){return typeof e==`object`}function l0(e){return c0(e)?i0(e):e===!0}function u0(e,t){return e<t?-1:+(e>t)}function d0(e,t){let n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){let i=e;e=t,t=i,r=n}let i=new Set(e);for(let e=0;e<r;e++)i.add(t[e]);return Array.from(i)}function Mfe(e,t){let n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){let n=e;e=t,t=n}let r=new Set(t);for(let t=0;t<e.length&&r.size>0;t++){let i=e[t];r.delete(i)&&n.push(i)}return n}function f0(e){return e.length===0}function p0(e){return(t,n)=>{let r=t.length-n.length;if(r!==0)return r;for(let r=0;r<t.length;r++)if(t[r]!==n[r]){let i=e(t[r],n[r]);if(i!==0)return i}return 0}}function m0(e,{threshold:t=12}={}){return n=>{let r=n.length;if(r===0)return n;if(r<=t){let t=[],i=0;outer:for(let a=0;a<r;a++){let r=n[a];for(let n=0;n<i;n++)if(e(r,t[n])===0)continue outer;i=t.push(r)}return t}let i=n.slice().sort(e),a=0;for(let t=1;t<r;t++)e(i[a],i[t])!==0&&++a!==t&&(i[a]=i[t]);return i.length=a+1,i}}function Nfe(e){return(t,n)=>{let r=[],i=t.length,a=n.length;if(i===0||a===0)return r;if(i>a){let e=t;t=n,n=e;let r=i;i=a,a=r}let o=[...t].sort(e),s=[...n].sort(e),c=0,l=0;for(;c<i&&l<a;){let t=e(o[c],s[l]);t===0?((r.length===0||e(r[r.length-1],o[c])!==0)&&r.push(o[c]),c++,l++):t<0?c++:l++}return r}}function Pfe(e,t){return n=>{if(e.has(n))return e.get(n);let r=t(n);return e.set(n,r),r}}var h0=Pfe,g0=()=>0,Ffe=e=>e===void 0,Ife=e=>typeof e!=`object`,_0={boolean:0,number:1,string:2};function Lfe(e,t){let n=typeof e,r=typeof t;return n===r?u0(e,t):_0[n]-_0[r]}function Rfe(e,t){let n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(r>n){let n=e;e=t,t=n}let i=new Set(e),a=t.length;for(let n=0;n<a;n++){let r=t[n];i.has(r)||e.push(r)}return e}function v0(e,t,n=g0){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function y0(e){return v0(Ffe,e)}function b0(e,t){return v0(t=>t===void 0||e(t),t)}function x0(e,t){return v0(Array.isArray,e,t)}var S0=y0(u0),C0=b0(e=>e===0,(e,t)=>e-t);function zfe({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){let n=h0(t,e=>Object.keys(e).sort());function r(e){return(t,r)=>{let i=n(t),a=n(r),o=Math.min(i.length,a.length);for(let e=0;e<o;e++){let t=u0(i[e],a[e]);if(t!==0)return t}if(i.length!==a.length)return i.length-a.length;for(let n=0;n<o;n++){let a=i[n],o=e(t[a],r[a]);if(o!==0)return o}return 0}}function i(t){let n=p0(t),r=h0(e,m0(t,{threshold:0}));return(e,t)=>n(r(e),r(t))}let a=i(u0);function o(e,t){if(c0(e)){if(c0(t)){let n=Rfe(Object.keys(e),Object.keys(t)),r=n.length;for(let i=0;i<r;i++){let r=n[i];if(e[r]===t[r])continue;let a=(m[r]??s)(e[r],t[r]);if(a!==0)return a}return 0}return t===!0&&i0(e)?0:1}return c0(t)?e===!0&&i0(t)?0:-1:u0(e,t)}let s=y0(l),c=v0(Ife,x0(r(s),p0(l)),Lfe);function l(e,t){return e===null?-1:t===null?1:c(e,t)}let u=y0(o),d=b0(i0,r(u)),f=y0(i(o)),p=b0(l0,o),m={$id:S0,$comment:S0,$defs:d,$ref:S0,$schema:S0,const:s,contains:u,contentEncoding:S0,contentMediaType:S0,default:s,definitions:d,description:S0,else:u,examples:s,exclusiveMaximum:S0,exclusiveMinimum:S0,format:S0,if:u,maximum:S0,maxItems:S0,maxLength:S0,maxProperties:S0,minimum:S0,multipleOf:S0,not:u,pattern:S0,propertyNames:u,readOnly:S0,then:u,title:S0,writeOnly:S0,uniqueItems:b0(e=>e===!1,g0),minLength:C0,minItems:C0,minProperties:C0,required:b0(f0,a),enum:b0(f0,i(l)),type:y0((e,t)=>{let n=Array.isArray(e),r=Array.isArray(t);return!n&&!r?u0(e,t):a(n?e:[e],r?t:[t])}),items:b0(e=>!Array.isArray(e)&&l0(e),x0(o,p0(o))),anyOf:f,allOf:f,oneOf:f,properties:d,patternProperties:d,additionalProperties:p,additionalItems:p,dependencies:b0(i0,r(y0(x0(o,a))))};return{compareSchemaValues:l,compareSchemaDefinitions:o}}function w0(e){return e}var T0=(e,t)=>e?T0(t%e,e):t,Bfe=(e,t)=>Math.abs(e*t)/T0(e,t);function Vfe(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function E0(e,t,n){let r=e.length,i=t.length;if(r>0&&i>0)for(let a=0;a<r;a++){let r=e[a];for(let e=0;e<i;e++)n(r,t[e])}}function D0(e,t){return e||t}function O0(e){return(t,n)=>{let r={...t},i=Object.keys(n),a=i.length;for(let o=0;o<a;o++){let a=i[o];r[a]=t[a]===void 0?n[a]:e(t[a],n[a])}return r}}function Hfe(e){let t=new Map;for(let n of e)for(let e of n[0])t.set(e,n[1]);return t}function k0(e,t,n){n===void 0||l0(n)?delete e[t]:e[t]=n}var Ufe=[`properties`,`patternProperties`,`additionalProperties`];function A0(e){let t=Object.keys(e),n=t.length,r=[];for(let i=0;i<n;i++){let n=t[i];r.push({regExp:new RegExp(n),schema:e[n]})}return[r,t]}var j0=[[],[]];function M0(e,t,n){let r=n.length;for(let i=0;i<r;i++){let r=n[i];if(!r.regExp.test(t))continue;let a=r.schema;if(a===!1)return!0;e.push(a)}return!1}var Wfe=[`items`,`additionalItems`],Gfe=[`if`,`then`,`else`];function N0(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 P0(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 F0(e,t,n){return[e,t,n]}function Kfe(e){let t=new Map;for(let[n,r,i]of e){let e=e=>{if(!i(e))throw Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(e[n])}, ${r}: ${JSON.stringify(e[r])})`)};for(let i of[[n,r],[r,n]]){let n=t.get(i[0]);n===void 0&&(n=[],t.set(i[0],n)),n.push({oppositeKey:i[1],check:e})}}return t}var qfe=[F0(`minimum`,`maximum`,e=>e.maximum>=e.minimum),F0(`exclusiveMinimum`,`maximum`,e=>e.maximum>e.exclusiveMinimum),F0(`minimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.minimum),F0(`exclusiveMinimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.exclusiveMinimum),F0(`minLength`,`maxLength`,e=>e.maxLength>=e.minLength),F0(`minItems`,`maxItems`,e=>e.maxItems>=e.minItems),F0(`minProperties`,`maxProperties`,e=>e.maxProperties>=e.minProperties)];function Jfe({mergePatterns:e=Vfe,isSubRegExp:t=Object.is,intersectJson:n=Mfe,deduplicateJsonSchemaDef:r=w0,defaultMerger:i=w0,assigners:a=[],checks:o=qfe,mergers:s}={}){function c(e){let t=e.length,n=e[0];for(let r=1;r<t;r++){let t=_(n,e[r]);if(t===!1)return!1;l0(t)||(n=t)}return n}function l(e,t,n,r,i,a,o){if(e.length=0,n===!1)return!1;if(e.push(n),i!==void 0){if(i===!1)return!1;e.push(i)}if(M0(e,t,a))return!1;let s=e.length<2;if(o===!1){if(s)return;if(M0(e,t,r))return!1}else s&&o!==void 0&&e.push(o);return e.length===1?e[0]:c(e)}function u(e,t,n,r,i,a){let o=n.length;if(o>0&&i!==!1)if(a)Object.assign(e,t);else for(let a=0;a<o;a++){let o=n[a];r.has(o)||(e[o]=_(t[o],i))}return e}let d=(n,{properties:r={},patternProperties:i,additionalProperties:a=!0},{properties:o={},patternProperties:s,additionalProperties:c=!0})=>{let d=l0(a),f=l0(c);if(d&&f)return k0(n,`properties`,v(r,o)),k0(n,`patternProperties`,i&&s?v(i,s):i??s),delete n.additionalProperties,n;k0(n,`additionalProperties`,_(a,c));let p={},m=Object.keys(r),h=m.length,[g,y]=i?A0(i):j0,[b,x]=s?A0(s):j0,S=[],C=new Set,w=f?void 0:c;for(let e=0;e<h;e++){let t=m[e];C.add(t);let n=l(S,t,r[t],g,o[t],b,w);n!==void 0&&(p[t]=n)}let T=Object.keys(o),E=T.length,D=d?void 0:a;for(let e=0;e<E;e++){let t=T[e];if(C.has(t))continue;let n=l(S,t,o[t],b,void 0,g,D);n!==void 0&&(p[t]=n)}k0(n,`properties`,p);let O={},k=new Set;return y.length>0&&x.length>0&&E0(y,x,(n,r)=>{t(n,r)&&k.add(n),t(r,n)&&k.add(r),O[e(n,r)]=_(i[n],s[r])}),O=u(O,i,y,k,c,f),O=u(O,s,x,k,a,d),k0(n,`patternProperties`,O),n},f=(e,{items:t=[],additionalItems:n},{items:r=[],additionalItems:i})=>{let a=Array.isArray(t),o=Array.isArray(r),s=[];if(e.items=s,a&&o){let[a,o,c]=t.length<r.length?[t.length,n,r]:[r.length,i,t],l=0;for(;l<a;l++)s.push(_(t[l],r[l]));if(o===!1)e.additionalItems=!1;else{let t=o===void 0||l0(o);for(;l<c.length;l++)s.push(t?c[l]:_(c[l],o));k0(e,`additionalItems`,n!==void 0&&i!==void 0?_(n,i):n??i)}}else if(a||o){let[o,c,l]=a?[t,r,n]:[r,t,i];k0(e,`additionalItems`,l&&_(l,c));for(let e=0;e<o.length;e++)s.push(_(o[e],c))}else delete e.additionalItems,e.items=_(t,r);return e},p=(e,t,n)=>{N0(e,t);let r=N0({},n);return e.allOf===void 0?e.allOf=[r]:e.allOf=e.allOf.concat(r),e};function m(e,t){let n=[];if(E0(e,t,(e,t)=>{try{n.push(_(e,t))}catch{}}),n.length===0)throw Error(`No valid schema combinations could be produced for "${JSON.stringify(e)}" and "${JSON.stringify(t)}"; the merged result is empty`);return r(n)}let h=Hfe([[Ufe,d],[Wfe,f],[Gfe,p],...a]),g=Kfe(o);function _(e,t){if(e===!1||t===!1)return!1;if(l0(e))return l0(t)?!0:t;if(l0(t))return e;let n={...e},r=new Set,a=new Set,o=Object.keys(t),s=o.length;for(let c=0;c<s;c++){let s=o[c],l=t[s];if(l===void 0)continue;let u=g.get(s);if(u!==void 0){let t=u.length;for(let n=0;n<t;n++){let t=u[n];e[t.oppositeKey]!==void 0&&a.add(t.check)}}let d=e[s];if(d===void 0){n[s]=l;continue}let f=h.get(s);if(f){r.add(f);continue}let p=y[s]??i;n[s]=p(d,l)}for(let i of r)n=i(n,e,t);for(let e of a)e(n);return n}let v=O0(_),y={$id:i,$ref:i,$schema:i,$comment:i,$defs:v,definitions:v,type:(e,t)=>{if(e===t)return e;let n=Array.isArray(e),r=Array.isArray(t);if(!n&&!r){let n=P0(e,t);if(n!==void 0)return n}else if(n||r){let i=new Set;if(n&&r)E0(e,t,(e,t)=>{let n=P0(e,t);n!==void 0&&i.add(n)});else{let r=n?e:t,a=n?t:e,o=r.length;for(let e=0;e<o;e++){let t=P0(a,r[e]);t!==void 0&&i.add(t)}}let a=i.size;if(a===1)return i.values().next().value;if(a>1)return Array.from(i)}throw Error(`It is not possible to create an intersection of the following incompatible types: ${e.toString()}, ${t.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(e,t)=>{let n=r([e,t]);return n.length===1?n[0]:{anyOf:n}},pattern:e,readOnly:D0,writeOnly:D0,enum:(e,t)=>{let r=n(e,t);if(r.length===0)throw Error(`Intersection of the following enums is empty: "${JSON.stringify(e)}", "${JSON.stringify(t)}"`);return r},anyOf:m,oneOf:m,allOf:(e,t)=>r(e.concat(t)),propertyNames:_,contains:_,dependencies:O0((e,t)=>Array.isArray(e)?Array.isArray(t)?d0(e,t):_(t,{required:e}):Array.isArray(t)?_(e,{required:t}):_(e,t)),examples:(e,t)=>{if(!Array.isArray(e)||!Array.isArray(t))throw Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(e)}" and "${JSON.stringify(t)}"`);return d0(e,t)},multipleOf:(e,t)=>{let n=1;for(;!Number.isInteger(e)||!Number.isInteger(t);)n*=10,e*=10,t*=10;return Bfe(e,t)/n},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:D0,required:d0,...s};return{mergeSchemaDefinitions:_,mergeArrayOfSchemaDefinitions:c}}function Yfe(e){let t=[],n=[e];for(;n.length>0;){let e=n.pop();if(typeof e==`boolean`||e.allOf===void 0){t.push(e);continue}let{allOf:r,...i}=e;t.push(i);for(let e=r.length-1;e>=0;e--)n.push(r[e])}return t}function Xfe(e){return t=>e(Yfe(t))}var{compareSchemaDefinitions:Zfe,compareSchemaValues:Qfe}=zfe(),{mergeArrayOfSchemaDefinitions:$fe}=Jfe({intersectJson:Nfe(Qfe),deduplicateJsonSchemaDef:m0(Zfe)}),I0=Xfe($fe);function L0(e,t,n={},r,i,a=!1){return U0(e,t,n,r,void 0,void 0,i,a)[0]}function R0(e){return typeof e==`boolean`?e?{}:{not:{}}:e}function epe(e,t,n,r,i,a,o){let{if:s,then:c,else:l,...u}=t,d=e.isValid(s,a||{},n),f=[u],p=[];if(r){if(c&&typeof c!=`boolean`){let t=c;p=p.concat(U0(e,t,n,a,r,i,o))}if(l&&typeof l!=`boolean`){let t=l;p=p.concat(U0(e,t,n,a,r,i,o))}}else{let t=d?c:l;if(t!==void 0){let s=R0(t);p=p.concat(U0(e,s,n,a,r,i,o))}}return p.length&&(f=p.map(e=>t0(u,e))),f.flatMap(t=>U0(e,t,n,a,r,i,o))}function z0(e){return e.reduce((e,t)=>t.length>1?t.flatMap(t=>rO(e.length,n=>[...e[n]].concat(t))):(e.forEach(e=>e.push(t[0])),e),[[]])}function B0(e,t){return Object.keys(e.patternProperties).filter(e=>RegExp(e).test(t)).reduce((t,n)=>(QD(t,[n],e.patternProperties[n]),t),{})}function tpe(e,t,n,r,i,a,o,s){let c=V0(e,t,n,r,i,a,o,s);return c.length>1||c[0]!==t?c:`dependencies`in t?G0(e,t,n,r,i,a,o).flatMap(t=>U0(e,t,n,a,r,i,o)):`allOf`in t&&Array.isArray(t.allOf)?z0(t.allOf.map(t=>U0(e,t,n,a,r,i,o))).map(e=>({...t,allOf:e})):[t]}function V0(e,t,n,r,i,a,o,s){let c=H0(t,n,i,void 0,s);return c===t?[t]:U0(e,c,n,a,r,i,o,s)}function H0(e,t,n,r,i,a=!1){if(!a1(e))return e;let o=e,s=r;if(`$ref`in o){let{$ref:e,...r}=o;if(n.includes(e))return a?{...o,[x1]:!0}:o;n.push(e),o={...Z1(e,t,s),...r,[b1]:e},`$id`in o&&(s=o.$id)}if(`properties`in o){let e=[],r=aO(o[g1],(r,a,o)=>{let c=[...n];r[o]=H0(a,t,c,s,i,!i),e.push(c)},{});LD(n,uO(pD(e))),o={...o,[g1]:r}}if(`items`in o&&!Array.isArray(o.items)&&typeof o.items!=`boolean`&&(o={...o,items:H0(o.items,t,n,s,i)}),i){let r,a;`anyOf`in e&&Array.isArray(e.anyOf)?(r=l1,a=o[l1]):`oneOf`in e&&Array.isArray(e.oneOf)&&(r=h1,a=o[h1]),r&&a&&(o={...o,[r]:a.map(e=>H0(e,t,n,s,i))})}return U1(e,o)?e:o}function npe(e,t,n,r,i){let a={...t,properties:{...t.properties}},o=r&&a1(r)?r:{};return Object.keys(o).forEach(t=>{if(!(t in a.properties)){if(`patternProperties`in a){let r=B0(a,t);if(!jD(r)){a.properties[t]=L0(e,{[c1]:Object.values(r)},n,Y(o,[t]),i),a.properties[t][s1]=!0;return}}if(`additionalProperties`in a&&a.additionalProperties!==!1){let r;r=typeof a.additionalProperties==`boolean`?{type:$1(Y(o,[t]))}:`$ref`in a.additionalProperties?L0(e,{[y1]:Y(a.additionalProperties,[y1])},n,Y(o,[t]),i):`type`in a.additionalProperties?{...a.additionalProperties}:`anyOf`in a.additionalProperties||`oneOf`in a.additionalProperties?{type:`object`,...a.additionalProperties}:{type:$1(Y(o,[t]))},a.properties[t]=r,a.properties[t][s1]=!0}else a.properties[t]={type:`null`},a.properties[t][s1]=!0}}),a}function rpe(e){return I0(e)}function U0(e,t,n,r,i=!1,a=[],o,s){return a1(t)?tpe(e,t,n,i,a,r,o,s).flatMap(t=>{var s;let c=t;if(`if`in c)return epe(e,c,n,i,a,r,o);if(`allOf`in c){if(i){let{allOf:e,...t}=c;return[...e,t]}try{let e=[],t=[],n={};(s=c.allOf)==null||s.forEach(r=>{if(typeof r==`object`&&r.contains)e.push(r);else{t.push(r);for(let e of Object.getOwnPropertySymbols(r))e in n||(n[e]=r[e])}}),e.length&&(c={...c,allOf:t}),c=o?o(c):rpe(c);for(let e of Object.getOwnPropertySymbols(n))c[e]=n[e];e.length&&(c.allOf=e)}catch(e){console.warn(`could not merge subschemas in allOf:
232
+ `,e);let{allOf:t,...n}=c;return n}}return`properties`in c&&`patternProperties`in c&&(c=Object.keys(c.properties).reduce((t,i)=>{let a=B0(t,i);return jD(a)||(t.properties[i]=L0(e,{allOf:[t.properties[i],...Object.values(a)]},n,Y(r,[i]),o)),t},{...c,properties:{...c.properties}})),`patternProperties`in c||`additionalProperties`in c&&c.additionalProperties!==!1?npe(e,c,n,r,o):c}):[{}]}function ipe(e,t,n,r,i){let a,{oneOf:o,anyOf:s,...c}=t;if(Array.isArray(o)?a=o:Array.isArray(s)&&(a=s),a){let o=i===void 0&&r?{}:i,s=Q1(t);a=a.map(e=>H0(e,n,[]));let l=r0(e,o,a,n,s);return r?(r0(e,o,W0(a,!1,n),n,s),a.map(e=>t0(c,e))):[t0(c,a[l])]}return[t]}function W0(e,t=!1,n){return e.map(e=>{if(!a1(e))return R0(e);let r=t&&n?H0(e,n,[]):e;return r.additionalProperties===!1?{...r,additionalProperties:!0}:r})}function G0(e,t,n,r,i,a,o){let{dependencies:s,...c}=t;return ipe(e,c,n,r,a).flatMap(t=>K0(e,s,t,n,r,i,a,o))}function K0(e,t,n,r,i,a,o,s){let c=[n];for(let l in t)if((i||Y(o,[l])!==void 0)&&(!n.properties||l in n.properties)){let[u,d]=Y1(l,t);return Array.isArray(d)?c[0]=ape(n,d):a1(d)&&(c=ope(e,n,r,l,d,i,a,o,s)),c.flatMap(t=>K0(e,u,t,r,i,a,o,s))}return c}function ape(e,t){if(!t)return e;let n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function ope(e,t,n,r,i,a,o,s,c){return U0(e,i,n,s,a,o,c).flatMap(i=>{let{oneOf:l,...u}=i,d=t0(t,u);return l===void 0?d:z0(l.map(t=>typeof t==`boolean`||!(`$ref`in t)?[t]:V0(e,t,n,a,o,s))).flatMap(t=>spe(e,d,n,r,t,a,o,s,c))})}function spe(e,t,n,r,i,a,o,s,c){let l=i.filter(t=>{if(typeof t==`boolean`||!t?.properties)return!1;let{[r]:i}=t.properties;if(i){let t={type:`object`,properties:{[r]:i}};return e.isValid(t,s,n)||a}return!1});return!a&&l.length!==1?(console.warn(`ignoring oneOf in dependencies because there isn't exactly one subschema that is valid`),[t]):l.flatMap(i=>{let l=i,[u]=Y1(r,l.properties);return U0(e,{...l,properties:u},n,s,a,o,c).map(e=>t0(t,e))})}function q0(e,t,n,r,i,a={},o){if(Array.isArray(n[i])){let s=Q1(n)||r,c=n[i].map(n=>L0(e,n,t,a,o)),l=Y(a,s);if(l!==void 0)return c.find(e=>U1(Y(e,[g1,s,d1],Y(e,[g1,s,u1])),l))}}function J0(e,t,n,r,i){let a=n;if(gD(n,`$ref`)&&(a=L0(e,n,t,void 0,i)),jD(r))return a;let[o,...s]=Array.isArray(r)?[...r]:r.split(`.`);if(o!==void 0&&o!==``&&gD(a,o))return a=Y(a,o),J0(e,t,a,s,i)}function Y0(e,t,n,r,i,a){let o=J0(e,t,n,r,a);return o===void 0?i:o}var X0={title:`!@#$_UNKNOWN_$#@!`};function cpe(e,t,n,r,i={},a){let o=Array.isArray(r)?[...r]:r.split(`.`),s=n,c=o.pop(),l=String(c);o.length&&o.forEach(n=>{s=Y0(e,t,s,[g1,n],{},a),gD(s,`oneOf`)?s=q0(e,t,s,l,h1,Y(i,n),a):gD(s,`anyOf`)&&(s=q0(e,t,s,l,l1,Y(i,n),a))}),gD(s,`oneOf`)?s=q0(e,t,s,l,h1,i,a):gD(s,`anyOf`)&&(s=q0(e,t,s,l,l1,i,a));let u=Y0(e,t,s,[g1,c],X0,a);u===X0&&(u=void 0);let d=Y0(e,t,s,tfe,[],a),f;return u&&Array.isArray(d)&&(f=d.includes(l)),{field:u,isRequired:f}}var lpe={type:`object`,$id:efe,properties:{__not_really_there__:{type:`number`}}};function Z0(e,t,n,r,i){let a=0;return n&&(LC(n.properties)?a+=ZD(n.properties,(n,a,o)=>{let s=Y(r,o);if(typeof a==`boolean`)return n;if(gD(a,`$ref`))return n+Z0(e,t,L0(e,a,t,s,i),s||{},i);if((gD(a,`oneOf`)||gD(a,`anyOf`))&&s){let r=gD(a,`oneOf`)?h1:l1,o=Q1(a);return n+Q0(e,t,s,Y(a,r),-1,o,i)}if(a.type===`object`)return n+ +!!LC(s)+Z0(e,t,a,s,i);if(a.type===$1(s)){let e=n+1;return a.default?e+=s===a.default?1:-1:a.const&&(e+=s===a.const?1:-1),e}return n},0):vD(n.type)&&n.type===$1(r)&&(a+=1)),a}function Q0(e,t,n,r,i=-1,a,o){let s=r.map(e=>H0(e,t,[])),c=n0(n,r,a);if(PD(c))return c;let l=s.reduce((r,i,o)=>(r0(e,n,[lpe,i],t,a)===1&&r.push(o),r),[]);if(l.length===1)return l[0];l.length||rO(s.length,e=>l.push(e));let u=new Set,{bestIndex:d}=l.reduce((r,i)=>{let{bestScore:a}=r,c=s[i],l=Z0(e,t,c,n,o);return u.add(l),l>a?{bestIndex:i,bestScore:l}:r},{bestIndex:i,bestScore:0});return u.size===1&&i>=0?i:d}function $0(e){let t=e[u1],n=e0(e);return a1(t)&&vD(t?.$data)&&n!==`object`&&n!==`array`}function e2(e){return Array.isArray(e.enum)&&e.enum.length===1||`const`in e}function t2(e){return Array.isArray(e.items)&&e.items.every(e=>a1(e))}function n2(e,t,n=!1,r=!1,i=!1){if(Array.isArray(t)){let a=Array.isArray(e)?e:[],o=i?a:t,s=i?t:a,c=o.map((e,o)=>s[o]===void 0?e:n2(a[o],t[o],n,r,i));return(n||i)&&c.length<s.length&&c.push(...s.slice(c.length)),c}if(a1(t)){let a=Object.assign({},e);return Object.keys(t).reduce((o,s)=>{let c=Y(t,s),l=a1(e)&&s in e,u=s in t,d=Y(e,s)??{},f=l&&a1(d)&&Object.values(d).some(e=>a1(e)),p=l&&a1(Y(e,s)),m=u&&a1(c);return p&&m&&!f?(o[s]={...Y(e,s),...c},o):(o[s]=n2(Y(e,s),c,n,r,i&&(l||!u)),a)},a)}return r&&(e!==void 0&&FD(t)||typeof t==`number`&&Number.isNaN(t))||i&&!FD(t)?e:t}function r2(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{let a=e?e[i]:{},o=t[i];if(e&&i in e&&a1(o))r[i]=r2(a,o,n);else if(n&&Array.isArray(a)&&Array.isArray(o)){let e=o;n===`preventDuplicates`&&(e=o.reduce((e,t)=>(a.includes(t)||e.push(t),e),[])),r[i]=a.concat(e)}else r[i]=o;return r},{...e})}function upe(e){if(`enum`in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if(`const`in e)return e.const;throw Error(`schema cannot be inferred as a constant`)}function dpe(e,t){let n=new Map(e.map(e=>[String(e.value),e])),r=new Set(t.filter(e=>e!==`*`).map(String)),i=e.filter(e=>!r.has(String(e.value)));return t.flatMap(e=>{if(e===`*`)return i;let t=n.get(String(e));return t?[t]:[]})}function i2(e,t){if(e.enum){let n,r;if(t){let{enumNames:e,enumOrder:i}=O1(t);n=e,r=i}let i=e.enum.map((e,t)=>({label:Array.isArray(n)?n[t]||String(e):n?.[String(e)]||String(e),value:e}));return r&&(i=dpe(i,r)),i}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let i=Q1(e);if(t){let{optionsSchemaSelector:e=i}=O1(t);i=e}return n?.map((e,t)=>{let{title:n}=O1(r?.[t]),a=e,o,s=n;if(i){let e=Y(a,[g1,i],{});o=Y(e,d1,Y(e,u1)),s=s??e?.title??a.title??String(o)}else o=upe(a),s=s??a.title??String(o);return{schema:a,label:s,value:o}})}function a2(e,t,n={},r){let i=L0(e,t,n,void 0,r),a=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(a)?a.every(e=>typeof e!=`boolean`&&e2(e)):!1}function o2(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items==`boolean`?!1:a2(e,t.items,n,r)}var fpe=[`string`,`number`,`integer`,`boolean`,`null`],s2;(function(e){e[e.Ignore=0]=`Ignore`,e[e.Invert=1]=`Invert`,e[e.Fallback=2]=`Fallback`})(s2||={});function c2(e,t=s2.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){let t=e.items[n];if(typeof t!=`boolean`)return t}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!=`boolean`)return e.items;return t!==s2.Ignore&&a1(e.additionalItems)?e.additionalItems:{}}function l2(e,t){let{default:n,type:r}=e;return Array.isArray(r)&&r.includes(`null`)&&jD(t)&&n===null?null:t}function u2(e,t,n,r,i,a=[],o={},s=!1,c=!1){let{emptyObjectFields:l=`populateAllDefaults`}=o;if(r===!0||s)e[t]=n;else if(r===`excludeObjectChildren`)(c&&n!==void 0||!a1(n)||!jD(n))&&(e[t]=n);else if(l!==`skipDefaults`){let r=i===void 0?a.includes(t):i;a1(n)?l===`skipEmptyDefaults`?jD(n)||(e[t]=n):(!jD(n)||a.includes(t))&&(r||l!==`populateRequiredDefaults`)&&(e[t]=n):n!==void 0&&(l===`populateAllDefaults`||l===`skipEmptyDefaults`||r&&a.includes(t))&&(e[t]=n)}}function d2(e,t,n={}){let{parentDefaults:r,rawFormData:i,rootSchema:a={},includeUndefinedValues:o=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:l,required:u,shouldMergeDefaultsIntoFormData:d=!1,initialDefaultsGenerated:f}=n,p=a1(i)?i:{},m=a1(t)?t:{},h=r,g=h&&c?.nestedDefaultsPrecedence===`ancestorWins`,_=null,v=c,y=s;if(m.const!==void 0&&c?.constAsDefaults!==`never`&&!$0(m))h=m[u1];else if(a1(h)&&a1(m.default)&&!m.anyOf&&!m.oneOf&&!m.$ref)h=g?r2(m.default,h):r2(h,m.default);else if(`default`in m&&!g&&!m.anyOf&&!m.oneOf&&!m.$ref)h=m.default;else if(`$ref`in m){let e=m[y1];s.includes(e)||(y=s.concat(e),_=Z1(e,a));let t=i===void 0||a1(i)&&jD(i);_&&!h&&t&&(h=m.default),d&&_&&!a1(i)&&(p=i)}else if(`dependencies`in m){let t=G0(e,m,a,!1,[],{...p2(e,m,n,h),...p},l);[_]=t}else if(t2(m)&&!g)h=m.items.map((t,n)=>d2(e,t,{rootSchema:a,includeUndefinedValues:o,_recurseList:s,experimental_defaultFormStateBehavior:c,experimental_customMergeAllOf:l,parentDefaults:Array.isArray(r)?r[n]:void 0,rawFormData:p,required:u,shouldMergeDefaultsIntoFormData:d}));else if(`oneOf`in m){let{oneOf:t,...n}=m;if(t.length===0)return;let r=Q1(m),{type:o=`null`}=n;!Array.isArray(o)&&fpe.includes(o)&&v?.constAsDefaults===`skipOneOf`&&(v={...v,constAsDefaults:`never`}),_=t[Q0(e,a,i??m.default,t,0,r,l)],_=t0(n,_)}else if(`anyOf`in m){let{anyOf:t,...n}=m;if(t.length===0)return;let r=Q1(m);_=t[Q0(e,a,i??m.default,t,0,r,l)],_=t0(n,_)}if(_)return d2(e,_,{rootSchema:a,includeUndefinedValues:o,_recurseList:y,experimental_defaultFormStateBehavior:v,experimental_customMergeAllOf:l,parentDefaults:h,rawFormData:i??p,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:f});h===void 0&&(h=m.default);let b=p2(e,m,n,h)??h;if(d){let{arrayMinItems:t={}}=c||{},{mergeExtraDefaults:n}=t,r=f2(e,m,a,i,c,l);(!a1(i)||`allOf`in m)&&(b=n2(b,r,n,!0))}return b}function f2(e,t,n,r,i,a){let o=i?.allOf===`populateDefaults`&&`allOf`in t,s=o?L0(e,t,n,r,a):t,c=!e2(s)&&a2(e,s,n,a),l=r;return c&&(l=i2(s)?.some(e=>U1(e.value,r))?r:void 0),s.const&&i?.constAsDefaults===`always`?l=s.const:a1(l)&&a1(s.properties)&&(l=Object.keys(s.properties).reduce((t,r)=>{let c=Y(s,[g1,r],{});return r in t&&(o||a1(c)&&`allOf`in c)&&(t[r]=f2(e,c,n,Y(t,r),i,a)),t},{...l})),l}function ppe(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,required:c,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){{let f=a1(n)?n:{},p=t,m=o?.allOf===`populateDefaults`&&`allOf`in p||o?.emptyObjectFields!==`skipEmptyDefaults`&&`if`in p?L0(e,p,r,f,s):p,h=m[u1],g=Object.keys(m.properties||{}).reduce((t,n)=>{let p=Y(m,[g1,n],{}),g=a1(h)&&h[n]!==void 0,_=(a1(p)&&`const`in p||g)&&o?.constAsDefaults!==`never`&&!$0(p);return u2(t,n,d2(e,p,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:Y(d,[n]),rawFormData:Y(f,[n]),required:m.required?.includes(n),shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}),i,c,m.required,o,_,p?.type===`null`),t},{});if(m.additionalProperties&&!u){let t=a1(m.additionalProperties)?m.additionalProperties:{},n=new Set,p=[];Object.keys(f).filter(e=>!m.properties||!m.properties[e]).forEach(e=>{n.add(e),p.push(e)}),a1(d)&&p.length===0&&Object.keys(d).filter(e=>!m.properties||!m.properties[e]).forEach(e=>n.add(e)),n.forEach(n=>{let h=d2(e,t,{rootSchema:r,_recurseList:a,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:s,includeUndefinedValues:i===!0,parentDefaults:Y(d,[n]),rawFormData:Y(f,[n]),required:m.required?.includes(n),shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u});u2(g,n,h,i,c,p)})}return l2(t,g)}}function mpe(e,t,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:s,requiredAsRoot:c=!1,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}={},d){let f=d,p=t,m=a?.arrayMinItems??{},{populate:h,mergeExtraDefaults:g}=m,_=h===`never`,v=h===`requiredOnly`,y=h===`all`||!_&&!v,b=m?.computeSkipPopulate??(()=>!1),x=a?.emptyObjectFields===`skipEmptyDefaults`?void 0:[];if(Array.isArray(f)&&(f=f.map((t,c)=>d2(e,c2(p,s2.Fallback,c),{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,parentDefaults:t,rawFormData:Array.isArray(n)?n[c]:void 0,required:s,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}))),Array.isArray(n)){let t=c2(p);if(_)f=n;else{let c=n.map((n,c)=>d2(e,t,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,parentDefaults:Y(f,[c]),required:s,shouldMergeDefaultsIntoFormData:l,initialDefaultsGenerated:u}));f=n2(f,c,(v&&s||y)&&g)}}let S=Array.isArray(f)?f.length:0;if(_){if(l){if(p.minItems&&p.minItems>S){let e=Array.from({length:p.minItems-S},()=>null);return(f??[]).concat(e)}return f}return f??x}if(v&&!s)return f||void 0;let C;if(!p.minItems||o2(e,p,r,o)||b(e,p,r)||p.minItems<=S)C=f||!s&&!c?f:x;else{let t=f||[],n=c2(p,s2.Invert),c=n.default,u=Array.from({length:p.minItems-S},()=>d2(e,n,{parentDefaults:c,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:s,shouldMergeDefaultsIntoFormData:l}));C=t.concat(u)}return l2(t,C)}function p2(e,t,n={},r){switch(e0(t)){case`object`:return ppe(e,t,n,r);case`array`:return mpe(e,t,n,r);default:return}}function m2(e,t,n,r,i=!1,a,o,s){if(!a1(t))throw Error(`Invalid schema: ${t}`);let c=L0(e,t,r,n,o),l=d2(e,c,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:s,requiredAsRoot:!0});if(c.type!==`object`&&a1(c.default))return{...l,...n};if(a1(n)||Array.isArray(n)){let{mergeDefaultsIntoFormData:t}=a||{},i=t===`useDefaultIfFormDataUndefined`;return n2(l,f2(e,c,r??c,n,a,o),!0,i,!0)}return l}function h2(e={}){return`widget`in O1(e)&&O1(e).widget!==`hidden`}function g2(e,t,n={},r,i){if(n[`ui:widget`]===`files`)return!0;if(t.items){let n=L0(e,t.items,r,void 0,i);return n.type===`string`&&n.format===`data-url`}return!1}function hpe(e,t,n={},r,i,a){let{label:o=!0}=O1(n,i),s=!!o;if(s){let i=e0(t),o=!!t[s1];i===`array`&&(s=o||o2(e,t,r,a)||g2(e,t,n,r,a)||h2(n)),i===`object`&&(s=o),i===`boolean`&&n&&!n[`ui:widget`]&&(s=!1),n?.[`ui:field`]&&(s=!1)}return s}function gpe(e,t){if(t.length===0&&typeof e!=`object`)return e;let n=YD(e,t);return Array.isArray(e)?Object.keys(n).map(e=>n[e]):n}function _pe(e,t){let n=(e,t)=>typeof e!=`object`||jD(e)||t&&!jD(e),r=(e,i=[],a=[[]])=>{let o=Object.keys(e);return o.forEach(s=>{let c=e[s];if(typeof c==`object`){let e=a.map(e=>[...e,s]);c[w1]&&c.$name!==``?i.push(c[m1]):r(c,i,e)}else s===`$name`&&c!==``&&a.forEach(e=>{let r=Y(t,e),a=o.length===1;(n(r,a)||Array.isArray(r)&&r.every(e=>n(e,a)))&&i.push(e)})}),i};return r(e)}function _2(e){return FD(e)||e===``?!0:Array.isArray(e)?e.length===0:a1(e)?Object.values(e).every(_2):!1}function vpe(e,t){return t?t(e):I0(e)}function ype(e,t,n={},r,i){function a(e){return a1(e)}function o(e){return a1(e)}function s(e,t,r){let{properties:i,additionalProperties:a,patternProperties:s,propertyNames:c}=e,l=new Set(e.required??[]);function u(e,t,i,a=!1){let s=p(t,i,r[e]);if(!a&&a1(s)){let e=o(t)?t:{};e.$ref!==void 0&&(e=Z1(e.$ref,n));let r=new Set(e.required??[]);if(Object.entries(s).every(([e,t])=>!r.has(e)&&_2(t)))return}s!==void 0&&(r[e]=s)}if(i!==void 0)for(let[e,n]of Object.entries(i))u(e,n,t[e],l.has(e));let d;if(s!==void 0){d=[];let e=Object.entries(s).map(([e,t])=>[new RegExp(e),t]),n=new Set(Object.keys(i??{}));for(let[r,i]of Object.entries(t))if(!n.has(r)){let t=e.find(([e])=>e.test(r));t===void 0?d.push(r):u(r,t[1],i)}}if(a!==void 0&&a!==!1){let e=a;if(d!==void 0)for(let n of d)u(n,e,t[n]);else{let n=new Set(Object.keys(i??{}));for(let[r,i]of Object.entries(t))n.has(r)||u(r,e,i)}}if(c!==void 0)for(let[e,n]of Object.entries(t))r[e]=n;return r}function c(e,t,n){let{items:r,additionalItems:i}=e;if(r!==void 0)if(Array.isArray(r))for(let e=0;e<r.length;e+=1)n.push(p(r[e],t[e]));else for(let e=0;e<t.length;e+=1)n.push(p(r,t[e]));if(i)for(let e=n.length;e<t.length;e+=1)n.push(p(i,t[e]));return n}function l(t,r,i){let{if:a,then:s,else:c}=t;if(a===void 0)return i;let l=(o(a)?e.isValid(a,r,n):a)?s:c;return l===void 0?i:p(l,r,i)}function u(t,r,a,o){if(!Array.isArray(t)||a2(e,r,n,i))return o;let s=W0(t,!0,n),c=Q0(e,n,a,s,0,Q1(r),i),l=t[c];return p(a1(l)?H0(l,n,[]):s[c],a,o)}function d(e,t,n){let{anyOf:r}=e;if(!Array.isArray(r))return n;if(t===void 0||Array.isArray(t)&&t.length===0||a1(t)&&Object.keys(t).length===0){let e=n;for(let n of r)e=p(n,t,e);return e}return u(r,e,t,n)}function f(e,t,n){let{dependencies:r}=e;if(r===void 0||!a(t))return n;let i=n;for(let[e,n]of Object.entries(r))e in t&&!Array.isArray(n)&&(i=p(n,t,i));return i}function p(e,t,r){if(t===void 0||e===!1)return;if(e===!0||jD(e))return t;let o=e,{$ref:m,allOf:h}=o;if(m!==void 0)return p(Z1(m,n),t,r);if(h){o=vpe(o,i);let e=o.allOf;if(e)for(let n=0;n<e.length;n++)r=p(e[n],t,r)}let g=d(o,t,u(o.oneOf,o,t,r)),_=e0(o);if(_===`object`){if(!a(t))return;g=s(o,t,a(g)?g:{})}else if(_===`array`){if(!Array.isArray(t))return;g=c(o,t,Array.isArray(g)?g:[])}else g===void 0&&(g=t);return f(o,t,l(o,t,g))}return p(t,r)}var v2=Symbol(`no Value`);function y2(e){if(Array.isArray(e.enum))return e.enum;let t=e.oneOf||e.anyOf;if(!Array.isArray(t))return;let n=t.map(e=>`const`in e?e[u1]:Array.isArray(e.enum)&&e.enum.length===1?e.enum[0]:v2).filter(e=>e!==v2);return n.length>0?n:void 0}function bpe(e,t){let n=y2(e);if(!n||n.some(e=>U1(e,t)))return v2;let r=Y(e,d1,v2);return r!==v2&&n.some(e=>U1(e,r))?r:n.length===1?n[0]:void 0}function b2(e,t,n,r,i={},a){let o;if(gD(n,`properties`)){let s={};if(gD(r,`properties`)){let e=Y(r,g1,{});Object.keys(e).forEach(e=>{gD(i,e)&&(s[e]=void 0)})}let c=Object.keys(Y(n,g1,{})),l={};c.forEach(o=>{let c=Y(i,o),u=Y(r,[g1,o],{}),d=Y(n,[g1,o],{});gD(u,`$ref`)&&(u=L0(e,u,t,c,a)),gD(d,`$ref`)&&(d=L0(e,d,t,c,a));let f=Y(u,`type`),p=Y(d,`type`);if(!f||f===p)if(gD(s,o)&&delete s[o],p===`object`||p===`array`&&Array.isArray(c)){let n=b2(e,t,d,u,c,a);(n!==void 0||p===`array`)&&(l[o]=n)}else{let e=Y(d,d1,v2),t=Y(u,d1,v2);e!==v2&&e!==c&&(t===c?s[o]=e:Y(d,`readOnly`)===!0&&(s[o]=void 0));let n=Y(d,u1,v2),r=Y(u,u1,v2);if(n!==v2&&n!==c&&(s[o]=r===c?n:void 0),gD(i,o)){let e=bpe(d,c);e!==v2&&(s[o]=e)}}}),o={...typeof i==`string`||Array.isArray(i)?void 0:i,...s,...l}}else if(Y(r,`type`)===`array`&&Y(n,`type`)===`array`&&Array.isArray(i)){let s=Y(r,`items`),c=Y(n,`items`);if(typeof s==`object`&&typeof c==`object`&&!Array.isArray(s)&&!Array.isArray(c)){gD(s,`$ref`)&&(s=L0(e,s,t,i,a)),gD(c,`$ref`)&&(c=L0(e,c,t,i,a));let r=Y(s,`type`),l=Y(c,`type`);if(!r||r===l){let r=Y(n,`maxItems`,-1);if(l===`object`)o=i.reduce((n,i)=>{let o=b2(e,t,c,s,i,a);return o!==void 0&&(r<0||n.length<r)&&n.push(o),n},[]);else{let e=y2(c),t=e?i.filter(t=>e.some(e=>U1(e,t))):i;o=r>0&&t.length>r?t.slice(0,r):t}}}else typeof s==`boolean`&&typeof c==`boolean`&&s===c&&(o=i)}return o}function x2(e,t,n,r,i,a=[],o){if(`$ref`in t||`dependencies`in t||`allOf`in t||`if`in t){let s=L0(e,t,r,i,o);if(a.findIndex(e=>U1(e,s))===-1)return x2(e,s,n,r,i,a.concat(s),o)}let s={[m1]:n.replace(/^\./,``)};if(`oneOf`in t||`anyOf`in t){let c=`oneOf`in t?t.oneOf:t.anyOf,l=c[Q0(e,r,i,c,0,Q1(t),o)];s={...s,...x2(e,l,n,r,i,a,o)}}if(`additionalProperties`in t&&t.additionalProperties!==!1){QD(s,w1,!0);let c=LC(t.additionalProperties)?t[$de]:{},l=Y(t,g1,{});for(let t of Object.keys(i??{}))t in l||(s[t]=x2(e,c,`${n}.${t}`,r,Y(i,[t]),a,o))}if(`items`in t&&Array.isArray(i)){let{items:c,additionalItems:l}=t;Array.isArray(c)?i.forEach((t,i)=>{c[i]?s[i]=x2(e,c[i],`${n}.${i}`,r,t,a,o):l?s[i]=x2(e,l,`${n}.${i}`,r,t,a,o):console.warn(`Unable to generate path schema for "${n}.${i}". No schema defined for it`)}):i.forEach((t,i)=>{s[i]=x2(e,c,`${n}.${i}`,r,t,a,o)})}else if(`properties`in t)for(let c in t.properties){let l=Y(t,[g1,c],{});s[c]=x2(e,l,`${n}.${c}`,r,Y(i,[c]),a,o)}return s}function xpe(e,t,n=``,r,i,a){return x2(e,t,n,r,i,void 0,a)}var Spe=class{constructor(e,t,n,r){t?.$schema===`https://json-schema.org/draft/2020-12/schema`?this.rootSchema=J1(t,Y(t,`$id`,`#`)):this.rootSchema=t,this.validator=e,this.experimental_defaultFormStateBehavior=n,this.experimental_customMergeAllOf=r}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(e,t,n={},r){return!e||!t?!1:this.validator!==e||!U1(this.rootSchema,t)||!U1(this.experimental_defaultFormStateBehavior,n)||this.experimental_customMergeAllOf!==r}findFieldInSchema(e,t,n){return cpe(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,t,n,r){return q0(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getDefaultFormState(e,t,n=!1,r){return m2(this.validator,e,t,this.rootSchema,n,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,r)}getDisplayLabel(e,t,n){return hpe(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,t,n,r){return Q0(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,t,n){return r0(this.validator,e,t,this.rootSchema,n)}getFromSchema(e,t,n){return Y0(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}isFilesArray(e,t){return g2(this.validator,e,t,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return o2(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return a2(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,t){return ype(this.validator,e,this.rootSchema,t)}retrieveSchema(e,t,n){return L0(this.validator,e,this.rootSchema,t,this.experimental_customMergeAllOf,n)}sanitizeDataForNewSchema(e,t,n){return b2(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}toPathSchema(e,t,n){return xpe(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}};function Cpe(e,t,n={},r){return new Spe(e,t,n,r)}function wpe(e){if(!e.includes(`data:`))throw Error(`File is invalid: URI must be a dataURI`);let t=e.slice(5).split(`;base64,`);if(t.length!==2)throw Error(`File is invalid: dataURI must be base64`);let[n,r]=t,[i,...a]=n.split(`;`),o=i||``,s=decodeURI(a.map(e=>e.split(`=`)).find(([e])=>e===`name`)?.[1]||`unknown`);try{let e=atob(r),t=Array(e.length);for(let n=0;n<e.length;n+=1)t[n]=e.charCodeAt(n);return{blob:new window.Blob([new Uint8Array(t)],{type:o}),name:s}}catch(e){throw Error(`File is invalid: ${e.message}`)}}function S2(e,t){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}function C2(e,t){let n=e<=0&&t<=0;if(!n&&(e<0||t<0))throw Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);let r=new Date().getFullYear(),i=n?r+e:e,a=n?r+t:t;if(i>a)return C2(t,e).reverse();let o=[];for(let e=i;e<=a;e+=1)o.push({value:e,label:S2(e,2)});return o}function Tpe(e,t){let n=e;if(Array.isArray(t)){let e=n.split(/(%\d)/);t.forEach((t,n)=>{let r=e.findIndex(e=>e===`%${n+1}`);r>=0&&(e[r]=t)}),n=e.join(``)}return n}function Epe(e,t){return Tpe(e,t)}function w2(e,t=[],n){if(Array.isArray(e))return e.map(e=>w2(e,t)).filter(e=>e!==void 0);let r=t[e===``||e===null?-1:Number(e)];return r?r.value:n}function T2(e,t,n=[]){let r=w2(e,n);return Array.isArray(t)?t.filter(e=>!U1(e,r)):U1(r,t)?void 0:t}function E2(e,t){return Array.isArray(t)?t.some(t=>U1(t,e)):U1(t,e)}function D2(e,t=[],n=!1){let r=t.map((t,n)=>E2(t.value,e)?String(n):void 0).filter(e=>e!==void 0);return n?r:r[0]}function O2(e,t,n,r=`indexed`,i){if(e===void 0||n&&Array.isArray(e)&&e.length<1||!n&&e===i)return i;if(r===`realValue`)return n?e.map(String):String(e);let a=D2(e,t,n);return a===void 0?i:a}function k2(e,t,n=[]){let r=w2(e,n);if(!FD(r)){let e=n.findIndex(e=>r===e.value),i=n.map(({value:e})=>e);return t.slice(0,e).concat(r,t.slice(e)).sort((e,t)=>Number(i.indexOf(e)>i.indexOf(t)))}return t}function A2(e,t,n){if(e===``||!Array.isArray(t))return n;let r=t.find(t=>String(t.value)===e);if(r)return r.value;let i=Number(e);return!Number.isNaN(i)&&i>=0&&i<t.length?t[i].value:n}function j2(e,t,n=`indexed`,r){return n===`realValue`?Array.isArray(e)?e.map(e=>A2(e,t,r)):A2(e,t,r):w2(e,t,r)}function M2(e,t,n=`indexed`){return n===`realValue`?FD(e)?``:String(typeof e==`object`?t:e):String(t)}var N2=class{constructor(e){this.errorSchema={},this.resetAllErrors(e)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(e){let t=Array.isArray(e)&&e.length>0||typeof e==`string`?Y(this.errorSchema,e):this.errorSchema;return!t&&e&&(t={},$D(this.errorSchema,e,t,Object)),t}resetAllErrors(e){return this.errorSchema=e?yE(e):{},this}addErrors(e,t){let n=this.getOrCreateErrorBlock(t),r=Y(n,f1);return Array.isArray(r)||(r=[],n[f1]=r),Array.isArray(e)?QD(n,f1,[...new Set([...r,...e])]):QD(n,f1,[...new Set([...r,e])]),this}setErrors(e,t){return QD(this.getOrCreateErrorBlock(t),f1,Array.isArray(e)?[...new Set([...e])]:[e]),this}clearErrors(e){return QD(this.getOrCreateErrorBlock(e),f1,[]),this}};function P2(e,t){let n=IT(e),r=IT(t);if(e===t||!n&&!r)return[];if(n&&!r)return pT(e);if(!n&&r)return pT(t);let i=pT(qD(e,(e,n)=>!U1(e,Y(t,n)))),a=cD(pT(t),pT(e));return[...i,...a]}function Dpe(e,t,n=[1900,new Date().getFullYear()+2],r=`YMD`){let{day:i,month:a,year:o,hour:s,minute:c,second:l}=e,u={type:`day`,range:[1,31],value:i},d={type:`month`,range:[1,12],value:a},f={type:`year`,range:n,value:o},p=[];switch(r){case`MDY`:p.push(d,u,f);break;case`DMY`:p.push(u,d,f);break;default:p.push(f,d,u)}return t&&p.push({type:`hour`,range:[0,23],value:s},{type:`minute`,range:[0,59],value:c},{type:`second`,range:[0,59],value:l}),p}function F2(e){let 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 I2(e,t,n={},r=!0){let i={type:t||`text`,...F2(e)};return n.inputType?i.type=n.inputType:t||(e.type===`number`?(i.type=`number`,r&&i.step===void 0&&(i.step=`any`)):e.type===`integer`&&(i.type=`number`,i.step===void 0&&(i.step=1))),[`date`,`datetime-local`,`time`,`week`,`month`].includes(i.type)&&(e.formatMinimum!==void 0&&(i.min=e.formatMinimum),e.formatMaximum!==void 0&&(i.max=e.formatMaximum)),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}function L2(e){return e?.optionValueFormat??`indexed`}var R2={props:{disabled:!1},submitText:`Submit`,norender:!1};function z2(e={}){let t=O1(e);if(t?.submitButtonOptions){let e=t[v1];return{...R2,...e}}return R2}function B2(e,t,n={}){let{templates:r}=t;return e===`ButtonTemplates`?r[e]:Object.hasOwn(n,e)&&typeof n[e]==`string`&&Object.hasOwn(r,n[e])?r[n[e]]:n[e]||r[e]}function V2(){if(Y(globalThis,`process.env.NODE_ENV`)!==`test`)return{};let e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,fO(`test-id-`)),e.get(n)}})}var Ope=s((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.server_context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`);function m(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case u:case d:return e;default:switch(e&&=e.$$typeof,e){case c:case s:case l:case p:case f:case o:return e;default:return m}}case n:return m}}}e.isForwardRef=function(e){return m(e)===l},e.isMemo=function(e){return m(e)===f}})),H2=u(s(((e,t)=>{t.exports=Ope()}))(),1),U2={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 kpe(e){let t=Y(e,`MergedWidget`);if(!t){let n=e.defaultProps?.options||{};t=({options:t,...r})=>(0,H.jsx)(e,{options:{...n,...t},...r}),QD(e,`MergedWidget`,t)}return t}function W2(e,t,n={}){let r=e0(e);if(typeof t==`function`||t&&H2.isForwardRef((0,b.createElement)(t))||H2.isMemo(t))return kpe(t);if(typeof t!=`string`)throw Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in n){let r=n[t];return W2(e,r,n)}if(typeof r==`string`){if(!(r in U2))throw Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in U2[r]){let i=n[U2[r][t]];return W2(e,i,n)}}throw Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function G2(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t.toString(16)}function K2(e){let t=new Set;return JSON.stringify(e,(e,n)=>(t.add(e),n)),JSON.stringify(e,Array.from(t).sort())}function q2(e){return G2(K2(e))}function Ape(e){return G2(K2(e))}function jpe(e,t,n={}){try{return W2(e,t,n),!0}catch(e){let t=e;if(t.message&&(t.message.startsWith(`No widget`)||t.message.startsWith(`Unsupported widget`)))return!1;throw e}}function J2(e,t){return`${vD(e)?e:e.$id}__${t}`}function Y2(e){return J2(e,`description`)}function X2(e){return J2(e,`error`)}function Z2(e){return J2(e,`examples`)}function Q2(e){return J2(e,`help`)}function $2(e){return J2(e,`title`)}function e4(e,t=!1){let n=t?` ${Z2(e)}`:``;return`${X2(e)} ${Y2(e)} ${Q2(e)}${n}`}function t4(e,t){return`${e}-${t}`}function n4(e,t){return J2(e,t)}function r4(e,t){return J2(e,`optional${t}`)}function i4(e){return!FD(e)&&(!LC(e)||Array.isArray(e)||!jD(e))}function Mpe(e,t){let{rootSchema:n,schemaUtils:r}=e;return U1(t,n)?!0:`$ref`in n&&U1(t,r.retrieveSchema(n))}function a4(e,t,n){return t?n:e}function Npe(e){return e?new Date(e).toJSON():void 0}function o4(e,t,n,r=!1){!r&&Array.isArray(n)&&t.default!==void 0&&D2(t.default,n,r)===void 0&&console.error(`The schema default value "${t.default}" is not one of the values in the enum options for "${e}"`)}function s4(e,t,n){let r=[ife];return gD(e,`formContext`)&&r.unshift(rfe),Y(e,[...r,t],n)}function Ppe(e,t){if(!Array.isArray(t))return e;let n=e=>e.reduce((e,t)=>(e[t]=!0,e),{}),r=e=>e.length>1?`properties '${e.join(`', '`)}'`:`property '${e[0]}'`,i=n(e),a=t.filter(e=>e===`*`||i[e]),o=n(a),s=e.filter(e=>!o[e]),c=a.indexOf(`*`);if(c===-1){if(s.length)throw Error(`uiSchema order list does not contain ${r(s)}`);return a}if(c!==a.lastIndexOf(`*`))throw Error(`uiSchema order list contains more than one wildcard item`);let l=[...a];return l.splice(c,1,...s),l}function c4(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};let n=new Date(e);if(Number.isNaN(n.getTime()))throw Error(`Unable to parse date ${e}`);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}function Fpe(e,t,n){let r=e[b1]??e[y1],i=n.uiSchemaDefinitions,a=r&&i?i[r]:void 0,o;if(o=a?!t||jD(t)?{...a}:r2(a,t):t||{},i){let t=e;if(r&&e.$ref&&!e[b1])try{t=Z1(r,n.rootSchema)}catch(e){return console.warn(`could not resolve $ref in resolveUiSchema:
233
+ `,e),o}for(let e of[h1,l1]){let n=t[e];if(Array.isArray(n)&&n.length>0){let t=o[e],r=Array.isArray(t)?[...t]:[],a=!1;for(let e=0;e<n.length;e++){let t=n[e],o=t?.[b1]??t?.[y1];if(o&&o in i){let t=r[e]||{};r[e]=r2(i[o],t),a=!0}}a&&(o[e]=r)}}}return o}function l4(e){return e.const||e.enum?.length===1&&e.enum[0]===!0?!0:e.anyOf?.length===1?l4(e.anyOf[0]):e.oneOf?.length===1?l4(e.oneOf[0]):e.allOf?e.allOf.some(e=>l4(e)):!1}function u4({hideLabel:e,id:t,multiple:n,options:r,registry:i,uiSchema:a,value:o}){if(n||e)return null;let{label:s=!0}=O1(a,i.globalUiOptions);if(!s)return null;let c=r.enumOptions?.find(({value:e})=>E2(e,o)),l=c?.schema?.description;return l?(0,H.jsx)(B2(`DescriptionFieldTemplate`,i,r),{id:Y2(t),description:l,schema:c.schema,uiSchema:a,registry:i}):null}function d4(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r+=1){let i=n[r];if(!Object.hasOwn(t,i)||!Object.is(e[i],t[i]))return!1}return!0}function Ipe(e,t,n,r=`customDeep`){if(r===`always`)return!0;if(r===`shallow`){let{props:r,state:i}=e;return!d4(r,t)||!d4(i,n)}let{props:i,state:a}=e;return!U1(i,t)||!U1(a,n)}function f4(e){let t=uO(e.map(e=>LC(e)?e0(e):void 0).flat().filter(e=>e!==void 0));return t.length===1?t[0]:t}function p4(e,t,n,r){let{enableOptionalDataFieldForType:i=[]}=O1(r,e.globalUiOptions),a;return a=`anyOf`in t&&Array.isArray(t.anyOf)?f4(t[l1]):`oneOf`in t&&Array.isArray(t.oneOf)?f4(t[h1]):e0(t),!Mpe(e,t)&&!n&&!!a&&!Array.isArray(a)&&!!i.find(e=>e===a)}function m4(e,t=!0){let{year:n,month:r,day:i,hour:a=0,minute:o=0,second:s=0}=e,c=Date.UTC(n,r-1,i,a,o,s),l=new Date(c).toJSON();return t?l:l.slice(0,10)}function h4(e,t=[]){if(!e)return[];let n=[];return`__errors`in e&&(n=n.concat(e[f1].map(e=>{let n=`.${t.join(`.`)}`;return{property:n,message:e,stack:`${n} ${e}`}}))),Object.keys(e).reduce((n,r)=>{if(r!==`__errors`){let i=e[r];if(IT(i))return n.concat(h4(i,[...t,r]))}return n},n)}function Lpe(e){let t=new N2;return e.length&&e.forEach(e=>{let{property:n,message:r}=e,i=n===`.`?[]:iO(n);i.length>0&&i[0]===``&&i.splice(0,1),r&&t.addErrors(r,i)}),t.ErrorSchema}function g4(e,t,n,r){let i=Array.isArray(n)?n:n?.path,a=e===``?[]:[e],o=i?i.concat(...a):a,s=[t.idPrefix,...o].join(t.idSeparator),c;return t.nameGenerator&&o.length>0&&(c=t.nameGenerator(o,t.idPrefix,r)),{path:o,$id:s,...c!==void 0&&{name:c}}}function _4(e){return Object.keys(e).reduce((t,n)=>{if(n===`addError`)return t;let r=e[n];return IT(r)?{...t,[n]:_4(r)}:{...t,[n]:r}},{})}function Rpe(e){return Object.values(e).every(e=>e!==-1)}function zpe(e){let{className:t=`form-control`,type:n,range:r,value:i,select:a,rootId:o,name:s,disabled:c,readonly:l,autofocus:u,registry:d,onBlur:f,onFocus:p}=e,m=`${o}_${n}`,{SelectWidget:h}=d.widgets,g=(0,b.useCallback)(e=>a(n,e),[a,n]);return(0,H.jsx)(h,{schema:{type:`integer`},id:m,name:s,className:t,options:{enumOptions:C2(r[0],r[1])},placeholder:n,value:i,disabled:c,readonly:l,autofocus:u,onChange:g,onBlur:f,onFocus:p,registry:d,label:``,"aria-describedby":e4(o)})}function Bpe(e){let{time:t=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:a,value:o}=e,[s,c]=(0,b.useState)(c4(o,t));(0,b.useEffect)(()=>{c(c4(o,t))},[t,o]);let l=(0,b.useCallback)((e,n)=>{let r={...s,[e]:n===void 0?-1:n};Rpe(r)?a(m4(r,t)):c(r)},[s,a,t]),u=(0,b.useCallback)(e=>{e.preventDefault(),!(n||r)&&a(void 0)},[n,r,a]),d=(0,b.useCallback)(e=>{if(e.preventDefault(),n||r)return;let i=c4(new Date().toJSON(),t);a(m4(i,t))},[n,r,t,a]);return{elements:(0,b.useMemo)(()=>Dpe(s,t,i.yearsRange,i.format),[s,t,i.yearsRange,i.format]),handleChange:l,handleClear:u,handleSetNow:d}}function v4(e){let t=(0,b.useRef)(e);return U1(e,t.current)||(t.current=e),t.current}function Vpe(e,t){return e.replace(`;base64`,`;name=${encodeURIComponent(t)};base64`)}async function Hpe(e){let{name:t,size:n,type:r}=e;return new Promise((i,a)=>{let o=new window.FileReader;o.onerror=a,o.onload=e=>{typeof e.target?.result==`string`?i({dataURL:Vpe(e.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},o.readAsDataURL(e)})}async function Upe(e){return Promise.all(Array.from(e).map(Hpe))}function Wpe(e){return e.reduce((e,t)=>{if(!t)return e;try{let{blob:n,name:r}=wpe(t);return[...e,{dataURL:t,name:r,size:n.size,type:n.type}]}catch{return e}},[])}function Gpe(e,t,n=!1){let r=(0,b.useMemo)(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]);return{filesInfo:(0,b.useMemo)(()=>Wpe(Array.isArray(e)?e:[e||``]),[e]),handleChange:(0,b.useCallback)(async e=>{let i=(await Upe(e)).map(e=>e.dataURL||null);t(n?r.concat(...i):i[0])},[r,n,t]),handleRemove:(0,b.useCallback)(e=>{t(n?r.filter((t,n)=>n!==e):void 0)},[r,n,t])}}function Kpe(e){if(!e)return``;let t=new Date(e);return`${S2(t.getFullYear(),4)}-${S2(t.getMonth()+1,2)}-${S2(t.getDate(),2)}T${S2(t.getHours(),2)}:${S2(t.getMinutes(),2)}:${S2(t.getSeconds(),2)}.${S2(t.getMilliseconds(),3)}`}function y4(e,t,n=!1){if(!t)return e;let{errors:r,errorSchema:i}=e,a=h4(t),o=t;return jD(i)||(o=r2(i,t,!n||`preventDuplicates`),a=[...r].concat(a)),{errorSchema:o,errors:a}}function qpe(e){let t=e;for(let e in t)if(Object.hasOwn(t,e)){let n=t[e];e===`$ref`&&typeof n==`string`&&n.startsWith(`#`)?t[e]=T1+n:t[e]=b4(n)}return e}function Jpe(e){return e.map(e=>b4(e))}function b4(e){return Array.isArray(e)?Jpe([...e]):LC(e)?qpe({...e}):e}var x4;(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.ExpandButton=`Expand Cycle`,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.DeprecatedLabel=`%1 (deprecated)`,e.CycleDetected=`Circular reference ($ref cycle) detected for field "%1". You may choose to expand to the next cycle break`,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)`})(x4||={});function S4(){return fO(`rjsf-array-item-`)}function C4(e){return Array.isArray(e)?e.map(e=>({key:S4(),item:e})):[]}function w4(e){return Array.isArray(e)?e.map(e=>e.item):[]}function Ype(e){return Array.isArray(e.type)?!e.type.includes(`null`):e.type!==`null`}function T4(e,t,n,r){let{addable:i}=O1(r,e.globalUiOptions);return i!==!1&&(i=t.maxItems===void 0||n.length<t.maxItems),i}function E4(e,t,n,r){if(typeof e.items==`function`)try{return e.items(t,n,r)}catch(e){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,e);return}else return e.items}function Xpe(e,t){let{schemaUtils:n,globalFormOptions:r}=e,i=t.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:t2(t)&&Qde(t)&&(i=t.additionalItems),n.getDefaultFormState(i)}function Zpe(e){let{schema:t,fieldPathId:n,uiSchema:r,formData:i=[],disabled:a=!1,readonly:o=!1,autofocus:s=!1,required:c=!1,placeholder:l,onBlur:u,onFocus:d,registry:f,rawErrors:p,name:m,onSelectChange:h}=e,{widgets:g,schemaUtils:_,globalFormOptions:v,globalUiOptions:y}=f,b=i2(_.retrieveSchema(t.items,i),r?.items??r),{widget:x=`select`,title:S,...C}=O1(r,y),w=W2(t,x,g),T=S??t.title??m,E=_.getDisplayLabel(t,r,y),D=v4(g4(``,v,n,!0));return(0,H.jsx)(w,{id:D.$id,name:m,multiple:!0,onChange:h,onBlur:u,onFocus:d,options:{...C,enumOptions:b},schema:t,uiSchema:r,registry:f,value:i,disabled:a,readonly:o,required:c,label:T,hideLabel:!E,placeholder:l,autofocus:s,rawErrors:p,htmlName:D.name})}function Qpe(e){let{schema:t,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:a=!1,autofocus:o=!1,required:s=!1,hideError:c,placeholder:l,onBlur:u,onFocus:d,formData:f=[],registry:p,rawErrors:m,name:h,onSelectChange:g}=e,{widgets:_,schemaUtils:v,globalFormOptions:y,globalUiOptions:b}=p,{widget:x,title:S,...C}=O1(r,b),w=W2(t,x,_),T=S??t.title??h,E=v.getDisplayLabel(t,r,b),D=v4(g4(``,y,n,!0));return(0,H.jsx)(w,{id:D.$id,name:h,multiple:!0,onChange:g,onBlur:u,onFocus:d,options:C,schema:t,uiSchema:r,registry:p,value:f,disabled:i,readonly:a,hideError:c,required:s,label:T,hideLabel:!E,placeholder:l,autofocus:o,rawErrors:m,htmlName:D.name})}function $pe(e){let{schema:t,uiSchema:n,fieldPathId:r,name:i,disabled:a=!1,readonly:o=!1,autofocus:s=!1,required:c=!1,onBlur:l,onFocus:u,registry:d,formData:f=[],rawErrors:p,onSelectChange:m}=e,{widgets:h,schemaUtils:g,globalFormOptions:_,globalUiOptions:v}=d,{widget:y=`files`,title:b,...x}=O1(n,v),S=W2(t,y,h),C=b??t.title??i,w=g.getDisplayLabel(t,n,v),T=v4(g4(``,_,r,!0));return(0,H.jsx)(S,{options:x,id:T.$id,name:i,multiple:!0,onChange:m,onBlur:l,onFocus:u,schema:t,uiSchema:n,value:f,disabled:a,readonly:o,required:c,registry:d,autofocus:s,rawErrors:p,label:C,hideLabel:!w,htmlName:T.name})}function eme(e){let{itemKey:t,index:n,name:r,disabled:i,hideError:a,readonly:o,registry:s,uiOptions:c,parentUiSchema:l,canAdd:u,canRemove:d=!0,canMoveUp:f,canMoveDown:p,rawItemSchema:m,itemData:h,itemUiSchema:g,parentFieldPathId:_,itemErrorSchema:v,autofocus:y,onBlur:x,onFocus:S,onChange:C,rawErrors:w,totalItems:T,title:E,handleAddItem:D,handleCopyItem:O,handleRemoveItem:k,handleReorderItems:A}=e,{schemaUtils:j,fields:{ArraySchemaField:M,SchemaField:N},globalUiOptions:P,globalFormOptions:F}=s,I=(0,b.useMemo)(()=>j.retrieveSchema(m,h),[j,m,h]),L=(0,b.useMemo)(()=>g4(n,F,_),[n,F,_]),ee=M||N,te=B2(`ArrayFieldItemTemplate`,s,c),ne=j.getDisplayLabel(I,g,P),{description:R}=O1(g),z=!!R||!!I.description,{orderable:B=!0,removable:re=!0,copyable:ie=!1}=c,ae={moveUp:B&&f,moveDown:B&&p,copy:ie&&u,remove:re&&d,toolbar:!1};ae.toolbar=Object.keys(ae).some(e=>ae[e]);let oe=(0,b.useCallback)(e=>{D(e,n+1)},[D,n]),se=(0,b.useCallback)(e=>{O(e,n)},[O,n]),ce=(0,b.useCallback)(e=>{k(e,n)},[k,n]),le=(0,b.useCallback)(e=>{A(e,n,n-1)},[A,n]),ue=(0,b.useCallback)(e=>{A(e,n,n+1)},[A,n]);return(0,H.jsx)(te,{children:(0,H.jsx)(ee,{name:r,title:E,index:n,schema:I,uiSchema:g,formData:h,errorSchema:v,fieldPathId:L,required:Ype(I),onChange:C,onBlur:x,onFocus:S,registry:s,disabled:i,readonly:o,hideError:a,autofocus:y,rawErrors:w}),buttonsProps:{fieldPathId:L,disabled:i,readonly:o,canAdd:u,hasCopy:ae.copy,hasMoveUp:ae.moveUp,hasMoveDown:ae.moveDown,hasRemove:ae.remove,index:n,totalItems:T,onAddItem:oe,onCopyItem:se,onRemoveItem:ce,onMoveUpItem:le,onMoveDownItem:ue,registry:s,schema:I,uiSchema:g},itemKey:t,className:`rjsf-array-item`,disabled:i,hasToolbar:ae.toolbar,index:n,totalItems:T,readonly:o,registry:s,schema:I,uiSchema:g,parentUiSchema:l,displayLabel:ne,hasDescription:z})}var D4=(0,b.memo)(eme);function tme(e){let{schema:t,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:a,name:o,title:s,disabled:c=!1,readonly:l=!1,autofocus:u=!1,required:d=!1,hideError:f=!1,registry:p,onBlur:m,onFocus:h,rawErrors:g,onChange:_,keyedFormData:v,handleAddItem:y,handleCopyItem:x,handleRemoveItem:S,handleReorderItems:C}=e,w=t.title||s||o,{schemaUtils:T,fields:E,formContext:D,globalUiOptions:O}=p,{OptionalDataControlsField:k}=E,A=(0,b.useMemo)(()=>O1(n,O),[n,O]),j=(0,b.useMemo)(()=>LC(t.items)?t.items:{},[t.items]),M=(0,b.useMemo)(()=>T.retrieveSchema(j),[T,j]),N=(0,b.useMemo)(()=>w4(v),[v]),P=p4(p,t,d,n),F=i4(a),I=(0,b.useMemo)(()=>T4(p,t,N,n)&&(!P||F),[p,t,N,n,P,F]),L=F?v:[],ee=P?` rjsf-optional-array-field`:``,te=e.childFieldPathId??i,ne=P?(0,H.jsx)(k,{...e,fieldPathId:te}):void 0,R={canAdd:I,items:L.map((e,t)=>{let{key:i,item:a}=e,s=a,b=r?r[t]:void 0,T=E4(n,a,t,D),E={itemKey:i,index:t,name:o&&`${o}-${t}`,registry:p,uiOptions:A,parentUiSchema:n,hideError:f,readonly:l,disabled:c,required:d,title:w?`${w}-${t+1}`:void 0,canAdd:I,canMoveUp:t>0,canMoveDown:t<N.length-1,rawItemSchema:j,parentFieldPathId:te,itemErrorSchema:b,itemData:s,itemUiSchema:T,autofocus:u&&t===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:v.length,handleAddItem:y,handleCopyItem:x,handleRemoveItem:S,handleReorderItems:C,onChange:_};return(0,H.jsx)(D4,{...E},i)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${M.type}${ee}`,disabled:c,fieldPathId:i,uiSchema:n,onAddClick:y,readonly:l,required:d,schema:t,title:w,formData:N,rawErrors:g,registry:p,optionalDataControl:ne};return(0,H.jsx)(B2(`ArrayFieldTemplate`,p,A),{...R})}function nme(e){let{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:a,name:o,title:s,disabled:c=!1,readonly:l=!1,autofocus:u=!1,required:d=!1,hideError:f=!1,registry:p,onBlur:m,onFocus:h,rawErrors:g,keyedFormData:_,onChange:v,handleAddItem:y,handleCopyItem:x,handleRemoveItem:S,handleReorderItems:C}=e,{formData:w=[]}=e,T=t.title||s||o,{fields:E,formContext:D,globalUiOptions:O}=p,k=(0,b.useMemo)(()=>O1(n,O),[n,O]),{OptionalDataControlsField:A}=E,j=p4(p,t,d,n),M=i4(r),N=(0,b.useMemo)(()=>LC(t.items)?t.items:[],[t.items]),P=LC(t.additionalItems),F=e.childFieldPathId??a;w.length<N.length&&(w=w.concat(Array(N.length-w.length)));let I=M?_:[],L=j?` rjsf-optional-array-field`:``,ee=j?(0,H.jsx)(A,{...e,fieldPathId:F}):void 0,te=T4(p,t,w,n)&&P&&(!j||M),ne={canAdd:te,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${L}`,disabled:c,fieldPathId:a,formData:r,items:I.map((e,r)=>{let{key:a,item:s}=e,b=s,E=r>=N.length,O=(E&&LC(t.additionalItems)?t.additionalItems:N[r])||{},A;A=E?n.additionalItems:Array.isArray(n.items)?n.items[r]:E4(n,s,r,D);let j=i?i[r]:void 0,M={index:r,itemKey:a,name:o&&`${o}-${r}`,registry:p,uiOptions:k,parentUiSchema:n,hideError:f,readonly:l,disabled:c,required:d,title:T?`${T}-${r+1}`:void 0,canAdd:te,canRemove:E,canMoveUp:r>=N.length+1,canMoveDown:E&&r<w.length-1,rawItemSchema:O,itemData:b,itemUiSchema:A,parentFieldPathId:F,itemErrorSchema:j,autofocus:u&&r===0,onBlur:m,onFocus:h,rawErrors:g,totalItems:_.length,onChange:v,handleAddItem:y,handleCopyItem:x,handleRemoveItem:S,handleReorderItems:C};return(0,H.jsx)(D4,{...M},a)}),onAddClick:y,readonly:l,required:d,registry:p,schema:t,uiSchema:n,title:T,errorSchema:i,rawErrors:g,optionalDataControl:ee};return(0,H.jsx)(B2(`ArrayFieldTemplate`,p,k),{...ne})}function rme(e=[]){let t=(0,b.useMemo)(()=>q2(e),[e]),[n,r]=(0,b.useState)(()=>({formDataHash:t,keyedFormData:C4(e)})),{keyedFormData:i,formDataHash:a}=n;if(t!==a){let n=Array.isArray(e)?e:[],o=i||[];i=n.length===o.length?o.map((e,t)=>({key:e.key,item:n[t]})):C4(n),a=t,r({formDataHash:a,keyedFormData:i})}let o=(0,b.useCallback)(e=>{let t=w4(e),n=q2(t);return r({formDataHash:n,keyedFormData:e}),t},[]);return{keyedFormData:i,updateKeyedFormData:o}}function ime(e){let{schema:t,uiSchema:n,errorSchema:r,fieldPathId:i,registry:a,formData:o,onChange:s}=e,{globalFormOptions:c,schemaUtils:l,translateString:u}=a,{keyedFormData:d,updateKeyedFormData:f}=rme(o),p=(0,b.useRef)(d);p.current=d;let m=(0,b.useRef)(r);m.current=r;let h=e.childFieldPathId??i,g=(0,b.useCallback)((e,n)=>{e&&e.preventDefault();let r;if(m.current){r={};for(let e of Object.keys(m.current)){let t=parseInt(e,10);n===void 0||t<n?QD(r,[t],m.current[t]):t>=n&&QD(r,[t+1],m.current[t])}}let i={key:S4(),item:Xpe(a,t)},o=[...p.current];n===void 0?o.push(i):o.splice(n,0,i),s(f(o),h.path,r)},[a,t,s,f,h]),_=(0,b.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(m.current){n={};for(let e of Object.keys(m.current)){let r=parseInt(e,10);r<=t?QD(n,[r],m.current[r]):r>t&&QD(n,[r+1],m.current[r])}}let r={key:S4(),item:yE(p.current[t].item)},i=[...p.current];t===void 0?i.push(r):i.splice(t+1,0,r),s(f(i),h.path,n)},[s,f,h]),v=(0,b.useCallback)((e,t)=>{e&&e.preventDefault();let n;if(m.current){n={};for(let e of Object.keys(m.current)){let r=parseInt(e,10);r<t?QD(n,[r],m.current[r]):r>t&&QD(n,[r-1],m.current[r])}}let r=p.current.filter((e,n)=>n!==t);s(f(r),h.path,n)},[s,f,h]),y=(0,b.useCallback)((e,t,n)=>{e&&(e.preventDefault(),e.currentTarget.blur());let r;if(m.current){r={};for(let e of Object.keys(m.current)){let i=parseInt(e,10);i===t?QD(r,[n],m.current[t]):i===n?QD(r,[t],m.current[n]):QD(r,[e],m.current[i])}}function i(){let e=p.current.slice();return e.splice(t,1),e.splice(n,0,p.current[t]),e}let a=i();s(f(a),h.path,r)},[s,f,h]),x=(0,b.useCallback)((e,t,n,r)=>{let i=typeof t.at(-1)==`number`;s(i&&e===void 0?null:e,t,n,r)},[s]),S=(0,b.useCallback)(e=>{s(e,h.path,void 0,h?.$id)},[s,h]),C={...e,formData:o,fieldPathId:h,onSelectChange:S},w={...e,handleAddItem:g,handleCopyItem:_,handleRemoveItem:v,handleReorderItems:y,keyedFormData:d,onChange:x};if(!(`items`in t)){if(!c.useFallbackUiForUnsupportedType)return(0,H.jsx)(B2(`UnsupportedFieldTemplate`,a,O1(n)),{schema:t,fieldPathId:i,reason:u(x4.MissingItems),registry:a});let e={...t,[p1]:{type:void 0}};C.schema=e,w.schema=e}return l.isMultiSelect(C.schema)?(0,H.jsx)(Zpe,{...C}):h2(n)?(0,H.jsx)(Qpe,{...C}):t2(C.schema)?(0,H.jsx)(nme,{...w}):l.isFilesArray(C.schema,n)?(0,H.jsx)($pe,{...C}):(0,H.jsx)(tme,{...w})}function ame(e){let{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:a,registry:o,required:s,disabled:c,readonly:l,hideError:u,autofocus:d,title:f,onChange:p,onFocus:m,onBlur:h,rawErrors:g}=e,{title:_}=t,{widgets:v,translateString:y,globalUiOptions:x}=o,{widget:S=`checkbox`,title:C,label:w=!0,enumNames:T,...E}=O1(r,x),D=W2(t,S,v),O=y(x4.YesLabel),k=y(x4.NoLabel),A,j=C??_??f??n;if(Array.isArray(t.oneOf))A=i2({oneOf:t.oneOf.map(e=>{if(LC(e))return{...e,title:e.title||(e.const===!0?O:k)}}).filter(e=>e)},r);else{let e=t.enum??[!0,!1];A=!T&&e.length===2&&e.every(e=>typeof e==`boolean`)?[{value:e[0],label:e[0]?O:k},{value:e[1],label:e[1]?O:k}]:i2({enum:e},r)}let M=(0,b.useCallback)((e,t,n)=>p(e,i.path,t,n),[p,i]);return(0,H.jsx)(D,{options:{...E,enumOptions:A},schema:t,uiSchema:r,id:i.$id,name:n,onChange:M,onFocus:m,onBlur:h,label:j,hideLabel:!w,value:a,required:s,disabled:c,readonly:l,hideError:u,registry:o,autofocus:d,rawErrors:g,htmlName:i.name})}function ome(e){let[t,n]=(0,b.useState)(!1),{name:r,registry:i,schema:a,uiSchema:o,fieldPathId:s}=e,{globalUiOptions:c}=i,l=B2(`CyclicSchemaExpandTemplate`,i,O1(o,c));if(!t)return(0,H.jsx)(l,{registry:i,schema:a,uiSchema:o,name:r,fieldPathId:s,onExpand:()=>n(!0)});let{fields:u}=i,{SchemaField:d}=u;return(0,H.jsx)(d,{...e,schema:{...a,[x1]:!1}})}function sme(e){return{type:`string`,enum:[`string`,`number`,`boolean`,`object`,`array`],default:`string`,title:e}}function cme(e){let t=typeof e;return t===`string`||t===`number`||t===`boolean`?t:t===`object`?Array.isArray(e)?`array`:`object`:`string`}function lme(e,t){switch(t){case`string`:return String(e);case`number`:{let t=Number(e);return Number.isNaN(t)?0:t}case`boolean`:return!!e;default:return e}}function ume(e){let{id:t,formData:n,displayLabel:r=!0,schema:i,name:a,uiSchema:o,required:s,disabled:c=!1,readonly:l=!1,onBlur:u,onFocus:d,registry:f,fieldPathId:p,onChange:m,errorSchema:h}=e,{translateString:g,fields:_,globalFormOptions:v}=f,[y,x]=(0,b.useState)(cme(n)),S=O1(o),C=v4(g4(`__internal_type_selector`,v,p)),w=g(x4.Type),T=(0,b.useMemo)(()=>sme(w),[w]),E=e=>{e!=null&&(x(e),m(lme(n,e),p.path,h,t))};if(!v.useFallbackUiForUnsupportedType){let{reason:t=g(x4.UnknownFieldType,[String(i.type)])}=e;return(0,H.jsx)(B2(`UnsupportedFieldTemplate`,f,S),{schema:i,fieldPathId:p,reason:t,registry:f})}let D=B2(`FallbackFieldTemplate`,f,S),{SchemaField:O}=_;return(0,H.jsx)(D,{schema:i,registry:f,typeSelector:(0,H.jsx)(O,{fieldPathId:C,name:`${a}__fallback_type`,schema:T,formData:y,onChange:E,onBlur:u,onFocus:d,registry:f,hideLabel:!r,disabled:c,readonly:l,required:s},n?q2(n):`__empty__`),schemaField:(0,H.jsx)(O,{...e,schema:{type:y,title:g(x4.Value),...y===`object`&&{additionalProperties:!0}}})})}var O4;(function(e){e.ROW=`ui:row`,e.COLUMN=`ui:col`,e.COLUMNS=`ui:columns`,e.CONDITION=`ui:condition`})(O4||={});var k4;(function(e){e.ALL=`all`,e.SOME=`some`,e.NONE=`none`})(k4||={});var dme=/^\$lookup=(.+)/,A4=`layoutGrid`;`${A4}`;function j4(e,t){return e??t}function fme(e){return/^\d+?$/.test(e)}var M4=V2();function pme(e,t,n,r,i){let a=Y(n,[D1],{}),o=Y(n,e),s={...Y(o,[E1],{}),...t,...a},c={...o};jD(s)||QD(c,[E1],s),jD(a)||QD(c,[D1],a);let{readonly:l}=O1(c);return(i===!0||ID(l)&&r===!0)&&(l=!0,gD(s,`readonly`)?QD(c,[E1,_1],!0):QD(c,`ui:${_1}`,!0)),{fieldUiSchema:c,uiReadonly:l}}function mme(e,t,n=`$0m3tH1nG Un3xP3cT3d`){let r=MT([t]).sort(),i=MT([n]).sort();switch(e){case k4.ALL:return MD(r,i);case k4.SOME:return ED(r,i).length>0;case k4.NONE:return ED(r,i).length===0;default:return!1}}function N4(e,t,n){let r={},i=e[t];if(IT(i)){let{children:e,className:t,...a}=i;if(i=e,t){let e=t.split(` `).map(e=>s4(n,e,e)).join(` `);r={...a,className:e}}else r=a}if(!Array.isArray(i))throw TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:i,gridProps:r}}function P4(e,t,n){let r,i=t;if(fme(n)&&e&&e?.type===`array`&&gD(e,`items`)){let a=Number(n),o=e[p1];r=Array.isArray(o)?a>o.length?lD(o):o[a]:o,i={$id:t.$id,path:[...t.path.slice(0,t.path.length-1),a]}}return{rawSchema:r,fieldPathId:i}}function hme(e,t,n,r,i){let{schemaUtils:a,globalFormOptions:o}=e,s=n,c=i,l=t.split(`.`),u=l.pop(),d=a.retrieveSchema(s,r),f=r,p=d.readOnly;l.forEach(e=>{if(c=g4(e,o,c),gD(d,`properties`))s=Y(d,[g1,e],{});else if(d&&(gD(d,`oneOf`)||gD(d,`anyOf`))){let t=gD(d,`oneOf`)?h1:l1;s=Y(a.findSelectedOptionInXxxOf(d,e,t,f),[g1,e],{})}else{let t=P4(d,c,e);s=t.rawSchema??{},c=t.fieldPathId}f=Y(f,e,{}),d=a.retrieveSchema(s,f),p=j4(d.readOnly,p)});let m,h=!1;if(jD(d)&&(d=void 0),d&&u){if(d&&(gD(d,`oneOf`)||gD(d,`anyOf`))){let e=gD(d,`oneOf`)?h1:l1;d=a.findSelectedOptionInXxxOf(d,u,e,f)}c=g4(u,o,c),h=d!==void 0&&Array.isArray(d.required)&&SD(d.required,u);let e=P4(d,c,u);if(e.rawSchema?(d=e.rawSchema,c=e.fieldPathId):(d=Y(d,[g1,u]),d&&=a.retrieveSchema(d)),p=j4(d?.readOnly,p),d&&(gD(d,`oneOf`)||gD(d,`anyOf`))){let e=gD(d,`oneOf`)?h1:l1,t=Q1(d);m={options:d[e],hasDiscriminator:!!t}}}return{schema:d,isRequired:h,isReadonly:p,optionsInfo:m,fieldPathId:c}}function gme(e,t){let n=e;return vD(n)&&(n=s4(t,n)),$C(n)?n:null}function _me(e,t){let n,r=null,i={},a;if(vD(t)||ID(t))n=t??``;else{let{name:o=``,render:s,...c}=t;n=o,i=c,jD(i)||dD(i,(t,n)=>{if(vD(t)){let r=dme.exec(t);if(Array.isArray(r)&&r.length>1){let t=r[1];i[n]=s4(e,t,t)}}}),r=gme(s,e),!o&&r&&(a=(0,H.jsx)(r,{...c,"data-testid":M4.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:a}}function F4(e){let{childrenLayoutGridSchemaId:t,...n}=e,{registry:r,schema:i,formData:a}=n,{schemaUtils:o}=r,s=o.retrieveSchema(i,a);return t.map(e=>(0,b.createElement)(I4,{...n,key:`layoutGrid-${q2(e)}`,schema:s,layoutGridSchema:e}))}function vme(e){let{layoutGridSchema:t,...n}=e,{formData:r,registry:i}=n,{children:a,gridProps:o}=N4(t,O4.CONDITION,i),{operator:s,field:c=``,value:l}=o;return mme(s,Y(r,c,null),l)?(0,H.jsx)(F4,{...n,childrenLayoutGridSchemaId:a}):null}function yme(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=N4(t,O4.COLUMN,r);return(0,H.jsx)(B2(`GridTemplate`,r,O1(i)),{column:!0,"data-testid":M4.col,...o,children:(0,H.jsx)(F4,{...n,childrenLayoutGridSchemaId:a})})}function bme(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=N4(t,O4.COLUMNS,r),s=B2(`GridTemplate`,r,O1(i));return a.map(e=>(0,H.jsx)(s,{column:!0,"data-testid":M4.col,...o,children:(0,H.jsx)(F4,{...n,childrenLayoutGridSchemaId:[e]})},`column-${q2(e)}`))}function xme(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=N4(t,O4.ROW,r);return(0,H.jsx)(B2(`GridTemplate`,r,O1(i)),{...o,"data-testid":M4.row,children:(0,H.jsx)(F4,{...n,childrenLayoutGridSchemaId:a})})}function Sme(e){let{gridSchema:t,schema:n,uiSchema:r,errorSchema:i,fieldPathId:a,onBlur:o,onFocus:s,formData:c,readonly:l,registry:u,layoutGridSchema:d,...f}=e,{onChange:p}=f,{fields:m}=u,{SchemaField:h,LayoutMultiSchemaField:g}=m,_=_me(u,t),{name:v,UIComponent:y,uiProps:b}=_,{schema:x,isRequired:S,isReadonly:C,optionsInfo:w,fieldPathId:T}=hme(u,v,n,c,a),E=v4(T);if(_.rendered)return _.rendered;if(x){let e=w?.hasDiscriminator?g:h,{fieldUiSchema:t,uiReadonly:n}=pme(v,b,r,C,l);return(0,H.jsx)(e,{"data-testid":w?.hasDiscriminator?M4.layoutMultiSchemaField:M4.field,...f,name:v,required:S,readonly:n,schema:x,uiSchema:t,errorSchema:Y(i,v),fieldPathId:E,formData:Y(c,v),onChange:p,onBlur:o,onFocus:s,options:w?.options,registry:u})}return y?(0,H.jsx)(y,{"data-testid":M4.uiComponent,...f,name:v,required:S,formData:c,readOnly:!!C||l,errorSchema:i,uiSchema:r,schema:n,fieldPathId:a,onBlur:o,onFocus:s,registry:u,...b}):null}function I4(e){let{uiSchema:t}=e,{layoutGridSchema:n}=e,r=O1(t);if(!n&&`layoutGrid`in r&&LC(r.layoutGrid)&&(n=r[A4]),LC(n)){if(O4.ROW in n)return(0,H.jsx)(xme,{...e,layoutGridSchema:n});if(O4.COLUMN in n)return(0,H.jsx)(yme,{...e,layoutGridSchema:n});if(O4.COLUMNS in n)return(0,H.jsx)(bme,{...e,layoutGridSchema:n});if(O4.CONDITION in n)return(0,H.jsx)(vme,{...e,layoutGridSchema:n})}return(0,H.jsx)(Sme,{...e,gridSchema:n})}I4.TEST_IDS=M4;function Cme(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,name:s}=e,c=O1(i,o.globalUiOptions),{title:l}=c,{title:u}=r,d=l||n||u||s;return d?(0,H.jsx)(B2(`TitleFieldTemplate`,o,c),{id:$2(t),title:d,required:a,schema:r,uiSchema:i,registry:o}):null}function L4(e,t,n){return e.map(({schema:e})=>e).find(e=>{let r=Y(e,[g1,t]);return Y(r,d1,Y(r,u1,`!@#!@$@#$!@$#`))===n})}function R4(e,t,n,r,i){let a=t.map(e=>n.retrieveSchema(e,i)),o=e;gD(e,`oneOf`)?o={...e,[h1]:a}:gD(e,`anyOf`)&&(o={...e,[l1]:a});let s=i2(o,r);if(!s)throw Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return s}function wme(e){let{name:t,baseType:n,disabled:r=!1,formData:i,fieldPathId:a,onBlur:o,onChange:s,options:c,onFocus:l,registry:u,uiSchema:d,schema:f,autofocus:p,readonly:m,required:h,errorSchema:g,hideError:_=!1}=e,{widgets:v,schemaUtils:y,globalUiOptions:x}=u,[S,C]=(0,b.useState)(R4(f,c,y,d,i)),w=Y(a,`$id`),T=Q1(f),E=B2(`FieldErrorTemplate`,u,c),D=B2(`FieldTemplate`,u,c);(0,b.useEffect)(()=>{C(R4(f,c,y,d,i))},[q2(f),q2(c),y,d?q2(d):``,i?q2(i):``]);let{widget:O=T?`radio`:`select`,title:k=``,placeholder:A=``,optionsSchemaSelector:j=T,hideError:M,...N}=O1(d);if(!j)throw Error(`No selector field provided for the LayoutMultiSchemaField`);let P=Y(i,j),F=Y(S[0]?.schema,[g1,j],{}),I=L4(S,j,P);F=F?.type?F:{...F,type:I?.type||n};let L=W2(F,O,v),ee=M===void 0?_:!!M,te=Y(g,[f1],[]),ne=WD(g,[f1]),R=y.getDisplayLabel(f,d,x),z=e=>{if(r||m)return;let t=L4(S,j,e),n=L4(S,j,P),o=y.sanitizeDataForNewSchema(t,n,i);o&&t&&(o=y.getDefaultFormState(t,o,`excludeObjectChildren`)),o&&QD(o,j,e),s(o,a.path,void 0,w)},B={enumOptions:S,...N},re=!ee&&te.length>0?(0,H.jsx)(E,{fieldPathId:a,schema:f,errors:te,registry:u}):void 0;return(0,H.jsx)(D,{fieldPathId:a,id:w,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&jD(S),uiSchema:d,required:h,readonly:!!m,registry:u,displayLabel:R,errors:re,onChange:s,onKeyRename:yw,onKeyRenameBlur:yw,onRemoveProperty:yw,children:(0,H.jsx)(L,{id:w,name:t,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&jD(S),uiSchema:d,autofocus:p,readonly:m,required:h,registry:u,multiple:!1,rawErrors:te,hideError:ee,hideLabel:!R,errorSchema:ne,placeholder:A,onChange:z,onBlur:o,onFocus:l,value:P,options:B,htmlName:a.name})})}function z4(e){let{name:t,disabled:n=!1,errorSchema:r={},formData:i,fieldPathId:a,onBlur:o,onChange:s,onFocus:c,options:l,readonly:u,registry:d,required:f=!1,schema:p,uiSchema:m}=e,{schemaUtils:h}=d,g=(0,b.useMemo)(()=>l.map(e=>h.retrieveSchema(e,i)),[l,h,q2(i??null)]),[_,v]=(0,b.useState)(()=>{let e=Q1(p);return h.getClosestMatchingOption(i,g,0,e)}),y=(0,b.useRef)(!1),x=(0,b.useRef)(i),S=(0,b.useRef)(a.$id);(0,b.useEffect)(()=>{let e=x.current,t=S.current;if(x.current=i,S.current=a.$id,!U1(i,e)&&a.$id===t){if(y.current){y.current=!1;return}let e=Q1(p),t=h.getClosestMatchingOption(i,g,_,e);t!==_&&v(t)}});let C=`${a.$id}${p.oneOf?`__oneof_select`:`__anyof_select`}`,w=(0,b.useCallback)(e=>{if(n||u)return;let t=e===void 0?-1:parseInt(e,10);if(t===_)return;let r=t>=0?g[t]:void 0,o=_>=0?g[_]:void 0,c=h.sanitizeDataForNewSchema(r,o,i);r&&(c=h.getDefaultFormState(r,c,`excludeObjectChildren`)),v(t),y.current=!0,s(c,a.path,void 0,C)},[_,g,n,u,h,i,a,s,C]),{widgets:T,fields:E,translateString:D,globalUiOptions:O}=d,{SchemaField:k}=E,A=B2(`MultiSchemaFieldTemplate`,d,O),j=p4(d,p,f,m),M=i4(i),{widget:N=`select`,placeholder:P,autofocus:F,autocomplete:I,title:L=p.title,...ee}=O1(m,O),te=W2({type:`number`},N,T),ne=Y(r,f1,[]),R=WD(r,[f1]),z=h.getDisplayLabel(p,m,O),B=_>=0&&g[_]||null,re;if(B){let{required:e,type:t}=p,n={};e&&(n.required=e),t!==void 0&&!(`type`in B)&&(n.type=t),re=Object.keys(n).length>0?t0(n,B):B}let ie=[];`oneOf`in p&&m&&`oneOf`in m?Array.isArray(m.oneOf)?ie=m[h1]:console.warn(`uiSchema.oneOf is not an array for "${L||t}"`):`anyOf`in p&&m&&`anyOf`in m&&(Array.isArray(m.anyOf)?ie=m[l1]:console.warn(`uiSchema.anyOf is not an array for "${L||t}"`));let ae=m;_>=0&&ie.length>_&&(ae=ie[_]);let oe=L?x4.TitleOptionPrefix:x4.OptionPrefix,se=L?[L]:[],ce=g.map((e,t)=>{let{title:n=e.title}=O1(ie[t]);return{label:n||D(oe,se.concat(String(t+1))),value:t}});return(0,H.jsx)(A,{schema:p,registry:d,uiSchema:m,selector:!j||M?(0,H.jsx)(te,{id:C,name:`${t}${p.oneOf?`__oneof_select`:`__anyof_select`}`,schema:{type:`number`,default:0},onChange:w,onBlur:o,onFocus:c,disabled:n||jD(ce),multiple:!1,rawErrors:ne,errorSchema:R,value:_>=0?_:void 0,options:{enumOptions:ce,...ee},registry:d,placeholder:P,autocomplete:I,autofocus:F,label:L??t,hideLabel:!z,readonly:u}):void 0,optionSchemaField:re&&re.type!==`null`&&(0,H.jsx)(k,{...e,schema:re,uiSchema:ae})||null})}function Tme(e){let{formData:t,onChange:n,fieldPathId:r}=e;return(0,b.useEffect)(()=>{t===void 0&&n(null,r.path)},[r,t,n]),null}var Eme=/\.([0-9]*0)*$/,Dme=/[0.]0*$/;function Ome(e){let{registry:t,onChange:n,formData:r,value:i}=e,[a,o]=(0,b.useState)(i),{StringField:s}=t.fields,c=r,l=(0,b.useCallback)((e,t,r,i)=>{o(e);let a=`${e}`.startsWith(`.`)?`0${e}`:e,s=typeof a==`string`&&Eme.exec(a)?o1(a.replace(Dme,``)):o1(a);n(s,t,r,i)},[n]);if(typeof a==`string`&&typeof c==`number`){let e=RegExp(`^(${String(c).replace(`.`,`\\.`)})?\\.?0*$`);a.match(e)&&(c=a)}return(0,H.jsx)(s,{...e,formData:c,onChange:l})}var B4;function kme(e){if(!B4)if(typeof document<`u`)B4=document.createElement(`textarea`);else return;var t=`&`+e+`;`;B4.innerHTML=t;var n=B4.value;return n===t?void 0:n}var Z=32,Q=9,V4=13,H4=10,U4=96,W4=126,G4=91,K4=94,q4=62,J4=35,Y4=37,X4=45,Z4=61,Q4=92,$4=42,e3=95,t3=60,n3=64,r3=93,i3=33,a3=38,o3=58,s3=70,c3=102,l3=104,u3=119,d3=116,f3=112,p3=115,Ame=160,jme=12,Mme=44,m3=59,h3=63,g3=46,_3=47,v3=39,y3=34,b3=43,x3=124,S3=123,C3=125,w3=40,T3=41,Nme=120,Pme=88,E3=30,D3=48,O3=57,k3=65,A3=90,j3=97,M3=122,N3=128,P3=32,$={blockQuote:0,breakLine:1,breakThematic:2,codeBlock:3,codeInline:4,footnote:5,footnoteReference:6,frontmatter:7,gfmTask:8,heading:9,htmlBlock:10,htmlComment:11,htmlSelfClosing:12,image:13,link:14,orderedList:15,paragraph:16,ref:17,refCollection:18,table:19,text:20,textFormatted:21,unorderedList:22};function Fme(e){if(!U3(e,`---`))return null;let t=3;for(;t<e.length&&(e[t]===` `||e[t]===` `);)t++;if(t<e.length&&e[t]===`\r`&&t++,t>=e.length||e[t]!==`
234
+ `)return null;t++;let n=!1;for(;t<e.length;){let r=t;for(;t<e.length&&e[t]!==`
235
+ `&&e[t]!==`\r`;)t++;if(t>=e.length)break;let i=t;if(e[t]===`\r`&&t++,t<e.length&&e[t]===`
236
+ `&&t++,U3(e,`---`,r))return{endPos:t,hasValidYaml:n};if(!n){let t=Gme(e,r,i);if(t<i){let r=e.charCodeAt(t);if(r>=j3&&r<=M3||r>=k3&&r<=A3||r>=D3&&r<=O3||r===e3){for(t++;t<i&&(r=e.charCodeAt(t),r>=j3&&r<=M3||r>=k3&&r<=A3||r>=D3&&r<=O3||r===e3||r===X4||r===g3);)t++;t<i&&e.charCodeAt(t)===o3&&(t++,t>=i?n=!0:(r=e.charCodeAt(t),(r===Z||r===Q)&&(n=!0)))}}}}return null}var Ime=/&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi,Lme={class:`className`,for:`htmlFor`,allowfullscreen:`allowFullScreen`,allowtransparency:`allowTransparency`,autocomplete:`autoComplete`,autofocus:`autoFocus`,autoplay:`autoPlay`,cellpadding:`cellPadding`,cellspacing:`cellSpacing`,charset:`charSet`,classid:`classId`,colspan:`colSpan`,contenteditable:`contentEditable`,contextmenu:`contextMenu`,crossorigin:`crossOrigin`,enctype:`encType`,formaction:`formAction`,formenctype:`formEncType`,formmethod:`formMethod`,formnovalidate:`formNoValidate`,formtarget:`formTarget`,frameborder:`frameBorder`,hreflang:`hrefLang`,inputmode:`inputMode`,keyparams:`keyParams`,keytype:`keyType`,marginheight:`marginHeight`,marginwidth:`marginWidth`,maxlength:`maxLength`,mediagroup:`mediaGroup`,minlength:`minLength`,novalidate:`noValidate`,radiogroup:`radioGroup`,readonly:`readOnly`,rowspan:`rowSpan`,spellcheck:`spellCheck`,srcdoc:`srcDoc`,srclang:`srcLang`,srcset:`srcSet`,tabindex:`tabIndex`,usemap:`useMap`,viewbox:`viewBox`},Rme={};function F3(e){if(!e)return Rme;var t={};for(var n in e){var r=Lme[n.toLowerCase()];if(r)t[r]=e[n];else{var i=n.indexOf(`:`);i===-1?t[n]=e[n]:t[n.slice(0,i)+n[i+1].toUpperCase()+n.slice(i+2)]=e[n]}}return t}var zme=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;function I3(e){return e.indexOf(`&`)===-1?e:e.replace(Ime,(e,t)=>{var n=kme(t);if(n)return n;if(t[0]===`#`){var r=t[1]===`x`||t[1]===`X`?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return r===0||r>=55296&&r<=57343||r>1114111?`�`:r<=65535?String.fromCharCode(r):String.fromCharCode(55296+(r-65536>>10),56320+(r-65536&1023))}return e})}var L3=/(javascript|vbscript|data(?!:image)):/i;function R3(e){if(L3.test(e))return null;if(e.indexOf(`%`)===-1)return e;try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,``);if(L3.test(t))return null}catch{return null}return e}var z3={},B3,V3;for(B3=[192,193,194,195,196,197,224,225,226,227,228,229,230,198],V3=0;V3<B3.length;V3++)z3[B3[V3]]=`a`;for(z3[231]=z3[199]=`c`,z3[240]=z3[208]=`d`,B3=[200,201,202,203,233,232,234,235],V3=0;V3<B3.length;V3++)z3[B3[V3]]=`e`;for(B3=[207,239,206,238,205,237,204,236],V3=0;V3<B3.length;V3++)z3[B3[V3]]=`i`;for(z3[209]=z3[241]=`n`,B3=[248,216,339,338,213,245,212,244,211,243,210,242],V3=0;V3<B3.length;V3++)z3[B3[V3]]=`o`;for(B3=[220,252,219,251,218,250,217,249],V3=0;V3<B3.length;V3++)z3[B3[V3]]=`u`;z3[376]=z3[255]=z3[221]=z3[253]=`y`;function H3(e){for(var t=``,n=-1,r=e.length,i=0;i<r;i++){var a=e.charCodeAt(i);if(a>=j3&&a<=M3||a>=D3&&a<=O3){n<0&&(n=i);continue}if(a>=k3&&a<=A3){n>=0&&(t+=e.slice(n,i),n=-1),t+=String.fromCharCode(a+P3);continue}if(a===Z||a===X4){n>=0&&(t+=e.slice(n,i),n=-1),t+=`-`;continue}n>=0&&(t+=e.slice(n,i),n=-1);var o=z3[a];o&&(t+=o)}return n>=0&&(t+=e.slice(n)),t}function U3(e,t,n){return e.startsWith(t,n)}var W3=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`,`circle`,`ellipse`,`line`,`path`,`polygon`,`polyline`,`rect`,`use`,`stop`,`animate`,`set`]);function G3(e){let t=e.toLowerCase();if(W3.has(t))return!0;let n=t.indexOf(`:`);return n===-1?!1:(t=t.slice(n+1),W3.has(t))}var K3=1,q3=2,J3=4,Y3=8,Bme=16,X3=32,Z3=64,Vme=(function(){var e=new Uint8Array(128),t;for(e[Q]=K3,e[H4]=K3|q3,e[jme]=K3,e[V4]=K3|q3,e[Z]=K3,t=i3;t<=_3;t++)e[t]=J3;for(t=o3;t<=n3;t++)e[t]=J3;for(t=G4;t<=U4;t++)e[t]=J3;for(t=S3;t<=W4;t++)e[t]=J3;for(t=D3;t<=O3;t++)e[t]=Bme;for(t=k3;t<=A3;t++)e[t]=Y3;for(t=j3;t<=M3;t++)e[t]=Y3;return e})(),Hme=/[\p{P}\p{S}]/u,Ume=/\p{Zs}/u,Q3=[];function Wme(e){var t=e.indexOf(`\r`),n=e.indexOf(`\0`);if(t===-1&&n===-1)return e;var r=e.length;Q3.length=0;var i=0,a=0;for(a=t===-1?n:n===-1||t<n?t:n;a<r;a++){var o=e.charCodeAt(a);o===V4?(i<a&&Q3.push(e.slice(i,a)),a+1<r&&e.charCodeAt(a+1)===H4&&a++,Q3.push(`
237
+ `),i=a+1):o===0&&(i<a&&Q3.push(e.slice(i,a)),Q3.push(`�`),i=a+1)}return i<r&&Q3.push(e.slice(i)),Q3.join(``)}function Gme(e,t,n){let r=n??e.length;for(;t<r&&(e[t]===` `||e[t]===` `);)t++;return t}function $3(e){if(!e)return!1;for(var t in e)return!0;return!1}function Kme(e){return{attrs:{},children:[{type:$.text,text:e}],d:!0,type:$.htmlBlock,tag:`header`}}var qme=/^\n+/;function Jme(e){for(var t=e.length;t>0&&(e[t-1]===`
238
+ `||e[t-1]===`\r`);)t--;return e.slice(0,t).replace(qme,``)+`
239
+
240
+ `}function e6(e){if((e.type===$.htmlSelfClosing||e.type===$.htmlBlock)&&e.b)return[];if(e.type===$.paragraph){var t=e.children;return t?t.flatMap(e6):[]}return e.type===$.text?e.text?.trim()?[e]:[]:e.type===$.htmlBlock&&e.children?[{...e,children:e.children?.flatMap(e6)}]:[e]}function t6(e){for(var t=0;t<e.length;t++){if(e[t].type===$.htmlBlock){var n=e[t],r=!1;if(n.d&&n.a&&t===e.length-1){var i=`</`+String(n.tag).toLowerCase()+`>`,a=n.a.toLowerCase().indexOf(i);a!==-1&&n.a.slice(a+i.length).replace(/<\/[a-z][a-z0-9-]*\s*>/gi,``).trim()&&(r=!0)}r||(n.d=!1)}`children`in e[t]&&e[t].children&&t6(e[t].children)}}function Yme(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.type===$.paragraph&&r.children)for(var i=r.children,a=0;a<i.length;a++){var o=i[a];if(o.type===$.htmlSelfClosing&&o.b&&o.tag.toLowerCase()===t){var s=e.slice(0,n);a>0&&s.push({type:$.paragraph,children:i.slice(0,a)});var c=[];if(a+1<i.length){var l=i.slice(a+1).filter(function(e){return!(e.type===$.htmlSelfClosing&&e.b)});l.length>0&&(c=l)}return c=c.concat(e.slice(n+1)),{found:!0,beforeClose:s,afterClose:c}}}if((r.type===$.htmlSelfClosing||r.type===$.htmlBlock)&&r.b&&r.tag.toLowerCase()===t)return{found:!0,beforeClose:e.slice(0,n),afterClose:e.slice(n+1)}}return{found:!1,beforeClose:e,afterClose:[]}}function Xme(e,t,n){var r=e.replace(RegExp(`\\s*</`+t+`>\\s*$`,`i`),``);return n?o6(r):r}function n6(e){var t=``;for(var n in e){var r=e[n];r===!0?t+=` `+n:r!=null&&r!==!1&&(t+=` `+n+`="`+String(r)+`"`)}return t}function Zme(e){var t=[];if(!e)return t;for(var n in e)n.charCodeAt(0)===94&&t.push({identifier:n,footnote:e[n].target});return t}function r6(e,t,n){if(t.indexOf(`.`)===-1)return e?.[t]||n;for(var r=e,i=t.split(`.`),a=0;a<i.length&&(r=r?.[i[a]],r!==void 0);)a++;return r||n}function Qme(e){for(var t=!1,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=Z||r===y3||r===Y4||r===t3||r===q4||r===G4||r===Q4||r===r3||r===K4||r===U4||r>=123){t=!0;break}}if(!t)return e;for(var i=``,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r===Y4&&n+2<e.length){var a=e.charCodeAt(n+1),o=e.charCodeAt(n+2);if((a>=D3&&a<=O3||a>=k3&&a<=s3||a>=j3&&a<=c3)&&(o>=D3&&o<=O3||o>=k3&&o<=s3||o>=j3&&o<=c3)){i+=e[n]+e[n+1]+e[n+2],n+=2;continue}}i+=encodeURI(e[n])}return i}function $me(...e){return e.filter(Boolean).join(` `)}var ehe=new Set([`title`,`textarea`,`style`,`xmp`,`iframe`,`noembed`,`noframes`,`script`,`plaintext`]),i6=/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;function a6(e){return ehe.has(e.toLowerCase())}function the(e){return i6.lastIndex=0,i6.test(e)}function o6(e){return i6.lastIndex=0,e.replace(i6,function(e,t,n,r){return`&lt;`+t+n+r})}var nhe=/^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/,rhe=/^<[A-Z]/,s6=[`script`,`pre`,`style`,`textarea`],c6=new Set(s6),ihe=/<(?:pre|script|style|textarea)\b/i,l6=/<(?:pre|script|style|textarea)\b/iy,u6=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m,d6=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im,f6=new Uint8Array(128);(function(){for(var e=[U4,$4,e3,W4,Z4,G4,i3,t3,Q4,a3,H4,l3,u3,c3],t=0;t<e.length;t++)f6[e[t]]=1})();var p6=/([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;function ahe(e){return c6.has(e)}function ohe(e){return ihe.test(e)}function m6(e,t,n){for(var r=t,i=n;r<i&&(e.charCodeAt(r)===Z||e.charCodeAt(r)===Q);)r++;if(r>=i)return!1;e.charCodeAt(r)===x3&&r++;for(var a=0;r<i;){for(;r<i&&(e.charCodeAt(r)===Z||e.charCodeAt(r)===Q);)r++;if(r>=i)break;if(e.charCodeAt(r)===x3&&a>0){for(var o=r+1;o<i&&(e.charCodeAt(o)===Z||e.charCodeAt(o)===Q);)o++;if(o>=i)return!0}if(e.charCodeAt(r)===o3&&r++,r>=i||e.charCodeAt(r)!==X4)return!1;for(;r<i&&e.charCodeAt(r)===X4;)r++;for(r<i&&e.charCodeAt(r)===o3&&r++,a++;r<i&&(e.charCodeAt(r)===Z||e.charCodeAt(r)===Q);)r++;if(r<i)if(e.charCodeAt(r)===x3)r++;else return!1}return a>0}function h6(e,t){if(e.charCodeAt(t)!==t3)return null;let n=t+1,r=e.length,i=!1;e.charCodeAt(n)===_3&&(n++,i=!0);let a=n,o=e.charCodeAt(n);if(!(o>=j3&&o<=M3||o>=k3&&o<=A3))return null;for(;n<r&&(e.charCodeAt(n)>=j3&&e.charCodeAt(n)<=M3||e.charCodeAt(n)>=k3&&e.charCodeAt(n)<=A3||e.charCodeAt(n)>=D3&&e.charCodeAt(n)<=O3||e.charCodeAt(n)===X4);)n++;let s=e.slice(a,n);if(!s)return null;let c=n;for(;n<r&&(e.charCodeAt(n)===Z||e.charCodeAt(n)===Q||e.charCodeAt(n)===H4);)n++;let l=e.slice(c,n);if(n===c&&n<r){var u=e.charCodeAt(n);if(u!==q4&&u!==_3)return null}let d=n,f={},p=!1;for(;n<r;){let t=e.charCodeAt(n);if(t===q4){let t=e.slice(d,n);return{tag:s,attrs:f,selfClosing:!1,end:n+1,rawAttrs:t,whitespaceBeforeAttrs:l,isClosing:i,hasSpaceBeforeSlash:p}}if(t===Z||t===Q||t===H4){n++;continue}if(t===_3&&n+1<r&&e.charCodeAt(n+1)===q4){let t=e.slice(d,n);return p=n>d&&e.charCodeAt(n-1)===Z,{tag:s,attrs:f,selfClosing:!0,end:n+2,rawAttrs:t,whitespaceBeforeAttrs:l,isClosing:i,hasSpaceBeforeSlash:p}}var m=n,h=e.charCodeAt(n);if(!(h>=j3&&h<=M3||h>=k3&&h<=A3||h===e3||h===o3))return null;for(n++;n<r;){var g=e.charCodeAt(n);if(g>=j3&&g<=M3||g>=k3&&g<=A3||g>=D3&&g<=O3||g===e3||g===g3||g===o3||g===X4)n++;else break}for(var _=e.slice(m,n);n<r&&(e.charCodeAt(n)===Z||e.charCodeAt(n)===Q);)n++;if(e.charCodeAt(n)!==Z4){f[_]=``;continue}for(n++;n<r&&(e.charCodeAt(n)===Z||e.charCodeAt(n)===Q);)n++;var v=e.charCodeAt(n);if(v===y3||v===v3){n++;for(var y=n;n<r&&e.charCodeAt(n)!==v;)n++;if(n>=r)return null;if(f[_]=e.slice(y,n),n++,n<r){var b=e.charCodeAt(n);if(b!==Z&&b!==Q&&b!==H4&&b!==q4&&b!==_3)return null}}else if(v===S3){var x=1,y=n;for(n++;n<r&&x>0;){var g=e.charCodeAt(n);g===S3?x++:g===C3&&x--,n++}f[_]=e.slice(y,n)}else{for(var y=n;n<r;){var S=e.charCodeAt(n);if(S===Z||S===Q||S===q4||S===H4||S===y3||S===v3||S===Z4||S===t3||S===U4)break;n++}if(n===y)return null;f[_]=e.slice(y,n)}}return null}function she(e,t,n){if(!n.optimizeForStreaming&&e.indexOf(`[`)===-1)return!1;for(var r=0,i=e.length,a=!1,o=!1;r<i;){for(var s=e.indexOf(`
241
+ `,r),c=s<0?i:s,l=r,u=0;l<c&&u<4;)if(e.charCodeAt(l)===Z)u++,l++;else if(e.charCodeAt(l)===Q)u+=4,l++;else break;if(l>=c){a=!1,r=s<0?i:s+1;continue}if(u<4){var d=e.charCodeAt(l);if(d===U4||d===W4){for(var f=d,p=0,m=l;m<c&&e.charCodeAt(m)===f;)p++,m++;if(p>=3){var h=!0;if(f===U4){for(var g=m;g<c;g++)if(e.charCodeAt(g)===U4){h=!1;break}}if(h){a=!1;for(var _=s<0?i:s+1;_<i;){for(var v=_,y=0;v<i&&y<4;){var b=e.charCodeAt(v);if(b===Z)y++,v++;else if(b===Q)y+=4,v++;else break}if(y<4&&v<i&&e.charCodeAt(v)===f){for(var x=0;v<i&&e.charCodeAt(v)===f;)x++,v++;if(x>=p){for(;v<i&&(e.charCodeAt(v)===Z||e.charCodeAt(v)===Q);)v++;if(v>=i||e.charCodeAt(v)===H4){r=v>=i?i:v+1;break}}}for(;_<i&&e.charCodeAt(_)!==H4;)_++;_<i&&_++}_>=i&&(r=i,o=!0);continue}}}}for(var S=l;S<c&&e.charCodeAt(S)===q4;){S++,S<c&&e.charCodeAt(S)===Z&&S++;for(var C=0;S<c&&C<4;)if(e.charCodeAt(S)===Z)C++,S++;else if(e.charCodeAt(S)===Q)C+=4,S++;else break;if(C>=4)break;a=!1}if(!a&&u<4&&S<c&&e.charCodeAt(S)===G4&&!(S+1<i&&e.charCodeAt(S+1)===K4)){var w=g6(e,S,t);if(w){r=w,a=!1;continue}}var T=e.charCodeAt(l);if(T===J4&&u<4)a=!1;else if(u<4&&(T===X4||T===$4||T===e3)){for(var E=l,D=0;E<c;){var O=e.charCodeAt(E);if(O===T)D++;else if(O!==Z&&O!==Q)break;E++}a=!(D>=3&&E>=c)}else a=!0;r=s<0?i:s+1}return o}function g6(e,t,n){let r=e.length;if(e.charCodeAt(t)!==G4)return null;let i=t+1<r&&e.charCodeAt(t+1)===K4,a=t+1;for(;a<r;){var o=e.charCodeAt(a);if(o===r3){a++;break}if(o===G4)return null;o===Q4&&a+1<r&&a++,a++}if(a>r||e.charCodeAt(a-1)!==r3)return null;let s=e.slice(t+1,a-1);if(s.length>999)return null;let c=b6(s);if(!c||a>=r||e.charCodeAt(a)!==o3)return null;a++;let l=!1;for(;a<r;){let t=e.charCodeAt(a);if(t===Z||t===Q)a++;else if(t===H4&&!l)l=!0,a++;else break}if(i){let t=e.indexOf(`
242
+ `,a),i=t<0?r:t;return n[c]={target:e.slice(a,i).trim(),title:void 0},t<0?r:t+1}var u;if(a<r&&e.charCodeAt(a)===t3){a++;for(var d=a;a<r&&e.charCodeAt(a)!==q4&&e.charCodeAt(a)!==H4;)e.charCodeAt(a)===Q4&&a+1<r&&a++,a++;if(a>=r||e.charCodeAt(a)!==q4)return null;u=e.slice(d,a),a++;for(var f=e.indexOf(`
243
+ `,a),p=f<0?r:f,m=a;m<p&&(e.charCodeAt(m)===Z||e.charCodeAt(m)===Q);)m++;if(m<p){if(m===a)return null;var h=e.charCodeAt(m);if(h!==y3&&h!==v3&&h!==w3)return null}}else{for(var d=a,g=0;a<r;){var o=e.charCodeAt(a);if(o===w3)g++;else if(o===T3){if(g===0)break;g--}else{if(o===Z||o===Q||o===H4)break;o===Q4&&a+1<r&&a++}a++}if(u=e.slice(d,a),!u)return null}for(;a<r&&(e.charCodeAt(a)===Z||e.charCodeAt(a)===Q);)a++;var _=e.indexOf(`
244
+ `,a),v=_<0?r:_,y,b=!1,x=a,S=a;if(a===v&&a<r)for(S=a+1;S<r&&(e.charCodeAt(S)===Z||e.charCodeAt(S)===Q);)S++;if(S<r){var C=e.charCodeAt(S);if(C===y3||C===v3||C===w3){for(var w=C===w3?41:C,T=S+1,E=T;T<r;){var D=e.charCodeAt(T);if(D===w){for(var O=T+1;O<r&&(e.charCodeAt(O)===Z||e.charCodeAt(O)===Q);)O++;(O>=r||e.charCodeAt(O)===H4)&&(y=e.slice(E,T),b=!0,x=O<r?O+1:r);break}if(D===Q4&&T+1<r){T+=2;continue}if(D===H4&&T+1<r&&e.charCodeAt(T+1)===H4)break;T++}if(!b&&S===a)return null}}if(b)return n[c]||(n[c]={target:S6(u),title:y===void 0?y:I3(S6(y))}),x;for(;a<v&&(e.charCodeAt(a)===Z||e.charCodeAt(a)===Q);)a++;return a<v?null:(n[c]||(n[c]={target:S6(u),title:y}),_<0?r:_+1)}var _6=new Uint8Array(Vme);for(_6[J4]|=X3,_6[q4]|=X3,_6[X4]|=X3|Z3,_6[b3]|=X3,_6[$4]|=X3|Z3,_6[e3]|=X3|Z3,_6[U4]|=X3|Z3,_6[W4]|=X3|Z3,_6[t3]|=X3|Z3,_6[G4]|=Z3,_6[i3]|=Z3,_6[x3]|=X3,v6=D3;v6<=O3;v6++)_6[v6]|=X3;var v6;function y6(e){if(e.indexOf(`[`)<0&&e.indexOf(`]`)<0)return!1;for(var t=0;t<e.length;t++){if(e.charCodeAt(t)===Q4){t++;continue}if(e.charCodeAt(t)===G4||e.charCodeAt(t)===r3)return!0}return!1}function b6(e){for(var t=e.length,n=!0,r=t>0,i=0;i<t;i++){var a=e.charCodeAt(i);if(a===Z){if(n){r=!1;break}n=!0}else if(a<33||a>126||a>=k3&&a<=A3){r=!1;break}else n=!1}if(r&&!n)return e;var o=e.replace(/\s+/g,` `).trim();return o.indexOf(`ẞ`)===-1?o.toLowerCase():o.replace(/\u1E9E/g,`ss`).toLowerCase()}function x6(e){return e<N3?_6[e]:e===Ame?K3:0}function S6(e){return e.indexOf(`\\`)===-1?e:e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,`$1`)}var C6=null,w6=-1,T6=-1;function E6(e,t){if(t>=w6&&t<=T6&&e===C6)return T6;var n=e.indexOf(`
245
+ `,t),r=n<0?e.length:n;return C6=e,w6=t,T6=r,r}function D6(e,t){let n=E6(e,t);return n<e.length?n+1:n}function O6(e,t,n){for(;t<n;){let n=e.charCodeAt(t);if(n!==Z&&n!==Q)break;t++}return t}function k6(e,t){let n=D6(e,t);for(;n<e.length;){let t=E6(e,n);if(P6(e,n,t))return n;n=D6(e,n)}return e.length}function A6(e,t,n,r){let i=0;for(;t+i<n&&e.charCodeAt(t+i)===r;)i++;return i}var j6=0,M6=0;function N6(e,t,n){for(j6=0,M6=0;t+M6<n;){let n=e.charCodeAt(t+M6);if(n===Q)j6+=4-j6%4;else if(n===Z)j6++;else break;M6++}}function P6(e,t,n){return O6(e,t,n)>=n}function che(e,t,n,r){let i=E6(e,t);if(N6(e,t,i),j6>3)return null;let a=t+M6;if(e.charCodeAt(a)!==J4)return null;let o=A6(e,a,i,35);if(o<1||o>6||(a+=o,a<i&&e.charCodeAt(a)!==Z&&e.charCodeAt(a)!==Q))return null;a=O6(e,a,i);for(var s=i;s>a&&e.charCodeAt(s-1)===Z;)s--;for(var c=s;s>a&&e.charCodeAt(s-1)===J4;)s--;if(s<c)if(s===a||e.charCodeAt(s-1)===Z)for(;s>a&&e.charCodeAt(s-1)===Z;)s--;else s=c;let l=e.slice(a,s),u=J6(l,!1,n,r),d=(r?.slugify||H3)(l);return{node:{type:$.heading,level:o,children:u,id:d},end:D6(e,i)}}function lhe(e,t,n){var r=e.charCodeAt(t);if(r!==Z4&&r!==X4)return!1;for(var i=t;i<n&&e.charCodeAt(i)===r;)i++;for(;i<n&&(e.charCodeAt(i)===Z||e.charCodeAt(i)===Q);)i++;return i>=n}function F6(e,t){let n=E6(e,t);if(N6(e,t,n),j6>3)return null;let r=t+M6,i=e.charCodeAt(r);if(i!==X4&&i!==$4&&i!==e3)return null;let a=0;for(;r<n;){let t=e.charCodeAt(r);if(t===i)a++;else if(t!==Z&&t!==Q)return null;r++}return a<3?null:{node:{type:$.breakThematic},end:D6(e,n)}}function uhe(e,t,n){let r=E6(e,t);if(N6(e,t,r),j6>3)return null;let i=j6,a=t+M6,o=e.charCodeAt(a);if(o!==U4&&o!==W4)return null;let s=A6(e,a,r,o);if(s<3)return null;a+=s;let c=O6(e,a,r),l=r;if(o===U4){for(let t=c;t<r;t++)if(e.charCodeAt(t)===U4)return null}for(;l>c&&(e.charCodeAt(l-1)===Z||e.charCodeAt(l-1)===Q);)l--;let u=e.slice(c,l),d=``,f=``,p=u.indexOf(` `);p===-1?d=u:(d=u.slice(0,p),f=u.slice(p+1).trim()),d=S6(d);var m=void 0;if(f){p6.lastIndex=0;for(var h;(h=p6.exec(f))!==null;)m||={},m[h[1]]=h[2]===void 0?h[3]:h[2]}let g=D6(e,r),_=e.length,v=e.length;for(var y=String.fromCharCode(o).repeat(s),b=g;b<e.length;){var x=e.indexOf(y,b);if(x===-1)break;for(var S=x,C=0;S>0&&C<4&&e.charCodeAt(S-1)===Z;)S--,C++;if(C<=3&&(S===0||e.charCodeAt(S-1)===H4)){for(var w=x+s;w<e.length&&e.charCodeAt(w)===o;)w++;var T=E6(e,w);if(P6(e,w,T)){_=S,v=D6(e,T);break}}b=x+1}var E;if(i===0)E=_>g&&e.charCodeAt(_-1)===H4?e.slice(g,_-1):e.slice(g,_);else{E=``;for(var D=g;D<_;){var O=E6(e,D);N6(e,D,O);var k=Math.min(M6,i);E+=e.slice(D+k,O)+`
246
+ `,D=D6(e,O)}E.length>0&&E.charCodeAt(E.length-1)===H4&&(E=E.slice(0,-1))}return{node:{type:$.codeBlock,lang:d||void 0,text:E,infoString:f||void 0,attrs:m},end:v}}function dhe(e,t){if(N6(e,t,E6(e,t)),j6<4)return null;let n=``,r=t;for(;r<e.length;){let t=E6(e,r);if(N6(e,r,t),P6(e,r,t)){for(var i=0,a=D6(e,t);a<e.length;){var o=E6(e,a);if(P6(e,a,o)){i++,a=D6(e,o);continue}if(N6(e,a,o),j6>=4){for(var s=0;s<=i;s++)n+=`
247
+ `;r=a;break}break}if(r!==a)break;continue}if(j6<4)break;let f=0,p=0;var c=0;for(let n=r;n<t&&p<4;n++){if(e.charCodeAt(n)===Q){var l=4-p%4;p+l>4&&(c=p+l-4),p+=l}else p++;f++}var u=``;if(c>0)for(var d=0;d<c;d++)u+=` `;u+=e.slice(r+f,t),n+=u+`
248
+ `,r=D6(e,t)}for(;n.length>0&&n.charCodeAt(n.length-1)===H4;)n=n.slice(0,-1);return n?{node:{type:$.codeBlock,lang:void 0,text:n,infoString:void 0,attrs:void 0},end:r}:null}function fhe(e,t,n,r){if(N6(e,t,E6(e,t)),j6>3)return null;let i=t+M6;if(e.charCodeAt(i)!==q4)return null;let a=``,o=t,s,c=!1,l=!1,u=!1;for(;o<e.length;){let t=E6(e,o);N6(e,o,t);let n=o+M6;if(e.charCodeAt(n)===q4){let r=n+1;var d=j6+1,f=!1;if(r<t){var p=e.charCodeAt(r);p===Z?(r++,d++,f=!0):p===Q&&(f=!0)}for(var m=``,h=!1,g=r;g<t;g++)if(e.charCodeAt(g)===Q){h=!0;break}if(h){var _=d;if(f&&r<t&&e.charCodeAt(r)===Q){for(var v=4-_%4,y=0;y<v-1;y++)m+=` `;_+=v,r++}for(var b=r;b<t;b++)if(e.charCodeAt(b)===Q){for(var x=4-_%4,S=0;S<x;S++)m+=` `;_+=x}else m+=e[b],_++}else m=e.slice(r,t);if(!a&&!s){let n=m.match(/^\[!([A-Za-z]+)\]\s*$/);if(n){s=n[1].toUpperCase(),o=D6(e,t);continue}}a+=m+`
249
+ `;var C=m.trimStart();C.startsWith("```")||C.startsWith(`~~~`)?u=!u:(m.startsWith(` `)||m.startsWith(` `))&&(u=!0),l=C.length>0,o=D6(e,t)}else if(a&&!P6(e,o,t)&&l){if(j6<4){var w=o+M6,T=w<t?e.charCodeAt(w):0;if(T===J4||T===q4||T===U4||T===W4||T===t3||(T===X4||T===$4||T===e3)&&F6(e,o)||(T===X4||T===$4||T===b3)&&w+1<t&&(e.charCodeAt(w+1)===Z||e.charCodeAt(w+1)===Q))break;if(T>=D3&&T<=O3){for(var E=w;E<t&&e.charCodeAt(E)>=D3&&e.charCodeAt(E)<=O3;)E++;if(E<t&&(e.charCodeAt(E)===g3||e.charCodeAt(E)===T3))break}}if(u)break;a+=e.slice(o,t)+`
250
+ `,c=!0,o=D6(e,t)}else break}if(!a&&!s)return null;var{inBlockQuote:D,f:O}=n;n.inBlockQuote=!0,c&&(n.f=!0);let k=a8(a||``,n,r);return n.inBlockQuote=D,n.f=O,{node:{type:$.blockQuote,children:k,alert:s||void 0},end:o}}function I6(e,t,n){for(var r=0,i=t;i<n;i++)e.charCodeAt(i)===Q?r+=4-r%4:r++;return r}function L6(e,t,n){if(N6(e,t,n),j6>3)return null;var r=t+M6;if(r>=n)return null;var i=e.charCodeAt(r),a=j6,o=r;if(i===X4||i===$4||i===b3){if(o=r+1,o<n&&e.charCodeAt(o)!==Z&&e.charCodeAt(o)!==Q&&e.charCodeAt(o)!==H4)return null}else if(i>=D3&&i<=O3){for(var s=r;s<n&&s-r<9;){var c=e.charCodeAt(s);if(c<D3||c>O3)break;s++}if(s>r&&s<n){var l=e.charCodeAt(s);if(l===g3||l===T3){if(o=s+1,o<n&&e.charCodeAt(o)!==Z&&e.charCodeAt(o)!==Q&&e.charCodeAt(o)!==H4)return null}else return null}else return null}else return null;var u=o,d=I6(e,t,o),f=0,p=u,m=d;if(u>=n)return{ordered:i>=D3&&i<=O3,marker:i>=D3&&i<=O3?e[s]:e[r],start:i>=D3&&i<=O3?parseInt(e.slice(r,s),10):void 0,contentStart:u,contentCol:d+1,markerCol:a,isEmpty:!0};for(;p<n&&(e.charCodeAt(p)===Z||e.charCodeAt(p)===Q);){if(e.charCodeAt(p)===Q){var h=4-m%4;m+=h}else m++;p++,f++}var g=p>=n,_=m-d;return g||_>4?(m=d+1,p=u+1,f=1):f===0&&(m=d+1,p=u,f=1),{ordered:i>=D3&&i<=O3,marker:i>=D3&&i<=O3?e[s]:e[r],start:i>=D3&&i<=O3?parseInt(e.slice(r,s),10):void 0,contentStart:p,contentCol:m,markerCol:a,isEmpty:g}}var R6=0;function phe(e,t,n,r){var i=0,a=t;for(R6=0;a<n&&i<r;){var o=e.charCodeAt(a);if(o===Q){var s=4-i%4;if(i+s>r){R6=i+s-r,a++,i=r;break}i+=s}else if(o===Z)i++;else break;a++}return a}function z6(e,t,n,r){var i=E6(e,t),a=L6(e,t,i);if(!a)return null;var o=[],s=t,c=a.contentCol,l=``,u=a.isEmpty,d=!1,f=!1;if(!a.isEmpty){for(var p=!1,m=a.contentStart;m<i;m++)if(e.charCodeAt(m)===Q){p=!0;break}if(p){var h=``,g=I6(e,t,a.contentStart),_=g-a.contentCol;if(_>0)for(var v=0;v<_;v++)h+=` `;for(var y=a.contentStart;y<i;y++)if(e.charCodeAt(y)===Q){for(var b=4-g%4,x=0;x<b;x++)h+=` `;g+=b}else h+=e[y],g++;l=h+`
251
+ `}else l=e.slice(a.contentStart,i)+`
252
+ `}for(s=D6(e,i);s<e.length;){var S=E6(e,s);N6(e,s,S);var C=e.charCodeAt(s+M6);if(j6<c&&(C===X4||C===$4||C===e3)&&j6<=3&&F6(e,s))break;var w=L6(e,s,S);if(w&&w.ordered===a.ordered&&w.marker===a.marker&&w.markerCol<c){o.push({contentCol:c,raw:l,hasBlankAfter:d,isEmpty:u}),d&&(f=!0),c=w.contentCol,u=w.isEmpty,d=!1,l=w.isEmpty?``:e.slice(w.contentStart,S)+`
253
+ `,s=D6(e,S);continue}if(P6(e,s,S)){l+=`
254
+ `,s=D6(e,S);for(var T=!1,E=0;E<l.length;E++){var D=l.charCodeAt(E);if(D!==H4&&D!==V4&&D!==Z&&D!==Q){T=!0;break}}if(u&&!T)if(s<e.length){var O=E6(e,s),k=L6(e,s,O);if(!k||k.ordered!==a.ordered||k.marker!==a.marker)break;d=!0}else break;if(s<e.length){var A=E6(e,s);N6(e,s,A);var j=e.charCodeAt(s+M6);if((j===X4||j===$4||j===e3)&&j6<=3&&F6(e,s))break;var M=L6(e,s,A);if(M&&M.ordered===a.ordered&&M.marker===a.marker&&M.markerCol<c){d=!0;continue}if(!P6(e,s,A)&&j6<c)break}continue}if(j6>=c){var N=phe(e,s,S,c);if(R6>0){for(var P=``,F=c,I=0;I<R6;I++)P+=` `,F++;for(var L=N;L<S;L++)if(e.charCodeAt(L)===Q){for(var ee=4-F%4,te=0;te<ee;te++)P+=` `;F+=ee}else P+=e[L],F++;l+=P+`
255
+ `}else l+=e.slice(N,S)+`
256
+ `;s=D6(e,S);continue}for(var ne=!1,R=0;R<l.length;R++){var z=l.charCodeAt(R);if(z!==H4&&z!==V4&&z!==Z&&z!==Q){ne=!0;break}}if(!d&&ne&&!u){var B=s+M6,re=e.charCodeAt(B);if(!(re===J4||re===q4||re===t3||re===U4||re===W4||(re===X4||re===$4||re===e3||re===b3)&&(F6(e,s)!==null||L6(e,s,S)!==null)||re>=D3&&re<=O3&&L6(e,s,S)!==null)){l+=``+e.slice(B,S)+`
257
+ `,s=D6(e,S);continue}}break}if(o.push({contentCol:c,raw:l,hasBlankAfter:d,isEmpty:u}),o.length===0)return null;var ie=f;if(!ie)for(var ae=0;ae<o.length;ae++){if(o[ae].hasBlankAfter&&ae<o.length-1){ie=!0;break}if(!o[ae].isEmpty){for(var oe=o[ae].raw,se=oe.length,ce=0,le=!1,ue=!1,de=!1,fe=!1,pe=0,me=0,V=-1;ce<se;){var he=oe.indexOf(`
258
+ `,ce);if(he<0&&(he=se),fe){N6(oe,ce,he);for(var ge=oe.slice(ce+M6,he),_e=0;_e<ge.length&&ge.charCodeAt(_e)===pe;)_e++;_e>=me&&ge.slice(_e).trim()===``&&(fe=!1),ce=he<se?he+1:se;continue}if(P6(oe,ce,he)){V>=0?de=!0:le&&(ue=!0),ce=he<se?he+1:se;continue}if(N6(oe,ce,he),V>=0){if(j6>=V){ce=he<se?he+1:se;continue}var ve=L6(oe,ce,he);if(ve&&ve.markerCol<V&&ve.contentCol<=V){ce=he<se?he+1:se;continue}if(ve){ce=he<se?he+1:se;continue}V=-1,de&&=(ue=!0,!1)}var ye=oe.slice(ce+M6,he),be=ye.charCodeAt(0);if((be===U4||be===W4)&&j6<=3){for(var xe=0;xe<ye.length&&ye.charCodeAt(xe)===be;)xe++;if(xe>=3){if(ue&&le){ie=!0;break}fe=!0,pe=be,me=xe,le=!0,ce=he<se?he+1:se;continue}}var Se=j6<=3?L6(oe,ce,he):null;if(Se&&le){if(ue){ie=!0;break}V=Se.contentCol,de=!1,ce=he<se?he+1:se,le=!0;continue}if(ue){ie=!0;break}le=!0,ce=he<se?he+1:se}if(ie)break}}for(var Ce=[],we=0;we<o.length;we++){for(var Te=o[we],Ee=Te.raw,De=Ee.length;De>0&&Ee.charCodeAt(De-1)===H4;)De--;var Oe=De<Ee.length?Ee.slice(0,De):Ee,ke=null;if(Oe.length>=3&&Oe.charCodeAt(0)===G4){var Ae=Oe[1];(Ae===` `||Ae===`x`||Ae===`X`)&&Oe.charCodeAt(2)===r3&&(ke={type:$.gfmTask,completed:Ae===`x`||Ae===`X`},Oe=Oe.slice(3))}var je;if(Te.isEmpty&&Oe.trim()===``)je=[];else if(ie){var Me=n.inList;n.inList=!0,je=a8(Oe,n,r),n.inList=Me}else{var Ne=n.inList;if(n.inList=!0,je=a8(Oe,n,r),n.inList=Ne,je.length===1&&je[0].type===$.paragraph)je=je[0].children;else if(n.h){var Pe=[];n.h.push({src:je,dest:Pe,unwrap:!0}),je=Pe}else{for(var Fe=[],Ie=0;Ie<je.length;Ie++)if(je[Ie].type===$.paragraph)for(var Le=je[Ie].children,Re=0;Re<Le.length;Re++)Fe.push(Le[Re]);else Fe.push(je[Ie]);je=Fe}}if(ke){var ze=[ke,{type:$.text,text:` `}];if(n.h)n.h.push({src:je,dest:ze,unwrap:!1});else for(var Be=0;Be<je.length;Be++)ze.push(je[Be]);Ce.push(ze)}else Ce.push(je)}return{node:{type:a.ordered?$.orderedList:$.unorderedList,start:a.ordered?a.start:void 0,items:Ce},end:s}}var B6=new Set(`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`));function V6(e,t,n){let r={};for(let[o,s]of Object.entries(e)){let e=o.toLowerCase();if(e===`style`&&typeof s==`string`){let e={},t=[],n=0,i=0;for(let e=0;e<s.length;e++){let r=s.charCodeAt(e);r===w3?n++:r===T3?n--:r===m3&&n===0&&(t.push(s.slice(i,e)),i=e+1)}i<s.length&&t.push(s.slice(i));let a=!1;t.forEach(t=>{let n=t.indexOf(`:`);if(n===-1)return;let r=t.slice(0,n).trim(),i=t.slice(n+1).trim();if(r&&i){if(/url\s*\(\s*(javascript|vbscript|data:(?!image\/))/i.test(i)){a=!0;return}let t=r.indexOf(`-`)===-1?r:r.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());e[t]=i}}),!a&&Object.keys(e).length>0&&(r[o]=e)}else if((e===`href`||e===`src`)&&n?.sanitizer){let i=n.sanitizer(s,t,e);i!==null&&(r[o]=i)}else if(s===``)r[o]=!0;else if(s.length>=2&&s.charCodeAt(0)===S3&&s.charCodeAt(s.length-1)===C3){var i=s.slice(1,-1);if(i.length>0){var a=i.charCodeAt(0);if(a===G4||a===S3)try{r[o]=JSON.parse(i);continue}catch{}}if(i===`true`){r[o]=!0;continue}if(i===`false`){r[o]=!1;continue}if(n?.evalUnserializableExpressions)try{r[o]=(0,eval)(`(`+i+`)`);continue}catch{}r[o]=i}else r[o]=s}return r}function H6(e,t,n){let r=t.length;if(r===0)return n;var i=t.charCodeAt(0);if(!(i>=k3&&i<=A3||i>=j3&&i<=M3)){for(var a=String.fromCharCode(i),o=e.length-r,s=n;s<=o;){var c=e.indexOf(a,s);if(c===-1||c>o)return-1;for(var l=!0,u=1;u<r;u++){var d=e.charCodeAt(c+u),f=t.charCodeAt(u);if(d>=k3&&d<=A3&&(d+=P3),f>=k3&&f<=A3&&(f+=P3),d!==f){l=!1;break}}if(l)return c;s=c+1}return-1}i>=k3&&i<=A3&&(i+=P3);for(let a=n;a<=e.length-r;a++){var p=e.charCodeAt(a);if(p>=k3&&p<=A3&&(p+=P3),p!==i)continue;let n=!0;for(let i=1;i<r;i++){let r=e.charCodeAt(a+i),o=t.charCodeAt(i);if(r>=k3&&r<=A3&&(r+=P3),o>=k3&&o<=A3&&(o+=P3),r!==o){n=!1;break}}if(n)return a}return-1}function mhe(e,t,n){let r=t.length;var i=t.charCodeAt(0);i>=k3&&i<=A3&&(i+=P3);for(let o=Math.min(n,e.length-r);o>=0;o--){var a=e.charCodeAt(o);if(a>=k3&&a<=A3&&(a+=P3),a!==i)continue;let n=!0;for(let i=1;i<r;i++){let r=e.charCodeAt(o+i),a=t.charCodeAt(i);if(r>=k3&&r<=A3&&(r+=P3),a>=k3&&a<=A3&&(a+=P3),r!==a){n=!1;break}}if(n)return o}return-1}var U6=-1;function W6(e,t,n){let r=n.toLowerCase(),i=`<`+r,a=`</`+r,o=1,s=t,c=e.length;for(U6=-1;s<c&&o>0;){let t=H6(e,i,s),n=H6(e,a,s);if(n===-1)return-1;if(t!==-1&&t<n){let n=h6(e,t);n?(n.tag.toLowerCase()===r&&!n.isClosing&&!n.selfClosing&&!G3(n.tag)&&o++,s=n.end):s=t+1}else{var l=n+a.length,u=l<c?e.charCodeAt(l):62;if((u===q4||u===Z||u===Q||u===H4)&&(o--,o===0)){U6=n;let t=n+a.length;for(;t<c&&e.charCodeAt(t)!==q4;)t++;return t+1}s=n+1}}return-1}function G6(e,t,n,r){if(r.ignoreHTMLBlocks||r.disableParsingRawHTML)return null;var i=E6(e,t);if(N6(e,t,i),j6>3&&!n.inHTML)return null;var a=t+M6;if(e.charCodeAt(a)!==t3)return null;var o=e.indexOf(`>`,a+1);if(o!==-1&&o<i){var s=e.slice(a+1,o);if(/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(s)||/^[^\s@]+@[^\s@]+$/.test(s))return null}var c=hhe(e,a);if(c>=1&&c<=5){var l=e.length;if(c===1){for(var u=e.length,d=0;d<s6.length;d++){var f=H6(e,`</`+s6[d]+`>`,a);f>=0&&f<u&&(u=f)}if(u<e.length){var p=e.indexOf(`>`,u);l=p>=0?D6(e,p+1):e.length}}else{var m=c===2?`-->`:c===3?`?>`:c===4?`>`:`]]>`,h=e.indexOf(m,a);h>=0&&(l=D6(e,h+m.length))}var g=e.slice(a,l);if(c>=2)return{node:{type:$.htmlComment,text:g,l:!1,raw:!0},end:l};var _=`div`,v=g.match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);v&&(_=v[1]);var y=h6(e,a),b={},x;y&&!y.isClosing&&(b=V6(y.attrs,_,r),x=y.whitespaceBeforeAttrs+y.rawAttrs);var S=[],C=H6(g,`</`+_.toLowerCase(),0),w=g,T=``;if(y&&y.isClosing)for(w=g.slice(y.end-a);w.length>0&&w.charCodeAt(w.length-1)===H4;)w=w.slice(0,-1);else if(y&&!y.isClosing){var E=y.end-a;if(C!==-1)for(w=g.slice(E),w.charCodeAt(0)===H4&&(w=w.slice(1));w.length>0&&w.charCodeAt(w.length-1)===H4;)w=w.slice(0,-1);else for(w=g;w.length>0&&w.charCodeAt(w.length-1)===H4;)w=w.slice(0,-1);C!==-1&&(T=g.slice(E,C).trim())}var D=y?y.isClosing:!1;return{node:{type:$.htmlBlock,tag:_,attrs:b,i:x,children:S,a:w,text:T,d:!0,b:D},end:l}}if(c===6||c===7){var O=k6(e,t),k=O<e.length?O:e.length,A=e.slice(a,k),j=O<e.length?D6(e,O):e.length,M=h6(e,a);if(M){var N=M.tag,P=N.toLowerCase();if(M.isClosing){var F=e.slice(M.end,k);return{node:{type:$.htmlBlock,tag:N,attrs:{},children:[],a:F,text:F,d:!0,b:!0},end:j}}if(M.selfClosing||G3(N))return{node:{type:$.htmlBlock,tag:N,attrs:V6(M.attrs,N,r),i:M.whitespaceBeforeAttrs+M.rawAttrs,children:[],a:``,text:``,d:!1,b:!1},end:M.end<e.length&&e.charCodeAt(M.end)===H4?M.end+1:M.end};var I=n.c||0,L=e.slice(a,k),ee=-1,te=-1;if(I<10){for(var ne=`</`+P,R=M.end-a,z=1,B=R;B<L.length&&z>0;){var re=H6(L,`<`+P,B),ie=H6(L,ne,B);if(ie===-1)break;if(re!==-1&&re<ie){var ae=re+P.length+1;if(ae<L.length){var oe=L.charCodeAt(ae);(oe===Z||oe===Q||oe===H4||oe===q4||oe===_3)&&z++}B=re+1}else{var se=ie+ne.length;if(se<L.length){var ce=L.charCodeAt(se);if((ce===q4||ce===Z||ce===Q||ce===H4)&&(z--,z===0)){ee=ie;for(var le=se;le<L.length&&L.charCodeAt(le)!==q4;)le++;te=le+1;break}}else if(z--,z===0){ee=ie,te=L.length;break}B=ie+1}}var ue=!1;if(ee===-1&&c===6&&!M.isClosing){var de=W6(e,M.end,P);if(de!==-1){for(var fe=U6,pe=M.end,me=!1,V=!1,he=!1,ge=0,_e=!1,ve=!1,ye=pe;ye<fe;){var be=e.charCodeAt(ye);if(be===H4)ve&&(me=!0),_e||ge++,ve=!0,ye++;else if(be===Z||be===Q)ye++;else{if(!_e&&(_e=!0,ge>=2&&be===t3)){he=!0;break}if(ve=!1,be===t3){var xe=e.charCodeAt(ye+1)|32;if((xe===f3||xe===p3||xe===d3)&&(l6.lastIndex=ye,l6.test(e))){V=!0;break}}ye++}}if(me&&!he&&!V){var Se=E6(e,de);k=Se,j=D6(e,Se),L=e.slice(a,k),A=e.slice(a,k),ee=fe-a,te=de-a,ue=!0}}}}var Ce=M.rawAttrs.indexOf(`
259
+ `)!==-1||M.whitespaceBeforeAttrs.indexOf(`
260
+ `)!==-1,we=!1;ee!==-1&&(we=L.slice(te).trim().length===0);var Te=!1,Ee=k,De=j;if(ee!==-1){var Oe=a+te,ke=E6(e,Oe-1);if(Oe<ke){for(var Ae=Oe;Ae<ke&&(e.charCodeAt(Ae)===Z||e.charCodeAt(Ae)===Q);)Ae++;if(Ae<ke&&e.charCodeAt(Ae)===t3){var je=h6(e,Ae);je&&!je.isClosing&&(Te=!0,Ee=Oe,De=Oe,we=!0)}}if(!Te){var Me=D6(e,ke);if(Me<k){for(var Ne=Me;Ne<k&&(e.charCodeAt(Ne)===Z||e.charCodeAt(Ne)===Q);)Ne++;Ne<k&&e.charCodeAt(Ne)===t3&&h6(e,Ne)&&(Te=!0,Ee=ke,De=Me,we=!0)}}!Te&&n.inHTML&&(Te=!0,Ee=ke,De=D6(e,ke),we=e.slice(Oe,ke).trim().length===0)}var Pe=[],Fe=``;if(ee!==-1){Fe=L.slice(M.end-a,ee);var Ie=Fe.trim();if(Ie){var{inline:Le,inHTML:Re,c:ze}=n;if(n.inHTML=!0,n.c=I+1,P===`p`)n.inline=!0,Pe=J6(Ie,!1,n,r);else{var Be=Fe.indexOf(`
261
+
262
+ `)!==-1,Ve=u6.test(Ie),He=d6.test(Ie),Ue=Be||Ve||n.inHTML&&He;Fe.length>=2&&Fe.charCodeAt(0)===H4&&Fe.charCodeAt(Fe.length-1)===H4&&!Be&&!Ve&&!He?Pe=[{type:$.text,text:Ie}]:Ue||He?(n.inline=!1,Pe=a8(Fe,n,r)):(n.inline=!0,Pe=J6(Ie,!1,n,r))}n.inline=Le,n.inHTML=Re,n.c=ze}}var H=!1;if(c===6&&ee!==-1&&!n.inHTML&&!Ce){var We=/<[a-zA-Z][^>]*>/.test(Fe),Ge=Fe.indexOf(`
263
+
264
+ `)!==-1||u6.test(Fe);We&&!Ge&&(H=!0)}if(!ue&&(n.inHTML||c===7||Ce||!we||H)){var Ke,qe=!1;if(ee!==-1&&Te){var Je=!1;if(n.inHTML&&te<L.length){for(var Ye=te;Ye<L.length&&L.charCodeAt(Ye)!==H4;)Ye++;var Xe=L.slice(te,Ye).trim();Je=Xe.length>1&&Xe.charCodeAt(0)===t3&&Xe.charCodeAt(1)!==_3}Ke=Je?L.slice(M.end-a):Fe,qe=!0}else(c===7||n.inHTML)&&ee!==-1?(Ke=L.slice(M.end-a),Ke.charCodeAt(0)===H4&&(Ke=Ke.slice(1))):Te?Ke=e.slice(a,Ee):Ce?Ke=A:(Ke=L.slice(M.end-a),Ke.charCodeAt(0)===H4&&(Ke=Ke.slice(1)));var Ze={type:$.htmlBlock,tag:N,attrs:V6(M.attrs,N,r),i:M.whitespaceBeforeAttrs+M.rawAttrs,children:Pe,a:Ke,text:Ke,d:!0,b:!1};return qe&&(Ze.n=!0),{node:Ze,end:De}}return{node:{type:$.htmlBlock,tag:N,attrs:V6(M.attrs,N,r),i:M.whitespaceBeforeAttrs+M.rawAttrs,children:Pe,a:ue?``:Fe,text:Fe,d:!1,b:!1},end:De}}var Qe=A.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/),$e=Qe?Qe[2]:`div`,et=Qe?Qe[1]===`/`:!1,tt=A;if(et){var nt=A.indexOf(`>`);nt!==-1&&(tt=A.slice(nt+1))}return{node:{type:$.htmlBlock,tag:$e,attrs:{},children:[],a:tt,text:tt,d:!0,b:et},end:j}}var rt=h6(e,a);if(!rt)return null;var it=rt.tag,at=it.toLowerCase(),ot=it.charCodeAt(0),st=ot>=k3&&ot<=A3;if(!st&&!B6.has(at)&&!c6.has(at)&&!at.includes(`-`))return null;if(rt.isClosing)return{node:{type:$.htmlSelfClosing,tag:it,attrs:{},a:e.slice(a,rt.end),b:!0},end:rt.end};var ct=W6(e,rt.end,it),lt=[];if(ct!==-1){var ut=U6,dt=e.slice(rt.end,ut),ft=dt.trim();if(ft){var pt=dt.indexOf(`
265
+
266
+ `)!==-1,mt=u6.test(ft),ht=d6.test(ft),gt=n.inline,_t=n.inHTML,vt=n.c;n.inHTML=!0,n.c=(n.c||0)+1,pt||mt||ht?(n.inline=!1,lt=a8(dt,n,r)):(n.inline=!0,lt=J6(ft,!1,n,r)),n.inline=gt,n.inHTML=_t,n.c=vt}var yt=E6(e,ct),bt=e.slice(ct,yt).trim()?ct:D6(e,ct),xt=st?e.slice(a,ct):e.slice(a,bt);return{node:{type:$.htmlBlock,tag:it,attrs:V6(rt.attrs,it,r),i:rt.whitespaceBeforeAttrs+rt.rawAttrs,children:lt,a:xt,text:st?dt:xt,d:!0,b:!1},end:bt}}var St=k6(e,rt.end),Ct=St<e.length?D6(e,St):St,wt=e.slice(rt.end,St);if(wt.trim()){var{inline:Tt,inHTML:Et,c:Dt}=n;n.inline=!1,n.inHTML=!0,n.c=(n.c||0)+1,lt=a8(wt,n,r),n.inline=Tt,n.inHTML=Et,n.c=Dt}var Ot=e.slice(rt.end,St);return{node:{type:$.htmlBlock,tag:it,attrs:V6(rt.attrs,it,r),i:rt.whitespaceBeforeAttrs+rt.rawAttrs,children:lt,a:Ot,text:wt,d:!0,b:!1},end:Ct}}function hhe(e,t){if(e.charCodeAt(t)!==t3)return 0;var n=t+1,r=e.length;if(e.charCodeAt(n)===i3&&e.charCodeAt(n+1)===X4&&e.charCodeAt(n+2)===X4)return 2;if(e.charCodeAt(n)===h3)return 3;if(e.charCodeAt(n)===i3){var i=e.charCodeAt(n+1);if(i>=k3&&i<=A3)return 4;if(e.slice(n+1,n+8)===`[CDATA[`)return 5}for(var a=e.charCodeAt(n)===_3,o=a?n+1:n,s=o;s<r;){var c=e.charCodeAt(s);if(c>=k3&&c<=A3||c>=j3&&c<=M3||c>=D3&&c<=O3||c===X4)s++;else break}if(s===o)return 0;var l=e.slice(o,s);if(c6.has(l.toLowerCase())){if(a)return 0;var u=e.charCodeAt(s);return+(u===Z||u===Q||u===q4||u===H4||s>=r)}if(B6.has(l.toLowerCase())){if(a){for(var d=s;d<r&&(e.charCodeAt(d)===Z||e.charCodeAt(d)===Q);)d++;return d<r&&e.charCodeAt(d)===q4?6:0}var f=s<r?e.charCodeAt(s):-1;return f===Z||f===Q||f===q4||f===H4||f===_3||f===-1?6:0}if(a){for(var p=s;p<r&&(e.charCodeAt(p)===Z||e.charCodeAt(p)===Q);)p++;if(p<r&&e.charCodeAt(p)===q4){var m=E6(e,t);if(e.slice(p+1,m).trim()===``)return 7}}else{var h=E6(e,t),g=h6(e,t);if(g&&g.end<=h&&e.slice(g.end,h).trim()===``)return 7}return 0}function K6(e,t,n){for(var r=0,i=e.length;r<i&&(e.charCodeAt(r)===Z||e.charCodeAt(r)===Q);)r++;for(;i>r&&(e.charCodeAt(i-1)===Z||e.charCodeAt(i-1)===Q);)i--;r<i&&e.charCodeAt(r)===x3&&r++,i>r&&e.charCodeAt(i-1)===x3&&(i-2<r||e.charCodeAt(i-2)!==Q4)&&i--;for(var a=[],o=r,s=!1,c=[],l=r;l<i;){var u=e.charCodeAt(l);if(u===Q4&&l+1<i){e.charCodeAt(l+1)===x3?(s||(s=!0,c=[]),c.push(e.slice(o,l)),c.push(`|`),l+=2,o=l):l+=2;continue}if(u===U4){for(var d=0;l<i&&e.charCodeAt(l)===U4;)d++,l++;for(var f=!1;l<i&&!f;){for(var p=0;l<i&&e.charCodeAt(l)===U4;)p++,l++;p===d?f=!0:p===0&&l++}continue}if(u===x3){var m=s?(c.push(e.slice(o,l)),c.join(``)):e.slice(o,l);a.push(m.trim()),l++,o=l,s=!1,c=[];continue}l++}var h=s?(c.push(e.slice(o,i)),c.join(``)):e.slice(o,i);return a.push(h.trim()),a.map(function(e){var r=e.indexOf(`\\|`)===-1?e:e.replace(/\\\|/g,`|`);return r?J6(r,!1,t,n):[]})}function q6(e,t,n,r){let i=E6(e,t);var a=e.indexOf(`|`,t);if(a<0||a>=i)return null;let o=D6(e,i);if(o>=e.length)return null;let s=E6(e,o);if(!m6(e,o,s))return null;let c=e.slice(t,i),l=e.slice(o,s);for(var u=[],d=0,f=l.length;d<f&&(l.charCodeAt(d)===Z||l.charCodeAt(d)===Q);)d++;for(d<f&&l.charCodeAt(d)===x3&&d++;d<f;){for(;d<f&&(l.charCodeAt(d)===Z||l.charCodeAt(d)===Q);)d++;if(d>=f||l.charCodeAt(d)===x3)break;var p=l.charCodeAt(d)===o3;for(p&&d++;d<f&&l.charCodeAt(d)===X4;)d++;var m=d<f&&l.charCodeAt(d)===o3;for(m&&d++,u.push(p&&m?`center`:m?`right`:p?`left`:null);d<f&&(l.charCodeAt(d)===Z||l.charCodeAt(d)===Q);)d++;d<f&&l.charCodeAt(d)===x3&&d++}let h=K6(c,n,r);if(u.length!==h.length)return null;let g=[],_=D6(e,s);for(;_<e.length;){let t=E6(e,_),i=e.slice(_,t);if(P6(e,_,t))break;if(N6(e,_,t),j6<4){var v=e.charCodeAt(_+M6);if(v===q4||v===J4||(v===X4||v===$4||v===e3)&&F6(e,_))break;if(v===U4||v===W4){for(var y=_+M6,b=0;y<t&&e.charCodeAt(y)===v;)b++,y++;if(b>=3)break}}g.push(K6(i,n,r)),_=D6(e,t)}if(r.optimizeForStreaming&&g.length===0)return null;for(var x=h.length,S=0;S<g.length;S++)if(g[S].length<x)for(;g[S].length<x;)g[S].push([]);else g[S].length>x&&(g[S].length=x);return{node:{type:$.table,header:h,cells:g,align:u},end:_}}function ghe(e,t,n){if(N6(e,t,E6(e,t)),j6>3)return null;var r=t+M6;if(e.charCodeAt(r)!==G4)return null;if(r+1<e.length&&e.charCodeAt(r+1)===K4)return _he(e,r,n)||null;n.refs||={};var i=g6(e,r,n.refs);return i===null?null:{node:{type:$.refCollection},end:i}}function _he(e,t,n){var r=e.length;if(e.charCodeAt(t)!==G4||t+1>=r||e.charCodeAt(t+1)!==K4)return null;for(var i=t+2,a=i;i<r&&e.charCodeAt(i)!==r3;){if(e.charCodeAt(i)===H4)return null;i++}if(i>=r)return null;var o=(`^`+e.slice(a,i)).toLowerCase();if(i++,i>=r||e.charCodeAt(i)!==o3)return null;for(i++;i<r&&(e.charCodeAt(i)===Z||e.charCodeAt(i)===Q);)i++;if(i<r&&e.charCodeAt(i)===H4)for(i++;i<r&&(e.charCodeAt(i)===Z||e.charCodeAt(i)===Q);)i++;var s=e.indexOf(`
267
+ `,i);s<0&&(s=r);for(var c=e.slice(i,s).trim(),l=s<r?s+1:r;l<r;){var u=E6(e,l);if(N6(e,l,u),j6>=2&&!P6(e,l,u))c+=`
268
+ `+e.slice(l,u),l=D6(e,u);else if(P6(e,l,u)){var d=D6(e,u);if(d<r&&(N6(e,d,E6(e,d)),j6>=2)){c+=`
269
+ `,l=D6(e,u);continue}break}else break}return n.refs[o]||(n.refs[o]={target:c,title:void 0}),{node:{type:$.footnote},end:l}}function vhe(e,t,n,r){let i=t,a=0,o=0,s=-1;for(;i<e.length;){let t=s>=0?s:E6(e,i);if(s=-1,P6(e,i,t))break;if(N6(e,i,t),j6<4&&o>0&&!n.f){let n=e.charCodeAt(i+M6);if(n===Z4||n===X4){let r=i+M6;for(;r<t&&e.charCodeAt(r)===n;)r++;for(;r<t&&(e.charCodeAt(r)===Z||e.charCodeAt(r)===Q);)r++;if(r>=t){a=n===Z4?1:2,i=D6(e,t);break}}}o=t;let x=D6(e,t);if(x<e.length){if(e.charCodeAt(x)===E3){var c=E6(e,x);i=D6(e,c),o=c;continue}let t=E6(e,x);if(s=t,N6(e,x,t),j6<4){let a=e.charCodeAt(x+M6);if(a===q4){i=x;break}if(a===J4){for(var l=x+M6,u=0;l<t&&e.charCodeAt(l)===J4&&u<=6;)u++,l++;if(u>=1&&u<=6&&(l>=t||e.charCodeAt(l)===Z||e.charCodeAt(l)===Q)){i=x;break}}if(a===U4||a===W4){for(var d=x+M6,f=0;d<t&&e.charCodeAt(d)===a;)f++,d++;if(f>=3){i=x;break}}if(a===t3){var p=x+M6+1,m=p<t?e.charCodeAt(p):0,h=m===i3||m===h3;if(!h&&m===_3){for(var g=p+1,_=g;_<t&&(e.charCodeAt(_)>=k3&&e.charCodeAt(_)<=A3||e.charCodeAt(_)>=j3&&e.charCodeAt(_)<=M3||e.charCodeAt(_)>=D3&&e.charCodeAt(_)<=O3||e.charCodeAt(_)===X4);)_++;_>g&&(h=B6.has(e.slice(g,_).toLowerCase()))}else if(!h){for(var v=p;v<t&&(e.charCodeAt(v)>=k3&&e.charCodeAt(v)<=A3||e.charCodeAt(v)>=j3&&e.charCodeAt(v)<=M3||e.charCodeAt(v)>=D3&&e.charCodeAt(v)<=O3||e.charCodeAt(v)===X4);)v++;if(v>p){var y=e.slice(p,v).toLowerCase();h=B6.has(y)||c6.has(y)}}if(h&&G6(e,x,n,r)){i=x;break}}if(a===X4||a===$4||a===b3){let n=x+M6+1;if(n<t&&(e.charCodeAt(n)===Z||e.charCodeAt(n)===Q)&&O6(e,n,t)<t&&!F6(e,x)){i=x;break}}if(a>=D3&&a<=O3){let n=x+M6;for(;n<t&&e.charCodeAt(n)>=D3&&e.charCodeAt(n)<=O3;)n++;if(n<t&&(e.charCodeAt(n)===g3||e.charCodeAt(n)===T3)&&n-(x+M6)===1&&e.charCodeAt(x+M6)===49){var b=n+1;if(b<t&&(e.charCodeAt(b)===Z||e.charCodeAt(b)===Q)&&O6(e,b,t)<t){i=x;break}}}if(a===x3){let n=D6(e,t);if(n<e.length&&m6(e,n,E6(e,n))){i=x;break}}if((a===X4||a===$4||a===e3)&&F6(e,x)){if(a!==X4){i=x;break}let n=0,r=x+M6;for(;r<t&&e.charCodeAt(r)===X4;)n++,r++;for(;r<t&&(e.charCodeAt(r)===Z||e.charCodeAt(r)===Q);)r++;if(r<t){i=x;break}}}}i=D6(e,t)}for(var x=a?o:i;x>t&&(e.charCodeAt(x-1)===H4||e.charCodeAt(x-1)===V4||e.charCodeAt(x-1)===Z||e.charCodeAt(x-1)===Q);)x--;for(var S=t;S<x&&(e.charCodeAt(S)===Z||e.charCodeAt(S)===Q);)S++;if(S>=x)return null;for(var C=!1,w=S;w<x;w++)if(e.charCodeAt(w)===E3){C=!0;break}var T=C?e.slice(S,x).replace(/\u001E/g,``):e.slice(S,x);if(!T)return null;let E=J6(T,!0,n,r);if(a){let e=(r?.slugify||H3)(T);return{node:{type:$.heading,level:a,children:E,id:e},end:i}}return{node:{type:$.paragraph,children:E},end:i}}function J6(e,t,n,r){var i=n.k;if(!i){var a=n.e;n.e=t;var o=i8(e,0,e.length,n,r);return n.e=a,o}var s=[];return i.push({dest:s,text:e,breaks:t,inline:n.inline,inAnchor:n.inAnchor,inHTML:n.inHTML,htmlDepth:n.c,inList:n.inList,inBlockQuote:n.inBlockQuote,noSetext:n.f,depth:n.j}),s}function yhe(e,t,n){if(e.charCodeAt(t)!==U4)return null;let r=A6(e,t,n,96),i=t+r;for(;i<n;){let a=e.indexOf("`",i);if(a<0||a>=n)return null;let o=A6(e,a,n,96);if(o===r){let n=e.slice(t+r,a);return n.indexOf(`
270
+ `)!==-1&&(n=n.replace(/\n/g,` `)),n.length>0&&n[0]===` `&&n[n.length-1]===` `&&n.trim().length>0&&(n=n.slice(1,-1)),{node:{type:$.codeInline,text:n},end:a+o}}i=a+o}return null}function Y6(e,t,n){if(e.charCodeAt(t)!==U4)return t;let r=A6(e,t,n,96),i=t+r;for(;i<n;){let a=e.indexOf("`",i);if(a<0||a>=n)return t;let o=A6(e,a,n,96);if(o===r)return a+o;i=a+o}return t}function bhe(e,t,n){if(e.charCodeAt(t)!==t3)return t;if(t+1<n&&e.charCodeAt(t+1)===_3){let r=t+2;for(;r<n&&e.charCodeAt(r)!==q4;)r++;return r<n?r+1:t}if(t+3<n&&e.charCodeAt(t+1)===i3&&e.charCodeAt(t+2)===X4&&e.charCodeAt(t+3)===X4){let n=e.indexOf(`-->`,t+4);return n>=0?n+3:t}let r=t+1,i=r;for(;r<n;){let t=e.charCodeAt(r);if(t>=k3&&t<=A3||t>=j3&&t<=M3||t>=D3&&t<=O3||t===X4)r++;else break}if(r===i)return t;let a=e.slice(i,r).toLowerCase(),o=!1;for(;r<n;){let i=e.charCodeAt(r);if(i===q4){r++;break}if(i===_3&&r+1<n&&e.charCodeAt(r+1)===q4){r+=2,o=!0;break}if(i===y3||i===v3){var s=i;for(r++;r<n&&e.charCodeAt(r)!==s;)r++;r<n&&r++;continue}if(i===H4)return t;r++}if(o||G3(a))return r;let c=1;for(;r<n&&c>0;)if(e.charCodeAt(r)===t3)if(r+1<n&&e.charCodeAt(r+1)===_3){let t=r+2,i=t;for(;i<n&&(e.charCodeAt(i)>=k3&&e.charCodeAt(i)<=A3||e.charCodeAt(i)>=j3&&e.charCodeAt(i)<=M3);)i++;if(e.slice(t,i).toLowerCase()===a){for(;i<n&&e.charCodeAt(i)!==q4;)i++;if(i<n&&i++,c--,c===0)return i}r=i}else{let t=r+1,i=t;for(;i<n&&(e.charCodeAt(i)>=k3&&e.charCodeAt(i)<=A3||e.charCodeAt(i)>=j3&&e.charCodeAt(i)<=M3);)i++;e.slice(t,i).toLowerCase()===a&&c++,r++}else r++;return r}function xhe(e,t,n,r,i){if(e.charCodeAt(t)!==W4||t+1>=n||e.charCodeAt(t+1)!==W4)return null;let a=t+2;for(;a+1<n;){let o=e.charCodeAt(a);if(o===U4){let t=Y6(e,a,n);if(t>a){a=t;continue}}if(o===W4&&e.charCodeAt(a+1)===W4){let n=e.slice(t+2,a),o=i8(n,0,n.length,r,i);return{node:{type:$.textFormatted,tag:`del`,children:o},end:a+2}}o===Q4&&a+1<n&&a++,a++}return null}function She(e,t,n,r,i){if(e.charCodeAt(t)!==Z4||t+1>=n||e.charCodeAt(t+1)!==Z4)return null;let a=t+2;for(;a+1<n;){let o=e.charCodeAt(a);if(o===U4){let t=Y6(e,a,n);if(t>a){a=t;continue}}if(o===Z4&&e.charCodeAt(a+1)===Z4&&a>t+2){let n=e.slice(t+2,a),o=i8(n,0,n.length,r,i);return{node:{type:$.textFormatted,tag:`mark`,children:o},end:a+2}}o===Q4&&a+1<n&&a++,a++}return null}function X6(e,t,n){return e<N3?!!(x6(e)&J3):Hme.test(t[n])}function Z6(e,t,n){return e<N3?!!(x6(e)&K3):Ume.test(t[n])}function Che(e,t,n){var r=e.charCodeAt(t);if(r!==$4&&r!==e3)return null;var i=A6(e,t,n,r);if(i===0)return null;var a=t>0?e.charCodeAt(t-1):32,o=t+i<n?e.charCodeAt(t+i):32,s=Z6(a,e,t-1),c=Z6(o,e,t+i),l=t>0&&X6(a,e,t-1),u=t+i<n&&X6(o,e,t+i),d=!c&&(!u||s||l),f=!s&&(!l||c||u),p,m;return r===$4?(p=d,m=f):(p=d&&(!f||l),m=f&&(!d||u)),{len:i,canOpen:p,canClose:m}}function whe(e,t,n,r){if(t.length!==0){for(var i=e.length,a=Array(i),o=null,s=null,c=0;c<i;c++){var l={node:e[c],prev:s,next:null};s?s.next=l:o=l,a[c]=l,s=l}for(var u=Array(t.length),d=0;d<t.length;d++)u[d]=a[t[d].idx];for(var f=[],p=0;p<12;p++)f[p]=-1;for(var m=0;m<t.length;){var h=t[m];if(!h.active||!h.canClose){m++;continue}for(var g=(h.ch===$4?0:1)*6+h.len%3*2+ +!!h.canOpen,_=f[g]===void 0?-1:f[g],v=-1,y=m-1;y>_;y--){var b=t[y];if(!(!b.active||b.ch!==h.ch||!b.canOpen)&&!((h.canOpen||b.canClose)&&(b.len+h.len)%3==0&&b.len%3!=0)){v=y;break}}if(v<0){f[g]=m-1,!h.canOpen&&(h.active=!1),m++;continue}var x=t[v],S=x.len>=2&&h.len>=2,C=S?2:1;x.len-=C,h.len-=C;var w=u[v],T=u[m],E=w.node,D=T.node;E.text=E.text.slice(0,E.text.length-C),D.text=D.text.slice(C);for(var O=[],k=w.next;k&&k!==T;)O.push(k.node),k=k.next;var A={node:{type:$.textFormatted,tag:S?`strong`:`em`,children:O},prev:w,next:T};w.next=A,T.prev=A;for(var j=v+1;j<m;j++)t[j].active=!1;if(x.len===0&&(x.active=!1,E.text===``)){var M=w.prev;A.prev=M,M?M.next=A:o=A}if(h.len===0){if(h.active=!1,D.text===``){var N=T.next;A.next=N,N&&(N.prev=A)}}else continue;m++}for(var P=0,F=o;F;){var I=F.node;if(I.type===$.text){var L=I;if(L.text===``){F=F.next;continue}if(P>0&&e[P-1].type===$.text){e[P-1].text+=L.text,F=F.next;continue}}e[P++]=I,F=F.next}e.length=P}}function Q6(e,t,n,r,i){let a=e.charCodeAt(t)===i3,o=a?t+1:t;if(e.charCodeAt(o)!==G4)return null;var s=e.indexOf(`]`,o+1);if(s<0||s>=n)return null;for(var c=o+1,l=1;c<n&&l>0;){var u=e.charCodeAt(c);if(u===Q4&&c+1<n){c+=2;continue}if(u===U4){var d=Y6(e,c,n);if(d>c){c=d;continue}}if(u===t3){var f=$6(e,c,n);if(f){c=f.end;continue}var p=bhe(e,c,n);if(p>c){c=p;continue}}u===G4?l++:u===r3&&l--,c++}if(l!==0)return null;var m=c-1,h=e.slice(o+1,m),g=c<n?e.charCodeAt(c):0,_=!1;if(g===w3){var v=!0;for(c++;c<n&&(e.charCodeAt(c)===Z||e.charCodeAt(c)===H4);)c++;var y=``,b=c;if(c<n&&e.charCodeAt(c)===t3){for(c++,b=c;b<n&&e.charCodeAt(b)!==q4;){if(e.charCodeAt(b)===Q4&&b+1<n){b+=2;continue}if(e.charCodeAt(b)===H4){v=!1;break}b++}v&&(b>=n||e.charCodeAt(b)!==q4)&&(v=!1),v&&(y=e.slice(c,b),b++)}else if(v)if(r.g!==void 0&&c>=r.g)v=!1;else{for(var x=0,S=!1;b<n;){var C=e.charCodeAt(b);if(C===Q4&&b+1<n){b+=2;continue}if(C===w3)x++;else if(C===T3){if(S=!0,x===0)break;x--}else if(C===Z||C===H4)break;b++}b>=n&&!S&&(r.g===void 0||c<r.g)&&(r.g=c),y=e.slice(c,b)}if(v){for(c=b;c<n&&(e.charCodeAt(c)===Z||e.charCodeAt(c)===H4);)c++;var w;if(c<n){var T=e.charCodeAt(c);if(T===y3||T===v3||T===w3){var E=T===w3?41:T;c++;for(var D=c;c<n&&e.charCodeAt(c)!==E;)e.charCodeAt(c)===Q4&&c+1<n&&c++,c++;c>=n?v=!1:(w=e.slice(D,c),c++)}}if(v){for(;c<n&&(e.charCodeAt(c)===Z||e.charCodeAt(c)===H4);)c++;(c>=n||e.charCodeAt(c)!==T3)&&(v=!1)}}if(v){c++,y=S6(y),w!==void 0&&(w=I3(S6(w)));var O=(i?.sanitizer||R3)(y,a?`img`:`a`,a?`src`:`href`)===null?null:y;if(a){var k=t8(i8(h,0,h.length,r,i));return{node:{type:$.image,target:O,alt:k,title:w},end:c}}else{var A=r.inAnchor;r.inAnchor=!0;var j=A?[{type:$.text,text:h}]:i8(h,0,h.length,r,i);return r.inAnchor=A,!r.inAnchor&&e8(j)?null:{node:{type:$.link,target:O,title:w,children:j},end:c}}}else c=m+1,_=!0}var M=``,N=c;if(!_&&g===G4){var P=c+1;N=P;for(var F=!1;N<n&&e.charCodeAt(N)!==r3;){if(e.charCodeAt(N)===Q4&&N+1<n){N+=2;continue}if(e.charCodeAt(N)===G4){F=!0;break}N++}if(F||N>=n)return null;var I=e.slice(P,N);if(I.trim())M=b6(I);else{if(y6(h))return null;M=b6(h)}N+=1}else{if(y6(h))return null;M=b6(h)}var L=r.refs[M];if(!L)return null;if(a)return{node:{type:$.image,target:L.target,alt:t8(i8(h,0,h.length,r,i)),title:L.title},end:N};var ee=r.inAnchor;r.inAnchor=!0;var j=ee?[{type:$.text,text:h}]:i8(h,0,h.length,r,i);return r.inAnchor=ee,!r.inAnchor&&e8(j)?null:{node:{type:$.link,target:L.target,title:L.title,children:j},end:N}}function $6(e,t,n){if(e.charCodeAt(t)!==t3)return null;for(var r=t+1;r<n;){var i=e.charCodeAt(r);if(i===q4)break;if(i===Z||i===H4||i===V4||i===t3)return null;r++}if(r>=n||e.charCodeAt(r)!==q4)return null;var a=e.slice(t+1,r);return a.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/)?{node:{type:$.link,target:a,title:void 0,children:[{type:$.text,text:a}]},end:r+1}:a.indexOf(`@`)!==-1&&/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)?{node:{type:$.link,target:`mailto:`+a,title:void 0,children:[{type:$.text,text:a}]},end:r+1}:null}function The(e,t,n,r){if(e.charCodeAt(t)!==G4||t+1>=n||e.charCodeAt(t+1)!==K4)return null;let i=t+2;for(;i<n&&e.charCodeAt(i)!==r3&&e.charCodeAt(i)!==H4;)i++;if(i>=n||e.charCodeAt(i)!==r3)return null;let a=e.slice(t+2,i);return a?{node:{type:$.footnoteReference,target:`#`+H3(a),text:a},end:i+1}:null}function Ehe(e,t,n,r){if(r.disableBareUrls)return null;var i=``,a=!1,o=e.charCodeAt(t);if(o===l3||o===72?t+8<=n&&e.charCodeAt(t+1)===d3&&e.charCodeAt(t+2)===d3&&e.charCodeAt(t+3)===f3&&(e.charCodeAt(t+4)===p3&&e.charCodeAt(t+5)===o3&&e.charCodeAt(t+6)===_3&&e.charCodeAt(t+7)===_3?i=`https://`:e.charCodeAt(t+4)===o3&&e.charCodeAt(t+5)===_3&&e.charCodeAt(t+6)===_3&&(i=`http://`)):o===c3||o===70?t+6<=n&&e.charCodeAt(t+1)===d3&&e.charCodeAt(t+2)===f3&&e.charCodeAt(t+3)===o3&&e.charCodeAt(t+4)===_3&&e.charCodeAt(t+5)===_3&&(i=`ftp://`):(o===u3||o===87)&&t+4<=n&&e.charCodeAt(t+1)===u3&&e.charCodeAt(t+2)===u3&&e.charCodeAt(t+3)===g3&&(i=`www.`,a=!0),!i)return null;let s=t+i.length;for(;s<n;){let t=e.charCodeAt(s);if(t===Z||t===H4||t===Q||t===V4||t===t3||t===q4)break;s++}for(var c=0,l=0,u=t;u<s;u++){var d=e.charCodeAt(u);d===w3?c++:d===T3&&l++}let f=s;for(;f>t+i.length;){let n=e.charCodeAt(f-1);if(n===g3||n===Mme||n===o3||n===i3||n===h3||n===T3||n===$4||n===e3||n===W4){if(n===T3){if(c>=l)break;l--}f--}else if(n===m3){for(var p=f-2;p>t&&(e.charCodeAt(p)>=k3&&e.charCodeAt(p)<=A3||e.charCodeAt(p)>=j3&&e.charCodeAt(p)<=M3||e.charCodeAt(p)>=D3&&e.charCodeAt(p)<=O3);)p--;p>=t&&e.charCodeAt(p)===a3?f=p:f--}else break}if(f<=t+i.length)return null;var m=t+(a?4:i.length),h=e.indexOf(`/`,m);if((h<0||h>f)&&(h=f),a&&e.indexOf(`.`,m)===-1)return null;for(var g=-1,_=-1,v=h-1;v>=m;v--)if(e.charCodeAt(v)===g3)if(g<0)g=v;else{_=v;break}for(var v=_>=0?_+1:m;v<h;v++)if(e.charCodeAt(v)===e3)return null;var y=e.slice(t,f),b=a?`http://`+y:y;return{node:{type:$.link,target:b,title:void 0,children:[{type:$.text,text:y}]},end:f}}function Dhe(e,t,n,r){if(r.disableBareUrls)return null;for(var i=t,a=i;i<n;){var o=e.charCodeAt(i);if(o>=k3&&o<=A3||o>=j3&&o<=M3||o>=D3&&o<=O3||o===g3||o===i3||o===J4||o===36||o===Y4||o===a3||o===v3||o===$4||o===b3||o===_3||o===Z4||o===h3||o===K4||o===e3||o===U4||o===S3||o===x3||o===C3||o===W4||o===X4)i++;else break}if(i===a||i>=n||e.charCodeAt(i)!==n3)return null;i++;for(var s=i,c=-1,l=i;i<n;){var o=e.charCodeAt(i);if(o>=k3&&o<=A3||o>=j3&&o<=M3||o>=D3&&o<=O3)i++;else if((o===X4||o===e3)&&i>s)i++;else if(o===g3){if(i===s)break;var u=e.charCodeAt(i-1);if(u===X4||u===e3||i-l>63)break;if(i+1<n){var d=e.charCodeAt(i+1);if(d>=k3&&d<=A3||d>=j3&&d<=M3||d>=D3&&d<=O3)c=i,l=i+1,i++;else break}else break}else break}if(i-l>63||c<0)return null;var f=e.charCodeAt(i-1);if(!(f>=k3&&f<=A3||f>=j3&&f<=M3||f>=D3&&f<=O3)||i<=c+1)return null;for(var p=-1,m=c-1;m>=s;m--)if(e.charCodeAt(m)===g3){p=m;break}for(var m=p>=0?p+1:s;m<i;m++)if(e.charCodeAt(m)===e3)return null;var h=e.slice(t,i);return{node:{type:$.link,target:`mailto:`+h,title:void 0,children:[{type:$.text,text:h}]},end:i}}function e8(e){for(var t=0;t<e.length;t++)if(e[t].type===$.link||`children`in e[t]&&Array.isArray(e[t].children)&&e8(e[t].children))return!0;return!1}function t8(e){for(var t=``,n=0;n<e.length;n++){var r=e[n];r.type===$.text?t+=r.text:r.type===$.breakLine?t+=` `:r.type===$.codeInline?t+=r.text:`children`in r&&Array.isArray(r.children)?t+=t8(r.children):r.type===$.image&&(t+=r.alt||``)}return t}function n8(e){return{type:$.text,text:e}}function Ohe(e,t,n){var r=t+1;if(r>=n)return-1;if(e.charCodeAt(r)===J4){r++;var i=r<n&&(e.charCodeAt(r)===Nme||e.charCodeAt(r)===Pme);i&&r++;for(var a=r,o=i?6:7;r<n&&r-a<=o;){var s=e.charCodeAt(r);if(!(s>=D3&&s<=O3||i&&(s>=k3&&s<=s3||s>=j3&&s<=c3)))break;r++}return r===a||r-a>o?-1:r<n&&e.charCodeAt(r)===m3?r+1:-1}for(var c=r;r<n&&r-c<48;){var l=e.charCodeAt(r);if(l>=k3&&l<=A3||l>=j3&&l<=M3||l>=D3&&l<=O3){r++;continue}break}return r===c?-1:r<n&&e.charCodeAt(r)===m3?r+1:-1}function khe(e,t,n,r,i){if(e.charCodeAt(t)!==t3)return null;var a=t+1;if(a>=n)return null;var o=e.charCodeAt(a);if(o===i3&&a+1<n&&e.charCodeAt(a+1)===X4&&a+2<n&&e.charCodeAt(a+2)===X4){var s=a+3;if(s<n&&e.charCodeAt(s)===q4)return{node:{type:$.htmlComment,text:``,l:!0},end:s+1};if(s+1<n&&e.charCodeAt(s)===X4&&e.charCodeAt(s+1)===q4)return{node:{type:$.htmlComment,text:`-`,l:!0},end:s+2};var c=e.indexOf(`-->`,s);return c!==-1&&c<=n-3?{node:{type:$.htmlComment,text:e.slice(t+4,c),l:!1},end:c+3}:null}if(o===h3){var l=e.indexOf(`?>`,a+1);return l!==-1&&l<n?{node:{type:$.htmlSelfClosing,tag:`?`,attrs:{},a:e.slice(t,l+2),b:!1},end:l+2}:null}if(o===i3&&a+1<n){var u=e.charCodeAt(a+1);if(u===G4&&e.slice(a+1,a+8)===`[CDATA[`){var d=e.indexOf(`]]>`,a+8);return d!==-1&&d<n?{node:{type:$.htmlSelfClosing,tag:`![CDATA[`,attrs:{},a:e.slice(t,d+3),b:!1},end:d+3}:null}if(u>=k3&&u<=A3){var f=e.indexOf(`>`,a+2);return f!==-1&&f<n?{node:{type:$.htmlSelfClosing,tag:`!`+e.slice(a+1,f),attrs:{},a:e.slice(t,f+1),b:!1},end:f+1}:null}}if(o===_3){var p=a+1;if(p>=n)return null;var m=e.charCodeAt(p);if(!(m>=k3&&m<=A3||m>=j3&&m<=M3))return null;for(p++;p<n;){var h=e.charCodeAt(p);if(h>=k3&&h<=A3||h>=j3&&h<=M3||h>=D3&&h<=O3||h===X4)p++;else break}for(;p<n&&(e.charCodeAt(p)===Z||e.charCodeAt(p)===Q||e.charCodeAt(p)===H4);)p++;if(p<n&&e.charCodeAt(p)===q4){var g=e.slice(a+1,p).trim();return{node:{type:$.htmlSelfClosing,tag:g,attrs:{},a:e.slice(t,p+1),b:!0},end:p+1}}return null}if(!(o>=k3&&o<=A3||o>=j3&&o<=M3))return null;var _=h6(e,t);if(!_)return null;var v=_.tag,y=v.toLowerCase();if(_.selfClosing||G3(v))return{node:{type:$.htmlSelfClosing,tag:v,attrs:V6(_.attrs,v,i),a:e.slice(t,_.end),b:!1},end:_.end};var b=c6.has(y),x=W6(e.slice(0,n),_.end,v);if(x===-1)return{node:{type:$.htmlSelfClosing,tag:v,attrs:V6(_.attrs,v,i),a:e.slice(t,_.end),b:!1},end:_.end};var S=mhe(e,`</`+y,x),C=e.slice(_.end,S),w=[];if(b)C.trim()&&(w=[{type:$.text,text:C}]);else{var T=C.trim();if(T){var{inAnchor:E,inline:D,e:O}=r;y===`a`&&(r.inAnchor=!0),r.e=!1,T.indexOf(`
271
+
272
+ `)!==-1||/^#{1,6}\s/.test(T)?(r.inline=!1,w=a8(T,r,i)):w=i8(T,0,T.length,r,i),r.inAnchor=E,r.inline=D,r.e=O}}return{node:{type:$.htmlBlock,tag:v,attrs:V6(_.attrs,v,i),i:_.rawAttrs,children:w,a:void 0,text:C,d:!1,b:!1},end:x}}var Ahe=200,r8=0;function i8(e,t,n,r,i){if(r8++,r8>Ahe)return r8--,[{type:$.text,text:e.slice(t,n)}];var a=r.g;r.g=void 0;let o=r;if(i.optimizeForStreaming){let r=function(e,t){for(var n=1,r=t+1;r<e.length;r++){var i=e.charCodeAt(r);if(i===G4)n++;else if(i===r3&&(n--,n===0))return r}return-1},i=e.slice(t,n),a=i;for(var s=0,c=0,l=0,u=0,d=0,f=-1,p=-1,m=-1,h=-1,g=-1,_=0;_<i.length;_++){var v=i.charCodeAt(_);v===$4?_+1<i.length&&i.charCodeAt(_+1)===$4?(s++,f=_,_++):(c++,p=_):v===e3?_+1<i.length&&i.charCodeAt(_+1)===e3?(l++,m=_,_++):(u++,h=_):v===W4&&_+1<i.length&&i.charCodeAt(_+1)===W4&&(d++,g=_,_++)}var y=[];d%2==1&&g>=0&&y.push([g,2]),l%2==1&&m>=0&&y.push([m,2]),u%2==1&&h>=0&&y.push([h,1]),s%2==1&&f>=0&&y.push([f,2]),c%2==1&&p>=0&&y.push([p,1]),y.sort(function(e,t){return t[0]-e[0]});for(var b=0;b<y.length;b++){var x=y[b][0],S=y[b][1];i=i.slice(0,x)+i.slice(x+S)}let o=0,ne=-1;for(let e=0;e<i.length;e++)i.charCodeAt(e)===U4&&(o++,ne=e);if(o%2==1&&ne!==-1){let e=!1,t=-1,n=0;for(;n<i.length;)i.charCodeAt(n)===U4&&(e?(e=!1,t=-1):(t=n,e=!0)),n++;e&&t!==-1&&(i=i.slice(0,t))}for(var C=!0;C;){C=!1;for(var w=-1,T=-1,E=-1,D=!1,O=0;O<i.length;O++)if(i.charCodeAt(O)===G4&&(O===0||i.charCodeAt(O-1)!==Q4)){var k=O>0&&i.charCodeAt(O-1)===i3,A=k?O-1:O,j=r(i,O);if(j===-1)w=A,D=k,T=O+1,E=i.length;else{var M=j+1;if(M>=i.length)w=A,D=k,T=O+1,E=j;else if(i.charCodeAt(M)===w3){var N=i.indexOf(`)`,M+1);N===-1?(w=A,D=k,T=O+1,E=j,O=i.length):O=N}else if(i.charCodeAt(M)===G4){var P=i.indexOf(`]`,M+1);P===-1?(w=A,D=k,T=O+1,E=j,O=i.length):O=P}else O=j}}if(w>=0){var F=D?``:i.slice(T,E);i=i.slice(0,w)+F,C=!0}}let R=i.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);if(R&&R.index!==void 0){var I=R[0].length-R[2].length;if(!(I>=2&&R[0].charCodeAt(I-2)===_3)){for(var L=!1,ee=0,te=0;te<R.index;te++)i.charCodeAt(te)===U4&&ee++;if(L=ee%2==1,!L){let e=R[1];H6(i,`</`+e,0)===-1&&(i=i.slice(0,R.index)+R[2])}}}i!==a&&(e=e.slice(0,t)+i,n=t+i.length)}let ne=[];var R=[];let z=t;var B=``,re=i.disableAutoLink||i.disableBareUrls||o.inAnchor?-1:e.indexOf(`@`,t);for(re>=n&&(re=-1);t<n;){let r=e.charCodeAt(t),a=null;if(r===U4){if(a=yhe(e,t,n),!a){var ie=A6(e,t,n,U4);t+=ie-1}}else if(r===$4||r===e3){var ae=Che(e,t,n);if(ae){if(ae.canOpen||ae.canClose){(B||t>z)&&(ne.push(n8(B+e.slice(z,t))),B=``);var oe=n8(e.slice(t,t+ae.len));R.push({idx:ne.length,ch:r,len:ae.len,canOpen:ae.canOpen,canClose:ae.canClose,active:!0}),ne.push(oe),t+=ae.len,z=t;continue}t+=ae.len-1}}else if(r===W4)a=xhe(e,t,n,o,i);else if(r===Z4)a=She(e,t,n,o,i);else if(r===G4)t+1<n&&e.charCodeAt(t+1)===K4&&(a=The(e,t,n,o)),a||=Q6(e,t,n,o,i);else if(r===i3&&t+1<n&&e.charCodeAt(t+1)===G4)a=Q6(e,t,n,o,i);else if(r===t3)a=$6(e,t,n),!a&&!i.disableParsingRawHTML&&!i.ignoreHTMLBlocks&&(a=khe(e,t,n,o,i));else if(r===a3){var se=Ohe(e,t,n);if(se!==-1){var ce=e.slice(t,se),le=I3(ce);if(le!==ce){B=B+e.slice(z,t)+le,t=se,z=se;continue}}}else if((r===l3||r===u3||r===c3)&&!o.inAnchor&&!i.disableAutoLink&&(t===0||e.charCodeAt(t-1)!==t3)){var ue=t+1<n?e.charCodeAt(t+1):0;(r===l3&&ue===d3||r===c3&&ue===d3||r===u3&&ue===u3)&&(a=Ehe(e,t,n,i))}if(!a&&re>=0&&re-t<=64&&!o.inAnchor&&!i.disableAutoLink&&!i.disableBareUrls&&(r>=k3&&r<=A3||r>=j3&&r<=M3||r>=D3&&r<=O3)&&(a=Dhe(e,t,n,i),!a&&t>=re&&(re=e.indexOf(`@`,t+1),re>=n&&(re=-1))),r===H4&&o.e){var de=!1,fe=0;if(t>z&&e.charCodeAt(t-1)===Q4)de=!0,fe=1;else{for(var pe=0,me=t-1;me>=z&&e.charCodeAt(me)===Z;)pe++,me--;pe>=2&&(de=!0,fe=pe)}if(de){for((B||t-fe>z)&&(ne.push(n8(B+e.slice(z,t-fe))),B=``),ne.push({type:$.breakLine}),t++;t<n&&e.charCodeAt(t)===Z;)t++;z=t;continue}var V=t>z&&e.charCodeAt(t-1)===Z,he=t+1<n&&e.charCodeAt(t+1)===Z;if(V||he){for(var ge=t;ge>z&&e.charCodeAt(ge-1)===Z;)ge--;for(B+=e.slice(z,ge)+`
273
+ `,t++;t<n&&e.charCodeAt(t)===Z;)t++;z=t;continue}}if(a)(B||t>z)&&(ne.push(n8(B+e.slice(z,t))),B=``),ne.push(a.node),t=a.end,z=t;else{if(r===Q4&&t+1<n&&x6(e.charCodeAt(t+1))&J3){(B||t>z)&&(ne.push(n8(B+e.slice(z,t))),B=``),ne.push(n8(e[t+1])),t+=2,z=t;continue}if(t++,re<0||re-t>64)for(;t<n&&!(re>=0&&re-t<=64);){var _e=e.charCodeAt(t);if(_e<N3&&!f6[_e])t++;else break}}}return(B||n>z)&&(ne.push(n8(B+e.slice(z,n))),B=``),R.length>0&&whe(ne,R,r,i),r.g=a,r8--,ne}var jhe=500;function a8(e,t,n){var r=t.j||0;if(r>jhe)return[{type:$.text,text:e}];if(t.j=r+1,n.optimizeForStreaming&&!t.m){var i=e.length;i>0&&e.charCodeAt(i-1)===H4&&i--;for(var a=i;a>0&&e.charCodeAt(a-1)!==H4;)a--;if(a>0&&e.charCodeAt(a)===x3){for(var o=!0,s=a;s<i;s++){var c=e.charCodeAt(s);if(c!==Z&&c!==Q&&c!==X4&&c!==o3&&c!==x3){o=!1;break}}if(o){for(var l=a-1;l>0&&e.charCodeAt(l-1)!==H4;)l--;e.charCodeAt(l)===x3&&(e=e.slice(0,l).trimEnd())}}var u=e.trim(),d=u.lastIndexOf(`
274
+ `),f=d===-1?u:u.slice(d+1);if(f.length>0&&f.charCodeAt(0)===x3){for(var p=!1,m=!1,h=1;h<f.length;h++){var g=f.charCodeAt(h);g===x3&&(p=!0),g===X4&&(m=!0)}p&&m&&(e=d===-1?``:e.slice(0,e.lastIndexOf(f)).trimEnd())}for(var _=-1,v=-1,y=-1,b=e.length-1;b>=0;b--)if(e.charCodeAt(b)===t3){var x=b+1<e.length?e.charCodeAt(b+1):0;if(x>=k3&&x<=A3||x>=j3&&x<=M3){for(var S=b+2;S<e.length;){var C=e.charCodeAt(S);if(C>=k3&&C<=A3||C>=j3&&C<=M3||C>=D3&&C<=O3)S++;else break}for(var w=S;w<e.length&&e.charCodeAt(w)!==q4;)w++;if(w<e.length&&e.charCodeAt(w-1)!==_3){for(var T=!1,E=w+1;E<e.length;E++)if(e.charCodeAt(E)===t3){T=!0;break}T||(_=b,v=S,y=w+1)}}break}if(_>=0){for(var D=0,O=0;O<_;O++)e.charCodeAt(O)===U4&&D++;if(D%2==0){var k=e.slice(_+1,v);H6(e,`</`+k,0)===-1&&(e=e.slice(0,_)+e.slice(y))}}for(var A=e.length;A>0&&e.charCodeAt(A-1)===H4;)A--;if(A>0){for(var j=A;j>0&&e.charCodeAt(j-1)!==H4;)j--;for(var M=j,N=0;M<A&&e.charCodeAt(M)===Z&&N<3;)M++,N++;if(j>0&&M<A&&lhe(e,M,A)){for(var P=j-1,F=P;F>0&&e.charCodeAt(F-1)!==H4;)F--;P6(e,F,P)||(e=e.slice(0,j).trimEnd())}}var I=e.length;if(I>0){for(var L=e.lastIndexOf(`
275
+ `),ee=L===-1?0:L+1,te=I,ne=ee,R=0;ne<te&&e.charCodeAt(ne)===Z&&R<3;)ne++,R++;if(ne<te){var z=e.charCodeAt(ne),B=!1;if(z===$4||z===X4||z===b3){var re=ne+1;if(re>=te||e.charCodeAt(re)===Z||e.charCodeAt(re)===Q){for(var ie=re;ie<te&&(e.charCodeAt(ie)===Z||e.charCodeAt(ie)===Q);)ie++;ie>=te&&(B=!0)}}else if(z>=D3&&z<=O3){for(var ae=ne;ae<te&&e.charCodeAt(ae)>=D3&&e.charCodeAt(ae)<=O3;)ae++;if(ae<te&&(e.charCodeAt(ae)===g3||e.charCodeAt(ae)===T3)){var oe=ae+1;if(oe>=te||e.charCodeAt(oe)===Z||e.charCodeAt(oe)===Q){for(var se=oe;se<te&&(e.charCodeAt(se)===Z||e.charCodeAt(se)===Q);)se++;se>=te&&(B=!0)}}}B&&(e=e.slice(0,ee).trimEnd())}}}if(t.inline)return i8(e,0,e.length,t,n);let ce=[],le=0,ue=e.length;if(le===0&&!n.disableFrontmatter&&e.startsWith(`---`)){let t=Fme(e);if(t&&t.hasValidYaml){if(n.preserveFrontmatter!==!1){let n=e.slice(0,t.endPos).trimEnd();ce.push({type:$.frontmatter,text:n})}le=t.endPos}}for(;le<ue;){for(var de=e.indexOf(`
276
+ `,le),fe=de<0?ue:de;le<ue&&P6(e,le,fe);)le=fe<ue?fe+1:fe,le<ue&&(de=e.indexOf(`
277
+ `,le),fe=de<0?ue:de);if(le>=ue)break;var pe=e.charCodeAt(le)===E3;N6(e,le,fe);let r=null;if(C6=e,w6=le,T6=fe,!pe&&j6>=4&&!t.inHTML)r=dhe(e,le);else if(!pe){let i=le+M6,a=e.charCodeAt(i);a===J4?r=che(e,le,t,n):a===q4?r=fhe(e,le,t,n):a===U4||a===W4?r=uhe(e,le,t):a===X4||a===$4||a===e3?(r=F6(e,le),!r&&(r=z6(e,le,t,n))):a===b3||a>=D3&&a<=O3?r=z6(e,le,t,n):a===t3?r=G6(e,le,t,n):a===x3?r=q6(e,le,t,n):a===G4&&(r=ghe(e,le,t))}if(!r){for(var me=!1,V=le;V<fe;V++)if(e.charCodeAt(V)===x3){me=!0;break}me&&(r=q6(e,le,t,n))}if(r||=vhe(e,le,t,n),r)r.node.type!==$.refCollection&&ce.push(r.node),le=r.end;else{var he=e.indexOf(`
278
+ `,le);le=he<0?ue:he+1}}return t.j=r,ce}function Mhe(e,t,n,r){var i=h6(e,t);return i?{tagName:i.tag,tagLower:i.tag.toLowerCase(),attrs:i.rawAttrs,whitespaceBeforeAttrs:i.whitespaceBeforeAttrs,isSelfClosing:i.selfClosing,hasSpaceBeforeSlash:i.hasSpaceBeforeSlash,isClosing:i.isClosing,hasNewline:i.whitespaceBeforeAttrs.includes(`
279
+ `)||i.rawAttrs.includes(`
280
+ `),endPos:i.end}:null}function o8(e,t,n){r8=0,e=Wme(e),!t.refs&&(t.refs={}),(n.optimizeForStreaming||t.inline)&&(t.m=she(e,t.refs,n));var r=!t.k;r&&(t.k=[],t.h=[]);let i=a8(e,t,n);if(r){for(var a=t.k,o={inline:t.inline,inAnchor:t.inAnchor,inHTML:t.inHTML,htmlDepth:t.c,inList:t.inList,inBlockQuote:t.inBlockQuote,noSetext:t.f,depth:t.j},s=0;s<a.length;s++){var c=a[s];t.inline=c.inline,t.inAnchor=c.inAnchor,t.inHTML=c.inHTML,t.c=c.htmlDepth,t.inList=c.inList,t.inBlockQuote=c.inBlockQuote,t.f=c.noSetext,t.j=c.depth,t.e=c.breaks;var l=i8(c.text,0,c.text.length,t,n);t.e=!1;for(var u=0;u<l.length;u++)c.dest.push(l[u])}t.inline=o.inline,t.inAnchor=o.inAnchor,t.inHTML=o.inHTML,t.c=o.htmlDepth,t.inList=o.inList,t.inBlockQuote=o.inBlockQuote,t.f=o.noSetext,t.j=o.depth;for(var d=t.h,f=0;f<d.length;f++)for(var p=d[f],m=0;m<p.src.length;m++){var h=p.src[m];if(p.unwrap&&h.type===$.paragraph)for(var g=h.children,_=0;_<g.length;_++)p.dest.push(g[_]);else p.dest.push(h)}t.k=void 0,t.h=void 0}return $3(t.refs)?[{type:$.refCollection,refs:t.refs},...i]:i}var s8;try{s8=b.createElement(`div`).$$typeof}catch{s8=Symbol.for(`react.transitional.element`)}function c8(e,t,n){return{$$typeof:s8,type:e,key:n==null?null:``+n,ref:null,props:t,_owner:null,_store:{},_debugStack:null,_debugTask:null}}var Nhe=typeof b.createContext<`u`?b.createContext(void 0):void 0;function l8(e,t,n,r,i,a,o,s,c){switch(e.type){case $.blockQuote:{let i={key:n.key};return e.alert&&(i.className=`markdown-alert-`+a(e.alert.toLowerCase(),H3),e.children.unshift(Kme(e.alert))),r(`blockquote`,i,t(e.children,n))}case $.breakLine:return r(`br`,{key:n.key});case $.breakThematic:return r(`hr`,{key:n.key});case $.frontmatter:return s.preserveFrontmatter?r(`pre`,{key:n.key},e.text):null;case $.codeBlock:let f=e.lang?I3(e.lang):``;return r(`pre`,{key:n.key},r(`code`,{...F3(e.attrs),className:f?`language-${f} lang-${f}`:``},e.text));case $.codeInline:return r(`code`,{key:n.key},e.text);case $.footnoteReference:return r(`a`,{key:n.key,href:i(e.target,`a`,`href`)||void 0},r(`sup`,null,e.text));case $.gfmTask:return r(`input`,{checked:e.completed,key:n.key,readOnly:!0,type:`checkbox`});case $.heading:return r(`h${e.level}`,{id:e.id,key:n.key},t(e.children,n));case $.htmlBlock:{let f=e;if(s.tagfilter&&a6(f.tag))return r(`span`,{key:n.key},`<`+f.tag+n6(f.attrs)+`>`);if(f.a&&f.d){let r=f.tag.toLowerCase(),p=ahe(r),m=f.children&&f.children.length>0;if(p){let t=Xme(f.a,r,s.tagfilter);return/<[a-z][^>]{0,100}>/i.test(f.a)?c(e.tag,{key:n.key,...F3(e.attrs),dangerouslySetInnerHTML:{__html:t}}):c(e.tag,{key:n.key,...F3(e.attrs)},t)}let h=RegExp(`^<${f.tag}(\\s|>)`,`i`);if(m&&!h.test(f.a)&&s.tagfilter&&the(f.a))return c(e.tag,{key:n.key,...F3(e.attrs)},t(f.children,n));if(ohe(f.a)){let t=s.tagfilter?o6(f.a):f.a;return c(e.tag,{key:n.key,...F3(e.attrs),dangerouslySetInnerHTML:{__html:t}})}let g={slugify:e=>a(e,H3),sanitizer:i,tagfilter:!0},_=f.a.replace(/>\s+</g,`><`).replace(/\n+/g,` `).trim();if(RegExp(`^<${f.tag}(\\s[^>]*)?>(\\s*</${f.tag}>)?$`,`i`).test(_))return f.children&&f.children.length>0?c(e.tag,{key:n.key,...F3(e.attrs)},t(f.children,n)):c(e.tag,{key:n.key,...F3(e.attrs)});let v=o8(_,{inline:!1,refs:o,inHTML:!1},g);t6(v);let y=f.tag.toLowerCase(),x=`</`+y+`>`,S=h.test(_),C=_.toLowerCase().trimEnd().endsWith(x),w=S&&C;if(w&&m)return c(e.tag,{key:n.key,...F3(e.attrs)},t(f.children,n));if(w)return t(v.flatMap(e6),n);var l=Yme(v,y);if(l.found&&l.afterClose.length>0){var u=l.beforeClose.flatMap(e6),d=l.afterClose.flatMap(e6);return c8(b.Fragment,{children:[c(e.tag,{key:n.key,...F3(e.attrs)},t(u,n)),t(d,n)]},n.key)}return c(e.tag,{key:n.key,...F3(e.attrs)},t(v.flatMap(e6),n))}return G3(e.tag)?c(e.tag,{key:n.key,...F3(e.attrs)}):c(e.tag,{key:n.key,...F3(e.attrs)},e.children?t(e.children,n):``)}case $.htmlSelfClosing:{let t=e;return s.tagfilter&&a6(t.tag)?r(`span`,{key:n.key},`<`+t.tag+n6(t.attrs)+` />`):c(e.tag,{key:n.key,...F3(e.attrs)})}case $.image:{let t=e.target==null?null:i(e.target,`img`,`src`);return r(`img`,{key:n.key,alt:e.alt&&e.alt.length>0?e.alt:void 0,title:e.title||void 0,src:t||void 0})}case $.link:{let i={key:n.key};return e.target!=null&&(i.href=Qme(e.target)),e.title&&(i.title=e.title),r(`a`,i,t(e.children,n))}case $.table:{let i=e;return r(`table`,{key:n.key},r(`thead`,{key:`thead`},r(`tr`,null,i.header.map(function(e,a){return r(`th`,{key:a,style:i.align[a]==null?{}:{textAlign:i.align[a]}},t(e,n))}))),i.cells.length>0&&r(`tbody`,{key:`tbody`},i.cells.map(function(e,a){return r(`tr`,{key:a},e.map(function(e,a){return r(`td`,{key:a,style:i.align[a]==null?{}:{textAlign:i.align[a]}},t(e,n))}))})))}case $.text:return e.text;case $.textFormatted:return r(e.tag,{key:n.key},t(e.children,n));case $.orderedList:case $.unorderedList:return r(e.type===$.orderedList?`ol`:`ul`,{key:n.key,start:e.type===$.orderedList?e.start:void 0},e.items.map(function(e,i){return r(`li`,{key:i},t(e,n))}));case $.paragraph:return r(`p`,{key:n.key},t(e.children,n));case $.ref:return null;default:return null}}var Phe=(e,t,n,r,i,a,o)=>{var s=e=>e.map(function(e){return`text`in e?e.text:``}),c=(l,u={})=>{var d=(u.renderDepth||0)+1;if(d>2500)return s(l);u.renderDepth=d;for(var f=u.key,p=[],m=!1,h=0;h<l.length;h++){u.key=h;var g=e?e(l8.bind(null,l[h],c,u,t,n,r,i,a,o),l[h],c,u):l8(l[h],c,u,t,n,r,i,a,o),_=typeof g==`string`;if(_&&m)p[p.length-1]+=g;else if(g!==null)if(Array.isArray(g))for(var v=0;v<g.length;v++)p.push(g[v]);else p.push(g);m=_}return u.key=f,u.renderDepth=d-1,p};return c},Fhe=(e,t)=>{let n=r6(t,e,void 0);return n?typeof n==`function`||typeof n==`object`&&`render`in n?n:r6(t,`${e}.component`,e):e};function Ihe(e,t){let n={...t||{}};n.overrides=n.overrides||{};let r=n.slugify||H3,i=n.sanitizer||R3,a=n.createElement,o=$3(n.overrides),s=e=>u8(e,{...n,wrapper:null});function c(e){for(var t in e){var n=e[t];if(typeof n==`string`&&n.length>0&&n.charCodeAt(0)===t3&&(nhe.test(n)||rhe.test(n)||Mhe(n,0))){var r=s(n.trim());e[t]=t===`innerHTML`&&Array.isArray(r)?r[0]:r}}}function l(e,t,...r){var i=t||{},s=e;if(o){var c=r6(n.overrides,e+`.props`,{});s=Fhe(e,n.overrides),i={...i,...c,className:$me(i.className,c.className)||void 0}}if(!a){var l=i.key;return l!=null&&delete i.key,r.length===1?i.children=r[0]:r.length>1&&(i.children=r),c8(s,i,l)}return a(s,i,...r)}function u(e,t,...n){return t&&c(t),l(e,t,...n)}let d={...n,slugify:n.slugify?e=>n.slugify(e,H3):H3,sanitizer:i,tagfilter:n.tagfilter!==!1},f=e[0]&&e[0].type===$.refCollection?e[0].refs:{},p=Phe(n.renderRule,l,i,r,f,n,u),m=p(e,{inline:n.forceInline,refs:f}),h=Zme(f);if(h.length&&m.push(l(`footer`,{key:`footer`},h.map(function(e){let t=e.identifier.charCodeAt(0)===K4?e.identifier.slice(1):e.identifier,n=o8(e.footnote,{inline:!0,refs:f},d);return l(`div`,{id:r(t,H3),key:e.identifier},t+`: `,p(n,{inline:!0,refs:f}))}))),n.wrapper===null)return m;let g=n.wrapper||(n.forceInline?`span`:`div`),_;if(m.length>1||n.forceWrapper)_=m;else return m.length===1?m[0]:null;var v=n.wrapperProps?{...n.wrapperProps}:{};return v.children=_,c8(g,v,`outer`)}function u8(e=``,t={}){let n={...t||{}};n.overrides=n.overrides||{},n.slugify;let r=n.sanitizer||R3;function i(e){let t=n.forceInline||!n.forceBlock&&!zme.test(e),i={...n,slugify:n.slugify?e=>n.slugify(e,H3):H3,sanitizer:r,tagfilter:n.tagfilter!==!1},o=t?e:Jme(e);if(n.optimizeForStreaming){var s=o.lastIndexOf(`<`);s!==-1&&o.indexOf(`>`,s)===-1&&(o=o.slice(0,s))}return Ihe(o8(o,{inline:t,refs:a},i),{...i,forceInline:t})}let a={};return i(e)}function Lhe(e){let t=b.useRef(e),n=t.current;if(n!==e){var r=!0,i=0;for(var a in e)if(i++,!Object.is(n[a],e[a])){r=!1;break}if(r){var o=0;for(var s in n)o++;r=o===i}r||(t.current=e)}return t.current}var d8=({children:e,options:t,...n})=>{if(!(typeof b.useContext<`u`)){let r={...t,overrides:{...t?.overrides},wrapperProps:{...t?.wrapperProps,...n}};return u8(e??``,r)}let r=b.useContext(Nhe),i=Lhe(n),a=b.useMemo(()=>({...r,...t,overrides:{...r?.overrides,...t?.overrides},wrapperProps:{...r?.wrapperProps,...t?.wrapperProps,...i}}),[r,t,i]),o=e??``;return b.useMemo(()=>u8(o,a),[o,a])},f8=Symbol(`remove-this-key`),p8=Symbol(`reset`);function Rhe(e,t){return Array.isArray(e.required)&&e.required.includes(t)}function zhe(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(x4.NewStringDefault)}}function Bhe(e){let{fieldPathId:t,schema:n,registry:r,uiSchema:i,errorSchema:a,formData:o,onChange:s,onBlur:c,onFocus:l,disabled:u,readonly:d,required:f,hideError:p,propertyName:m,handleKeyRename:h,handleRemoveProperty:g,addedByAdditionalProperties:_}=e,[v,y]=(0,b.useState)(!1),{globalFormOptions:x,fields:S}=r,{SchemaField:C}=S,w=v4(g4(m,x,t.path)),T=(0,b.useCallback)((e,t,n,r)=>{let i=e;e===void 0&&_&&(i=``),s(i,t,n,r)},[s,_]),E=(0,b.useCallback)(e=>{m!==e&&y(!0),h(m,e)},[m,h]);return(0,H.jsx)(C,{name:m,required:f,schema:n,uiSchema:i,errorSchema:a,fieldPathId:w,formData:o,wasPropertyKeyModified:v,onKeyRename:E,onKeyRenameBlur:(0,b.useCallback)(e=>{let{target:{value:t}}=e;E(t)},[E]),onRemoveProperty:(0,b.useCallback)(()=>{g(m)},[m,g]),onChange:T,onBlur:c,onFocus:l,registry:r,disabled:u,readonly:d,hideError:p})}var Vhe=(0,b.memo)(Bhe);function Hhe(e){let{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:a,name:o,required:s=!1,disabled:c,readonly:l,hideError:u,onBlur:d,onFocus:f,onChange:p,registry:m,title:h}=e,{fields:g,schemaUtils:_,translateString:v,globalUiOptions:y}=m,{OptionalDataControlsField:x}=g,S=(0,b.useRef)(r);S.current=r;let C=(0,b.useMemo)(()=>_.retrieveSchema(t,r,!0),[_,t,r]),w=(0,b.useMemo)(()=>O1(n,y),[n,y]),{properties:T={}}=C,E=e.childFieldPathId??a,D=(0,b.useRef)({previousKey:``,currentKey:void 0}),O=w.title??C.title??h??o,k=w.description??C.description,A=p4(m,C,s,n),j=i4(r),M=[],N=(0,b.useCallback)((e,t)=>{let{duplicateKeySuffixSeparator:r=`-`}=O1(n,y),i=0,a=e;for(;gD(t,a);)i+=1,a=`${e}${r}${i}`;return a},[n,y]),P=(0,b.useCallback)(()=>{if(!(C.additionalProperties||C.patternProperties))return;let e={...r},t=N(`newKey`,e);if(C.patternProperties)QD(e,t,null);else{let n,i,a;if(LC(C.additionalProperties)){n=C.additionalProperties.type,i=C.additionalProperties.const,a=C.additionalProperties.default;let e=C.additionalProperties;`$ref`in e&&(e=_.retrieveSchema({[y1]:e[y1]},r),n=e.type,i=e.const,a=_.getDefaultFormState(e,a)),!n&&(`anyOf`in e||`oneOf`in e)&&(n=`object`)}QD(e,t,i??a??zhe(v,n))}D.current.previousKey===t&&(D.current.currentKey=t,D.current.previousKey=N(t,e)),p(e,E.path)},[r,p,v,_,E,N,C]),F=(0,b.useCallback)((e,t)=>{if(e!==t){let n=S.current,r=N(t,n),i={...n},a={[e]:r},o=Object.keys(i).map(e=>({[Object.hasOwn(a,e)?a[e]:e]:i[e]})),s=Object.assign({},...o);S.current=s,e!==D.current.currentKey&&(D.current.previousKey=e),D.current.currentKey=r,p(s,E.path)}},[p,E,N]),I=(0,b.useCallback)(e=>{p(f8,[...E.path,e])},[p,E]),L=(0,b.useCallback)(e=>D.current.currentKey===e?D.current.previousKey:e,[]);if(!A||j)try{M=Ppe(Object.keys(T),w.order)}catch(e){return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`p`,{className:`rjsf-config-error`,style:{color:`red`},children:(0,H.jsx)(d8,{options:{disableParsingRawHTML:!0},children:v(x4.InvalidObjectField,[o||`root`,e.message])})}),(0,H.jsx)(`pre`,{children:JSON.stringify(C)})]})}let ee=B2(`ObjectFieldTemplate`,m,w),te=A?(0,H.jsx)(x,{...e,fieldPathId:E,schema:C}):void 0;return(0,H.jsx)(ee,{title:w.label===!1?``:O,description:w.label===!1?void 0:k,properties:M.map(e=>{let t=!!C.properties?.[e]?.[s1],a=t?n.additionalProperties:n[e],o=O1(a).widget===`hidden`;return{content:(0,H.jsx)(Vhe,{propertyName:e,required:Rhe(C,e),schema:Y(C,[g1,e],{}),uiSchema:a,errorSchema:Y(i,[e]),fieldPathId:E,formData:Y(r,[e]),handleKeyRename:F,handleRemoveProperty:I,addedByAdditionalProperties:t,onChange:p,onBlur:d,onFocus:f,registry:m,disabled:c,readonly:l,hideError:u},L(e)),name:e,readonly:l,disabled:c,required:s,hidden:o}}),readonly:l,disabled:c,required:s,fieldPathId:a,uiSchema:n,errorSchema:i,schema:C,formData:r,registry:m,optionalDataControl:te,className:A?`rjsf-optional-object-field`:void 0,onAddProperty:P})}function Uhe(e){let{schema:t,uiSchema:n={},formData:r,disabled:i=!1,readonly:a=!1,onChange:o,errorSchema:s,fieldPathId:c,registry:l}=e,{globalUiOptions:u={},schemaUtils:d,translateString:f}=l,p=B2(`OptionalDataControlsTemplate`,l,O1(n,u)),m=i4(r),h,g,_,v;return i||a?(h=r4(c,`Msg`),g=m?void 0:f(x4.OptionalObjectEmptyMsg)):(g=f(m?x4.OptionalObjectRemove:x4.OptionalObjectAdd),m?(h=r4(c,`Remove`),v=()=>o(void 0,c.path,s)):(h=r4(c,`Add`),_=()=>{let e=d.getDefaultFormState(t,r,`excludeObjectChildren`);e===void 0&&(e=e0(t)===`array`?[]:{}),o(e,c.path,s)})),g&&(0,H.jsx)(p,{id:h,registry:l,schema:t,uiSchema:n,label:g,onAddClick:_,onRemoveClick:v})}var Whe={array:`ArrayField`,boolean:`BooleanField`,integer:`NumberField`,number:`NumberField`,object:`ObjectField`,string:`StringField`,null:`NullField`};function Ghe(e,t,n){let{field:r}=t,{fields:i,schemaUtils:a}=n;if(typeof r==`function`)return r;if(typeof r==`string`&&r in i)return i[r];let o=e0(e),s=Array.isArray(o)?o[0]:o||``,c=e.$id,l=Whe[s];return c&&c in i&&(l=c),(e.anyOf||e.oneOf)&&!a.isSelect(e)&&l!==`ObjectField`?()=>null:l in i?i[l]:i.FallbackField}function Khe(e){let{schema:t,fieldPathId:n,uiSchema:r,formData:i,errorSchema:a,name:o,onChange:s,onKeyRename:c,onKeyRenameBlur:l,onRemoveProperty:u,required:d=!1,registry:f,wasPropertyKeyModified:p=!1}=e,{schemaUtils:m,globalFormOptions:h,globalUiOptions:g,fields:_}=f,{AnyOfField:v,OneOfField:y,CyclicSchemaField:x}=_,S=n.$id,C=(0,b.useCallback)((e,t,n,r)=>s(e,t,n,r||S),[S,s]);if(t[x1])return(0,H.jsx)(x,{...e});let w=Fpe(t,r,f),T=O1(w,g),E=B2(`FieldTemplate`,f,T),D=B2(`DescriptionFieldTemplate`,f,T),O=B2(`FieldHelpTemplate`,f,T),k=B2(`FieldErrorTemplate`,f,T),A=m.retrieveSchema(t,i),j=Ghe(A,T,f),M=A.deprecated?T.deprecatedHandling??`label`:void 0,N=!!(T.disabled??e.disabled)||M===`disable`,P=!!(T.readonly??(e.readonly||e.schema.readOnly||A.readOnly)),F=T.hideError,I=F===void 0?e.hideError:!!F,L=!!(T.autofocus??e.autofocus);if(Object.keys(A).length===0)return null;let ee=m.getDisplayLabel(A,w,g),te=T.field&&T.fieldReplacesAnyOrOneOf===!0,ne,R,z={fieldPathId:n};if((`anyOf`in A||`oneOf`in A)&&!te&&!m.isSelect(A)){A.anyOf?(ne=v,R=A[l1].map(e=>m.retrieveSchema(LC(e)?e:{},i))):A.oneOf&&(ne=y,R=A[h1].map(e=>m.retrieveSchema(LC(e)?e:{},i)));let e=p4(f,A,d,w),t=i4(i);ee&&=!e||t,z={childFieldPathId:n,fieldPathId:g4(`XxxOf`,h,n)}}let{__errors:B,...re}=a||{},ie=WD(w,[`ui:classNames`,`classNames`,`ui:style`]);`ui:options`in ie&&(ie[E1]=WD(ie[E1],[`classNames`,`style`]));let ae=(0,H.jsx)(j,{...e,onChange:C,...z,schema:A,uiSchema:ie,disabled:N,readonly:P,hideError:I,autofocus:L,errorSchema:re,rawErrors:B}),oe=n.$id,se;se=p||s1 in A?o:T.title||e.schema.title||A.title||e.title||o,M===`label`&&(se=f.translateString(x4.DeprecatedLabel,[se]));let ce=T.description||e.schema.description||A.description||``,{help:le}=T,ue=T.widget===`hidden`||M===`hide`,de=[`rjsf-field`,`rjsf-field-${e0(A)}`];!I&&B&&B.length>0&&de.push(`rjsf-field-error`),T.classNames&&de.push(T.classNames);let fe=(0,H.jsx)(O,{help:le,fieldPathId:n,schema:A,uiSchema:w,hasErrors:!I&&B&&B.length>0,registry:f}),pe=I||ne&&!m.isSelect(A)?void 0:(0,H.jsx)(k,{errors:B,errorSchema:a,fieldPathId:n,schema:A,uiSchema:w,registry:f});return(0,H.jsx)(E,{description:(0,H.jsx)(D,{id:Y2(oe),description:ce,schema:A,uiSchema:w,registry:f}),rawDescription:ce,help:fe,rawHelp:typeof le==`string`?le:void 0,errors:pe,rawErrors:I?void 0:B,fieldPathId:n,id:oe,label:se,hidden:ue,onChange:s,onKeyRename:c,onKeyRenameBlur:l,onRemoveProperty:u,required:d,disabled:N,readonly:P,hideError:I,displayLabel:ee,classNames:de.join(` `).trim(),style:T.style,formData:i,schema:A,uiSchema:w,registry:f,children:(0,H.jsxs)(H.Fragment,{children:[ae,ne&&(0,H.jsx)(ne,{name:o,disabled:N,readonly:P,hideError:I,errorSchema:a,formData:i,fieldPathId:n,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus,options:R,registry:f,required:d,schema:A,uiSchema:w})]})})}var qhe=(0,b.memo)(Khe,(e,t)=>{let{experimental_componentUpdateStrategy:n=`customDeep`}=t.registry.globalFormOptions;return n===`always`?!1:n===`shallow`?d4(e,t):U1(e,t)});function Jhe(e){let{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:a,required:o,disabled:s=!1,readonly:c=!1,autofocus:l=!1,onChange:u,onBlur:d,onFocus:f,registry:p,rawErrors:m,hideError:h,title:g}=e,{title:_,format:v}=t,{widgets:y,schemaUtils:x,globalUiOptions:S}=p,C=x.isSelect(t)?i2(t,r):void 0,w=C?`select`:`text`;v&&jpe(t,v,y)&&(w=v);let{widget:T=w,placeholder:E=``,title:D,...O}=O1(r),k=x.getDisplayLabel(t,r,S),A=D??g??_??n,j=W2(t,T,y),M=(0,b.useCallback)((e,t,n)=>u(e,i.path,t,n),[u,i]);return(0,H.jsx)(j,{options:{...O,enumOptions:C},schema:t,uiSchema:r,id:i.$id,name:n,label:A,hideLabel:!k,hideError:h,value:a,onChange:M,onBlur:d,onFocus:f,required:o,disabled:s,readonly:c,autofocus:l,registry:p,placeholder:E,rawErrors:m,htmlName:i.name})}function Yhe(){return{AnyOfField:z4,ArrayField:ime,BooleanField:ame,CyclicSchemaField:ome,FallbackField:ume,LayoutGridField:I4,LayoutHeaderField:Cme,LayoutMultiSchemaField:wme,NumberField:Ome,ObjectField:Hhe,OneOfField:z4,OptionalDataControlsField:Uhe,SchemaField:qhe,StringField:Jhe,NullField:Tme}}function Xhe(e){let{fieldPathId:t,description:n,registry:r,schema:i,uiSchema:a}=e,o=O1(a,r.globalUiOptions),{label:s=!0}=o;return!n||!s?null:(0,H.jsx)(B2(`DescriptionFieldTemplate`,r,o),{id:Y2(t),description:n,schema:i,uiSchema:a,registry:r})}function Zhe(e){let{disabled:t,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:a,fieldPathId:o,onCopyItem:s,onRemoveItem:c,onMoveDownItem:l,onMoveUpItem:u,readonly:d,registry:f,uiSchema:p}=e,{CopyButton:m,MoveDownButton:h,MoveUpButton:g,RemoveButton:_}=f.templates.ButtonTemplates;return(0,H.jsxs)(H.Fragment,{children:[(i||r)&&(0,H.jsx)(g,{id:n4(o,`moveUp`),className:`rjsf-array-item-move-up`,disabled:t||d||!i,onClick:u,uiSchema:p,registry:f}),(i||r)&&(0,H.jsx)(h,{id:n4(o,`moveDown`),className:`rjsf-array-item-move-down`,disabled:t||d||!r,onClick:l,uiSchema:p,registry:f}),n&&(0,H.jsx)(m,{id:n4(o,`copy`),className:`rjsf-array-item-copy`,disabled:t||d,onClick:s,uiSchema:p,registry:f}),a&&(0,H.jsx)(_,{id:n4(o,`remove`),className:`rjsf-array-item-remove`,disabled:t||d,onClick:c,uiSchema:p,registry:f})]})}function Qhe(e){let{children:t,className:n,buttonsProps:r,displayLabel:i,hasDescription:a,hasToolbar:o,registry:s,uiSchema:c}=e,l=B2(`ArrayFieldItemButtonsTemplate`,s,O1(c)),u={flex:1,paddingLeft:6,paddingRight:6,fontWeight:`bold`},d=a?31:9,f={display:`flex`,alignItems:i?`center`:`baseline`},p={display:`flex`,justifyContent:`flex-end`,marginTop:i?`${d}px`:0};return(0,H.jsxs)(`div`,{className:n,style:f,children:[(0,H.jsx)(`div`,{className:o?`col-xs-9 col-md-10 col-xl-11`:`col-xs-12`,children:t}),o&&(0,H.jsx)(`div`,{className:`col-xs-3 col-md-2 col-xl-1 array-item-toolbox`,children:(0,H.jsx)(`div`,{className:`btn-group`,style:p,children:(0,H.jsx)(l,{...r,style:u})})})]})}function $he(e){let{canAdd:t,className:n,disabled:r,fieldPathId:i,uiSchema:a,items:o,optionalDataControl:s,onAddClick:c,readonly:l,registry:u,required:d,schema:f,title:p}=e,m=O1(a),h=B2(`ArrayFieldDescriptionTemplate`,u,m),g=B2(`ArrayFieldTitleTemplate`,u,m),_=!l&&!r,{ButtonTemplates:{AddButton:v}}=u.templates;return(0,H.jsxs)(`fieldset`,{className:n,id:i.$id,children:[(0,H.jsx)(g,{fieldPathId:i,title:m.title||p,required:d,schema:f,uiSchema:a,registry:u,optionalDataControl:_?s:void 0}),(0,H.jsx)(h,{fieldPathId:i,description:m.description||f.description,schema:f,uiSchema:a,registry:u}),_?void 0:s,(0,H.jsx)(`div`,{className:`row array-item-list`,children:o}),t&&(0,H.jsx)(v,{id:n4(i,`add`),className:`rjsf-array-item-add`,onClick:c,disabled:r||l,uiSchema:a,registry:u})]})}function ege(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,optionalDataControl:s}=e,c=O1(i,o.globalUiOptions),{label:l=!0}=c;return!n||!l?null:(0,H.jsx)(B2(`TitleFieldTemplate`,o,c),{id:$2(t),title:n,required:a,schema:r,uiSchema:i,registry:o,optionalDataControl:s})}function m8(e){let{id:t,schema:n}=e,{examples:r,default:i}=n;return Array.isArray(r)?(0,H.jsx)(`datalist`,{id:Z2(t),children:r.concat(i!==void 0&&!r.map(String).includes(String(i))?[i]:[]).map(e=>(0,H.jsx)(`option`,{value:e},String(e)))},`datalist_${t}`):null}function tge(e){let{id:t,name:n,htmlName:r,value:i,readonly:a,disabled:o,autofocus:s,onBlur:c,onFocus:l,onChange:u,onChangeOverride:d,options:f,schema:p,uiSchema:m,registry:h,rawErrors:g,type:_,hideLabel:v,hideError:y,...x}=e,{ClearButton:S}=h.templates.ButtonTemplates;if(!t)throw console.log(`No id for`,e),Error(`no id for props ${JSON.stringify(e)}`);let C={...x,...I2(p,_,f)},w;w=C.type===`number`||C.type===`integer`?i||i===0?i:``:i??``;let T=(0,b.useCallback)(({target:{value:e}})=>u(e===``?f.emptyValue:e),[u,f]),E=(0,b.useCallback)(({target:e})=>c(t,e?.value),[c,t]),D=(0,b.useCallback)(({target:e})=>l(t,e?.value),[l,t]),O=(0,b.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),u(f.emptyValue??``)},[u,f.emptyValue]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`input`,{id:t,name:r||t,className:`form-control`,readOnly:a,disabled:o,autoFocus:s,value:w,...C,list:p.examples?Z2(t):void 0,onChange:d||T,onBlur:E,onFocus:D,"aria-describedby":e4(t,!!p.examples)}),f.allowClearTextInputs&&!a&&!o&&w&&(0,H.jsx)(S,{registry:h,onClick:O}),(0,H.jsx)(m8,{id:t,schema:p})]})}function nge(e){let{iconType:t=`default`,icon:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,H.jsx)(`button`,{type:`button`,className:`btn btn-${t} ${r}`,...o,children:(0,H.jsx)(`i`,{className:`glyphicon glyphicon-${n}`})})}var h8=(0,b.memo)(nge);function rge(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(h8,{title:t(x4.CopyButton),...e,icon:`copy`})}var ige=(0,b.memo)(rge);function age(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(h8,{title:t(x4.MoveDownButton),...e,icon:`arrow-down`})}var oge=(0,b.memo)(age);function sge(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(h8,{title:t(x4.MoveUpButton),...e,icon:`arrow-up`})}var cge=(0,b.memo)(sge);function lge(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(h8,{title:t(x4.RemoveButton),...e,iconType:`danger`,icon:`remove`})}var uge=(0,b.memo)(lge);function dge({id:e,className:t,onClick:n,disabled:r,registry:i,...a}){let{translateString:o}=i;return(0,H.jsx)(h8,{id:e,iconType:`default`,icon:`remove`,className:`btn-clear col-xs-12`,title:o(x4.ClearButton),onClick:n,disabled:r,registry:i,...a})}var fge=(0,b.memo)(dge);function pge({id:e,className:t,onClick:n,disabled:r,registry:i}){let{translateString:a}=i;return(0,H.jsx)(`div`,{className:`row`,children:(0,H.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:(0,H.jsx)(h8,{id:e,iconType:`info`,icon:`plus`,className:`btn-add col-xs-12`,title:a(x4.AddButton),onClick:n,disabled:r,registry:i})})})}function mge({uiSchema:e}){let{submitText:t,norender:n,props:r={}}=z2(e);return n?null:(0,H.jsx)(`div`,{children:(0,H.jsx)(`button`,{type:`submit`,...r,className:`btn btn-info ${r.className||``}`,children:t})})}function hge(){return{SubmitButton:mge,AddButton:pge,CopyButton:ige,MoveDownButton:oge,MoveUpButton:cge,RemoveButton:uge,ClearButton:fge}}function gge(e){let{name:t,fieldPathId:n,registry:r,onExpand:i}=e,{translateString:a}=r,o=`${n.$id}-button`;return(0,H.jsxs)(`div`,{style:{marginTop:`1rem`},children:[(0,H.jsx)(`div`,{className:`text-danger`,children:a(x4.CycleDetected,[t])}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`button`,{id:o,type:`button`,className:`btn btn-sm btn-warning`,onClick:()=>i(n.$id),children:a(x4.ExpandButton)}),` `]})]})}var g8=V2();function _8({description:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return O1(n,r).enableMarkdownInDescription&&typeof e==`string`?(0,H.jsx)(d8,{options:{disableParsingRawHTML:!0},"data-testid":g8.markdown,children:e}):e}_8.TEST_IDS=g8;function _ge(e){let{id:t,description:n,registry:r,uiSchema:i}=e;return n?(0,H.jsx)(`div`,{id:t,className:`field-description`,children:(0,H.jsx)(_8,{description:n,registry:r,uiSchema:i})}):null}function vge({errors:e,registry:t}){let{translateString:n}=t;return(0,H.jsxs)(`div`,{className:`panel panel-danger errors`,children:[(0,H.jsx)(`div`,{className:`panel-heading`,children:(0,H.jsx)(`h3`,{className:`panel-title`,children:n(x4.ErrorsLabel)})}),(0,H.jsx)(`ul`,{className:`list-group`,children:e.map((e,t)=>(0,H.jsx)(`li`,{className:`list-group-item text-danger`,children:e.stack},t))})]})}function yge(e){let{schema:t,registry:n,typeSelector:r,schemaField:i}=e;return(0,H.jsx)(B2(`MultiSchemaFieldTemplate`,n),{selector:r,optionSchemaField:i,schema:t,registry:n})}function bge(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,H.jsx)(`div`,{children:(0,H.jsx)(`ul`,{id:X2(n),className:`error-detail bs-callout bs-callout-info`,children:t.filter(e=>!!e).map((e,t)=>(0,H.jsx)(`li`,{className:`text-danger`,children:e},t))})})}var v8=V2();function y8({help:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return O1(n,r).enableMarkdownInHelp&&typeof e==`string`?(0,H.jsx)(d8,{options:{disableParsingRawHTML:!0},"data-testid":v8.markdown,children:e}):e}y8.TEST_IDS=v8;function xge(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i}=e;return n?(0,H.jsx)(`div`,{id:Q2(t),className:`help-block`,children:(0,H.jsx)(y8,{help:n,registry:i,uiSchema:r})}):null}var Sge=`*`;function b8(e){let{label:t,required:n,id:r}=e;return t?(0,H.jsxs)(`label`,{className:`control-label`,htmlFor:r,children:[t,n&&(0,H.jsx)(`span`,{className:`required`,children:Sge})]}):null}function Cge(e){let{id:t,label:n,children:r,errors:i,help:a,description:o,hidden:s,required:c,displayLabel:l,registry:u,uiSchema:d}=e,f=O1(d),p=B2(`WrapIfAdditionalTemplate`,u,f);if(s)return(0,H.jsx)(`div`,{className:`hidden`,children:r});let m=f.widget===`checkbox`;return(0,H.jsxs)(p,{...e,children:[l&&!m&&(0,H.jsx)(b8,{label:n,required:c,id:t}),l&&o?o:null,r,i,a]})}var wge=Cge;function Tge(e){let{children:t,column:n,className:r,...i}=e;return(0,H.jsx)(`div`,{className:r,...i,children:t})}function Ege(e){let{selector:t,optionSchemaField:n}=e;return(0,H.jsxs)(`div`,{className:`panel panel-default panel-body`,children:[(0,H.jsx)(`div`,{className:`form-group`,children:t}),n]})}function Dge(e){let{className:t,description:n,disabled:r,formData:i,fieldPathId:a,onAddProperty:o,optionalDataControl:s,properties:c,readonly:l,registry:u,required:d,schema:f,title:p,uiSchema:m}=e,h=O1(m),g=B2(`TitleFieldTemplate`,u,h),_=B2(`DescriptionFieldTemplate`,u,h);if((f.oneOf||f.anyOf)&&!f.properties&&c.length===0)return null;let v=!l&&!r,{ButtonTemplates:{AddButton:y}}=u.templates;return(0,H.jsxs)(`fieldset`,{className:t,id:a.$id,children:[p&&(0,H.jsx)(g,{id:$2(a),title:p,required:d,schema:f,uiSchema:m,registry:u,optionalDataControl:v?s:void 0}),n&&(0,H.jsx)(_,{id:Y2(a),description:n,schema:f,uiSchema:m,registry:u}),v?void 0:s,c.map(e=>e.content),k1(f,m,i)&&(0,H.jsx)(y,{id:n4(a,`add`),className:`rjsf-object-property-expand`,onClick:o,disabled:r||l,uiSchema:m,registry:u})]})}function Oge(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,H.jsx)(h8,{id:t,registry:n,icon:`plus`,className:`rjsf-add-optional-data btn-sm`,onClick:i,title:r}):a?(0,H.jsx)(h8,{id:t,registry:n,icon:`remove`,className:`rjsf-remove-optional-data btn-sm`,onClick:a,title:r}):(0,H.jsx)(`em`,{id:t,children:r})}var kge=`*`;function Age(e){let{id:t,title:n,required:r,optionalDataControl:i}=e;return(0,H.jsxs)(`legend`,{id:t,children:[n,r&&(0,H.jsx)(`span`,{className:`required`,children:kge}),i&&(0,H.jsx)(`span`,{className:`pull-right`,style:{marginBottom:`2px`},children:i})]})}function jge(e){let{schema:t,fieldPathId:n,reason:r,registry:i}=e,{translateString:a}=i,o=x4.UnsupportedField,s=[];return n?.$id&&(o=x4.UnsupportedFieldWithId,s.push(n.$id)),r&&(o=o===x4.UnsupportedField?x4.UnsupportedFieldWithReason:x4.UnsupportedFieldWithIdAndReason,s.push(r)),(0,H.jsxs)(`div`,{className:`unsupported-field`,children:[(0,H.jsx)(`p`,{children:(0,H.jsx)(d8,{options:{disableParsingRawHTML:!0},children:a(o,s)})}),t&&(0,H.jsx)(`pre`,{children:JSON.stringify(t,null,2)})]})}function Mge(e){let{id:t,classNames:n,style:r,disabled:i,displayLabel:a,label:o,onKeyRenameBlur:s,onRemoveProperty:c,rawDescription:l,readonly:u,required:d,schema:f,hideError:p,rawErrors:m,children:h,uiSchema:g,registry:_}=e,{templates:v,translateString:y}=_,{RemoveButton:b}=v.ButtonTemplates,x=y(x4.KeyLabel,[o]),S=s1 in f,C=!!l,w=[`form-group`,n];!p&&m&&m.length>0&&w.push(`has-error has-danger`);let T=w.join(` `).trim();if(!S)return(0,H.jsx)(`div`,{className:T,style:r,children:h});let E=C?46:26;return(0,H.jsx)(`div`,{className:T,style:r,children:(0,H.jsxs)(`div`,{className:`row`,children:[(0,H.jsx)(`div`,{className:`col-xs-5 form-additional`,children:(0,H.jsxs)(`div`,{className:`form-group`,children:[a&&(0,H.jsx)(b8,{label:x,required:d,id:`${t}-key`}),a&&l&&(0,H.jsx)(`div`,{children:`\xA0`}),(0,H.jsx)(`input`,{className:`form-control`,type:`text`,id:`${t}-key`,onBlur:s,defaultValue:o},o)]})}),(0,H.jsx)(`div`,{className:`form-additional form-group col-xs-5`,children:h}),(0,H.jsx)(`div`,{className:`col-xs-2`,style:{marginTop:a?`${E}px`:void 0},children:(0,H.jsx)(b,{id:n4(t,`remove`),className:`rjsf-object-property-remove btn-block`,style:{border:`0`},disabled:i||u,onClick:c,uiSchema:g,registry:_})})]})})}function Nge(){return{ArrayFieldDescriptionTemplate:Xhe,ArrayFieldItemTemplate:Qhe,ArrayFieldItemButtonsTemplate:Zhe,ArrayFieldTemplate:$he,ArrayFieldTitleTemplate:ege,ButtonTemplates:hge(),BaseInputTemplate:tge,CyclicSchemaExpandTemplate:gge,DescriptionFieldTemplate:_ge,ErrorListTemplate:vge,FallbackFieldTemplate:yge,FieldTemplate:wge,FieldErrorTemplate:bge,FieldHelpTemplate:xge,GridTemplate:Tge,MultiSchemaFieldTemplate:Ege,ObjectFieldTemplate:Dge,OptionalDataControlsTemplate:Oge,TitleFieldTemplate:Age,UnsupportedFieldTemplate:jge,WrapIfAdditionalTemplate:Mge}}function Pge({time:e=!0,...t}){let{AltDateWidget:n}=t.registry.widgets;return(0,H.jsx)(n,{time:e,...t})}function Fge(e){let{disabled:t=!1,readonly:n=!1,autofocus:r=!1,options:i,id:a,name:o,registry:s,onBlur:c,onFocus:l}=e,{translateString:u}=s,{elements:d,handleChange:f,handleClear:p,handleSetNow:m}=Bpe(e);return(0,H.jsxs)(`ul`,{className:`list-inline`,children:[d.map((e,i)=>(0,H.jsx)(`li`,{className:`list-inline-item`,children:(0,H.jsx)(zpe,{rootId:a,name:o,select:f,...e,disabled:t,readonly:n,registry:s,onBlur:c,onFocus:l,autofocus:r&&i===0})},i)),(i.hideNowButton===`undefined`||!i.hideNowButton)&&(0,H.jsx)(`li`,{className:`list-inline-item`,children:(0,H.jsx)(`button`,{type:`button`,className:`btn btn-info btn-now`,onClick:m,children:u(x4.NowLabel)})}),(i.hideClearButton===`undefined`||!i.hideClearButton)&&(0,H.jsx)(`li`,{className:`list-inline-item`,children:(0,H.jsx)(`button`,{type:`button`,className:`btn btn-warning btn-clear`,onClick:p,children:u(x4.ClearLabel)})})]})}function Ige({id:e,disabled:t,options:n,value:r,autofocus:i=!1,readonly:a,onChange:o,onBlur:s,onFocus:c,htmlName:l}){let{inline:u=!1,enumOptions:d,enumDisabled:f,emptyValue:p}=n,m=L2(n),h=Array.isArray(r)?r:[r],g=(0,b.useCallback)(({target:t})=>s(e,j2(t?.value,d,m,p)),[s,e,d,p,m]),_=(0,b.useCallback)(({target:t})=>c(e,j2(t?.value,d,m,p)),[c,e,d,p,m]);return(0,H.jsx)(`div`,{className:`checkboxes`,id:e,children:Array.isArray(d)&&d.map((n,r)=>{let s=E2(n.value,h),c=Array.isArray(f)&&f.includes(n.value),p=t||c||a?`disabled`:``,v=(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`input`,{type:`checkbox`,id:t4(e,r),name:l||e,checked:s,value:M2(n.value,r,m),disabled:t||c||a,autoFocus:i&&r===0,onChange:e=>{e.target.checked?o(k2(r,h,d)):o(T2(r,h,d))},onBlur:g,onFocus:_,"aria-describedby":e4(e)}),(0,H.jsx)(`span`,{children:n.label})]});return u?(0,H.jsx)(`label`,{className:`checkbox-inline ${p}`,children:v},String(n.value)):(0,H.jsx)(`div`,{className:`checkbox ${p}`,children:(0,H.jsx)(`label`,{children:v})},String(n.value))})})}function Lge({schema:e,uiSchema:t,options:n,id:r,value:i,disabled:a,readonly:o,label:s,hideLabel:c,autofocus:l=!1,onBlur:u,onFocus:d,onChange:f,registry:p,htmlName:m}){let h=B2(`DescriptionFieldTemplate`,p,n),g=l4(e),_=(0,b.useCallback)(e=>f(e.target.checked),[f]),v=(0,b.useCallback)(e=>u(r,e.target.checked),[u,r]),y=(0,b.useCallback)(e=>d(r,e.target.checked),[d,r]),x=O1(t).widget===`checkbox`?void 0:n.description??e.description;return(0,H.jsxs)(`div`,{className:`checkbox ${a||o?`disabled`:``}`,children:[!c&&x&&(0,H.jsx)(h,{id:Y2(r),description:x,schema:e,uiSchema:t,registry:p}),(0,H.jsxs)(`label`,{children:[(0,H.jsx)(`input`,{type:`checkbox`,id:r,name:m||r,checked:i!==void 0&&i,required:g,disabled:a||o,autoFocus:l,onChange:_,onBlur:v,onFocus:y,"aria-describedby":e4(r)}),a4((0,H.jsx)(`span`,{children:s}),c)]})]})}function Rge(e){let{disabled:t,readonly:n,options:r,registry:i}=e;return(0,H.jsx)(B2(`BaseInputTemplate`,i,r),{type:`color`,...e,disabled:t||n})}function zge(e){let{onChange:t,value:n,options:r,registry:i}=e;return(0,H.jsx)(B2(`BaseInputTemplate`,i,r),{type:`datetime-local`,...e,value:Kpe(n),onChange:e=>t(Npe(e))})}function Bge(e){let{onChange:t,options:n,registry:r}=e,i=B2(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e||void 0),[t]);return(0,H.jsx)(i,{type:`date`,...e,onChange:a})}function Vge(e){let{options:t,registry:n}=e;return(0,H.jsx)(B2(`BaseInputTemplate`,n,t),{type:`email`,...e})}function Hge({fileInfo:e,registry:t}){let{translateString:n}=t,{dataURL:r,type:i,name:a}=e;if(!r)return null;let o=n(x4.PreviewLabel);return[`image/jpeg`,`image/png`].includes(i)?(0,H.jsx)(`img`,{src:r,alt:o,style:{maxWidth:`100%`},className:`file-preview`}):(0,H.jsxs)(H.Fragment,{children:[` `,(0,H.jsx)(`a`,{download:`preview-${a}`,href:r,className:`file-download`,children:o})]})}function Uge({filesInfo:e,registry:t,preview:n,onRemove:r,options:i}){if(e.length===0)return null;let{translateString:a}=t,{RemoveButton:o}=B2(`ButtonTemplates`,t,i);return(0,H.jsx)(`ul`,{className:`file-info`,children:e.map((e,i)=>{let{name:s,size:c,type:l}=e;return(0,H.jsxs)(`li`,{children:[(0,H.jsx)(d8,{children:a(x4.FilesInfo,[s,l,String(c)])}),n&&(0,H.jsx)(Hge,{fileInfo:e,registry:t}),(0,H.jsx)(o,{onClick:()=>r(i),registry:t})]},i)})})}function Wge(e){let{disabled:t,readonly:n,required:r,multiple:i,onChange:a,value:o,options:s,registry:c}=e,{filesInfo:l,handleChange:u,handleRemove:d}=Gpe(o,a,i),f=B2(`BaseInputTemplate`,c,s),p=e=>{e.target.files&&u(e.target.files)};return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(f,{...e,disabled:t||n,type:`file`,required:!o&&r,onChangeOverride:p,value:``,accept:s.accept?String(s.accept):void 0}),(0,H.jsx)(Uge,{filesInfo:l,onRemove:d,registry:c,preview:s.filePreview,options:s})]})}function Gge({id:e,value:t,htmlName:n}){return(0,H.jsx)(`input`,{type:`hidden`,id:e,name:n||e,value:t===void 0?``:t})}function Kge(e){let{options:t,registry:n}=e;return(0,H.jsx)(B2(`BaseInputTemplate`,n,t),{type:`password`,...e})}function qge({options:e,value:t,required:n,disabled:r,readonly:i,autofocus:a=!1,onBlur:o,onFocus:s,onChange:c,id:l,htmlName:u}){let{enumOptions:d,enumDisabled:f,inline:p,emptyValue:m}=e,h=L2(e),g=(0,b.useCallback)(({target:e})=>o(l,j2(e?.value,d,h,m)),[o,d,m,l,h]),_=(0,b.useCallback)(({target:e})=>s(l,j2(e?.value,d,h,m)),[s,d,m,l,h]);return(0,H.jsx)(`div`,{className:`field-radio-group`,id:l,role:`radiogroup`,children:Array.isArray(d)&&d.map((e,o)=>{let s=E2(e.value,t),d=Array.isArray(f)&&f.includes(e.value),m=r||d||i?`disabled`:``,v=(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`input`,{type:`radio`,id:t4(l,o),checked:s,name:u||l,required:n,value:M2(e.value,o,h),disabled:r||d||i,autoFocus:a&&o===0,onChange:()=>c(e.value),onBlur:g,onFocus:_,"aria-describedby":e4(l)}),(0,H.jsx)(`span`,{children:e.label})]});return p?(0,H.jsx)(`label`,{className:`radio-inline ${m}`,children:v},String(e.value)):(0,H.jsx)(`div`,{className:`radio ${m}`,children:(0,H.jsx)(`label`,{children:v})},String(e.value))})})}function Jge(e){let{value:t,registry:{templates:{BaseInputTemplate:n}}}=e;return(0,H.jsxs)(`div`,{className:`field-range-wrapper`,children:[(0,H.jsx)(n,{type:`range`,...e}),(0,H.jsx)(`span`,{className:`range-view`,children:t})]})}function Yge({id:e,value:t,required:n,disabled:r,readonly:i,autofocus:a,onChange:o,onFocus:s,onBlur:c,schema:l,options:u,htmlName:d}){let{stars:f=5,shape:p=`star`}=u,m=l.maximum?Math.min(l.maximum,5):Math.min(Math.max(f,1),5),h=l.minimum||0,g=(0,b.useCallback)(e=>{!r&&!i&&o(e)},[o,r,i]),_=(0,b.useCallback)(t=>{s&&s(e,Number(t.target.dataset.value))},[s,e]),v=(0,b.useCallback)(t=>{c&&c(e,Number(t.target.dataset.value))},[c,e]),y=e=>p===`heart`?e?`♥`:`♡`:e?`★`:`☆`;return(0,H.jsxs)(`div`,{className:`rating-widget`,style:{display:`inline-flex`,fontSize:`1.5rem`,cursor:r||i?`default`:`pointer`},children:[[...Array(m)].map((e,n)=>{let a=h+n,o=a<=t;return(0,H.jsx)(`span`,{onClick:()=>g(a),onKeyDown:e=>(e.key===`Enter`||e.key===` `)&&g(a),onFocus:_,onBlur:v,"data-value":a,tabIndex:r||i?-1:0,role:`radio`,"aria-checked":a===t,"aria-label":`${a} ${p===`heart`?`heart`:`star`}${a===1?``:`s`}`,style:{color:o?`#FFD700`:`#ccc`,padding:`0 0.2rem`,transition:`color 0.2s`,userSelect:`none`},children:y(o)},n)}),(0,H.jsx)(`input`,{type:`hidden`,id:e,name:d||e,value:t||``,required:n,disabled:r||i,"aria-hidden":`true`})]})}function x8(e,t){return t?Array.from(e.target.options).slice().filter(e=>e.selected).map(e=>e.value):e.target.value}function Xge({schema:e,id:t,options:n,value:r,required:i,disabled:a,readonly:o,multiple:s=!1,autofocus:c=!1,onChange:l,onBlur:u,onFocus:d,placeholder:f,htmlName:p,registry:m,uiSchema:h}){let{enumOptions:g,enumDisabled:_,emptyValue:v}=n,y=s?[]:``,x=L2(n),S=(0,b.useCallback)(e=>d(t,j2(x8(e,s),g,x,v)),[d,t,s,g,v,x]),C=(0,b.useCallback)(e=>u(t,j2(x8(e,s),g,x,v)),[u,t,s,g,v,x]),w=(0,b.useCallback)(e=>l(j2(x8(e,s),g,x,v)),[l,s,g,v,x]),T=O2(r,g,s,x,y),E=!s&&e.default===void 0;return o4(t,e,g,s),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(u4,{id:t,multiple:s,options:n,registry:m,uiSchema:h,value:r}),(0,H.jsxs)(`select`,{id:t,name:p||t,multiple:s,className:`form-control`,value:T,required:i,disabled:a||o,autoFocus:c,onBlur:C,onFocus:S,onChange:w,"aria-describedby":e4(t),children:[E&&(0,H.jsx)(`option`,{value:``,children:f}),Array.isArray(g)&&g.map(({value:e,label:t},n)=>{let r=_&&_.includes(e);return(0,H.jsx)(`option`,{value:M2(e,n,x),disabled:r,children:t},String(e))})]})]})}function Zge({id:e,options:t,placeholder:n,value:r,required:i,disabled:a,readonly:o,autofocus:s=!1,onChange:c,onBlur:l,onFocus:u,htmlName:d}){let f=(0,b.useCallback)(({target:{value:e}})=>c(e===``?t.emptyValue:e),[c,t.emptyValue]),p=(0,b.useCallback)(({target:t})=>l(e,t?.value),[l,e]),m=(0,b.useCallback)(({target:t})=>u(e,t?.value),[e,u]);return(0,H.jsx)(`textarea`,{id:e,name:d||e,className:`form-control`,value:r||``,placeholder:n,required:i,disabled:a,readOnly:o,autoFocus:s,rows:t.rows,onBlur:p,onFocus:m,onChange:f,"aria-describedby":e4(e)})}function Qge(e){let{options:t,registry:n}=e;return(0,H.jsx)(B2(`BaseInputTemplate`,n,t),{...e})}function $ge(e){let{onChange:t,options:n,registry:r}=e,i=B2(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e?`${e}:00`:void 0),[t]);return(0,H.jsx)(i,{type:`time`,...e,onChange:a})}function e_e(e){let{options:t,registry:n}=e;return(0,H.jsx)(B2(`BaseInputTemplate`,n,t),{type:`number`,...e})}function t_e(e){let{options:t,registry:n}=e;return(0,H.jsx)(B2(`BaseInputTemplate`,n,t),{type:`url`,...e})}function n_e(){return{AltDateWidget:Fge,AltDateTimeWidget:Pge,CheckboxWidget:Lge,CheckboxesWidget:Ige,ColorWidget:Rge,DateWidget:Bge,DateTimeWidget:zge,EmailWidget:Vge,FileWidget:Wge,HiddenWidget:Gge,PasswordWidget:Kge,RadioWidget:qge,RangeWidget:Jge,RatingWidget:Yge,SelectWidget:Xge,TextWidget:Qge,TextareaWidget:Zge,TimeWidget:$ge,UpDownWidget:e_e,URLWidget:t_e}}function r_e(){return{fields:Yhe(),templates:Nge(),widgets:n_e(),rootSchema:{},formContext:{},translateString:Epe,globalFormOptions:{idPrefix:S1,idSeparator:`_`,useFallbackUiForUnsupportedType:!1}}}function S8(e,t){return{...YD(e,[`schema`,`uiSchema`,`fieldPathId`,`schemaUtils`,`formData`,`edit`,`errors`,`errorSchema`]),...t!==void 0&&{status:t}}}var i_e=class e extends b.Component{formElement;pendingChanges=[];isProcessingUserChange=!1;static getDerivedStateFromProps(e,t){if(e.extraErrors!==t.prevExtraErrors){let n={errors:t.schemaValidationErrors||[],errorSchema:t.schemaValidationErrorSchema||{}},{errors:r,errorSchema:i}=n;return e.extraErrors&&({errors:r,errorSchema:i}=y4(n,e.extraErrors)),t.customErrors&&({errors:r,errorSchema:i}=y4({errors:r,errorSchema:i},t.customErrors.ErrorSchema,!0)),{prevExtraErrors:e.extraErrors,errors:r,errorSchema:i}}return null}constructor(e){if(super(e),!e.validator)throw Error(`A validator is required for Form functionality to work`);let{formData:t,initialFormData:n,onChange:r}=e,i=t??n;this.state={...this.getStateFromProps(e,i,void 0,void 0,void 0,!0),prevExtraErrors:e.extraErrors},r&&!U1(this.state.formData,i)&&r(S8(this.state)),this.formElement=(0,b.createRef)()}getSnapshotBeforeUpdate(e,t){if(!U1(this.props,e)){let n=P2(this.props.formData,e.formData),r=P2(this.props.formData,this.state.formData),i=!U1(e.schema,this.props.schema),a=n.length>0||!U1(e.formData,this.props.formData),o=r.length>0||!U1(this.state.formData,this.props.formData),s=this.getStateFromProps(this.props,this.props.formData,i||a?void 0:this.state.retrievedSchema,i,n,!o);return{nextState:s,shouldUpdate:!U1(s,t)}}return{shouldUpdate:!1}}componentDidUpdate(e,t,n){if(n.shouldUpdate){let{nextState:e}=n,r=!U1(e.formData,this.props.formData),i=this.isProcessingUserChange;if(this.isProcessingUserChange=!1,i&&r)return;r&&!U1(e.formData,t.formData)&&this.props.onChange&&this.props.onChange(S8(e)),this.setState(e)}}getStateFromProps(t,n,r,i=!1,a=[],o=!1,s=!1){let c=this.state||{},l=`schema`in t?t.schema:this.props.schema,u=`validator`in t?t.validator:this.props.validator,d=(`uiSchema`in t?t.uiSchema:this.props.uiSchema)||{},f=t.formData===void 0&&this.props.formData===void 0,p=n!==void 0,m=`liveValidate`in t?t.liveValidate:this.props.liveValidate,h=p&&!t.noValidate&&m,g=`experimental_defaultFormStateBehavior`in t?t.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,_=`experimental_customMergeAllOf`in t?t.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf,{schemaUtils:v}=c;(!v||v.doesSchemaUtilsDiffer(u,l,g,_))&&(v=Cpe(u,l,g,_));let y=v.getRootSchema(),b=n;n===p8?b=void 0:n===void 0&&f&&(b=c.formData);let x,S,C=!1,w=[];do{x=v.getDefaultFormState(y,b,!1,c.initialDefaultsGenerated);let e=s?q2({formData:x}):``;if(S=this.updateRetrievedSchema(r??v.retrieveSchema(y,x)),s&&!w.includes(e)&&!U1(S,c.retrievedSchema)){let t=v.sanitizeDataForNewSchema(S,c.retrievedSchema,x);if(C=!U1(t,x),C){x=t,b=t;let e=q2({formData:t});C=!w.includes(e),w.push(e)}w.push(e)}else C=!1}while(C);let T=()=>t.noValidate||i?{errors:[],errorSchema:{}}:t.liveValidate?{errors:c.errors||[],errorSchema:c.errorSchema||{}}:{errors:c.schemaValidationErrors||[],errorSchema:c.schemaValidationErrorSchema||{}},E,D,{schemaValidationErrors:O,schemaValidationErrorSchema:k}=c;if(h&&!o){let e=this.liveValidate(y,v,c.errorSchema,x,void 0,c.customErrors,r,r!==void 0);E=e.errors,D=e.errorSchema,O=e.schemaValidationErrors,k=e.schemaValidationErrorSchema}else{let n=T();if(E=n.errors,D=n.errorSchema,a.length>0&&!h){let e=a.reduce((e,t)=>(e[t]=void 0,e),{});k=r2(n.errorSchema,e,`preventDuplicates`),D=k}let r=e.mergeErrors({errorSchema:D,errors:E},t.extraErrors,c.customErrors);E=r.errors,D=r.errorSchema}let A=e.getRegistry(t,y,v),j=U1(c.registry,A)?c.registry:A,M=c.fieldPathId&&c.fieldPathId?.$id===j.globalFormOptions.idPrefix?c.fieldPathId:g4(``,j.globalFormOptions);return{schemaUtils:v,schema:y,uiSchema:d,fieldPathId:M,formData:x,edit:p,errors:E,errorSchema:D,schemaValidationErrors:O,schemaValidationErrorSchema:k,retrievedSchema:S,initialDefaultsGenerated:!0,registry:j}}shouldComponentUpdate(e,t){let{experimental_componentUpdateStrategy:n=`customDeep`}=this.props;return Ipe(this,e,t,n)}validate(e,t=this.state.schema,n,r){let i=n||this.state.schemaUtils,{customValidate:a,transformErrors:o,uiSchema:s}=this.props,c=r??t,l=e?JSON.parse(JSON.stringify(e)):void 0;return i.getValidator().validateFormData(l,c,a,o,s)}renderErrors(e){let{errors:t,errorSchema:n,schema:r,uiSchema:i}=this.state,a=B2(`ErrorListTemplate`,e,O1(i));return t?.length?(0,H.jsx)(a,{errors:t,errorSchema:n||{},schema:r,uiSchema:i,registry:e}):null}static mergeErrors(e,t,n){let{errorSchema:r,errors:i}=e;if(t){let n=y4(e,t);r=n.errorSchema,i=n.errors}if(n){let e=y4({errors:i,errorSchema:r},n.ErrorSchema,!0);r=e.errorSchema,i=e.errors}return{errors:i,errorSchema:r}}liveValidate(t,n,r,i,a,o,s,c=!1){let l=this.validate(i,t,n,s),{errors:u}=l,{errorSchema:d}=l;c&&(d=r2(r,l.errorSchema,`preventDuplicates`));let f=u,p=d;return{...e.mergeErrors({errorSchema:d,errors:u},a,o),schemaValidationErrors:f,schemaValidationErrorSchema:p}}getUsedFormData=(e,t)=>gpe(e,t);getFieldNames=(e,t)=>_pe(e,t);omitExtraData=e=>{let{schema:t,schemaUtils:n}=this.state;return n.omitExtraData(t,e)};setFieldValue=(e,t)=>{let{registry:n}=this.state,r=Array.isArray(e)?e:e.split(`.`),i=g4(``,n.globalFormOptions,r);this.onChange(t,r,void 0,i.$id)};onChange=(e,t,n,r)=>{this.pendingChanges.push({newValue:e,path:t,newErrorSchema:n,id:r}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this.isProcessingUserChange=!0;let{newValue:t,path:n,id:r}=this.pendingChanges[0],{newErrorSchema:i}=this.pendingChanges[0],{extraErrors:a,omitExtraData:o,liveOmit:s,noValidate:c,liveValidate:l,onChange:u,disabled:d,readonly:f}=this.props,{formData:p,schemaUtils:m,schema:h,fieldPathId:g,schemaValidationErrorSchema:_,errors:v}=this.state,{customErrors:y,retrievedSchema:b}=this.state,x=_,S=g.path[0]||``,C=!n||n.length===0||n.length===1&&n[0]===S,w=C?t:yE(p),T=a1(w)&&Object.keys(w).length>0&&Object.values(w).every(e=>e===void 0)&&p==null?void 0:w;if(a1(w)||Array.isArray(w)){let e=!1;if(t===f8)pO(w,n);else if(!C){let r=t;if(t===void 0)if(typeof n[n.length-1]==`number`)r=null;else{let{field:t}=m.findFieldInSchema(h,n,p),r=t;!(r&&(`oneOf`in r||`anyOf`in r))&&r!==void 0&&(e=!0)}e?QD(w,n,void 0):QD(w,n,r)}let r=b&&!C&&!a1(t)&&!Array.isArray(t)&&!d&&!f,i=this.getStateFromProps(this.props,T,void 0,void 0,void 0,!0,r);w=i.formData,b=i.retrievedSchema,e&&w&&QD(w,n,void 0)}let E=!c&&(l===!0||l===`onChange`),D={formData:w,retrievedSchema:b},O=w;if(o===!0&&(s===!0||s===`onChange`)&&(O=this.omitExtraData(w),D={...D,formData:O}),i)if(!jD(C?_:Y(_,n)))C?x=i:(x=yE(_),QD(x,n,i));else if(y||=new N2,C){let e=Y(i,f1);e&&y.setErrors(e)}else QD(y.ErrorSchema,n,i);else y&&Y(y.ErrorSchema,[...n,`__errors`])&&y.clearErrors(n);if(E&&this.pendingChanges.length===1){let e=this.liveValidate(h,m,x,O,a,y,b);D={...D,formData:O,...e,customErrors:y}}else if(!c&&i){let t=e.mergeErrors({errorSchema:x,errors:v},a,y);D={...D,formData:O,...t,customErrors:y}}this.setState(D,()=>{u&&u(S8({...this.state,...D}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(e){return U1(e,this.state?.retrievedSchema)?this.state.retrievedSchema:e}reset=()=>{let{formData:e,initialFormData:t=p8,onChange:n}=this.props,r={formData:this.getStateFromProps(this.props,e??t,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(r,()=>n?.(S8({...this.state,...r})))};onBlur=(e,t)=>{let{onBlur:n,omitExtraData:r,liveOmit:i,liveValidate:a}=this.props;if(n&&n(e,t),r===!0&&i===`onBlur`||a===`onBlur`){let{onChange:t,extraErrors:n}=this.props,{formData:o}=this.state,s=o,c={formData:s};if(r===!0&&i===`onBlur`&&(s=this.omitExtraData(o),c={formData:s}),a===`onBlur`){let{schema:e,schemaUtils:t,errorSchema:r,customErrors:i,retrievedSchema:a}=this.state,o=this.liveValidate(e,t,r,s,n,i,a);c={formData:s,...o,customErrors:i}}let l=Object.keys(c).filter(e=>!e.startsWith(`schemaValidation`)).some(e=>!U1(Y(this.state,e),Y(c,e)));this.setState(c,()=>{t&&l&&t(S8({...this.state,...c}),e)})}};onFocus=(e,t)=>{let{onFocus:n}=this.props;n&&n(e,t)};onSubmit=e=>{if(e.preventDefault(),e.target!==e.currentTarget)return;e.persist();let{omitExtraData:t,extraErrors:n,noValidate:r,onSubmit:i}=this.props,{formData:a}=this.state;if(t===!0&&(a=this.omitExtraData(a)),r||this.validateFormWithFormData(a)){let t=n||{},r=n?h4(n):[];this.setState({formData:a,errors:r,errorSchema:t,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{i&&i(S8({...this.state,formData:a},`submitted`),e)})}};static getGlobalFormOptions(e){let{uiSchema:t={},experimental_componentUpdateStrategy:n,idSeparator:r=`_`,idPrefix:i=S1,nameGenerator:a,useFallbackUiForUnsupportedType:o=!1}=e;return{idPrefix:t[`ui:rootFieldId`]||i,idSeparator:r,useFallbackUiForUnsupportedType:o,...n!==void 0&&{experimental_componentUpdateStrategy:n},...a!==void 0&&{nameGenerator:a}}}static getRegistry(t,n,r){let{translateString:i,uiSchema:a={}}=t,{fields:o,templates:s,widgets:c,formContext:l,translateString:u}=r_e();return{fields:{...o,...t.fields},templates:{...s,...t.templates,ButtonTemplates:{...s.ButtonTemplates,...t.templates?.ButtonTemplates}},widgets:{...c,...t.widgets},rootSchema:n,formContext:t.formContext||l,schemaUtils:r,translateString:i||u,globalUiOptions:a[D1],globalFormOptions:e.getGlobalFormOptions(t),uiSchemaDefinitions:a[`ui:definitions`]??{}}}submit=()=>{if(this.formElement.current){let e=new CustomEvent(`submit`,{cancelable:!0});e.preventDefault(),this.formElement.current.dispatchEvent(e),this.formElement.current.requestSubmit()}};focusOnError(e){let{idPrefix:t=`root`,idSeparator:n=`_`}=this.props,{property:r}=e,i=iO(r);i[0]===``?i[0]=t:i.unshift(t);let a=i.join(n),o=this.formElement.current.elements[a];o||=this.formElement.current.querySelector(`input[id^="${a}"], button[id^="${a}"]`),o?.length&&(o=o[0]),o&&o.focus()}validateFormWithFormData=t=>{let{extraErrors:n,extraErrorsBlockSubmit:r,focusOnFirstError:i,onError:a}=this.props,{errors:o}=this.state,s=this.validate(t),{errors:c,errorSchema:l}=n?e.mergeErrors(s,n):s,u=s.errors.length>0||n&&r;return u?(i&&(typeof i==`function`?i(c[0]):this.focusOnError(c[0])),this.setState({errors:c,errorSchema:l,schemaValidationErrors:s.errors,schemaValidationErrorSchema:s.errorSchema},()=>{a?a(c):console.error(`Form validation failed`,c)})):c.length>0?this.setState({errors:c,errorSchema:l,schemaValidationErrors:[],schemaValidationErrorSchema:{}}):o.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}}),!u};validateForm(){let{omitExtraData:e}=this.props,{formData:t}=this.state;return e===!0&&(t=this.omitExtraData(t)),this.validateFormWithFormData(t)}render(){let{children:e,id:t,className:n=``,tagName:r,name:i,method:a,target:o,action:s,autoComplete:c,enctype:l,acceptCharset:u,noHtml5Validate:d=!1,disabled:f,readonly:p,showErrorList:m=`top`,_internalFormWrapper:h}=this.props,{schema:g,uiSchema:_,formData:v,errorSchema:y,fieldPathId:b,registry:x}=this.state,{SchemaField:S}=x.fields,{SubmitButton:C}=x.templates.ButtonTemplates,w=h?r:void 0,T=h||r||`form`,{[v1]:E={}}=O1(_);f&&(E={...E,props:{...E.props,disabled:!0}});let D={[E1]:{[v1]:E}};return(0,H.jsxs)(T,{className:n||`rjsf`,id:t,name:i,method:a,target:o,action:s,autoComplete:c,encType:l,acceptCharset:u,noValidate:d,onSubmit:this.onSubmit,as:w,ref:this.formElement,children:[m===`top`&&this.renderErrors(x),(0,H.jsx)(S,{name:``,schema:g,uiSchema:_,errorSchema:y,fieldPathId:b,formData:v,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:x,disabled:f,readonly:p}),e||(0,H.jsx)(C,{uiSchema:D,registry:x}),m===`bottom`&&this.renderErrors(x)]})}};function a_e(e,t=`none`){return t===`all`?e:e.reduce((e,n)=>{let{message:r,schemaPath:i}=n,a=t===`anyOf`?void 0:i?.indexOf(`/${l1}/`),o=t===`oneOf`?void 0:i?.indexOf(`/${h1}/`),s;return a&&a>=0?s=i?.substring(0,a):o&&o>=0&&(s=i?.substring(0,o)),s&&e.find(e=>e.message===r&&e.schemaPath?.startsWith(s))||e.push(n),e},[])}function o_e(e=[],t,n,r){return a_e(e.map(e=>{let{instancePath:n,keyword:i,params:a,schemaPath:o,parentSchema:s,...c}=e,{message:l=``}=c,u=n.replace(/\//g,`.`),d=`${u} ${l}`.trim(),f=``,p=[...a.deps?.split(`, `)||[],a.missingProperty,a.property].filter(e=>e);if(p.length>0)p.forEach(e=>{let n=O1(Y(t,(u?`${u}.${e}`:e).replace(/^\./,``))).title;if(n===void 0&&(n=O1(Y(t,o.replace(/\/properties\//g,`/`).split(`/`).slice(1,-1).concat([e]))).title),n===void 0&&(n=Y(t,[...u.replace(/^\./,``).split(`.`).filter(Boolean),e,`title`])),n)l=l.replace(`'${e}'`,`'${n}'`),f=n;else{let t=Y(s,[g1,e,`title`]);if(t)l=l.replace(`'${e}'`,`'${t}'`),f=t;else if(r){let t=u.replace(/^\./,``).split(`.`).filter(Boolean),n=[];for(let e of t)n.push(g1,e);n.push(g1,e,`title`);let i=Y(r,n);i&&(l=l.replace(`'${e}'`,`'${i}'`),f=i)}}}),d=l;else{let e=O1(Y(t,u.replace(/^\./,``))).title;if(e)d=`'${e}' ${l}`.trim(),f=e;else{let e=s?.title;e&&(d=`'${e}' ${l}`.trim(),f=e)}}return`missingProperty`in a&&(u=u?`${u}.${a.missingProperty}`:a.missingProperty),{name:i,property:u,message:l,params:a,stack:d,schemaPath:o,title:f}}),n)}function s_e(e,t,n,r,i,a,o,s){let{validationError:c}=t,l=o_e(t.errors,o,s,r);c&&(l=[...l,{stack:c.message}]),typeof a==`function`&&(l=a(l,o));let u=Lpe(l);if(c&&(u={...u,$schema:{__errors:[c.message]}}),typeof i!=`function`)return{errors:l,errorSchema:u};let d=m2(e,r,n,r,!0),f=_4(i(d,A1(d),o,u));return y4({errors:l,errorSchema:u},f)}var C8=s((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;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),w8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=C8(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),T8=s((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;var t=C8(),n=w8(),r=C8();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=w8();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.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(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=k(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=k(this.rhs,e,n),this}get names(){return O(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=k(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(A(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>D(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(j(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=k(this.condition,e,t),this}get names(){let e=super.names;return O(e,this.condition),this.else&&D(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=k(this.iteration,e,t),this}get names(){return D(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return O(O(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=k(this.iterable,e,t),this}get names(){return D(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&D(e,this.catch.names),this.finally&&D(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var E=class extends m{render(e){return`finally`+super.render(e)}};E.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
281
+ `:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new T(e),t(e)}return n&&(this._currNode=r.finally=new E,this.code(n)),this._endBlockNode(T,E)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-->0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function D(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function O(e,n){return n instanceof t._CodeOrName?D(e,n.names):e}function k(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function A(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function j(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${L(e)}`}e.not=j;var M=I(e.operators.AND);function N(...e){return e.reduce(M)}e.and=N;var P=I(e.operators.OR);function F(...e){return e.reduce(P)}e.or=F;function I(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${L(n)} ${e} ${L(r)}`}function L(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),E8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=T8(),n=C8();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0?!0:(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0||{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0||(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0||Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),D8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=T8();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),O8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=T8(),n=E8(),r=D8();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={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 d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),c_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=O8(),n=T8(),r=D8(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),k8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),A8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),j8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=k8(),n=A8(),r=O8(),i=T8(),a=E8(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
282
+ || (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
283
+ || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
284
+ || ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function p({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function m(e,t,n,r=o.Correct){let a=r===o.Correct?i.operators.EQ:i.operators.NEQ,s;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:s=(0,i._)`Array.isArray(${t})`;break;case`object`:s=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:s=c((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:s=c();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===o.Correct?s:(0,i.not)(s);function c(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=m;function h(e,t,n,r){if(e.length===1)return m(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(let e in s)o=(0,i.and)(o,m(e,t,n,r));return o}e.checkDataTypes=h;var g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function _(e){let t=v(e);(0,r.reportError)(t,g)}e.reportTypeError=_;function v(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),l_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;var t=T8(),n=E8();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),M8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=T8(),n=E8(),r=D8(),i=E8();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(d(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function o({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(d(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=o;function s(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=s;function c(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(e,n,r){return(0,t._)`${c(e)}.call(${n}, ${r})`}e.isOwnProperty=l;function u(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${l(e,n,r)}`:a}e.propertyInData=u;function d(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(l(e,n,r))):a}e.noPropertyInData=d;function f(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=f;function p(e,t){return f(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=p;function m({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=m;var h=(0,t._)`new RegExp`;function g({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?h:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=g;function _(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=_;function v(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=v})),u_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=T8(),n=D8(),r=M8(),i=O8();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=u(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let d=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}e.macroKeywordCode=a;function o(e,i){let{gen:a,keyword:o,schema:d,parentSchema:f,$data:p,it:m}=e;l(m,i);let h=u(a,o,!p&&i.compile?i.compile.call(m.self,d,f,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&s(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&s(e),x(()=>c(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!p||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=o;function s(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function c(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function l({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function u(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function d(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=d;function f({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=f})),d_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=T8(),n=E8();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),N8=s(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),f_e=s(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.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 r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else(p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),P8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=E8(),n=N8(),r=f_e(),i=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!s(e):t?c(e)<=t:!1}e.inlineRef=a;var o=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function s(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(s)||typeof n==`object`&&s(n))return!0}return!1}function c(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=c(e)),n===1/0)))return 1/0;return n}function l(e,t=``,n){return n!==!1&&(t=f(t)),u(e,e.parse(t))}e.getFullPath=l;function u(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=u;var d=/#\/?$/;function f(e){return e?e.replace(d,``):``}e.normalizeId=f;function p(e,t,n){return n=f(n),e.resolve(t,n)}e.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function h(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=f(e[i]||t),s={"":o},c=l(a,o,!1),u={},d=new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=l.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function l(t){let n=this.opts.uriResolver.resolve;if(t=f(o?n(o,t):t),d.has(t))throw h(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?p(e,r.schema,t):t!==f(a)&&(t[0]===`#`?(p(e,u[t],t),u[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!m.test(e))throw Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}}),u;function p(e,t,r){if(t!==void 0&&!n(e,t))throw h(r)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=h})),F8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=c_e(),n=j8(),r=A8(),i=j8(),a=l_e(),o=u_e(),s=d_e(),c=T8(),l=D8(),u=P8(),d=E8(),f=O8();function p(e){if(S(e)&&(w(e),x(e))){_(e);return}m(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=p;function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,c._)`${l.default.data}, ${l.default.valCxt}`,r.$async,()=>{e.code((0,c._)`"use strict"; ${y(n,i)}`),g(e,i),e.code(a)}):e.func(t,(0,c._)`${l.default.data}, ${h(i)}`,r.$async,()=>e.code(y(n,i)).code(a))}function h(e){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function g(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,(0,c._)`""`),e.var(l.default.parentData,(0,c._)`undefined`),e.var(l.default.parentDataProperty,(0,c._)`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function _(e){let{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&A(e),D(e),r.let(l.default.vErrors,null),r.let(l.default.errors,0),n.unevaluated&&v(e),T(e),j(e)})}function v(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,c._)`${n}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}function y(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${n} */`:c.nil}function b(e,n){if(S(e)&&(w(e),x(e))){C(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function x({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function S(e){return typeof e.schema!=`boolean`}function C(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&A(e),O(e),k(e);let a=r.const(`_errs`,l.default.errors);T(e,a),r.var(t,(0,c._)`${a} === ${l.default.errors}`)}function w(e){(0,d.checkUnknownRules)(e),E(e)}function T(e,t){if(e.opts.jtd)return N(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);N(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function E(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function D(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,d.checkStrictMode)(e,`default is ignored in the schema root`)}function O(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function k(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function A({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,c._)`${l.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,c.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,c._)`${l.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function j(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,c._)`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw((0,c._)`new ${i}(${l.default.vErrors})`)):(t.assign((0,c._)`${r}.errors`,l.default.vErrors),a.unevaluated&&M(e),t.return((0,c._)`${l.default.errors} === 0`))}function M({gen:e,evaluated:t,props:n,items:r}){n instanceof c.Name&&e.assign((0,c._)`${t}.props`,n),r instanceof c.Name&&e.assign((0,c._)`${t}.items`,r)}function N(e,t,n,a){let{gen:o,schema:s,data:u,allErrors:f,opts:p,self:m}=e,{RULES:h}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(s,h))){o.block(()=>re(e,`$ref`,h.all.$ref.definition));return}p.jtd||F(e,t),o.block(()=>{for(let e of h.rules)g(e);g(h.post)});function g(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,u,p.strictNumbers)),P(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):P(e,d),f||o.if((0,c._)`${l.default.errors} === ${a||0}`))}}function P(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&re(e,n.keyword,n.definition,t.type)})}function F(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(I(e,t),e.opts.allowUnionTypes||L(e,t),ee(e,e.dataTypes))}function I(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{ne(e.dataTypes,t)||z(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),R(e,t)}}function L(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&z(e,`use allowUnionTypes to allow union type keyword`)}function ee(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>te(t,e))&&z(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function te(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function ne(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function R(e,t){let n=[];for(let r of e.dataTypes)ne(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function z(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var B=class{constructor(e,t,n){if((0,o.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,oe(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,l.default.errors))}result(e,t,n){this.failResult((0,c.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=c.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,c.or)((0,c._)`${r} === undefined`,t)),e!==c.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,c.or)(o(),s());function o(){if(n.length){if(!(t instanceof c.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,c._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,c._)`!${n}(${t})`}return c.nil}}subschema(e,t){let n=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(n,this.it,e),(0,s.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return b(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=d.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=d.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}};e.KeywordCxt=B;function re(e,t,n,r){let i=new B(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):`macro`in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}var ie=/^\/(?:[^~]|~0|~1)*$/,ae=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function oe(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!ie.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=ae.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(u(`property/index`,s));return r[t-s]}if(s>t)throw Error(u(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,c._)`${a}${(0,c.getProperty)((0,d.unescapeJsonPointer)(e))}`,o=(0,c._)`${o} && ${a}`);return o;function u(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=oe})),I8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),L8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=P8();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),R8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=T8(),n=I8(),r=D8(),i=P8(),a=E8(),o=F8(),s=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=s;function c(e){let a=d.call(this,e);if(a)return a;let s=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:u}=this.opts,f=new t.CodeGen(this.scope,{es5:c,lines:l,ownProperties:u}),p;e.$async&&(p=f.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let m=f.scopeName(`validate`);e.validateName=m;let h={gen:f,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:s,baseId:e.baseId||s,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,o.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);let n=f.toString();g=`${f.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:m,validateCode:n,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=c;function l(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=p.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new s({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=u.call(this,a)}e.resolveRef=l;function u(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:c.call(this,e)}function d(e){for(let t of this._compilations)if(f(t,e))return t}e.getCompilingSchema=d;function f(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return g.call(this,n,e);let o=(0,i.normalizeId)(r),l=this.refs[o]||this.schemas[o];if(typeof l==`string`){let t=m.call(this,e,l);return typeof t?.schema==`object`?g.call(this,n,t):void 0}if(typeof l?.schema==`object`){if(l.validate||c.call(this,l),o===(0,i.normalizeId)(t)){let{schema:t}=l,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new s({schema:t,schemaId:n,root:e,baseId:a})}return g.call(this,n,l)}}e.resolveSchema=m;var h=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function g(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!h.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=m.call(this,r,e)}let{schemaId:c}=this.opts;if(o||=new s({schema:n,schemaId:c,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),p_e=c({$id:()=>z8,additionalProperties:()=>!1,default:()=>W8,description:()=>B8,properties:()=>U8,required:()=>H8,type:()=>V8}),z8,B8,V8,H8,U8,W8,m_e=o((()=>{z8=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,B8=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,V8=`object`,H8=[`$data`],U8={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},W8={$id:z8,description:B8,type:V8,required:H8,properties:U8,additionalProperties:!1}})),G8=s(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=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),i=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var c=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function l(e){return e.length=0,!0}function u(e,t,n){if(e.length){let r=s(e);if(r!==``)t.push(r);else return n.error=!0,!1;e.length=0}return!0}function d(e){let t=0,n={error:!1,address:``,zone:``},r=[],i=[],a=!1,o=!1,c=u;for(let s=0;s<e.length;s++){let u=e[s];if(!(u===`[`||u===`]`))if(u===`:`){if(a===!0&&(o=!0),!c(i,r,n))break;if(++t>7){n.error=!0;break}s>0&&e[s-1]===`:`&&(a=!0),r.push(`:`);continue}else if(u===`%`){if(!c(i,r,n))break;c=l}else{i.push(u);continue}}return i.length&&(c===l?n.zone=i.join(``):o?r.push(i.join(``)):r.push(s(i))),n.address=r.join(``),n}function f(e){if(p(e,`:`)<2)return{host:e,isIPV6:!1};let t=d(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,n=t.address;return t.zone&&(e+=`%`+t.zone,n+=`%25`+t.zone),{host:e,isIPV6:!0,escapedHost:n}}}function p(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function m(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}else{n.push(t);break}}else if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}else if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}else n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}var h={"@":`%40`,"/":`%2F`,"?":`%3F`,"#":`%23`,":":`%3A`},g=/[@/?#:]/g,_=/[@/?#]/g;function v(e,t){let n=t?_:g;return n.lastIndex=0,e.replace(n,e=>h[e])}function y(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r<e.length;r++){if(e[r]===`%`&&r+2<e.length){let o=e.slice(r+1,r+3);if(i(o)){let e=o.toUpperCase(),i=String.fromCharCode(parseInt(e,16));t&&a(i)?n+=i:n+=`%`+e,r+=2;continue}}n+=e[r]}return n}function b(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));i!==`.`&&a(i)?t+=i:t+=`%`+e,n+=2;continue}}o(e[n])?t+=e[n]:t+=escape(e[n])}return t}function x(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(i(r)){t+=`%`+r.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t}function S(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push(`@`)),e.host!==void 0){let n=unescape(e.host);if(!r(n)){let e=f(n);n=e.isIPV6===!0?`[${e.escapedHost}]`:v(n,!1)}t.push(n)}return(typeof e.port==`number`||typeof e.port==`string`)&&(t.push(`:`),t.push(String(e.port))),t.length?t.join(``):void 0}t.exports={nonSimpleDomain:c,recomposeAuthority:S,reescapeHostDelimiters:v,normalizePercentEncoding:y,normalizePathEncoding:b,escapePreservingEscapes:x,removeDotSegments:m,isIPv4:r,isUUID:n,normalizeIPv6:f,stringArrayToHexStripped:s}})),h_e=s(((e,t)=>{var{isUUID:n}=G8(),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split(`?`);e.path=t&&t!==`/`?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),g_e=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,escapePreservingEscapes:s,reescapeHostDelimiters:c,isIPv4:l,nonSimpleDomain:u}=G8(),{SCHEMES:d,getSchemeHandler:f}=h_e();function p(e,t){return typeof e==`string`?e=S(e,t):typeof e==`object`&&(e=x(_(e,t),t)),e}function m(e,t,n){let r=n?Object.assign({scheme:`null`},n):{scheme:`null`},i=h(x(e,r),x(t,r),r,!0);return r.skipEscape=!0,_(i,r)}function h(e,t,n,i){let a={};return i||(e=x(_(e,n),n),t=x(_(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path=`/`+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:a.path=t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,t.query===void 0?a.query=e.query:a.query=t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function g(e,t,n){let r=w(e,n),i=w(t,n);return r!==void 0&&i!==void 0&&r.toLowerCase()===i.toLowerCase()}function _(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},o=Object.assign({},t),c=[],l=f(o.scheme||n.scheme);l&&l.serialize&&l.serialize(n,o),n.path!==void 0&&(o.skipEscape?n.path=a(n.path):(n.path=s(n.path),n.scheme!==void 0&&(n.path=n.path.split(`%3A`).join(`:`)))),o.reference!==`suffix`&&n.scheme&&c.push(n.scheme,`:`);let u=i(n);if(u!==void 0&&(o.reference!==`suffix`&&c.push(`//`),c.push(u),n.path&&n.path[0]!==`/`&&c.push(`/`)),n.path!==void 0){let e=n.path;!o.absolutePath&&(!l||!l.absolutePath)&&(e=r(e)),u===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),c.push(e)}return n.query!==void 0&&c.push(`?`,n.query),n.fragment!==void 0&&c.push(`#`,n.fragment),c.join(``)}var v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function b(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},a=!1,s=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let d=e.match(v);if(d){i.scheme=d[1],i.userinfo=d[3],i.host=d[4],i.port=parseInt(d[5],10),i.path=d[6]||``,i.query=d[7],i.fragment=d[8],isNaN(i.port)&&(i.port=d[5]);let t=y(i,d);if(t!==void 0&&(i.error=i.error||t,a=!0),i.host)if(l(i.host)===!1){let e=n(i.host);i.host=e.host.toLowerCase(),s=e.isIPV6}else s=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference=`same-document`:i.scheme===void 0?i.reference=`relative`:i.fragment===void 0?i.reference=`absolute`:i.reference=`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let p=f(r.scheme||i.scheme);if(!r.unicodeSupport&&(!p||!p.unicodeSupport)&&i.host&&(r.domainHost||p&&p.domainHost)&&s===!1&&u(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||`Host's domain name can not be converted to ASCII: `+e}if((!p||p&&!p.skipNormalize)&&(e.indexOf(`%`)!==-1&&(i.scheme!==void 0&&(i.scheme=unescape(i.scheme)),i.host!==void 0&&(i.host=c(unescape(i.host),s))),i.path&&=o(i.path),i.fragment))try{i.fragment=encodeURI(decodeURIComponent(i.fragment))}catch{i.error=i.error||`URI malformed`}p&&p.parse&&p.parse(i,r)}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:a}}function x(e,t){return b(e,t).parsed}function S(e,t){return C(e,t).normalized}function C(e,t){let{parsed:n,malformedAuthorityOrPort:r}=b(e,t);return{normalized:r?e:_(n,t),malformedAuthorityOrPort:r}}function w(e,t){if(typeof e==`string`){let{normalized:n,malformedAuthorityOrPort:r}=C(e,t);return r?void 0:n}if(typeof e==`object`)return _(e,t)}var T={SCHEMES:d,normalize:p,resolve:m,resolveComponent:h,equal:g,serialize:_,parse:x};t.exports=T,t.exports.default=T,t.exports.fastUri=T})),__e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=g_e();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),v_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=F8();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=T8();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});var r=I8(),i=L8(),a=k8(),o=R8(),s=T8(),c=P8(),l=j8(),u=E8(),f=(m_e(),d(p_e).default),p=__e(),m=(e,t)=>new RegExp(e,t);m.code=`new RegExp`;var h=[`removeAdditional`,`useDefaults`,`coerceTypes`],g=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),_={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.`},v={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},y=200;function b(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??m,a=e.uriResolver??p.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??y,loopEnum:e.loopEnum??y,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var x=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:t,lines:n}),this.logger=k(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,_,e,`NOT SUPPORTED`),S.call(this,v,e,`DEPRECATED`,`warn`),this._metaOpts=D.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&E.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;n===`id`&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await a.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function a(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await a.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=C.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:n});if(t=o.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=C.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,c.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(j.call(this,n,t),!t)return(0,u.eachItem)(n,e=>M.call(this,e)),this;P.call(this,t);let r={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,u.eachItem)(n,r.type.length===0?e=>M.call(this,e,r):e=>r.type.forEach(t=>M.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=I(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e==`object`)a=e[s];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let l=this._cache.get(e);if(l!==void 0)return l;n=(0,c.normalizeId)(a||n);let u=c.getSchemaRefs.call(this,e,n);return l=new o.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}};x.ValidationError=r.default,x.MissingRefError=i.default,e.default=x;function S(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function C(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function T(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function E(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||=t,this.addKeyword(n)}}function D(){let e={...this.opts};for(let t of h)delete e[t];return e}var O={log(){},warn(){},error(){}};function k(e){if(e===!1)return O;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var A=/^[a-z_$][a-z0-9_$:-]*$/i;function j(e,t){let{RULES:n}=this;if((0,u.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!A.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function M(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?N.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function N(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function P(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=I(t)),e.validateSchema=this.compile(t,!0))}var F={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function I(e){return{anyOf:[e,F]}}})),y_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),b_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;var t=L8(),n=M8(),r=T8(),i=D8(),a=R8(),o=E8(),s={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:u,validateName:d,opts:f,self:p}=o,{root:m}=u;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);if(h instanceof a.SchemaEnv)return _(h);return v(h);function g(){if(u===m)return l(e,d,u,u.$async);let t=n.scopeValue(`root`,{ref:m});return l(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){l(e,c(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,f.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function c(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=c;function l(e,t,a,s){let{gen:c,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?i.default.this:r.nil;s?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=c.let(`valid`);c.try(()=>{c.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||c.assign(i,!0)},e=>{c.if((0,r._)`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),g(e),u||c.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;c.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),c.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!l.opts.unevaluated)return;let t=a?.validate?.evaluated;if(l.props!==!0)if(t&&!t.dynamicProps)t.props!==void 0&&(l.props=o.mergeEvaluated.props(c,t.props,l.props));else{let t=c.var(`props`,(0,r._)`${e}.evaluated.props`);l.props=o.mergeEvaluated.props(c,t,l.props,r.Name)}if(l.items!==!0)if(t&&!t.dynamicItems)t.items!==void 0&&(l.items=o.mergeEvaluated.items(c,t.items,l.items));else{let t=c.var(`items`,(0,r._)`${e}.evaluated.items`);l.items=o.mergeEvaluated.items(c,t,l.items,r.Name)}}}e.callRef=l,e.default=s})),x_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=y_e(),n=b_e();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),S_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=T8(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),C_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=T8();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),w_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),T_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=T8(),n=E8(),r=w_e();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),E_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M8(),n=E8(),r=T8();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,r._)`{pattern: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e,u=l.opts.unicodeRegExp?`u`:``;if(o){let{regExp:t}=l.opts.code,o=t.code===`new RegExp`?(0,r._)`new RegExp`:(0,n.useFunc)(i,t),s=i.let(`valid`);i.try(()=>i.assign(s,(0,r._)`${o}(${c}, ${u}).test(${a})`),()=>i.assign(s,!1)),e.fail$data((0,r._)`!${s}`)}else{let n=(0,t.usePattern)(e,s);e.fail$data((0,r._)`!${n}.test(${a})`)}}}})),D_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=T8();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),O_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M8(),n=T8(),r=E8();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),k_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=T8();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),K8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=N8();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),A_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=j8(),n=T8(),r=E8(),i=K8();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),j_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=T8(),n=E8(),r=K8();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),M_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=T8(),n=E8(),r=K8();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??=(0,n.useFunc)(i,r.default),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),N_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=S_e(),n=C_e(),r=T_e(),i=E_e(),a=D_e(),o=O_e(),s=k_e(),c=A_e(),l=j_e(),u=M_e();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),q8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;var t=T8(),n=E8(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),J8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;var t=T8(),n=E8(),r=M8(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),P_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=J8();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),F_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=T8(),n=E8(),r=M8(),i=q8();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),I_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=T8(),n=E8();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),L_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=T8(),n=E8(),r=M8();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
285
+ missingProperty: ${i},
286
+ depsCount: ${n},
287
+ deps: ${r}}`};var i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);o(e,t),s(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function o(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=o;function s(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=s,e.default=i})),R_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=T8(),n=E8();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),Y8=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M8(),n=T8(),r=D8(),i=E8();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),z_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=F8(),n=M8(),r=E8(),i=Y8();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),B_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=M8(),n=T8(),r=E8(),i=E8();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),V_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=E8();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),H_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:M8().validateUnion,error:{message:`must match a schema in anyOf`}}})),U_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=T8(),n=E8();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),W_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=E8();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),G_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=T8(),n=E8(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),K_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=E8();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),q_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=q8(),n=P_e(),r=J8(),i=F_e(),a=I_e(),o=L_e(),s=R_e(),c=Y8(),l=z_e(),u=B_e(),d=V_e(),f=H_e(),p=U_e(),m=W_e(),h=G_e(),g=K_e();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),J_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=T8();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),Y_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[J_e().default]})),X_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),Z_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=x_e(),n=N_e(),r=q_e(),i=Y_e(),a=X_e();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),Q_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),$_e=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=T8(),n=Q_e(),r=R8(),i=L8(),a=E8();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();o.if(!1);for(let e in r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n&&=t||o(c),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),eve=c({$id:()=>Z8,$schema:()=>X8,default:()=>n5,definitions:()=>$8,properties:()=>t5,title:()=>Q8,type:()=>e5}),X8,Z8,Q8,$8,e5,t5,n5,tve=o((()=>{X8=`http://json-schema.org/draft-07/schema#`,Z8=`http://json-schema.org/draft-07/schema#`,Q8=`Core schema meta-schema`,$8={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:[]}},e5=[`object`,`boolean`],t5={$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:`#`}},n5={$schema:X8,$id:Z8,title:Q8,definitions:$8,type:e5,properties:t5,default:!0}})),r5=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;var n=v_e(),r=Z_e(),i=$_e(),a=(tve(),d(eve).default),o=[`/properties`],s=`http://json-schema.org/draft-07/schema`,c=class extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(e,s,!1),this.refs[`http://json-schema.org/schema`]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var l=F8();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=T8();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var f=I8();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=L8();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})),nve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(e,t){return{validate:e,compare:t}}e.fullFormats={date:t(a,o),time:t(c,l),"date-time":t(d,f),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:h,"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:w,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:_,int32:{type:`number`,validate:b},int64:{type:`number`,validate:x},float:{type:`number`,validate:S},double:{type:`number`,validate:S},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"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,f),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 n(e){return e%4==0&&(e%100!=0||e%400==0)}var r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(e){let t=r.exec(e);if(!t)return!1;let a=+t[1],o=+t[2],s=+t[3];return o>=1&&o<=12&&s>=1&&s<=(o===2&&n(a)?29:i[o])}function o(e,t){if(e&&t)return e>t?1:e<t?-1:0}var s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function c(e,t){let n=s.exec(e);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=n[5];return(r<=23&&i<=59&&a<=59||r===23&&i===59&&a===60)&&(!t||o!==``)}function l(e,t){if(!(e&&t))return;let n=s.exec(e),r=s.exec(t);if(n&&r)return e=n[1]+n[2]+n[3]+(n[4]||``),t=r[1]+r[2]+r[3]+(r[4]||``),e>t?1:e<t?-1:0}var u=/t|\s/i;function d(e){let t=e.split(u);return t.length===2&&a(t[0])&&c(t[1],!0)}function f(e,t){if(!(e&&t))return;let[n,r]=e.split(u),[i,a]=t.split(u),s=o(n,i);if(s!==void 0)return s||l(r,a)}var p=/\/|:/,m=/^(?:[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 h(e){return p.test(e)&&m.test(e)}var g=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function _(e){return g.lastIndex=0,g.test(e)}var v=-(2**31),y=2**31-1;function b(e){return Number.isInteger(e)&&e<=y&&e>=v}function x(e){return Number.isInteger(e)}function S(){return!0}var C=/[^\\]\\Z/;function w(e){if(C.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}})),rve=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;var t=r5(),n=T8(),r=n.operators,i={formatMaximum:{okStr:`<=`,ok:r.LTE,fail:r.GT},formatMinimum:{okStr:`>=`,ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:`<`,ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:`>`,ok:r.GT,fail:r.LTE}};e.formatLimitDefinition={keyword:Object.keys(i),type:`string`,schemaType:`string`,$data:!0,error:{message:({keyword:e,schemaCode:t})=>n.str`should be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`},code(e){let{gen:r,data:a,schemaCode:o,keyword:s,it:c}=e,{opts:l,self:u}=c;if(!l.validateFormats)return;let d=new t.KeywordCxt(c,u.RULES.all.format.definition,`format`);d.$data?f():p();function f(){let t=r.scopeValue(`formats`,{ref:u.formats,code:l.code.formats}),i=r.const(`fmt`,n._`${t}[${d.schemaCode}]`);e.fail$data(n.or(n._`typeof ${i} != "object"`,n._`${i} instanceof RegExp`,n._`typeof ${i}.compare != "function"`,m(i)))}function p(){let t=d.schema,i=u.formats[t];if(!i||i===!0)return;if(typeof i!=`object`||i instanceof RegExp||typeof i.compare!=`function`)throw Error(`"${s}": format "${t}" does not define "compare" function`);let a=r.scopeValue(`formats`,{key:t,ref:i,code:l.code.formats?n._`${l.code.formats}${n.getProperty(t)}`:void 0});e.fail$data(m(a))}function m(e){return n._`${e}.compare(${a}, ${o}) ${i[s].fail} 0`}},dependencies:[`format`]},e.default=t=>(t.addKeyword(e.formatLimitDefinition),t)})),ive=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=nve(),r=rve(),i=T8(),a=new i.Name(`fullFormats`),o=new i.Name(`fastFormats`),s=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,a),e;let[i,s]=t.mode===`fast`?[n.fastFormats,o]:[n.fullFormats,a];return c(e,t.formats||n.formatNames,i,s),t.keywords&&r.default(e),e};s.get=(e,t=`full`)=>{let r=(t===`fast`?n.fastFormats:n.fullFormats)[e];if(!r)throw Error(`Unknown format "${e}"`);return r};function c(e,t,n,r){var a;(a=e.opts.code).formats??(a.formats=i._`require("ajv-formats/dist/formats").${r}`);for(let r of t)e.addFormat(r,n[r])}t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s})),ave=u(r5(),1),i5=u(ive(),1),ove={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},sve=/^(#?([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*\)))$/,cve=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function lve(e,t,n={},r,i=ave.default,a){let o=new i({...ove,...n});return r?(0,i5.default)(o,r):r!==!1&&(0,i5.default)(o),o.addFormat(`data-url`,cve),o.addFormat(`color`,sve),o.addKeyword(w1),Array.isArray(e)&&o.addMetaSchema(e),LC(t)&&Object.keys(t).forEach(e=>{o.addFormat(e,t[e])}),a&&(o=a(o)),o}var uve=class{constructor(e,t){this.hasRegisteredRootSchema=!1;let{additionalMetaSchemas:n,customFormats:r,ajvOptionsOverrides:i,ajvFormatOptions:a,AjvClass:o,extenderFn:s,suppressDuplicateFiltering:c}=e;this.ajv=lve(n,r,i,a,o,s),this.localizer=t,this.suppressDuplicateFiltering=c}reset(){this.ajv.removeSchema(),this.lastSeenRootSchema=void 0,this.hasRegisteredRootSchema=!1}rawValidation(e,t){let n,r;try{e.$id&&(r=this.ajv.getSchema(e.$id)),r===void 0&&(r=this.ajv.compile(e)),r(t)}catch(e){n=e}let i;return r&&(typeof this.localizer==`function`&&((r.errors??[]).forEach(e=>{[`missingProperty`,`property`].forEach(t=>{e.params?.[t]&&(e.params[t]=`'${e.params[t]}'`)}),e.params?.deps&&(e.params.deps=e.params.deps.split(`, `).map(e=>`'${e}'`).join(`, `))}),this.localizer(r.errors),(r.errors??[]).forEach(e=>{[`missingProperty`,`property`].forEach(t=>{e.params?.[t]&&(e.params[t]=e.params[t].slice(1,-1))}),e.params?.deps&&(e.params.deps=e.params.deps.split(`, `).map(e=>e.slice(1,-1)).join(`, `))})),i=r.errors||void 0,r.errors=null),{errors:i,validationError:n}}validateFormData(e,t,n,r,i){let a=this.rawValidation(t,e);return s_e(this,a,e,t,n,r,i,this.suppressDuplicateFiltering)}handleSchemaUpdate(e){if(this.lastSeenRootSchema===e&&this.hasRegisteredRootSchema)return;let t=e.$id??T1;this.ajv.getSchema(t)===void 0?this.ajv.addSchema(e,t):U1(e,this.ajv.getSchema(t)?.schema)||(this.ajv.removeSchema(t),this.ajv.addSchema(e,t)),this.lastSeenRootSchema=e,this.hasRegisteredRootSchema=!0}isValid(e,t,n){try{this.handleSchemaUpdate(n);let r=b4(e),i=r.$id??Ape(r),a;return a=this.ajv.getSchema(i),a===void 0&&(a=this.ajv.addSchema(r,i).getSchema(i)||this.ajv.compile(r)),a(t)}catch(e){return console.warn(`Error encountered compiling schema:`,e),!1}}};function dve(e={},t){return new uve(e,t)}var a5=dve();function fve(e){return(0,b.forwardRef)(({fields:t,widgets:n,templates:r,...i},a)=>{let o={...e?.fields,...t},s={...e?.widgets,...n},c={...e?.templates,...r,ButtonTemplates:{...e?.templates?.ButtonTemplates,...r?.ButtonTemplates}};return(0,H.jsx)(i_e,{...e,...i,fields:o,widgets:s,templates:c,ref:a})})}var o5=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),pve=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),mve=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),s5=e=>{let t=mve(e);return t.charAt(0).toUpperCase()+t.slice(1)},c5={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`},hve=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},gve=(0,b.createContext)({}),_ve=()=>(0,b.useContext)(gve),vve=(0,b.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=_ve()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,b.createElement)(`svg`,{ref:c,...c5,width:t??l??c5.width,height:t??l??c5.height,stroke:e??f,strokeWidth:m,className:o5(`lucide`,p,i),...!a&&!hve(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),l5=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)(vve,{ref:i,iconNode:t,className:o5(`lucide-${pve(s5(e))}`,`lucide-${e}`,n),...r}));return n.displayName=s5(e),n},yve=l5(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),u5=l5(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),bve=l5(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),d5=l5(`circle-alert`,[[`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`}]]),f5=l5(`circle-plus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),xve=l5(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Sve=l5(`copy`,[[`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`}]]),Cve=l5(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),wve=l5(`trash`,[[`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`}]]),p5=l5(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function m5(...e){return jr(nn(e))}var Tve=ji(`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 h5({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,H.jsx)(r?Ui:`button`,{"data-slot":`button`,className:m5(Tve({variant:t,size:n,className:e})),...i})}function Eve({uiSchema:e,registry:t,className:n,...r}){let{translateString:i}=t;return(0,H.jsx)(`div`,{className:`p-0 m-0`,children:(0,H.jsxs)(h5,{...r,className:m5(`w-fit gap-2`,n),variant:`outline`,type:`button`,children:[(0,H.jsx)(f5,{size:16}),` `,i(x4.AddItemButton)]})})}function Dve(e){let{children:t,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:a,uiSchema:o,registry:s}=e,c=B2(`ArrayFieldItemButtonsTemplate`,s,O1(o)),l=i?-6:22;return(0,H.jsx)(`div`,{children:(0,H.jsxs)(`div`,{className:`mb-2 flex flex-row flex-wrap items-center`,children:[(0,H.jsx)(`div`,{className:`grow shrink`,children:t}),(0,H.jsx)(`div`,{className:`flex items-end justify-end p-0.5`,children:a&&(0,H.jsx)(`div`,{className:`flex gap-2`,style:{marginLeft:`5px`,marginTop:r?`${l}px`:void 0},children:(0,H.jsx)(c,{...n})})})]})})}function Ove(e){let{canAdd:t,disabled:n,fieldPathId:r,uiSchema:i,items:a,optionalDataControl:o,onAddClick:s,readonly:c,registry:l,required:u,schema:d,title:f}=e,p=O1(i),m=B2(`ArrayFieldDescriptionTemplate`,l,p),h=B2(`ArrayFieldTitleTemplate`,l,p),g=!c&&!n,{ButtonTemplates:{AddButton:_}}=l.templates;return(0,H.jsx)(`div`,{children:(0,H.jsx)(`div`,{className:`m-0 flex p-0`,children:(0,H.jsxs)(`div`,{className:`m-0 w-full p-0`,children:[(0,H.jsx)(h,{fieldPathId:r,title:p.title||f,schema:d,uiSchema:i,required:u,registry:l,optionalDataControl:g?o:void 0}),(0,H.jsx)(m,{fieldPathId:r,description:p.description||d.description,schema:d,uiSchema:i,registry:l}),(0,H.jsxs)(`div`,{className:`p-0 m-0 w-full mb-2`,children:[g?void 0:o,a,t&&(0,H.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,H.jsx)(_,{id:n4(r,`add`),className:`rjsf-array-item-add`,onClick:s,disabled:n||c,uiSchema:i,registry:l})})]},`array-item-list-${r.$id}`)]})})})}function g5({className:e,type:t,...n}){return(0,H.jsx)(`input`,{type:t,"data-slot":`input`,className:m5(`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),...n})}function kve({id:e,htmlName:t,placeholder:n,required:r,readonly:i,disabled:a,type:o,value:s,onChange:c,onChangeOverride:l,onBlur:u,onFocus:d,autofocus:f,options:p,schema:m,rawErrors:h=[],children:g,extraProps:_,className:v,registry:y}){let{ClearButton:x}=y.templates.ButtonTemplates,S={..._,...I2(m,o,p)},C=({target:{value:e}})=>c(e===``?p.emptyValue:e),w=({target:t})=>u(e,t?.value),T=({target:t})=>d(e,t?.value),E=(0,b.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),c(p.emptyValue??``)},[c,p.emptyValue]);return(0,H.jsxs)(`div`,{className:`p-0.5`,children:[(0,H.jsx)(g5,{id:e,name:t||e,type:o,placeholder:n,autoFocus:f,required:r,disabled:a,readOnly:i,className:m5({"border-destructive focus-visible:ring-0":h.length>0},v),list:m.examples?Z2(e):void 0,...S,value:s||s===0?s:``,onChange:l||C,onBlur:w,onFocus:T,"aria-describedby":e4(e,!!m.examples)}),p.allowClearTextInputs&&!i&&!a&&s&&(0,H.jsx)(x,{onClick:E,registry:y}),g,(0,H.jsx)(m8,{id:e,schema:m})]})}var Ave=ji(`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 _5({className:e,variant:t,...n}){return(0,H.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:m5(Ave({variant:t}),e),...n})}function jve({className:e,...t}){return(0,H.jsx)(`div`,{"data-slot":`alert-title`,className:m5(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function v5({className:e,...t}){return(0,H.jsx)(`div`,{"data-slot":`alert-description`,className:m5(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,e),...t})}function Mve(e){let{name:t,fieldPathId:n,registry:r,onExpand:i}=e,{translateString:a}=r,o=`${n.$id}-button`;return(0,H.jsxs)(`div`,{className:`mt-4`,children:[(0,H.jsxs)(_5,{variant:`default`,className:`mb-2`,children:[(0,H.jsx)(d5,{className:`h-4 w-4`}),(0,H.jsx)(v5,{children:a(x4.CycleDetected,[t])})]}),(0,H.jsx)(h5,{id:o,type:`button`,variant:`outline`,size:`sm`,className:m5(`my-1`),onClick:()=>i(n.$id),children:a(x4.ExpandButton)})]})}function Nve({id:e,description:t,registry:n,uiSchema:r}){return t?(0,H.jsx)(`div`,{children:(0,H.jsx)(`div`,{id:e,className:`text-sm text-muted-foreground`,children:(0,H.jsx)(_8,{description:t,registry:n,uiSchema:r})})}):null}function Pve({errors:e,registry:t}){let{translateString:n}=t;return(0,H.jsxs)(_5,{variant:`destructive`,className:`mb-2`,children:[(0,H.jsx)(d5,{className:`h-4 w-4`}),(0,H.jsx)(jve,{children:n(x4.ErrorsLabel)}),(0,H.jsx)(v5,{className:`flex flex-col gap-1`,children:e.map((e,t)=>(0,H.jsxs)(`span`,{children:[`• `,e.stack]},t))})]})}function Fve(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,H.jsx)(`div`,{className:`flex flex-col gap-1`,id:X2(n),children:t.map((e,t)=>(0,H.jsx)(`span`,{className:`text-xs font-medium text-destructive mb-1`,children:e},t))})}function Ive(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i,hasErrors:a}=e;return n?(0,H.jsx)(`span`,{className:m5(`text-xs font-medium text-muted-foreground`,{"text-destructive":a}),id:Q2(t),children:(0,H.jsx)(y8,{help:n,registry:i,uiSchema:r})}):null}function Lve({id:e,children:t,displayLabel:n,rawErrors:r=[],errors:i,help:a,description:o,rawDescription:s,classNames:c,style:l,disabled:u,label:d,hidden:f,onKeyRename:p,onKeyRenameBlur:m,onRemoveProperty:h,readonly:g,required:_,schema:v,uiSchema:y,registry:b}){let x=O1(y),S=B2(`WrapIfAdditionalTemplate`,b,x);if(f)return(0,H.jsx)(`div`,{className:`hidden`,children:t});let C=x.widget===`checkbox`;return(0,H.jsx)(S,{classNames:c,style:l,disabled:u,id:e,label:d,displayLabel:n,onKeyRename:p,onKeyRenameBlur:m,onRemoveProperty:h,rawDescription:s,readonly:g,required:_,schema:v,uiSchema:y,registry:b,children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[n&&!C&&(0,H.jsxs)(`label`,{className:m5(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,{" text-destructive":r.length>0}),htmlFor:e,children:[d,_?`*`:null]}),t,n&&s&&!C&&(0,H.jsx)(`span`,{className:m5(`text-xs font-medium text-muted-foreground`,{" text-destructive":r.length>0}),children:o}),i,a]})})}function Rve(e){let{children:t,column:n,className:r,...i}=e;return(0,H.jsx)(`div`,{className:m5(`grid gap-2`,r),...i,children:t})}function zve(e){let{icon:t,iconType:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,H.jsx)(h5,{size:`icon`,variant:`outline`,className:r,...o,type:`button`,children:t})}var y5=(0,b.memo)(zve);function Bve(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(y5,{title:t(x4.CopyButton),...e,icon:(0,H.jsx)(Sve,{className:`h-4 w-4`})})}var Vve=(0,b.memo)(Bve);function Hve(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(y5,{title:t(x4.MoveDownButton),...e,icon:(0,H.jsx)(u5,{className:`h-4 w-4`})})}var Uve=(0,b.memo)(Hve);function Wve(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(y5,{title:t(x4.MoveUpButton),...e,icon:(0,H.jsx)(bve,{className:`h-4 w-4`})})}var Gve=(0,b.memo)(Wve);function Kve(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(y5,{title:t(x4.RemoveButton),...e,className:`border-destructive`,icon:(0,H.jsx)(wve,{className:`h-4 w-4 stroke-destructive`})})}var b5=(0,b.memo)(Kve);function qve(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(y5,{title:t(x4.ClearButton),...e,icon:(0,H.jsx)(p5,{})})}var Jve=(0,b.memo)(qve);function Yve({selector:e,optionSchemaField:t}){return(0,H.jsxs)(`div`,{className:m5(`p-4 border rounded-md bg-background shadow-sm`),children:[(0,H.jsx)(`div`,{className:m5(`mb-4`),children:e}),t]})}function Xve({description:e,title:t,properties:n,required:r,uiSchema:i,fieldPathId:a,schema:o,formData:s,optionalDataControl:c,onAddProperty:l,disabled:u,readonly:d,registry:f}){let p=O1(i),m=B2(`TitleFieldTemplate`,f,p),h=B2(`DescriptionFieldTemplate`,f,p),g=!d&&!u,{ButtonTemplates:{AddButton:_}}=f.templates;return(0,H.jsxs)(H.Fragment,{children:[t&&(0,H.jsx)(m,{id:$2(a),title:t,required:r,schema:o,uiSchema:i,registry:f,optionalDataControl:g?c:void 0}),e&&(0,H.jsx)(h,{id:Y2(a),description:e,schema:o,uiSchema:i,registry:f}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[g?void 0:c,n.map(e=>(0,H.jsx)(`div`,{className:`${e.hidden?`hidden`:``} flex`,children:(0,H.jsx)(`div`,{className:`w-full`,children:e.content})},e.name)),k1(o,i,s)?(0,H.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,H.jsx)(_,{id:n4(a,`add`),onClick:l,disabled:u||d,className:`rjsf-object-property-expand`,uiSchema:i,registry:f})}):null]})]})}function Zve(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,H.jsx)(y5,{id:t,registry:n,className:`rjsf-add-optional-data`,onClick:i,title:r,icon:(0,H.jsx)(f5,{}),size:`xs`}):a?(0,H.jsx)(b5,{id:t,registry:n,className:`rjsf-remove-optional-data`,onClick:a,title:r,size:`xs`}):(0,H.jsx)(`em`,{id:t,children:r})}function Qve(e){let{submitText:t,norender:n,props:r}=z2(e.uiSchema);return n?null:(0,H.jsx)(`div`,{children:(0,H.jsx)(h5,{type:`submit`,...r,className:m5(`my-2`,r?.className),children:t})})}function x5(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function $ve(...e){return t=>{let n=!1,r=e.map(e=>{let r=x5(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():x5(e[t],null)}}}}function S5(...e){return b.useCallback($ve(...e),e)}function C5(e){let t=b.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];w5(r)&&typeof T5==`function`&&(r=T5(r._payload)),b.Children.forEach(r,e=>{if(iye(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;w5(n)&&typeof T5==`function`&&(n=T5(n._payload)),a=tye(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=b.cloneElement(a,void 0,s):!o&&b.Children.count(r)===1&&b.isValidElement(r)&&(a=r);let c=a?rye(a):void 0,l=S5(n,c);if(!a){if(r||r===0)throw Error(o?cye(e):sye(e));return r}let u=nye(i,a.props??{});return a.type!==b.Fragment&&(u.ref=n?l:c),b.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var eye=Symbol.for(`radix.slottable`),tye=(e,t)=>{if(`child`in e.props){let t=e.props.child;return b.isValidElement(t)?b.cloneElement(t,void 0,e.props.children(t.props.children)):null}return b.isValidElement(t)?t:null};function nye(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function rye(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function iye(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===eye}var aye=Symbol.for(`react.lazy`);function w5(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===aye&&`_payload`in e&&oye(e._payload)}function oye(e){return typeof e==`object`&&!!e&&`then`in e}var sye=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,cye=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,T5=b.use,E5=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=C5(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),lye=`Separator`,D5=`horizontal`,uye=[`horizontal`,`vertical`],O5=b.forwardRef((e,t)=>{let{decorative:n,orientation:r=D5,...i}=e,a=dye(r)?r:D5,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,H.jsx)(E5.div,{"data-orientation":a,...o,...i,ref:t})});O5.displayName=lye;function dye(e){return uye.includes(e)}var fye=O5;function k5({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,H.jsx)(fye,{"data-slot":`separator`,decorative:n,orientation:t,className:m5(`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),...r})}function pye({id:e,title:t,uiSchema:n,optionalDataControl:r}){let i=(0,H.jsx)(`h5`,{children:O1(n).title||t});return r&&(i=(0,H.jsxs)(`div`,{className:`flex flex-row`,children:[(0,H.jsx)(`div`,{className:`flex-grow`,children:i}),(0,H.jsx)(`div`,{className:`flex`,children:r})]})),(0,H.jsxs)(`div`,{id:e,className:`my-1 flex flex-col gap-0.5`,children:[i,(0,H.jsx)(k5,{dir:`horizontal`,style:{height:`1px`},className:`my-1`})]})}function mye({classNames:e,style:t,children:n,disabled:r,id:i,label:a,displayLabel:o,onRemoveProperty:s,onKeyRenameBlur:c,rawDescription:l,readonly:u,required:d,schema:f,uiSchema:p,registry:m}){let{templates:h,translateString:g}=m,{RemoveButton:_}=h.ButtonTemplates,v=g(x4.KeyLabel,[a]);if(!(s1 in f))return(0,H.jsx)(`div`,{className:e,style:t,children:n});let y=o?22+(l?-28:0):0,b=`${i}-key`;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${e}`,style:t,children:[(0,H.jsx)(`div`,{className:`grid gap-2 col-span-5`,children:(0,H.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[o&&(0,H.jsx)(`label`,{htmlFor:b,className:`text-sm font-medium text-muted-foreground leading-none`,children:v}),(0,H.jsx)(`div`,{className:`pl-0.5`,children:(0,H.jsx)(g5,{required:d,defaultValue:a,disabled:r||u,id:b,name:b,onBlur:u?void 0:c,type:`text`,className:`w-full border shadow-sm`},a)}),!!l&&(0,H.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,H.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:`\xA0`})})]})}),(0,H.jsx)(`div`,{className:`grid gap-2 col-span-6 pr-0.5`,children:n}),(0,H.jsx)(`div`,{className:`grid gap-2 col-span-1`,style:{marginTop:`${y}px`},children:(0,H.jsx)(_,{id:n4(i,`remove`),iconType:`block`,className:`rjsf-object-property-remove w-full`,disabled:r||u,onClick:s,uiSchema:p,registry:m})})]}),(0,H.jsx)(k5,{dir:`horizontal`,className:`mt-2`})]})}function hye(){return{ArrayFieldItemTemplate:Dve,ArrayFieldTemplate:Ove,BaseInputTemplate:kve,CyclicSchemaExpandTemplate:Mve,ButtonTemplates:{AddButton:Eve,CopyButton:Vve,MoveDownButton:Uve,MoveUpButton:Gve,RemoveButton:b5,SubmitButton:Qve,ClearButton:Jve},DescriptionFieldTemplate:Nve,ErrorListTemplate:Pve,FieldErrorTemplate:Fve,FieldHelpTemplate:Ive,FieldTemplate:Lve,GridTemplate:Rve,MultiSchemaFieldTemplate:Yve,ObjectFieldTemplate:Xve,OptionalDataControlsTemplate:Zve,TitleFieldTemplate:pye,WrapIfAdditionalTemplate:mye}}function A5(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=b.useMemo(()=>o,Object.values(o));return(0,H.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=b.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>b.createContext(e));return function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,gye(i,...t)]}function gye(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}typeof window<`u`&&window.document&&window.document.createElement;function j5(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var M5=globalThis?.document?b.useLayoutEffect:()=>{},_ye=b.useInsertionEffect||M5;function N5({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=vye({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=b.useRef(e!==void 0);b.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`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.`),t.current=s},[s,r])}return[c,b.useCallback(t=>{if(s){let n=yye(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function vye({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return _ye(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function yye(e){return typeof e==`function`}function P5(e){let t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function F5(e){let[t,n]=b.useState(void 0);return M5(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}function bye(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var I5=e=>{let{present:t,children:n}=e,r=xye(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=Sye(r.ref,Cye(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};I5.displayName=`Presence`;function xye(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=bye(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=R5(r.current);a.current=o===`mounted`?e:`none`},[o]),M5(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=R5(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),M5(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=R5(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=R5(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:b.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function L5(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Sye(...e){let t=b.useRef(e);return t.current=e,b.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=L5(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():L5(n[e],null)}}},[])}function R5(e){return e?.animationName||`none`}function Cye(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var z5=`Checkbox`,[wye,Tye]=A5(z5),[Eye,B5]=wye(z5);function Dye(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=N5({prop:n,defaultProp:i??!1,onChange:c,caller:z5}),[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useRef(!1),y=!m||!!o||!!m.closest(`form`),x={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:!J5(i)&&i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,H.jsx)(Eye,{scope:t,...x,children:Oye(d)?d(x):r})}var V5=`CheckboxTrigger`,H5=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=B5(V5,e),h=S5(i,u),g=b.useRef(c);return b.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,H.jsx)(E5.button,{type:`button`,role:`checkbox`,"aria-checked":J5(c)?`mixed`:c,"aria-required":l,"data-state":Y5(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:j5(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:j5(n,e=>{d(e=>J5(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});H5.displayName=V5;var U5=b.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,H.jsx)(Dye,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(H5,{...d,ref:t,__scopeCheckbox:n}),e&&(0,H.jsx)(q5,{__scopeCheckbox:n})]})})});U5.displayName=z5;var W5=`CheckboxIndicator`,G5=b.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=B5(W5,n);return(0,H.jsx)(I5,{present:r||J5(a.checked)||a.checked===!0,children:(0,H.jsx)(E5.span,{"data-state":Y5(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});G5.displayName=W5;var K5=`CheckboxBubbleInput`,q5=b.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=B5(K5,e),m=S5(n,p),h=P5(a),g=F5(r);b.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=J5(a),n.call(e,!J5(a)&&a),e.dispatchEvent(t)}},[f,h,a,i]);let _=b.useRef(!J5(a)&&a);return(0,H.jsx)(E5.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});q5.displayName=K5;function Oye(e){return typeof e==`function`}function J5(e){return e===`indeterminate`}function Y5(e){return J5(e)?`indeterminate`:e?`checked`:`unchecked`}function kye(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Aye=[`color`],jye=(0,b.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=kye(e,Aye);return(0,b.createElement)(`svg`,Object.assign({width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},i,{ref:t}),(0,b.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:r,fillRule:`evenodd`,clipRule:`evenodd`}))});function X5({className:e,...t}){return(0,H.jsx)(U5,{"data-slot":`checkbox`,className:m5(`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:(0,H.jsx)(G5,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,H.jsx)(jye,{className:`size-3.5`})})})}var Mye=`Label`,Z5=b.forwardRef((e,t)=>(0,H.jsx)(E5.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));Z5.displayName=Mye;var Nye=Z5;function Q5({className:e,...t}){return(0,H.jsx)(Nye,{"data-slot":`label`,className:m5(`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 Pye({id:e,htmlName:t,disabled:n,options:r,value:i,autofocus:a,readonly:o,required:s,onChange:c,onBlur:l,onFocus:u,className:d}){let{enumOptions:f,enumDisabled:p,inline:m,emptyValue:h}=r,g=L2(r),_=Array.isArray(i)?i:[i],v=({target:t})=>l(e,j2(t?.value,f,g,h)),y=({target:t})=>u(e,j2(t?.value,f,g,h));return(0,H.jsx)(`div`,{className:m5({"flex flex-col gap-2":!m,"flex flex-row gap-4 flex-wrap":m}),children:Array.isArray(f)&&f.map((r,i)=>{let l=E2(r.value,_),u=Array.isArray(p)&&p.includes(r.value),m=t4(e,i);return(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(X5,{id:m,name:t||e,required:s,disabled:n||u||o,onCheckedChange:e=>{c(e?k2(i,_,f):T2(i,_,f))},className:d,checked:l,autoFocus:a&&i===0,onBlur:v,onFocus:y,"aria-describedby":e4(e)}),(0,H.jsx)(Q5,{className:`leading-tight`,htmlFor:t4(e,i),children:r.label})]},m)})})}function Fye(e){let{id:t,htmlName:n,value:r,disabled:i,readonly:a,label:o,hideLabel:s,schema:c,autofocus:l,options:u,onChange:d,onBlur:f,onFocus:p,registry:m,uiSchema:h,className:g}=e,_=l4(c),v=B2(`DescriptionFieldTemplate`,m,u),y=e=>d(e),b=()=>f(t,r),x=()=>p(t,r),S=u.description||c.description;return(0,H.jsxs)(`div`,{className:`relative ${i||a?`cursor-not-allowed opacity-50`:``}`,"aria-describedby":e4(t),children:[!s&&S&&(0,H.jsx)(v,{id:Y2(t),description:S,schema:c,uiSchema:h,registry:m}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2 my-2`,children:[(0,H.jsx)(X5,{id:t,name:n||t,checked:r!==void 0&&!!r,required:_,disabled:i||a,autoFocus:l,onCheckedChange:y,onBlur:b,onFocus:x,className:g}),(0,H.jsx)(Q5,{className:`leading-tight`,htmlFor:t,children:a4(o,s||!o)})]})]})}function Iye(e){let t=e+`CollectionProvider`,[n,r]=A5(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=b.useRef(null),a=b.useRef(new Map).current;return(0,H.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=C5(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=S5(t,a(s,n).collectionRef);return(0,H.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=C5(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=S5(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,H.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var Lye=b.useId||(()=>void 0),Rye=0;function zye(e){let[t,n]=b.useState(Lye());return M5(()=>{e||n(e=>e??String(Rye++))},[e]),e||(t?`radix-${t}`:``)}function Bye(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}var Vye=b.createContext(void 0);function $5(e){let t=b.useContext(Vye);return e||t||`ltr`}var e7=`rovingFocusGroup.onEntryFocus`,Hye={bubbles:!1,cancelable:!0},t7=`RovingFocusGroup`,[n7,r7,Uye]=Iye(t7),[Wye,i7]=A5(t7,[Uye]),[Gye,Kye]=Wye(t7),a7=b.forwardRef((e,t)=>(0,H.jsx)(n7.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(n7.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(qye,{...e,ref:t})})}));a7.displayName=t7;var qye=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=b.useRef(null),p=S5(t,f),m=$5(a),[h,g]=N5({prop:o,defaultProp:s??null,onChange:c,caller:t7}),[_,v]=b.useState(!1),y=Bye(l),x=r7(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(e7,y),()=>e.removeEventListener(e7,y)},[y]),(0,H.jsx)(Gye,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:b.useCallback(e=>g(e),[g]),onItemShiftTab:b.useCallback(()=>v(!0),[]),onFocusableItemAdd:b.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:b.useCallback(()=>w(e=>e-1),[]),children:(0,H.jsx)(E5.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:j5(e.onMouseDown,()=>{S.current=!0}),onFocus:j5(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(e7,Hye);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);c7([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:j5(e.onBlur,()=>v(!1))})})}),o7=`RovingFocusGroupItem`,s7=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=zye(),l=a||c,u=Kye(o7,n),d=u.currentTabStopId===l,f=r7(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return b.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,H.jsx)(n7.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,H.jsx)(E5.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:j5(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:j5(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:j5(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Xye(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Zye(n,r+1):n.slice(r+1)}setTimeout(()=>c7(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});s7.displayName=o7;var Jye={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Yye(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Xye(e,t,n){let r=Yye(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Jye[r]}function c7(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Zye(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Qye=a7,l7=s7,u7=`Radio`,[$ye,d7]=A5(u7),[ebe,f7]=$ye(u7);function p7(e){let{__scopeRadio:t,checked:n=!1,children:r,disabled:i,form:a,name:o,onCheck:s,required:c,value:l=`on`,internal_do_not_use_render:u}=e,[d,f]=b.useState(null),[p,m]=b.useState(null),h={checked:n,disabled:i,required:c,name:o,form:a,value:l,control:d,setControl:f,hasConsumerStoppedPropagationRef:b.useRef(!1),isFormControl:!d||!!a||!!d.closest(`form`),bubbleInput:p,setBubbleInput:m,onCheck:()=>s?.()};return(0,H.jsx)(ebe,{scope:t,...h,children:nbe(u)?u(h):r})}var m7=`RadioTrigger`,h7=b.forwardRef(({__scopeRadio:e,onClick:t,...n},r)=>{let{checked:i,disabled:a,value:o,setControl:s,onCheck:c,hasConsumerStoppedPropagationRef:l,isFormControl:u,bubbleInput:d}=f7(m7,e),f=S5(r,s);return(0,H.jsx)(E5.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":b7(i),"data-disabled":a?``:void 0,disabled:a,value:o,...n,ref:f,onClick:j5(t,e=>{i||c(),d&&u&&(l.current=e.isPropagationStopped(),l.current||e.stopPropagation())})})});h7.displayName=m7;var tbe=b.forwardRef((e,t)=>{let{__scopeRadio:n,name:r,checked:i,required:a,disabled:o,value:s,onCheck:c,form:l,...u}=e;return(0,H.jsx)(p7,{__scopeRadio:n,checked:i,disabled:o,required:a,onCheck:c,name:r,form:l,value:s,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(h7,{...u,ref:t,__scopeRadio:n}),e&&(0,H.jsx)(y7,{__scopeRadio:n})]})})});tbe.displayName=u7;var g7=`RadioIndicator`,_7=b.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=f7(g7,n);return(0,H.jsx)(I5,{present:r||a.checked,children:(0,H.jsx)(E5.span,{"data-state":b7(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})});_7.displayName=g7;var v7=`RadioBubbleInput`,y7=b.forwardRef(({__scopeRadio:e,...t},n)=>{let{control:r,checked:i,required:a,disabled:o,name:s,value:c,form:l,bubbleInput:u,setBubbleInput:d,hasConsumerStoppedPropagationRef:f}=f7(v7,e),p=S5(n,d),m=P5(i),h=F5(r);b.useEffect(()=>{let e=u;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!f.current;if(m!==i&&n){let t=new Event(`click`,{bubbles:r});n.call(e,i),e.dispatchEvent(t)}},[u,m,i,f]);let g=b.useRef(i);return(0,H.jsx)(E5.input,{type:`radio`,"aria-hidden":!0,defaultChecked:g.current,required:a,disabled:o,name:s,value:c,form:l,...t,tabIndex:-1,ref:p,style:{...t.style,...h,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});y7.displayName=v7;function nbe(e){return typeof e==`function`}function b7(e){return e?`checked`:`unchecked`}var rbe=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],x7=`RadioGroup`,[ibe,abe]=A5(x7,[i7,d7]),S7=i7(),C7=d7(),[obe,sbe]=ibe(x7),w7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,name:r,defaultValue:i,value:a,required:o=!1,disabled:s=!1,orientation:c,dir:l,loop:u=!0,onValueChange:d,...f}=e,p=S7(n),m=$5(l),[h,g]=N5({prop:a,defaultProp:i??null,onChange:d,caller:x7});return(0,H.jsx)(obe,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,H.jsx)(Qye,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,H.jsx)(E5.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});w7.displayName=x7;var cbe=`RadioGroupItem`,lbe=`RadioGroupItemProvider`,T7=`RadioGroupItemTrigger`,ube=`RadioGroupItemBubbleInput`;function dbe(e){let{__scopeRadioGroup:t,value:n,disabled:r,children:i,internal_do_not_use_render:a}=e,o=sbe(lbe,t),s=C7(t),c=o.disabled||r;return(0,H.jsx)(p7,{...s,checked:o.value===n,disabled:c,required:o.required,name:o.name,value:n,onCheck:()=>o.onValueChange(n),internal_do_not_use_render:a,children:i})}var E7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e,i=S7(n),a=C7(n),{checked:o,disabled:s}=f7(T7,a.__scopeRadio),c=b.useRef(null),l=S5(t,c),u=b.useRef(!1);return b.useEffect(()=>{let e=e=>{rbe.includes(e.key)&&(u.current=!0)},t=()=>u.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,H.jsx)(l7,{asChild:!0,...i,focusable:!s,active:o,children:(0,H.jsx)(h7,{...a,...r,ref:l,onKeyDown:j5(r.onKeyDown,e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:j5(r.onFocus,()=>{u.current&&c.current?.click()})})})});E7.displayName=T7;var D7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,value:r,disabled:i,...a}=e;return(0,H.jsx)(dbe,{__scopeRadioGroup:n,value:r,disabled:i,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(E7,{...a,ref:t,__scopeRadioGroup:n}),e&&(0,H.jsx)(O7,{__scopeRadioGroup:n})]})})});D7.displayName=cbe;var O7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,H.jsx)(y7,{...C7(n),...r,ref:t})});O7.displayName=ube;var fbe=`RadioGroupIndicator`,k7=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,H.jsx)(_7,{...C7(n),...r,ref:t})});k7.displayName=fbe;function pbe({className:e,...t}){return(0,H.jsx)(w7,{"data-slot":`radio-group`,className:m5(`grid gap-3`,e),...t})}function mbe({className:e,...t}){return(0,H.jsx)(D7,{"data-slot":`radio-group-item`,className:m5(`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:(0,H.jsx)(k7,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center`,children:(0,H.jsx)(xve,{className:`fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2`})})})}function hbe({id:e,options:t,value:n,required:r,disabled:i,readonly:a,onChange:o,onBlur:s,onFocus:c,className:l}){let{enumOptions:u,enumDisabled:d,emptyValue:f}=t,p=L2(t),m=e=>o(j2(e,u,p,f)),h=({target:t})=>s(e,j2(t?.value,u,p,f)),g=({target:t})=>c(e,j2(t?.value,u,p,f)),_=!!t?.inline;return(0,H.jsx)(`div`,{className:`mb-0`,children:(0,H.jsx)(pbe,{defaultValue:n?.toString(),required:r,disabled:i||a,onValueChange:e=>{m(e)},onBlur:h,onFocus:g,"aria-describedby":e4(e),orientation:_?`horizontal`:`vertical`,className:m5(`flex flex-wrap`,{"flex-col":!_},l),children:Array.isArray(u)&&u.map((t,r)=>{let i=Array.isArray(d)&&d.includes(t.value);return(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(mbe,{checked:E2(t.value,n),value:M2(t.value,r,p),id:t4(e,r),disabled:i}),(0,H.jsx)(Q5,{className:`leading-tight`,htmlFor:t4(e,r),children:t.label})]},t4(e,r))})})})}function A7(e,[t,n]){return Math.min(n,Math.max(t,e))}var gbe=b.createContext(void 0);function _be(e){let t=b.useContext(gbe);return e||t||`ltr`}function vbe(e){let t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ybe(e){let[t,n]=b.useState(void 0);return rR(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}function bbe(e){let t=e+`CollectionProvider`,[n,r]=nR(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=b.useRef(null),a=b.useRef(new Map).current;return(0,H.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=oR(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=tR(t,a(s,n).collectionRef);return(0,H.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=oR(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=tR(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,H.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var j7=[`PageUp`,`PageDown`],M7=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],N7={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},P7=`Slider`,[F7,xbe,Sbe]=bbe(P7),[I7,Cbe]=nR(P7,[Sbe]),[wbe,L7]=I7(P7),R7=b.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=b.useRef(new Set),_=b.useRef(0),v=o===`horizontal`?Tbe:Ebe,[y=[],x]=aR({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),S=b.useRef(y);function C(e){E(e,jbe(y,e))}function w(e){E(e,_.current)}function T(){let e=S.current[_.current];y[_.current]!==e&&f(y)}function E(e,t,{commit:n}={commit:!1}){let o=Fbe(a),s=A7(Ibe(Math.round((e-r)/a)*a+r,o),[r,i]);x((e=[])=>{let r=kbe(e,s,t);if(Pbe(r,c*a)){_.current=r.indexOf(s);let t=String(r)!==String(e);return t&&n&&f(r),t?r:e}else return e})}return(0,H.jsx)(wbe,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:y,orientation:o,form:m,children:(0,H.jsx)(F7.Provider,{scope:e.__scopeSlider,children:(0,H.jsx)(F7.Slot,{scope:e.__scopeSlider,children:(0,H.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:QL(h.onPointerDown,()=>{s||(S.current=y)}),min:r,max:i,inverted:p,onSlideStart:s?void 0:C,onSlideMove:s?void 0:w,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>!s&&E(r,0,{commit:!0}),onEndKeyDown:()=>!s&&E(i,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!s){let n=j7.includes(e.key)||e.shiftKey&&M7.includes(e.key)?10:1,r=_.current,i=y[r];E(i+a*n*t,r,{commit:!0})}}})})})})});R7.displayName=P7;var[z7,B7]=I7(P7,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),Tbe=b.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=b.useState(null),p=tR(t,e=>f(e)),m=b.useRef(void 0),h=_be(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=X7([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,H.jsx)(z7,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,H.jsx)(V7,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=v(e.clientX);o?.(t)},onSlideMove:e=>{let t=v(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=N7[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),Ebe=b.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=b.useRef(null),d=tR(t,u),f=b.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=X7([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,H.jsx)(z7,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,H.jsx)(V7,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=N7[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),V7=b.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=L7(P7,n);return(0,H.jsx)(sR.span,{...l,ref:t,onKeyDown:QL(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):j7.concat(M7).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:QL(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:QL(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:QL(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),H7=`SliderTrack`,U7=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=L7(H7,n);return(0,H.jsx)(sR.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});U7.displayName=H7;var W7=`SliderRange`,G7=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=L7(W7,n),a=B7(W7,n),o=tR(t,b.useRef(null)),s=i.values.length,c=i.values.map(e=>Y7(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,H.jsx)(sR.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});G7.displayName=W7;var K7=`SliderThumb`,q7=b.forwardRef((e,t)=>{let n=xbe(e.__scopeSlider),[r,i]=b.useState(null),a=tR(t,e=>i(e)),o=b.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,H.jsx)(Dbe,{...e,ref:a,index:o})}),Dbe=b.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=L7(K7,n),s=B7(K7,n),[c,l]=b.useState(null),u=tR(t,e=>l(e)),d=!c||o.form||!!c.closest(`form`),f=ybe(c),p=o.values[r],m=p===void 0?0:Y7(p,o.min,o.max),h=Abe(r,o.values.length),g=f?.[s.size],_=g?Mbe(g,m,s.direction):0;return b.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),(0,H.jsxs)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[s.startEdge]:`calc(${m}% + ${_}px)`},children:[(0,H.jsx)(F7.ItemSlot,{scope:e.__scopeSlider,children:(0,H.jsx)(sR.span,{role:`slider`,"aria-label":e[`aria-label`]||h,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?``:void 0,tabIndex:o.disabled?void 0:0,...a,ref:u,style:p===void 0?{display:`none`}:e.style,onFocus:QL(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,H.jsx)(J7,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});q7.displayName=K7;var Obe=`RadioBubbleInput`,J7=b.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=b.useRef(null),a=tR(i,r),o=vbe(t);return b.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`input`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,H.jsx)(sR.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});J7.displayName=Obe;function kbe(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function Y7(e,t,n){return A7(100/(n-t)*(e-t),[0,100])}function Abe(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function jbe(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function Mbe(e,t,n){let r=e/2;return(r-X7([0,50],[0,r])(t)*n)*n}function Nbe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Pbe(e,t){if(t>0){let n=Nbe(e);return Math.min(...n)>=t}return!0}function X7(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Fbe(e){return(String(e).split(`.`)[1]||``).length}function Ibe(e,t){let n=10**t;return Math.round(e*n)/n}var Lbe=R7,Rbe=U7,zbe=G7,Bbe=q7;function Vbe({className:e,defaultValue:t,value:n,min:r=0,max:i=100,...a}){let o=(0,b.useMemo)(()=>Array.isArray(n)?n:Array.isArray(t)?t:[r,i],[n,t,r,i]);return(0,H.jsxs)(Lbe,{"data-slot":`slider`,defaultValue:t,value:n,min:r,max:i,className:m5(`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),...a,children:[(0,H.jsx)(Rbe,{"data-slot":`slider-track`,className:m5(`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:(0,H.jsx)(zbe,{"data-slot":`slider-range`,className:m5(`bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full`)})}),Array.from({length:o.length},(e,t)=>(0,H.jsx)(Bbe,{"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`},t))]})}var Hbe=[`name`,`min`,`max`,`step`,`orientation`,`disabled`,`defaultValue`,`value`,`onValueChange`,`className`,`dir`,`inverted`,`minStepsBetweenThumbs`];function Ube({value:e,readonly:t,disabled:n,options:r,schema:i,onChange:a,label:o,id:s}){let c=e=>a(e[0]),l={value:e,label:o,id:s,...F2(i)},u={id:s,...YD(r.props||{},Hbe)};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Vbe,{disabled:n||t,min:l.min,max:l.max,step:l.step,value:[e],onValueChange:c,...u,"aria-describedby":e4(s)}),e]})}var Wbe=ji(`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 Gbe({className:e,variant:t,asChild:n=!1,...r}){return(0,H.jsx)(n?Ui:`span`,{"data-slot":`badge`,className:m5(Wbe({variant:t}),e),...r})}var Z7=(0,b.forwardRef)(({className:e,...t},n)=>(0,H.jsx)(vz,{ref:n,"data-slot":`command`,className:m5(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})),Kbe=(0,b.forwardRef)(({className:e,...t},n)=>(0,H.jsxs)(`div`,{className:`flex items-center border-b px-3`,"cmdk-input-wrapper":``,children:[(0,H.jsx)(Cve,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,H.jsx)(vz.Input,{ref:n,className:m5(`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})]}));Kbe.displayName=vz.Input.displayName;function Q7({className:e,...t}){return(0,H.jsx)(vz.List,{"data-slot":`command-list`,className:m5(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function $7({className:e,...t}){return(0,H.jsx)(vz.Group,{"data-slot":`command-group`,className:m5(`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 e9({className:e,...t}){return(0,H.jsx)(vz.Item,{"data-slot":`command-item`,className:m5(`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 qbe({multiple:e,items:t=[],selected:n,onValueChange:r,autoFocus:i=!1,disabled:a=!1,ariaDescribedby:o,ariaPlaceholder:s,onFocus:c,onBlur:l,className:u,id:d}){let f=(0,b.useRef)(null),[p,m]=(0,b.useState)(!1),[h,g]=(0,b.useState)(``),_=(0,b.useMemo)(()=>t.filter(e=>n.some(t=>MD(e.value,t))),[t,n]),v=(0,b.useMemo)(()=>t.filter(e=>!_.some(t=>MD(t.value,e.value))),[t,_]),y=(0,b.useCallback)(e=>{if(a)return;let t=_.filter(t=>!MD(t.value,e.value));r?.(t.map(e=>e.index))},[_,r,a]),x=(0,b.useCallback)(e=>{if(!(a||f.current?.value!==``))if(e.key===`Delete`||e.key===`Backspace`){let e=_.slice(0,-1);r?.(e.map(e=>e.index))}else e.key===`Escape`&&f.current.blur()},[_,r,a]),S=(0,b.useCallback)(t=>{if(a)return;g(``);let n=e?[..._,t]:[t];r?.(n.map(e=>e.index))},[e,_,r,a]),C=(0,b.useCallback)(e=>{a||m(!0),c?.(e)},[a,c]);return(0,H.jsxs)(Z7,{onKeyDown:x,className:m5(`overflow-visible bg-transparent`,u),autoFocus:i,"aria-disabled":a,onBlur:l,onFocus:C,"aria-describedby":o,"aria-placeholder":s,children:[(0,H.jsx)(`div`,{className:m5(`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`,a&&`opacity-50 cursor-not-allowed`),children:(0,H.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[_.map(e=>(0,H.jsxs)(Gbe,{variant:`secondary`,children:[e.label,(0,H.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:t=>t.key===`Enter`&&!a&&y(e),onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:()=>y(e),disabled:a,children:(0,H.jsx)(p5,{className:m5(`h-3 w-3 text-muted-foreground hover:text-foreground`,a&&`pointer-events-none`)})})]},e.value)),(0,H.jsx)(vz.Input,{ref:f,value:h,onValueChange:g,onBlur:()=>m(!1),onFocus:()=>!a&&m(!0),placeholder:`Select ...`,className:`rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1`,disabled:a,"aria-controls":`command-item-input-${d}`,"aria-labelledby":`command-item-input-${d}`,id:`command-item-input-${d}`})]})}),p&&!a&&v.length>0&&(0,H.jsx)(`div`,{className:`relative mt-2`,children:(0,H.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:(0,H.jsx)($7,{className:`h-full overflow-auto`,children:(0,H.jsx)(Q7,{children:v.map(e=>(0,H.jsx)(e9,{disabled:e.disabled,value:String(e.value),onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},"aria-controls":`${e.value}-command-item`,"aria-labelledby":`${e.value}-command-item`,id:`${e.value}-command-item`,onSelect:()=>S(e),className:`cursor-pointer`,children:e.label},`${e.value}-command-item`))})})})})]})}function Jbe({items:e,selected:t,onValueChange:n,autoFocus:r=!1,disabled:i=!1,required:a=!1,placeholder:o=`Select...`,ariaDescribedby:s,ariaPlaceholder:c,onFocus:l,onBlur:u,className:d}){let[f,p]=(0,b.useState)(!1),m=e?.find(e=>e.value===t),h=(0,b.useRef)(null),g=(0,b.useRef)(null);return(0,b.useEffect)(()=>{f&&h.current&&requestAnimationFrame(()=>{var e;(e=h.current)==null||e.scrollIntoView({block:`nearest`})})},[f]),(0,H.jsxs)(Z7,{ref:g,className:m5(`overflow-visible bg-transparent`,d),autoFocus:r,"aria-disabled":i,onBlur:e=>{g.current&&!g.current.contains(e.relatedTarget)&&p(!1),u?.(e)},onFocus:l,"aria-describedby":s,"aria-placeholder":c,children:[(0,H.jsxs)(`button`,{type:`button`,disabled:i,"aria-expanded":f,"aria-haspopup":`listbox`,onClick:()=>!i&&p(!f),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&!i&&(e.preventDefault(),e.stopPropagation(),p(!f))},className:m5(`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`,!m&&a&&`border-red-500`,i&&`opacity-50 cursor-not-allowed`,d),children:[(0,H.jsx)(`span`,{className:m5(`flex-1 line-clamp-1`,!m&&`text-muted-foreground`),children:m?.label||o}),(0,H.jsx)(u5,{className:`h-4 w-4 opacity-50`})]}),(0,H.jsx)(`div`,{className:`relative`,children:f&&e&&e.length>0?(0,H.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:(0,H.jsx)($7,{className:`h-full overflow-auto`,children:(0,H.jsx)(Q7,{children:e.map(e=>(0,H.jsxs)(e9,{ref:e.value===t?h:void 0,value:String(e.value),onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onSelect:()=>{e.disabled||(n?.(e.value),p(!1))},className:m5(`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:[(0,H.jsx)(`span`,{children:e.label}),(0,H.jsx)(`span`,{className:`flex h-3.5 w-3.5 items-center justify-center`,children:e.value===t&&(0,H.jsx)(yve,{className:`h-4 w-4`})})]},e.value))})})}):null})]})}function Ybe({id:e,options:t,required:n,disabled:r,readonly:i,value:a,schema:o,multiple:s,autofocus:c,onChange:l,onBlur:u,onFocus:d,placeholder:f,rawErrors:p=[],className:m,registry:h,uiSchema:g}){let{enumOptions:_,enumDisabled:v,emptyValue:y}=t,b=L2(t);o4(e,o,_,s);let x=()=>{d(e,j2(a,_,b,y))},S=()=>{u(e,j2(a,_,b,y))},C=_?.map(({value:e,label:t},n)=>({value:s?e:M2(e,n,b),label:t,index:n,disabled:Array.isArray(v)&&v.includes(e)})),w=m5({"border-destructive":p.length>0},m);return(0,H.jsxs)(`div`,{className:`p-0.5`,children:[s?(0,H.jsx)(qbe,{id:e,autoFocus:c,disabled:r||i,multiple:!0,className:w,items:C,selected:a,onValueChange:e=>{l(j2(e.map(String),_,b,y))},onFocus:x,onBlur:S}):(0,H.jsx)(Jbe,{items:C,selected:O2(a,_,!1,b,``),onValueChange:e=>{l(j2(e,_,b,y))},autoFocus:c,disabled:r||i,required:n,placeholder:f,className:w,onFocus:x,onBlur:S,ariaDescribedby:e4(e)}),(0,H.jsx)(u4,{id:e,multiple:s,options:t,registry:h,uiSchema:g,value:a})]})}function Xbe({className:e,...t}){return(0,H.jsx)(`textarea`,{"data-slot":`textarea`,className:m5(`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 Zbe({id:e,htmlName:t,placeholder:n,value:r,required:i,disabled:a,autofocus:o,readonly:s,onBlur:c,onFocus:l,onChange:u,options:d,className:f}){return(0,H.jsx)(`div`,{className:`flex p-0.5`,children:(0,H.jsx)(Xbe,{id:e,name:t||e,placeholder:n,disabled:a,readOnly:s,value:r??``,required:i,autoFocus:o,rows:d.rows||5,onChange:({target:{value:e}})=>u(e===``?d.emptyValue:e),onBlur:({target:t})=>c(e,t?.value),onFocus:({target:t})=>l(e,t?.value),"aria-describedby":e4(e),className:f})})}function Qbe(){return{CheckboxWidget:Fye,CheckboxesWidget:Pye,RadioWidget:hbe,RangeWidget:Ube,SelectWidget:Ybe,TextareaWidget:Zbe}}function t9(){return{templates:hye(),widgets:Qbe()}}t9();function $be(){return fve(t9())}var exe=$be();function txe({tool:e,enabled:t,execute:n}){let r=(0,b.useRef)(n);(0,b.useEffect)(()=>{r.current=n});let{name:i,description:a,inputSchema:o}=e;(0,b.useEffect)(()=>{let e=document.modelContext??navigator.modelContext;if(!t||!e)return;let n=new AbortController;return e.registerTool({name:i,description:a,inputSchema:o,execute:()=>r.current()},{signal:n.signal}),()=>{n.abort()}},[t,i,a,o])}var n9=[],r9=ls()(ps(e=>({inputs:{},saveInput:(t,n,r,i)=>e(e=>{let a=e.inputs[t]??{},o=a[n]??[],s={key:r,input:i,createdAt:Date.now()};return{inputs:{...e.inputs,[t]:{...a,[n]:[...o,s]}}}}),updateInput:(t,n,r,i)=>e(e=>{let a=e.inputs[t],o=a?.[n];if(!o)return e;let s=o.findIndex(e=>e.key===r);if(s===-1)return e;let c=[...o];return c[s]={...c[s],input:i},{inputs:{...e.inputs,[t]:{...a,[n]:c}}}}),deleteInput:(t,n,r)=>e(e=>{let i=e.inputs[t],a=i?.[n];return a?{inputs:{...e.inputs,[t]:{...i,[n]:a.filter(e=>e.key!==r)}}}:e})}),{name:`skybridge-devtools-saved-inputs`,version:1,partialize:e=>({inputs:e.inputs})})),nxe=(e,t)=>r9(n=>e?n.inputs[e]?.[t]??n9:n9);function rxe({className:e,children:t,action:n,...r}){return(0,H.jsxs)(Cde,{className:`flex w-full min-w-0 items-stretch data-[state=open]:sticky data-[state=open]:top-0 data-[state=open]:z-20 data-[state=open]:bg-background`,children:[(0,H.jsxs)(wde,{"data-slot":`accordion-trigger`,className:pj(`flex min-h-0 min-w-0 flex-1 items-center gap-2 pl-4 pr-2 py-2.5 h-12`,`type-text-md font-semibold text-foreground text-left`,`outline-none focus-visible:outline-none rounded-sm`,`disabled:pointer-events-none disabled:opacity-50`,`data-[state=open]:cursor-default`,`[&[data-state=open]>svg]:rotate-90`,e),...r,children:[(0,H.jsx)(Jr,{className:`size-4 shrink-0 text-muted-foreground transition-transform duration-200`}),t]}),n==null?null:(0,H.jsx)(`div`,{className:`flex shrink-0 items-center pr-4`,children:n})]})}function i9({text:e,title:t,className:n}){let[r,i]=(0,b.useState)(!1),[a,o]=(0,b.useState)(null),s=(0,b.useRef)(null);return(0,b.useLayoutEffect)(()=>{let t=s.current,n=t?.parentElement;if(!t||!n)return;let r=()=>t.scrollHeight<=t.clientHeight+1,i=()=>{if(t.textContent=e,r()){o(null);return}let n=0,i=e.length,a=0;for(;n<=i;){let o=n+i>>1;t.textContent=`${e.slice(0,o).trimEnd()}... more`,r()?(a=o,n=o+1):i=o-1}o(e.slice(0,a).trimEnd())};i();let a=-1,c=new ResizeObserver(e=>{let t=Math.round(e[0].contentRect.width);t!==a&&(a=t,i())});return c.observe(n),()=>c.disconnect()},[e]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:pj(`relative`,n),children:[(0,H.jsx)(`p`,{ref:s,"aria-hidden":`true`,className:`invisible absolute inset-x-0 top-0 line-clamp-2`}),(0,H.jsx)(`p`,{children:a===null?e:(0,H.jsxs)(H.Fragment,{children:[a,`...`,` `,(0,H.jsx)(`button`,{type:`button`,onClick:()=>i(!0),className:`cursor-pointer p-0 underline underline-offset-2`,children:`more`})]})})]}),(0,H.jsx)(vI,{open:r,onOpenChange:i,children:(0,H.jsx)(yI,{size:`lg`,children:(0,H.jsxs)(bI,{children:[(0,H.jsx)(SI,{className:t?`font-mono`:`sr-only`,children:t??`Description`}),(0,H.jsx)(CI,{className:`max-h-[60vh] overflow-y-auto whitespace-pre-wrap`,children:e})]})})})]})}var ixe=[`h-7 w-full rounded-md border border-border bg-background`,`px-2 font-mono text-xs text-foreground`,`placeholder:text-muted-foreground/50`,`outline-none transition-colors`,`focus-visible:border-ring focus-visible:border-2`,`aria-invalid:border-destructive`,`disabled:cursor-not-allowed disabled:opacity-50`].join(` `),axe=[`block w-full min-h-20 resize-y rounded-md border border-border bg-background`,`px-2 py-1.5 font-mono text-xs leading-5 text-foreground`,`placeholder:text-muted-foreground/50`,`outline-none transition-colors`,`focus-visible:border-ring focus-visible:border-2`,`aria-invalid:border-destructive`,`disabled:cursor-not-allowed disabled:opacity-50`].join(` `),a9=[`flex h-7 min-h-7 w-full items-center justify-between gap-2 rounded-md border border-border bg-background shadow-none`,`px-2 font-mono text-xs text-foreground`,`outline-none transition-colors`,`focus-visible:border-ring focus-visible:border-2 focus-visible:ring-0 focus-visible:ring-offset-0`,`data-[state=open]:ring-0 data-[state=open]:ring-offset-0`,`aria-invalid:border-destructive`,`data-[placeholder]:text-muted-foreground/50`,`disabled:cursor-not-allowed disabled:opacity-50`,`[&>span]:line-clamp-1`,`[&_svg]:size-3.5`].join(` `),o9=`text-[10px] leading-snug text-muted-foreground/70`,s9=[`inline-flex h-6 cursor-pointer items-center gap-1 rounded-md px-1.5`,`font-mono text-xs text-muted-foreground`,`transition-colors`,`hover:bg-muted hover:text-foreground`,`focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,`disabled:pointer-events-none disabled:opacity-50`].join(` `);function oxe(e){let{id:t,name:n,value:r,required:i,disabled:a,readonly:o,placeholder:s,schema:c,options:l,onChange:u,onChangeOverride:d,onBlur:f,onFocus:p,rawErrors:m,type:h}=e,g={...I2(c,h,l)},_=(m?.length??0)>0,v=g.type===`number`,y=e=>{if(e===``)return l.emptyValue;if(v){let t=Number(e);return Number.isFinite(t)?t:e}return e};return(0,H.jsx)(`input`,{id:t,name:n,toolparamdescription:c.description,className:ixe,value:r??``,required:i,disabled:a||o,placeholder:s,"aria-invalid":_||void 0,onChange:d??(e=>u(y(e.target.value))),onBlur:e=>f(t,y(e.target.value)),onFocus:e=>p(t,y(e.target.value)),...g})}function sxe(e){let{id:t,classNames:n,style:r,label:i,required:a,rawDescription:o,rawErrors:s,children:c,errors:l,help:u,hidden:d,schema:f,uiSchema:p}=e;if(d)return(0,H.jsx)(`div`,{className:`hidden`,children:c});let m=f.type===`object`||f.type===`array`,h=!!p?.[`ui:widget`],g=m&&!h,_=!g&&!!i,v=(s?.length??0)>0;return(0,H.jsxs)(`div`,{className:pj(`flex flex-col gap-1`,n),style:r,children:[_&&(0,H.jsxs)(`label`,{htmlFor:t,className:pj(`font-mono text-xs text-muted-foreground`,v&&`text-destructive`),children:[i,a&&(0,H.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}),!g&&o?(0,H.jsx)(i9,{text:o,title:i,className:o9}):null,c,l,u]})}function cxe(e){return!e.errors||e.errors.length===0?null:(0,H.jsx)(`div`,{className:`font-mono text-[11px] text-destructive`,children:e.errors.join(`, `)})}function lxe(e){return e.description?(0,H.jsx)(`p`,{id:e.id,className:o9,children:e.description}):null}function uxe(e){let{id:t,title:n,required:r}=e;return n?(0,H.jsxs)(`div`,{id:t,className:`font-mono text-xs text-muted-foreground`,children:[n,r&&(0,H.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}):null}function dxe(e){let{fieldPathId:t,properties:n,description:r,disabled:i,title:a,required:o}=e,s=t.$id===`root`;return(0,H.jsxs)(`div`,{className:pj(`flex flex-col`,s?`gap-6`:`gap-5 border-l border-border pl-2.5`),children:[!s&&a&&(0,H.jsxs)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:[a,o&&(0,H.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}),!s&&r&&(0,H.jsx)(`p`,{className:`text-[10px] leading-snug text-muted-foreground/70`,children:r}),n.filter(e=>!e.hidden).map(e=>(0,H.jsx)(`div`,{"aria-disabled":i||void 0,children:e.content},e.name))]})}function fxe(e){let{items:t,canAdd:n,onAddClick:r,disabled:i,readonly:a,title:o,required:s,schema:c}=e,l=c.description;return(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[o&&(0,H.jsxs)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:[o,s&&(0,H.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`})]}),l&&(0,H.jsx)(`p`,{className:`text-[10px] leading-snug text-muted-foreground/70`,children:l}),t,n&&(0,H.jsxs)(`button`,{type:`button`,className:pj(s9,`self-start`),onClick:r,disabled:i||a,children:[(0,H.jsx)(gi,{className:`size-3`}),`add`]})]})}function pxe(e){let{children:t,index:n,buttonsProps:r,hasToolbar:i}=e,{hasRemove:a,onRemoveItem:o,disabled:s,readonly:c}=r;return(0,H.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,H.jsxs)(`span`,{className:`mt-1 select-none font-mono text-[11px] text-muted-foreground/50`,children:[`[`,n,`]`]}),(0,H.jsx)(`div`,{className:`flex-1 min-w-0`,children:t}),i&&a&&(0,H.jsx)(`button`,{type:`button`,className:pj(s9,`mt-0.5 px-1`),onClick:o,disabled:s||c,"aria-label":`Remove item ${n}`,children:(0,H.jsx)(Oi,{className:`size-3`})})]})}function mxe(e){let{icon:t,iconType:n,registry:r,uiSchema:i,...a}=e;return(0,H.jsxs)(`button`,{type:`button`,className:s9,...a,children:[(0,H.jsx)(gi,{className:`size-3`}),`add`]})}function hxe(e){let{icon:t,iconType:n,registry:r,uiSchema:i,...a}=e;return(0,H.jsx)(`button`,{type:`button`,className:pj(s9,`px-1`),"aria-label":`Remove`,...a,children:(0,H.jsx)(Oi,{className:`size-3`})})}function c9(){return null}var gxe={AddButton:mxe,RemoveButton:hxe,CopyButton:c9,MoveDownButton:c9,MoveUpButton:c9,ClearButton:c9},_xe=`inline-flex items-center justify-center rounded-sm border border-border bg-background py-0.5 type-text-sm font-medium text-muted-foreground`;function vxe({className:e,icon:t,children:n,onDismiss:r,...i}){return(0,H.jsxs)(`span`,{className:Mr(_xe,`gap-[3px]`,t?`px-1`:`pl-[9px] pr-1`,e),...i,children:[(0,H.jsxs)(`span`,{className:Mr(`inline-flex items-center`,t&&`gap-[5px]`),children:[t&&(0,H.jsx)(`span`,{className:`inline-flex shrink-0`,children:t}),(0,H.jsx)(`span`,{children:n})]}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Remove`,onClick:r,className:`inline-flex items-center justify-center rounded-[3px] p-0.5 hover:bg-accent`,children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`path`,{d:`M18 6 6 18`}),(0,H.jsx)(`path`,{d:`m6 6 12 12`})]})})]})}var l9=(0,b.createContext)(null);function u9(){let e=(0,b.useContext)(l9);if(!e)throw Error(`Combobox compound components must be used within <Combobox>`);return e}function yxe(e){let{children:t,multiple:n=!1,open:r,defaultOpen:i=!1,onOpenChange:a,getOptionLabel:o}=e,[s,c]=(0,b.useState)(n?null:e.defaultValue??null),[l,u]=(0,b.useState)(n?e.defaultValue??[]:[]),[d,f]=(0,b.useState)(i),p=r!==void 0,m=p?r:d,h=(0,b.useCallback)(e=>{p||f(e),a?.(e)},[p,a]),g=n?null:(e.value===void 0?s:e.value)??null,_=n?e.value===void 0?l:e.value:[],v=(0,b.useCallback)(e=>n?_.includes(e):g===e,[n,g,_]),y=n?void 0:e.onValueChange,x=n?e.onValueChange:void 0,S=!n&&e.value!==void 0,C=n&&e.value!==void 0,w=(0,b.useCallback)(e=>{if(n){let t=_.includes(e)?_.filter(t=>t!==e):[..._,e];C||u(t),x?.(t)}else S||c(e),y?.(e),h(!1)},[n,C,S,x,y,_,h]),T=(0,b.useCallback)(e=>{if(!n)return;let t=_.filter(t=>t!==e);C||u(t),x?.(t)},[n,C,x,_]),E=(0,b.useMemo)(()=>({multiple:n,value:g,values:_,onSelect:w,onDeselect:T,isSelected:v,open:m,onOpenChange:h,getOptionLabel:o}),[n,g,_,w,T,v,m,h,o]);return(0,H.jsx)(l9.Provider,{value:E,children:(0,H.jsx)(XF,{open:m,onOpenChange:h,children:t})})}function bxe({className:e,size:t,placeholder:n,children:r,...i}){let{multiple:a,value:o,values:s,open:c,onDeselect:l}=u9(),u=a?s.length===0:o==null;return(0,H.jsx)(ZF,{asChild:!0,children:(0,H.jsxs)(`button`,{type:`button`,"data-slot":`combobox-trigger`,role:`combobox`,"aria-expanded":c,className:Mr(ZI({size:t}),e),...i,children:[(0,H.jsx)(`span`,{className:Mr(`flex flex-1 items-center gap-1.5 text-left`,a&&`flex-wrap`,u&&`text-placeholder`),children:u?n:a?(0,H.jsx)(xxe,{values:s,onDeselect:l}):r}),(0,H.jsx)(qr,{className:`size-5 shrink-0 text-muted-foreground`})]})})}function xxe({values:e,onDeselect:t}){let{getOptionLabel:n}=u9();return(0,H.jsx)(H.Fragment,{children:e.map(e=>(0,H.jsx)(vxe,{onClick:e=>e.stopPropagation(),onDismiss:()=>t(e),children:n?n(e):e},e))})}function Sxe({className:e,children:t,filter:n,...r}){let{multiple:i}=u9();return(0,H.jsx)(QF,{className:Mr(`w-[var(--radix-popover-trigger-width)] p-0`,e),align:`start`,onOpenAutoFocus:i?e=>e.preventDefault():void 0,...r,children:(0,H.jsx)(vz,{"data-slot":`combobox-command`,filter:n,className:`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover`,children:t})})}function Cxe({className:e,...t}){return(0,H.jsxs)(`div`,{"data-slot":`combobox-search`,className:`flex items-center gap-2 border-b border-border-secondary px-3 py-2.5`,children:[(0,H.jsx)(yi,{className:`size-5 shrink-0 text-muted-foreground`}),(0,H.jsx)(vz.Input,{"data-slot":`combobox-search-input`,className:Mr(`flex h-full w-full bg-transparent type-text-md font-medium text-foreground outline-hidden`,`placeholder:text-placeholder`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]})}function wxe({className:e,...t}){return(0,H.jsx)(vz.List,{"data-slot":`combobox-list`,className:Mr(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto py-1`,e),...t})}function Txe({className:e,...t}){return(0,H.jsx)(vz.Empty,{"data-slot":`combobox-empty`,className:Mr(`py-6 text-center type-text-sm text-muted-foreground`,e),...t})}function Exe({className:e,children:t,itemValue:n,...r}){let{onSelect:i,isSelected:a}=u9(),o=a(n);return(0,H.jsxs)(vz.Item,{"data-slot":`combobox-item`,"data-selected-item":o||void 0,onSelect:()=>i(n),className:Mr(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 outline-hidden select-none`,`type-text-md font-medium text-foreground mx-1.5 my-px`,`data-[selected=true]:bg-background-hover`,`data-[selected-item]:bg-accent`,`data-[disabled=true]:pointer-events-none data-[disabled=true]:text-disabled-foreground`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-5`,e),...r,children:[(0,H.jsx)(`span`,{className:`flex flex-1 items-center gap-2 truncate`,children:t}),o&&(0,H.jsx)(Kr,{className:`size-5 shrink-0 text-primary`})]})}var Dxe=Object.defineProperty,d9=(e,t)=>Dxe(e,`name`,{value:t,configurable:!0}),f9=`Switch`,[Oxe,kxe]=pM(f9),[Axe,p9]=Oxe(f9);function m9(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=nF({prop:n,defaultProp:i??!1,onChange:c,caller:f9}),[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useRef(!1),[y,x]=b.useReducer(e=>e+1,0),S={checked:f,setChecked:p,disabled:a,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,userInteractionCount:y,onUserInteraction:x,required:l,defaultChecked:i,isFormControl:!m||!!o||!!m.closest(`form`),bubbleInput:g,setBubbleInput:_};return(0,H.jsx)(Axe,{scope:t,...S,children:h9(d)?d(S):r})}d9(m9,`SwitchProvider`);var jxe=`SwitchTrigger`,Mxe=b.forwardRef(d9(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,form:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,onUserInteraction:p,isFormControl:m,bubbleInput:h}=p9(jxe,e),g=Ii(r,u),_=b.useRef(c);return b.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=d9(()=>d(_.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,H.jsx)(zj.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":g9(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:g,onClick:aM(t,e=>{p(),d(e=>!e),h&&m&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`SwitchTrigger`)),Nxe=b.forwardRef(d9(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,H.jsx)(m9,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Mxe,{...d,ref:t,__scopeSwitch:n}),e&&(0,H.jsx)(Lxe,{__scopeSwitch:n})]})})},`Switch`)),Pxe=`SwitchThumb`,Fxe=b.forwardRef(d9(function(e,t){let{__scopeSwitch:n,...r}=e,i=p9(Pxe,n);return(0,H.jsx)(zj.span,{"data-state":g9(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),Ixe=`SwitchBubbleInput`,Lxe=b.forwardRef(d9(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,hasConsumerStoppedPropagationRef:a,userInteractionCount:o,checked:s,defaultChecked:c,required:l,disabled:u,name:d,value:f,form:p,bubbleInput:m,setBubbleInput:h}=p9(Ixe,e),g=Ii(r,h),_=jP(i),v=b.useRef(!1),y=b.useRef(s),x=b.useRef(o);b.useEffect(()=>{let e=m;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=o!==x.current;x.current=o;let i=y.current!==s;y.current=s;let c=!(r&&a.current);if(i&&n){v.current=!r;let t=new Event(`click`,{bubbles:c});n.call(e,s),e.dispatchEvent(t),v.current=!1}},[m,s,a,o]);let S=b.useRef(s);return(0,H.jsx)(zj.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:c??S.current,required:l,disabled:u,name:d,value:f,form:p,...n,tabIndex:-1,ref:g,onClick:aM(t,e=>{v.current&&e.stopPropagation()}),style:{...n.style,..._,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function h9(e){return typeof e==`function`}d9(h9,`isFunction`);function g9(e){return e?`checked`:`unchecked`}d9(g9,`getState`);function Rxe({className:e,...t}){return(0,H.jsx)(Nxe,{"data-slot":`switch`,className:Mr(`peer inline-flex h-5 w-9 shrink-0 items-center rounded-full p-0.5`,`bg-subtle data-[state=checked]:not-disabled:bg-primary`,`transition-colors`,`outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background`,`disabled:pointer-events-none disabled:opacity-50`,e),...t,children:(0,H.jsx)(Fxe,{"data-slot":`switch-thumb`,className:Mr(`pointer-events-none block size-4 rounded-full bg-primary-foreground shadow-xs`,`transition-transform data-[state=unchecked]:translate-x-0 data-[state=checked]:translate-x-4`)})})}function zxe(e){let{id:t,name:n,value:r,required:i,disabled:a,readonly:o,placeholder:s,options:c,schema:l,onChange:u,onBlur:d,onFocus:f,rawErrors:p}=e,m=c.rows??3,h=(p?.length??0)>0;return(0,H.jsx)(`textarea`,{id:t,name:n,toolparamdescription:l.description,rows:m,className:axe,value:r??``,required:i,disabled:a||o,placeholder:s,spellCheck:!1,"aria-invalid":h||void 0,onChange:e=>u(e.target.value===``?c.emptyValue:e.target.value),onBlur:e=>d(t,e.target.value),onFocus:e=>f(t,e.target.value)})}function Bxe(e){let{id:t,value:n,required:r,disabled:i,readonly:a,placeholder:o,options:s,onChange:c,rawErrors:l}=e,u=s.enumOptions??[],d=(l?.length??0)>0;return(0,H.jsxs)(PL,{value:n==null?``:String(n),required:r,disabled:i||a,onValueChange:e=>{let t=u.find(t=>String(t.value)===e);c(t?t.value:e)},children:[(0,H.jsx)(IL,{id:t,className:pj(a9),"aria-invalid":d||void 0,children:(0,H.jsx)(FL,{placeholder:o??`Select…`})}),(0,H.jsx)(LL,{children:u.map(e=>(0,H.jsx)(RL,{value:String(e.value),className:`font-mono text-xs`,children:e.label},String(e.value)))})]})}function Vxe(e){let{id:t,value:n,required:r,disabled:i,readonly:a,onChange:o}=e;return(0,H.jsx)(Rxe,{id:t,checked:n===!0,required:r,disabled:i||a,onCheckedChange:e=>o(e===!0)})}function Hxe(e){let{id:t,value:n,disabled:r,readonly:i,options:a,placeholder:o,rawErrors:s,schema:c}=e,l=Uxe(a,c),u=(s?.length??0)>0;return(0,H.jsx)(Wxe,{id:t,value:n,disabled:r||i,placeholder:o??`Select…`,enumOptions:l,hasError:u,onChange:e.onChange})}function Uxe(e,t){let n=e.enumOptions??[];if(n.length>0)return n;let r=t.items,i=(r&&!Array.isArray(r)&&typeof r!=`boolean`?r:void 0)?.enum??t.enum;return Array.isArray(i)?i.map(e=>({value:e,label:String(e)})):[]}function Wxe({id:e,value:t,disabled:n,placeholder:r,enumOptions:i,hasError:a,onChange:o}){let s=Array.isArray(t)?t.filter(e=>e!=null):[],c=i.filter(e=>!s.some(t=>String(t)===String(e.value))),[l,u]=(0,b.useState)(!1),d=(0,b.useRef)(!1);return(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,H.jsxs)(yxe,{open:l,onOpenChange:e=>{if(!e&&d.current){d.current=!1;return}u(e)},value:null,onValueChange:e=>{if(e===null)return;let t=i.find(t=>String(t.value)===e);d.current=!0,o([...s,t?t.value:e])},children:[(0,H.jsx)(bxe,{id:e,disabled:n||c.length===0,placeholder:r,className:pj(a9),"aria-invalid":a||void 0}),(0,H.jsxs)(Sxe,{children:[(0,H.jsx)(Cxe,{placeholder:`Search…`}),(0,H.jsxs)(wxe,{className:`flex flex-col gap-1 py-1`,children:[(0,H.jsx)(Txe,{children:`No results.`}),c.map(e=>(0,H.jsx)(Exe,{itemValue:String(e.value),className:`mx-1 my-0 px-2 py-1 font-mono text-xs`,children:e.label},String(e.value)))]})]})]}),s.length>0&&(0,H.jsx)(`ul`,{className:`flex flex-wrap gap-1`,children:s.map(e=>{let t=i.find(t=>String(t.value)===String(e))?.label??String(e);return(0,H.jsx)(`li`,{children:(0,H.jsxs)(`button`,{type:`button`,onClick:()=>o(s.filter(t=>String(t)!==String(e))),disabled:n,"aria-label":`Remove ${t}`,className:pj(`group inline-flex cursor-pointer items-center gap-1 rounded-md border border-border bg-background px-2 py-0.5`,`font-mono text-xs text-foreground transition-colors`,`hover:bg-muted hover:text-foreground`,`focus-visible:outline-none focus-visible:border-ring focus-visible:border-2`,`disabled:cursor-not-allowed disabled:opacity-50`),children:[(0,H.jsx)(`span`,{children:t}),(0,H.jsx)(Oi,{className:`size-3 text-muted-foreground group-hover:text-foreground`})]})},String(e))})})]})}var Gxe={TextareaWidget:zxe,SelectWidget:Bxe,CheckboxWidget:Vxe,CheckboxesWidget:Hxe},Kxe={ArrayFieldItemTemplate:pxe,ArrayFieldTemplate:fxe,BaseInputTemplate:oxe,DescriptionFieldTemplate:lxe,FieldErrorTemplate:cxe,FieldTemplate:sxe,ObjectFieldTemplate:dxe,TitleFieldTemplate:uxe,ButtonTemplates:gxe},_9={"ui:submitButtonOptions":{norender:!0}};function qxe(e){if(e?.type!==`array`)return!1;let t=e.items;return!t||Array.isArray(t)||typeof t==`boolean`?!1:Array.isArray(t.enum)}function v9(e){if(!(!e||typeof e!=`object`)){if(qxe(e))return{"ui:widget":`checkboxes`};if(e.type===`object`&&e.properties){let t=[];for(let[n,r]of Object.entries(e.properties)){let e=v9(r);e&&t.push([n,e])}return t.length>0?Object.fromEntries(t):void 0}}}function Jxe(e){let t=v9(e);return t?{..._9,...t}:_9}function Yxe({name:e,description:t}){return(0,b.useMemo)(()=>n=>(0,H.jsx)(`form`,{toolname:e,tooldescription:t,toolautosubmit:``,...n}),[e,t])}var Xxe=Object.defineProperty,y9=(e,t)=>Xxe(e,`name`,{value:t,configurable:!0}),b9=[`Enter`,` `],Zxe=[`ArrowDown`,`PageUp`,`Home`],x9=[`ArrowUp`,`PageDown`,`End`],Qxe=[...Zxe,...x9];[...b9],[...b9];var S9=`Menu`,[C9,$xe,eSe]=eL(S9),[w9,T9]=pM(S9,[eSe,FP,Y$]),E9=FP(),D9=Y$(),[tSe,O9]=w9(S9),[nSe,k9]=w9(S9),rSe=y9(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=E9(t),[c,l]=b.useState(null),u=b.useRef(!1),d=_M(a),f=uL(i);return b.useEffect(()=>{let e=y9(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=y9(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),b.useEffect(()=>{if(!n)return;let e=y9(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,H.jsx)(LP,{...s,children:(0,H.jsx)(tSe,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,H.jsx)(nSe,{scope:t,onClose:b.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),iSe=b.forwardRef(y9(function(e,t){let{__scopeMenu:n,...r}=e,i=E9(n);return(0,H.jsx)(RP,{...i,...r,ref:t})},`MenuAnchor`)),A9=`MenuPortal`,[aSe,oSe]=w9(A9,{forceMount:void 0}),sSe=y9(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=O9(A9,t);return(0,H.jsx)(aSe,{scope:t,forceMount:n,children:(0,H.jsx)(KP,{present:n||a.open,children:(0,H.jsx)(UP,{asChild:!0,container:i,children:r})})})},`MenuPortal`),j9=`MenuContent`,[cSe,M9]=w9(j9),lSe=b.forwardRef(y9(function(e,t){let n=oSe(j9,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=O9(j9,e.__scopeMenu),o=k9(j9,e.__scopeMenu);return(0,H.jsx)(C9.Provider,{scope:e.__scopeMenu,children:(0,H.jsx)(KP,{present:r||a.open,children:(0,H.jsx)(C9.Slot,{scope:e.__scopeMenu,children:o.modal?(0,H.jsx)(uSe,{...i,ref:t}):(0,H.jsx)(dSe,{...i,ref:t})})})})},`MenuContent`)),uSe=b.forwardRef(y9(function(e,t){let n=O9(j9,e.__scopeMenu),r=b.useRef(null),i=Ii(t,r);return b.useEffect(()=>{let e=r.current;if(e)return dF(e)},[]),(0,H.jsx)(N9,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:aM(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),dSe=b.forwardRef(y9(function(e,t){let n=O9(j9,e.__scopeMenu);return(0,H.jsx)(N9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),fSe=Hi(`MenuContent.ScrollLock`),N9=b.forwardRef(y9(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=O9(j9,n),_=k9(j9,n),v=E9(n),y=D9(n),x=$xe(n),[S,C]=b.useState(null),w=b.useRef(null),T=Ii(t,w,g.onContentChange),E=b.useRef(0),D=b.useRef(``),O=b.useRef(0),k=b.useRef(null),A=b.useRef(`right`),j=b.useRef(0),M=m?zF:b.Fragment,N=m?{as:fSe,allowPinchZoom:!0}:void 0,P=y9(e=>{let t=D.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=B9(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;y9((function e(t){D.current=t,window.clearTimeout(E.current),t!==``&&(E.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);b.useEffect(()=>()=>window.clearTimeout(E.current),[]),LM();let F=b.useCallback(e=>A.current===k.current?.side&&H9(e,k.current?.area),[]);return(0,H.jsx)(cSe,{scope:n,searchRef:D,onItemEnter:b.useCallback(e=>{F(e)&&e.preventDefault()},[F]),onItemLeave:b.useCallback(e=>{F(e)||(w.current?.focus(),C(null))},[F]),onTriggerLeave:b.useCallback(e=>{F(e)&&e.preventDefault()},[F]),pointerGraceTimerRef:O,onPointerGraceIntentChange:b.useCallback(e=>{k.current=e},[]),children:(0,H.jsx)(M,{...N,children:(0,H.jsx)(WM,{asChild:!0,trapped:i,onMountAutoFocus:aM(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,H.jsx)(TM,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,H.jsx)(Rde,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:aM(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,H.jsx)(BP,{role:`menu`,"aria-orientation":`vertical`,"data-state":I9(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:T,style:{outline:`none`,...h.style},onKeyDown:aM(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&P(e.key));let i=w.current;if(e.target!==i||!Qxe.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled).map(e=>e.ref.current);x9.includes(e.key)&&a.reverse(),R9(a)}),onBlur:aM(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),D.current=``)}),onPointerMove:aM(e.onPointerMove,U9(e=>{let t=e.target,n=j.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>j.current?`right`:`left`;A.current=t,j.current=e.clientX}}))})})})})})})},`MenuContentImpl`)),P9=`MenuItem`,F9=`menu.itemSelect`,pSe=b.forwardRef(y9(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=b.useRef(null),o=k9(P9,e.__scopeMenu),s=M9(P9,e.__scopeMenu),c=Ii(t,a),l=b.useRef(!1),u=y9(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(F9,{bubbles:!0,cancelable:!0});e.addEventListener(F9,e=>r?.(e),{once:!0}),Bj(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,H.jsx)(mSe,{...i,ref:c,disabled:n,onClick:aM(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:aM(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:aM(e.onKeyDown,e=>{n||e.target!==e.currentTarget||s.searchRef.current!==``&&e.key===` `||b9.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),mSe=b.forwardRef(y9(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=M9(P9,n),s=D9(n),c=b.useRef(null),l=Ii(t,c),[u,d]=b.useState(!1),[f,p]=b.useState(``);return b.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,H.jsx)(C9.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,H.jsx)(Vde,{asChild:!0,...s,focusable:!r,children:(0,H.jsx)(zj.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:aM(e.onPointerMove,U9(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:aM(e.onPointerLeave,U9(e=>o.onItemLeave(e))),onFocus:aM(e.onFocus,()=>d(!0)),onBlur:aM(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[hSe,gSe]=w9(`MenuRadioGroup`,{value:void 0,onValueChange:y9(()=>{},`onValueChange`)}),[_Se,vSe]=w9(`MenuItemIndicator`,{checked:!1}),[ySe,bSe]=w9(`MenuSub`);function I9(e){return e?`open`:`closed`}y9(I9,`getOpenState`);function L9(e){return e===`indeterminate`}y9(L9,`isIndeterminate`);function xSe(e){return L9(e)?`indeterminate`:e?`checked`:`unchecked`}y9(xSe,`getCheckedState`);function R9(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}y9(R9,`focusFirst`);function z9(e,t){return e.map((n,r)=>e[(t+r)%e.length])}y9(z9,`wrapArray`);function B9(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=z9(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}y9(B9,`getNextMatch`);function V9(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}y9(V9,`isPointInPolygon`);function H9(e,t){return t?V9({x:e.clientX,y:e.clientY},t):!1}y9(H9,`isPointerInGraceArea`);function U9(e){return t=>t.pointerType===`mouse`?e(t):void 0}y9(U9,`whenMouse`);var SSe=Object.defineProperty,W9=(e,t)=>SSe(e,`name`,{value:t,configurable:!0}),G9=`DropdownMenu`,[CSe,wSe]=pM(G9,[T9]),K9=T9(),[TSe,q9]=CSe(G9),ESe=W9(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=K9(t),l=b.useRef(null),[u,d]=nF({prop:i,defaultProp:a??!1,onChange:o,caller:G9});return(0,H.jsx)(TSe,{scope:t,triggerId:oN(),triggerRef:l,contentId:oN(),open:u,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,H.jsx)(rSe,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),DSe=`DropdownMenuTrigger`,OSe=b.forwardRef(W9(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=q9(DSe,n),o=K9(n),s=Ii(t,a.triggerRef);return(0,H.jsx)(iSe,{asChild:!0,...o,children:(0,H.jsx)(zj.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:aM(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:aM(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),kSe=W9(e=>{let{__scopeDropdownMenu:t,...n}=e,r=K9(t);return(0,H.jsx)(sSe,{...r,...n})},`DropdownMenuPortal`),ASe=`DropdownMenuContent`,jSe=b.forwardRef(W9(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=q9(ASe,n),a=K9(n),o=b.useRef(!1);return(0,H.jsx)(lSe,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:aM(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:aM(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),MSe=b.forwardRef(W9(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=K9(n);return(0,H.jsx)(pSe,{...i,...r,ref:t})},`DropdownMenuItem`));function NSe({...e}){return(0,H.jsx)(ESe,{"data-slot":`dropdown-menu`,...e})}function PSe({...e}){return(0,H.jsx)(OSe,{"data-slot":`dropdown-menu-trigger`,...e})}function FSe({className:e,sideOffset:t=4,...n}){return(0,H.jsx)(kSe,{children:(0,H.jsx)(jSe,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:Mr(`bg-popover text-popover-foreground`,`z-50 min-w-60 overflow-x-hidden overflow-y-auto rounded-md border border-border-secondary py-1 shadow-lg`,`max-h-(--radix-dropdown-menu-content-available-height)`,`origin-(--radix-dropdown-menu-content-transform-origin)`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=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`,e),...n})})}var ISe=ji([`relative flex cursor-default items-center gap-2 rounded-sm px-2.5 py-2 outline-hidden select-none`,`type-text-sm font-semibold`,`mx-1.5 my-px`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`].join(` `),{variants:{variant:{default:[`text-muted-foreground`,`[&_svg:not([class*='text-'])]:text-muted-foreground`,`[@media(hover:hover)]:hover:bg-background-hover [@media(hover:hover)]:hover:text-muted-foreground-hover`,`focus:bg-background-hover focus:text-muted-foreground-hover`].join(` `),destructive:[`text-destructive`,`[&_svg]:!text-destructive`,`[@media(hover:hover)]:hover:bg-destructive/10 dark:[@media(hover:hover)]:hover:bg-destructive/20`,`focus:bg-destructive/10 dark:focus:bg-destructive/20`].join(` `)}},defaultVariants:{variant:`default`}});function J9({className:e,inset:t,variant:n=`default`,...r}){return(0,H.jsx)(MSe,{"data-slot":`dropdown-menu-item`,"data-inset":t,className:Mr(ISe({variant:n}),t&&`pl-8`,e),...r})}function Y9({inputs:e,activeKey:t,onSelect:n,onClear:r,onDelete:i}){let a=t??`Input`;return(0,H.jsxs)(NSe,{children:[(0,H.jsx)(PSe,{asChild:!0,children:(0,H.jsxs)(`button`,{type:`button`,className:`inline-flex cursor-pointer items-center gap-1 rounded px-1 py-0.5 font-mono text-xs text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring aria-expanded:text-foreground`,children:[(0,H.jsx)(`span`,{children:a.length>12?`${a.slice(0,12)}…`:a}),(0,H.jsx)(qr,{className:`size-3 shrink-0`})]})}),(0,H.jsx)(FSe,{align:`start`,className:`min-w-48`,children:e.length===0?(0,H.jsx)(J9,{disabled:!0,className:`font-mono text-xs font-normal text-muted-foreground`,children:`No saved input yet`}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(J9,{onSelect:r,className:`cursor-pointer font-mono text-xs font-normal`,disabled:e.length<=0,children:[e.length>0&&(0,H.jsx)(Kr,{className:pj(`size-3.5 shrink-0`,t===null?`opacity-100`:`opacity-0`)}),(0,H.jsx)(`span`,{className:`text-muted-foreground italic`,children:e.length>0?`none`:`no saved input yet`})]}),e.map(e=>(0,H.jsxs)(`div`,{className:`group/item relative`,children:[(0,H.jsxs)(J9,{onSelect:()=>e.key===t?r():n(e),className:`cursor-pointer pr-8 font-mono text-xs font-normal`,children:[(0,H.jsx)(Kr,{className:pj(`size-3.5 shrink-0`,e.key===t?`opacity-100`:`opacity-0`)}),(0,H.jsx)(`span`,{className:`truncate`,children:e.key})]}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Delete saved input ${e.key}`,onClick:()=>i(e.key),className:`absolute top-1/2 right-2.5 inline-flex -translate-y-1/2 cursor-pointer rounded p-1 text-light-gray-foreground opacity-0 transition-opacity hover:text-destructive focus-visible:opacity-100 group-hover/item:opacity-100`,children:(0,H.jsx)(Ti,{className:`size-3.5`})})]},e.key))]})})]})}function LSe({open:e,onOpenChange:t,defaultKey:n,existingKeys:r,onSave:i}){let a=(0,b.useId)(),[o,s]=(0,b.useState)(n),c=o.trim(),l=c.length>0&&r.includes(c);return(0,b.useEffect)(()=>{e&&s(n)},[e,n]),(0,H.jsx)(vI,{open:e,onOpenChange:t,children:(0,H.jsxs)(yI,{children:[(0,H.jsxs)(bI,{children:[(0,H.jsx)(SI,{children:`Save input`}),(0,H.jsx)(CI,{children:`Save the current values to reuse it later.`})]}),(0,H.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),c&&(i(c),t(!1))},className:`space-y-3`,children:[(0,H.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,H.jsx)(YI,{htmlFor:a,children:`Name`}),(0,H.jsx)(XI,{id:a,value:o,onChange:e=>s(e.target.value),placeholder:`e.g. happy path`,autoFocus:!0}),l&&(0,H.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`An input named "`,c,`" already exists: it will be overwritten.`]})]}),(0,H.jsxs)(xI,{children:[(0,H.jsx)(ra,{type:`button`,variant:`secondary`,onClick:()=>t(!1),children:`Cancel`}),(0,H.jsx)(ra,{type:`submit`,variant:`primary`,disabled:!c,children:l?`Overwrite`:`Save`})]})]})]})})}function RSe({tool:e}){let{mutateAsync:t,isPending:n}=KO(),[r,i]=OO(),a=r===e.name,o=us(e=>e.isSignedIn),s=us(e=>e.requiresAuth),c=(0,b.useRef)(null),l=hO(e.name),u=!!l?.response,{setToolData:d}=mO(),f=l?.input??{},p=t=>{d(e.name,{input:t??{}})},m=HSe(e,f),h=s&&LO(e)&&!o,[g,_]=(0,b.useState)(`form`),[v,y]=(0,b.useState)(!1),x=(0,b.useMemo)(()=>{let t=e.inputSchema;return!t?.properties||Object.keys(t.properties).length===0?!1:g===`json`&&v?!0:a5.validateFormData(f,t).errors.length>0},[e.inputSchema,g,v,f]),S=async()=>{if(h)return;let n=e.inputSchema,r=!n?.properties||Object.keys(n.properties).length===0;if(!(g===`json`&&v)){if(!r){let{errors:e}=a5.validateFormData(f,n);if(e.length>0){g===`form`?c.current?.validateForm():y(!0);return}}return i(e.name),await t({toolName:e.name,args:f})}},C=t=>{let n=t.target;return!n||n.closest(`[role=dialog]`)?!1:n.closest(`[data-tool-name]`)?.getAttribute(`data-tool-name`)===e.name};eH(`meta.enter`,e=>{C(e)&&S()}),eH(`enter`,e=>{C(e)&&e.target?.tagName!==`TEXTAREA`&&(e.preventDefault(),S())},{exactMatch:!0});let w=null;h?w=`Sign in to call this tool`:x&&(w=`Input is not valid`);let T=(0,H.jsx)(ra,{disabled:n||h||x,variant:`primary`,className:`disabled:cursor-not-allowed disabled:pointer-events-auto disabled:opacity-100`,onClick:S,icon:n?(0,H.jsx)(ii,{className:`size-3 animate-spin`}):(0,H.jsx)(mi,{className:`size-3`}),children:`Run`});return(0,H.jsxs)(Ode,{value:e.name,"data-tool-name":e.name,className:pj(`border-b border-l-[5px] border-border transition-colors last:border-b-0 data-[state=closed]:hover:bg-muted/40`,a&&`border-l-cyan-400`),children:[(0,H.jsx)(rxe,{onClick:u?()=>i(e.name):void 0,className:pj(`font-mono text-xs font-normal text-foreground`,`no-underline`),action:(0,H.jsxs)(`div`,{className:pj(`flex items-center gap-1.5 transition-opacity hover:opacity-100`,a?`opacity-100`:`opacity-50`),children:[m.savedInputs.length>0&&(0,H.jsx)(Y9,{inputs:m.savedInputs,activeKey:m.activeKey,onSelect:m.loadInput,onClear:m.clearSelection,onDelete:m.removeInput}),w?(0,H.jsxs)(KI,{children:[(0,H.jsx)(qI,{asChild:!0,children:(0,H.jsx)(`span`,{className:`inline-flex`,children:T})}),(0,H.jsx)(JI,{children:w})]}):T]}),children:(0,H.jsx)(`div`,{className:`min-w-0 flex-1 truncate text-left text-sm font-medium`,children:e.name})}),e.description?(0,H.jsx)(`div`,{className:`px-4 pb-3 font-sans`,children:(0,H.jsx)(VSe,{name:e.name,description:e.description})}):null,(0,H.jsx)(kde,{className:`px-4 pt-0 pb-3 text-foreground`,style:{animation:`none`},children:(0,H.jsx)(USe,{tool:e,formData:f,setFormData:p,formRef:c,tab:g,setTab:_,jsonError:v,setJsonError:y,saved:m,inputInvalid:x,onRun:S})})]})}var X9={model:{badgeClass:`border-blue-200 bg-blue-100 text-blue-700`,tooltip:`Visible to and callable by the agent.`},app:{badgeClass:`border-purple-200 bg-purple-100 text-purple-700`,tooltip:`Callable by the widget on this server only.`}};function zSe(e){let t=e._meta,n=t?.ui?.visibility,r=t?.[`openai/visibility`],i=n??r;if(!Array.isArray(i))return;let a=i.filter(e=>e===`model`||e===`app`);return a.length>0?a:void 0}function BSe(e,t){let n=t.inputSchema?.properties??{};return Object.fromEntries(Object.entries(e).filter(([e])=>e in n))}function VSe({name:e,description:t}){return(0,H.jsx)(`div`,{className:`rounded-md border border-border bg-muted/40 px-2.5 py-2`,children:(0,H.jsx)(i9,{text:t,title:e,className:`text-xs text-muted-foreground/70`})})}function HSe(e,t){let n=GO()?.name,r=nxe(n,e.name),i=r9(e=>e.saveInput),a=r9(e=>e.updateInput),o=r9(e=>e.deleteInput),s=mO(e=>e.setToolData),c=hO(e.name)?.activeSavedInputKey??null;return{serverName:n,savedInputs:r,activeKey:c&&r.find(e=>e.key===c)?c:null,loadInput:t=>{s(e.name,{input:BSe(t.input,e),activeSavedInputKey:t.key})},clearSelection:()=>{s(e.name,{input:{},activeSavedInputKey:null})},saveFromModal:o=>{n&&(r.some(e=>e.key===o)?a(n,e.name,o,t):i(n,e.name,o,t),s(e.name,{activeSavedInputKey:o}))},removeInput:t=>{n&&(o(n,e.name,t),t===c&&s(e.name,{activeSavedInputKey:null}))}}}function USe({tool:e,formData:t,setFormData:n,formRef:r,tab:i,setTab:a,jsonError:o,setJsonError:s,saved:c,inputInvalid:l,onRun:u}){let d=e.inputSchema&&Object.keys(e.inputSchema.properties??{}).length>0;txe({tool:e,enabled:!d,execute:async()=>await u()??{content:[{type:`text`,text:`The tool call was not executed.`}],isError:!0}});let f=zSe(e),[p,m]=(0,b.useState)(!1),{serverName:h,savedInputs:g,activeKey:_}=c,v=(0,H.jsx)(`button`,{type:`button`,onClick:()=>m(!0),disabled:l,title:l?void 0:`Save input`,"aria-label":`Save input`,className:pj(`shrink-0 cursor-pointer text-light-gray-foreground transition-colors hover:text-foreground`,`disabled:cursor-not-allowed disabled:pointer-events-auto disabled:hover:text-light-gray-foreground`),children:(0,H.jsx)(vi,{className:`size-3.5`})});return(0,H.jsxs)(`div`,{className:`space-y-3`,children:[f&&(0,H.jsx)(`div`,{"data-testid":`tool-visibility`,className:`flex flex-wrap gap-1`,children:f.map(e=>(0,H.jsxs)(KI,{children:[(0,H.jsx)(qI,{asChild:!0,children:(0,H.jsx)(aH,{size:`sm`,className:X9[e].badgeClass,children:e})}),(0,H.jsx)(PI,{children:(0,H.jsxs)(II,{sideOffset:6,className:pj(`z-50 w-fit rounded-md border border-border bg-background px-3 py-2 text-xs text-foreground shadow-md`,`animate-in fade-in-0 zoom-in-95`,`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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`),children:[X9[e].tooltip,(0,H.jsx)(RI,{width:11,height:5,className:`fill-background drop-shadow-[0_1px_0_var(--color-border)]`})]})})]},e))}),d&&(0,H.jsxs)(Zde,{value:i,onValueChange:e=>a(e),children:[(0,H.jsxs)(`div`,{className:`flex items-end justify-between gap-2 border-b border-border`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1 pb-1.5`,children:[h&&(l?(0,H.jsxs)(KI,{children:[(0,H.jsx)(qI,{asChild:!0,children:(0,H.jsx)(`span`,{className:`inline-flex`,children:v})}),(0,H.jsx)(JI,{children:`Input is not valid`})]}):v),h?(0,H.jsx)(Y9,{inputs:g,activeKey:_,onSelect:c.loadInput,onClear:c.clearSelection,onDelete:c.removeInput}):(0,H.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Input`})]}),(0,H.jsx)(`div`,{className:`-mb-px flex`,children:[`form`,`json`].map((e,t)=>{let n=e===`form`?Xr:Gr;return(0,H.jsxs)(`button`,{type:`button`,onClick:()=>a(e),className:pj(`relative inline-flex h-7 cursor-pointer items-center gap-1.5 border border-border px-2 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring`,t===0?`rounded-tl-md`:`-ml-px rounded-tr-md`,i===e?`z-10 border-b-background bg-background text-foreground`:`bg-muted/40 text-light-gray-foreground hover:text-foreground`),children:[(0,H.jsx)(n,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:e})]},e)})})]}),(0,H.jsx)(i1,{value:`form`,children:(0,H.jsx)(WSe,{tool:e,formData:t,setFormData:n,formRef:r,onRun:u})}),(0,H.jsx)(i1,{value:`json`,className:`-mt-4`,children:(0,H.jsx)(GSe,{formData:t,setFormData:n,error:o,setError:s})})]}),d&&h&&(0,H.jsx)(LSe,{open:p,onOpenChange:m,defaultKey:_??``,existingKeys:g.map(e=>e.key),onSave:c.saveFromModal})]})}function WSe({tool:e,formData:t,setFormData:n,formRef:r,onRun:i}){let a=e.inputSchema,o=(0,b.useRef)(null);return(0,b.useEffect)(()=>{let e=o.current;if(!e)return;let t=e.querySelector(`input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]), textarea`);t&&!t.value&&t.focus({preventScroll:!0})},[]),(0,H.jsx)(`div`,{ref:o,children:(0,H.jsx)(exe,{ref:r,tagName:Yxe(e),idPrefix:e.name,schema:a,validator:a5,uiSchema:Jxe(a),formData:t,onChange:e=>n(e.formData),onSubmit:(e,t)=>{let n=t.nativeEvent,r=i();n instanceof SubmitEvent&&typeof n.respondWith==`function`&&n.respondWith(r)},showErrorList:!1,widgets:Gxe,templates:Kxe})})}function GSe({formData:e,setFormData:t,error:n,setError:r}){let[i,a]=(0,b.useState)(JSON.stringify(e,null,2)),o=(0,b.useRef)(!1);(0,b.useEffect)(()=>{if(o.current){o.current=!1;return}a(JSON.stringify(e,null,2))},[e]);let s=e=>{a(e);try{let n=JSON.parse(e);o.current=!0,t(n),r(!1)}catch{r(!0)}};return(0,H.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(`textarea`,{className:pj(`max-h-80 min-h-20 w-full resize-none overflow-auto rounded-b-md border border-t-0 p-2 pr-9 font-mono text-xs field-sizing-content`,n?`border-destructive`:`border-border`),spellCheck:!1,value:i,onChange:e=>s(e.target.value)}),(0,H.jsx)(Sj,{value:i,label:`Copy input`,className:`absolute top-2 right-2 z-10`})]}),n&&(0,H.jsx)(`div`,{className:`text-xs text-destructive`,children:`The provided JSON is invalid`})]})}function KSe(){let e=WO(),[t,n]=(0,b.useState)(e.length>0?[e[0].name]:[]),[r,i]=(0,b.useState)(!1),[a,o]=(0,b.useState)(void 0);return rH(()=>{i(!1),o(void 0)},a),(0,H.jsxs)(`div`,{className:`grid h-full min-h-0 grid-rows-[auto_1fr]`,children:[(0,H.jsxs)(`header`,{className:`flex h-9 items-center justify-between border-b border-border pl-4 pr-0`,children:[(0,H.jsx)(`span`,{className:`text-sm font-medium`,children:`Tools`}),(0,H.jsx)(ra,{onClick:async()=>{o(void 0),i(!0);try{await AO.invalidateQueries({queryKey:[`list-tools`]})}finally{o(600)}},"aria-label":`Refresh tools`,variant:`tertiary`,size:`icon`,children:(0,H.jsx)(_i,{className:pj(`size-3.5`,r&&`animate-spin`)})})]}),(0,H.jsx)(Dde,{type:`multiple`,value:t,onValueChange:n,className:`min-h-0 overflow-y-auto`,children:e.map(e=>(0,H.jsx)(RSe,{tool:e},e.name))})]})}var Z9=`devtools-tools-split`,Q9=`tools-list`,$9=`tool-panel`;function qSe(){let{status:e,requiresAuth:t}=us(),n=hs(e=>e.previewClient),[r]=kO(),i=e===`authenticated`,{defaultLayout:a,onLayoutChanged:o}=Xo({id:Z9,panelIds:[Q9,$9],storage:localStorage});return(0,H.jsxs)(`div`,{className:`grid h-screen grid-rows-[auto_1fr] overflow-hidden bg-background text-foreground`,children:[(0,H.jsx)(Nle,{}),r?(0,H.jsx)(Ij,{}):i&&n?(0,H.jsx)(b.Suspense,{fallback:null,children:(0,H.jsx)(kV,{})}):i?(0,H.jsx)(`div`,{id:`devtools-card-body`,className:`relative flex min-h-0 min-w-0 flex-1`,children:(0,H.jsxs)(qo,{orientation:`horizontal`,id:Z9,className:`flex min-h-0 min-w-0 flex-1`,defaultLayout:a,onLayoutChanged:o,children:[(0,H.jsx)(es,{id:Q9,defaultSize:380,minSize:250,maxSize:510,className:`min-h-0 min-w-0`,children:(0,H.jsx)(`aside`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,children:(0,H.jsx)(b.Suspense,{fallback:null,children:(0,H.jsx)(KSe,{})})})}),(0,H.jsx)(rs,{className:`w-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`}),(0,H.jsx)(es,{id:$9,minSize:320,className:`min-h-0 min-w-0`,children:(0,H.jsx)(`main`,{className:`flex h-full min-h-0 min-w-0 flex-col overflow-hidden`,children:(0,H.jsx)(b.Suspense,{fallback:null,children:(0,H.jsx)(ede,{})})})})]})}):(0,H.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,H.jsxs)(`div`,{className:`space-y-4 text-center`,children:[(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e===`connecting`?`Connecting to server...`:t?`Authentication required to access this server.`:`Not connected to a server.`}),e!==`connecting`&&(0,H.jsxs)(ra,{variant:`secondary`,onClick:zO,children:[(0,H.jsx)(hi,{className:`size-3.5`}),`Connect`]})]})})]})}var JSe=()=>{let e=GO();(0,b.useEffect)(()=>{e?.name&&(document.title=`${e.name} · Skybridge`)},[e?.name])};function YSe(){return jse(),kse(),JSe(),(0,H.jsx)(Ke,{client:AO,children:(0,H.jsx)(en,{children:(0,H.jsx)(qSe,{})})})}async function XSe(){let e=new URLSearchParams(window.location.search);if(e.get(`oauth_callback`)===`true`){let t=e.get(`code`),n=e.get(`iss`)??void 0,r=e.get(`state`)??void 0,i=e.get(`error`),a=e.get(`error_description`),o=new URL(window.location.href);for(let e of[`oauth_callback`,`code`,`state`,`iss`,`error`,`error_description`,`error_uri`])o.searchParams.delete(e);if(window.history.replaceState({},``,o.toString()),i)us.getState().setStatus(`error`),us.getState().setError(a?`${i}: ${a}`:i);else if(t)try{await VO(t,n,r)}catch(e){console.error(`OAuth callback failed:`,e),us.getState().setStatus(`error`),us.getState().setError(e instanceof Error?e.message:`OAuth callback failed`)}else us.getState().setStatus(`error`),us.getState().setError(`OAuth callback missing authorization code`)}else zO().catch(e=>{console.error(`Connection failed:`,e)})}XSe(),(0,x.createRoot)(document.getElementById(`root`)).render((0,H.jsx)(b.StrictMode,{children:(0,H.jsx)(YSe,{})}));