@skybridge/devtools 0.0.0-dev.850d563 → 0.0.0-dev.851103c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alpic-sdk.d.ts +2 -0
- package/dist/alpic-sdk.js +3 -0
- package/dist/alpic-sdk.js.map +1 -0
- package/dist/assets/index-DM553uZe.js +292 -0
- package/dist/assets/index-jMazmqbM.css +2 -0
- package/dist/deploy-router.d.ts +7 -0
- package/dist/deploy-router.js +206 -0
- package/dist/deploy-router.js.map +1 -0
- package/dist/devtoolsStaticServer.d.ts +2 -2
- package/dist/devtoolsStaticServer.js +20 -2
- package/dist/devtoolsStaticServer.js.map +1 -1
- package/dist/favicon.ico +0 -0
- package/dist/index.html +2 -2
- package/dist/skybridge.svg +16 -0
- package/package.json +52 -36
- package/dist/assets/index-CWkFioVY.css +0 -1
- package/dist/assets/index-udOkJZ-2.js +0 -182
- package/dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
|
@@ -0,0 +1,292 @@
|
|
|
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(U(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},U(e)?Is(t,n):(n=Qr(e,t,n,r),n!==null&&(Su(n,e,r),Ls(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(U(e))Is(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),Ls(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},U(e)){if(t)throw Error(i(479))}else t=Qr(e,n,r,2),t!==null&&Su(t,e,2)}function U(e){var t=e.alternate;return e===uo||t!==null&&t===uo}function Is(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 Ls(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),W(e,r);else if(Pp(i,e,t,n,r))r.stopPropagation();else if(W(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 W(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 Np(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 Pp(e,t,n,r,i){switch(t){case`focusin`:return Ep=Np(Ep,e,t,n,r,i),!0;case`dragenter`:return Dp=Np(Dp,e,t,n,r,i),!0;case`mouseover`:return Op=Np(Op,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return kp.set(a,Np(kp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Ap.set(a,Np(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(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Xr=Hr(`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`}]]),Zr=Hr(`circle-plus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),Qr=Hr(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),$r=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`}]]),ei=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`}]]),ti=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`}]]),ni=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`}]]),ri=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`}]]),ii=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`}]]),ai=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`}]]),oi=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`}]]),si=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`}]]),ci=Hr(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),li=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`}]]),ui=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`}]]),di=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`}]]),fi=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`}]]),pi=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`}]]),mi=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`}]]),hi=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`}]]),gi=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`}]]),_i=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`}]]),vi=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`}]]),yi=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`}]]),bi=Hr(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),xi=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`}]]),Si=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`}]]),Ci=Hr(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),wi=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`}]]),Ti=Hr(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),Ei=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`}]]),Di=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`}]]),Oi=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`}]]),ki=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`}]]),Ai=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`}]]),ji=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`}]]),Mi=Hr(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ni=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Pi=nn,Fi=(e,t)=>n=>{if(t?.variants==null)return Pi(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=Ni(t)||Ni(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 Pi(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)};function Ii(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Li(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ii(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():Ii(e[t],null)}}}}function Ri(...e){return b.useCallback(Li(...e),e)}function zi(e){let t=b.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Yi(r)&&typeof $i==`function`&&(r=$i(r._payload)),b.Children.forEach(r,e=>{if(qi(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Yi(n)&&typeof $i==`function`&&(n=$i(n._payload)),a=Wi(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?Ki(a):void 0,l=Ri(n,c);if(!a){if(r||r===0)throw Error(o?Qi(e):Zi(e));return r}let u=Gi(i,a.props??{});return a.type!==b.Fragment&&(u.ref=n?l:c),b.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var Bi=zi(`Slot`),Vi=Symbol.for(`radix.slottable`);function Hi(e){let t=e=>`child`in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=Vi,t}var Ui=Hi(`Slottable`),Wi=(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 Gi(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 Ki(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 qi(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Vi}var Ji=Symbol.for(`react.lazy`);function Yi(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Ji&&`_payload`in e&&Xi(e._payload)}function Xi(e){return typeof e==`object`&&!!e&&`then`in e}var Zi=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Qi=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,$i=b.use,ea=Fi([`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 ta({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?Bi:`button`,{"data-slot":`button`,className:Mr(ea({variant:t,size:n}),e),type:r,disabled:c||a,"aria-busy":a||void 0,...u,children:[a?(0,H.jsx)(ci,{className:`motion-safe:animate-spin`}):o,i?(0,H.jsx)(Ui,{children:l}):l,!a&&s?(0,H.jsx)(`span`,{"data-cta-icon-trailing":!0,children:s}):null]})}function na(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function ra(e,t){let n=getComputedStyle(e.ownerDocument.documentElement);return t*parseFloat(n.fontSize)}function ia(e){return e/100*window.innerHeight}function aa(e){return e/100*window.innerWidth}function oa(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 sa({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=oa(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=ra(t,i);break;case`em`:r=na(t,i);break;case`vh`:r=ia(i);break;case`vw`:r=aa(i);break}return r}function ca(e){return parseFloat(e.toFixed(3))}function la({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 ua(e){let{panels:t}=e,n=la({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=ca(sa({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize!==void 0&&(a=ca(sa({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize!==void 0&&(o=ca(sa({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize!==void 0&&(s=ca(sa({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 da(e,t=`Assertion error`){if(!e)throw Error(t)}function fa(e,t){return Array.from(t).sort(e===`horizontal`?pa:ma)}function pa(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function ma(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function ha(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function ga(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 _a({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}=ga(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return da(i,`No rect found`),i}var va;function ya(){return va===void 0&&(va=typeof matchMedia==`function`&&!!matchMedia(`(pointer:coarse)`).matches),va}function ba(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=fa(n,Array.from(t.children).filter(ha).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,_a({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=ya()?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:la({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 xa=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)}}},Sa={cursorFlags:0,state:`inactive`},Ca=new xa;function wa(){return Sa}function Ta(e){return Ca.addListener(`change`,e)}function Ea(e){let t=Sa,n={...Sa};n.cursorFlags=e,Sa=n,Ca.emit(`change`,{prev:t,next:n})}function Da(e){let t=Sa;Sa=e,Ca.emit(`change`,{prev:t,next:e})}var Oa=e=>e,ka=()=>{},Aa=1,ja=2,Ma=4,Na=8,Pa=3,Fa=12,Ia;function La(){return Ia===void 0&&(Ia=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(Ia=!0)),Ia}function Ra({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&&La()){let t=(e&Aa)!==0,n=(e&ja)!==0,r=(e&Ma)!==0,i=(e&Na)!==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 La()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var za=new WeakMap;function Ba(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=za.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=wa();switch(r.state){case`active`:case`hover`:{let e=Ra({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}za.set(e,{prevStyle:t,styleSheet:n})}var Va=new Map,Ha=new xa;function Ua(e){Va=new Map(Va),Va.delete(e)}function Wa(e,t){for(let[t]of Va)if(t.id===e)return t}function Ga(e,t){for(let[t,n]of Va)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Ka(){return Va}function qa(e,t){return Ha.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function Ja(e,t,n){let r=Va.get(e);Va=new Map(Va),Va.set(e,t),Ha.emit(`groupChange`,{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:r,next:t})}function Ya(e){let t=wa(),n=!1;switch(t.state){case`active`:Da({cursorFlags:0,state:`inactive`}),t.hitRegions.length>0&&(Ba(e),n=!0,t.hitRegions.forEach(e=>{let t=Ga(e.group.id,!0);Ja(e.group,t,{isUserInteraction:!0})}))}return n}function Xa(e){e.defaultPrevented||Ya(e.currentTarget)}function Za(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=ga(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 Qa(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function $a(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:ao(e),b:ao(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();da(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:io(ro(n.a)),b:io(ro(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 eo=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function to(e){let t=getComputedStyle(oo(e)??e).display;return t===`flex`||t===`inline-flex`}function no(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||to(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`||eo.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function ro(e){let t=e.length;for(;t--;){let n=e[t];if(da(n,`Missing node`),no(n))return n}return null}function io(e){return e&&Number(getComputedStyle(e).zIndex)||0}function ao(e){let t=[];for(;e;)t.push(e),e=oo(e);return t}function oo(e){let{parentNode:t}=e;return Qa(t)?t.host:t}function so(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 co({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!ha(n)||n.contains(e)||e.contains(n))return!0;if($a(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(so(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function lo(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=ba(r),a=Za(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&co({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function uo(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 fo(e,t,n=0){return Math.abs(ca(e)-ca(t))<=n}function po(e,t){return fo(e,t)?0:e>t?1:-1}function mo({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(po(r,c)<0)if(a){let e=(i+c)/2;r=po(r,e)<0?i:c}else r=c;return r=Math.min(s,r),r=ca(r),r}function ho({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(fo(e,0))return t;let o=a===`imperative-api`,s=Object.values(t),c=Object.values(i),l=[...s],[u,d]=r;da(u!=null,`Invalid first pivot index`),da(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];da(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(da(n!=null,`Previous layout not found for panel index ${t}`),fo(n,i)){let t=o-n;po(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];da(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(da(n!=null,`Previous layout not found for panel index ${t}`),fo(n,o)){let t=n-i;po(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];da(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsible:a,collapsedSize:o,minSize:c}=r;if(a&&po(i,c)<0)if(e>0){let t=c-o,n=t/2;po(i+e,c)<0&&(e=po(e,n)<=0?0:t)}else{let t=c-o,n=100-t/2;po(i-e,c)<0&&(e=po(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];da(e!=null,`Previous layout not found for panel index ${r}`);let a=mo({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];da(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=mo({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!fo(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(uo(c,l))return i;{let t=e<0?d:u,r=s[t];da(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=mo({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!fo(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];da(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=mo({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(fo(i,s)||(t-=s-i,l[r]=s),fo(t,0))break;e>0?r--:r++}}}if(!fo(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 go(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||po(e[n],t[n])!==0)return!1;return!0}function _o({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(!fo(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];da(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];da(i!=null,`No layout data found for index ${e}`);let o=r[e];da(o!=null,`No layout data found for index ${e}`);let s=mo({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!fo(a,0))for(let e=0;e<t.length;e++){let n=r[e];da(n!=null,`No layout data found for index ${e}`);let i=n+a,o=mo({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,fo(a,0)))break}let o=Object.keys(e);return r.reduce((e,t,n)=>(e[o[n]]=t,e),{})}function vo({groupId:e,panelId:t}){let n=()=>{let t=Ka();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&&fo(n.collapsedSize,r[n.panelId])}))){let e=n.slice(0,s).reduce((e,t)=>e+r[t.id],0);return{...r,[t]:ca(100-e)}}return ho({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=_o({layout:o({nextSize:e,panels:i.panels,prevLayout:c,derivedPanelConstraints:r}),panelConstraints:r});go(c,u)||Ja(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&&fo(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=la({group:t}),o=ca(sa({groupSize:a,panelElement:r,styleProp:e})/a*100);s(o)}}}function yo(e){e.defaultPrevented||lo(e,Ka()).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=vo({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function bo(e){let t=Ka();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 xo({groupId:e}){let t=()=>{let t=Ka();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=_o({layout:e,panelConstraints:r});return n?o:(go(o,c)||Ja(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function So(e,t){let n=bo(e),r=Ga(n.id,!0),i=n.separators.find(t=>t.element===e);da(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);da(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=xo({groupId:n.id}).getLayout(),c=_o({layout:ho({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});go(s,c)||Ja(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels},{isUserInteraction:!0})}function Co(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=bo(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&So(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&So(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&So(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&So(t,-5);break;case`End`:e.preventDefault(),So(t,100);break;case`Enter`:{e.preventDefault();let n=bo(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=Ga(n.id,!0),o=n.separators.find(e=>e.element===t);da(o,`Matching separator not found`);let s=a.get(o);da(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(da(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];So(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=bo(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);da(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(),So(t,-100);break}}function wo(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=Ka(),n=lo(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)}),Da({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}),n.length&&e.preventDefault()}function To({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=ho({delta:d,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>l.indexOf(e)),prevLayout:_,trigger:`mouse-or-touch`});if(go(t,_)){if(d!==0&&!u)switch(c){case`horizontal`:s|=d<0?Aa:ja;break;case`vertical`:s|=d<0?Ma:Na;break}}else Ja(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:t,separatorToPanels:v})}});let c=0;t.movementX===0?c|=o&Pa:c|=s&Pa,t.movementY===0?c|=o&Fa:c|=s&Fa,Ea(c),Ba(e)}function Eo(e){let t=Ka(),n=wa();switch(n.state){case`active`:To({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}}function Do(e){if(e.defaultPrevented)return;let t=wa(),n=Ka();switch(t.state){case`active`:if(e.buttons===0){Da({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{let t=Ga(e.group.id,!0);Ja(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)}To({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=lo(e,n);r.length===0?t.state!==`inactive`&&Da({cursorFlags:0,state:`inactive`}):Da({cursorFlags:0,hitRegions:r,state:`hover`}),Ba(e.currentTarget);break}}}function Oo(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(wa().state){case`hover`:Da({cursorFlags:0,state:`inactive`})}}function ko(e){e.defaultPrevented||e.pointerType===`mouse`&&e.button>0||Ya(e.currentTarget)&&e.preventDefault()}function Ao(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=ca(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=ca((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function jo(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=la({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:ca(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function Mo(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 No({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=ca(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]=ca((r[e]??0)/a*l);else{let e=ca(l/c.length);for(let t of c)u[t]=e}return u}function Po(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 Fo=new Map;function Io(e){let t=!0;da(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=la({group:e});if(t===0)return;let n=Ga(e.id);if(!n)return;let r=ua(e),i=n.defaultLayoutDeferred?Ao(r):n.layout,a=_o({layout:No({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&go(n.layout,a)&&Mo(n.derivedPanelConstraints,r)&&n.groupSize===t)return;Ja(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else jo(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{da(!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=la({group:e}),s=ua(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.mutableState.defaultLayout;l&&(Po(e.panels,l)||(l=void 0));let u=_o({layout:e.mutableState.layouts[c]??l??Ao(s),panelConstraints:s}),d=e.element.ownerDocument;Fo.set(d,(Fo.get(d)??0)+1);let f=new Map;return ba(e).forEach(e=>{e.separator&&f.set(e.separator,e.panels)}),Ja(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:u,separatorToPanels:f}),e.separators.forEach(e=>{da(!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`,Co)}),Fo.get(d)===1&&(d.addEventListener(`contextmenu`,Xa,!0),d.addEventListener(`dblclick`,yo,!0),d.addEventListener(`pointerdown`,wo,!0),d.addEventListener(`pointerleave`,Eo),d.addEventListener(`pointermove`,Do),d.addEventListener(`pointerout`,Oo),d.addEventListener(`pointerup`,ko,!0)),function(){t=!1,Fo.set(d,Math.max(0,(Fo.get(d)??0)-1)),Ua(e),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,Co)}),Fo.get(d)||(d.removeEventListener(`contextmenu`,Xa,!0),d.removeEventListener(`dblclick`,yo,!0),d.removeEventListener(`pointerdown`,wo,!0),d.removeEventListener(`pointerleave`,Eo),d.removeEventListener(`pointermove`,Do),d.removeEventListener(`pointerout`,Oo),d.removeEventListener(`pointerup`,ko,!0)),a.disconnect()}}function Lo(){let[e,t]=(0,b.useState)({});return[e,(0,b.useCallback)(()=>t({}),[])]}function Ro(e){let t=(0,b.useId)();return`${e??t}`}var zo=typeof window<`u`?b.useLayoutEffect:b.useEffect;function Bo(e){let t=(0,b.useRef)(e);return zo(()=>{t.current=e},[e]),(0,b.useCallback)((...e)=>t.current?.(...e),[t])}function Vo(...e){return Bo(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t;break}})})}function Ho(e){let t=(0,b.useRef)({...e});return zo(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var Uo=(0,b.createContext)(null);function Wo(e,t){let n=(0,b.useRef)({getLayout:()=>({}),setLayout:Oa});(0,b.useImperativeHandle)(t,()=>n.current,[]),zo(()=>{Object.assign(n.current,xo({groupId:e}))})}function Go({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=Bo(e=>{go(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,c?.(e))}),g=Bo((e,t)=>{go(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,l?.(e,{isUserInteraction:t}))}),_=Ro(s),v=(0,b.useRef)(null),[y,x]=Lo(),S=(0,b.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:d,separators:[]}),C=Vo(v,a);Wo(_,o);let w=Bo((e,t)=>{let r=wa(),i=Wa(e),a=Ga(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=Ho({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=fa(u,[...t.panels,e]),x(),()=>{t.panels=t.panels.filter(t=>t!==e),x()}},registerSeparator:e=>{let t=S.current;return t.separators=fa(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=Wa(_),i=Ga(_);r&&i&&Ja(r,{...i,derivedPanelConstraints:ua(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 zo(()=>{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=Io(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=Ga(r.id,!0);!o&&s.length>0&&(h(c),g(c,!1));let l=qa(_,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=fo(t.collapsedSize,i[t.panelId]),a=fo(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=wa().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)(Uo.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})})}Go.displayName=`Group`;function Ko(e,t){return`react-resizable-panels:${[e,...t].join(`:`)}`}function qo({id:e,panelIds:t,storage:n}){let r=Ko(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 Jo({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=Ko(o,n??[]),c=(0,b.useSyncExternalStore)(Yo,()=>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 qo({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?Ko(o,Object.keys(e)):Ko(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 Yo(){return function(){}}function Xo(){let e=(0,b.useContext)(Uo);return da(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function Zo(e,t){let{id:n}=Xo(),r=(0,b.useRef)({collapse:ka,expand:ka,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:ka});(0,b.useImperativeHandle)(t,()=>r.current,[]),zo(()=>{Object.assign(r.current,vo({groupId:n,panelId:e}))})}function Qo({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=Ro(c),_=Ho({disabled:a}),v=(0,b.useRef)(null),y=Vo(v,o),{getPanelStyles:x,id:S,orientation:C,registerPanel:w,updatePanelProps:T}=Xo(),E=d!==null,D=Bo((e,t,n)=>{d?.(e,c,n)});zo(()=>{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]),Zo(g,f);let O=()=>{let e=x(S,g);if(e)return JSON.stringify(e)},k=(0,b.useSyncExternalStore)(e=>qa(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:{...$o,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})})}Qo.displayName=`Panel`;var $o={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function es({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=_o({layout:ho({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=_o({layout:ho({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function ts({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:i,id:a,style:o,...s}){let c=Ro(a),l=Ho({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),_=Vo(g,i),{disableCursor:v,id:y,orientation:x,registerSeparator:S,updateSeparatorProps:C}=Xo(),w=x===`horizontal`?`vertical`:`horizontal`;zo(()=>{let e=g.current;if(e!==null){let t={disabled:l.disabled,disableDoubleClick:l.disableDoubleClick,element:e,id:c},n=S(t),r=Ta(e=>{p(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=qa(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(es({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})}ts.displayName=`Separator`;var ns=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},rs=(e=>e?ns(e):ns),is=e=>e;function as(e,t=is){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 os=e=>{let t=rs(e),n=e=>as(t,e);return Object.assign(n,t),n},ss=(e=>e?os(e):os),cs=ss()(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 ls(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 us=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return us(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return us(t)(e)}}}},ds=(e,t)=>(n,r,i)=>{let a={storage:ls(()=>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 us(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},fs={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}}},ps=ss()(ds(e=>({...fs,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})),ms=()=>{let{setPreference:e,setPreviewClient:t,previewClient:n,...r}=ps.getState();return r},hs=e=>e?.device?.type===`mobile`,gs=()=>ps(e=>hs(e.userAgent)),_s=(e,t)=>e===`pip`?t.previewClient===`claude`?t.displayMode===`modal`?`inline`:t.displayMode:t.previewClient===`chatgpt`&&hs(t.userAgent)?`fullscreen`:e:e,vs=Object.create,ys=Object.defineProperty,bs=Object.getOwnPropertyDescriptor,xs=Object.getOwnPropertyNames,Ss=Object.getPrototypeOf,Cs=Object.prototype.hasOwnProperty,ws=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ts=(e,t)=>{let n={};for(var r in e)ys(n,r,{get:e[r],enumerable:!0});return t&&ys(n,Symbol.toStringTag,{value:`Module`}),n},Es=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=xs(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Cs.call(e,s)&&s!==n&&ys(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=bs(t,s))||r.enumerable});return e},Ds=(e,t,n)=>(n=e==null?{}:vs(Ss(e)),Es(t||!e||!e.__esModule?ys(n,`default`,{value:e,enumerable:!0}):n,e)),Os=new Set([`https://json-schema.org/draft/2020-12/schema`,`http://json-schema.org/draft/2020-12/schema`]),ks=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]),As=new Set([`https://json-schema.org/draft-07/schema`,`http://json-schema.org/draft-07/schema`]),js=new Set([`https://json-schema.org/draft-06/schema`,`http://json-schema.org/draft-06/schema`]);function Ms(e){return typeof e==`string`&&ks.has(e.replace(/#$/,``))}function Ns(e,t){if(!(`$schema`in e)||typeof e.$schema!=`string`)return`2020-12`;let n=e.$schema.replace(/#$/,``);if(Os.has(n))return`2020-12`;if(ks.has(n))return`2019-09`;if(As.has(n)||js.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 Ps,Fs=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 Is=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ls=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Ps=globalThis).__zod_globalConfig??(Ps.__zod_globalConfig={});var Rs=globalThis.__zod_globalConfig;function zs(e){return e&&Object.assign(Rs,e),Rs}function Bs(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 Vs(e,t){return typeof t==`bigint`?t.toString():t}function Hs(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function Us(e){return e==null}function Ws(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Gs(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 Ks=Symbol(`evaluating`);function qs(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Ks)return r===void 0&&(r=Ks,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Js(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ys(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Xs(e){return JSON.stringify(e)}function Zs(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Qs=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function $s(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ec=Hs(()=>{if(Rs.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function tc(e){if($s(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!($s(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function nc(e){return tc(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var rc=new Set([`string`,`number`,`symbol`]);function ic(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function ac(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function oc(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 sc(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var cc={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function lc(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 ac(e,Ys(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 Js(this,`shape`,e),e},checks:[]}))}function uc(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 ac(e,Ys(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 Js(this,`shape`,r),r},checks:[]}))}function dc(e,t){if(!tc(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 ac(e,Ys(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Js(this,`shape`,n),n}}))}function fc(e,t){if(!tc(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return ac(e,Ys(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Js(this,`shape`,n),n}}))}function pc(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return ac(e,Ys(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Js(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function mc(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 ac(t,Ys(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 Js(this,`shape`,i),i},checks:[]}))}function hc(e,t,n){return ac(t,Ys(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 Js(this,`shape`,i),i}}))}function gc(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 _c(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 vc(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function yc(e){return typeof e==`string`?e:e?.message}function bc(e,t,n){let r=e.message?e.message:yc(e.inst?._zod.def?.error?.(e))??yc(t?.error?.(e))??yc(n.customError?.(e))??yc(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 xc(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Sc(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Cc=(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,Vs,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},wc=U(`$ZodError`,Cc),Tc=U(`$ZodError`,Cc,{Parent:Error});function Ec(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 Dc(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 Oc=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 Is;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>bc(e,a,zs())));throw Qs(t,i?.callee),t}return o.value},kc=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=>bc(e,a,zs())));throw Qs(t,i?.callee),t}return o.value},Ac=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 Is;return a.issues.length?{success:!1,error:new(e??wc)(a.issues.map(e=>bc(e,i,zs())))}:{success:!0,data:a.value}},jc=Ac(Tc),Mc=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=>bc(e,i,zs())))}:{success:!0,data:a.value}},Nc=Mc(Tc),Pc=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Oc(e)(t,n,i)},Fc=e=>(t,n,r)=>Oc(e)(t,n,r),Ic=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return kc(e)(t,n,i)},Lc=e=>async(t,n,r)=>kc(e)(t,n,r),Rc=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ac(e)(t,n,i)},zc=e=>(t,n,r)=>Ac(e)(t,n,r),Bc=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Mc(e)(t,n,i)},Vc=e=>async(t,n,r)=>Mc(e)(t,n,r),Hc=/^[cC][0-9a-z]{6,}$/,Uc=/^[0-9a-z]+$/,Wc=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Gc=/^[0-9a-vA-V]{20}$/,Kc=/^[A-Za-z0-9]{27}$/,qc=/^[a-zA-Z0-9_-]{21}$/,Jc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Yc=/^([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})$/,Xc=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)$/,Zc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Qc=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function $c(){return new RegExp(Qc,`u`)}var el=/^(?:(?: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])$/,tl=/^(([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}|:))$/,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])\/([0-9]|[1-2][0-9]|3[0-2])$/,rl=/^(([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])$/,il=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,al=/^[A-Za-z0-9_-]*$/,ol=/^https?$/,sl=/^\+[1-9]\d{6,14}$/,cl=`(?:(?:\\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])))`,ll=RegExp(`^${cl}$`);function ul(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 dl(e){return RegExp(`^${ul(e)}$`)}function fl(e){let t=ul({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(`^${cl}T(?:${r})$`)}var pl=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},ml=/^-?\d+$/,hl=/^-?\d+(?:\.\d+)?$/,gl=/^(?:true|false)$/i,_l=/^null$/i,vl=/^[^A-Z]*$/,yl=/^[^a-z]*$/,bl=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),xl={number:`number`,bigint:`bigint`,object:`date`},Sl=U(`$ZodCheckLessThan`,(e,t)=>{bl.init(e,t);let n=xl[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})}}),Cl=U(`$ZodCheckGreaterThan`,(e,t)=>{bl.init(e,t);let n=xl[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})}}),wl=U(`$ZodCheckMultipleOf`,(e,t)=>{bl.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):Gs(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})}}),Tl=U(`$ZodCheckNumberFormat`,(e,t)=>{bl.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=cc[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=ml)}),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})}}),El=U(`$ZodCheckMaxLength`,(e,t)=>{var n;bl.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Us(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=xc(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Dl=U(`$ZodCheckMinLength`,(e,t)=>{var n;bl.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Us(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=xc(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ol=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;bl.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Us(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=xc(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})}}),kl=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;bl.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=()=>{})}),Al=U(`$ZodCheckRegex`,(e,t)=>{kl.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})}}),jl=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=vl,kl.init(e,t)}),Ml=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=yl,kl.init(e,t)}),Nl=U(`$ZodCheckIncludes`,(e,t)=>{bl.init(e,t);let n=ic(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})}}),Pl=U(`$ZodCheckStartsWith`,(e,t)=>{bl.init(e,t);let n=RegExp(`^${ic(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})}}),Fl=U(`$ZodCheckEndsWith`,(e,t)=>{bl.init(e,t);let n=RegExp(`.*${ic(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})}}),Il=U(`$ZodCheckOverwrite`,(e,t)=>{bl.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Ll=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
|
+
`))}},Rl={major:4,minor:4,patch:3},zl=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Rl;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=gc(e),i;for(let a of t){if(a._zod.def.when){if(_c(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 Is;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=gc(e,t))});else{if(e.issues.length===t)continue;r||=gc(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(gc(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Is;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 Is;return o.then(e=>t(e,r,a))}return t(o,r,a)}}qs(e,`~standard`,()=>({validate:t=>{try{let n=jc(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Nc(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Bl=U(`$ZodString`,(e,t)=>{zl.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??pl(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}}),Vl=U(`$ZodStringFormat`,(e,t)=>{kl.init(e,t),Bl.init(e,t)}),Hl=U(`$ZodGUID`,(e,t)=>{t.pattern??=Yc,Vl.init(e,t)}),Ul=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??=Xc(e)}else t.pattern??=Xc();Vl.init(e,t)}),Wl=U(`$ZodEmail`,(e,t)=>{t.pattern??=Zc,Vl.init(e,t)}),Gl=U(`$ZodURL`,(e,t)=>{Vl.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===ol.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})}}}),Kl=U(`$ZodEmoji`,(e,t)=>{t.pattern??=$c(),Vl.init(e,t)}),ql=U(`$ZodNanoID`,(e,t)=>{t.pattern??=qc,Vl.init(e,t)}),Jl=U(`$ZodCUID`,(e,t)=>{t.pattern??=Hc,Vl.init(e,t)}),Yl=U(`$ZodCUID2`,(e,t)=>{t.pattern??=Uc,Vl.init(e,t)}),Xl=U(`$ZodULID`,(e,t)=>{t.pattern??=Wc,Vl.init(e,t)}),Zl=U(`$ZodXID`,(e,t)=>{t.pattern??=Gc,Vl.init(e,t)}),Ql=U(`$ZodKSUID`,(e,t)=>{t.pattern??=Kc,Vl.init(e,t)}),$l=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=fl(t),Vl.init(e,t)}),eu=U(`$ZodISODate`,(e,t)=>{t.pattern??=ll,Vl.init(e,t)}),tu=U(`$ZodISOTime`,(e,t)=>{t.pattern??=dl(t),Vl.init(e,t)}),nu=U(`$ZodISODuration`,(e,t)=>{t.pattern??=Jc,Vl.init(e,t)}),ru=U(`$ZodIPv4`,(e,t)=>{t.pattern??=el,Vl.init(e,t),e._zod.bag.format=`ipv4`}),iu=U(`$ZodIPv6`,(e,t)=>{t.pattern??=tl,Vl.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})}}}),au=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=nl,Vl.init(e,t)}),ou=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=rl,Vl.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 su(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var cu=U(`$ZodBase64`,(e,t)=>{t.pattern??=il,Vl.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{su(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function lu(e){if(!al.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return su(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var uu=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=al,Vl.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{lu(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),du=U(`$ZodE164`,(e,t)=>{t.pattern??=sl,Vl.init(e,t)});function fu(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 pu=U(`$ZodJWT`,(e,t)=>{Vl.init(e,t),e._zod.check=n=>{fu(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),mu=U(`$ZodNumber`,(e,t)=>{zl.init(e,t),e._zod.pattern=e._zod.bag.pattern??hl,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}}),hu=U(`$ZodNumberFormat`,(e,t)=>{Tl.init(e,t),mu.init(e,t)}),gu=U(`$ZodBoolean`,(e,t)=>{zl.init(e,t),e._zod.pattern=gl,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}}),_u=U(`$ZodNull`,(e,t)=>{zl.init(e,t),e._zod.pattern=_l,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}}),vu=U(`$ZodAny`,(e,t)=>{zl.init(e,t),e._zod.parse=e=>e}),yu=U(`$ZodUnknown`,(e,t)=>{zl.init(e,t),e._zod.parse=e=>e}),bu=U(`$ZodNever`,(e,t)=>{zl.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function xu(e,t,n){e.issues.length&&t.issues.push(...vc(n,e.issues)),t.value[n]=e.value}var Su=U(`$ZodArray`,(e,t)=>{zl.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=>xu(t,n,e))):xu(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Cu(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...vc(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 wu(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=sc(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Tu(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=>Cu(e,n,i,t,u,d))):Cu(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 Eu=U(`$ZodObject`,(e,t)=>{if(zl.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=Hs(()=>wu(t));qs(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=$s,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=>Cu(n,t,e,s,r,i))):Cu(a,t,e,s,r,i)}return i?Tu(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Du=U(`$ZodObjectJIT`,(e,t)=>{Eu.init(e,t);let n=e._zod.parse,r=Hs(()=>wu(t)),i=e=>{let t=new Ll([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Xs(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=Xs(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=$s,s=!Rs.jitless,c=s&&ec.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?Tu([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Ou(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=>!gc(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=>bc(e,r,zs())))}),t)}var ku=U(`$ZodUnion`,(e,t)=>{zl.init(e,t),qs(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),qs(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),qs(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),qs(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=>Ws(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=>Ou(t,r,e,i)):Ou(o,r,e,i)}}),Au=U(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,ku.init(e,t);let n=e._zod.parse;qs(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=Hs(()=>{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(!$s(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)}}),ju=U(`$ZodIntersection`,(e,t)=>{zl.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])=>Nu(e,t,n)):Nu(e,i,a)}});function Mu(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(tc(e)&&tc(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=Mu(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=Mu(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 Nu(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}),gc(e))return e;let o=Mu(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Pu=U(`$ZodRecord`,(e,t)=>{zl.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!tc(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=>bc(e,r,zs())),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(...vc(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...vc(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`&&hl.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=>bc(e,r,zs())),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(...vc(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...vc(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Fu=U(`$ZodEnum`,(e,t)=>{zl.init(e,t);let n=Bs(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>rc.has(typeof e)).map(e=>typeof e==`string`?ic(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}}),Iu=U(`$ZodLiteral`,(e,t)=>{if(zl.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`?ic(e):e?ic(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}}),Lu=U(`$ZodTransform`,(e,t)=>{zl.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ls(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 Is;return n.value=i,n.fallback=!0,n}});function Ru(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var zu=U(`$ZodOptional`,(e,t)=>{zl.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,qs(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),qs(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ws(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=>Ru(e,r)):Ru(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Bu=U(`$ZodExactOptional`,(e,t)=>{zu.init(e,t),qs(e._zod,`values`,()=>t.innerType._zod.values),qs(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Vu=U(`$ZodNullable`,(e,t)=>{zl.init(e,t),qs(e._zod,`optin`,()=>t.innerType._zod.optin),qs(e._zod,`optout`,()=>t.innerType._zod.optout),qs(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ws(e.source)}|null)$`):void 0}),qs(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)}),Hu=U(`$ZodDefault`,(e,t)=>{zl.init(e,t),e._zod.optin=`optional`,qs(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=>Uu(e,t)):Uu(r,t)}});function Uu(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Wu=U(`$ZodPrefault`,(e,t)=>{zl.init(e,t),e._zod.optin=`optional`,qs(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))}),Gu=U(`$ZodNonOptional`,(e,t)=>{zl.init(e,t),qs(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=>Ku(t,e)):Ku(i,e)}});function Ku(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 qu=U(`$ZodCatch`,(e,t)=>{zl.init(e,t),e._zod.optin=`optional`,qs(e._zod,`optout`,()=>t.innerType._zod.optout),qs(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=>bc(e,n,zs()))},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=>bc(e,n,zs()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Ju=U(`$ZodPipe`,(e,t)=>{zl.init(e,t),qs(e._zod,`values`,()=>t.in._zod.values),qs(e._zod,`optin`,()=>t.in._zod.optin),qs(e._zod,`optout`,()=>t.out._zod.optout),qs(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=>Yu(e,t.in,n)):Yu(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Yu(e,t.out,n)):Yu(r,t.out,n)}});function Yu(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 Xu=U(`$ZodPreprocess`,(e,t)=>{Ju.init(e,t)}),Zu=U(`$ZodReadonly`,(e,t)=>{zl.init(e,t),qs(e._zod,`propValues`,()=>t.innerType._zod.propValues),qs(e._zod,`values`,()=>t.innerType._zod.values),qs(e._zod,`optin`,()=>t.innerType?._zod?.optin),qs(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(Qu):Qu(r)}});function Qu(e){return e.value=Object.freeze(e.value),e}var $u=U(`$ZodLazy`,(e,t)=>{zl.init(e,t),qs(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),qs(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),qs(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),qs(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),qs(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),ed=U(`$ZodCustom`,(e,t)=>{bl.init(e,t),zl.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=>td(t,n,r,e));td(i,n,r,e)}});function td(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(Sc(e))}}var nd,rd=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 id(){return new rd}(nd=globalThis).__zod_globalRegistry??(nd.__zod_globalRegistry=id());var ad=globalThis.__zod_globalRegistry;function od(e,t){return new e({type:`string`,...oc(t)})}function sd(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...oc(t)})}function cd(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...oc(t)})}function ld(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...oc(t)})}function ud(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...oc(t)})}function dd(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...oc(t)})}function fd(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...oc(t)})}function pd(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...oc(t)})}function md(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...oc(t)})}function hd(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...oc(t)})}function gd(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...oc(t)})}function _d(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...oc(t)})}function vd(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...oc(t)})}function yd(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...oc(t)})}function bd(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...oc(t)})}function xd(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...oc(t)})}function Sd(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...oc(t)})}function Cd(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...oc(t)})}function wd(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...oc(t)})}function Td(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...oc(t)})}function Ed(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...oc(t)})}function Dd(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...oc(t)})}function Od(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...oc(t)})}function kd(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...oc(t)})}function Ad(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...oc(t)})}function jd(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...oc(t)})}function Md(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...oc(t)})}function Nd(e,t){return new e({type:`number`,checks:[],...oc(t)})}function Pd(e,t){return new e({type:`number`,coerce:!0,checks:[],...oc(t)})}function Fd(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...oc(t)})}function Id(e,t){return new e({type:`boolean`,...oc(t)})}function Ld(e,t){return new e({type:`null`,...oc(t)})}function Rd(e){return new e({type:`any`})}function zd(e){return new e({type:`unknown`})}function Bd(e,t){return new e({type:`never`,...oc(t)})}function Vd(e,t){return new Sl({check:`less_than`,...oc(t),value:e,inclusive:!1})}function Hd(e,t){return new Sl({check:`less_than`,...oc(t),value:e,inclusive:!0})}function Ud(e,t){return new Cl({check:`greater_than`,...oc(t),value:e,inclusive:!1})}function Wd(e,t){return new Cl({check:`greater_than`,...oc(t),value:e,inclusive:!0})}function Gd(e,t){return new wl({check:`multiple_of`,...oc(t),value:e})}function Kd(e,t){return new El({check:`max_length`,...oc(t),maximum:e})}function qd(e,t){return new Dl({check:`min_length`,...oc(t),minimum:e})}function Jd(e,t){return new Ol({check:`length_equals`,...oc(t),length:e})}function Yd(e,t){return new Al({check:`string_format`,format:`regex`,...oc(t),pattern:e})}function Xd(e){return new jl({check:`string_format`,format:`lowercase`,...oc(e)})}function Zd(e){return new Ml({check:`string_format`,format:`uppercase`,...oc(e)})}function Qd(e,t){return new Nl({check:`string_format`,format:`includes`,...oc(t),includes:e})}function $d(e,t){return new Pl({check:`string_format`,format:`starts_with`,...oc(t),prefix:e})}function ef(e,t){return new Fl({check:`string_format`,format:`ends_with`,...oc(t),suffix:e})}function tf(e){return new Il({check:`overwrite`,tx:e})}function nf(e){return tf(t=>t.normalize(e))}function rf(){return tf(e=>e.trim())}function af(){return tf(e=>e.toLowerCase())}function of(){return tf(e=>e.toUpperCase())}function sf(){return tf(e=>Zs(e))}function cf(e,t,n){return new e({type:`array`,element:t,...oc(n)})}function lf(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...oc(n)})}function uf(e,t){let n=df(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Sc(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(Sc(r))}},e(t.value,t)),t);return n}function df(e,t){let n=new bl({check:`custom`,...oc(t)});return n._zod.check=e,n}function ff(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??ad,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 pf(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,pf(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`&&gf(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 mf(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 hf(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:vf(t,`input`,e.processors),output:vf(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function gf(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 gf(r.element,n);if(r.type===`set`)return gf(r.valueType,n);if(r.type===`lazy`)return gf(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 gf(r.innerType,n);if(r.type===`intersection`)return gf(r.left,n)||gf(r.right,n);if(r.type===`record`||r.type===`map`)return gf(r.keyType,n)||gf(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:gf(r.in,n)||gf(r.out,n);if(r.type===`object`){for(let e in r.shape)if(gf(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(gf(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(gf(e,n))return!0;return!!(r.rest&&gf(r.rest,n))}return!1}var _f=(e,t={})=>n=>{let r=ff({...n,processors:t});return pf(e,r),mf(r,e),hf(r,e)},vf=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ff({...i??{},target:a,io:t,processors:n});return pf(e,o),mf(o,e),hf(o,e)},yf={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},bf=(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=yf[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}))])}},xf=(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)},Sf=(e,t,n,r)=>{n.type=`boolean`},Cf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},wf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},Tf=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Ef=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},Df=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},Of=(e,t,n,r)=>{n.not={}},kf=(e,t,n,r)=>{},Af=(e,t,n,r)=>{},jf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},Mf=(e,t,n,r)=>{let i=e._zod.def,a=Bs(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Nf=(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},Pf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},Ff=(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},If=(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)},Lf=(e,t,n,r)=>{n.type=`boolean`},Rf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},zf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},Bf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Vf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},Hf=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},Uf=(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=pf(a.element,t,{...r,path:[...r.path,`items`]})},Wf=(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]=pf(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=pf(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Gf=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>pf(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Kf=(e,t,n,r)=>{let i=e._zod.def,a=pf(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=pf(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]]},qf=(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)=>pf(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?pf(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)},Jf=(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=pf(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=pf(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=pf(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)}},Yf=(e,t,n,r)=>{let i=e._zod.def,a=pf(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`}]},Xf=(e,t,n,r)=>{let i=e._zod.def;pf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Zf=(e,t,n,r)=>{let i=e._zod.def;pf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Qf=(e,t,n,r)=>{let i=e._zod.def;pf(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)))},$f=(e,t,n,r)=>{let i=e._zod.def;pf(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},ep=(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;pf(o,t,r);let s=t.seen.get(e);s.ref=o},tp=(e,t,n,r)=>{let i=e._zod.def;pf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},np=(e,t,n,r)=>{let i=e._zod.def;pf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},rp=(e,t,n,r)=>{let i=e._zod.def;pf(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ip=(e,t,n,r)=>{let i=e._zod.innerType;pf(i,t,r);let a=t.seen.get(e);a.ref=i},ap={string:bf,number:xf,boolean:Sf,bigint:Cf,symbol:wf,null:Tf,undefined:Ef,void:Df,never:Of,any:kf,unknown:Af,date:jf,enum:Mf,literal:Nf,nan:Pf,template_literal:Ff,file:If,success:Lf,custom:Rf,function:zf,transform:Bf,map:Vf,set:Hf,array:Uf,object:Wf,union:Gf,intersection:Kf,tuple:qf,record:Jf,nullable:Yf,nonoptional:Xf,default:Zf,prefault:Qf,catch:$f,pipe:ep,readonly:tp,promise:np,optional:rp,lazy:ip};function op(e,t){if(`_idmap`in e){let n=e,r=ff({...t,processors:ap}),i={};for(let e of n._idmap.entries()){let[t,n]=e;pf(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;mf(r,n),a[t]=hf(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=ff({...t,processors:ap});return pf(e,n),mf(n,e),hf(n,e)}var sp=U(`ZodISODateTime`,(e,t)=>{$l.init(e,t),Np.init(e,t)});function cp(e){return kd(sp,e)}var lp=U(`ZodISODate`,(e,t)=>{eu.init(e,t),Np.init(e,t)});function up(e){return Ad(lp,e)}var dp=U(`ZodISOTime`,(e,t)=>{tu.init(e,t),Np.init(e,t)});function fp(e){return jd(dp,e)}var pp=U(`ZodISODuration`,(e,t)=>{nu.init(e,t),Np.init(e,t)});function mp(e){return Md(pp,e)}var hp=U(`ZodError`,(e,t)=>{wc.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Dc(e,t)},flatten:{value:t=>Ec(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Vs,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Vs,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),gp=Oc(hp),_p=kc(hp),vp=Ac(hp),yp=Mc(hp),bp=Pc(hp),xp=Fc(hp),Sp=Ic(hp),Cp=Lc(hp),wp=Rc(hp),Tp=zc(hp),Ep=Bc(hp),Dp=Vc(hp),Op=new WeakMap;function kp(e,t,n){let r=Object.getPrototypeOf(e),i=Op.get(r);if(i||(i=new Set,Op.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 Ap=U(`ZodType`,(e,t)=>(zl.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:vf(e,`input`),output:vf(e,`output`)}}),e.toJSONSchema=_f(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>gp(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>vp(e,t,n),e.parseAsync=async(t,n)=>_p(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>yp(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>bp(e,t,n),e.decode=(t,n)=>xp(e,t,n),e.encodeAsync=async(t,n)=>Sp(e,t,n),e.decodeAsync=async(t,n)=>Cp(e,t,n),e.safeEncode=(t,n)=>wp(e,t,n),e.safeDecode=(t,n)=>Tp(e,t,n),e.safeEncodeAsync=async(t,n)=>Ep(e,t,n),e.safeDecodeAsync=async(t,n)=>Dp(e,t,n),kp(e,`ZodType`,{check(...e){let t=this.def;return this.clone(Ys(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 ac(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(pee(e,t))},superRefine(e,t){return this.check(mee(e,t))},overwrite(e){return this.check(tf(e))},optional(){return bm(this)},exactOptional(){return xm(this)},nullable(){return Cm(this)},nullish(){return bm(Cm(this))},nonoptional(e){return km(this,e)},array(){return K(this)},or(e){return lm([this,e])},and(e){return pm(this,e)},transform(e){return Nm(this,vm(e))},default(e){return Tm(this,e)},prefault(e){return Dm(this,e)},catch(e){return jm(this,e)},pipe(e){return Nm(this,e)},readonly(){return Im(this)},describe(e){let t=this.clone();return ad.add(t,{description:e}),t},meta(...e){if(e.length===0)return ad.get(this);let t=this.clone();return ad.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 ad.get(e)?.description},configurable:!0}),e)),jp=U(`_ZodString`,(e,t)=>{Bl.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bf(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,kp(e,`_ZodString`,{regex(...e){return this.check(Yd(...e))},includes(...e){return this.check(Qd(...e))},startsWith(...e){return this.check($d(...e))},endsWith(...e){return this.check(ef(...e))},min(...e){return this.check(qd(...e))},max(...e){return this.check(Kd(...e))},length(...e){return this.check(Jd(...e))},nonempty(...e){return this.check(qd(1,...e))},lowercase(e){return this.check(Xd(e))},uppercase(e){return this.check(Zd(e))},trim(){return this.check(rf())},normalize(...e){return this.check(nf(...e))},toLowerCase(){return this.check(af())},toUpperCase(){return this.check(of())},slugify(){return this.check(sf())}})}),Mp=U(`ZodString`,(e,t)=>{Bl.init(e,t),jp.init(e,t),e.email=t=>e.check(sd(Pp,t)),e.url=t=>e.check(pd(Rp,t)),e.jwt=t=>e.check(Od(aee,t)),e.emoji=t=>e.check(md(Bp,t)),e.guid=t=>e.check(cd(Ip,t)),e.uuid=t=>e.check(ld(Lp,t)),e.uuidv4=t=>e.check(ud(Lp,t)),e.uuidv6=t=>e.check(dd(Lp,t)),e.uuidv7=t=>e.check(fd(Lp,t)),e.nanoid=t=>e.check(hd(Vp,t)),e.guid=t=>e.check(cd(Ip,t)),e.cuid=t=>e.check(gd(Hp,t)),e.cuid2=t=>e.check(_d(Up,t)),e.ulid=t=>e.check(vd(Wp,t)),e.base64=t=>e.check(Td(nee,t)),e.base64url=t=>e.check(Ed(ree,t)),e.xid=t=>e.check(yd(Gp,t)),e.ksuid=t=>e.check(bd(Kp,t)),e.ipv4=t=>e.check(xd(qp,t)),e.ipv6=t=>e.check(Sd(Jp,t)),e.cidrv4=t=>e.check(Cd(eee,t)),e.cidrv6=t=>e.check(wd(tee,t)),e.e164=t=>e.check(Dd(iee,t)),e.datetime=t=>e.check(cp(t)),e.date=t=>e.check(up(t)),e.time=t=>e.check(fp(t)),e.duration=t=>e.check(mp(t))});function W(e){return od(Mp,e)}var Np=U(`ZodStringFormat`,(e,t)=>{Vl.init(e,t),jp.init(e,t)}),Pp=U(`ZodEmail`,(e,t)=>{Wl.init(e,t),Np.init(e,t)});function Fp(e){return sd(Pp,e)}var Ip=U(`ZodGUID`,(e,t)=>{Hl.init(e,t),Np.init(e,t)}),Lp=U(`ZodUUID`,(e,t)=>{Ul.init(e,t),Np.init(e,t)}),Rp=U(`ZodURL`,(e,t)=>{Gl.init(e,t),Np.init(e,t)});function zp(e){return pd(Rp,e)}var Bp=U(`ZodEmoji`,(e,t)=>{Kl.init(e,t),Np.init(e,t)}),Vp=U(`ZodNanoID`,(e,t)=>{ql.init(e,t),Np.init(e,t)}),Hp=U(`ZodCUID`,(e,t)=>{Jl.init(e,t),Np.init(e,t)}),Up=U(`ZodCUID2`,(e,t)=>{Yl.init(e,t),Np.init(e,t)}),Wp=U(`ZodULID`,(e,t)=>{Xl.init(e,t),Np.init(e,t)}),Gp=U(`ZodXID`,(e,t)=>{Zl.init(e,t),Np.init(e,t)}),Kp=U(`ZodKSUID`,(e,t)=>{Ql.init(e,t),Np.init(e,t)}),qp=U(`ZodIPv4`,(e,t)=>{ru.init(e,t),Np.init(e,t)}),Jp=U(`ZodIPv6`,(e,t)=>{iu.init(e,t),Np.init(e,t)}),eee=U(`ZodCIDRv4`,(e,t)=>{au.init(e,t),Np.init(e,t)}),tee=U(`ZodCIDRv6`,(e,t)=>{ou.init(e,t),Np.init(e,t)}),nee=U(`ZodBase64`,(e,t)=>{cu.init(e,t),Np.init(e,t)}),ree=U(`ZodBase64URL`,(e,t)=>{uu.init(e,t),Np.init(e,t)}),iee=U(`ZodE164`,(e,t)=>{du.init(e,t),Np.init(e,t)}),aee=U(`ZodJWT`,(e,t)=>{pu.init(e,t),Np.init(e,t)}),Yp=U(`ZodNumber`,(e,t)=>{mu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xf(e,t,n,r),kp(e,`ZodNumber`,{gt(e,t){return this.check(Ud(e,t))},gte(e,t){return this.check(Wd(e,t))},min(e,t){return this.check(Wd(e,t))},lt(e,t){return this.check(Vd(e,t))},lte(e,t){return this.check(Hd(e,t))},max(e,t){return this.check(Hd(e,t))},int(e){return this.check(Xp(e))},safe(e){return this.check(Xp(e))},positive(e){return this.check(Ud(0,e))},nonnegative(e){return this.check(Wd(0,e))},negative(e){return this.check(Vd(0,e))},nonpositive(e){return this.check(Hd(0,e))},multipleOf(e,t){return this.check(Gd(e,t))},step(e,t){return this.check(Gd(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 Nd(Yp,e)}var oee=U(`ZodNumberFormat`,(e,t)=>{hu.init(e,t),Yp.init(e,t)});function Xp(e){return Fd(oee,e)}var see=U(`ZodBoolean`,(e,t)=>{gu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sf(e,t,n,r)});function Zp(e){return Id(see,e)}var Qp=U(`ZodNull`,(e,t)=>{_u.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tf(e,t,n,r)});function $p(e){return Ld(Qp,e)}var em=U(`ZodAny`,(e,t)=>{vu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function tm(){return Rd(em)}var nm=U(`ZodUnknown`,(e,t)=>{yu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function rm(){return zd(nm)}var im=U(`ZodNever`,(e,t)=>{bu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Of(e,t,n,r)});function am(e){return Bd(im,e)}var cee=U(`ZodArray`,(e,t)=>{Su.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uf(e,t,n,r),e.element=t.element,kp(e,`ZodArray`,{min(e,t){return this.check(qd(e,t))},nonempty(e){return this.check(qd(1,e))},max(e,t){return this.check(Kd(e,t))},length(e,t){return this.check(Jd(e,t))},unwrap(){return this.element}})});function K(e,t){return cf(cee,e,t)}var om=U(`ZodObject`,(e,t)=>{Du.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wf(e,t,n,r),qs(e,`shape`,()=>t.shape),kp(e,`ZodObject`,{keyof(){return _m(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:rm()})},loose(){return this.clone({...this._zod.def,catchall:rm()})},strict(){return this.clone({...this._zod.def,catchall:am()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return dc(this,e)},safeExtend(e){return fc(this,e)},merge(e){return pc(this,e)},pick(e){return lc(this,e)},omit(e){return uc(this,e)},partial(...e){return mc(ym,this,e[0])},required(...e){return hc(Om,this,e[0])}})});function q(e,t){return new om({type:`object`,shape:e??{},...oc(t)})}function sm(e,t){return new om({type:`object`,shape:e,catchall:rm(),...oc(t)})}var cm=U(`ZodUnion`,(e,t)=>{ku.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gf(e,t,n,r),e.options=t.options});function lm(e,t){return new cm({type:`union`,options:e,...oc(t)})}var um=U(`ZodDiscriminatedUnion`,(e,t)=>{cm.init(e,t),Au.init(e,t)});function dm(e,t,n){return new um({type:`union`,options:t,discriminator:e,...oc(n)})}var fm=U(`ZodIntersection`,(e,t)=>{ju.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kf(e,t,n,r)});function pm(e,t){return new fm({type:`intersection`,left:e,right:t})}var mm=U(`ZodRecord`,(e,t)=>{Pu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jf(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function hm(e,t,n){return!t||!t._zod?new mm({type:`record`,keyType:W(),valueType:e,...oc(t)}):new mm({type:`record`,keyType:e,valueType:t,...oc(n)})}var gm=U(`ZodEnum`,(e,t)=>{Fu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mf(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 gm({...t,checks:[],...oc(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 gm({...t,checks:[],...oc(r),entries:i})}});function _m(e,t){return new gm({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...oc(t)})}var lee=U(`ZodLiteral`,(e,t)=>{Iu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nf(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 lee({type:`literal`,values:Array.isArray(e)?e:[e],...oc(t)})}var uee=U(`ZodTransform`,(e,t)=>{Lu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bf(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ls(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Sc(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(Sc(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 vm(e){return new uee({type:`transform`,transform:e})}var ym=U(`ZodOptional`,(e,t)=>{zu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rp(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bm(e){return new ym({type:`optional`,innerType:e})}var dee=U(`ZodExactOptional`,(e,t)=>{Bu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rp(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xm(e){return new dee({type:`optional`,innerType:e})}var Sm=U(`ZodNullable`,(e,t)=>{Vu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Cm(e){return new Sm({type:`nullable`,innerType:e})}var wm=U(`ZodDefault`,(e,t)=>{Hu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Tm(e,t){return new wm({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():nc(t)}})}var Em=U(`ZodPrefault`,(e,t)=>{Wu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Dm(e,t){return new Em({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():nc(t)}})}var Om=U(`ZodNonOptional`,(e,t)=>{Gu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xf(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function km(e,t){return new Om({type:`nonoptional`,innerType:e,...oc(t)})}var Am=U(`ZodCatch`,(e,t)=>{qu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$f(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function jm(e,t){return new Am({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Mm=U(`ZodPipe`,(e,t)=>{Ju.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ep(e,t,n,r),e.in=t.in,e.out=t.out});function Nm(e,t){return new Mm({type:`pipe`,in:e,out:t})}var Pm=U(`ZodPreprocess`,(e,t)=>{Mm.init(e,t),Xu.init(e,t)}),Fm=U(`ZodReadonly`,(e,t)=>{Zu.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tp(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Im(e){return new Fm({type:`readonly`,innerType:e})}var Lm=U(`ZodLazy`,(e,t)=>{$u.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ip(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Rm(e){return new Lm({type:`lazy`,getter:e})}var fee=U(`ZodCustom`,(e,t)=>{ed.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rf(e,t,n,r)});function pee(e,t={}){return lf(fee,e,t)}function mee(e,t){return uf(e,t)}function zm(e,t){return new Pm({type:`pipe`,in:vm(e),out:t})}var hee={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`},gee;gee||={};function _ee(e){return Pd(Yp,e)}var Bm=`2025-11-25`,vee=[Bm,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],yee=`io.modelcontextprotocol/related-task`,Vm=`io.modelcontextprotocol/protocolVersion`,Hm=`io.modelcontextprotocol/clientInfo`,Um=`io.modelcontextprotocol/serverInfo`,Wm=`io.modelcontextprotocol/clientCapabilities`,Gm=`io.modelcontextprotocol/subscriptionId`,Km=`io.modelcontextprotocol/logLevel`,qm=Rm(()=>lm([W(),G(),Zp(),$p(),hm(W(),qm),K(qm)])),Jm=hm(W(),qm),bee=K(qm),Ym=lm([W(),G().int()]),Xm=W(),Zm=q({ttl:G().optional()}),Qm=q({taskId:W()}),$m=sm({progressToken:Ym.optional(),[yee]:Qm.optional()}),eh=q({_meta:$m.optional()}),th=eh.extend({task:Zm.optional()}),nh=q({method:W(),params:eh.loose().optional()}),rh=q({_meta:$m.optional()}),ih=q({method:W(),params:rh.loose().optional()}),ah=sm({get[Um](){return bh.optional().catch(void 0)}}),oh=sm({_meta:ah.optional()}),sh=lm([W(),G().int()]),ch=q({jsonrpc:J(`2.0`),id:sh,...nh.shape}).strict(),lh=q({jsonrpc:J(`2.0`),...ih.shape}).strict(),uh=q({jsonrpc:J(`2.0`),id:sh,result:oh}).strict(),dh=q({jsonrpc:J(`2.0`),id:sh.optional(),error:q({code:G().int(),message:W(),data:rm().optional()})}).strict(),fh=lm([ch,lh,uh,dh]),ph=lm([uh,dh]),mh=oh.strict(),hh=rh.extend({requestId:sh.optional(),reason:W().optional()}),gh=ih.extend({method:J(`notifications/cancelled`),params:hh}),_h=q({src:W(),mimeType:W().optional(),sizes:K(W()).optional(),theme:_m([`light`,`dark`]).optional()}),vh=q({icons:K(_h).optional()}),yh=q({name:W(),title:W().optional()}),bh=yh.extend({...yh.shape,...vh.shape,version:W(),websiteUrl:W().optional(),description:W().optional()}),xh=zm(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,pm(q({form:pm(q({applyDefaults:Zp().optional()}),Jm).optional(),url:Jm.optional()}),Jm.optional())),Sh=sm({list:Jm.optional(),cancel:Jm.optional(),requests:sm({sampling:sm({createMessage:Jm.optional()}).optional(),elicitation:sm({create:Jm.optional()}).optional()}).optional()}),Ch=sm({list:Jm.optional(),cancel:Jm.optional(),requests:sm({tools:sm({call:Jm.optional()}).optional()}).optional()}),wh=q({experimental:hm(W(),Jm).optional(),sampling:q({context:Jm.optional(),tools:Jm.optional()}).optional(),elicitation:xh.optional(),roots:q({listChanged:Zp().optional()}).optional(),tasks:Sh.optional(),extensions:hm(W(),Jm).optional()}),Th=eh.extend({protocolVersion:W(),capabilities:wh,clientInfo:bh}),Eh=nh.extend({method:J(`initialize`),params:Th}),Dh=q({experimental:hm(W(),Jm).optional(),logging:Jm.optional(),completions:Jm.optional(),prompts:q({listChanged:Zp().optional()}).optional(),resources:q({subscribe:Zp().optional(),listChanged:Zp().optional()}).optional(),tools:q({listChanged:Zp().optional()}).optional(),tasks:Ch.optional(),extensions:hm(W(),Jm).optional()}),Oh=oh.extend({protocolVersion:W(),capabilities:Dh,serverInfo:bh,instructions:W().optional()}),kh=ih.extend({method:J(`notifications/initialized`),params:rh.optional()}),Ah=nh.extend({method:J(`server/discover`),params:eh.optional()}),jh=oh.extend({supportedVersions:K(W()),capabilities:Dh,instructions:W().optional()}),Mh=nh.extend({method:J(`ping`),params:eh.optional()}),Nh=q({progress:G(),total:bm(G()),message:bm(W())}),Ph=q({...rh.shape,...Nh.shape,progressToken:Ym}),Fh=ih.extend({method:J(`notifications/progress`),params:Ph}),Ih=eh.extend({cursor:Xm.optional()}),Lh=nh.extend({params:Ih.optional()}),Rh=oh.extend({nextCursor:Xm.optional()}),zh=q({uri:W(),mimeType:bm(W()),_meta:hm(W(),rm()).optional()}),Bh=zh.extend({text:W()}),Vh=W().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Hh=zh.extend({blob:Vh}),Uh=_m([`user`,`assistant`]),Wh=q({audience:K(Uh).optional(),priority:G().min(0).max(1).optional(),lastModified:cp({offset:!0}).optional()}),Gh=q({...yh.shape,...vh.shape,uri:W(),description:bm(W()),mimeType:bm(W()),size:bm(G()),annotations:Wh.optional(),_meta:bm(sm({}))}),Kh=q({...yh.shape,...vh.shape,uriTemplate:W(),description:bm(W()),mimeType:bm(W()),annotations:Wh.optional(),_meta:bm(sm({}))}),qh=Lh.extend({method:J(`resources/list`)}),Jh=Rh.extend({resources:K(Gh)}),Yh=Lh.extend({method:J(`resources/templates/list`)}),Xh=Rh.extend({resourceTemplates:K(Kh)}),Zh=eh.extend({uri:W()}),Qh=Zh,$h=nh.extend({method:J(`resources/read`),params:Qh}),eg=oh.extend({contents:K(lm([Bh,Hh]))}),tg=ih.extend({method:J(`notifications/resources/list_changed`),params:rh.optional()}),ng=Zh,rg=nh.extend({method:J(`resources/subscribe`),params:ng}),ig=Zh,ag=nh.extend({method:J(`resources/unsubscribe`),params:ig}),og=q({toolsListChanged:Zp().optional(),promptsListChanged:Zp().optional(),resourcesListChanged:Zp().optional(),resourceSubscriptions:K(W()).optional()}),sg=eh.extend({notifications:og}),cg=nh.extend({method:J(`subscriptions/listen`),params:sg}),lg=rh.extend({notifications:og}),ug=ih.extend({method:J(`notifications/subscriptions/acknowledged`),params:lg}),dg=ah.extend({[Gm]:sh}),fg=oh.extend({_meta:dg}),pg=rh.extend({uri:W()}),mg=ih.extend({method:J(`notifications/resources/updated`),params:pg}),hg=q({name:W(),description:bm(W()),required:bm(Zp())}),gg=q({...yh.shape,...vh.shape,description:bm(W()),arguments:bm(K(hg)),_meta:bm(sm({}))}),_g=Lh.extend({method:J(`prompts/list`)}),vg=Rh.extend({prompts:K(gg)}),yg=eh.extend({name:W(),arguments:hm(W(),W()).optional()}),bg=nh.extend({method:J(`prompts/get`),params:yg}),xg=q({type:J(`text`),text:W(),annotations:Wh.optional(),_meta:hm(W(),rm()).optional()}),Sg=q({type:J(`image`),data:Vh,mimeType:W(),annotations:Wh.optional(),_meta:hm(W(),rm()).optional()}),Cg=q({type:J(`audio`),data:Vh,mimeType:W(),annotations:Wh.optional(),_meta:hm(W(),rm()).optional()}),wg=q({type:J(`tool_use`),name:W(),id:W(),input:hm(W(),rm()),_meta:hm(W(),rm()).optional()}),Tg=q({type:J(`resource`),resource:lm([Bh,Hh]),annotations:Wh.optional(),_meta:hm(W(),rm()).optional()}),Eg=Gh.extend({type:J(`resource_link`)}),Dg=lm([xg,Sg,Cg,Eg,Tg]),Og=q({role:Uh,content:Dg}),kg=oh.extend({description:W().optional(),messages:K(Og)}),Ag=ih.extend({method:J(`notifications/prompts/list_changed`),params:rh.optional()}),jg=q({title:W().optional(),readOnlyHint:Zp().optional(),destructiveHint:Zp().optional(),idempotentHint:Zp().optional(),openWorldHint:Zp().optional()}),Mg=q({taskSupport:_m([`required`,`optional`,`forbidden`]).optional()}),Ng=q({...yh.shape,...vh.shape,description:W().optional(),inputSchema:q({type:J(`object`),properties:hm(W(),qm).optional(),required:K(W()).optional()}).catchall(rm()),outputSchema:sm({$schema:W().optional()}).optional(),annotations:jg.optional(),execution:Mg.optional(),_meta:hm(W(),rm()).optional()}),Pg=Lh.extend({method:J(`tools/list`)}),Fg=Rh.extend({tools:K(Ng)}),Ig=oh.extend({content:K(Dg).default([]),structuredContent:rm().optional(),isError:Zp().optional()}),xee=Ig.or(oh.extend({toolResult:rm()})),Lg=th.extend({name:W(),arguments:hm(W(),rm()).optional()}),Rg=nh.extend({method:J(`tools/call`),params:Lg}),zg=ih.extend({method:J(`notifications/tools/list_changed`),params:rh.optional()}),Bg=q({autoRefresh:Zp().default(!0),debounceMs:G().int().nonnegative().default(300)}),Vg=_m([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Hg=eh.extend({level:Vg}),Ug=nh.extend({method:J(`logging/setLevel`),params:Hg}),Wg=rh.extend({level:Vg,logger:W().optional(),data:rm()}),Gg=ih.extend({method:J(`notifications/message`),params:Wg}),Kg=q({name:W().optional()}),qg=q({hints:K(Kg).optional(),costPriority:G().min(0).max(1).optional(),speedPriority:G().min(0).max(1).optional(),intelligencePriority:G().min(0).max(1).optional()}),Jg=q({mode:_m([`auto`,`required`,`none`]).optional()}),Yg=q({type:J(`tool_result`),toolUseId:W().describe(`The unique identifier for the corresponding tool call.`),content:K(Dg),structuredContent:rm().optional(),isError:Zp().optional(),_meta:hm(W(),rm()).optional()}),Xg=dm(`type`,[xg,Sg,Cg]),Zg=dm(`type`,[xg,Sg,Cg,wg,Yg]),Qg=q({role:Uh,content:lm([Zg,K(Zg)]),_meta:hm(W(),rm()).optional()}),$g=th.extend({messages:K(Qg),modelPreferences:qg.optional(),systemPrompt:W().optional(),includeContext:_m([`none`,`thisServer`,`allServers`]).optional(),temperature:G().optional(),maxTokens:G().int(),stopSequences:K(W()).optional(),metadata:Jm.optional(),tools:K(Ng).optional(),toolChoice:Jg.optional()}),e_=nh.extend({method:J(`sampling/createMessage`),params:$g}),t_=oh.extend({model:W(),stopReason:bm(_m([`endTurn`,`stopSequence`,`maxTokens`]).or(W())),role:Uh,content:Xg}),n_=oh.extend({model:W(),stopReason:bm(_m([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(W())),role:Uh,content:lm([Zg,K(Zg)])}),r_=q({type:J(`boolean`),title:W().optional(),description:W().optional(),default:Zp().optional()}),i_=q({type:J(`string`),title:W().optional(),description:W().optional(),minLength:G().optional(),maxLength:G().optional(),format:_m([`email`,`uri`,`date`,`date-time`]).optional(),default:W().optional()}),a_=q({type:_m([`number`,`integer`]),title:W().optional(),description:W().optional(),minimum:G().optional(),maximum:G().optional(),default:G().optional()}),o_=q({type:J(`string`),title:W().optional(),description:W().optional(),enum:K(W()),default:W().optional()}),s_=q({type:J(`string`),title:W().optional(),description:W().optional(),oneOf:K(q({const:W(),title:W()})),default:W().optional()}),c_=q({type:J(`string`),title:W().optional(),description:W().optional(),enum:K(W()),enumNames:K(W()).optional(),default:W().optional()}),l_=lm([o_,s_]),u_=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()}),d_=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()}),f_=lm([u_,d_]),p_=lm([c_,l_,f_]),m_=lm([p_,r_,i_,a_]),h_=th.extend({mode:J(`form`).optional(),message:W(),requestedSchema:q({type:J(`object`),properties:hm(W(),m_),required:K(W()).optional()}).catchall(rm())}),g_=th.extend({mode:J(`url`),message:W(),elicitationId:W(),url:W().url()}),__=lm([h_,g_]),v_=nh.extend({method:J(`elicitation/create`),params:__}),y_=rh.extend({elicitationId:W()}),b_=ih.extend({method:J(`notifications/elicitation/complete`),params:y_}),x_=oh.extend({action:_m([`accept`,`decline`,`cancel`]),content:zm(e=>e===null?void 0:e,hm(W(),lm([W(),G(),Zp(),K(W())])).optional())}),S_=q({type:J(`ref/resource`),uri:W()}),C_=q({type:J(`ref/prompt`),name:W()}),w_=eh.extend({ref:lm([C_,S_]),argument:q({name:W(),value:W()}),context:q({arguments:hm(W(),W()).optional()}).optional()}),T_=nh.extend({method:J(`completion/complete`),params:w_}),E_=oh.extend({completion:sm({values:K(W()).max(100),total:bm(G().int()),hasMore:bm(Zp())})}),D_=q({uri:W().startsWith(`file://`),name:W().optional(),_meta:hm(W(),rm()).optional()}),O_=nh.extend({method:J(`roots/list`),params:eh.optional()}),k_=oh.extend({roots:K(D_)}),A_=ih.extend({method:J(`notifications/roots/list_changed`),params:rh.optional()}),j_=sm({ttl:G().optional(),pollInterval:G().optional()}),M_=_m([`working`,`input_required`,`completed`,`failed`,`cancelled`]),N_=q({taskId:W(),status:M_,ttl:lm([G(),$p()]),createdAt:W(),lastUpdatedAt:W(),pollInterval:bm(G()),statusMessage:bm(W())}),P_=oh.extend({task:N_}),F_=rh.merge(N_),See=ih.extend({method:J(`notifications/tasks/status`),params:F_}),Cee=nh.extend({method:J(`tasks/get`),params:eh.extend({taskId:W()})}),wee=oh.merge(N_),Tee=nh.extend({method:J(`tasks/result`),params:eh.extend({taskId:W()})}),Eee=oh.loose(),Dee=Lh.extend({method:J(`tasks/list`)}),Oee=Rh.extend({tasks:K(N_)}),kee=nh.extend({method:J(`tasks/cancel`),params:eh.extend({taskId:W()})}),Aee=oh.merge(N_),jee=lm([Mh,Eh,Ah,T_,Ug,bg,_g,qh,Yh,$h,rg,ag,cg,Rg,Pg]),Mee=lm([gh,Fh,kh,A_]),Nee=lm([mh,t_,n_,x_,k_]),Pee=lm([Mh,e_,v_,O_]),Fee=lm([gh,Fh,Gg,mg,tg,zg,Ag,ug,b_]),Iee=lm([mh,Oh,jh,E_,kg,vg,Jh,Xh,eg,Ig,Fg,fg]),I_=zp().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:hee.custom,message:`URL must be parseable`,fatal:!0}),Fs}).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`}),L_=sm({resource:W().url(),authorization_servers:K(I_).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:Zp().optional(),authorization_details_types_supported:K(W()).optional(),dpop_signing_alg_values_supported:K(W()).optional(),dpop_bound_access_tokens_required:Zp().optional()}),R_=sm({issuer:W(),authorization_endpoint:I_,token_endpoint:I_,registration_endpoint:I_.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:I_.optional(),revocation_endpoint:I_.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:Zp().optional(),authorization_response_iss_parameter_supported:Zp().optional().catch(void 0),dpop_signing_alg_values_supported:K(W()).optional()}),z_=sm({issuer:W(),authorization_endpoint:I_,token_endpoint:I_,userinfo_endpoint:I_.optional(),jwks_uri:I_,registration_endpoint:I_.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:Zp().optional(),request_parameter_supported:Zp().optional(),request_uri_parameter_supported:Zp().optional(),require_request_uri_registration:Zp().optional(),op_policy_uri:I_.optional(),op_tos_uri:I_.optional(),client_id_metadata_document_supported:Zp().optional(),authorization_response_iss_parameter_supported:Zp().optional().catch(void 0)}),B_=q({...z_.shape,...R_.pick({code_challenge_methods_supported:!0}).shape}),V_=q({access_token:W(),id_token:W().optional(),token_type:W(),expires_in:_ee().optional(),scope:W().optional(),refresh_token:W().optional(),issuer:W().optional().catch(void 0)}).strip(),H_=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(),U_=q({error:W(),error_description:W().optional(),error_uri:W().optional()}),W_=I_.optional().or(J(``).transform(()=>void 0)),G_=q({redirect_uris:K(I_),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:I_.optional(),logo_uri:W_,scope:W().optional(),contacts:K(W()).optional(),tos_uri:W_,policy_uri:W().optional(),jwks_uri:I_.optional(),jwks:tm().optional(),software_id:W().optional(),software_version:W().optional(),software_statement:W().optional()}).strip(),K_=q({client_id:W(),client_secret:W().optional(),client_id_issued_at:G().optional(),client_secret_expires_at:G().optional(),issuer:W().optional().catch(void 0)}).strip(),q_=G_.merge(K_),J_=q({error:W(),error_description:W().optional()}).strip(),Y_=q({token:W(),token_type_hint:W().optional()}).strip(),X_=Symbol.for(`mcp.sdk.errorBrands`);function Z_(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,X_,{value:n,enumerable:!1,configurable:!0})}function Q_(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,X_)){let n=t[X_];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var $_=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.InvalidDpopProof=`invalid_dpop_proof`,e.UseDpopNonce=`use_dpop_nonce`,e}({}),ev=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return Q_(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 Q_(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,Z_(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)}},tv=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}({}),nv=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return Q_(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 Q_(this,e)}constructor(e,t,n,r){super(t,r),this.code=e,this.data=n,this.name=`SdkError`,Z_(this,new.target)}},rv=class extends nv{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n,r){super(e,t,n,r),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}};function iv(e){let t=typeof e==`string`?new URL(e):new URL(e.href);return t.hash=``,t}function av(e){if(typeof e!=`object`||!e||Array.isArray(e))return e;let t={...e};return delete t.issuer,t}function ov({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 lv(e){return e>=sv}function uv(e){return e.filter(e=>!lv(e))}function dv(e){return e.filter(e=>lv(e))}function fv(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 pv=[`task`,`inputRequests`,`requestState`];function Lee(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||pv.some(t=>t in e)?e:{...e,content:[]}}function Ree(){let e=Rm(()=>lm([W(),G(),Zp(),$p(),hm(W(),e),K(e)])),t=hm(W(),e),n=lm([W(),G().int()]),r=W(),i=q({ttl:G().optional()}),a=q({taskId:W()}),o=sm({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=sm({_meta:o.optional()}),p=lm([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:_m([`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=zm(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,pm(q({form:pm(q({applyDefaults:Zp().optional()}),t).optional(),url:t.optional()}),t.optional())),S=sm({list:t.optional(),cancel:t.optional(),requests:sm({sampling:sm({createMessage:t.optional()}).optional(),elicitation:sm({create:t.optional()}).optional()}).optional()}),C=sm({list:t.optional(),cancel:t.optional(),requests:sm({tools:sm({call:t.optional()}).optional()}).optional()}),w=q({experimental:hm(W(),t).optional(),sampling:q({context:t.optional(),tools:t.optional()}).optional(),elicitation:x.optional(),roots:q({listChanged:Zp().optional()}).optional(),tasks:S.optional(),extensions:hm(W(),t).optional()}),T=s.extend({protocolVersion:W(),capabilities:w,clientInfo:b}),E=l.extend({method:J(`initialize`),params:T}),D=q({experimental:hm(W(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:q({listChanged:Zp().optional()}).optional(),resources:q({subscribe:Zp().optional(),listChanged:Zp().optional()}).optional(),tools:q({listChanged:Zp().optional()}).optional(),tasks:C.optional(),extensions:hm(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:bm(G()),message:bm(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:bm(W()),_meta:hm(W(),rm()).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=_m([`user`,`assistant`]),z=q({audience:K(R).optional(),priority:G().min(0).max(1).optional(),lastModified:cp({offset:!0}).optional()}),B=q({...y.shape,...v.shape,uri:W(),description:bm(W()),mimeType:bm(W()),size:bm(G()),annotations:z.optional(),_meta:bm(sm({}))}),re=q({...y.shape,...v.shape,uriTemplate:W(),description:bm(W()),mimeType:bm(W()),annotations:z.optional(),_meta:bm(sm({}))}),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(lm([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:bm(W()),required:bm(Zp())}),ye=q({...y.shape,...v.shape,description:bm(W()),arguments:bm(K(ve)),_meta:bm(sm({}))}),be=F.extend({method:J(`prompts/list`)}),xe=I.extend({prompts:K(ye)}),Se=s.extend({name:W(),arguments:hm(W(),W()).optional()}),Ce=l.extend({method:J(`prompts/get`),params:Se}),we=q({type:J(`text`),text:W(),annotations:z.optional(),_meta:hm(W(),rm()).optional()}),Te=q({type:J(`image`),data:te,mimeType:W(),annotations:z.optional(),_meta:hm(W(),rm()).optional()}),Ee=q({type:J(`audio`),data:te,mimeType:W(),annotations:z.optional(),_meta:hm(W(),rm()).optional()}),De=q({type:J(`tool_use`),name:W(),id:W(),input:hm(W(),rm()),_meta:hm(W(),rm()).optional()}),Oe=q({type:J(`resource`),resource:lm([ee,ne]),annotations:z.optional(),_meta:hm(W(),rm()).optional()}),ke=B.extend({type:J(`resource_link`)}),Ae=lm([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:Zp().optional(),destructiveHint:Zp().optional(),idempotentHint:Zp().optional(),openWorldHint:Zp().optional()}),Fe=q({taskSupport:_m([`required`,`optional`,`forbidden`]).optional()}),Ie=q({...y.shape,...v.shape,description:W().optional(),inputSchema:q({type:J(`object`),properties:hm(W(),e).optional(),required:K(W()).optional()}).catchall(rm()),outputSchema:q({type:J(`object`),properties:hm(W(),e).optional(),required:K(W()).optional()}).catchall(rm()).optional(),annotations:Pe.optional(),execution:Fe.optional(),_meta:hm(W(),rm()).optional()}),Le=F.extend({method:J(`tools/list`)}),Re=I.extend({tools:K(Ie)}),ze=f.extend({content:K(Ae),structuredContent:hm(W(),rm()).optional(),isError:Zp().optional()}),Be=c.extend({name:W(),arguments:hm(W(),rm()).optional()}),Ve=l.extend({method:J(`tools/call`),params:Be}),He=d.extend({method:J(`notifications/tools/list_changed`),params:u.optional()}),Ue=_m([`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:rm()}),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:_m([`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:Zp().optional(),_meta:hm(W(),rm()).optional()}),Ze=dm(`type`,[we,Te,Ee]),Qe=dm(`type`,[we,Te,Ee,De,Xe]),$e=q({role:R,content:lm([Qe,K(Qe)]),_meta:hm(W(),rm()).optional()}),et=c.extend({messages:K($e),modelPreferences:Je.optional(),systemPrompt:W().optional(),includeContext:_m([`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:bm(_m([`endTurn`,`stopSequence`,`maxTokens`]).or(W())),role:R,content:Ze}),rt=f.extend({model:W(),stopReason:bm(_m([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(W())),role:R,content:lm([Qe,K(Qe)])}),it=q({type:J(`boolean`),title:W().optional(),description:W().optional(),default:Zp().optional()}),at=q({type:J(`string`),title:W().optional(),description:W().optional(),minLength:G().optional(),maxLength:G().optional(),format:_m([`email`,`uri`,`date`,`date-time`]).optional(),default:W().optional()}),ot=q({type:_m([`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=lm([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=lm([dt,ft]),mt=lm([lt,ut,pt]),ht=lm([mt,it,at,ot]),gt=c.extend({mode:J(`form`).optional(),message:W(),requestedSchema:q({type:J(`object`),properties:hm(W(),ht),required:K(W()).optional()}).catchall(rm())}),_t=c.extend({mode:J(`url`),message:W(),elicitationId:W(),url:W().url()}),vt=lm([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:_m([`accept`,`decline`,`cancel`]),content:zm(e=>e===null?void 0:e,hm(W(),lm([W(),G(),Zp(),K(W())])).optional())}),Ct=q({type:J(`ref/resource`),uri:W()}),wt=q({type:J(`ref/prompt`),name:W()}),Tt=s.extend({ref:lm([wt,Ct]),argument:q({name:W(),value:W()}),context:q({arguments:hm(W(),W()).optional()}).optional()}),Et=l.extend({method:J(`completion/complete`),params:Tt}),Dt=f.extend({completion:sm({values:K(W()).max(100),total:bm(G().int()),hasMore:bm(Zp())})}),Ot=q({uri:W().startsWith(`file://`),name:W().optional(),_meta:hm(W(),rm()).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=sm({ttl:G().optional(),pollInterval:G().optional()}),Nt=_m([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Pt=q({taskId:W(),status:Nt,ttl:lm([G(),$p()]),createdAt:W(),lastUpdatedAt:W(),pollInterval:bm(G()),statusMessage:bm(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:lm([A,E,Et,We,Ce,be,ie,oe,ue,me,he,Ve,Le,Rt,Bt,Ht,Wt]),ClientNotificationSchema:lm([g,N,k,jt,Lt]),ClientResultSchema:lm([m,nt,rt,St,At,zt,Ut,Ft]),ServerRequestSchema:lm([A,tt,yt,kt,Rt,Bt,Ht,Wt]),ServerNotificationSchema:lm([g,N,Ke,_e,fe,He,Ne,Lt,xt]),ServerResultSchema:lm([m,O,Dt,Me,xe,ae,se,de,ze,Re,zt,Ut,Ft]),CallToolResultWireSchema:rm().superRefine((e,t)=>{if(!(typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0)){for(let n of pv)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(Lee).pipe(ze)}}var zee;function mv(){return zee??=Ree()}function hv(e){return e.type!==`object`}var Bee=new Set([`const`,`enum`,`default`,`examples`]),Vee=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function gv(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function Hee(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(gv(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=Ms(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&&gv(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:Bee.has(o)?i[o]=s:Vee.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 _v={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},vv={"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},Uee={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},yv;function bv(){if(yv)return yv;let e=mv();return yv={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}},yv}function xv(e){return Object.prototype.hasOwnProperty.call(_v,e)}function Sv(e){return Object.prototype.hasOwnProperty.call(vv,e)}function Wee(e){return Object.prototype.hasOwnProperty.call(Uee,e)}function Gee(e){return Wee(e)?bv().resultSchemas[e]:void 0}function Kee(e){return xv(e)?bv().requestSchemas[e]:void 0}function qee(e){return Sv(e)?bv().notificationSchemas[e]:void 0}Object.keys(_v),Object.keys(vv);function Cv(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 Tv={ok:!1,reason:`not-in-era`};function Ev(e){return Cv(e)&&Cv(e.outputSchema)&&hv(e.outputSchema)}function Dv(e){return e}var Ov={era:`2025-11-25`,hasRequestMethod:xv,hasNotificationMethod:Sv,validateRequest:(e,t)=>wv(Kee(e),t),validateResult:(e,t)=>wv(Gee(e),t),validateNotification:(e,t)=>wv(qee(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Tv,validateInputResponse:()=>Tv,samplingResultVariant:((e,t)=>{let n=mv();return wv(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=fv(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&hv(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(Cv(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:Dv(e)}}return{kind:`complete`,result:Dv(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>Ev(e))?t:{...t,tools:n.map(e=>Ev(e)?{...e,outputSchema:Hee(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function Jee(){let e=Rm(()=>lm([W(),G(),Zp(),$p(),hm(W(),e),K(e)])),t=hm(W(),e),n=lm([W(),G().int()]),r=W(),i=lm([W(),G().int()]),a=_m([`user`,`assistant`]),o=_m([`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=sm({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:_m([`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=zm(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,pm(q({form:pm(q({applyDefaults:Zp().optional()}),t).optional(),url:t.optional()}),t.optional())),b=sm({list:t.optional(),cancel:t.optional(),requests:sm({sampling:sm({createMessage:t.optional()}).optional(),elicitation:sm({create:t.optional()}).optional()}).optional()}),x=sm({list:t.optional(),cancel:t.optional(),requests:sm({tools:sm({call:t.optional()}).optional()}).optional()}),S=q({experimental:hm(W(),t).optional(),sampling:q({context:t.optional(),tools:t.optional()}).optional(),elicitation:y.optional(),roots:q({listChanged:Zp().optional()}).optional(),tasks:b.optional(),extensions:hm(W(),t).optional()}),C=q({experimental:hm(W(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:q({listChanged:Zp().optional()}).optional(),resources:q({subscribe:Zp().optional(),listChanged:Zp().optional()}).optional(),tools:q({listChanged:Zp().optional()}).optional(),tasks:x.optional(),extensions:hm(W(),t).optional()}),w=q({progress:G(),total:bm(G()),message:bm(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:rm()}),O=m.extend({method:J(`notifications/message`),params:D}),k=q({uri:W(),mimeType:bm(W()),_meta:hm(W(),rm()).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:cp({offset:!0}).optional()}),N=q({..._.shape,...g.shape,uri:W(),description:bm(W()),mimeType:bm(W()),size:bm(G()),annotations:M.optional(),_meta:bm(sm({}))}),P=q({..._.shape,...g.shape,uriTemplate:W(),description:bm(W()),mimeType:bm(W()),annotations:M.optional(),_meta:bm(sm({}))}),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:bm(W()),required:bm(Zp())}),te=q({..._.shape,...g.shape,description:bm(W()),arguments:bm(K(ee)),_meta:bm(sm({}))}),ne=m.extend({method:J(`notifications/prompts/list_changed`),params:p.optional()}),R=q({type:J(`text`),text:W(),annotations:M.optional(),_meta:hm(W(),rm()).optional()}),z=q({type:J(`image`),data:s,mimeType:W(),annotations:M.optional(),_meta:hm(W(),rm()).optional()}),B=q({type:J(`audio`),data:s,mimeType:W(),annotations:M.optional(),_meta:hm(W(),rm()).optional()}),re=q({type:J(`tool_use`),name:W(),id:W(),input:hm(W(),rm()),_meta:hm(W(),rm()).optional()}),ie=q({type:J(`resource`),resource:lm([A,j]),annotations:M.optional(),_meta:hm(W(),rm()).optional()}),ae=N.extend({type:J(`resource_link`)}),oe=lm([R,z,B,ae,ie]),se=q({role:a,content:oe}),ce=q({title:W().optional(),readOnlyHint:Zp().optional(),destructiveHint:Zp().optional(),idempotentHint:Zp().optional(),openWorldHint:Zp().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:_m([`auto`,`required`,`none`]).optional()}),pe=q({type:J(`boolean`),title:W().optional(),description:W().optional(),default:Zp().optional()}),me=q({type:J(`string`),title:W().optional(),description:W().optional(),minLength:G().optional(),maxLength:G().optional(),format:_m([`email`,`uri`,`date`,`date-time`]).optional(),default:W().optional()}),V=q({type:_m([`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=lm([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=lm([ye,be]),Se=lm([_e,ve,xe]),Ce=lm([Se,pe,me,V]),we=f.extend({mode:J(`form`).optional(),message:W(),requestedSchema:q({type:J(`object`),properties:hm(W(),Ce),required:K(W()).optional()}).catchall(rm())}),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:hm(W(),rm()).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=sm({progressToken:n.optional(),[Vm]:W(),[Hm]:v.optional(),[Wm]:ke,[Km]:o.optional()}),Ne=q({..._.shape,...g.shape,description:W().optional(),inputSchema:sm({$schema:W().optional(),type:J(`object`)}),outputSchema:sm({$schema:W().optional()}).optional(),annotations:ce.optional(),_meta:hm(W(),rm()).optional()}),Pe=q({type:J(`tool_result`),toolUseId:W(),content:K(oe),structuredContent:rm().optional(),isError:Zp().optional(),_meta:hm(W(),rm()).optional()}),Fe=lm([R,z,B,re,Pe]),Ie=q({role:a,content:lm([Fe,K(Fe)]),_meta:hm(W(),rm()).optional()}),Le=W(),Re=sm({[Um]:v.optional().catch(void 0)}),ze=Re.optional();function Be(e){return sm({_meta:ze,resultType:Le.default(`complete`),...e})}let Ve=Be({}),He=Be({nextCursor:r.optional()}),Ue=Be({content:K(oe),structuredContent:rm().optional(),isError:Zp().optional()}),H=Be({ttlMs:G().int().min(0),cacheScope:_m([`public`,`private`]),tools:K(Ne),nextCursor:r.optional()}),We=Be({ttlMs:G().int().min(0),cacheScope:_m([`public`,`private`]),prompts:K(te),nextCursor:r.optional()}),Ge=Be({description:W().optional(),messages:K(se)}),Ke=Be({ttlMs:G().int().min(0),cacheScope:_m([`public`,`private`]),resources:K(N),nextCursor:r.optional()}),qe=Be({ttlMs:G().int().min(0),cacheScope:_m([`public`,`private`]),resourceTemplates:K(P),nextCursor:r.optional()}),Je=Be({ttlMs:G().int().min(0),cacheScope:_m([`public`,`private`]),contents:K(lm([A,j]))}),Ye=Be({completion:q({values:K(W()).max(100),total:G().int().optional(),hasMore:Zp().optional()}).loose()}),Xe=Be({ttlMs:G().int().min(0),cacheScope:_m([`public`,`private`])}),Ze=Be({ttlMs:G().int().min(0).catch(0),cacheScope:_m([`public`,`private`]).catch(`private`),supportedVersions:K(W()),capabilities:je,instructions:W().optional()}),Qe=q({messages:K(Ie),modelPreferences:de.optional(),systemPrompt:W().optional(),includeContext:_m([`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:hm(W(),rm()).optional()}).optional()}),tt=q({...Ie.shape,model:W(),stopReason:W().optional()}),nt=q({roots:K(De)}),rt=q({action:_m([`accept`,`decline`,`cancel`]),content:hm(W(),lm([W(),G(),Zp(),K(W())])).optional()}),it=q({mode:J(`url`),message:W(),url:W().url()}),at=lm([we,it]),ot=q({method:J(`elicitation/create`),params:at}),st=lm([$e,et,ot]),ct=lm([tt,nt,rt]),lt=hm(W(),st),ut=hm(W(),ct),dt=Be({inputRequests:lt.optional(),requestState:W().optional()}),ft={inputResponses:ut.optional(),requestState:W().optional()},pt=q({_meta:Me,...ft}),mt=sm({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:hm(W(),rm()).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:hm(W(),W()).optional(),...ft}),Ct=ht(`resources/list`,vt),wt=ht(`resources/templates/list`,vt),Tt=ht(`resources/read`,{uri:W(),...ft}),Et={ref:lm([Ee,Te]),argument:q({name:W(),value:W()}),context:q({arguments:hm(W(),W()).optional()}).optional()},Dt=ht(`completion/complete`,Et),Ot=ht(`server/discover`,{}),kt=q({toolsListChanged:Zp().optional(),promptsListChanged:Zp().optional(),resourcesListChanged:Zp().optional(),resourceSubscriptions:K(W()).optional()}),At={notifications:kt},jt=ht(`subscriptions/listen`,At),Mt=Re.extend({"io.modelcontextprotocol/subscriptionId":i}),Nt=sm({_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:hm(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 sm({_meta:ze,...e})}let It={"tools/call":Ft({content:K(oe),structuredContent:rm().optional(),isError:Zp().optional()}),"tools/list":Ft({ttlMs:G().int().min(0),cacheScope:_m([`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:_m([`public`,`private`]),prompts:K(te),nextCursor:r.optional()}),"resources/list":Ft({ttlMs:G().int().min(0),cacheScope:_m([`public`,`private`]),resources:K(N),nextCursor:r.optional()}),"resources/templates/list":Ft({ttlMs:G().int().min(0),cacheScope:_m([`public`,`private`]),resourceTemplates:K(P),nextCursor:r.optional()}),"resources/read":Ft({ttlMs:G().int().min(0),cacheScope:_m([`public`,`private`]),contents:K(lm([A,j]))}),"completion/complete":Ft({completion:q({values:K(W()).max(100),total:G().int().optional(),hasMore:Zp().optional()}).loose()}),"server/discover":Ft({ttlMs:G().int().min(0).catch(0),cacheScope:_m([`public`,`private`]).catch(`private`),supportedVersions:K(W()),capabilities:je,instructions:W().optional()}),"subscriptions/listen":Ft({})},Lt=sm({"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:lm([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(lm([Ue,dt])),ListToolsResultResponseSchema:Ht(H),ListPromptsResultResponseSchema:Ht(We),GetPromptResultResponseSchema:Ht(lm([Ge,dt])),ListResourcesResultResponseSchema:Ht(Ke),ListResourceTemplatesResultResponseSchema:Ht(qe),ReadResourceResultResponseSchema:Ht(lm([Je,dt])),CompleteResultResponseSchema:Ht(Ye),DiscoverResultResponseSchema:Ht(Ze)}}var Yee;function kv(){return Yee??=Jee()}var Xee=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function Zee(e){return Xee.includes(e)}var Av=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function Qee(e){return e[Av]}function jv(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function Mv(e){return e===`public`||e===`private`}var Nv=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}({}),Pv=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return Q_(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 Q_(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,Z_(this,new.target)}static fromError(t,n,r){if(t===Nv.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new ete(e.elicitations,n)}if(t===Nv.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new Fv({supported:e.supported,requested:e.requested},n)}if(t===Nv.InvalidParams||t===Nv.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===Nv.ResourceNotFound||Object.keys(e).length===1))return new $ee(e.uri,n)}if(t===Nv.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new tte({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},$ee=class extends Pv{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(Nv.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},ete=class extends Pv{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Nv.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},Fv=class extends Pv{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(Nv.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},tte=class extends Pv{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(Nv.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},nte=0,Iv=`private`,Lv=[`tools/call`,`prompts/get`,`resources/read`];function Rv(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||Lv.includes(e))return t;throw new Pv(Nv.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function zv(e,t){let n=Qee(t);if(t.resultType!==`complete`||!Zee(e))return n===void 0?t:Wv(t);let r=t,i=jv(r.ttlMs)?r.ttlMs:Hv(n),a=Mv(r.cacheScope)?r.cacheScope:Uv(n),o={...r,ttlMs:i,cacheScope:a};return delete o[Av],o}function Bv(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Vv(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[Um]:t}}:!Bv(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[Um]:t}}}function Hv(e){return e!==void 0&&jv(e.ttlMs)?e.ttlMs:nte}function Uv(e){return e!==void 0&&Mv(e.cacheScope)?e.cacheScope:Iv}function Wv(e){let t={...e};return delete t[Av],t}var Gv=[`elicitation/create`,`sampling/createMessage`,`roots/list`],Kv;function qv(){if(Kv)return Kv;let e=kv();return Kv={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:sm({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},Kv}function Jv(e){return Gv.includes(e)}function Yv(e){return Jv(e)?qv().request[e]:void 0}function Xv(e){return Jv(e)?qv().response[e]:void 0}var Zv={"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},Qv={"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 $v(e){return Object.prototype.hasOwnProperty.call(Zv,e)}function ey(e){return Object.prototype.hasOwnProperty.call(Qv,e)}function ty(e){return Object.prototype.hasOwnProperty.call(Zv,e)}function ny(e){return $v(e)?kv().dispatchRequestSchemas[e]:void 0}function ry(e){return ty(e)?kv().dispatchResultSchemas[e]:void 0}function iy(e){return ey(e)?kv().notificationSchemas2026[e]:void 0}Object.keys(Zv),Object.keys(Qv);function ay(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function oy(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 sy={ok:!1,reason:`not-in-era`},cy=[Vm,Wm];function ly(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=>ay(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!ay(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(ay(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var uy={era:`2026-07-28`,hasRequestMethod:$v,hasNotificationMethod:ey,hasInputRequestMethod:e=>Yv(e)!==void 0,validateRequest:(e,t)=>oy(ny(e),t),validateResult:(e,t)=>oy(ry(e),t),validateNotification:(e,t)=>oy(iy(e),t),validateInputRequest:(e,t)=>oy(Yv(e),t),validateInputResponse:(e,t)=>oy(Xv(e),t),samplingResultVariant:()=>sy,outboundEnvelope(e){return{[Vm]:e.protocolVersion,[Hm]:e.clientInfo,[Wm]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of cy)n in e||t.push({key:n,problem:`missing`});let n=kv().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=>fv(e),inputRequestSchema:Yv,decodeResult(e,t){if(!ay(t))return{kind:`invalid`,error:new nv(tv.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new nv(tv.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 nv(tv.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=ay(n)?n:{},i=t.requestState,a=t._meta===void 0?void 0:kv().ResultMetaSchema.safeParse(t._meta),o=a?.success?a.data:void 0;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new nv(tv.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},...o!==void 0&&{_meta:o}}}if(n!==`complete`)return{kind:`invalid`,error:new nv(tv.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let r=fy(),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 nv(tv.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 Vv(zv(e,Rv(e,ly(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=kv().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(`; `)}`}},dy;function fy(){if(dy)return dy;let e=kv();return dy={"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},dy}var py=`2026-07-28`;function my(e){return e!==void 0&&lv(e)?uy:Ov}function hy(e){return e.revision===void 0?e.era===`modern`?uy.era:Ov.era:my(e.revision).era}function gy(e){return vy.some(t=>t.hasRequestMethod(e))}function _y(e){return vy.some(t=>t.hasNotificationMethod(e))}var vy=[Ov,uy],yy=Ts({AnnotationsSchema:()=>Wh,AudioContentSchema:()=>Cg,BaseMetadataSchema:()=>yh,BaseRequestParamsSchema:()=>eh,BlobResourceContentsSchema:()=>Hh,BooleanSchemaSchema:()=>r_,CallToolRequestParamsSchema:()=>Lg,CallToolRequestSchema:()=>Rg,CallToolResultSchema:()=>Ig,CancelTaskRequestSchema:()=>kee,CancelTaskResultSchema:()=>Aee,CancelledNotificationParamsSchema:()=>hh,CancelledNotificationSchema:()=>gh,ClientCapabilitiesSchema:()=>wh,ClientNotificationSchema:()=>Mee,ClientRequestSchema:()=>jee,ClientResultSchema:()=>Nee,ClientTasksCapabilitySchema:()=>Sh,CompatibilityCallToolResultSchema:()=>xee,CompleteRequestParamsSchema:()=>w_,CompleteRequestSchema:()=>T_,CompleteResultSchema:()=>E_,ContentBlockSchema:()=>Dg,CreateMessageRequestParamsSchema:()=>$g,CreateMessageRequestSchema:()=>e_,CreateMessageResultSchema:()=>t_,CreateMessageResultWithToolsSchema:()=>n_,CreateTaskResultSchema:()=>P_,CursorSchema:()=>Xm,DiscoverRequestSchema:()=>Ah,DiscoverResultSchema:()=>jh,ElicitRequestFormParamsSchema:()=>h_,ElicitRequestParamsSchema:()=>__,ElicitRequestSchema:()=>v_,ElicitRequestURLParamsSchema:()=>g_,ElicitResultSchema:()=>x_,ElicitationCompleteNotificationParamsSchema:()=>y_,ElicitationCompleteNotificationSchema:()=>b_,EmbeddedResourceSchema:()=>Tg,EmptyResultSchema:()=>mh,EnumSchemaSchema:()=>p_,GetPromptRequestParamsSchema:()=>yg,GetPromptRequestSchema:()=>bg,GetPromptResultSchema:()=>kg,GetTaskPayloadRequestSchema:()=>Tee,GetTaskPayloadResultSchema:()=>Eee,GetTaskRequestSchema:()=>Cee,GetTaskResultSchema:()=>wee,IconSchema:()=>_h,IconsSchema:()=>vh,ImageContentSchema:()=>Sg,ImplementationSchema:()=>bh,InitializeRequestParamsSchema:()=>Th,InitializeRequestSchema:()=>Eh,InitializeResultSchema:()=>Oh,InitializedNotificationSchema:()=>kh,JSONArraySchema:()=>bee,JSONObjectSchema:()=>Jm,JSONRPCErrorResponseSchema:()=>dh,JSONRPCMessageSchema:()=>fh,JSONRPCNotificationSchema:()=>lh,JSONRPCRequestSchema:()=>ch,JSONRPCResponseSchema:()=>ph,JSONRPCResultResponseSchema:()=>uh,JSONValueSchema:()=>qm,LegacyTitledEnumSchemaSchema:()=>c_,ListChangedOptionsBaseSchema:()=>Bg,ListPromptsRequestSchema:()=>_g,ListPromptsResultSchema:()=>vg,ListResourceTemplatesRequestSchema:()=>Yh,ListResourceTemplatesResultSchema:()=>Xh,ListResourcesRequestSchema:()=>qh,ListResourcesResultSchema:()=>Jh,ListRootsRequestSchema:()=>O_,ListRootsResultSchema:()=>k_,ListTasksRequestSchema:()=>Dee,ListTasksResultSchema:()=>Oee,ListToolsRequestSchema:()=>Pg,ListToolsResultSchema:()=>Fg,LoggingLevelSchema:()=>Vg,LoggingMessageNotificationParamsSchema:()=>Wg,LoggingMessageNotificationSchema:()=>Gg,ModelHintSchema:()=>Kg,ModelPreferencesSchema:()=>qg,MultiSelectEnumSchemaSchema:()=>f_,NotificationSchema:()=>ih,NotificationsParamsSchema:()=>rh,NumberSchemaSchema:()=>a_,PaginatedRequestParamsSchema:()=>Ih,PaginatedRequestSchema:()=>Lh,PaginatedResultSchema:()=>Rh,PingRequestSchema:()=>Mh,PrimitiveSchemaDefinitionSchema:()=>m_,ProgressNotificationParamsSchema:()=>Ph,ProgressNotificationSchema:()=>Fh,ProgressSchema:()=>Nh,ProgressTokenSchema:()=>Ym,PromptArgumentSchema:()=>hg,PromptListChangedNotificationSchema:()=>Ag,PromptMessageSchema:()=>Og,PromptReferenceSchema:()=>C_,PromptSchema:()=>gg,ReadResourceRequestParamsSchema:()=>Qh,ReadResourceRequestSchema:()=>$h,ReadResourceResultSchema:()=>eg,RelatedTaskMetadataSchema:()=>Qm,RequestIdSchema:()=>sh,RequestMetaSchema:()=>$m,RequestSchema:()=>nh,ResourceContentsSchema:()=>zh,ResourceLinkSchema:()=>Eg,ResourceListChangedNotificationSchema:()=>tg,ResourceRequestParamsSchema:()=>Zh,ResourceSchema:()=>Gh,ResourceTemplateReferenceSchema:()=>S_,ResourceTemplateSchema:()=>Kh,ResourceUpdatedNotificationParamsSchema:()=>pg,ResourceUpdatedNotificationSchema:()=>mg,ResultMetaObjectSchema:()=>ah,ResultSchema:()=>oh,RoleSchema:()=>Uh,RootSchema:()=>D_,RootsListChangedNotificationSchema:()=>A_,SamplingContentSchema:()=>Xg,SamplingMessageContentBlockSchema:()=>Zg,SamplingMessageSchema:()=>Qg,ServerCapabilitiesSchema:()=>Dh,ServerNotificationSchema:()=>Fee,ServerRequestSchema:()=>Pee,ServerResultSchema:()=>Iee,ServerTasksCapabilitySchema:()=>Ch,SetLevelRequestParamsSchema:()=>Hg,SetLevelRequestSchema:()=>Ug,SingleSelectEnumSchemaSchema:()=>l_,StringSchemaSchema:()=>i_,SubscribeRequestParamsSchema:()=>ng,SubscribeRequestSchema:()=>rg,SubscriptionFilterSchema:()=>og,SubscriptionsAcknowledgedNotificationParamsSchema:()=>lg,SubscriptionsAcknowledgedNotificationSchema:()=>ug,SubscriptionsListenRequestParamsSchema:()=>sg,SubscriptionsListenRequestSchema:()=>cg,SubscriptionsListenResultMetaSchema:()=>dg,SubscriptionsListenResultSchema:()=>fg,TaskAugmentedRequestParamsSchema:()=>th,TaskCreationParamsSchema:()=>j_,TaskMetadataSchema:()=>Zm,TaskSchema:()=>N_,TaskStatusNotificationParamsSchema:()=>F_,TaskStatusNotificationSchema:()=>See,TaskStatusSchema:()=>M_,TextContentSchema:()=>xg,TextResourceContentsSchema:()=>Bh,TitledMultiSelectEnumSchemaSchema:()=>d_,TitledSingleSelectEnumSchemaSchema:()=>s_,ToolAnnotationsSchema:()=>jg,ToolChoiceSchema:()=>Jg,ToolExecutionSchema:()=>Mg,ToolListChangedNotificationSchema:()=>zg,ToolResultContentSchema:()=>Yg,ToolSchema:()=>Ng,ToolUseContentSchema:()=>wg,UnsubscribeRequestParamsSchema:()=>ig,UnsubscribeRequestSchema:()=>ag,UntitledMultiSelectEnumSchemaSchema:()=>u_,UntitledSingleSelectEnumSchemaSchema:()=>o_}),by=e=>ch.safeParse(e).success,xy=e=>lh.safeParse(e).success,Sy=e=>uh.safeParse(e).success,Cy=e=>dh.safeParse(e).success,wy=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&e.resultType===`input_required`,Ty=e=>Eh.safeParse(e).success,Ey=e=>kh.safeParse(e).success,Dy=`Mcp-Param-`,Oy=`x-mcp-header`,ky=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,Ay=new Set([`string`,`integer`,`boolean`,`number`]);function jy(e){let t=[],n=new Map,r=(e,i,a)=>{if(typeof e!=`object`||!e)return;let o=e;if(Oy in o){if(!a||i.length===0)return`${Py(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[Oy];if(typeof e!=`string`||e.length===0)return`${Py(i)}: x-mcp-header MUST be a non-empty string`;if(!ky.test(e))return`${Py(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||!Ay.has(r))return`${Py(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 My){let t=o[e];if(t===void 0)continue;let n=Array.isArray(t)?t:typeof t==`object`&&t&&Ny.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 My=[`items`,`prefixItems`,`contains`,`additionalProperties`,`unevaluatedProperties`,`unevaluatedItems`,`propertyNames`,`patternProperties`,`dependentSchemas`,`oneOf`,`anyOf`,`allOf`,`not`,`if`,`then`,`else`,`$defs`,`definitions`],Ny=new Set([`patternProperties`,`dependentSchemas`,`$defs`,`definitions`]);function Py(e){return e.length===0?`<root>`:e.join(`.`)}var Fy=`=?base64?`,Iy=`?=`;function Ly(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 Ry(e){if(e.length===0||e.startsWith(Fy)&&e.endsWith(Iy)||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 zy(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function By(e){return Ry(e)?`${Fy}${zy(e)}${Iy}`:e}function Vy(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}function Hy(e,t){let n={};for(let r of e){let e=Vy(t,r.path);if(e==null)continue;let i=Ly(e);i!==void 0&&(n[`${Dy}${r.headerName}`]=By(i))}return n}Nv.InvalidRequest,Nv.UnsupportedProtocolVersion,Nv.InvalidParams,Nv.MethodNotFound,Nv.InvalidParams,Nv.MissingRequiredClientCapability,Nv.ParseError,Nv.InvalidRequest,Nv.MethodNotFound,Nv.UnsupportedProtocolVersion,Nv.MissingRequiredClientCapability;var Uy={"tools/call":`name`,"prompts/get":`name`,"resources/read":`uri`,"tasks/get":`taskId`,"tasks/update":`taskId`,"tasks/cancel":`taskId`};function Wy(e,t){let n=Object.hasOwn(Uy,e)?Uy[e]:void 0;if(n===void 0)return;let r=Gy(t)?t[n]:void 0;return{field:n,value:typeof r==`string`?r:void 0}}function Gy(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ky(e,t){return vp(e,t)}function qy(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function Jy(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 Yy=!1,Xy=`draft-2020-12`;function Zy(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:Xy});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().`);Yy||(Yy=!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=op(e,{target:Xy,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&&Qy(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 Qy(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`||Qy(e)))}return!1}function rte(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function $y(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>rte(e)).join(`, `)}:{success:!0,data:n.value}}function ite(e){let t=op(e,{target:Xy,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var ate=/\\\.\\d\{(\d+)\}/;function ote(e){let t=ate.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=>cp({local:e,offset:t,precision:n}))))}function ste(e,t){let n;switch(e){case`email`:n=[Fp()];break;case`uri`:n=[zp()];break;case`date`:n=[up()];break;case`date-time`:n=ote(t);break}return new Set(n.map(e=>ite(e)).filter(e=>e!==void 0))}function cte(e,t,n){return n!==`zod`||ste(e,t).has(t)}function eb(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function lte(e){try{return Zy(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new Pv(Nv.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var ute=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function tb(e){return ute.has(e)||e.startsWith(`x-`)}var dte=new Set([`$schema`,...Object.keys(h_.shape.requestedSchema.shape)]),nb={string:qy([i_,o_,s_,c_]),number:qy([a_]),integer:qy([a_]),boolean:qy([r_]),array:qy([u_,d_])},fte=new Set(i_.shape.format.unwrap().options);function pte(e,t,n,r){if(!eb(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(nb,e.type)?nb[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||tb(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?fte.has(e.format)?(typeof s!=`string`||!cte(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function mte(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&eb(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,pte(n,`properties.${e}`,t,r)])):dte.has(i)?n[i]=a:tb(i)||r.push(i);if(r.length>0)throw new Pv(Nv.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function hte(e,t){if(!eb(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!Ky(m_,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function rb(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>rb(e,t[r],`${n}[${r}]`)):!eb(e)||!eb(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?rb(r,t[e],i):tb(e)?[]:[i]})}function gte(e){if(!Jy(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=mte(lte(e.requestedSchema),t),r=Ky(h_.shape.requestedSchema,n);if(!r.success)throw new Pv(Nv.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${hte(n,r.error.message)}`);let i=rb(n,r.data);if(i.length>0)throw new Pv(Nv.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 Pv(Nv.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function _te(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(_te,{elicit(e){try{return{method:`elicitation/create`,params:gte(e)}}catch(e){throw e instanceof Pv?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 vte=!0,yte=10,bte=250;function xte(e){return{autoFulfill:e?.autoFulfill??vte,maxRounds:e?.maxRounds??yte}}function Ste(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 Cte(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function wte(e,t){return new Promise((n,r)=>{if(t?.aborted){r(t.reason instanceof nv?t.reason:new nv(tv.RequestTimeout,String(t.reason)));return}let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e),a=()=>{clearTimeout(i),r(t?.reason instanceof nv?t.reason:new nv(tv.RequestTimeout,String(t?.reason)))};t?.addEventListener(`abort`,a,{once:!0})})}function Tte(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 Ete(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 nv(tv.InputRequiredRoundsExceeded,Cte(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=Tte(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 wte(bte,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 nv(tv.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:e});d.maxTotalTimeout=t}let f=await a.retry(Ste(r,u,c.requestState),d);if(wy(f)){c={inputRequests:f.inputRequests??{},...f.requestState!==void 0&&{requestState:f.requestState}};continue}return f}}var Dte=`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:H_,OAuthClientInformationFullSchema:q_,OAuthClientInformationSchema:K_,OAuthClientMetadataSchema:G_,OAuthClientRegistrationErrorSchema:J_,OAuthErrorResponseSchema:U_,OAuthMetadataSchema:R_,OAuthProtectedResourceMetadataSchema:L_,OAuthTokenRevocationRequestSchema:Y_,OAuthTokensSchema:V_,OpenIdProviderDiscoveryMetadataSchema:B_,OpenIdProviderMetadataSchema:z_},ib={},ab={};function ob(e,t){let n=e.slice(0,-6);ib[n]=t,ab[n]=e=>t.safeParse(e).success}for(let e of Dte)ob(e,yy[e]);for(let[e,t]of Object.entries(Ote))ob(e,t);Object.freeze(ib);var kte=Object.freeze(ab);function Ate(e){switch(e){case`initialize`:case`notifications/initialized`:return my(void 0);case`server/discover`:return my(py);default:return}}var jte=[Vm,Hm,Wm,Km],Mte=[`inputResponses`,`requestState`];function sb(e,t){let n=e.params;if(!ub(n))return{message:e,lifted:{}};let r=n._meta,i=ub(r)?jte.filter(e=>e in r):[],a=t===`request`?Mte.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&ub(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 cb(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 lb(e){return()=>e}var Nte=lb(void 0),Pte=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??vee,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 nv(tv.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!==void 0&&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 nv(tv.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),Sy(e)||Cy(e)?this._onresponse(e):by(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 nv(tv.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}=sb(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=hy(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(_y(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}=sb(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=hy(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(Nv.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(gy(n.method)&&!i.hasRequestMethod(n.method)){o(Nv.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(Nv.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(Nv.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:Ite(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?Nte:lb(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),Jy(t))return u(e,t,n);let i=cb(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(Nv.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:Nv.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),Sy(e)?n(e):n(Pv.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),Jy(t))return this._requestWithSchemaViaCodec(r,e,t,n);let i=cb(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 my(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=Ate(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(gy(t)&&!e.hasRequestMethod(t))throw new nv(tv.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 nv?e:new nv(tv.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?t.method!==`initialize`&&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 nv?e:new nv(tv.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(Vte(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;$y(n,o).then(e=>{e.success?d(e.data):f(new nv(tv.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 nv(tv.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 await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new nv(tv.NotConnected,`Not connected`);if(_y(t.method)&&!e.hasNotificationMethod(t.method))throw new nv(tv.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===void 0){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 Pv(Nv.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 $y(t.params,{...r.params});if(!a.success)throw new Pv(Nv.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(!_y(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 Pv(Nv.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 $y(t.params,{...r.params});if(!i.success)throw new Pv(Nv.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function ub(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Fte(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]=ub(a)&&ub(i)?{...a,...i}:i}return n}function db(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ite(e){let t={},n=[];if(!db(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!db(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function fb(e){throw new nv(tv.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 Lte(e,t,n,r,i){return{sessionId:i,mcpReq:{id:e,method:t,_meta:n?._meta,requestState:lb(void 0),signal:r,send:(()=>fb(`send`)),notify:()=>fb(`notify`)}}}async function Rte(e,t,n,r,i){if(!db(r)||typeof r.method!=`string`)throw new nv(tv.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 nv(tv.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 nv(tv.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=db(r.params)?r.params:void 0;return await o({jsonrpc:`2.0`,id:n,method:a,...s!==void 0&&{params:s}},e.buildContext(Lte(n,a,s,i,e.sessionId)))}function zte(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 Bte(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)=>Rte(e,i,t,n,r),retry:(e,t)=>r.retry(e,zte(o,t))};return Ete({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 Vte(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}var Hte=Ds(ws((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 Ute(e){if(e)try{return Hte.parse(e).type}catch{let t=(e.split(`;`,1)[0]??``).trim().toLowerCase();return t===``||e.slice(t.length).includes(`,`)?void 0:t}}function pb(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function Wte(e=fetch,t){return t?async(n,r)=>e(n,{...t,...r,headers:r?.headers?{...pb(t.headers),...pb(r.headers)}:t.headers}):e}function mb(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(!mb(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(!mb(e[r],t[r]))return!1;return!0}return e===t}function hb(e){return encodeURI(Gte(e))}function Gte(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}var Kte={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},qte={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},Jte={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},Yte=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 gb(e,t=Object.create(null),n=Yte,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:gb(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(Jte[i])continue;let a=`${r}/${hb(i)}`,o=e[i];if(Array.isArray(o)){if(Kte[i]){let e=o.length;for(let r=0;r<e;r++)gb(o[r],t,n,`${a}/${r}`)}}else if(qte[i])for(let e in o)gb(o[e],t,n,`${a}/${hb(e)}`);else gb(o,t,n,a)}return t}var Xte=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Zte=[0,31,28,31,30,31,30,31,31,30,31,30,31],Qte=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,$te=/^(?=.{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,ene=/^(?:[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,tne=/^(?:(?:[^\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,nne=/^(?:(?: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,rne=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,ine=/^(?:\/(?:[^~/]|~0|~1)*)*$/,ane=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,one=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,sne=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))},cne=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,lne=/^((([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,une=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 _b(e){return e.test.bind(e)}var vb={date:yb,time:bb.bind(void 0,!1),"date-time":pne,duration:une,uri:gne,"uri-reference":_b(ene),"uri-template":_b(tne),url:_b(nne),email:sne,hostname:_b($te),ipv4:_b(cne),ipv6:_b(lne),regex:vne,uuid:_b(rne),"json-pointer":_b(ine),"json-pointer-uri-fragment":_b(ane),"relative-json-pointer":_b(one)};function dne(e){return e%4==0&&(e%100!=0||e%400==0)}function yb(e){let t=e.match(Xte);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&dne(n)?29:Zte[r])}function bb(e,t){let n=t.match(Qte);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 fne=/t|\s/i;function pne(e){let t=e.split(fne);return t.length==2&&yb(t[0])&&bb(!0,t[1])}var mne=/\/|:/,hne=/^(?:[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 gne(e){return mne.test(e)&&hne.test(e)}var _ne=/[^\\]\\Z/;function vne(e){if(_ne.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}function yne(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 xb(e,t,n=`2019-09`,r=gb(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=xb(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=xb(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`?mb(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=>mb(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`;xb(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=xb(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=xb(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=xb(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(xb(e,S,n,r,i,a,o,t,c).valid){if(C!==void 0){let l=xb(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=xb(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}/${hb(s)}`,c=xb(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=xb(e,P[t],n,r,i,a,o,`${l}/${hb(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=xb(e,c,n,r,i,a,o,`${t}/${hb(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}/${hb(s)}`,f=xb(e[s],E[s],n,r,i,a,d,`${t}/${hb(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}/${hb(p)}`,h=xb(e[p],f,n,r,i,a,m,`${t}/${hb(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}/${hb(s)}`,f=xb(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}/${hb(s)}`,u=xb(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=xb(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=xb(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=xb(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=xb(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=xb(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=xb(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&&mb(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:yne(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&&vb[T]&&!vb[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 bne=class{schema;draft;shortCircuit;lookup;constructor(e,t=`2019-09`,n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=gb(e)}validate(e){return xb(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),gb(e,this.lookup)}},xne=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=Ns(e,`pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`);return t===`draft-7`?`7`:t}getValidator(e){let t=new bne(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(`; `)}}}},Sb=globalThis.crypto;async function Sne(e){return(await Sb).getRandomValues(new Uint8Array(e))}async function Cne(e){let t=``;for(;t.length<e;){let n=await Sne(e-t.length);for(let e of n)e<198&&(t+=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~`[e%66])}return t}async function wne(e){return await Cne(e)}async function Tne(e){let t=await(await Sb).subtle.digest(`SHA-256`,new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,`_`).replace(/\+/g,`-`).replace(/=/g,``)}async function Ene(e){if(e||=43,e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await wne(e);return{code_verifier:t,code_challenge:await Tne(t)}}var Cb=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}},wb=10,Dne=13,Tb=32;function Eb(e){}function One(e){if(typeof e==`function`)throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{onEvent:t=Eb,onError:n=Eb,onRetry:r=Eb,onComment:i,maxBufferSize:a}=e,o=[],s=0,c=!0,l,u=``,d=0,f,p=!1;function m(e){if(p)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(c&&(c=!1,e.charCodeAt(0)===239&&e.charCodeAt(1)===187&&e.charCodeAt(2)===191&&(e=e.slice(3))),o.length===0){let t=g(e);t!==``&&(o.push(t),s=t.length),h();return}if(e.indexOf(`
|
|
75
|
+
`)===-1&&e.indexOf(`\r`)===-1){o.push(e),s+=e.length,h();return}o.push(e);let t=o.join(``);o.length=0,s=0;let n=g(t);n!==``&&(o.push(n),s=n.length),h()}function h(){a!==void 0&&(s+u.length<=a||(p=!0,o.length=0,s=0,l=void 0,u=``,d=0,f=void 0,n(new Cb(`Buffered data exceeded max buffer size of ${a} characters`,{type:`max-buffer-size-exceeded`}))))}function g(e){let n=0;if(e.indexOf(`\r`)===-1){let r=e.indexOf(`
|
|
76
|
+
`,n);for(;r!==-1;){if(n===r){d>0&&t({id:l,event:f,data:u}),l=void 0,u=``,d=0,f=void 0,n=r+1,r=e.indexOf(`
|
|
77
|
+
`,n);continue}let i=e.charCodeAt(n);if(Db(e,n,i)){let i=e.charCodeAt(n+5)===Tb?n+6:n+5,a=e.slice(i,r);if(d===0&&e.charCodeAt(r+1)===wb){t({id:l,event:f,data:a}),l=void 0,u=``,f=void 0,n=r+2,r=e.indexOf(`
|
|
78
|
+
`,n);continue}u=d===0?a:`${u}
|
|
79
|
+
${a}`,d++}else Ob(e,n,i)?f=e.slice(e.charCodeAt(n+6)===Tb?n+7:n+6,r)||void 0:_(e,n,r);n=r+1,r=e.indexOf(`
|
|
80
|
+
`,n)}return e.slice(n)}for(;n<e.length;){let t=e.indexOf(`\r`,n),r=e.indexOf(`
|
|
81
|
+
`,n),i=-1;if(t!==-1&&r!==-1?i=t<r?t:r:t===-1?r!==-1&&(i=r):i=t===e.length-1?-1:t,i===-1)break;_(e,n,i),n=i+1,e.charCodeAt(n-1)===Dne&&e.charCodeAt(n)===wb&&n++}return e.slice(n)}function _(e,t,n){if(t===n){y();return}let r=e.charCodeAt(t);if(Db(e,t,r)){let r=e.charCodeAt(t+5)===Tb?t+6:t+5,i=e.slice(r,n);u=d===0?i:`${u}
|
|
82
|
+
${i}`,d++;return}if(Ob(e,t,r)){f=e.slice(e.charCodeAt(t+6)===Tb?t+7:t+6,n)||void 0;return}if(r===105&&e.charCodeAt(t+1)===100&&e.charCodeAt(t+2)===58){let r=e.slice(e.charCodeAt(t+3)===Tb?t+4:t+3,n);r.includes(`\0`)||(l=r);return}if(r===58){if(i){let r=e.slice(t,n);i(r.slice(e.charCodeAt(t+1)===Tb?2:1))}return}let a=e.slice(t,n),o=a.indexOf(`:`);if(o===-1){v(a,``,a);return}let s=a.slice(0,o),c=a.charCodeAt(o+1)===Tb?2:1;v(s,a.slice(o+c),a)}function v(e,t,i){switch(e){case`event`:f=t||void 0;break;case`data`:u=d===0?t:`${u}
|
|
83
|
+
${t}`,d++;break;case`id`:t.includes(`\0`)||(l=t);break;case`retry`:/^\d+$/.test(t)?r(parseInt(t,10)):n(new Cb(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new Cb(`Unknown field "${e.length>20?`${e.slice(0,20)}\u2026`:e}"`,{type:`unknown-field`,field:e,value:t,line:i}));break}}function y(){d>0&&t({id:l,event:f,data:u}),l=void 0,u=``,d=0,f=void 0}function b(e={}){if(e.consume&&o.length>0){let e=o.join(``);_(e,0,e.length)}c=!0,l=void 0,u=``,d=0,f=void 0,o.length=0,s=0,p=!1}return{feed:m,reset:b}}function Db(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function Ob(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}var kne=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n,maxBufferSize:r}={}){let i;super({start(a){i=One({onEvent:e=>{a.enqueue(e)},onError(t){typeof e==`function`&&e(t),(e===`terminate`||t.type===`max-buffer-size-exceeded`)&&a.error(t)},onRetry:t,onComment:n,maxBufferSize:r})},transform(e){i.feed(e)}})}},kb=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return Q_(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 Q_(this,e)}constructor(e){super(e),this.name=new.target.name,Z_(this,new.target)}},Ab=class extends kb{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}},Ane=class extends kb{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}},jb=class extends kb{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 / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},Mb=class extends kb{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}},jne=class extends kb{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 Nb(e,t,n){if(e)return typeof e.issuer==`string`?Pb(e.issuer,t)?e: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.issuer===void 0?e:{...e,issuer:void 0})}function Pb(e,t){return e===t||e.endsWith(`/`)&&e.slice(0,-1)===t||t.endsWith(`/`)&&t.slice(0,-1)===e}function Mne(e){if(e==null)return!1;let t=e;return typeof t.tokens==`function`&&typeof t.clientInformation==`function`}async function Nne(e,t,n){let{resourceMetadataUrl:r,scope:i}=Kb(t.response);if(await Wb(e,{serverUrl:t.serverUrl,resourceMetadataUrl:r,scope:i,fetchFn:t.fetchFn,...n})!==`AUTHORIZED`)throw new Fb}function Pne(e,t){return{token:async()=>(await e.tokens())?.access_token,onUnauthorized:async n=>Nne(e,n,t)}}var Fb=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return Q_(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 Q_(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,Z_(this,new.target)}};function Ib(e){return e?.authorization_response_iss_parameter_supported===!0}function Lb({iss:e,expectedIssuer:t,issParameterSupported:n}){if(t!==void 0){if(e===void 0){if(n)throw new Ab(`authorization_response`,t,void 0);return}if(e!==t)throw new Ab(`authorization_response`,t,e)}}function Rb(...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 Fne(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 Ine(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 tx(r,i)).authorizationServerMetadata}catch{s=void 0}if(!s)throw new Fb(`Authorization callback failed and the issuer could not be verified`);Lb({iss:a,expectedIssuer:s.issuer,issParameterSupported:Ib(s)});let c=e.get(`error`);throw c?new ev(c,e.get(`error_description`)??c,e.get(`error_uri`)??void 0):new Fb("Authorization callback contained neither `code` nor `error`")}function Lne(e){return[`client_secret_basic`,`client_secret_post`,`none`].includes(e)}var zb=`code`,Bb=`S256`;function Rne(e,t){let n=e.client_secret!==void 0;return`token_endpoint_auth_method`in e&&e.token_endpoint_auth_method&&Lne(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 zne(e,t,n,r){let{client_id:i,client_secret:a}=t;switch(e){case`client_secret_basic`:Bne(i,a,n);return;case`client_secret_post`:Vne(i,a,r);return;case`none`:Hne(i,r);return;default:throw Error(`Unsupported client authentication method: ${e}`)}}function Bne(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 Vne(e,t,n){n.set(`client_id`,e),t&&n.set(`client_secret`,t)}function Hne(e,t){t.set(`client_id`,e)}function Vb(e){return e===`localhost`||e.endsWith(`.localhost`)||e===`127.0.0.1`||e===`[::1]`||e===`::1`}function Une(e){let t=new URL(String(e));if(t.protocol!==`https:`&&!Vb(t.hostname))throw new jb(t.href);return t}function Wne(e){for(let t of e??[]){let e;try{e=new URL(t)}catch{continue}if(e.protocol!==`http:`&&e.protocol!==`https:`||Vb(e.hostname))return`native`}return`web`}function Gne(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??Wne(t.redirect_uris)}}async function Hb(e){let t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{let e=U_.parse(JSON.parse(n));return ev.fromResponse(e)}catch(e){let r=`${t?`HTTP ${t}: `:``}Invalid OAuth error response: ${e}. Raw body: ${n}`;return new ev($_.ServerError,r)}}function Ub(e,t,n){let r=e.invalidateCredentials===void 0?`retrying authorization without discarding the stored ${n} (provider implements no invalidateCredentials())`:`invalidating the stored ${n} and retrying authorization`;console.warn(`[mcp-sdk] OAuth ${JSON.stringify(t.code)} — ${r}. Cause: ${JSON.stringify(t.message)}`)}async function Wb(e,t){try{return await Gb(e,t)}catch(n){if(n instanceof ev){if(n.code===$_.InvalidClient||n.code===$_.UnauthorizedClient)return Ub(e,n,`client credentials and tokens`),await e.invalidateCredentials?.(`client`),await e.invalidateCredentials?.(`tokens`),await Gb(e,t);if(n.code===$_.InvalidGrant||n.code===$_.InvalidDpopProof)return Ub(e,n,`tokens`),await e.invalidateCredentials?.(`tokens`),await Gb(e,t)}throw n}}function Kne(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 Gb(e,{serverUrl:t,authorizationCode:n,iss:r,scope:i,resourceMetadataUrl:a,fetchFn:o,skipIssuerMetadataValidation:s,forceReauthorization:c}){let l=Gne(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 ex(f,{fetchFn:o,skipIssuerValidation:s}),!d)try{d=await Jb(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 tx(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 Mb(`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(!Pb(t,g))throw new Mb(t,g)}m&&await e.saveDiscoveryState?.(m);let v=await Jne(t,e,d),y=v&&d&&!e.validateResourceURL?d.resource:v;y&&await e.saveResourceUrl?.(nx(y));let b=Kne({requestedScope:i,resourceMetadata:d,authServerMetadata:p,clientMetadata:e.clientMetadata}),x=await Promise.resolve(e.clientInformation(_)),S=Nb(x,g,{canPersistStamp:e.saveClientInformation!==void 0});if(S===void 0&&x?.issuer&&e.saveClientInformation===void 0)throw new Mb(x.issuer,g);if(S&&S.issuer===void 0&&(S={...S,issuer:g},await e.saveClientInformation?.(S,_)),!S){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&&!qne(r))throw new ev($_.InvalidClientMetadata,`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${r}`);if(t&&r)S={client_id:r,issuer:g},await e.saveClientInformation?.(S,_);else{if(!e.saveClientInformation)throw Error(`OAuth client information must be saveable for dynamic registration`);S={...await cx(f,{metadata:p,clientMetadata:l,scope:b,fetchFn:o}),issuer:g},await e.saveClientInformation(S,_)}}let C=!e.redirectUrl;if(n!==void 0||C){n!==void 0&&Lb({iss:r,expectedIssuer:p?.issuer,issParameterSupported:Ib(p)});let t=await sx(e,f,{metadata:p,resource:y,authorizationCode:n,iss:r,scope:b,fetchFn:o});return await e.saveTokens({...t,issuer:g},_),`AUTHORIZED`}let w=Nb(await e.tokens(_),g);if(w&&w.issuer===void 0&&(w={...w,issuer:g},await e.saveTokens(w,_)),w?.refresh_token&&!c){let t;try{t=await ox(f,{metadata:p,clientInformation:S,refreshToken:w.refresh_token,resource:y,addClientAuthentication:e.addClientAuthentication,dpop:await e.dpop?.(),fetchFn:o})}catch(e){if(e instanceof jb)throw e;if(!(e instanceof ev)||e.code===$_.ServerError)console.warn(`[mcp-sdk] Could not refresh OAuth tokens; falling back to a new authorization request. Cause: ${JSON.stringify(e instanceof Error?e.message:String(e))}`);else throw e}if(t)return await e.saveTokens({...t,issuer:g},_),`AUTHORIZED`}let T=e.state?await e.state():void 0,{authorizationUrl:E,codeVerifier:D}=await rx(f,{metadata:p,clientInformation:S,state:T,redirectUrl:e.redirectUrl,scope:b,resource:y});return await e.saveCodeVerifier(D),await e.redirectToAuthorization(E),`REDIRECT`}function qne(e){if(!e)return!1;try{let t=new URL(e);return t.protocol===`https:`&&t.pathname!==`/`}catch{return!1}}async function Jne(e,t,n){let r=iv(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!ov({requestedResource:r,configuredResource:n.resource}))throw Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}var Yne=new Set([`bearer`,`dpop`]);function Kb(e){let t=e.headers.get(`WWW-Authenticate`);if(!t)return{};let[n,r]=t.split(` `);if(!n||!Yne.has(n.toLowerCase())||!r)return{};let i=qb(e,`resource_metadata`)||void 0,a;if(i)try{a=new URL(i)}catch{}let o=qb(e,`scope`)||void 0,s=qb(e,`error`)||void 0,c=qb(e,`error_description`)||void 0;return{resourceMetadataUrl:a,scope:o,error:s,errorDescription:c}}function qb(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 Jb(e,t,n=fetch){let r=await Qb(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 L_.parse(await r.json())}async function Yb(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 Xne(e,t=``,n={}){return t.endsWith(`/`)&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function Xb(e,t,n=fetch){return await Yb(e,{"MCP-Protocol-Version":t},n)}function Zb(e,t){return e?t===`/`?!1:e.status>=400&&e.status<500||e.status===502:!0}async function Qb(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=Xne(t,i.pathname);o=new URL(e,r?.metadataServerUrl??i),o.search=i.search}let s=await Xb(o,a,n);return!r?.metadataUrl&&Zb(s,i.pathname)&&(s=await Xb(new URL(`/.well-known/${t}`,i),a,n)),s}function $b(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 ex(e,{fetchFn:t=fetch,protocolVersion:n=Bm,skipIssuerValidation:r=!1}={}){let i={"MCP-Protocol-Version":n,Accept:`application/json`},a=$b(e);for(let{url:n,type:o}of a){let a=await Yb(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`?R_.parse(await a.json()):B_.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 Ab(`metadata`,t,s.issuer)}return s}}async function tx(e,t){let n,r;try{n=await Jb(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 ex(r,{fetchFn:t?.fetchFn,skipIssuerValidation:t?.skipIssuerMetadataValidation});return{authorizationServerUrl:r,authorizationServerMetadata:i,resourceMetadata:n}}function nx(e){return typeof e==`string`?e:e.href}async function rx(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(zb))throw Error(`Incompatible auth server: does not support response type ${zb}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(Bb))throw Error(`Incompatible auth server: does not support code challenge method ${Bb}`)}else s=new URL(`/authorize`,e);let c=await Ene(),l=c.code_verifier,u=c.code_challenge;return s.searchParams.set(`response_type`,zb),s.searchParams.set(`client_id`,n.client_id),s.searchParams.set(`code_challenge`,u),s.searchParams.set(`code_challenge_method`,Bb),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`,nx(o)),{authorizationUrl:s,codeVerifier:l}}function ix(e,t,n){return new URLSearchParams({grant_type:`authorization_code`,code:e,code_verifier:t,redirect_uri:String(n)})}async function ax(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:i,resource:a,dpop:o,fetchFn:s}){let c=Une(t?.token_endpoint??new URL(`/token`,e)),l=new Headers({"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`});a&&n.set(`resource`,nx(a)),!i&&r&&zne(Rne(r,t?.token_endpoint_auth_methods_supported??[]),r,l,n);let u=async()=>{let e=new Headers(l);return i&&await i(e,n,c,t),o&&e.set(`DPoP`,await o.buildProof({htm:`POST`,htu:c})),(s??fetch)(c,{method:`POST`,headers:e,body:n})},d=await u();if(o&&d.status===400&&(await d.clone().json().catch(()=>{}))?.error===$_.UseDpopNonce&&(o.observeNonce(d,c),d=await u()),o?.observeNonce(d,c),!d.ok)throw await Hb(d);let f=await d.json();try{return V_.parse(av(f))}catch(e){throw typeof f==`object`&&f&&`error`in f?await Hb(JSON.stringify(f)):e}}async function ox(e,{metadata:t,clientInformation:n,refreshToken:r,resource:i,addClientAuthentication:a,dpop:o,fetchFn:s}){return{refresh_token:r,...await ax(e,{metadata:t,tokenRequestParams:new URLSearchParams({grant_type:`refresh_token`,refresh_token:r}),clientInformation:n,addClientAuthentication:a,resource:i,dpop:o,fetchFn:s})}}async function sx(e,t,{metadata:n,resource:r,authorizationCode:i,iss:a,scope:o,fetchFn:s}={}){i!==void 0&&Lb({iss:a,expectedIssuer:n?.issuer,issParameterSupported:Ib(n)});let c=n?.issuer??String(t),l=async()=>{let t=await e.clientInformation({issuer:c}),n=Nb(t,c,{canPersistStamp:!1});if(t&&n===void 0)throw new Mb(String(t.issuer),c);return n},u=await l(),d=o??e.clientMetadata.scope,f;if(e.prepareTokenRequest&&(f=await e.prepareTokenRequest(d)),!f){if(!i)throw Error(`Either provider.prepareTokenRequest() or authorizationCode is required`);if(!e.redirectUrl)throw Error(`redirectUrl is required for authorization_code flow`);f=ix(i,await e.codeVerifier(),e.redirectUrl)}return u??=await l(),ax(t,{metadata:n,tokenRequestParams:f,clientInformation:u,addClientAuthentication:e.addClientAuthentication,resource:r,dpop:await e.dpop?.(),fetchFn:s})}async function cx(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 Ane({status:s.status,body:await s.text(),submittedMetadata:o});return q_.parse(av(await s.json()))}var lx=new Set([`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`server/discover`]),ux=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(dx(e))}set(e,t){let n=dx(e),r=lx.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(!lx.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(dx(e))&&!lx.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\0`,n=lx.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 dx(e){return`${e.method}\0${JSON.stringify([e.partition??``,e.params??``])}`}function fx(e,t){return t===void 0?e:`${e}\0${t}`}var px=864e5,mx=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=fx(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=fx(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(fx(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:hx(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 hx(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 gx=Symbol.for(`mcp.authSeamEscape`);function _x(e){if(typeof e==`object`&&e||typeof e==`function`)try{Object.defineProperty(e,gx,{value:!0,configurable:!0})}catch{}return e}function vx(e){return(typeof e==`object`&&!!e||typeof e==`function`)&&e[gx]===!0}var yx=-32022,bx=new Set([-32001,-32020,-32021]);function xx(e,t){switch(e.kind){case`result`:return Sx(e.result,t);case`rpc-error`:return Cx(e,t);case`http-error`:return wx(e,t);case`network-error`:return Tx(e.error,t);case`auth-required`:return{kind:`error`,error:e.error};case`closed`:return t.transportKind===`stdio`?{kind:`legacy`}:Tx(Error(`Connection closed during the version negotiation probe`),t);case`timeout`:return t.transportKind===`stdio`?{kind:`legacy`}:{kind:`error`,error:new nv(tv.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}function Sx(e,t){let n=my(py).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 Fv({supported:[...r],requested:t.requestedVersion})}:{kind:`modern`,version:i,discover:n.value}}function Cx(e,t){let{code:n,message:r,data:i}=e;if(n===yx){let e=Ox(i);if(e===void 0)return{kind:`legacy`};let n=new Fv({supported:e,requested:kx(i)??t.requestedVersion},r),a=dv(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 bx.has(n),{kind:`legacy`}}function wx(e,t){if(e.status===401||e.status===403){let t=e.status===403;return{kind:`error`,error:new rv(t?tv.ClientHttpForbidden:tv.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 rv(tv.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let n=Ax(e.body);return n===void 0?{kind:`legacy`}:Cx(n,t)}function Tx(e,t){return t.environment===`browser`&&Ex(e)?{kind:`legacy`}:{kind:`error`,error:new nv(tv.EraNegotiationFailed,`Version negotiation probe failed: ${Dx(e)}`,{cause:e},{cause:e})}}function Ex(e){return e instanceof TypeError||e instanceof Error&&e.name===`TypeError`}function Dx(e){return e instanceof Error?e.message:String(e)}function Ox(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 kx(e){if(typeof e!=`object`||!e)return;let t=e.requested;return typeof t==`string`?t:void 0}function Ax(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 jx=`legacy`;function Mx(e,t){let n=e?.mode??jx;if(n===`legacy`)return{kind:`legacy`};let r=e?.probe??{};if(typeof n==`object`){if(!lv(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?dv(t):[];return{kind:`auto`,modernVersions:i.length>0?i:[...cv],fallbackAvailable:!t||uv(t).length>0,probe:r}}function Nx(){let e=globalThis;return e.window!==void 0&&e.document!==void 0?`browser`:`node`}function Px(e){return`stderr`in e&&`pid`in e?`stdio`:`http`}var Fx=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&&(Sy(e)||Cy(e))&&e.id===t.id){n._pending=void 0,Sy(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,Ix.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)}}},Ix=new WeakMap;function Lx(e){let t=Ix.get(e);Ix.delete(e),t?.()}function Rx(e,t,n,r){return{jsonrpc:`2.0`,id:e,method:`server/discover`,params:{_meta:my(t).outboundEnvelope({protocolVersion:t,clientInfo:n,clientCapabilities:r})}}}function zx(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(vx(t)||t instanceof Fb||t instanceof Error&&t.name===`UnauthorizedError`)return{kind:`auth-required`,error:t};if(t instanceof rv){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 Bx(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 Fx.open(t.transport),s=async()=>{let s=i[0],c=!1,l=r;for(;;){let r=await o.exchange(e=>Rx(e,s,t.clientInfo,t.capabilities),n);if(r.kind===`timeout`&&l>0){l--;continue}let u=zx(r,n),d=xx(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 nv(tv.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 nv(tv.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 nv(tv.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 Vx(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 Hx(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(Ux())});t.close=async function(){return s=!0,c?.(),o.call(t)};let u;try{let t=Bx(e,{...r,transport:a,transportKind:`stdio`,disposableProbe:!0});t.catch(()=>{}),u=await Promise.race([t,l])}finally{await Wx(a),t.close=o}if(s)throw Ux();return u}function Ux(){return new nv(tv.EraNegotiationFailed,`Version negotiation failed: the transport was closed during the server/discover probe`)}async function Wx(e){try{let t=e._dispose;await(typeof t==`function`?t.call(e):e.close())}catch{}}function Gx(e){let t=e._meta?.[Um];return kte.Implementation(t)?t:void 0}function Kx(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&&Kx(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&Kx(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&Kx(n,t)}}function qx(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 Jx(e){if(typeof e==`object`&&e&&(e.kind===`legacy`&&!(`supportedVersions`in e)&&!(`discover`in e)||e.kind===`modern`&&jh.safeParse(e.discover).success))return e;throw new nv(tv.EraNegotiationFailed,`connect({ prior }): unrecognized prior — expected { kind: 'modern', discover } or { kind: 'legacy' }`)}var Yx={"notifications/tools/list_changed":[`tools/list`],"notifications/prompts/list_changed":[`prompts/list`],"notifications/resources/list_changed":[`resources/list`,`resources/templates/list`]},Xx=64,Zx=class extends Pte{_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 nv(tv.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 xne,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=xte(t?.inputRequired),this._cache=new mx(t?.responseCacheStore??new ux,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??``),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??Xx,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(this._negotiatedProtocolVersion!==void 0&&lv(this._negotiatedProtocolVersion)&&by(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?Bte({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new nv(tv.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=Fte(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=my(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 Pv(i.reason===`not-in-era`?Nv.InternalError:Nv.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}=qx(this._capabilities.elicitation);if(a.mode===`form`&&!o)throw new Pv(Nv.InvalidParams,`Client does not support form-mode elicitation requests`);if(a.mode===`url`&&!s)throw new Pv(Nv.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 Pv(l.reason===`not-in-era`?Nv.InternalError:Nv.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{Kx(d,u.content)}catch{}return u}:e===`sampling/createMessage`?async(e,n)=>{let r=my(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 Pv(i.reason===`not-in-era`?Nv.InternalError:Nv.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 Pv(c.reason===`not-in-era`?Nv.InternalError:Nv.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 nv(tv.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,Jx(t.prior),t);let n=Mx(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=uv(this._supportedProtocolVersions);try{let r=n[0];if(r===void 0)throw new nv(tv.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=Px(e),a={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:Nx(),defaultTimeoutMs:n?.timeout??6e4},o=i===`stdio`?Vx(e):void 0;r=o===void 0?await Bx(t,{...a,transport:e,transportKind:i}):await Hx(t,e,o,a)}catch(t){throw await e.close().catch(()=>{}),Lx(e),t}if(Lx(e),await super.connect(e),r.era===`legacy`){await this._legacyHandshake(e,n);return}if(this._serverCapabilities=r.discover.capabilities,this._serverVersion=Gx(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&&dv(i).length>0?dv(i):cv).find(e=>r.supportedVersions.includes(e));if(a===void 0)throw new nv(tv.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=Gx(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 lv(e)?`modern`:`legacy`}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw new nv(tv.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw new nv(tv.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 nv(tv.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw new nv(tv.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw new nv(tv.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw new nv(tv.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 nv(tv.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 nv(tv.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw new nv(tv.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw new nv(tv.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`},jh,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=>e.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=>e.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=>e.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=s,u=1;for(;c!==void 0;){if(this._listMaxPages!==0&&u>=this._listMaxPages)throw new nv(tv.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});let i=await this.request({method:e,params:{...t,cursor:c}},n);if(i.nextCursor===c&&JSON.stringify(r(i))===JSON.stringify(r(l)))break;r(s).push(...r(i)),l=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),px),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 nv?e:new nv(tv.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:jy(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 nv(tv.NotConnected,`Not connected`);let n=this._negotiatedProtocolVersion;if(n===void 0||!lv(n))throw new nv(tv.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 nv?e:new nv(tv.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 nv(tv.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 nv(tv.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}},v=e=>{p({cause:`remote`,error:e instanceof Error?e:Error(String(e))})};try{this.transport.send(_,{requestSignal:r.signal,onRequestStreamEnd:()=>p({cause:`remote`,error:Error(`subscriptions/listen: stream ended`)})}).catch(v)}catch(e){v(e)}return{honoredFilter:await u,close:h,closed:f}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let n=Object.hasOwn(Yx,e.method)?Yx[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?.[Gm],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){Cy(e)?n.settle({cause:`remote`,error:Pv.fromError(e.error.code,e.error.message,e.error.data)}):n.settle({cause:`graceful`,error:new nv(tv.ConnectionClosed,`subscriptions/listen: server closed the subscription gracefully before acknowledging`)});return}super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new nv(tv.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`&&Nx()!==`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=Hy(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 Pv(Nv.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 Pv&&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 Pv(Nv.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 Pv(Nv.InvalidParams,`Structured content does not match the tool's output schema: ${e.errorMessage}`)}catch(e){throw e instanceof Pv?e:new Pv(Nv.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=>e.tools,e=>this._excludeInvalidXMcpHeaderTools(e)):n}_excludeInvalidXMcpHeaderTools(e){if(this.getProtocolEra()!==`modern`||!this.transport||Px(this.transport)===`stdio`)return;let t=e.tools.filter(e=>{let t=jy(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=Ky(Bg,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`})}};function Qx(e){return/(?:^|,)\s*dpop(?:\s|$|,)/i.test(e)}function $x(e){if(e.status!==401)return!1;let t=e.headers.get(`www-authenticate`)??``;return Qx(t)&&/use_dpop_nonce/i.test(t)}var eS=(e,t)=>n=>{let r=typeof e==`function`?e:()=>e;return async(e,i)=>{let a=(i?.method??`GET`).toUpperCase(),o=new URL(e.toString()),s=await r();if(!s)return n(e,i);let c=async()=>{let r=await t();if(!r)return n(e,i);let c=new Headers(i?.headers),l=await s.buildProof({htm:a,htu:o,accessToken:r});return c.set(`Authorization`,`DPoP ${r}`),c.set(`DPoP`,l),n(e,{...i,headers:c})},l=await c();return $x(l)&&l.headers.has(`dpop-nonce`)&&(s.observeNonce(l,o),await l.text?.().catch(()=>{}),l=await c()),s.observeNonce(l,o),l}},tS=e=>eS(async()=>{try{return await e.dpop?.()}catch(e){throw _x(e)}},async()=>{let t;try{t=await e.tokens()}catch(e){throw _x(e)}return t?.token_type?.toLowerCase()===`dpop`?t.access_token:void 0});(class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return Q_(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 Q_(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,Z_(this,new.target)}});var nS=1,rS={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2},iS=new Set([`authorization`,`dpop`,`content-type`,`mcp-protocol-version`,`mcp-method`,`mcp-name`,`mcp-session-id`]);function aS(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 oS=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,this._fetch=t?.fetch,Mne(t?.authProvider)?(this._oauthProvider=t.authProvider,this._authProvider=Pne(t.authProvider,{skipIssuerMetadataValidation:t.skipIssuerMetadataValidation}),t.authProvider.dpop&&(this._fetch=tS(t.authProvider)(t.fetch??fetch))):this._authProvider=t?.authProvider,this._fetchWithInit=Wte(t?.fetch,t?.requestInit),this._sessionId=t?.sessionId,this._protocolVersion=t?.protocolVersion,this._reconnectionOptions=t?.reconnectionOptions??rS,this._reconnectionScheduler=t?.reconnectionScheduler,this._onInsufficientScope=t?.onInsufficientScope??`reauthorize`,this._maxStepUpRetries=Math.max(0,t?.maxStepUpRetries??nS)}async _stepUpAuthorize(e,t){try{return await this._stepUpAuthorizeInner(e,t)}catch(e){throw _x(e)}}async _stepUpAuthorizeInner(e,t){if(this._onInsufficientScope===`throw`||!this._oauthProvider)throw new jne({requiredScope:e.scope,resourceMetadataUrl:e.resourceMetadataUrl,errorDescription:e.errorDescription});if(t>=this._maxStepUpRetries)throw new rv(tv.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=Rb(this._scope,n?.scope,e.scope);this._scope=r;let i=Fne(r,n?.scope);return Wb(this._oauthProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:r,forceReauthorization:i,fetchFn:this._fetchWithInit,skipIssuerMetadataValidation:this._skipIssuerMetadataValidation})}async _commonHeaders(){let e=new Headers(this._requestInit?.headers||void 0),t;try{t=await this._authProvider?.token()}catch(e){throw _x(e)}return t&&e.set(`Authorization`,`Bearer ${t}`),this._sessionId&&e.set(`mcp-session-id`,this._sessionId),this._protocolVersion&&e.set(`mcp-protocol-version`,this._protocolVersion),e}_applyBodyDerivedHeaders(e,t){if(Array.isArray(t)||!by(t))return;let n=t.params?._meta?.[Vm];if(typeof n!=`string`)return;e.set(`mcp-protocol-version`,n),e.set(`mcp-method`,t.method);let r=Wy(t.method,t.params);r?.value!==void 0&&e.set(`mcp-name`,By(r.value))}_isModernEnvelopedRequest(e){if(Array.isArray(e)||!by(e))return!1;let t=e.params?._meta?.[Vm];return typeof t==`string`&&lv(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?aS(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}=Kb(l);this._resourceMetadataUrl=e,this._scope=Rb(this._scope,t)}if(this._authProvider.onUnauthorized&&!t){try{await this._authProvider.onUnauthorized({response:l,serverUrl:this._url,fetchFn:this._fetchWithInit})}catch(e){throw _x(e)}return await l.text?.().catch(()=>{}),this._startOrAuthSse(e,!0,n)}throw await l.text?.().catch(()=>{}),_x(t?new rv(tv.ClientHttpAuthentication,`Server returned 401 after re-authentication`,{status:401,statusText:l.statusText}):new Fb)}if(l.status===403){let{resourceMetadataUrl:r,scope:i,error:a,errorDescription:o}=Kb(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 _x(new Fb);return this._startOrAuthSse(e,t,n+1)}}if(await l.text?.().catch(()=>{}),l.status===405){e.onRequestStreamEnd?.();return}throw new rv(tv.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 kne({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=fh.parse(JSON.parse(e.data));(Sy(t)||Cy(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 Fb(`finishAuth requires an OAuthClientProvider`);let{authorizationCode:n,iss:r}=await Ine(e,t,this._oauthProvider,this._url,{fetchFn:this._fetchWithInit,resourceMetadataUrl:this._resourceMetadataUrl});if(await Wb(this._oauthProvider,{serverUrl:this._url,authorizationCode:n,iss:r,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit,skipIssuerMetadataValidation:this._skipIssuerMetadataValidation})!==`AUTHORIZED`)throw new Fb(`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:by(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=>Ty(e)):Ty(e);if(s&&o.delete(`mcp-session-id`),t?.headers!==void 0)for(let[e,n]of Object.entries(t.headers))iS.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?aS(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}=Kb(f);this._resourceMetadataUrl=e,this._scope=Rb(this._scope,t)}if(this._authProvider.onUnauthorized&&!n){try{await this._authProvider.onUnauthorized({response:f,serverUrl:this._url,fetchFn:this._fetchWithInit})}catch(e){throw _x(e)}return await f.text?.().catch(()=>{}),this._send(e,t,!0,r)}throw await f.text?.().catch(()=>{}),_x(n?new rv(tv.ClientHttpAuthentication,`Server returned 401 after re-authentication`,{status:401,statusText:f.statusText}):new Fb)}let i=await f.text?.().catch(()=>null);if(f.status===403){let{resourceMetadataUrl:a,scope:o,error:s,errorDescription:c}=Kb(f);if(s===`insufficient_scope`){if(await this._stepUpAuthorize({scope:o,resourceMetadataUrl:a,errorDescription:c,statusText:f.statusText,text:i},r)!==`AUTHORIZED`)throw _x(new Fb);return this._send(e,t,n,r+1)}}if(f.status===400&&typeof i==`string`&&this._isModernEnvelopedRequest(e))try{let t=fh.parse(JSON.parse(i)),n=(Array.isArray(e)?e:[e]).filter(e=>by(e));if(Cy(t)&&n.some(e=>e.id===t.id)){this.onmessage?.(t);return}}catch{}throw new rv(tv.ClientHttpNotImplemented,`Error POSTing to endpoint: ${i}`,{status:f.status,statusText:f.statusText,text:i})}if(f.status===202){await f.text?.().catch(()=>{}),Ey(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=Ute(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=>fh.parse(e)):[fh.parse(e)];for(let e of t)this.onmessage?.(e)}else throw await f.text?.().catch(()=>{}),new nv(tv.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 rv(tv.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})}},sS=5e3,cS=2e4;function lS(e){try{let t=JSON.stringify(e);return t?Math.ceil(new TextEncoder().encode(t).length/4):0}catch{return 0}}function uS(e){let{meta:t,...n}=e;return lS(n)}function dS(e){return lS(e?.modelContent)}function fS(e,t){let n=uS(e);n>=5e3&&console.warn(`[skybridge] Tool "${t}" returned ${n} estimated model-visible tokens; this reaches the ${sS}-token warning threshold and may overload model context. Content and structured content are included in this estimate.`)}function pS(e,t){let n=lS(e);n>=2e4&&console.warn(`[skybridge] ${t} is persisting ${n} estimated tokens in model-visible view state; this reaches the ${cS}-token warning threshold and may overload model context. Persisted view state and data-llm context are included in this estimate.`)}var mS=ss(()=>({queue:[]}));function hS(e,t){return new Promise(n=>{let r={id:crypto.randomUUID(),params:e,respond:e=>{mS.setState(({queue:e})=>({queue:e.filter(e=>e!==r)})),n(e)}};if(t.aborted){n({action:`cancel`});return}t.addEventListener(`abort`,()=>r.respond({action:`cancel`}),{once:!0}),mS.setState(({queue:e})=>({queue:[...e,r]}))})}function gS(e,t){if(e instanceof Promise)throw Error(t)}function _S(e,t){let n={},r=[];for(let i in e){let a=e[i][`~standard`].validate(t[i]);if(gS(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 vS(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)??_S(o,t);gS(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 yS=vS({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});function bS(e,t,n){try{return e(t)}catch(e){return n?dt(25,t,e,n):dt(24,t,e),null}}function xS(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),bS(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 SS=xS({parse:e=>e,serialize:String});xS({parse:e=>{let t=parseInt(e);return t==t?t:null},serialize:e=>``+Math.round(e)}),xS({parse:e=>{let t=parseInt(e);return t==t?t-1:null},serialize:e=>``+Math.round(e+1)}),xS({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}}),xS({parse:e=>{let t=parseFloat(e);return t==t?t:null},serialize:String});var CS=xS({parse:e=>e.toLowerCase()===`true`,serialize:String});function wS(e,t){return e.valueOf()===t.valueOf()}xS({parse:e=>{let t=parseInt(e);return t==t?new Date(t):null},serialize:e=>``+e.valueOf(),eq:wS}),xS({parse:e=>{let t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:wS}),xS({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:wS});var TS=vt(`sync-emitter`,()=>Mt()),ES={};function DS(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=ES}=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)(()=>OS(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}=OS(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),TS.on(e,t[r])}return()=>{for(let r of Object.keys(e)){let e=m[r];ut(5,n,e,p),TS.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(kS(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);TS.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)(()=>kS(C,x),[C,x]),A]}function OS(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:bS(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 kS(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}function AS(e,t={}){let{parse:n,type:r,serialize:i,eq:a,defaultValue:o,...s}=t,[{[e]:c},l]=DS({[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 jS(){return AS(`tool`,SS)}function MS(){return AS(`evals`,CS.withDefault(!1))}var NS=new He,PS=u(_(),1),FS=typeof global==`object`&&global&&global.Object===Object&&global,IS=typeof self==`object`&&self&&self.Object===Object&&self,LS=FS||IS||Function(`return this`)(),RS=LS.Symbol,zS=Object.prototype,BS=zS.hasOwnProperty,VS=zS.toString,HS=RS?RS.toStringTag:void 0;function US(e){var t=BS.call(e,HS),n=e[HS];try{e[HS]=void 0;var r=!0}catch{}var i=VS.call(e);return r&&(t?e[HS]=n:delete e[HS]),i}var WS=Object.prototype.toString;function GS(e){return WS.call(e)}var KS=`[object Null]`,qS=`[object Undefined]`,JS=RS?RS.toStringTag:void 0;function YS(e){return e==null?e===void 0?qS:KS:JS&&JS in Object(e)?US(e):GS(e)}function XS(e){return typeof e==`object`&&!!e}var ZS=`[object Symbol]`;function QS(e){return typeof e==`symbol`||XS(e)&&YS(e)==ZS}function $S(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 eC=Array.isArray,tC=1/0,nC=RS?RS.prototype:void 0,rC=nC?nC.toString:void 0;function iC(e){if(typeof e==`string`)return e;if(eC(e))return $S(e,iC)+``;if(QS(e))return rC?rC.call(e):``;var t=e+``;return t==`0`&&1/e==-tC?`-0`:t}var aC=/\s/;function oC(e){for(var t=e.length;t--&&aC.test(e.charAt(t)););return t}var sC=/^\s+/;function cC(e){return e&&e.slice(0,oC(e)+1).replace(sC,``)}function lC(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var uC=NaN,dC=/^[-+]0x[0-9a-f]+$/i,fC=/^0b[01]+$/i,pC=/^0o[0-7]+$/i,mC=parseInt;function hC(e){if(typeof e==`number`)return e;if(QS(e))return uC;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=cC(e);var n=fC.test(e);return n||pC.test(e)?mC(e.slice(2),n?2:8):dC.test(e)?uC:+e}var gC=1/0,_C=17976931348623157e292;function vC(e){return e?(e=hC(e),e===gC||e===-gC?(e<0?-1:1)*_C:e===e?e:0):e===0?e:0}function yC(e){var t=vC(e),n=t%1;return t===t?n?t-n:t:0}function bC(e){return e}var xC=`[object AsyncFunction]`,SC=`[object Function]`,CC=`[object GeneratorFunction]`,wC=`[object Proxy]`;function TC(e){if(!lC(e))return!1;var t=YS(e);return t==SC||t==CC||t==xC||t==wC}var EC=LS[`__core-js_shared__`],DC=function(){var e=/[^.]+$/.exec(EC&&EC.keys&&EC.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function OC(e){return!!DC&&DC in e}var kC=Function.prototype.toString;function AC(e){if(e!=null){try{return kC.call(e)}catch{}try{return e+``}catch{}}return``}var jC=/[\\^$.*+?()[\]{}|]/g,Zne=/^\[object .+?Constructor\]$/,Qne=Function.prototype,$ne=Object.prototype,ere=Qne.toString,tre=$ne.hasOwnProperty,nre=RegExp(`^`+ere.call(tre).replace(jC,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function rre(e){return!lC(e)||OC(e)?!1:(TC(e)?nre:Zne).test(AC(e))}function ire(e,t){return e?.[t]}function MC(e,t){var n=ire(e,t);return rre(n)?n:void 0}var NC=MC(LS,`WeakMap`),PC=Object.create,FC=function(){function e(){}return function(t){if(!lC(t))return{};if(PC)return PC(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function are(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 IC(){}function LC(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var ore=800,sre=16,cre=Date.now;function lre(e){var t=0,n=0;return function(){var r=cre(),i=sre-(r-n);if(n=r,i>0){if(++t>=ore)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function ure(e){return function(){return e}}var RC=function(){try{var e=MC(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),zC=lre(RC?function(e,t){return RC(e,`toString`,{configurable:!0,enumerable:!1,value:ure(t),writable:!0})}:bC);function BC(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function dre(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 fre(e){return e!==e}function pre(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function VC(e,t,n){return t===t?pre(e,t,n):dre(e,fre,n)}function HC(e,t){return!!(e!=null&&e.length)&&VC(e,t,0)>-1}var mre=9007199254740991,hre=/^(?:0|[1-9]\d*)$/;function UC(e,t){var n=typeof e;return t??=mre,!!t&&(n==`number`||n!=`symbol`&&hre.test(e))&&e>-1&&e%1==0&&e<t}function WC(e,t,n){t==`__proto__`&&RC?RC(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function GC(e,t){return e===t||e!==e&&t!==t}var gre=Object.prototype.hasOwnProperty;function KC(e,t,n){var r=e[t];(!(gre.call(e,t)&&GC(r,n))||n===void 0&&!(t in e))&&WC(e,t,n)}function qC(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?WC(n,s,c):KC(n,s,c)}return n}var JC=Math.max;function YC(e,t,n){return t=JC(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=JC(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),are(e,this,s)}}function XC(e,t){return zC(YC(e,t,bC),e+``)}var _re=9007199254740991;function ZC(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=_re}function QC(e){return e!=null&&ZC(e.length)&&!TC(e)}function vre(e,t,n){if(!lC(n))return!1;var r=typeof t;return(r==`number`?QC(n)&&UC(t,n.length):r==`string`&&t in n)?GC(n[t],e):!1}function $C(e){return XC(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&&vre(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 yre=Object.prototype;function ew(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||yre)}function tw(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var bre=`[object Arguments]`;function nw(e){return XS(e)&&YS(e)==bre}var rw=Object.prototype,xre=rw.hasOwnProperty,Sre=rw.propertyIsEnumerable,iw=nw(function(){return arguments}())?nw:function(e){return XS(e)&&xre.call(e,`callee`)&&!Sre.call(e,`callee`)};function Cre(){return!1}var aw=typeof exports==`object`&&exports&&!exports.nodeType&&exports,ow=aw&&typeof module==`object`&&module&&!module.nodeType&&module,sw=ow&&ow.exports===aw?LS.Buffer:void 0,cw=(sw?sw.isBuffer:void 0)||Cre,wre=`[object Arguments]`,Tre=`[object Array]`,Ere=`[object Boolean]`,Dre=`[object Date]`,Ore=`[object Error]`,kre=`[object Function]`,Are=`[object Map]`,jre=`[object Number]`,Mre=`[object Object]`,Nre=`[object RegExp]`,Pre=`[object Set]`,Fre=`[object String]`,Ire=`[object WeakMap]`,Lre=`[object ArrayBuffer]`,Rre=`[object DataView]`,zre=`[object Float32Array]`,Bre=`[object Float64Array]`,Vre=`[object Int8Array]`,Hre=`[object Int16Array]`,Ure=`[object Int32Array]`,Wre=`[object Uint8Array]`,Gre=`[object Uint8ClampedArray]`,Kre=`[object Uint16Array]`,qre=`[object Uint32Array]`,lw={};lw[zre]=lw[Bre]=lw[Vre]=lw[Hre]=lw[Ure]=lw[Wre]=lw[Gre]=lw[Kre]=lw[qre]=!0,lw[wre]=lw[Tre]=lw[Lre]=lw[Ere]=lw[Rre]=lw[Dre]=lw[Ore]=lw[kre]=lw[Are]=lw[jre]=lw[Mre]=lw[Nre]=lw[Pre]=lw[Fre]=lw[Ire]=!1;function Jre(e){return XS(e)&&ZC(e.length)&&!!lw[YS(e)]}function uw(e){return function(t){return e(t)}}var dw=typeof exports==`object`&&exports&&!exports.nodeType&&exports,fw=dw&&typeof module==`object`&&module&&!module.nodeType&&module,pw=fw&&fw.exports===dw&&FS.process,mw=function(){try{return fw&&fw.require&&fw.require(`util`).types||pw&&pw.binding&&pw.binding(`util`)}catch{}}(),hw=mw&&mw.isTypedArray,gw=hw?uw(hw):Jre,Yre=Object.prototype.hasOwnProperty;function _w(e,t){var n=eC(e),r=!n&&iw(e),i=!n&&!r&&cw(e),a=!n&&!r&&!i&&gw(e),o=n||r||i||a,s=o?tw(e.length,String):[],c=s.length;for(var l in e)(t||Yre.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||UC(l,c)))&&s.push(l);return s}function vw(e,t){return function(n){return e(t(n))}}var Xre=vw(Object.keys,Object),Zre=Object.prototype.hasOwnProperty;function yw(e){if(!ew(e))return Xre(e);var t=[];for(var n in Object(e))Zre.call(e,n)&&n!=`constructor`&&t.push(n);return t}function bw(e){return QC(e)?_w(e):yw(e)}var Qre=Object.prototype.hasOwnProperty,$re=$C(function(e,t){if(ew(t)||QC(t)){qC(t,bw(t),e);return}for(var n in t)Qre.call(t,n)&&KC(e,n,t[n])});function eie(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var tie=Object.prototype.hasOwnProperty;function nie(e){if(!lC(e))return eie(e);var t=ew(e),n=[];for(var r in e)r==`constructor`&&(t||!tie.call(e,r))||n.push(r);return n}function xw(e){return QC(e)?_w(e,!0):nie(e)}var rie=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,iie=/^\w*$/;function Sw(e,t){if(eC(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||QS(e)?!0:iie.test(e)||!rie.test(e)||t!=null&&e in Object(t)}var Cw=MC(Object,`create`);function aie(){this.__data__=Cw?Cw(null):{},this.size=0}function oie(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var sie=`__lodash_hash_undefined__`,cie=Object.prototype.hasOwnProperty;function lie(e){var t=this.__data__;if(Cw){var n=t[e];return n===sie?void 0:n}return cie.call(t,e)?t[e]:void 0}var uie=Object.prototype.hasOwnProperty;function die(e){var t=this.__data__;return Cw?t[e]!==void 0:uie.call(t,e)}var fie=`__lodash_hash_undefined__`;function pie(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=Cw&&t===void 0?fie:t,this}function ww(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])}}ww.prototype.clear=aie,ww.prototype.delete=oie,ww.prototype.get=lie,ww.prototype.has=die,ww.prototype.set=pie;function mie(){this.__data__=[],this.size=0}function Tw(e,t){for(var n=e.length;n--;)if(GC(e[n][0],t))return n;return-1}var hie=Array.prototype.splice;function gie(e){var t=this.__data__,n=Tw(t,e);return n<0?!1:(n==t.length-1?t.pop():hie.call(t,n,1),--this.size,!0)}function _ie(e){var t=this.__data__,n=Tw(t,e);return n<0?void 0:t[n][1]}function vie(e){return Tw(this.__data__,e)>-1}function yie(e,t){var n=this.__data__,r=Tw(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Ew(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])}}Ew.prototype.clear=mie,Ew.prototype.delete=gie,Ew.prototype.get=_ie,Ew.prototype.has=vie,Ew.prototype.set=yie;var Dw=MC(LS,`Map`);function bie(){this.size=0,this.__data__={hash:new ww,map:new(Dw||Ew),string:new ww}}function xie(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Ow(e,t){var n=e.__data__;return xie(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Sie(e){var t=Ow(this,e).delete(e);return this.size-=+!!t,t}function Cie(e){return Ow(this,e).get(e)}function wie(e){return Ow(this,e).has(e)}function Tie(e,t){var n=Ow(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function kw(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])}}kw.prototype.clear=bie,kw.prototype.delete=Sie,kw.prototype.get=Cie,kw.prototype.has=wie,kw.prototype.set=Tie;var Eie=`Expected a function`;function Aw(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(Eie);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(Aw.Cache||kw),n}Aw.Cache=kw;var Die=500;function Oie(e){var t=Aw(e,function(e){return n.size===Die&&n.clear(),e}),n=t.cache;return t}var kie=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Aie=/\\(\\)?/g,jw=Oie(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(kie,function(e,n,r,i){t.push(r?i.replace(Aie,`$1`):n||e)}),t});function Mw(e){return e==null?``:iC(e)}function Nw(e,t){return eC(e)?e:Sw(e,t)?[e]:jw(Mw(e))}var jie=1/0;function Pw(e){if(typeof e==`string`||QS(e))return e;var t=e+``;return t==`0`&&1/e==-jie?`-0`:t}function Fw(e,t){t=Nw(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Pw(t[n++])];return n&&n==r?e:void 0}function Y(e,t,n){var r=e==null?void 0:Fw(e,t);return r===void 0?n:r}function Iw(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Lw=RS?RS.isConcatSpreadable:void 0;function Mie(e){return eC(e)||iw(e)||!!(Lw&&e&&e[Lw])}function Rw(e,t,n,r,i){var a=-1,o=e.length;for(n||=Mie,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?Rw(s,t-1,n,r,i):Iw(i,s):r||(i[i.length]=s)}return i}function zw(e){return e!=null&&e.length?Rw(e,1):[]}function Bw(e){return zC(YC(e,void 0,zw),e+``)}var Vw=vw(Object.getPrototypeOf,Object),Nie=`[object Object]`,Pie=Function.prototype,Fie=Object.prototype,Hw=Pie.toString,Iie=Fie.hasOwnProperty,Lie=Hw.call(Object);function Uw(e){if(!XS(e)||YS(e)!=Nie)return!1;var t=Vw(e);if(t===null)return!0;var n=Iie.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Hw.call(n)==Lie}function Rie(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 zie(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 Bie(){this.__data__=new Ew,this.size=0}function Vie(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Hie(e){return this.__data__.get(e)}function Uie(e){return this.__data__.has(e)}var Wie=200;function Gie(e,t){var n=this.__data__;if(n instanceof Ew){var r=n.__data__;if(!Dw||r.length<Wie-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new kw(r)}return n.set(e,t),this.size=n.size,this}function Ww(e){var t=this.__data__=new Ew(e);this.size=t.size}Ww.prototype.clear=Bie,Ww.prototype.delete=Vie,Ww.prototype.get=Hie,Ww.prototype.has=Uie,Ww.prototype.set=Gie;function Kie(e,t){return e&&qC(t,bw(t),e)}function qie(e,t){return e&&qC(t,xw(t),e)}var Gw=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Kw=Gw&&typeof module==`object`&&module&&!module.nodeType&&module,qw=Kw&&Kw.exports===Gw?LS.Buffer:void 0,Jw=qw?qw.allocUnsafe:void 0;function Yw(e,t){if(t)return e.slice();var n=e.length,r=Jw?Jw(n):new e.constructor(n);return e.copy(r),r}function Jie(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 Xw(){return[]}var Yie=Object.prototype.propertyIsEnumerable,Zw=Object.getOwnPropertySymbols,Qw=Zw?function(e){return e==null?[]:(e=Object(e),Jie(Zw(e),function(t){return Yie.call(e,t)}))}:Xw;function Xie(e,t){return qC(e,Qw(e),t)}var $w=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Iw(t,Qw(e)),e=Vw(e);return t}:Xw;function Zie(e,t){return qC(e,$w(e),t)}function eT(e,t,n){var r=t(e);return eC(e)?r:Iw(r,n(e))}function tT(e){return eT(e,bw,Qw)}function nT(e){return eT(e,xw,$w)}var rT=MC(LS,`DataView`),iT=MC(LS,`Promise`),aT=MC(LS,`Set`),oT=`[object Map]`,Qie=`[object Object]`,sT=`[object Promise]`,cT=`[object Set]`,lT=`[object WeakMap]`,uT=`[object DataView]`,$ie=AC(rT),eae=AC(Dw),tae=AC(iT),nae=AC(aT),rae=AC(NC),dT=YS;(rT&&dT(new rT(new ArrayBuffer(1)))!=uT||Dw&&dT(new Dw)!=oT||iT&&dT(iT.resolve())!=sT||aT&&dT(new aT)!=cT||NC&&dT(new NC)!=lT)&&(dT=function(e){var t=YS(e),n=t==Qie?e.constructor:void 0,r=n?AC(n):``;if(r)switch(r){case $ie:return uT;case eae:return oT;case tae:return sT;case nae:return cT;case rae:return lT}return t});var fT=dT,iae=Object.prototype.hasOwnProperty;function aae(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&iae.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var pT=LS.Uint8Array;function mT(e){var t=new e.constructor(e.byteLength);return new pT(t).set(new pT(e)),t}function oae(e,t){var n=t?mT(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var sae=/\w*$/;function cae(e){var t=new e.constructor(e.source,sae.exec(e));return t.lastIndex=e.lastIndex,t}var hT=RS?RS.prototype:void 0,gT=hT?hT.valueOf:void 0;function lae(e){return gT?Object(gT.call(e)):{}}function _T(e,t){var n=t?mT(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var uae=`[object Boolean]`,dae=`[object Date]`,fae=`[object Map]`,pae=`[object Number]`,mae=`[object RegExp]`,hae=`[object Set]`,gae=`[object String]`,_ae=`[object Symbol]`,vae=`[object ArrayBuffer]`,yae=`[object DataView]`,bae=`[object Float32Array]`,xae=`[object Float64Array]`,Sae=`[object Int8Array]`,Cae=`[object Int16Array]`,wae=`[object Int32Array]`,Tae=`[object Uint8Array]`,Eae=`[object Uint8ClampedArray]`,Dae=`[object Uint16Array]`,Oae=`[object Uint32Array]`;function kae(e,t,n){var r=e.constructor;switch(t){case vae:return mT(e);case uae:case dae:return new r(+e);case yae:return oae(e,n);case bae:case xae:case Sae:case Cae:case wae:case Tae:case Eae:case Dae:case Oae:return _T(e,n);case fae:return new r;case pae:case gae:return new r(e);case mae:return cae(e);case hae:return new r;case _ae:return lae(e)}}function vT(e){return typeof e.constructor==`function`&&!ew(e)?FC(Vw(e)):{}}var Aae=`[object Map]`;function jae(e){return XS(e)&&fT(e)==Aae}var yT=mw&&mw.isMap,Mae=yT?uw(yT):jae,Nae=`[object Set]`;function Pae(e){return XS(e)&&fT(e)==Nae}var bT=mw&&mw.isSet,Fae=bT?uw(bT):Pae,Iae=1,Lae=2,Rae=4,xT=`[object Arguments]`,zae=`[object Array]`,Bae=`[object Boolean]`,Vae=`[object Date]`,Hae=`[object Error]`,ST=`[object Function]`,Uae=`[object GeneratorFunction]`,Wae=`[object Map]`,Gae=`[object Number]`,CT=`[object Object]`,Kae=`[object RegExp]`,qae=`[object Set]`,Jae=`[object String]`,Yae=`[object Symbol]`,Xae=`[object WeakMap]`,Zae=`[object ArrayBuffer]`,Qae=`[object DataView]`,$ae=`[object Float32Array]`,eoe=`[object Float64Array]`,toe=`[object Int8Array]`,noe=`[object Int16Array]`,roe=`[object Int32Array]`,ioe=`[object Uint8Array]`,aoe=`[object Uint8ClampedArray]`,ooe=`[object Uint16Array]`,soe=`[object Uint32Array]`,wT={};wT[xT]=wT[zae]=wT[Zae]=wT[Qae]=wT[Bae]=wT[Vae]=wT[$ae]=wT[eoe]=wT[toe]=wT[noe]=wT[roe]=wT[Wae]=wT[Gae]=wT[CT]=wT[Kae]=wT[qae]=wT[Jae]=wT[Yae]=wT[ioe]=wT[aoe]=wT[ooe]=wT[soe]=!0,wT[Hae]=wT[ST]=wT[Xae]=!1;function TT(e,t,n,r,i,a){var o,s=t&Iae,c=t&Lae,l=t&Rae;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!lC(e))return e;var u=eC(e);if(u){if(o=aae(e),!s)return LC(e,o)}else{var d=fT(e),f=d==ST||d==Uae;if(cw(e))return Yw(e,s);if(d==CT||d==xT||f&&!i){if(o=c||f?{}:vT(e),!s)return c?Zie(e,qie(o,e)):Xie(e,Kie(o,e))}else{if(!wT[d])return i?e:{};o=kae(e,d,s)}}a||=new Ww;var p=a.get(e);if(p)return p;a.set(e,o),Fae(e)?e.forEach(function(r){o.add(TT(r,t,n,r,e,a))}):Mae(e)&&e.forEach(function(r,i){o.set(i,TT(r,t,n,i,e,a))});var m=u?void 0:(l?c?nT:tT:c?xw:bw)(e);return BC(m||e,function(r,i){m&&(i=r,r=e[i]),KC(o,i,TT(r,t,n,i,e,a))}),o}var coe=1,loe=4;function ET(e){return TT(e,coe|loe)}var uoe=`__lodash_hash_undefined__`;function doe(e){return this.__data__.set(e,uoe),this}function foe(e){return this.__data__.has(e)}function DT(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new kw;++t<n;)this.add(e[t])}DT.prototype.add=DT.prototype.push=doe,DT.prototype.has=foe;function poe(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 OT(e,t){return e.has(t)}var moe=1,hoe=2;function kT(e,t,n,r,i,a){var o=n&moe,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&hoe?new DT: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(!poe(t,function(e,t){if(!OT(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 goe(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function AT(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var _oe=1,voe=2,yoe=`[object Boolean]`,boe=`[object Date]`,xoe=`[object Error]`,Soe=`[object Map]`,Coe=`[object Number]`,woe=`[object RegExp]`,Toe=`[object Set]`,Eoe=`[object String]`,Doe=`[object Symbol]`,Ooe=`[object ArrayBuffer]`,koe=`[object DataView]`,jT=RS?RS.prototype:void 0,MT=jT?jT.valueOf:void 0;function Aoe(e,t,n,r,i,a,o){switch(n){case koe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ooe:return!(e.byteLength!=t.byteLength||!a(new pT(e),new pT(t)));case yoe:case boe:case Coe:return GC(+e,+t);case xoe:return e.name==t.name&&e.message==t.message;case woe:case Eoe:return e==t+``;case Soe:var s=goe;case Toe:var c=r&_oe;if(s||=AT,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=voe,o.set(e,t);var u=kT(s(e),s(t),r,i,a,o);return o.delete(e),u;case Doe:if(MT)return MT.call(e)==MT.call(t)}return!1}var joe=1,Moe=Object.prototype.hasOwnProperty;function Noe(e,t,n,r,i,a){var o=n&joe,s=tT(e),c=s.length;if(c!=tT(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:Moe.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 Poe=1,NT=`[object Arguments]`,PT=`[object Array]`,FT=`[object Object]`,IT=Object.prototype.hasOwnProperty;function Foe(e,t,n,r,i,a){var o=eC(e),s=eC(t),c=o?PT:fT(e),l=s?PT:fT(t);c=c==NT?FT:c,l=l==NT?FT:l;var u=c==FT,d=l==FT,f=c==l;if(f&&cw(e)){if(!cw(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new Ww,o||gw(e)?kT(e,t,n,r,i,a):Aoe(e,t,c,n,r,i,a);if(!(n&Poe)){var p=u&&IT.call(e,`__wrapped__`),m=d&&IT.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new Ww,i(h,g,n,r,a)}}return f?(a||=new Ww,Noe(e,t,n,r,i,a)):!1}function LT(e,t,n,r,i){return e===t?!0:e==null||t==null||!XS(e)&&!XS(t)?e!==e&&t!==t:Foe(e,t,n,r,LT,i)}var Ioe=1,Loe=2;function Roe(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 Ww;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?LT(u,l,Ioe|Loe,r,d):f))return!1}}return!0}function RT(e){return e===e&&!lC(e)}function zoe(e){for(var t=bw(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,RT(i)]}return t}function zT(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function Boe(e){var t=zoe(e);return t.length==1&&t[0][2]?zT(t[0][0],t[0][1]):function(n){return n===e||Roe(n,e,t)}}function Voe(e,t){return e!=null&&t in Object(e)}function BT(e,t,n){t=Nw(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=Pw(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&&ZC(i)&&UC(o,i)&&(eC(e)||iw(e)))}function VT(e,t){return e!=null&&BT(e,t,Voe)}var Hoe=1,Uoe=2;function Woe(e,t){return Sw(e)&&RT(t)?zT(Pw(e),t):function(n){var r=Y(n,e);return r===void 0&&r===t?VT(n,e):LT(t,r,Hoe|Uoe)}}function Goe(e){return function(t){return t?.[e]}}function Koe(e){return function(t){return Fw(t,e)}}function qoe(e){return Sw(e)?Goe(Pw(e)):Koe(e)}function HT(e){return typeof e==`function`?e:e==null?bC:typeof e==`object`?eC(e)?Woe(e[0],e[1]):Boe(e):qoe(e)}function Joe(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 UT=Joe();function WT(e,t){return e&&UT(e,t,bw)}function Yoe(e,t){return function(n,r){if(n==null)return n;if(!QC(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 GT=Yoe(WT);function KT(e,t,n){(n!==void 0&&!GC(e[t],n)||n===void 0&&!(t in e))&&WC(e,t,n)}function qT(e){return XS(e)&&QC(e)}function JT(e,t){if(!(t===`constructor`&&typeof e[t]==`function`)&&t!=`__proto__`)return e[t]}function Xoe(e){return qC(e,xw(e))}function Zoe(e,t,n,r,i,a,o){var s=JT(e,n),c=JT(t,n),l=o.get(c);if(l){KT(e,n,l);return}var u=a?a(s,c,n+``,e,t,o):void 0,d=u===void 0;if(d){var f=eC(c),p=!f&&cw(c),m=!f&&!p&&gw(c);u=c,f||p||m?eC(s)?u=s:qT(s)?u=LC(s):p?(d=!1,u=Yw(c,!0)):m?(d=!1,u=_T(c,!0)):u=[]:Uw(c)||iw(c)?(u=s,iw(s)?u=Xoe(s):(!lC(s)||TC(s))&&(u=vT(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),KT(e,n,u)}function YT(e,t,n,r,i){e!==t&&UT(t,function(a,o){if(i||=new Ww,lC(a))Zoe(e,t,o,n,YT,r,i);else{var s=r?r(JT(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),KT(e,o,s)}},xw)}function XT(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 Qoe=200;function $oe(e,t,n,r){var i=-1,a=HC,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=$S(t,uw(n))),r?(a=XT,o=!1):t.length>=Qoe&&(a=OT,o=!1,t=new DT(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 ese=XC(function(e,t){return qT(e)?$oe(e,Rw(t,1,qT,!0)):[]});function ZT(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function QT(e){return typeof e==`function`?e:bC}function tse(e,t){return(eC(e)?BC:GT)(e,QT(t))}var nse=1/0;function rse(e){return e!=null&&e.length?Rw(e,nse):[]}var ise=Object.prototype.hasOwnProperty;function ase(e,t){return e!=null&&ise.call(e,t)}function $T(e,t){return e!=null&&BT(e,t,ase)}var ose=`[object String]`;function eE(e){return typeof e==`string`||!eC(e)&&XS(e)&&YS(e)==ose}function sse(e,t){return $S(t,function(t){return e[t]})}function cse(e){return e==null?[]:sse(e,bw(e))}var lse=Math.max;function use(e,t,n,r){e=QC(e)?e:cse(e),n=n&&!r?yC(n):0;var i=e.length;return n<0&&(n=lse(i+n,0)),eE(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&VC(e,t,n)>-1}var dse=Math.min;function fse(e,t,n){for(var r=n?XT:HC,i=e[0].length,a=e.length,o=a,s=Array(a),c=1/0,l=[];o--;){var u=e[o];o&&t&&(u=$S(u,uw(t))),c=dse(u.length,c),s[o]=!n&&(t||i>=120&&u.length>=120)?new DT(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?OT(f,m):r(l,m,n))){for(o=a;--o;){var h=s[o];if(!(h?OT(h,m):r(e[o],m,n)))continue outer}f&&f.push(m),l.push(p)}}return l}function pse(e){return qT(e)?e:[]}var tE=XC(function(e){var t=$S(e,pse);return t.length&&t[0]===e[0]?fse(t):[]});function mse(e,t){return t.length<2?e:Fw(e,Rie(t,0,-1))}var hse=`[object Map]`,gse=`[object Set]`,_se=Object.prototype.hasOwnProperty;function nE(e){if(e==null)return!0;if(QC(e)&&(eC(e)||typeof e==`string`||typeof e.splice==`function`||cw(e)||gw(e)||iw(e)))return!e.length;var t=fT(e);if(t==hse||t==gse)return!e.size;if(ew(e))return!yw(e).length;for(var n in e)if(_se.call(e,n))return!1;return!0}function rE(e,t){return LT(e,t)}var vse=`[object Number]`;function iE(e){return typeof e==`number`||XS(e)&&YS(e)==vse}function aE(e){return e==null}function oE(e){return e===void 0}var yse=$C(function(e,t,n){YT(e,t,n)}),bse=Object.prototype.hasOwnProperty;function sE(e,t){t=Nw(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=Pw(t[n]);if(i===`__proto__`&&!bse.call(e,`__proto__`)||(i===`constructor`||i===`prototype`)&&n<r-1)return!1}var a=mse(e,t);return a==null||delete a[Pw(ZT(t))]}function cE(e){return Uw(e)?void 0:e}var lE=1,xse=2,Sse=4,uE=Bw(function(e,t){var n={};if(e==null)return n;var r=!1;t=$S(t,function(t){return t=Nw(t,e),r||=t.length>1,t}),qC(e,nT(e),n),r&&(n=TT(n,lE|xse|Sse,cE));for(var i=t.length;i--;)sE(n,t[i]);return n});function dE(e,t,n,r){if(!lC(e))return e;t=Nw(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=Pw(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:UC(t[i+1])?[]:{})}KC(s,c,l),s=s[c]}return e}function fE(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=Fw(e,o);n(s,o)&&dE(a,Nw(o,e),s)}return a}function pE(e,t){if(e==null)return{};var n=$S(nT(e),function(e){return[e]});return t=HT(t),fE(e,n,function(e,n){return t(e,n[0])})}function mE(e,t){return fE(e,t,function(t,n){return VT(e,n)})}var hE=Bw(function(e,t){return e==null?{}:mE(e,t)});function gE(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function _E(e,t,n){var r=eC(e)?zie:gE,i=arguments.length<3;return r(e,HT(t,4),n,i,GT)}function vE(e,t,n){return e==null?e:dE(e,t,n)}function yE(e,t,n,r){return r=typeof r==`function`?r:void 0,e==null?e:dE(e,t,n,r)}var bE=9007199254740991,xE=4294967295,Cse=Math.min;function SE(e,t){if(e=yC(e),e<1||e>bE)return[];var n=xE,r=Cse(e,xE);t=QT(t),e-=xE;for(var i=tw(r,t);++n<e;)t(n);return i}function CE(e){return eC(e)?$S(e,Pw):QS(e)?[e]:LC(jw(Mw(e)))}function wse(e,t,n){var r=eC(e),i=r||cw(e)||gw(e);if(t=HT(t,4),n==null){var a=e&&e.constructor;n=i?r?new a:[]:lC(e)&&TC(a)?FC(Vw(e)):{}}return(i?BC:WT)(e,function(e,r,i){return t(n,e,r,i)}),n}var Tse=aT&&1/AT(new aT([,-0]))[1]==1/0?function(e){return new aT(e)}:IC,Ese=200;function wE(e,t,n){var r=-1,i=HC,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=XT;else if(a>=Ese){var l=t?null:Tse(e);if(l)return AT(l);o=!1,i=OT,c=new DT}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 Dse=XC(function(e){return wE(Rw(e,1,qT,!0))});function TE(e){return e&&e.length?wE(e):[]}var Ose=0;function EE(e){var t=++Ose;return Mw(e)+t}function DE(e,t){return e==null||sE(e,t)}var OE=ss()(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 AE(e,`tools.${t}`,{...r??{},...n})}),updateOpenaiObject:(t,n,r)=>e(e=>e.tools[t]?.openaiObject?AE(e,`tools.${t}.openaiObject.${n}`,r):e),pushOpenAiLog:(t,n)=>e(e=>{let r=e.tools[t]?.openaiLogs||[];return AE(e,`tools.${t}.openaiLogs`,[...r,{...n,id:crypto.randomUUID()}])}),clearOpenAiLogs:t=>e(e=>e.tools[t]?.openaiLogs?.length?AE(e,`tools.${t}.openaiLogs`,[]):e),setOpenInAppUrl:(t,n)=>e(e=>e.tools[t]?.openInAppUrl===n?e:AE(e,`tools.${t}.openInAppUrl`,n))})),kE=e=>{let{tools:t}=OE();return t[e]},AE=(e,t,n)=>{let r=ET(e);return vE(r,t,n),r},jE=`skybridge-devtools-oauth`,ME={clientInfo:`${jE}:client-info`,tokens:`${jE}:tokens`,codeVerifier:`${jE}:code-verifier`,state:`${jE}:state`,discovery:`${jE}:discovery`},NE=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(ME.clientInfo);return e?JSON.parse(e):void 0}saveClientInformation(e){localStorage.setItem(ME.clientInfo,JSON.stringify(e))}tokens(){let e=localStorage.getItem(ME.tokens);return e?JSON.parse(e):void 0}saveTokens(e){localStorage.setItem(ME.tokens,JSON.stringify(e))}state(){let e=localStorage.getItem(ME.state);if(e)return e;let t=crypto.randomUUID();return localStorage.setItem(ME.state,t),t}expectedState(){return localStorage.getItem(ME.state)??void 0}redirectToAuthorization(e){window.location.href=e.toString()}saveCodeVerifier(e){localStorage.setItem(ME.codeVerifier,e)}codeVerifier(){let e=localStorage.getItem(ME.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(ME.discovery,JSON.stringify(e))}discoveryState(){let e=localStorage.getItem(ME.discovery);return e?JSON.parse(e):void 0}invalidateCredentials(e){(e===`all`||e===`tokens`)&&localStorage.removeItem(ME.tokens),(e===`all`||e===`client`)&&localStorage.removeItem(ME.clientInfo),(e===`all`||e===`verifier`)&&(localStorage.removeItem(ME.codeVerifier),localStorage.removeItem(ME.state)),(e===`all`||e===`discovery`)&&localStorage.removeItem(ME.discovery)}},PE=class{client=null;transport=null;onElicit;constructor(e){this.onElicit=e}async connect(e,t){let n=typeof e==`string`?new URL(e):e;this.transport=new oS(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 Zx({name:`mcp-client`,version:`1.0.0`},{versionNegotiation:{mode:`auto`},capabilities:{elicitation:{form:{}},extensions:{"openai/elicitation":{form:{}}}}}),this.client.setRequestHandler(`elicitation/create`,(e,t)=>this.onElicit(e.params,t.mcpReq.signal)),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 Pv&&e.code===-32601)return[];throw e}}async callTool(e,t,n){if(!this.client)throw Error(`Client not connected. Call connect() first.`);let{_meta:r,...i}=await this.client.callTool({name:e,arguments:t??{}},n);return{...i,meta:r}}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}},FE=null,IE=new PE(async(e,t)=>{let n=FE,r=(e,t,r)=>{n&&OE.getState().pushOpenAiLog(n,{timestamp:Date.now(),source:`server`,command:e,args:t,type:r})};r(`elicitation/create`,e,`default`);let i=await hS(e,t);return r(`elicitation/create response`,i,`response`),i}),LE=null,RE=()=>yS.VITE_MCP_SERVER_URL;function zE(e){let t=e._meta?.securitySchemes;return!!t?.length&&t.every(e=>e?.type!==`noauth`)}function BE(e){return e instanceof Fb||e instanceof rv&&e.status===401}async function VE(){let e=RE(),{setStatus:t,setRequiresAuth:n,setHasAuthRequiredTools:r,setIsSignedIn:i,setError:a}=cs.getState();t(`connecting`),a(null),await IE.close();let o=!1;try{(await Jb(e))?.authorization_servers?.length&&(o=!0)}catch{}n(o);let s=o?new NE:null,c=!!s?.tokens();LE=s;let l=(e,n)=>{i(!1),r(!1),t(n),n===`error`&&a(e instanceof Error?e.message:`Connection failed`)};try{await IE.connect(e,c&&s?s:void 0)}catch(t){if(!BE(t)||!s){l(t,`error`);return}try{await IE.close(),await IE.connect(e,s)}catch(e){l(e,BE(e)?`unauthenticated`:`error`);return}}let u=null;try{u=await IE.listTools()}catch{}i(!!s?.tokens()),r((u??[]).some(zE)),t(`authenticated`),u?NS.setQueryData([`list-tools`],u):NS.invalidateQueries({queryKey:[`list-tools`]})}async function HE(){let e=RE(),t=LE??new NE;LE=t,t.invalidateCredentials(`all`),await Wb(t,{serverUrl:e})}async function UE(e,t,n){let r=RE(),i=new NE,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 Wb(i,{serverUrl:r,authorizationCode:e,iss:t}),i.invalidateCredentials(`verifier`),await VE()}async function WE(){LE?.invalidateCredentials(`all`),LE=null,await IE.close(),cs.getState().reset(),NS.invalidateQueries({queryKey:[`list-tools`]})}var kse=()=>{let e=ms();return{...e,view:{mode:e.displayMode},toolInput:{},toolOutput:null,toolResponseMetadata:null,widgetState:null}},GE=()=>{let{data:e}=st({queryKey:[`list-tools`],queryFn:()=>IE.listTools()});return e},KE=()=>{if(cs(e=>e.status)===`authenticated`)return IE.getServerInfo()},Ase=()=>{let{setToolData:e}=OE();return ct({mutationFn:async({toolName:t,args:n})=>{e(t,{input:n??{},response:void 0,durationMs:null,openaiRef:null,openaiLogs:[{id:crypto.randomUUID(),timestamp:Date.now(),source:`server`,command:`callTool`,args:{name:t,args:n??{}},type:`default`}],openaiObject:null,openInAppUrl:null});let r=performance.now(),i=await IE.callTool(t,n,{onprogress:()=>{FE=t,setTimeout(()=>{FE=null})}});fS(i,t);let a=Math.round(performance.now()-r),o=Date.now();return e(t,{input:n??{},response:i,durationMs:a,openaiRef:null,openaiLogs:[...OE.getState().tools[t]?.openaiLogs??[],{id:crypto.randomUUID(),timestamp:o,source:`server`,command:`callTool response`,args:i,type:`response`}],openaiObject:{...kse(),toolInput:n??{},toolOutput:i.structuredContent,toolResponseMetadata:i.meta??null,widgetState:null},openInAppUrl:null}),i}})},qE=()=>{let[e]=jS();return GE().find(t=>t.name===e)??null},jse=()=>{let e=qE();if(!e)throw Error(`No tool is currently selected`);return e},Mse=e=>st({queryKey:[`resource`,e],queryFn:async()=>{if(!e)throw Error(`Resource URI is required`);return await IE.readResource(e)}}),Nse=Object.defineProperty,JE=(e,t)=>Nse(e,`name`,{value:t,configurable:!0}),YE=!!(typeof window<`u`&&window.document&&window.document.createElement);function XE(e,t,{checkForDefaultPrevented:n=!0}={}){return JE(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}JE(XE,`composeEventHandlers`);function Pse(e){if(!YE)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}JE(Pse,`getOwnerWindow`);function ZE(e){if(!YE)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}JE(ZE,`getOwnerDocument`);function QE(e,t=!1){let{activeElement:n}=ZE(e);if(!n?.nodeName)return null;if($E(n)&&n.contentDocument)return QE(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=ZE(n).getElementById(e);if(t)return t}}return n}JE(QE,`getActiveElement`);function $E(e){return e.tagName===`IFRAME`}JE($E,`isFrame`);function eD(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,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[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,Fse(i,...t)]}function Fse(...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 tD=globalThis?.document?b.useLayoutEffect:()=>{},Ise=b.useId||(()=>void 0),Lse=0;function nD(e){let[t,n]=b.useState(Ise());return tD(()=>{e||n(e=>e??String(Lse++))},[e]),e||(t?`radix-${t}`:``)}var rD=b.useEffectEvent,iD=b.useInsertionEffect;function aD(e){if(typeof rD==`function`)return rD(e);let t=b.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof iD==`function`?iD(()=>{t.current=e}):tD(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}var oD=Object.defineProperty,sD=(e,t)=>oD(e,`name`,{value:t,configurable:!0}),cD=b.useInsertionEffect||tD;function lD({prop:e,defaultProp:t,onChange:n=sD(()=>{},`onChange`),caller:r}){let[i,a,o]=uD({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,b.useCallback(t=>{if(s){let n=dD(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}sD(lD,`useControllableState`);function uD({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return cD(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}sD(uD,`useUncontrolledState`);function dD(e){return typeof e==`function`}sD(dD,`isFunction`);var fD=Symbol(`RADIX:SYNC_STATE`);function pD(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=aD(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=b.useReducer((t,n)=>{if(n.type===fD)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:fD,state:i})},[i,d.state,c]),[h,f]}sD(pD,`useControllableStateReducer`);var mD=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=zi(`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 hD(e,t){e&&PS.flushSync(()=>e.dispatchEvent(t))}function gD(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}var _D=Object.defineProperty,vD=(e,t)=>_D(e,`name`,{value:t,configurable:!0}),yD=`dismissableLayer.update`,bD=`dismissableLayer.pointerDownOutside`,xD=`dismissableLayer.focusOutside`,SD,CD=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),wD=b.forwardRef(vD(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(CD),[d,f]=b.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=b.useState({}),h=Ri(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=DD(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=OD(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=gD(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&&(SD=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),kD(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=SD))}},[d,p,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),kD())},[d,u]),b.useEffect(()=>{let e=vD(()=>m({}),`handleUpdate`);return document.addEventListener(yD,e),()=>document.removeEventListener(yD,e)},[]),(0,H.jsx)(mD.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:XE(e.onFocusCapture,T.onFocusCapture),onBlurCapture:XE(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:XE(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function TD(){let e=b.useContext(CD),[t,n]=b.useState(null);return b.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}vD(TD,`useDismissableLayerSurface`);var ED=vD(()=>!0,`IS_TRUE`);function DD(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=ED}=t,s=gD(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()}vD(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}vD(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)}vD(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}vD(p,`handleInteractionBubble`);let m=vD(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||AD(bD,s,p,{discrete:!0})};if(vD(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:vD(()=>c.current=!0,`onPointerDownCapture`)}}vD(DD,`usePointerDownOutside`);function OD(e,t=globalThis?.document){let n=gD(e),r=b.useRef(!1);return b.useEffect(()=>{let e=vD(e=>{e.target&&!r.current&&AD(xD,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:vD(()=>r.current=!0,`onFocusCapture`),onBlurCapture:vD(()=>r.current=!1,`onBlurCapture`)}}vD(OD,`useFocusOutside`);function kD(){let e=new CustomEvent(yD);document.dispatchEvent(e)}vD(kD,`dispatchUpdate`);function AD(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?hD(i,a):i.dispatchEvent(a)}vD(AD,`handleAndDispatchCustomEvent`);var Rse=Object.defineProperty,jD=(e,t)=>Rse(e,`name`,{value:t,configurable:!0}),MD=`focusScope.autoFocusOnMount`,ND=`focusScope.autoFocusOnUnmount`,PD={bubbles:!1,cancelable:!0},FD=b.forwardRef(jD(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=gD(i),u=gD(a),d=b.useRef(null),f=Ri(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:HD(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||HD(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&HD(s)};jD(e,`handleFocusIn`),jD(t,`handleFocusOut`),jD(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){UD.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(MD,PD);s.addEventListener(MD,l),s.dispatchEvent(t),t.defaultPrevented||(ID(KD(RD(s)),{select:!0}),document.activeElement===e&&HD(s))}return()=>{s.removeEventListener(MD,l),setTimeout(()=>{let t=new CustomEvent(ND,PD);s.addEventListener(ND,u),s.dispatchEvent(t),t.defaultPrevented||HD(e??document.body,{select:!0}),s.removeEventListener(ND,u),UD.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]=LD(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&HD(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&HD(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,H.jsx)(mD.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function ID(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(HD(r,{select:t}),document.activeElement!==n)return}jD(ID,`focusFirst`);function LD(e){let t=RD(e);return[zD(t,e),zD(t.reverse(),e)]}jD(LD,`getTabbableEdges`);function RD(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:jD(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}jD(RD,`getTabbableCandidates`);function zD(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):BD(r,{upTo:t})))return r}jD(zD,`findVisible`);function BD(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}jD(BD,`isHidden`);function VD(e){return e instanceof HTMLInputElement&&`select`in e}jD(VD,`isSelectableInput`);function HD(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&VD(e)&&t&&e.select()}}jD(HD,`focus`);var UD=WD();function WD(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=GD(e,t),e.unshift(t)},remove(t){e=GD(e,t),e[0]?.resume()}}}jD(WD,`createFocusScopesStack`);function GD(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}jD(GD,`arrayRemove`);function KD(e){return e.filter(e=>e.tagName!==`A`)}jD(KD,`removeLinks`);var zse=Object.defineProperty,qD=b.forwardRef(((e,t)=>zse(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=b.useState(!1);tD(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?PS.createPortal((0,H.jsx)(mD.div,{...r,ref:t}),o):null},`Portal`)),Bse=Object.defineProperty,JD=(e,t)=>Bse(e,`name`,{value:t,configurable:!0});function YD(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}JD(YD,`useStateMachine`);var XD=JD(e=>{let{present:t,children:n}=e,r=ZD(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=$D(r.ref,tO(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null},`Presence`);function ZD(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]=YD(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??eO(r.current),o.current=void 0):a.current=`none`},[s]),tD(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=eO(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]),tD(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=JD(a=>{let o=eO(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=JD(e=>{e.target===t&&(a.current=eO(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=eO(t)}else r.current=null;n(e)},[])}}JD(ZD,`usePresence`);function QD(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}JD(QD,`setRef`);function $D(...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=QD(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():QD(n[e],null)}}},[])}JD($D,`useStableComposedRefs`);function eO(e){return e?.animationName||`none`}JD(eO,`getAnimationName`);function tO(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)}JD(tO,`getElementRef`);var nO=0,rO=null;function iO(){b.useEffect(()=>{rO||={start:aO(),end:aO()};let{start:e,end:t}=rO;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),nO++,()=>{nO===1&&(rO?.start.remove(),rO?.end.remove(),rO=null),nO=Math.max(0,nO-1)}},[])}function aO(){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 oO=function(){return oO=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},oO.apply(this,arguments)};function sO(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 cO(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 Vse(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 Hse(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 lO=`right-scroll-bar-position`,uO=`width-before-scroll-bar`,Use=`with-scroll-bars-hidden`,Wse=`--removed-body-scroll-bar-size`;function dO(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Gse(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 Kse=typeof window<`u`?b.useLayoutEffect:b.useEffect,fO=new WeakMap;function qse(e,t){var n=Gse(t||null,function(t){return e.forEach(function(e){return dO(e,t)})});return Kse(function(){var t=fO.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||dO(e,null)}),i.forEach(function(e){r.has(e)||dO(e,a)})}fO.set(n,e)},[e]),n}function Jse(e){return e}function Yse(e,t){t===void 0&&(t=Jse);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 pO(e){e===void 0&&(e={});var t=Yse(null);return t.options=oO({async:!0,ssr:!1},e),t}var mO=function(e){var t=e.sideCar,n=sO(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,oO({},n))};mO.isSideCarExport=!0;function hO(e,t){return e.useMedium(t),mO}var gO=pO(),_O=function(){},vO=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:_O,onWheelCapture:_O,onTouchMoveCapture:_O}),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=sO(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=qse([n,t]),w=oO(oO({},x),i);return b.createElement(b.Fragment,null,u&&b.createElement(S,{sideCar:gO,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),oO(oO({},w),{ref:C})):b.createElement(v,oO({},w,{className:c,ref:C}),s))});vO.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},vO.classNames={fullWidth:uO,zeroRight:lO};var yO,bO=function(){if(yO)return yO;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function xO(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=bO();return t&&e.setAttribute(`nonce`,t),e}function SO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function CO(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var wO=function(){var e=0,t=null;return{add:function(n){e==0&&(t=xO())&&(SO(t,n),CO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},TO=function(){var e=wO();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},EO=function(){var e=TO();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},DO={left:0,top:0,right:0,gap:0},OO=function(e){return parseInt(e||``,10)||0},kO=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[OO(n),OO(r),OO(i)]},AO=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return DO;var t=kO(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])}},jO=EO(),MO=`data-scroll-locked`,NO=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
84
|
+
.${Use} {
|
|
85
|
+
overflow: hidden ${r};
|
|
86
|
+
padding-right: ${s}px ${r};
|
|
87
|
+
}
|
|
88
|
+
body[${MO}] {
|
|
89
|
+
overflow: hidden ${r};
|
|
90
|
+
overscroll-behavior: contain;
|
|
91
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
92
|
+
padding-left: ${i}px;
|
|
93
|
+
padding-top: ${a}px;
|
|
94
|
+
padding-right: ${o}px;
|
|
95
|
+
margin-left:0;
|
|
96
|
+
margin-top:0;
|
|
97
|
+
margin-right: ${s}px ${r};
|
|
98
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.${lO} {
|
|
102
|
+
right: ${s}px ${r};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.${uO} {
|
|
106
|
+
margin-right: ${s}px ${r};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.${lO} .${lO} {
|
|
110
|
+
right: 0 ${r};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.${uO} .${uO} {
|
|
114
|
+
margin-right: 0 ${r};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
body[${MO}] {
|
|
118
|
+
${Wse}: ${s}px;
|
|
119
|
+
}
|
|
120
|
+
`},PO=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},FO=function(){b.useEffect(function(){return document.body.setAttribute(MO,(PO()+1).toString()),function(){var e=PO()-1;e<=0?document.body.removeAttribute(MO):document.body.setAttribute(MO,e.toString())}},[])},IO=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;FO();var a=b.useMemo(function(){return AO(i)},[i]);return b.createElement(jO,{styles:NO(a,!t,i,n?``:`!important`)})},LO=!1;if(typeof window<`u`)try{var RO=Object.defineProperty({},"passive",{get:function(){return LO=!0,!0}});window.addEventListener(`test`,RO,RO),window.removeEventListener(`test`,RO,RO)}catch{LO=!1}var zO=LO?{passive:!1}:!1,BO=function(e){return e.tagName===`TEXTAREA`},VO=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!BO(e)&&n[t]===`visible`)},HO=function(e){return VO(e,`overflowY`)},UO=function(e){return VO(e,`overflowX`)},WO=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),qO(e,r)){var i=JO(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},GO=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},KO=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},qO=function(e,t){return e===`v`?HO(t):UO(t)},JO=function(e,t){return e===`v`?GO(t):KO(t)},YO=function(e,t){return e===`h`&&t===`rtl`?-1:1},XO=function(e,t,n,r,i){var a=YO(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=JO(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&qO(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},ZO=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},QO=function(e){return[e.deltaX,e.deltaY]},$O=function(e){return e&&`current`in e?e.current:e},ek=function(e,t){return e[0]===t[0]&&e[1]===t[1]},tk=function(e){return`
|
|
121
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
122
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
123
|
+
`},nk=0,rk=[];function ik(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState(nk++)[0],a=b.useState(EO)[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=Hse([e.lockRef.current],(e.shards||[]).map($O),!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=ZO(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=WO(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=WO(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 XO(h,t,e,h===`h`?s:c,!0)},[]),c=b.useCallback(function(e){var n=e;if(!(!rk.length||rk[rk.length-1]!==a)){var r=`deltaY`in n?QO(n):ZO(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ek(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map($O).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:ak(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=ZO(e),r.current=void 0},[]),d=b.useCallback(function(t){l(t.type,QO(t),t.target,s(t,e.lockRef.current))},[]),f=b.useCallback(function(t){l(t.type,ZO(t),t.target,s(t,e.lockRef.current))},[]);b.useEffect(function(){return rk.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,zO),document.addEventListener(`touchmove`,c,zO),document.addEventListener(`touchstart`,u,zO),function(){rk=rk.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,zO),document.removeEventListener(`touchmove`,c,zO),document.removeEventListener(`touchstart`,u,zO)}},[]);var p=e.removeScrollBar,m=e.inert;return b.createElement(b.Fragment,null,m?b.createElement(a,{styles:tk(i)}):null,p?b.createElement(IO,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ak(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ok=hO(gO,ik),sk=b.forwardRef(function(e,t){return b.createElement(vO,oO({},e,{ref:t,sideCar:ok}))});sk.classNames=vO.classNames;var ck=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},lk=new WeakMap,uk=new WeakMap,dk={},fk=0,pk=function(e){return e&&(e.host||pk(e.parentNode))},mk=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=pk(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})},hk=function(e,t,n,r){var i=mk(t,Array.isArray(e)?e:[e]);dk[n]||(dk[n]=new WeakMap);var a=dk[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=(lk.get(e)||0)+1,l=(a.get(e)||0)+1;lk.set(e,c),a.set(e,l),o.push(e),c===1&&i&&uk.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(),fk++,function(){o.forEach(function(e){var t=lk.get(e)-1,i=a.get(e)-1;lk.set(e,t),a.set(e,i),t||(uk.has(e)||e.removeAttribute(r),uk.delete(e)),i||e.removeAttribute(n)}),fk--,fk||(lk=new WeakMap,lk=new WeakMap,uk=new WeakMap,dk={})}},gk=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||ck(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),hk(r,i,n,`aria-hidden`)):function(){return null}},_k=Object.defineProperty,vk=(e,t)=>_k(e,`name`,{value:t,configurable:!0}),yk=`Dialog`,[bk,Xse]=eD(yk),[xk,Sk]=bk(yk),Ck=vk(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]=lD({prop:r,defaultProp:i??!1,onChange:a,caller:yk}),[d,f]=b.useState(0),[p,m]=b.useState(0);return(0,H.jsx)(xk,{scope:t,triggerRef:s,contentRef:c,contentId:nD(),titleId:nD(),descriptionId:nD(),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`),wk=`DialogPortal`,[Tk,Ek]=bk(wk,{forceMount:void 0}),Dk=vk(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Sk(wk,t);return(0,H.jsx)(Tk,{scope:t,forceMount:n,children:b.Children.map(r,e=>(0,H.jsx)(XD,{present:n||a.open,children:(0,H.jsx)(qD,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),Ok=`DialogOverlay`,kk=b.forwardRef(vk(function(e,t){let n=Ek(Ok,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Sk(Ok,e.__scopeDialog);return a.modal?(0,H.jsx)(XD,{present:r||a.open,children:(0,H.jsx)(jk,{...i,ref:t})}):null},`DialogOverlay`)),Ak=zi(`DialogOverlay.RemoveScroll`),jk=b.forwardRef(vk(function(e,t){let{__scopeDialog:n,...r}=e,i=Sk(Ok,n),a=Ri(t,TD());return(0,H.jsx)(sk,{as:Ak,allowPinchZoom:!0,shards:[i.contentRef],children:(0,H.jsx)(mD.div,{"data-state":Rk(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),Mk=`DialogContent`,Nk=b.forwardRef(vk(function(e,t){let n=Ek(Mk,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Sk(Mk,e.__scopeDialog);return(0,H.jsx)(XD,{present:r||a.open,children:a.modal?(0,H.jsx)(Pk,{...i,ref:t}):(0,H.jsx)(Fk,{...i,ref:t})})},`DialogContent`)),Pk=b.forwardRef(vk(function(e,t){let n=Sk(Mk,e.__scopeDialog),r=b.useRef(null),i=Ri(t,n.contentRef,r);return b.useEffect(()=>{let e=r.current;if(e)return gk(e)},[]),(0,H.jsx)(Ik,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:XE(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:XE(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:XE(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),Fk=b.forwardRef(vk(function(e,t){let n=Sk(Mk,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return(0,H.jsx)(Ik,{...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`)),Ik=b.forwardRef(vk(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Sk(Mk,n);return iO(),(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(FD,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(wD,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":Rk(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),Lk=`DialogTitle`,Zse=b.forwardRef(vk(function(e,t){let{__scopeDialog:n,...r}=e,i=Sk(Lk,n),{setTitleCount:a}=i;return tD(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,H.jsx)(mD.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),Qse=`DialogDescription`,$se=b.forwardRef(vk(function(e,t){let{__scopeDialog:n,...r}=e,i=Sk(Qse,n),{setDescriptionCount:a}=i;return tD(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,H.jsx)(mD.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),ece=`DialogClose`,tce=b.forwardRef(vk(function(e,t){let{__scopeDialog:n,...r}=e,i=Sk(ece,n);return(0,H.jsx)(mD.button,{type:`button`,...r,ref:t,onClick:XE(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function Rk(e){return e?`open`:`closed`}vk(Rk,`getState`);function zk({...e}){return(0,H.jsx)(Ck,{"data-slot":`dialog`,...e})}function nce({...e}){return(0,H.jsx)(Dk,{"data-slot":`dialog-portal`,...e})}function rce({className:e,...t}){return(0,H.jsx)(kk,{"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 ice=Fi([`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 Bk({className:e,children:t,size:n,showCloseButton:r=!0,...i}){return(0,H.jsxs)(nce,{children:[(0,H.jsx)(rce,{}),(0,H.jsxs)(Nk,{"data-slot":`dialog-content`,className:Mr(ice({size:n}),e),...i,children:[t,r&&(0,H.jsxs)(tce,{"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)(Mi,{className:`size-4`}),(0,H.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Vk({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 ace=Fi(`pb-6 pt-6`,{variants:{layout:{horizontal:`flex gap-3 [&>*]:flex-1`,vertical:`flex flex-col gap-3`}},defaultVariants:{layout:`horizontal`}});function Hk({className:e,layout:t,...n}){return(0,H.jsx)(`div`,{"data-slot":`dialog-footer`,className:Mr(ace({layout:t}),e),...n})}function Uk({className:e,...t}){return(0,H.jsx)(Zse,{"data-slot":`dialog-title`,className:Mr(`type-text-md font-semibold text-foreground`,e),...t})}function Wk({className:e,...t}){return(0,H.jsx)($se,{"data-slot":`dialog-description`,className:Mr(`type-text-sm text-subtle-foreground`,e),...t})}function Gk(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 oce(e){return e.additionalItems===!0&&console.warn(`additionalItems=true is currently not supported`),Gk(e.additionalItems)}function Kk(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 qk=Symbol(`__additional_property`),sce=`additionalProperties`,Jk=`allOf`,Yk=`anyOf`,Xk=`const`,Zk=`default`,Qk=`__errors`,$k=`items`,cce=`_$junk_option_schema_id$_`,eA=`$name`,tA=`oneOf`,nA=`properties`,rA=`readonly`,lce=`required`,iA=`submitButtonOptions`,aA=`$ref`,oA=Symbol(`__rjsf_ref`),sA=Symbol(`__rjsf_ref_cycle`),cA=`root`,uce=[`discriminator`,`propertyName`],dce=`formContext`,fce=`layoutGridLookupMap`,lA=`__rjsf`,uA=`${lA}_additionalProperties`,dA=`${lA}_rootSchema`,fA=`ui:options`,pA=`ui:globalOptions`;function mA(e={},t={}){return e?Object.keys(e).filter(e=>e.startsWith(`ui:`)).reduce((t,n)=>{let r=e[n];return n===`ui:widget`&&Gk(r)?(console.error(`Setting options via ui:widget object is no longer supported, use ui:options instead`),t):n===`ui:options`&&Gk(r)?{...t,...r}:{...t,[n.substring(3)]:r}},{...t}):{...t}}function hA(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;let{expandable:r=!0}=mA(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}function gA(e){let t={[Qk]:[],addError(e){this[Qk].push(e)}};if(Array.isArray(e))return e.reduce((e,t,n)=>({...e,[n]:gA(t)}),t);if(Uw(e)){let n=e;return Object.keys(n).reduce((e,t)=>({...e,[t]:gA(n[t])}),t)}return t}var{getOwnPropertyNames:pce,getOwnPropertySymbols:mce}=Object,{hasOwnProperty:hce}=Object.prototype;function _A(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function vA(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 yA(e){return pce(e).concat(mce(e))}var gce=Object.hasOwn||((e,t)=>hce.call(e,t)),_ce=`__v`,vce=`__o`,yce=`_owner`,{getOwnPropertyDescriptor:bA,keys:xA}=Object,SA=Object.is||function(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t};function bce(e,t){return e===t}function xce(e,t){return e.byteLength===t.byteLength&&EA(new Uint8Array(e),new Uint8Array(t))}function Sce(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 Cce(e,t){return e.byteLength===t.byteLength&&EA(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function wce(e,t){return SA(e.getTime(),t.getTime())}function Tce(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function CA(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 Ece(e,t,n){let r=xA(e),i=r.length;if(xA(t).length!==i)return!1;for(;i-->0;)if(!DA(e,t,n,r[i]))return!1;return!0}function wA(e,t,n){let r=yA(e),i=r.length;if(yA(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!DA(e,t,n,a)||(o=bA(e,a),s=bA(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Dce(e,t){return SA(e.valueOf(),t.valueOf())}function Oce(e,t){return e.source===t.source&&e.flags===t.flags}function TA(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 EA(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 kce(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 DA(e,t,n,r){return(r===yce||r===vce||r===_ce)&&(e.$$typeof||t.$$typeof)?!0:gce(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var Ace=Object.prototype.toString;function jce(e){let t=Fce(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=Ace.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 Mce({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:xce,areArraysEqual:n?wA:Sce,areDataViewsEqual:Cce,areDatesEqual:wce,areErrorsEqual:Tce,areFunctionsEqual:bce,areMapsEqual:n?_A(CA,wA):CA,areNumbersEqual:SA,areObjectsEqual:n?wA:Ece,arePrimitiveWrappersEqual:Dce,areRegExpsEqual:Oce,areSetsEqual:n?_A(TA,wA):TA,areTypedArraysEqual:n?_A(EA,wA):EA,areUrlsEqual:kce,getUnsupportedCustomComparator:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=vA(r.areArraysEqual),t=vA(r.areMapsEqual),n=vA(r.areObjectsEqual),i=vA(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function Nce(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function Pce({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 Fce({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}}OA(),OA({strict:!0}),OA({circular:!0}),OA({circular:!0,strict:!0}),OA({createInternalComparator:()=>SA}),OA({strict:!0,createInternalComparator:()=>SA}),OA({circular:!0,createInternalComparator:()=>SA}),OA({circular:!0,createInternalComparator:()=>SA,strict:!0});function OA(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=jce(Mce(e));return Pce({circular:t,comparator:a,createState:r,equals:n?n(a):Nce(a),strict:i})}var kA=OA({circular:!0,createCustomConfig:()=>({areFunctionsEqual(e,t){return typeof t==`function`}})}),AA=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}})),Ice=s(((e,t)=>{var{isUUID:n}=AA(),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}})),Lce=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,normalizeQueryFragmentEncoding:s,escapePreservingEscapes:c,reescapeHostDelimiters:l,isIPv4:u,nonSimpleDomain:d}=AA(),{SCHEMES:f,getSchemeHandler:p}=Ice();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})),Rce=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})),jA=u(Lce(),1),MA=u(Rce(),1);function NA(e,t){if(`$id`in e&&jA.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=NA(e,t);if(n!==void 0)return n}}else if(lC(n)){let e=NA(n,t);if(e!==void 0)return e}}function PA(e,t){let n=Y(e,`$id`,t),r=e;`$ref`in r&&(r={...r,[aA]:jA.default.resolve(n,r[aA])});for(let[e,t]of Object.entries(r))Array.isArray(t)?r={...r,[e]:t.map(e=>lC(e)?PA(e,n):e)}:lC(t)&&(r={...r,[e]:PA(t,n)});return r}function FA(e,t){let n=t[e];return[uE(t,[e]),n]}function IA(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=MA.get(t,e):t.$schema===`https://json-schema.org/draft/2020-12/schema`&&(a=NA(t,o.replace(/\/$/,``)),a!==void 0&&(a=MA.get(a,e)))}else if(t.$schema===`https://json-schema.org/draft/2020-12/schema`){let[e,...n]=(o?jA.default.resolve(o,i):i).replace(/#\/?$/,``).split(`#`);a=NA(t,e.replace(/\/$/,``)),a!==void 0&&(o=a.$id,nE(n)||(a=MA.get(a,decodeURIComponent(n.join(`#`)))))}if(a===void 0)throw Error(`Could not find a definition for ${e}.`);let s=a[aA];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]=FA(aA,a),l=IA(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`?{[Jk]:[r,l]}:{...r,...l}:l}return a}function LA(e,t={},n=Y(t,[`$id`])){return IA(e,t,[],n)}function RA(e){let t,n=Y(e,uce);return eE(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}function zA(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 BA(e){let{type:t}=e;return!t&&e.const?zA(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 VA(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&&Gk(a)?n[r]=VA(i,a):e&&t&&(BA(e)===`object`||BA(t)===`object`)&&r===`required`&&Array.isArray(i)&&Array.isArray(a)?n[r]=Dse(i,a):n[r]=a,n},n);for(let e of Object.getOwnPropertySymbols(t))r[e]=t[e];return r}function HA(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,[nA,n],{});if(a.type!==`object`&&a.type!==`array`&&(a.const===r||a.enum?.includes(r)))return e}}}function UA(e,t,n,r,i){if(t===void 0)return 0;let a=HA(t,n,i);if(iE(a))return a;for(let a=0;a<n.length;a+=1){let o=n[a];if(i&&$T(o,[`properties`,i])){let n=Y(t,i),s=Y(o,[nA,i],{});if(e.isValid(s,n,r))return a}else if(o.properties){let n={anyOf:Object.keys(o[nA]).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 zce=Object.prototype;function WA(e){for(let t in e)if(zce.hasOwnProperty.call(e,t))return!1;return!0}var GA=[`$defs`,`definitions`,`properties`,`patternProperties`,`dependencies`];new Set(GA);var KA=[`items`,`allOf`,`oneOf`,`anyOf`];new Set(KA);var qA=[`items`,`additionalItems`,`additionalProperties`,`propertyNames`,`contains`,`if`,`then`,`else`,`not`];new Set(qA),[...GA,...KA,...qA];function JA(e){return typeof e==`object`}function YA(e){return JA(e)?WA(e):e===!0}function XA(e,t){return e<t?-1:+(e>t)}function ZA(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 Bce(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 QA(e){return e.length===0}function $A(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 ej(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 Vce(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 tj(e,t){return n=>{if(e.has(n))return e.get(n);let r=t(n);return e.set(n,r),r}}var nj=tj,rj=()=>0,ij=e=>e===void 0,aj=e=>typeof e!=`object`,oj={boolean:0,number:1,string:2};function sj(e,t){let n=typeof e,r=typeof t;return n===r?XA(e,t):oj[n]-oj[r]}function cj(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 lj(e,t,n=rj){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function uj(e){return lj(ij,e)}function dj(e,t){return lj(t=>t===void 0||e(t),t)}function fj(e,t){return lj(Array.isArray,e,t)}var pj=uj(XA),mj=dj(e=>e===0,(e,t)=>e-t);function hj({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){let n=nj(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=XA(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=$A(t),r=nj(e,ej(t,{threshold:0}));return(e,t)=>n(r(e),r(t))}let a=i(XA);function o(e,t){if(JA(e)){if(JA(t)){let n=cj(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&&WA(e)?0:1}return JA(t)?e===!0&&WA(t)?0:-1:XA(e,t)}let s=uj(l),c=lj(aj,fj(r(s),$A(l)),sj);function l(e,t){return e===null?-1:t===null?1:c(e,t)}let u=uj(o),d=dj(WA,r(u)),f=uj(i(o)),p=dj(YA,o),m={$id:pj,$comment:pj,$defs:d,$ref:pj,$schema:pj,const:s,contains:u,contentEncoding:pj,contentMediaType:pj,default:s,definitions:d,description:pj,else:u,examples:s,exclusiveMaximum:pj,exclusiveMinimum:pj,format:pj,if:u,maximum:pj,maxItems:pj,maxLength:pj,maxProperties:pj,minimum:pj,multipleOf:pj,not:u,pattern:pj,propertyNames:u,readOnly:pj,then:u,title:pj,writeOnly:pj,uniqueItems:dj(e=>e===!1,rj),minLength:mj,minItems:mj,minProperties:mj,required:dj(QA,a),enum:dj(QA,i(l)),type:uj((e,t)=>{let n=Array.isArray(e),r=Array.isArray(t);return!n&&!r?XA(e,t):a(n?e:[e],r?t:[t])}),items:dj(e=>!Array.isArray(e)&&YA(e),fj(o,$A(o))),anyOf:f,allOf:f,oneOf:f,properties:d,patternProperties:d,additionalProperties:p,additionalItems:p,dependencies:dj(WA,r(uj(fj(o,a))))};return{compareSchemaValues:l,compareSchemaDefinitions:o}}function gj(e){return e}var _j=(e,t)=>e?_j(t%e,e):t,vj=(e,t)=>Math.abs(e*t)/_j(e,t);function yj(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function bj(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 xj(e,t){return e||t}function Sj(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 Cj(e){let t=new Map;for(let n of e)for(let e of n[0])t.set(e,n[1]);return t}function wj(e,t,n){n===void 0||YA(n)?delete e[t]:e[t]=n}var Tj=[`properties`,`patternProperties`,`additionalProperties`];function Ej(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 Dj=[[],[]];function Oj(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 kj=[`items`,`additionalItems`],Aj=[`if`,`then`,`else`];function jj(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 Mj(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 Nj(e,t,n){return[e,t,n]}function Pj(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 Fj=[Nj(`minimum`,`maximum`,e=>e.maximum>=e.minimum),Nj(`exclusiveMinimum`,`maximum`,e=>e.maximum>e.exclusiveMinimum),Nj(`minimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.minimum),Nj(`exclusiveMinimum`,`exclusiveMaximum`,e=>e.exclusiveMaximum>e.exclusiveMinimum),Nj(`minLength`,`maxLength`,e=>e.maxLength>=e.minLength),Nj(`minItems`,`maxItems`,e=>e.maxItems>=e.minItems),Nj(`minProperties`,`maxProperties`,e=>e.maxProperties>=e.minProperties)];function Ij({mergePatterns:e=yj,isSubRegExp:t=Object.is,intersectJson:n=Bce,deduplicateJsonSchemaDef:r=gj,defaultMerger:i=gj,assigners:a=[],checks:o=Fj,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;YA(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(Oj(e,t,a))return!1;let s=e.length<2;if(o===!1){if(s)return;if(Oj(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=YA(a),f=YA(c);if(d&&f)return wj(n,`properties`,v(r,o)),wj(n,`patternProperties`,i&&s?v(i,s):i??s),delete n.additionalProperties,n;wj(n,`additionalProperties`,_(a,c));let p={},m=Object.keys(r),h=m.length,[g,y]=i?Ej(i):Dj,[b,x]=s?Ej(s):Dj,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)}wj(n,`properties`,p);let O={},k=new Set;return y.length>0&&x.length>0&&bj(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),wj(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||YA(o);for(;l<c.length;l++)s.push(t?c[l]:_(c[l],o));wj(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];wj(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)=>{jj(e,t);let r=jj({},n);return e.allOf===void 0?e.allOf=[r]:e.allOf=e.allOf.concat(r),e};function m(e,t){let n=[];if(bj(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=Cj([[Tj,d],[kj,f],[Aj,p],...a]),g=Pj(o);function _(e,t){if(e===!1||t===!1)return!1;if(YA(e))return YA(t)?!0:t;if(YA(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=Sj(_),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=Mj(e,t);if(n!==void 0)return n}else if(n||r){let i=new Set;if(n&&r)bj(e,t,(e,t)=>{let n=Mj(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=Mj(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:xj,writeOnly:xj,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:Sj((e,t)=>Array.isArray(e)?Array.isArray(t)?ZA(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 ZA(e,t)},multipleOf:(e,t)=>{let n=1;for(;!Number.isInteger(e)||!Number.isInteger(t);)n*=10,e*=10,t*=10;return vj(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:xj,required:ZA,...s};return{mergeSchemaDefinitions:_,mergeArrayOfSchemaDefinitions:c}}function Lj(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 Rj(e){return t=>e(Lj(t))}var{compareSchemaDefinitions:zj,compareSchemaValues:Bj}=hj(),{mergeArrayOfSchemaDefinitions:Vj}=Ij({intersectJson:Vce(Bj),deduplicateJsonSchemaDef:ej(zj)}),Hj=Rj(Vj);function Uj(e,t,n={},r,i,a=!1){return $j(e,t,n,r,void 0,void 0,i,a)[0]}function Wj(e){return typeof e==`boolean`?e?{}:{not:{}}:e}function Gj(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($j(e,t,n,a,r,i,o))}if(l&&typeof l!=`boolean`){let t=l;p=p.concat($j(e,t,n,a,r,i,o))}}else{let t=d?c:l;if(t!==void 0){let s=Wj(t);p=p.concat($j(e,s,n,a,r,i,o))}}return p.length&&(f=p.map(e=>VA(u,e))),f.flatMap(t=>$j(e,t,n,a,r,i,o))}function Kj(e){return e.reduce((e,t)=>t.length>1?t.flatMap(t=>SE(e.length,n=>[...e[n]].concat(t))):(e.forEach(e=>e.push(t[0])),e),[[]])}function qj(e,t){return Object.keys(e.patternProperties).filter(e=>RegExp(e).test(t)).reduce((t,n)=>(vE(t,[n],e.patternProperties[n]),t),{})}function Jj(e,t,n,r,i,a,o,s){let c=Yj(e,t,n,r,i,a,o,s);return c.length>1||c[0]!==t?c:`dependencies`in t?nM(e,t,n,r,i,a,o).flatMap(t=>$j(e,t,n,a,r,i,o)):`allOf`in t&&Array.isArray(t.allOf)?Kj(t.allOf.map(t=>$j(e,t,n,a,r,i,o))).map(e=>({...t,allOf:e})):[t]}function Yj(e,t,n,r,i,a,o,s){let c=Xj(t,n,i,void 0,s);return c===t?[t]:$j(e,c,n,a,r,i,o,s)}function Xj(e,t,n,r,i,a=!1){if(!Gk(e))return e;let o=e,s=r;if(`$ref`in o){let{$ref:e,...r}=o;if(n.includes(e))return a?{...o,[sA]:!0}:o;n.push(e),o={...LA(e,t,s),...r,[oA]:e},`$id`in o&&(s=o.$id)}if(`properties`in o){let e=[],r=wse(o[nA],(r,a,o)=>{let c=[...n];r[o]=Xj(a,t,c,s,i,!i),e.push(c)},{});yse(n,TE(rse(e))),o={...o,[nA]:r}}if(`items`in o&&!Array.isArray(o.items)&&typeof o.items!=`boolean`&&(o={...o,items:Xj(o.items,t,n,s,i)}),i){let r,a;`anyOf`in e&&Array.isArray(e.anyOf)?(r=Yk,a=o[Yk]):`oneOf`in e&&Array.isArray(e.oneOf)&&(r=tA,a=o[tA]),r&&a&&(o={...o,[r]:a.map(e=>Xj(e,t,n,s,i))})}return kA(e,o)?e:o}function Zj(e,t,n,r,i){let a={...t,properties:{...t.properties}},o=r&&Gk(r)?r:{};return Object.keys(o).forEach(t=>{if(!(t in a.properties)){if(`patternProperties`in a){let r=qj(a,t);if(!nE(r)){a.properties[t]=Uj(e,{[Jk]:Object.values(r)},n,Y(o,[t]),i),a.properties[t][qk]=!0;return}}if(`additionalProperties`in a&&a.additionalProperties!==!1){let r;r=typeof a.additionalProperties==`boolean`?{type:zA(Y(o,[t]))}:`$ref`in a.additionalProperties?Uj(e,{[aA]:Y(a.additionalProperties,[aA])},n,Y(o,[t]),i):`type`in a.additionalProperties?{...a.additionalProperties}:`anyOf`in a.additionalProperties||`oneOf`in a.additionalProperties?{type:`object`,...a.additionalProperties}:{type:zA(Y(o,[t]))},a.properties[t]=r,a.properties[t][qk]=!0}else a.properties[t]={type:`null`},a.properties[t][qk]=!0}}),a}function Qj(e){return Hj(e)}function $j(e,t,n,r,i=!1,a=[],o,s){return Gk(t)?Jj(e,t,n,i,a,r,o,s).flatMap(t=>{var s;let c=t;if(`if`in c)return Gj(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):Qj(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:
|
|
124
|
+
`,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=qj(t,i);return nE(a)||(t.properties[i]=Uj(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?Zj(e,c,n,r,o):c}):[{}]}function eM(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=RA(t);a=a.map(e=>Xj(e,n,[]));let l=UA(e,o,a,n,s);return r?(UA(e,o,tM(a,!1,n),n,s),a.map(e=>VA(c,e))):[VA(c,a[l])]}return[t]}function tM(e,t=!1,n){return e.map(e=>{if(!Gk(e))return Wj(e);let r=t&&n?Xj(e,n,[]):e;return r.additionalProperties===!1?{...r,additionalProperties:!0}:r})}function nM(e,t,n,r,i,a,o){let{dependencies:s,...c}=t;return eM(e,c,n,r,a).flatMap(t=>rM(e,s,t,n,r,i,a,o))}function rM(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]=FA(l,t);return Array.isArray(d)?c[0]=iM(n,d):Gk(d)&&(c=aM(e,n,r,l,d,i,a,o,s)),c.flatMap(t=>rM(e,u,t,r,i,a,o,s))}return c}function iM(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 aM(e,t,n,r,i,a,o,s,c){return $j(e,i,n,s,a,o,c).flatMap(i=>{let{oneOf:l,...u}=i,d=VA(t,u);return l===void 0?d:Kj(l.map(t=>typeof t==`boolean`||!(`$ref`in t)?[t]:Yj(e,t,n,a,o,s))).flatMap(t=>oM(e,d,n,r,t,a,o,s,c))})}function oM(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]=FA(r,l.properties);return $j(e,{...l,properties:u},n,s,a,o,c).map(e=>VA(t,e))})}function sM(e,t,n,r,i,a={},o){if(Array.isArray(n[i])){let s=RA(n)||r,c=n[i].map(n=>Uj(e,n,t,a,o)),l=Y(a,s);if(l!==void 0)return c.find(e=>kA(Y(e,[nA,s,Zk],Y(e,[nA,s,Xk])),l))}}function cM(e,t,n,r,i){let a=n;if($T(n,`$ref`)&&(a=Uj(e,n,t,void 0,i)),nE(r))return a;let[o,...s]=Array.isArray(r)?[...r]:r.split(`.`);if(o!==void 0&&o!==``&&$T(a,o))return a=Y(a,o),cM(e,t,a,s,i)}function lM(e,t,n,r,i,a){let o=cM(e,t,n,r,a);return o===void 0?i:o}var uM={title:`!@#$_UNKNOWN_$#@!`};function dM(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=lM(e,t,s,[nA,n],{},a),$T(s,`oneOf`)?s=sM(e,t,s,l,tA,Y(i,n),a):$T(s,`anyOf`)&&(s=sM(e,t,s,l,Yk,Y(i,n),a))}),$T(s,`oneOf`)?s=sM(e,t,s,l,tA,i,a):$T(s,`anyOf`)&&(s=sM(e,t,s,l,Yk,i,a));let u=lM(e,t,s,[nA,c],uM,a);u===uM&&(u=void 0);let d=lM(e,t,s,lce,[],a),f;return u&&Array.isArray(d)&&(f=d.includes(l)),{field:u,isRequired:f}}var fM={type:`object`,$id:cce,properties:{__not_really_there__:{type:`number`}}};function pM(e,t,n,r,i){let a=0;return n&&(lC(n.properties)?a+=_E(n.properties,(n,a,o)=>{let s=Y(r,o);if(typeof a==`boolean`)return n;if($T(a,`$ref`))return n+pM(e,t,Uj(e,a,t,s,i),s||{},i);if(($T(a,`oneOf`)||$T(a,`anyOf`))&&s){let r=$T(a,`oneOf`)?tA:Yk,o=RA(a);return n+mM(e,t,s,Y(a,r),-1,o,i)}if(a.type===`object`)return n+ +!!lC(s)+pM(e,t,a,s,i);if(a.type===zA(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):eE(n.type)&&n.type===zA(r)&&(a+=1)),a}function mM(e,t,n,r,i=-1,a,o){let s=r.map(e=>Xj(e,t,[])),c=HA(n,r,a);if(iE(c))return c;let l=s.reduce((r,i,o)=>(UA(e,n,[fM,i],t,a)===1&&r.push(o),r),[]);if(l.length===1)return l[0];l.length||SE(s.length,e=>l.push(e));let u=new Set,{bestIndex:d}=l.reduce((r,i)=>{let{bestScore:a}=r,c=s[i],l=pM(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 hM(e){let t=e[Xk],n=BA(e);return Gk(t)&&eE(t?.$data)&&n!==`object`&&n!==`array`}function gM(e){return Array.isArray(e.enum)&&e.enum.length===1||`const`in e}function _M(e){return Array.isArray(e.items)&&e.items.every(e=>Gk(e))}function vM(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:vM(a[o],t[o],n,r,i));return(n||i)&&c.length<s.length&&c.push(...s.slice(c.length)),c}if(Gk(t)){let a=Object.assign({},e);return Object.keys(t).reduce((o,s)=>{let c=Y(t,s),l=Gk(e)&&s in e,u=s in t,d=Y(e,s)??{},f=l&&Gk(d)&&Object.values(d).some(e=>Gk(e)),p=l&&Gk(Y(e,s)),m=u&&Gk(c);return p&&m&&!f?(o[s]={...Y(e,s),...c},o):(o[s]=vM(Y(e,s),c,n,r,i&&(l||!u)),a)},a)}return r&&(e!==void 0&&aE(t)||typeof t==`number`&&Number.isNaN(t))||i&&!aE(t)?e:t}function yM(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{let a=e?e[i]:{},o=t[i];if(e&&i in e&&Gk(o))r[i]=yM(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 bM(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 xM(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 SM(e,t){if(e.enum){let n,r;if(t){let{enumNames:e,enumOrder:i}=mA(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=xM(i,r)),i}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let i=RA(e);if(t){let{optionsSchemaSelector:e=i}=mA(t);i=e}return n?.map((e,t)=>{let{title:n}=mA(r?.[t]),a=e,o,s=n;if(i){let e=Y(a,[nA,i],{});o=Y(e,Zk,Y(e,Xk)),s=s??e?.title??a.title??String(o)}else o=bM(a),s=s??a.title??String(o);return{schema:a,label:s,value:o}})}function CM(e,t,n={},r){let i=Uj(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`&&gM(e)):!1}function wM(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items==`boolean`?!1:CM(e,t.items,n,r)}var TM=[`string`,`number`,`integer`,`boolean`,`null`],EM;(function(e){e[e.Ignore=0]=`Ignore`,e[e.Invert=1]=`Invert`,e[e.Fallback=2]=`Fallback`})(EM||={});function DM(e,t=EM.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!==EM.Ignore&&Gk(e.additionalItems)?e.additionalItems:{}}function OM(e,t){let{default:n,type:r}=e;return Array.isArray(r)&&r.includes(`null`)&&nE(t)&&n===null?null:t}function kM(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||!Gk(n)||!nE(n))&&(e[t]=n);else if(l!==`skipDefaults`){let r=i===void 0?a.includes(t):i;Gk(n)?l===`skipEmptyDefaults`?nE(n)||(e[t]=n):(!nE(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 AM(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=Gk(i)?i:{},m=Gk(t)?t:{},h=r,g=h&&c?.nestedDefaultsPrecedence===`ancestorWins`,_=null,v=c,y=s;if(m.const!==void 0&&c?.constAsDefaults!==`never`&&!hM(m))h=m[Xk];else if(Gk(h)&&Gk(m.default)&&!m.anyOf&&!m.oneOf&&!m.$ref)h=g?yM(m.default,h):yM(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[aA];s.includes(e)||(y=s.concat(e),_=LA(e,a));let t=i===void 0||Gk(i)&&nE(i);_&&!h&&t&&(h=m.default),d&&_&&!Gk(i)&&(p=i)}else if(`dependencies`in m){let t=nM(e,m,a,!1,[],{...PM(e,m,n,h),...p},l);[_]=t}else if(_M(m)&&!g)h=m.items.map((t,n)=>AM(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=RA(m),{type:o=`null`}=n;!Array.isArray(o)&&TM.includes(o)&&v?.constAsDefaults===`skipOneOf`&&(v={...v,constAsDefaults:`never`}),_=t[mM(e,a,i??m.default,t,0,r,l)],_=VA(n,_)}else if(`anyOf`in m){let{anyOf:t,...n}=m;if(t.length===0)return;let r=RA(m);_=t[mM(e,a,i??m.default,t,0,r,l)],_=VA(n,_)}if(_)return AM(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=PM(e,m,n,h)??h;if(d){let{arrayMinItems:t={}}=c||{},{mergeExtraDefaults:n}=t,r=jM(e,m,a,i,c,l);(!Gk(i)||`allOf`in m)&&(b=vM(b,r,n,!0))}return b}function jM(e,t,n,r,i,a){let o=i?.allOf===`populateDefaults`&&`allOf`in t,s=o?Uj(e,t,n,r,a):t,c=!gM(s)&&CM(e,s,n,a),l=r;return c&&(l=SM(s)?.some(e=>kA(e.value,r))?r:void 0),s.const&&i?.constAsDefaults===`always`?l=s.const:Gk(l)&&Gk(s.properties)&&(l=Object.keys(s.properties).reduce((t,r)=>{let c=Y(s,[nA,r],{});return r in t&&(o||Gk(c)&&`allOf`in c)&&(t[r]=jM(e,c,n,Y(t,r),i,a)),t},{...l})),l}function MM(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=Gk(n)?n:{},p=t,m=o?.allOf===`populateDefaults`&&`allOf`in p||o?.emptyObjectFields!==`skipEmptyDefaults`&&`if`in p?Uj(e,p,r,f,s):p,h=m[Xk],g=Object.keys(m.properties||{}).reduce((t,n)=>{let p=Y(m,[nA,n],{}),g=Gk(h)&&h[n]!==void 0,_=(Gk(p)&&`const`in p||g)&&o?.constAsDefaults!==`never`&&!hM(p);return kM(t,n,AM(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=Gk(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)}),Gk(d)&&p.length===0&&Object.keys(d).filter(e=>!m.properties||!m.properties[e]).forEach(e=>n.add(e)),n.forEach(n=>{let h=AM(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});kM(g,n,h,i,c,p)})}return OM(t,g)}}function NM(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)=>AM(e,DM(p,EM.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=DM(p);if(_)f=n;else{let c=n.map((n,c)=>AM(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=vM(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||wM(e,p,r,o)||b(e,p,r)||p.minItems<=S)C=f||!s&&!c?f:x;else{let t=f||[],n=DM(p,EM.Invert),c=n.default,u=Array.from({length:p.minItems-S},()=>AM(e,n,{parentDefaults:c,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,required:s,shouldMergeDefaultsIntoFormData:l}));C=t.concat(u)}return OM(t,C)}function PM(e,t,n={},r){switch(BA(t)){case`object`:return MM(e,t,n,r);case`array`:return NM(e,t,n,r);default:return}}function FM(e,t,n,r,i=!1,a,o,s){if(!Gk(t))throw Error(`Invalid schema: ${t}`);let c=Uj(e,t,r,n,o),l=AM(e,c,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:a,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:s,requiredAsRoot:!0});if(c.type!==`object`&&Gk(c.default))return{...l,...n};if(Gk(n)||Array.isArray(n)){let{mergeDefaultsIntoFormData:t}=a||{},i=t===`useDefaultIfFormDataUndefined`;return vM(l,jM(e,c,r??c,n,a,o),!0,i,!0)}return l}function IM(e={}){return`widget`in mA(e)&&mA(e).widget!==`hidden`}function LM(e,t,n={},r,i){if(n[`ui:widget`]===`files`)return!0;if(t.items){let n=Uj(e,t.items,r,void 0,i);return n.type===`string`&&n.format===`data-url`}return!1}function RM(e,t,n={},r,i,a){let{label:o=!0}=mA(n,i),s=!!o;if(s){let i=BA(t),o=!!t[qk];i===`array`&&(s=o||wM(e,t,r,a)||LM(e,t,n,r,a)||IM(n)),i===`object`&&(s=o),i===`boolean`&&n&&!n[`ui:widget`]&&(s=!1),n?.[`ui:field`]&&(s=!1)}return s}function zM(e,t){if(t.length===0&&typeof e!=`object`)return e;let n=hE(e,t);return Array.isArray(e)?Object.keys(n).map(e=>n[e]):n}function BM(e,t){let n=(e,t)=>typeof e!=`object`||nE(e)||t&&!nE(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[uA]&&c.$name!==``?i.push(c[eA]):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 VM(e){return aE(e)||e===``?!0:Array.isArray(e)?e.length===0:Gk(e)?Object.values(e).every(VM):!1}function HM(e,t){return t?t(e):Hj(e)}function UM(e,t,n={},r,i){function a(e){return Gk(e)}function o(e){return Gk(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&&Gk(s)){let e=o(t)?t:{};e.$ref!==void 0&&(e=LA(e.$ref,n));let r=new Set(e.required??[]);if(Object.entries(s).every(([e,t])=>!r.has(e)&&VM(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)||CM(e,r,n,i))return o;let s=tM(t,!0,n),c=mM(e,n,a,s,0,RA(r),i),l=t[c];return p(Gk(l)?Xj(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||Gk(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||nE(e))return t;let o=e,{$ref:m,allOf:h}=o;if(m!==void 0)return p(LA(m,n),t,r);if(h){o=HM(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)),_=BA(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 WM=Symbol(`no Value`);function GM(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[Xk]:Array.isArray(e.enum)&&e.enum.length===1?e.enum[0]:WM).filter(e=>e!==WM);return n.length>0?n:void 0}function KM(e,t){let n=GM(e);if(!n||n.some(e=>kA(e,t)))return WM;let r=Y(e,Zk,WM);return r!==WM&&n.some(e=>kA(e,r))?r:n.length===1?n[0]:void 0}function qM(e,t,n,r,i={},a){let o;if($T(n,`properties`)){let s={};if($T(r,`properties`)){let e=Y(r,nA,{});Object.keys(e).forEach(e=>{$T(i,e)&&(s[e]=void 0)})}let c=Object.keys(Y(n,nA,{})),l={};c.forEach(o=>{let c=Y(i,o),u=Y(r,[nA,o],{}),d=Y(n,[nA,o],{});$T(u,`$ref`)&&(u=Uj(e,u,t,c,a)),$T(d,`$ref`)&&(d=Uj(e,d,t,c,a));let f=Y(u,`type`),p=Y(d,`type`);if(!f||f===p)if($T(s,o)&&delete s[o],p===`object`||p===`array`&&Array.isArray(c)){let n=qM(e,t,d,u,c,a);(n!==void 0||p===`array`)&&(l[o]=n)}else{let e=Y(d,Zk,WM),t=Y(u,Zk,WM);e!==WM&&e!==c&&(t===c?s[o]=e:Y(d,`readOnly`)===!0&&(s[o]=void 0));let n=Y(d,Xk,WM),r=Y(u,Xk,WM);if(n!==WM&&n!==c&&(s[o]=r===c?n:void 0),$T(i,o)){let e=KM(d,c);e!==WM&&(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)){$T(s,`$ref`)&&(s=Uj(e,s,t,i,a)),$T(c,`$ref`)&&(c=Uj(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=qM(e,t,c,s,i,a);return o!==void 0&&(r<0||n.length<r)&&n.push(o),n},[]);else{let e=GM(c),t=e?i.filter(t=>e.some(e=>kA(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 JM(e,t,n,r,i,a=[],o){if(`$ref`in t||`dependencies`in t||`allOf`in t||`if`in t){let s=Uj(e,t,r,i,o);if(a.findIndex(e=>kA(e,s))===-1)return JM(e,s,n,r,i,a.concat(s),o)}let s={[eA]:n.replace(/^\./,``)};if(`oneOf`in t||`anyOf`in t){let c=`oneOf`in t?t.oneOf:t.anyOf,l=c[mM(e,r,i,c,0,RA(t),o)];s={...s,...JM(e,l,n,r,i,a,o)}}if(`additionalProperties`in t&&t.additionalProperties!==!1){vE(s,uA,!0);let c=lC(t.additionalProperties)?t[sce]:{},l=Y(t,nA,{});for(let t of Object.keys(i??{}))t in l||(s[t]=JM(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]=JM(e,c[i],`${n}.${i}`,r,t,a,o):l?s[i]=JM(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]=JM(e,c,`${n}.${i}`,r,t,a,o)})}else if(`properties`in t)for(let c in t.properties){let l=Y(t,[nA,c],{});s[c]=JM(e,l,`${n}.${c}`,r,Y(i,[c]),a,o)}return s}function YM(e,t,n=``,r,i,a){return JM(e,t,n,r,i,void 0,a)}var XM=class{constructor(e,t,n,r){t?.$schema===`https://json-schema.org/draft/2020-12/schema`?this.rootSchema=PA(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||!kA(this.rootSchema,t)||!kA(this.experimental_defaultFormStateBehavior,n)||this.experimental_customMergeAllOf!==r}findFieldInSchema(e,t,n){return dM(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,t,n,r){return sM(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getDefaultFormState(e,t,n=!1,r){return FM(this.validator,e,t,this.rootSchema,n,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,r)}getDisplayLabel(e,t,n){return RM(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,t,n,r){return mM(this.validator,this.rootSchema,e,t,n,r,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,t,n){return UA(this.validator,e,t,this.rootSchema,n)}getFromSchema(e,t,n){return lM(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}isFilesArray(e,t){return LM(this.validator,e,t,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return wM(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return CM(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,t){return UM(this.validator,e,this.rootSchema,t)}retrieveSchema(e,t,n){return Uj(this.validator,e,this.rootSchema,t,this.experimental_customMergeAllOf,n)}sanitizeDataForNewSchema(e,t,n){return qM(this.validator,this.rootSchema,e,t,n,this.experimental_customMergeAllOf)}toPathSchema(e,t,n){return YM(this.validator,e,t,this.rootSchema,n,this.experimental_customMergeAllOf)}};function ZM(e,t,n={},r){return new XM(e,t,n,r)}function QM(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 $M(e,t){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}function eN(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 eN(t,e).reverse();let o=[];for(let e=i;e<=a;e+=1)o.push({value:e,label:$M(e,2)});return o}function tN(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 nN(e,t){return tN(e,t)}function rN(e,t=[],n){if(Array.isArray(e))return e.map(e=>rN(e,t)).filter(e=>e!==void 0);let r=t[e===``||e===null?-1:Number(e)];return r?r.value:n}function iN(e,t,n=[]){let r=rN(e,n);return Array.isArray(t)?t.filter(e=>!kA(e,r)):kA(r,t)?void 0:t}function aN(e,t){return Array.isArray(t)?t.some(t=>kA(t,e)):kA(t,e)}function oN(e,t=[],n=!1){let r=t.map((t,n)=>aN(t.value,e)?String(n):void 0).filter(e=>e!==void 0);return n?r:r[0]}function sN(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=oN(e,t,n);return a===void 0?i:a}function cN(e,t,n=[]){let r=rN(e,n);if(!aE(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 lN(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 uN(e,t,n=`indexed`,r){return n===`realValue`?Array.isArray(e)?e.map(e=>lN(e,t,r)):lN(e,t,r):rN(e,t,r)}function dN(e,t,n=`indexed`){return n===`realValue`?aE(e)?``:String(typeof e==`object`?t:e):String(t)}var fN=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={},yE(this.errorSchema,e,t,Object)),t}resetAllErrors(e){return this.errorSchema=e?ET(e):{},this}addErrors(e,t){let n=this.getOrCreateErrorBlock(t),r=Y(n,Qk);return Array.isArray(r)||(r=[],n[Qk]=r),Array.isArray(e)?vE(n,Qk,[...new Set([...r,...e])]):vE(n,Qk,[...new Set([...r,e])]),this}setErrors(e,t){return vE(this.getOrCreateErrorBlock(t),Qk,Array.isArray(e)?[...new Set([...e])]:[e]),this}clearErrors(e){return vE(this.getOrCreateErrorBlock(e),Qk,[]),this}};function pN(e,t){let n=Uw(e),r=Uw(t);if(e===t||!n&&!r)return[];if(n&&!r)return bw(e);if(!n&&r)return bw(t);let i=bw(pE(e,(e,n)=>!kA(e,Y(t,n)))),a=ese(bw(t),bw(e));return[...i,...a]}function mN(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 hN(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 gN(e,t,n={},r=!0){let i={type:t||`text`,...hN(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 _N(e){return e?.optionValueFormat??`indexed`}var vN={props:{disabled:!1},submitText:`Submit`,norender:!1};function yN(e={}){let t=mA(e);if(t?.submitButtonOptions){let e=t[iA];return{...vN,...e}}return vN}function bN(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 xN(){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,EE(`test-id-`)),e.get(n)}})}var SN=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}})),CN=u(s(((e,t)=>{t.exports=SN()}))(),1),wN={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 TN(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}),vE(e,`MergedWidget`,t)}return t}function EN(e,t,n={}){let r=BA(e);if(typeof t==`function`||t&&CN.isForwardRef((0,b.createElement)(t))||CN.isMemo(t))return TN(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 EN(e,r,n)}if(typeof r==`string`){if(!(r in wN))throw Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in wN[r]){let i=n[wN[r][t]];return EN(e,i,n)}}throw Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function DN(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 ON(e){let t=new Set;return JSON.stringify(e,(e,n)=>(t.add(e),n)),JSON.stringify(e,Array.from(t).sort())}function kN(e){return DN(ON(e))}function AN(e){return DN(ON(e))}function jN(e,t,n={}){try{return EN(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 MN(e,t){return`${eE(e)?e:e.$id}__${t}`}function NN(e){return MN(e,`description`)}function PN(e){return MN(e,`error`)}function FN(e){return MN(e,`examples`)}function IN(e){return MN(e,`help`)}function LN(e){return MN(e,`title`)}function RN(e,t=!1){let n=t?` ${FN(e)}`:``;return`${PN(e)} ${NN(e)} ${IN(e)}${n}`}function zN(e,t){return`${e}-${t}`}function BN(e,t){return MN(e,t)}function VN(e,t){return MN(e,`optional${t}`)}function HN(e){return!aE(e)&&(!lC(e)||Array.isArray(e)||!nE(e))}function UN(e,t){let{rootSchema:n,schemaUtils:r}=e;return kA(t,n)?!0:`$ref`in n&&kA(t,r.retrieveSchema(n))}function WN(e,t,n){return t?n:e}function GN(e){return e?new Date(e).toJSON():void 0}function KN(e,t,n,r=!1){!r&&Array.isArray(n)&&t.default!==void 0&&oN(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 qN(e,t,n){let r=[fce];return $T(e,`formContext`)&&r.unshift(dce),Y(e,[...r,t],n)}function JN(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 YN(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 XN(e,t,n){let r=e[oA]??e[aA],i=n.uiSchemaDefinitions,a=r&&i?i[r]:void 0,o;if(o=a?!t||nE(t)?{...a}:yM(a,t):t||{},i){let t=e;if(r&&e.$ref&&!e[oA])try{t=LA(r,n.rootSchema)}catch(e){return console.warn(`could not resolve $ref in resolveUiSchema:
|
|
125
|
+
`,e),o}for(let e of[tA,Yk]){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?.[oA]??t?.[aA];if(o&&o in i){let t=r[e]||{};r[e]=yM(i[o],t),a=!0}}a&&(o[e]=r)}}}return o}function ZN(e){return e.const||e.enum?.length===1&&e.enum[0]===!0?!0:e.anyOf?.length===1?ZN(e.anyOf[0]):e.oneOf?.length===1?ZN(e.oneOf[0]):e.allOf?e.allOf.some(e=>ZN(e)):!1}function QN({hideLabel:e,id:t,multiple:n,options:r,registry:i,uiSchema:a,value:o}){if(n||e)return null;let{label:s=!0}=mA(a,i.globalUiOptions);if(!s)return null;let c=r.enumOptions?.find(({value:e})=>aN(e,o)),l=c?.schema?.description;return l?(0,H.jsx)(bN(`DescriptionFieldTemplate`,i,r),{id:NN(t),description:l,schema:c.schema,uiSchema:a,registry:i}):null}function $N(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 eP(e,t,n,r=`customDeep`){if(r===`always`)return!0;if(r===`shallow`){let{props:r,state:i}=e;return!$N(r,t)||!$N(i,n)}let{props:i,state:a}=e;return!kA(i,t)||!kA(a,n)}function tP(e){let t=TE(e.map(e=>lC(e)?BA(e):void 0).flat().filter(e=>e!==void 0));return t.length===1?t[0]:t}function nP(e,t,n,r){let{enableOptionalDataFieldForType:i=[]}=mA(r,e.globalUiOptions),a;return a=`anyOf`in t&&Array.isArray(t.anyOf)?tP(t[Yk]):`oneOf`in t&&Array.isArray(t.oneOf)?tP(t[tA]):BA(t),!UN(e,t)&&!n&&!!a&&!Array.isArray(a)&&!!i.find(e=>e===a)}function rP(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 iP(e,t=[]){if(!e)return[];let n=[];return`__errors`in e&&(n=n.concat(e[Qk].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(Uw(i))return n.concat(iP(i,[...t,r]))}return n},n)}function aP(e){let t=new fN;return e.length&&e.forEach(e=>{let{property:n,message:r}=e,i=n===`.`?[]:CE(n);i.length>0&&i[0]===``&&i.splice(0,1),r&&t.addErrors(r,i)}),t.ErrorSchema}function oP(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 sP(e){return Object.keys(e).reduce((t,n)=>{if(n===`addError`)return t;let r=e[n];return Uw(r)?{...t,[n]:sP(r)}:{...t,[n]:r}},{})}function cP(e){return Object.values(e).every(e=>e!==-1)}function lP(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:eN(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":RN(o)})}function uP(e){let{time:t=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:a,value:o}=e,[s,c]=(0,b.useState)(YN(o,t));(0,b.useEffect)(()=>{c(YN(o,t))},[t,o]);let l=(0,b.useCallback)((e,n)=>{let r={...s,[e]:n===void 0?-1:n};cP(r)?a(rP(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=YN(new Date().toJSON(),t);a(rP(i,t))},[n,r,t,a]);return{elements:(0,b.useMemo)(()=>mN(s,t,i.yearsRange,i.format),[s,t,i.yearsRange,i.format]),handleChange:l,handleClear:u,handleSetNow:d}}function dP(e){let t=(0,b.useRef)(e);return kA(e,t.current)||(t.current=e),t.current}function fP(e,t){return e.replace(`;base64`,`;name=${encodeURIComponent(t)};base64`)}async function pP(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:fP(e.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},o.readAsDataURL(e)})}async function mP(e){return Promise.all(Array.from(e).map(pP))}function hP(e){return e.reduce((e,t)=>{if(!t)return e;try{let{blob:n,name:r}=QM(t);return[...e,{dataURL:t,name:r,size:n.size,type:n.type}]}catch{return e}},[])}function gP(e,t,n=!1){let r=(0,b.useMemo)(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]);return{filesInfo:(0,b.useMemo)(()=>hP(Array.isArray(e)?e:[e||``]),[e]),handleChange:(0,b.useCallback)(async e=>{let i=(await mP(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 _P(e){if(!e)return``;let t=new Date(e);return`${$M(t.getFullYear(),4)}-${$M(t.getMonth()+1,2)}-${$M(t.getDate(),2)}T${$M(t.getHours(),2)}:${$M(t.getMinutes(),2)}:${$M(t.getSeconds(),2)}.${$M(t.getMilliseconds(),3)}`}function vP(e,t,n=!1){if(!t)return e;let{errors:r,errorSchema:i}=e,a=iP(t),o=t;return nE(i)||(o=yM(i,t,!n||`preventDuplicates`),a=[...r].concat(a)),{errorSchema:o,errors:a}}function yP(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]=dA+n:t[e]=xP(n)}return e}function bP(e){return e.map(e=>xP(e))}function xP(e){return Array.isArray(e)?bP([...e]):lC(e)?yP({...e}):e}var SP;(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)`})(SP||={});function CP(){return EE(`rjsf-array-item-`)}function wP(e){return Array.isArray(e)?e.map(e=>({key:CP(),item:e})):[]}function TP(e){return Array.isArray(e)?e.map(e=>e.item):[]}function EP(e){return Array.isArray(e.type)?!e.type.includes(`null`):e.type!==`null`}function DP(e,t,n,r){let{addable:i}=mA(r,e.globalUiOptions);return i!==!1&&(i=t.maxItems===void 0||n.length<t.maxItems),i}function OP(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 kP(e,t){let{schemaUtils:n,globalFormOptions:r}=e,i=t.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:_M(t)&&oce(t)&&(i=t.additionalItems),n.getDefaultFormState(i)}function AP(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=SM(_.retrieveSchema(t.items,i),r?.items??r),{widget:x=`select`,title:S,...C}=mA(r,y),w=EN(t,x,g),T=S??t.title??m,E=_.getDisplayLabel(t,r,y),D=dP(oP(``,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 jP(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}=mA(r,b),w=EN(t,x,_),T=S??t.title??h,E=v.getDisplayLabel(t,r,b),D=dP(oP(``,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 MP(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}=mA(n,v),S=EN(t,y,h),C=b??t.title??i,w=g.getDisplayLabel(t,n,v),T=dP(oP(``,_,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 NP(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)(()=>oP(n,F,_),[n,F,_]),ee=M||N,te=bN(`ArrayFieldItemTemplate`,s,c),ne=j.getDisplayLabel(I,g,P),{description:R}=mA(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:EP(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 PP=(0,b.memo)(NP);function FP(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)(()=>mA(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)(()=>TP(v),[v]),P=nP(p,t,d,n),F=HN(a),I=(0,b.useMemo)(()=>DP(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=OP(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)(PP,{...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)(bN(`ArrayFieldTemplate`,p,A),{...R})}function IP(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)(()=>mA(n,O),[n,O]),{OptionalDataControlsField:A}=E,j=nP(p,t,d,n),M=HN(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=DP(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]:OP(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)(PP,{...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)(bN(`ArrayFieldTemplate`,p,k),{...ne})}function LP(e=[]){let t=(0,b.useMemo)(()=>kN(e),[e]),[n,r]=(0,b.useState)(()=>({formDataHash:t,keyedFormData:wP(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]})):wP(n),a=t,r({formDataHash:a,keyedFormData:i})}let o=(0,b.useCallback)(e=>{let t=TP(e),n=kN(t);return r({formDataHash:n,keyedFormData:e}),t},[]);return{keyedFormData:i,updateKeyedFormData:o}}function RP(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}=LP(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?vE(r,[t],m.current[t]):t>=n&&vE(r,[t+1],m.current[t])}}let i={key:CP(),item:kP(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?vE(n,[r],m.current[r]):r>t&&vE(n,[r+1],m.current[r])}}let r={key:CP(),item:ET(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?vE(n,[r],m.current[r]):r>t&&vE(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?vE(r,[n],m.current[t]):i===n?vE(r,[t],m.current[n]):vE(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)(bN(`UnsupportedFieldTemplate`,a,mA(n)),{schema:t,fieldPathId:i,reason:u(SP.MissingItems),registry:a});let e={...t,[$k]:{type:void 0}};C.schema=e,w.schema=e}return l.isMultiSelect(C.schema)?(0,H.jsx)(AP,{...C}):IM(n)?(0,H.jsx)(jP,{...C}):_M(C.schema)?(0,H.jsx)(IP,{...w}):l.isFilesArray(C.schema,n)?(0,H.jsx)(MP,{...C}):(0,H.jsx)(FP,{...w})}function zP(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}=mA(r,x),D=EN(t,S,v),O=y(SP.YesLabel),k=y(SP.NoLabel),A,j=C??_??f??n;if(Array.isArray(t.oneOf))A=SM({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}]:SM({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 BP(e){let[t,n]=(0,b.useState)(!1),{name:r,registry:i,schema:a,uiSchema:o,fieldPathId:s}=e,{globalUiOptions:c}=i,l=bN(`CyclicSchemaExpandTemplate`,i,mA(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,[sA]:!1}})}function VP(e){return{type:`string`,enum:[`string`,`number`,`boolean`,`object`,`array`],default:`string`,title:e}}function HP(e){let t=typeof e;return t===`string`||t===`number`||t===`boolean`?t:t===`object`?Array.isArray(e)?`array`:`object`:`string`}function UP(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 WP(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)(HP(n)),S=mA(o),C=dP(oP(`__internal_type_selector`,v,p)),w=g(SP.Type),T=(0,b.useMemo)(()=>VP(w),[w]),E=e=>{e!=null&&(x(e),m(UP(n,e),p.path,h,t))};if(!v.useFallbackUiForUnsupportedType){let{reason:t=g(SP.UnknownFieldType,[String(i.type)])}=e;return(0,H.jsx)(bN(`UnsupportedFieldTemplate`,f,S),{schema:i,fieldPathId:p,reason:t,registry:f})}let D=bN(`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?kN(n):`__empty__`),schemaField:(0,H.jsx)(O,{...e,schema:{type:y,title:g(SP.Value),...y===`object`&&{additionalProperties:!0}}})})}var GP;(function(e){e.ROW=`ui:row`,e.COLUMN=`ui:col`,e.COLUMNS=`ui:columns`,e.CONDITION=`ui:condition`})(GP||={});var KP;(function(e){e.ALL=`all`,e.SOME=`some`,e.NONE=`none`})(KP||={});var qP=/^\$lookup=(.+)/,JP=`layoutGrid`;`${JP}`;function YP(e,t){return e??t}function XP(e){return/^\d+?$/.test(e)}var ZP=xN();function QP(e,t,n,r,i){let a=Y(n,[pA],{}),o=Y(n,e),s={...Y(o,[fA],{}),...t,...a},c={...o};nE(s)||vE(c,[fA],s),nE(a)||vE(c,[pA],a);let{readonly:l}=mA(c);return(i===!0||oE(l)&&r===!0)&&(l=!0,$T(s,`readonly`)?vE(c,[fA,rA],!0):vE(c,`ui:${rA}`,!0)),{fieldUiSchema:c,uiReadonly:l}}function $P(e,t,n=`$0m3tH1nG Un3xP3cT3d`){let r=zw([t]).sort(),i=zw([n]).sort();switch(e){case KP.ALL:return rE(r,i);case KP.SOME:return tE(r,i).length>0;case KP.NONE:return tE(r,i).length===0;default:return!1}}function eF(e,t,n){let r={},i=e[t];if(Uw(i)){let{children:e,className:t,...a}=i;if(i=e,t){let e=t.split(` `).map(e=>qN(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 tF(e,t,n){let r,i=t;if(XP(n)&&e&&e?.type===`array`&&$T(e,`items`)){let a=Number(n),o=e[$k];r=Array.isArray(o)?a>o.length?ZT(o):o[a]:o,i={$id:t.$id,path:[...t.path.slice(0,t.path.length-1),a]}}return{rawSchema:r,fieldPathId:i}}function nF(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=oP(e,o,c),$T(d,`properties`))s=Y(d,[nA,e],{});else if(d&&($T(d,`oneOf`)||$T(d,`anyOf`))){let t=$T(d,`oneOf`)?tA:Yk;s=Y(a.findSelectedOptionInXxxOf(d,e,t,f),[nA,e],{})}else{let t=tF(d,c,e);s=t.rawSchema??{},c=t.fieldPathId}f=Y(f,e,{}),d=a.retrieveSchema(s,f),p=YP(d.readOnly,p)});let m,h=!1;if(nE(d)&&(d=void 0),d&&u){if(d&&($T(d,`oneOf`)||$T(d,`anyOf`))){let e=$T(d,`oneOf`)?tA:Yk;d=a.findSelectedOptionInXxxOf(d,u,e,f)}c=oP(u,o,c),h=d!==void 0&&Array.isArray(d.required)&&use(d.required,u);let e=tF(d,c,u);if(e.rawSchema?(d=e.rawSchema,c=e.fieldPathId):(d=Y(d,[nA,u]),d&&=a.retrieveSchema(d)),p=YP(d?.readOnly,p),d&&($T(d,`oneOf`)||$T(d,`anyOf`))){let e=$T(d,`oneOf`)?tA:Yk,t=RA(d);m={options:d[e],hasDiscriminator:!!t}}}return{schema:d,isRequired:h,isReadonly:p,optionsInfo:m,fieldPathId:c}}function rF(e,t){let n=e;return eE(n)&&(n=qN(t,n)),TC(n)?n:null}function iF(e,t){let n,r=null,i={},a;if(eE(t)||oE(t))n=t??``;else{let{name:o=``,render:s,...c}=t;n=o,i=c,nE(i)||tse(i,(t,n)=>{if(eE(t)){let r=qP.exec(t);if(Array.isArray(r)&&r.length>1){let t=r[1];i[n]=qN(e,t,t)}}}),r=rF(s,e),!o&&r&&(a=(0,H.jsx)(r,{...c,"data-testid":ZP.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:a}}function aF(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)(oF,{...n,key:`layoutGrid-${kN(e)}`,schema:s,layoutGridSchema:e}))}function Hce(e){let{layoutGridSchema:t,...n}=e,{formData:r,registry:i}=n,{children:a,gridProps:o}=eF(t,GP.CONDITION,i),{operator:s,field:c=``,value:l}=o;return $P(s,Y(r,c,null),l)?(0,H.jsx)(aF,{...n,childrenLayoutGridSchemaId:a}):null}function Uce(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=eF(t,GP.COLUMN,r);return(0,H.jsx)(bN(`GridTemplate`,r,mA(i)),{column:!0,"data-testid":ZP.col,...o,children:(0,H.jsx)(aF,{...n,childrenLayoutGridSchemaId:a})})}function Wce(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=eF(t,GP.COLUMNS,r),s=bN(`GridTemplate`,r,mA(i));return a.map(e=>(0,H.jsx)(s,{column:!0,"data-testid":ZP.col,...o,children:(0,H.jsx)(aF,{...n,childrenLayoutGridSchemaId:[e]})},`column-${kN(e)}`))}function Gce(e){let{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:a,gridProps:o}=eF(t,GP.ROW,r);return(0,H.jsx)(bN(`GridTemplate`,r,mA(i)),{...o,"data-testid":ZP.row,children:(0,H.jsx)(aF,{...n,childrenLayoutGridSchemaId:a})})}function Kce(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,_=iF(u,t),{name:v,UIComponent:y,uiProps:b}=_,{schema:x,isRequired:S,isReadonly:C,optionsInfo:w,fieldPathId:T}=nF(u,v,n,c,a),E=dP(T);if(_.rendered)return _.rendered;if(x){let e=w?.hasDiscriminator?g:h,{fieldUiSchema:t,uiReadonly:n}=QP(v,b,r,C,l);return(0,H.jsx)(e,{"data-testid":w?.hasDiscriminator?ZP.layoutMultiSchemaField:ZP.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":ZP.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 oF(e){let{uiSchema:t}=e,{layoutGridSchema:n}=e,r=mA(t);if(!n&&`layoutGrid`in r&&lC(r.layoutGrid)&&(n=r[JP]),lC(n)){if(GP.ROW in n)return(0,H.jsx)(Gce,{...e,layoutGridSchema:n});if(GP.COLUMN in n)return(0,H.jsx)(Uce,{...e,layoutGridSchema:n});if(GP.COLUMNS in n)return(0,H.jsx)(Wce,{...e,layoutGridSchema:n});if(GP.CONDITION in n)return(0,H.jsx)(Hce,{...e,layoutGridSchema:n})}return(0,H.jsx)(Kce,{...e,gridSchema:n})}oF.TEST_IDS=ZP;function qce(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,name:s}=e,c=mA(i,o.globalUiOptions),{title:l}=c,{title:u}=r,d=l||n||u||s;return d?(0,H.jsx)(bN(`TitleFieldTemplate`,o,c),{id:LN(t),title:d,required:a,schema:r,uiSchema:i,registry:o}):null}function sF(e,t,n){return e.map(({schema:e})=>e).find(e=>{let r=Y(e,[nA,t]);return Y(r,Zk,Y(r,Xk,`!@#!@$@#$!@$#`))===n})}function cF(e,t,n,r,i){let a=t.map(e=>n.retrieveSchema(e,i)),o=e;$T(e,`oneOf`)?o={...e,[tA]:a}:$T(e,`anyOf`)&&(o={...e,[Yk]:a});let s=SM(o,r);if(!s)throw Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return s}function Jce(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)(cF(f,c,y,d,i)),w=Y(a,`$id`),T=RA(f),E=bN(`FieldErrorTemplate`,u,c),D=bN(`FieldTemplate`,u,c);(0,b.useEffect)(()=>{C(cF(f,c,y,d,i))},[kN(f),kN(c),y,d?kN(d):``,i?kN(i):``]);let{widget:O=T?`radio`:`select`,title:k=``,placeholder:A=``,optionsSchemaSelector:j=T,hideError:M,...N}=mA(d);if(!j)throw Error(`No selector field provided for the LayoutMultiSchemaField`);let P=Y(i,j),F=Y(S[0]?.schema,[nA,j],{}),I=sF(S,j,P);F=F?.type?F:{...F,type:I?.type||n};let L=EN(F,O,v),ee=M===void 0?_:!!M,te=Y(g,[Qk],[]),ne=uE(g,[Qk]),R=y.getDisplayLabel(f,d,x),z=e=>{if(r||m)return;let t=sF(S,j,e),n=sF(S,j,P),o=y.sanitizeDataForNewSchema(t,n,i);o&&t&&(o=y.getDefaultFormState(t,o,`excludeObjectChildren`)),o&&vE(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)&&nE(S),uiSchema:d,required:h,readonly:!!m,registry:u,displayLabel:R,errors:re,onChange:s,onKeyRename:IC,onKeyRenameBlur:IC,onRemoveProperty:IC,children:(0,H.jsx)(L,{id:w,name:t,schema:f,label:(k||f.title)??``,disabled:r||Array.isArray(S)&&nE(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 lF(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,kN(i??null)]),[_,v]=(0,b.useState)(()=>{let e=RA(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,!kA(i,e)&&a.$id===t){if(y.current){y.current=!1;return}let e=RA(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=bN(`MultiSchemaFieldTemplate`,d,O),j=nP(d,p,f,m),M=HN(i),{widget:N=`select`,placeholder:P,autofocus:F,autocomplete:I,title:L=p.title,...ee}=mA(m,O),te=EN({type:`number`},N,T),ne=Y(r,Qk,[]),R=uE(r,[Qk]),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?VA(n,B):B}let ie=[];`oneOf`in p&&m&&`oneOf`in m?Array.isArray(m.oneOf)?ie=m[tA]:console.warn(`uiSchema.oneOf is not an array for "${L||t}"`):`anyOf`in p&&m&&`anyOf`in m&&(Array.isArray(m.anyOf)?ie=m[Yk]:console.warn(`uiSchema.anyOf is not an array for "${L||t}"`));let ae=m;_>=0&&ie.length>_&&(ae=ie[_]);let oe=L?SP.TitleOptionPrefix:SP.OptionPrefix,se=L?[L]:[],ce=g.map((e,t)=>{let{title:n=e.title}=mA(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||nE(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 Yce(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 Xce=/\.([0-9]*0)*$/,Zce=/[0.]0*$/;function Qce(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`&&Xce.exec(a)?Kk(a.replace(Zce,``)):Kk(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 uF;function $ce(e){if(!uF)if(typeof document<`u`)uF=document.createElement(`textarea`);else return;var t=`&`+e+`;`;uF.innerHTML=t;var n=uF.value;return n===t?void 0:n}var X=32,Z=9,dF=13,fF=10,pF=96,mF=126,hF=91,gF=94,_F=62,vF=35,yF=37,bF=45,xF=61,SF=92,CF=42,wF=95,TF=60,EF=64,DF=93,OF=33,kF=38,AF=58,jF=70,MF=102,NF=104,PF=119,FF=116,IF=112,LF=115,ele=160,tle=12,nle=44,RF=59,zF=63,BF=46,VF=47,HF=39,UF=34,WF=43,GF=124,KF=123,qF=125,JF=40,YF=41,rle=120,ile=88,XF=30,ZF=48,QF=57,$F=65,eI=90,tI=97,nI=122,rI=128,iI=32,Q={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 ale(e){if(!pI(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]!==`
|
|
126
|
+
`)return null;t++;let n=!1;for(;t<e.length;){let r=t;for(;t<e.length&&e[t]!==`
|
|
127
|
+
`&&e[t]!==`\r`;)t++;if(t>=e.length)break;let i=t;if(e[t]===`\r`&&t++,t<e.length&&e[t]===`
|
|
128
|
+
`&&t++,pI(e,`---`,r))return{endPos:t,hasValidYaml:n};if(!n){let t=hle(e,r,i);if(t<i){let r=e.charCodeAt(t);if(r>=tI&&r<=nI||r>=$F&&r<=eI||r>=ZF&&r<=QF||r===wF){for(t++;t<i&&(r=e.charCodeAt(t),r>=tI&&r<=nI||r>=$F&&r<=eI||r>=ZF&&r<=QF||r===wF||r===bF||r===BF);)t++;t<i&&e.charCodeAt(t)===AF&&(t++,t>=i?n=!0:(r=e.charCodeAt(t),(r===X||r===Z)&&(n=!0)))}}}}return null}var ole=/&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi,sle={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`},cle={};function aI(e){if(!e)return cle;var t={};for(var n in e){var r=sle[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 lle=/(\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 oI(e){return e.indexOf(`&`)===-1?e:e.replace(ole,(e,t)=>{var n=$ce(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 sI=/(javascript|vbscript|data(?!:image)):/i;function cI(e){if(sI.test(e))return null;if(e.indexOf(`%`)===-1)return e;try{let t=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,``);if(sI.test(t))return null}catch{return null}return e}var lI={},uI,dI;for(uI=[192,193,194,195,196,197,224,225,226,227,228,229,230,198],dI=0;dI<uI.length;dI++)lI[uI[dI]]=`a`;for(lI[231]=lI[199]=`c`,lI[240]=lI[208]=`d`,uI=[200,201,202,203,233,232,234,235],dI=0;dI<uI.length;dI++)lI[uI[dI]]=`e`;for(uI=[207,239,206,238,205,237,204,236],dI=0;dI<uI.length;dI++)lI[uI[dI]]=`i`;for(lI[209]=lI[241]=`n`,uI=[248,216,339,338,213,245,212,244,211,243,210,242],dI=0;dI<uI.length;dI++)lI[uI[dI]]=`o`;for(uI=[220,252,219,251,218,250,217,249],dI=0;dI<uI.length;dI++)lI[uI[dI]]=`u`;lI[376]=lI[255]=lI[221]=lI[253]=`y`;function fI(e){for(var t=``,n=-1,r=e.length,i=0;i<r;i++){var a=e.charCodeAt(i);if(a>=tI&&a<=nI||a>=ZF&&a<=QF){n<0&&(n=i);continue}if(a>=$F&&a<=eI){n>=0&&(t+=e.slice(n,i),n=-1),t+=String.fromCharCode(a+iI);continue}if(a===X||a===bF){n>=0&&(t+=e.slice(n,i),n=-1),t+=`-`;continue}n>=0&&(t+=e.slice(n,i),n=-1);var o=lI[a];o&&(t+=o)}return n>=0&&(t+=e.slice(n)),t}function pI(e,t,n){return e.startsWith(t,n)}var mI=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 hI(e){let t=e.toLowerCase();if(mI.has(t))return!0;let n=t.indexOf(`:`);return n===-1?!1:(t=t.slice(n+1),mI.has(t))}var gI=1,_I=2,vI=4,yI=8,ule=16,bI=32,xI=64,dle=(function(){var e=new Uint8Array(128),t;for(e[Z]=gI,e[fF]=gI|_I,e[tle]=gI,e[dF]=gI|_I,e[X]=gI,t=OF;t<=VF;t++)e[t]=vI;for(t=AF;t<=EF;t++)e[t]=vI;for(t=hF;t<=pF;t++)e[t]=vI;for(t=KF;t<=mF;t++)e[t]=vI;for(t=ZF;t<=QF;t++)e[t]=ule;for(t=$F;t<=eI;t++)e[t]=yI;for(t=tI;t<=nI;t++)e[t]=yI;return e})(),fle=/[\p{P}\p{S}]/u,ple=/\p{Zs}/u,SI=[];function mle(e){var t=e.indexOf(`\r`),n=e.indexOf(`\0`);if(t===-1&&n===-1)return e;var r=e.length;SI.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===dF?(i<a&&SI.push(e.slice(i,a)),a+1<r&&e.charCodeAt(a+1)===fF&&a++,SI.push(`
|
|
129
|
+
`),i=a+1):o===0&&(i<a&&SI.push(e.slice(i,a)),SI.push(`�`),i=a+1)}return i<r&&SI.push(e.slice(i)),SI.join(``)}function hle(e,t,n){let r=n??e.length;for(;t<r&&(e[t]===` `||e[t]===` `);)t++;return t}function CI(e){if(!e)return!1;for(var t in e)return!0;return!1}function gle(e){return{attrs:{},children:[{type:Q.text,text:e}],d:!0,type:Q.htmlBlock,tag:`header`}}var _le=/^\n+/;function vle(e){for(var t=e.length;t>0&&(e[t-1]===`
|
|
130
|
+
`||e[t-1]===`\r`);)t--;return e.slice(0,t).replace(_le,``)+`
|
|
131
|
+
|
|
132
|
+
`}function wI(e){if((e.type===Q.htmlSelfClosing||e.type===Q.htmlBlock)&&e.b)return[];if(e.type===Q.paragraph){var t=e.children;return t?t.flatMap(wI):[]}return e.type===Q.text?e.text?.trim()?[e]:[]:e.type===Q.htmlBlock&&e.children?[{...e,children:e.children?.flatMap(wI)}]:[e]}function TI(e){for(var t=0;t<e.length;t++){if(e[t].type===Q.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&&TI(e[t].children)}}function yle(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.type===Q.paragraph&&r.children)for(var i=r.children,a=0;a<i.length;a++){var o=i[a];if(o.type===Q.htmlSelfClosing&&o.b&&o.tag.toLowerCase()===t){var s=e.slice(0,n);a>0&&s.push({type:Q.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===Q.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===Q.htmlSelfClosing||r.type===Q.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 ble(e,t,n){var r=e.replace(RegExp(`\\s*</`+t+`>\\s*$`,`i`),``);return n?AI(r):r}function EI(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 xle(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 DI(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 Sle(e){for(var t=!1,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=X||r===UF||r===yF||r===TF||r===_F||r===hF||r===SF||r===DF||r===gF||r===pF||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===yF&&n+2<e.length){var a=e.charCodeAt(n+1),o=e.charCodeAt(n+2);if((a>=ZF&&a<=QF||a>=$F&&a<=jF||a>=tI&&a<=MF)&&(o>=ZF&&o<=QF||o>=$F&&o<=jF||o>=tI&&o<=MF)){i+=e[n]+e[n+1]+e[n+2],n+=2;continue}}i+=encodeURI(e[n])}return i}function Cle(...e){return e.filter(Boolean).join(` `)}var wle=new Set([`title`,`textarea`,`style`,`xmp`,`iframe`,`noembed`,`noframes`,`script`,`plaintext`]),OI=/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;function kI(e){return wle.has(e.toLowerCase())}function Tle(e){return OI.lastIndex=0,OI.test(e)}function AI(e){return OI.lastIndex=0,e.replace(OI,function(e,t,n,r){return`<`+t+n+r})}var Ele=/^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/,Dle=/^<[A-Z]/,jI=[`script`,`pre`,`style`,`textarea`],MI=new Set(jI),Ole=/<(?:pre|script|style|textarea)\b/i,NI=/<(?:pre|script|style|textarea)\b/iy,PI=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m,FI=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im,II=new Uint8Array(128);(function(){for(var e=[pF,CF,wF,mF,xF,hF,OF,TF,SF,kF,fF,NF,PF,MF],t=0;t<e.length;t++)II[e[t]]=1})();var LI=/([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;function kle(e){return MI.has(e)}function Ale(e){return Ole.test(e)}function RI(e,t,n){for(var r=t,i=n;r<i&&(e.charCodeAt(r)===X||e.charCodeAt(r)===Z);)r++;if(r>=i)return!1;e.charCodeAt(r)===GF&&r++;for(var a=0;r<i;){for(;r<i&&(e.charCodeAt(r)===X||e.charCodeAt(r)===Z);)r++;if(r>=i)break;if(e.charCodeAt(r)===GF&&a>0){for(var o=r+1;o<i&&(e.charCodeAt(o)===X||e.charCodeAt(o)===Z);)o++;if(o>=i)return!0}if(e.charCodeAt(r)===AF&&r++,r>=i||e.charCodeAt(r)!==bF)return!1;for(;r<i&&e.charCodeAt(r)===bF;)r++;for(r<i&&e.charCodeAt(r)===AF&&r++,a++;r<i&&(e.charCodeAt(r)===X||e.charCodeAt(r)===Z);)r++;if(r<i)if(e.charCodeAt(r)===GF)r++;else return!1}return a>0}function zI(e,t){if(e.charCodeAt(t)!==TF)return null;let n=t+1,r=e.length,i=!1;e.charCodeAt(n)===VF&&(n++,i=!0);let a=n,o=e.charCodeAt(n);if(!(o>=tI&&o<=nI||o>=$F&&o<=eI))return null;for(;n<r&&(e.charCodeAt(n)>=tI&&e.charCodeAt(n)<=nI||e.charCodeAt(n)>=$F&&e.charCodeAt(n)<=eI||e.charCodeAt(n)>=ZF&&e.charCodeAt(n)<=QF||e.charCodeAt(n)===bF);)n++;let s=e.slice(a,n);if(!s)return null;let c=n;for(;n<r&&(e.charCodeAt(n)===X||e.charCodeAt(n)===Z||e.charCodeAt(n)===fF);)n++;let l=e.slice(c,n);if(n===c&&n<r){var u=e.charCodeAt(n);if(u!==_F&&u!==VF)return null}let d=n,f={},p=!1;for(;n<r;){let t=e.charCodeAt(n);if(t===_F){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===X||t===Z||t===fF){n++;continue}if(t===VF&&n+1<r&&e.charCodeAt(n+1)===_F){let t=e.slice(d,n);return p=n>d&&e.charCodeAt(n-1)===X,{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>=tI&&h<=nI||h>=$F&&h<=eI||h===wF||h===AF))return null;for(n++;n<r;){var g=e.charCodeAt(n);if(g>=tI&&g<=nI||g>=$F&&g<=eI||g>=ZF&&g<=QF||g===wF||g===BF||g===AF||g===bF)n++;else break}for(var _=e.slice(m,n);n<r&&(e.charCodeAt(n)===X||e.charCodeAt(n)===Z);)n++;if(e.charCodeAt(n)!==xF){f[_]=``;continue}for(n++;n<r&&(e.charCodeAt(n)===X||e.charCodeAt(n)===Z);)n++;var v=e.charCodeAt(n);if(v===UF||v===HF){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!==X&&b!==Z&&b!==fF&&b!==_F&&b!==VF)return null}}else if(v===KF){var x=1,y=n;for(n++;n<r&&x>0;){var g=e.charCodeAt(n);g===KF?x++:g===qF&&x--,n++}f[_]=e.slice(y,n)}else{for(var y=n;n<r;){var S=e.charCodeAt(n);if(S===X||S===Z||S===_F||S===fF||S===UF||S===HF||S===xF||S===TF||S===pF)break;n++}if(n===y)return null;f[_]=e.slice(y,n)}}return null}function jle(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(`
|
|
133
|
+
`,r),c=s<0?i:s,l=r,u=0;l<c&&u<4;)if(e.charCodeAt(l)===X)u++,l++;else if(e.charCodeAt(l)===Z)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===pF||d===mF){for(var f=d,p=0,m=l;m<c&&e.charCodeAt(m)===f;)p++,m++;if(p>=3){var h=!0;if(f===pF){for(var g=m;g<c;g++)if(e.charCodeAt(g)===pF){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===X)y++,v++;else if(b===Z)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)===X||e.charCodeAt(v)===Z);)v++;if(v>=i||e.charCodeAt(v)===fF){r=v>=i?i:v+1;break}}}for(;_<i&&e.charCodeAt(_)!==fF;)_++;_<i&&_++}_>=i&&(r=i,o=!0);continue}}}}for(var S=l;S<c&&e.charCodeAt(S)===_F;){S++,S<c&&e.charCodeAt(S)===X&&S++;for(var C=0;S<c&&C<4;)if(e.charCodeAt(S)===X)C++,S++;else if(e.charCodeAt(S)===Z)C+=4,S++;else break;if(C>=4)break;a=!1}if(!a&&u<4&&S<c&&e.charCodeAt(S)===hF&&!(S+1<i&&e.charCodeAt(S+1)===gF)){var w=BI(e,S,t);if(w){r=w,a=!1;continue}}var T=e.charCodeAt(l);if(T===vF&&u<4)a=!1;else if(u<4&&(T===bF||T===CF||T===wF)){for(var E=l,D=0;E<c;){var O=e.charCodeAt(E);if(O===T)D++;else if(O!==X&&O!==Z)break;E++}a=!(D>=3&&E>=c)}else a=!0;r=s<0?i:s+1}return o}function BI(e,t,n){let r=e.length;if(e.charCodeAt(t)!==hF)return null;let i=t+1<r&&e.charCodeAt(t+1)===gF,a=t+1;for(;a<r;){var o=e.charCodeAt(a);if(o===DF){a++;break}if(o===hF)return null;o===SF&&a+1<r&&a++,a++}if(a>r||e.charCodeAt(a-1)!==DF)return null;let s=e.slice(t+1,a-1);if(s.length>999)return null;let c=WI(s);if(!c||a>=r||e.charCodeAt(a)!==AF)return null;a++;let l=!1;for(;a<r;){let t=e.charCodeAt(a);if(t===X||t===Z)a++;else if(t===fF&&!l)l=!0,a++;else break}if(i){let t=e.indexOf(`
|
|
134
|
+
`,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)===TF){a++;for(var d=a;a<r&&e.charCodeAt(a)!==_F&&e.charCodeAt(a)!==fF;)e.charCodeAt(a)===SF&&a+1<r&&a++,a++;if(a>=r||e.charCodeAt(a)!==_F)return null;u=e.slice(d,a),a++;for(var f=e.indexOf(`
|
|
135
|
+
`,a),p=f<0?r:f,m=a;m<p&&(e.charCodeAt(m)===X||e.charCodeAt(m)===Z);)m++;if(m<p){if(m===a)return null;var h=e.charCodeAt(m);if(h!==UF&&h!==HF&&h!==JF)return null}}else{for(var d=a,g=0;a<r;){var o=e.charCodeAt(a);if(o===JF)g++;else if(o===YF){if(g===0)break;g--}else{if(o===X||o===Z||o===fF)break;o===SF&&a+1<r&&a++}a++}if(u=e.slice(d,a),!u)return null}for(;a<r&&(e.charCodeAt(a)===X||e.charCodeAt(a)===Z);)a++;var _=e.indexOf(`
|
|
136
|
+
`,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)===X||e.charCodeAt(S)===Z);)S++;if(S<r){var C=e.charCodeAt(S);if(C===UF||C===HF||C===JF){for(var w=C===JF?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)===X||e.charCodeAt(O)===Z);)O++;(O>=r||e.charCodeAt(O)===fF)&&(y=e.slice(E,T),b=!0,x=O<r?O+1:r);break}if(D===SF&&T+1<r){T+=2;continue}if(D===fF&&T+1<r&&e.charCodeAt(T+1)===fF)break;T++}if(!b&&S===a)return null}}if(b)return n[c]||(n[c]={target:KI(u),title:y===void 0?y:oI(KI(y))}),x;for(;a<v&&(e.charCodeAt(a)===X||e.charCodeAt(a)===Z);)a++;return a<v?null:(n[c]||(n[c]={target:KI(u),title:y}),_<0?r:_+1)}var VI=new Uint8Array(dle);for(VI[vF]|=bI,VI[_F]|=bI,VI[bF]|=bI|xI,VI[WF]|=bI,VI[CF]|=bI|xI,VI[wF]|=bI|xI,VI[pF]|=bI|xI,VI[mF]|=bI|xI,VI[TF]|=bI|xI,VI[hF]|=xI,VI[OF]|=xI,VI[GF]|=bI,HI=ZF;HI<=QF;HI++)VI[HI]|=bI;var HI;function UI(e){if(e.indexOf(`[`)<0&&e.indexOf(`]`)<0)return!1;for(var t=0;t<e.length;t++){if(e.charCodeAt(t)===SF){t++;continue}if(e.charCodeAt(t)===hF||e.charCodeAt(t)===DF)return!0}return!1}function WI(e){for(var t=e.length,n=!0,r=t>0,i=0;i<t;i++){var a=e.charCodeAt(i);if(a===X){if(n){r=!1;break}n=!0}else if(a<33||a>126||a>=$F&&a<=eI){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 GI(e){return e<rI?VI[e]:e===ele?gI:0}function KI(e){return e.indexOf(`\\`)===-1?e:e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,`$1`)}var qI=null,JI=-1,YI=-1;function XI(e,t){if(t>=JI&&t<=YI&&e===qI)return YI;var n=e.indexOf(`
|
|
137
|
+
`,t),r=n<0?e.length:n;return qI=e,JI=t,YI=r,r}function ZI(e,t){let n=XI(e,t);return n<e.length?n+1:n}function QI(e,t,n){for(;t<n;){let n=e.charCodeAt(t);if(n!==X&&n!==Z)break;t++}return t}function $I(e,t){let n=ZI(e,t);for(;n<e.length;){let t=XI(e,n);if(iL(e,n,t))return n;n=ZI(e,n)}return e.length}function eL(e,t,n,r){let i=0;for(;t+i<n&&e.charCodeAt(t+i)===r;)i++;return i}var tL=0,nL=0;function rL(e,t,n){for(tL=0,nL=0;t+nL<n;){let n=e.charCodeAt(t+nL);if(n===Z)tL+=4-tL%4;else if(n===X)tL++;else break;nL++}}function iL(e,t,n){return QI(e,t,n)>=n}function Mle(e,t,n,r){let i=XI(e,t);if(rL(e,t,i),tL>3)return null;let a=t+nL;if(e.charCodeAt(a)!==vF)return null;let o=eL(e,a,i,35);if(o<1||o>6||(a+=o,a<i&&e.charCodeAt(a)!==X&&e.charCodeAt(a)!==Z))return null;a=QI(e,a,i);for(var s=i;s>a&&e.charCodeAt(s-1)===X;)s--;for(var c=s;s>a&&e.charCodeAt(s-1)===vF;)s--;if(s<c)if(s===a||e.charCodeAt(s-1)===X)for(;s>a&&e.charCodeAt(s-1)===X;)s--;else s=c;let l=e.slice(a,s),u=vL(l,!1,n,r),d=(r?.slugify||fI)(l);return{node:{type:Q.heading,level:o,children:u,id:d},end:ZI(e,i)}}function Nle(e,t,n){var r=e.charCodeAt(t);if(r!==xF&&r!==bF)return!1;for(var i=t;i<n&&e.charCodeAt(i)===r;)i++;for(;i<n&&(e.charCodeAt(i)===X||e.charCodeAt(i)===Z);)i++;return i>=n}function aL(e,t){let n=XI(e,t);if(rL(e,t,n),tL>3)return null;let r=t+nL,i=e.charCodeAt(r);if(i!==bF&&i!==CF&&i!==wF)return null;let a=0;for(;r<n;){let t=e.charCodeAt(r);if(t===i)a++;else if(t!==X&&t!==Z)return null;r++}return a<3?null:{node:{type:Q.breakThematic},end:ZI(e,n)}}function Ple(e,t,n){let r=XI(e,t);if(rL(e,t,r),tL>3)return null;let i=tL,a=t+nL,o=e.charCodeAt(a);if(o!==pF&&o!==mF)return null;let s=eL(e,a,r,o);if(s<3)return null;a+=s;let c=QI(e,a,r),l=r;if(o===pF){for(let t=c;t<r;t++)if(e.charCodeAt(t)===pF)return null}for(;l>c&&(e.charCodeAt(l-1)===X||e.charCodeAt(l-1)===Z);)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=KI(d);var m=void 0;if(f){LI.lastIndex=0;for(var h;(h=LI.exec(f))!==null;)m||={},m[h[1]]=h[2]===void 0?h[3]:h[2]}let g=ZI(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)===X;)S--,C++;if(C<=3&&(S===0||e.charCodeAt(S-1)===fF)){for(var w=x+s;w<e.length&&e.charCodeAt(w)===o;)w++;var T=XI(e,w);if(iL(e,w,T)){_=S,v=ZI(e,T);break}}b=x+1}var E;if(i===0)E=_>g&&e.charCodeAt(_-1)===fF?e.slice(g,_-1):e.slice(g,_);else{E=``;for(var D=g;D<_;){var O=XI(e,D);rL(e,D,O);var k=Math.min(nL,i);E+=e.slice(D+k,O)+`
|
|
138
|
+
`,D=ZI(e,O)}E.length>0&&E.charCodeAt(E.length-1)===fF&&(E=E.slice(0,-1))}return{node:{type:Q.codeBlock,lang:d||void 0,text:E,infoString:f||void 0,attrs:m},end:v}}function Fle(e,t){if(rL(e,t,XI(e,t)),tL<4)return null;let n=``,r=t;for(;r<e.length;){let t=XI(e,r);if(rL(e,r,t),iL(e,r,t)){for(var i=0,a=ZI(e,t);a<e.length;){var o=XI(e,a);if(iL(e,a,o)){i++,a=ZI(e,o);continue}if(rL(e,a,o),tL>=4){for(var s=0;s<=i;s++)n+=`
|
|
139
|
+
`;r=a;break}break}if(r!==a)break;continue}if(tL<4)break;let f=0,p=0;var c=0;for(let n=r;n<t&&p<4;n++){if(e.charCodeAt(n)===Z){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+`
|
|
140
|
+
`,r=ZI(e,t)}for(;n.length>0&&n.charCodeAt(n.length-1)===fF;)n=n.slice(0,-1);return n?{node:{type:Q.codeBlock,lang:void 0,text:n,infoString:void 0,attrs:void 0},end:r}:null}function Ile(e,t,n,r){if(rL(e,t,XI(e,t)),tL>3)return null;let i=t+nL;if(e.charCodeAt(i)!==_F)return null;let a=``,o=t,s,c=!1,l=!1,u=!1;for(;o<e.length;){let t=XI(e,o);rL(e,o,t);let n=o+nL;if(e.charCodeAt(n)===_F){let r=n+1;var d=tL+1,f=!1;if(r<t){var p=e.charCodeAt(r);p===X?(r++,d++,f=!0):p===Z&&(f=!0)}for(var m=``,h=!1,g=r;g<t;g++)if(e.charCodeAt(g)===Z){h=!0;break}if(h){var _=d;if(f&&r<t&&e.charCodeAt(r)===Z){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)===Z){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=ZI(e,t);continue}}a+=m+`
|
|
141
|
+
`;var C=m.trimStart();C.startsWith("```")||C.startsWith(`~~~`)?u=!u:(m.startsWith(` `)||m.startsWith(` `))&&(u=!0),l=C.length>0,o=ZI(e,t)}else if(a&&!iL(e,o,t)&&l){if(tL<4){var w=o+nL,T=w<t?e.charCodeAt(w):0;if(T===vF||T===_F||T===pF||T===mF||T===TF||(T===bF||T===CF||T===wF)&&aL(e,o)||(T===bF||T===CF||T===WF)&&w+1<t&&(e.charCodeAt(w+1)===X||e.charCodeAt(w+1)===Z))break;if(T>=ZF&&T<=QF){for(var E=w;E<t&&e.charCodeAt(E)>=ZF&&e.charCodeAt(E)<=QF;)E++;if(E<t&&(e.charCodeAt(E)===BF||e.charCodeAt(E)===YF))break}}if(u)break;a+=e.slice(o,t)+`
|
|
142
|
+
`,c=!0,o=ZI(e,t)}else break}if(!a&&!s)return null;var{inBlockQuote:D,f:O}=n;n.inBlockQuote=!0,c&&(n.f=!0);let k=kL(a||``,n,r);return n.inBlockQuote=D,n.f=O,{node:{type:Q.blockQuote,children:k,alert:s||void 0},end:o}}function oL(e,t,n){for(var r=0,i=t;i<n;i++)e.charCodeAt(i)===Z?r+=4-r%4:r++;return r}function sL(e,t,n){if(rL(e,t,n),tL>3)return null;var r=t+nL;if(r>=n)return null;var i=e.charCodeAt(r),a=tL,o=r;if(i===bF||i===CF||i===WF){if(o=r+1,o<n&&e.charCodeAt(o)!==X&&e.charCodeAt(o)!==Z&&e.charCodeAt(o)!==fF)return null}else if(i>=ZF&&i<=QF){for(var s=r;s<n&&s-r<9;){var c=e.charCodeAt(s);if(c<ZF||c>QF)break;s++}if(s>r&&s<n){var l=e.charCodeAt(s);if(l===BF||l===YF){if(o=s+1,o<n&&e.charCodeAt(o)!==X&&e.charCodeAt(o)!==Z&&e.charCodeAt(o)!==fF)return null}else return null}else return null}else return null;var u=o,d=oL(e,t,o),f=0,p=u,m=d;if(u>=n)return{ordered:i>=ZF&&i<=QF,marker:i>=ZF&&i<=QF?e[s]:e[r],start:i>=ZF&&i<=QF?parseInt(e.slice(r,s),10):void 0,contentStart:u,contentCol:d+1,markerCol:a,isEmpty:!0};for(;p<n&&(e.charCodeAt(p)===X||e.charCodeAt(p)===Z);){if(e.charCodeAt(p)===Z){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>=ZF&&i<=QF,marker:i>=ZF&&i<=QF?e[s]:e[r],start:i>=ZF&&i<=QF?parseInt(e.slice(r,s),10):void 0,contentStart:p,contentCol:m,markerCol:a,isEmpty:g}}var cL=0;function Lle(e,t,n,r){var i=0,a=t;for(cL=0;a<n&&i<r;){var o=e.charCodeAt(a);if(o===Z){var s=4-i%4;if(i+s>r){cL=i+s-r,a++,i=r;break}i+=s}else if(o===X)i++;else break;a++}return a}function lL(e,t,n,r){var i=XI(e,t),a=sL(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)===Z){p=!0;break}if(p){var h=``,g=oL(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)===Z){for(var b=4-g%4,x=0;x<b;x++)h+=` `;g+=b}else h+=e[y],g++;l=h+`
|
|
143
|
+
`}else l=e.slice(a.contentStart,i)+`
|
|
144
|
+
`}for(s=ZI(e,i);s<e.length;){var S=XI(e,s);rL(e,s,S);var C=e.charCodeAt(s+nL);if(tL<c&&(C===bF||C===CF||C===wF)&&tL<=3&&aL(e,s))break;var w=sL(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)+`
|
|
145
|
+
`,s=ZI(e,S);continue}if(iL(e,s,S)){l+=`
|
|
146
|
+
`,s=ZI(e,S);for(var T=!1,E=0;E<l.length;E++){var D=l.charCodeAt(E);if(D!==fF&&D!==dF&&D!==X&&D!==Z){T=!0;break}}if(u&&!T)if(s<e.length){var O=XI(e,s),k=sL(e,s,O);if(!k||k.ordered!==a.ordered||k.marker!==a.marker)break;d=!0}else break;if(s<e.length){var A=XI(e,s);rL(e,s,A);var j=e.charCodeAt(s+nL);if((j===bF||j===CF||j===wF)&&tL<=3&&aL(e,s))break;var M=sL(e,s,A);if(M&&M.ordered===a.ordered&&M.marker===a.marker&&M.markerCol<c){d=!0;continue}if(!iL(e,s,A)&&tL<c)break}continue}if(tL>=c){var N=Lle(e,s,S,c);if(cL>0){for(var P=``,F=c,I=0;I<cL;I++)P+=` `,F++;for(var L=N;L<S;L++)if(e.charCodeAt(L)===Z){for(var ee=4-F%4,te=0;te<ee;te++)P+=` `;F+=ee}else P+=e[L],F++;l+=P+`
|
|
147
|
+
`}else l+=e.slice(N,S)+`
|
|
148
|
+
`;s=ZI(e,S);continue}for(var ne=!1,R=0;R<l.length;R++){var z=l.charCodeAt(R);if(z!==fF&&z!==dF&&z!==X&&z!==Z){ne=!0;break}}if(!d&&ne&&!u){var B=s+nL,re=e.charCodeAt(B);if(!(re===vF||re===_F||re===TF||re===pF||re===mF||(re===bF||re===CF||re===wF||re===WF)&&(aL(e,s)!==null||sL(e,s,S)!==null)||re>=ZF&&re<=QF&&sL(e,s,S)!==null)){l+=``+e.slice(B,S)+`
|
|
149
|
+
`,s=ZI(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(`
|
|
150
|
+
`,ce);if(he<0&&(he=se),fe){rL(oe,ce,he);for(var ge=oe.slice(ce+nL,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(iL(oe,ce,he)){V>=0?de=!0:le&&(ue=!0),ce=he<se?he+1:se;continue}if(rL(oe,ce,he),V>=0){if(tL>=V){ce=he<se?he+1:se;continue}var ve=sL(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+nL,he),be=ye.charCodeAt(0);if((be===pF||be===mF)&&tL<=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=tL<=3?sL(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)===fF;)De--;var Oe=De<Ee.length?Ee.slice(0,De):Ee,ke=null;if(Oe.length>=3&&Oe.charCodeAt(0)===hF){var Ae=Oe[1];(Ae===` `||Ae===`x`||Ae===`X`)&&Oe.charCodeAt(2)===DF&&(ke={type:Q.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=kL(Oe,n,r),n.inList=Me}else{var Ne=n.inList;if(n.inList=!0,je=kL(Oe,n,r),n.inList=Ne,je.length===1&&je[0].type===Q.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===Q.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:Q.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?Q.orderedList:Q.unorderedList,start:a.ordered?a.start:void 0,items:Ce},end:s}}var uL=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 dL(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===JF?n++:r===YF?n--:r===RF&&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)===KF&&s.charCodeAt(s.length-1)===qF){var i=s.slice(1,-1);if(i.length>0){var a=i.charCodeAt(0);if(a===hF||a===KF)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 fL(e,t,n){let r=t.length;if(r===0)return n;var i=t.charCodeAt(0);if(!(i>=$F&&i<=eI||i>=tI&&i<=nI)){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>=$F&&d<=eI&&(d+=iI),f>=$F&&f<=eI&&(f+=iI),d!==f){l=!1;break}}if(l)return c;s=c+1}return-1}i>=$F&&i<=eI&&(i+=iI);for(let a=n;a<=e.length-r;a++){var p=e.charCodeAt(a);if(p>=$F&&p<=eI&&(p+=iI),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>=$F&&r<=eI&&(r+=iI),o>=$F&&o<=eI&&(o+=iI),r!==o){n=!1;break}}if(n)return a}return-1}function Rle(e,t,n){let r=t.length;var i=t.charCodeAt(0);i>=$F&&i<=eI&&(i+=iI);for(let o=Math.min(n,e.length-r);o>=0;o--){var a=e.charCodeAt(o);if(a>=$F&&a<=eI&&(a+=iI),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>=$F&&r<=eI&&(r+=iI),a>=$F&&a<=eI&&(a+=iI),r!==a){n=!1;break}}if(n)return o}return-1}var pL=-1;function mL(e,t,n){let r=n.toLowerCase(),i=`<`+r,a=`</`+r,o=1,s=t,c=e.length;for(pL=-1;s<c&&o>0;){let t=fL(e,i,s),n=fL(e,a,s);if(n===-1)return-1;if(t!==-1&&t<n){let n=zI(e,t);n?(n.tag.toLowerCase()===r&&!n.isClosing&&!n.selfClosing&&!hI(n.tag)&&o++,s=n.end):s=t+1}else{var l=n+a.length,u=l<c?e.charCodeAt(l):62;if((u===_F||u===X||u===Z||u===fF)&&(o--,o===0)){pL=n;let t=n+a.length;for(;t<c&&e.charCodeAt(t)!==_F;)t++;return t+1}s=n+1}}return-1}function hL(e,t,n,r){if(r.ignoreHTMLBlocks||r.disableParsingRawHTML)return null;var i=XI(e,t);if(rL(e,t,i),tL>3&&!n.inHTML)return null;var a=t+nL;if(e.charCodeAt(a)!==TF)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=zle(e,a);if(c>=1&&c<=5){var l=e.length;if(c===1){for(var u=e.length,d=0;d<jI.length;d++){var f=fL(e,`</`+jI[d]+`>`,a);f>=0&&f<u&&(u=f)}if(u<e.length){var p=e.indexOf(`>`,u);l=p>=0?ZI(e,p+1):e.length}}else{var m=c===2?`-->`:c===3?`?>`:c===4?`>`:`]]>`,h=e.indexOf(m,a);h>=0&&(l=ZI(e,h+m.length))}var g=e.slice(a,l);if(c>=2)return{node:{type:Q.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=zI(e,a),b={},x;y&&!y.isClosing&&(b=dL(y.attrs,_,r),x=y.whitespaceBeforeAttrs+y.rawAttrs);var S=[],C=fL(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)===fF;)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)===fF&&(w=w.slice(1));w.length>0&&w.charCodeAt(w.length-1)===fF;)w=w.slice(0,-1);else for(w=g;w.length>0&&w.charCodeAt(w.length-1)===fF;)w=w.slice(0,-1);C!==-1&&(T=g.slice(E,C).trim())}var D=y?y.isClosing:!1;return{node:{type:Q.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=$I(e,t),k=O<e.length?O:e.length,A=e.slice(a,k),j=O<e.length?ZI(e,O):e.length,M=zI(e,a);if(M){var N=M.tag,P=N.toLowerCase();if(M.isClosing){var F=e.slice(M.end,k);return{node:{type:Q.htmlBlock,tag:N,attrs:{},children:[],a:F,text:F,d:!0,b:!0},end:j}}if(M.selfClosing||hI(N))return{node:{type:Q.htmlBlock,tag:N,attrs:dL(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)===fF?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=fL(L,`<`+P,B),ie=fL(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===X||oe===Z||oe===fF||oe===_F||oe===VF)&&z++}B=re+1}else{var se=ie+ne.length;if(se<L.length){var ce=L.charCodeAt(se);if((ce===_F||ce===X||ce===Z||ce===fF)&&(z--,z===0)){ee=ie;for(var le=se;le<L.length&&L.charCodeAt(le)!==_F;)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=mL(e,M.end,P);if(de!==-1){for(var fe=pL,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===fF)ve&&(me=!0),_e||ge++,ve=!0,ye++;else if(be===X||be===Z)ye++;else{if(!_e&&(_e=!0,ge>=2&&be===TF)){he=!0;break}if(ve=!1,be===TF){var xe=e.charCodeAt(ye+1)|32;if((xe===IF||xe===LF||xe===FF)&&(NI.lastIndex=ye,NI.test(e))){V=!0;break}}ye++}}if(me&&!he&&!V){var Se=XI(e,de);k=Se,j=ZI(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(`
|
|
151
|
+
`)!==-1||M.whitespaceBeforeAttrs.indexOf(`
|
|
152
|
+
`)!==-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=XI(e,Oe-1);if(Oe<ke){for(var Ae=Oe;Ae<ke&&(e.charCodeAt(Ae)===X||e.charCodeAt(Ae)===Z);)Ae++;if(Ae<ke&&e.charCodeAt(Ae)===TF){var je=zI(e,Ae);je&&!je.isClosing&&(Te=!0,Ee=Oe,De=Oe,we=!0)}}if(!Te){var Me=ZI(e,ke);if(Me<k){for(var Ne=Me;Ne<k&&(e.charCodeAt(Ne)===X||e.charCodeAt(Ne)===Z);)Ne++;Ne<k&&e.charCodeAt(Ne)===TF&&zI(e,Ne)&&(Te=!0,Ee=ke,De=Me,we=!0)}}!Te&&n.inHTML&&(Te=!0,Ee=ke,De=ZI(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=vL(Ie,!1,n,r);else{var Be=Fe.indexOf(`
|
|
153
|
+
|
|
154
|
+
`)!==-1,Ve=PI.test(Ie),He=FI.test(Ie),Ue=Be||Ve||n.inHTML&&He;Fe.length>=2&&Fe.charCodeAt(0)===fF&&Fe.charCodeAt(Fe.length-1)===fF&&!Be&&!Ve&&!He?Pe=[{type:Q.text,text:Ie}]:Ue||He?(n.inline=!1,Pe=kL(Fe,n,r)):(n.inline=!0,Pe=vL(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(`
|
|
155
|
+
|
|
156
|
+
`)!==-1||PI.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)!==fF;)Ye++;var Xe=L.slice(te,Ye).trim();Je=Xe.length>1&&Xe.charCodeAt(0)===TF&&Xe.charCodeAt(1)!==VF}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)===fF&&(Ke=Ke.slice(1))):Te?Ke=e.slice(a,Ee):Ce?Ke=A:(Ke=L.slice(M.end-a),Ke.charCodeAt(0)===fF&&(Ke=Ke.slice(1)));var Ze={type:Q.htmlBlock,tag:N,attrs:dL(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:Q.htmlBlock,tag:N,attrs:dL(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:Q.htmlBlock,tag:$e,attrs:{},children:[],a:tt,text:tt,d:!0,b:et},end:j}}var rt=zI(e,a);if(!rt)return null;var it=rt.tag,at=it.toLowerCase(),ot=it.charCodeAt(0),st=ot>=$F&&ot<=eI;if(!st&&!uL.has(at)&&!MI.has(at)&&!at.includes(`-`))return null;if(rt.isClosing)return{node:{type:Q.htmlSelfClosing,tag:it,attrs:{},a:e.slice(a,rt.end),b:!0},end:rt.end};var ct=mL(e,rt.end,it),lt=[];if(ct!==-1){var ut=pL,dt=e.slice(rt.end,ut),ft=dt.trim();if(ft){var pt=dt.indexOf(`
|
|
157
|
+
|
|
158
|
+
`)!==-1,mt=PI.test(ft),ht=FI.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=kL(dt,n,r)):(n.inline=!0,lt=vL(ft,!1,n,r)),n.inline=gt,n.inHTML=_t,n.c=vt}var yt=XI(e,ct),bt=e.slice(ct,yt).trim()?ct:ZI(e,ct),xt=st?e.slice(a,ct):e.slice(a,bt);return{node:{type:Q.htmlBlock,tag:it,attrs:dL(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=$I(e,rt.end),Ct=St<e.length?ZI(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=kL(wt,n,r),n.inline=Tt,n.inHTML=Et,n.c=Dt}var Ot=e.slice(rt.end,St);return{node:{type:Q.htmlBlock,tag:it,attrs:dL(rt.attrs,it,r),i:rt.whitespaceBeforeAttrs+rt.rawAttrs,children:lt,a:Ot,text:wt,d:!0,b:!1},end:Ct}}function zle(e,t){if(e.charCodeAt(t)!==TF)return 0;var n=t+1,r=e.length;if(e.charCodeAt(n)===OF&&e.charCodeAt(n+1)===bF&&e.charCodeAt(n+2)===bF)return 2;if(e.charCodeAt(n)===zF)return 3;if(e.charCodeAt(n)===OF){var i=e.charCodeAt(n+1);if(i>=$F&&i<=eI)return 4;if(e.slice(n+1,n+8)===`[CDATA[`)return 5}for(var a=e.charCodeAt(n)===VF,o=a?n+1:n,s=o;s<r;){var c=e.charCodeAt(s);if(c>=$F&&c<=eI||c>=tI&&c<=nI||c>=ZF&&c<=QF||c===bF)s++;else break}if(s===o)return 0;var l=e.slice(o,s);if(MI.has(l.toLowerCase())){if(a)return 0;var u=e.charCodeAt(s);return+(u===X||u===Z||u===_F||u===fF||s>=r)}if(uL.has(l.toLowerCase())){if(a){for(var d=s;d<r&&(e.charCodeAt(d)===X||e.charCodeAt(d)===Z);)d++;return d<r&&e.charCodeAt(d)===_F?6:0}var f=s<r?e.charCodeAt(s):-1;return f===X||f===Z||f===_F||f===fF||f===VF||f===-1?6:0}if(a){for(var p=s;p<r&&(e.charCodeAt(p)===X||e.charCodeAt(p)===Z);)p++;if(p<r&&e.charCodeAt(p)===_F){var m=XI(e,t);if(e.slice(p+1,m).trim()===``)return 7}}else{var h=XI(e,t),g=zI(e,t);if(g&&g.end<=h&&e.slice(g.end,h).trim()===``)return 7}return 0}function gL(e,t,n){for(var r=0,i=e.length;r<i&&(e.charCodeAt(r)===X||e.charCodeAt(r)===Z);)r++;for(;i>r&&(e.charCodeAt(i-1)===X||e.charCodeAt(i-1)===Z);)i--;r<i&&e.charCodeAt(r)===GF&&r++,i>r&&e.charCodeAt(i-1)===GF&&(i-2<r||e.charCodeAt(i-2)!==SF)&&i--;for(var a=[],o=r,s=!1,c=[],l=r;l<i;){var u=e.charCodeAt(l);if(u===SF&&l+1<i){e.charCodeAt(l+1)===GF?(s||(s=!0,c=[]),c.push(e.slice(o,l)),c.push(`|`),l+=2,o=l):l+=2;continue}if(u===pF){for(var d=0;l<i&&e.charCodeAt(l)===pF;)d++,l++;for(var f=!1;l<i&&!f;){for(var p=0;l<i&&e.charCodeAt(l)===pF;)p++,l++;p===d?f=!0:p===0&&l++}continue}if(u===GF){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?vL(r,!1,t,n):[]})}function _L(e,t,n,r){let i=XI(e,t);var a=e.indexOf(`|`,t);if(a<0||a>=i)return null;let o=ZI(e,i);if(o>=e.length)return null;let s=XI(e,o);if(!RI(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)===X||l.charCodeAt(d)===Z);)d++;for(d<f&&l.charCodeAt(d)===GF&&d++;d<f;){for(;d<f&&(l.charCodeAt(d)===X||l.charCodeAt(d)===Z);)d++;if(d>=f||l.charCodeAt(d)===GF)break;var p=l.charCodeAt(d)===AF;for(p&&d++;d<f&&l.charCodeAt(d)===bF;)d++;var m=d<f&&l.charCodeAt(d)===AF;for(m&&d++,u.push(p&&m?`center`:m?`right`:p?`left`:null);d<f&&(l.charCodeAt(d)===X||l.charCodeAt(d)===Z);)d++;d<f&&l.charCodeAt(d)===GF&&d++}let h=gL(c,n,r);if(u.length!==h.length)return null;let g=[],_=ZI(e,s);for(;_<e.length;){let t=XI(e,_),i=e.slice(_,t);if(iL(e,_,t))break;if(rL(e,_,t),tL<4){var v=e.charCodeAt(_+nL);if(v===_F||v===vF||(v===bF||v===CF||v===wF)&&aL(e,_))break;if(v===pF||v===mF){for(var y=_+nL,b=0;y<t&&e.charCodeAt(y)===v;)b++,y++;if(b>=3)break}}g.push(gL(i,n,r)),_=ZI(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:Q.table,header:h,cells:g,align:u},end:_}}function Ble(e,t,n){if(rL(e,t,XI(e,t)),tL>3)return null;var r=t+nL;if(e.charCodeAt(r)!==hF)return null;if(r+1<e.length&&e.charCodeAt(r+1)===gF)return Vle(e,r,n)||null;n.refs||={};var i=BI(e,r,n.refs);return i===null?null:{node:{type:Q.refCollection},end:i}}function Vle(e,t,n){var r=e.length;if(e.charCodeAt(t)!==hF||t+1>=r||e.charCodeAt(t+1)!==gF)return null;for(var i=t+2,a=i;i<r&&e.charCodeAt(i)!==DF;){if(e.charCodeAt(i)===fF)return null;i++}if(i>=r)return null;var o=(`^`+e.slice(a,i)).toLowerCase();if(i++,i>=r||e.charCodeAt(i)!==AF)return null;for(i++;i<r&&(e.charCodeAt(i)===X||e.charCodeAt(i)===Z);)i++;if(i<r&&e.charCodeAt(i)===fF)for(i++;i<r&&(e.charCodeAt(i)===X||e.charCodeAt(i)===Z);)i++;var s=e.indexOf(`
|
|
159
|
+
`,i);s<0&&(s=r);for(var c=e.slice(i,s).trim(),l=s<r?s+1:r;l<r;){var u=XI(e,l);if(rL(e,l,u),tL>=2&&!iL(e,l,u))c+=`
|
|
160
|
+
`+e.slice(l,u),l=ZI(e,u);else if(iL(e,l,u)){var d=ZI(e,u);if(d<r&&(rL(e,d,XI(e,d)),tL>=2)){c+=`
|
|
161
|
+
`,l=ZI(e,u);continue}break}else break}return n.refs[o]||(n.refs[o]={target:c,title:void 0}),{node:{type:Q.footnote},end:l}}function Hle(e,t,n,r){let i=t,a=0,o=0,s=-1;for(;i<e.length;){let t=s>=0?s:XI(e,i);if(s=-1,iL(e,i,t))break;if(rL(e,i,t),tL<4&&o>0&&!n.f){let n=e.charCodeAt(i+nL);if(n===xF||n===bF){let r=i+nL;for(;r<t&&e.charCodeAt(r)===n;)r++;for(;r<t&&(e.charCodeAt(r)===X||e.charCodeAt(r)===Z);)r++;if(r>=t){a=n===xF?1:2,i=ZI(e,t);break}}}o=t;let x=ZI(e,t);if(x<e.length){if(e.charCodeAt(x)===XF){var c=XI(e,x);i=ZI(e,c),o=c;continue}let t=XI(e,x);if(s=t,rL(e,x,t),tL<4){let a=e.charCodeAt(x+nL);if(a===_F){i=x;break}if(a===vF){for(var l=x+nL,u=0;l<t&&e.charCodeAt(l)===vF&&u<=6;)u++,l++;if(u>=1&&u<=6&&(l>=t||e.charCodeAt(l)===X||e.charCodeAt(l)===Z)){i=x;break}}if(a===pF||a===mF){for(var d=x+nL,f=0;d<t&&e.charCodeAt(d)===a;)f++,d++;if(f>=3){i=x;break}}if(a===TF){var p=x+nL+1,m=p<t?e.charCodeAt(p):0,h=m===OF||m===zF;if(!h&&m===VF){for(var g=p+1,_=g;_<t&&(e.charCodeAt(_)>=$F&&e.charCodeAt(_)<=eI||e.charCodeAt(_)>=tI&&e.charCodeAt(_)<=nI||e.charCodeAt(_)>=ZF&&e.charCodeAt(_)<=QF||e.charCodeAt(_)===bF);)_++;_>g&&(h=uL.has(e.slice(g,_).toLowerCase()))}else if(!h){for(var v=p;v<t&&(e.charCodeAt(v)>=$F&&e.charCodeAt(v)<=eI||e.charCodeAt(v)>=tI&&e.charCodeAt(v)<=nI||e.charCodeAt(v)>=ZF&&e.charCodeAt(v)<=QF||e.charCodeAt(v)===bF);)v++;if(v>p){var y=e.slice(p,v).toLowerCase();h=uL.has(y)||MI.has(y)}}if(h&&hL(e,x,n,r)){i=x;break}}if(a===bF||a===CF||a===WF){let n=x+nL+1;if(n<t&&(e.charCodeAt(n)===X||e.charCodeAt(n)===Z)&&QI(e,n,t)<t&&!aL(e,x)){i=x;break}}if(a>=ZF&&a<=QF){let n=x+nL;for(;n<t&&e.charCodeAt(n)>=ZF&&e.charCodeAt(n)<=QF;)n++;if(n<t&&(e.charCodeAt(n)===BF||e.charCodeAt(n)===YF)&&n-(x+nL)===1&&e.charCodeAt(x+nL)===49){var b=n+1;if(b<t&&(e.charCodeAt(b)===X||e.charCodeAt(b)===Z)&&QI(e,b,t)<t){i=x;break}}}if(a===GF){let n=ZI(e,t);if(n<e.length&&RI(e,n,XI(e,n))){i=x;break}}if((a===bF||a===CF||a===wF)&&aL(e,x)){if(a!==bF){i=x;break}let n=0,r=x+nL;for(;r<t&&e.charCodeAt(r)===bF;)n++,r++;for(;r<t&&(e.charCodeAt(r)===X||e.charCodeAt(r)===Z);)r++;if(r<t){i=x;break}}}}i=ZI(e,t)}for(var x=a?o:i;x>t&&(e.charCodeAt(x-1)===fF||e.charCodeAt(x-1)===dF||e.charCodeAt(x-1)===X||e.charCodeAt(x-1)===Z);)x--;for(var S=t;S<x&&(e.charCodeAt(S)===X||e.charCodeAt(S)===Z);)S++;if(S>=x)return null;for(var C=!1,w=S;w<x;w++)if(e.charCodeAt(w)===XF){C=!0;break}var T=C?e.slice(S,x).replace(/\u001E/g,``):e.slice(S,x);if(!T)return null;let E=vL(T,!0,n,r);if(a){let e=(r?.slugify||fI)(T);return{node:{type:Q.heading,level:a,children:E,id:e},end:i}}return{node:{type:Q.paragraph,children:E},end:i}}function vL(e,t,n,r){var i=n.k;if(!i){var a=n.e;n.e=t;var o=OL(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 Ule(e,t,n){if(e.charCodeAt(t)!==pF)return null;let r=eL(e,t,n,96),i=t+r;for(;i<n;){let a=e.indexOf("`",i);if(a<0||a>=n)return null;let o=eL(e,a,n,96);if(o===r){let n=e.slice(t+r,a);return n.indexOf(`
|
|
162
|
+
`)!==-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:Q.codeInline,text:n},end:a+o}}i=a+o}return null}function yL(e,t,n){if(e.charCodeAt(t)!==pF)return t;let r=eL(e,t,n,96),i=t+r;for(;i<n;){let a=e.indexOf("`",i);if(a<0||a>=n)return t;let o=eL(e,a,n,96);if(o===r)return a+o;i=a+o}return t}function Wle(e,t,n){if(e.charCodeAt(t)!==TF)return t;if(t+1<n&&e.charCodeAt(t+1)===VF){let r=t+2;for(;r<n&&e.charCodeAt(r)!==_F;)r++;return r<n?r+1:t}if(t+3<n&&e.charCodeAt(t+1)===OF&&e.charCodeAt(t+2)===bF&&e.charCodeAt(t+3)===bF){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>=$F&&t<=eI||t>=tI&&t<=nI||t>=ZF&&t<=QF||t===bF)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===_F){r++;break}if(i===VF&&r+1<n&&e.charCodeAt(r+1)===_F){r+=2,o=!0;break}if(i===UF||i===HF){var s=i;for(r++;r<n&&e.charCodeAt(r)!==s;)r++;r<n&&r++;continue}if(i===fF)return t;r++}if(o||hI(a))return r;let c=1;for(;r<n&&c>0;)if(e.charCodeAt(r)===TF)if(r+1<n&&e.charCodeAt(r+1)===VF){let t=r+2,i=t;for(;i<n&&(e.charCodeAt(i)>=$F&&e.charCodeAt(i)<=eI||e.charCodeAt(i)>=tI&&e.charCodeAt(i)<=nI);)i++;if(e.slice(t,i).toLowerCase()===a){for(;i<n&&e.charCodeAt(i)!==_F;)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)>=$F&&e.charCodeAt(i)<=eI||e.charCodeAt(i)>=tI&&e.charCodeAt(i)<=nI);)i++;e.slice(t,i).toLowerCase()===a&&c++,r++}else r++;return r}function Gle(e,t,n,r,i){if(e.charCodeAt(t)!==mF||t+1>=n||e.charCodeAt(t+1)!==mF)return null;let a=t+2;for(;a+1<n;){let o=e.charCodeAt(a);if(o===pF){let t=yL(e,a,n);if(t>a){a=t;continue}}if(o===mF&&e.charCodeAt(a+1)===mF){let n=e.slice(t+2,a),o=OL(n,0,n.length,r,i);return{node:{type:Q.textFormatted,tag:`del`,children:o},end:a+2}}o===SF&&a+1<n&&a++,a++}return null}function Kle(e,t,n,r,i){if(e.charCodeAt(t)!==xF||t+1>=n||e.charCodeAt(t+1)!==xF)return null;let a=t+2;for(;a+1<n;){let o=e.charCodeAt(a);if(o===pF){let t=yL(e,a,n);if(t>a){a=t;continue}}if(o===xF&&e.charCodeAt(a+1)===xF&&a>t+2){let n=e.slice(t+2,a),o=OL(n,0,n.length,r,i);return{node:{type:Q.textFormatted,tag:`mark`,children:o},end:a+2}}o===SF&&a+1<n&&a++,a++}return null}function bL(e,t,n){return e<rI?!!(GI(e)&vI):fle.test(t[n])}function xL(e,t,n){return e<rI?!!(GI(e)&gI):ple.test(t[n])}function qle(e,t,n){var r=e.charCodeAt(t);if(r!==CF&&r!==wF)return null;var i=eL(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=xL(a,e,t-1),c=xL(o,e,t+i),l=t>0&&bL(a,e,t-1),u=t+i<n&&bL(o,e,t+i),d=!c&&(!u||s||l),f=!s&&(!l||c||u),p,m;return r===CF?(p=d,m=f):(p=d&&(!f||l),m=f&&(!d||u)),{len:i,canOpen:p,canClose:m}}function Jle(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===CF?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:Q.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===Q.text){var L=I;if(L.text===``){F=F.next;continue}if(P>0&&e[P-1].type===Q.text){e[P-1].text+=L.text,F=F.next;continue}}e[P++]=I,F=F.next}e.length=P}}function SL(e,t,n,r,i){let a=e.charCodeAt(t)===OF,o=a?t+1:t;if(e.charCodeAt(o)!==hF)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===SF&&c+1<n){c+=2;continue}if(u===pF){var d=yL(e,c,n);if(d>c){c=d;continue}}if(u===TF){var f=CL(e,c,n);if(f){c=f.end;continue}var p=Wle(e,c,n);if(p>c){c=p;continue}}u===hF?l++:u===DF&&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===JF){var v=!0;for(c++;c<n&&(e.charCodeAt(c)===X||e.charCodeAt(c)===fF);)c++;var y=``,b=c;if(c<n&&e.charCodeAt(c)===TF){for(c++,b=c;b<n&&e.charCodeAt(b)!==_F;){if(e.charCodeAt(b)===SF&&b+1<n){b+=2;continue}if(e.charCodeAt(b)===fF){v=!1;break}b++}v&&(b>=n||e.charCodeAt(b)!==_F)&&(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===SF&&b+1<n){b+=2;continue}if(C===JF)x++;else if(C===YF){if(S=!0,x===0)break;x--}else if(C===X||C===fF)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)===X||e.charCodeAt(c)===fF);)c++;var w;if(c<n){var T=e.charCodeAt(c);if(T===UF||T===HF||T===JF){var E=T===JF?41:T;c++;for(var D=c;c<n&&e.charCodeAt(c)!==E;)e.charCodeAt(c)===SF&&c+1<n&&c++,c++;c>=n?v=!1:(w=e.slice(D,c),c++)}}if(v){for(;c<n&&(e.charCodeAt(c)===X||e.charCodeAt(c)===fF);)c++;(c>=n||e.charCodeAt(c)!==YF)&&(v=!1)}}if(v){c++,y=KI(y),w!==void 0&&(w=oI(KI(w)));var O=(i?.sanitizer||cI)(y,a?`img`:`a`,a?`src`:`href`)===null?null:y;if(a){var k=TL(OL(h,0,h.length,r,i));return{node:{type:Q.image,target:O,alt:k,title:w},end:c}}else{var A=r.inAnchor;r.inAnchor=!0;var j=A?[{type:Q.text,text:h}]:OL(h,0,h.length,r,i);return r.inAnchor=A,!r.inAnchor&&wL(j)?null:{node:{type:Q.link,target:O,title:w,children:j},end:c}}}else c=m+1,_=!0}var M=``,N=c;if(!_&&g===hF){var P=c+1;N=P;for(var F=!1;N<n&&e.charCodeAt(N)!==DF;){if(e.charCodeAt(N)===SF&&N+1<n){N+=2;continue}if(e.charCodeAt(N)===hF){F=!0;break}N++}if(F||N>=n)return null;var I=e.slice(P,N);if(I.trim())M=WI(I);else{if(UI(h))return null;M=WI(h)}N+=1}else{if(UI(h))return null;M=WI(h)}var L=r.refs[M];if(!L)return null;if(a)return{node:{type:Q.image,target:L.target,alt:TL(OL(h,0,h.length,r,i)),title:L.title},end:N};var ee=r.inAnchor;r.inAnchor=!0;var j=ee?[{type:Q.text,text:h}]:OL(h,0,h.length,r,i);return r.inAnchor=ee,!r.inAnchor&&wL(j)?null:{node:{type:Q.link,target:L.target,title:L.title,children:j},end:N}}function CL(e,t,n){if(e.charCodeAt(t)!==TF)return null;for(var r=t+1;r<n;){var i=e.charCodeAt(r);if(i===_F)break;if(i===X||i===fF||i===dF||i===TF)return null;r++}if(r>=n||e.charCodeAt(r)!==_F)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:Q.link,target:a,title:void 0,children:[{type:Q.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:Q.link,target:`mailto:`+a,title:void 0,children:[{type:Q.text,text:a}]},end:r+1}:null}function Yle(e,t,n,r){if(e.charCodeAt(t)!==hF||t+1>=n||e.charCodeAt(t+1)!==gF)return null;let i=t+2;for(;i<n&&e.charCodeAt(i)!==DF&&e.charCodeAt(i)!==fF;)i++;if(i>=n||e.charCodeAt(i)!==DF)return null;let a=e.slice(t+2,i);return a?{node:{type:Q.footnoteReference,target:`#`+fI(a),text:a},end:i+1}:null}function Xle(e,t,n,r){if(r.disableBareUrls)return null;var i=``,a=!1,o=e.charCodeAt(t);if(o===NF||o===72?t+8<=n&&e.charCodeAt(t+1)===FF&&e.charCodeAt(t+2)===FF&&e.charCodeAt(t+3)===IF&&(e.charCodeAt(t+4)===LF&&e.charCodeAt(t+5)===AF&&e.charCodeAt(t+6)===VF&&e.charCodeAt(t+7)===VF?i=`https://`:e.charCodeAt(t+4)===AF&&e.charCodeAt(t+5)===VF&&e.charCodeAt(t+6)===VF&&(i=`http://`)):o===MF||o===70?t+6<=n&&e.charCodeAt(t+1)===FF&&e.charCodeAt(t+2)===IF&&e.charCodeAt(t+3)===AF&&e.charCodeAt(t+4)===VF&&e.charCodeAt(t+5)===VF&&(i=`ftp://`):(o===PF||o===87)&&t+4<=n&&e.charCodeAt(t+1)===PF&&e.charCodeAt(t+2)===PF&&e.charCodeAt(t+3)===BF&&(i=`www.`,a=!0),!i)return null;let s=t+i.length;for(;s<n;){let t=e.charCodeAt(s);if(t===X||t===fF||t===Z||t===dF||t===TF||t===_F)break;s++}for(var c=0,l=0,u=t;u<s;u++){var d=e.charCodeAt(u);d===JF?c++:d===YF&&l++}let f=s;for(;f>t+i.length;){let n=e.charCodeAt(f-1);if(n===BF||n===nle||n===AF||n===OF||n===zF||n===YF||n===CF||n===wF||n===mF){if(n===YF){if(c>=l)break;l--}f--}else if(n===RF){for(var p=f-2;p>t&&(e.charCodeAt(p)>=$F&&e.charCodeAt(p)<=eI||e.charCodeAt(p)>=tI&&e.charCodeAt(p)<=nI||e.charCodeAt(p)>=ZF&&e.charCodeAt(p)<=QF);)p--;p>=t&&e.charCodeAt(p)===kF?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)===BF)if(g<0)g=v;else{_=v;break}for(var v=_>=0?_+1:m;v<h;v++)if(e.charCodeAt(v)===wF)return null;var y=e.slice(t,f),b=a?`http://`+y:y;return{node:{type:Q.link,target:b,title:void 0,children:[{type:Q.text,text:y}]},end:f}}function Zle(e,t,n,r){if(r.disableBareUrls)return null;for(var i=t,a=i;i<n;){var o=e.charCodeAt(i);if(o>=$F&&o<=eI||o>=tI&&o<=nI||o>=ZF&&o<=QF||o===BF||o===OF||o===vF||o===36||o===yF||o===kF||o===HF||o===CF||o===WF||o===VF||o===xF||o===zF||o===gF||o===wF||o===pF||o===KF||o===GF||o===qF||o===mF||o===bF)i++;else break}if(i===a||i>=n||e.charCodeAt(i)!==EF)return null;i++;for(var s=i,c=-1,l=i;i<n;){var o=e.charCodeAt(i);if(o>=$F&&o<=eI||o>=tI&&o<=nI||o>=ZF&&o<=QF)i++;else if((o===bF||o===wF)&&i>s)i++;else if(o===BF){if(i===s)break;var u=e.charCodeAt(i-1);if(u===bF||u===wF||i-l>63)break;if(i+1<n){var d=e.charCodeAt(i+1);if(d>=$F&&d<=eI||d>=tI&&d<=nI||d>=ZF&&d<=QF)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>=$F&&f<=eI||f>=tI&&f<=nI||f>=ZF&&f<=QF)||i<=c+1)return null;for(var p=-1,m=c-1;m>=s;m--)if(e.charCodeAt(m)===BF){p=m;break}for(var m=p>=0?p+1:s;m<i;m++)if(e.charCodeAt(m)===wF)return null;var h=e.slice(t,i);return{node:{type:Q.link,target:`mailto:`+h,title:void 0,children:[{type:Q.text,text:h}]},end:i}}function wL(e){for(var t=0;t<e.length;t++)if(e[t].type===Q.link||`children`in e[t]&&Array.isArray(e[t].children)&&wL(e[t].children))return!0;return!1}function TL(e){for(var t=``,n=0;n<e.length;n++){var r=e[n];r.type===Q.text?t+=r.text:r.type===Q.breakLine?t+=` `:r.type===Q.codeInline?t+=r.text:`children`in r&&Array.isArray(r.children)?t+=TL(r.children):r.type===Q.image&&(t+=r.alt||``)}return t}function EL(e){return{type:Q.text,text:e}}function Qle(e,t,n){var r=t+1;if(r>=n)return-1;if(e.charCodeAt(r)===vF){r++;var i=r<n&&(e.charCodeAt(r)===rle||e.charCodeAt(r)===ile);i&&r++;for(var a=r,o=i?6:7;r<n&&r-a<=o;){var s=e.charCodeAt(r);if(!(s>=ZF&&s<=QF||i&&(s>=$F&&s<=jF||s>=tI&&s<=MF)))break;r++}return r===a||r-a>o?-1:r<n&&e.charCodeAt(r)===RF?r+1:-1}for(var c=r;r<n&&r-c<48;){var l=e.charCodeAt(r);if(l>=$F&&l<=eI||l>=tI&&l<=nI||l>=ZF&&l<=QF){r++;continue}break}return r===c?-1:r<n&&e.charCodeAt(r)===RF?r+1:-1}function $le(e,t,n,r,i){if(e.charCodeAt(t)!==TF)return null;var a=t+1;if(a>=n)return null;var o=e.charCodeAt(a);if(o===OF&&a+1<n&&e.charCodeAt(a+1)===bF&&a+2<n&&e.charCodeAt(a+2)===bF){var s=a+3;if(s<n&&e.charCodeAt(s)===_F)return{node:{type:Q.htmlComment,text:``,l:!0},end:s+1};if(s+1<n&&e.charCodeAt(s)===bF&&e.charCodeAt(s+1)===_F)return{node:{type:Q.htmlComment,text:`-`,l:!0},end:s+2};var c=e.indexOf(`-->`,s);return c!==-1&&c<=n-3?{node:{type:Q.htmlComment,text:e.slice(t+4,c),l:!1},end:c+3}:null}if(o===zF){var l=e.indexOf(`?>`,a+1);return l!==-1&&l<n?{node:{type:Q.htmlSelfClosing,tag:`?`,attrs:{},a:e.slice(t,l+2),b:!1},end:l+2}:null}if(o===OF&&a+1<n){var u=e.charCodeAt(a+1);if(u===hF&&e.slice(a+1,a+8)===`[CDATA[`){var d=e.indexOf(`]]>`,a+8);return d!==-1&&d<n?{node:{type:Q.htmlSelfClosing,tag:`![CDATA[`,attrs:{},a:e.slice(t,d+3),b:!1},end:d+3}:null}if(u>=$F&&u<=eI){var f=e.indexOf(`>`,a+2);return f!==-1&&f<n?{node:{type:Q.htmlSelfClosing,tag:`!`+e.slice(a+1,f),attrs:{},a:e.slice(t,f+1),b:!1},end:f+1}:null}}if(o===VF){var p=a+1;if(p>=n)return null;var m=e.charCodeAt(p);if(!(m>=$F&&m<=eI||m>=tI&&m<=nI))return null;for(p++;p<n;){var h=e.charCodeAt(p);if(h>=$F&&h<=eI||h>=tI&&h<=nI||h>=ZF&&h<=QF||h===bF)p++;else break}for(;p<n&&(e.charCodeAt(p)===X||e.charCodeAt(p)===Z||e.charCodeAt(p)===fF);)p++;if(p<n&&e.charCodeAt(p)===_F){var g=e.slice(a+1,p).trim();return{node:{type:Q.htmlSelfClosing,tag:g,attrs:{},a:e.slice(t,p+1),b:!0},end:p+1}}return null}if(!(o>=$F&&o<=eI||o>=tI&&o<=nI))return null;var _=zI(e,t);if(!_)return null;var v=_.tag,y=v.toLowerCase();if(_.selfClosing||hI(v))return{node:{type:Q.htmlSelfClosing,tag:v,attrs:dL(_.attrs,v,i),a:e.slice(t,_.end),b:!1},end:_.end};var b=MI.has(y),x=mL(e.slice(0,n),_.end,v);if(x===-1)return{node:{type:Q.htmlSelfClosing,tag:v,attrs:dL(_.attrs,v,i),a:e.slice(t,_.end),b:!1},end:_.end};var S=Rle(e,`</`+y,x),C=e.slice(_.end,S),w=[];if(b)C.trim()&&(w=[{type:Q.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(`
|
|
163
|
+
|
|
164
|
+
`)!==-1||/^#{1,6}\s/.test(T)?(r.inline=!1,w=kL(T,r,i)):w=OL(T,0,T.length,r,i),r.inAnchor=E,r.inline=D,r.e=O}}return{node:{type:Q.htmlBlock,tag:v,attrs:dL(_.attrs,v,i),i:_.rawAttrs,children:w,a:void 0,text:C,d:!1,b:!1},end:x}}var eue=200,DL=0;function OL(e,t,n,r,i){if(DL++,DL>eue)return DL--,[{type:Q.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===hF)n++;else if(i===DF&&(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===CF?_+1<i.length&&i.charCodeAt(_+1)===CF?(s++,f=_,_++):(c++,p=_):v===wF?_+1<i.length&&i.charCodeAt(_+1)===wF?(l++,m=_,_++):(u++,h=_):v===mF&&_+1<i.length&&i.charCodeAt(_+1)===mF&&(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)===pF&&(o++,ne=e);if(o%2==1&&ne!==-1){let e=!1,t=-1,n=0;for(;n<i.length;)i.charCodeAt(n)===pF&&(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)===hF&&(O===0||i.charCodeAt(O-1)!==SF)){var k=O>0&&i.charCodeAt(O-1)===OF,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)===JF){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)===hF){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)===VF)){for(var L=!1,ee=0,te=0;te<R.index;te++)i.charCodeAt(te)===pF&&ee++;if(L=ee%2==1,!L){let e=R[1];fL(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===pF){if(a=Ule(e,t,n),!a){var ie=eL(e,t,n,pF);t+=ie-1}}else if(r===CF||r===wF){var ae=qle(e,t,n);if(ae){if(ae.canOpen||ae.canClose){(B||t>z)&&(ne.push(EL(B+e.slice(z,t))),B=``);var oe=EL(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===mF)a=Gle(e,t,n,o,i);else if(r===xF)a=Kle(e,t,n,o,i);else if(r===hF)t+1<n&&e.charCodeAt(t+1)===gF&&(a=Yle(e,t,n,o)),a||=SL(e,t,n,o,i);else if(r===OF&&t+1<n&&e.charCodeAt(t+1)===hF)a=SL(e,t,n,o,i);else if(r===TF)a=CL(e,t,n),!a&&!i.disableParsingRawHTML&&!i.ignoreHTMLBlocks&&(a=$le(e,t,n,o,i));else if(r===kF){var se=Qle(e,t,n);if(se!==-1){var ce=e.slice(t,se),le=oI(ce);if(le!==ce){B=B+e.slice(z,t)+le,t=se,z=se;continue}}}else if((r===NF||r===PF||r===MF)&&!o.inAnchor&&!i.disableAutoLink&&(t===0||e.charCodeAt(t-1)!==TF)){var ue=t+1<n?e.charCodeAt(t+1):0;(r===NF&&ue===FF||r===MF&&ue===FF||r===PF&&ue===PF)&&(a=Xle(e,t,n,i))}if(!a&&re>=0&&re-t<=64&&!o.inAnchor&&!i.disableAutoLink&&!i.disableBareUrls&&(r>=$F&&r<=eI||r>=tI&&r<=nI||r>=ZF&&r<=QF)&&(a=Zle(e,t,n,i),!a&&t>=re&&(re=e.indexOf(`@`,t+1),re>=n&&(re=-1))),r===fF&&o.e){var de=!1,fe=0;if(t>z&&e.charCodeAt(t-1)===SF)de=!0,fe=1;else{for(var pe=0,me=t-1;me>=z&&e.charCodeAt(me)===X;)pe++,me--;pe>=2&&(de=!0,fe=pe)}if(de){for((B||t-fe>z)&&(ne.push(EL(B+e.slice(z,t-fe))),B=``),ne.push({type:Q.breakLine}),t++;t<n&&e.charCodeAt(t)===X;)t++;z=t;continue}var V=t>z&&e.charCodeAt(t-1)===X,he=t+1<n&&e.charCodeAt(t+1)===X;if(V||he){for(var ge=t;ge>z&&e.charCodeAt(ge-1)===X;)ge--;for(B+=e.slice(z,ge)+`
|
|
165
|
+
`,t++;t<n&&e.charCodeAt(t)===X;)t++;z=t;continue}}if(a)(B||t>z)&&(ne.push(EL(B+e.slice(z,t))),B=``),ne.push(a.node),t=a.end,z=t;else{if(r===SF&&t+1<n&&GI(e.charCodeAt(t+1))&vI){(B||t>z)&&(ne.push(EL(B+e.slice(z,t))),B=``),ne.push(EL(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<rI&&!II[_e])t++;else break}}}return(B||n>z)&&(ne.push(EL(B+e.slice(z,n))),B=``),R.length>0&&Jle(ne,R,r,i),r.g=a,DL--,ne}var tue=500;function kL(e,t,n){var r=t.j||0;if(r>tue)return[{type:Q.text,text:e}];if(t.j=r+1,n.optimizeForStreaming&&!t.m){var i=e.length;i>0&&e.charCodeAt(i-1)===fF&&i--;for(var a=i;a>0&&e.charCodeAt(a-1)!==fF;)a--;if(a>0&&e.charCodeAt(a)===GF){for(var o=!0,s=a;s<i;s++){var c=e.charCodeAt(s);if(c!==X&&c!==Z&&c!==bF&&c!==AF&&c!==GF){o=!1;break}}if(o){for(var l=a-1;l>0&&e.charCodeAt(l-1)!==fF;)l--;e.charCodeAt(l)===GF&&(e=e.slice(0,l).trimEnd())}}var u=e.trim(),d=u.lastIndexOf(`
|
|
166
|
+
`),f=d===-1?u:u.slice(d+1);if(f.length>0&&f.charCodeAt(0)===GF){for(var p=!1,m=!1,h=1;h<f.length;h++){var g=f.charCodeAt(h);g===GF&&(p=!0),g===bF&&(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)===TF){var x=b+1<e.length?e.charCodeAt(b+1):0;if(x>=$F&&x<=eI||x>=tI&&x<=nI){for(var S=b+2;S<e.length;){var C=e.charCodeAt(S);if(C>=$F&&C<=eI||C>=tI&&C<=nI||C>=ZF&&C<=QF)S++;else break}for(var w=S;w<e.length&&e.charCodeAt(w)!==_F;)w++;if(w<e.length&&e.charCodeAt(w-1)!==VF){for(var T=!1,E=w+1;E<e.length;E++)if(e.charCodeAt(E)===TF){T=!0;break}T||(_=b,v=S,y=w+1)}}break}if(_>=0){for(var D=0,O=0;O<_;O++)e.charCodeAt(O)===pF&&D++;if(D%2==0){var k=e.slice(_+1,v);fL(e,`</`+k,0)===-1&&(e=e.slice(0,_)+e.slice(y))}}for(var A=e.length;A>0&&e.charCodeAt(A-1)===fF;)A--;if(A>0){for(var j=A;j>0&&e.charCodeAt(j-1)!==fF;)j--;for(var M=j,N=0;M<A&&e.charCodeAt(M)===X&&N<3;)M++,N++;if(j>0&&M<A&&Nle(e,M,A)){for(var P=j-1,F=P;F>0&&e.charCodeAt(F-1)!==fF;)F--;iL(e,F,P)||(e=e.slice(0,j).trimEnd())}}var I=e.length;if(I>0){for(var L=e.lastIndexOf(`
|
|
167
|
+
`),ee=L===-1?0:L+1,te=I,ne=ee,R=0;ne<te&&e.charCodeAt(ne)===X&&R<3;)ne++,R++;if(ne<te){var z=e.charCodeAt(ne),B=!1;if(z===CF||z===bF||z===WF){var re=ne+1;if(re>=te||e.charCodeAt(re)===X||e.charCodeAt(re)===Z){for(var ie=re;ie<te&&(e.charCodeAt(ie)===X||e.charCodeAt(ie)===Z);)ie++;ie>=te&&(B=!0)}}else if(z>=ZF&&z<=QF){for(var ae=ne;ae<te&&e.charCodeAt(ae)>=ZF&&e.charCodeAt(ae)<=QF;)ae++;if(ae<te&&(e.charCodeAt(ae)===BF||e.charCodeAt(ae)===YF)){var oe=ae+1;if(oe>=te||e.charCodeAt(oe)===X||e.charCodeAt(oe)===Z){for(var se=oe;se<te&&(e.charCodeAt(se)===X||e.charCodeAt(se)===Z);)se++;se>=te&&(B=!0)}}}B&&(e=e.slice(0,ee).trimEnd())}}}if(t.inline)return OL(e,0,e.length,t,n);let ce=[],le=0,ue=e.length;if(le===0&&!n.disableFrontmatter&&e.startsWith(`---`)){let t=ale(e);if(t&&t.hasValidYaml){if(n.preserveFrontmatter!==!1){let n=e.slice(0,t.endPos).trimEnd();ce.push({type:Q.frontmatter,text:n})}le=t.endPos}}for(;le<ue;){for(var de=e.indexOf(`
|
|
168
|
+
`,le),fe=de<0?ue:de;le<ue&&iL(e,le,fe);)le=fe<ue?fe+1:fe,le<ue&&(de=e.indexOf(`
|
|
169
|
+
`,le),fe=de<0?ue:de);if(le>=ue)break;var pe=e.charCodeAt(le)===XF;rL(e,le,fe);let r=null;if(qI=e,JI=le,YI=fe,!pe&&tL>=4&&!t.inHTML)r=Fle(e,le);else if(!pe){let i=le+nL,a=e.charCodeAt(i);a===vF?r=Mle(e,le,t,n):a===_F?r=Ile(e,le,t,n):a===pF||a===mF?r=Ple(e,le,t):a===bF||a===CF||a===wF?(r=aL(e,le),!r&&(r=lL(e,le,t,n))):a===WF||a>=ZF&&a<=QF?r=lL(e,le,t,n):a===TF?r=hL(e,le,t,n):a===GF?r=_L(e,le,t,n):a===hF&&(r=Ble(e,le,t))}if(!r){for(var me=!1,V=le;V<fe;V++)if(e.charCodeAt(V)===GF){me=!0;break}me&&(r=_L(e,le,t,n))}if(r||=Hle(e,le,t,n),r)r.node.type!==Q.refCollection&&ce.push(r.node),le=r.end;else{var he=e.indexOf(`
|
|
170
|
+
`,le);le=he<0?ue:he+1}}return t.j=r,ce}function nue(e,t,n,r){var i=zI(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(`
|
|
171
|
+
`)||i.rawAttrs.includes(`
|
|
172
|
+
`),endPos:i.end}:null}function AL(e,t,n){DL=0,e=mle(e),!t.refs&&(t.refs={}),(n.optimizeForStreaming||t.inline)&&(t.m=jle(e,t.refs,n));var r=!t.k;r&&(t.k=[],t.h=[]);let i=kL(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=OL(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===Q.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 CI(t.refs)?[{type:Q.refCollection,refs:t.refs},...i]:i}var jL;try{jL=b.createElement(`div`).$$typeof}catch{jL=Symbol.for(`react.transitional.element`)}function ML(e,t,n){return{$$typeof:jL,type:e,key:n==null?null:``+n,ref:null,props:t,_owner:null,_store:{},_debugStack:null,_debugTask:null}}var rue=typeof b.createContext<`u`?b.createContext(void 0):void 0;function NL(e,t,n,r,i,a,o,s,c){switch(e.type){case Q.blockQuote:{let i={key:n.key};return e.alert&&(i.className=`markdown-alert-`+a(e.alert.toLowerCase(),fI),e.children.unshift(gle(e.alert))),r(`blockquote`,i,t(e.children,n))}case Q.breakLine:return r(`br`,{key:n.key});case Q.breakThematic:return r(`hr`,{key:n.key});case Q.frontmatter:return s.preserveFrontmatter?r(`pre`,{key:n.key},e.text):null;case Q.codeBlock:let f=e.lang?oI(e.lang):``;return r(`pre`,{key:n.key},r(`code`,{...aI(e.attrs),className:f?`language-${f} lang-${f}`:``},e.text));case Q.codeInline:return r(`code`,{key:n.key},e.text);case Q.footnoteReference:return r(`a`,{key:n.key,href:i(e.target,`a`,`href`)||void 0},r(`sup`,null,e.text));case Q.gfmTask:return r(`input`,{checked:e.completed,key:n.key,readOnly:!0,type:`checkbox`});case Q.heading:return r(`h${e.level}`,{id:e.id,key:n.key},t(e.children,n));case Q.htmlBlock:{let f=e;if(s.tagfilter&&kI(f.tag))return r(`span`,{key:n.key},`<`+f.tag+EI(f.attrs)+`>`);if(f.a&&f.d){let r=f.tag.toLowerCase(),p=kle(r),m=f.children&&f.children.length>0;if(p){let t=ble(f.a,r,s.tagfilter);return/<[a-z][^>]{0,100}>/i.test(f.a)?c(e.tag,{key:n.key,...aI(e.attrs),dangerouslySetInnerHTML:{__html:t}}):c(e.tag,{key:n.key,...aI(e.attrs)},t)}let h=RegExp(`^<${f.tag}(\\s|>)`,`i`);if(m&&!h.test(f.a)&&s.tagfilter&&Tle(f.a))return c(e.tag,{key:n.key,...aI(e.attrs)},t(f.children,n));if(Ale(f.a)){let t=s.tagfilter?AI(f.a):f.a;return c(e.tag,{key:n.key,...aI(e.attrs),dangerouslySetInnerHTML:{__html:t}})}let g={slugify:e=>a(e,fI),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,...aI(e.attrs)},t(f.children,n)):c(e.tag,{key:n.key,...aI(e.attrs)});let v=AL(_,{inline:!1,refs:o,inHTML:!1},g);TI(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,...aI(e.attrs)},t(f.children,n));if(w)return t(v.flatMap(wI),n);var l=yle(v,y);if(l.found&&l.afterClose.length>0){var u=l.beforeClose.flatMap(wI),d=l.afterClose.flatMap(wI);return ML(b.Fragment,{children:[c(e.tag,{key:n.key,...aI(e.attrs)},t(u,n)),t(d,n)]},n.key)}return c(e.tag,{key:n.key,...aI(e.attrs)},t(v.flatMap(wI),n))}return hI(e.tag)?c(e.tag,{key:n.key,...aI(e.attrs)}):c(e.tag,{key:n.key,...aI(e.attrs)},e.children?t(e.children,n):``)}case Q.htmlSelfClosing:{let t=e;return s.tagfilter&&kI(t.tag)?r(`span`,{key:n.key},`<`+t.tag+EI(t.attrs)+` />`):c(e.tag,{key:n.key,...aI(e.attrs)})}case Q.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 Q.link:{let i={key:n.key};return e.target!=null&&(i.href=Sle(e.target)),e.title&&(i.title=e.title),r(`a`,i,t(e.children,n))}case Q.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 Q.text:return e.text;case Q.textFormatted:return r(e.tag,{key:n.key},t(e.children,n));case Q.orderedList:case Q.unorderedList:return r(e.type===Q.orderedList?`ol`:`ul`,{key:n.key,start:e.type===Q.orderedList?e.start:void 0},e.items.map(function(e,i){return r(`li`,{key:i},t(e,n))}));case Q.paragraph:return r(`p`,{key:n.key},t(e.children,n));case Q.ref:return null;default:return null}}var iue=(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(NL.bind(null,l[h],c,u,t,n,r,i,a,o),l[h],c,u):NL(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},aue=(e,t)=>{let n=DI(t,e,void 0);return n?typeof n==`function`||typeof n==`object`&&`render`in n?n:DI(t,`${e}.component`,e):e};function oue(e,t){let n={...t||{}};n.overrides=n.overrides||{};let r=n.slugify||fI,i=n.sanitizer||cI,a=n.createElement,o=CI(n.overrides),s=e=>PL(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)===TF&&(Ele.test(n)||Dle.test(n)||nue(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=DI(n.overrides,e+`.props`,{});s=aue(e,n.overrides),i={...i,...c,className:Cle(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),ML(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,fI):fI,sanitizer:i,tagfilter:n.tagfilter!==!1},f=e[0]&&e[0].type===Q.refCollection?e[0].refs:{},p=iue(n.renderRule,l,i,r,f,n,u),m=p(e,{inline:n.forceInline,refs:f}),h=xle(f);if(h.length&&m.push(l(`footer`,{key:`footer`},h.map(function(e){let t=e.identifier.charCodeAt(0)===gF?e.identifier.slice(1):e.identifier,n=AL(e.footnote,{inline:!0,refs:f},d);return l(`div`,{id:r(t,fI),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=_,ML(g,v,`outer`)}function PL(e=``,t={}){let n={...t||{}};n.overrides=n.overrides||{},n.slugify;let r=n.sanitizer||cI;function i(e){let t=n.forceInline||!n.forceBlock&&!lle.test(e),i={...n,slugify:n.slugify?e=>n.slugify(e,fI):fI,sanitizer:r,tagfilter:n.tagfilter!==!1},o=t?e:vle(e);if(n.optimizeForStreaming){var s=o.lastIndexOf(`<`);s!==-1&&o.indexOf(`>`,s)===-1&&(o=o.slice(0,s))}return oue(AL(o,{inline:t,refs:a},i),{...i,forceInline:t})}let a={};return i(e)}function sue(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 FL=({children:e,options:t,...n})=>{if(!(typeof b.useContext<`u`)){let r={...t,overrides:{...t?.overrides},wrapperProps:{...t?.wrapperProps,...n}};return PL(e??``,r)}let r=b.useContext(rue),i=sue(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(()=>PL(o,a),[o,a])},IL=Symbol(`remove-this-key`),LL=Symbol(`reset`);function cue(e,t){return Array.isArray(e.required)&&e.required.includes(t)}function lue(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(SP.NewStringDefault)}}function uue(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=dP(oP(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 due=(0,b.memo)(uue);function fue(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)(()=>mA(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=nP(m,C,s,n),j=HN(r),M=[],N=(0,b.useCallback)((e,t)=>{let{duplicateKeySuffixSeparator:r=`-`}=mA(n,y),i=0,a=e;for(;$T(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)vE(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({[aA]:e[aA]},r),n=e.type,i=e.const,a=_.getDefaultFormState(e,a)),!n&&(`anyOf`in e||`oneOf`in e)&&(n=`object`)}vE(e,t,i??a??lue(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(IL,[...E.path,e])},[p,E]),L=(0,b.useCallback)(e=>D.current.currentKey===e?D.current.previousKey:e,[]);if(!A||j)try{M=JN(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)(FL,{options:{disableParsingRawHTML:!0},children:v(SP.InvalidObjectField,[o||`root`,e.message])})}),(0,H.jsx)(`pre`,{children:JSON.stringify(C)})]})}let ee=bN(`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]?.[qk],a=t?n.additionalProperties:n[e],o=mA(a).widget===`hidden`;return{content:(0,H.jsx)(due,{propertyName:e,required:cue(C,e),schema:Y(C,[nA,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 pue(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=bN(`OptionalDataControlsTemplate`,l,mA(n,u)),m=HN(r),h,g,_,v;return i||a?(h=VN(c,`Msg`),g=m?void 0:f(SP.OptionalObjectEmptyMsg)):(g=f(m?SP.OptionalObjectRemove:SP.OptionalObjectAdd),m?(h=VN(c,`Remove`),v=()=>o(void 0,c.path,s)):(h=VN(c,`Add`),_=()=>{let e=d.getDefaultFormState(t,r,`excludeObjectChildren`);e===void 0&&(e=BA(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 mue={array:`ArrayField`,boolean:`BooleanField`,integer:`NumberField`,number:`NumberField`,object:`ObjectField`,string:`StringField`,null:`NullField`};function hue(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=BA(e),s=Array.isArray(o)?o[0]:o||``,c=e.$id,l=mue[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 gue(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[sA])return(0,H.jsx)(x,{...e});let w=XN(t,r,f),T=mA(w,g),E=bN(`FieldTemplate`,f,T),D=bN(`DescriptionFieldTemplate`,f,T),O=bN(`FieldHelpTemplate`,f,T),k=bN(`FieldErrorTemplate`,f,T),A=m.retrieveSchema(t,i),j=hue(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[Yk].map(e=>m.retrieveSchema(lC(e)?e:{},i))):A.oneOf&&(ne=y,R=A[tA].map(e=>m.retrieveSchema(lC(e)?e:{},i)));let e=nP(f,A,d,w),t=HN(i);ee&&=!e||t,z={childFieldPathId:n,fieldPathId:oP(`XxxOf`,h,n)}}let{__errors:B,...re}=a||{},ie=uE(w,[`ui:classNames`,`classNames`,`ui:style`]);`ui:options`in ie&&(ie[fA]=uE(ie[fA],[`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||qk in A?o:T.title||e.schema.title||A.title||e.title||o,M===`label`&&(se=f.translateString(SP.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-${BA(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:NN(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 _ue=(0,b.memo)(gue,(e,t)=>{let{experimental_componentUpdateStrategy:n=`customDeep`}=t.registry.globalFormOptions;return n===`always`?!1:n===`shallow`?$N(e,t):kA(e,t)});function vue(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)?SM(t,r):void 0,w=C?`select`:`text`;v&&jN(t,v,y)&&(w=v);let{widget:T=w,placeholder:E=``,title:D,...O}=mA(r),k=x.getDisplayLabel(t,r,S),A=D??g??_??n,j=EN(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 yue(){return{AnyOfField:lF,ArrayField:RP,BooleanField:zP,CyclicSchemaField:BP,FallbackField:WP,LayoutGridField:oF,LayoutHeaderField:qce,LayoutMultiSchemaField:Jce,NumberField:Qce,ObjectField:fue,OneOfField:lF,OptionalDataControlsField:pue,SchemaField:_ue,StringField:vue,NullField:Yce}}function bue(e){let{fieldPathId:t,description:n,registry:r,schema:i,uiSchema:a}=e,o=mA(a,r.globalUiOptions),{label:s=!0}=o;return!n||!s?null:(0,H.jsx)(bN(`DescriptionFieldTemplate`,r,o),{id:NN(t),description:n,schema:i,uiSchema:a,registry:r})}function xue(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:BN(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:BN(o,`moveDown`),className:`rjsf-array-item-move-down`,disabled:t||d||!r,onClick:l,uiSchema:p,registry:f}),n&&(0,H.jsx)(m,{id:BN(o,`copy`),className:`rjsf-array-item-copy`,disabled:t||d,onClick:s,uiSchema:p,registry:f}),a&&(0,H.jsx)(_,{id:BN(o,`remove`),className:`rjsf-array-item-remove`,disabled:t||d,onClick:c,uiSchema:p,registry:f})]})}function Sue(e){let{children:t,className:n,buttonsProps:r,displayLabel:i,hasDescription:a,hasToolbar:o,registry:s,uiSchema:c}=e,l=bN(`ArrayFieldItemButtonsTemplate`,s,mA(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 Cue(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=mA(a),h=bN(`ArrayFieldDescriptionTemplate`,u,m),g=bN(`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:BN(i,`add`),className:`rjsf-array-item-add`,onClick:c,disabled:r||l,uiSchema:a,registry:u})]})}function wue(e){let{fieldPathId:t,title:n,schema:r,uiSchema:i,required:a,registry:o,optionalDataControl:s}=e,c=mA(i,o.globalUiOptions),{label:l=!0}=c;return!n||!l?null:(0,H.jsx)(bN(`TitleFieldTemplate`,o,c),{id:LN(t),title:n,required:a,schema:r,uiSchema:i,registry:o,optionalDataControl:s})}function RL(e){let{id:t,schema:n}=e,{examples:r,default:i}=n;return Array.isArray(r)?(0,H.jsx)(`datalist`,{id:FN(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 Tue(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,...gN(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?FN(t):void 0,onChange:d||T,onBlur:E,onFocus:D,"aria-describedby":RN(t,!!p.examples)}),f.allowClearTextInputs&&!a&&!o&&w&&(0,H.jsx)(S,{registry:h,onClick:O}),(0,H.jsx)(RL,{id:t,schema:p})]})}function Eue(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 zL=(0,b.memo)(Eue);function Due(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(zL,{title:t(SP.CopyButton),...e,icon:`copy`})}var Oue=(0,b.memo)(Due);function kue(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(zL,{title:t(SP.MoveDownButton),...e,icon:`arrow-down`})}var Aue=(0,b.memo)(kue);function jue(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(zL,{title:t(SP.MoveUpButton),...e,icon:`arrow-up`})}var Mue=(0,b.memo)(jue);function Nue(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(zL,{title:t(SP.RemoveButton),...e,iconType:`danger`,icon:`remove`})}var Pue=(0,b.memo)(Nue);function Fue({id:e,className:t,onClick:n,disabled:r,registry:i,...a}){let{translateString:o}=i;return(0,H.jsx)(zL,{id:e,iconType:`default`,icon:`remove`,className:`btn-clear col-xs-12`,title:o(SP.ClearButton),onClick:n,disabled:r,registry:i,...a})}var Iue=(0,b.memo)(Fue);function Lue({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)(zL,{id:e,iconType:`info`,icon:`plus`,className:`btn-add col-xs-12`,title:a(SP.AddButton),onClick:n,disabled:r,registry:i})})})}function Rue({uiSchema:e}){let{submitText:t,norender:n,props:r={}}=yN(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 zue(){return{SubmitButton:Rue,AddButton:Lue,CopyButton:Oue,MoveDownButton:Aue,MoveUpButton:Mue,RemoveButton:Pue,ClearButton:Iue}}function Bue(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(SP.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(SP.ExpandButton)}),` `]})]})}var BL=xN();function VL({description:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return mA(n,r).enableMarkdownInDescription&&typeof e==`string`?(0,H.jsx)(FL,{options:{disableParsingRawHTML:!0},"data-testid":BL.markdown,children:e}):e}VL.TEST_IDS=BL;function Vue(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)(VL,{description:n,registry:r,uiSchema:i})}):null}function Hue({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(SP.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 Uue(e){let{schema:t,registry:n,typeSelector:r,schemaField:i}=e;return(0,H.jsx)(bN(`MultiSchemaFieldTemplate`,n),{selector:r,optionSchemaField:i,schema:t,registry:n})}function Wue(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,H.jsx)(`div`,{children:(0,H.jsx)(`ul`,{id:PN(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 HL=xN();function UL({help:e,registry:t,uiSchema:n={}}){let{globalUiOptions:r}=t;return mA(n,r).enableMarkdownInHelp&&typeof e==`string`?(0,H.jsx)(FL,{options:{disableParsingRawHTML:!0},"data-testid":HL.markdown,children:e}):e}UL.TEST_IDS=HL;function Gue(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i}=e;return n?(0,H.jsx)(`div`,{id:IN(t),className:`help-block`,children:(0,H.jsx)(UL,{help:n,registry:i,uiSchema:r})}):null}var Kue=`*`;function WL(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:Kue})]}):null}function que(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=mA(d),p=bN(`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)(WL,{label:n,required:c,id:t}),l&&o?o:null,r,i,a]})}var Jue=que;function Yue(e){let{children:t,column:n,className:r,...i}=e;return(0,H.jsx)(`div`,{className:r,...i,children:t})}function Xue(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 Zue(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=mA(m),g=bN(`TitleFieldTemplate`,u,h),_=bN(`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:LN(a),title:p,required:d,schema:f,uiSchema:m,registry:u,optionalDataControl:v?s:void 0}),n&&(0,H.jsx)(_,{id:NN(a),description:n,schema:f,uiSchema:m,registry:u}),v?void 0:s,c.map(e=>e.content),hA(f,m,i)&&(0,H.jsx)(y,{id:BN(a,`add`),className:`rjsf-object-property-expand`,onClick:o,disabled:r||l,uiSchema:m,registry:u})]})}function Que(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,H.jsx)(zL,{id:t,registry:n,icon:`plus`,className:`rjsf-add-optional-data btn-sm`,onClick:i,title:r}):a?(0,H.jsx)(zL,{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 $ue=`*`;function ede(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:$ue}),i&&(0,H.jsx)(`span`,{className:`pull-right`,style:{marginBottom:`2px`},children:i})]})}function tde(e){let{schema:t,fieldPathId:n,reason:r,registry:i}=e,{translateString:a}=i,o=SP.UnsupportedField,s=[];return n?.$id&&(o=SP.UnsupportedFieldWithId,s.push(n.$id)),r&&(o=o===SP.UnsupportedField?SP.UnsupportedFieldWithReason:SP.UnsupportedFieldWithIdAndReason,s.push(r)),(0,H.jsxs)(`div`,{className:`unsupported-field`,children:[(0,H.jsx)(`p`,{children:(0,H.jsx)(FL,{options:{disableParsingRawHTML:!0},children:a(o,s)})}),t&&(0,H.jsx)(`pre`,{children:JSON.stringify(t,null,2)})]})}function nde(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(SP.KeyLabel,[o]),S=qk 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)(WL,{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:BN(t,`remove`),className:`rjsf-object-property-remove btn-block`,style:{border:`0`},disabled:i||u,onClick:c,uiSchema:g,registry:_})})]})})}function rde(){return{ArrayFieldDescriptionTemplate:bue,ArrayFieldItemTemplate:Sue,ArrayFieldItemButtonsTemplate:xue,ArrayFieldTemplate:Cue,ArrayFieldTitleTemplate:wue,ButtonTemplates:zue(),BaseInputTemplate:Tue,CyclicSchemaExpandTemplate:Bue,DescriptionFieldTemplate:Vue,ErrorListTemplate:Hue,FallbackFieldTemplate:Uue,FieldTemplate:Jue,FieldErrorTemplate:Wue,FieldHelpTemplate:Gue,GridTemplate:Yue,MultiSchemaFieldTemplate:Xue,ObjectFieldTemplate:Zue,OptionalDataControlsTemplate:Que,TitleFieldTemplate:ede,UnsupportedFieldTemplate:tde,WrapIfAdditionalTemplate:nde}}function ide({time:e=!0,...t}){let{AltDateWidget:n}=t.registry.widgets;return(0,H.jsx)(n,{time:e,...t})}function ade(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}=uP(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)(lP,{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(SP.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(SP.ClearLabel)})})]})}function ode({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=_N(n),h=Array.isArray(r)?r:[r],g=(0,b.useCallback)(({target:t})=>s(e,uN(t?.value,d,m,p)),[s,e,d,p,m]),_=(0,b.useCallback)(({target:t})=>c(e,uN(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=aN(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:zN(e,r),name:l||e,checked:s,value:dN(n.value,r,m),disabled:t||c||a,autoFocus:i&&r===0,onChange:e=>{e.target.checked?o(cN(r,h,d)):o(iN(r,h,d))},onBlur:g,onFocus:_,"aria-describedby":RN(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 sde({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=bN(`DescriptionFieldTemplate`,p,n),g=ZN(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=mA(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:NN(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":RN(r)}),WN((0,H.jsx)(`span`,{children:s}),c)]})]})}function cde(e){let{disabled:t,readonly:n,options:r,registry:i}=e;return(0,H.jsx)(bN(`BaseInputTemplate`,i,r),{type:`color`,...e,disabled:t||n})}function lde(e){let{onChange:t,value:n,options:r,registry:i}=e;return(0,H.jsx)(bN(`BaseInputTemplate`,i,r),{type:`datetime-local`,...e,value:_P(n),onChange:e=>t(GN(e))})}function ude(e){let{onChange:t,options:n,registry:r}=e,i=bN(`BaseInputTemplate`,r,n),a=(0,b.useCallback)(e=>t(e||void 0),[t]);return(0,H.jsx)(i,{type:`date`,...e,onChange:a})}function dde(e){let{options:t,registry:n}=e;return(0,H.jsx)(bN(`BaseInputTemplate`,n,t),{type:`email`,...e})}function fde({fileInfo:e,registry:t}){let{translateString:n}=t,{dataURL:r,type:i,name:a}=e;if(!r)return null;let o=n(SP.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 pde({filesInfo:e,registry:t,preview:n,onRemove:r,options:i}){if(e.length===0)return null;let{translateString:a}=t,{RemoveButton:o}=bN(`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)(FL,{children:a(SP.FilesInfo,[s,l,String(c)])}),n&&(0,H.jsx)(fde,{fileInfo:e,registry:t}),(0,H.jsx)(o,{onClick:()=>r(i),registry:t})]},i)})})}function mde(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}=gP(o,a,i),f=bN(`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)(pde,{filesInfo:l,onRemove:d,registry:c,preview:s.filePreview,options:s})]})}function hde({id:e,value:t,htmlName:n}){return(0,H.jsx)(`input`,{type:`hidden`,id:e,name:n||e,value:t===void 0?``:t})}function gde(e){let{options:t,registry:n}=e;return(0,H.jsx)(bN(`BaseInputTemplate`,n,t),{type:`password`,...e})}function _de({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=_N(e),g=(0,b.useCallback)(({target:e})=>o(l,uN(e?.value,d,h,m)),[o,d,m,l,h]),_=(0,b.useCallback)(({target:e})=>s(l,uN(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=aN(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:zN(l,o),checked:s,name:u||l,required:n,value:dN(e.value,o,h),disabled:r||d||i,autoFocus:a&&o===0,onChange:()=>c(e.value),onBlur:g,onFocus:_,"aria-describedby":RN(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 vde(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 yde({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 GL(e,t){return t?Array.from(e.target.options).slice().filter(e=>e.selected).map(e=>e.value):e.target.value}function bde({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=_N(n),S=(0,b.useCallback)(e=>d(t,uN(GL(e,s),g,x,v)),[d,t,s,g,v,x]),C=(0,b.useCallback)(e=>u(t,uN(GL(e,s),g,x,v)),[u,t,s,g,v,x]),w=(0,b.useCallback)(e=>l(uN(GL(e,s),g,x,v)),[l,s,g,v,x]),T=sN(r,g,s,x,y),E=!s&&e.default===void 0;return KN(t,e,g,s),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(QN,{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":RN(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:dN(e,n,x),disabled:r,children:t},String(e))})]})]})}function xde({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":RN(e)})}function Sde(e){let{options:t,registry:n}=e;return(0,H.jsx)(bN(`BaseInputTemplate`,n,t),{...e})}function Cde(e){let{onChange:t,options:n,registry:r}=e,i=bN(`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 wde(e){let{options:t,registry:n}=e;return(0,H.jsx)(bN(`BaseInputTemplate`,n,t),{type:`number`,...e})}function Tde(e){let{options:t,registry:n}=e;return(0,H.jsx)(bN(`BaseInputTemplate`,n,t),{type:`url`,...e})}function Ede(){return{AltDateWidget:ade,AltDateTimeWidget:ide,CheckboxWidget:sde,CheckboxesWidget:ode,ColorWidget:cde,DateWidget:ude,DateTimeWidget:lde,EmailWidget:dde,FileWidget:mde,HiddenWidget:hde,PasswordWidget:gde,RadioWidget:_de,RangeWidget:vde,RatingWidget:yde,SelectWidget:bde,TextWidget:Sde,TextareaWidget:xde,TimeWidget:Cde,UpDownWidget:wde,URLWidget:Tde}}function Dde(){return{fields:yue(),templates:rde(),widgets:Ede(),rootSchema:{},formContext:{},translateString:nN,globalFormOptions:{idPrefix:cA,idSeparator:`_`,useFallbackUiForUnsupportedType:!1}}}function KL(e,t){return{...hE(e,[`schema`,`uiSchema`,`fieldPathId`,`schemaUtils`,`formData`,`edit`,`errors`,`errorSchema`]),...t!==void 0&&{status:t}}}var Ode=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}=vP(n,e.extraErrors)),t.customErrors&&({errors:r,errorSchema:i}=vP({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&&!kA(this.state.formData,i)&&r(KL(this.state)),this.formElement=(0,b.createRef)()}getSnapshotBeforeUpdate(e,t){if(!kA(this.props,e)){let n=pN(this.props.formData,e.formData),r=pN(this.props.formData,this.state.formData),i=!kA(e.schema,this.props.schema),a=n.length>0||!kA(e.formData,this.props.formData),o=r.length>0||!kA(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:!kA(s,t)}}return{shouldUpdate:!1}}componentDidUpdate(e,t,n){if(n.shouldUpdate){let{nextState:e}=n,r=!kA(e.formData,this.props.formData),i=this.isProcessingUserChange;if(this.isProcessingUserChange=!1,i&&r)return;r&&!kA(e.formData,t.formData)&&this.props.onChange&&this.props.onChange(KL(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=ZM(u,l,g,_));let y=v.getRootSchema(),b=n;n===LL?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?kN({formData:x}):``;if(S=this.updateRetrievedSchema(r??v.retrieveSchema(y,x)),s&&!w.includes(e)&&!kA(S,c.retrievedSchema)){let t=v.sanitizeDataForNewSchema(S,c.retrievedSchema,x);if(C=!kA(t,x),C){x=t,b=t;let e=kN({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=yM(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=kA(c.registry,A)?c.registry:A,M=c.fieldPathId&&c.fieldPathId?.$id===j.globalFormOptions.idPrefix?c.fieldPathId:oP(``,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 eP(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=bN(`ErrorListTemplate`,e,mA(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=vP(e,t);r=n.errorSchema,i=n.errors}if(n){let e=vP({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=yM(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)=>zM(e,t);getFieldNames=(e,t)=>BM(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=oP(``,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:ET(p),T=Gk(w)&&Object.keys(w).length>0&&Object.values(w).every(e=>e===void 0)&&p==null?void 0:w;if(Gk(w)||Array.isArray(w)){let e=!1;if(t===IL)DE(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?vE(w,n,void 0):vE(w,n,r)}let r=b&&!C&&!Gk(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&&vE(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(!nE(C?_:Y(_,n)))C?x=i:(x=ET(_),vE(x,n,i));else if(y||=new fN,C){let e=Y(i,Qk);e&&y.setErrors(e)}else vE(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(KL({...this.state,...D}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(e){return kA(e,this.state?.retrievedSchema)?this.state.retrievedSchema:e}reset=()=>{let{formData:e,initialFormData:t=LL,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?.(KL({...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=>!kA(Y(this.state,e),Y(c,e)));this.setState(c,()=>{t&&l&&t(KL({...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?iP(n):[];this.setState({formData:a,errors:r,errorSchema:t,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{i&&i(KL({...this.state,formData:a},`submitted`),e)})}};static getGlobalFormOptions(e){let{uiSchema:t={},experimental_componentUpdateStrategy:n,idSeparator:r=`_`,idPrefix:i=cA,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}=Dde();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[pA],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=CE(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`,{[iA]:E={}}=mA(_);f&&(E={...E,props:{...E.props,disabled:!0}});let D={[fA]:{[iA]: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 kde(e,t=`none`){return t===`all`?e:e.reduce((e,n)=>{let{message:r,schemaPath:i}=n,a=t===`anyOf`?void 0:i?.indexOf(`/${Yk}/`),o=t===`oneOf`?void 0:i?.indexOf(`/${tA}/`),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 Ade(e=[],t,n,r){return kde(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=mA(Y(t,(u?`${u}.${e}`:e).replace(/^\./,``))).title;if(n===void 0&&(n=mA(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,[nA,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(nA,e);n.push(nA,e,`title`);let i=Y(r,n);i&&(l=l.replace(`'${e}'`,`'${i}'`),f=i)}}}),d=l;else{let e=mA(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 jde(e,t,n,r,i,a,o,s){let{validationError:c}=t,l=Ade(t.errors,o,s,r);c&&(l=[...l,{stack:c.message}]),typeof a==`function`&&(l=a(l,o));let u=aP(l);if(c&&(u={...u,$schema:{__errors:[c.message]}}),typeof i!=`function`)return{errors:l,errorSchema:u};let d=FM(e,r,n,r,!0),f=sP(i(d,gA(d),o,u));return vP({errors:l,errorSchema:u},f)}var qL=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})),JL=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=qL(),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}}})),YL=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=qL(),n=JL(),r=qL();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=JL();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?`
|
|
173
|
+
`:``},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})`}})),XL=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=YL(),n=qL();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})),ZL=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL();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`)}})),QL=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=YL(),n=XL(),r=ZL();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])}})),Mde=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=QL(),n=YL(),r=ZL(),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)}})),$L=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})),eR=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})),tR=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=$L(),n=eR(),r=QL(),i=YL(),a=XL(),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
|
|
174
|
+
|| (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
|
|
175
|
+
|| (${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"
|
|
176
|
+
|| ${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}}})),Nde=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;var t=YL(),n=XL();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)}`)}})),nR=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=YL(),n=XL(),r=ZL(),i=XL();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})),Pde=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=YL(),n=ZL(),r=nR(),i=QL();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})),Fde=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=YL(),n=XL();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})),rR=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}})),Ide=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`)}})),iR=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=XL(),n=rR(),r=Ide(),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})),aR=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=Mde(),n=tR(),r=eR(),i=tR(),a=Nde(),o=Pde(),s=Fde(),c=YL(),l=ZL(),u=iR(),d=XL(),f=QL();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})),oR=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}}})),sR=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=iR();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))}}})),cR=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=YL(),n=oR(),r=ZL(),i=iR(),a=XL(),o=aR(),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}})),Lde=c({$id:()=>lR,additionalProperties:()=>!1,default:()=>mR,description:()=>uR,properties:()=>pR,required:()=>fR,type:()=>dR}),lR,uR,dR,fR,pR,mR,Rde=o((()=>{lR=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,uR=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,dR=`object`,fR=[`$data`],pR={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},mR={$id:lR,description:uR,type:dR,required:fR,properties:pR,additionalProperties:!1}})),hR=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}})),zde=s(((e,t)=>{var{isUUID:n}=hR(),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}})),Bde=s(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,escapePreservingEscapes:s,reescapeHostDelimiters:c,isIPv4:l,nonSimpleDomain:u}=hR(),{SCHEMES:d,getSchemeHandler:f}=zde();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})),Vde=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Bde();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),gR=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=aR();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=YL();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=oR(),i=sR(),a=$L(),o=cR(),s=YL(),c=iR(),l=tR(),u=XL(),f=(Rde(),d(Lde).default),p=Vde(),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]}}})),Hde=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),_R=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;var t=sR(),n=nR(),r=YL(),i=ZL(),a=cR(),o=XL(),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})),vR=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Hde(),n=_R();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),Ude=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL(),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})`)}}})),Wde=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL();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}))`)}}})),Gde=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`})),Kde=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL(),n=XL(),r=Gde();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}`)}}})),qde=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=nR(),n=XL(),r=YL();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})`)}}}})),Jde=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL();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}`)}}})),Yde=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=nR(),n=YL(),r=XL();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)}}}})),Xde=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL();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}`)}}})),yR=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=rR();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),Zde=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=tR(),n=YL(),r=XL(),i=yR();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)})))}}}})),Qde=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL(),n=XL(),r=yR();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}`)}}})),$de=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL(),n=XL(),r=yR();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}`}}}})),bR=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Ude(),n=Wde(),r=Kde(),i=qde(),a=Jde(),o=Yde(),s=Xde(),c=Zde(),l=Qde(),u=$de();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]})),xR=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;var t=YL(),n=XL(),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})),SR=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;var t=YL(),n=XL(),r=nR(),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})),efe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=SR();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),tfe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL(),n=XL(),r=nR(),i=xR();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)))}}})),nfe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL(),n=XL();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)))}}}})),CR=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=YL(),n=XL(),r=nR();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},
|
|
177
|
+
missingProperty: ${i},
|
|
178
|
+
depsCount: ${n},
|
|
179
|
+
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})),rfe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL(),n=XL();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)}}})),wR=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=nR(),n=YL(),r=ZL(),i=XL();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)}}}})),ife=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=aR(),n=nR(),r=XL(),i=wR();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)}}}})),afe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=nR(),n=YL(),r=XL(),i=XL();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())})})}}}})),ofe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=XL();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`}}})),sfe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:nR().validateUnion,error:{message:`must match a schema in anyOf`}}})),cfe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL(),n=XL();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)})})}}}})),lfe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=XL();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)})}}})),ufe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL(),n=XL(),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})),dfe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=XL();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`)}}})),TR=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=xR(),n=efe(),r=SR(),i=tfe(),a=nfe(),o=CR(),s=rfe(),c=wR(),l=ife(),u=afe(),d=ofe(),f=sfe(),p=cfe(),m=lfe(),h=ufe(),g=dfe();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=_})),ffe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL();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})`}}}}})),ER=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[ffe().default]})),DR=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`]})),pfe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=vR(),n=bR(),r=TR(),i=ER(),a=DR();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),mfe=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={}))})),OR=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL(),n=mfe(),r=cR(),i=sR(),a=XL();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}}}}})),hfe=c({$id:()=>AR,$schema:()=>kR,default:()=>FR,definitions:()=>MR,properties:()=>PR,title:()=>jR,type:()=>NR}),kR,AR,jR,MR,NR,PR,FR,gfe=o((()=>{kR=`http://json-schema.org/draft-07/schema#`,AR=`http://json-schema.org/draft-07/schema#`,jR=`Core schema meta-schema`,MR={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:[]}},NR=[`object`,`boolean`],PR={$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:`#`}},FR={$schema:kR,$id:AR,title:jR,definitions:MR,type:NR,properties:PR,default:!0}})),IR=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=gR(),r=pfe(),i=OR(),a=(gfe(),d(hfe).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=aR();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=YL();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=oR();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=sR();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})),_fe=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}}})),vfe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;var t=IR(),n=YL(),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)})),yfe=s(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});var n=_fe(),r=vfe(),i=YL(),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})),bfe=u(IR(),1),LR=u(yfe(),1),xfe={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},Sfe=/^(#?([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*\)))$/,Cfe=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function wfe(e,t,n={},r,i=bfe.default,a){let o=new i({...xfe,...n});return r?(0,LR.default)(o,r):r!==!1&&(0,LR.default)(o),o.addFormat(`data-url`,Cfe),o.addFormat(`color`,Sfe),o.addKeyword(uA),Array.isArray(e)&&o.addMetaSchema(e),lC(t)&&Object.keys(t).forEach(e=>{o.addFormat(e,t[e])}),a&&(o=a(o)),o}var Tfe=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=wfe(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 jde(this,a,e,t,n,r,i,this.suppressDuplicateFiltering)}handleSchemaUpdate(e){if(this.lastSeenRootSchema===e&&this.hasRegisteredRootSchema)return;let t=e.$id??dA;this.ajv.getSchema(t)===void 0?this.ajv.addSchema(e,t):kA(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=xP(e),i=r.$id??AN(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 RR(e={},t){return new Tfe(e,t)}RR();function Efe(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)(Ode,{...e,...i,fields:o,widgets:s,templates:c,ref:a})})}var Dfe=Object.defineProperty,zR=(e,t)=>Dfe(e,`name`,{value:t,configurable:!0});function BR(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}zR(BR,`setRef`);function VR(...e){return t=>{let n=!1,r=e.map(e=>{let r=BR(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():BR(e[t],null)}}}}zR(VR,`composeRefs`);function HR(...e){return b.useCallback(VR(...e),e)}zR(HR,`useComposedRefs`);var Ofe=Object.defineProperty,UR=(e,t)=>Ofe(e,`name`,{value:t,configurable:!0}),kfe=UR(((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]=WR(a,i))}return{...e,...n}}),`mergeProps`);function WR(...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}UR(WR,`concatAriaDescribedby`);var GR=b.createContext(kfe);GR.displayName=`SlotContext`;function KR(e){let t=b.forwardRef((t,n)=>{let r=b.useContext(GR),{children:i,mergeProps:a=r,...o}=t,s=null,c=!1,l=[];QR(i)&&typeof ez==`function`&&(i=ez(i._payload)),b.Children.forEach(i,e=>{if(ZR(e)){c=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;QR(n)&&typeof ez==`function`&&(n=ez(n._payload)),s=Afe(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?XR(s):void 0,d=HR(n,u);if(!s){if(i||i===0)throw Error(c?Nfe(e):Mfe(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}UR(KR,`createSlot`);var qR=KR(`Slot`),JR=Symbol.for(`radix.slottable`);function YR(e){let t=UR(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=JR,t}UR(YR,`createSlottable`);var Afe=UR((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 XR(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)}UR(XR,`getElementRef`);function ZR(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===JR}UR(ZR,`isSlottable`);var jfe=Symbol.for(`react.lazy`);function QR(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===jfe&&`_payload`in e&&$R(e._payload)}UR(QR,`isLazyComponent`);function $R(e){return typeof e==`object`&&!!e&&`then`in e}UR($R,`isPromiseLike`);var Mfe=UR(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Nfe=UR(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),ez=b.use;function tz(...e){return jr(nn(e))}var Pfe=Fi(`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 nz({className:e,variant:t,size:n,asChild:r=!1,...i}){return(0,H.jsx)(r?qR:`button`,{"data-slot":`button`,className:tz(Pfe({variant:t,size:n,className:e})),...i})}function Ffe({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)(nz,{...r,className:tz(`w-fit gap-2`,n),variant:`outline`,type:`button`,children:[(0,H.jsx)(Zr,{size:16}),` `,i(SP.AddItemButton)]})})}function Ife(e){let{children:t,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:a,uiSchema:o,registry:s}=e,c=bN(`ArrayFieldItemButtonsTemplate`,s,mA(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 Lfe(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=mA(i),m=bN(`ArrayFieldDescriptionTemplate`,l,p),h=bN(`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:BN(r,`add`),className:`rjsf-array-item-add`,onClick:s,disabled:n||c,uiSchema:i,registry:l})})]},`array-item-list-${r.$id}`)]})})})}function rz({className:e,type:t,...n}){return(0,H.jsx)(`input`,{type:t,"data-slot":`input`,className:tz(`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 Rfe({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={..._,...gN(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)(rz,{id:e,name:t||e,type:o,placeholder:n,autoFocus:f,required:r,disabled:a,readOnly:i,className:tz({"border-destructive focus-visible:ring-0":h.length>0},v),list:m.examples?FN(e):void 0,...S,value:s||s===0?s:``,onChange:l||C,onBlur:w,onFocus:T,"aria-describedby":RN(e,!!m.examples)}),p.allowClearTextInputs&&!i&&!a&&s&&(0,H.jsx)(x,{onClick:E,registry:y}),g,(0,H.jsx)(RL,{id:e,schema:m})]})}var zfe=Fi(`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 iz({className:e,variant:t,...n}){return(0,H.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:tz(zfe({variant:t}),e),...n})}function Bfe({className:e,...t}){return(0,H.jsx)(`div`,{"data-slot":`alert-title`,className:tz(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function az({className:e,...t}){return(0,H.jsx)(`div`,{"data-slot":`alert-description`,className:tz(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,e),...t})}function Vfe(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)(iz,{variant:`default`,className:`mb-2`,children:[(0,H.jsx)(Xr,{className:`h-4 w-4`}),(0,H.jsx)(az,{children:a(SP.CycleDetected,[t])})]}),(0,H.jsx)(nz,{id:o,type:`button`,variant:`outline`,size:`sm`,className:tz(`my-1`),onClick:()=>i(n.$id),children:a(SP.ExpandButton)})]})}function Hfe({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)(VL,{description:t,registry:n,uiSchema:r})})}):null}function Ufe({errors:e,registry:t}){let{translateString:n}=t;return(0,H.jsxs)(iz,{variant:`destructive`,className:`mb-2`,children:[(0,H.jsx)(Xr,{className:`h-4 w-4`}),(0,H.jsx)(Bfe,{children:n(SP.ErrorsLabel)}),(0,H.jsx)(az,{className:`flex flex-col gap-1`,children:e.map((e,t)=>(0,H.jsxs)(`span`,{children:[`• `,e.stack]},t))})]})}function Wfe(e){let{errors:t=[],fieldPathId:n}=e;return t.length===0?null:(0,H.jsx)(`div`,{className:`flex flex-col gap-1`,id:PN(n),children:t.map((e,t)=>(0,H.jsx)(`span`,{className:`text-xs font-medium text-destructive mb-1`,children:e},t))})}function Gfe(e){let{fieldPathId:t,help:n,uiSchema:r,registry:i,hasErrors:a}=e;return n?(0,H.jsx)(`span`,{className:tz(`text-xs font-medium text-muted-foreground`,{"text-destructive":a}),id:IN(t),children:(0,H.jsx)(UL,{help:n,registry:i,uiSchema:r})}):null}function Kfe({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=mA(y),S=bN(`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:tz(`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:tz(`text-xs font-medium text-muted-foreground`,{" text-destructive":r.length>0}),children:o}),i,a]})})}function qfe(e){let{children:t,column:n,className:r,...i}=e;return(0,H.jsx)(`div`,{className:tz(`grid gap-2`,r),...i,children:t})}function Jfe(e){let{icon:t,iconType:n,className:r,uiSchema:i,registry:a,...o}=e;return(0,H.jsx)(nz,{size:`icon`,variant:`outline`,className:r,...o,type:`button`,children:t})}var oz=(0,b.memo)(Jfe);function Yfe(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(oz,{title:t(SP.CopyButton),...e,icon:(0,H.jsx)(ti,{className:`h-4 w-4`})})}var Xfe=(0,b.memo)(Yfe);function Zfe(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(oz,{title:t(SP.MoveDownButton),...e,icon:(0,H.jsx)(qr,{className:`h-4 w-4`})})}var Qfe=(0,b.memo)(Zfe);function $fe(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(oz,{title:t(SP.MoveUpButton),...e,icon:(0,H.jsx)(Yr,{className:`h-4 w-4`})})}var epe=(0,b.memo)($fe);function tpe(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(oz,{title:t(SP.RemoveButton),...e,className:`border-destructive`,icon:(0,H.jsx)(ki,{className:`h-4 w-4 stroke-destructive`})})}var sz=(0,b.memo)(tpe);function npe(e){let{registry:{translateString:t}}=e;return(0,H.jsx)(oz,{title:t(SP.ClearButton),...e,icon:(0,H.jsx)(Mi,{})})}var rpe=(0,b.memo)(npe);function ipe({selector:e,optionSchemaField:t}){return(0,H.jsxs)(`div`,{className:tz(`p-4 border rounded-md bg-background shadow-sm`),children:[(0,H.jsx)(`div`,{className:tz(`mb-4`),children:e}),t]})}function ape({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=mA(i),m=bN(`TitleFieldTemplate`,f,p),h=bN(`DescriptionFieldTemplate`,f,p),g=!d&&!u,{ButtonTemplates:{AddButton:_}}=f.templates;return(0,H.jsxs)(H.Fragment,{children:[t&&(0,H.jsx)(m,{id:LN(a),title:t,required:r,schema:o,uiSchema:i,registry:f,optionalDataControl:g?c:void 0}),e&&(0,H.jsx)(h,{id:NN(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)),hA(o,i,s)?(0,H.jsx)(`div`,{className:`mt-2 flex justify-end`,children:(0,H.jsx)(_,{id:BN(a,`add`),onClick:l,disabled:u||d,className:`rjsf-object-property-expand`,uiSchema:i,registry:f})}):null]})]})}function ope(e){let{id:t,registry:n,label:r,onAddClick:i,onRemoveClick:a}=e;return i?(0,H.jsx)(oz,{id:t,registry:n,className:`rjsf-add-optional-data`,onClick:i,title:r,icon:(0,H.jsx)(Zr,{}),size:`xs`}):a?(0,H.jsx)(sz,{id:t,registry:n,className:`rjsf-remove-optional-data`,onClick:a,title:r,size:`xs`}):(0,H.jsx)(`em`,{id:t,children:r})}function spe(e){let{submitText:t,norender:n,props:r}=yN(e.uiSchema);return n?null:(0,H.jsx)(`div`,{children:(0,H.jsx)(nz,{type:`submit`,...r,className:tz(`my-2`,r?.className),children:t})})}var cpe=`Separator`,cz=`horizontal`,lpe=[`horizontal`,`vertical`],lz=b.forwardRef((e,t)=>{let{decorative:n,orientation:r=cz,...i}=e,a=upe(r)?r:cz,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,H.jsx)(mD.div,{"data-orientation":a,...o,...i,ref:t})});lz.displayName=cpe;function upe(e){return lpe.includes(e)}var uz=lz;function dz({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,H.jsx)(uz,{"data-slot":`separator`,decorative:n,orientation:t,className:tz(`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 dpe({id:e,title:t,uiSchema:n,optionalDataControl:r}){let i=(0,H.jsx)(`h5`,{children:mA(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)(dz,{dir:`horizontal`,style:{height:`1px`},className:`my-1`})]})}function fpe({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(SP.KeyLabel,[a]);if(!(qk 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)(rz,{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:BN(i,`remove`),iconType:`block`,className:`rjsf-object-property-remove w-full`,disabled:r||u,onClick:s,uiSchema:p,registry:m})})]}),(0,H.jsx)(dz,{dir:`horizontal`,className:`mt-2`})]})}function ppe(){return{ArrayFieldItemTemplate:Ife,ArrayFieldTemplate:Lfe,BaseInputTemplate:Rfe,CyclicSchemaExpandTemplate:Vfe,ButtonTemplates:{AddButton:Ffe,CopyButton:Xfe,MoveDownButton:Qfe,MoveUpButton:epe,RemoveButton:sz,SubmitButton:spe,ClearButton:rpe},DescriptionFieldTemplate:Hfe,ErrorListTemplate:Ufe,FieldErrorTemplate:Wfe,FieldHelpTemplate:Gfe,FieldTemplate:Kfe,GridTemplate:qfe,MultiSchemaFieldTemplate:ipe,ObjectFieldTemplate:ape,OptionalDataControlsTemplate:ope,TitleFieldTemplate:dpe,WrapIfAdditionalTemplate:fpe}}function fz(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,mpe(i,...t)]}function mpe(...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 pz(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var mz=b.useInsertionEffect||tD;function hz({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=gz({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=_z(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function gz({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return mz(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function _z(e){return typeof e==`function`}function vz(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 yz(e){let[t,n]=b.useState(void 0);return tD(()=>{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 bz(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var xz=e=>{let{present:t,children:n}=e,r=Sz(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=wz(r.ref,Ez(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};xz.displayName=`Presence`;function Sz(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=bz(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=Tz(r.current);a.current=o===`mounted`?e:`none`},[o]),tD(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Tz(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),tD(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Tz(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=Tz(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 Cz(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function wz(...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=Cz(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():Cz(n[e],null)}}},[])}function Tz(e){return e?.animationName||`none`}function Ez(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 Dz=`Checkbox`,[Oz,hpe]=fz(Dz),[kz,Az]=Oz(Dz);function jz(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]=hz({prop:n,defaultProp:i??!1,onChange:c,caller:Dz}),[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:!Bz(i)&&i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,H.jsx)(kz,{scope:t,...x,children:zz(d)?d(x):r})}var Mz=`CheckboxTrigger`,Nz=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}=Az(Mz,e),h=Ri(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)(mD.button,{type:`button`,role:`checkbox`,"aria-checked":Bz(c)?`mixed`:c,"aria-required":l,"data-state":Vz(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:pz(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:pz(n,e=>{d(e=>Bz(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});Nz.displayName=Mz;var Pz=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)(jz,{__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)(Nz,{...d,ref:t,__scopeCheckbox:n}),e&&(0,H.jsx)(Rz,{__scopeCheckbox:n})]})})});Pz.displayName=Dz;var Fz=`CheckboxIndicator`,Iz=b.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=Az(Fz,n);return(0,H.jsx)(xz,{present:r||Bz(a.checked)||a.checked===!0,children:(0,H.jsx)(mD.span,{"data-state":Vz(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});Iz.displayName=Fz;var Lz=`CheckboxBubbleInput`,Rz=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}=Az(Lz,e),m=Ri(n,p),h=vz(a),g=yz(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=Bz(a),n.call(e,!Bz(a)&&a),e.dispatchEvent(t)}},[f,h,a,i]);let _=b.useRef(!Bz(a)&&a);return(0,H.jsx)(mD.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%)`}})});Rz.displayName=Lz;function zz(e){return typeof e==`function`}function Bz(e){return e===`indeterminate`}function Vz(e){return Bz(e)?`indeterminate`:e?`checked`:`unchecked`}function Hz(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 Uz=[`color`],Wz=(0,b.forwardRef)(function(e,t){var n=e.color,r=n===void 0?`currentColor`:n,i=Hz(e,Uz);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 Gz({className:e,...t}){return(0,H.jsx)(Pz,{"data-slot":`checkbox`,className:tz(`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)(Iz,{"data-slot":`checkbox-indicator`,className:`flex items-center justify-center text-current transition-none`,children:(0,H.jsx)(Wz,{className:`size-3.5`})})})}var Kz=`Label`,qz=b.forwardRef((e,t)=>(0,H.jsx)(mD.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));qz.displayName=Kz;var Jz=qz;function Yz({className:e,...t}){return(0,H.jsx)(Jz,{"data-slot":`label`,className:tz(`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 Xz({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=_N(r),_=Array.isArray(i)?i:[i],v=({target:t})=>l(e,uN(t?.value,f,g,h)),y=({target:t})=>u(e,uN(t?.value,f,g,h));return(0,H.jsx)(`div`,{className:tz({"flex flex-col gap-2":!m,"flex flex-row gap-4 flex-wrap":m}),children:Array.isArray(f)&&f.map((r,i)=>{let l=aN(r.value,_),u=Array.isArray(p)&&p.includes(r.value),m=zN(e,i);return(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(Gz,{id:m,name:t||e,required:s,disabled:n||u||o,onCheckedChange:e=>{c(e?cN(i,_,f):iN(i,_,f))},className:d,checked:l,autoFocus:a&&i===0,onBlur:v,onFocus:y,"aria-describedby":RN(e)}),(0,H.jsx)(Yz,{className:`leading-tight`,htmlFor:zN(e,i),children:r.label})]},m)})})}function Zz(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,_=ZN(c),v=bN(`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":RN(t),children:[!s&&S&&(0,H.jsx)(v,{id:NN(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)(Gz,{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)(Yz,{className:`leading-tight`,htmlFor:t,children:WN(o,s||!o)})]})]})}function Qz(e){let t=e+`CollectionProvider`,[n,r]=fz(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=zi(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Ri(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=zi(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=Ri(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 $z=b.createContext(void 0);function eB(e){let t=b.useContext($z);return e||t||`ltr`}var tB=`rovingFocusGroup.onEntryFocus`,nB={bubbles:!1,cancelable:!0},rB=`RovingFocusGroup`,[iB,aB,oB]=Qz(rB),[sB,cB]=fz(rB,[oB]),[lB,uB]=sB(rB),dB=b.forwardRef((e,t)=>(0,H.jsx)(iB.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(iB.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(fB,{...e,ref:t})})}));dB.displayName=rB;var fB=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=Ri(t,f),m=eB(a),[h,g]=hz({prop:o,defaultProp:s??null,onChange:c,caller:rB}),[_,v]=b.useState(!1),y=gD(l),x=aB(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(tB,y),()=>e.removeEventListener(tB,y)},[y]),(0,H.jsx)(lB,{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)(mD.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:pz(e.onMouseDown,()=>{S.current=!0}),onFocus:pz(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(tB,nB);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);vB([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:pz(e.onBlur,()=>v(!1))})})}),pB=`RovingFocusGroupItem`,mB=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=nD(),l=a||c,u=uB(pB,n),d=u.currentTabStopId===l,f=aB(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return b.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,H.jsx)(iB.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,H.jsx)(mD.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:pz(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:pz(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:pz(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=_B(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?yB(n,r+1):n.slice(r+1)}setTimeout(()=>vB(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});mB.displayName=pB;var hB={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function gB(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function _B(e,t,n){let r=gB(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return hB[r]}function vB(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function yB(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bB=dB,xB=mB,SB=`Radio`,[CB,wB]=fz(SB),[TB,EB]=CB(SB);function DB(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)(TB,{scope:t,...h,children:FB(u)?u(h):r})}var OB=`RadioTrigger`,kB=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}=EB(OB,e),f=Ri(r,s);return(0,H.jsx)(mD.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":IB(i),"data-disabled":a?``:void 0,disabled:a,value:o,...n,ref:f,onClick:pz(t,e=>{i||c(),d&&u&&(l.current=e.isPropagationStopped(),l.current||e.stopPropagation())})})});kB.displayName=OB;var AB=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)(DB,{__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)(kB,{...u,ref:t,__scopeRadio:n}),e&&(0,H.jsx)(PB,{__scopeRadio:n})]})})});AB.displayName=SB;var jB=`RadioIndicator`,MB=b.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=EB(jB,n);return(0,H.jsx)(xz,{present:r||a.checked,children:(0,H.jsx)(mD.span,{"data-state":IB(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})});MB.displayName=jB;var NB=`RadioBubbleInput`,PB=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}=EB(NB,e),p=Ri(n,d),m=vz(i),h=yz(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)(mD.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%)`}})});PB.displayName=NB;function FB(e){return typeof e==`function`}function IB(e){return e?`checked`:`unchecked`}var LB=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],RB=`RadioGroup`,[zB,gpe]=fz(RB,[cB,wB]),BB=cB(),VB=wB(),[HB,UB]=zB(RB),WB=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=BB(n),m=eB(l),[h,g]=hz({prop:a,defaultProp:i??null,onChange:d,caller:RB});return(0,H.jsx)(HB,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,H.jsx)(bB,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,H.jsx)(mD.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});WB.displayName=RB;var GB=`RadioGroupItem`,KB=`RadioGroupItemProvider`,qB=`RadioGroupItemTrigger`,JB=`RadioGroupItemBubbleInput`;function YB(e){let{__scopeRadioGroup:t,value:n,disabled:r,children:i,internal_do_not_use_render:a}=e,o=UB(KB,t),s=VB(t),c=o.disabled||r;return(0,H.jsx)(DB,{...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 XB=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e,i=BB(n),a=VB(n),{checked:o,disabled:s}=EB(qB,a.__scopeRadio),c=b.useRef(null),l=Ri(t,c),u=b.useRef(!1);return b.useEffect(()=>{let e=e=>{LB.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)(xB,{asChild:!0,...i,focusable:!s,active:o,children:(0,H.jsx)(kB,{...a,...r,ref:l,onKeyDown:pz(r.onKeyDown,e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:pz(r.onFocus,()=>{u.current&&c.current?.click()})})})});XB.displayName=qB;var ZB=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,value:r,disabled:i,...a}=e;return(0,H.jsx)(YB,{__scopeRadioGroup:n,value:r,disabled:i,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(XB,{...a,ref:t,__scopeRadioGroup:n}),e&&(0,H.jsx)(QB,{__scopeRadioGroup:n})]})})});ZB.displayName=GB;var QB=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,H.jsx)(PB,{...VB(n),...r,ref:t})});QB.displayName=JB;var $B=`RadioGroupIndicator`,eV=b.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,H.jsx)(MB,{...VB(n),...r,ref:t})});eV.displayName=$B;function tV({className:e,...t}){return(0,H.jsx)(WB,{"data-slot":`radio-group`,className:tz(`grid gap-3`,e),...t})}function nV({className:e,...t}){return(0,H.jsx)(ZB,{"data-slot":`radio-group-item`,className:tz(`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)(eV,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center`,children:(0,H.jsx)(Qr,{className:`fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2`})})})}function rV({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=_N(t),m=e=>o(uN(e,u,p,f)),h=({target:t})=>s(e,uN(t?.value,u,p,f)),g=({target:t})=>c(e,uN(t?.value,u,p,f)),_=!!t?.inline;return(0,H.jsx)(`div`,{className:`mb-0`,children:(0,H.jsx)(tV,{defaultValue:n?.toString(),required:r,disabled:i||a,onValueChange:e=>{m(e)},onBlur:h,onFocus:g,"aria-describedby":RN(e),orientation:_?`horizontal`:`vertical`,className:tz(`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)(nV,{checked:aN(t.value,n),value:dN(t.value,r,p),id:zN(e,r),disabled:i}),(0,H.jsx)(Yz,{className:`leading-tight`,htmlFor:zN(e,r),children:t.label})]},zN(e,r))})})})}function iV(e,[t,n]){return Math.min(n,Math.max(t,e))}typeof window<`u`&&window.document&&window.document.createElement;function aV(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function oV(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function sV(...e){return t=>{let n=!1,r=e.map(e=>{let r=oV(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():oV(e[t],null)}}}}function cV(...e){return b.useCallback(sV(...e),e)}function lV(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 uV(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,dV(i,...t)]}function dV(...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 fV=globalThis?.document?b.useLayoutEffect:()=>{},pV=b.useInsertionEffect||fV;function mV({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=hV({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=gV(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function hV({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return pV(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function gV(e){return typeof e==`function`}var _V=b.createContext(void 0);function vV(e){let t=b.useContext(_V);return e||t||`ltr`}function yV(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 bV(e){let[t,n]=b.useState(void 0);return fV(()=>{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 xV(e){let t=SV(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e,a=b.Children.toArray(r),o=a.find(wV);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 SV(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(b.isValidElement(n)){let e=EV(n),i=TV(r,n.props);return n.type!==b.Fragment&&(i.ref=t?sV(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 CV=Symbol(`radix.slottable`);function wV(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===CV}function TV(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 EV(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 DV=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=xV(`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 OV(e,t){e&&PS.flushSync(()=>e.dispatchEvent(t))}function kV(e){let t=e+`CollectionProvider`,[n,r]=uV(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=xV(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=cV(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=xV(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=cV(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 AV=[`PageUp`,`PageDown`],jV=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],MV={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},NV=`Slider`,[PV,FV,IV]=kV(NV),[LV,_pe]=uV(NV,[IV]),[RV,zV]=LV(NV),BV=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`?UV:WV,[y=[],x]=mV({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus(),d(e)}}),S=b.useRef(y);function C(e){E(e,iH(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=lH(a),s=iV(uH(Math.round((e-r)/a)*a+r,o),[r,i]);x((e=[])=>{let r=tH(e,s,t);if(sH(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)(RV,{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)(PV.Provider,{scope:e.__scopeSlider,children:(0,H.jsx)(PV.Slot,{scope:e.__scopeSlider,children:(0,H.jsx)(v,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:aV(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=AV.includes(e.key)||e.shiftKey&&jV.includes(e.key)?10:1,r=_.current,i=y[r];E(i+a*n*t,r,{commit:!0})}}})})})})});BV.displayName=NV;var[VV,HV]=LV(NV,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),UV=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=cV(t,e=>f(e)),m=b.useRef(void 0),h=vV(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=cH([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,H.jsx)(VV,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,H.jsx)(GV,{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=MV[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),WV=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=cV(t,u),f=b.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=cH([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,H.jsx)(VV,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,H.jsx)(GV,{"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=MV[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),GV=b.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=zV(NV,n);return(0,H.jsx)(DV.span,{...l,ref:t,onKeyDown:aV(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):AV.concat(jV).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:aV(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)}),onPointerMove:aV(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:aV(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),KV=`SliderTrack`,qV=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=zV(KV,n);return(0,H.jsx)(DV.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});qV.displayName=KV;var JV=`SliderRange`,YV=b.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=zV(JV,n),a=HV(JV,n),o=cV(t,b.useRef(null)),s=i.values.length,c=i.values.map(e=>nH(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,H.jsx)(DV.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});YV.displayName=JV;var XV=`SliderThumb`,ZV=b.forwardRef((e,t)=>{let n=FV(e.__scopeSlider),[r,i]=b.useState(null),a=cV(t,e=>i(e)),o=b.useMemo(()=>r?n().findIndex(e=>e.ref.current===r):-1,[n,r]);return(0,H.jsx)(QV,{...e,ref:a,index:o})}),QV=b.forwardRef((e,t)=>{let{__scopeSlider:n,index:r,name:i,...a}=e,o=zV(XV,n),s=HV(XV,n),[c,l]=b.useState(null),u=cV(t,e=>l(e)),d=!c||o.form||!!c.closest(`form`),f=bV(c),p=o.values[r],m=p===void 0?0:nH(p,o.min,o.max),h=rH(r,o.values.length),g=f?.[s.size],_=g?aH(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)(PV.ItemSlot,{scope:e.__scopeSlider,children:(0,H.jsx)(DV.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:aV(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),d&&(0,H.jsx)(eH,{name:i??(o.name?o.name+(o.values.length>1?`[]`:``):void 0),form:o.form,value:p},r)]})});ZV.displayName=XV;var $V=`RadioBubbleInput`,eH=b.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{let i=b.useRef(null),a=cV(i,r),o=yV(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)(DV.input,{style:{display:`none`},...n,ref:a,defaultValue:t})});eH.displayName=$V;function tH(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function nH(e,t,n){return iV(100/(n-t)*(e-t),[0,100])}function rH(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function iH(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 aH(e,t,n){let r=e/2;return(r-cH([0,50],[0,r])(t)*n)*n}function oH(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function sH(e,t){if(t>0){let n=oH(e);return Math.min(...n)>=t}return!0}function cH(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 lH(e){return(String(e).split(`.`)[1]||``).length}function uH(e,t){let n=10**t;return Math.round(e*n)/n}var dH=BV,fH=qV,pH=YV,mH=ZV;function hH({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)(dH,{"data-slot":`slider`,defaultValue:t,value:n,min:r,max:i,className:tz(`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)(fH,{"data-slot":`slider-track`,className:tz(`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)(pH,{"data-slot":`slider-range`,className:tz(`bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full`)})}),Array.from({length:o.length},(e,t)=>(0,H.jsx)(mH,{"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 gH=[`name`,`min`,`max`,`step`,`orientation`,`disabled`,`defaultValue`,`value`,`onValueChange`,`className`,`dir`,`inverted`,`minStepsBetweenThumbs`];function _H({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,...hN(i)},u={id:s,...hE(r.props||{},gH)};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(hH,{disabled:n||t,min:l.min,max:l.max,step:l.step,value:[e],onValueChange:c,...u,"aria-describedby":RN(s)}),e]})}var vH=1,yH=.9,bH=.8,xH=.17,SH=.1,CH=.999,wH=.9999,TH=.99,EH=/[\\\/_+.#"@\[\(\{&]/,DH=/[\\\/_+.#"@\[\(\{&]/g,OH=/[\s-]/,kH=/[\s-]/g;function AH(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?vH:TH;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=AH(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=vH:EH.test(e.charAt(l-1))?(d*=bH,p=e.slice(i,l-1).match(DH),p&&i>0&&(d*=CH**+p.length)):OH.test(e.charAt(l-1))?(d*=yH,m=e.slice(i,l-1).match(kH),m&&i>0&&(d*=CH**+m.length)):(d*=xH,i>0&&(d*=CH**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=wH)),(d<SH&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=AH(e,t,n,r,l+1,a+2,o),f*SH>d&&(d=f*SH)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function jH(e){return e.toLowerCase().replace(kH,` `)}function MH(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,AH(e,t,jH(e),jH(t),0,0,{})}var NH=b.useId||(()=>void 0),PH=0;function FH(e){let[t,n]=b.useState(NH());return fV(()=>{e||n(e=>e??String(PH++))},[e]),e||(t?`radix-${t}`:``)}function IH(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...e)=>t.current?.(...e),[])}function LH(e,t=globalThis?.document){let n=IH(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 RH=`DismissableLayer`,zH=`dismissableLayer.update`,BH=`dismissableLayer.pointerDownOutside`,VH=`dismissableLayer.focusOutside`,HH,UH=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),WH=b.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=b.useContext(UH),[u,d]=b.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=b.useState({}),m=cV(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=qH(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=JH(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return LH(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&&(HH=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),YH(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=HH)}},[u,f,n,l]),b.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),YH())},[u,l]),b.useEffect(()=>{let e=()=>p({});return document.addEventListener(zH,e),()=>document.removeEventListener(zH,e)},[]),(0,H.jsx)(DV.div,{...c,ref:m,style:{pointerEvents:y?x?`auto`:`none`:void 0,...e.style},onFocusCapture:aV(e.onFocusCapture,C.onFocusCapture),onBlurCapture:aV(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:aV(e.onPointerDownCapture,S.onPointerDownCapture)})});WH.displayName=RH;var GH=`DismissableLayerBranch`,KH=b.forwardRef((e,t)=>{let n=b.useContext(UH),r=b.useRef(null),i=cV(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)(DV.div,{...e,ref:i})});KH.displayName=GH;function qH(e,t=globalThis?.document){let n=IH(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){XH(BH,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 JH(e,t=globalThis?.document){let n=IH(e),r=b.useRef(!1);return b.useEffect(()=>{let e=e=>{e.target&&!r.current&&XH(VH,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 YH(){let e=new CustomEvent(zH);document.dispatchEvent(e)}function XH(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?OV(i,a):i.dispatchEvent(a)}var ZH=`focusScope.autoFocusOnMount`,QH=`focusScope.autoFocusOnUnmount`,$H={bubbles:!1,cancelable:!0},eU=`FocusScope`,tU=b.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=IH(i),u=IH(a),d=b.useRef(null),f=cV(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:cU(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||cU(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&cU(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){lU.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(ZH,$H);s.addEventListener(ZH,l),s.dispatchEvent(t),t.defaultPrevented||(nU(fU(iU(s)),{select:!0}),document.activeElement===e&&cU(s))}return()=>{s.removeEventListener(ZH,l),setTimeout(()=>{let t=new CustomEvent(QH,$H);s.addEventListener(QH,u),s.dispatchEvent(t),t.defaultPrevented||cU(e??document.body,{select:!0}),s.removeEventListener(QH,u),lU.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]=rU(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&cU(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&cU(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,H.jsx)(DV.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});tU.displayName=eU;function nU(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(cU(r,{select:t}),document.activeElement!==n)return}function rU(e){let t=iU(e);return[aU(t,e),aU(t.reverse(),e)]}function iU(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 aU(e,t){for(let n of e)if(!oU(n,{upTo:t}))return n}function oU(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 sU(e){return e instanceof HTMLInputElement&&`select`in e}function cU(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&sU(e)&&t&&e.select()}}var lU=uU();function uU(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=dU(e,t),e.unshift(t)},remove(t){e=dU(e,t),e[0]?.resume()}}}function dU(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function fU(e){return e.filter(e=>e.tagName!==`A`)}var pU=`Portal`,mU=b.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=b.useState(!1);fV(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?PS.createPortal((0,H.jsx)(DV.div,{...r,ref:t}),o):null});mU.displayName=pU;function hU(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var gU=e=>{let{present:t,children:n}=e,r=_U(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=cV(r.ref,yU(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};gU.displayName=`Presence`;function _U(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=hU(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=vU(r.current);a.current=o===`mounted`?e:`none`},[o]),fV(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=vU(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),fV(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=vU(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=vU(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 vU(e){return e?.animationName||`none`}function yU(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 bU=0;function xU(){b.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??SU()),document.body.insertAdjacentElement(`beforeend`,e[1]??SU()),bU++,()=>{bU===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),bU--}},[])}function SU(){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 CU=`Dialog`,[wU,vpe]=uV(CU),[TU,EU]=wU(CU),DU=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]=mV({prop:r,defaultProp:i??!1,onChange:a,caller:CU});return(0,H.jsx)(TU,{scope:t,triggerRef:s,contentRef:c,contentId:FH(),titleId:FH(),descriptionId:FH(),open:l,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};DU.displayName=CU;var OU=`DialogTrigger`,kU=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=EU(OU,n),a=cV(t,i.triggerRef);return(0,H.jsx)(DV.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":YU(i.open),...r,ref:a,onClick:aV(e.onClick,i.onOpenToggle)})});kU.displayName=OU;var AU=`DialogPortal`,[jU,MU]=wU(AU,{forceMount:void 0}),NU=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=EU(AU,t);return(0,H.jsx)(jU,{scope:t,forceMount:n,children:b.Children.map(r,e=>(0,H.jsx)(gU,{present:n||a.open,children:(0,H.jsx)(mU,{asChild:!0,container:i,children:e})}))})};NU.displayName=AU;var PU=`DialogOverlay`,FU=b.forwardRef((e,t)=>{let n=MU(PU,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=EU(PU,e.__scopeDialog);return a.modal?(0,H.jsx)(gU,{present:r||a.open,children:(0,H.jsx)(LU,{...i,ref:t})}):null});FU.displayName=PU;var IU=xV(`DialogOverlay.RemoveScroll`),LU=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=EU(PU,n);return(0,H.jsx)(sk,{as:IU,allowPinchZoom:!0,shards:[i.contentRef],children:(0,H.jsx)(DV.div,{"data-state":YU(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),RU=`DialogContent`,zU=b.forwardRef((e,t)=>{let n=MU(RU,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=EU(RU,e.__scopeDialog);return(0,H.jsx)(gU,{present:r||a.open,children:a.modal?(0,H.jsx)(BU,{...i,ref:t}):(0,H.jsx)(VU,{...i,ref:t})})});zU.displayName=RU;var BU=b.forwardRef((e,t)=>{let n=EU(RU,e.__scopeDialog),r=b.useRef(null),i=cV(t,n.contentRef,r);return b.useEffect(()=>{let e=r.current;if(e)return gk(e)},[]),(0,H.jsx)(HU,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:aV(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:aV(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:aV(e.onFocusOutside,e=>e.preventDefault())})}),VU=b.forwardRef((e,t)=>{let n=EU(RU,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return(0,H.jsx)(HU,{...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()}})}),HU=b.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=EU(RU,n),c=b.useRef(null),l=cV(t,c);return xU(),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(tU,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(WH,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":YU(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(QU,{titleId:s.titleId}),(0,H.jsx)(eW,{contentRef:c,descriptionId:s.descriptionId})]})]})}),UU=`DialogTitle`,WU=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=EU(UU,n);return(0,H.jsx)(DV.h2,{id:i.titleId,...r,ref:t})});WU.displayName=UU;var GU=`DialogDescription`,KU=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=EU(GU,n);return(0,H.jsx)(DV.p,{id:i.descriptionId,...r,ref:t})});KU.displayName=GU;var qU=`DialogClose`,JU=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=EU(qU,n);return(0,H.jsx)(DV.button,{type:`button`,...r,ref:t,onClick:aV(e.onClick,()=>i.onOpenChange(!1))})});JU.displayName=qU;function YU(e){return e?`open`:`closed`}var XU=`DialogTitleWarning`,[ype,ZU]=lV(XU,{contentName:RU,titleName:UU,docsSlug:`dialog`}),QU=({titleId:e})=>{let t=ZU(XU),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
180
|
+
|
|
181
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
182
|
+
|
|
183
|
+
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},$U=`DialogDescriptionWarning`,eW=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ZU($U).contentName}}.`;return b.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},tW=DU,nW=NU,rW=FU,iW=zU,aW=Symbol.for(`react.lazy`),oW=b.use;function sW(e){return typeof e==`object`&&!!e&&`then`in e}function cW(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===aW&&`_payload`in e&&sW(e._payload)}function lW(e){let t=uW(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e;cW(r)&&typeof oW==`function`&&(r=oW(r._payload));let a=b.Children.toArray(r),o=a.find(fW);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 uW(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(cW(n)&&typeof oW==`function`&&(n=oW(n._payload)),b.isValidElement(n)){let e=mW(n),i=pW(r,n.props);return n.type!==b.Fragment&&(i.ref=t?sV(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 dW=Symbol(`radix.slottable`);function fW(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===dW}function pW(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 mW(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 hW=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=lW(`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}},{}),gW=`[cmdk-group=""]`,_W=`[cmdk-group-items=""]`,vW=`[cmdk-group-heading=""]`,yW=`[cmdk-item=""]`,bW=`${yW}:not([aria-disabled="true"])`,xW=`cmdk-item-select`,SW=`data-value`,CW=(e,t,n)=>MH(e,t,n),wW=b.createContext(void 0),TW=()=>b.useContext(wW),EW=b.createContext(void 0),DW=()=>b.useContext(EW),OW=b.createContext(void 0),kW=b.forwardRef((e,t)=>{let n=UW(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=UW(()=>new Set),i=UW(()=>new Map),a=UW(()=>new Map),o=UW(()=>new Set),s=VW(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=FH(),y=FH(),x=FH(),S=b.useRef(null),C=KW();HW(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,w.emit()}},[u]),HW(()=>{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??CW;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(_W);t?t.appendChild(e.parentElement===t?e:e.closest(`${_W} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${_W} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${gW}[${SW}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function O(){let e=M().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(SW);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(gW)?.querySelector(vW))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function j(){return S.current?.querySelector(`${yW}[aria-selected="true"]`)}function M(){return Array.from(S.current?.querySelectorAll(bW)||[])}function N(e){let t=M()[e];t&&w.setState(`value`,t.getAttribute(SW))}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(SW))}function F(e){let t=j()?.closest(gW),n;for(;t&&!n;)t=e>0?zW(t,gW):BW(t,gW),n=t?.querySelector(bW);n?w.setState(`value`,n.getAttribute(SW)):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(hW.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(xW);t.dispatchEvent(e)}}}}},b.createElement(`label`,{"cmdk-label":``,htmlFor:T.inputId,id:T.labelId,style:YW},c),JW(e,e=>b.createElement(EW.Provider,{value:w},b.createElement(wW.Provider,{value:T},e))))}),AW=b.forwardRef((e,t)=>{let n=FH(),r=b.useRef(null),i=b.useContext(OW),a=TW(),o=VW(e),s=o.current?.forceMount??i?.forceMount;HW(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=GW(n,r,[e.value,e.children,r],e.keywords),l=DW(),u=WW(e=>e.value&&e.value===c.current),d=WW(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(xW,f),()=>t.removeEventListener(xW,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(hW.div,{ref:sV(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)}),jW=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=FH(),s=b.useRef(null),c=b.useRef(null),l=FH(),u=TW(),d=WW(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));HW(()=>u.group(o),[]),GW(o,s,[e.value,e.heading,c]);let f=b.useMemo(()=>({id:o,forceMount:i}),[i]);return b.createElement(hW.div,{ref:sV(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),JW(e,e=>b.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},b.createElement(OW.Provider,{value:f},e))))}),MW=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=b.useRef(null),a=WW(e=>!e.search);return!n&&!a?null:b.createElement(hW.div,{ref:sV(i,t),...r,"cmdk-separator":``,role:`separator`})}),NW=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=DW(),o=WW(e=>e.search),s=WW(e=>e.selectedItemId),c=TW();return b.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),b.createElement(hW.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)}})}),PW=b.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=b.useRef(null),o=b.useRef(null),s=WW(e=>e.selectedItemId),c=TW();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(hW.div,{ref:sV(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},JW(e,e=>b.createElement(`div`,{ref:sV(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),FW=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return b.createElement(tW,{open:n,onOpenChange:r},b.createElement(nW,{container:o},b.createElement(rW,{"cmdk-overlay":``,className:i}),b.createElement(iW,{"aria-label":e.label,"cmdk-dialog":``,className:a},b.createElement(kW,{ref:t,...s}))))}),IW=b.forwardRef((e,t)=>WW(e=>e.filtered.count===0)?b.createElement(hW.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),LW=b.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return b.createElement(hW.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},JW(e,e=>b.createElement(`div`,{"aria-hidden":!0},e)))}),RW=Object.assign(kW,{List:PW,Item:AW,Input:NW,Group:jW,Separator:MW,Dialog:FW,Empty:IW,Loading:LW});function zW(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function BW(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function VW(e){let t=b.useRef(e);return HW(()=>{t.current=e}),t}var HW=typeof window>`u`?b.useEffect:b.useLayoutEffect;function UW(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function WW(e){let t=DW(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function GW(e,t,n,r=[]){let i=b.useRef(),a=TW();return HW(()=>{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(SW,s),i.current=s}),i}var KW=()=>{let[e,t]=b.useState(),n=UW(()=>new Map);return HW(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function qW(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function JW({asChild:e,children:t},n){return e&&b.isValidElement(t)?b.cloneElement(qW(t),{ref:t.ref},n(t.props.children)):n(t)}var YW={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},XW=Fi(`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 ZW({className:e,variant:t,asChild:n=!1,...r}){return(0,H.jsx)(n?qR:`span`,{"data-slot":`badge`,className:tz(XW({variant:t}),e),...r})}var QW=(0,b.forwardRef)(({className:e,...t},n)=>(0,H.jsx)(RW,{ref:n,"data-slot":`command`,className:tz(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})),$W=(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)(Ci,{className:`mr-2 h-4 w-4 shrink-0 opacity-50`}),(0,H.jsx)(RW.Input,{ref:n,className:tz(`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})]}));$W.displayName=RW.Input.displayName;function eG({className:e,...t}){return(0,H.jsx)(RW.List,{"data-slot":`command-list`,className:tz(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function tG({className:e,...t}){return(0,H.jsx)(RW.Group,{"data-slot":`command-group`,className:tz(`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 nG({className:e,...t}){return(0,H.jsx)(RW.Item,{"data-slot":`command-item`,className:tz(`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 rG({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=>rE(e.value,t))),[t,n]),v=(0,b.useMemo)(()=>t.filter(e=>!_.some(t=>rE(t.value,e.value))),[t,_]),y=(0,b.useCallback)(e=>{if(a)return;let t=_.filter(t=>!rE(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)(QW,{onKeyDown:x,className:tz(`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:tz(`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)(ZW,{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)(Mi,{className:tz(`h-3 w-3 text-muted-foreground hover:text-foreground`,a&&`pointer-events-none`)})})]},e.value)),(0,H.jsx)(RW.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)(tG,{className:`h-full overflow-auto`,children:(0,H.jsx)(eG,{children:v.map(e=>(0,H.jsx)(nG,{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 iG({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)(QW,{ref:g,className:tz(`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:tz(`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:tz(`flex-1 line-clamp-1`,!m&&`text-muted-foreground`),children:m?.label||o}),(0,H.jsx)(qr,{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)(tG,{className:`h-full overflow-auto`,children:(0,H.jsx)(eG,{children:e.map(e=>(0,H.jsxs)(nG,{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:tz(`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)(Kr,{className:`h-4 w-4`})})]},e.value))})})}):null})]})}function aG({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=_N(t);KN(e,o,_,s);let x=()=>{d(e,uN(a,_,b,y))},S=()=>{u(e,uN(a,_,b,y))},C=_?.map(({value:e,label:t},n)=>({value:s?e:dN(e,n,b),label:t,index:n,disabled:Array.isArray(v)&&v.includes(e)})),w=tz({"border-destructive":p.length>0},m);return(0,H.jsxs)(`div`,{className:`p-0.5`,children:[s?(0,H.jsx)(rG,{id:e,autoFocus:c,disabled:r||i,multiple:!0,className:w,items:C,selected:a,onValueChange:e=>{l(uN(e.map(String),_,b,y))},onFocus:x,onBlur:S}):(0,H.jsx)(iG,{items:C,selected:sN(a,_,!1,b,``),onValueChange:e=>{l(uN(e,_,b,y))},autoFocus:c,disabled:r||i,required:n,placeholder:f,className:w,onFocus:x,onBlur:S,ariaDescribedby:RN(e)}),(0,H.jsx)(QN,{id:e,multiple:s,options:t,registry:h,uiSchema:g,value:a})]})}function oG({className:e,...t}){return(0,H.jsx)(`textarea`,{"data-slot":`textarea`,className:tz(`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 sG({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)(oG,{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":RN(e),className:f})})}function cG(){return{CheckboxWidget:Zz,CheckboxesWidget:Xz,RadioWidget:rV,RangeWidget:_H,SelectWidget:aG,TextareaWidget:sG}}function lG(){return{templates:ppe(),widgets:cG()}}lG();function uG(){return Efe(lG())}var dG=uG();function fG(...e){return jr(nn(e))}function pG(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=`
|
|
184
|
+
|
|
185
|
+
const waitForOpenAI = () => new Promise((resolve, reject) => {
|
|
186
|
+
if (typeof window === "undefined") { reject(new Error("window is not available")); return; }
|
|
187
|
+
if ("openai" in window && window.openai != null) { resolve(); return; }
|
|
188
|
+
Object.defineProperty(window, "openai", {
|
|
189
|
+
configurable: true,
|
|
190
|
+
enumerable: true,
|
|
191
|
+
get() { return undefined; },
|
|
192
|
+
set(value) {
|
|
193
|
+
Object.defineProperty(window, "openai", {
|
|
194
|
+
configurable: true,
|
|
195
|
+
enumerable: true,
|
|
196
|
+
writable: true,
|
|
197
|
+
value,
|
|
198
|
+
});
|
|
199
|
+
resolve();
|
|
200
|
+
},
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
await waitForOpenAI();
|
|
205
|
+
${n.textContent}
|
|
206
|
+
`,t.head.innerHTML+t.body.innerHTML}var mG=e=>typeof e==`string`?e:void 0,hG=(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=gG(o,n.body)+gG(o,n.documentElement);return Math.min(s+c,i)},gG=(e,t)=>{let{paddingBottom:n,borderBottomWidth:r,marginBottom:i}=e.getComputedStyle(t);return parseFloat(n)+parseFloat(r)+parseFloat(i)};function _G(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 vG={width:390,height:844};function yG({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:fG(`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)(zk,{open:r,onOpenChange:i,children:(0,H.jsx)(Bk,{size:`lg`,children:(0,H.jsxs)(Vk,{children:[(0,H.jsx)(Uk,{className:t?`font-mono`:`sr-only`,children:t??`Description`}),(0,H.jsx)(Wk,{className:`max-h-[60vh] overflow-y-auto whitespace-pre-wrap`,children:e})]})})})]})}var bG=[`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(` `),xG=[`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(` `),SG=[`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(` `),CG=`text-[10px] leading-snug text-muted-foreground/70`,wG=[`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 TG(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={...gN(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},b=Array.isArray(c.examples)?c.examples:[];return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`input`,{id:t,name:n,list:b.length>0?FN(t):void 0,toolparamdescription:c.description,className:bG,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}),b.length>0&&(0,H.jsx)(`datalist`,{id:FN(t),children:b.map(e=>(0,H.jsx)(`option`,{value:String(e)},String(e)))})]})}function EG(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:fG(`flex flex-col gap-1`,n),style:r,children:[_&&(0,H.jsxs)(`label`,{htmlFor:t,className:fG(`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)(yG,{text:o,title:i,className:CG}):null,c,l,u]})}function DG(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 OG(e){return e.description?(0,H.jsx)(`p`,{id:e.id,className:CG,children:e.description}):null}function kG(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 AG(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:fG(`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 jG(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:fG(wG,`self-start`),onClick:r,disabled:i||a,children:[(0,H.jsx)(bi,{className:`size-3`}),`add`]})]})}function MG(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:fG(wG,`mt-0.5 px-1`),onClick:o,disabled:s||c,"aria-label":`Remove item ${n}`,children:(0,H.jsx)(Mi,{className:`size-3`})})]})}function NG(e){let{icon:t,iconType:n,registry:r,uiSchema:i,...a}=e;return(0,H.jsxs)(`button`,{type:`button`,className:wG,...a,children:[(0,H.jsx)(bi,{className:`size-3`}),`add`]})}function PG(e){let{icon:t,iconType:n,registry:r,uiSchema:i,...a}=e;return(0,H.jsx)(`button`,{type:`button`,className:fG(wG,`px-1`),"aria-label":`Remove`,...a,children:(0,H.jsx)(Mi,{className:`size-3`})})}function FG(){return null}var IG={AddButton:NG,RemoveButton:PG,CopyButton:FG,MoveDownButton:FG,MoveUpButton:FG,ClearButton:FG},LG=[`top`,`right`,`bottom`,`left`],RG=Math.min,zG=Math.max,BG=Math.round,VG=Math.floor,HG=e=>({x:e,y:e}),UG={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function WG(e,t,n){return zG(e,RG(t,n))}function GG(e,t){return typeof e==`function`?e(t):e}function KG(e){return e.split(`-`)[0]}function qG(e){return e.split(`-`)[1]}function JG(e){return e===`x`?`y`:`x`}function YG(e){return e===`y`?`height`:`width`}function XG(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ZG(e){return JG(XG(e))}function QG(e,t,n){n===void 0&&(n=!1);let r=qG(e),i=ZG(e),a=YG(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=sK(o)),[o,sK(o)]}function $G(e){let t=sK(e);return[eK(e),t,eK(t)]}function eK(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var tK=[`left`,`right`],nK=[`right`,`left`],rK=[`top`,`bottom`],iK=[`bottom`,`top`];function aK(e,t,n){switch(e){case`top`:case`bottom`:return n?t?nK:tK:t?tK:nK;case`left`:case`right`:return t?rK:iK;default:return[]}}function oK(e,t,n,r){let i=qG(e),a=aK(KG(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(eK)))),a}function sK(e){let t=KG(e);return UG[t]+e.slice(t.length)}function cK(e){return{top:0,right:0,bottom:0,left:0,...e}}function lK(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:cK(e)}function uK(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 dK(e,t,n){let{reference:r,floating:i}=e,a=XG(t),o=ZG(t),s=YG(o),c=KG(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(qG(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 fK(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}=GG(t,e),p=lK(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=uK(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=uK(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 pK=50,mK=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:fK},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=dK(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<pK&&(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}=dK(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},hK=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}=GG(e,t)||{};if(l==null)return{};let d=lK(u),f={x:n,y:r},p=ZG(i),m=YG(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=RG(d[_],T),D=RG(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=WG(O,A,k),M=!c.arrow&&qG(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}}}),gK=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}=GG(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=KG(r),_=XG(o),v=KG(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[sK(o)]:$G(o)),x=p!==`none`;!d&&x&&b.push(...oK(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=QG(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`&&_!==XG(t))||T.every(e=>XG(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=XG(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 _K(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vK(e){return LG.some(t=>e[t]>=0)}var yK=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=GG(e,t);switch(i){case`referenceHidden`:{let e=_K(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:vK(e)}}}case`escaped`:{let e=_K(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:vK(e)}}}default:return{}}}}},bK=new Set([`left`,`top`]);async function xK(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=KG(n),s=qG(n),c=XG(n)===`y`,l=bK.has(o)?-1:1,u=a&&c?-1:1,d=GG(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 SK=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 xK(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}}}}},CK=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}=GG(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=XG(KG(i)),p=JG(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=WG(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=WG(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}}}}}},wK=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}=GG(e,t),u={x:n,y:r},d=XG(i),f=JG(d),p=u[f],m=u[d],h=GG(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=bK.has(KG(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}}}},TK=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}=GG(e,t),u=await o.detectOverflow(t,l),d=KG(i),f=qG(i),p=XG(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=RG(h-u[g],v),x=RG(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=zG(u.left,0),t=zG(u.right,0),n=zG(u.top,0),r=zG(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:zG(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:zG(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 EK(){return typeof window<`u`}function DK(e){return AK(e)?(e.nodeName||``).toLowerCase():`#document`}function OK(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kK(e){return((AK(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function AK(e){return EK()?e instanceof Node||e instanceof OK(e).Node:!1}function jK(e){return EK()?e instanceof Element||e instanceof OK(e).Element:!1}function MK(e){return EK()?e instanceof HTMLElement||e instanceof OK(e).HTMLElement:!1}function NK(e){return!EK()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof OK(e).ShadowRoot}function PK(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=GK(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function FK(e){return/^(table|td|th)$/.test(DK(e))}function IK(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var LK=/transform|translate|scale|rotate|perspective|filter/,RK=/paint|layout|strict|content/,zK=e=>!!e&&e!==`none`,BK;function VK(e){let t=jK(e)?GK(e):e;return zK(t.transform)||zK(t.translate)||zK(t.scale)||zK(t.rotate)||zK(t.perspective)||!UK()&&(zK(t.backdropFilter)||zK(t.filter))||LK.test(t.willChange||``)||RK.test(t.contain||``)}function HK(e){let t=qK(e);for(;MK(t)&&!WK(t);){if(VK(t))return t;if(IK(t))return null;t=qK(t)}return null}function UK(){return BK??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),BK}function WK(e){return/^(html|body|#document)$/.test(DK(e))}function GK(e){return OK(e).getComputedStyle(e)}function KK(e){return jK(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qK(e){if(DK(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||NK(e)&&e.host||kK(e);return NK(t)?t.host:t}function JK(e){let t=qK(e);return WK(t)?e.ownerDocument?e.ownerDocument.body:e.body:MK(t)&&PK(t)?t:JK(t)}function YK(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=JK(e),i=r===e.ownerDocument?.body,a=OK(r);if(i){let e=XK(a);return t.concat(a,a.visualViewport||[],PK(r)?r:[],e&&n?YK(e):[])}else return t.concat(r,YK(r,[],n))}function XK(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ZK(e){let t=GK(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=MK(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=BG(n)!==a||BG(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function QK(e){return jK(e)?e:e.contextElement}function $K(e){let t=QK(e);if(!MK(t))return HG(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ZK(t),o=(a?BG(n.width):n.width)/r,s=(a?BG(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var eq=HG(0);function tq(e){let t=OK(e);return!UK()||!t.visualViewport?eq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nq(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==OK(e)?!1:t}function rq(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=QK(e),o=HG(1);t&&(r?jK(r)&&(o=$K(r)):o=$K(e));let s=nq(a,n,r)?tq(a):HG(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=OK(a),t=r&&jK(r)?OK(r):r,n=e,i=XK(n);for(;i&&r&&t!==n;){let e=$K(i),t=i.getBoundingClientRect(),r=GK(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=OK(i),i=XK(n)}}return uK({width:u,height:d,x:c,y:l})}function iq(e,t){let n=KK(e).scrollLeft;return t?t.left+n:rq(kK(e)).left+n}function aq(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-iq(e,n),y:n.top+t.scrollTop}}function oq(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=kK(r),s=t?IK(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=HG(1),u=HG(0),d=MK(r);if((d||!d&&!a)&&((DK(r)!==`body`||PK(o))&&(c=KK(r)),d)){let e=rq(r);l=$K(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?aq(o,c):HG(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 sq(e){return Array.from(e.getClientRects())}function cq(e){let t=kK(e),n=KK(e),r=e.ownerDocument.body,i=zG(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=zG(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+iq(e),s=-n.scrollTop;return GK(r).direction===`rtl`&&(o+=zG(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var lq=25;function uq(e,t){let n=OK(e),r=kK(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=UK();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=iq(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<=lq&&(a-=o)}else l<=lq&&(a+=l);return{width:a,height:o,x:s,y:c}}function dq(e,t){let n=rq(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=MK(e)?$K(e):HG(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function fq(e,t,n){let r;if(t===`viewport`)r=uq(e,n);else if(t===`document`)r=cq(kK(e));else if(jK(t))r=dq(t,n);else{let n=tq(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return uK(r)}function pq(e,t){let n=qK(e);return n===t||!jK(n)||WK(n)?!1:GK(n).position===`fixed`||pq(n,t)}function mq(e,t){let n=t.get(e);if(n)return n;let r=YK(e,[],!1).filter(e=>jK(e)&&DK(e)!==`body`),i=null,a=GK(e).position===`fixed`,o=a?qK(e):e;for(;jK(o)&&!WK(o);){let t=GK(o),n=VK(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||PK(o)&&!n&&pq(e,o))?r=r.filter(e=>e!==o):i=t,o=qK(o)}return t.set(e,r),r}function hq(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?IK(t)?[]:mq(t,this._c):[].concat(n),r],o=fq(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=fq(t,a[e],i);s=zG(n.top,s),c=RG(n.right,c),l=RG(n.bottom,l),u=zG(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function gq(e){let{width:t,height:n}=ZK(e);return{width:t,height:n}}function _q(e,t,n){let r=MK(t),i=kK(t),a=n===`fixed`,o=rq(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=HG(0);function l(){c.x=iq(i)}if(r||!r&&!a)if((DK(t)!==`body`||PK(i))&&(s=KK(t)),r){let e=rq(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?aq(i,s):HG(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 vq(e){return GK(e).position===`static`}function yq(e,t){if(!MK(e)||GK(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return kK(e)===n&&(n=n.ownerDocument.body),n}function bq(e,t){let n=OK(e);if(IK(e))return n;if(!MK(e)){let t=qK(e);for(;t&&!WK(t);){if(jK(t)&&!vq(t))return t;t=qK(t)}return n}let r=yq(e,t);for(;r&&FK(r)&&vq(r);)r=yq(r,t);return r&&WK(r)&&vq(r)&&!VK(r)?n:r||HK(e)||n}var xq=async function(e){let t=this.getOffsetParent||bq,n=this.getDimensions,r=await n(e.floating);return{reference:_q(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Sq(e){return GK(e).direction===`rtl`}var Cq={convertOffsetParentRelativeRectToViewportRelativeRect:oq,getDocumentElement:kK,getClippingRect:hq,getOffsetParent:bq,getElementRects:xq,getClientRects:sq,getDimensions:gq,getScale:$K,isElement:jK,isRTL:Sq};function wq(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Tq(e,t){let n=null,r,i=kK(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=VG(d),h=VG(i.clientWidth-(u+f)),g=VG(i.clientHeight-(d+p)),_=VG(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:zG(0,RG(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&&!wq(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 Eq(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=QK(e),u=i||a?[...l?YK(l):[],...t?YK(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Tq(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?rq(e):null;c&&g();function g(){let t=rq(e);h&&!wq(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 Dq=SK,Oq=CK,kq=gK,Aq=TK,jq=yK,Mq=hK,Nq=wK,Pq=(e,t,n)=>{let r=new Map,i={platform:Cq,...n},a={...i.platform,_c:r};return mK(e,t,{...i,platform:a})},Fq=typeof document<`u`?b.useLayoutEffect:function(){};function Iq(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(!Iq(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)&&!Iq(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Lq(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rq(e,t){let n=Lq(e);return Math.round(t*n)/n}function zq(e){let t=b.useRef(e);return Fq(()=>{t.current=e}),t}function Bq(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);Iq(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=zq(c),O=zq(i),k=zq(l),A=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Pq(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Iq(T.current,t)&&(T.current=t,PS.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Fq(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=b.useRef(!1);Fq(()=>(j.current=!0,()=>{j.current=!1}),[]),Fq(()=>{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=Rq(N.floating,u.x),r=Rq(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Lq(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 Vq=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?{}:Mq({element:r.current,padding:i}).fn(n):r?Mq({element:r,padding:i}).fn(n):{}}}},Hq=(e,t)=>{let n=Dq(e);return{name:n.name,fn:n.fn,options:[e,t]}},Uq=(e,t)=>{let n=Oq(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wq=(e,t)=>({fn:Nq(e).fn,options:[e,t]}),Gq=(e,t)=>{let n=kq(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kq=(e,t)=>{let n=Aq(e);return{name:n.name,fn:n.fn,options:[e,t]}},qq=(e,t)=>{let n=jq(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jq=(e,t)=>{let n=Vq(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yq=Object.defineProperty,Xq=(e,t)=>Yq(e,`name`,{value:t,configurable:!0}),Zq=`Popper`,[Qq,$q]=eD(Zq),[eJ,tJ]=Qq(Zq),nJ=Xq(e=>{let{__scopePopper:t,children:n}=e,[r,i]=b.useState(null),[a,o]=b.useState(void 0);return(0,H.jsx)(eJ,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),rJ=`PopperAnchor`,iJ=b.forwardRef(Xq(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=tJ(rJ,n),o=b.useRef(null),s=a.onAnchorChange,c=Ri(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&&uJ(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,H.jsx)(mD.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),aJ=`PopperContent`,[oJ,bpe]=Qq(aJ),sJ=b.forwardRef(Xq(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=tJ(aJ,n),[_,v]=b.useState(null),y=Ri(t,v),[x,S]=b.useState(null),C=yz(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(cJ),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=Bq({strategy:`fixed`,placement:E,whileElementsMounted:Xq((...e)=>Eq(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[Hq({mainAxis:i+T,alignmentAxis:o}),c&&Uq({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Wq():void 0,...A}),c&&Gq({...A}),Kq({...A,apply:Xq(({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&&Jq({element:x,padding:s}),lJ({arrowWidth:w,arrowHeight:T}),f&&qq({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),I=g.setPlacementState;tD(()=>(I(N),()=>{I(void 0)}),[N,I]);let[L,ee]=uJ(N),te=gD(m);tD(()=>{P&&te?.()},[P,te]);let ne=F.arrow?.x,R=F.arrow?.y,z=F.arrow?.centerOffset!==0,[B,re]=b.useState();return tD(()=>{_&&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)(oJ,{scope:n,placedSide:L,placedAlign:ee,onArrowChange:S,arrowX:ne,arrowY:R,shouldHideArrow:z,children:(0,H.jsx)(mD.div,{"data-side":L,"data-align":ee,...h,ref:y,style:{...h.style,animation:P?h.style?.animation:`none`}})})})},`PopperContent`));function cJ(e){return e!==null}Xq(cJ,`isNotNull`);var lJ=Xq(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]=uJ(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 uJ(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Xq(uJ,`getSideAndAlignFromPlacement`);var dJ=nJ,fJ=iJ,pJ=sJ,mJ=Object.defineProperty,hJ=(e,t)=>mJ(e,`name`,{value:t,configurable:!0}),gJ=`Popover`,[_J,xpe]=eD(gJ,[$q]),vJ=$q(),[yJ,bJ]=_J(gJ),xJ=hJ(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=vJ(t),c=b.useRef(null),[l,u]=b.useState(!1),[d,f]=lD({prop:r,defaultProp:i??!1,onChange:a,caller:gJ});return(0,H.jsx)(dJ,{...s,children:(0,H.jsx)(yJ,{scope:t,contentId:nD(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:b.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:b.useCallback(()=>u(!0),[]),onCustomAnchorRemove:b.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),SJ=`PopoverAnchor`,CJ=b.forwardRef(hJ(function(e,t){let{__scopePopover:n,...r}=e,i=bJ(SJ,n),a=vJ(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return b.useEffect(()=>(o(),()=>s()),[o,s]),(0,H.jsx)(fJ,{...a,...r,ref:t})},`PopoverAnchor`)),wJ=`PopoverTrigger`,TJ=b.forwardRef(hJ(function(e,t){let{__scopePopover:n,...r}=e,i=bJ(wJ,n),a=vJ(n),o=Ri(t,i.triggerRef),s=(0,H.jsx)(mD.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":IJ(i.open),...r,ref:o,onClick:XE(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,H.jsx)(fJ,{asChild:!0,...a,children:s})},`PopoverTrigger`)),EJ=`PopoverPortal`,[DJ,OJ]=_J(EJ,{forceMount:void 0}),kJ=hJ(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=bJ(EJ,t);return(0,H.jsx)(DJ,{scope:t,forceMount:n,children:(0,H.jsx)(XD,{present:n||a.open,children:(0,H.jsx)(qD,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),AJ=`PopoverContent`,jJ=b.forwardRef(hJ(function(e,t){let n=OJ(AJ,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=bJ(AJ,e.__scopePopover);return(0,H.jsx)(XD,{present:r||a.open,children:a.modal?(0,H.jsx)(NJ,{...i,ref:t}):(0,H.jsx)(PJ,{...i,ref:t})})},`PopoverContent`)),MJ=zi(`PopoverContent.RemoveScroll`),NJ=b.forwardRef(hJ(function(e,t){let n=bJ(AJ,e.__scopePopover),r=b.useRef(null),i=Ri(t,r),a=b.useRef(!1);return b.useEffect(()=>{let e=r.current;if(e)return gk(e)},[]),(0,H.jsx)(sk,{as:MJ,allowPinchZoom:!0,children:(0,H.jsx)(FJ,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:XE(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:XE(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:XE(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),PJ=b.forwardRef(hJ(function(e,t){let n=bJ(AJ,e.__scopePopover),r=b.useRef(!1),i=b.useRef(!1);return(0,H.jsx)(FJ,{...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`)),FJ=b.forwardRef(hJ(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=bJ(AJ,n),p=vJ(n);return iO(),(0,H.jsx)(FD,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(wD,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,H.jsx)(pJ,{"data-state":IJ(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.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 IJ(e){return e?`open`:`closed`}hJ(IJ,`getState`);var LJ=xJ,RJ=CJ,zJ=TJ,BJ=kJ,VJ=jJ;function HJ({...e}){return(0,H.jsx)(LJ,{"data-slot":`popover`,...e})}function UJ({...e}){return(0,H.jsx)(zJ,{"data-slot":`popover-trigger`,...e})}function WJ({...e}){return(0,H.jsx)(RJ,{"data-slot":`popover-anchor`,...e})}function GJ({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,H.jsx)(BJ,{children:(0,H.jsx)(VJ,{"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 KJ=Fi([`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`}}),qJ=`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 JJ({className:e,icon:t,children:n,onDismiss:r,...i}){return(0,H.jsxs)(`span`,{className:Mr(qJ,`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 YJ=(0,b.createContext)(null);function XJ(){let e=(0,b.useContext)(YJ);if(!e)throw Error(`Combobox compound components must be used within <Combobox>`);return e}function ZJ(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)(YJ.Provider,{value:E,children:(0,H.jsx)(HJ,{open:m,onOpenChange:h,children:t})})}function QJ({className:e,size:t,placeholder:n,children:r,...i}){let{multiple:a,value:o,values:s,open:c,onDeselect:l}=XJ(),u=a?s.length===0:o==null;return(0,H.jsx)(UJ,{asChild:!0,children:(0,H.jsxs)(`button`,{type:`button`,"data-slot":`combobox-trigger`,role:`combobox`,"aria-expanded":c,className:Mr(KJ({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)($J,{values:s,onDeselect:l}):r}),(0,H.jsx)(qr,{className:`size-5 shrink-0 text-muted-foreground`})]})})}function $J({values:e,onDeselect:t}){let{getOptionLabel:n}=XJ();return(0,H.jsx)(H.Fragment,{children:e.map(e=>(0,H.jsx)(JJ,{onClick:e=>e.stopPropagation(),onDismiss:()=>t(e),children:n?n(e):e},e))})}function eY({className:e,children:t,filter:n,...r}){let{multiple:i}=XJ();return(0,H.jsx)(GJ,{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)(RW,{"data-slot":`combobox-command`,filter:n,className:`flex h-full w-full flex-col overflow-hidden rounded-md bg-popover`,children:t})})}function tY({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)(Ci,{className:`size-5 shrink-0 text-muted-foreground`}),(0,H.jsx)(RW.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 nY({className:e,...t}){return(0,H.jsx)(RW.List,{"data-slot":`combobox-list`,className:Mr(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto py-1`,e),...t})}function rY({className:e,...t}){return(0,H.jsx)(RW.Empty,{"data-slot":`combobox-empty`,className:Mr(`py-6 text-center type-text-sm text-muted-foreground`,e),...t})}function iY({className:e,children:t,itemValue:n,...r}){let{onSelect:i,isSelected:a}=XJ(),o=a(n);return(0,H.jsxs)(RW.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`})]})}function aY(e,[t,n]){return Math.min(n,Math.max(t,e))}function oY(e){let t=e+`CollectionProvider`,[n,r]=eD(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=zi(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=Ri(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=zi(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=Ri(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 sY=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`}),cY=Object.defineProperty,lY=(e,t)=>cY(e,`name`,{value:t,configurable:!0}),uY=[` `,`Enter`,`ArrowUp`,`ArrowDown`],dY=[` `,`Enter`],fY=`Select`,[pY,mY,hY]=oY(fY),[gY,Spe]=eD(fY,[hY,$q]),_Y=$q(),[vY,yY]=gY(fY),[bY,xY]=gY(fY);function SY(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=_Y(t),[_,v]=b.useState(null),[y,x]=b.useState(null),[S,C]=b.useState(!1),w=eB(l),[T,E]=lD({prop:r,defaultProp:i??!1,onChange:a,caller:fY}),[D,O]=lD({prop:o,defaultProp:s,onChange:c,caller:fY}),k=b.useRef(null),A=b.useRef(D);b.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=lY(()=>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=nD(),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)(dJ,{...g,children:(0,H.jsx)(vY,{scope:t,...ee,children:(0,H.jsx)(pY.Provider,{scope:t,children:(0,H.jsx)(bY,{scope:t,onNativeOptionAdd:I,onNativeOptionRemove:L,children:nX(h)?h(ee):n})})})})}lY(SY,`SelectProvider`);var CY=lY(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,H.jsx)(SY,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[n,e?(0,H.jsx)(tX,{__scopeSelect:t}):null]})})},`Select`),wY=`SelectTrigger`,TY=b.forwardRef(lY(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=_Y(n),o=yY(wY,n),s=o.disabled||r,c=Ri(t,o.onTriggerChange),l=mY(n),u=b.useRef(`touch`),[d,f,p]=iX(e=>{let t=l().filter(e=>!e.disabled),n=aX(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=lY(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)(fJ,{asChild:!0,...a,children:(0,H.jsx)(mD.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":rX(o.value)?``:void 0,...i,ref:c,onClick:XE(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:XE(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:XE(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&uY.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),EY=`SelectValue`,DY=b.forwardRef(lY(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=yY(EY,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Ri(t,c.onValueNodeChange);tD(()=>{l(u)},[l,u]);let f=rX(c.value);return(0,H.jsx)(mD.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`)),OY=b.forwardRef(lY(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,H.jsx)(mD.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[kY,AY]=gY(`SelectPortal`,{forceMount:void 0}),jY=lY(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,H.jsx)(kY,{scope:e.__scopeSelect,forceMount:n,children:(0,H.jsx)(qD,{asChild:!0,...r})})},`SelectPortal`),MY=`SelectContent`,NY=b.forwardRef(lY(function(e,t){let n=AY(MY,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=yY(MY,e.__scopeSelect),[o,s]=b.useState();return tD(()=>{s(new DocumentFragment)},[]),(0,H.jsx)(XD,{present:r||a.open,children:({present:e})=>e?(0,H.jsx)(zY,{...i,ref:t}):(0,H.jsx)(PY,{...i,fragment:o})})},`SelectContent`)),PY=b.forwardRef(lY(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?PS.createPortal((0,H.jsx)(IY,{scope:n,children:(0,H.jsx)(pY.Slot,{scope:n,children:(0,H.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),FY=10,[IY,LY]=gY(MY),RY=zi(`SelectContent.RemoveScroll`),zY=b.forwardRef(lY(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=yY(MY,n),[y,x]=b.useState(null),[S,C]=b.useState(null),w=Ri(t,x),[T,E]=b.useState(null),[D,O]=b.useState(null),k=mY(n),[A,j]=b.useState(!1),M=b.useRef(!1);b.useEffect(()=>{if(y)return gk(y)},[y]),iO();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=lY(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=lY(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=lY(()=>F(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[F]);let[L,ee]=iX(e=>{let t=k().filter(e=>!e.disabled),n=aX(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`?VY:BY,B=z===VY?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,H.jsx)(IY,{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)(sk,{as:RY,allowPinchZoom:!0,children:(0,H.jsx)(FD,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:XE(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,H.jsx)(wD,{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:XE(_.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`)),BY=b.forwardRef(lY(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=yY(MY,n),o=LY(MY,n),[s,c]=b.useState(null),[l,u]=b.useState(null),d=Ri(t,u),f=mY(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-FY,d=aY(a,[FY,Math.max(FY,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-FY,d=aY(a,[FY,Math.max(FY,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-FY*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-FY,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=`${FY}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]);tD(()=>y(),[y]);let[x,S]=b.useState();return tD(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,H.jsx)(HY,{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)(mD.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),VY=b.forwardRef(lY(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=FY,...a}=e,o=_Y(n);return(0,H.jsx)(pJ,{...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`)),[HY,UY]=gY(MY,{}),WY=`SelectViewport`,GY=b.forwardRef(lY(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=LY(WY,n),o=UY(WY,n),s=Ri(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)(pY.Slot,{scope:n,children:(0,H.jsx)(mD.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:XE(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-FY*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`)),[Cpe,wpe]=gY(`SelectGroup`),KY=`SelectItem`,[qY,JY]=gY(KY),YY=b.forwardRef(lY(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=yY(KY,n),c=LY(KY,n),l=s.value===r,[u,d]=b.useState(a??``),[f,p]=b.useState(!1),m=Ri(t,gD(e=>c.itemRefCallback?.(e,r,i))),h=nD(),g=b.useRef(`touch`),_=lY(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,H.jsx)(qY,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:b.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,H.jsx)(pY.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,H.jsx)(mD.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:XE(o.onFocus,()=>p(!0)),onBlur:XE(o.onBlur,()=>p(!1)),onClick:XE(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:XE(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:XE(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:XE(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:XE(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:XE(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(dY.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),XY=`SelectItemText`,ZY=b.forwardRef(lY(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=yY(XY,n),s=LY(XY,n),c=JY(XY,n),l=xY(XY,n),[u,d]=b.useState(null),f=gD(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=Ri(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 tD(()=>(g(h),()=>_(h)),[g,_,h]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(mD.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!rX(o.value)?PS.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),QY=`SelectItemIndicator`,$Y=b.forwardRef(lY(function(e,t){let{__scopeSelect:n,...r}=e;return JY(QY,n).isSelected?(0,H.jsx)(mD.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),eX=`SelectBubbleInput`,tX=b.forwardRef(lY(function({__scopeSelect:e,...t},n){let r=yY(eX,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=Ri(n,p),h=i??``,g=vz(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)(mD.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...sY,...t.style},ref:m,defaultValue:h,children:[rX(i)&&!_?(0,H.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function nX(e){return typeof e==`function`}lY(nX,`isFunction`);function rX(e){return e===``||e===void 0}lY(rX,`shouldShowPlaceholder`);function iX(e){let t=gD(e),n=b.useRef(``),r=b.useRef(0),i=b.useCallback(e=>{let i=n.current+e;t(i),lY((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]}lY(iX,`useTypeaheadSearch`);function aX(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=oX(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}lY(aX,`findNextItem`);function oX(e,t){return e.map((n,r)=>e[(t+r)%e.length])}lY(oX,`wrapArray`);function sX({...e}){return(0,H.jsx)(CY,{"data-slot":`select`,...e})}function cX({...e}){return(0,H.jsx)(DY,{"data-slot":`select-value`,...e})}function lX({className:e,size:t=`md`,children:n,...r}){return(0,H.jsxs)(TY,{"data-slot":`select-trigger`,className:Mr(KJ({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)(OY,{asChild:!0,children:(0,H.jsx)(qr,{className:`size-5 shrink-0 text-muted-foreground`})})]})}function uX({className:e,children:t,position:n=`popper`,...r}){return(0,H.jsx)(jY,{children:(0,H.jsx)(NY,{"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)(GY,{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 dX({className:e,children:t,...n}){return(0,H.jsxs)(YY,{"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)($Y,{children:(0,H.jsx)(Kr,{className:`size-4 text-primary`})})}),(0,H.jsx)(ZY,{children:t})]})}var fX=Object.defineProperty,pX=(e,t)=>fX(e,`name`,{value:t,configurable:!0}),mX=`Switch`,[hX,Tpe]=eD(mX),[gX,_X]=hX(mX);function vX(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]=lD({prop:n,defaultProp:i??!1,onChange:c,caller:mX}),[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)(gX,{scope:t,...S,children:EX(d)?d(S):r})}pX(vX,`SwitchProvider`);var yX=`SwitchTrigger`,bX=b.forwardRef(pX(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}=_X(yX,e),g=Ri(r,u),_=b.useRef(c);return b.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=pX(()=>d(_.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,H.jsx)(mD.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":DX(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:g,onClick:XE(t,e=>{p(),d(e=>!e),h&&m&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`SwitchTrigger`)),xX=b.forwardRef(pX(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)(vX,{__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)(bX,{...d,ref:t,__scopeSwitch:n}),e&&(0,H.jsx)(TX,{__scopeSwitch:n})]})})},`Switch`)),SX=`SwitchThumb`,CX=b.forwardRef(pX(function(e,t){let{__scopeSwitch:n,...r}=e,i=_X(SX,n);return(0,H.jsx)(mD.span,{"data-state":DX(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),wX=`SwitchBubbleInput`,TX=b.forwardRef(pX(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}=_X(wX,e),g=Ri(r,h),_=yz(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)(mD.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:XE(t,e=>{v.current&&e.stopPropagation()}),style:{...n.style,..._,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function EX(e){return typeof e==`function`}pX(EX,`isFunction`);function DX(e){return e?`checked`:`unchecked`}pX(DX,`getState`);function OX({className:e,...t}){return(0,H.jsx)(xX,{"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)(CX,{"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 kX(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:xG,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 AX(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)(sX,{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)(lX,{id:t,className:fG(SG),"aria-invalid":d||void 0,children:(0,H.jsx)(cX,{placeholder:o??`Select…`})}),(0,H.jsx)(uX,{children:u.map(e=>(0,H.jsx)(dX,{value:String(e.value),className:`font-mono text-xs`,children:e.label},String(e.value)))})]})}function jX(e){let{id:t,value:n,required:r,disabled:i,readonly:a,onChange:o}=e;return(0,H.jsx)(OX,{id:t,checked:n===!0,required:r,disabled:i||a,onCheckedChange:e=>o(e===!0)})}function MX(e){let{id:t,value:n,disabled:r,readonly:i,options:a,placeholder:o,rawErrors:s,schema:c}=e,l=NX(a,c),u=(s?.length??0)>0;return(0,H.jsx)(PX,{id:t,value:n,disabled:r||i,placeholder:o??`Select…`,enumOptions:l,hasError:u,onChange:e.onChange})}function NX(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 PX({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)(ZJ,{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)(QJ,{id:e,disabled:n||c.length===0,placeholder:r,className:fG(SG),"aria-invalid":a||void 0}),(0,H.jsxs)(eY,{children:[(0,H.jsx)(tY,{placeholder:`Search…`}),(0,H.jsxs)(nY,{className:`flex flex-col gap-1 py-1`,children:[(0,H.jsx)(rY,{children:`No results.`}),c.map(e=>(0,H.jsx)(iY,{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:fG(`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)(Mi,{className:`size-3 text-muted-foreground group-hover:text-foreground`})]})},String(e))})})]})}var FX={TextareaWidget:kX,SelectWidget:AX,CheckboxWidget:jX,CheckboxesWidget:MX},IX={ArrayFieldItemTemplate:MG,ArrayFieldTemplate:jG,BaseInputTemplate:TG,DescriptionFieldTemplate:OG,FieldErrorTemplate:DG,FieldTemplate:EG,ObjectFieldTemplate:AG,TitleFieldTemplate:kG,ButtonTemplates:IG},LX={"ui:submitButtonOptions":{norender:!0}};function RX(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 zX(e){if(!(!e||typeof e!=`object`)){if(RX(e))return{"ui:widget":`checkboxes`};if(e.type===`object`&&e.properties){let t=[];for(let[n,r]of Object.entries(e.properties)){let e=zX(r);e&&t.push([n,e])}return t.length>0?Object.fromEntries(t):void 0}}}function BX(e){let t=zX(e);return t?{...LX,...t}:LX}var VX=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;var t=YL(),n=ZL(),r=cR(),i=_R(),a={keyword:`$dynamicAnchor`,schemaType:`string`,code:e=>o(e,e.schema)};function o(e,r){let{gen:i,it:a}=e;a.schemaEnv.root.dynamicAnchors[r]=!0;let o=(0,t._)`${n.default.dynamicAnchors}${(0,t.getProperty)(r)}`,c=a.errSchemaPath===`#`?a.validateName:s(e);i.if((0,t._)`!${o}`,()=>i.assign(o,c))}e.dynamicAnchor=o;function s(e){let{schemaEnv:t,schema:n,self:a}=e.it,{root:o,baseId:s,localRefs:c,meta:l}=t.root,{schemaId:u}=a.opts,d=new r.SchemaEnv({schema:n,schemaId:u,root:o,baseId:s,localRefs:c,meta:l});return r.compileSchema.call(a,d),(0,i.getValidate)(e,d)}e.default=a})),HX=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;var t=YL(),n=ZL(),r=_R(),i={keyword:`$dynamicRef`,schemaType:`string`,code:e=>a(e,e.schema)};function a(e,i){let{gen:a,keyword:o,it:s}=e;if(i[0]!==`#`)throw Error(`"${o}" only supports hash fragment reference`);let c=i.slice(1);if(s.allErrors)l();else{let t=a.let(`valid`,!1);l(t),e.ok(t)}function l(e){if(s.schemaEnv.root.dynamicAnchors[c]){let r=a.let(`_v`,(0,t._)`${n.default.dynamicAnchors}${(0,t.getProperty)(c)}`);a.if(r,u(r,e),u(s.validateName,e))}else u(s.validateName,e)()}function u(t,n){return n?()=>a.block(()=>{(0,r.callRef)(e,t),a.let(n,!0)}):()=>(0,r.callRef)(e,t)}}e.dynamicRef=a,e.default=i})),Epe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=VX(),n=XL();e.default={keyword:`$recursiveAnchor`,schemaType:`boolean`,code(e){e.schema?(0,t.dynamicAnchor)(e,``):(0,n.checkStrictMode)(e.it,`$recursiveAnchor: false is ignored`)}}})),Dpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=HX();e.default={keyword:`$recursiveRef`,schemaType:`string`,code:e=>(0,t.dynamicRef)(e,e.schema)}})),Ope=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=VX(),n=HX(),r=Epe(),i=Dpe();e.default=[t.default,n.default,r.default,i.default]})),kpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=CR();e.default={keyword:`dependentRequired`,type:`object`,schemaType:`object`,error:t.error,code:e=>(0,t.validatePropertyDeps)(e)}})),Ape=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=CR();e.default={keyword:`dependentSchemas`,type:`object`,schemaType:`object`,code:e=>(0,t.validateSchemaDeps)(e)}})),jpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=XL();e.default={keyword:[`maxContains`,`minContains`],type:`array`,schemaType:`number`,code({keyword:e,parentSchema:n,it:r}){n.contains===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "contains" is ignored`)}}})),Mpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=kpe(),n=Ape(),r=jpe();e.default=[t.default,n.default,r.default]})),Npe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL(),n=XL(),r=ZL();e.default={keyword:`unevaluatedProperties`,type:`object`,schemaType:[`boolean`,`object`],trackErrors:!0,error:{message:`must NOT have unevaluated properties`,params:({params:e})=>(0,t._)`{unevaluatedProperty: ${e.unevaluatedProperty}}`},code(e){let{gen:i,schema:a,data:o,errsCount:s,it:c}=e;if(!s)throw Error(`ajv implementation error`);let{allErrors:l,props:u}=c;u instanceof t.Name?i.if((0,t._)`${u} !== true`,()=>i.forIn(`key`,o,e=>i.if(f(u,e),()=>d(e)))):u!==!0&&i.forIn(`key`,o,e=>u===void 0?d(e):i.if(p(u,e),()=>d(e))),c.props=!0,e.ok((0,t._)`${s} === ${r.default.errors}`);function d(r){if(a===!1){e.setParams({unevaluatedProperty:r}),e.error(),l||i.break();return}if(!(0,n.alwaysValidSchema)(c,a)){let a=i.name(`valid`);e.subschema({keyword:`unevaluatedProperties`,dataProp:r,dataPropType:n.Type.Str},a),l||i.if((0,t.not)(a),()=>i.break())}}function f(e,n){return(0,t._)`!${e} || !${e}[${n}]`}function p(e,n){let r=[];for(let i in e)e[i]===!0&&r.push((0,t._)`${n} !== ${i}`);return(0,t.and)(...r)}}}})),Ppe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=YL(),n=XL();e.default={keyword:`unevaluatedItems`,type:`array`,schemaType:[`boolean`,`object`],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{gen:r,schema:i,data:a,it:o}=e,s=o.items||0;if(s===!0)return;let c=r.const(`len`,(0,t._)`${a}.length`);if(i===!1)e.setParams({len:s}),e.fail((0,t._)`${c} > ${s}`);else if(typeof i==`object`&&!(0,n.alwaysValidSchema)(o,i)){let n=r.var(`valid`,(0,t._)`${c} <= ${s}`);r.if((0,t.not)(n),()=>l(n,s)),e.ok(n)}o.items=!0;function l(i,a){r.forRange(`i`,a,c,a=>{e.subschema({keyword:`unevaluatedItems`,dataProp:a,dataPropType:n.Type.Num},i),o.allErrors||r.if((0,t.not)(i),()=>r.break())})}}}})),Fpe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Npe(),n=Ppe();e.default=[t.default,n.default]})),Ipe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=vR(),n=bR(),r=TR(),i=Ope(),a=Mpe(),o=Fpe(),s=ER(),c=DR();e.default=[i.default,t.default,n.default,(0,r.default)(!0),s.default,c.metadataVocabulary,c.contentVocabulary,a.default,o.default]})),Lpe=c({$comment:()=>XX,$dynamicAnchor:()=>KX,$id:()=>WX,$schema:()=>UX,$vocabulary:()=>GX,allOf:()=>JX,default:()=>QX,properties:()=>ZX,title:()=>qX,type:()=>YX}),UX,WX,GX,KX,qX,JX,YX,XX,ZX,QX,Rpe=o((()=>{UX=`https://json-schema.org/draft/2020-12/schema`,WX=`https://json-schema.org/draft/2020-12/schema`,GX={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},KX=`meta`,qX=`Core and Validation specifications meta-schema`,JX=[{$ref:`meta/core`},{$ref:`meta/applicator`},{$ref:`meta/unevaluated`},{$ref:`meta/validation`},{$ref:`meta/meta-data`},{$ref:`meta/format-annotation`},{$ref:`meta/content`}],YX=[`object`,`boolean`],XX=`This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.`,ZX={definitions:{$comment:`"definitions" has been replaced by "$defs".`,type:`object`,additionalProperties:{$dynamicRef:`#meta`},deprecated:!0,default:{}},dependencies:{$comment:`"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.`,type:`object`,additionalProperties:{anyOf:[{$dynamicRef:`#meta`},{$ref:`meta/validation#/$defs/stringArray`}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:`"$recursiveAnchor" has been replaced by "$dynamicAnchor".`,$ref:`meta/core#/$defs/anchorString`,deprecated:!0},$recursiveRef:{$comment:`"$recursiveRef" has been replaced by "$dynamicRef".`,$ref:`meta/core#/$defs/uriReferenceString`,deprecated:!0}},QX={$schema:UX,$id:WX,$vocabulary:GX,$dynamicAnchor:KX,title:qX,allOf:JX,type:YX,$comment:XX,properties:ZX}})),zpe=c({$defs:()=>oZ,$dynamicAnchor:()=>nZ,$id:()=>eZ,$schema:()=>$X,$vocabulary:()=>tZ,default:()=>sZ,properties:()=>aZ,title:()=>rZ,type:()=>iZ}),$X,eZ,tZ,nZ,rZ,iZ,aZ,oZ,sZ,Bpe=o((()=>{$X=`https://json-schema.org/draft/2020-12/schema`,eZ=`https://json-schema.org/draft/2020-12/meta/applicator`,tZ={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},nZ=`meta`,rZ=`Applicator vocabulary meta-schema`,iZ=[`object`,`boolean`],aZ={prefixItems:{$ref:`#/$defs/schemaArray`},items:{$dynamicRef:`#meta`},contains:{$dynamicRef:`#meta`},additionalProperties:{$dynamicRef:`#meta`},properties:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},default:{}},patternProperties:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},propertyNames:{format:`regex`},default:{}},dependentSchemas:{type:`object`,additionalProperties:{$dynamicRef:`#meta`},default:{}},propertyNames:{$dynamicRef:`#meta`},if:{$dynamicRef:`#meta`},then:{$dynamicRef:`#meta`},else:{$dynamicRef:`#meta`},allOf:{$ref:`#/$defs/schemaArray`},anyOf:{$ref:`#/$defs/schemaArray`},oneOf:{$ref:`#/$defs/schemaArray`},not:{$dynamicRef:`#meta`}},oZ={schemaArray:{type:`array`,minItems:1,items:{$dynamicRef:`#meta`}}},sZ={$schema:$X,$id:eZ,$vocabulary:tZ,$dynamicAnchor:nZ,title:rZ,type:iZ,properties:aZ,$defs:oZ}})),Vpe=c({$dynamicAnchor:()=>dZ,$id:()=>lZ,$schema:()=>cZ,$vocabulary:()=>uZ,default:()=>hZ,properties:()=>mZ,title:()=>fZ,type:()=>pZ}),cZ,lZ,uZ,dZ,fZ,pZ,mZ,hZ,Hpe=o((()=>{cZ=`https://json-schema.org/draft/2020-12/schema`,lZ=`https://json-schema.org/draft/2020-12/meta/unevaluated`,uZ={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},dZ=`meta`,fZ=`Unevaluated applicator vocabulary meta-schema`,pZ=[`object`,`boolean`],mZ={unevaluatedItems:{$dynamicRef:`#meta`},unevaluatedProperties:{$dynamicRef:`#meta`}},hZ={$schema:cZ,$id:lZ,$vocabulary:uZ,$dynamicAnchor:dZ,title:fZ,type:pZ,properties:mZ}})),Upe=c({$dynamicAnchor:()=>yZ,$id:()=>_Z,$schema:()=>gZ,$vocabulary:()=>vZ,default:()=>CZ,properties:()=>SZ,title:()=>bZ,type:()=>xZ}),gZ,_Z,vZ,yZ,bZ,xZ,SZ,CZ,Wpe=o((()=>{gZ=`https://json-schema.org/draft/2020-12/schema`,_Z=`https://json-schema.org/draft/2020-12/meta/content`,vZ={"https://json-schema.org/draft/2020-12/vocab/content":!0},yZ=`meta`,bZ=`Content vocabulary meta-schema`,xZ=[`object`,`boolean`],SZ={contentEncoding:{type:`string`},contentMediaType:{type:`string`},contentSchema:{$dynamicRef:`#meta`}},CZ={$schema:gZ,$id:_Z,$vocabulary:vZ,$dynamicAnchor:yZ,title:bZ,type:xZ,properties:SZ}})),Gpe=c({$defs:()=>jZ,$dynamicAnchor:()=>DZ,$id:()=>TZ,$schema:()=>wZ,$vocabulary:()=>EZ,default:()=>MZ,properties:()=>AZ,title:()=>OZ,type:()=>kZ}),wZ,TZ,EZ,DZ,OZ,kZ,AZ,jZ,MZ,Kpe=o((()=>{wZ=`https://json-schema.org/draft/2020-12/schema`,TZ=`https://json-schema.org/draft/2020-12/meta/core`,EZ={"https://json-schema.org/draft/2020-12/vocab/core":!0},DZ=`meta`,OZ=`Core vocabulary meta-schema`,kZ=[`object`,`boolean`],AZ={$id:{$ref:`#/$defs/uriReferenceString`,$comment:`Non-empty fragments not allowed.`,pattern:`^[^#]*#?$`},$schema:{$ref:`#/$defs/uriString`},$ref:{$ref:`#/$defs/uriReferenceString`},$anchor:{$ref:`#/$defs/anchorString`},$dynamicRef:{$ref:`#/$defs/uriReferenceString`},$dynamicAnchor:{$ref:`#/$defs/anchorString`},$vocabulary:{type:`object`,propertyNames:{$ref:`#/$defs/uriString`},additionalProperties:{type:`boolean`}},$comment:{type:`string`},$defs:{type:`object`,additionalProperties:{$dynamicRef:`#meta`}}},jZ={anchorString:{type:`string`,pattern:`^[A-Za-z_][-A-Za-z0-9._]*$`},uriString:{type:`string`,format:`uri`},uriReferenceString:{type:`string`,format:`uri-reference`}},MZ={$schema:wZ,$id:TZ,$vocabulary:EZ,$dynamicAnchor:DZ,title:OZ,type:kZ,properties:AZ,$defs:jZ}})),qpe=c({$dynamicAnchor:()=>IZ,$id:()=>PZ,$schema:()=>NZ,$vocabulary:()=>FZ,default:()=>BZ,properties:()=>zZ,title:()=>LZ,type:()=>RZ}),NZ,PZ,FZ,IZ,LZ,RZ,zZ,BZ,Jpe=o((()=>{NZ=`https://json-schema.org/draft/2020-12/schema`,PZ=`https://json-schema.org/draft/2020-12/meta/format-annotation`,FZ={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},IZ=`meta`,LZ=`Format vocabulary meta-schema for annotation results`,RZ=[`object`,`boolean`],zZ={format:{type:`string`}},BZ={$schema:NZ,$id:PZ,$vocabulary:FZ,$dynamicAnchor:IZ,title:LZ,type:RZ,properties:zZ}})),Ype=c({$dynamicAnchor:()=>WZ,$id:()=>HZ,$schema:()=>VZ,$vocabulary:()=>UZ,default:()=>JZ,properties:()=>qZ,title:()=>GZ,type:()=>KZ}),VZ,HZ,UZ,WZ,GZ,KZ,qZ,JZ,Xpe=o((()=>{VZ=`https://json-schema.org/draft/2020-12/schema`,HZ=`https://json-schema.org/draft/2020-12/meta/meta-data`,UZ={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},WZ=`meta`,GZ=`Meta-data vocabulary meta-schema`,KZ=[`object`,`boolean`],qZ={title:{type:`string`},description:{type:`string`},default:!0,deprecated:{type:`boolean`,default:!1},readOnly:{type:`boolean`,default:!1},writeOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0}},JZ={$schema:VZ,$id:HZ,$vocabulary:UZ,$dynamicAnchor:WZ,title:GZ,type:KZ,properties:qZ}})),Zpe=c({$defs:()=>nQ,$dynamicAnchor:()=>QZ,$id:()=>XZ,$schema:()=>YZ,$vocabulary:()=>ZZ,default:()=>rQ,properties:()=>tQ,title:()=>$Z,type:()=>eQ}),YZ,XZ,ZZ,QZ,$Z,eQ,tQ,nQ,rQ,Qpe=o((()=>{YZ=`https://json-schema.org/draft/2020-12/schema`,XZ=`https://json-schema.org/draft/2020-12/meta/validation`,ZZ={"https://json-schema.org/draft/2020-12/vocab/validation":!0},QZ=`meta`,$Z=`Validation vocabulary meta-schema`,eQ=[`object`,`boolean`],tQ={type:{anyOf:[{$ref:`#/$defs/simpleTypes`},{type:`array`,items:{$ref:`#/$defs/simpleTypes`},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/$defs/nonNegativeInteger`},minLength:{$ref:`#/$defs/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},maxItems:{$ref:`#/$defs/nonNegativeInteger`},minItems:{$ref:`#/$defs/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},maxContains:{$ref:`#/$defs/nonNegativeInteger`},minContains:{$ref:`#/$defs/nonNegativeInteger`,default:1},maxProperties:{$ref:`#/$defs/nonNegativeInteger`},minProperties:{$ref:`#/$defs/nonNegativeIntegerDefault0`},required:{$ref:`#/$defs/stringArray`},dependentRequired:{type:`object`,additionalProperties:{$ref:`#/$defs/stringArray`}}},nQ={nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{$ref:`#/$defs/nonNegativeInteger`,default:0},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},rQ={$schema:YZ,$id:XZ,$vocabulary:ZZ,$dynamicAnchor:QZ,title:$Z,type:eQ,properties:tQ,$defs:nQ}})),$pe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(Rpe(),d(Lpe).default),n=(Bpe(),d(zpe).default),r=(Hpe(),d(Vpe).default),i=(Wpe(),d(Upe).default),a=(Kpe(),d(Gpe).default),o=(Jpe(),d(qpe).default),s=(Xpe(),d(Ype).default),c=(Qpe(),d(Zpe).default),l=[`/properties`];function u(e){return[t,n,r,i,a,u(this,o),s,u(this,c)].forEach(e=>this.addMetaSchema(e,void 0,!1)),this;function u(t,n){return e?t.$dataMetaSchema(n,l):n}}e.default=u})),iQ=RR({AjvClass:u(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.Ajv2020=void 0;var n=gR(),r=Ipe(),i=OR(),a=$pe(),o=`https://json-schema.org/draft/2020-12/schema`,s=class extends n.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(a.default.call(this,e),this.refs[`http://json-schema.org/schema`]=o)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}};e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var c=aR();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=YL();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var u=oR();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var d=sR();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}))(),1).default});function aQ(e){let{"x-openai-suggestions":t,...n}=e;return t?{...n,examples:t.map(e=>e.const)}:e}function eme(e){return e._meta?.[`openai/elicitation`]?.requestedSchema??(`requestedSchema`in e?e.requestedSchema:{})}function oQ(e){return cQ(e.items)&&e.items.anyOf!==void 0}function tme(e){let{"x-openai-input":t,format:n,...r}=e;if(!t)return oQ(e)?{...e,uniqueItems:!0}:cQ(e.items)?{...aQ(e),items:aQ(e.items)}:aQ(e);if(t.userOptions||t.selection===`implicit`){let n=t.options.map(e=>e.uri);return e.type===`array`?{...r,items:{type:`string`,format:`uri`,examples:n}}:{...r,format:`uri`,examples:n}}let i=t.options.map(e=>({const:e.uri,title:e.name??e.uri,description:e.description}));return e.type===`array`?{...r,uniqueItems:!0,items:{type:`string`,anyOf:i}}:{...r,oneOf:i}}function nme(e){if(e.oneOf||oQ(e))return{"ui:widget":`OptionsWidget`}}function sQ(e){let t=Object.fromEntries(Object.entries(e.properties??{}).map(([e,t])=>[e,tme(t)])),n={"ui:submitButtonOptions":{norender:!0}};for(let[e,r]of Object.entries(t)){let t=nme(r);t&&(n[e]=t)}return{schema:{...e,properties:t},uiSchema:n}}function cQ(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function rme({id:e,value:t,multiple:n,disabled:r,readonly:i,options:a,onChange:o}){let s=a.enumOptions??[],c=n?Array.isArray(t)?t:[]:[t],l=(e,t)=>{if(!n){o(e);return}o(t?[...c,e]:c.filter(t=>t!==e))};return(0,H.jsx)(`div`,{id:e,className:`flex flex-col gap-1.5`,children:s.map(t=>{let a=t.schema,o=a?.[`x-openai-thumbnail`]?.src,s=c.includes(t.value);return(0,H.jsxs)(`label`,{className:fG(`flex cursor-pointer items-center gap-3 rounded-md border border-border p-2 transition-colors hover:bg-muted`,s&&`border-ring bg-muted`),children:[(0,H.jsx)(`input`,{type:n?`checkbox`:`radio`,name:e,checked:s,disabled:r||i,onChange:e=>l(t.value,e.target.checked)}),o&&(0,H.jsx)(`img`,{src:o,alt:``,className:`size-10 shrink-0 rounded object-cover`}),(0,H.jsxs)(`span`,{className:`flex flex-col`,children:[(0,H.jsx)(`span`,{className:`text-xs font-medium`,children:t.label}),a?.description&&(0,H.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:a.description})]})]},String(t.value))})})}var ime={...FX,OptionsWidget:rme};function ame(){let e=mS(e=>e.queue[0]);return(0,H.jsx)(zk,{open:e!==void 0,onOpenChange:t=>{t||e?.respond({action:`cancel`})},children:e&&(0,H.jsx)(ome,{...e},e.id)})}function ome({params:e,respond:t}){let{schema:n,uiSchema:r}=(0,b.useMemo)(()=>sQ(eme(e)),[e]);return(0,H.jsxs)(Bk,{size:`lg`,children:[(0,H.jsxs)(Vk,{children:[(0,H.jsx)(Uk,{children:`Form request`}),(0,H.jsx)(Wk,{children:e.message})]}),(0,H.jsx)(dG,{schema:n,uiSchema:r,validator:iQ,widgets:ime,templates:IX,showErrorList:!1,omitExtraData:!0,experimental_defaultFormStateBehavior:{constAsDefaults:`never`},className:`max-h-[60vh] overflow-y-auto`,onSubmit:({formData:e})=>t({action:`accept`,content:e??{}}),children:(0,H.jsxs)(Hk,{children:[(0,H.jsx)(ta,{type:`button`,variant:`secondary`,onClick:()=>t({action:`decline`}),children:`Decline`}),(0,H.jsx)(ta,{type:`submit`,children:`Submit`})]})})]})}function sme(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 cme(e,t){if(e==null)return{};var n,r,i=sme(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 lQ(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 lme(e){if(Array.isArray(e))return lQ(e)}function ume(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function dme(e,t){if(e){if(typeof e==`string`)return lQ(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)?lQ(e,t):void 0}}function fme(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
207
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uQ(e){return lme(e)||ume(e)||dme(e)||fme()}function dQ(e){"@babel/helpers - typeof";return dQ=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},dQ(e)}function pme(e,t){if(dQ(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(dQ(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function mme(e){var t=pme(e,`string`);return dQ(t)==`symbol`?t:t+``}function fQ(e,t,n){return(t=mme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pQ(){return pQ=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},pQ.apply(null,arguments)}function mQ(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 hQ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mQ(Object(n),!0).forEach(function(t){fQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hme(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 gQ={};function gme(e){if(e.length===0||e.length===1)return e;var t=e.join(`.`);return gQ[t]||(gQ[t]=hme(e)),gQ[t]}function _me(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return gme(e.filter(function(e){return e!==`token`})).reduce(function(e,t){return hQ(hQ({},e),n[t])},t)}function _Q(e){return e.join(` `)}function vme(e,t){var n=0;return function(r){return n+=1,r.map(function(r,i){return vQ({node:r,stylesheet:e,useInlineStyles:t,key:`code-segment-${n}-${i}`})})}}function vQ(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=vme(n,a),f;if(!a)f=hQ(hQ({},s),{},{className:_Q(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=hQ(hQ({},s),{},{className:_Q(h)||void 0,style:_me(s.className,Object.assign({},s.style,i),n)})}var g=d(t.children);return b.createElement(l,pQ({key:o},f),g)}}var yme=(function(e,t){return e.listLanguages().indexOf(t)!==-1}),bme=[`language`,`children`,`style`,`customStyle`,`codeTagProps`,`useInlineStyles`,`showLineNumbers`,`showInlineLineNumbers`,`startingLineNumber`,`lineNumberContainerStyle`,`lineNumberStyle`,`wrapLines`,`wrapLongLines`,`lineProps`,`renderer`,`PreTag`,`CodeTag`,`code`,`astGenerator`];function yQ(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 bQ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?yQ(Object(n),!0).forEach(function(t){fQ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var xme=/\n/g;function Sme(e){return e.match(xme)}function Cme(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}
|
|
208
|
+
`)})}function wme(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)},Cme({lines:t.replace(/\n$/,``).split(`
|
|
209
|
+
`),style:o,startingLineNumber:s}))}function Tme(e){return`${e.toString().length}.25em`}function xQ(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 SQ(e,t,n){var r={display:`inline-block`,minWidth:Tme(n),paddingRight:`1em`,textAlign:`right`,userSelect:`none`},i=typeof e==`function`?e(t):e;return bQ(bQ({},r),i)}function CQ(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?bQ({},typeof s==`function`?s(n):s):{};if(p.className=p.className?[].concat(uQ(p.className.trim().split(/\s+/)),uQ(l)):l,n&&a){var m=SQ(r,n,i);t.unshift(xQ(n,m))}return d&u&&(p.style=bQ({display:`flex`},p.style)),{type:`element`,tagName:`span`,properties:p,children:t}}function wQ(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(CQ({children:[i],className:uQ(new Set(t))}));else if(i.children){var a=t.concat(i.properties?.className||[]);wQ(i.children,a).forEach(function(e){return n.push(e)})}}return n}function Eme(e,t,n,r,i,a,o,s,c){var l,u=wQ(e.value),d=[],f=-1,p=0;function m(e,a){return CQ({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=SQ(s,t,o);e.unshift(xQ(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(Sme(t)){var n=t.split(`
|
|
210
|
+
`);n.forEach(function(t,i){var o=r&&d.length+a,s={type:`text`,value:`${t}
|
|
211
|
+
`};if(i===0){var c=g(u.slice(f+1,p).concat(CQ({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=CQ({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 Dme(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return vQ({node:e,stylesheet:n,useInlineStyles:r,key:`code-segment-${t}`})})}function TQ(e){return e&&e.highlightAuto!==void 0}function Ome(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(TQ(t)){var a=yme(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 kme(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:bQ(bQ({},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=cme(n,bme);F||=e;var L=m?b.createElement(wme,{containerStyle:y,codeStyle:u.style||{},numberStyle:S,startingLineNumber:v,codeString:P}):null,ee=o.hljs||o[`pre[class*="language-"]`]||{backgroundColor:`#fff`},te=TQ(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=bQ({whiteSpace:`pre-wrap`},u.style):u.style=bQ({whiteSpace:`pre`},u.style),!F)return b.createElement(A,ne,L,b.createElement(M,u,P));(C===void 0&&O||T)&&(C=!0),O||=Dme;var R=[{type:`text`,value:P}],z=Ome({astGenerator:F,language:r,code:P,defaultCodeValue:R});z.language===null&&(z.value=R);var B=v+(P.match(/\n/g)?.length??0),re=Eme(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 EQ=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};EQ.prototype.normal={},EQ.prototype.property={},EQ.prototype.space=void 0;function DQ(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new EQ(n,r,t)}function OQ(e){return e.toLowerCase()}var kQ=class{constructor(e,t){this.attribute=t,this.property=e}};kQ.prototype.attribute=``,kQ.prototype.booleanish=!1,kQ.prototype.boolean=!1,kQ.prototype.commaOrSpaceSeparated=!1,kQ.prototype.commaSeparated=!1,kQ.prototype.defined=!1,kQ.prototype.mustUseProperty=!1,kQ.prototype.number=!1,kQ.prototype.overloadedBoolean=!1,kQ.prototype.property=``,kQ.prototype.spaceSeparated=!1,kQ.prototype.space=void 0;var AQ=c({boolean:()=>jQ,booleanish:()=>MQ,commaOrSpaceSeparated:()=>IQ,commaSeparated:()=>FQ,number:()=>$,overloadedBoolean:()=>NQ,spaceSeparated:()=>PQ}),Ame=0,jQ=LQ(),MQ=LQ(),NQ=LQ(),$=LQ(),PQ=LQ(),FQ=LQ(),IQ=LQ();function LQ(){return 2**++Ame}var RQ=Object.keys(AQ),zQ=class extends kQ{constructor(e,t,n,r){let i=-1;if(super(e,t),BQ(this,`space`,r),typeof n==`number`)for(;++i<RQ.length;){let e=RQ[i];BQ(this,RQ[i],(n&AQ[e])===AQ[e])}}};zQ.prototype.defined=!0;function BQ(e,t,n){n&&(e[t]=n)}function VQ(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new zQ(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[OQ(r)]=r,n[OQ(a.attribute)]=r}return new EQ(t,n,e.space)}var HQ=VQ({properties:{ariaActiveDescendant:null,ariaAtomic:MQ,ariaAutoComplete:null,ariaBusy:MQ,ariaChecked:MQ,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:PQ,ariaCurrent:null,ariaDescribedBy:PQ,ariaDetails:null,ariaDisabled:MQ,ariaDropEffect:PQ,ariaErrorMessage:null,ariaExpanded:MQ,ariaFlowTo:PQ,ariaGrabbed:MQ,ariaHasPopup:null,ariaHidden:MQ,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:PQ,ariaLevel:$,ariaLive:null,ariaModal:MQ,ariaMultiLine:MQ,ariaMultiSelectable:MQ,ariaOrientation:null,ariaOwns:PQ,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:MQ,ariaReadOnly:MQ,ariaRelevant:null,ariaRequired:MQ,ariaRoleDescription:PQ,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:MQ,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function UQ(e,t){return t in e?e[t]:t}function WQ(e,t){return UQ(e,t.toLowerCase())}var jme=VQ({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:FQ,acceptCharset:PQ,accessKey:PQ,action:null,allow:null,allowFullScreen:jQ,allowPaymentRequest:jQ,allowUserMedia:jQ,alt:null,as:null,async:jQ,autoCapitalize:null,autoComplete:PQ,autoFocus:jQ,autoPlay:jQ,blocking:PQ,capture:null,charSet:null,checked:jQ,cite:null,className:PQ,cols:$,colSpan:null,content:null,contentEditable:MQ,controls:jQ,controlsList:PQ,coords:$|FQ,crossOrigin:null,data:null,dateTime:null,decoding:null,default:jQ,defer:jQ,dir:null,dirName:null,disabled:jQ,download:NQ,draggable:MQ,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:jQ,formTarget:null,headers:PQ,height:$,hidden:NQ,high:$,href:null,hrefLang:null,htmlFor:PQ,httpEquiv:PQ,id:null,imageSizes:null,imageSrcSet:null,inert:jQ,inputMode:null,integrity:null,is:null,isMap:jQ,itemId:null,itemProp:PQ,itemRef:PQ,itemScope:jQ,itemType:PQ,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:jQ,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:jQ,muted:jQ,name:null,nonce:null,noModule:jQ,noValidate:jQ,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:jQ,optimum:$,pattern:null,ping:PQ,placeholder:null,playsInline:jQ,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:jQ,referrerPolicy:null,rel:PQ,required:jQ,reversed:jQ,rows:$,rowSpan:$,sandbox:PQ,scope:null,scoped:jQ,seamless:jQ,selected:jQ,shadowRootClonable:jQ,shadowRootDelegatesFocus:jQ,shadowRootMode:null,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:MQ,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:jQ,useMap:null,value:MQ,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:PQ,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:jQ,declare:jQ,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:jQ,noHref:jQ,noShade:jQ,noWrap:jQ,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:MQ,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:jQ,disableRemotePlayback:jQ,prefix:null,property:null,results:$,security:null,unselectable:null},space:`html`,transform:WQ}),Mme=VQ({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:IQ,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:PQ,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:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:jQ,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,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:FQ,g2:FQ,glyphName:FQ,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:IQ,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,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:$,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:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:PQ,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:IQ,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:IQ,rev:IQ,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:IQ,requiredFeatures:IQ,requiredFonts:IQ,requiredFormats:IQ,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:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:IQ,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:IQ,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:IQ,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:UQ}),GQ=VQ({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()}}),KQ=VQ({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:WQ}),qQ=VQ({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Nme=/[A-Z]/g,JQ=/-[a-z]/g,Pme=/^data[-\w.:]+$/i;function Fme(e,t){let n=OQ(t),r=t,i=kQ;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Pme.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(JQ,Lme);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!JQ.test(e)){let n=e.replace(Nme,Ime);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=zQ}return new i(r,t)}function Ime(e){return`-`+e.toLowerCase()}function Lme(e){return e.charAt(1).toUpperCase()}var Rme=DQ([HQ,jme,GQ,KQ,qQ],`html`),zme=DQ([HQ,Mme,GQ,KQ,qQ],`svg`);function YQ(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 XQ=/[#.]/g;function Bme(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){XQ.lastIndex=i;let e=XQ.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 ZQ(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function QQ(e,t,n){let r=n?Wme(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=Bme(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Vme(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Hme(e,o.properties,t,n)}for(let e of a)$Q(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Vme(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 Hme(e,t,n,r){let i=Fme(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?ZQ(r):i.commaSeparated?YQ(r):i.commaOrSpaceSeparated?ZQ(YQ(r).join(` `)):e$(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Ume(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(e$(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function $Q(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)$Q(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?$Q(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function e$(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||OQ(n)===OQ(t)))return!0}return n}function Ume(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Wme(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Gme=`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(`.`),Kme=QQ(Rme,`div`);QQ(zme,`g`,Gme);var qme=`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(`.`),t$={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 n$(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function Jme(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Yme(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function r$(e){return Yme(e)||n$(e)}var i$=document.createElement(`i`);function a$(e){let t=`&`+e+`;`;i$.innerHTML=t;let n=i$.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}var Xme=[``,`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 Zme(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`?r$:u===`decimal`?n$:Jme;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&qme.includes(y)&&(_=y,v=a$(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`&&a$(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=``):r$(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(Qme(e))h(7,S),C=`�`;else if(e in t$)h(6,S),C=t$[e];else{let t=``;$me(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,Xme[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function Qme(e){return e>=55296&&e<=57343||e>1114111}function $me(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 ehe=0,o$={},s$={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++ehe}),e.__id},clone:function e(t,n){n||={};var r,i;switch(s$.util.type(t)){case`Object`:if(i=s$.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=s$.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:o$,plaintext:o$,text:o$,txt:o$,extend:function(e,t){var n=s$.util.clone(s$.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r||=s$.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,s$.languages.DFS(s$.languages,function(t,n){n===c&&t!=e&&(this[t]=a)}),a},DFS:function e(t,n,r,i){i||={};var a=s$.util.objId;for(var o in t)if(t.hasOwnProperty(o)){n.call(t,o,t[o],r||o);var s=t[o],c=s$.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(s$.hooks.run(`before-tokenize`,r),!r.grammar)throw Error(`The language "`+r.language+`" has no grammar.`);return r.tokens=s$.tokenize(r.code,r.grammar),s$.hooks.run(`after-tokenize`,r),c$.stringify(s$.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 the;return d$(i,i.head,e),u$(e,i,t,i.head,0),rhe(i)},hooks:{all:{},add:function(e,t){var n=s$.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=s$.hooks.all[e];if(!(!n||!n.length))for(var r=0,i;i=n[r++];)i(t)}},Token:c$};function c$(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}function l$(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 u$(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 c$)){var y=1,b;if(f){if(b=l$(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 c$)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=l$(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=d$(t,k,E),_+=E.length),nhe(t,k,y);var A=new c$(o,u?s$.tokenize(T,u):T,p,T);if(g=d$(t,k,A),D&&d$(t,g,D),y>1){var j={cause:o+`,`+c,reach:O};u$(e,t,n,g.prev,_,j),a&&j.reach>a.reach&&(a.reach=j.reach)}}}}}}function the(){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 d$(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 nhe(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 rhe(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}var f$=s$;function p$(){}p$.prototype=f$;var m$=new p$;m$.highlight=ihe,m$.register=ahe,m$.alias=ohe,m$.registered=she,m$.listLanguages=che,m$.util.encode=lhe,m$.Token.stringify=h$;function ihe(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(m$.languages,r))n=m$.languages[r];else throw Error("Unknown language: `"+r+"` is not registered")}return{type:`root`,children:f$.highlight.call(m$,e,n,r)}}function ahe(e){if(typeof e!=`function`||!e.displayName)throw Error("Expected `function` for `syntax`, got `"+e+"`");Object.hasOwn(m$.languages,e.displayName)||e(m$)}function ohe(e,t){let n=m$.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 she(e){if(typeof e!=`string`)throw TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Object.hasOwn(m$.languages,e)}function che(){let e=m$.languages,t=[],n;for(n in e)Object.hasOwn(e,n)&&typeof e[n]==`object`&&t.push(n);return t}function h$(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(h$(e[r],t));return n}let n={attributes:{},classes:[`token`,e.type],content:h$(e.content,t),language:t,tag:`span`,type:e.type};return e.alias&&n.classes.push(...typeof e.alias==`string`?[e.alias]:e.alias),m$.hooks.run(`wrap`,n),Kme(n.tag+`.`+n.classes.join(`.`),uhe(n.attributes),n.content)}function lhe(e){return e}function uhe(e){let t;for(t in e)Object.hasOwn(e,t)&&(e[t]=Zme(e[t]));return e}var g$=kme(m$,{});g$.registerLanguage=function(e,t){return m$.register(t)},g$.alias=function(e,t){return m$.alias(e,t)},_$.displayName=`clike`,_$.aliases=[];function _$(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:/[{}[\];(),.:]/}}v$.displayName=`javascript`,v$.aliases=[`js`];function v$(e){e.register(_$),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}y$.displayName=`json`,y$.aliases=[`webmanifest`];function y$(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}b$.displayName=`typescript`,b$.aliases=[`ts`];function b$(e){e.register(v$),(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 dhe=b$,fhe=1500;function x$(){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),fhe)}catch(e){console.error(`Clipboard write failed`,e)}},[])}}function S$({value:e,label:t,className:n,stopPropagation:r}){let{copied:i,copy:a}=x$();return(0,H.jsx)(`button`,{type:`button`,"aria-label":t,onClick:t=>{r&&t.stopPropagation(),a(e)},className:fG(`text-quaternary-foreground hover:text-foreground`,n),children:i?(0,H.jsx)(Kr,{className:`size-3.5`}):(0,H.jsx)(ti,{className:`size-3.5`})})}var C$={'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%)`}},w$=`#121212`,phe=`#3d6b69`,T$=`#c55a44`,E$=`#707070`,D$=`transparent`,O$=`"JetBrains Mono Variable", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,k$={...C$,'code[class*="language-"]':{...C$[`code[class*="language-"]`],background:D$,color:w$,fontFamily:O$},'pre[class*="language-"]':{...C$[`pre[class*="language-"]`],background:D$,color:w$,fontFamily:O$,padding:0,margin:0,overflow:`visible`},property:{color:w$},string:{color:phe},number:{color:T$},boolean:{color:T$},punctuation:{color:E$},operator:{color:E$},".language-json .token.operator":{color:E$},".language-json .token.null.keyword":{color:E$}};g$.registerLanguage(`typescript`,dhe);var mhe=`https://docs.skybridge.tech/test/evals`,hhe=`import { anthropic } from "@ai-sdk/anthropic";
|
|
212
|
+
import { start } from "@skybridge/test";
|
|
213
|
+
import { expect, it } from "vitest";
|
|
214
|
+
import { app } from "../src/server.js";
|
|
215
|
+
|
|
216
|
+
it("reaches the search tool from a natural prompt", async () => {
|
|
217
|
+
const chat = await start({ app, model: anthropic("claude-sonnet-4-5") });
|
|
218
|
+
await chat.send("Find me running shoes under 100 dollars");
|
|
219
|
+
|
|
220
|
+
expect.chat(chat).toHaveCalledToolWith("search-products", {
|
|
221
|
+
query: "running shoes",
|
|
222
|
+
});
|
|
223
|
+
});`,A$=`First, make sure the Skybridge skill is installed and up to date:
|
|
224
|
+
|
|
225
|
+
npx skills add alpic-ai/skybridge -s skybridge
|
|
226
|
+
|
|
227
|
+
Then set up evals for this app, following the skill's evals reference.`;function j$({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)(g$,{language:`typescript`,style:k$,customStyle:{margin:0,padding:0,background:`transparent`,fontSize:`0.75rem`},codeTagProps:{className:`font-mono whitespace-pre`},children:t})}):(0,H.jsx)(`pre`,{className:fG(`overflow-x-auto px-4 py-3 font-mono text-xs leading-relaxed`,r&&`whitespace-pre-wrap`),children:t})]})}function ghe(){let{copied:e,copy:t}=x$();return(0,H.jsx)(j$,{label:`Paste this to your coding agent`,code:A$,wrap:!0,action:(0,H.jsxs)(ta,{variant:`cta`,onClick:()=>t(A$),children:[e?(0,H.jsx)(Kr,{className:`size-3.5`}):(0,H.jsx)(ti,{className:`size-3.5`}),e?`Copied`:`Copy`]})})}function _he(){let[,e]=MS();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)(ta,{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)(Ei,{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)(j$,{label:`evals/search.eval.ts`,code:hhe,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)(ghe,{})]}),(0,H.jsx)(ta,{asChild:!0,variant:`tertiary`,className:`self-start`,children:(0,H.jsxs)(`a`,{href:mhe,target:`_blank`,rel:`noreferrer noopener`,children:[(0,H.jsx)(ni,{className:`size-3.5`}),`Read the evals docs`]})})]})]})}function M$({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,H.jsx)(uz,{"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 vhe={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 yhe({status:e}){let t=vhe[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 bhe=Fi([`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 xhe({className:e,variant:t,...n}){return(0,H.jsx)(`div`,{role:`alert`,className:Mr(bhe({variant:t}),e),...n})}function She({className:e,...t}){return(0,H.jsx)(`p`,{className:Mr(`type-text-sm font-semibold leading-snug`,e),...t})}function Che({className:e,...t}){return(0,H.jsx)(`div`,{className:Mr(`type-text-sm text-muted-foreground [&_p]:leading-relaxed`,e),...t})}function N$({title:e,description:t,className:n}){return(0,H.jsxs)(xhe,{variant:`warning`,className:n,children:[(0,H.jsx)(Ai,{}),(0,H.jsx)(She,{children:e}),(0,H.jsx)(Che,{children:t})]})}var whe=Fi(`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 P$({className:e,variant:t,size:n,...r}){return(0,H.jsx)(li,{role:`status`,"aria-label":`Loading`,className:Mr(whe({variant:t,size:n}),e),...r})}var The=Fi(`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 F$({className:e,variant:t,pulse:n,...r}){return(0,H.jsx)(`div`,{className:Mr(The({variant:t,pulse:n}),e),...r})}var Ehe=q({id:W(),name:W()}),Dhe=dm(`state`,[q({state:J(`signedOut`)}),q({state:J(`noTeam`)}),q({state:J(`needsProject`),teams:K(Ehe),defaultTeamId:W(),staleConfig:Zp().optional()}),q({state:J(`ready`),lastDeployGit:q({ref:W().nullable(),commitMessage:W().nullable(),author:W().nullable()}).nullable().optional(),lastDeployStatus:_m([`ongoing`,`deployed`,`failed`,`canceled`]).optional(),lastDeployStartedAt:G().optional(),mcpServerUrl:W().optional(),deploymentPageUrl:W().nullable().optional()}),q({state:J(`error`),message:W()})]),Ohe=dm(`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()})]),I$=`/__skybridge/deploy`;async function L$(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 R$=()=>({status:`deploying`,startedAt:Date.now(),deploymentPageUrl:null}),z$=ss()((e,t)=>({status:{state:`loading`},progress:{status:`idle`},async refreshStatus(){try{let t=await fetch(`${I$}/status`),n=Dhe.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 L$(`${I$}/login`,void 0,`Sign-in failed`),await t().refreshStatus()},async createAndDeploy(t,n,r){e({progress:R$()});try{await L$(`${I$}/project`,{name:t,teamId:n,teamName:r},`Failed to create project`)}catch(t){throw e({progress:{status:`idle`}}),t}},async redeploy(){e({progress:R$()});try{await L$(I$,void 0,`Failed to deploy`)}catch(t){throw e({progress:{status:`idle`}}),t}},connect(){let n=new EventSource(`${I$}/events`);return n.addEventListener(`state`,n=>{try{let r=Ohe.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 khe(){let e=z$(e=>e.connect),t=z$(e=>e.refreshStatus),n=z$(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 Ahe=dm(`status`,[q({status:J(`idle`)}),q({status:J(`starting`),message:W()}),q({status:J(`connected`),url:W()}),q({status:J(`error`),message:W()})]),B$=`/__skybridge/tunnel`,V$=ss()((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(B$,{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(B$,{method:`DELETE`})}catch{}},connect(){let t=new EventSource(`${B$}/events`);return t.addEventListener(`state`,t=>{if(t instanceof MessageEvent)try{let n=Ahe.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 jhe(){let e=V$(e=>e.connect);(0,b.useEffect)(()=>e(),[e])}var Mhe=Object.defineProperty,H$=(e,t)=>Mhe(e,`name`,{value:t,configurable:!0}),U$=!!(typeof window<`u`&&window.document&&window.document.createElement);function W$(e,t,{checkForDefaultPrevented:n=!0}={}){return H$(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}H$(W$,`composeEventHandlers`);function Nhe(e){if(!U$)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}H$(Nhe,`getOwnerWindow`);function G$(e){if(!U$)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}H$(G$,`getOwnerDocument`);function K$(e,t=!1){let{activeElement:n}=G$(e);if(!n?.nodeName)return null;if(q$(n)&&n.contentDocument)return K$(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=G$(n).getElementById(e);if(t)return t}}return n}H$(K$,`getActiveElement`);function q$(e){return e.tagName===`IFRAME`}H$(q$,`isFrame`);var Phe=Object.defineProperty,J$=(e,t)=>Phe(e,`name`,{value:t,configurable:!0});function Fhe(e,t){let n=b.createContext(t);n.displayName=e+`Context`;let r=J$(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 J$(i,`useContext`),[r,i]}J$(Fhe,`createContext`);function Y$(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=J$(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 J$(s,`useContext`),[o,s]}J$(r,`createContext`);let i=J$(()=>{let t=n.map(e=>b.createContext(e));return J$(function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,X$(i,...t)]}J$(Y$,`createContextScope`);function X$(...e){let t=e[0];if(e.length===1)return t;let n=J$(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return J$(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}J$(X$,`composeContextScopes`);var Ihe=Object.defineProperty,Lhe=(e,t)=>Ihe(e,`name`,{value:t,configurable:!0}),Z$=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=KR(`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 Q$(e,t){e&&PS.flushSync(()=>e.dispatchEvent(t))}Lhe(Q$,`dispatchDiscreteCustomEvent`);var Rhe=Object.defineProperty,zhe=(e,t)=>Rhe(e,`name`,{value:t,configurable:!0});function $$(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}zhe($$,`useCallbackRef`);var Bhe=Object.defineProperty,e1=(e,t)=>Bhe(e,`name`,{value:t,configurable:!0}),t1=`dismissableLayer.update`,Vhe=`dismissableLayer.pointerDownOutside`,Hhe=`dismissableLayer.focusOutside`,n1,r1=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Uhe=b.forwardRef(e1(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(r1),[d,f]=b.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=b.useState({}),h=HR(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=i1(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=a1(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=$$(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&&(n1=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),o1(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=n1))}},[d,p,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),o1())},[d,u]),b.useEffect(()=>{let e=e1(()=>m({}),`handleUpdate`);return document.addEventListener(t1,e),()=>document.removeEventListener(t1,e)},[]),(0,H.jsx)(Z$.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:W$(e.onFocusCapture,T.onFocusCapture),onBlurCapture:W$(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:W$(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function Whe(){let e=b.useContext(r1),[t,n]=b.useState(null);return b.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}e1(Whe,`useDismissableLayerSurface`);var Ghe=e1(()=>!0,`IS_TRUE`);function i1(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Ghe}=t,s=$$(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()}e1(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}e1(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)}e1(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}e1(p,`handleInteractionBubble`);let m=e1(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||s1(Vhe,s,p,{discrete:!0})};if(e1(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:e1(()=>c.current=!0,`onPointerDownCapture`)}}e1(i1,`usePointerDownOutside`);function a1(e,t=globalThis?.document){let n=$$(e),r=b.useRef(!1);return b.useEffect(()=>{let e=e1(e=>{e.target&&!r.current&&s1(Hhe,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:e1(()=>r.current=!0,`onFocusCapture`),onBlurCapture:e1(()=>r.current=!1,`onBlurCapture`)}}e1(a1,`useFocusOutside`);function o1(){let e=new CustomEvent(t1);document.dispatchEvent(e)}e1(o1,`dispatchUpdate`);function s1(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?Q$(i,a):i.dispatchEvent(a)}e1(s1,`handleAndDispatchCustomEvent`);var c1=globalThis?.document?b.useLayoutEffect:()=>{},Khe=Object.defineProperty,qhe=(e,t)=>Khe(e,`name`,{value:t,configurable:!0}),Jhe=b.useId||(()=>void 0),Yhe=0;function l1(e){let[t,n]=b.useState(Jhe());return c1(()=>{e||n(e=>e??String(Yhe++))},[e]),e||(t?`radix-${t}`:``)}qhe(l1,`useId`);var Xhe=Object.defineProperty,Zhe=b.forwardRef(((e,t)=>Xhe(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,H.jsx)(Z$.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`)),Qhe=Object.defineProperty,$he=(e,t)=>Qhe(e,`name`,{value:t,configurable:!0});function u1(e){let[t,n]=b.useState(void 0);return c1(()=>{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}$he(u1,`useSize`);var ege=Object.defineProperty,d1=(e,t)=>ege(e,`name`,{value:t,configurable:!0}),f1=`Popper`,[p1,m1]=Y$(f1),[tge,h1]=p1(f1),nge=d1(e=>{let{__scopePopper:t,children:n}=e,[r,i]=b.useState(null),[a,o]=b.useState(void 0);return(0,H.jsx)(tge,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),rge=`PopperAnchor`,ige=b.forwardRef(d1(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=h1(rge,n),o=b.useRef(null),s=a.onAnchorChange,c=HR(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&&v1(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,H.jsx)(Z$.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),g1=`PopperContent`,[age,oge]=p1(g1),sge=b.forwardRef(d1(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=h1(g1,n),[_,v]=b.useState(null),y=HR(t,v),[x,S]=b.useState(null),C=u1(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(_1),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=Bq({strategy:`fixed`,placement:E,whileElementsMounted:d1((...e)=>Eq(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[Hq({mainAxis:i+T,alignmentAxis:o}),c&&Uq({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Wq():void 0,...A}),c&&Gq({...A}),Kq({...A,apply:d1(({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&&Jq({element:x,padding:s}),dge({arrowWidth:w,arrowHeight:T}),f&&qq({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),I=g.setPlacementState;c1(()=>(I(N),()=>{I(void 0)}),[N,I]);let[L,ee]=v1(N),te=$$(m);c1(()=>{P&&te?.()},[P,te]);let ne=F.arrow?.x,R=F.arrow?.y,z=F.arrow?.centerOffset!==0,[B,re]=b.useState();return c1(()=>{_&&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)(age,{scope:n,placedSide:L,placedAlign:ee,onArrowChange:S,arrowX:ne,arrowY:R,shouldHideArrow:z,children:(0,H.jsx)(Z$.div,{"data-side":L,"data-align":ee,...h,ref:y,style:{...h.style,animation:P?h.style?.animation:`none`}})})})},`PopperContent`)),cge=`PopperArrow`,lge={top:`bottom`,right:`left`,bottom:`top`,left:`right`},uge=b.forwardRef(d1(function(e,t){let{__scopePopper:n,...r}=e,i=oge(cge,n),a=lge[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)(Zhe,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function _1(e){return e!==null}d1(_1,`isNotNull`);var dge=d1(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]=v1(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 v1(e){let[t,n=`center`]=e.split(`-`);return[t,n]}d1(v1,`getSideAndAlignFromPlacement`);var fge=Object.defineProperty,pge=b.forwardRef(((e,t)=>fge(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=b.useState(!1);c1(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?PS.createPortal((0,H.jsx)(Z$.div,{...r,ref:t}),o):null},`Portal`)),mge=Object.defineProperty,y1=(e,t)=>mge(e,`name`,{value:t,configurable:!0});function b1(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}y1(b1,`useStateMachine`);var x1=y1(e=>{let{present:t,children:n}=e,r=S1(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=w1(r.ref,E1(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null},`Presence`);function S1(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]=b1(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??T1(r.current),o.current=void 0):a.current=`none`},[s]),c1(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=T1(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]),c1(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=y1(a=>{let o=T1(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=y1(e=>{e.target===t&&(a.current=T1(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=T1(t)}else r.current=null;n(e)},[])}}y1(S1,`usePresence`);function C1(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}y1(C1,`setRef`);function w1(...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=C1(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():C1(n[e],null)}}},[])}y1(w1,`useStableComposedRefs`);function T1(e){return e?.animationName||`none`}y1(T1,`getAnimationName`);function E1(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)}y1(E1,`getElementRef`);var hge=Object.defineProperty,gge=(e,t)=>hge(e,`name`,{value:t,configurable:!0}),D1=b.useEffectEvent,O1=b.useInsertionEffect;function k1(e){if(typeof D1==`function`)return D1(e);let t=b.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof O1==`function`?O1(()=>{t.current=e}):c1(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}gge(k1,`useEffectEvent`);var _ge=Object.defineProperty,A1=(e,t)=>_ge(e,`name`,{value:t,configurable:!0}),vge=b.useInsertionEffect||c1;function j1({prop:e,defaultProp:t,onChange:n=A1(()=>{},`onChange`),caller:r}){let[i,a,o]=M1({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,b.useCallback(t=>{if(s){let n=N1(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}A1(j1,`useControllableState`);function M1({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return vge(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}A1(M1,`useUncontrolledState`);function N1(e){return typeof e==`function`}A1(N1,`isFunction`);var P1=Symbol(`RADIX:SYNC_STATE`);function yge(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=k1(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=b.useReducer((t,n)=>{if(n.type===P1)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:P1,state:i})},[i,d.state,c]),[h,f]}A1(yge,`useControllableStateReducer`);var bge=Object.defineProperty,xge=(e,t)=>bge(e,`name`,{value:t,configurable:!0}),Sge=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`}),Cge=b.forwardRef(xge(function(e,t){return(0,H.jsx)(Z$.span,{...e,ref:t,style:{...Sge,...e.style}})},`VisuallyHidden`)),wge=Object.defineProperty,F1=(e,t)=>wge(e,`name`,{value:t,configurable:!0}),[I1,Tge]=Y$(`Tooltip`,[m1]),L1=m1(),Ege=`TooltipProvider`,Dge=700,R1=`tooltip.open`,[Oge,z1]=I1(Ege),kge=F1(e=>{let{__scopeTooltip:t,delayDuration:n=Dge,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)(Oge,{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`),B1=`Tooltip`,[Age,V1]=I1(B1),jge=F1(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=z1(B1,e.__scopeTooltip),l=L1(t),[u,d]=b.useState(null),[f,p]=b.useState(void 0),m=l1(),h=b.useRef(0),g=o??c.disableHoverableContent,_=s??c.delayDuration,v=b.useRef(!1),[y,x]=j1({prop:r,defaultProp:i??!1,onChange:F1(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(R1))):c.onClose(),a?.(e)},`onChange`),caller:B1}),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)(nge,{...l,children:(0,H.jsx)(Age,{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`),H1=`TooltipTrigger`,Mge=b.forwardRef(F1(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=V1(H1,n),o=z1(H1,n),s=L1(n),c=HR(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)(ige,{asChild:!0,...s,children:(0,H.jsx)(Z$.button,{"aria-describedby":a.open?t0(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:W$(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:W$(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:W$(e.onPointerDown,()=>{a.open&&a.onClose(),l.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:W$(e.onFocus,()=>{l.current||a.onOpen()}),onBlur:W$(e.onBlur,a.onClose),onClick:W$(e.onClick,a.onClose)})})},`TooltipTrigger`)),U1=`TooltipPortal`,[Nge,Pge]=I1(U1,{forceMount:void 0}),W1=F1(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=V1(U1,t);return(0,H.jsx)(Nge,{scope:t,forceMount:n,children:(0,H.jsx)(x1,{present:n||a.open,children:(0,H.jsx)(pge,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),G1=`TooltipContent`,K1=b.forwardRef(F1(function(e,t){let n=Pge(G1,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=V1(G1,e.__scopeTooltip);return(0,H.jsx)(x1,{present:r||o.open,children:o.disableHoverableContent?(0,H.jsx)(q1,{side:i,...a,ref:t}):(0,H.jsx)(Fge,{side:i,...a,ref:t})})},`TooltipContent`)),Fge=b.forwardRef(F1(function(e,t){let n=V1(G1,e.__scopeTooltip),r=z1(G1,e.__scopeTooltip),i=b.useRef(null),a=HR(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=X1(r,Y1(r,n.getBoundingClientRect())),a=Z1(t.getBoundingClientRect()),o=$1([...i,...a]);s(o),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(c&&u){let e=F1(e=>p(e,u),`handleTriggerLeave`),t=F1(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=F1(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Q1(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)(q1,{...e,ref:a})},`TooltipContentHoverable`)),Ige=YR(`TooltipContent`),q1=b.forwardRef(F1(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=V1(G1,n),u=L1(n),{onClose:d}=l;b.useEffect(()=>(document.addEventListener(R1,d),()=>document.removeEventListener(R1,d)),[d]),b.useEffect(()=>{if(l.trigger){let e=F1(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 c1(()=>(f(a),()=>{f(void 0)}),[a,f]),(0,H.jsx)(Uhe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,H.jsxs)(sge,{"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)(Ige,{children:r}),i?(0,H.jsx)(Cge,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`)),J1=b.forwardRef(F1(function(e,t){let{__scopeTooltip:n,...r}=e,i=L1(n);return(0,H.jsx)(uge,{...i,...r,ref:t})},`TooltipArrow`));function Y1(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`)}}F1(Y1,`getExitSideFromRect`);function X1(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}F1(X1,`getPaddedExitPoints`);function Z1(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}]}F1(Z1,`getPointsFromRect`);function Q1(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}F1(Q1,`isPointInPolygon`);function $1(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)),e0(t)}F1($1,`getHull`);function e0(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)}F1(e0,`getHullPresorted`);function t0(...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}F1(t0,`concatAriaDescribedby`);function Lge({delayDuration:e=0,...t}){return(0,H.jsx)(kge,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function n0({...e}){return(0,H.jsx)(Lge,{children:(0,H.jsx)(jge,{"data-slot":`tooltip`,...e})})}function r0({...e}){return(0,H.jsx)(Mge,{"data-slot":`tooltip-trigger`,...e})}function i0({className:e,sideOffset:t=6,children:n,...r}){return(0,H.jsx)(W1,{children:(0,H.jsxs)(K1,{"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)(J1,{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]`})]})})}function a0({className:e,...t}){return(0,H.jsx)(Jz,{"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 Rge({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)(a0,{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)(n0,{children:[(0,H.jsx)(r0,{asChild:!0,children:(0,H.jsx)(oi,{className:`size-4 text-muted-foreground`})}),(0,H.jsx)(i0,{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 zge={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 o0({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=zge[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)(Rge,{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})}function Bge({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)(zk,{open:e,onOpenChange:t,children:(0,H.jsxs)(Bk,{children:[(0,H.jsxs)(Vk,{children:[(0,H.jsx)(Uk,{children:`Deploy to Alpic`}),(0,H.jsx)(Wk,{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)(a0,{htmlFor:s,children:`Project name`}),(0,H.jsx)(o0,{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)(sX,{value:u,onValueChange:d,children:[(0,H.jsx)(lX,{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)(cX,{})}),(0,H.jsx)(uX,{align:`start`,className:`min-w-48`,children:r.map(e=>(0,H.jsx)(dX,{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)(Hk,{children:[(0,H.jsx)(ta,{type:`button`,variant:`secondary`,onClick:()=>t(!1),children:`Cancel`}),(0,H.jsx)(ta,{type:`submit`,variant:`primary`,disabled:!g||m,children:m?`Creating…`:`Create & deploy`})]})]})]})})}var Vge={idle:{variant:`muted`,pulse:!1},starting:{variant:`warning`,pulse:!0},connected:{variant:`success`,pulse:!1},error:{variant:`destructive`,pulse:!1}},Hge=120,s0=`max-w-[200px]`;function Uge(){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),Hge)},[])}}function c0({trigger:e,className:t,children:n}){let{open:r,setOpen:i,onEnter:a,onLeave:o}=Uge(),s=(0,b.useId)();return(0,H.jsxs)(HJ,{open:r,onOpenChange:i,children:[(0,H.jsx)(WJ,{asChild:!0,children:(0,b.cloneElement)(e,{onMouseEnter:a,onMouseLeave:o,"data-popover-anchor":s})}),(0,H.jsx)(GJ,{align:`end`,sideOffset:0,className:fG(`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 l0({label:e,icon:t,buildUrl:n,description:r}){let i=V$(e=>e.state),a=V$(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)(c0,{className:`w-72`,trigger:(0,H.jsx)(ta,{variant:`secondary`,"aria-disabled":d,className:fG(d&&`opacity-50 cursor-not-allowed`),icon:u?(0,H.jsx)(P$,{size:`sm`,className:`text-current`}):t,onClick:d?void 0:l,children:e}),children:c?(0,H.jsx)(`p`,{className:fG(`text-sm text-muted-foreground text-center mx-auto`,s0),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 Wge(){return(0,H.jsx)(l0,{label:`Playground`,icon:(0,H.jsx)(mi,{className:`size-3.5`}),buildUrl:e=>`${e}/try`,description:`Chat with your MCP server with a real LLM and share it`})}function Gge(){return(0,H.jsx)(l0,{label:`Audit`,icon:(0,H.jsx)($r,{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 Kge=`https://app.alpic.ai`;function qge(){let e=z$(e=>e.status.state===`ready`&&e.status.mcpServerUrl?e.status.mcpServerUrl:e.progress.status===`deployed`?e.progress.mcpServerUrl:null),{copied:t,copy:n}=x$();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)(ai,{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)(ti,{className:`size-3.5`})})]})}function Jge(){let{status:e,progress:t,redeploy:n,createAndDeploy:r,signIn:i}=z$(),a=KE(),[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)(c0,{className:`w-72`,trigger:(0,H.jsx)(ta,{variant:`cta`,className:fG(`h-8 px-2 gap-1`,m&&`opacity-50 cursor-not-allowed`),"aria-disabled":m,icon:c?(0,H.jsx)(P$,{size:`sm`,className:`text-current`}):(0,H.jsx)(F$,{className:`size-2`,...Zge(e,t),"aria-hidden":!0}),onClick:m?void 0:_,children:`Deploy`}),children:(0,H.jsx)(Yge,{status:e,progress:t,signingIn:c,actionError:u,onRedeploy:g,onSignIn:h})}),e.state===`needsProject`&&(0,H.jsx)(Bge,{open:o,onOpenChange:s,defaultName:a?.name??`my-mcp-app`,teams:e.teams,defaultTeamId:e.defaultTeamId,staleConfig:e.staleConfig,onCreate:r})]})}function Yge({status:e,progress:t,signingIn:n,actionError:r,onRedeploy:i,onSignIn:a}){if(t.status===`deploying`)return(0,H.jsx)(u0,{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)(d0,{url:t.mcpServerUrl}),t.deploymentPageUrl&&(0,H.jsx)(f0,{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)(p0,{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)(ta,{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)(p0,{href:Kge,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)(u0,{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)(d0,{url:e.mcpServerUrl})]}),e.deploymentPageUrl&&(0,H.jsx)(f0,{href:e.deploymentPageUrl}),e.lastDeployGit&&(0,H.jsx)(N$,{className:`px-3 py-2`,title:`Last deployed from Git`,description:(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(Qge,{git:e.lastDeployGit}),(0,H.jsx)(ta,{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 Xge(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 u0({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)(P$,{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:Xge(n)})]}),t&&(0,H.jsx)(p0,{href:t,label:`Go to logs`})]})}function Zge(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 d0({url:e}){let{copied:t,copy:n}=x$();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)(ti,{className:`size-3.5`})})]})}function f0({href:e}){return(0,H.jsx)(ta,{asChild:!0,variant:`tertiary`,className:`w-full`,children:(0,H.jsxs)(`a`,{href:e,target:`_blank`,rel:`noreferrer noopener`,children:[(0,H.jsx)(ni,{className:`size-3.5`}),`Go to deployment page`]})})}function Qge({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 p0({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)(ni,{className:`size-3.5`}),t]})}function $ge(){let{state:e,start:t,stop:n}=V$(),{copied:r,copy:i}=x$(),a=e.status===`connected`?`${e.url}/mcp`:null,o=a?()=>i(a):e.status===`starting`?n:t;return(0,H.jsxs)(c0,{className:fG(`w-60 text-center`,e.status===`starting`&&`animate-pulse w-60`),trigger:(0,H.jsxs)(ta,{variant:`secondary`,onClick:o,children:[(0,H.jsx)(F$,{className:`size-2`,...Vge[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)(ti,{className:`size-3.5`})]}):`Tunnel`]}),children:[e.status===`idle`&&(0,H.jsx)(e_e,{}),e.status===`error`&&(0,H.jsx)(t_e,{message:e.message,onRetry:t}),e.status===`starting`&&(0,H.jsx)(n_e,{message:e.message}),e.status===`connected`&&(0,H.jsx)(r_e,{onStop:n})]})}function e_e(){return(0,H.jsx)(`div`,{className:`space-y-3`,children:(0,H.jsx)(`p`,{className:fG(`text-sm text-muted-foreground mx-auto`,s0),children:`Get a public URL that you can use in Claude or ChatGPT.`})})}function t_e({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)(ta,{variant:`primary`,className:`w-full`,onClick:t,children:`Retry`})]})}function n_e({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)(F$,{className:`size-2`,variant:`warning`,pulse:!0,"aria-hidden":!0}),(0,H.jsx)(`p`,{className:fG(`text-sm text-muted-foreground`,s0),children:e}),(0,H.jsx)(P$,{size:`sm`,className:`text-current`})]})})}function r_e({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)(M$,{}),(0,H.jsx)(ta,{variant:`tertiary`,className:`w-full`,onClick:e,icon:(0,H.jsx)(ji,{}),children:`Stop tunnel`})]})}var i_e=[{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 a_e({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)(ta,{asChild:!0,variant:`tertiary`,children:(0,H.jsxs)(`a`,{href:e.href,target:`_blank`,rel:`noreferrer noopener`,children:[(0,H.jsx)(ni,{className:`size-3.5`}),e.label]})},e.href))})]})}function o_e(){let[e,t]=(0,b.useState)(!1);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ta,{variant:`tertiary`,onClick:()=>t(!0),children:`webmcp`}),(0,H.jsx)(zk,{open:e,onOpenChange:t,children:(0,H.jsxs)(Bk,{size:`lg`,children:[(0,H.jsxs)(Vk,{children:[(0,H.jsx)(Uk,{children:`WebMCP`}),(0,H.jsx)(Wk,{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:i_e.map(e=>(0,H.jsx)(a_e,{tip:e},e.id))})]})})]})}var s_e=[{label:`discord`,href:`https://discord.gg/awV4gu74wK`},{label:`docs`,href:`https://docs.skybridge.tech/`},{label:`github`,href:`https://github.com/alpic-ai/skybridge`}];function c_e({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 l_e(){let[,e]=MS();return(0,H.jsxs)(ta,{variant:`tertiary`,className:`sparkle-twinkle`,onClick:()=>e(!0),children:[(0,H.jsx)(Ei,{className:`size-3.5`,"aria-hidden":!0}),`Discover Evals`]})}function u_e(){let e=KE(),t=e?.name??`skybridge`,n=e?.version;return(0,H.jsxs)(c_e,{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)(M$,{orientation:`vertical`,className:`h-4 self-center!`}),n&&(0,H.jsx)(`span`,{className:`font-mono text-xs text-quaternary-foreground`,children:n})]})}var d_e=()=>{let{status:e,requiresAuth:t,hasAuthRequiredTools:n,isSignedIn:r,error:i}=cs();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)(u_e,{}),(0,H.jsx)(l_e,{}),(0,H.jsx)(qge,{})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)($ge,{}),(0,H.jsx)(Wge,{}),(0,H.jsx)(Gge,{}),(0,H.jsx)(Jge,{})]}),(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)(yhe,{status:e}),t&&e===`authenticated`&&n&&!r&&(0,H.jsxs)(ta,{variant:`tertiary`,onClick:()=>HE(),children:[(0,H.jsx)(ui,{className:`size-3.5`}),`Sign in`]}),t&&e===`authenticated`&&r&&(0,H.jsxs)(ta,{variant:`tertiary`,onClick:()=>WE(),children:[(0,H.jsx)(di,{className:`size-3.5`}),`Sign out`]}),(0,H.jsxs)(`nav`,{className:`flex items-center gap-1 text-xs`,children:[(0,H.jsx)(o_e,{}),s_e.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)(ta,{asChild:!0,variant:`tertiary`,children:(0,H.jsx)(`a`,{href:e.href,target:`_blank`,rel:`noreferrer noopener`,children:e.label})})]},e.label))]})]})]})};function f_e({className:e,...t}){return(0,H.jsx)(RW,{"data-slot":`command`,className:Mr(`bg-popover text-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})}function p_e({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)(Ci,{className:`size-5 shrink-0 text-muted-foreground`}),(0,H.jsx)(RW.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 m_e({className:e,...t}){return(0,H.jsx)(RW.List,{"data-slot":`command-list`,className:Mr(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function h_e({...e}){return(0,H.jsx)(RW.Empty,{"data-slot":`command-empty`,className:`py-6 text-center type-text-sm text-muted-foreground`,...e})}function g_e({className:e,...t}){return(0,H.jsx)(RW.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 __e({className:e,...t}){return(0,H.jsx)(RW.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 m0(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 v_e(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 y_e(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 h0(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 b_e(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 x_e(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 S_e(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 C_e(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 g0(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 w_e(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 _0(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 v0(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 y0(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 b0(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 x0(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 T_e(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 E_e(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 D_e(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 O_e(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 S0(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 k_e(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 C0(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 A_e(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 w0(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 j_e(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 M_e(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 N_e(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 P_e(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 F_e(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 T0(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 E0(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 I_e(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 L_e(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 R_e(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 D0(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 O0=[{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 z_e(e,t){return typeof e==`string`&&t.includes(e)}var B_e=[{mode:`fullscreen`,icon:pi},{mode:`pip`,icon:_i},{mode:`inline`,icon:Di}];function V_e(e){let{userAgent:t,displayMode:n,previewClient:r,setPreference:i}=ps.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`);z_e(o,O0.map(e=>e.code))&&i(`locale`,o);let s=ps.getState();return`View preview options: displayMode=${s.displayMode}, theme=${s.theme}, locale=${s.locale}, device=${s.userAgent?.device?.type??`desktop`}.`}function H_e({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 k0=`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`,A0=`text-light-gray-foreground hover:bg-light-gray hover:text-foreground`,U_e=`bg-muted text-foreground`;function j0({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:fG(k0,`border border-border bg-background`,n?U_e:A0,i),children:[(0,H.jsx)(e,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:t})]})}function M0({icon:e,label:t,name:n,description:r,checked:i}){return(0,H.jsxs)(`label`,{className:fG(k0,`border border-border bg-background`,A0,`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 N0=({variant:e=`panel`,logsOpen:t,onOpenLogs:n,fullscreenInspectorOpen:r,onToggleFullscreenInspector:i})=>{let a=ps(e=>e.displayMode),o=ps(e=>e.theme),s=ps(e=>e.locale),c=ps(e=>e.userAgent),l=ps(e=>e.previewClient),u=ps(e=>e.setPreviewClient),d=ps(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=O0.find(e=>e.code===s)?.englishName??s,y=B_e.find(e=>e.mode===a)?.icon??Di;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=V_e(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:fG(`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)(M0,{icon:g?gi:Oi,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)(HJ,{open:p,onOpenChange:m,children:[(0,H.jsx)(UJ,{asChild:!0,children:(0,H.jsxs)(`button`,{type:`button`,"aria-label":`Locale`,className:fG(k0,`border border-border bg-background`,A0,`aria-expanded:bg-muted aria-expanded:text-foreground`),children:[(0,H.jsx)(si,{className:`size-3.5`}),(0,H.jsx)(`span`,{children:v})]})}),(0,H.jsx)(GJ,{className:`w-[260px] p-0`,align:`start`,children:(0,H.jsxs)(f_e,{children:[(0,H.jsx)(p_e,{placeholder:`Search locale...`}),(0,H.jsxs)(m_e,{children:[(0,H.jsx)(h_e,{children:`No locale found.`}),(0,H.jsx)(g_e,{children:O0.map(e=>(0,H.jsxs)(__e,{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:fG(`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)(H_e,{name:`locale`,description:`The BCP 47 locale code to preview the view in.`,value:s,options:O0.map(e=>e.code)})})]}),(0,H.jsx)(M0,{icon:_?Ti:hi,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)(j0,{icon:ri,label:`preview`,onClick:()=>u(`chatgpt`)}),!t&&(0,H.jsx)(j0,{icon:fi,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)(j0,{icon:Gr,label:`inspector`,ariaLabel:r?`Close DevTools inspector`:`Open DevTools inspector`,selected:r,onClick:i}),(0,H.jsx)(j0,{icon:Mi,label:`exit`,ariaLabel:`Exit fullscreen`,onClick:()=>d(`displayMode`,`inline`)})]}),e===`preview`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(j0,{icon:l===`claude`?x0:A_e,label:l===`claude`?`switch to ChatGPT`:`switch to Claude`,onClick:()=>{u(l===`claude`?`chatgpt`:`claude`),d(`displayMode`,`inline`)}}),(0,H.jsx)(j0,{icon:Mi,label:`quit preview`,onClick:()=>{u(null),d(`displayMode`,`inline`)}})]})]})},W_e=({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=hG(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])},G_e=({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},K_e=32,q_e=2,P0={"--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)`},J_e={"--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 F0(e){return e===`dark`?{...P0,...J_e}:P0}function Y_e(e,t){return{styles:{variables:F0(e)},containerDimensions:{maxWidth:t?vG.width-K_e-q_e:768},availableDisplayModes:t?[`inline`,`fullscreen`]:[`inline`,`fullscreen`,`pip`],userAgent:`chatgpt`,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}}var X_e=32,I0={"--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)`},L0=`
|
|
228
|
+
@font-face {
|
|
229
|
+
font-family: "Anthropic Sans";
|
|
230
|
+
src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Regular-Static.otf") format("opentype");
|
|
231
|
+
font-weight: 400;
|
|
232
|
+
font-style: normal;
|
|
233
|
+
font-display: swap;
|
|
234
|
+
}
|
|
235
|
+
@font-face {
|
|
236
|
+
font-family: "Anthropic Sans";
|
|
237
|
+
src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-RegularItalic-Static.otf") format("opentype");
|
|
238
|
+
font-weight: 400;
|
|
239
|
+
font-style: italic;
|
|
240
|
+
font-display: swap;
|
|
241
|
+
}
|
|
242
|
+
@font-face {
|
|
243
|
+
font-family: "Anthropic Sans";
|
|
244
|
+
src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Medium-Static.otf") format("opentype");
|
|
245
|
+
font-weight: 500;
|
|
246
|
+
font-style: normal;
|
|
247
|
+
font-display: swap;
|
|
248
|
+
}
|
|
249
|
+
@font-face {
|
|
250
|
+
font-family: "Anthropic Sans";
|
|
251
|
+
src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-MediumItalic-Static.otf") format("opentype");
|
|
252
|
+
font-weight: 500;
|
|
253
|
+
font-style: italic;
|
|
254
|
+
font-display: swap;
|
|
255
|
+
}
|
|
256
|
+
@font-face {
|
|
257
|
+
font-family: "Anthropic Sans";
|
|
258
|
+
src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Semibold-Static.otf") format("opentype");
|
|
259
|
+
font-weight: 600;
|
|
260
|
+
font-style: normal;
|
|
261
|
+
font-display: swap;
|
|
262
|
+
}
|
|
263
|
+
@font-face {
|
|
264
|
+
font-family: "Anthropic Sans";
|
|
265
|
+
src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-SemiboldItalic-Static.otf") format("opentype");
|
|
266
|
+
font-weight: 600;
|
|
267
|
+
font-style: italic;
|
|
268
|
+
font-display: swap;
|
|
269
|
+
}
|
|
270
|
+
@font-face {
|
|
271
|
+
font-family: "Anthropic Sans";
|
|
272
|
+
src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-Bold-Static.otf") format("opentype");
|
|
273
|
+
font-weight: 700;
|
|
274
|
+
font-style: normal;
|
|
275
|
+
font-display: swap;
|
|
276
|
+
}
|
|
277
|
+
@font-face {
|
|
278
|
+
font-family: "Anthropic Sans";
|
|
279
|
+
src: url("https://assets.claude.ai/Fonts/AnthropicSans-Text-BoldItalic-Static.otf") format("opentype");
|
|
280
|
+
font-weight: 700;
|
|
281
|
+
font-style: italic;
|
|
282
|
+
font-display: swap;
|
|
283
|
+
}
|
|
284
|
+
`;function Z_e(e){return{styles:{variables:I0,css:{fonts:L0}},containerDimensions:{width:e?vG.width-X_e:720,maxHeight:5e3},availableDisplayModes:[`inline`,`fullscreen`],userAgent:navigator.userAgent,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone}}function Q_e(e,t){e.contentWindow?.postMessage(t,`*`)}function R0(e,t,n){e({jsonrpc:`2.0`,id:t,result:n})}function z0(e,t,n,r){e({jsonrpc:`2.0`,id:t,error:{code:n,message:r}})}function B0(e,t,n){switch(e){case`chatgpt`:return Y_e(t,n);case`claude`:return Z_e(n);case null:return{}}}function $_e(){let e=ps.getState(),t=hs(e.userAgent);return{...B0(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 eve(e,t,n,r){let i=t=>Q_e(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`:{R0(i,s,{protocolVersion:`2025-06-18`,hostInfo:{name:`skybridge-devtools`,version:`0.0.1`},hostCapabilities:{openLinks:{},serverTools:{}},hostContext:$_e()});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??{}),R0(i,s,{});break;case`ui/request-display-mode`:{let e=l?.mode??`inline`,t=ps.getState(),n=_s(e,t);t.setPreference(`displayMode`,n),R0(i,s,{mode:n});break}case`ui/open-link`:{let e=l?.url;e&&window.open(e,`_blank`,`noopener,noreferrer`),R0(i,s,{});break}case`ui/download-file`:z0(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`),R0(i,s,a)}catch(e){let t=e instanceof Error?e.message:String(e);z0(i,s,-32603,t)}break}default:s!==void 0&&z0(i,s,-32601,`Method not found: ${c}`)}};window.addEventListener(`message`,a);let o=ps.subscribe((e,t)=>{let n={};e.theme!==t.theme&&(n.theme=e.theme,e.previewClient===`chatgpt`&&(n.styles={variables:F0(e.theme)})),(e.previewClient!==t.previewClient||e.previewClient!==null&&e.userAgent!==t.userAgent)&&Object.assign(n,B0(e.previewClient,e.theme,hs(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 tve(e,t){e.contentWindow?.postMessage({jsonrpc:`2.0`,method:`ui/notifications/tool-input`,params:{arguments:t}},`*`)}function nve(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 V0=`openai:set_globals`,rve=class extends CustomEvent{type=V0};function ive(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=ps.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=ps.getState(),a=_s(r.mode,i);return e.displayMode=a,n(`displayMode`,a),i.setPreference(`displayMode`,a),{mode:a}},setWidgetState:async r=>{pS(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`),ps.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 ave(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 rve(V0,{detail:{globals:{[r]:i}}});t.dispatchEvent(e)}return o}})}function ove(e,t,n,r,i,a){let o=ave(ET(t),e);return $re(o,ive(o,n,r,i,a)),e.openai=o,ps.subscribe(({displayMode:e})=>{let t=o.view;e===`modal`||t?.mode!==`modal`||(o.view={mode:e},r(`view`,{mode:e}))})}var H0=`__host-fonts`,sve=({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`?F0(t):I0,c=Object.entries(s);for(let[e,t]of c)o.style.setProperty(e,t);if(n===`claude`&&!a.getElementById(H0)){let e=a.createElement(`style`);e.id=H0,e.textContent=L0,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])},U0=({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])},cve=345,lve=770,W0=420,G0=()=>{let e=jse(),{openaiObject:t}=kE(e.name)??{},{data:n}=Mse(e._meta?.ui?.resourceUri),{setToolData:r,pushOpenAiLog:i,updateOpenaiObject:a,setOpenInAppUrl:o}=OE(),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=ps(e=>e.previewClient),p=f!==null,m=gs()&&!p,h=(0,b.useRef)(m);(0,b.useEffect)(()=>{h.current!==m&&(h.current=m,d(null))},[m]);let g=ps(e=>e.displayMode),_=g===`fullscreen`,v=g===`pip`,y=g===`modal`,x=_&&!m,S=x||y,C=S||p?`100%`:`${m?cve:lve}px`,w=ps(e=>e.theme),T=ps(e=>e.locale),E=ps(e=>e.userAgent),D=n.contents[0],O=D.text,k=mG(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=ove(t.contentWindow,l.current,n,(t,n)=>{a(e.name,t,n)},(e,t)=>IE.callTool(e,t),t=>{o(e.name,t)}),u=eve(t,(e,t)=>IE.callTool(e,t),n,()=>({toolInput:l.current?.toolInput,toolOutput:l.current?.toolOutput,toolResponseMetadata:l.current?.toolResponseMetadata}));return t.contentDocument.open(),t.contentDocument.write(pG(O)),t.contentDocument.close(),r(e.name,{openaiRef:s}),()=>{c(),u()}},[O,k,e.name,i,r,a,o]),W_e({iframeRef:s,containerRef:c,enabled:!!O&&!S,onHeightChange:d,documentKey:O,clampToContainer:!p});let A=G_e({iframeRef:s,documentKey:O});return U0({iframeRef:s,toolName:e.name,globalKey:`theme`,value:w,updateOpenaiObject:a}),U0({iframeRef:s,toolName:e.name,globalKey:`locale`,value:T,updateOpenaiObject:a}),U0({iframeRef:s,toolName:e.name,globalKey:`displayMode`,value:g,updateOpenaiObject:a}),U0({iframeRef:s,toolName:e.name,globalKey:`userAgent`,value:E,updateOpenaiObject:a}),sve({iframeRef:s,theme:w,previewClient:f,documentKey:O}),(0,b.useEffect)(()=>{let e=s.current;!e||!t||(t.toolInput!=null&&tve(e,t.toolInput),(t.toolOutput!=null||t.toolResponseMetadata!=null)&&nve(e,{content:[],structuredContent:t.toolOutput,isError:!1,_meta:t.toolResponseMetadata}))},[t]),(0,H.jsx)(`div`,{ref:c,className:fG(`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,W0):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,W0):u}px`,border:`none`,display:`block`},sandbox:`allow-scripts allow-same-origin allow-forms`,title:`html-preview`})})},uve=`ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif`,dve={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 K0({className:e}){return(0,H.jsx)(`div`,{className:fG(`rounded-md bg-[color-mix(in_oklab,var(--text-primary)_10%,transparent)]`,e)})}var fve=[{icon:m0,label:`New chat`},{icon:v_e,label:`Projects`},{icon:y_e,label:`Tasks`},{icon:h0,label:`Library`},{icon:b_e,label:`Plugins`},{icon:x_e,label:`Agents`},{icon:S_e,label:`Codex`},{icon:C_e,label:`GPTs`}],pve=[`w-[85%]`,`w-[70%]`,`w-[78%]`,`w-[62%]`,`w-[82%]`,`w-[68%]`,`w-[75%]`,`w-[60%]`];function mve(){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)(E_e,{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)(m0,{className:`size-6`}),(0,H.jsx)(D_e,{className:`size-6`})]})]})}function hve(){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)(_0,{className:`size-5 shrink-0`}),(0,H.jsx)(K0,{className:`h-4 w-16`}),(0,H.jsx)(`div`,{className:`flex-1`}),(0,H.jsx)(K0,{className:`h-4 w-14`}),(0,H.jsx)(v0,{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)(y0,{className:`size-5`})})]})]})}function gve(){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)(_0,{className:`size-5 shrink-0`}),(0,H.jsx)(`span`,{className:`flex-1 text-(--text-tertiary)`,children:`Ask ChatGPT`}),(0,H.jsx)(v0,{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)(y0,{className:`size-5.5`})})]})}function q0({className:e}){return(0,H.jsx)(`div`,{className:fG(`h-11 w-2/5 self-end rounded-3xl bg-(--message-surface)`,e)})}function _ve({children:e}){let t=ps(e=>e.theme),n=ps(e=>e.displayMode),r=ps(e=>e.setPreference),i=gs(),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:uve,...dve[t]},children:[(0,H.jsxs)(`aside`,{"aria-hidden":!0,className:fG(`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:fG(`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)(g0,{className:`size-5`}),(0,H.jsx)(w_e,{className:`size-5`})]})]}),fve.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)(K0,{className:`mt-6 mb-2 ml-2 h-3 w-14`}),pve.map(e=>(0,H.jsx)(`div`,{className:`px-2 py-2`,children:(0,H.jsx)(K0,{className:fG(`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)(K0,{className:`size-8 rounded-full`}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,H.jsx)(K0,{className:`h-3 w-24`}),(0,H.jsx)(K0,{className:`h-2.5 w-16`})]})]})]}),(0,H.jsxs)(`div`,{className:fG(`h-full flex-col items-center gap-5 py-4`,o?`flex`:`hidden`),children:[(0,H.jsx)(x0,{className:`size-6`}),(0,H.jsx)(m0,{className:`mt-4 size-5`}),(0,H.jsx)(g0,{className:`size-5`}),(0,H.jsx)(T_e,{className:`size-5`}),(0,H.jsx)(h0,{className:`size-5`}),(0,H.jsx)(K0,{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)(mve,{}),(0,H.jsxs)(`div`,{className:fG(`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)(b0,{className:`size-5`})}),(0,H.jsxs)(`div`,{"aria-hidden":!0,className:`flex flex-1 items-center justify-center gap-2`,children:[(0,H.jsx)(K0,{className:`size-5 rounded-md`}),(0,H.jsx)(K0,{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:fG(`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:fG(`flex flex-col`,o&&`hidden`,t>0&&`mt-10`),children:[(0,H.jsx)(q0,{}),(0,H.jsx)(`div`,{className:`mt-6 flex flex-col gap-3`,children:e.map(e=>(0,H.jsx)(K0,{className:fG(`h-4`,e)},e))})]},e[0])),(0,H.jsx)(q0,{className:fG(`mt-10`,o&&`hidden`)}),(0,H.jsx)(K0,{className:fG(`mt-6 h-4 w-40`,o&&`hidden`)}),(0,H.jsxs)(`div`,{className:fG(`mt-6 flex items-center gap-2`,o&&`hidden`),children:[(0,H.jsx)(K0,{className:`size-5 rounded-md`}),(0,H.jsx)(K0,{className:`h-4 w-[110px]`})]}),(0,H.jsxs)(`div`,{className:fG(`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)(b0,{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)(b0,{className:`size-4.5`})}):null,(0,H.jsx)(`div`,{className:fG(`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)(K0,{className:`h-96 w-full rounded-2xl`})})]}),(0,H.jsx)(`div`,{className:fG(`mt-6 border-(--border-default) border-t`,o&&`hidden`)}),(0,H.jsxs)(`div`,{className:fG(`mt-6 flex flex-col gap-3`,o&&`hidden`),children:[(0,H.jsx)(K0,{className:`h-4 w-[95%]`}),(0,H.jsx)(K0,{className:`h-4 w-[88%]`}),(0,H.jsx)(K0,{className:`h-4 w-[60%]`})]}),(0,H.jsxs)(`div`,{className:fG(`mt-4 flex items-center gap-3 pb-4`,o&&`hidden`),children:[(0,H.jsx)(K0,{className:`size-4 rounded-full`}),(0,H.jsx)(K0,{className:`size-4 rounded-full`}),(0,H.jsx)(K0,{className:`size-4 rounded-full`}),(0,H.jsx)(K0,{className:`size-4 rounded-full`})]})]})}),(0,H.jsx)(`div`,{"aria-hidden":!0,className:fG(`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)(hve,{}):(0,H.jsx)(gve,{})})})]})]})}var vve=`"Anthropic Sans", ui-sans-serif, system-ui, sans-serif`,yve=24,bve={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 J0({className:e}){return(0,H.jsx)(`div`,{className:fG(`rounded-md bg-[color-mix(in_oklab,var(--shell-text)_10%,transparent)]`,e)})}function xve(){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)(D0,{className:`size-4.5 text-[#7b7974]`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(J0,{className:`h-3.5 w-24`}),(0,H.jsx)(C0,{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 Sve(){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)(E0,{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)(J0,{className:`h-3.5 w-14`}),(0,H.jsx)(J0,{className:`h-3.5 w-9`}),(0,H.jsx)(C0,{className:`size-3`})]}),(0,H.jsx)(`div`,{className:`flex-1`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(T0,{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 Cve(){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)(E0,{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)(J0,{className:`h-3.5 w-14`}),(0,H.jsx)(J0,{className:`h-3.5 w-9`}),(0,H.jsx)(C0,{className:`size-3`})]}),(0,H.jsx)(T0,{className:`size-5`}),(0,H.jsx)(w0,{className:`size-5`})]})]})]})}var wve=[`w-[80%]`,`w-[65%]`,`w-[74%]`,`w-[58%]`,`w-[70%]`,`w-[62%]`];function Tve({children:e}){let t=ps(e=>e.theme),n=ps(e=>e.displayMode),r=ps(e=>e.setPreference),i=gs(),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>yve)};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:vve,...bve[t]},children:[(0,H.jsx)(`style`,{children:L0}),(0,H.jsx)(`aside`,{"aria-hidden":!0,className:fG(`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)(j_e,{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)(D0,{className:`size-4`})}),(0,H.jsx)(`div`,{className:`flex size-7 items-center justify-center`,children:(0,H.jsx)(R_e,{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)(F_e,{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)(M_e,{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)(E0,{className:`size-4`}),(0,H.jsx)(`span`,{children:`New`})]}),[{icon:k_e,label:`Chats and tasks`},{icon:I_e,label:`Projects`},{icon:O_e,label:`Artifacts`},{icon:L_e,label:`Scheduled`},{icon:N_e,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)(S0,{className:`size-5 shrink-0 text-(--shell-icon-muted)`}),(0,H.jsx)(J0,{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)(wi,{className:`size-3.5 text-(--shell-text-tertiary)`})]}),wve.map(e=>(0,H.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 px-1.5`,children:[(0,H.jsx)(S0,{className:`size-5 shrink-0 text-(--shell-icon-muted)`}),(0,H.jsx)(J0,{className:fG(`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)(P_e,{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)(J0,{className:`size-7 rounded-full`}),(0,H.jsx)(J0,{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)(xve,{}),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)(D0,{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:fG(`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:fG(`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)(J0,{className:fG(`h-4`,e)},e))})]},e[0])),(0,H.jsx)(`div`,{className:fG(`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)(J0,{className:fG(`mt-6 h-4 w-40`,a&&`hidden`)}),(0,H.jsxs)(`div`,{className:fG(`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)(b0,{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)(J0,{className:`size-3.5 rounded`})}),(0,H.jsx)(J0,{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)(b0,{className:`size-4.5`})})]}):null,(0,H.jsx)(`div`,{className:fG(`w-full`,a&&`min-h-0 flex-1`,o&&`h-full min-h-0`),children:e??(0,H.jsx)(J0,{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)(E0,{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)(J0,{className:`h-3.5 w-14`}),(0,H.jsx)(J0,{className:`h-3.5 w-9`}),(0,H.jsx)(C0,{className:`size-3`})]}),(0,H.jsx)(T0,{className:`size-5`}),(0,H.jsx)(w0,{className:`size-5`})]})]})]})}):null]}),(0,H.jsxs)(`div`,{className:fG(`mt-6 flex flex-col gap-3`,a&&`hidden`),children:[(0,H.jsx)(J0,{className:`h-4 w-[95%]`}),(0,H.jsx)(J0,{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:fG(`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)(C0,{className:`size-3.5`})}),(0,H.jsx)(`div`,{className:fG(`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)(Sve,{}):(0,H.jsx)(Cve,{})})})]})]})}var Eve=24,Dve=44,Y0={light:{backdrop:`#e8e8e6`,label:`#6f6f6f`},dark:{backdrop:`#111110`,label:`#8f8f8f`}},Ove=({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-Eve)/vG.width,(n-Dve)/vG.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:Y0[e].backdrop},children:[(0,H.jsxs)(`div`,{className:`pb-1.5 font-mono text-xs`,style:{color:Y0[e].label},children:[vG.width,` × `,vG.height]}),(0,H.jsx)(`div`,{style:{width:vG.width*r,height:vG.height*r},children:(0,H.jsx)(`div`,{className:`overflow-hidden shadow-[0_2px_16px_rgba(0,0,0,0.2)]`,style:{width:vG.width,height:vG.height,transform:`scale(${r})`,transformOrigin:`top left`},children:t})})]})},kve=()=>{let e=qE(),t=kE(e?.name??``),n=ps(e=>e.previewClient),r=ps(e=>e.theme),i=gs(),a=e?._meta?.ui?.resourceUri,o=!!(e&&t?.response&&a),s=(0,H.jsx)(n===`claude`?Tve:_ve,{children:o?(0,H.jsx)(b.Suspense,{fallback:null,children:(0,H.jsx)(G0,{})}):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)(N0,{variant:`preview`})})]}),(0,H.jsx)(`div`,{className:`min-h-0 flex-1`,children:i?(0,H.jsx)(Ove,{theme:r,children:s}):s})]})},Ave=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)}},X0=function(e){return typeof e==`function`},jve=function(e){return typeof e==`string`},Z0=function(e){return typeof e==`number`},Mve=function(e){return e===void 0},Q0=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},Nve=Ave(b.useEffect);function $0(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 e2(e){var t=(0,b.useRef)(e);return t.current=e,t}var Pve=function(e){var t=e2(e);(0,b.useEffect)(function(){return function(){t.current()}},[])},t2=!!(typeof window<`u`&&window.document&&window.document.createElement);function n2(e,t){if(t2)return e?X0(e)?e():`current`in e?e.current:e:t}var r2=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 n2(e)});if(!i.current){i.current=!0,a.current=c,o.current=n,s.current=t();return}(c.length!==a.current.length||!$0(a.current,c)||!$0(o.current,n))&&((e=s.current)==null||e.call(s),a.current=c,o.current=n,s.current=t())}),Pve(function(){var e;(e=s.current)==null||e.call(s),i.current=!1})}}(b.useEffect),Fve=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}}}))()),Ive=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),(0,Fve.default)(e,t)};function i2(e,t,n){n===void 0&&(n={});var r=n.enable,i=r===void 0||r,a=e2(t);r2(function(){if(i){var t=n2(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 Lve=function(e,t,n){var r=(0,b.useRef)(void 0),i=(0,b.useRef)(0);Ive(t,r.current)||(i.current+=1),r.current=t,r2(e,[i.current],n)},a2={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},o2={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`?a2.meta.includes(e.keyCode):e.metaKey}};function s2(e){return jve(e)||Z0(e)}function Rve(e){var t=Object.keys(o2).reduce(function(t,n){return o2[n](e)?t+1:t},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function c2(e,t,n){var r,i;if(!e.key)return!1;if(Z0(t))return e.keyCode===t&&t;var a=t.split(`.`),o=0;try{for(var s=cO(a),c=s.next();!c.done;c=s.next()){var l=c.value,u=o2[l],d=a2[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&&Rve(e)===a.length&&t:o===a.length&&t}function zve(e,t){return X0(e)?e:s2(e)?function(n){return c2(n,e,t)}:Array.isArray(e)?function(n){return e.find(function(e){return c2(n,e,t)})}:function(){return!!e}}var Bve=[`keydown`];function l2(e,t,n){var r=n||{},i=r.events,a=i===void 0?Bve:i,o=r.target,s=r.exactMatch,c=s!==void 0&&s,l=r.useCapture,u=l!==void 0&&l,d=e2(t),f=e2(e);Lve(function(){var e,t,n,r=n2(o,window);if(r){var i=function(e){var t=e,n=zve(f.current,c)(t),r=s2(n)?n:t.key;if(n)return d.current?.call(d,t,r)};try{for(var s=cO(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=cO(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 u2=`AHOOKS_SYNC_STORAGE_EVENT_NAME`,d2=function(e){return function(t,n){n===void 0&&(n={});var r,i=n.listenStorageChange,a=i!==void 0&&i,o=X0(n.serializer)?n.serializer:JSON.stringify,s=X0(n.deserializer)?n.deserializer:JSON.parse,c=X0(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 X0(n.defaultValue)?n.defaultValue():n.defaultValue},u=Vse((0,b.useState)(l),2),d=u[0],f=u[1],p=(0,b.useRef)(d);p.current=d,Nve(function(){var e=l();Object.is(e,p.current)||(p.current=e,f(e))},[t]);var m=function(e){var n=p.current,i=X0(e)?e(n):e;if(!Object.is(i,n)){a||(p.current=i,f(i));try{var s=void 0,l=r?.getItem(t);Mve(i)?(s=null,r?.removeItem(t)):(s=o(i),r?.setItem(t,s)),dispatchEvent(new CustomEvent(u2,{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 i2(`storage`,h,{enable:a}),i2(u2,function(e){h(e.detail)},{enable:a}),[d,Q0(m)]}}(function(){return t2?localStorage:void 0}),Vve=function(e,t){var n=Q0(e),r=(0,b.useRef)(null),i=(0,b.useCallback)(function(){r.current&&clearTimeout(r.current)},[]);return(0,b.useEffect)(function(){if(!(!Z0(t)||t<0))return r.current=setTimeout(n,t),i},[t]),i},Hve=Fi(`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 f2({className:e,variant:t,size:n,children:r,...i}){return(0,H.jsx)(`span`,{className:Mr(Hve({variant:t,size:n}),e),...i,children:r})}var Uve=new Intl.NumberFormat(`en`,{notation:`compact`,maximumFractionDigits:1}),p2=e=>`skybridge-devtools-dismissed-${e}-warning`,m2={"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 h2({kind:e}){return(0,H.jsx)(f2,{size:`sm`,variant:`warning`,children:m2[e].badge})}function g2({kind:e,tokenCount:t}){let n=m2[e],[r,i]=(0,b.useState)(()=>sessionStorage.getItem(p2(e))===`true`);return r?null:(0,H.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,H.jsx)(N$,{className:`rounded-none border-x-0 border-t-0 py-2 pl-3 pr-10`,title:`${n.title} (~${Uve.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(p2(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)(Mi,{className:`size-3.5`})})]})}var _2=(0,b.createContext)({});function v2(e){let t=(0,b.useRef)(null);return t.current===null&&(t.current=e()),t.current}var y2=typeof window<`u`?b.useLayoutEffect:b.useEffect,b2=(0,b.createContext)(null);function x2(e,t){e.indexOf(t)===-1&&e.push(t)}function S2(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var C2=(e,t,n)=>n>t?t:n<e?e:n,w2={},T2=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),E2=e=>typeof e==`object`&&!!e,D2=e=>/^0[^.\s]+$/u.test(e);function O2(e){let t;return()=>(t===void 0&&(t=e()),t)}var k2=e=>e,A2=(...e)=>e.reduce((e,t)=>n=>t(e(n))),j2=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},M2=class{constructor(){this.subscriptions=[]}add(e){return x2(this.subscriptions,e),()=>S2(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}},N2=e=>e*1e3,P2=e=>e/1e3,F2=(e,t)=>t?1e3/t*e:0,I2=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Wve=1e-7,Gve=12;function Kve(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=I2(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Wve&&++s<Gve);return o}function L2(e,t,n,r){if(e===t&&n===r)return k2;let i=t=>Kve(t,0,1,e,n);return e=>e===0||e===1?e:I2(i(e),t,r)}var R2=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,z2=e=>t=>1-e(1-t),B2=L2(.33,1.53,.69,.99),V2=z2(B2),H2=R2(V2),U2=e=>e>=1?1:(e*=2)<1?.5*V2(e):.5*(2-2**(-10*(e-1))),W2=e=>1-Math.sin(Math.acos(e)),G2=z2(W2),K2=R2(W2),qve=L2(.42,0,1,1),Jve=L2(0,0,.58,1),q2=L2(.42,0,.58,1),Yve=e=>Array.isArray(e)&&typeof e[0]!=`number`,J2=e=>Array.isArray(e)&&typeof e[0]==`number`,Y2={linear:k2,easeIn:qve,easeInOut:q2,easeOut:Jve,circIn:W2,circInOut:K2,circOut:G2,backIn:V2,backInOut:H2,backOut:B2,anticipate:U2},Xve=e=>typeof e==`string`,X2=e=>{if(J2(e)){e.length;let[t,n,r,i]=e;return L2(t,n,r,i)}else if(Xve(e))return Y2[e],`${e}`,Y2[e];return e},Z2=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function Zve(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 Qve=40;function Q2(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Z2.reduce((e,t)=>(e[t]=Zve(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=w2.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Qve),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:Z2.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<Z2.length;t++)o[Z2[t]].cancel(e)},state:i,steps:o}}var{schedule:$2,cancel:e4,state:t4,steps:n4}=Q2(typeof requestAnimationFrame<`u`?requestAnimationFrame:k2,!0),r4;function $ve(){r4=void 0}var i4={now:()=>(r4===void 0&&i4.set(t4.isProcessing||w2.useManualTiming?t4.timestamp:performance.now()),r4),set:e=>{r4=e,queueMicrotask($ve)}},a4=e=>t=>typeof t==`string`&&t.startsWith(e),o4=a4(`--`),eye=a4(`var(--`),s4=e=>eye(e)?tye.test(e.split(`/*`)[0].trim()):!1,tye=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function c4(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var l4={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},u4={...l4,transform:e=>C2(0,1,e)},d4={...l4,default:1},f4=e=>Math.round(e*1e5)/1e5,p4=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function nye(e){return e==null}var rye=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,m4=(e,t)=>n=>!!(typeof n==`string`&&rye.test(n)&&n.startsWith(e)||t&&!nye(n)&&Object.prototype.hasOwnProperty.call(n,t)),h4=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(p4);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},iye=e=>C2(0,255,e),g4={...l4,transform:e=>Math.round(iye(e))},_4={test:m4(`rgb`,`red`),parse:h4(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+g4.transform(e)+`, `+g4.transform(t)+`, `+g4.transform(n)+`, `+f4(u4.transform(r))+`)`};function aye(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 v4={test:m4(`#`),parse:aye,transform:_4.transform},y4=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),b4=y4(`deg`),x4=y4(`%`),S4=y4(`px`),oye=y4(`vh`),sye=y4(`vw`),C4={...x4,parse:e=>x4.parse(e)/100,transform:e=>x4.transform(e*100)},w4={test:m4(`hsl`,`hue`),parse:h4(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+x4.transform(f4(t))+`, `+x4.transform(f4(n))+`, `+f4(u4.transform(r))+`)`},T4={test:e=>_4.test(e)||v4.test(e)||w4.test(e),parse:e=>_4.test(e)?_4.parse(e):w4.test(e)?w4.parse(e):v4.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?_4.transform(e):w4.transform(e),getAnimatableNone:e=>{let t=T4.parse(e);return t.alpha=0,T4.transform(t)}},cye=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function lye(e){return isNaN(e)&&typeof e==`string`&&(e.match(p4)?.length||0)+(e.match(cye)?.length||0)>0}var E4=`number`,D4=`color`,uye=`var`,dye=`var(`,O4="${}",fye=/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 k4(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(fye,e=>(T4.test(e)?(r.color.push(a),i.push(D4),n.push(T4.parse(e))):e.startsWith(dye)?(r.var.push(a),i.push(uye),n.push(e)):(r.number.push(a),i.push(E4),n.push(parseFloat(e))),++a,O4)).split(O4),indexes:r,types:i}}function pye(e){return k4(e).values}function A4({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===E4?i+=f4(r[a]):e===D4?i+=T4.transform(r[a]):i+=r[a]}return i}}function mye(e){return A4(k4(e))}var hye=e=>typeof e==`number`?0:T4.test(e)?T4.getAnimatableNone(e):e,gye=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:hye(e);function _ye(e){let t=k4(e);return A4(t)(t.values.map((e,n)=>gye(e,t.split[n])))}var j4={test:lye,parse:pye,createTransformer:mye,getAnimatableNone:_ye};function M4(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 vye({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=M4(s,r,e+1/3),a=M4(s,r,e),o=M4(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function N4(e,t){return n=>n>0?t:e}var P4=(e,t,n)=>e+(t-e)*n,F4=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},yye=[v4,_4,w4],bye=e=>yye.find(t=>t.test(e));function I4(e){let t=bye(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===w4&&(n=vye(n)),n}var L4=(e,t)=>{let n=I4(e),r=I4(t);if(!n||!r)return N4(e,t);let i={...n};return e=>(i.red=F4(n.red,r.red,e),i.green=F4(n.green,r.green,e),i.blue=F4(n.blue,r.blue,e),i.alpha=P4(n.alpha,r.alpha,e),_4.transform(i))},R4=new Set([`none`,`hidden`]);function xye(e,t){return R4.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Sye(e,t){return n=>P4(e,t,n)}function z4(e){return typeof e==`number`?Sye:typeof e==`string`?s4(e)?N4:T4.test(e)?L4:Tye:Array.isArray(e)?B4:typeof e==`object`?T4.test(e)?L4:Cye:N4}function B4(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>z4(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Cye(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=z4(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function wye(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 Tye=(e,t)=>{let n=j4.createTransformer(t),r=k4(e),i=k4(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?R4.has(e)&&!i.values.length||R4.has(t)&&!r.values.length?xye(e,t):A2(B4(wye(r,i),i.values),n):(`${e}${t}`,N4(e,t))};function V4(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?P4(e,t,n):z4(e)(e,t)}var Eye=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>$2.update(t,e),stop:()=>e4(t),now:()=>t4.isProcessing?t4.timestamp:i4.now()}},H4=(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)})`},U4=2e4;function W4(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 Dye(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(W4(r),U4);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:P2(i)}}var G4={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 K4(e,t){return e*Math.sqrt(1-t*t)}var Oye=12;function kye(e,t,n){let r=n;for(let n=1;n<Oye;n++)r-=e(r)/t(r);return r}var q4=.001;function Aye({duration:e=G4.duration,bounce:t=G4.bounce,velocity:n=G4.velocity,mass:r=G4.mass}){let i,a;G4.maxDuration;let o=1-t;o=C2(G4.minDamping,G4.maxDamping,o),e=C2(G4.minDuration,G4.maxDuration,P2(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=K4(t,o),c=Math.exp(-i);return q4-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=K4(t**2,o);return(-i(t)+q4>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=kye(i,a,s);if(e=N2(e),isNaN(c))return{stiffness:G4.stiffness,damping:G4.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var jye=[`duration`,`bounce`],Mye=[`stiffness`,`damping`,`mass`];function J4(e,t){return t.some(t=>e[t]!==void 0)}function Nye(e){let t={velocity:G4.velocity,stiffness:G4.stiffness,damping:G4.damping,mass:G4.mass,isResolvedFromDuration:!1,...e};if(!J4(e,Mye)&&J4(e,jye))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*C2(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:G4.mass,stiffness:i,damping:a}}else{let n=Aye({...e,velocity:0});t={...t,...n,mass:G4.mass},t.isResolvedFromDuration=!0}return t}function Y4(e=G4.visualDuration,t=G4.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}=Nye({...n,velocity:-P2(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=P2(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?G4.restSpeed.granular:G4.restSpeed.default,i||=v?G4.restDelta.granular:G4.restDelta.default;let y,b,x,S,C,w;if(h<1)x=K4(_,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=>N2(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=N2(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=N2(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(W4(T),U4),t=H4(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}Y4.applyToOptions=e=>{let t=Dye(e,100,Y4);return e.ease=t.ease,e.duration=N2(t.duration),e.type=`keyframes`,e};var Pye=5;function X4(e,t,n){let r=Math.max(t-Pye,0);return F2(n-e(r),t-r)}function Z4({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=Y4({keyframes:[f.value,m(f.value)],velocity:X4(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 Fye(e,t,n){let r=[],i=n||w2.mix||V4,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=A2(Array.isArray(t)?t[n]||k2:t,a)),r.push(a)}return r}function Iye(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=Fye(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=j2(e[r],e[r+1],n);return s[r](i)};return n?t=>l(C2(e[0],e[a-1],t)):l}function Lye(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=j2(0,t,r);e.push(P4(n,1,i))}}function Rye(e){let t=[0];return Lye(t,e.length-1),t}function zye(e,t){return e.map(e=>e*t)}function Bye(e,t){return e.map(()=>t||q2).splice(0,e.length-1)}function Q4({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Yve(r)?r.map(X2):X2(r),a={done:!1,value:t[0]},o=Iye(zye(n&&n.length===t.length?n:Rye(t),e),t,{ease:Array.isArray(i)?i:Bye(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Vye=e=>e!==null;function $4(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Vye),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Hye={decay:Z4,inertia:Z4,tween:Q4,keyframes:Q4,spring:Y4};function e3(e){typeof e.type==`string`&&(e.type=Hye[e.type])}var t3=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)}},Uye=e=>e/100,n3=class extends t3{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!==i4.now()&&this.tick(i4.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;e3(e);let{type:t=Q4,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Q4;s!==Q4&&typeof o[0]!=`number`&&(this.mixKeyframes=A2(Uye,V4(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=W4(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=C2(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!==Z4&&(b.value=$4(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 P2(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+P2(e)}get time(){return P2(this.currentTime)}set time(e){e=N2(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 X4(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(i4.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=P2(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Eye,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(i4.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 Wye(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var r3=e=>e*180/Math.PI,i3=e=>a3(r3(Math.atan2(e[1],e[0]))),Gye={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:i3,rotateZ:i3,skewX:e=>r3(Math.atan(e[1])),skewY:e=>r3(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},a3=e=>(e%=360,e<0&&(e+=360),e),o3=i3,s3=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),c3=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Kye={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:s3,scaleY:c3,scale:e=>(s3(e)+c3(e))/2,rotateX:e=>a3(r3(Math.atan2(e[6],e[5]))),rotateY:e=>a3(r3(Math.atan2(-e[2],e[0]))),rotateZ:o3,rotate:o3,skewX:e=>r3(Math.atan(e[4])),skewY:e=>r3(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function l3(e){return+!!e.includes(`scale`)}function u3(e,t){if(!e||e===`none`)return l3(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Kye,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Gye,i=t}if(!i)return l3(t);let a=r[t],o=i[1].split(`,`).map(Jye);return typeof a==`function`?a(o):o[a]}var qye=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return u3(n,t)};function Jye(e){return parseFloat(e.trim())}var d3=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],f3=new Set([...d3,`pathRotation`]),p3=e=>e===l4||e===S4,Yye=new Set([`x`,`y`,`z`]),Xye=d3.filter(e=>!Yye.has(e));function Zye(e){let t=[];return Xye.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var m3={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})=>u3(t,`x`),y:(e,{transform:t})=>u3(t,`y`)};m3.translateX=m3.x,m3.translateY=m3.y;var h3=new Set,g3=!1,_3=!1,v3=!1;function y3(){if(_3){let e=Array.from(h3).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Zye(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)})}_3=!1,g3=!1,h3.forEach(e=>e.complete(v3)),h3.clear()}function b3(){h3.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_3=!0)})}function Qye(){v3=!0,b3(),y3(),v3=!1}var x3=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?(h3.add(this),g3||(g3=!0,$2.read(b3),$2.resolveKeyframes(y3))):(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])}Wye(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),h3.delete(this)}cancel(){this.state===`scheduled`&&(h3.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},$ye=e=>e.startsWith(`--`);function S3(e,t,n){$ye(t)?e.style.setProperty(t,n):e.style[t]=n}var ebe={};function C3(e,t){let n=O2(e);return()=>ebe[t]??n()}var tbe=C3(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),w3=C3(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),T3=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,E3={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:T3([0,.65,.55,1]),circOut:T3([.55,0,1,.45]),backIn:T3([.31,.01,.66,-.59]),backOut:T3([.33,1.53,.69,.99])};function D3(e,t){if(e)return typeof e==`function`?w3()?H4(e,t):`ease-out`:J2(e)?T3(e):Array.isArray(e)?e.map(e=>D3(e,t)||E3.easeOut):E3[e]}function nbe(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=D3(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 O3(e){return typeof e==`function`&&`applyToOptions`in e}function rbe({type:e,...t}){return O3(e)&&w3()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var k3=class extends t3{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=rbe(e);this.animation=nbe(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=$4(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),S3(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 P2(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+P2(e)}get time(){return P2(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=N2(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&&tbe()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),k2):r(this)}},A3={anticipate:U2,backInOut:H2,circInOut:K2};function ibe(e){return e in A3}function abe(e){typeof e.ease==`string`&&ibe(e.ease)&&(e.ease=A3[e.ease])}var j3=10,obe=class extends k3{constructor(e){abe(e),e3(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 n3({...a,autoplay:!1}),s=Math.max(j3,i4.now()-this.startTime),c=C2(0,j3,s-j3),l=o.sample(s).value,{name:u}=this.options;i&&u&&S3(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},M3=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(j4.test(e)||e===`0`)&&!e.startsWith(`url(`));function sbe(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 cbe(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=M3(i,t),s=M3(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:sbe(e)||(n===`spring`||O3(n))&&r}function N3(e){e.duration=0,e.type=`keyframes`}var P3=new Set([`opacity`,`clipPath`,`filter`,`transform`]),lbe=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function ube(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&lbe.test(e[t]))return!0;return!1}var dbe=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),fbe=O2(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function pbe(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 fbe()&&n&&(P3.has(n)||dbe.has(n)&&ube(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var mbe=40,hbe=class extends t3{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=i4.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||x3;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=i4.now();let u=!0;cbe(e,i,a,o)||(u=!1,(w2.instantAnimations||!s)&&l?.($4(e,n,t)),e[0]=e[e.length-1],N3(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>mbe?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&pbe(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new obe({...d,element:p})}catch{m=new n3(d)}else m=new n3(d);m.finished.then(()=>{this.notifyFinished()}).catch(k2),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(),Qye()),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 F3(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 I3=30,gbe=e=>!isNaN(parseFloat(e)),L3={current:void 0},_be=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=i4.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=i4.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=gbe(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 M2);let n=this.events[e].add(t);return e===`change`?()=>{n(),$2.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 L3.current&&L3.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=i4.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>I3)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,I3);return F2(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 R3(e,t){return new _be(e,t)}function z3(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function B3(e,t){let n=e?.[t]??e?.default??e;return n===e?n:z3(n,e)}var vbe={type:`spring`,stiffness:500,damping:25,restSpeed:10},ybe=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),bbe={type:`keyframes`,duration:.8},xbe={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Sbe=(e,{keyframes:t})=>t.length>2?bbe:f3.has(e)?e.startsWith(`scale`)?ybe(t[1]):vbe:xbe,Cbe=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function wbe(e){for(let t in e)if(!Cbe.has(t))return!0;return!1}var V3=(e,t,n,r={},i,a)=>o=>{let s=B3(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=N2(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};wbe(s)||Object.assign(u,Sbe(e,u)),u.duration&&=N2(u.duration),u.repeatDelay&&=N2(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(N3(u),u.delay===0&&(d=!0)),(w2.instantAnimations||w2.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,N3(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=$4(u.keyframes,s);if(e!==void 0){$2.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new n3(u):new hbe(u)},Tbe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ebe(e){let t=Tbe.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function H3(e,t,n=1){`${e}`;let[r,i]=Ebe(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return T2(e)?parseFloat(e):e}return s4(i)?H3(i,t,n+1):i}function U3(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function W3(e,t,n,r){if(typeof t==`function`){let[i,a]=U3(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]=U3(r);t=t(n===void 0?e.custom:n,i,a)}return t}function G3(e,t,n){let r=e.getProps();return W3(r,t,n===void 0?r.custom:n,e)}var K3=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...d3]),q3=e=>Array.isArray(e);function Dbe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,R3(n))}function Obe(e){return q3(e)?e[e.length-1]||0:e}function kbe(e,t){let{transitionEnd:n={},transition:r={},...i}=G3(e,t)||{};i={...i,...n};for(let t in i)Dbe(e,t,Obe(i[t]))}var J3=e=>!!(e&&e.getVelocity);function Abe(e){return!!(J3(e)&&e.add)}function Y3(e,t){let n=e.getValue(`willChange`);if(Abe(n))return n.add(t);if(!n&&w2.WillChange){let n=new w2.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function X3(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Z3=`data-`+X3(`framerAppearId`);function Q3(e){return e.props[Z3]}function jbe({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function $3(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?z3(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&&jbe(f,t))continue;let o={delay:n,...B3(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){$2.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=Q3(e);if(n){let e=window.MotionHandoffAnimation(n,t,$2);e!==null&&(o.startTime=e,p=!0)}}Y3(e,t);let m=l??e.shouldReduceMotion;r.start(V3(t,r,i,m&&K3.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>$2.update(()=>{o&&kbe(e,o)});d.length?Promise.all(d).then(t):t()}return d}function e6(e,t,n={}){let r=G3(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($3(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Mbe(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 Mbe(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(e6(c,t,{...o,delay:n+(typeof r==`function`?0:r)+F3(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Nbe(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>e6(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=e6(e,t,n);else{let i=typeof t==`function`?G3(e,t,n.custom):t;r=Promise.all($3(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Pbe={test:e=>e===`auto`,parse:e=>e},t6=e=>t=>t.test(e),n6=[l4,S4,x4,b4,sye,oye,Pbe],r6=e=>n6.find(t6(e));function Fbe(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||D2(e)}var Ibe=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Lbe(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(p4)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Ibe.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Rbe=/\b([a-z-]*)\(.*?\)/gu,i6={...j4,getAnimatableNone:e=>{let t=e.match(Rbe);return t?t.map(Lbe).join(` `):e}},a6={...j4,getAnimatableNone:e=>{let t=j4.parse(e);return j4.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},o6={...l4,transform:Math.round},s6={borderWidth:S4,borderTopWidth:S4,borderRightWidth:S4,borderBottomWidth:S4,borderLeftWidth:S4,borderRadius:S4,borderTopLeftRadius:S4,borderTopRightRadius:S4,borderBottomRightRadius:S4,borderBottomLeftRadius:S4,width:S4,maxWidth:S4,height:S4,maxHeight:S4,top:S4,right:S4,bottom:S4,left:S4,inset:S4,insetBlock:S4,insetBlockStart:S4,insetBlockEnd:S4,insetInline:S4,insetInlineStart:S4,insetInlineEnd:S4,padding:S4,paddingTop:S4,paddingRight:S4,paddingBottom:S4,paddingLeft:S4,paddingBlock:S4,paddingBlockStart:S4,paddingBlockEnd:S4,paddingInline:S4,paddingInlineStart:S4,paddingInlineEnd:S4,margin:S4,marginTop:S4,marginRight:S4,marginBottom:S4,marginLeft:S4,marginBlock:S4,marginBlockStart:S4,marginBlockEnd:S4,marginInline:S4,marginInlineStart:S4,marginInlineEnd:S4,fontSize:S4,backgroundPositionX:S4,backgroundPositionY:S4,rotate:b4,pathRotation:b4,rotateX:b4,rotateY:b4,rotateZ:b4,scale:d4,scaleX:d4,scaleY:d4,scaleZ:d4,skew:b4,skewX:b4,skewY:b4,distance:S4,translateX:S4,translateY:S4,translateZ:S4,x:S4,y:S4,z:S4,perspective:S4,transformPerspective:S4,opacity:u4,originX:C4,originY:C4,originZ:S4,zIndex:o6,fillOpacity:u4,strokeOpacity:u4,numOctaves:o6},zbe={...s6,color:T4,backgroundColor:T4,outlineColor:T4,fill:T4,stroke:T4,borderColor:T4,borderTopColor:T4,borderRightColor:T4,borderBottomColor:T4,borderLeftColor:T4,filter:i6,WebkitFilter:i6,mask:a6,WebkitMask:a6},c6=e=>zbe[e],Bbe=new Set([i6,a6]);function l6(e,t){let n=c6(e);return Bbe.has(n)||(n=j4),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Vbe=new Set([`auto`,`none`,`0`]);function Hbe(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Vbe.has(t)&&k4(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=l6(n,i)}var Ube=class extends x3{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(),s4(r))){let i=H3(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!K3.has(n)||e.length!==2)return;let[r,i]=e,a=r6(r),o=r6(i);if(c4(r)!==c4(i)&&m3[n]){this.needsMeasurement=!0;return}if(a!==o)if(p3(a)&&p3(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else m3[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Fbe(e[t]))&&n.push(t);n.length&&Hbe(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=m3[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]=m3[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()}},u6=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function d6(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 f6=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function p6(e){return E2(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:m6,cancel:Wbe}=Q2(queueMicrotask,!1),h6={x:!1,y:!1};function g6(){return h6.x||h6.y}function Gbe(e){return e===`x`||e===`y`?h6[e]?null:(h6[e]=!0,()=>{h6[e]=!1}):h6.x||h6.y?null:(h6.x=h6.y=!0,()=>{h6.x=h6.y=!1})}function _6(e,t){let n=d6(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Kbe(e){return!(e.pointerType===`touch`||g6())}function qbe(e,t,n={}){let[r,i,a]=_6(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(!Kbe(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 v6=(e,t)=>t?e===t||v6(e,t.parentElement):!1,y6=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Jbe=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Ybe(e){return Jbe.has(e.tagName)||e.isContentEditable===!0}var Xbe=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Zbe(e){return Xbe.has(e.tagName)||e.isContentEditable===!0}var b6=new WeakSet;function x6(e){return t=>{t.key===`Enter`&&e(t)}}function S6(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Qbe=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=x6(()=>{if(b6.has(n))return;S6(n,`down`);let e=x6(()=>{S6(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>S6(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function C6(e){return y6(e)&&!g6()}var w6=new WeakSet;function $be(e,t,n={}){let[r,i,a]=_6(e,n),o=e=>{let r=e.currentTarget;if(!C6(e)||w6.has(e))return;b6.add(r),n.stopPropagation&&w6.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),b6.has(r)&&b6.delete(r),C6(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||v6(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),p6(e)&&(e.addEventListener(`focus`,e=>Qbe(e,i)),!Ybe(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function T6(e){return E2(e)&&`ownerSVGElement`in e}var E6=new WeakMap,D6,O6=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:T6(r)&&`getBBox`in r?r.getBBox()[t]:r[n],exe=O6(`inline`,`width`,`offsetWidth`),txe=O6(`block`,`height`,`offsetHeight`);function nxe({target:e,borderBoxSize:t}){E6.get(e)?.forEach(n=>{n(e,{get width(){return exe(e,t)},get height(){return txe(e,t)}})})}function rxe(e){e.forEach(nxe)}function ixe(){typeof ResizeObserver>`u`||(D6=new ResizeObserver(rxe))}function axe(e,t){D6||ixe();let n=d6(e);return n.forEach(e=>{let n=E6.get(e);n||(n=new Set,E6.set(e,n)),n.add(t),D6?.observe(e)}),()=>{n.forEach(e=>{let n=E6.get(e);n?.delete(t),n?.size||D6?.unobserve(e)})}}var k6=new Set,A6;function oxe(){A6=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};k6.forEach(t=>t(e))},window.addEventListener(`resize`,A6)}function sxe(e){return k6.add(e),A6||oxe(),()=>{k6.delete(e),!k6.size&&typeof A6==`function`&&(window.removeEventListener(`resize`,A6),A6=void 0)}}function j6(e,t){return typeof e==`function`?sxe(e):axe(e,t)}var M6={value:null,addProjectionMetrics:null};function cxe(e){return T6(e)&&e.tagName===`svg`}var lxe=[...n6,T4,j4],uxe=e=>lxe.find(t6(e)),N6=()=>({translate:0,scale:1,origin:0,originPoint:0}),P6=()=>({x:N6(),y:N6()}),F6=()=>({min:0,max:0}),I6=()=>({x:F6(),y:F6()}),dxe=new WeakMap;function L6(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function R6(e){return typeof e==`string`||Array.isArray(e)}var z6=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],B6=[`initial`,...z6];function V6(e){return L6(e.animate)||B6.some(t=>R6(e[t]))}function H6(e){return!!(V6(e)||e.variants)}function fxe(e,t,n){for(let r in t){let i=t[r],a=n[r];if(J3(i))e.addValue(r,i);else if(J3(a))e.addValue(r,R3(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,R3(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var U6={current:null},W6={current:!1},pxe=typeof window<`u`;function mxe(){if(W6.current=!0,pxe)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>U6.current=e.matches;e.addEventListener(`change`,t),t()}else U6.current=!1}var G6=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],K6={};function q6(e){K6=e}function hxe(){return K6}var gxe=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=x3,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=i4.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,$2.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=V6(t),this.isVariantNode=H6(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&&J3(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,dxe.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:(W6.current||mxe(),this.shouldReduceMotion=U6.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(),e4(this.notifyUpdate),e4(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&&P3.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new k3({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:N2(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=f3.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&$2.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 K6){let t=K6[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):I6()}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<G6.length;t++){let n=G6[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=fxe(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=R3(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`&&(T2(n)||D2(n))?n=parseFloat(n):!uxe(n)&&j4.test(t)&&(n=l6(e,t)),this.setBaseTarget(e,J3(n)?n.get():n)),J3(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=W3(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&&!J3(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 M2),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){m6.render(this.render)}},J6=class extends gxe{constructor(){super(...arguments),this.KeyframeResolver=Ube}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;J3(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Y6=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function X6({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function _xe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function vxe(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 Z6(e){return e===void 0||e===1}function Q6({scale:e,scaleX:t,scaleY:n}){return!Z6(e)||!Z6(t)||!Z6(n)}function $6(e){return Q6(e)||e8(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function e8(e){return t8(e.x)||t8(e.y)}function t8(e){return e&&e!==`0%`}function n8(e,t,n){return n+t*(e-n)}function r8(e,t,n,r,i){return i!==void 0&&(e=n8(e,i,r)),n8(e,n,r)+t}function i8(e,t=0,n=1,r,i){e.min=r8(e.min,t,n,r,i),e.max=r8(e.max,t,n,r,i)}function a8(e,{x:t,y:n}){i8(e.x,t.translate,t.scale,t.originPoint),i8(e.y,n.translate,n.scale,n.originPoint)}var o8=.999999999999,s8=1.0000000000001;function yxe(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&&(c8(e.x,-a.scroll.offset.x),c8(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,a8(e,o)),r&&$6(a.latestValues)&&d8(e,a.latestValues,a.layout?.layoutBox))}t.x<s8&&t.x>o8&&(t.x=1),t.y<s8&&t.y>o8&&(t.y=1)}function c8(e,t){e.min+=t,e.max+=t}function l8(e,t,n,r,i=.5){i8(e,t,n,P4(e.min,e.max,i),r)}function u8(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function d8(e,t,n){let r=n??e;l8(e.x,u8(t.x,r.x),t.scaleX,t.scale,t.originX),l8(e.y,u8(t.y,r.y),t.scaleY,t.scale,t.originY)}function f8(e,t){return X6(vxe(e.getBoundingClientRect(),t))}function bxe(e,t,n){let r=f8(e,n),{scroll:i}=t;return i&&(c8(r.x,i.offset.x),c8(r.y,i.offset.y)),r}var xxe={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Sxe=d3.length;function Cxe(e,t,n){let r=``,i=!0;for(let a=0;a<Sxe;a++){let o=d3[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=f6(s,s6[o]);if(!c){i=!1;let t=xxe[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${f6(a,s6.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function p8(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(f3.has(e)){o=!0;continue}else if(o4(e)){i[e]=n;continue}else{let t=f6(n,s6[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Cxe(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 m8(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 h8(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var g8={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(S4.test(e))e=parseFloat(e);else return e;return`${h8(e,t.target.x)}% ${h8(e,t.target.y)}%`}},wxe={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=j4.parse(e);if(i.length>5)return r;let a=j4.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=P4(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},_8={borderRadius:{...g8,applyTo:[...u6]},borderTopLeftRadius:g8,borderTopRightRadius:g8,borderBottomLeftRadius:g8,borderBottomRightRadius:g8,boxShadow:wxe};function v8(e,{layout:t,layoutId:n}){return f3.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!_8[e]||e===`opacity`)}function y8(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(J3(r[t])||i&&J3(i[t])||v8(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Txe(e){return window.getComputedStyle(e)}var Exe=class extends J6{constructor(){super(...arguments),this.type=`html`,this.renderInstance=m8}readValueFromInstance(e,t){if(f3.has(t))return this.projection?.isProjecting?l3(t):qye(e,t);{let n=Txe(e),r=(o4(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return f8(e,t)}build(e,t,n){p8(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return y8(e,t,n)}},Dxe={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Oxe={offset:`strokeDashoffset`,array:`strokeDasharray`};function kxe(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Dxe:Oxe;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Axe=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function b8(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(p8(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 Axe)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&&kxe(d,i,a,o,!1)}var x8=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`]),S8=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function jxe(e,t,n,r){m8(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(x8.has(n)?n:X3(n),t.attrs[n])}function C8(e,t,n){let r=y8(e,t,n);for(let n in e)if(J3(e[n])||J3(t[n])){let t=d3.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Mxe=class extends J6{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=I6}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(f3.has(t)){let e=c6(t);return e&&e.default||0}return t=x8.has(t)?t:X3(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return C8(e,t,n)}build(e,t,n){b8(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){jxe(e,t,n,r)}mount(e){this.isSVGTag=S8(e.tagName),super.mount(e)}},Nxe=B6.length;function w8(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&w8(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<Nxe;n++){let r=B6[n],i=e.props[r];(R6(i)||i===!1)&&(t[r]=i)}return t}function T8(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 Pxe=[...z6].reverse(),Fxe=z6.length;function Ixe(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Nbe(e,t,n)))}function Lxe(e){let t=Ixe(e),n=D8(),r=!0,i=!1,a=t=>(n,r)=>{let i=G3(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=w8(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<Fxe;t++){let p=Pxe[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=R6(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||L6(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=Rxe(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=q3(t)&&q3(n)?!T8(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=G3(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=F3(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=G3(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=D8(),i=!0}}}function Rxe(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!T8(t,e):!1}function E8(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function D8(){return{animate:E8(!0),whileInView:E8(),whileHover:E8(),whileTap:E8(),whileDrag:E8(),whileFocus:E8(),exit:E8()}}function O8(e,t){e.min=t.min,e.max=t.max}function k8(e,t){O8(e.x,t.x),O8(e.y,t.y)}function A8(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var zxe=.9999,Bxe=1.0001,Vxe=-.01,Hxe=.01;function j8(e){return e.max-e.min}function Uxe(e,t,n){return Math.abs(e-t)<=n}function M8(e,t,n,r=.5){e.origin=r,e.originPoint=P4(t.min,t.max,e.origin),e.scale=j8(n)/j8(t),e.translate=P4(n.min,n.max,e.origin)-e.originPoint,(e.scale>=zxe&&e.scale<=Bxe||isNaN(e.scale))&&(e.scale=1),(e.translate>=Vxe&&e.translate<=Hxe||isNaN(e.translate))&&(e.translate=0)}function N8(e,t,n,r){M8(e.x,t.x,n.x,r?r.originX:void 0),M8(e.y,t.y,n.y,r?r.originY:void 0)}function P8(e,t,n,r=0){e.min=(r?P4(n.min,n.max,r):n.min)+t.min,e.max=e.min+j8(t)}function Wxe(e,t,n,r){P8(e.x,t.x,n.x,r?.x),P8(e.y,t.y,n.y,r?.y)}function F8(e,t,n,r=0){let i=r?P4(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+j8(t)}function I8(e,t,n,r){F8(e.x,t.x,n.x,r?.x),F8(e.y,t.y,n.y,r?.y)}function L8(e,t,n,r,i){return e-=t,e=n8(e,1/n,r),i!==void 0&&(e=n8(e,1/i,r)),e}function Gxe(e,t=0,n=1,r=.5,i,a=e,o=e){if(x4.test(t)&&(t=parseFloat(t),t=P4(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=P4(a.min,a.max,r);e===a&&(s-=t),e.min=L8(e.min,t,n,s,i),e.max=L8(e.max,t,n,s,i)}function R8(e,t,[n,r,i],a,o){Gxe(e,t[n],t[r],t[i],t.scale,a,o)}var Kxe=[`x`,`scaleX`,`originX`],qxe=[`y`,`scaleY`,`originY`];function z8(e,t,n,r){R8(e.x,t,Kxe,n?n.x:void 0,r?r.x:void 0),R8(e.y,t,qxe,n?n.y:void 0,r?r.y:void 0)}function B8(e){return e.translate===0&&e.scale===1}function V8(e){return B8(e.x)&&B8(e.y)}function H8(e,t){return e.min===t.min&&e.max===t.max}function Jxe(e,t){return H8(e.x,t.x)&&H8(e.y,t.y)}function U8(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function W8(e,t){return U8(e.x,t.x)&&U8(e.y,t.y)}function G8(e){return j8(e.x)/j8(e.y)}function K8(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function q8(e){return[e(`x`),e(`y`)]}function Yxe(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 Xxe=u6.length,J8=e=>typeof e==`string`?parseFloat(e):e,Y8=e=>typeof e==`number`||S4.test(e);function Zxe(e,t,n,r,i,a){i?(e.opacity=P4(0,n.opacity??1,Qxe(r)),e.opacityExit=P4(t.opacity??1,0,$xe(r))):a&&(e.opacity=P4(t.opacity??1,n.opacity??1,r));for(let i=0;i<Xxe;i++){let a=u6[i],o=X8(t,a),s=X8(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||Y8(o)===Y8(s)?(e[a]=Math.max(P4(J8(o),J8(s),r),0),(x4.test(s)||x4.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=P4(t.rotate||0,n.rotate||0,r))}function X8(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Qxe=Z8(0,.5,G2),$xe=Z8(.5,.95,k2);function Z8(e,t,n){return r=>r<e?0:r>t?1:n(j2(e,t,r))}function eSe(e,t,n){let r=J3(e)?e:R3(e);return r.start(V3(``,r,t,n)),r.animation}function Q8(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var tSe=(e,t)=>e.depth-t.depth,nSe=class{constructor(){this.children=[],this.isDirty=!1}add(e){x2(this.children,e),this.isDirty=!0}remove(e){S2(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(tSe),this.isDirty=!1,this.children.forEach(e)}};function rSe(e,t){let n=i4.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(e4(r),e(a-t))};return $2.setup(r,!0),()=>e4(r)}function $8(e){return J3(e)?e.get():e}var iSe=class{constructor(){this.members=[]}add(e){x2(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&&(S2(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(S2(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)}},e5={hasAnimatedSinceResize:!0,hasEverUpdated:!1},t5={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},n5=[``,`X`,`Y`,`Z`],aSe=1e3,oSe=0;function r5(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function i5(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Q3(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,$2,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&i5(r)}function a5({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=oSe++,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,M6.value&&(t5.nodes=t5.calculatedTargetDeltas=t5.calculatedProjections=0),this.nodes.forEach(lSe),this.nodes.forEach(hSe),this.nodes.forEach(gSe),this.nodes.forEach(uSe),M6.addProjectionMetrics&&M6.addProjectionMetrics(t5)},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 nSe)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new M2),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=T6(t)&&!cxe(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;$2.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=rSe(i,250),e5.hasAnimatedSinceResize&&(e5.hasAnimatedSinceResize=!1,this.nodes.forEach(c5)))})}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()||xSe,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!W8(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={...B3(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||c5(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(),e4(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(_Se),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&&i5(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(fSe),this.nodes.forEach(o5);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(s5);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(pSe),this.nodes.forEach(mSe),this.nodes.forEach(sSe),this.nodes.forEach(cSe)):this.nodes.forEach(s5),this.clearAllSnapshots();let e=i4.now();t4.delta=C2(0,1e3/60,e-t4.timestamp),t4.timestamp=e,t4.isProcessing=!0,n4.update.process(t4),n4.preRender.process(t4),n4.render.process(t4),t4.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,m6.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(dSe),this.sharedNodes.forEach(vSe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$2.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$2.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!j8(this.snapshot.measuredBox.x)&&!j8(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||=I6(),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&&!V8(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||$6(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)),SSe(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return I6();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(CSe))){let{scroll:e}=this.root;e&&(c8(t.x,e.offset.x),c8(t.y,e.offset.y))}return t}removeElementScroll(e){let t=I6();if(k8(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&&k8(t,e),c8(t.x,i.offset.x),c8(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||I6();k8(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&&(c8(r.x,-n.scroll.offset.x),c8(r.y,-n.scroll.offset.y)),$6(n.latestValues)&&d8(r,n.latestValues,n.layout?.layoutBox)}return $6(this.latestValues)&&d8(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=I6();k8(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!$6(n.latestValues))continue;let r;n.instance&&(Q6(n.latestValues)&&n.updateSnapshot(),r=I6(),k8(r,n.measurePageBox())),z8(t,n.latestValues,n.snapshot?.layoutBox,r)}return $6(this.latestValues)&&z8(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!==t4.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=t4.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=I6(),this.targetWithTransforms=I6()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Wxe(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):k8(this.target,this.layout.layoutBox),a8(this.target,this.targetDelta)):k8(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),M6.value&&t5.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Q6(this.parent.latestValues)||e8(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=I6(),this.relativeTargetOrigin=I6(),I8(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),k8(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===t4.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;k8(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;yxe(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=I6());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(A8(this.prevProjectionDelta.x,this.projectionDelta.x),A8(this.prevProjectionDelta.y,this.projectionDelta.y)),N8(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!K8(this.projectionDelta.x,this.prevProjectionDelta.x)||!K8(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),M6.value&&t5.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=P6(),this.projectionDelta=P6(),this.projectionDeltaWithTransform=P6()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=P6();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=I6(),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(bSe));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=P4(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=P4(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(l5(o.x,e.x,n),l5(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(I8(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ySe(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Jxe(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=I6(),k8(f,this.relativeTarget)),c&&(this.animationValues=a,Zxe(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&&=(e4(this.pendingAnimation),void 0),this.pendingAnimation=$2.update(()=>{e5.hasAnimatedSinceResize=!0,this.motionValue||=R3(0),this.motionValue.jump(0,!1),this.currentAnimation=eSe(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(aSe),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&&m5(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||I6();let t=j8(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=j8(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}k8(t,n),d8(t,i),N8(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new iSe),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&&r5(`z`,e,r,this.animationValues);for(let t=0;t<n5.length;t++)r5(`rotate${n5[t]}`,e,r,this.animationValues),r5(`skew${n5[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=$8(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=$8(t?.pointerEvents)||``),this.hasProjected&&!$6(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Yxe(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 _8){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=_8[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?$8(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(o5),this.root.sharedNodes.clear()}}}function sSe(e){e.updateLayout()}function cSe(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`)q8(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=j8(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;O8(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else m5(i,t.layoutBox,n)&&q8(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=j8(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=P6();N8(o,n,t.layoutBox);let s=P6();a?N8(s,e.applyTransform(r,!0),t.measuredBox):N8(s,n,t.layoutBox);let c=!V8(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=I6();I8(s,t.layoutBox,i.layoutBox,o);let c=I6();I8(c,n,a.layoutBox,o),W8(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 lSe(e){M6.value&&t5.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 uSe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function dSe(e){e.clearSnapshot()}function o5(e){e.clearMeasurements()}function fSe(e){e.isLayoutDirty=!0,e.updateLayout()}function s5(e){e.isLayoutDirty=!1}function pSe(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function mSe(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function c5(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function hSe(e){e.resolveTargetDelta()}function gSe(e){e.calcProjection()}function _Se(e){e.resetSkewAndRotation()}function vSe(e){e.removeLeadSnapshot()}function l5(e,t,n){e.translate=P4(t.translate,0,n),e.scale=P4(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function u5(e,t,n,r){e.min=P4(t.min,n.min,r),e.max=P4(t.max,n.max,r)}function ySe(e,t,n,r){u5(e.x,t.x,n.x,r),u5(e.y,t.y,n.y,r)}function bSe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var xSe={duration:.45,ease:[.4,0,.1,1]},d5=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),f5=d5(`applewebkit/`)&&!d5(`chrome/`)?Math.round:k2;function p5(e){e.min=f5(e.min),e.max=f5(e.max)}function SSe(e){p5(e.x),p5(e.y)}function m5(e,t,n){return e===`position`||e===`preserve-aspect`&&!Uxe(G8(t),G8(n),.2)}function CSe(e){return e!==e.root&&e.scroll?.wasRoot}var wSe=a5({attachResizeListener:(e,t)=>Q8(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),h5={current:void 0},g5=a5({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!h5.current){let e=new wSe({});e.mount(window),e.setOptions({layoutScroll:!0}),h5.current=e}return h5.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),_5=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function v5(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function TSe(...e){return t=>{let n=!1,r=e.map(e=>{let r=v5(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():v5(e[t],null)}}}}function ESe(...e){return b.useCallback(TSe(...e),e)}var DSe=class extends b.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(p6(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=p6(e)&&e.offsetWidth||0,r=p6(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 OSe({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)(_5),u=ESe(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(`
|
|
285
|
+
[data-motion-pop-id="${o}"] {
|
|
286
|
+
position: absolute !important;
|
|
287
|
+
width: ${e}px !important;
|
|
288
|
+
height: ${u}px !important;
|
|
289
|
+
${_}px !important;
|
|
290
|
+
${v}px !important;
|
|
291
|
+
}
|
|
292
|
+
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,H.jsx)(DSe,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:b.cloneElement(e,{ref:u})})}var kSe=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=v2(ASe),d=(0,b.useId)(),f=(0,b.useRef)(n),p=(0,b.useRef)(r);y2(()=>{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)(OSe,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,H.jsx)(b2.Provider,{value:h,children:e})};function ASe(){return new Map}function y5(e=!0){let t=(0,b.useContext)(b2);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 b5=e=>e.key||``;function x5(e){let t=[];return b.Children.forEach(e,e=>{(0,b.isValidElement)(e)&&t.push(e)}),t}var jSe=({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]=y5(o),f=(0,b.useMemo)(()=>x5(e),[e]),p=o&&!u?[]:f.map(b5),m=(0,b.useRef)(!0),h=(0,b.useRef)(f),g=v2(()=>new Map),_=(0,b.useRef)(new Set),[v,y]=(0,b.useState)(f),[x,S]=(0,b.useState)(f);y2(()=>{m.current=!1,h.current=f;for(let e=0;e<x.length;e++){let t=b5(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=b5(n);p.includes(r)||(e.splice(t,0,n),C.push(n))}return a===`wait`&&C.length&&(e=C),S(x5(e)),y(f),null}let{forceRender:w}=(0,b.useContext)(_2);return(0,H.jsx)(H.Fragment,{children:x.map(e=>{let v=b5(e),y=o&&!u?!1:f===x||p.includes(v);return(0,H.jsx)(kSe,{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)})})},S5=(0,b.createContext)({strict:!1}),C5={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`]},w5=!1;function MSe(){if(w5)return;let e={};for(let t in C5)e[t]={isEnabled:e=>C5[t].some(t=>!!e[t])};q6(e),w5=!0}function T5(){return MSe(),hxe()}function NSe(e){let t=T5();for(let n in e)t[n]={...t[n],...e[n]};q6(t)}var PSe=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 E5(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||PSe.has(e)}var FSe=c({default:()=>D5}),D5,ISe=o((()=>{throw D5={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),O5=e=>!E5(e);function LSe(e){typeof e==`function`&&(O5=t=>t.startsWith(`on`)?!E5(t):e(t))}try{LSe((ISe(),d(FSe)).default)}catch{}function RSe(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||J3(e[i])||(O5(i)||n===!0&&E5(i)||!t&&!E5(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var k5=(0,b.createContext)({});function zSe(e,t){if(V6(e)){let{initial:t,animate:n}=e;return{initial:t===!1||R6(t)?t:void 0,animate:R6(n)?n:void 0}}return e.inherit===!1?{}:t}function BSe(e){let{initial:t,animate:n}=zSe(e,(0,b.useContext)(k5));return(0,b.useMemo)(()=>({initial:t,animate:n}),[A5(t),A5(n)])}function A5(e){return Array.isArray(e)?e.join(` `):e}var j5=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function M5(e,t,n){for(let r in t)!J3(t[r])&&!v8(r,n)&&(e[r]=t[r])}function VSe({transformTemplate:e},t){return(0,b.useMemo)(()=>{let n=j5();return p8(n,t,e),Object.assign({},n.vars,n.style)},[t])}function HSe(e,t){let n=e.style||{},r={};return M5(r,n,e),Object.assign(r,VSe(e,t)),r}function USe(e,t){let n={},r=HSe(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 N5=()=>({...j5(),attrs:{}});function WSe(e,t,n,r){let i=(0,b.useMemo)(()=>{let n=N5();return b8(n,t,S8(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};M5(t,e.style,e),i.style={...t,...i.style}}return i}var GSe=[`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 P5(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(GSe.indexOf(e)>-1||/[A-Z]/u.test(e))}function KSe(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??P5(e)?WSe:USe)(t,r,i,e),c=RSe(t,typeof e==`string`,a),l=e===b.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,b.useMemo)(()=>J3(u)?u.get():u,[u]);return(0,b.createElement)(e,{...l,children:d})}function qSe({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:JSe(n,r,i,e),renderState:t()}}function JSe(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=$8(a[e]);let{initial:o,animate:s}=e,c=V6(e),l=H6(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`&&!L6(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=W3(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 F5=e=>(t,n)=>{let r=(0,b.useContext)(k5),i=(0,b.useContext)(b2),a=()=>qSe(e,t,r,i);return n?a():v2(a)},YSe=F5({scrapeMotionValuesFromProps:y8,createRenderState:j5}),XSe=F5({scrapeMotionValuesFromProps:C8,createRenderState:N5}),ZSe=Symbol.for(`motionComponentSymbol`);function QSe(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 I5=(0,b.createContext)({});function L5(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function $Se(e,t,n,r,i,a){let{visualElement:o}=(0,b.useContext)(k5),s=(0,b.useContext)(S5),c=(0,b.useContext)(b2),l=(0,b.useContext)(_5),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)(I5);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&eCe(f.current,n,i,h);let g=(0,b.useRef)(!1);(0,b.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[Z3],v=(0,b.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return y2(()=>{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 eCe(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:R5(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&L5(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function R5(e){if(e)return e.options.allowProjection===!1?R5(e.parent):e.projection}function z5(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&NSe(r);let a=n?n===`svg`:P5(e),o=a?XSe:YSe;function s(n,s){let c,l={...(0,b.useContext)(_5),...n,layoutId:tCe(n)},{isStatic:u}=l,d=BSe(n),f=o(n,u);if(!u&&typeof window<`u`){nCe(l,r);let t=rCe(l);c=t.MeasureLayout,d.visualElement=$Se(e,f,l,i,t.ProjectionNode,a)}return(0,H.jsxs)(k5.Provider,{value:d,children:[c&&d.visualElement?(0,H.jsx)(c,{visualElement:d.visualElement,...l}):null,KSe(e,n,QSe(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[ZSe]=e,c}function tCe({layoutId:e}){let t=(0,b.useContext)(_2).id;return t&&e!==void 0?t+`-`+e:e}function nCe(e,t){(0,b.useContext)(S5).strict}function rCe(e){let{drag:t,layout:n}=T5();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function iCe(e,t){if(typeof Proxy>`u`)return z5;let n=new Map,r=(n,r)=>z5(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,z5(a,void 0,e,t)),n.get(a))})}var aCe=(e,t)=>t.isSVG??P5(e)?new Mxe(t):new Exe(t,{allowProjection:e!==b.Fragment}),oCe=class extends Y6{constructor(e){super(e),e.animationState||=Lxe(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();L6(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?.()}},sCe=0,cCe={animation:{Feature:oCe},exit:{Feature:class extends Y6{constructor(){super(...arguments),this.id=sCe++,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=G3(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 B5(e){return{point:{x:e.pageX,y:e.pageY}}}var lCe=e=>t=>y6(t)&&e(t,B5(t));function V5(e,t,n,r){return Q8(e,t,lCe(n),r)}var H5=({current:e})=>e?e.ownerDocument.defaultView:null,U5=(e,t)=>Math.abs(e-t);function uCe(e,t){let n=U5(e.x,t.x),r=U5(e.y,t.y);return Math.sqrt(n**2+r**2)}var W5=new Set([`auto`,`scroll`]),G5=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=K5(this.lastRawMoveEventInfo,this.transformPagePoint));let e=J5(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=uCe(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=t4;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=K5(t,this.transformPagePoint),$2.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=J5(e.type===`pointercancel`?this.lastMoveEventInfo:K5(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!y6(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=K5(B5(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=t4;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,J5(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=A2(V5(this.contextWindow,`pointermove`,this.handlePointerMove,d),V5(this.contextWindow,`pointerup`,this.handlePointerUp,d),V5(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(W5.has(e.overflowX)||W5.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),$2.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),e4(this.updatePoint)}};function K5(e,t){return t?{point:t(e.point)}:e}function q5(e,t){return{x:e.x-t.x,y:e.y-t.y}}function J5({point:e},t){return{point:e,delta:q5(e,Y5(t)),offset:q5(e,dCe(t)),velocity:fCe(t,.1)}}function dCe(e){return e[0]}function Y5(e){return e[e.length-1]}function fCe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Y5(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>N2(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>N2(t)*2&&(r=e[1]);let a=P2(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 pCe(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?P4(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?P4(n,e,r.max):Math.min(e,n)),e}function X5(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 mCe(e,{top:t,left:n,bottom:r,right:i}){return{x:X5(e.x,n,i),y:X5(e.y,t,r)}}function Z5(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 hCe(e,t){return{x:Z5(e.x,t.x),y:Z5(e.y,t.y)}}function gCe(e,t){let n=.5,r=j8(e),i=j8(t);return i>r?n=j2(t.min,t.max-r,e.min):r>i&&(n=j2(e.min,e.max-i,t.min)),C2(0,1,n)}function _Ce(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 Q5=.35;function vCe(e=Q5){return e===!1?e=0:e===!0&&(e=Q5),{x:$5(e,`left`,`right`),y:$5(e,`top`,`bottom`)}}function $5(e,t,n){return{min:e7(e,t),max:e7(e,n)}}function e7(e,t){return typeof e==`number`?e:e[t]||0}var yCe=new WeakMap,bCe=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=I6(),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(B5(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=Gbe(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),q8(e=>{let t=this.getAxisMotionValue(e).get()||0;if(x4.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=j8(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&$2.update(()=>i(e,t),!1,!0),Y3(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=SCe(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&&$2.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 G5(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:H5(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&&$2.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||!n7(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=pCe(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&&L5(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=mCe(n.layoutBox,e):this.constraints=!1,this.elastic=vCe(t),r!==this.constraints&&!L5(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&q8(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=_Ce(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!L5(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=bxe(n,r.root,this.visualElement.getTransformPagePoint()),a=hCe(r.layout.layoutBox,i);if(t){let e=t(_xe(a));this.hasMutatedConstraints=!!e,e&&(a=X6(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=q8(o=>{if(!n7(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 Y3(this.visualElement,e),n.start(V3(e,n,0,t,this.visualElement,!1))}stopAnimation(){q8(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){q8(t=>{let{drag:n}=this.getProps();if(!n7(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]-P4(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!L5(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};q8(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=gCe({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(),q8(t=>{if(!n7(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(P4(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;yCe.set(this.visualElement,this);let e=this.visualElement.current,t=V5(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Zbe(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();L5(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=xCe(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),$2.read(r);let o=Q8(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(q8(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=Q5,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function t7(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function xCe(e,t,n){let r=j6(e,t7(n)),i=j6(t,t7(n));return()=>{r(),i()}}function n7(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function SCe(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var CCe=class extends Y6{constructor(e){super(e),this.removeGroupControls=k2,this.removeListeners=k2,this.controls=new bCe(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||k2}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()}},r7=e=>(t,n)=>{e&&$2.update(()=>e(t,n),!1,!0)},wCe=class extends Y6{constructor(){super(...arguments),this.removePointerDownListener=k2}onPointerDown(e){this.session=new G5(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:H5(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:r7(e),onStart:r7(t),onMove:r7(n),onEnd:(e,t)=>{delete this.session,r&&$2.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=V5(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},i7=!1,TCe=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),i7&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),e5.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}),i7=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||$2.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(),m6.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;i7=!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 a7(e){let[t,n]=y5(),r=(0,b.useContext)(_2);return(0,H.jsx)(TCe,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(I5),isPresent:t,safeToRemove:n})}var ECe={pan:{Feature:wCe},drag:{Feature:CCe,ProjectionNode:g5,MeasureLayout:a7}};function o7(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&$2.postRender(()=>i(t,B5(t)))}var DCe=class extends Y6{mount(){let{current:e}=this.node;e&&(this.unmount=qbe(e,(e,t)=>(o7(this.node,t,`Start`),e=>o7(this.node,e,`End`))))}unmount(){}},OCe=class extends Y6{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=A2(Q8(this.node.current,`focus`,()=>this.onFocus()),Q8(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function s7(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&&$2.postRender(()=>i(t,B5(t)))}var kCe=class extends Y6{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=$be(e,(e,t)=>(s7(this.node,t,`Start`),(e,{success:t})=>s7(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},c7=new WeakMap,l7=new WeakMap,ACe=e=>{let t=c7.get(e.target);t&&t(e)},jCe=e=>{e.forEach(ACe)};function MCe({root:e,...t}){let n=e||document;l7.has(n)||l7.set(n,{});let r=l7.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(jCe,{root:e,...t})),r[i]}function NCe(e,t,n){let r=MCe(t);return c7.set(e,n),r.observe(e),()=>{c7.delete(e),r.unobserve(e)}}var PCe={some:0,all:1},FCe=class extends Y6{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:PCe[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=NCe(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(ICe(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function ICe({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var LCe={inView:{Feature:FCe},tap:{Feature:kCe},focus:{Feature:OCe},hover:{Feature:DCe}},RCe={layout:{ProjectionNode:g5,MeasureLayout:a7}},zCe=iCe({...cCe,...LCe,...ECe,...RCe},aCe),BCe=y$;g$.registerLanguage(`json`,BCe);function u7({code:e}){return(0,H.jsx)(g$,{language:`json`,style:k$,customStyle:{margin:0,padding:0,background:`transparent`,fontSize:`0.75rem`},codeTagProps:{className:`font-mono whitespace-pre`},showLineNumbers:!1,wrapLongLines:!0,children:e})}var VCe=e=>new Date(e).toLocaleTimeString(`en-US`,{hour12:!1,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,fractionalSecondDigits:3}),HCe=e=>e.source===`view`?`view`:e.type===`response`?`res`:`req`,UCe={duration:.2,ease:[.4,0,.2,1]},WCe={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`}},GCe=({log:e,expanded:t,onToggle:n})=>{let r=Object.keys(e.args).length>0,i=WCe[HCe(e)];return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>r&&n(),disabled:!r,className:fG(`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:fG(`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:VCe(e.timestamp)}),(0,H.jsx)(`span`,{className:fG(`shrink-0 rounded px-1 text-[10px] font-medium uppercase tracking-wide`,i.badge),children:i.label}),(0,H.jsx)(`span`,{className:fG(`min-w-[120px] shrink-0 font-semibold`,i.command),children:e.command})]}),(0,H.jsx)(jSe,{initial:!1,children:t&&r?(0,H.jsx)(zCe.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:UCe,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)(u7,{code:JSON.stringify(e.args,null,2)})})})},`args`):null})]})},d7=({onClose:e})=>{let t=qE(),n=kE(t?.name??``)?.openaiLogs??[],r=OE(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)(ki,{className:`size-3.5`})}),(0,H.jsx)(S$,{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)(Mi,{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)(GCe,{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))})]})},KCe=({expanded:e,onToggle:t})=>{let n=qE(),r=kE(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=uS(i),u=dS(a?.widgetState),d=l>=sS,f=u>=cS,p=i.isError===!0;return(0,H.jsxs)(`button`,{type:`button`,"aria-expanded":e,onClick:t,className:fG(`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)(h2,{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:_G(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)(h2,{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`:``]})})]})]})},qCe=()=>(0,H.jsxs)(`div`,{className:`flex h-full min-h-0 w-full flex-row overflow-hidden bg-light-gray`,children:[(0,H.jsx)(f7,{}),(0,H.jsx)(p7,{className:`border-l border-border`})]}),f7=()=>{let e=qE(),t=kE(e?.name??``);if(!e||!t?.response)return null;let{response:n}=t,r=JSON.stringify(n,null,2),i=uS(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)(g2,{kind:`tool-output`,tokenCount:i}),(0,H.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-auto p-3`,children:[(0,H.jsx)(S$,{value:r,label:`Copy tool output`,className:`absolute right-2 top-2 z-10`}),(0,H.jsx)(u7,{code:r})]})]})},p7=({className:e})=>{let t=qE(),n=kE(t?.name??``);if(!t||!n?.response)return null;let r=JSON.stringify(n.openaiObject?.widgetState??null,null,2),i=dS(n.openaiObject?.widgetState),a=i>=cS;return(0,H.jsxs)(`section`,{className:fG(`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden`,e),children:[a&&(0,H.jsx)(g2,{kind:`view-state`,tokenCount:i}),(0,H.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-auto p-3`,children:[(0,H.jsx)(S$,{value:r,label:`Copy view state`,className:`absolute right-2 top-2 z-10`}),(0,H.jsx)(u7,{code:r})]})]})},JCe=[{id:`output`,label:`Output`,icon:ii},{id:`state`,label:`State`,icon:Gr},{id:`logs`,label:`Logs`,icon:fi}],YCe=({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:JCe.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:fG(`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)(Mi,{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)(f7,{}):t===`state`?(0,H.jsx)(p7,{}):(0,H.jsx)(d7,{})})]})},m7=({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})}),h7=`devtools-tool-panel-view-logs`,g7=`view`,_7=`logs`,v7=`devtools-tool-panel-output-logs`,y7=`output`,b7=`devtools-tool-panel-header-output`,x7=`header-output`,S7=`header-view`,XCe=()=>{let e=qE(),t=kE(e?.name??``),[n,r]=d2(`devtools-tool-panel-logs-open`,{defaultValue:!1}),[i,a]=d2(`devtools-tool-panel-header-expanded`,{defaultValue:!1}),[o,s]=d2(`devtools-tool-panel-fullscreen-inspector-open`,{defaultValue:!1}),{defaultLayout:c,onLayoutChanged:l}=Jo({id:h7,panelIds:[g7,_7],storage:localStorage}),{defaultLayout:u,onLayoutChanged:d}=Jo({id:b7,panelIds:[x7,S7],storage:localStorage}),{defaultLayout:f,onLayoutChanged:p}=Jo({id:v7,panelIds:[y7,_7],storage:localStorage}),m=ps(e=>e.displayMode),h=ps(e=>e.theme),g=ps(e=>e.setPreference),_=ps(e=>e.userAgent?.device?.type??`desktop`)===`mobile`,v=m===`fullscreen`,y=m===`modal`,x=v&&!_,S=v||y;l2(`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)(m7,{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=uS(n),o=a>=sS,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)(Go,{orientation:`horizontal`,id:v7,className:`flex min-h-0 min-w-0 flex-1 overflow-hidden`,defaultLayout:f,onLayoutChanged:p,children:[(0,H.jsx)(Qo,{id:y7,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)(h2,{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:_G(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)(g2,{kind:`tool-output`,tokenCount:a}),(0,H.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-auto p-3`,children:[(0,H.jsx)(S$,{value:r,label:`Copy tool output`,className:`absolute right-2 top-2 z-10`}),(0,H.jsx)(u7,{code:r})]})]})]})}),(0,H.jsx)(ts,{className:`w-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`}),(0,H.jsx)(Qo,{id:_7,defaultSize:360,minSize:240,maxSize:640,className:`min-h-0`,children:(0,H.jsx)(d7,{},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)(KCe,{expanded:i??!1,onToggle:()=>a(!i)}),(0,H.jsxs)(Go,{orientation:`vertical`,id:b7,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)(Qo,{id:x7,defaultSize:200,minSize:80,maxSize:500,className:`min-h-0`,children:(0,H.jsx)(qCe,{})}),(0,H.jsx)(ts,{className:`h-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`})]}),(0,H.jsx)(Qo,{id:S7,minSize:200,className:`min-h-0 min-w-0`,children:(0,H.jsxs)(Go,{orientation:`horizontal`,id:h7,className:`flex h-full min-h-0 min-w-0 overflow-hidden`,defaultLayout:c,onLayoutChanged:l,children:[(0,H.jsx)(Qo,{id:g7,minSize:320,className:`min-h-0 min-w-0`,children:(0,H.jsxs)(`div`,{className:fG(`flex flex-col overflow-hidden`,S?`absolute inset-0 z-50 bg-background`:`relative h-full min-h-0`),children:[(0,H.jsx)(N0,{logsOpen:n??!1,onOpenLogs:()=>r(!0),fullscreenInspectorOpen:o??!1,onToggleFullscreenInspector:()=>s(!o)}),(0,H.jsxs)(`div`,{className:fG(`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)(m7,{text:`Loading view…`}),children:(0,H.jsx)(G0,{})}),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)(Mi,{className:`size-4`})})]}),v&&o&&(0,H.jsx)(YCe,{onClose:()=>s(!1)})]})}),n&&!v&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ts,{className:`w-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`}),(0,H.jsx)(Qo,{id:_7,defaultSize:360,minSize:240,maxSize:640,className:`min-h-0`,children:(0,H.jsx)(d7,{onClose:()=>r(!1)},e.name)})]})]})})]})]})},ZCe=Object.defineProperty,C7=(e,t)=>ZCe(e,`name`,{value:t,configurable:!0});function w7(e){let t=e+`CollectionProvider`,[n,r]=Y$(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=C7(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=KR(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=HR(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=KR(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=HR(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 C7(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}C7(w7,`createCollection`);var T7=new WeakMap,E7=class e extends Map{static{C7(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],T7.set(this,!0)}set(e,t){return T7.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=k7(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=D7(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=D7(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return D7(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 D7(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=O7(e,t);return n===-1?void 0:e[n]}C7(D7,`at`);function O7(e,t){let n=e.length,r=k7(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}C7(O7,`toSafeIndex`);function k7(e){return e!==e||e===0?0:Math.trunc(e)}C7(k7,`toSafeInteger`);function QCe(e){let t=e+`CollectionProvider`,[n,r]=Y$(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new E7,setItemMap:C7(()=>void 0,`setItemMap`)}),o=C7(({state:e,...t})=>e?(0,H.jsx)(c,{...t,state:e}):(0,H.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=C7(e=>{let t=h();return(0,H.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=C7(e=>{let{scope:t,children:n,state:r}=e,a=b.useRef(null),[o,s]=b.useState(null),c=HR(a,s),[l,u]=r;return b.useEffect(()=>{if(!o)return;let e=N7(()=>{});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=KR(l),d=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=HR(t,a(l,n).collectionRef);return(0,H.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=KR(f),m=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),[s,c]=b.useState(null),l=HR(t,o,c),{setItemMap:u}=a(f,n),d=b.useRef(i);A7(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(M7):(t.set(s,{...e,element:s}),t.toSorted(M7)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new E7(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 E7)}C7(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return C7(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}C7(QCe,`createCollection`);function A7(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}C7(A7,`shallowEqual`);function j7(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}C7(j7,`isElementPreceding`);function M7(e,t){return!e[1].element||!t[1].element?0:j7(e[1].element,t[1].element)?-1:1}C7(M7,`sortByDocumentPosition`);function N7(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}C7(N7,`getChildListObserver`);var $Ce=Object.defineProperty,P7=(e,t)=>$Ce(e,`name`,{value:t,configurable:!0}),F7=`Collapsible`,[ewe,I7]=Y$(F7),[twe,L7]=ewe(F7),nwe=b.forwardRef(P7(function(e,t){let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=j1({prop:r,defaultProp:i??!1,onChange:o,caller:F7});return(0,H.jsx)(twe,{scope:n,disabled:a,contentId:l1(),open:c,onOpenToggle:b.useCallback(()=>l(e=>!e),[l]),children:(0,H.jsx)(Z$.div,{"data-state":z7(c),"data-disabled":a?``:void 0,...s,ref:t})})},`Collapsible`)),rwe=`CollapsibleTrigger`,iwe=b.forwardRef(P7(function(e,t){let{__scopeCollapsible:n,...r}=e,i=L7(rwe,n);return(0,H.jsx)(Z$.button,{type:`button`,"aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":z7(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:W$(e.onClick,i.onOpenToggle)})},`CollapsibleTrigger`)),R7=`CollapsibleContent`,awe=b.forwardRef(P7(function(e,t){let{forceMount:n,...r}=e,i=L7(R7,e.__scopeCollapsible);return(0,H.jsx)(x1,{present:n||i.open,children:({present:e})=>(0,H.jsx)(owe,{...r,ref:t,present:e})})},`CollapsibleContent`)),owe=b.forwardRef(P7(function(e,t){let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=L7(R7,n),[s,c]=b.useState(r),l=b.useRef(null),u=HR(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)},[]),c1(()=>{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)(Z$.div,{"data-state":z7(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 z7(e){return e?`open`:`closed`}P7(z7,`getState`);var swe=Object.defineProperty,cwe=(e,t)=>swe(e,`name`,{value:t,configurable:!0}),lwe=b.createContext(void 0);function B7(e){let t=b.useContext(lwe);return e||t||`ltr`}cwe(B7,`useDirection`);var uwe=Object.defineProperty,V7=(e,t)=>uwe(e,`name`,{value:t,configurable:!0}),H7=`Accordion`,dwe=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[U7,fwe,pwe]=w7(H7),[W7,mwe]=Y$(H7,[pwe,I7]),G7=I7(),hwe=b.forwardRef(V7(function(e,t){let{type:n,...r}=e,i=r,a=r;return(0,H.jsx)(U7.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,H.jsx)(ywe,{...a,ref:t}):(0,H.jsx)(vwe,{...i,ref:t})})},`Accordion`)),[K7,gwe]=W7(H7),[q7,_we]=W7(H7,{collapsible:!1}),vwe=b.forwardRef(V7(function(e,t){let{value:n,defaultValue:r,onValueChange:i=V7(()=>{},`onValueChange`),collapsible:a=!1,...o}=e,[s,c]=j1({prop:n,defaultProp:r??``,onChange:i,caller:H7});return(0,H.jsx)(K7,{scope:e.__scopeAccordion,value:b.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:b.useCallback(()=>a&&c(``),[a,c]),children:(0,H.jsx)(q7,{scope:e.__scopeAccordion,collapsible:a,children:(0,H.jsx)(Y7,{...o,ref:t})})})},`AccordionImplSingle`)),ywe=b.forwardRef(V7(function(e,t){let{value:n,defaultValue:r,onValueChange:i=V7(()=>{},`onValueChange`),...a}=e,[o,s]=j1({prop:n,defaultProp:r??[],onChange:i,caller:H7}),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)(K7,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:l,children:(0,H.jsx)(q7,{scope:e.__scopeAccordion,collapsible:!0,children:(0,H.jsx)(Y7,{...a,ref:t})})})},`AccordionImplMultiple`)),[bwe,J7]=W7(H7),Y7=b.forwardRef(V7(function(e,t){let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...o}=e,s=HR(b.useRef(null),t),c=fwe(n),l=B7(i)===`ltr`,u=W$(e.onKeyDown,e=>{if(!dwe.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=V7(()=>{o=r+1,o>s&&(o=0)},`moveNext`),d=V7(()=>{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)(bwe,{scope:n,disabled:r,direction:i,orientation:a,children:(0,H.jsx)(U7.Slot,{scope:n,children:(0,H.jsx)(Z$.div,{...o,"data-orientation":a,ref:s,onKeyDown:r?void 0:u})})})},`AccordionImpl`)),X7=`AccordionItem`,[xwe,Z7]=W7(X7),Swe=b.forwardRef(V7(function(e,t){let{__scopeAccordion:n,value:r,...i}=e,a=J7(X7,n),o=gwe(X7,n),s=G7(n),c=l1(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,H.jsx)(xwe,{scope:n,open:l,disabled:u,triggerId:c,children:(0,H.jsx)(nwe,{"data-orientation":a.orientation,"data-state":$7(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})},`AccordionItem`)),Cwe=`AccordionHeader`,wwe=b.forwardRef(V7(function(e,t){let{__scopeAccordion:n,...r}=e,i=J7(H7,n),a=Z7(Cwe,n);return(0,H.jsx)(Z$.h3,{"data-orientation":i.orientation,"data-state":$7(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})},`AccordionHeader`)),Q7=`AccordionTrigger`,Twe=b.forwardRef(V7(function(e,t){let{__scopeAccordion:n,...r}=e,i=J7(H7,n),a=Z7(Q7,n),o=_we(Q7,n),s=G7(n);return(0,H.jsx)(U7.ItemSlot,{scope:n,children:(0,H.jsx)(iwe,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})},`AccordionTrigger`)),Ewe=`AccordionContent`,Dwe=b.forwardRef(V7(function(e,t){let{__scopeAccordion:n,...r}=e,i=J7(H7,n),a=Z7(Ewe,n),o=G7(n);return(0,H.jsx)(awe,{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 $7(e){return e?`open`:`closed`}V7($7,`getState`);function Owe({...e}){return(0,H.jsx)(hwe,{"data-slot":`accordion`,...e})}function kwe({className:e,...t}){return(0,H.jsx)(Swe,{"data-slot":`accordion-item`,className:Mr(`border-b border-border-secondary`,e),...t})}function Awe({className:e,children:t,...n}){return(0,H.jsx)(Dwe,{"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 e9=!1;function jwe(){let[e,t]=b.useState(e9);return b.useEffect(()=>{e9||(e9=!0,t(!0))},[]),e}var t9=b.useSyncExternalStore;function Mwe(){return()=>{}}function Nwe(){return t9(Mwe,()=>!0,()=>!1)}var Pwe=typeof t9==`function`?Nwe:jwe,Fwe=Object.defineProperty,n9=(e,t)=>Fwe(e,`name`,{value:t,configurable:!0}),r9=`rovingFocusGroup.onEntryFocus`,Iwe={bubbles:!1,cancelable:!0},i9=`RovingFocusGroup`,[a9,o9,Lwe]=oY(i9),[Rwe,s9]=eD(i9,[Lwe]),[zwe,Bwe]=Rwe(i9),Vwe=b.forwardRef(n9(function(e,t){return(0,H.jsx)(a9.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(a9.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(Hwe,{...e,ref:t})})})},`RovingFocusGroup`)),Hwe=b.forwardRef(n9(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=Ri(t,f),m=eB(a),[h,g]=lD({prop:o,defaultProp:s??null,onChange:c,caller:i9}),[_,v]=b.useState(!1),y=gD(l),x=o9(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(r9,y),()=>e.removeEventListener(r9,y)},[y]),(0,H.jsx)(zwe,{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)(mD.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:XE(e.onMouseDown,()=>{S.current=!0}),onFocus:XE(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(r9,Iwe);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);u9([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:XE(e.onBlur,()=>v(!1))})})},`RovingFocusGroupImpl`)),Uwe=`RovingFocusGroupItem`,Wwe=b.forwardRef(n9(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=nD(),l=a||c,u=Bwe(Uwe,n),d=u.currentTabStopId===l,f=o9(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=Pwe();return tD(()=>{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)(a9.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,H.jsx)(mD.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:XE(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:XE(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:XE(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=l9(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?d9(n,r+1):n.slice(r+1)}setTimeout(()=>u9(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),Gwe={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function c9(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}n9(c9,`getDirectionAwareKey`);function l9(e,t,n){let r=c9(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Gwe[r]}n9(l9,`getFocusIntent`);function u9(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}n9(u9,`focusFirst`);function d9(e,t){return e.map((n,r)=>e[(t+r)%e.length])}n9(d9,`wrapArray`);var Kwe=Vwe,qwe=Wwe,Jwe=Object.defineProperty,f9=(e,t)=>Jwe(e,`name`,{value:t,configurable:!0}),p9=`Tabs`,[Ywe,Xwe]=eD(p9,[s9]);s9();var[Zwe,Qwe]=Ywe(p9),$we=b.forwardRef(f9(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=eB(s),[d,f]=lD({prop:r,onChange:i,defaultProp:a??``,caller:p9});return(0,H.jsx)(Zwe,{scope:n,baseId:nD(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,H.jsx)(mD.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),eTe=`TabsContent`,tTe=b.forwardRef(f9(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=Qwe(eTe,n),c=m9(s.baseId,r),l=h9(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)(XD,{present:i||u,children:({present:n})=>(0,H.jsx)(mD.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 m9(e,t){return`${e}-trigger-${t}`}f9(m9,`makeTriggerId`);function h9(e,t){return`${e}-content-${t}`}f9(h9,`makeContentId`);var nTe=$we,rTe=tTe;function iTe({className:e,orientation:t=`horizontal`,...n}){return(0,H.jsx)(nTe,{"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 g9({className:e,...t}){return(0,H.jsx)(rTe,{"data-slot":`tabs-content`,className:Mr(`flex-1 outline-none`,e),...t})}(0,b.createContext)({orientation:`horizontal`,variant:`line`});function aTe({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 _9=[],v9=ss()(ds(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})})),oTe=(e,t)=>v9(n=>e?n.inputs[e]?.[t]??_9:_9);function sTe({className:e,children:t,action:n,...r}){return(0,H.jsxs)(wwe,{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)(Twe,{"data-slot":`accordion-trigger`,className:fG(`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 cTe({name:e,description:t}){return(0,b.useMemo)(()=>n=>(0,H.jsx)(`form`,{toolname:e,tooldescription:t,toolautosubmit:``,...n}),[e,t])}var lTe=Object.defineProperty,y9=(e,t)=>lTe(e,`name`,{value:t,configurable:!0}),b9=[`Enter`,` `],uTe=[`ArrowDown`,`PageUp`,`Home`],x9=[`ArrowUp`,`PageDown`,`End`],dTe=[...uTe,...x9];[...b9],[...b9];var S9=`Menu`,[C9,fTe,pTe]=oY(S9),[w9,T9]=eD(S9,[pTe,$q,s9]),E9=$q(),D9=s9(),[mTe,O9]=w9(S9),[hTe,k9]=w9(S9),gTe=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=gD(a),f=eB(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)(dJ,{...s,children:(0,H.jsx)(mTe,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,H.jsx)(hTe,{scope:t,onClose:b.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),_Te=b.forwardRef(y9(function(e,t){let{__scopeMenu:n,...r}=e,i=E9(n);return(0,H.jsx)(fJ,{...i,...r,ref:t})},`MenuAnchor`)),A9=`MenuPortal`,[vTe,yTe]=w9(A9,{forceMount:void 0}),bTe=y9(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=O9(A9,t);return(0,H.jsx)(vTe,{scope:t,forceMount:n,children:(0,H.jsx)(XD,{present:n||a.open,children:(0,H.jsx)(qD,{asChild:!0,container:i,children:r})})})},`MenuPortal`),j9=`MenuContent`,[xTe,M9]=w9(j9),STe=b.forwardRef(y9(function(e,t){let n=yTe(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)(XD,{present:r||a.open,children:(0,H.jsx)(C9.Slot,{scope:e.__scopeMenu,children:o.modal?(0,H.jsx)(CTe,{...i,ref:t}):(0,H.jsx)(wTe,{...i,ref:t})})})})},`MenuContent`)),CTe=b.forwardRef(y9(function(e,t){let n=O9(j9,e.__scopeMenu),r=b.useRef(null),i=Ri(t,r);return b.useEffect(()=>{let e=r.current;if(e)return gk(e)},[]),(0,H.jsx)(N9,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:XE(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),wTe=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`)),TTe=zi(`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=fTe(n),[S,C]=b.useState(null),w=b.useRef(null),T=Ri(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?sk:b.Fragment,N=m?{as:TTe,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),[]),iO();let F=b.useCallback(e=>A.current===k.current?.side&&H9(e,k.current?.area),[]);return(0,H.jsx)(xTe,{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)(FD,{asChild:!0,trapped:i,onMountAutoFocus:XE(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,H.jsx)(wD,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,H.jsx)(Kwe,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:XE(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,H.jsx)(pJ,{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:XE(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||!dTe.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:XE(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),D.current=``)}),onPointerMove:XE(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`,ETe=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=Ri(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}),hD(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,H.jsx)(DTe,{...i,ref:c,disabled:n,onClick:XE(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:XE(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:XE(e.onKeyDown,e=>{n||e.target!==e.currentTarget||s.searchRef.current!==``&&e.key===` `||b9.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),DTe=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=Ri(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)(qwe,{asChild:!0,...s,focusable:!r,children:(0,H.jsx)(mD.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:XE(e.onPointerMove,U9(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:XE(e.onPointerLeave,U9(e=>o.onItemLeave(e))),onFocus:XE(e.onFocus,()=>d(!0)),onBlur:XE(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[OTe,kTe]=w9(`MenuRadioGroup`,{value:void 0,onValueChange:y9(()=>{},`onValueChange`)}),[ATe,jTe]=w9(`MenuItemIndicator`,{checked:!1}),[MTe,NTe]=w9(`MenuSub`);function I9(e){return e?`open`:`closed`}y9(I9,`getOpenState`);function L9(e){return e===`indeterminate`}y9(L9,`isIndeterminate`);function PTe(e){return L9(e)?`indeterminate`:e?`checked`:`unchecked`}y9(PTe,`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 FTe=gTe,ITe=_Te,LTe=bTe,RTe=STe,zTe=ETe,BTe=Object.defineProperty,W9=(e,t)=>BTe(e,`name`,{value:t,configurable:!0}),G9=`DropdownMenu`,[VTe,HTe]=eD(G9,[T9]),K9=T9(),[UTe,q9]=VTe(G9),WTe=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]=lD({prop:i,defaultProp:a??!1,onChange:o,caller:G9});return(0,H.jsx)(UTe,{scope:t,triggerId:nD(),triggerRef:l,contentId:nD(),open:u,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,H.jsx)(FTe,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),GTe=`DropdownMenuTrigger`,KTe=b.forwardRef(W9(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=q9(GTe,n),o=K9(n),s=Ri(t,a.triggerRef);return(0,H.jsx)(ITe,{asChild:!0,...o,children:(0,H.jsx)(mD.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:XE(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:XE(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),qTe=W9(e=>{let{__scopeDropdownMenu:t,...n}=e,r=K9(t);return(0,H.jsx)(LTe,{...r,...n})},`DropdownMenuPortal`),JTe=`DropdownMenuContent`,YTe=b.forwardRef(W9(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=q9(JTe,n),a=K9(n),o=b.useRef(!1);return(0,H.jsx)(RTe,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:XE(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:XE(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`)),XTe=b.forwardRef(W9(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=K9(n);return(0,H.jsx)(zTe,{...i,...r,ref:t})},`DropdownMenuItem`)),ZTe=WTe,QTe=KTe,$Te=qTe,eEe=YTe,tEe=XTe;function nEe({...e}){return(0,H.jsx)(ZTe,{"data-slot":`dropdown-menu`,...e})}function rEe({...e}){return(0,H.jsx)(QTe,{"data-slot":`dropdown-menu-trigger`,...e})}function iEe({className:e,sideOffset:t=4,...n}){return(0,H.jsx)($Te,{children:(0,H.jsx)(eEe,{"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 aEe=Fi([`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)(tEe,{"data-slot":`dropdown-menu-item`,"data-inset":t,className:Mr(aEe({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)(nEe,{children:[(0,H.jsx)(rEe,{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)(iEe,{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:fG(`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:fG(`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)(ki,{className:`size-3.5`})})]},e.key))]})})]})}function oEe({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)(zk,{open:e,onOpenChange:t,children:(0,H.jsxs)(Bk,{children:[(0,H.jsxs)(Vk,{children:[(0,H.jsx)(Uk,{children:`Save input`}),(0,H.jsx)(Wk,{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)(a0,{htmlFor:a,children:`Name`}),(0,H.jsx)(o0,{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)(Hk,{children:[(0,H.jsx)(ta,{type:`button`,variant:`secondary`,onClick:()=>t(!1),children:`Cancel`}),(0,H.jsx)(ta,{type:`submit`,variant:`primary`,disabled:!c,children:l?`Overwrite`:`Save`})]})]})]})})}function sEe({tool:e}){let{mutateAsync:t,isPending:n}=Ase(),[r,i]=jS(),a=r===e.name,o=cs(e=>e.isSignedIn),s=cs(e=>e.requiresAuth),c=(0,b.useRef)(null),l=kE(e.name),u=!!l?.response,{setToolData:d}=OE(),f=l?.input??{},p=t=>{d(e.name,{input:t??{}})},m=dEe(e,f),h=s&&zE(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:iQ.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}=iQ.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};l2(`meta.enter`,e=>{C(e)&&S()}),l2(`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)(ta,{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)(ci,{className:`size-3 animate-spin`}):(0,H.jsx)(vi,{className:`size-3`}),children:`Run`});return(0,H.jsxs)(kwe,{value:e.name,"data-tool-name":e.name,className:fG(`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)(sTe,{onClick:u?()=>i(e.name):void 0,className:fG(`font-mono text-xs font-normal text-foreground`,`no-underline`),action:(0,H.jsxs)(`div`,{className:fG(`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)(n0,{children:[(0,H.jsx)(r0,{asChild:!0,children:(0,H.jsx)(`span`,{className:`inline-flex`,children:T})}),(0,H.jsx)(i0,{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)(uEe,{name:e.name,description:e.description})}):null,(0,H.jsx)(Awe,{className:`px-4 pt-0 pb-3 text-foreground`,style:{animation:`none`},children:(0,H.jsx)(fEe,{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 cEe(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 lEe(e,t){let n=t.inputSchema?.properties??{};return Object.fromEntries(Object.entries(e).filter(([e])=>e in n))}function uEe({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)(yG,{text:t,title:e,className:`text-xs text-muted-foreground/70`})})}function dEe(e,t){let n=KE()?.name,r=oTe(n,e.name),i=v9(e=>e.saveInput),a=v9(e=>e.updateInput),o=v9(e=>e.deleteInput),s=OE(e=>e.setToolData),c=kE(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:lEe(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 fEe({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;aTe({tool:e,enabled:!d,execute:async()=>await u()??{content:[{type:`text`,text:`The tool call was not executed.`}],isError:!0}});let f=cEe(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:fG(`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)(Si,{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)(n0,{children:[(0,H.jsx)(r0,{asChild:!0,children:(0,H.jsx)(f2,{size:`sm`,className:X9[e].badgeClass,children:e})}),(0,H.jsx)(W1,{children:(0,H.jsxs)(K1,{sideOffset:6,className:fG(`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)(J1,{width:11,height:5,className:`fill-background drop-shadow-[0_1px_0_var(--color-border)]`})]})})]},e))}),d&&(0,H.jsxs)(iTe,{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)(n0,{children:[(0,H.jsx)(r0,{asChild:!0,children:(0,H.jsx)(`span`,{className:`inline-flex`,children:v})}),(0,H.jsx)(i0,{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`?ei:Gr;return(0,H.jsxs)(`button`,{type:`button`,onClick:()=>a(e),className:fG(`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)(g9,{value:`form`,children:(0,H.jsx)(pEe,{tool:e,formData:t,setFormData:n,formRef:r,onRun:u})}),(0,H.jsx)(g9,{value:`json`,className:`-mt-4`,children:(0,H.jsx)(mEe,{formData:t,setFormData:n,error:o,setError:s})})]}),d&&h&&(0,H.jsx)(oEe,{open:p,onOpenChange:m,defaultKey:_??``,existingKeys:g.map(e=>e.key),onSave:c.saveFromModal})]})}function pEe({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)(dG,{ref:r,tagName:cTe(e),idPrefix:e.name,schema:a,validator:iQ,uiSchema:BX(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:FX,templates:IX})})}function mEe({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:fG(`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)(S$,{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 hEe(){let e=GE(),[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 Vve(()=>{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)(ta,{onClick:async()=>{o(void 0),i(!0);try{await NS.invalidateQueries({queryKey:[`list-tools`]})}finally{o(600)}},"aria-label":`Refresh tools`,variant:`tertiary`,size:`icon`,children:(0,H.jsx)(xi,{className:fG(`size-3.5`,r&&`animate-spin`)})})]}),(0,H.jsx)(Owe,{type:`multiple`,value:t,onValueChange:n,className:`min-h-0 overflow-y-auto`,children:e.map(e=>(0,H.jsx)(sEe,{tool:e},e.name))})]})}var Z9=`devtools-tools-split`,Q9=`tools-list`,$9=`tool-panel`;function gEe(){let{status:e,requiresAuth:t}=cs(),n=ps(e=>e.previewClient),[r]=MS(),i=e===`authenticated`,{defaultLayout:a,onLayoutChanged:o}=Jo({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)(d_e,{}),(0,H.jsx)(ame,{}),r?(0,H.jsx)(_he,{}):i&&n?(0,H.jsx)(b.Suspense,{fallback:null,children:(0,H.jsx)(kve,{})}):i?(0,H.jsx)(`div`,{id:`devtools-card-body`,className:`relative flex min-h-0 min-w-0 flex-1`,children:(0,H.jsxs)(Go,{orientation:`horizontal`,id:Z9,className:`flex min-h-0 min-w-0 flex-1`,defaultLayout:a,onLayoutChanged:o,children:[(0,H.jsx)(Qo,{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)(hEe,{})})})}),(0,H.jsx)(ts,{className:`w-px shrink-0 bg-border transition-colors hover:bg-ring data-separator-active:bg-ring`}),(0,H.jsx)(Qo,{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)(XCe,{})})})})]})}):(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)(ta,{variant:`secondary`,onClick:VE,children:[(0,H.jsx)(yi,{className:`size-3.5`}),`Connect`]})]})})]})}var _Ee=()=>{let e=KE();(0,b.useEffect)(()=>{e?.name&&(document.title=`${e.name} · Skybridge`)},[e?.name])};function vEe(){return jhe(),khe(),_Ee(),(0,H.jsx)(Ke,{client:NS,children:(0,H.jsx)(en,{children:(0,H.jsx)(gEe,{})})})}async function yEe(){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)cs.getState().setStatus(`error`),cs.getState().setError(a?`${i}: ${a}`:i);else if(t)try{await UE(t,n,r)}catch(e){console.error(`OAuth callback failed:`,e),cs.getState().setStatus(`error`),cs.getState().setError(e instanceof Error?e.message:`OAuth callback failed`)}else cs.getState().setStatus(`error`),cs.getState().setError(`OAuth callback missing authorization code`)}else VE().catch(e=>{console.error(`Connection failed:`,e)})}yEe(),(0,x.createRoot)(document.getElementById(`root`)).render((0,H.jsx)(b.StrictMode,{children:(0,H.jsx)(vEe,{})}));
|