@nexushub/client 0.6.3 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,i=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var a in e)t(r,a,{get:e[a],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:"Module"}),r},l=(e,a,i,s)=>{if(a&&"object"==typeof a||"function"==typeof a)for(var l,c=r(a),u=0,d=c.length;u<d;u++)l=c[u],o.call(e,l)||l===i||t(e,l,{get:(e=>a[e]).bind(null,l),enumerable:!(s=n(a,l))||s.enumerable});return e},c=(n,r,o)=>(o=null!=n?e(a(n)):{},l(!r&&n&&n.__esModule?o:t(o,"default",{value:n,enumerable:!0}),n));!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var u=i(e=>{var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),h=Symbol.iterator;var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function v(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var x=b.prototype=new v;x.constructor=b,m(x,y.prototype),x.isPureReactComponent=!0;var w=Array.isArray;function S(){}var k={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function C(e,n,r){var a=r.ref;return{$$typeof:t,type:e,key:n,ref:void 0!==a?a:null,props:r}}function N(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}var j=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function R(e,r,a,o,i){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l,c,u=!1;if(null===e)u=!0;else switch(s){case"bigint":case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case t:case n:u=!0;break;case d:return R((u=e._init)(e._payload),r,a,o,i)}}if(u)return i=i(e),u=""===o?"."+T(e,0):o,w(i)?(a="",null!=u&&(a=u.replace(j,"$&/")+"/"),R(i,r,a,"",function(e){return e})):null!=i&&(N(i)&&(l=i,c=a+(null==i.key||e&&e.key===i.key?"":(""+i.key).replace(j,"$&/")+"/")+u,i=C(l.type,c,l.props)),r.push(i)),1;u=0;var f,p=""===o?".":o+":";if(w(e))for(var m=0;m<e.length;m++)u+=R(o=e[m],r,a,s=p+T(o,m),i);else if("function"==typeof(m=null===(f=e)||"object"!=typeof f?null:"function"==typeof(f=h&&f[h]||f["@@iterator"])?f:null))for(e=m.call(e),m=0;!(o=e.next()).done;)u+=R(o=o.value,r,a,s=p+T(o,m++),i);else if("object"===s){if("function"==typeof e.then)return R(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(S,S):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),r,a,o,i);throw r=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(e).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return u}function O(e,t,n){if(null==e)return e;var r=[],a=0;return R(e,r,"","",function(e){return t.call(n,e,a++)}),r}function P(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var A="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e)},_={map:O,forEach:function(e,t,n){O(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return O(e,function(){t++}),t},toArray:function(e){return O(e,function(e){return e})||[]},only:function(e){if(!N(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};e.Activity=f,e.Children=_,e.Component=y,e.Fragment=r,e.Profiler=o,e.PureComponent=b,e.StrictMode=a,e.Suspense=c,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return k.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(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var r=m({},e.props),a=e.key;if(null!=t)for(o in void 0!==t.key&&(a=""+t.key),t)!E.call(t,o)||"key"===o||"__self"===o||"__source"===o||"ref"===o&&void 0===t.ref||(r[o]=t[o]);var o=arguments.length-2;if(1===o)r.children=n;else if(1<o){for(var i=Array(o),s=0;s<o;s++)i[s]=arguments[s+2];r.children=i}return C(e.type,a,r)},e.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:i,_context:e},e},e.createElement=function(e,t,n){var r,a={},o=null;if(null!=t)for(r in void 0!==t.key&&(o=""+t.key),t)E.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(a[r]=t[r]);var i=arguments.length-2;if(1===i)a.children=n;else if(1<i){for(var s=Array(i),l=0;l<i;l++)s[l]=arguments[l+2];a.children=s}if(e&&e.defaultProps)for(r in i=e.defaultProps)void 0===a[r]&&(a[r]=i[r]);return C(e,o,a)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:l,render:e}},e.isValidElement=N,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:P}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},e.startTransition=function(e){var t=k.T,n={};k.T=n;try{var r=e(),a=k.S;null!==a&&a(n,r),"object"==typeof r&&null!==r&&"function"==typeof r.then&&r.then(S,A)}catch(o){A(o)}finally{null!==t&&null!==n.types&&(t.types=n.types),k.T=t}},e.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},e.use=function(e){return k.H.use(e)},e.useActionState=function(e,t,n){return k.H.useActionState(e,t,n)},e.useCallback=function(e,t){return k.H.useCallback(e,t)},e.useContext=function(e){return k.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return k.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return k.H.useEffect(e,t)},e.useEffectEvent=function(e){return k.H.useEffectEvent(e)},e.useId=function(){return k.H.useId()},e.useImperativeHandle=function(e,t,n){return k.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return k.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return k.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return k.H.useMemo(e,t)},e.useOptimistic=function(e,t){return k.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return k.H.useReducer(e,t,n)},e.useRef=function(e){return k.H.useRef(e)},e.useState=function(e){return k.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return k.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return k.H.useTransition()},e.version="19.2.7"}),d=i((e,t)=>{t.exports=u()}),f=i(e=>{function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<a(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>a(l,n))c<o&&0>a(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<o&&0>a(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(e.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var l=[],c=[],u=1,d=null,f=3,h=!1,p=!1,m=!1,g=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function x(e){for(var a=n(c);null!==a;){if(null===a.callback)r(c);else{if(!(a.startTime<=e))break;r(c),a.sortIndex=a.expirationTime,t(l,a)}a=n(c)}}function w(e){if(m=!1,x(e),!p)if(null!==n(l))p=!0,k||(k=!0,S());else{var t=n(c);null!==t&&P(w,t.startTime-e)}}var S,k=!1,E=-1,C=5,N=-1;function j(){return!!g||!(e.unstable_now()-N<C)}function T(){if(g=!1,k){var t=e.unstable_now();N=t;var a=!0;try{e:{p=!1,m&&(m=!1,v(E),E=-1),h=!0;var o=f;try{t:{for(x(t),d=n(l);null!==d&&!(d.expirationTime>t&&j());){var i=d.callback;if("function"==typeof i){d.callback=null,f=d.priorityLevel;var s=i(d.expirationTime<=t);if(t=e.unstable_now(),"function"==typeof s){d.callback=s,x(t),a=!0;break t}d===n(l)&&r(l),x(t)}else r(l);d=n(l)}if(null!==d)a=!0;else{var u=n(c);null!==u&&P(w,u.startTime-t),a=!1}}break e}finally{d=null,f=o,h=!1}a=void 0}}finally{a?S():k=!1}}}if("function"==typeof b)S=function(){b(T)};else if("undefined"!=typeof MessageChannel){var R=new MessageChannel,O=R.port2;R.port1.onmessage=T,S=function(){O.postMessage(null)}}else S=function(){y(T,0)};function P(t,n){E=y(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||(C=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,a,o){var i=e.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?i+o:i:o=i,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 r={id:u++,callback:a,priorityLevel:r,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>i?(r.sortIndex=o,t(c,r),null===n(l)&&r===n(c)&&(m?(v(E),E=-1):m=!0,P(w,o-i))):(r.sortIndex=s,t(l,r),p||h||(p=!0,k||(k=!0,S()))),r},e.unstable_shouldYield=j,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=i((e,t)=>{t.exports=f()}),p=i(e=>{var t=d();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 a={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},o=Symbol.for("react.portal");var i=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function s(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(n(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:o,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,r)},e.flushSync=function(e){var t=i.T,n=a.p;try{if(i.T=null,a.p=2,e)return e()}finally{i.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){"string"==typeof e&&(t?t="string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,a.d.C(e,t))},e.prefetchDNS=function(e){"string"==typeof e&&a.d.D(e)},e.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var n=t.as,r=s(n,t.crossOrigin),o="string"==typeof t.integrity?t.integrity:void 0,i="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?a.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:r,integrity:o,fetchPriority:i}):"script"===n&&a.d.X(e,{crossOrigin:r,integrity:o,fetchPriority:i,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},e.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=s(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var n=t.as,r=s(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},e.preloadModule=function(e,t){if("string"==typeof e)if(t){var n=s(t.as,t.crossOrigin);a.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return i.H.useFormState(e,t,n)},e.useFormStatus=function(){return i.H.useHostTransitionStatus()},e.version="19.2.7"}),m=i((e,t)=>{!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(nu){}}(),t.exports=p()}),g=i(e=>{var t=h(),n=d(),r=m();function a(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 o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function i(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function s(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(a(188))}function c(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=c(e)))return t;e=e.sibling}return null}var u=Object.assign,f=Symbol.for("react.element"),p=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),w=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),T=Symbol.for("react.memo_cache_sentinel"),R=Symbol.iterator;function O(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=R&&e[R]||e["@@iterator"])?e:null}var P=Symbol.for("react.client.reference");function A(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===P?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case y:return"Fragment";case b:return"Profiler";case v:return"StrictMode";case k:return"Suspense";case E:return"SuspenseList";case j:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case g:return"Portal";case w:return e.displayName||"Context";case x:return(e._context.displayName||"Context")+".Consumer";case S:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case C:return null!==(t=e.displayName||null)?t:A(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return A(e(t))}catch(n){}}return null}var _=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},I=[],z=-1;function F(e){return{current:e}}function B(e){0>z||(e.current=I[z],I[z]=null,z--)}function U(e,t){z++,I[z]=e.current,e.current=t}var V,$,H=F(null),q=F(null),W=F(null),K=F(null);function G(e,t){switch(U(W,t),U(q,e),U(H,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=bd(t=vd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(H),U(H,e)}function Y(){B(H),B(q),B(W)}function X(e){null!==e.memoizedState&&U(K,e);var t=H.current,n=bd(t,e.type);t!==n&&(U(q,e),U(H,n))}function Q(e){q.current===e&&(B(H),B(q)),K.current===e&&(B(K),ff._currentValue=L)}function J(e){if(void 0===V)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);V=t&&t[1]||"",$=-1<n.stack.indexOf("\n at")?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+V+e+$}var Z=!1;function ee(e,t){if(!e||Z)return"";Z=!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()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(a){var r=a}Reflect.construct(e,[],n)}else{try{n.call()}catch(o){r=o}e.call(n.prototype)}}else{try{throw Error()}catch(i){r=i}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(s){if(s&&r&&"string"==typeof s.stack)return[s.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=r.DetermineComponentFrameRoot(),i=o[0],s=o[1];if(i&&s){var l=i.split("\n"),c=s.split("\n");for(a=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;a<c.length&&!c[a].includes("DetermineComponentFrameRoot");)a++;if(r===l.length||a===c.length)for(r=l.length-1,a=c.length-1;1<=r&&0<=a&&l[r]!==c[a];)a--;for(;1<=r&&0<=a;r--,a--)if(l[r]!==c[a]){if(1!==r||1!==a)do{if(r--,0>--a||l[r]!==c[a]){var u="\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=r&&0<=a);break}}}finally{Z=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?J(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return J(e.type);case 16:return J("Lazy");case 13:return e.child!==t&&null!==t?J("Suspense Fallback"):J("Suspense");case 19:return J("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return J("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(r){return"\nError generating stack: "+r.message+"\n"+r.stack}}var re=Object.prototype.hasOwnProperty,ae=t.unstable_scheduleCallback,oe=t.unstable_cancelCallback,ie=t.unstable_shouldYield,se=t.unstable_requestPaint,le=t.unstable_now,ce=t.unstable_getCurrentPriorityLevel,ue=t.unstable_ImmediatePriority,de=t.unstable_UserBlockingPriority,fe=t.unstable_NormalPriority,he=t.unstable_LowPriority,pe=t.unstable_IdlePriority,me=t.log,ge=t.unstable_setDisableYieldValue,ye=null,ve=null;function be(e){if("function"==typeof me&&ge(e),ve&&"function"==typeof ve.setStrictMode)try{ve.setStrictMode(ye,e)}catch(nu){}}var xe=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(we(e)/Se|0)|0},we=Math.log,Se=Math.LN2;var ke=256,Ee=262144,Ce=4194304;function Ne(e){var t=42&e;if(0!==t)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 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function je(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var a=0,o=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var s=134217727&r;return 0!==s?0!==(r=s&~o)?a=Ne(r):0!==(i&=s)?a=Ne(i):n||0!==(n=s&~e)&&(a=Ne(n)):0!==(s=r&~o)?a=Ne(s):0!==i?a=Ne(i):n||0!==(n=r&~e)&&(a=Ne(n)),0===a?0:0!==t&&t!==a&&0===(t&o)&&((o=a&-a)>=(n=t&-t)||32===o&&4194048&n)?t:a}function Te(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Re(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;default:return-1}}function Oe(){var e=Ce;return!(62914560&(Ce<<=1))&&(Ce=4194304),e}function Pe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ae(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _e(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-xe(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function De(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xe(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}function Me(e,t){var n=t&-t;return 0!==((n=42&n?1:Le(n))&(e.suspendedLanes|t))?0:n}function Le(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 Ie(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function ze(){var e=M.p;return 0!==e?e:void 0===(e=window.event)?32:Nf(e.type)}function Fe(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var Be=Math.random().toString(36).slice(2),Ue="__reactFiber$"+Be,Ve="__reactProps$"+Be,$e="__reactContainer$"+Be,He="__reactEvents$"+Be,qe="__reactListeners$"+Be,We="__reactHandles$"+Be,Ke="__reactResources$"+Be,Ge="__reactMarker$"+Be;function Ye(e){delete e[Ue],delete e[Ve],delete e[He],delete e[qe],delete e[We]}function Xe(e){var t=e[Ue];if(t)return t;for(var n=e.parentNode;n;){if(t=n[$e]||n[Ue]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Id(e);null!==e;){if(n=e[Ue])return n;e=Id(e)}return t}n=(e=n).parentNode}return null}function Qe(e){if(e=e[Ue]||e[$e]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function Je(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(a(33))}function Ze(e){var t=e[Ke];return t||(t=e[Ke]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[Ge]=!0}var tt=new Set,nt={};function rt(e,t){at(e,t),at(e+"Capture",t)}function at(e,t){for(nt[e]=t,e=0;e<t.length;e++)tt.add(t[e])}var ot=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]*$"),it={},st={};function lt(e,t,n){if(a=t,re.call(st,a)||!re.call(it,a)&&(ot.test(a)?st[a]=!0:(it[a]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var a}function ct(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function ut(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ft(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ht(e){if(!e._valueTracker){var t=ft(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&void 0!==r&&"function"==typeof r.get&&"function"==typeof r.set){var a=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){n=""+e,o.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]}}}}(e,t,""+e[t])}}function pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ft(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function mt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var gt=/[\n"\\]/g;function yt(e){return e.replace(gt,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function vt(e,t,n,r,a,o,i,s){e.name="",null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?e.type=i:e.removeAttribute("type"),null!=t?"number"===i?(0===t&&""===e.value||e.value!=t)&&(e.value=""+dt(t)):e.value!==""+dt(t)&&(e.value=""+dt(t)):"submit"!==i&&"reset"!==i||e.removeAttribute("value"),null!=t?xt(e,i,dt(t)):null!=n?xt(e,i,dt(n)):null!=r&&e.removeAttribute("value"),null==a&&null!=o&&(e.defaultChecked=!!o),null!=a&&(e.checked=a&&"function"!=typeof a&&"symbol"!=typeof a),null!=s&&"function"!=typeof s&&"symbol"!=typeof s&&"boolean"!=typeof s?e.name=""+dt(s):e.removeAttribute("name")}function bt(e,t,n,r,a,o,i,s){if(null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.type=o),null!=t||null!=n){if(("submit"===o||"reset"===o)&&null==t)return void ht(e);n=null!=n?""+dt(n):"",t=null!=t?""+dt(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:a)&&"symbol"!=typeof r&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i&&(e.name=i),ht(e)}function xt(e,t,n){"number"===t&&mt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function wt(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+dt(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function St(e,t,n){null==t||((t=""+dt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+dt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function kt(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(a(92));if(_(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??="",t=n}n=dt(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r),ht(e)}function Et(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Ct=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 Nt(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||Ct.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function jt(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(a(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var o in t)r=t[o],t.hasOwnProperty(o)&&n[o]!==r&&Nt(e,o,r)}else for(var i in t)t.hasOwnProperty(i)&&Nt(e,i,t[i])}function Tt(e){if(-1===e.indexOf("-"))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 Rt=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"]]),Ot=/^[\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 Pt(e){return Ot.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function At(){}var _t=null;function Dt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Mt=null,Lt=null;function It(e){var t=Qe(e);if(t&&(e=t.stateNode)){var n=e[Ve]||null;e:switch(e=t.stateNode,t.type){case"input":if(vt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+yt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=r[Ve]||null;if(!o)throw Error(a(90));vt(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&pt(r)}break e;case"textarea":St(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&wt(e,!!n.multiple,t,!1)}}}var zt=!1;function Ft(e,t,n){if(zt)return e(t,n);zt=!0;try{return e(t)}finally{if(zt=!1,(null!==Mt||null!==Lt)&&(Zc(),Mt&&(t=Mt,e=Lt,Lt=Mt=null,It(t),e)))for(t=0;t<e.length;t++)It(e[t])}}function Bt(e,t){var n=e.stateNode;if(null===n)return null;var r=n[Ve]||null;if(null===r)return null;n=r[t];e: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)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Ut=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Vt=!1;if(Ut)try{var $t={};Object.defineProperty($t,"passive",{get:function(){Vt=!0}}),window.addEventListener("test",$t,$t),window.removeEventListener("test",$t,$t)}catch(Qf){Vt=!1}var Ht=null,qt=null,Wt=null;function Kt(){if(Wt)return Wt;var e,t,n=qt,r=n.length,a="value"in Ht?Ht.value:Ht.textContent,o=a.length;for(e=0;e<r&&n[e]===a[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===a[o-t];t++);return Wt=a.slice(e,1<t?1-t:void 0)}function Gt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Yt(){return!0}function Xt(){return!1}function Qt(e){function t(t,n,r,a,o){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(a):a[i]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?Yt:Xt,this.isPropagationStopped=Xt,this}return u(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Yt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Yt)},persist:function(){},isPersistent:Yt}),t}var Jt,Zt,en,tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nn=Qt(tn),rn=u({},tn,{view:0,detail:0}),an=Qt(rn),on=u({},rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==en&&(en&&"mousemove"===e.type?(Jt=e.screenX-en.screenX,Zt=e.screenY-en.screenY):Zt=Jt=0,en=e),Jt)},movementY:function(e){return"movementY"in e?e.movementY:Zt}}),sn=Qt(on),ln=Qt(u({},on,{dataTransfer:0})),cn=Qt(u({},rn,{relatedTarget:0})),un=Qt(u({},tn,{animationName:0,elapsedTime:0,pseudoElement:0})),dn=Qt(u({},tn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),fn=Qt(u({},tn,{data:0})),hn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pn={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 gn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=mn[e])&&!!t[e]}function yn(){return gn}var vn=Qt(u({},rn,{key:function(e){if(e.key){var t=hn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Gt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?pn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yn,charCode:function(e){return"keypress"===e.type?Gt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Gt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),bn=Qt(u({},on,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),xn=Qt(u({},rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yn})),wn=Qt(u({},tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Sn=Qt(u({},on,{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})),kn=Qt(u({},tn,{newState:0,oldState:0})),En=[9,13,27,32],Cn=Ut&&"CompositionEvent"in window,Nn=null;Ut&&"documentMode"in document&&(Nn=document.documentMode);var jn=Ut&&"TextEvent"in window&&!Nn,Tn=Ut&&(!Cn||Nn&&8<Nn&&11>=Nn),Rn=String.fromCharCode(32),On=!1;function Pn(e,t){switch(e){case"keyup":return-1!==En.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function An(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var _n=!1;var Dn={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 Mn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Dn[e.type]:"textarea"===t}function Ln(e,t,n,r){Mt?Lt?Lt.push(r):Lt=[r]:Mt=r,0<(t=ad(t,"onChange")).length&&(n=new nn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var In=null,zn=null;function Fn(e){Xu(e,0)}function Bn(e){if(pt(Je(e)))return e}function Un(e,t){if("change"===e)return t}var Vn=!1;if(Ut){var $n;if(Ut){var Hn="oninput"in document;if(!Hn){var qn=document.createElement("div");qn.setAttribute("oninput","return;"),Hn="function"==typeof qn.oninput}$n=Hn}else $n=!1;Vn=$n&&(!document.documentMode||9<document.documentMode)}function Wn(){In&&(In.detachEvent("onpropertychange",Kn),zn=In=null)}function Kn(e){if("value"===e.propertyName&&Bn(zn)){var t=[];Ln(t,zn,e,Dt(e)),Ft(Fn,t)}}function Gn(e,t,n){"focusin"===e?(Wn(),zn=n,(In=t).attachEvent("onpropertychange",Kn)):"focusout"===e&&Wn()}function Yn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Bn(zn)}function Xn(e,t){if("click"===e)return Bn(t)}function Qn(e,t){if("input"===e||"change"===e)return Bn(t)}var Jn="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Zn(e,t){if(Jn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===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 a=n[r];if(!re.call(t,a)||!Jn(e[a],t[a]))return!1}return!0}function er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tr(e,t){var n,r=er(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=er(r)}}function nr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?nr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function rr(e){for(var t=mt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(nu){n=!1}if(!n)break;t=mt((e=t.contentWindow).document)}return t}function ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var or=Ut&&"documentMode"in document&&11>=document.documentMode,ir=null,sr=null,lr=null,cr=!1;function ur(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;cr||null==ir||ir!==mt(r)||("selectionStart"in(r=ir)&&ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},lr&&Zn(lr,r)||(lr=r,0<(r=ad(sr,"onSelect")).length&&(t=new nn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ir)))}function dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fr={animationend:dr("Animation","AnimationEnd"),animationiteration:dr("Animation","AnimationIteration"),animationstart:dr("Animation","AnimationStart"),transitionrun:dr("Transition","TransitionRun"),transitionstart:dr("Transition","TransitionStart"),transitioncancel:dr("Transition","TransitionCancel"),transitionend:dr("Transition","TransitionEnd")},hr={},pr={};function mr(e){if(hr[e])return hr[e];if(!fr[e])return e;var t,n=fr[e];for(t in n)if(n.hasOwnProperty(t)&&t in pr)return hr[e]=n[t];return e}Ut&&(pr=document.createElement("div").style,"AnimationEvent"in window||(delete fr.animationend.animation,delete fr.animationiteration.animation,delete fr.animationstart.animation),"TransitionEvent"in window||delete fr.transitionend.transition);var gr=mr("animationend"),yr=mr("animationiteration"),vr=mr("animationstart"),br=mr("transitionrun"),xr=mr("transitionstart"),wr=mr("transitioncancel"),Sr=mr("transitionend"),kr=new Map,Er="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(" ");function Cr(e,t){kr.set(e,t),rt(t,[e])}Er.push("scrollEnd");var Nr="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e)},jr=[],Tr=0,Rr=0;function Or(){for(var e=Tr,t=Rr=Tr=0;t<e;){var n=jr[t];jr[t++]=null;var r=jr[t];jr[t++]=null;var a=jr[t];jr[t++]=null;var o=jr[t];if(jr[t++]=null,null!==r&&null!==a){var i=r.pending;null===i?a.next=a:(a.next=i.next,i.next=a),r.pending=a}0!==o&&Dr(n,a,o)}}function Pr(e,t,n,r){jr[Tr++]=e,jr[Tr++]=t,jr[Tr++]=n,jr[Tr++]=r,Rr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Ar(e,t,n,r){return Pr(e,t,n,r),Mr(e)}function _r(e,t){return Pr(e,null,null,t),Mr(e)}function Dr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var a=!1,o=e.return;null!==o;)o.childLanes|=n,null!==(r=o.alternate)&&(r.childLanes|=n),22===o.tag&&(null===(e=o.stateNode)||1&e._visibility||(a=!0)),e=o,o=o.return;return 3===e.tag?(o=e.stateNode,a&&null!==t&&(a=31-xe(n),null===(r=(e=o.hiddenUpdates)[a])?e[a]=[t]:r.push(t),t.lane=536870912|n),o):null}function Mr(e){if(50<Hc)throw Hc=0,qc=null,Error(a(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Lr={};function Ir(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 zr(e,t,n,r){return new Ir(e,t,n,r)}function Fr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Br(e,t){var n=e.alternate;return null===n?((n=zr(e.tag,t,e.key,e.mode)).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=65011712&e.flags,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=null===t?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 Ur(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Vr(e,t,n,r,o,i){var s=0;if(r=e,"function"==typeof e)Fr(e)&&(s=1);else if("string"==typeof e)s=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof t.precedence||"string"!=typeof t.href||""===t.href)break;return!0;case"link":if("string"!=typeof t.rel||"string"!=typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"==typeof t.precedence&&null==e);case"script":if(t.async&&"function"!=typeof t.async&&"symbol"!=typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"==typeof t.src)return!0}return!1}(e,n,H.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case j:return(e=zr(31,n,t,o)).elementType=j,e.lanes=i,e;case y:return $r(n.children,o,i,t);case v:s=8,o|=24;break;case b:return(e=zr(12,n,t,2|o)).elementType=b,e.lanes=i,e;case k:return(e=zr(13,n,t,o)).elementType=k,e.lanes=i,e;case E:return(e=zr(19,n,t,o)).elementType=E,e.lanes=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case w:s=10;break e;case x:s=9;break e;case S:s=11;break e;case C:s=14;break e;case N:s=16,r=null;break e}s=29,n=Error(a(130,null===e?"null":typeof e,"")),r=null}return(t=zr(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function $r(e,t,n,r){return(e=zr(7,e,r,t)).lanes=n,e}function Hr(e,t,n){return(e=zr(6,e,null,t)).lanes=n,e}function qr(e){var t=zr(18,null,null,0);return t.stateNode=e,t}function Wr(e,t,n){return(t=zr(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Kr=new WeakMap;function Gr(e,t){if("object"==typeof e&&null!==e){var n=Kr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ne(t)},Kr.set(e,t),t)}return{value:e,source:t,stack:ne(t)}}var Yr=[],Xr=0,Qr=null,Jr=0,Zr=[],ea=0,ta=null,na=1,ra="";function aa(e,t){Yr[Xr++]=Jr,Yr[Xr++]=Qr,Qr=e,Jr=t}function oa(e,t,n){Zr[ea++]=na,Zr[ea++]=ra,Zr[ea++]=ta,ta=e;var r=na;e=ra;var a=32-xe(r)-1;r&=~(1<<a),n+=1;var o=32-xe(t)+a;if(30<o){var i=a-a%5;o=(r&(1<<i)-1).toString(32),r>>=i,a-=i,na=1<<32-xe(t)+a|n<<a|r,ra=o+e}else na=1<<o|n<<a|r,ra=e}function ia(e){null!==e.return&&(aa(e,1),oa(e,1,0))}function sa(e){for(;e===Qr;)Qr=Yr[--Xr],Yr[Xr]=null,Jr=Yr[--Xr],Yr[Xr]=null;for(;e===ta;)ta=Zr[--ea],Zr[ea]=null,ra=Zr[--ea],Zr[ea]=null,na=Zr[--ea],Zr[ea]=null}function la(e,t){Zr[ea++]=na,Zr[ea++]=ra,Zr[ea++]=ta,na=t.id,ra=t.overflow,ta=e}var ca=null,ua=null,da=!1,fa=null,ha=!1,pa=Error(a(519));function ma(e){throw wa(Gr(Error(a(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),pa}function ga(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ue]=e,t[Ve]=r,n){case"dialog":Qu("cancel",t),Qu("close",t);break;case"iframe":case"object":case"embed":Qu("load",t);break;case"video":case"audio":for(n=0;n<Gu.length;n++)Qu(Gu[n],t);break;case"source":Qu("error",t);break;case"img":case"image":case"link":Qu("error",t),Qu("load",t);break;case"details":Qu("toggle",t);break;case"input":Qu("invalid",t),bt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Qu("invalid",t);break;case"textarea":Qu("invalid",t),kt(t,r.value,r.defaultValue,r.children)}"string"!=typeof(n=r.children)&&"number"!=typeof n&&"bigint"!=typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||ud(t.textContent,n)?(null!=r.popover&&(Qu("beforetoggle",t),Qu("toggle",t)),null!=r.onScroll&&Qu("scroll",t),null!=r.onScrollEnd&&Qu("scrollend",t),null!=r.onClick&&(t.onclick=At),t=!0):t=!1,t||ma(e,!0)}function ya(e){for(ca=e.return;ca;)switch(ca.tag){case 5:case 31:case 13:return void(ha=!1);case 27:case 3:return void(ha=!0);default:ca=ca.return}}function va(e){if(e!==ca)return!1;if(!da)return ya(e),da=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||xd(e.type,e.memoizedProps)),t=!t),t&&ua&&ma(e),ya(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));ua=Ld(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));ua=Ld(e)}else 27===n?(n=ua,jd(e.type)?(e=Md,Md=null,ua=e):ua=n):ua=ca?Dd(e.stateNode.nextSibling):null;return!0}function ba(){ua=ca=null,da=!1}function xa(){var e=fa;return null!==e&&(null===Oc?Oc=e:Oc.push.apply(Oc,e),fa=null),e}function wa(e){null===fa?fa=[e]:fa.push(e)}var Sa=F(null),ka=null,Ea=null;function Ca(e,t,n){U(Sa,t._currentValue),t._currentValue=n}function Na(e){e._currentValue=Sa.current,B(Sa)}function ja(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ta(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){var i=o.dependencies;if(null!==i){var s=o.child;i=i.firstContext;e:for(;null!==i;){var l=i;i=o;for(var c=0;c<t.length;c++)if(l.context===t[c]){i.lanes|=n,null!==(l=i.alternate)&&(l.lanes|=n),ja(i.return,n,e),r||(s=null);break e}i=l.next}}else if(18===o.tag){if(null===(s=o.return))throw Error(a(341));s.lanes|=n,null!==(i=s.alternate)&&(i.lanes|=n),ja(s,n,e),s=null}else s=o.child;if(null!==s)s.return=o;else for(s=o;null!==s;){if(s===e){s=null;break}if(null!==(o=s.sibling)){o.return=s.return,s=o;break}s=s.return}o=s}}function Ra(e,t,n,r){e=null;for(var o=t,i=!1;null!==o;){if(!i)if(524288&o.flags)i=!0;else if(262144&o.flags)break;if(10===o.tag){var s=o.alternate;if(null===s)throw Error(a(387));if(null!==(s=s.memoizedProps)){var l=o.type;Jn(o.pendingProps.value,s.value)||(null!==e?e.push(l):e=[l])}}else if(o===K.current){if(null===(s=o.alternate))throw Error(a(387));s.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(null!==e?e.push(ff):e=[ff])}o=o.return}null!==e&&Ta(t,e,n,r),t.flags|=262144}function Oa(e){for(e=e.firstContext;null!==e;){if(!Jn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Pa(e){ka=e,Ea=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Aa(e){return Da(ka,e)}function _a(e,t){return null===ka&&Pa(e),Da(e,t)}function Da(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===Ea){if(null===e)throw Error(a(308));Ea=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ea=Ea.next=t;return n}var Ma="undefined"!=typeof AbortController?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()})}},La=t.unstable_scheduleCallback,Ia=t.unstable_NormalPriority,za={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fa(){return{controller:new Ma,data:new Map,refCount:0}}function Ba(e){e.refCount--,0===e.refCount&&La(Ia,function(){e.controller.abort()})}var Ua=null,Va=0,$a=0,Ha=null;function qa(){if(0===--Va&&null!==Ua){null!==Ha&&(Ha.status="fulfilled");var e=Ua;Ua=null,$a=0,Ha=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Wa=D.S;D.S=function(e,t){_c=le(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===Ua){var n=Ua=[];Va=0,$a=$u(),Ha={status:"pending",value:void 0,then:function(e){n.push(e)}}}Va++,t.then(qa,qa)}(0,t),null!==Wa&&Wa(e,t)};var Ka=F(null);function Ga(){var e=Ka.current;return null!==e?e:pc.pooledCache}function Ya(e,t){U(Ka,null===t?Ka.current:t.pool)}function Xa(){var e=Ga();return null===e?null:{parent:za._currentValue,pool:e}}var Qa=Error(a(460)),Ja=Error(a(474)),Za=Error(a(542)),eo={then:function(){}};function to(e){return"fulfilled"===(e=e.status)||"rejected"===e}function no(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(At,At),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw io(e=t.reason),e;default:if("string"==typeof t.status)t.then(At,At);else{if(null!==(e=pc)&&100<e.shellSuspendCounter)throw Error(a(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw io(e=t.reason),e}throw ao=t,Qa}}function ro(e){try{return(0,e._init)(e._payload)}catch(t){if(null!==t&&"object"==typeof t&&"function"==typeof t.then)throw ao=t,Qa;throw t}}var ao=null;function oo(){if(null===ao)throw Error(a(459));var e=ao;return ao=null,e}function io(e){if(e===Qa||e===Za)throw Error(a(483))}var so=null,lo=0;function co(e){var t=lo;return lo+=1,null===so&&(so=[]),no(so,e,t)}function uo(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function fo(e,t){if(t.$$typeof===f)throw Error(a(525));throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ho(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function o(e,t){return(e=Br(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Hr(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){var a=n.type;return a===y?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===N&&ro(a)===t.type)?(uo(t=o(t,n.props),n),t.return=e,t):(uo(t=Vr(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Wr(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,a){return null===t||7!==t.tag?((t=$r(n,e.mode,r,a)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=Hr(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case p:return uo(n=Vr(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case g:return(t=Wr(t,e.mode,n)).return=e,t;case N:return f(e,t=ro(t),n)}if(_(t)||O(t))return(t=$r(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return f(e,co(t),n);if(t.$$typeof===w)return f(e,_a(e,t),n);fo(e,t)}return null}function h(e,t,n,r){var a=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==a?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case p:return n.key===a?c(e,t,n,r):null;case g:return n.key===a?u(e,t,n,r):null;case N:return h(e,t,n=ro(n),r)}if(_(n)||O(n))return null!==a?null:d(e,t,n,r,null);if("function"==typeof n.then)return h(e,t,co(n),r);if(n.$$typeof===w)return h(e,t,_a(e,n),r);fo(e,n)}return null}function m(e,t,n,r,a){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return l(t,e=e.get(n)||null,""+r,a);if("object"==typeof r&&null!==r){switch(r.$$typeof){case p:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a);case g:return u(t,e=e.get(null===r.key?n:r.key)||null,r,a);case N:return m(e,t,n,r=ro(r),a)}if(_(r)||O(r))return d(t,e=e.get(n)||null,r,a,null);if("function"==typeof r.then)return m(e,t,n,co(r),a);if(r.$$typeof===w)return m(e,t,n,_a(t,r),a);fo(t,r)}return null}function v(l,c,u,d){if("object"==typeof u&&null!==u&&u.type===y&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case p:e:{for(var b=u.key;null!==c;){if(c.key===b){if((b=u.type)===y){if(7===c.tag){n(l,c.sibling),(d=o(c,u.props.children)).return=l,l=d;break e}}else if(c.elementType===b||"object"==typeof b&&null!==b&&b.$$typeof===N&&ro(b)===c.type){n(l,c.sibling),uo(d=o(c,u.props),u),d.return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}u.type===y?((d=$r(u.props.children,l.mode,d,u.key)).return=l,l=d):(uo(d=Vr(u.type,u.key,u.props,null,l.mode,d),u),d.return=l,l=d)}return s(l);case g:e:{for(b=u.key;null!==c;){if(c.key===b){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(d=o(c,u.children||[])).return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}(d=Wr(u,l.mode,d)).return=l,l=d}return s(l);case N:return v(l,c,u=ro(u),d)}if(_(u))return function(a,o,s,l){for(var c=null,u=null,d=o,p=o=0,g=null;null!==d&&p<s.length;p++){d.index>p?(g=d,d=null):g=d.sibling;var y=h(a,d,s[p],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(a,d),o=i(y,o,p),null===u?c=y:u.sibling=y,u=y,d=g}if(p===s.length)return n(a,d),da&&aa(a,p),c;if(null===d){for(;p<s.length;p++)null!==(d=f(a,s[p],l))&&(o=i(d,o,p),null===u?c=d:u.sibling=d,u=d);return da&&aa(a,p),c}for(d=r(d);p<s.length;p++)null!==(g=m(d,a,p,s[p],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?p:g.key),o=i(g,o,p),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(a,e)}),da&&aa(a,p),c}(l,c,u,d);if(O(u)){if("function"!=typeof(b=O(u)))throw Error(a(150));return function(o,s,l,c){if(null==l)throw Error(a(151));for(var u=null,d=null,p=s,g=s=0,y=null,v=l.next();null!==p&&!v.done;g++,v=l.next()){p.index>g?(y=p,p=null):y=p.sibling;var b=h(o,p,v.value,c);if(null===b){null===p&&(p=y);break}e&&p&&null===b.alternate&&t(o,p),s=i(b,s,g),null===d?u=b:d.sibling=b,d=b,p=y}if(v.done)return n(o,p),da&&aa(o,g),u;if(null===p){for(;!v.done;g++,v=l.next())null!==(v=f(o,v.value,c))&&(s=i(v,s,g),null===d?u=v:d.sibling=v,d=v);return da&&aa(o,g),u}for(p=r(p);!v.done;g++,v=l.next())null!==(v=m(p,o,g,v.value,c))&&(e&&null!==v.alternate&&p.delete(null===v.key?g:v.key),s=i(v,s,g),null===d?u=v:d.sibling=v,d=v);return e&&p.forEach(function(e){return t(o,e)}),da&&aa(o,g),u}(l,c,u=b.call(u),d)}if("function"==typeof u.then)return v(l,c,co(u),d);if(u.$$typeof===w)return v(l,c,_a(l,u),d);fo(l,u)}return"string"==typeof u&&""!==u||"number"==typeof u||"bigint"==typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(d=o(c,u)).return=l,l=d):(n(l,c),(d=Hr(u,l.mode,d)).return=l,l=d),s(l)):n(l,c)}return function(e,t,n,r){try{lo=0;var a=v(e,t,n,r);return so=null,a}catch(i){if(i===Qa||i===Za)throw i;var o=zr(29,i,null,e.mode);return o.lanes=r,o.return=e,o}}}var po=ho(!0),mo=ho(!1),go=!1;function yo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(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 bo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&hc){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Mr(e),Dr(e,null,n),t}return Pr(e,r,t,n),Mr(e)}function wo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,De(e,n)}}function So(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ko=!1;function Eo(){if(ko){if(null!==Ha)throw Ha}}function Co(e,t,n,r){ko=!1;var a=e.updateQueue;go=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,s=a.shared.pending;if(null!==s){a.shared.pending=null;var l=s,c=l.next;l.next=null,null===i?o=c:i.next=c,i=l;var d=e.alternate;null!==d&&((s=(d=d.updateQueue).lastBaseUpdate)!==i&&(null===s?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=l))}if(null!==o){var f=a.baseState;for(i=0,d=c=l=null,s=o;;){var h=-536870913&s.lane,p=h!==s.lane;if(p?(gc&h)===h:(r&h)===h){0!==h&&h===$a&&(ko=!0),null!==d&&(d=d.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var m=e,g=s;h=t;var y=n;switch(g.tag){case 1:if("function"==typeof(m=g.payload)){f=m.call(y,f,h);break e}f=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(h="function"==typeof(m=g.payload)?m.call(y,f,h):m))break e;f=u({},f,h);break e;case 2:go=!0}}null!==(h=s.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=a.callbacks)?a.callbacks=[h]:p.push(h))}else p={lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===d?(c=d=p,l=f):d=d.next=p,i|=h;if(null===(s=s.next)){if(null===(s=a.shared.pending))break;s=(p=s).next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}null===d&&(l=f),a.baseState=l,a.firstBaseUpdate=c,a.lastBaseUpdate=d,null===o&&(a.shared.lanes=0),Ec|=i,e.lanes=i,e.memoizedState=f}}function No(e,t){if("function"!=typeof e)throw Error(a(191,e));e.call(t)}function jo(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)No(n[e],t)}var To=F(null),Ro=F(0);function Oo(e,t){U(Ro,e=Sc),U(To,t),Sc=e|t.baseLanes}function Po(){U(Ro,Sc),U(To,To.current)}function Ao(){Sc=Ro.current,B(To),B(Ro)}var _o=F(null),Do=null;function Mo(e){var t=e.alternate;U(Bo,1&Bo.current),U(_o,e),null===Do&&(null===t||null!==To.current||null!==t.memoizedState)&&(Do=e)}function Lo(e){U(Bo,Bo.current),U(_o,e),null===Do&&(Do=e)}function Io(e){22===e.tag?(U(Bo,Bo.current),U(_o,e),null===Do&&(Do=e)):zo()}function zo(){U(Bo,Bo.current),U(_o,_o.current)}function Fo(e){B(_o),Do===e&&(Do=null),B(Bo)}var Bo=F(0);function Uo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Ad(n)||_d(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(128&t.flags)return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Vo=0,$o=null,Ho=null,qo=null,Wo=!1,Ko=!1,Go=!1,Yo=0,Xo=0,Qo=null,Jo=0;function Zo(){throw Error(a(321))}function ei(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Jn(e[n],t[n]))return!1;return!0}function ti(e,t,n,r,a,o){return Vo=o,$o=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=null===e||null===e.memoizedState?gs:ys,Go=!1,o=n(r,a),Go=!1,Ko&&(o=ri(t,n,r,a)),ni(e),o}function ni(e){D.H=ms;var t=null!==Ho&&null!==Ho.next;if(Vo=0,qo=Ho=$o=null,Wo=!1,Xo=0,Qo=null,t)throw Error(a(300));null===e||_s||null!==(e=e.dependencies)&&Oa(e)&&(_s=!0)}function ri(e,t,n,r){$o=e;var o=0;do{if(Ko&&(Qo=null),Xo=0,Ko=!1,25<=o)throw Error(a(301));if(o+=1,qo=Ho=null,null!=e.updateQueue){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,null!=i.memoCache&&(i.memoCache.index=0)}D.H=vs,i=t(n,r)}while(Ko);return i}function ai(){var e=D.H,t=e.useState()[0];return t="function"==typeof t.then?ui(t):t,e=e.useState()[0],(null!==Ho?Ho.memoizedState:null)!==e&&($o.flags|=1024),t}function oi(){var e=0!==Yo;return Yo=0,e}function ii(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function si(e){if(Wo){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Wo=!1}Vo=0,qo=Ho=$o=null,Ko=!1,Xo=Yo=0,Qo=null}function li(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===qo?$o.memoizedState=qo=e:qo=qo.next=e,qo}function ci(){if(null===Ho){var e=$o.alternate;e=null!==e?e.memoizedState:null}else e=Ho.next;var t=null===qo?$o.memoizedState:qo.next;if(null!==t)qo=t,Ho=e;else{if(null===e){if(null===$o.alternate)throw Error(a(467));throw Error(a(310))}e={memoizedState:(Ho=e).memoizedState,baseState:Ho.baseState,baseQueue:Ho.baseQueue,queue:Ho.queue,next:null},null===qo?$o.memoizedState=qo=e:qo=qo.next=e}return qo}function ui(e){var t=Xo;return Xo+=1,null===Qo&&(Qo=[]),e=no(Qo,e,t),t=$o,null===(null===qo?t.memoizedState:qo.next)&&(t=t.alternate,D.H=null===t||null===t.memoizedState?gs:ys),e}function di(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return ui(e);if(e.$$typeof===w)return Aa(e)}throw Error(a(438,String(e)))}function fi(e){var t=null,n=$o.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=$o.alternate;null!==r&&(null!==(r=r.updateQueue)&&(null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},$o.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=T;return t.index++,n}function hi(e,t){return"function"==typeof t?t(e):t}function pi(e){return mi(ci(),Ho,e)}function mi(e,t,n){var r=e.queue;if(null===r)throw Error(a(311));r.lastRenderedReducer=n;var o=e.baseQueue,i=r.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}t.baseQueue=o=i,r.pending=null}if(i=e.baseState,null===o)e.memoizedState=i;else{var l=s=null,c=null,u=t=o.next,d=!1;do{var f=-536870913&u.lane;if(f!==u.lane?(gc&f)===f:(Vo&f)===f){var h=u.revertLane;if(0===h)null!==c&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===$a&&(d=!0);else{if((Vo&h)===h){u=u.next,h===$a&&(d=!0);continue}f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=f,s=i):c=c.next=f,$o.lanes|=h,Ec|=h}f=u.action,Go&&n(i,f),i=u.hasEagerState?u.eagerState:n(i,f)}else h={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=h,s=i):c=c.next=h,$o.lanes|=f,Ec|=f;u=u.next}while(null!==u&&u!==t);if(null===c?s=i:c.next=l,!Jn(i,e.memoizedState)&&(_s=!0,d&&null!==(n=Ha)))throw n;e.memoizedState=i,e.baseState=s,e.baseQueue=c,r.lastRenderedState=i}return null===o&&(r.lanes=0),[e.memoizedState,r.dispatch]}function gi(e){var t=ci(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);Jn(i,t.memoizedState)||(_s=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function yi(e,t,n){var r=$o,o=ci(),i=da;if(i){if(void 0===n)throw Error(a(407));n=n()}else n=t();var s=!Jn((Ho||o).memoizedState,n);if(s&&(o.memoizedState=n,_s=!0),o=o.queue,Vi(xi.bind(null,r,o,e),[e]),o.getSnapshot!==t||s||null!==qo&&1&qo.memoizedState.tag){if(r.flags|=2048,Ii(9,{destroy:void 0},bi.bind(null,r,o,n,t),null),null===pc)throw Error(a(349));i||127&Vo||vi(r,t,n)}return n}function vi(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=$o.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},$o.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function bi(e,t,n,r){t.value=n,t.getSnapshot=r,wi(t)&&Si(e)}function xi(e,t,n){return n(function(){wi(t)&&Si(e)})}function wi(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Jn(e,n)}catch(r){return!0}}function Si(e){var t=_r(e,2);null!==t&&Gc(t,e,2)}function ki(e){var t=li();if("function"==typeof e){var n=e;if(e=n(),Go){be(!0);try{n()}finally{be(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hi,lastRenderedState:e},t}function Ei(e,t,n,r){return e.baseState=n,mi(e,Ho,"function"==typeof r?r:hi)}function Ci(e,t,n,r,o){if(fs(e))throw Error(a(485));if(null!==(e=t.action)){var i={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){i.listeners.push(e)}};null!==D.T?n(!0):i.isTransition=!1,r(i),null===(n=t.pending)?(i.next=t.pending=i,Ni(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Ni(e,t){var n=t.action,r=t.payload,a=e.state;if(t.isTransition){var o=D.T,i={};D.T=i;try{var s=n(a,r),l=D.S;null!==l&&l(i,s),ji(e,t,s)}catch(c){Ri(e,t,c)}finally{null!==o&&null!==i.types&&(o.types=i.types),D.T=o}}else try{ji(e,t,o=n(a,r))}catch(u){Ri(e,t,u)}}function ji(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){Ti(e,t,n)},function(n){return Ri(e,t,n)}):Ti(e,t,n)}function Ti(e,t,n){t.status="fulfilled",t.value=n,Oi(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,Ni(e,n)))}function Ri(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Oi(t),t=t.next}while(t!==r)}e.action=null}function Oi(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Pi(e,t){return t}function Ai(e,t){if(da){var n=pc.formState;if(null!==n){e:{var r=$o;if(da){if(ua){t:{for(var a=ua,o=ha;8!==a.nodeType;){if(!o){a=null;break t}if(null===(a=Dd(a.nextSibling))){a=null;break t}}a="F!"===(o=a.data)||"F"===o?a:null}if(a){ua=Dd(a.nextSibling),r="F!"===a.data;break e}}ma(r)}r=!1}r&&(t=n[0])}}return(n=li()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pi,lastRenderedState:t},n.queue=r,n=cs.bind(null,$o,r),r.dispatch=n,r=ki(!1),o=ds.bind(null,$o,!1,r.queue),a={state:t,dispatch:null,action:e,pending:null},(r=li()).queue=a,n=Ci.bind(null,$o,a,o,n),a.dispatch=n,r.memoizedState=e,[t,n,!1]}function _i(e){return Di(ci(),Ho,e)}function Di(e,t,n){if(t=mi(e,t,Pi)[0],e=pi(hi)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var r=ui(t)}catch(i){if(i===Qa)throw Za;throw i}else r=t;var a=(t=ci()).queue,o=a.dispatch;return n!==t.memoizedState&&($o.flags|=2048,Ii(9,{destroy:void 0},Mi.bind(null,a,n),null)),[r,o,e]}function Mi(e,t){e.action=t}function Li(e){var t=ci(),n=Ho;if(null!==n)return Di(t,n,e);ci(),t=t.memoizedState;var r=(n=ci()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ii(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=$o.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},$o.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function zi(){return ci().memoizedState}function Fi(e,t,n,r){var a=li();$o.flags|=e,a.memoizedState=Ii(1|t,{destroy:void 0},n,void 0===r?null:r)}function Bi(e,t,n,r){var a=ci();r=void 0===r?null:r;var o=a.memoizedState.inst;null!==Ho&&null!==r&&ei(r,Ho.memoizedState.deps)?a.memoizedState=Ii(t,o,n,r):($o.flags|=e,a.memoizedState=Ii(1|t,o,n,r))}function Ui(e,t){Fi(8390656,8,e,t)}function Vi(e,t){Bi(2048,8,e,t)}function $i(e){var t=ci().memoizedState;return function(e){$o.flags|=4;var t=$o.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},$o.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(2&hc)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function Hi(e,t){return Bi(4,2,e,t)}function qi(e,t){return Bi(4,4,e,t)}function Wi(e,t){if("function"==typeof t){e=e();var n=t(e);return function(){"function"==typeof n?n():t(null)}}if(null!=t)return e=e(),t.current=e,function(){t.current=null}}function Ki(e,t,n){n=null!=n?n.concat([e]):null,Bi(4,4,Wi.bind(null,t,e),n)}function Gi(){}function Yi(e,t){var n=ci();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&ei(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xi(e,t){var n=ci();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&ei(t,r[1]))return r[0];if(r=e(),Go){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[r,t],r}function Qi(e,t,n){return void 0===n||1073741824&Vo&&!(261930&gc)?e.memoizedState=t:(e.memoizedState=n,e=Kc(),$o.lanes|=e,Ec|=e,n)}function Ji(e,t,n,r){return Jn(n,t)?n:null!==To.current?(e=Qi(e,n,r),Jn(e,t)||(_s=!0),e):42&Vo&&(!(1073741824&Vo)||261930&gc)?(e=Kc(),$o.lanes|=e,Ec|=e,t):(_s=!0,e.memoizedState=n)}function Zi(e,t,n,r,a){var o=M.p;M.p=0!==o&&8>o?o:8;var i,s,l,c=D.T,u={};D.T=u,ds(e,!1,t,n);try{var d=a(),f=D.S;null!==f&&f(u,d),null!==d&&"object"==typeof d&&"function"==typeof d.then?us(e,t,(i=r,s=[],l={status:"pending",value:null,reason:null,then:function(e){s.push(e)}},d.then(function(){l.status="fulfilled",l.value=i;for(var e=0;e<s.length;e++)(0,s[e])(i)},function(e){for(l.status="rejected",l.reason=e,e=0;e<s.length;e++)(0,s[e])(void 0)}),l),Wc()):us(e,t,r,Wc())}catch(h){us(e,t,{then:function(){},status:"rejected",reason:h},Wc())}finally{M.p=o,null!==c&&null!==u.types&&(c.types=u.types),D.T=c}}function es(){}function ts(e,t,n,r){if(5!==e.tag)throw Error(a(476));var o=ns(e).queue;Zi(e,o,t,L,null===n?es:function(){return rs(e),n(r)})}function ns(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hi,lastRenderedState:L},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hi,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function rs(e){var t=ns(e);null===t.next&&(t=e.alternate.memoizedState),us(e,t.next.queue,{},Wc())}function as(){return Aa(ff)}function os(){return ci().memoizedState}function is(){return ci().memoizedState}function ss(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Wc(),r=xo(t,e=bo(n),n);return null!==r&&(Gc(r,t,n),wo(r,t,n)),t={cache:Fa()},void(e.payload=t)}t=t.return}}function ls(e,t,n){var r=Wc();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fs(e)?hs(t,n):null!==(n=Ar(e,t,n,r))&&(Gc(n,e,r),ps(n,t,r))}function cs(e,t,n){us(e,t,n,Wc())}function us(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fs(e))hs(t,a);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var i=t.lastRenderedState,s=o(i,n);if(a.hasEagerState=!0,a.eagerState=s,Jn(s,i))return Pr(e,t,a,0),null===pc&&Or(),!1}catch(l){}if(null!==(n=Ar(e,t,a,r)))return Gc(n,e,r),ps(n,t,r),!0}return!1}function ds(e,t,n,r){if(r={lane:2,revertLane:$u(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},fs(e)){if(t)throw Error(a(479))}else null!==(t=Ar(e,n,r,2))&&Gc(t,e,2)}function fs(e){var t=e.alternate;return e===$o||null!==t&&t===$o}function hs(e,t){Ko=Wo=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ps(e,t,n){if(4194048&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,De(e,n)}}var ms={readContext:Aa,use:di,useCallback:Zo,useContext:Zo,useEffect:Zo,useImperativeHandle:Zo,useLayoutEffect:Zo,useInsertionEffect:Zo,useMemo:Zo,useReducer:Zo,useRef:Zo,useState:Zo,useDebugValue:Zo,useDeferredValue:Zo,useTransition:Zo,useSyncExternalStore:Zo,useId:Zo,useHostTransitionStatus:Zo,useFormState:Zo,useActionState:Zo,useOptimistic:Zo,useMemoCache:Zo,useCacheRefresh:Zo};ms.useEffectEvent=Zo;var gs={readContext:Aa,use:di,useCallback:function(e,t){return li().memoizedState=[e,void 0===t?null:t],e},useContext:Aa,useEffect:Ui,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,Fi(4194308,4,Wi.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fi(4194308,4,e,t)},useInsertionEffect:function(e,t){Fi(4,2,e,t)},useMemo:function(e,t){var n=li();t=void 0===t?null:t;var r=e();if(Go){be(!0);try{e()}finally{be(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=li();if(void 0!==n){var a=n(t);if(Go){be(!0);try{n(t)}finally{be(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=ls.bind(null,$o,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},li().memoizedState=e},useState:function(e){var t=(e=ki(e)).queue,n=cs.bind(null,$o,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gi,useDeferredValue:function(e,t){return Qi(li(),e,t)},useTransition:function(){var e=ki(!1);return e=Zi.bind(null,$o,e.queue,!0,!1),li().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=$o,o=li();if(da){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===pc)throw Error(a(349));127&gc||vi(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ui(xi.bind(null,r,i,e),[e]),r.flags|=2048,Ii(9,{destroy:void 0},bi.bind(null,r,i,n,t),null),n},useId:function(){var e=li(),t=pc.identifierPrefix;if(da){var n=ra;t="_"+t+"R_"+(n=(na&~(1<<32-xe(na)-1)).toString(32)+n),0<(n=Yo++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Jo++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:as,useFormState:Ai,useActionState:Ai,useOptimistic:function(e){var t=li();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ds.bind(null,$o,!0,n),n.dispatch=t,[e,t]},useMemoCache:fi,useCacheRefresh:function(){return li().memoizedState=ss.bind(null,$o)},useEffectEvent:function(e){var t=li(),n={impl:e};return t.memoizedState=n,function(){if(2&hc)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},ys={readContext:Aa,use:di,useCallback:Yi,useContext:Aa,useEffect:Vi,useImperativeHandle:Ki,useInsertionEffect:Hi,useLayoutEffect:qi,useMemo:Xi,useReducer:pi,useRef:zi,useState:function(){return pi(hi)},useDebugValue:Gi,useDeferredValue:function(e,t){return Ji(ci(),Ho.memoizedState,e,t)},useTransition:function(){var e=pi(hi)[0],t=ci().memoizedState;return["boolean"==typeof e?e:ui(e),t]},useSyncExternalStore:yi,useId:os,useHostTransitionStatus:as,useFormState:_i,useActionState:_i,useOptimistic:function(e,t){return Ei(ci(),0,e,t)},useMemoCache:fi,useCacheRefresh:is};ys.useEffectEvent=$i;var vs={readContext:Aa,use:di,useCallback:Yi,useContext:Aa,useEffect:Vi,useImperativeHandle:Ki,useInsertionEffect:Hi,useLayoutEffect:qi,useMemo:Xi,useReducer:gi,useRef:zi,useState:function(){return gi(hi)},useDebugValue:Gi,useDeferredValue:function(e,t){var n=ci();return null===Ho?Qi(n,e,t):Ji(n,Ho.memoizedState,e,t)},useTransition:function(){var e=gi(hi)[0],t=ci().memoizedState;return["boolean"==typeof e?e:ui(e),t]},useSyncExternalStore:yi,useId:os,useHostTransitionStatus:as,useFormState:Li,useActionState:Li,useOptimistic:function(e,t){var n=ci();return null!==Ho?Ei(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:fi,useCacheRefresh:is};function bs(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:u({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}vs.useEffectEvent=$i;var xs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Wc(),a=bo(r);a.payload=t,null!=n&&(a.callback=n),null!==(t=xo(e,a,r))&&(Gc(t,e,r),wo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Wc(),a=bo(r);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=xo(e,a,r))&&(Gc(t,e,r),wo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Wc(),r=bo(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=xo(e,r,n))&&(Gc(t,e,n),wo(t,e,n))}};function ws(e,t,n,r,a,o,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,i):!t.prototype||!t.prototype.isPureReactComponent||(!Zn(n,r)||!Zn(a,o))}function Ss(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&xs.enqueueReplaceState(t,t.state,null)}function ks(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var a in n===t&&(n=u({},n)),e)void 0===n[a]&&(n[a]=e[a]);return n}function Es(e){Nr(e)}function Cs(e){}function Ns(e){Nr(e)}function js(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Ts(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Rs(e,t,n){return(n=bo(n)).tag=3,n.payload={element:null},n.callback=function(){js(e,t)},n}function Os(e){return(e=bo(e)).tag=3,e}function Ps(e,t,n,r){var a=n.type.getDerivedStateFromError;if("function"==typeof a){var o=r.value;e.payload=function(){return a(o)},e.callback=function(){Ts(t,n,r)}}var i=n.stateNode;null!==i&&"function"==typeof i.componentDidCatch&&(e.callback=function(){Ts(t,n,r),"function"!=typeof a&&(null===Lc?Lc=new Set([this]):Lc.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var As=Error(a(461)),_s=!1;function Ds(e,t,n,r){t.child=null===e?mo(t,null,n,r):po(t,e.child,n,r)}function Ms(e,t,n,r,a){n=n.render;var o=t.ref;if("ref"in r){var i={};for(var s in r)"ref"!==s&&(i[s]=r[s])}else i=r;return Pa(t),r=ti(e,t,n,i,o,a),s=oi(),null===e||_s?(da&&s&&ia(t),t.flags|=1,Ds(e,t,r,a),t.child):(ii(e,t,a),al(e,t,a))}function Ls(e,t,n,r,a){if(null===e){var o=n.type;return"function"!=typeof o||Fr(o)||void 0!==o.defaultProps||null!==n.compare?((e=Vr(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Is(e,t,o,r,a))}if(o=e.child,!ol(e,a)){var i=o.memoizedProps;if((n=null!==(n=n.compare)?n:Zn)(i,r)&&e.ref===t.ref)return al(e,t,a)}return t.flags|=1,(e=Br(o,r)).ref=t.ref,e.return=t,t.child=e}function Is(e,t,n,r,a){if(null!==e){var o=e.memoizedProps;if(Zn(o,r)&&e.ref===t.ref){if(_s=!1,t.pendingProps=r=o,!ol(e,a))return t.lanes=e.lanes,al(e,t,a);131072&e.flags&&(_s=!0)}}return Hs(e,t,n,r,a)}function zs(e,t,n,r){var a=r.children,o=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(128&t.flags){if(o=null!==o?o.baseLanes|n:n,null!==e){for(r=t.child=e.child,a=0;null!==r;)a=a|r.lanes|r.childLanes,r=r.sibling;r=a&~o}else r=0,t.child=null;return Bs(e,t,o,n,r)}if(!(536870912&n))return r=t.lanes=536870912,Bs(e,t,null!==o?o.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Ya(0,null!==o?o.cachePool:null),null!==o?Oo(t,o):Po(),Io(t)}else null!==o?(Ya(0,o.cachePool),Oo(t,o),zo(),t.memoizedState=null):(null!==e&&Ya(0,null),Po(),zo());return Ds(e,t,a,n),t.child}function Fs(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bs(e,t,n,r,a){var o=Ga();return o=null===o?null:{parent:za._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},null!==e&&Ya(0,null),Po(),Io(t),null!==e&&Ra(e,t,r,!0),t.childLanes=a,null}function Us(e,t){return(t=Zs({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Vs(e,t,n){return po(t,e.child,null,n),(e=Us(t,t.pendingProps)).flags|=2,Fo(t),t.memoizedState=null,e}function $s(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(a(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Hs(e,t,n,r,a){return Pa(t),n=ti(e,t,n,r,void 0,a),r=oi(),null===e||_s?(da&&r&&ia(t),t.flags|=1,Ds(e,t,n,a),t.child):(ii(e,t,a),al(e,t,a))}function qs(e,t,n,r,a,o){return Pa(t),t.updateQueue=null,n=ri(t,r,n,a),ni(e),r=oi(),null===e||_s?(da&&r&&ia(t),t.flags|=1,Ds(e,t,n,o),t.child):(ii(e,t,o),al(e,t,o))}function Ws(e,t,n,r,a){if(Pa(t),null===t.stateNode){var o=Lr,i=n.contextType;"object"==typeof i&&null!==i&&(o=Aa(i)),o=new n(r,o),t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,o.updater=xs,t.stateNode=o,o._reactInternals=t,(o=t.stateNode).props=r,o.state=t.memoizedState,o.refs={},yo(t),i=n.contextType,o.context="object"==typeof i&&null!==i?Aa(i):Lr,o.state=t.memoizedState,"function"==typeof(i=n.getDerivedStateFromProps)&&(bs(t,n,i,r),o.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(i=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),i!==o.state&&xs.enqueueReplaceState(o,o.state,null),Co(t,r,o,a),Eo(),o.state=t.memoizedState),"function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){o=t.stateNode;var s=t.memoizedProps,l=ks(n,s);o.props=l;var c=o.context,u=n.contextType;i=Lr,"object"==typeof u&&null!==u&&(i=Aa(u));var d=n.getDerivedStateFromProps;u="function"==typeof d||"function"==typeof o.getSnapshotBeforeUpdate,s=t.pendingProps!==s,u||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s||c!==i)&&Ss(t,o,r,i),go=!1;var f=t.memoizedState;o.state=f,Co(t,r,o,a),Eo(),c=t.memoizedState,s||f!==c||go?("function"==typeof d&&(bs(t,n,d,r),c=t.memoizedState),(l=go||ws(t,n,l,r,f,c,i))?(u||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=i,r=l):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,vo(e,t),u=ks(n,i=t.memoizedProps),o.props=u,d=t.pendingProps,f=o.context,c=n.contextType,l=Lr,"object"==typeof c&&null!==c&&(l=Aa(c)),(c="function"==typeof(s=n.getDerivedStateFromProps)||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(i!==d||f!==l)&&Ss(t,o,r,l),go=!1,f=t.memoizedState,o.state=f,Co(t,r,o,a),Eo();var h=t.memoizedState;i!==d||f!==h||go||null!==e&&null!==e.dependencies&&Oa(e.dependencies)?("function"==typeof s&&(bs(t,n,s,r),h=t.memoizedState),(u=go||ws(t,n,u,r,f,h,l)||null!==e&&null!==e.dependencies&&Oa(e.dependencies))?(c||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,h,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),o.props=r,o.state=h,o.context=l,r=u):("function"!=typeof o.componentDidUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return o=r,$s(e,t),r=!!(128&t.flags),o||r?(o=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:o.render(),t.flags|=1,null!==e&&r?(t.child=po(t,e.child,null,a),t.child=po(t,null,n,a)):Ds(e,t,n,a),t.memoizedState=o.state,e=t.child):e=al(e,t,a),e}function Ks(e,t,n,r){return ba(),t.flags|=256,Ds(e,t,n,r),t.child}var Gs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ys(e){return{baseLanes:e,cachePool:Xa()}}function Xs(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=jc),e}function Qs(e,t,n){var r,o=t.pendingProps,i=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&Bo.current)),r&&(i=!0,t.flags&=-129),r=!!(32&t.flags),t.flags&=-33,null===e){if(da){if(i?Mo(t):zo(),(e=ua)?null!==(e=null!==(e=Pd(e,ha))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ta?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},(n=qr(e)).return=t,t.child=n,ca=t,ua=null):e=null,null===e)throw ma(t);return _d(e)?t.lanes=32:t.lanes=536870912,null}var l=o.children;return o=o.fallback,i?(zo(),l=Zs({mode:"hidden",children:l},i=t.mode),o=$r(o,i,n,null),l.return=t,o.return=t,l.sibling=o,t.child=l,(o=t.child).memoizedState=Ys(n),o.childLanes=Xs(e,r,n),t.memoizedState=Gs,Fs(null,o)):(Mo(t),Js(t,l))}var c=e.memoizedState;if(null!==c&&null!==(l=c.dehydrated)){if(s)256&t.flags?(Mo(t),t.flags&=-257,t=el(e,t,n)):null!==t.memoizedState?(zo(),t.child=e.child,t.flags|=128,t=null):(zo(),l=o.fallback,i=t.mode,o=Zs({mode:"visible",children:o.children},i),(l=$r(l,i,n,null)).flags|=2,o.return=t,l.return=t,o.sibling=l,t.child=o,po(t,e.child,null,n),(o=t.child).memoizedState=Ys(n),o.childLanes=Xs(e,r,n),t.memoizedState=Gs,t=Fs(null,o));else if(Mo(t),_d(l)){if(r=l.nextSibling&&l.nextSibling.dataset)var u=r.dgst;r=u,(o=Error(a(419))).stack="",o.digest=r,wa({value:o,source:null,stack:null}),t=el(e,t,n)}else if(_s||Ra(e,t,n,!1),r=0!==(n&e.childLanes),_s||r){if(null!==(r=pc)&&(0!==(o=Me(r,n))&&o!==c.retryLane))throw c.retryLane=o,_r(e,o),Gc(r,e,o),As;Ad(l)||su(),t=el(e,t,n)}else Ad(l)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,ua=Dd(l.nextSibling),ca=t,da=!0,fa=null,ha=!1,null!==e&&la(t,e),(t=Js(t,o.children)).flags|=4096);return t}return i?(zo(),l=o.fallback,i=t.mode,u=(c=e.child).sibling,(o=Br(c,{mode:"hidden",children:o.children})).subtreeFlags=65011712&c.subtreeFlags,null!==u?l=Br(u,l):(l=$r(l,i,n,null)).flags|=2,l.return=t,o.return=t,o.sibling=l,t.child=o,Fs(null,o),o=t.child,null===(l=e.child.memoizedState)?l=Ys(n):(null!==(i=l.cachePool)?(c=za._currentValue,i=i.parent!==c?{parent:c,pool:c}:i):i=Xa(),l={baseLanes:l.baseLanes|n,cachePool:i}),o.memoizedState=l,o.childLanes=Xs(e,r,n),t.memoizedState=Gs,Fs(e.child,o)):(Mo(t),e=(n=e.child).sibling,(n=Br(n,{mode:"visible",children:o.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Js(e,t){return(t=Zs({mode:"visible",children:t},e.mode)).return=e,e.child=t}function Zs(e,t){return(e=zr(22,e,null,t)).lanes=0,e}function el(e,t,n){return po(t,e.child,null,n),(e=Js(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function tl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),ja(e.return,t,n)}function nl(e,t,n,r,a,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,treeForkCount:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=a,i.treeForkCount=o)}function rl(e,t,n){var r=t.pendingProps,a=r.revealOrder,o=r.tail;r=r.children;var i=Bo.current,s=!!(2&i);if(s?(i=1&i|2,t.flags|=128):i&=1,U(Bo,i),Ds(e,t,r,n),r=da?Jr:0,!s&&null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&tl(e,n,t);else if(19===e.tag)tl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===Uo(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),nl(t,!1,a,n,o,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===Uo(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}nl(t,!0,n,null,o,r);break;case"together":nl(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function al(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ec|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Ra(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Br(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Br(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function ol(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Oa(e))}function il(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)_s=!0;else{if(!(ol(e,n)||128&t.flags))return _s=!1,function(e,t,n){switch(t.tag){case 3:G(t,t.stateNode.containerInfo),Ca(0,za,e.memoizedState.cache),ba();break;case 27:case 5:X(t);break;case 4:G(t,t.stateNode.containerInfo);break;case 10:Ca(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,Lo(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Mo(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Qs(e,t,n):(Mo(t),null!==(e=al(e,t,n))?e.sibling:null);Mo(t);break;case 19:var a=!!(128&e.flags);if((r=0!==(n&t.childLanes))||(Ra(e,t,n,!1),r=0!==(n&t.childLanes)),a){if(r)return rl(e,t,n);t.flags|=128}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),U(Bo,Bo.current),r)break;return null;case 22:return t.lanes=0,zs(e,t,n,t.pendingProps);case 24:Ca(0,za,e.memoizedState.cache)}return al(e,t,n)}(e,t,n);_s=!!(131072&e.flags)}else _s=!1,da&&1048576&t.flags&&oa(t,Jr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=ro(t.elementType),t.type=e,"function"!=typeof e){if(null!=e){var o=e.$$typeof;if(o===S){t.tag=11,t=Ms(null,t,e,r,n);break e}if(o===C){t.tag=14,t=Ls(null,t,e,r,n);break e}}throw t=A(e)||e,Error(a(306,t,""))}Fr(e)?(r=ks(e,r),t.tag=1,t=Ws(null,t,e,r,n)):(t.tag=0,t=Hs(null,t,e,r,n))}return t;case 0:return Hs(e,t,t.type,t.pendingProps,n);case 1:return Ws(e,t,r=t.type,o=ks(r,t.pendingProps),n);case 3:e:{if(G(t,t.stateNode.containerInfo),null===e)throw Error(a(387));r=t.pendingProps;var i=t.memoizedState;o=i.element,vo(e,t),Co(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ca(0,za,r),r!==i.cache&&Ta(t,[za],n,!0),Eo(),r=s.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Ks(e,t,r,n);break e}if(r!==o){wa(o=Gr(Error(a(424)),t)),t=Ks(e,t,r,n);break e}if(9===(e=t.stateNode.containerInfo).nodeType)e=e.body;else e="HTML"===e.nodeName?e.ownerDocument.body:e;for(ua=Dd(e.firstChild),ca=t,da=!0,fa=null,ha=!0,n=mo(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ba(),r===o){t=al(e,t,n);break e}Ds(e,t,r,n)}t=t.child}return t;case 26:return $s(e,t),null===e?(n=Wd(t.type,null,t.pendingProps,null))?t.memoizedState=n:da||(n=t.type,e=t.pendingProps,(r=yd(W.current).createElement(n))[Ue]=t,r[Ve]=e,hd(r,n,e),et(r),t.stateNode=r):t.memoizedState=Wd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return X(t),null===e&&da&&(r=t.stateNode=zd(t.type,t.pendingProps,W.current),ca=t,ha=!0,o=ua,jd(t.type)?(Md=o,ua=Dd(r.firstChild)):ua=o),Ds(e,t,t.pendingProps.children,n),$s(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&da&&((o=r=ua)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Ge])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(o=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(o!==a.rel||e.getAttribute("href")!==(null==a.href||""===a.href?null:a.href)||e.getAttribute("crossorigin")!==(null==a.crossOrigin?null:a.crossOrigin)||e.getAttribute("title")!==(null==a.title?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((o=e.getAttribute("src"))!==(null==a.src?null:a.src)||e.getAttribute("type")!==(null==a.type?null:a.type)||e.getAttribute("crossorigin")!==(null==a.crossOrigin?null:a.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var o=null==a.name?null:""+a.name;if("hidden"===a.type&&e.getAttribute("name")===o)return e}if(null===(e=Dd(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,ha))?(t.stateNode=r,ca=t,ua=Dd(r.firstChild),ha=!1,o=!0):o=!1),o||ma(t)),X(t),o=t.type,i=t.pendingProps,s=null!==e?e.memoizedProps:null,r=i.children,xd(o,i)?r=null:null!==s&&xd(o,s)&&(t.flags|=32),null!==t.memoizedState&&(o=ti(e,t,ai,null,null,n),ff._currentValue=o),$s(e,t),Ds(e,t,r,n),t.child;case 6:return null===e&&da&&((e=n=ua)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=Dd(e.nextSibling)))return null}return e}(n,t.pendingProps,ha))?(t.stateNode=n,ca=t,ua=null,e=!0):e=!1),e||ma(t)),null;case 13:return Qs(e,t,n);case 4:return G(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=po(t,null,r,n):Ds(e,t,r,n),t.child;case 11:return Ms(e,t,t.type,t.pendingProps,n);case 7:return Ds(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ds(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ca(0,t.type,r.value),Ds(e,t,r.children,n),t.child;case 9:return o=t.type._context,r=t.pendingProps.children,Pa(t),r=r(o=Aa(o)),t.flags|=1,Ds(e,t,r,n),t.child;case 14:return Ls(e,t,t.type,t.pendingProps,n);case 15:return Is(e,t,t.type,t.pendingProps,n);case 19:return rl(e,t,n);case 31:return function(e,t,n){var r=t.pendingProps,o=!!(128&t.flags);if(t.flags&=-129,null===e){if(da){if("hidden"===r.mode)return e=Us(t,r),t.lanes=536870912,Fs(null,e);if(Lo(t),(e=ua)?null!==(e=null!==(e=Pd(e,ha))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==ta?{id:na,overflow:ra}:null,retryLane:536870912,hydrationErrors:null},(n=qr(e)).return=t,t.child=n,ca=t,ua=null):e=null,null===e)throw ma(t);return t.lanes=536870912,null}return Us(t,r)}var i=e.memoizedState;if(null!==i){var s=i.dehydrated;if(Lo(t),o)if(256&t.flags)t.flags&=-257,t=Vs(e,t,n);else{if(null===t.memoizedState)throw Error(a(558));t.child=e.child,t.flags|=128,t=null}else if(_s||Ra(e,t,n,!1),o=0!==(n&e.childLanes),_s||o){if(null!==(r=pc)&&0!==(s=Me(r,n))&&s!==i.retryLane)throw i.retryLane=s,_r(e,s),Gc(r,e,s),As;su(),t=Vs(e,t,n)}else e=i.treeContext,ua=Dd(s.nextSibling),ca=t,da=!0,fa=null,ha=!1,null!==e&&la(t,e),(t=Us(t,r)).flags|=4096;return t}return(e=Br(e.child,{mode:r.mode,children:r.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return zs(e,t,n,t.pendingProps);case 24:return Pa(t),r=Aa(za),null===e?(null===(o=Ga())&&(o=pc,i=Fa(),o.pooledCache=i,i.refCount++,null!==i&&(o.pooledCacheLanes|=n),o=i),t.memoizedState={parent:r,cache:o},yo(t),Ca(0,za,o)):(0!==(e.lanes&n)&&(vo(e,t),Co(t,null,null,n),Eo()),o=e.memoizedState,i=t.memoizedState,o.parent!==r?(o={parent:r,cache:r},t.memoizedState=o,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=o),Ca(0,za,r)):(r=i.cache,Ca(0,za,r),r!==o.cache&&Ta(t,[za],n,!0))),Ds(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function sl(e){e.flags|=4}function ll(e,t,n,r,a){if((t=!!(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&a)===a)if(e.stateNode.complete)e.flags|=8192;else{if(!au())throw ao=eo,Ja;e.flags|=8192}}else e.flags&=-16777217}function cl(e,t){if("stylesheet"!==t.type||4&t.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!of(t)){if(!au())throw ao=eo,Ja;e.flags|=8192}}function ul(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Oe():536870912,e.lanes|=t,Tc|=t)}function dl(e,t){if(!da)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function fl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=65011712&a.subtreeFlags,r|=65011712&a.flags,a.return=e,a=a.sibling;else for(a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function hl(e,t,n){var r=t.pendingProps;switch(sa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return fl(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Na(za),Y(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(va(t)?sl(t):null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,xa())),fl(t),null;case 26:var o=t.type,i=t.memoizedState;return null===e?(sl(t),null!==i?(fl(t),cl(t,i)):(fl(t),ll(t,o,0,0,n))):i?i!==e.memoizedState?(sl(t),fl(t),cl(t,i)):(fl(t),t.flags&=-16777217):((e=e.memoizedProps)!==r&&sl(t),fl(t),ll(t,o,0,0,n)),null;case 27:if(Q(t),n=W.current,o=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if(!r){if(null===t.stateNode)throw Error(a(166));return fl(t),null}e=H.current,va(t)?ga(t):(e=zd(o,r,n),t.stateNode=e,sl(t))}return fl(t),null;case 5:if(Q(t),o=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if(!r){if(null===t.stateNode)throw Error(a(166));return fl(t),null}if(i=H.current,va(t))ga(t);else{var s=yd(W.current);switch(i){case 1:i=s.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:i=s.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":i=s.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":i=s.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":(i=s.createElement("div")).innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i="string"==typeof r.is?s.createElement("select",{is:r.is}):s.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i="string"==typeof r.is?s.createElement(o,{is:r.is}):s.createElement(o)}}i[Ue]=t,i[Ve]=r;e:for(s=t.child;null!==s;){if(5===s.tag||6===s.tag)i.appendChild(s.stateNode);else if(4!==s.tag&&27!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;null===s.sibling;){if(null===s.return||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=i;e:switch(hd(i,o,r),o){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&sl(t)}}return fl(t),ll(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&sl(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(e=W.current,va(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(o=ca))switch(o.tag){case 27:case 5:r=o.memoizedProps}e[Ue]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||ud(e.nodeValue,n)))||ma(t,!0)}else(e=yd(e).createTextNode(r))[Ue]=t,t.stateNode=e}return fl(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=va(t),null!==n){if(null===e){if(!r)throw Error(a(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(a(557));e[Ue]=t}else ba(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fl(t),e=!1}else n=xa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Fo(t),t):(Fo(t),null);if(128&t.flags)throw Error(a(558))}return fl(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(o=va(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(a(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(a(317));o[Ue]=t}else ba(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fl(t),o=!1}else o=xa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return 256&t.flags?(Fo(t),t):(Fo(t),null)}return Fo(t),128&t.flags?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(o=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(o=r.alternate.memoizedState.cachePool.pool),i=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(i=r.memoizedState.cachePool.pool),i!==o&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ul(t,t.updateQueue),fl(t),null);case 4:return Y(),null===e&&ed(t.stateNode.containerInfo),fl(t),null;case 10:return Na(t.type),fl(t),null;case 19:if(B(Bo),null===(r=t.memoizedState))return fl(t),null;if(o=!!(128&t.flags),null===(i=r.rendering))if(o)dl(r,!1);else{if(0!==kc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(i=Uo(e))){for(t.flags|=128,dl(r,!1),e=i.updateQueue,t.updateQueue=e,ul(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Ur(n,e),n=n.sibling;return U(Bo,1&Bo.current|2),da&&aa(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&le()>Dc&&(t.flags|=128,o=!0,dl(r,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=Uo(i))){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,ul(t,e),dl(r,!0),null===r.tail&&"hidden"===r.tailMode&&!i.alternate&&!da)return fl(t),null}else 2*le()-r.renderingStartTime>Dc&&536870912!==n&&(t.flags|=128,o=!0,dl(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(null!==(e=r.last)?e.sibling=i:t.child=i,r.last=i)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=le(),e.sibling=null,n=Bo.current,U(Bo,o?1&n|2:1&n),da&&aa(t,r.treeForkCount),e):(fl(t),null);case 22:case 23:return Fo(t),Ao(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?!!(536870912&n)&&!(128&t.flags)&&(fl(t),6&t.subtreeFlags&&(t.flags|=8192)):fl(t),null!==(n=t.updateQueue)&&ul(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&B(Ka),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Na(za),fl(t),null;case 25:case 30:return null}throw Error(a(156,t.tag))}function pl(e,t){switch(sa(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Na(za),Y(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return Q(t),null;case 31:if(null!==t.memoizedState){if(Fo(t),null===t.alternate)throw Error(a(340));ba()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Fo(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));ba()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return B(Bo),null;case 4:return Y(),null;case 10:return Na(t.type),null;case 22:case 23:return Fo(t),Ao(),null!==e&&B(Ka),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Na(za),null;default:return null}}function ml(e,t){switch(sa(t),t.tag){case 3:Na(za),Y();break;case 26:case 27:case 5:Q(t);break;case 4:Y();break;case 31:null!==t.memoizedState&&Fo(t);break;case 13:Fo(t);break;case 19:B(Bo);break;case 10:Na(t.type);break;case 22:case 23:Fo(t),Ao(),null!==e&&B(Ka);break;case 24:Na(za)}}function gl(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var o=n.create,i=n.inst;r=o(),i.destroy=r}n=n.next}while(n!==a)}}catch(s){Eu(t,t.return,s)}}function yl(e,t,n){try{var r=t.updateQueue,a=null!==r?r.lastEffect:null;if(null!==a){var o=a.next;r=o;do{if((r.tag&e)===e){var i=r.inst,s=i.destroy;if(void 0!==s){i.destroy=void 0,a=t;var l=n,c=s;try{c()}catch(u){Eu(a,l,u)}}}r=r.next}while(r!==o)}}catch(u){Eu(t,t.return,u)}}function vl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{jo(t,n)}catch(r){Eu(e,e.return,r)}}}function bl(e,t,n){n.props=ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Eu(e,t,r)}}function xl(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(a){Eu(e,t,a)}}function wl(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(a){Eu(e,t,a)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(o){Eu(e,t,o)}else n.current=null}function Sl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Eu(e,e.return,a)}}function kl(e,t,n){try{var r=e.stateNode;!function(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 o=null,i=null,s=null,l=null,c=null,u=null,d=null;for(p in n){var f=n[p];if(n.hasOwnProperty(p)&&null!=f)switch(p){case"checked":case"value":break;case"defaultValue":c=f;default:r.hasOwnProperty(p)||dd(e,t,p,null,r,f)}}for(var h in r){var p=r[h];if(f=n[h],r.hasOwnProperty(h)&&(null!=p||null!=f))switch(h){case"type":i=p;break;case"name":o=p;break;case"checked":u=p;break;case"defaultChecked":d=p;break;case"value":s=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(a(137,t));break;default:p!==f&&dd(e,t,h,p,r,f)}}return void vt(e,s,l,c,u,d,i,o);case"select":for(i in p=s=l=h=null,n)if(c=n[i],n.hasOwnProperty(i)&&null!=c)switch(i){case"value":break;case"multiple":p=c;default:r.hasOwnProperty(i)||dd(e,t,i,null,r,c)}for(o in r)if(i=r[o],c=n[o],r.hasOwnProperty(o)&&(null!=i||null!=c))switch(o){case"value":h=i;break;case"defaultValue":l=i;break;case"multiple":s=i;default:i!==c&&dd(e,t,o,i,r,c)}return t=l,n=s,r=p,void(null!=h?wt(e,!!n,h,!1):!!r!=!!n&&(null!=t?wt(e,!!n,t,!0):wt(e,!!n,n?[]:"",!1)));case"textarea":for(l in p=h=null,n)if(o=n[l],n.hasOwnProperty(l)&&null!=o&&!r.hasOwnProperty(l))switch(l){case"value":case"children":break;default:dd(e,t,l,null,r,o)}for(s in r)if(o=r[s],i=n[s],r.hasOwnProperty(s)&&(null!=o||null!=i))switch(s){case"value":h=o;break;case"defaultValue":p=o;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=o)throw Error(a(91));break;default:o!==i&&dd(e,t,s,o,r,i)}return void St(e,h,p);case"option":for(var m in n)if(h=n[m],n.hasOwnProperty(m)&&null!=h&&!r.hasOwnProperty(m))if("selected"===m)e.selected=!1;else dd(e,t,m,null,r,h);for(c in r)if(h=r[c],p=n[c],r.hasOwnProperty(c)&&h!==p&&(null!=h||null!=p))if("selected"===c)e.selected=h&&"function"!=typeof h&&"symbol"!=typeof h;else dd(e,t,c,h,r,p);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)h=n[g],n.hasOwnProperty(g)&&null!=h&&!r.hasOwnProperty(g)&&dd(e,t,g,null,r,h);for(u in r)if(h=r[u],p=n[u],r.hasOwnProperty(u)&&h!==p&&(null!=h||null!=p))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=h)throw Error(a(137,t));break;default:dd(e,t,u,h,r,p)}return;default:if(Tt(t)){for(var y in n)h=n[y],n.hasOwnProperty(y)&&void 0!==h&&!r.hasOwnProperty(y)&&fd(e,t,y,void 0,r,h);for(d in r)h=r[d],p=n[d],!r.hasOwnProperty(d)||h===p||void 0===h&&void 0===p||fd(e,t,d,h,r,p);return}}for(var v in n)h=n[v],n.hasOwnProperty(v)&&null!=h&&!r.hasOwnProperty(v)&&dd(e,t,v,null,r,h);for(f in r)h=r[f],p=n[f],!r.hasOwnProperty(f)||h===p||null==h&&null==p||dd(e,t,f,h,r,p)}(r,e.type,n,t),r[Ve]=t}catch(o){Eu(e,e.return,o)}}function El(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&jd(e.type)||4===e.tag}function Cl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||El(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&jd(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Nl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=At));else if(4!==r&&(27===r&&jd(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Nl(e,t,n),e=e.sibling;null!==e;)Nl(e,t,n),e=e.sibling}function jl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&jd(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(jl(e,t,n),e=e.sibling;null!==e;)jl(e,t,n),e=e.sibling}function Tl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);hd(t,r,n),t[Ue]=e,t[Ve]=n}catch(o){Eu(e,e.return,o)}}var Rl=!1,Ol=!1,Pl=!1,Al="function"==typeof WeakSet?WeakSet:Set,_l=null;function Dl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Gl(e,n),4&r&&gl(5,n);break;case 1:if(Gl(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(i){Eu(n,n.return,i)}else{var a=ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){Eu(n,n.return,s)}}64&r&&vl(n),512&r&&xl(n,n.return);break;case 3:if(Gl(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{jo(e,t)}catch(i){Eu(n,n.return,i)}}break;case 27:null===t&&4&r&&Tl(n);case 26:case 5:Gl(e,n),null===t&&4&r&&Sl(n),512&r&&xl(n,n.return);break;case 12:Gl(e,n);break;case 31:Gl(e,n),4&r&&Bl(e,n);break;case 13:Gl(e,n),4&r&&Ul(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Tu.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||Rl)){t=null!==t&&null!==t.memoizedState||Ol,a=Rl;var o=Ol;Rl=r,(Ol=t)&&!o?Xl(e,n,!!(8772&n.subtreeFlags)):Gl(e,n),Rl=a,Ol=o}break;case 30:break;default:Gl(e,n)}}function Ml(e){var t=e.alternate;null!==t&&(e.alternate=null,Ml(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ye(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,Il=!1;function zl(e,t,n){for(n=n.child;null!==n;)Fl(e,t,n),n=n.sibling}function Fl(e,t,n){if(ve&&"function"==typeof ve.onCommitFiberUnmount)try{ve.onCommitFiberUnmount(ye,n)}catch(nu){}switch(n.tag){case 26:Ol||wl(n,t),zl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Ol||wl(n,t);var r=Ll,a=Il;jd(n.type)&&(Ll=n.stateNode,Il=!1),zl(e,t,n),Fd(n.stateNode),Ll=r,Il=a;break;case 5:Ol||wl(n,t);case 6:if(r=Ll,a=Il,Ll=null,zl(e,t,n),Il=a,null!==(Ll=r))if(Il)try{(9===Ll.nodeType?Ll.body:"HTML"===Ll.nodeName?Ll.ownerDocument.body:Ll).removeChild(n.stateNode)}catch(o){Eu(n,t,o)}else try{Ll.removeChild(n.stateNode)}catch(o){Eu(n,t,o)}break;case 18:null!==Ll&&(Il?(Td(9===(e=Ll).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Hf(e)):Td(Ll,n.stateNode));break;case 4:r=Ll,a=Il,Ll=n.stateNode.containerInfo,Il=!0,zl(e,t,n),Ll=r,Il=a;break;case 0:case 11:case 14:case 15:yl(2,n,t),Ol||yl(4,n,t),zl(e,t,n);break;case 1:Ol||(wl(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&bl(n,t,r)),zl(e,t,n);break;case 21:zl(e,t,n);break;case 22:Ol=(r=Ol)||null!==n.memoizedState,zl(e,t,n),Ol=r;break;default:zl(e,t,n)}}function Bl(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{Hf(e)}catch(n){Eu(t,t.return,n)}}}function Ul(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Hf(e)}catch(n){Eu(t,t.return,n)}}function Vl(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Al),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Al),t;default:throw Error(a(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ru.bind(null,e,t);t.then(r,r)}})}function $l(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r],i=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 27:if(jd(l.type)){Ll=l.stateNode,Il=!1;break e}break;case 5:Ll=l.stateNode,Il=!1;break e;case 3:case 4:Ll=l.stateNode.containerInfo,Il=!0;break e}l=l.return}if(null===Ll)throw Error(a(160));Fl(i,s,o),Ll=null,Il=!1,null!==(i=o.alternate)&&(i.return=null),o.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)ql(t,e),t=t.sibling}var Hl=null;function ql(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:$l(t,e),Wl(e),4&r&&(yl(3,e,e.return),gl(3,e),yl(5,e,e.return));break;case 1:$l(t,e),Wl(e),512&r&&(Ol||null===n||wl(n,n.return)),64&r&&Rl&&(null!==(e=e.updateQueue)&&(null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r))));break;case 26:var o=Hl;if($l(t,e),Wl(e),512&r&&(Ol||null===n||wl(n,n.return)),4&r){var i=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,o=o.ownerDocument||o;t:switch(r){case"title":(!(i=o.getElementsByTagName("title")[0])||i[Ge]||i[Ue]||"http://www.w3.org/2000/svg"===i.namespaceURI||i.hasAttribute("itemprop"))&&(i=o.createElement(r),o.head.insertBefore(i,o.querySelector("head > title"))),hd(i,r,n),i[Ue]=e,et(i),r=i;break e;case"link":var s=rf("link","href",o).get(r+(n.href||""));if(s)for(var l=0;l<s.length;l++)if((i=s[l]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&i.getAttribute("rel")===(null==n.rel?null:n.rel)&&i.getAttribute("title")===(null==n.title?null:n.title)&&i.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){s.splice(l,1);break t}hd(i=o.createElement(r),r,n),o.head.appendChild(i);break;case"meta":if(s=rf("meta","content",o).get(r+(n.content||"")))for(l=0;l<s.length;l++)if((i=s[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&i.getAttribute("name")===(null==n.name?null:n.name)&&i.getAttribute("property")===(null==n.property?null:n.property)&&i.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&i.getAttribute("charset")===(null==n.charSet?null:n.charSet)){s.splice(l,1);break t}hd(i=o.createElement(r),r,n),o.head.appendChild(i);break;default:throw Error(a(468,r))}i[Ue]=e,et(i),r=i}e.stateNode=r}else af(o,e.type,e.stateNode);else e.stateNode=Jd(o,r,e.memoizedProps);else i!==r?(null===i?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):i.count--,null===r?af(o,e.type,e.stateNode):Jd(o,r,e.memoizedProps)):null===r&&null!==e.stateNode&&kl(e,e.memoizedProps,n.memoizedProps)}break;case 27:$l(t,e),Wl(e),512&r&&(Ol||null===n||wl(n,n.return)),null!==n&&4&r&&kl(e,e.memoizedProps,n.memoizedProps);break;case 5:if($l(t,e),Wl(e),512&r&&(Ol||null===n||wl(n,n.return)),32&e.flags){o=e.stateNode;try{Et(o,"")}catch(m){Eu(e,e.return,m)}}4&r&&null!=e.stateNode&&kl(e,o=e.memoizedProps,null!==n?n.memoizedProps:o),1024&r&&(Pl=!0);break;case 6:if($l(t,e),Wl(e),4&r){if(null===e.stateNode)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(m){Eu(e,e.return,m)}}break;case 3:if(nf=null,o=Hl,Hl=Vd(t.containerInfo),$l(t,e),Hl=o,Wl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Hf(t.containerInfo)}catch(m){Eu(e,e.return,m)}Pl&&(Pl=!1,Kl(e));break;case 4:r=Hl,Hl=Vd(e.stateNode.containerInfo),$l(t,e),Wl(e),Hl=r;break;case 12:default:$l(t,e),Wl(e);break;case 31:case 19:$l(t,e),Wl(e),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,Vl(e,r)));break;case 13:$l(t,e),Wl(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(Ac=le()),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,Vl(e,r)));break;case 22:o=null!==e.memoizedState;var c=null!==n&&null!==n.memoizedState,u=Rl,d=Ol;if(Rl=u||o,Ol=d||c,$l(t,e),Ol=d,Rl=u,Wl(e),8192&r)e:for(t=e.stateNode,t._visibility=o?-2&t._visibility:1|t._visibility,o&&(null===n||c||Rl||Ol||Yl(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){c=n=t;try{if(i=c.stateNode,o)"function"==typeof(s=i.style).setProperty?s.setProperty("display","none","important"):s.display="none";else{l=c.stateNode;var f=c.memoizedProps.style,h=null!=f&&f.hasOwnProperty("display")?f.display:null;l.style.display=null==h||"boolean"==typeof h?"":(""+h).trim()}}catch(m){Eu(c,c.return,m)}}}else if(6===t.tag){if(null===n){c=t;try{c.stateNode.nodeValue=o?"":c.memoizedProps}catch(m){Eu(c,c.return,m)}}}else if(18===t.tag){if(null===n){c=t;try{var p=c.stateNode;o?Rd(p,!0):Rd(c.stateNode,!1)}catch(m){Eu(c,c.return,m)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&(null!==(r=e.updateQueue)&&(null!==(n=r.retryQueue)&&(r.retryQueue=null,Vl(e,n))));case 30:case 21:}}function Wl(e){var t=e.flags;if(2&t){try{for(var n,r=e.return;null!==r;){if(El(r)){n=r;break}r=r.return}if(null==n)throw Error(a(160));switch(n.tag){case 27:var o=n.stateNode;jl(e,Cl(e),o);break;case 5:var i=n.stateNode;32&n.flags&&(Et(i,""),n.flags&=-33),jl(e,Cl(e),i);break;case 3:case 4:var s=n.stateNode.containerInfo;Nl(e,Cl(e),s);break;default:throw Error(a(161))}}catch(l){Eu(e,e.return,l)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Kl(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Kl(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Gl(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Dl(e,t.alternate,t),t=t.sibling}function Yl(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:yl(4,t,t.return),Yl(t);break;case 1:wl(t,t.return);var n=t.stateNode;"function"==typeof n.componentWillUnmount&&bl(t,t.return,n),Yl(t);break;case 27:Fd(t.stateNode);case 26:case 5:wl(t,t.return),Yl(t);break;case 22:null===t.memoizedState&&Yl(t);break;default:Yl(t)}e=e.sibling}}function Xl(e,t,n){for(n=n&&!!(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,a=e,o=t,i=o.flags;switch(o.tag){case 0:case 11:case 15:Xl(a,o,n),gl(4,o);break;case 1:if(Xl(a,o,n),"function"==typeof(a=(r=o).stateNode).componentDidMount)try{a.componentDidMount()}catch(c){Eu(r,r.return,c)}if(null!==(a=(r=o).updateQueue)){var s=r.stateNode;try{var l=a.shared.hiddenCallbacks;if(null!==l)for(a.shared.hiddenCallbacks=null,a=0;a<l.length;a++)No(l[a],s)}catch(c){Eu(r,r.return,c)}}n&&64&i&&vl(o),xl(o,o.return);break;case 27:Tl(o);case 26:case 5:Xl(a,o,n),n&&null===r&&4&i&&Sl(o),xl(o,o.return);break;case 12:Xl(a,o,n);break;case 31:Xl(a,o,n),n&&4&i&&Bl(a,o);break;case 13:Xl(a,o,n),n&&4&i&&Ul(a,o);break;case 22:null===o.memoizedState&&Xl(a,o,n),xl(o,o.return);break;case 30:break;default:Xl(a,o,n)}t=t.sibling}}function Ql(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Ba(n))}function Jl(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ba(e))}function Zl(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)ec(e,t,n,r),t=t.sibling}function ec(e,t,n,r){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Zl(e,t,n,r),2048&a&&gl(9,t);break;case 1:case 31:case 13:default:Zl(e,t,n,r);break;case 3:Zl(e,t,n,r),2048&a&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ba(e)));break;case 12:if(2048&a){Zl(e,t,n,r),e=t.stateNode;try{var o=t.memoizedProps,i=o.id,s=o.onPostCommit;"function"==typeof s&&s(i,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(l){Eu(t,t.return,l)}}else Zl(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,i=t.alternate,null!==t.memoizedState?2&o._visibility?Zl(e,t,n,r):nc(e,t):2&o._visibility?Zl(e,t,n,r):(o._visibility|=2,tc(e,t,n,r,!!(10256&t.subtreeFlags)||!1)),2048&a&&Ql(i,t);break;case 24:Zl(e,t,n,r),2048&a&&Jl(t.alternate,t)}}function tc(e,t,n,r,a){for(a=a&&(!!(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var o=e,i=t,s=n,l=r,c=i.flags;switch(i.tag){case 0:case 11:case 15:tc(o,i,s,l,a),gl(8,i);break;case 23:break;case 22:var u=i.stateNode;null!==i.memoizedState?2&u._visibility?tc(o,i,s,l,a):nc(o,i):(u._visibility|=2,tc(o,i,s,l,a)),a&&2048&c&&Ql(i.alternate,i);break;case 24:tc(o,i,s,l,a),a&&2048&c&&Jl(i.alternate,i);break;default:tc(o,i,s,l,a)}t=t.sibling}}function nc(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,a=r.flags;switch(r.tag){case 22:nc(n,r),2048&a&&Ql(r.alternate,r);break;case 24:nc(n,r),2048&a&&Jl(r.alternate,r);break;default:nc(n,r)}t=t.sibling}}var rc=8192;function ac(e,t,n){if(e.subtreeFlags&rc)for(e=e.child;null!==e;)oc(e,t,n),e=e.sibling}function oc(e,t,n){switch(e.tag){case 26:ac(e,t,n),e.flags&rc&&null!==e.memoizedState&&function(e,t,n,r){if(!("stylesheet"!==n.type||"string"==typeof r.media&&!1===matchMedia(r.media).matches||4&n.state.loading)){if(null===n.instance){var a=Kd(r.href),o=t.querySelector(Gd(a));if(o)return null!==(t=o._p)&&"object"==typeof t&&"function"==typeof t.then&&(e.count++,e=lf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,void et(o);o=t.ownerDocument||t,r=Yd(r),(a=Bd.get(a))&&ef(r,a),et(o=o.createElement("link"));var i=o;i._p=new Promise(function(e,t){i.onload=e,i.onerror=t}),hd(o,"link",r),n.instance=o}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(3&n.state.loading)&&(e.count++,n=lf.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,Hl,e.memoizedState,e.memoizedProps);break;case 5:default:ac(e,t,n);break;case 3:case 4:var r=Hl;Hl=Vd(e.stateNode.containerInfo),ac(e,t,n),Hl=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=rc,rc=16777216,ac(e,t,n),rc=r):ac(e,t,n))}}function ic(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function sc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];_l=r,uc(r,e)}ic(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)lc(e),e=e.sibling}function lc(e){switch(e.tag){case 0:case 11:case 15:sc(e),2048&e.flags&&yl(9,e,e.return);break;case 3:case 12:default:sc(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,cc(e)):sc(e)}}function cc(e){var t=e.deletions;if(16&e.flags){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];_l=r,uc(r,e)}ic(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:yl(8,t,t.return),cc(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,cc(t));break;default:cc(t)}e=e.sibling}}function uc(e,t){for(;null!==_l;){var n=_l;switch(n.tag){case 0:case 11:case 15:yl(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Ba(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,_l=r;else e:for(n=e;null!==_l;){var a=(r=_l).sibling,o=r.return;if(Ml(r),r===n){_l=null;break e}if(null!==a){a.return=o,_l=a;break e}_l=o}}}var dc={getCacheForType:function(e){var t=Aa(za),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Aa(za).controller.signal}},fc="function"==typeof WeakMap?WeakMap:Map,hc=0,pc=null,mc=null,gc=0,yc=0,vc=null,bc=!1,xc=!1,wc=!1,Sc=0,kc=0,Ec=0,Cc=0,Nc=0,jc=0,Tc=0,Rc=null,Oc=null,Pc=!1,Ac=0,_c=0,Dc=1/0,Mc=null,Lc=null,Ic=0,zc=null,Fc=null,Bc=0,Uc=0,Vc=null,$c=null,Hc=0,qc=null;function Wc(){return 2&hc&&0!==gc?gc&-gc:null!==D.T?$u():ze()}function Kc(){if(0===jc)if(536870912&gc&&!da)jc=536870912;else{var e=Ee;!(3932160&(Ee<<=1))&&(Ee=262144),jc=e}return null!==(e=_o.current)&&(e.flags|=32),jc}function Gc(e,t,n){(e!==pc||2!==yc&&9!==yc)&&null===e.cancelPendingCommit||(tu(e,0),Jc(e,gc,jc,!1)),Ae(e,n),2&hc&&e===pc||(e===pc&&(!(2&hc)&&(Cc|=n),4===kc&&Jc(e,gc,jc,!1)),Lu(e))}function Yc(e,t,n){if(6&hc)throw Error(a(327));for(var r=!n&&!(127&t)&&0===(t&e.expiredLanes)||Te(e,t),o=r?function(e,t){var n=hc;hc|=2;var r=ou(),o=iu();pc!==e||gc!==t?(Mc=null,Dc=le()+500,tu(e,t)):xc=Te(e,t);e:for(;;)try{if(0!==yc&&null!==mc){t=mc;var i=vc;t:switch(yc){case 1:yc=0,vc=null,hu(e,t,i,1);break;case 2:case 9:if(to(i)){yc=0,vc=null,fu(t);break}t=function(){2!==yc&&9!==yc||pc!==e||(yc=7),Lu(e)},i.then(t,t);break e;case 3:yc=7;break e;case 4:yc=5;break e;case 7:to(i)?(yc=0,vc=null,fu(t)):(yc=0,vc=null,hu(e,t,i,7));break;case 5:var s=null;switch(mc.tag){case 26:s=mc.memoizedState;case 5:case 27:var l=mc;if(s?of(s):l.stateNode.complete){yc=0,vc=null;var c=l.sibling;if(null!==c)mc=c;else{var u=l.return;null!==u?(mc=u,pu(u)):mc=null}break t}}yc=0,vc=null,hu(e,t,i,5);break;case 6:yc=0,vc=null,hu(e,t,i,6);break;case 8:eu(),kc=6;break e;default:throw Error(a(462))}}uu();break}catch(d){ru(e,d)}return Ea=ka=null,D.H=r,D.A=o,hc=n,null!==mc?0:(pc=null,gc=0,Or(),kc)}(e,t):lu(e,t,!0),i=r;;){if(0===o){xc&&!r&&Jc(e,t,0,!1);break}if(n=e.current.alternate,!i||Qc(n)){if(2===o){if(i=t,e.errorRecoveryDisabledLanes&i)var s=0;else s=0!==(s=-536870913&e.pendingLanes)?s:536870912&s?536870912:0;if(0!==s){t=s;e:{var l=e;o=Rc;var c=l.current.memoizedState.isDehydrated;if(c&&(tu(l,s).flags|=256),2!==(s=lu(l,s,!1))){if(wc&&!c){l.errorRecoveryDisabledLanes|=i,Cc|=i,o=4;break e}i=Oc,Oc=o,null!==i&&(null===Oc?Oc=i:Oc.push.apply(Oc,i))}o=s}if(i=!1,2!==o)continue}}if(1===o){tu(e,0),Jc(e,t,0,!0);break}e:{switch(r=e,i=o){case 0:case 1:throw Error(a(345));case 4:if((4194048&t)!==t)break;case 6:Jc(r,t,jc,!bc);break e;case 2:Oc=null;break;case 3:case 5:break;default:throw Error(a(329))}if((62914560&t)===t&&10<(o=Ac+300-le())){if(Jc(r,t,jc,!bc),0!==je(r,0,!0))break e;Bc=t,r.timeoutHandle=Sd(Xc.bind(null,r,n,Oc,Mc,Pc,t,jc,Cc,Tc,bc,i,"Throttled",-0,0),o)}else Xc(r,n,Oc,Mc,Pc,t,jc,Cc,Tc,bc,i,null,-0,0)}break}o=lu(e,t,!1),i=!1}Lu(e)}function Xc(e,t,n,r,a,o,i,s,l,c,u,d,f,h){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||!(16785408&~d)){oc(t,o,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:At});var p=(62914560&o)===o?Ac-le():(4194048&o)===o?_c-le():0;if(p=function(e,t){return e.stylesheets&&0===e.count&&uf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&uf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===sf&&(sf=62500*function(){if("function"==typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var a=n[r],o=a.transferSize,i=a.initiatorType,s=a.duration;if(o&&s&&pd(i)){for(i=0,s=a.responseEnd,r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>s)break;var u=l.transferSize,d=l.initiatorType;u&&pd(d)&&(i+=u*((l=l.responseEnd)<s?1:(s-c)/(l-c)))}if(--r,t+=8*(o+i)/(a.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,"number"==typeof e)?e:5}());var a=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&uf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>sf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}(d,p),null!==p)return Bc=o,e.cancelPendingCommit=p(gu.bind(null,e,t,o,n,r,a,i,s,l,u,d,null,f,h)),void Jc(e,o,i,!c)}gu(e,t,o,n,r,a,i,s,l)}function Qc(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;r<n.length;r++){var a=n[r],o=a.getSnapshot;a=a.value;try{if(!Jn(o(),a))return!1}catch(i){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Jc(e,t,n,r){t&=~Nc,t&=~Cc,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var a=t;0<a;){var o=31-xe(a),i=1<<o;r[o]=-1,a&=~i}0!==n&&_e(e,n,t)}function Zc(){return!!(6&hc)||(Iu(0,!1),!1)}function eu(){if(null!==mc){if(0===yc)var e=mc.return;else Ea=ka=null,si(e=mc),so=null,lo=0,e=mc;for(;null!==e;)ml(e.alternate,e),e=e.return;mc=null}}function tu(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,kd(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),Bc=0,eu(),pc=e,mc=n=Br(e.current,null),gc=t,yc=0,vc=null,bc=!1,xc=Te(e,t),wc=!1,Tc=jc=Nc=Cc=Ec=kc=0,Oc=Rc=null,Pc=!1,8&t&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var a=31-xe(r),o=1<<a;t|=e[a],r&=~o}return Sc=t,Or(),n}function ru(e,t){$o=null,D.H=ms,t===Qa||t===Za?(t=oo(),yc=3):t===Ja?(t=oo(),yc=4):yc=t===As?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,vc=t,null===mc&&(kc=1,js(e,Gr(t,e.current)))}function au(){var e=_o.current;return null===e||((4194048&gc)===gc?null===Do:!!((62914560&gc)===gc||536870912&gc)&&e===Do)}function ou(){var e=D.H;return D.H=ms,null===e?ms:e}function iu(){var e=D.A;return D.A=dc,e}function su(){kc=4,bc||(4194048&gc)!==gc&&null!==_o.current||(xc=!0),!(134217727&Ec)&&!(134217727&Cc)||null===pc||Jc(pc,gc,jc,!1)}function lu(e,t,n){var r=hc;hc|=2;var a=ou(),o=iu();pc===e&&gc===t||(Mc=null,tu(e,t)),t=!1;var i=kc;e:for(;;)try{if(0!==yc&&null!==mc){var s=mc,l=vc;switch(yc){case 8:eu(),i=6;break e;case 3:case 2:case 9:case 6:null===_o.current&&(t=!0);var c=yc;if(yc=0,vc=null,hu(e,s,l,c),n&&xc){i=0;break e}break;default:c=yc,yc=0,vc=null,hu(e,s,l,c)}}cu(),i=kc;break}catch(u){ru(e,u)}return t&&e.shellSuspendCounter++,Ea=ka=null,hc=r,D.H=a,D.A=o,null===mc&&(pc=null,gc=0,Or()),i}function cu(){for(;null!==mc;)du(mc)}function uu(){for(;null!==mc&&!ie();)du(mc)}function du(e){var t=il(e.alternate,e,Sc);e.memoizedProps=e.pendingProps,null===t?pu(e):mc=t}function fu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=qs(n,t,t.pendingProps,t.type,void 0,gc);break;case 11:t=qs(n,t,t.pendingProps,t.type.render,t.ref,gc);break;case 5:si(t);default:ml(n,t),t=il(n,t=mc=Ur(t,Sc),Sc)}e.memoizedProps=e.pendingProps,null===t?pu(e):mc=t}function hu(e,t,n,r){Ea=ka=null,si(t),so=null,lo=0;var o=t.return;try{if(function(e,t,n,r,o){if(n.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){if(null!==(t=n.alternate)&&Ra(t,n,o,!0),null!==(n=_o.current)){switch(n.tag){case 31:case 13:return null===Do?su():null===n.alternate&&0===kc&&(kc=3),n.flags&=-257,n.flags|=65536,n.lanes=o,r===eo?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),Cu(e,r,o)),!1;case 22:return n.flags|=65536,r===eo?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),Cu(e,r,o)),!1}throw Error(a(435,n.tag))}return Cu(e,r,o),su(),!1}if(da)return null!==(t=_o.current)?(!(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=o,r!==pa&&wa(Gr(e=Error(a(422),{cause:r}),n))):(r!==pa&&wa(Gr(t=Error(a(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,o&=-o,e.lanes|=o,r=Gr(r,n),So(e,o=Rs(e.stateNode,r,o)),4!==kc&&(kc=2)),!1;var i=Error(a(520),{cause:r});if(i=Gr(i,n),null===Rc?Rc=[i]:Rc.push(i),4!==kc&&(kc=2),null===t)return!0;r=Gr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,So(n,e=Rs(n.stateNode,r,e)),!1;case 1:if(t=n.type,i=n.stateNode,!(128&n.flags||"function"!=typeof t.getDerivedStateFromError&&(null===i||"function"!=typeof i.componentDidCatch||null!==Lc&&Lc.has(i))))return n.flags|=65536,o&=-o,n.lanes|=o,Ps(o=Os(o),e,n,r),So(n,o),!1}n=n.return}while(null!==n);return!1}(e,o,t,n,gc))return kc=1,js(e,Gr(n,e.current)),void(mc=null)}catch(i){if(null!==o)throw mc=o,i;return kc=1,js(e,Gr(n,e.current)),void(mc=null)}32768&t.flags?(da||1===r?e=!0:xc||536870912&gc?e=!1:(bc=e=!0,(2===r||9===r||3===r||6===r)&&(null!==(r=_o.current)&&13===r.tag&&(r.flags|=16384))),mu(t,e)):pu(t)}function pu(e){var t=e;do{if(32768&t.flags)return void mu(t,bc);e=t.return;var n=hl(t.alternate,t,Sc);if(null!==n)return void(mc=n);if(null!==(t=t.sibling))return void(mc=t);mc=t=e}while(null!==t);0===kc&&(kc=5)}function mu(e,t){do{var n=pl(e.alternate,e);if(null!==n)return n.flags&=32767,void(mc=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(mc=e);mc=e=n}while(null!==e);kc=6,mc=null}function gu(e,t,n,r,o,i,s,l,c){e.cancelPendingCommit=null;do{wu()}while(0!==Ic);if(6&hc)throw Error(a(327));if(null!==t){if(t===e.current)throw Error(a(177));if(i=t.lanes|t.childLanes,function(e,t,n,r,a,o){var i=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,l=e.expirationTimes,c=e.hiddenUpdates;for(n=i&~n;0<n;){var u=31-xe(n),d=1<<u;s[u]=0,l[u]=-1;var f=c[u];if(null!==f)for(c[u]=null,u=0;u<f.length;u++){var h=f[u];null!==h&&(h.lane&=-536870913)}n&=~d}0!==r&&_e(e,r,0),0!==o&&0===a&&0!==e.tag&&(e.suspendedLanes|=o&~(i&~t))}(e,n,i|=Rr,s,l,c),e===pc&&(mc=pc=null,gc=0),Fc=t,zc=e,Bc=n,Uc=i,Vc=o,$c=r,10256&t.subtreeFlags||10256&t.flags?(e.callbackNode=null,e.callbackPriority=0,ae(fe,function(){return Su(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(13878&t.flags),13878&t.subtreeFlags||r){r=D.T,D.T=null,o=M.p,M.p=2,s=hc,hc|=4;try{!function(e,t){if(e=e.containerInfo,md=bf,ar(e=rr(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(g){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||0!==o&&3!==f.nodeType||(l=s+o),f!==i||0!==r&&3!==f.nodeType||(c=s+r),3===f.nodeType&&(s+=f.nodeValue.length),null!==(p=f.firstChild);)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===o&&(l=s),h===i&&++d===r&&(c=s),null!==(p=f.nextSibling))break;h=(f=h).parentNode}f=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(gd={focusedElem:e,selectionRange:n},bf=!1,_l=t;null!==_l;)if(e=(t=_l).child,1028&t.subtreeFlags&&null!==e)e.return=t,_l=e;else for(;null!==_l;){switch(i=(t=_l).alternate,e=t.flags,t.tag){case 0:if(4&e&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(o=e[n]).ref.impl=o.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==i){e=void 0,n=t,o=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var m=ks(n.type,o);e=r.getSnapshotBeforeUpdate(m,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(y){Eu(n,n.return,y)}}break;case 3:if(1024&e)if(9===(n=(e=t.stateNode.containerInfo).nodeType))Od(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Od(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(a(163))}if(null!==(e=t.sibling)){e.return=t.return,_l=e;break}_l=t.return}}(e,t)}finally{hc=s,M.p=o,D.T=r}}Ic=1,yu(),vu(),bu()}}function yu(){if(1===Ic){Ic=0;var e=zc,t=Fc,n=!!(13878&t.flags);if(13878&t.subtreeFlags||n){n=D.T,D.T=null;var r=M.p;M.p=2;var a=hc;hc|=4;try{ql(t,e);var o=gd,i=rr(e.containerInfo),s=o.focusedElem,l=o.selectionRange;if(i!==s&&s&&s.ownerDocument&&nr(s.ownerDocument.documentElement,s)){if(null!==l&&ar(s)){var c=l.start,u=l.end;if(void 0===u&&(u=c),"selectionStart"in s)s.selectionStart=c,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var h=f.getSelection(),p=s.textContent.length,m=Math.min(l.start,p),g=void 0===l.end?m:Math.min(l.end,p);!h.extend&&m>g&&(i=g,g=m,m=i);var y=tr(s,m),v=tr(s,g);if(y&&v&&(1!==h.rangeCount||h.anchorNode!==y.node||h.anchorOffset!==y.offset||h.focusNode!==v.node||h.focusOffset!==v.offset)){var b=d.createRange();b.setStart(y.node,y.offset),h.removeAllRanges(),m>g?(h.addRange(b),h.extend(v.node,v.offset)):(b.setEnd(v.node,v.offset),h.addRange(b))}}}}for(d=[],h=s;h=h.parentNode;)1===h.nodeType&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for("function"==typeof s.focus&&s.focus(),s=0;s<d.length;s++){var x=d[s];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}bf=!!md,gd=md=null}finally{hc=a,M.p=r,D.T=n}}e.current=t,Ic=2}}function vu(){if(2===Ic){Ic=0;var e=zc,t=Fc,n=!!(8772&t.flags);if(8772&t.subtreeFlags||n){n=D.T,D.T=null;var r=M.p;M.p=2;var a=hc;hc|=4;try{Dl(e,t.alternate,t)}finally{hc=a,M.p=r,D.T=n}}Ic=3}}function bu(){if(4===Ic||3===Ic){Ic=0,se();var e=zc,t=Fc,n=Bc,r=$c;10256&t.subtreeFlags||10256&t.flags?Ic=5:(Ic=0,Fc=zc=null,xu(e,e.pendingLanes));var a=e.pendingLanes;if(0===a&&(Lc=null),Ie(n),t=t.stateNode,ve&&"function"==typeof ve.onCommitFiberRoot)try{ve.onCommitFiberRoot(ye,t,void 0,!(128&~t.current.flags))}catch(nu){}if(null!==r){t=D.T,a=M.p,M.p=2,D.T=null;try{for(var o=e.onRecoverableError,i=0;i<r.length;i++){var s=r[i];o(s.value,{componentStack:s.stack})}}finally{D.T=t,M.p=a}}3&Bc&&wu(),Lu(e),a=e.pendingLanes,261930&n&&42&a?e===qc?Hc++:(Hc=0,qc=e):Hc=0,Iu(0,!1)}}function xu(e,t){0===(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,Ba(t)))}function wu(){return yu(),vu(),bu(),Su()}function Su(){if(5!==Ic)return!1;var e=zc,t=Uc;Uc=0;var n=Ie(Bc),r=D.T,o=M.p;try{M.p=32>n?32:n,D.T=null,n=Vc,Vc=null;var i=zc,s=Bc;if(Ic=0,Fc=zc=null,Bc=0,6&hc)throw Error(a(331));var l=hc;if(hc|=4,lc(i.current),ec(i,i.current,s,n),hc=l,Iu(0,!1),ve&&"function"==typeof ve.onPostCommitFiberRoot)try{ve.onPostCommitFiberRoot(ye,i)}catch(nu){}return!0}finally{M.p=o,D.T=r,xu(e,t)}}function ku(e,t,n){t=Gr(n,t),null!==(e=xo(e,t=Rs(e.stateNode,t,2),2))&&(Ae(e,2),Lu(e))}function Eu(e,t,n){if(3===e.tag)ku(e,e,n);else for(;null!==t;){if(3===t.tag){ku(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Lc||!Lc.has(r))){e=Gr(n,e),null!==(r=xo(t,n=Os(2),2))&&(Ps(n,r,t,e),Ae(r,2),Lu(r));break}}t=t.return}}function Cu(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fc;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(wc=!0,a.add(n),e=Nu.bind(null,e,t,n),t.then(e,e))}function Nu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,pc===e&&(gc&n)===n&&(4===kc||3===kc&&(62914560&gc)===gc&&300>le()-Ac?!(2&hc)&&tu(e,0):Nc|=n,Tc===gc&&(Tc=0)),Lu(e)}function ju(e,t){0===t&&(t=Oe()),null!==(e=_r(e,t))&&(Ae(e,t),Lu(e))}function Tu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),ju(e,n)}function Ru(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}null!==r&&r.delete(t),ju(e,n)}var Ou=null,Pu=null,Au=!1,_u=!1,Du=!1,Mu=0;function Lu(e){e!==Pu&&null===e.next&&(null===Pu?Ou=Pu=e:Pu=Pu.next=e),_u=!0,Au||(Au=!0,Cd(function(){6&hc?ae(ue,zu):Fu()}))}function Iu(e,t){if(!Du&&_u){Du=!0;do{for(var n=!1,r=Ou;null!==r;){if(!t)if(0!==e){var a=r.pendingLanes;if(0===a)var o=0;else{var i=r.suspendedLanes,s=r.pingedLanes;o=(1<<31-xe(42|e)+1)-1,o=201326741&(o&=a&~(i&~s))?201326741&o|1:o?2|o:0}0!==o&&(n=!0,Vu(r,o))}else o=gc,!(3&(o=je(r,r===pc?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Te(r,o)||(n=!0,Vu(r,o));r=r.next}}while(n);Du=!1}}function zu(){Fu()}function Fu(){_u=Au=!1;var e=0;0!==Mu&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==wd&&(wd=e,!0);return wd=null,!1}()&&(e=Mu);for(var t=le(),n=null,r=Ou;null!==r;){var a=r.next,o=Bu(r,t);0===o?(r.next=null,null===n?Ou=a:n.next=a,null===a&&(Pu=n)):(n=r,(0!==e||3&o)&&(_u=!0)),r=a}0!==Ic&&5!==Ic||Iu(e,!1),0!==Mu&&(Mu=0)}function Bu(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,o=-62914561&e.pendingLanes;0<o;){var i=31-xe(o),s=1<<i,l=a[i];-1===l?0!==(s&n)&&0===(s&r)||(a[i]=Re(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}if(n=gc,n=je(e,e===(t=pc)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===yc||9===yc)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&oe(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&n)||Te(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&oe(r),Ie(n)){case 2:case 8:n=de;break;case 32:default:n=fe;break;case 268435456:n=pe}return r=Uu.bind(null,e),n=ae(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&oe(r),e.callbackPriority=2,e.callbackNode=null,2}function Uu(e,t){if(0!==Ic&&5!==Ic)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(wu()&&e.callbackNode!==n)return null;var r=gc;return 0===(r=je(e,e===pc?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Yc(e,r,t),Bu(e,le()),null!=e.callbackNode&&e.callbackNode===n?Uu.bind(null,e):null)}function Vu(e,t){if(wu())return null;Yc(e,t,!0)}function $u(){if(0===Mu){var e=$a;0===e&&(e=ke,!(261888&(ke<<=1))&&(ke=256)),Mu=e}return Mu}function Hu(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:Pt(""+e)}function qu(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}for(var Wu=0;Wu<Er.length;Wu++){var Ku=Er[Wu];Cr(Ku.toLowerCase(),"on"+(Ku[0].toUpperCase()+Ku.slice(1)))}Cr(gr,"onAnimationEnd"),Cr(yr,"onAnimationIteration"),Cr(vr,"onAnimationStart"),Cr("dblclick","onDoubleClick"),Cr("focusin","onFocus"),Cr("focusout","onBlur"),Cr(br,"onTransitionRun"),Cr(xr,"onTransitionStart"),Cr(wr,"onTransitionCancel"),Cr(Sr,"onTransitionEnd"),at("onMouseEnter",["mouseout","mouseover"]),at("onMouseLeave",["mouseout","mouseover"]),at("onPointerEnter",["pointerout","pointerover"]),at("onPointerLeave",["pointerout","pointerover"]),rt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rt("onBeforeInput",["compositionend","keypress","textInput","paste"]),rt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gu="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(" "),Yu=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gu));function Xu(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&a.isPropagationStopped())break e;o=s,a.currentTarget=c;try{o(a)}catch(u){Nr(u)}a.currentTarget=null,o=l}else for(i=0;i<r.length;i++){if(l=(s=r[i]).instance,c=s.currentTarget,s=s.listener,l!==o&&a.isPropagationStopped())break e;o=s,a.currentTarget=c;try{o(a)}catch(u){Nr(u)}a.currentTarget=null,o=l}}}}function Qu(e,t){var n=t[He];void 0===n&&(n=t[He]=new Set);var r=e+"__bubble";n.has(r)||(td(t,e,2,!1),n.add(r))}function Ju(e,t,n){var r=0;t&&(r|=4),td(n,e,r,t)}var Zu="_reactListening"+Math.random().toString(36).slice(2);function ed(e){if(!e[Zu]){e[Zu]=!0,tt.forEach(function(t){"selectionchange"!==t&&(Yu.has(t)||Ju(t,!1,e),Ju(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Zu]||(t[Zu]=!0,Ju("selectionchange",!1,t))}}function td(e,t,n,r){switch(Nf(t)){case 2:var a=xf;break;case 8:a=wf;break;default:a=Sf}n=a.bind(null,t,n,e),a=void 0,!Vt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function nd(e,t,n,r,a){var i=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var l=r.stateNode.containerInfo;if(l===a)break;if(4===s)for(s=r.return;null!==s;){var c=s.tag;if((3===c||4===c)&&s.stateNode.containerInfo===a)return;s=s.return}for(;null!==l;){if(null===(s=Xe(l)))return;if(5===(c=s.tag)||6===c||26===c||27===c){r=i=s;continue e}l=l.parentNode}}r=r.return}Ft(function(){var r=i,a=Dt(n),s=[];e:{var l=kr.get(e);if(void 0!==l){var c=nn,u=e;switch(e){case"keypress":if(0===Gt(n))break e;case"keydown":case"keyup":c=vn;break;case"focusin":u="focus",c=cn;break;case"focusout":u="blur",c=cn;break;case"beforeblur":case"afterblur":c=cn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=sn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=ln;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=xn;break;case gr:case yr:case vr:c=un;break;case Sr:c=wn;break;case"scroll":case"scrollend":c=an;break;case"wheel":c=Sn;break;case"copy":case"cut":case"paste":c=dn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=bn;break;case"toggle":case"beforetoggle":c=kn}var d=!!(4&t),f=!d&&("scroll"===e||"scrollend"===e),h=d?null!==l?l+"Capture":null:l;d=[];for(var p,m=r;null!==m;){var g=m;if(p=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===p||null===h||null!=(g=Bt(m,h))&&d.push(rd(m,g,p)),f)break;m=m.return}0<d.length&&(l=new c(l,u,null,n,a),s.push({event:l,listeners:d}))}}if(!(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(l="mouseover"===e||"pointerover"===e)||n===_t||!(u=n.relatedTarget||n.fromElement)||!Xe(u)&&!u[$e])&&(c||l)&&(l=a.window===a?a:(l=a.ownerDocument)?l.defaultView||l.parentWindow:window,c?(c=r,null!==(u=(u=n.relatedTarget||n.toElement)?Xe(u):null)&&(f=o(u),d=u.tag,u!==f||5!==d&&27!==d&&6!==d)&&(u=null)):(c=null,u=r),c!==u)){if(d=sn,g="onMouseLeave",h="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(d=bn,g="onPointerLeave",h="onPointerEnter",m="pointer"),f=null==c?l:Je(c),p=null==u?l:Je(u),(l=new d(g,m+"leave",c,n,a)).target=f,l.relatedTarget=p,g=null,Xe(a)===r&&((d=new d(h,m+"enter",u,n,a)).target=p,d.relatedTarget=f,g=d),f=g,c&&u)e:{for(d=od,m=u,p=0,g=h=c;g;g=d(g))p++;g=0;for(var y=m;y;y=d(y))g++;for(;0<p-g;)h=d(h),p--;for(;0<g-p;)m=d(m),g--;for(;p--;){if(h===m||null!==m&&h===m.alternate){d=h;break e}h=d(h),m=d(m)}d=null}else d=null;null!==c&&id(s,l,c,d,!1),null!==u&&null!==f&&id(s,f,u,d,!0)}if("select"===(c=(l=r?Je(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===c&&"file"===l.type)var v=Un;else if(Mn(l))if(Vn)v=Qn;else{v=Yn;var b=Gn}else!(c=l.nodeName)||"input"!==c.toLowerCase()||"checkbox"!==l.type&&"radio"!==l.type?r&&Tt(r.elementType)&&(v=Un):v=Xn;switch(v&&(v=v(e,r))?Ln(s,v,n,a):(b&&b(e,l,r),"focusout"===e&&r&&"number"===l.type&&null!=r.memoizedProps.value&&xt(l,"number",l.value)),b=r?Je(r):window,e){case"focusin":(Mn(b)||"true"===b.contentEditable)&&(ir=b,sr=r,lr=null);break;case"focusout":lr=sr=ir=null;break;case"mousedown":cr=!0;break;case"contextmenu":case"mouseup":case"dragend":cr=!1,ur(s,n,a);break;case"selectionchange":if(or)break;case"keydown":case"keyup":ur(s,n,a)}var x;if(Cn)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else _n?Pn(e,n)&&(w="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(w="onCompositionStart");w&&(Tn&&"ko"!==n.locale&&(_n||"onCompositionStart"!==w?"onCompositionEnd"===w&&_n&&(x=Kt()):(qt="value"in(Ht=a)?Ht.value:Ht.textContent,_n=!0)),0<(b=ad(r,w)).length&&(w=new fn(w,e,null,n,a),s.push({event:w,listeners:b}),x?w.data=x:null!==(x=An(n))&&(w.data=x))),(x=jn?function(e,t){switch(e){case"compositionend":return An(t);case"keypress":return 32!==t.which?null:(On=!0,Rn);case"textInput":return(e=t.data)===Rn&&On?null:e;default:return null}}(e,n):function(e,t){if(_n)return"compositionend"===e||!Cn&&Pn(e,t)?(e=Kt(),Wt=qt=Ht=null,_n=!1,e):null;switch(e){case"paste":default: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 Tn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(w=ad(r,"onBeforeInput")).length&&(b=new fn("onBeforeInput","beforeinput",null,n,a),s.push({event:b,listeners:w}),b.data=x)),function(e,t,n,r,a){if("submit"===t&&n&&n.stateNode===a){var o=Hu((a[Ve]||null).action),i=r.submitter;i&&null!==(t=(t=i[Ve]||null)?Hu(t.formAction):i.getAttribute("formAction"))&&(o=t,i=null);var s=new nn("action","action",null,r,a);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==Mu){var e=i?qu(a,i):new FormData(a);ts(n,{pending:!0,data:e,method:a.method,action:o},null,e)}}else"function"==typeof o&&(s.preventDefault(),e=i?qu(a,i):new FormData(a),ts(n,{pending:!0,data:e,method:a.method,action:o},o,e))},currentTarget:a}]})}}(s,e,r,n,a)}Xu(s,t)})}function rd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ad(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,o=a.stateNode;if(5!==(a=a.tag)&&26!==a&&27!==a||null===o||(null!=(a=Bt(e,n))&&r.unshift(rd(e,a,o)),null!=(a=Bt(e,t))&&r.push(rd(e,a,o))),3===e.tag)return r;e=e.return}return[]}function od(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function id(e,t,n,r,a){for(var o=t._reactName,i=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(s=s.tag,null!==l&&l===r)break;5!==s&&26!==s&&27!==s||null===c||(l=c,a?null!=(c=Bt(n,o))&&i.unshift(rd(n,c,l)):a||null!=(c=Bt(n,o))&&i.push(rd(n,c,l))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var sd=/\r\n?/g,ld=/\u0000|\uFFFD/g;function cd(e){return("string"==typeof e?e:""+e).replace(sd,"\n").replace(ld,"")}function ud(e,t){return t=cd(t),cd(e)===t}function dd(e,t,n,r,o,i){switch(n){case"children":"string"==typeof r?"body"===t||"textarea"===t&&""===r||Et(e,r):("number"==typeof r||"bigint"==typeof r)&&"body"!==t&&Et(e,""+r);break;case"className":ct(e,"class",r);break;case"tabIndex":ct(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ct(e,n,r);break;case"style":jt(e,r,i);break;case"data":if("object"!==t){ct(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==r||"function"==typeof r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Pt(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"==typeof r){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}if("function"==typeof i&&("formAction"===n?("input"!==t&&dd(e,t,"name",o.name,o,null),dd(e,t,"formEncType",o.formEncType,o,null),dd(e,t,"formMethod",o.formMethod,o,null),dd(e,t,"formTarget",o.formTarget,o,null)):(dd(e,t,"encType",o.encType,o,null),dd(e,t,"method",o.method,o,null),dd(e,t,"target",o.target,o,null))),null==r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(n);break}r=Pt(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=At);break;case"onScroll":null!=r&&Qu("scroll",e);break;case"onScrollEnd":null!=r&&Qu("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(a(61));if(null!=(n=r.__html)){if(null!=o.children)throw Error(a(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"muted":e.muted=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"==typeof r||"boolean"==typeof r||"symbol"==typeof r){e.removeAttribute("xlink:href");break}n=Pt(""+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":null!=r&&"function"!=typeof r&&"symbol"!=typeof r?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&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!=typeof r&&"symbol"!=typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"==typeof r||"symbol"==typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Qu("beforetoggle",e),Qu("toggle",e),lt(e,"popover",r);break;case"xlinkActuate":ut(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ut(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ut(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ut(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ut(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ut(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ut(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ut(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ut(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":lt(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&<(e,n=Rt.get(n)||n,r)}}function fd(e,t,n,r,o,i){switch(n){case"style":jt(e,r,i);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(a(61));if(null!=(n=r.__html)){if(null!=o.children)throw Error(a(60));e.innerHTML=n}}break;case"children":"string"==typeof r?Et(e,r):("number"==typeof r||"bigint"==typeof r)&&Et(e,""+r);break;case"onScroll":null!=r&&Qu("scroll",e);break;case"onScrollEnd":null!=r&&Qu("scrollend",e);break;case"onClick":null!=r&&(e.onclick=At);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:nt.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),"function"==typeof(i=null!=(i=e[Ve]||null)?i[n]:null)&&e.removeEventListener(t,i,o),"function"!=typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):lt(e,n,r):("function"!=typeof i&&null!==i&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,o)))}}function hd(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qu("error",e),Qu("load",e);var r,o=!1,i=!1;for(r in n)if(n.hasOwnProperty(r)){var s=n[r];if(null!=s)switch(r){case"src":o=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:dd(e,t,r,s,n,null)}}return i&&dd(e,t,"srcSet",n.srcSet,n,null),void(o&&dd(e,t,"src",n.src,n,null));case"input":Qu("invalid",e);var l=r=s=i=null,c=null,u=null;for(o in n)if(n.hasOwnProperty(o)){var d=n[o];if(null!=d)switch(o){case"name":i=d;break;case"type":s=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":r=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(a(137,t));break;default:dd(e,t,o,d,n,null)}}return void bt(e,r,l,c,u,s,i,!1);case"select":for(i in Qu("invalid",e),o=s=r=null,n)if(n.hasOwnProperty(i)&&null!=(l=n[i]))switch(i){case"value":r=l;break;case"defaultValue":s=l;break;case"multiple":o=l;default:dd(e,t,i,l,n,null)}return t=r,n=s,e.multiple=!!o,void(null!=t?wt(e,!!o,t,!1):null!=n&&wt(e,!!o,n,!0));case"textarea":for(s in Qu("invalid",e),r=i=o=null,n)if(n.hasOwnProperty(s)&&null!=(l=n[s]))switch(s){case"value":o=l;break;case"defaultValue":i=l;break;case"children":r=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(a(91));break;default:dd(e,t,s,l,n,null)}return void kt(e,o,i,r);case"option":for(c in n)if(n.hasOwnProperty(c)&&null!=(o=n[c]))if("selected"===c)e.selected=o&&"function"!=typeof o&&"symbol"!=typeof o;else dd(e,t,c,o,n,null);return;case"dialog":Qu("beforetoggle",e),Qu("toggle",e),Qu("cancel",e),Qu("close",e);break;case"iframe":case"object":Qu("load",e);break;case"video":case"audio":for(o=0;o<Gu.length;o++)Qu(Gu[o],e);break;case"image":Qu("error",e),Qu("load",e);break;case"details":Qu("toggle",e);break;case"embed":case"source":case"link":Qu("error",e),Qu("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)&&null!=(o=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:dd(e,t,u,o,n,null)}return;default:if(Tt(t)){for(d in n)n.hasOwnProperty(d)&&(void 0!==(o=n[d])&&fd(e,t,d,o,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(null!=(o=n[l])&&dd(e,t,l,o,n,null))}function pd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var md=null,gd=null;function yd(e){return 9===e.nodeType?e:e.ownerDocument}function vd(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 bd(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function xd(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"bigint"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var wd=null;var Sd="function"==typeof setTimeout?setTimeout:void 0,kd="function"==typeof clearTimeout?clearTimeout:void 0,Ed="function"==typeof Promise?Promise:void 0,Cd="function"==typeof queueMicrotask?queueMicrotask:void 0!==Ed?function(e){return Ed.resolve(null).then(e).catch(Nd)}:Sd;function Nd(e){setTimeout(function(){throw e})}function jd(e){return"head"===e}function Td(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&8===a.nodeType)if("/$"===(n=a.data)||"/&"===n){if(0===r)return e.removeChild(a),void Hf(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)Fd(e.ownerDocument.documentElement);else if("head"===n){Fd(n=e.ownerDocument.head);for(var o=n.firstChild;o;){var i=o.nextSibling,s=o.nodeName;o[Ge]||"SCRIPT"===s||"STYLE"===s||"LINK"===s&&"stylesheet"===o.rel.toLowerCase()||n.removeChild(o),o=i}}else"body"===n&&Fd(e.ownerDocument.body);n=a}while(n);Hf(t)}function Rd(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function Od(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Od(n),Ye(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Pd(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=Dd(e.nextSibling)))return null}return e}function Ad(e){return"$?"===e.data||"$~"===e.data}function _d(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function Dd(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Md=null;function Ld(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return Dd(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function Id(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function zd(e,t,n){switch(t=yd(n),e){case"html":if(!(e=t.documentElement))throw Error(a(452));return e;case"head":if(!(e=t.head))throw Error(a(453));return e;case"body":if(!(e=t.body))throw Error(a(454));return e;default:throw Error(a(451))}}function Fd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ye(e)}var Bd=new Map,Ud=new Set;function Vd(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var $d=M.d;M.d={f:function(){var e=$d.f(),t=Zc();return e||t},r:function(e){var t=Qe(e);null!==t&&5===t.tag&&"form"===t.type?rs(t):$d.r(e)},D:function(e){$d.D(e),qd("dns-prefetch",e,null)},C:function(e,t){$d.C(e,t),qd("preconnect",e,t)},L:function(e,t,n){$d.L(e,t,n);var r=Hd;if(r&&e&&t){var a='link[rel="preload"][as="'+yt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(a+='[imagesrcset="'+yt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(a+='[imagesizes="'+yt(n.imageSizes)+'"]')):a+='[href="'+yt(e)+'"]';var o=a;switch(t){case"style":o=Kd(e);break;case"script":o=Xd(e)}Bd.has(o)||(e=u({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),Bd.set(o,e),null!==r.querySelector(a)||"style"===t&&r.querySelector(Gd(o))||"script"===t&&r.querySelector(Qd(o))||(hd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}},m:function(e,t){$d.m(e,t);var n=Hd;if(n&&e){var r=t&&"string"==typeof t.as?t.as:"script",a='link[rel="modulepreload"][as="'+yt(r)+'"][href="'+yt(e)+'"]',o=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Xd(e)}if(!Bd.has(o)&&(e=u({rel:"modulepreload",href:e},t),Bd.set(o,e),null===n.querySelector(a))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Qd(o)))return}hd(r=n.createElement("link"),"link",e),et(r),n.head.appendChild(r)}}},X:function(e,t){$d.X(e,t);var n=Hd;if(n&&e){var r=Ze(n).hoistableScripts,a=Xd(e),o=r.get(a);o||((o=n.querySelector(Qd(a)))||(e=u({src:e,async:!0},t),(t=Bd.get(a))&&tf(e,t),et(o=n.createElement("script")),hd(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(a,o))}},S:function(e,t,n){$d.S(e,t,n);var r=Hd;if(r&&e){var a=Ze(r).hoistableStyles,o=Kd(e);t=t||"default";var i=a.get(o);if(!i){var s={loading:0,preload:null};if(i=r.querySelector(Gd(o)))s.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Bd.get(o))&&ef(e,n);var l=i=r.createElement("link");et(l),hd(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){s.loading|=1}),l.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Zd(i,t,r)}i={type:"stylesheet",instance:i,count:1,state:s},a.set(o,i)}}},M:function(e,t){$d.M(e,t);var n=Hd;if(n&&e){var r=Ze(n).hoistableScripts,a=Xd(e),o=r.get(a);o||((o=n.querySelector(Qd(a)))||(e=u({src:e,async:!0,type:"module"},t),(t=Bd.get(a))&&tf(e,t),et(o=n.createElement("script")),hd(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(a,o))}}};var Hd="undefined"==typeof document?null:document;function qd(e,t,n){var r=Hd;if(r&&"string"==typeof t&&t){var a=yt(t);a='link[rel="'+e+'"][href="'+a+'"]',"string"==typeof n&&(a+='[crossorigin="'+n+'"]'),Ud.has(a)||(Ud.add(a),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(a)&&(hd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}}function Wd(e,t,n,r){var o=(o=W.current)?Vd(o):null;if(!o)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=Kd(n.href),(r=(n=Ze(o).hoistableStyles).get(t))||(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("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=Kd(n.href);var i=Ze(o).hoistableStyles,s=i.get(e);if(s||(o=o.ownerDocument||o,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=o.querySelector(Gd(e)))&&!i._p&&(s.instance=i,s.state.loading=5),Bd.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},Bd.set(e,n),i||function(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}),hd(t,"link",n),et(t),e.head.appendChild(t))}(o,e,n,s.state))),t&&null===r)throw Error(a(528,""));return s}if(t&&null!==r)throw Error(a(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=Xd(n),(r=(n=Ze(o).hoistableScripts).get(t))||(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(a(444,e))}}function Kd(e){return'href="'+yt(e)+'"'}function Gd(e){return'link[rel="stylesheet"]['+e+"]"}function Yd(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function Xd(e){return'[src="'+yt(e)+'"]'}function Qd(e){return"script[async]"+e}function Jd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+yt(n.href)+'"]');if(r)return t.instance=r,et(r),r;var o=u({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return et(r=(e.ownerDocument||e).createElement("style")),hd(r,"style",o),Zd(r,n.precedence,e),t.instance=r;case"stylesheet":o=Kd(n.href);var i=e.querySelector(Gd(o));if(i)return t.state.loading|=4,t.instance=i,et(i),i;r=Yd(n),(o=Bd.get(o))&&ef(r,o),et(i=(e.ownerDocument||e).createElement("link"));var s=i;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),hd(i,"link",r),t.state.loading|=4,Zd(i,n.precedence,e),t.instance=i;case"script":return i=Xd(n.src),(o=e.querySelector(Qd(i)))?(t.instance=o,et(o),o):(r=n,(o=Bd.get(i))&&tf(r=u({},n),o),et(o=(e=e.ownerDocument||e).createElement("script")),hd(o,"link",r),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(a(443,t.type))}else"stylesheet"===t.type&&!(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,Zd(r,n.precedence,e));return t.instance}function Zd(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,o=a,i=0;i<r.length;i++){var s=r[i];if(s.dataset.precedence===t)o=s;else if(o!==a)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function ef(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function tf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var nf=null;function rf(e,t,n){if(null===nf){var r=new Map,a=nf=new Map;a.set(n,r)}else(r=(a=nf).get(n))||(r=new Map,a.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var o=n[a];if(!(o[Ge]||o[Ue]||"link"===e&&"stylesheet"===o.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==o.namespaceURI){var i=o.getAttribute(t)||"";i=e+i;var s=r.get(i);s?s.push(o):r.set(i,[o])}}return r}function af(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function of(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var sf=0;function lf(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)uf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var cf=null;function uf(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,cf=new Map,t.forEach(df,e),cf=null,lf.call(e))}function df(e,t){if(!(4&t.state.loading)){var n=cf.get(e);if(n)var r=n.get(null);else{n=new Map,cf.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<a.length;o++){var i=a[o];"LINK"!==i.nodeName&&"not all"===i.getAttribute("media")||(n.set(i.dataset.precedence,i),r=i)}r&&n.set(null,r)}i=(a=t.instance).getAttribute("data-precedence"),(o=n.get(i)||r)===r&&n.set(null,a),n.set(i,a),this.count++,r=lf.bind(this),a.addEventListener("load",r),a.addEventListener("error",r),o?o.parentNode.insertBefore(a,o.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(a,e.firstChild),t.state.loading|=4}}var ff={$$typeof:w,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function hf(e,t,n,r,a,o,i,s,l){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=Pe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pe(0),this.hiddenUpdates=Pe(null),this.identifierPrefix=r,this.onUncaughtError=a,this.onCaughtError=o,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function pf(e,t,n,r,a,o){a=function(e){return e?e=Lr:Lr}(a),null===r.context?r.context=a:r.pendingContext=a,(r=bo(t)).payload={element:n},null!==(o=void 0===o?null:o)&&(r.callback=o),null!==(n=xo(e,r,t))&&(Gc(n,0,t),wo(n,e,t))}function mf(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function gf(e,t){mf(e,t),(e=e.alternate)&&mf(e,t)}function yf(e){if(13===e.tag||31===e.tag){var t=_r(e,67108864);null!==t&&Gc(t,0,67108864),gf(e,67108864)}}function vf(e){if(13===e.tag||31===e.tag){var t=Wc(),n=_r(e,t=Le(t));null!==n&&Gc(n,0,t),gf(e,t)}}var bf=!0;function xf(e,t,n,r){var a=D.T;D.T=null;var o=M.p;try{M.p=2,Sf(e,t,n,r)}finally{M.p=o,D.T=a}}function wf(e,t,n,r){var a=D.T;D.T=null;var o=M.p;try{M.p=8,Sf(e,t,n,r)}finally{M.p=o,D.T=a}}function Sf(e,t,n,r){if(bf){var a=kf(r);if(null===a)nd(e,t,r,Ef,n),Mf(e,r);else if(function(e,t,n,r,a){switch(t){case"focusin":return Tf=Lf(Tf,e,t,n,r,a),!0;case"dragenter":return Rf=Lf(Rf,e,t,n,r,a),!0;case"mouseover":return Of=Lf(Of,e,t,n,r,a),!0;case"pointerover":var o=a.pointerId;return Pf.set(o,Lf(Pf.get(o)||null,e,t,n,r,a)),!0;case"gotpointercapture":return o=a.pointerId,Af.set(o,Lf(Af.get(o)||null,e,t,n,r,a)),!0}return!1}(a,e,t,n,r))r.stopPropagation();else if(Mf(e,r),4&t&&-1<Df.indexOf(e)){for(;null!==a;){var o=Qe(a);if(null!==o)switch(o.tag){case 3:if((o=o.stateNode).current.memoizedState.isDehydrated){var i=Ne(o.pendingLanes);if(0!==i){var s=o;for(s.pendingLanes|=2,s.entangledLanes|=2;i;){var l=1<<31-xe(i);s.entanglements[1]|=l,i&=~l}Lu(o),!(6&hc)&&(Dc=le()+500,Iu(0,!1))}}break;case 31:case 13:null!==(s=_r(o,2))&&Gc(s,0,2),Zc(),gf(o,2)}if(null===(o=kf(r))&&nd(e,t,r,Ef,n),o===a)break;a=o}null!==a&&r.stopPropagation()}else nd(e,t,r,null,n)}}function kf(e){return Cf(e=Dt(e))}var Ef=null;function Cf(e){if(Ef=null,null!==(e=Xe(e))){var t=o(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=i(t)))return e;e=null}else if(31===n){if(null!==(e=s(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ef=e,null}function Nf(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 ue:return 2;case de:return 8;case fe:case he:return 32;case pe:return 268435456;default:return 32}default:return 32}}var jf=!1,Tf=null,Rf=null,Of=null,Pf=new Map,Af=new Map,_f=[],Df="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 Mf(e,t){switch(e){case"focusin":case"focusout":Tf=null;break;case"dragenter":case"dragleave":Rf=null;break;case"mouseover":case"mouseout":Of=null;break;case"pointerover":case"pointerout":Pf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Af.delete(t.pointerId)}}function Lf(e,t,n,r,a,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[a]},null!==t&&(null!==(t=Qe(t))&&yf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.push(a),e)}function If(e){var t=Xe(e.target);if(null!==t){var n=o(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=i(n)))return e.blockedOn=t,void Fe(e.priority,function(){vf(n)})}else if(31===t){if(null!==(t=s(n)))return e.blockedOn=t,void Fe(e.priority,function(){vf(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function zf(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=kf(e.nativeEvent);if(null!==n)return null!==(t=Qe(n))&&yf(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);_t=r,n.target.dispatchEvent(r),_t=null,t.shift()}return!0}function Ff(e,t,n){zf(e)&&n.delete(t)}function Bf(){jf=!1,null!==Tf&&zf(Tf)&&(Tf=null),null!==Rf&&zf(Rf)&&(Rf=null),null!==Of&&zf(Of)&&(Of=null),Pf.forEach(Ff),Af.forEach(Ff)}function Uf(e,n){e.blockedOn===n&&(e.blockedOn=null,jf||(jf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bf)))}var Vf=null;function $f(e){Vf!==e&&(Vf=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Vf===e&&(Vf=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],a=e[t+2];if("function"!=typeof r){if(null===Cf(r||n))continue;break}var o=Qe(n);null!==o&&(e.splice(t,3),t-=3,ts(o,{pending:!0,data:a,method:n.method,action:r},r,a))}}))}function Hf(e){function t(t){return Uf(t,e)}null!==Tf&&Uf(Tf,e),null!==Rf&&Uf(Rf,e),null!==Of&&Uf(Of,e),Pf.forEach(t),Af.forEach(t);for(var n=0;n<_f.length;n++){var r=_f[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<_f.length&&null===(n=_f[0]).blockedOn;)If(n),null===n.blockedOn&&_f.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var a=n[r],o=n[r+1],i=a[Ve]||null;if("function"==typeof o)i||$f(n);else if(i){var s=null;if(o&&o.hasAttribute("formAction")){if(a=o,i=o[Ve]||null)s=i.formAction;else if(null!==Cf(a))continue}else s=i.action;"function"==typeof s?n[r+1]=s:(n.splice(r,3),r-=3),$f(n)}}}function qf(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return a=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==a&&(a(),a=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"==typeof navigation){var r=!1,a=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),null!==a&&(a(),a=null)}}}function Wf(e){this._internalRoot=e}function Kf(e){this._internalRoot=e}Kf.prototype.render=Wf.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));pf(t.current,Wc(),e,t,null,null)},Kf.prototype.unmount=Wf.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;pf(e.current,2,null,e,null,null),Zc(),t[$e]=null}},Kf.prototype.unstable_scheduleHydration=function(e){if(e){var t=ze();e={blockedOn:null,target:e,priority:t};for(var n=0;n<_f.length&&0!==t&&t<_f[n].priority;n++);_f.splice(n,0,e),0===n&&If(e)}};var Gf=n.version;if("19.2.7"!==Gf)throw Error(a(527,Gf,"19.2.7"));M.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=o(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var s=i.alternate;if(null===s){if(null!==(r=i.return)){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return l(i),e;if(s===r)return l(i),t;s=s.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=s;else{for(var c=!1,u=i.child;u;){if(u===n){c=!0,n=i,r=s;break}if(u===r){c=!0,r=i,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=i;break}if(u===r){c=!0,r=s,n=i;break}u=u.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?c(e):null)?null:e.stateNode};var Yf={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.7"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Xf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xf.isDisabled&&Xf.supportsFiber)try{ye=Xf.inject(Yf),ve=Xf}catch(nu){}}e.createRoot=function(e,t){if(!(n=e)||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(a(299));var n,r=!1,o="",i=Es,s=Cs,l=Ns;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(o=t.identifierPrefix),void 0!==t.onUncaughtError&&(i=t.onUncaughtError),void 0!==t.onCaughtError&&(s=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError)),t=function(e,t,n,r,a,o,i,s,l,c,u,d){return e=new hf(e,t,n,i,l,c,u,d,s),t=1,!0===o&&(t|=24),o=zr(3,null,null,t),e.current=o,o.stateNode=e,(t=Fa()).refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:r,isDehydrated:n,cache:t},yo(o),e}(e,1,!1,null,0,r,o,null,i,s,l,qf),e[$e]=t.current,ed(e),new Wf(t)}}),y=i((e,t)=>{!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(nu){}}(),t.exports=g()}),v=i(e=>{var t=d().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){return t.H.useMemoCache(e)}}),b=i((e,t)=>{t.exports=v()}),x=c(m()),w=c(y(),1),S=b(),k=c(d());var E="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function C(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function N(e){return"nodeType"in e}function j(e){var t,n;return e?C(e)?e:N(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function T(e){const{Document:t}=j(e);return e instanceof t}function R(e){return!C(e)&&e instanceof j(e).HTMLElement}function O(e){return e instanceof j(e).SVGElement}function P(e){return e?C(e)?e.document:N(e)?T(e)?e:R(e)||O(e)?e.ownerDocument:document:document:document}var A=E?k.useLayoutEffect:k.useEffect;function _(e){const t=(0,k.useRef)(e);return A(()=>{t.current=e}),(0,k.useCallback)(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function D(e,t){void 0===t&&(t=[e]);const n=(0,k.useRef)(e);return A(()=>{n.current!==e&&(n.current=e)},t),n}function M(e,t){const n=(0,k.useRef)();return(0,k.useMemo)(()=>{const t=e(n.current);return n.current=t,t},[...t])}function L(e){const t=_(e),n=(0,k.useRef)(null);return[n,(0,k.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function I(e){const t=(0,k.useRef)();return(0,k.useEffect)(()=>{t.current=e},[e]),t.current}var z={};function F(e,t){return(0,k.useMemo)(()=>{if(t)return t;const n=null==z[e]?0:z[e]+1;return z[e]=n,e+"-"+n},[e,t])}function B(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[a,o]of r){const n=t[a];null!=n&&(t[a]=n+e*o)}return t},{...t})}}var U=B(1),V=B(-1);function $(e){if(!e)return!1;const{KeyboardEvent:t}=j(e.target);return t&&e instanceof t}function H(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=j(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}var q=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[q.Translate.toString(e),q.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),W="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function K(e){return e.matches(W)?e:e.querySelector(W)}var G={display:"none"};function Y(e){let{id:t,value:n}=e;return k.createElement("div",{id:t,style:G},n)}function X(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return k.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},n)}var Q=(0,k.createContext)(null);var J,Z={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},ee={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function te(e){let{announcements:t=ee,container:n,hiddenTextDescribedById:r,screenReaderInstructions:a=Z}=e;const{announce:o,announcement:i}=function(){const[e,t]=(0,k.useState)("");return{announce:(0,k.useCallback)(e=>{null!=e&&t(e)},[]),announcement:e}}(),s=F("DndLiveRegion"),[l,c]=(0,k.useState)(!1);if((0,k.useEffect)(()=>{c(!0)},[]),function(e){const t=(0,k.useContext)(Q);(0,k.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}((0,k.useMemo)(()=>({onDragStart(e){let{active:n}=e;o(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&o(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;o(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;o(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;o(t.onDragCancel({active:n,over:r}))}}),[o,t])),!l)return null;const u=k.createElement(k.Fragment,null,k.createElement(Y,{id:r,value:a.draggable}),k.createElement(X,{id:s,announcement:i}));return n?(0,x.createPortal)(u,n):u}function ne(){}function re(e,t){return(0,k.useMemo)(()=>({sensor:e,options:null!=t?t:{}}),[e,t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(J||(J={}));var ae=Object.freeze({x:0,y:0});function oe(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ie(e,t){const n=H(e);if(!n)return"0 0";return(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%"}function se(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function le(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function ce(e){let{left:t,top:n,height:r,width:a}=e;return[{x:t,y:n},{x:t+a,y:n},{x:t,y:n+r},{x:t+a,y:n+r}]}function ue(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function de(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}var fe=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const a=de(t,t.left,t.top),o=[];for(const i of r){const{id:e}=i,t=n.get(e);if(t){const n=oe(de(t),a);o.push({id:e,data:{droppableContainer:i,value:n}})}}return o.sort(se)};function he(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),i=a-r,s=o-n;if(r<a&&n<o){const n=t.width*t.height,r=e.width*e.height,a=i*s;return Number((a/(n+r-a)).toFixed(4))}return 0}var pe=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const a=[];for(const o of r){const{id:e}=o,r=n.get(e);if(r){const n=he(r,t);n>0&&a.push({id:e,data:{droppableContainer:o,value:n}})}}return a.sort(le)};function me(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ae}function ge(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return r.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var ye=ge(1);function ve(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}var be,xe={ignoreTransform:!1};function we(e,t){void 0===t&&(t=xe);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=j(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=ve(t);if(!r)return e;const{scaleX:a,scaleY:o,x:i,y:s}=r,l=e.left-i-(1-a)*parseFloat(n),c=e.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=a?e.width/a:e.width,d=o?e.height/o:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}(n,t,r))}const{top:r,left:a,width:o,height:i,bottom:s,right:l}=n;return{top:r,left:a,width:o,height:i,bottom:s,right:l}}function Se(e){return we(e,{ignoreTransform:!0})}function ke(e,t){const n=[];return e?function r(a){if(null!=t&&n.length>=t)return n;if(!a)return n;if(T(a)&&null!=a.scrollingElement&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!R(a)||O(a))return n;if(n.includes(a))return n;const o=j(e).getComputedStyle(a);return a!==e&&function(e,t){void 0===t&&(t=j(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(a,o)&&n.push(a),function(e,t){return void 0===t&&(t=j(e).getComputedStyle(e)),"fixed"===t.position}(a,o)?n:r(a.parentNode)}(e):n}function Ee(e){const[t]=ke(e,1);return null!=t?t:null}function Ce(e){return E&&e?C(e)?e:N(e)?T(e)||e===P(e).scrollingElement?window:R(e)?e:null:null:null}function Ne(e){return C(e)?e.scrollX:e.scrollLeft}function je(e){return C(e)?e.scrollY:e.scrollTop}function Te(e){return{x:Ne(e),y:je(e)}}function Re(e){return!(!E||!e)&&e===document.scrollingElement}function Oe(e){const t={x:0,y:0},n=Re(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(be||(be={}));var Pe={x:.2,y:.2};function Ae(e,t,n,r,a){let{top:o,left:i,right:s,bottom:l}=n;void 0===r&&(r=10),void 0===a&&(a=Pe);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=Oe(e),h={x:0,y:0},p={x:0,y:0},m=t.height*a.y,g=t.width*a.x;return!c&&o<=t.top+m?(h.y=be.Backward,p.y=r*Math.abs((t.top+m-o)/m)):!u&&l>=t.bottom-m&&(h.y=be.Forward,p.y=r*Math.abs((t.bottom-m-l)/m)),!f&&s>=t.right-g?(h.x=be.Forward,p.x=r*Math.abs((t.right-g-s)/g)):!d&&i<=t.left+g&&(h.x=be.Backward,p.x=r*Math.abs((t.left+g-i)/g)),{direction:h,speed:p}}function _e(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:a}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:a,width:e.clientWidth,height:e.clientHeight}}function De(e){return e.reduce((e,t)=>U(e,Te(t)),ae)}function Me(e,t){if(void 0===t&&(t=we),!e)return;const{top:n,left:r,bottom:a,right:o}=t(e);Ee(e)&&(a<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}var Le,Ie,ze=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+Ne(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+je(t),0)}]],Fe=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=ke(t),r=De(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[a,o,i]of ze)for(const e of o)Object.defineProperty(this,e,{get:()=>{const t=i(n),o=r[a]-t;return this.rect[e]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},Be=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function Ue(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}function Ve(e){e.preventDefault()}function $e(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Le||(Le={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(Ie||(Ie={}));var He={start:[Ie.Space,Ie.Enter],cancel:[Ie.Esc],end:[Ie.Space,Ie.Enter,Ie.Tab]},qe=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ie.Right:return{...n,x:n.x+25};case Ie.Left:return{...n,x:n.x-25};case Ie.Down:return{...n,y:n.y+25};case Ie.Up:return{...n,y:n.y-25}}},We=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Be(P(t)),this.windowListeners=new Be(j(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Le.Resize,this.handleCancel),this.windowListeners.add(Le.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Le.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Me(n),t(ae)}handleKeyDown(e){if($(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:a=He,coordinateGetter:o=qe,scrollBehavior:i="smooth"}=r,{code:s}=e;if(a.end.includes(s))return void this.handleEnd(e);if(a.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:l}=n.current,c=l?{x:l.left,y:l.top}:ae;this.referenceCoordinates||(this.referenceCoordinates=c);const u=o(e,{active:t,context:n.current,currentCoordinates:c});if(u){const t=V(u,c),r={x:0,y:0},{scrollableAncestors:a}=n.current;for(const n of a){const a=e.code,{isTop:o,isRight:s,isLeft:l,isBottom:c,maxScroll:d,minScroll:f}=Oe(n),h=_e(n),p={x:Math.min(a===Ie.Right?h.right-h.width/2:h.right,Math.max(a===Ie.Right?h.left:h.left+h.width/2,u.x)),y:Math.min(a===Ie.Down?h.bottom-h.height/2:h.bottom,Math.max(a===Ie.Down?h.top:h.top+h.height/2,u.y))},m=a===Ie.Right&&!s||a===Ie.Left&&!l,g=a===Ie.Down&&!c||a===Ie.Up&&!o;if(m&&p.x!==u.x){const e=n.scrollLeft+t.x,o=a===Ie.Right&&e<=d.x||a===Ie.Left&&e>=f.x;if(o&&!t.y)return void n.scrollTo({left:e,behavior:i});r.x=o?n.scrollLeft-e:a===Ie.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:i});break}if(g&&p.y!==u.y){const e=n.scrollTop+t.y,o=a===Ie.Down&&e<=d.y||a===Ie.Up&&e>=f.y;if(o&&!t.x)return void n.scrollTo({top:e,behavior:i});r.y=o?n.scrollTop-e:a===Ie.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:i});break}}this.handleMove(e,U(V(u,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};function Ke(e){return Boolean(e&&"distance"in e)}function Ge(e){return Boolean(e&&"delay"in e)}We.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=He,onActivation:a}=t,{active:o}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const t=o.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];var Ye=class{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=j(e);return e instanceof t?e:P(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:a}=e,{target:o}=a;this.props=e,this.events=t,this.document=P(o),this.documentListeners=new Be(this.document),this.listeners=new Be(n),this.windowListeners=new Be(j(o)),this.initialCoordinates=null!=(r=H(a))?r:ae,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Le.Resize,this.handleCancel),this.windowListeners.add(Le.DragStart,Ve),this.windowListeners.add(Le.VisibilityChange,this.handleCancel),this.windowListeners.add(Le.ContextMenu,Ve),this.documentListeners.add(Le.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ge(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(Ke(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Le.Click,$e,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Le.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:a}=this,{onMove:o,options:{activationConstraint:i}}=a;if(!r)return;const s=null!=(t=H(e))?t:ae,l=V(r,s);if(!n&&i){if(Ke(i)){if(null!=i.tolerance&&Ue(l,i.tolerance))return this.handleCancel();if(Ue(l,i.distance))return this.handleStart()}return Ge(i)&&Ue(l,i.tolerance)?this.handleCancel():void this.handlePending(i,l)}e.cancelable&&e.preventDefault(),o(s)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Ie.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}},Xe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}},Qe=class extends Ye{constructor(e){const{event:t}=e,n=P(t.target);super(e,Xe,n)}};Qe.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(r?.({event:n}),!0)}}];var Je,Ze={move:{name:"mousemove"},end:{name:"mouseup"}};!function(e){e[e.RightClick=2]="RightClick"}(Je||(Je={}));(class extends Ye{constructor(e){super(e,Ze,P(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Je.RightClick&&(r?.({event:n}),!0)}}];var et,tt,nt={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};function rt(e){let{acceleration:t,activator:n=et.Pointer,canScroll:r,draggingRect:a,enabled:o,interval:i=5,order:s=tt.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:f}=e;const h=function(e){let{delta:t,disabled:n}=e;const r=I(t);return M(e=>{if(n||!r||!e)return it;const a={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[be.Backward]:e.x[be.Backward]||-1===a.x,[be.Forward]:e.x[be.Forward]||1===a.x},y:{[be.Backward]:e.y[be.Backward]||-1===a.y,[be.Forward]:e.y[be.Forward]||1===a.y}}},[n,t,r])}({delta:d,disabled:!o}),[p,m]=function(){const e=(0,k.useRef)(null);return[(0,k.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,k.useCallback)(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),g=(0,k.useRef)({x:0,y:0}),y=(0,k.useRef)({x:0,y:0}),v=(0,k.useMemo)(()=>{switch(n){case et.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case et.DraggableRect:return a}},[n,a,l]),b=(0,k.useRef)(null),x=(0,k.useCallback)(()=>{const e=b.current;if(!e)return;const t=g.current.x*y.current.x,n=g.current.y*y.current.y;e.scrollBy(t,n)},[]),w=(0,k.useMemo)(()=>s===tt.TreeOrder?[...c].reverse():c,[s,c]);(0,k.useEffect)(()=>{if(o&&c.length&&v){for(const e of w){if(!1===(null==r?void 0:r(e)))continue;const n=u[c.indexOf(e)];if(!n)continue;const{direction:a,speed:o}=Ae(e,n,v,t,f);for(const e of["x","y"])h[e][a[e]]||(o[e]=0,a[e]=0);if(o.x>0||o.y>0)return m(),b.current=e,p(x,i),g.current=o,void(y.current=a)}g.current={x:0,y:0},y.current={x:0,y:0},m()}else m()},[t,x,r,m,o,i,JSON.stringify(v),JSON.stringify(h),p,c,w,u,JSON.stringify(f)])}(class extends Ye{constructor(e){super(e,nt)}static setup(){return window.addEventListener(nt.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(nt.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:a}=n;return!(a.length>1)&&(r?.({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(et||(et={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(tt||(tt={}));var at,ot,it={x:{[be.Backward]:!1,[be.Forward]:!1},y:{[be.Backward]:!1,[be.Forward]:!1}};!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(at||(at={})),function(e){e.Optimized="optimized"}(ot||(ot={}));var st=new Map;function lt(e,t){return M(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function ct(e){let{callback:t,disabled:n}=e;const r=_(t),a=(0,k.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)},[n]);return(0,k.useEffect)(()=>()=>null==a?void 0:a.disconnect(),[a]),a}function ut(e){return new Fe(we(e),e)}function dt(e,t,n){void 0===t&&(t=ut);const[r,a]=(0,k.useState)(null);function o(){a(r=>{if(!e)return null;var a;if(!1===e.isConnected)return null!=(a=null!=r?r:n)?a:null;const o=t(e);return JSON.stringify(r)===JSON.stringify(o)?r:o})}const i=function(e){let{callback:t,disabled:n}=e;const r=_(t),a=(0,k.useMemo)(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,k.useEffect)(()=>()=>null==a?void 0:a.disconnect(),[a]),a}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),s=ct({callback:o});return A(()=>{o(),e?(s?.observe(e),i?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),i?.disconnect())},[e]),r}var ft=[];function ht(e,t){void 0===t&&(t=[]);const n=(0,k.useRef)(null);return(0,k.useEffect)(()=>{n.current=null},t),(0,k.useEffect)(()=>{const t=e!==ae;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?V(e,n.current):ae}function pt(e){return(0,k.useMemo)(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}var mt=[];function gt(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return R(t)?t:e}var yt=[{sensor:Qe,options:{}},{sensor:We,options:{}}],vt={current:{}},bt={draggable:{measure:Se},droppable:{measure:Se,strategy:at.WhileDragging,frequency:ot.Optimized},dragOverlay:{measure:we}},xt=class extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}},wt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new xt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ne},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:bt,measureDroppableContainers:ne,windowRect:null,measuringScheduled:!1},St={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ne,draggableNodes:new Map,over:null,measureDroppableContainers:ne},kt=(0,k.createContext)(St),Et=(0,k.createContext)(wt);function Ct(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new xt}}}function Nt(e,t){switch(t.type){case J.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case J.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case J.DragEnd:case J.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case J.RegisterDroppable:{const{element:n}=t,{id:r}=n,a=new xt(e.droppable.containers);return a.set(r,n),{...e,droppable:{...e.droppable,containers:a}}}case J.SetDroppableDisabled:{const{id:n,key:r,disabled:a}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new xt(e.droppable.containers);return i.set(n,{...o,disabled:a}),{...e,droppable:{...e.droppable,containers:i}}}case J.UnregisterDroppable:{const{id:n,key:r}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const o=new xt(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function jt(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:a}=(0,k.useContext)(kt),o=I(r),i=I(null==n?void 0:n.id);return(0,k.useEffect)(()=>{if(!t&&!r&&o&&null!=i){if(!$(o))return;if(document.activeElement===o.target)return;const e=a.get(i);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=K(e);if(t){t.focus();break}}})}},[r,t,a,i,o]),null}function Tt(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}var Rt,Ot=(0,k.createContext)({...ae,scaleX:1,scaleY:1});!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Rt||(Rt={}));var Pt=(0,k.memo)(function(e){var t,n,r,a;let{id:o,accessibility:i,autoScroll:s=!0,children:l,sensors:c=yt,collisionDetection:u=pe,measuring:d,modifiers:f,...h}=e;const[p,m]=(0,k.useReducer)(Nt,void 0,Ct),[g,y]=function(){const[e]=(0,k.useState)(()=>new Set),t=(0,k.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,k.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)})},[e]),t]}(),[v,b]=(0,k.useState)(Rt.Uninitialized),w=v===Rt.Initialized,{draggable:{active:S,nodes:C,translate:N},droppable:{containers:T}}=p,O=null!=S?C.get(S):null,P=(0,k.useRef)({initial:null,translated:null}),_=(0,k.useMemo)(()=>{var e;return null!=S?{id:S,data:null!=(e=null==O?void 0:O.data)?e:vt,rect:P}:null},[S,O]),I=(0,k.useRef)(null),[z,B]=(0,k.useState)(null),[V,$]=(0,k.useState)(null),q=D(h,Object.values(h)),W=F("DndDescribedBy",o),K=(0,k.useMemo)(()=>T.getEnabled(),[T]),G=(Y=d,(0,k.useMemo)(()=>({draggable:{...bt.draggable,...null==Y?void 0:Y.draggable},droppable:{...bt.droppable,...null==Y?void 0:Y.droppable},dragOverlay:{...bt.dragOverlay,...null==Y?void 0:Y.dragOverlay}}),[null==Y?void 0:Y.draggable,null==Y?void 0:Y.droppable,null==Y?void 0:Y.dragOverlay]));var Y;const{droppableRects:X,measureDroppableContainers:Z,measuringScheduled:ee}=function(e,t){let{dragging:n,dependencies:r,config:a}=t;const[o,i]=(0,k.useState)(null),{frequency:s,measure:l,strategy:c}=a,u=(0,k.useRef)(e),d=function(){switch(c){case at.Always:return!1;case at.BeforeDragging:return n;default:return!n}}(),f=D(d),h=(0,k.useCallback)(function(e){void 0===e&&(e=[]),f.current||i(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),p=(0,k.useRef)(null),m=M(t=>{if(d&&!n)return st;if(!t||t===st||u.current!==e||null!=o){const t=new Map;for(let n of e){if(!n)continue;if(o&&o.length>0&&!o.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,r=e?new Fe(l(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,o,n,d,l]);return(0,k.useEffect)(()=>{u.current=e},[e]),(0,k.useEffect)(()=>{d||h()},[n,d]),(0,k.useEffect)(()=>{o&&o.length>0&&i(null)},[JSON.stringify(o)]),(0,k.useEffect)(()=>{d||"number"!=typeof s||null!==p.current||(p.current=setTimeout(()=>{h(),p.current=null},s))},[s,d,h,...r]),{droppableRects:m,measureDroppableContainers:h,measuringScheduled:null!=o}}(K,{dragging:w,dependencies:[N.x,N.y],config:G.droppable}),ne=function(e,t){const n=null!=t?e.get(t):void 0,r=n?n.node.current:null;return M(e=>{var n;return null==t?null:null!=(n=null!=r?r:e)?n:null},[r,t])}(C,S),re=(0,k.useMemo)(()=>V?H(V):null,[V]),oe=function(){const e=!1===(null==z?void 0:z.autoScrollEnabled),t="object"==typeof s?!1===s.enabled:!1===s,n=w&&!e&&!t;return"object"==typeof s?{...s,enabled:n}:{enabled:n}}(),ie=function(e,t){return lt(e,t)}(ne,G.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:a=!0}=e;const o=(0,k.useRef)(!1),{x:i,y:s}="boolean"==typeof a?{x:a,y:a}:a;A(()=>{if(!i&&!s||!t)return void(o.current=!1);if(o.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const a=me(n(e),r);if(i||(a.x=0),s||(a.y=0),o.current=!0,Math.abs(a.x)>0||Math.abs(a.y)>0){const t=Ee(e);t&&t.scrollBy({top:a.y,left:a.x})}},[t,i,s,r,n])}({activeNode:null!=S?C.get(S):null,config:oe.layoutShiftCompensation,initialRect:ie,measure:G.draggable.measure});const se=dt(ne,G.draggable.measure,ie),le=dt(ne?ne.parentElement:null),ce=(0,k.useRef)({activatorEvent:null,active:null,activeNode:ne,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),de=T.getNodeFor(null==(t=ce.current.over)?void 0:t.id),fe=function(e){let{measure:t}=e;const[n,r]=(0,k.useState)(null),a=ct({callback:(0,k.useCallback)(e=>{for(const{target:n}of e)if(R(n)){r(e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[o,i]=L((0,k.useCallback)(e=>{const n=gt(e);a?.disconnect(),n&&a?.observe(n),r(n?t(n):null)},[t,a]));return(0,k.useMemo)(()=>({nodeRef:o,rect:n,setRef:i}),[n,o,i])}({measure:G.dragOverlay.measure}),he=null!=(n=fe.nodeRef.current)?n:ne,ge=w?null!=(r=fe.rect)?r:se:null,ve=Boolean(fe.nodeRef.current&&fe.rect),be=me(xe=ve?null:se,lt(xe));var xe;const Se=pt(he?j(he):null),Ne=function(e){const t=(0,k.useRef)(e),n=M(n=>e?n&&n!==ft&&e&&t.current&&e.parentNode===t.current.parentNode?n:ke(e):ft,[e]);return(0,k.useEffect)(()=>{t.current=e},[e]),n}(w?null!=de?de:ne:null),je=function(e,t){void 0===t&&(t=we);const[n]=e,r=pt(n?j(n):null),[a,o]=(0,k.useState)(mt);function i(){o(()=>e.length?e.map(e=>Re(e)?r:new Fe(t(e),e)):mt)}const s=ct({callback:i});return A(()=>{s?.disconnect(),i(),e.forEach(e=>null==s?void 0:s.observe(e))},[e]),a}(Ne),Oe=Tt(f,{transform:{x:N.x-be.x,y:N.y-be.y,scaleX:1,scaleY:1},activatorEvent:V,active:_,activeNodeRect:se,containerNodeRect:le,draggingNodeRect:ge,over:ce.current.over,overlayNodeRect:fe.rect,scrollableAncestors:Ne,scrollableAncestorRects:je,windowRect:Se}),Pe=re?U(re,N):null,Ae=function(e){const[t,n]=(0,k.useState)(null),r=(0,k.useRef)(e),a=(0,k.useCallback)(e=>{const t=Ce(e.target);t&&n(e=>e?(e.set(t,Te(t)),new Map(e)):null)},[]);return(0,k.useEffect)(()=>{const t=r.current;if(e!==t){o(t);const i=e.map(e=>{const t=Ce(e);return t?(t.addEventListener("scroll",a,{passive:!0}),[t,Te(t)]):null}).filter(e=>null!=e);n(i.length?new Map(i):null),r.current=e}return()=>{o(e),o(t)};function o(e){e.forEach(e=>{Ce(e)?.removeEventListener("scroll",a)})}},[a,e]),(0,k.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>U(e,t),ae):De(e):ae,[e,t])}(Ne),_e=ht(Ae),Me=ht(Ae,[se]),Le=U(Oe,_e),Ie=ge?ye(ge,Oe):null,ze=_&&Ie?u({active:_,collisionRect:Ie,droppableRects:X,droppableContainers:K,pointerCoordinates:Pe}):null,Be=ue(ze,"id"),[Ue,Ve]=(0,k.useState)(null),$e=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ve?Oe:U(Oe,Me),null!=(a=null==Ue?void 0:Ue.rect)?a:null,se),He=(0,k.useRef)(null),qe=(0,k.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(null==I.current)return;const a=C.get(I.current);if(!a)return;const o=e.nativeEvent;function i(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:a}=ce.current;let i=null;if(t&&a){const{cancelDrop:s}=q.current;i={activatorEvent:o,active:t,collisions:n,delta:a,over:r},e===J.DragEnd&&"function"==typeof s&&await Promise.resolve(s(i))&&(e=J.DragCancel)}I.current=null,(0,x.unstable_batchedUpdates)(()=>{m({type:e}),b(Rt.Uninitialized),Ve(null),B(null),$(null),He.current=null;const t=e===J.DragEnd?"onDragEnd":"onDragCancel";if(i){const e=q.current[t];e?.(i),g({type:t,event:i})}})}}He.current=new n({active:I.current,activeNode:a,event:o,options:r,context:ce,onAbort(e){if(!C.get(e))return;const{onDragAbort:t}=q.current,n={id:e};t?.(n),g({type:"onDragAbort",event:n})},onPending(e,t,n,r){if(!C.get(e))return;const{onDragPending:a}=q.current,o={id:e,constraint:t,initialCoordinates:n,offset:r};a?.(o),g({type:"onDragPending",event:o})},onStart(e){const t=I.current;if(null==t)return;const n=C.get(t);if(!n)return;const{onDragStart:r}=q.current,a={activatorEvent:o,active:{id:t,data:n.data,rect:P}};(0,x.unstable_batchedUpdates)(()=>{r?.(a),b(Rt.Initializing),m({type:J.DragStart,initialCoordinates:e,active:t}),g({type:"onDragStart",event:a}),B(He.current),$(o)})},onMove(e){m({type:J.DragMove,coordinates:e})},onEnd:i(J.DragEnd),onCancel:i(J.DragCancel)})},[C]),We=function(e,t){return(0,k.useMemo)(()=>e.reduce((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(c,(0,k.useCallback)((e,t)=>(n,r)=>{const a=n.nativeEvent,o=C.get(r);if(null!==I.current||!o||a.dndKit||a.defaultPrevented)return;const i={active:o};!0===e(n,t.options,i)&&(a.dndKit={capturedBy:t.sensor},I.current=r,qe(n,t))},[C,qe]));!function(e){(0,k.useEffect)(()=>{if(!E)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}(c),A(()=>{se&&v===Rt.Initializing&&b(Rt.Initialized)},[se,v]),(0,k.useEffect)(()=>{const{onDragMove:e}=q.current,{active:t,activatorEvent:n,collisions:r,over:a}=ce.current;if(!t||!n)return;const o={active:t,activatorEvent:n,collisions:r,delta:{x:Le.x,y:Le.y},over:a};(0,x.unstable_batchedUpdates)(()=>{e?.(o),g({type:"onDragMove",event:o})})},[Le.x,Le.y]),(0,k.useEffect)(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:a}=ce.current;if(!e||null==I.current||!t||!a)return;const{onDragOver:o}=q.current,i=r.get(Be),s=i&&i.rect.current?{id:i.id,rect:i.rect.current,data:i.data,disabled:i.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:a.x,y:a.y},over:s};(0,x.unstable_batchedUpdates)(()=>{Ve(s),o?.(l),g({type:"onDragOver",event:l})})},[Be]),A(()=>{ce.current={activatorEvent:V,active:_,activeNode:ne,collisionRect:Ie,collisions:ze,droppableRects:X,draggableNodes:C,draggingNode:he,draggingNodeRect:ge,droppableContainers:T,over:Ue,scrollableAncestors:Ne,scrollAdjustedTranslate:Le},P.current={initial:ge,translated:Ie}},[_,ne,ze,Ie,C,he,ge,X,T,Ue,Ne,Le]),rt({...oe,delta:N,draggingRect:Ie,pointerCoordinates:Pe,scrollableAncestors:Ne,scrollableAncestorRects:je});const Ke=(0,k.useMemo)(()=>({active:_,activeNode:ne,activeNodeRect:se,activatorEvent:V,collisions:ze,containerNodeRect:le,dragOverlay:fe,draggableNodes:C,droppableContainers:T,droppableRects:X,over:Ue,measureDroppableContainers:Z,scrollableAncestors:Ne,scrollableAncestorRects:je,measuringConfiguration:G,measuringScheduled:ee,windowRect:Se}),[_,ne,se,V,ze,le,fe,C,T,X,Ue,Z,Ne,je,G,ee,Se]),Ge=(0,k.useMemo)(()=>({activatorEvent:V,activators:We,active:_,activeNodeRect:se,ariaDescribedById:{draggable:W},dispatch:m,draggableNodes:C,over:Ue,measureDroppableContainers:Z}),[V,We,_,se,m,W,C,Ue,Z]);return k.createElement(Q.Provider,{value:y},k.createElement(kt.Provider,{value:Ge},k.createElement(Et.Provider,{value:Ke},k.createElement(Ot.Provider,{value:$e},l)),k.createElement(jt,{disabled:!1===(null==i?void 0:i.restoreFocus)})),k.createElement(te,{...i,hiddenTextDescribedById:W}))}),At=(0,k.createContext)(null),_t="button";function Dt(e){let{id:t,data:n,disabled:r=!1,attributes:a}=e;const o=F("Draggable"),{activators:i,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:f}=(0,k.useContext)(kt),{role:h=_t,roleDescription:p="draggable",tabIndex:m=0}=null!=a?a:{},g=(null==l?void 0:l.id)===t,y=(0,k.useContext)(g?Ot:At),[v,b]=L(),[x,w]=L(),S=function(e,t){return(0,k.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:a}=n;return e[r]=e=>{a(e,t)},e},{}),[e,t])}(i,t),E=D(n);return A(()=>(d.set(t,{id:t,key:o,node:v,activatorNode:x,data:E}),()=>{const e=d.get(t);e&&e.key===o&&d.delete(t)}),[d,t]),{active:l,activatorEvent:s,activeNodeRect:c,attributes:(0,k.useMemo)(()=>({role:h,tabIndex:m,"aria-disabled":r,"aria-pressed":!(!g||h!==_t)||void 0,"aria-roledescription":p,"aria-describedby":u.draggable}),[r,h,m,g,p,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:b,setActivatorNodeRef:w,transform:y}}function Mt(){return(0,k.useContext)(Et)}var Lt={timeout:25};function It(e){let{animation:t,children:n}=e;const[r,a]=(0,k.useState)(null),[o,i]=(0,k.useState)(null),s=I(n);return n||r||!s||a(s),A(()=>{if(!o)return;const e=null==r?void 0:r.key,n=null==r?void 0:r.props.id;null!=e&&null!=n?Promise.resolve(t(n,o)).then(()=>{a(null)}):a(null)},[t,r,o]),k.createElement(k.Fragment,null,n,r?(0,k.cloneElement)(r,{ref:i}):null)}var zt={x:0,y:0,scaleX:1,scaleY:1};function Ft(e){let{children:t}=e;return k.createElement(kt.Provider,{value:St},k.createElement(Ot.Provider,{value:zt},t))}var Bt={position:"fixed",touchAction:"none"},Ut=e=>$(e)?"transform 250ms ease":void 0,Vt=(0,k.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:a,children:o,className:i,rect:s,style:l,transform:c,transition:u=Ut}=e;if(!s)return null;const d=a?c:{...c,scaleX:1,scaleY:1},f={...Bt,width:s.width,height:s.height,top:s.top,left:s.left,transform:q.Transform.toString(d),transformOrigin:a&&r?ie(r,s):void 0,transition:"function"==typeof u?u(r):u,...l};return k.createElement(n,{className:i,style:f,ref:t},o)}),$t=e=>t=>{let{active:n,dragOverlay:r}=t;const a={},{styles:o,className:i}=e;if(null!=o&&o.active)for(const[e,s]of Object.entries(o.active))void 0!==s&&(a[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,s));if(null!=o&&o.dragOverlay)for(const[e,s]of Object.entries(o.dragOverlay))void 0!==s&&r.node.style.setProperty(e,s);return null!=i&&i.active&&n.node.classList.add(i.active),null!=i&&i.dragOverlay&&r.node.classList.add(i.dragOverlay),function(){for(const[e,t]of Object.entries(a))n.node.style.setProperty(e,t);null!=i&&i.active&&n.node.classList.remove(i.active)}},Ht={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:q.Transform.toString(t)},{transform:q.Transform.toString(n)}]},sideEffects:$t({styles:{active:{opacity:"0"}}})};function qt(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:a}=e;return _((e,o)=>{if(null===t)return;const i=n.get(e);if(!i)return;const s=i.node.current;if(!s)return;const l=gt(o);if(!l)return;const{transform:c}=j(o).getComputedStyle(o),u=ve(c);if(!u)return;const d="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:a}={...Ht,...e};return e=>{let{active:o,dragOverlay:i,transform:s,...l}=e;if(!t)return;const c={x:i.rect.left-o.rect.left,y:i.rect.top-o.rect.top},u={scaleX:1!==s.scaleX?o.rect.width*s.scaleX/i.rect.width:1,scaleY:1!==s.scaleY?o.rect.height*s.scaleY/i.rect.height:1},d={x:s.x-c.x,y:s.y-c.y,...u},f=a({...l,active:o,dragOverlay:i,transform:{initial:s,final:d}}),[h]=f,p=f[f.length-1];if(JSON.stringify(h)===JSON.stringify(p))return;const m=null==r?void 0:r({active:o,dragOverlay:i,...l}),g=i.node.animate(f,{duration:t,easing:n,fill:"forwards"});return new Promise(e=>{g.onfinish=()=>{m?.(),e()}})}}(t);return Me(s,a.draggable.measure),d({active:{id:e,data:i.data,node:s,rect:a.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:o,rect:a.dragOverlay.measure(l)},droppableContainers:r,measuringConfiguration:a,transform:u})})}var Wt=0;function Kt(e){return(0,k.useMemo)(()=>{if(null!=e)return++Wt},[e])}var Gt=k.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:a,transition:o,modifiers:i,wrapperElement:s="div",className:l,zIndex:c=999}=e;const{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:h,draggableNodes:p,droppableContainers:m,dragOverlay:g,over:y,measuringConfiguration:v,scrollableAncestors:b,scrollableAncestorRects:x,windowRect:w}=Mt(),S=(0,k.useContext)(Ot),E=Kt(null==d?void 0:d.id),C=Tt(i,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:h,draggingNodeRect:g.rect,over:y,overlayNodeRect:g.rect,scrollableAncestors:b,scrollableAncestorRects:x,transform:S,windowRect:w}),N=lt(f),j=qt({config:r,draggableNodes:p,droppableContainers:m,measuringConfiguration:v}),T=N?g.setRef:void 0;return k.createElement(Ft,null,k.createElement(It,{animation:j},d&&E?k.createElement(Vt,{key:E,id:d.id,ref:T,as:s,activatorEvent:u,adjustScale:t,className:l,transition:o,rect:N,style:{zIndex:c,...a},transform:C},n):null))});function Yt(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Xt(e,t){return e.reduce((e,n,r)=>{const a=t.get(n);return a&&(e[r]=a),e},Array(e.length))}function Qt(e){return null!==e&&e>=0}var Jt=e=>{let{rects:t,activeIndex:n,overIndex:r,index:a}=e;const o=Yt(t,r,n),i=t[a],s=o[a];return s&&i?{x:s.left-i.left,y:s.top-i.top,scaleX:s.width/i.width,scaleY:s.height/i.height}:null},Zt={scaleX:1,scaleY:1},en=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:a,rects:o,overIndex:i}=e;const s=null!=(t=o[n])?t:r;if(!s)return null;if(a===n){const e=o[i];return e?{x:0,y:n<i?e.top+e.height-(s.top+s.height):e.top-s.top,...Zt}:null}const l=function(e,t,n){const r=e[t],a=e[t-1],o=e[t+1];return r?n<t?a?r.top-(a.top+a.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):a?r.top-(a.top+a.height):0:0}(o,a,n);return a>n&&a<=i?{x:0,y:-s.height-l,...Zt}:a<n&&a>=i?{x:0,y:s.height+l,...Zt}:{x:0,y:0,...Zt}};var tn="Sortable",nn=k.createContext({activeIndex:-1,containerId:tn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Jt,disabled:{draggable:!1,droppable:!1}});function rn(e){let{children:t,id:n,items:r,strategy:a=Jt,disabled:o=!1}=e;const{active:i,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:u}=Mt(),d=F(tn,n),f=Boolean(null!==s.rect),h=(0,k.useMemo)(()=>r.map(e=>"object"==typeof e&&"id"in e?e.id:e),[r]),p=null!=i,m=i?h.indexOf(i.id):-1,g=c?h.indexOf(c.id):-1,y=(0,k.useRef)(h),v=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(h,y.current),b=-1!==g&&-1===m||v,x=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(o);A(()=>{v&&p&&u(h)},[v,h,p,u]),(0,k.useEffect)(()=>{y.current=h},[h]);const w=(0,k.useMemo)(()=>({activeIndex:m,containerId:d,disabled:x,disableTransforms:b,items:h,overIndex:g,useDragOverlay:f,sortedRects:Xt(h,l),strategy:a}),[m,d,x.draggable,x.droppable,b,h,g,l,f,a]);return k.createElement(nn.Provider,{value:w},t)}var an=e=>{let{id:t,items:n,activeIndex:r,overIndex:a}=e;return Yt(n,r,a).indexOf(t)},on=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:a,items:o,newIndex:i,previousItems:s,previousContainerId:l,transition:c}=e;return!(!c||!r)&&((s===o||a!==i)&&(!!n||i!==a&&t===l))},sn={duration:200,easing:"ease"},ln="transform",cn=q.Transition.toString({property:ln,duration:0,easing:"linear"}),un={roleDescription:"sortable"};function dn(e){let{animateLayoutChanges:t=on,attributes:n,disabled:r,data:a,getNewIndex:o=an,id:i,strategy:s,resizeObserverConfig:l,transition:c=sn}=e;const{items:u,containerId:d,activeIndex:f,disabled:h,disableTransforms:p,sortedRects:m,overIndex:g,useDragOverlay:y,strategy:v}=(0,k.useContext)(nn),b=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,h),x=u.indexOf(i),w=(0,k.useMemo)(()=>({sortable:{containerId:d,index:x,items:u},...a}),[d,a,x,u]),S=(0,k.useMemo)(()=>u.slice(u.indexOf(i)),[u,i]),{rect:E,node:C,isOver:N,setNodeRef:j}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:a}=e;const o=F("Droppable"),{active:i,dispatch:s,over:l,measureDroppableContainers:c}=(0,k.useContext)(kt),u=(0,k.useRef)({disabled:n}),d=(0,k.useRef)(!1),f=(0,k.useRef)(null),h=(0,k.useRef)(null),{disabled:p,updateMeasurementsFor:m,timeout:g}={...Lt,...a},y=D(null!=m?m:r),v=ct({callback:(0,k.useCallback)(()=>{d.current?(null!=h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{c(Array.isArray(y.current)?y.current:[y.current]),h.current=null},g)):d.current=!0},[g]),disabled:p||!i}),[b,x]=L((0,k.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),w=D(t);return(0,k.useEffect)(()=>{v&&b.current&&(v.disconnect(),d.current=!1,v.observe(b.current))},[b,v]),(0,k.useEffect)(()=>(s({type:J.RegisterDroppable,element:{id:r,key:o,disabled:n,node:b,rect:f,data:w}}),()=>s({type:J.UnregisterDroppable,key:o,id:r})),[r]),(0,k.useEffect)(()=>{n!==u.current.disabled&&(s({type:J.SetDroppableDisabled,id:r,key:o,disabled:n}),u.current.disabled=n)},[r,o,n,s]),{active:i,rect:f,isOver:(null==l?void 0:l.id)===r,node:b,over:l,setNodeRef:x}}({id:i,data:w,disabled:b.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...l}}),{active:T,activatorEvent:R,activeNodeRect:O,attributes:P,setNodeRef:_,listeners:M,isDragging:I,over:z,setActivatorNodeRef:B,transform:U}=Dt({id:i,data:w,attributes:{...un,...n},disabled:b.draggable}),V=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,k.useMemo)(()=>e=>{t.forEach(t=>t(e))},t)}(j,_),H=Boolean(T),W=H&&!p&&Qt(f)&&Qt(g),K=!y&&I,G=K&&W?U:null,Y=W?null!=G?G:(null!=s?s:v)({rects:m,activeNodeRect:O,activeIndex:f,overIndex:g,index:x}):null,X=Qt(f)&&Qt(g)?o({id:i,items:u,activeIndex:f,overIndex:g}):x,Q=null==T?void 0:T.id,Z=(0,k.useRef)({activeId:Q,items:u,newIndex:X,containerId:d}),ee=u!==Z.current.items,te=t({active:T,containerId:d,isDragging:I,isSorting:H,id:i,index:x,items:u,newIndex:Z.current.newIndex,previousItems:Z.current.items,previousContainerId:Z.current.containerId,transition:c,wasDragging:null!=Z.current.activeId}),ne=function(e){let{disabled:t,index:n,node:r,rect:a}=e;const[o,i]=(0,k.useState)(null),s=(0,k.useRef)(n);return A(()=>{if(!t&&n!==s.current&&r.current){const e=a.current;if(e){const t=we(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&i(n)}}n!==s.current&&(s.current=n)},[t,n,r,a]),(0,k.useEffect)(()=>{o&&i(null)},[o]),o}({disabled:!te,index:x,node:C,rect:E});return(0,k.useEffect)(()=>{H&&Z.current.newIndex!==X&&(Z.current.newIndex=X),d!==Z.current.containerId&&(Z.current.containerId=d),u!==Z.current.items&&(Z.current.items=u)},[H,X,d,u]),(0,k.useEffect)(()=>{if(Q===Z.current.activeId)return;if(null!=Q&&null==Z.current.activeId)return void(Z.current.activeId=Q);const e=setTimeout(()=>{Z.current.activeId=Q},50);return()=>clearTimeout(e)},[Q]),{active:T,activeIndex:f,attributes:P,data:w,rect:E,index:x,newIndex:X,items:u,isOver:N,isSorting:H,isDragging:I,listeners:M,node:C,overIndex:g,over:z,setNodeRef:V,setActivatorNodeRef:B,setDroppableNodeRef:j,setDraggableNodeRef:_,transform:null!=ne?ne:Y,transition:function(){if(ne||ee&&Z.current.newIndex===x)return cn;if(K&&!$(R)||!c)return;if(H||te)return q.Transition.toString({...c,property:ln})}()}}function fn(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}var hn=[Ie.Down,Ie.Right,Ie.Up,Ie.Left],pn=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:a,droppableContainers:o,over:i,scrollableAncestors:s}}=t;if(hn.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];o.getEnabled().forEach(n=>{if(!n||null!=n&&n.disabled)return;const o=a.get(n.id);if(o)switch(e.code){case Ie.Down:r.top<o.top&&t.push(n);break;case Ie.Up:r.top>o.top&&t.push(n);break;case Ie.Left:r.left>o.left&&t.push(n);break;case Ie.Right:r.left<o.left&&t.push(n)}});const u=(e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const a=ce(t),o=[];for(const i of r){const{id:e}=i,t=n.get(e);if(t){const n=ce(t),r=a.reduce((e,t,r)=>e+oe(n[r],t),0),s=Number((r/4).toFixed(4));o.push({id:e,data:{droppableContainer:i,value:s}})}}return o.sort(se)})({active:n,collisionRect:r,droppableRects:a,droppableContainers:t,pointerCoordinates:null});let d=ue(u,"id");if(d===(null==i?void 0:i.id)&&u.length>1&&(d=u[1].id),null!=d){const e=o.get(n.id),t=o.get(d),i=t?a.get(t.id):null,u=null==t?void 0:t.node.current;if(u&&i&&e&&t){const n=ke(u).some((e,t)=>s[t]!==e),a=mn(e,t),o=(c=t,!(!fn(l=e)||!fn(c))&&!!mn(l,c)&&l.data.current.sortable.index<c.data.current.sortable.index),d=n||!a?{x:0,y:0}:{x:o?r.width-i.width:0,y:o?r.height-i.height:0},f={x:i.left,y:i.top};return d.x&&d.y?f:V(f,d)}}}var l,c};function mn(e,t){return!(!fn(e)||!fn(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}var gn=i(e=>{var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(e,n,r){var a=null;if(void 0!==r&&(a=""+r),void 0!==n.key&&(a=""+n.key),"key"in n)for(var o in r={},n)"key"!==o&&(r[o]=n[o]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:a,ref:void 0!==n?n:null,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r}),yn=i((e,t)=>{t.exports=gn()}),vn=(0,k.createContext)({});function bn(e){const t=(0,k.useRef)(null);return null===t.current&&(t.current=e()),t.current}var xn="undefined"!=typeof window?k.useLayoutEffect:k.useEffect,wn=(0,k.createContext)(null);function Sn(e,t){-1===e.indexOf(t)&&e.push(t)}function kn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}var En=(e,t,n)=>n>t?t:n<e?e:n,Cn={},Nn=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),jn=e=>"object"==typeof e&&null!==e,Tn=e=>/^0[^.\s]+$/u.test(e);function Rn(e){let t;return()=>(void 0===t&&(t=e()),t)}var On=e=>e,Pn=(...e)=>e.reduce((e,t)=>n=>t(e(n))),An=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1},_n=class{constructor(){this.subscriptions=[]}add(e){return Sn(this.subscriptions,e),()=>kn(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let a=0;a<r;a++){const r=this.subscriptions[a];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},Dn=e=>1e3*e,Mn=e=>e/1e3,Ln=(e,t)=>t?e*(1e3/t):0,In=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function zn(e,t,n,r){if(e===t&&n===r)return On;const a=t=>function(e,t,n,r,a){let o,i,s=0;do{i=t+(n-t)/2,o=In(i,r,a)-e,o>0?n=i:t=i}while(Math.abs(o)>1e-7&&++s<12);return i}(t,0,1,e,n);return e=>0===e||1===e?e:In(a(e),t,r)}var Fn=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bn=e=>t=>1-e(1-t),Un=zn(.33,1.53,.69,.99),Vn=Bn(Un),$n=Fn(Vn),Hn=e=>e>=1?1:(e*=2)<1?.5*Vn(e):.5*(2-Math.pow(2,-10*(e-1))),qn=e=>1-Math.sin(Math.acos(e)),Wn=Bn(qn),Kn=Fn(qn),Gn=zn(.42,0,1,1),Yn=zn(0,0,.58,1),Xn=zn(.42,0,.58,1),Qn=e=>Array.isArray(e)&&"number"==typeof e[0],Jn={linear:On,easeIn:Gn,easeInOut:Xn,easeOut:Yn,circIn:qn,circInOut:Kn,circOut:Wn,backIn:Vn,backInOut:$n,backOut:Un,anticipate:Hn},Zn=e=>{if(Qn(e)){e.length;const[t,n,r,a]=e;return zn(t,n,r,a)}return"string"==typeof e?Jn[e]:e},er=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],tr={value:null,addProjectionMetrics:null};function nr(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=er.reduce((e,n)=>(e[n]=function(e,t){let n=new Set,r=new Set,a=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1},l=0;function c(t){i.has(t)&&(u.schedule(t),e()),l++,t(s)}const u={schedule:(e,t=!1,o=!1)=>{const s=o&&a?n:r;return t&&i.add(e),s.add(e),e},cancel:e=>{r.delete(e),i.delete(e)},process:e=>{if(s=e,a)return void(o=!0);a=!0;const i=n;n=r,r=i,n.forEach(c),t&&tr.value&&tr.value.frameloop[t].push(l),l=0,n.clear(),a=!1,o&&(o=!1,u.process(e))}};return u}(o,t?n:void 0),e),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:p}=i,m=()=>{const o=Cn.useManualTiming,i=o?a.timestamp:performance.now();n=!1,o||(a.delta=r?1e3/60:Math.max(Math.min(i-a.timestamp,40),1)),a.timestamp=i,a.isProcessing=!0,s.process(a),l.process(a),c.process(a),u.process(a),d.process(a),f.process(a),h.process(a),p.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(m))},g=er.reduce((t,o)=>{const s=i[o];return t[o]=(t,o=!1,i=!1)=>(n||(n=!0,r=!0,a.isProcessing||e(m)),s.schedule(t,o,i)),t},{});return{schedule:g,cancel:e=>{for(let t=0;t<er.length;t++)i[er[t]].cancel(e)},state:a,steps:i}}var rr,{schedule:ar,cancel:or,state:ir,steps:sr}=nr("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:On,!0);function lr(){rr=void 0}var cr={now:()=>(void 0===rr&&cr.set(ir.isProcessing||Cn.useManualTiming?ir.timestamp:performance.now()),rr),set:e=>{rr=e,queueMicrotask(lr)}},ur={layout:0,mainThread:0,waapi:0},dr=e=>t=>"string"==typeof t&&t.startsWith(e),fr=dr("--"),hr=dr("var(--"),pr=e=>!!hr(e)&&mr.test(e.split("/*")[0].trim()),mr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function gr(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}var yr={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},vr={...yr,transform:e=>En(0,1,e)},br={...yr,default:1},xr=e=>Math.round(1e5*e)/1e5,wr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;var Sr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,kr=(e,t)=>n=>Boolean("string"==typeof n&&Sr.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Er=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[a,o,i,s]=r.match(wr);return{[e]:parseFloat(a),[t]:parseFloat(o),[n]:parseFloat(i),alpha:void 0!==s?parseFloat(s):1}},Cr={...yr,transform:e=>Math.round((e=>En(0,255,e))(e))},Nr={test:kr("rgb","red"),parse:Er("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Cr.transform(e)+", "+Cr.transform(t)+", "+Cr.transform(n)+", "+xr(vr.transform(r))+")"};var jr={test:kr("#"),parse:function(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}},transform:Nr.transform},Tr=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Rr=Tr("deg"),Or=Tr("%"),Pr=Tr("px"),Ar=Tr("vh"),_r=Tr("vw"),Dr=(()=>({...Or,parse:e=>Or.parse(e)/100,transform:e=>Or.transform(100*e)}))(),Mr={test:kr("hsl","hue"),parse:Er("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Or.transform(xr(t))+", "+Or.transform(xr(n))+", "+xr(vr.transform(r))+")"},Lr={test:e=>Nr.test(e)||jr.test(e)||Mr.test(e),parse:e=>Nr.test(e)?Nr.parse(e):Mr.test(e)?Mr.parse(e):jr.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Nr.transform(e):Mr.transform(e),getAnimatableNone:e=>{const t=Lr.parse(e);return t.alpha=0,Lr.transform(t)}},Ir=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;var zr="number",Fr="color",Br=/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 Ur(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let o=0;return{values:n,split:t.replace(Br,e=>(Lr.test(e)?(r.color.push(o),a.push(Fr),n.push(Lr.parse(e))):e.startsWith("var(")?(r.var.push(o),a.push("var"),n.push(e)):(r.number.push(o),a.push(zr),n.push(parseFloat(e))),++o,"${}")).split("${}"),indexes:r,types:a}}function Vr({split:e,types:t}){const n=e.length;return r=>{let a="";for(let o=0;o<n;o++)if(a+=e[o],void 0!==r[o]){const e=t[o];a+=e===zr?xr(r[o]):e===Fr?Lr.transform(r[o]):r[o]}return a}}var $r=(e,t)=>{return"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof(n=e)?0:Lr.test(n)?Lr.getAnimatableNone(n):n;var n};var Hr={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(wr)?.length||0)+(e.match(Ir)?.length||0)>0},parse:function(e){return Ur(e).values},createTransformer:function(e){return Vr(Ur(e))},getAnimatableNone:function(e){const t=Ur(e);return Vr(t)(t.values.map((e,n)=>$r(e,t.split[n])))}};function qr(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Wr(e,t){return n=>n>0?t:e}var Kr=(e,t,n)=>e+(t-e)*n,Gr=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},Yr=[jr,Nr,Mr];function Xr(e){const t=(n=e,Yr.find(e=>e.test(n)));var n;if(Boolean(t),!Boolean(t))return!1;let r=t.parse(e);return t===Mr&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let a=0,o=0,i=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;a=qr(s,r,e+1/3),o=qr(s,r,e),i=qr(s,r,e-1/3)}else a=o=i=n;return{red:Math.round(255*a),green:Math.round(255*o),blue:Math.round(255*i),alpha:r}}(r)),r}var Qr=(e,t)=>{const n=Xr(e),r=Xr(t);if(!n||!r)return Wr(e,t);const a={...n};return e=>(a.red=Gr(n.red,r.red,e),a.green=Gr(n.green,r.green,e),a.blue=Gr(n.blue,r.blue,e),a.alpha=Kr(n.alpha,r.alpha,e),Nr.transform(a))},Jr=new Set(["none","hidden"]);function Zr(e,t){return n=>Kr(e,t,n)}function ea(e){return"number"==typeof e?Zr:"string"==typeof e?pr(e)?Wr:Lr.test(e)?Qr:ra:Array.isArray(e)?ta:"object"==typeof e?Lr.test(e)?Qr:na:Wr}function ta(e,t){const n=[...e],r=n.length,a=e.map((e,n)=>ea(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=a[t](e);return n}}function na(e,t){const n={...e,...t},r={};for(const a in n)void 0!==e[a]&&void 0!==t[a]&&(r[a]=ea(e[a])(e[a],t[a]));return e=>{for(const t in r)n[t]=r[t](e);return n}}var ra=(e,t)=>{const n=Hr.createTransformer(t),r=Ur(e),a=Ur(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?Jr.has(e)&&!a.values.length||Jr.has(t)&&!r.values.length?function(e,t){return Jr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Pn(ta(function(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const o=t.types[a],i=e.indexes[o][r[o]];n[a]=e.values[i]??0,r[o]++}return n}(r,a),a.values),n):Wr(e,t)};function aa(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?Kr(e,t,n):ea(e)(e,t)}var oa=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>ar.update(t,e),stop:()=>or(t),now:()=>ir.isProcessing?ir.timestamp:cr.now()}},ia=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let o=0;o<a;o++)r+=Math.round(1e4*e(o/(a-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`};function sa(e){let t=0;let n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}var la=100,ca=10,ua=1,da=0,fa=800,ha=.3,pa=.3,ma={granular:.01,default:2},ga={granular:.005,default:.5},ya=.01,va=10,ba=.05,xa=1;function wa(e,t){return e*Math.sqrt(1-t*t)}var Sa=["duration","bounce"],ka=["stiffness","damping","mass"];function Ea(e,t){return t.some(t=>void 0!==e[t])}function Ca(e){let t={velocity:da,stiffness:la,damping:ca,mass:ua,isResolvedFromDuration:!1,...e};if(!Ea(e,ka)&&Ea(e,Sa))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),a=r*r,o=2*En(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:ua,stiffness:a,damping:o}}else{const n=function({duration:e=fa,bounce:t=ha,velocity:n=da,mass:r=ua}){let a,o;Dn(va);let i=1-t;i=En(ba,xa,i),e=En(ya,va,Mn(e)),i<1?(a=t=>{const r=t*i,a=r*e;return.001-(r-n)/wa(t,i)*Math.exp(-a)},o=t=>{const r=t*i*e,o=r*n+n,s=Math.pow(i,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=wa(Math.pow(t,2),i);return(.001-a(t)>0?-1:1)*((o-s)*l)/c}):(a=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let a=1;a<12;a++)r-=e(r)/t(r);return r}(a,o,5/e);if(e=Dn(e),isNaN(s))return{stiffness:la,damping:ca,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*i*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});t={...t,...n,mass:ua},t.isResolvedFromDuration=!0}return t}function Na(e=pa,t=ha){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=Ca({...n,velocity:-Mn(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),g=i-o,y=Mn(Math.sqrt(l/u)),v=Math.abs(g)<5;let b,x,w,S,k,E;if(r||(r=v?ma.granular:ma.default),a||(a=v?ga.granular:ga.default),m<1)w=wa(y,m),S=(p+m*y*g)/w,b=e=>i-Math.exp(-m*y*e)*(S*Math.sin(w*e)+g*Math.cos(w*e)),k=m*y*S+g*w,E=m*y*g-S*w,x=e=>Math.exp(-m*y*e)*(k*Math.sin(w*e)+E*Math.cos(w*e));else if(1===m){b=e=>i-Math.exp(-y*e)*(g+(p+y*g)*e);const e=p+y*g;x=t=>Math.exp(-y*t)*(y*e*t-p)}else{const e=y*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*y*t),r=Math.min(e*t,300);return i-n*((p+m*y*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};const t=(p+m*y*g)/e,n=m*y*t-g*e,r=m*y*g-t*e;x=t=>{const a=Math.exp(-m*y*t),o=Math.min(e*t,300);return a*(n*Math.sinh(o)+r*Math.cosh(o))}}const C={calculatedDuration:h&&d||null,velocity:e=>Dn(x(e)),next:e=>{if(!h&&m<1){const t=Math.exp(-m*y*e),n=Math.sin(w*e),o=Math.cos(w*e),l=i-t*(S*n+g*o),c=Dn(t*(k*n+E*o));return s.done=Math.abs(c)<=r&&Math.abs(i-l)<=a,s.value=s.done?i:l,s}const t=b(e);if(h)s.done=e>=d;else{const n=Dn(x(e));s.done=Math.abs(n)<=r&&Math.abs(i-t)<=a}return s.value=s.done?i:t,s},toString:()=>{const e=Math.min(sa(C),2e4),t=ia(t=>C.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return C}Na.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(sa(r),2e4);return{type:"keyframes",ease:e=>r.next(a*e).value/t,duration:Mn(a)}}(e,100,Na);return e.ease=t.ease,e.duration=Dn(t.duration),e.type="keyframes",e};function ja(e,t,n){const r=Math.max(t-5,0);return Ln(n-e(r),t-r)}function Ta({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:o=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let p=n*t;const m=d+p,g=void 0===i?m:i(m);g!==m&&(p=g-d);const y=e=>-p*Math.exp(-e/r),v=e=>g+y(e),b=e=>{const t=y(e),n=v(e);f.done=Math.abs(t)<=c,f.value=f.done?g:n};let x,w;const S=e=>{var t;(t=f.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(x=e,w=Na({keyframes:[f.value,h(f.value)],velocity:ja(v,e,f.value),damping:a,stiffness:o,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),S(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),f)}}}function Ra(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const o=e.length;if(t.length,1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],a=n||Cn.mix||aa,o=e.length-1;for(let i=0;i<o;i++){let n=a(e[i],e[i+1]);t&&(n=Pn(Array.isArray(t)?t[i]||On:t,n)),r.push(n)}return r}(t,r,a),l=s.length,c=n=>{if(i&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const a=An(e[r],e[r+1],n);return s[r](a)};return n?t=>c(En(e[0],e[o-1],t)):c}function Oa(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=An(0,t,r);e.push(Kr(n,1,a))}}(t,e.length-1),t}function Pa({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Zn):Zn(r),o={done:!1,value:t[0]},i=Ra(function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:Oa(t),e),t,{ease:Array.isArray(a)?a:(s=t,l=a,s.map(()=>l||Xn).splice(0,s.length-1))});var s,l;return{calculatedDuration:e,next:t=>(o.value=i(t),o.done=t>=e,o)}}var Aa=e=>null!==e;function _a(e,{repeat:t,repeatType:n="loop"},r,a=1){const o=e.filter(Aa),i=a<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}var Da={decay:Ta,inertia:Ta,tween:Pa,keyframes:Pa,spring:Na};function Ma(e){"string"==typeof e.type&&(e.type=Da[e.type])}var La=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)}},Ia=e=>e/100,za=class extends La{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=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==cr.now()&&this.tick(cr.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},ur.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;Ma(e);const{type:t=Pa,repeat:n=0,repeatDelay:r=0,repeatType:a,velocity:o=0}=e;let{keyframes:i}=e;const s=t||Pa;s!==Pa&&"number"!=typeof i[0]&&(this.mixKeyframes=Pn(Ia,aa(i[0],i[1])),i=[0,100]);const l=s({...e,keyframes:i});"mirror"===a&&(this.mirroredGenerator=s({...e,keyframes:[...i].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=sa(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,repeatType:d,repeatDelay:f,type:h,onUpdate:p,finalKeyframe:m}=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);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let v,b=this.currentTime,x=n;if(u){const e=Math.min(this.currentTime,r)/i;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,u+1),Boolean(t%2)&&("reverse"===d?(n=1-n,f&&(n-=f/i)):"mirror"===d&&(x=o)),b=En(0,1,n)*i}y?(this.delayState.value=c[0],v=this.delayState):v=x.next(b),a&&!y&&(v.value=a(v.value));let{done:w}=v;y||null===s||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return S&&h!==Ta&&(v.value=_a(c,this.options,m,this.speed)),p&&p(v.value),S&&this.finish(),v}then(e,t){return this.finished.then(e,t)}get duration(){return Mn(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Mn(e)}get time(){return Mn(this.currentTime)}set time(e){e=Dn(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?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(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);return ja(e=>this.generator.next(e).value,e,this.generator.next(e).value)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(cr.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Mn(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=oa,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(cr.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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,ur.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=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)}};var Fa=e=>180*e/Math.PI,Ba=e=>Va(Fa(Math.atan2(e[1],e[0]))),Ua={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ba,rotateZ:Ba,skewX:e=>Fa(Math.atan(e[1])),skewY:e=>Fa(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Va=e=>((e%=360)<0&&(e+=360),e),$a=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ha=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),qa={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:$a,scaleY:Ha,scale:e=>($a(e)+Ha(e))/2,rotateX:e=>Va(Fa(Math.atan2(e[6],e[5]))),rotateY:e=>Va(Fa(Math.atan2(-e[2],e[0]))),rotateZ:Ba,rotate:Ba,skewX:e=>Fa(Math.atan(e[4])),skewY:e=>Fa(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Wa(e){return e.includes("scale")?1:0}function Ka(e,t){if(!e||"none"===e)return Wa(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=qa,a=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Ua,a=t}if(!a)return Wa(t);const o=r[t],i=a[1].split(",").map(Ga);return"function"==typeof o?o(i):i[o]}function Ga(e){return parseFloat(e.trim())}var Ya=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xa=(()=>new Set([...Ya,"pathRotation"]))(),Qa=e=>e===yr||e===Pr,Ja=new Set(["x","y","z"]),Za=Ya.filter(e=>!Ja.has(e));var eo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const a=e.max-e.min;return"border-box"===r?a:a-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const a=e.max-e.min;return"border-box"===r?a:a-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})=>Ka(t,"x"),y:(e,{transform:t})=>Ka(t,"y")};eo.translateX=eo.x,eo.translateY=eo.y;var to=new Set,no=!1,ro=!1,ao=!1;function oo(){if(ro){const e=Array.from(to).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return Za.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}ro=!1,no=!1,to.forEach(e=>e.complete(ao)),to.clear()}function io(){to.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ro=!0)})}var so=class{constructor(e,t,n,r,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(to.add(this),no||(no=!0,ar.read(io),ar.resolveKeyframes(oo))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const a=r?.get(),o=e[e.length-1];if(void 0!==a)e[0]=a;else if(n&&t){const r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===a&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),to.delete(this)}cancel(){"scheduled"===this.state&&(to.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}};function lo(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}var co={};function uo(e,t){const n=Rn(e);return()=>co[t]??n()}var fo=uo(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),ho=uo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),po=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,mo={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:po([0,.65,.55,1]),circOut:po([.55,0,1,.45]),backIn:po([.31,.01,.66,-.59]),backOut:po([.33,1.53,.69,.99])};function go(e,t){return e?"function"==typeof e?ho()?ia(e,t):"ease-out":Qn(e)?po(e):Array.isArray(e)?e.map(e=>go(e,t)||mo.easeOut):mo[e]:void 0}function yo(e,t,n,{delay:r=0,duration:a=300,repeat:o=0,repeatType:i="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=go(s,a);Array.isArray(d)&&(u.easing=d),tr.value&&ur.waapi++;const f={delay:r,duration:a,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===i?"alternate":"normal"};c&&(f.pseudoElement=c);const h=e.animate(u,f);return tr.value&&h.finished.finally(()=>{ur.waapi--}),h}function vo(e){return"function"==typeof e&&"applyToOptions"in e}var bo=class extends La{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:i,onComplete:s}=e;this.isPseudoElement=Boolean(a),this.allowFlatten=o,this.options=e,e.type;const l=function({type:e,...t}){return vo(e)&&ho()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=yo(t,n,r,l,a),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const e=_a(r,this.options,i,this.speed);this.updateMotionValue&&this.updateMotionValue(e),lo(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return Mn(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Mn(e)}get time(){return Mn(Number(this.animation.currentTime)||0)}set time(e){const t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Dn(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 null!==this.finishedTime?"finished":this.animation.playState}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&&fo()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),On):r(this)}},xo={anticipate:Hn,backInOut:$n,circInOut:Kn};function wo(e){"string"==typeof e.ease&&function(e){return e in xo}(e.ease)&&(e.ease=xo[e.ease])}var So=class extends bo{constructor(e){wo(e),Ma(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:a,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const i=new za({...o,autoplay:!1}),s=Math.max(10,cr.now()-this.startTime),l=En(0,10,s-10),c=i.sample(s).value,{name:u}=this.options;a&&u&&lo(a,u,c),t.setWithVelocity(i.sample(Math.max(0,s-l)).value,c,l),i.stop()}},ko=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Hr.test(e)&&"0"!==e||e.startsWith("url(")));function Eo(e){e.duration=0,e.type="keyframes"}var Co=new Set(["opacity","clipPath","filter","transform"]),No=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;var jo=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),To=Rn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ro(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:o,type:i,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return To()&&n&&(Co.has(n)||jo.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&No.test(e[t]))return!0;return!1}(s))&&("transform"!==n||!c)&&!l&&!r&&"mirror"!==a&&0!==o&&"inertia"!==i}var Oo=class extends La{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:a=0,repeatType:o="loop",keyframes:i,name:s,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=cr.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:a,repeatType:o,name:s,motionValue:l,element:c,...u},f=c?.KeyframeResolver||so;this.keyframeResolver=new f(i,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:a,type:o,velocity:i,delay:s,isHandoff:l,onUpdate:c}=n;this.resolvedAt=cr.now();let u=!0;(function(e,t,n,r){const a=e[0];if(null===a)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],i=ko(a,t),s=ko(o,t);return!(!i||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||vo(n))&&r)})(e,a,o,i)||(u=!1,!Cn.instantAnimations&&s||c?.(_a(e,n,t)),e[0]=e[e.length-1],Eo(n),n.repeat=0);const d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!l&&Ro(d),h=d.motionValue?.owner?.current;let p;if(f)try{p=new So({...d,element:h})}catch{p=new za(d)}else p=new za(d);p.finished.then(()=>{this.notifyFinished()}).catch(On),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}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(),ao=!0,io(),oo(),ao=!1),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 Po(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Ao(e,t){const n=e?.[t]??e?.default??e;return n!==e?Po(n,e):n}var _o={type:"spring",stiffness:500,damping:25,restSpeed:10},Do={type:"keyframes",duration:.8},Mo={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Lo=(e,{keyframes:t})=>t.length>2?Do:Xa.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:_o:Mo,Io=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);var zo=(e,t,n,r={},a,o)=>i=>{const s=Ao(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=Dn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:a};(function(e){for(const t in e)if(!Io.has(t))return!0;return!1})(s)||Object.assign(u,Lo(e,u)),u.duration&&(u.duration=Dn(u.duration)),u.repeatDelay&&(u.repeatDelay=Dn(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(Eo(u),0===u.delay&&(d=!0)),(Cn.instantAnimations||Cn.skipAnimations||a?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Eo(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!o&&void 0!==t.get()){const e=_a(u.keyframes,s);if(void 0!==e)return void ar.update(()=>{u.onUpdate(e),u.onComplete()})}return s.isSync?new za(u):new Oo(u)};function Fo(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Bo="data-"+Fo("framerAppearId"),{schedule:Uo,cancel:Vo}=nr(queueMicrotask,!1),$o={x:!1,y:!1};function Ho(){return $o.x||$o.y}function qo(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let r=document;t&&(r=t.current);const a=n?.[e]??r.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e).filter(e=>null!=e)}function Wo(e,t){const n=qo(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Ko(e,t,n={}){const[r,a,o]=Wo(e,n);return r.forEach(e=>{let n,r=!1,o=!1;const i=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},s=e=>{r=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),o&&(o=!1,i(e))},l=e=>{"touch"!==e.pointerType&&(r?o=!0:i(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||Ho())return;o=!1;const i=t(e,r);"function"==typeof i&&(n=i,e.addEventListener("pointerleave",l,a))},a),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,a),window.addEventListener("pointercancel",s,a)},a)}),o}function Go(e){return jn(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}var Yo=(e,t)=>!!t&&(e===t||Yo(e,t.parentElement)),Xo=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,Qo=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);var Jo=new Set(["INPUT","SELECT","TEXTAREA"]);var Zo=new WeakSet;function ei(e){return t=>{"Enter"===t.key&&e(t)}}function ti(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function ni(e){return Xo(e)&&!Ho()}var ri=new WeakSet;function ai(e,t,n={}){const[r,a,o]=Wo(e,n),i=e=>{const r=e.currentTarget;if(!ni(e))return;if(ri.has(e))return;Zo.add(r),n.stopPropagation&&ri.add(e);const o=t(r,e),i=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),Zo.has(r)&&Zo.delete(r),ni(e)&&"function"==typeof o&&o(e,{success:t})},s=e=>{i(e,r===window||r===document||n.useGlobalTarget||Yo(r,e.target))},l=e=>{i(e,!1)};window.addEventListener("pointerup",s,a),window.addEventListener("pointercancel",l,a)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",i,a),Go(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=ei(()=>{if(Zo.has(n))return;ti(n,"down");const e=ei(()=>{ti(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>ti(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,a)),t=e,Qo.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}function oi(e){return jn(e)&&"ownerSVGElement"in e}var ii,si=new WeakMap,li=(e,t,n)=>(r,a)=>a&&a[0]?a[0][e+"Size"]:oi(r)&&"getBBox"in r?r.getBBox()[t]:r[n],ci=li("inline","width","offsetWidth"),ui=li("block","height","offsetHeight");function di({target:e,borderBoxSize:t}){si.get(e)?.forEach(n=>{n(e,{get width(){return ci(e,t)},get height(){return ui(e,t)}})})}function fi(e){e.forEach(di)}function hi(e,t){ii||"undefined"!=typeof ResizeObserver&&(ii=new ResizeObserver(fi));const n=qo(e);return n.forEach(e=>{let n=si.get(e);n||(n=new Set,si.set(e,n)),n.add(t),ii?.observe(e)}),()=>{n.forEach(e=>{const n=si.get(e);n?.delete(t),n?.size||ii?.unobserve(e)})}}var pi,mi=new Set;function gi(e){return mi.add(e),pi||(pi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};mi.forEach(t=>t(e))},window.addEventListener("resize",pi)),()=>{mi.delete(e),mi.size||"function"!=typeof pi||(window.removeEventListener("resize",pi),pi=void 0)}}function yi(e,t){return"function"==typeof e?gi(e):hi(e,t)}var vi=e=>Boolean(e&&e.getVelocity);function bi(e,t){const n=e.getValue("willChange");if(r=n,Boolean(vi(r)&&r.add))return n.add(t);if(!n&&Cn.WillChange){const n=new Cn.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}var xi=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function wi({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Si(e){return void 0===e||1===e}function ki({scale:e,scaleX:t,scaleY:n}){return!Si(e)||!Si(t)||!Si(n)}function Ei(e){return ki(e)||Ci(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ci(e){return Ni(e.x)||Ni(e.y)}function Ni(e){return e&&"0%"!==e}function ji(e,t,n){return n+t*(e-n)}function Ti(e,t,n,r,a){return void 0!==a&&(e=ji(e,a,r)),ji(e,n,r)+t}function Ri(e,t=0,n=1,r,a){e.min=Ti(e.min,t,n,r,a),e.max=Ti(e.max,t,n,r,a)}function Oi(e,{x:t,y:n}){Ri(e.x,t.translate,t.scale,t.originPoint),Ri(e.y,n.translate,n.scale,n.originPoint)}var Pi=.999999999999,Ai=1.0000000000001;function _i(e,t){e.min+=t,e.max+=t}function Di(e,t,n,r,a=.5){Ri(e,t,n,Kr(e.min,e.max,a),r)}function Mi(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function Li(e,t,n){const r=n??e;Di(e.x,Mi(t.x,r.x),t.scaleX,t.scale,t.originX),Di(e.y,Mi(t.y,r.y),t.scaleY,t.scale,t.originY)}function Ii(e,t){return wi(function(e,t){if(!t)return e;const 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}}(e.getBoundingClientRect(),t))}var zi=new Set(["width","height","top","left","right","bottom",...Ya]),Fi=e=>t=>t.test(e),Bi=[yr,Pr,Or,Rr,_r,Ar,{test:e=>"auto"===e,parse:e=>e}],Ui=e=>Bi.find(Fi(e)),Vi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $i(e,t,n=1){const[r,a]=function(e){const t=Vi.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const e=o.trim();return Nn(e)?parseFloat(e):e}return pr(a)?$i(a,t,n+1):a}function Hi(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||Tn(e))}var qi=new Set(["brightness","contrast","saturate","opacity"]);function Wi(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(wr)||[];if(!r)return e;const a=n.replace(r,"");let o=qi.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+a+")"}var Ki=/\b([a-z-]*)\(.*?\)/gu,Gi={...Hr,getAnimatableNone:e=>{const t=e.match(Ki);return t?t.map(Wi).join(" "):e}},Yi={...Hr,getAnimatableNone:e=>{const t=Hr.parse(e);return Hr.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},Xi={...yr,transform:Math.round},Qi={borderWidth:Pr,borderTopWidth:Pr,borderRightWidth:Pr,borderBottomWidth:Pr,borderLeftWidth:Pr,borderRadius:Pr,borderTopLeftRadius:Pr,borderTopRightRadius:Pr,borderBottomRightRadius:Pr,borderBottomLeftRadius:Pr,width:Pr,maxWidth:Pr,height:Pr,maxHeight:Pr,top:Pr,right:Pr,bottom:Pr,left:Pr,inset:Pr,insetBlock:Pr,insetBlockStart:Pr,insetBlockEnd:Pr,insetInline:Pr,insetInlineStart:Pr,insetInlineEnd:Pr,padding:Pr,paddingTop:Pr,paddingRight:Pr,paddingBottom:Pr,paddingLeft:Pr,paddingBlock:Pr,paddingBlockStart:Pr,paddingBlockEnd:Pr,paddingInline:Pr,paddingInlineStart:Pr,paddingInlineEnd:Pr,margin:Pr,marginTop:Pr,marginRight:Pr,marginBottom:Pr,marginLeft:Pr,marginBlock:Pr,marginBlockStart:Pr,marginBlockEnd:Pr,marginInline:Pr,marginInlineStart:Pr,marginInlineEnd:Pr,fontSize:Pr,backgroundPositionX:Pr,backgroundPositionY:Pr,...{rotate:Rr,pathRotation:Rr,rotateX:Rr,rotateY:Rr,rotateZ:Rr,scale:br,scaleX:br,scaleY:br,scaleZ:br,skew:Rr,skewX:Rr,skewY:Rr,distance:Pr,translateX:Pr,translateY:Pr,translateZ:Pr,x:Pr,y:Pr,z:Pr,perspective:Pr,transformPerspective:Pr,opacity:vr,originX:Dr,originY:Dr,originZ:Pr},zIndex:Xi,fillOpacity:vr,strokeOpacity:vr,numOctaves:Xi},Ji={...Qi,color:Lr,backgroundColor:Lr,outlineColor:Lr,fill:Lr,stroke:Lr,borderColor:Lr,borderTopColor:Lr,borderRightColor:Lr,borderBottomColor:Lr,borderLeftColor:Lr,filter:Gi,WebkitFilter:Gi,mask:Yi,WebkitMask:Yi},Zi=e=>Ji[e],es=new Set([Gi,Yi]);function ts(e,t){let n=Zi(e);return es.has(n)||(n=Hr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var ns=new Set(["auto","none","0"]);var rs=class extends so{constructor(e,t,n,r,a){super(e,t,n,r,a,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let n=e[s];if("string"==typeof n&&(n=n.trim(),pr(n))){const r=$i(n,t.current);void 0!==r&&(e[s]=r),s===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!zi.has(n)||2!==e.length)return;const[r,a]=e,o=Ui(r),i=Ui(a);if(gr(r)!==gr(a)&&eo[n])this.needsMeasurement=!0;else if(o!==i)if(Qa(o)&&Qa(i))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else eo[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||Hi(e[r]))&&n.push(r);n.length&&function(e,t,n){let r,a=0;for(;a<e.length&&!r;){const t=e[a];"string"==typeof t&&!ns.has(t)&&Ur(t).values.length&&(r=e[a]),a++}if(r&&n)for(const o of t)e[o]=ts(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=eo[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const a=n.length-1,o=n[a];n[a]=eo[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},as=()=>({x:{min:0,max:0},y:{min:0,max:0}}),os={current:void 0},is=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=cr.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(const n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=cr.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}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 _n);const n=this.events[e].add(t);return"change"===e?()=>{n(),ar.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const 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||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return os.current&&os.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=cr.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ln(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 ss(e,t){return new is(e,t)}var ls=[...Bi,Lr,Hr],cs=new WeakMap;function us(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function ds(e){return"string"==typeof e||Array.isArray(e)}var fs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hs=["initial",...fs];function ps(e){return us(e.animate)||hs.some(t=>ds(e[t]))}function ms(e){return Boolean(ps(e)||e.variants)}var gs={current:null},ys={current:!1},vs="undefined"!=typeof window;function bs(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function xs(e,t,n,r){if("function"==typeof t){const[a,o]=bs(r);t=t(void 0!==n?n:e.custom,a,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[a,o]=bs(r);t=t(void 0!==n?n:e.custom,a,o)}return t}var ws=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Ss={};function ks(e){Ss=e}var Es=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:a,blockInitialAnimation:o,visualState:i},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=so,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=cr.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ar.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=a,this.options=s,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=ps(t),this.isVariantNode=ms(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const f in d){const e=d[f];void 0!==l[f]&&vi(e)&&e.set(l[f])}}mount(e){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=e,cs.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)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(ys.current||function(){if(ys.current=!0,vs)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>gs.current=e.matches;e.addEventListener("change",t),t()}else gs.current=!1}(),this.shouldReduceMotion=gs.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(),or(this.notifyUpdate),or(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(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&&Co.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:a,ease:o,duration:i}=t.accelerate,s=new bo({element:this.current,name:e,keyframes:r,times:a,ease:o,duration:Dn(i)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=Xa.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&ar.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),a&&a()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Ss){const t=Ss[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const 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):{x:{min:0,max:0},y:{min:0,max:0}}}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 n=0;n<ws.length;n++){const t=ws[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const a=t[r],o=n[r];if(vi(a))e.addValue(r,a);else if(vi(o))e.addValue(r,ss(a,{owner:e}));else if(o!==a)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(a):t.hasAnimated||t.set(a)}else{const t=e.getStaticValue(r);e.addValue(r,ss(void 0!==t?t:a,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(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){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const 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);const 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 void 0===n&&void 0!==t&&(n=ss(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(Nn(n)||Tn(n))?n=parseFloat(n):(r=n,!ls.find(Fi(r))&&Hr.test(t)&&(n=ts(e,t))),this.setBaseTarget(e,vi(n)?n.get():n)),vi(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const r=xs(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&void 0!==n)return n;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||vi(r)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new _n),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Uo.render(this.render)}},Cs=class extends Es{constructor(){super(...arguments),this.KeyframeResolver=rs}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const 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);const{children:e}=this.props;vi(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}},Ns=(e,t)=>t&&"number"==typeof e?t.transform(e):e,js={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ts=Ya.length;function Rs(e,t,n){const{style:r,vars:a,transformOrigin:o}=e;let i=!1,s=!1;for(const l in t){const e=t[l];if(Xa.has(l))i=!0;else if(fr(l))a[l]=e;else{const t=Ns(e,Qi[l]);l.startsWith("origin")?(s=!0,o[l]=t):r[l]=t}}if(t.transform||(i||n?r.transform=function(e,t,n){let r="",a=!0;for(let i=0;i<Ts;i++){const o=Ya[i],s=e[o];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===(o.startsWith("scale")?1:0);else{const e=parseFloat(s);l=o.startsWith("scale")?1===e:0===e}if(!l||n){const e=Ns(s,Qi[o]);l||(a=!1,r+=`${js[o]||o}(${e}) `),n&&(t[o]=e)}}const o=e.pathRotation;return o&&(a=!1,r+=`rotate(${Ns(o,Qi.pathRotation)}) `),r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin=`${e} ${t} ${n}`}}function Os(e,{style:t,vars:n},r,a){const o=e.style;let i;for(i in t)o[i]=t[i];for(i in a?.applyProjectionStyles(o,r),n)o.setProperty(i,n[i])}function Ps(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var As={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Pr.test(e))return e;e=parseFloat(e)}return`${Ps(e,t.target.x)}% ${Ps(e,t.target.y)}%`}},_s={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=Hr.parse(e);if(a.length>5)return r;const o=Hr.createTransformer(e),i="number"!=typeof a[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;a[0+i]/=s,a[1+i]/=l;const c=Kr(s,l,.5);return"number"==typeof a[2+i]&&(a[2+i]/=c),"number"==typeof a[3+i]&&(a[3+i]/=c),o(a)}},Ds={borderRadius:{...As,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:As,borderTopRightRadius:As,borderBottomLeftRadius:As,borderBottomRightRadius:As,boxShadow:_s};function Ms(e,{layout:t,layoutId:n}){return Xa.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Ds[e]||"opacity"===e)}function Ls(e,t,n){const r=e.style,a=t?.style,o={};if(!r)return o;for(const i in r)(vi(r[i])||a&&vi(a[i])||Ms(i,e)||void 0!==n?.getValue(i)?.liveStyle)&&(o[i]=r[i]);return o}var Is=class extends Cs{constructor(){super(...arguments),this.type="html",this.renderInstance=Os}readValueFromInstance(e,t){if(Xa.has(t))return this.projection?.isProjecting?Wa(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ka(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),a=(fr(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof a?a.trim():a}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ii(e,t)}build(e,t,n){Rs(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Ls(e,t,n)}},zs={offset:"stroke-dashoffset",array:"stroke-dasharray"},Fs={offset:"strokeDashoffset",array:"strokeDasharray"};var Bs=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Us(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:o=1,pathOffset:i=0,...s},l,c,u){if(Rs(e,s,c),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{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(const h of Bs)void 0!==d[h]&&(f[h]=d[h],delete d[h]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==a&&function(e,t,n=1,r=0,a=!0){e.pathLength=1;const o=a?zs:Fs;e[o.offset]=""+-r,e[o.array]=`${t} ${n}`}(d,a,o,i,!1)}var Vs=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"]),$s=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Hs(e,t,n){const r=Ls(e,t,n);for(const a in e)if(vi(e[a])||vi(t[a])){r[-1!==Ya.indexOf(a)?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a]=e[a]}return r}var qs=class extends Cs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=as}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Xa.has(t)){const e=Zi(t);return e&&e.default||0}return t=Vs.has(t)?t:Fo(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Hs(e,t,n)}build(e,t,n){Us(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){Os(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(Vs.has(a)?a:Fo(a),t.attrs[a])}(e,t,0,r)}mount(e){this.isSVGTag=$s(e.tagName),super.mount(e)}};function Ws(e,t,n){const r=e.getProps();return xs(r,t,void 0!==n?n:r.custom,e)}var Ks=e=>Array.isArray(e);function Gs(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ss(n))}function Ys(e){return Ks(e)?e[e.length-1]||0:e}function Xs(e){return e.props[Bo]}function Qs({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Js(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:o,transitionEnd:i,...s}=t;const l=e.getDefaultTransition();o=o?Po(o,l):l;const c=o?.reduceMotion,u=o?.skipAnimations;r&&(o=r);const d=[],f=a&&e.animationState&&e.animationState.getState()[a],h=o?.path;h&&h.animateVisualElement(e,s,o,n,d);for(const p in s){const t=e.getValue(p,e.latestValues[p]??null),r=s[p];if(void 0===r||f&&Qs(f,p))continue;const a={delay:n,...Ao(o||{},p)};u&&(a.skipAnimations=!0);const i=t.get();if(void 0!==i&&!t.isAnimating()&&!Array.isArray(r)&&r===i&&!a.velocity){ar.update(()=>t.set(r));continue}let l=!1;if(window.MotionHandoffAnimation){const t=Xs(e);if(t){const e=window.MotionHandoffAnimation(t,p,ar);null!==e&&(a.startTime=e,l=!0)}}bi(e,p);const h=c??e.shouldReduceMotion;t.start(zo(p,t,r,h&&zi.has(p)?{type:!1}:a,e,l));const m=t.animation;m&&d.push(m)}if(i){const t=()=>ar.update(()=>{i&&function(e,t){let{transitionEnd:n={},transition:r={},...a}=Ws(e,t)||{};a={...a,...n};for(const o in a)Gs(e,o,Ys(a[o]))}(e,i)});d.length?Promise.all(d).then(t):t()}return d}function Zs(e,t,n,r=0,a=1){const o=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),i=e.size,s=(i-1)*r;return"function"==typeof n?n(o,i):1===a?o*r:s-o*r}function el(e,t,n={}){const r=Ws(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const o=r?()=>Promise.all(Js(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:s}=a;return function(e,t,n=0,r=0,a=0,o=1,i){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(el(l,t,{...i,delay:n+("function"==typeof r?0:r)+Zs(e.variantChildren,l,r,a,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,o,i,s,n)}:()=>Promise.resolve(),{when:s}=a;if(s){const[e,t]="beforeChildren"===s?[o,i]:[i,o];return e().then(()=>t())}return Promise.all([o(),i(n.delay)])}var tl=hs.length;function nl(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&nl(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<tl;n++){const r=hs[n],a=e.props[r];(ds(a)||!1===a)&&(t[r]=a)}return t}function rl(e,t){if(!Array.isArray(t))return!1;const 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 al=[...fs].reverse(),ol=fs.length;function il(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const a=t.map(t=>el(e,t,n));r=Promise.all(a)}else if("string"==typeof t)r=el(e,t,n);else{const a="function"==typeof t?Ws(e,t,n.custom):t;r=Promise.all(Js(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function sl(e){let t=il(e),n=ul(),r=!0,a=!1;const o=t=>(n,r)=>{const a=Ws(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(a){const{transition:e,transitionEnd:t,...r}=a;n={...n,...r,...t}}return n};function i(i){const{props:s}=e,l=nl(e.parent)||{},c=[],u=new Set;let d={},f=1/0;for(let t=0;t<ol;t++){const h=al[t],p=n[h],m=void 0!==s[h]?s[h]:l[h],g=ds(m),y=h===i?p.isActive:null;!1===y&&(f=t);let v=m===l[h]&&m!==s[h]&&g;if(v&&(r||a)&&e.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...d},!p.isActive&&null===y||!m&&!p.prevProp||us(m)||"boolean"==typeof m)continue;if("exit"===h&&p.isActive&&!0!==y){p.prevResolvedValues&&(d={...d,...p.prevResolvedValues});continue}const b=ll(p.prevProp,m);let x=b||h===i&&p.isActive&&!v&&g||t>f&&g,w=!1;const S=Array.isArray(m)?m:[m];let k=S.reduce(o(h),{});!1===y&&(k={});const{prevResolvedValues:E={}}=p,C={...E,...k},N=t=>{x=!0,u.has(t)&&(w=!0,u.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in C){const t=k[e],n=E[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Ks(t)&&Ks(n)?!rl(t,n)||b:t!==n,r?null!=t?N(e):u.add(e):void 0!==t&&u.has(e)?N(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=k,p.isActive&&(d={...d,...k}),(r||a)&&e.blockInitialAnimation&&(x=!1);const j=v&&b;!x||j&&!w||c.push(...S.map(t=>{const n={type:h};if("string"==typeof t&&(r||a)&&!j&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,a=Ws(r,t);if(r.enteringChildren&&a){const{delayChildren:t}=a.transition||{};n.delay=Zs(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){const t={};if("boolean"!=typeof s.initial){const n=Ws(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{const r=e.getBaseTarget(n),a=e.getValue(n);a&&(a.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let h=Boolean(c.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(h=!1),r=!1,a=!1,h?t(c):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=ul(),a=!0}}}function ll(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!rl(t,e)}function cl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ul(){return{animate:cl(!0),whileInView:cl(),whileHover:cl(),whileTap:cl(),whileDrag:cl(),whileFocus:cl(),exit:cl()}}function dl(e){return e.max-e.min}function fl(e,t,n,r=.5){e.origin=r,e.originPoint=Kr(t.min,t.max,e.origin),e.scale=dl(n)/dl(t),e.translate=Kr(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function hl(e,t,n,r){fl(e.x,t.x,n.x,r?r.originX:void 0),fl(e.y,t.y,n.y,r?r.originY:void 0)}function pl(e,t,n,r=0){e.min=(r?Kr(n.min,n.max,r):n.min)+t.min,e.max=e.min+dl(t)}function ml(e,t,n,r=0){const a=r?Kr(n.min,n.max,r):n.min;e.min=t.min-a,e.max=e.min+dl(t)}function gl(e,t,n,r){ml(e.x,t.x,n.x,r?.x),ml(e.y,t.y,n.y,r?.y)}function yl(e){return[e("x"),e("y")]}function vl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function bl(e){return vi(e)?e.get():e}var xl=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],wl=xl.length,Sl=e=>"string"==typeof e?parseFloat(e):e,kl=e=>"number"==typeof e||Pr.test(e);function El(e,t){return void 0!==e[t]?e[t]:e.borderRadius}var Cl=jl(0,.5,Wn),Nl=jl(.5,.95,On);function jl(e,t,n){return r=>r<e?0:r>t?1:n(An(e,t,r))}function Tl(e,t){e.min=t.min,e.max=t.max}function Rl(e,t){Tl(e.x,t.x),Tl(e.y,t.y)}function Ol(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Pl(e,t,n,r,a){return e=ji(e-=t,1/n,r),void 0!==a&&(e=ji(e,1/a,r)),e}function Al(e,t,[n,r,a],o,i){!function(e,t=0,n=1,r=.5,a,o=e,i=e){if(Or.test(t)&&(t=parseFloat(t),t=Kr(i.min,i.max,t/100)-i.min),"number"!=typeof t)return;let s=Kr(o.min,o.max,r);e===o&&(s-=t),e.min=Pl(e.min,t,n,s,a),e.max=Pl(e.max,t,n,s,a)}(e,t[n],t[r],t[a],t.scale,o,i)}var _l=["x","scaleX","originX"],Dl=["y","scaleY","originY"];function Ml(e,t,n,r){Al(e.x,t,_l,n?n.x:void 0,r?r.x:void 0),Al(e.y,t,Dl,n?n.y:void 0,r?r.y:void 0)}function Ll(e){return 0===e.translate&&1===e.scale}function Il(e){return Ll(e.x)&&Ll(e.y)}function zl(e,t){return e.min===t.min&&e.max===t.max}function Fl(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Bl(e,t){return Fl(e.x,t.x)&&Fl(e.y,t.y)}function Ul(e){return dl(e.x)/dl(e.y)}function Vl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var $l=class{constructor(){this.members=[]}add(e){Sn(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1!==r.isConnected||n.snapshot||(kn(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(kn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent&&!1!==e.instance?.isConnected)return this.promote(e),!0}return!1}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=n.options,{layoutDependency:a}=e.options;void 0!==r&&r===a||(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)),!1===e.options.crossfade&&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)}};var Hl=(e,t)=>e.depth-t.depth,ql=class{constructor(){this.children=[],this.isDirty=!1}add(e){Sn(this.children,e),this.isDirty=!0}remove(e){kn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Hl),this.isDirty=!1,this.children.forEach(e)}},Wl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Kl={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Gl=["","X","Y","Z"],Yl=0;function Xl(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ql(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Xs(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ar,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ql(r)}function Jl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(e={},n=t?.()){this.id=Yl++,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,tr.value&&(Kl.nodes=Kl.calculatedTargetDeltas=Kl.calculatedProjections=0),this.nodes.forEach(tc),this.nodes.forEach(uc),this.nodes.forEach(dc),this.nodes.forEach(nc),tr.addProjectionMetrics&&tr.addProjectionMetrics(Kl)},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 t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ql)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new _n),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=oi(t)&&!(oi(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:a,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(a||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const a=()=>this.root.updateBlockedByResize=!1;ar.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=cr.now(),r=({timestamp:a})=>{const o=a-n;o>=t&&(or(r),e(o-t))};return ar.setup(r,!0),()=>or(r)}(a,250),Wl.hasAnimatedSinceResize&&(Wl.hasAnimatedSinceResize=!1,this.nodes.forEach(cc)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&o&&(r||a)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const a=this.options.transition||o.getDefaultTransition()||yc,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=o.getProps(),l=!this.targetLayout||!Bl(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...Ao(a,"layout"),onPlay:i,onComplete:s};(o.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c,t.path)}else t||cc(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),or(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(fc),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ql(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let a=0;a<this.path.length;a++){const e=this.path[a];e.shouldResetTransform=!0,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const e=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(oc),void this.nodes.forEach(ac)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(ic);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(sc),this.nodes.forEach(lc),this.nodes.forEach(Zl),this.nodes.forEach(ec)):this.nodes.forEach(ic),this.clearAllSnapshots();const e=cr.now();ir.delta=En(0,1e3/60,e-ir.timestamp),ir.timestamp=e,ir.isProcessing=!0,sr.update.process(ir),sr.preRender.process(ir),sr.render.process(ir),ir.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Uo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rc),this.sharedNodes.forEach(hc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ar.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ar.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||dl(this.snapshot.measuredBox.x)||dl(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++)this.path[n].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const 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(!a)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Il(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Ei(this.latestValues)||o)&&(a(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),xc((r=n).x),xc(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!this.scroll?.wasRoot&&!this.path.some(Sc)){const{scroll:e}=this.root;e&&(_i(t.x,e.offset.x),_i(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(Rl(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:a,options:o}=r;r!==this.root&&a&&o.layoutScroll&&(a.wasRoot&&Rl(t,e),_i(t.x,a.offset.x),_i(t.y,a.offset.y))}return t}applyTransform(e,t=!1,n){const r=n||{x:{min:0,max:0},y:{min:0,max:0}};Rl(r,e);for(let a=0;a<this.path.length;a++){const e=this.path[a];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&(_i(r.x,-e.scroll.offset.x),_i(r.y,-e.scroll.offset.y)),Ei(e.latestValues)&&Li(r,e.latestValues,e.layout?.layoutBox)}return Ei(this.latestValues)&&Li(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};Rl(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!Ei(e.latestValues))continue;let r;e.instance&&(ki(e.latestValues)&&e.updateSnapshot(),r=as(),Rl(r,e.measurePageBox())),Ml(t,e.latestValues,e.snapshot?.layoutBox,r)}return Ei(this.latestValues)&&Ml(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||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!==ir.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:a}=this.options;if(!this.layout||!r&&!a)return;this.resolvedRelativeTargetAt=ir.timestamp;const o=this.getClosestProjectingParent();var i,s,l,c;(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),i=this.target,s=this.relativeTarget,l=this.relativeParent.target,c=this.options.layoutAnchor||void 0,pl(i.x,s.x,l.x,c?.x),pl(i.y,s.y,l.y,c?.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):Rl(this.target,this.layout.layoutBox),Oi(this.target,this.targetDelta)):Rl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0),tr.value&&Kl.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!ki(this.parent.latestValues)&&!Ci(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},gl(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Rl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===ir.timestamp&&(n=!1),n)return;const{layout:r,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!a)return;Rl(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,i=this.treeScale.y;!function(e,t,n,r=!1){const a=n.length;if(!a)return;let o,i;t.x=t.y=1;for(let s=0;s<a;s++){o=n[s],i=o.projectionDelta;const{visualElement:a}=o.options;a&&a.props.style&&"contents"===a.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(_i(e.x,-o.scroll.offset.x),_i(e.y,-o.scroll.offset.y)),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Oi(e,i)),r&&Ei(o.latestValues)&&Li(e,o.latestValues,o.layout?.layoutBox))}t.x<Ai&&t.x>Pi&&(t.x=1),t.y<Ai&&t.y>Pi&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:s}=e;s?(this.projectionDelta&&this.prevProjectionDelta?(Ol(this.prevProjectionDelta.x,this.projectionDelta.x),Ol(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),hl(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===o&&this.treeScale.y===i&&Vl(this.projectionDelta.x,this.prevProjectionDelta.x)&&Vl(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s)),tr.value&&Kl.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1,n){const r=this.snapshot,a=r?r.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},l=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),u=!c||c.members.length<=1,d=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(gc));let f;this.animationProgress=0;const h=n?.interpolateProjection(e);this.mixTargetDelta=t=>{const n=t/1e3,r=h?.(n);var c,p,m,g,y,v;r?(i.x.translate=r.x,i.x.scale=Kr(e.x.scale,1,n),i.x.origin=e.x.origin,i.x.originPoint=e.x.originPoint,i.y.translate=r.y,i.y.scale=Kr(e.y.scale,1,n),i.y.origin=e.y.origin,i.y.originPoint=e.y.originPoint):(pc(i.x,e.x,n),pc(i.y,e.y,n)),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(gl(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),m=this.relativeTarget,g=this.relativeTargetOrigin,y=s,v=n,mc(m.x,g.x,y.x,v),mc(m.y,g.y,y.y,v),f&&(c=this.relativeTarget,p=f,zl(c.x,p.x)&&zl(c.y,p.y))&&(this.isProjectionDirty=!1),f||(f={x:{min:0,max:0},y:{min:0,max:0}}),Rl(f,this.relativeTarget)),l&&(this.animationValues=o,function(e,t,n,r,a,o){a?(e.opacity=Kr(0,n.opacity??1,Cl(r)),e.opacityExit=Kr(t.opacity??1,0,Nl(r))):o&&(e.opacity=Kr(t.opacity??1,n.opacity??1,r));for(let i=0;i<wl;i++){const a=xl[i];let o=El(t,a),s=El(n,a);void 0===o&&void 0===s||(o||(o=0),s||(s=0),0===o||0===s||kl(o)===kl(s)?(e[a]=Math.max(Kr(Sl(o),Sl(s),r),0),(Or.test(s)||Or.test(o))&&(e[a]+="%")):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=Kr(t.rotate||0,n.rotate||0,r))}(o,a,this.latestValues,n,d,u)),r&&void 0!==r.rotate&&(this.animationValues||(this.animationValues=o),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&&(or(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ar.update(()=>{Wl.hasAnimatedSinceResize=!0,ur.layout++,this.motionValue||(this.motionValue=ss(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){const r=vi(e)?e:ss(e);return r.start(zo("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{ur.layout--},onComplete:()=>{ur.layout--,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);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:a}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&wc(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=dl(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=dl(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Rl(t,n),Li(t,a),hl(this.projectionDeltaWithTransform,this.layoutCorrected,t,a)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new $l),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Xl("z",e,r,this.animationValues);for(let a=0;a<Gl.length;a++)Xl(`rotate${Gl[a]}`,e,r,this.animationValues),Xl(`skew${Gl[a]}`,e,r,this.animationValues);e.render();for(const a in r)e.setStaticValue(a,r[a]),this.animationValues&&(this.animationValues[a]=r[a]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=bl(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=bl(t?.pointerEvents)||""),void(this.hasProjected&&!Ei(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const a=r.animationValues||r.latestValues;this.applyTransformsToTarget();let o=function(e,t,n){let r="";const a=e.x.translate/t.x,o=e.y.translate/t.y,i=n?.z||0;if((a||o||i)&&(r=`translate3d(${a}px, ${o}px, ${i}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,pathRotation:a,rotateX:o,rotateY:i,skewX:s,skewY:l}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),a&&(r+=`rotate(${a}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),s&&(r+=`skewX(${s}deg) `),l&&(r+=`skewY(${l}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a);n&&(o=n(a,o)),e.transform=o;const{x:i,y:s}=this.projectionDelta;e.transformOrigin=`${100*i.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?a.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:e.opacity=r===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const l in Ds){if(void 0===a[l])continue;const{correct:t,applyTo:n,isCSSVariable:i}=Ds[l],s="none"===o?a[l]:t(a[l],r);if(n){const t=n.length;for(let r=0;r<t;r++)e[n[r]]=s}else i?this.options.visualElement.renderState.vars[l]=s:e[l]=s}this.options.layoutId&&(e.pointerEvents=r===this?bl(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(ac),this.root.sharedNodes.clear()}}}function Zl(e){e.updateLayout()}function ec(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;if("size"===a)yl(e=>{const r=o?t.measuredBox[e]:t.layoutBox[e],a=dl(r);r.min=n[e].min,r.max=r.min+a});else if("x"===a||"y"===a){const e="x"===a?"y":"x";Tl(o?t.measuredBox[e]:t.layoutBox[e],n[e])}else wc(a,t.layoutBox,n)&&yl(r=>{const a=o?t.measuredBox[r]:t.layoutBox[r],i=dl(n[r]);a.max=a.min+i,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+i)});const i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};hl(i,n,t.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?hl(s,e.applyTransform(r,!0),t.measuredBox):hl(s,n,t.layoutBox);const l=!Il(i);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:a,layout:o}=r;if(a&&o){const i=e.options.layoutAnchor||void 0,s={x:{min:0,max:0},y:{min:0,max:0}};gl(s,t.layoutBox,a.layoutBox,i);const l={x:{min:0,max:0},y:{min:0,max:0}};gl(l,n,o.layoutBox,i),Bl(s,l)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function tc(e){tr.value&&Kl.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function nc(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function rc(e){e.clearSnapshot()}function ac(e){e.clearMeasurements()}function oc(e){e.isLayoutDirty=!0,e.updateLayout()}function ic(e){e.isLayoutDirty=!1}function sc(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function lc(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function cc(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function uc(e){e.resolveTargetDelta()}function dc(e){e.calcProjection()}function fc(e){e.resetSkewAndRotation()}function hc(e){e.removeLeadSnapshot()}function pc(e,t,n){e.translate=Kr(t.translate,0,n),e.scale=Kr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function mc(e,t,n,r){e.min=Kr(t.min,n.min,r),e.max=Kr(t.max,n.max,r)}function gc(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}var yc={duration:.45,ease:[.4,0,.1,1]},vc=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),bc=vc("applewebkit/")&&!vc("chrome/")?Math.round:On;function xc(e){e.min=bc(e.min),e.max=bc(e.max)}function wc(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Ul(t),a=Ul(n),o=.2,!(Math.abs(r-a)<=o));var r,a,o}function Sc(e){return e!==e.root&&e.scroll?.wasRoot}var kc=Jl({attachResizeListener:(e,t)=>vl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ec={current:void 0},Cc=Jl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ec.current){const e=new kc({});e.mount(window),e.setOptions({layoutScroll:!0}),Ec.current=e}return Ec.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Nc=(0,k.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function jc(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Tc(...e){return k.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=jc(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():jc(e[t],null)}}}}(...e),e)}var Rc=yn(),Oc=class extends k.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(Go(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=Go(e)&&e.offsetWidth||0,r=Go(e)&&e.offsetHeight||0,a=getComputedStyle(t),o=this.props.sizeRef.current;o.height=parseFloat(a.height),o.width=parseFloat(a.width),o.top=t.offsetTop,o.left=t.offsetLeft,o.right=n-o.width-o.left,o.bottom=r-o.height-o.top,o.direction=a.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function Pc({children:e,isPresent:t,anchorX:n,anchorY:r,root:a,pop:o}){const i=(0,k.useId)(),s=(0,k.useRef)(null),l=(0,k.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:c}=(0,k.useContext)(Nc),u=Tc(s,e.props?.ref??e?.ref);return(0,k.useInsertionEffect)(()=>{const{width:e,height:u,top:d,left:f,right:h,bottom:p,direction:m}=l.current;if(t||!1===o||!s.current||!e||!u)return;const g="rtl"===m,y="left"===n?g?`right: ${h}`:`left: ${f}`:g?`left: ${f}`:`right: ${h}`,v="bottom"===r?`bottom: ${p}`:`top: ${d}`;s.current.dataset.motionPopId=i;const b=document.createElement("style");c&&(b.nonce=c);const x=a??document.head;return x.appendChild(b),b.sheet&&b.sheet.insertRule(`\n [data-motion-pop-id="${i}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${u}px !important;\n ${y}px !important;\n ${v}px !important;\n }\n `),()=>{s.current?.removeAttribute("data-motion-pop-id"),x.contains(b)&&x.removeChild(b)}},[t]),(0,Rc.jsx)(Oc,{isPresent:t,childRef:s,sizeRef:l,pop:o,children:!1===o?e:k.cloneElement(e,{ref:u})})}var Ac=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:o,mode:i,anchorX:s,anchorY:l,root:c})=>{const u=bn(_c),d=(0,k.useId)();let f=!0,h=(0,k.useMemo)(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:a,onExitComplete:e=>{u.set(e,!0);for(const t of u.values())if(!t)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[n,u,r]);return o&&f&&(h={...h}),(0,k.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),k.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,Rc.jsx)(Pc,{pop:"popLayout"===i,isPresent:n,anchorX:s,anchorY:l,root:c,children:e}),(0,Rc.jsx)(wn.Provider,{value:h,children:e})};function _c(){return new Map}function Dc(e=!0){const t=(0,k.useContext)(wn);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,o=(0,k.useId)();(0,k.useEffect)(()=>{if(e)return a(o)},[e]);const i=(0,k.useCallback)(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}var Mc=e=>e.key||"";function Lc(e){const t=[];return k.Children.forEach(e,e=>{(0,k.isValidElement)(e)&&t.push(e)}),t}var Ic=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:o="sync",propagate:i=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=Dc(i),f=(0,k.useMemo)(()=>Lc(e),[e]),h=i&&!u?[]:f.map(Mc),p=(0,k.useRef)(!0),m=(0,k.useRef)(f),g=bn(()=>new Map),y=(0,k.useRef)(new Set),[v,b]=(0,k.useState)(f),[x,w]=(0,k.useState)(f);xn(()=>{p.current=!1,m.current=f;for(let e=0;e<x.length;e++){const t=Mc(x[e]);h.includes(t)?(g.delete(t),y.current.delete(t)):!0!==g.get(t)&&g.set(t,!1)}},[x,h.length,h.join("-")]);const S=[];if(f!==v){let e=[...f];for(let t=0;t<x.length;t++){const n=x[t],r=Mc(n);h.includes(r)||(e.splice(t,0,n),S.push(n))}return"wait"===o&&S.length&&(e=S),w(Lc(e)),b(f),null}const{forceRender:E}=(0,k.useContext)(vn);return(0,Rc.jsx)(Rc.Fragment,{children:x.map(e=>{const v=Mc(e),b=!(i&&!u)&&(f===x||h.includes(v));return(0,Rc.jsx)(Ac,{isPresent:b,initial:!(p.current&&!n)&&void 0,custom:t,presenceAffectsLayout:a,mode:o,root:c,onExitComplete:b?void 0:()=>{if(y.current.has(v))return;if(!g.has(v))return;y.current.add(v),g.set(v,!0);let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(E?.(),w(m.current),i&&d?.(),r&&r())},anchorX:s,anchorY:l,children:e},v)})})},zc=["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 Fc(e){return"string"==typeof e&&!e.includes("-")&&!!(zc.indexOf(e)>-1||/[A-Z]/u.test(e))}var Bc=(e,t)=>t.isSVG??Fc(e)?new qs(t):new Is(t,{allowProjection:e!==k.Fragment}),Uc=(0,k.createContext)({strict:!1}),Vc=(0,k.createContext)({});function $c(e){const{initial:t,animate:n}=function(e,t){if(ps(e)){const{initial:t,animate:n}=e;return{initial:!1===t||ds(t)?t:void 0,animate:ds(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,k.useContext)(Vc));return(0,k.useMemo)(()=>({initial:t,animate:n}),[Hc(t),Hc(n)])}function Hc(e){return Array.isArray(e)?e.join(" "):e}var qc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Wc(e,t,n){for(const r in t)vi(t[r])||Ms(r,n)||(e[r]=t[r])}function Kc(e,t){const n={};return Wc(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,k.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Rs(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function Gc(e,t){const n={},r=Kc(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Yc=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function Xc(e,t,n,r){const a=(0,k.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Us(n,t,$s(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};Wc(t,e.style,e),a.style={...t,...a.style}}return a}var Qc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Jc(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Qc.has(e)}var Zc,eu,tu,nu,ru,au,ou=s({default:()=>Zc}),iu=(eu=()=>{throw Zc={},new Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?')},()=>{if(nu)throw nu[0];try{return eu&&(tu=eu(eu=0)),tu}catch(e){throw nu=[e],e}}),su=e=>!Jc(e);try{"function"==typeof(ru=(iu(),au=ou,o.call(au,"module.exports")?au["module.exports"]:l(t({},"__esModule",{value:!0}),au)).default)&&(su=e=>e.startsWith("on")?!Jc(e):ru(e))}catch{}function lu(e,t,n,{latestValues:r},a,o=!1,i){const s=(i??Fc(e)?Xc:Gc)(t,r,a,e),l=function(e,t,n){const r={};for(const a in e)"values"===a&&"object"==typeof e.values||vi(e[a])||(su(a)||!0===n&&Jc(a)||!t&&!Jc(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}(t,"string"==typeof e,o),c=e!==k.Fragment?{...l,...s,ref:n}:{},{children:u}=t,d=(0,k.useMemo)(()=>vi(u)?u.get():u,[u]);return(0,k.createElement)(e,{...c,children:d})}function cu(e,t,n,r){const a={},o=r(e,{});for(const f in o)a[f]=bl(o[f]);let{initial:i,animate:s}=e;const l=ps(e),c=ms(e);t&&c&&!l&&!1!==e.inherit&&(void 0===i&&(i=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===i;const d=u?s:i;if(d&&"boolean"!=typeof d&&!us(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=xs(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[u?e.length-1:0]}null!==e&&(a[r]=e)}for(const r in e)a[r]=e[r]}}}return a}var uu=e=>(t,n)=>{const r=(0,k.useContext)(Vc),a=(0,k.useContext)(wn),o=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:cu(n,r,a,e),renderState:t()}}(e,t,r,a);return n?o():bn(o)},du=uu({scrapeMotionValuesFromProps:Ls,createRenderState:qc}),fu=uu({scrapeMotionValuesFromProps:Hs,createRenderState:Yc}),hu={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"]},pu=!1;function mu(){return function(){if(pu)return;const e={};for(const t in hu)e[t]={isEnabled:e=>hu[t].some(t=>!!e[t])};ks(e),pu=!0}(),Ss}var gu=Symbol.for("motionComponentSymbol");function yu(e,t,n){const r=(0,k.useRef)(n);(0,k.useInsertionEffect)(()=>{r.current=n});const a=(0,k.useRef)(null);return(0,k.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());const o=r.current;if("function"==typeof o)if(n){const e=o(n);"function"==typeof e&&(a.current=e)}else a.current?(a.current(),a.current=null):o(n);else o&&(o.current=n)},[t])}var vu=(0,k.createContext)({});function bu(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function xu(e,t,n,r,a,o){const{visualElement:i}=(0,k.useContext)(Vc),s=(0,k.useContext)(Uc),l=(0,k.useContext)(wn),c=(0,k.useContext)(Nc),u=c.reducedMotion,d=c.skipAnimations,f=(0,k.useRef)(null),h=(0,k.useRef)(!1);r=r||s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u,skipAnimations:d,isSVG:o}),h.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const p=f.current,m=(0,k.useContext)(vu);!p||p.projection||!a||"html"!==p.type&&"svg"!==p.type||function(e,t,n,r){const{layoutId:a,layout:o,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:wu(e.parent)),e.projection.setOptions({layoutId:a,layout:o,alwaysMeasureLayout:Boolean(i)||s&&bu(s),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}(f.current,n,a,m);const g=(0,k.useRef)(!1);(0,k.useInsertionEffect)(()=>{p&&g.current&&p.update(n,l)});const y=n[Bo],v=(0,k.useRef)(Boolean(y)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return xn(()=>{h.current=!0,p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),v.current&&p.animationState&&p.animationState.animateChanges())}),(0,k.useEffect)(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),v.current=!1),p.enteringChildren=void 0)}),p}function wu(e){if(e)return!1!==e.options.allowProjection?e.projection:wu(e.parent)}function Su(e,{forwardMotionProps:t=!1,type:n}={},r,a){r&&function(e){const t=mu();for(const n in e)t[n]={...t[n],...e[n]};ks(t)}(r);const o=n?"svg"===n:Fc(e),i=o?fu:du;function s(n,r){let s;const l={...(0,k.useContext)(Nc),...n,layoutId:ku(n)},{isStatic:c}=l,u=$c(n),d=i(n,c);if(!c&&"undefined"!=typeof window){(0,k.useContext)(Uc).strict;const t=function(e){const{drag:t,layout:n}=mu();if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(l);s=t.MeasureLayout,u.visualElement=xu(e,d,l,a,t.ProjectionNode,o)}return(0,Rc.jsxs)(Vc.Provider,{value:u,children:[s&&u.visualElement?(0,Rc.jsx)(s,{visualElement:u.visualElement,...l}):null,lu(e,n,yu(d,u.visualElement,r),d,c,t,o)]})}s.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const l=(0,k.forwardRef)(s);return l[gu]=e,l}function ku({layoutId:e}){const t=(0,k.useContext)(vn).id;return t&&void 0!==e?t+"-"+e:e}function Eu(e,t){if("undefined"==typeof Proxy)return Su;const n=new Map,r=(n,r)=>Su(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(a,o)=>"create"===o?r:(n.has(o)||n.set(o,Su(o,void 0,e,t)),n.get(o))})}var Cu=0,Nu={animation:{Feature:class extends xi{constructor(e){super(e),e.animationState||(e.animationState=sl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();us(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends xi{constructor(){super(...arguments),this.id=Cu++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){const{initial:e,custom:t}=this.node.getProps();if("string"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)){const n=Ws(this.node,e,t);if(n){const{transition:e,transitionEnd:t,...r}=n;for(const n in r)this.node.getValue(n)?.jump(r[n])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function ju(e){return{point:{x:e.pageX,y:e.pageY}}}function Tu(e,t,n,r){return vl(e,t,(e=>t=>Xo(t)&&e(t,ju(t)))(n),r)}var Ru=({current:e})=>e?e.ownerDocument.defaultView:null,Ou=(e,t)=>Math.abs(e-t);var Pu=new Set(["auto","scroll"]),Au=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3,element:i}={}){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=_u(this.lastRawMoveEventInfo,this.transformPagePoint));const e=Mu(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Ou(e.x,t.x),r=Ou(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:a}=ir;this.history.push({...r,timestamp:a});const{onStart:o,onMove:i}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),i&&i(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=_u(t,this.transformPagePoint),ar.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:a}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||a&&a(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Mu("pointercancel"===e.type?this.lastMoveEventInfo:_u(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!Xo(e))return;this.dragSnapToOrigin=a,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const s=_u(ju(e),this.transformPagePoint),{point:l}=s,{timestamp:c}=ir;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=t;u&&u(e,Mu(s,this.history)),this.removeListeners=Pn(Tu(this.contextWindow,"pointermove",this.handlePointerMove),Tu(this.contextWindow,"pointerup",this.handlePointerUp),Tu(this.contextWindow,"pointercancel",this.handlePointerUp)),i&&this.startScrollTracking(i)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(Pu.has(e.overflowX)||Pu.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){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},a=r.x-t.x,o=r.y-t.y;0===a&&0===o||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a,this.lastMoveEventInfo.point.y+=o):this.history.length>0&&(this.history[0].x-=a,this.history[0].y-=o),this.scrollPositions.set(e,r),ar.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),or(this.updatePoint)}};function _u(e,t){return t?{point:t(e.point)}:e}function Du(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Mu({point:e},t){return{point:e,delta:Du(e,Iu(t)),offset:Du(e,Lu(t)),velocity:zu(t,.1)}}function Lu(e){return e[0]}function Iu(e){return e[e.length-1]}function zu(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=Iu(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>Dn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&a.timestamp-r.timestamp>2*Dn(t)&&(r=e[1]);const o=Mn(a.timestamp-r.timestamp);if(0===o)return{x:0,y:0};const i={x:(a.x-r.x)/o,y:(a.y-r.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Fu(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Bu(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}}var Uu=.35;function Vu(e,t,n){return{min:$u(e,t),max:$u(e,n)}}function $u(e,t){return"number"==typeof e?e:e[t]||0}var Hu=new WeakMap,qu=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={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:a}=this.getProps();this.panSession=new Au(e,{onSessionStart:e=>{t&&this.snapToCursor(ju(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:a}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?$o[o]?null:($o[o]=!0,()=>{$o[o]=!1}):$o.x||$o.y?null:($o.x=$o.y=!0,()=>{$o.x=$o.y=!1}),!this.openDragLock))return;var o;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),yl(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Or.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=dl(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),a&&ar.update(()=>a(e,t),!1,!0),bi(this.visualElement,"transform");const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:a,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:i}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(i),void(null!==this.currentDirection&&a&&a(this.currentDirection));this.updateAxis("x",t.point,i),this.updateAxis("y",t.point,i),this.visualElement.render(),o&&ar.update(()=>o(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:n,contextWindow:Ru(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!r||!n)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&ar.postRender(()=>i(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{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){const{drag:r}=this.getProps();if(!n||!Ku(e,r,this.currentDirection))return;const a=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Kr(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Kr(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),a.set(o)}resolveConstraints(){const{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&&bu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:a}){return{x:Fu(e.x,n,a),y:Fu(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Uu){return!1===e?e=0:!0===e&&(e=Uu),{x:Vu(e,"left","right"),y:Vu(e,"top","bottom")}}(t),r!==this.constraints&&!bu(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&yl(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!bu(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());const a=function(e,t,n){const r=Ii(e,n),{scroll:a}=t;return a&&(_i(r.x,a.offset.x),_i(r.y,a.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:Bu(e.x,t.x),y:Bu(e.y,t.y)}}(r.layout.layoutBox,a);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=wi(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:i}=this.getProps(),s=this.constraints||{},l=yl(i=>{if(!Ku(i,t,this.currentDirection))return;let l=s&&s[i]||{};!0!==o&&o!==i||(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[i]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...a,...l};return this.startAxisValueAnimation(i,d)});return Promise.all(l).then(i)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return bi(this.visualElement,e),n.start(zo(e,n,0,t,this.visualElement,!1))}stopAnimation(){yl(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps()[t];return n||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){yl(t=>{const{drag:n}=this.getProps();if(!Ku(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,a=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[t],i=a.get()||0;a.set(e[t]-Kr(n,o,.5)+i)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!bu(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};yl(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=dl(e),a=dl(t);return a>r?n=An(t.min,t.max-r,e.min):r>a&&(n=An(e.min,e.max-a,t.min)),En(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),yl(t=>{if(!Ku(t,e,null))return;const n=this.getAxisMotionValue(t),{min:a,max:o}=this.constraints[t];n.set(Kr(a,o,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Hu.set(this.visualElement,this);const e=this.visualElement.current,t=Tu(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),a=t.target,o=a!==e&&function(e){return Jo.has(e.tagName)||!0===e.isContentEditable}(a);n&&r&&!o&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();bu(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=yi(e,Wu(n)),a=yi(t,Wu(n));return()=>{r(),a()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,o=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),ar.read(r);const i=vl(window,"resize",()=>this.scalePositionWithinConstraints()),s=a.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(yl(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),t(),o(),s&&s(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:a=!1,dragElastic:o=Uu,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:a,dragElastic:o,dragMomentum:i}}};function Wu(e){let t=!0;return()=>{t?t=!1:e()}}function Ku(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}var Gu=e=>(t,n)=>{e&&ar.update(()=>e(t,n),!1,!0)},Yu=!1,Xu=class extends k.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:a}=e;a&&(t.group&&t.group.add(a),n&&n.register&&r&&n.register(a),Yu&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Wl.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:a}=this.props,{projection:o}=n;return o?(o.isPresent=a,e.layoutDependency!==t&&o.setOptions({...o.options,layoutDependency:t}),Yu=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||ar.postRender(()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Uo.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Yu=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Qu(e){const[t,n]=Dc(),r=(0,k.useContext)(vn);return(0,Rc.jsx)(Xu,{...e,layoutGroup:r,switchLayoutGroup:(0,k.useContext)(vu),isPresent:t,safeToRemove:n})}var Ju={pan:{Feature:class extends xi{constructor(){super(...arguments),this.removePointerDownListener=On}onPointerDown(e){this.session=new Au(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ru(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Gu(e),onStart:Gu(t),onMove:Gu(n),onEnd:(e,t)=>{delete this.session,r&&ar.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Tu(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends xi{constructor(e){super(e),this.removeGroupControls=On,this.removeListeners=On,this.controls=new qu(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||On}update(){const{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()}},ProjectionNode:Cc,MeasureLayout:Qu}};function Zu(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const a=r["onHover"+n];a&&ar.postRender(()=>a(t,ju(t)))}function ed(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const a=r["onTap"+("End"===n?"":n)];a&&ar.postRender(()=>a(t,ju(t)))}var td=new WeakMap,nd=new WeakMap,rd=e=>{const t=td.get(e.target);t&&t(e)},ad=e=>{e.forEach(rd)};function od(e,t,n){const r=function({root:e,...t}){const n=e||document;nd.has(n)||nd.set(n,{});const r=nd.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(ad,{root:e,...t})),r[a]}(t);return td.set(e,n),r.observe(e),()=>{td.delete(e),r.unobserve(e)}}var id={some:0,all:1};var sd={inView:{Feature:class extends xi{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:a}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:id[r]};this.stopObserver=od(this.node.current,o,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,a&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends xi{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=ai(e,(e,t)=>(ed(this.node,t,"Start"),(e,{success:t})=>ed(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends xi{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){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=Pn(vl(this.node.current,"focus",()=>this.onFocus()),vl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends xi{mount(){const{current:e}=this.node;e&&(this.unmount=Ko(e,(e,t)=>(Zu(this.node,t,"Start"),e=>Zu(this.node,e,"End"))))}unmount(){}}}},ld=Eu({...Nu,...sd,...Ju,...{layout:{ProjectionNode:Cc,MeasureLayout:Qu}}},Bc),cd=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),ud=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},dd={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"},fd=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},hd=(0,k.createContext)({}),pd=(0,k.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:a="",children:o,iconNode:i,...s},l)=>{const{size:c=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f="currentColor",className:h=""}=(0,k.useContext)(hd)??{},p=r??d?24*Number(n??u)/Number(t??c):n??u;return(0,k.createElement)("svg",{ref:l,...dd,width:t??c??dd.width,height:t??c??dd.height,stroke:e??f,strokeWidth:p,className:cd("lucide",h,a),...!o&&!fd(s)&&{"aria-hidden":"true"},...s},[...i.map(([e,t])=>(0,k.createElement)(e,t)),...Array.isArray(o)?o:[o]])}),md=(e,t)=>{const n=(0,k.forwardRef)(({className:n,...r},a)=>{return(0,k.createElement)(pd,{ref:a,iconNode:t,className:cd(`lucide-${o=ud(e),o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var o});return n.displayName=ud(e),n},gd=md("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"}]]),yd=md("chart-no-axes-column-increasing",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V9",key:"uvy0l4"}],["path",{d:"M19 21V3",key:"11j9sm"}]]),vd=md("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"}]]),bd=md("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),xd=md("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]),wd=md("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),Sd=md("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]),kd=md("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"}]]),Ed=md("grid-3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]),Cd=md("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]),Nd=md("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),jd=md("panels-top-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]),Td=md("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),Rd=md("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"}]]),Od=md("text-align-start",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]]),Pd=md("wand-sparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]),Ad=md("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),_d=md("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]),Dd=md("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]),Md=md("bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]),Ld=md("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),Id=md("calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]),zd=md("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),Fd=md("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Bd=md("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Ud=md("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Vd=md("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),$d=md("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]),Hd=md("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]),qd=md("compass",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]]),Wd=md("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"}]]),Kd=md("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),Gd=md("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]),Yd=md("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),Xd=md("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"}]]),Qd=md("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),Jd=md("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"}]]),Zd=md("file-text",[["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 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),ef=md("file",[["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"}]]),tf=md("folder-tree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]),nf=md("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),rf=md("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]),af=md("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"}]]),of=md("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),sf=md("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]),lf=md("heading",[["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M6 20V4",key:"1w1bmo"}],["path",{d:"M18 20V4",key:"o2hl4u"}]]),cf=md("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),uf=md("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),df=md("italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]),ff=md("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]),hf=md("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]),pf=md("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),mf=md("list-ordered",[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]),gf=md("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]),yf=md("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),vf=md("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),bf=md("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),xf=md("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"}]]),wf=md("music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]),Sf=md("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]),kf=md("percent",[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]]),Ef=md("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]),Cf=md("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"}]]),Nf=md("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),jf=md("quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]),Tf=md("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"}]]),Rf=md("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),Of=md("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"}]]),Pf=md("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),Af=md("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]),_f=md("shapes",[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]),Df=md("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),Mf=md("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]),Lf=md("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]),If=md("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]),zf=md("toggle-left",[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]]),Ff=md("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"}]]),Bf=md("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]),Uf=md("tv",[["path",{d:"m17 2-5 5-5-5",key:"16satq"}],["rect",{width:"20",height:"15",x:"2",y:"7",rx:"2",key:"1e6viu"}]]),Vf=md("type",[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]),$f=md("underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]),Hf=md("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]),qf=md("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]),Wf=md("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Kf=md("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var Gf=Array(12).fill(0),Yf=({visible:e,className:t})=>k.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},k.createElement("div",{className:"sonner-spinner"},Gf.map((e,t)=>k.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),Xf=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Qf=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Jf=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Zf=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),eh=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},k.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),k.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),th=1,nh=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n,...r}=e,a="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:th++,o=this.toasts.find(e=>e.id===a),i=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),o?this.toasts=this.toasts.map(t=>t.id===a?(this.publish({...t,...e,id:a,title:n}),{...t,...e,id:a,dismissible:i,title:n}):t):this.addToast({title:n,...r,dismissible:i,id:a}),a},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let a,o=void 0!==n;const i=r.then(async e=>{if(a=["resolve",e],k.isValidElement(e))o=!1,this.create({id:n,type:"default",message:e});else if(rh(e)&&!e.ok){o=!1;const r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,a="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,i="object"!=typeof r||k.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:a,...i})}else if(e instanceof Error){o=!1;const r="function"==typeof t.error?await t.error(e):t.error,a="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof r||k.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:a,...i})}else if(void 0!==t.success){o=!1;const r="function"==typeof t.success?await t.success(e):t.success,a="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof r||k.isValidElement(r)?{message:r}:r;this.create({id:n,type:"success",description:a,...i})}}).catch(async e=>{if(a=["reject",e],void 0!==t.error){o=!1;const r="function"==typeof t.error?await t.error(e):t.error,a="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof r||k.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:a,...i})}}).finally(()=>{o&&(this.dismiss(n),n=void 0),null==t.finally||t.finally.call(t)}),s=()=>new Promise((e,t)=>i.then(()=>"reject"===a[0]?t(a[1]):e(a[1])).catch(t));return"string"!=typeof n&&"number"!=typeof n?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||th++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},rh=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,ah=(e,t)=>{const n=(null==t?void 0:t.id)||th++;return nh.addToast({title:e,...t,id:n}),n},oh=Object.assign(ah,{success:nh.success,info:nh.info,warning:nh.warning,error:nh.error,custom:nh.custom,message:nh.message,promise:nh.promise,dismiss:nh.dismiss,loading:nh.loading},{getHistory:()=>nh.toasts,getToasts:()=>nh.getActiveToasts()});function ih(e){return void 0!==e.label}!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");var sh=3,lh=14;function ch(...e){return e.filter(Boolean).join(" ")}var uh=e=>{var t,n,r,a,o,i,s,l,c;const{invert:u,toast:d,unstyled:f,interacting:h,setHeights:p,visibleToasts:m,heights:g,index:y,toasts:v,expanded:b,removeToast:x,defaultRichColors:w,closeButton:S,style:E,cancelButtonStyle:C,actionButtonStyle:N,className:j="",descriptionClassName:T="",duration:R,position:O,gap:P,expandByDefault:A,classNames:_,icons:D,closeButtonAriaLabel:M="Close toast"}=e,[L,I]=k.useState(null),[z,F]=k.useState(null),[B,U]=k.useState(!1),[V,$]=k.useState(!1),[H,q]=k.useState(!1),[W,K]=k.useState(!1),[G,Y]=k.useState(!1),[X,Q]=k.useState(0),[J,Z]=k.useState(0),ee=k.useRef(d.duration||R||4e3),te=k.useRef(null),ne=k.useRef(null),re=0===y,ae=y+1<=m,oe=d.type,ie=!1!==d.dismissible,se=d.className||"",le=d.descriptionClassName||"",ce=k.useMemo(()=>g.findIndex(e=>e.toastId===d.id)||0,[g,d.id]),ue=k.useMemo(()=>{var e;return null!=(e=d.closeButton)?e:S},[d.closeButton,S]),de=k.useMemo(()=>d.duration||R||4e3,[d.duration,R]),fe=k.useRef(0),he=k.useRef(0),pe=k.useRef(0),me=k.useRef(null),[ge,ye]=O.split("-"),ve=k.useMemo(()=>g.reduce((e,t,n)=>n>=ce?e:e+t.height,0),[g,ce]),be=(()=>{const[e,t]=k.useState(document.hidden);return k.useEffect(()=>{const e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),xe=d.invert||u,we="loading"===oe;he.current=k.useMemo(()=>ce*P+ve,[ce,ve]),k.useEffect(()=>{ee.current=de},[de]),k.useEffect(()=>{U(!0)},[]),k.useEffect(()=>{const e=ne.current;if(e){const t=e.getBoundingClientRect().height;return Z(t),p(e=>[{toastId:d.id,height:t,position:d.position},...e]),()=>p(e=>e.filter(e=>e.toastId!==d.id))}},[p,d.id]),k.useLayoutEffect(()=>{if(!B)return;const e=ne.current,t=e.style.height;e.style.height="auto";const n=e.getBoundingClientRect().height;e.style.height=t,Z(n),p(e=>e.find(e=>e.toastId===d.id)?e.map(e=>e.toastId===d.id?{...e,height:n}:e):[{toastId:d.id,height:n,position:d.position},...e])},[B,d.title,d.description,p,d.id,d.jsx,d.action,d.cancel]);const Se=k.useCallback(()=>{$(!0),Q(he.current),p(e=>e.filter(e=>e.toastId!==d.id)),setTimeout(()=>{x(d)},200)},[d,x,p,he]);k.useEffect(()=>{if(d.promise&&"loading"===oe||d.duration===1/0||"loading"===d.type)return;let e;return b||h||be?(()=>{if(pe.current<fe.current){const e=(new Date).getTime()-fe.current;ee.current=ee.current-e}pe.current=(new Date).getTime()})():ee.current!==1/0&&(fe.current=(new Date).getTime(),e=setTimeout(()=>{null==d.onAutoClose||d.onAutoClose.call(d,d),Se()},ee.current)),()=>clearTimeout(e)},[b,h,d,oe,be,Se]),k.useEffect(()=>{d.delete&&(Se(),null==d.onDismiss||d.onDismiss.call(d,d))},[Se,d.delete]);const ke=d.icon||(null==D?void 0:D[oe])||(e=>{switch(e){case"success":return Xf;case"info":return Jf;case"warning":return Qf;case"error":return Zf;default:return null}})(oe);var Ee,Ce;return k.createElement("li",{tabIndex:0,ref:ne,className:ch(j,se,null==_?void 0:_.toast,null==d||null==(t=d.classNames)?void 0:t.toast,null==_?void 0:_.default,null==_?void 0:_[oe],null==d||null==(n=d.classNames)?void 0:n[oe]),"data-sonner-toast":"","data-rich-colors":null!=(Ee=d.richColors)?Ee:w,"data-styled":!Boolean(d.jsx||d.unstyled||f),"data-mounted":B,"data-promise":Boolean(d.promise),"data-swiped":G,"data-removed":V,"data-visible":ae,"data-y-position":ge,"data-x-position":ye,"data-index":y,"data-front":re,"data-swiping":H,"data-dismissible":ie,"data-type":oe,"data-invert":xe,"data-swipe-out":W,"data-swipe-direction":z,"data-expanded":Boolean(b||A&&B),"data-testid":d.testId,style:{"--index":y,"--toasts-before":y,"--z-index":v.length-y,"--offset":`${V?X:he.current}px`,"--initial-height":A?"auto":`${J}px`,...E,...d.style},onDragEnd:()=>{q(!1),I(null),me.current=null},onPointerDown:e=>{2!==e.button&&!we&&ie&&(te.current=new Date,Q(he.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(q(!0),me.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n;if(W||!ie)return;me.current=null;const r=Number((null==(e=ne.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),a=Number((null==(t=ne.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),o=(new Date).getTime()-(null==(n=te.current)?void 0:n.getTime()),i="x"===L?r:a,s=Math.abs(i)/o;if(Math.abs(i)>=45||s>.11)return Q(he.current),null==d.onDismiss||d.onDismiss.call(d,d),F("x"===L?r>0?"right":"left":a>0?"down":"up"),Se(),void K(!0);var l,c;null==(l=ne.current)||l.style.setProperty("--swipe-amount-x","0px"),null==(c=ne.current)||c.style.setProperty("--swipe-amount-y","0px"),Y(!1),q(!1),I(null)},onPointerMove:t=>{var n,r,a;if(!me.current||!ie)return;if((null==(n=window.getSelection())?void 0:n.toString().length)>0)return;const o=t.clientY-me.current.y,i=t.clientX-me.current.x;var s;const l=null!=(s=e.swipeDirections)?s:function(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(O);!L&&(Math.abs(i)>1||Math.abs(o)>1)&&I(Math.abs(i)>Math.abs(o)?"x":"y");let c={x:0,y:0};const u=e=>1/(1.5+Math.abs(e)/20);if("y"===L){if(l.includes("top")||l.includes("bottom"))if(l.includes("top")&&o<0||l.includes("bottom")&&o>0)c.y=o;else{const e=o*u(o);c.y=Math.abs(e)<Math.abs(o)?e:o}}else if("x"===L&&(l.includes("left")||l.includes("right")))if(l.includes("left")&&i<0||l.includes("right")&&i>0)c.x=i;else{const e=i*u(i);c.x=Math.abs(e)<Math.abs(i)?e:i}(Math.abs(c.x)>0||Math.abs(c.y)>0)&&Y(!0),null==(r=ne.current)||r.style.setProperty("--swipe-amount-x",`${c.x}px`),null==(a=ne.current)||a.style.setProperty("--swipe-amount-y",`${c.y}px`)}},ue&&!d.jsx&&"loading"!==oe?k.createElement("button",{"aria-label":M,"data-disabled":we,"data-close-button":!0,onClick:we||!ie?()=>{}:()=>{Se(),null==d.onDismiss||d.onDismiss.call(d,d)},className:ch(null==_?void 0:_.closeButton,null==d||null==(r=d.classNames)?void 0:r.closeButton)},null!=(Ce=null==D?void 0:D.close)?Ce:eh):null,(oe||d.icon||d.promise)&&null!==d.icon&&(null!==(null==D?void 0:D[oe])||d.icon)?k.createElement("div",{"data-icon":"",className:ch(null==_?void 0:_.icon,null==d||null==(a=d.classNames)?void 0:a.icon)},d.promise||"loading"===d.type&&!d.icon?d.icon||function(){var e,t;return(null==D?void 0:D.loading)?k.createElement("div",{className:ch(null==_?void 0:_.loader,null==d||null==(t=d.classNames)?void 0:t.loader,"sonner-loader"),"data-visible":"loading"===oe},D.loading):k.createElement(Yf,{className:ch(null==_?void 0:_.loader,null==d||null==(e=d.classNames)?void 0:e.loader),visible:"loading"===oe})}():null,"loading"!==d.type?ke:null):null,k.createElement("div",{"data-content":"",className:ch(null==_?void 0:_.content,null==d||null==(o=d.classNames)?void 0:o.content)},k.createElement("div",{"data-title":"",className:ch(null==_?void 0:_.title,null==d||null==(i=d.classNames)?void 0:i.title)},d.jsx?d.jsx:"function"==typeof d.title?d.title():d.title),d.description?k.createElement("div",{"data-description":"",className:ch(T,le,null==_?void 0:_.description,null==d||null==(s=d.classNames)?void 0:s.description)},"function"==typeof d.description?d.description():d.description):null),k.isValidElement(d.cancel)?d.cancel:d.cancel&&ih(d.cancel)?k.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||C,onClick:e=>{ih(d.cancel)&&ie&&(null==d.cancel.onClick||d.cancel.onClick.call(d.cancel,e),Se())},className:ch(null==_?void 0:_.cancelButton,null==d||null==(l=d.classNames)?void 0:l.cancelButton)},d.cancel.label):null,k.isValidElement(d.action)?d.action:d.action&&ih(d.action)?k.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||N,onClick:e=>{ih(d.action)&&(null==d.action.onClick||d.action.onClick.call(d.action,e),e.defaultPrevented||Se())},className:ch(null==_?void 0:_.actionButton,null==d||null==(c=d.classNames)?void 0:c.actionButton)},d.action.label):null)};function dh(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}function fh(e,t){const n={};return[e,t].forEach((e,t)=>{const r=1===t,a=r?"--mobile-offset":"--offset",o=r?"16px":"24px";function i(e){["top","right","bottom","left"].forEach(t=>{n[`${a}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?i(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?n[`${a}-${t}`]=o:n[`${a}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):i(o)}),n}var hh=k.forwardRef(function(e,t){const{id:n,invert:r,position:a="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:s,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:f,duration:h,style:p,visibleToasts:m=sh,toastOptions:g,dir:y=dh(),gap:v=lh,icons:b,containerAriaLabel:w="Notifications"}=e,[S,E]=k.useState([]),C=k.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),N=k.useMemo(()=>Array.from(new Set([a].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,a]),[j,T]=k.useState([]),[R,O]=k.useState(!1),[P,A]=k.useState(!1),[_,D]=k.useState("system"!==d?d:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),M=k.useRef(null),L=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),I=k.useRef(null),z=k.useRef(!1),F=k.useCallback(e=>{E(t=>{var n;return(null==(n=t.find(t=>t.id===e.id))?void 0:n.delete)||nh.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return k.useEffect(()=>nh.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{E(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{x.flushSync(()=>{E(t=>{const n=t.findIndex(t=>t.id===e.id);return-1!==n?[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]:[e,...t]})})})}),[S]),k.useEffect(()=>{if("system"!==d)return void D(d);if("system"===d&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),"undefined"==typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{D(e?"dark":"light")})}catch(t){e.addListener(({matches:e})=>{try{D(e?"dark":"light")}catch(t){}})}},[d]),k.useEffect(()=>{S.length<=1&&O(!1)},[S]),k.useEffect(()=>{const e=e=>{var t,n;o.every(t=>e[t]||e.code===t)&&(O(!0),null==(n=M.current)||n.focus());"Escape"!==e.code||document.activeElement!==M.current&&!(null==(t=M.current)?void 0:t.contains(document.activeElement))||O(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[o]),k.useEffect(()=>{if(M.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,z.current=!1)}},[M.current]),k.createElement("section",{ref:t,"aria-label":`${w} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((t,n)=>{var a;const[o,d]=t.split("-");return C.length?k.createElement("ol",{key:t,dir:"auto"===y?dh():y,tabIndex:-1,ref:M,className:l,"data-sonner-toaster":!0,"data-sonner-theme":_,"data-y-position":o,"data-x-position":d,style:{"--front-toast-height":`${(null==(a=j[0])?void 0:a.height)||0}px`,"--width":"356px","--gap":`${v}px`,...p,...fh(c,u)},onBlur:e=>{z.current&&!e.currentTarget.contains(e.relatedTarget)&&(z.current=!1,I.current&&(I.current.focus({preventScroll:!0}),I.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||z.current||(z.current=!0,I.current=e.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{P||O(!1)},onDragEnd:()=>O(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||A(!0)},onPointerUp:()=>A(!1)},C.filter(e=>!e.position&&0===n||e.position===t).map((n,a)=>{var o,l;return k.createElement(uh,{key:n.id,icons:b,index:a,toast:n,defaultRichColors:f,duration:null!=(o=null==g?void 0:g.duration)?o:h,className:null==g?void 0:g.className,descriptionClassName:null==g?void 0:g.descriptionClassName,invert:r,visibleToasts:m,closeButton:null!=(l=null==g?void 0:g.closeButton)?l:s,interacting:P,position:t,style:null==g?void 0:g.style,unstyled:null==g?void 0:g.unstyled,classNames:null==g?void 0:g.classNames,cancelButtonStyle:null==g?void 0:g.cancelButtonStyle,actionButtonStyle:null==g?void 0:g.actionButtonStyle,closeButtonAriaLabel:null==g?void 0:g.closeButtonAriaLabel,removeToast:F,toasts:C.filter(e=>e.position==n.position),heights:j.filter(e=>e.position==n.position),setHeights:T,expandByDefault:i,gap:v,expanded:R,swipeDirections:e.swipeDirections})})):null}))});function ph(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=ph(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function mh(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=ph(e))&&(r&&(r+=" "),r+=t);return r}var gh=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),yh="-",vh=[],bh=e=>{const t=Sh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return wh(e);const n=e.split(yh);return xh(n,""===n[0]&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=r[e],a=n[e];return t?a?((e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n})(a,t):t:a||vh}return n[e]||vh}}},xh=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],a=n.nextPart.get(r);if(a){const n=xh(e,t+1,a);if(n)return n}const o=n.validators;if(null===o)return;const i=0===t?e.join(yh):e.slice(t).join(yh),s=o.length;for(let l=0;l<s;l++){const e=o[l];if(e.validator(i))return e.classGroupId}},wh=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})(),Sh=e=>{const{theme:t,classGroups:n}=e;return kh(n,t)},kh=(e,t)=>{const n=gh();for(const r in e){const a=e[r];Eh(a,n,r,t)}return n},Eh=(e,t,n,r)=>{const a=e.length;for(let o=0;o<a;o++){const a=e[o];Ch(a,t,n,r)}},Ch=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?Th(e,t,n,r):jh(e,t,n,r):Nh(e,t,n)},Nh=(e,t,n)=>{(""===e?t:Rh(t,e)).classGroupId=n},jh=(e,t,n,r)=>{Oh(e)?Eh(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},Th=(e,t,n,r)=>{const a=Object.entries(e),o=a.length;for(let i=0;i<o;i++){const[e,o]=a[i];Eh(o,Rh(t,e),n,r)}},Rh=(e,t)=>{let n=e;const r=t.split(yh),a=r.length;for(let o=0;o<a;o++){const e=r[o];let t=n.nextPart.get(e);t||(t=gh(),n.nextPart.set(e,t)),n=t}return n},Oh=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,Ph=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(a,o)=>{n[a]=o,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(a(e,t),t):void 0},set(e,t){e in n?n[e]=t:a(e,t)}}},Ah=[],_h=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),Dh=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,a=0,o=0;const i=e.length;for(let u=0;u<i;u++){const i=e[u];if(0===r&&0===a){if(":"===i){t.push(e.slice(o,u)),o=u+1;continue}if("/"===i){n=u;continue}}"["===i?r++:"]"===i?r--:"("===i?a++:")"===i&&a--}const s=0===t.length?e:e.slice(o);let l=s,c=!1;s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0);return _h(t,c,l,n&&n>o?n-o:void 0)};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):_h(Ah,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},Mh=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let a=0;a<e.length;a++){const o=e[a],i="["===o[0],s=t.has(o);i||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(o)):r.push(o)}return r.length>0&&(r.sort(),n.push(...r)),n}},Lh=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},Ih=/\s+/,zh=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=zh(e[r]))&&(n&&(n+=" "),n+=t);return n},Fh=(e,...t)=>{let n,r,a,o;const i=e=>{const t=r(e);if(t)return t;const o=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:o,postfixLookupClassGroupIds:i}=t,s=[],l=e.trim().split(Ih);let c="";for(let u=l.length-1;u>=0;u-=1){const e=l[u],{isExternal:t,modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(e);if(t){c=e+(c.length>0?" "+c:c);continue}let m,g=!!p;if(g){m=r(h.substring(0,p));const e=m&&i[m]?r(h):void 0;e&&e!==m&&(m=e,g=!1)}else m=r(h);if(!m){if(!g){c=e+(c.length>0?" "+c:c);continue}if(m=r(h),!m){c=e+(c.length>0?" "+c:c);continue}g=!1}const y=0===d.length?"":1===d.length?d[0]:o(d).join(":"),v=f?y+"!":y,b=v+m;if(s.indexOf(b)>-1)continue;s.push(b);const x=a(m,g);for(let n=0;n<x.length;++n){const e=x[n];s.push(v+e)}c=e+(c.length>0?" "+c:c)}return c})(e,n);return a(e,o),o};return o=s=>{var l;return l=t.reduce((e,t)=>t(e),e()),n={cache:Ph(l.cacheSize),parseClassName:Dh(l),sortModifiers:Mh(l),postfixLookupClassGroupIds:Lh(l),...bh(l)},r=n.cache.get,a=n.cache.set,o=i,i(s)},(...e)=>o(((...e)=>{let t,n,r=0,a="";for(;r<e.length;)(t=e[r++])&&(n=zh(t))&&(a&&(a+=" "),a+=n);return a})(...e))},Bh=[],Uh=e=>{const t=t=>t[e]||Bh;return t.isThemeGetter=!0,t},Vh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$h=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Hh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,qh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Wh=/\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$/,Kh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Gh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xh=e=>Hh.test(e),Qh=e=>!!e&&!Number.isNaN(Number(e)),Jh=e=>!!e&&Number.isInteger(Number(e)),Zh=e=>e.endsWith("%")&&Qh(e.slice(0,-1)),ep=e=>qh.test(e),tp=()=>!0,np=e=>Wh.test(e)&&!Kh.test(e),rp=()=>!1,ap=e=>Gh.test(e),op=e=>Yh.test(e),ip=e=>!cp(e)&&!yp(e),sp=e=>e.startsWith("@container")&&("/"===e[10]&&void 0!==e[11]||"s"===e[11]&&void 0!==e[16]&&e.startsWith("-size/",10)||"n"===e[11]&&void 0!==e[18]&&e.startsWith("-normal/",10)),lp=e=>Cp(e,Rp,rp),cp=e=>Vh.test(e),up=e=>Cp(e,Op,np),dp=e=>Cp(e,Pp,Qh),fp=e=>Cp(e,_p,tp),hp=e=>Cp(e,Ap,rp),pp=e=>Cp(e,jp,rp),mp=e=>Cp(e,Tp,op),gp=e=>Cp(e,Dp,ap),yp=e=>$h.test(e),vp=e=>Np(e,Op),bp=e=>Np(e,Ap),xp=e=>Np(e,jp),wp=e=>Np(e,Rp),Sp=e=>Np(e,Tp),kp=e=>Np(e,Dp,!0),Ep=e=>Np(e,_p,!0),Cp=(e,t,n)=>{const r=Vh.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},Np=(e,t,n=!1)=>{const r=$h.exec(e);return!!r&&(r[1]?t(r[1]):n)},jp=e=>"position"===e||"percentage"===e,Tp=e=>"image"===e||"url"===e,Rp=e=>"length"===e||"size"===e||"bg-size"===e,Op=e=>"length"===e,Pp=e=>"number"===e,Ap=e=>"family-name"===e,_p=e=>"number"===e||"weight"===e,Dp=e=>"shadow"===e,Mp=Fh(()=>{const e=Uh("color"),t=Uh("font"),n=Uh("text"),r=Uh("font-weight"),a=Uh("tracking"),o=Uh("leading"),i=Uh("breakpoint"),s=Uh("container"),l=Uh("spacing"),c=Uh("radius"),u=Uh("shadow"),d=Uh("inset-shadow"),f=Uh("text-shadow"),h=Uh("drop-shadow"),p=Uh("blur"),m=Uh("perspective"),g=Uh("aspect"),y=Uh("ease"),v=Uh("animate"),b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",yp,cp],x=()=>[yp,cp,l],w=()=>[Xh,"full","auto",...x()],S=()=>[Jh,"none","subgrid",yp,cp],k=()=>["auto",{span:["full",Jh,yp,cp]},Jh,yp,cp],E=()=>[Jh,"auto",yp,cp],C=()=>["auto","min","max","fr",yp,cp],N=()=>["auto",...x()],j=()=>[Xh,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],T=()=>[Xh,"screen","full","dvw","lvw","svw","min","max","fit",...x()],R=()=>[Xh,"screen","full","lh","dvh","lvh","svh","min","max","fit",...x()],O=()=>[e,yp,cp],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",xp,pp,{position:[yp,cp]}],A=()=>["auto","cover","contain",wp,lp,{size:[yp,cp]}],_=()=>[Zh,vp,up],D=()=>["","none","full",c,yp,cp],M=()=>["",Qh,vp,up],L=()=>[Qh,Zh,xp,pp],I=()=>["","none",p,yp,cp],z=()=>["none",Qh,yp,cp],F=()=>["none",Qh,yp,cp],B=()=>[Qh,yp,cp],U=()=>[Xh,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ep],breakpoint:[ep],color:[tp],container:[ep],"drop-shadow":[ep],ease:["in","out","in-out"],font:[ip],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ep],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ep],shadow:[ep],spacing:["px",Qh],text:[ep],"text-shadow":[ep],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Xh,cp,yp,g]}],container:["container"],"container-type":[{"@container":["","normal","size",yp,cp]}],"container-named":[sp],columns:[{columns:[Qh,cp,yp,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"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:b()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{"inset-s":w(),start:w()}],end:[{"inset-e":w(),end:w()}],"inset-bs":[{"inset-bs":w()}],"inset-be":[{"inset-be":w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[Jh,"auto",yp,cp]}],basis:[{basis:[Xh,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qh,Xh,"auto","initial","none",cp]}],grow:[{grow:["",Qh,yp,cp]}],shrink:[{shrink:["",Qh,yp,cp]}],order:[{order:[Jh,"first","last","none",yp,cp]}],"grid-cols":[{"grid-cols":S()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":S()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":C()}],"auto-rows":[{"auto-rows":C()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pbs:[{pbs:x()}],pbe:[{pbe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],"inline-size":[{inline:["auto",...T()]}],"min-inline-size":[{"min-inline":["auto",...T()]}],"max-inline-size":[{"max-inline":["none",...T()]}],"block-size":[{block:["auto",...R()]}],"min-block-size":[{"min-block":["auto",...R()]}],"max-block-size":[{"max-block":["none",...R()]}],w:[{w:[s,"screen",...j()]}],"min-w":[{"min-w":[s,"screen","none",...j()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",n,vp,up]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Ep,fp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zh,cp]}],"font-family":[{font:[bp,hp,t]}],"font-features":[{"font-features":[cp]}],"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:[a,yp,cp]}],"line-clamp":[{"line-clamp":[Qh,"none",yp,dp]}],leading:[{leading:[o,...x()]}],"list-image":[{"list-image":["none",yp,cp]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",yp,cp]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Qh,"from-font","auto",yp,up]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[Qh,"auto",yp,cp]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"tab-size":[{tab:[Jh,yp,cp]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",yp,cp]}],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",yp,cp]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Jh,yp,cp],radial:["",yp,cp],conic:[Jh,yp,cp]},Sp,mp]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:_()}],"gradient-via-pos":[{via:_()}],"gradient-to-pos":[{to:_()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-bs":[{"border-bs":M()}],"border-w-be":[{"border-be":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":M()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Qh,yp,cp]}],"outline-w":[{outline:["",Qh,vp,up]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",u,kp,gp]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",d,kp,gp]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[Qh,up]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",f,kp,gp]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[Qh,yp,cp]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"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":[Qh]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[yp,cp]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"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":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Qh]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",yp,cp]}],filter:[{filter:["","none",yp,cp]}],blur:[{blur:I()}],brightness:[{brightness:[Qh,yp,cp]}],contrast:[{contrast:[Qh,yp,cp]}],"drop-shadow":[{"drop-shadow":["","none",h,kp,gp]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",Qh,yp,cp]}],"hue-rotate":[{"hue-rotate":[Qh,yp,cp]}],invert:[{invert:["",Qh,yp,cp]}],saturate:[{saturate:[Qh,yp,cp]}],sepia:[{sepia:["",Qh,yp,cp]}],"backdrop-filter":[{"backdrop-filter":["","none",yp,cp]}],"backdrop-blur":[{"backdrop-blur":I()}],"backdrop-brightness":[{"backdrop-brightness":[Qh,yp,cp]}],"backdrop-contrast":[{"backdrop-contrast":[Qh,yp,cp]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qh,yp,cp]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qh,yp,cp]}],"backdrop-invert":[{"backdrop-invert":["",Qh,yp,cp]}],"backdrop-opacity":[{"backdrop-opacity":[Qh,yp,cp]}],"backdrop-saturate":[{"backdrop-saturate":[Qh,yp,cp]}],"backdrop-sepia":[{"backdrop-sepia":["",Qh,yp,cp]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",yp,cp]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qh,"initial",yp,cp]}],ease:[{ease:["linear","initial",y,yp,cp]}],delay:[{delay:[Qh,yp,cp]}],animate:[{animate:["none",v,yp,cp]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,yp,cp]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:z()}],"rotate-x":[{"rotate-x":z()}],"rotate-y":[{"rotate-y":z()}],"rotate-z":[{"rotate-z":z()}],scale:[{scale:F()}],"scale-x":[{"scale-x":F()}],"scale-y":[{"scale-y":F()}],"scale-z":[{"scale-z":F()}],"scale-3d":["scale-3d"],skew:[{skew:B()}],"skew-x":[{"skew-x":B()}],"skew-y":[{"skew-y":B()}],transform:[{transform:[yp,cp,"","none","gpu","cpu"]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:U()}],"translate-x":[{"translate-x":U()}],"translate-y":[{"translate-y":U()}],"translate-z":[{"translate-z":U()}],"translate-none":["translate-none"],zoom:[{zoom:[Jh,yp,cp]}],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"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",yp,cp]}],"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":O()}],"scrollbar-track-color":[{"scrollbar-track":O()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mbs":[{"scroll-mbs":x()}],"scroll-mbe":[{"scroll-mbe":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pbs":[{"scroll-pbs":x()}],"scroll-pbe":[{"scroll-pbe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"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",yp,cp]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[Qh,vp,up,dp]}],stroke:[{stroke:["none",...O()]}],"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 Lp(...e){return Mp(mh(e))}var Ip={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},zp=new class{#e=Ip;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};var Fp="undefined"==typeof window||"Deno"in globalThis;function Bp(){}function Up(e){return"number"==typeof e&&e>=0&&e!==1/0}function Vp(e,t){return Math.max(e+(t||0)-Date.now(),0)}function $p(e,t){return"function"==typeof e?e(t):e}function Hp(e,t){return"function"==typeof e?e(t):e}function qp(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:o,queryKey:i,stale:s}=e;if(i)if(r){if(t.queryHash!==Kp(i,t.options))return!1}else if(!Yp(t.queryKey,i))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&((!a||a===t.state.fetchStatus)&&!(o&&!o(t)))}function Wp(e,t){const{exact:n,status:r,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Gp(t.options.mutationKey)!==Gp(o))return!1}else if(!Yp(t.options.mutationKey,o))return!1}return(!r||t.state.status===r)&&!(a&&!a(t))}function Kp(e,t){return(t?.queryKeyHashFn||Gp)(e)}function Gp(e){return JSON.stringify(e,(e,t)=>em(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Yp(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(n=>Yp(e[n],t[n])))}var Xp=Object.prototype.hasOwnProperty;function Qp(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Zp(e)&&Zp(t);if(!(r||em(e)&&em(t)))return t;const a=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),i=o.length,s=r?new Array(i):{};let l=0;for(let c=0;c<i;c++){const i=r?c:o[c],u=e[i],d=t[i];if(u===d){s[i]=u,(r?c<a:Xp.call(e,i))&&l++;continue}if(null===u||null===d||"object"!=typeof u||"object"!=typeof d){s[i]=d;continue}const f=Qp(u,d,n+1);s[i]=f,f===u&&l++}return a===i&&l===a?e:s}function Jp(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Zp(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function em(e){if(!tm(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!tm(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function tm(e){return"[object Object]"===Object.prototype.toString.call(e)}function nm(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?Qp(e,t):t}function rm(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function am(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var om=Symbol();function im(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==om?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function sm(e,t){return"function"==typeof e?e(...t):!!e}var lm=(()=>{let e=()=>Fp;return{isServer:()=>e(),setIsServer(t){e=t}}})(),cm=function(e){setTimeout(e,0)};var um=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},a=cm;const o=r=>{t?e.push(r):a(()=>{n(r)})};return{batch:o=>{let i;t++;try{i=o()}finally{t--,t||(()=>{const t=e;e=[],t.length&&a(()=>{r(()=>{t.forEach(e=>{n(e)})})})})()}return i},batchCalls:e=>(...t)=>{o(()=>{e(...t)})},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{a=e}}}(),dm=class{#n;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Up(this.gcTime)&&(this.#n=zp.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(lm.isServer()?1/0:3e5))}clearGcTimeout(){void 0!==this.#n&&(zp.clearTimeout(this.#n),this.#n=void 0)}},fm=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(){}},hm=new class extends fm{#r;#a;#o;constructor(){super(),this.#o=e=>{if("undefined"!=typeof window&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#a||this.setEventListener(this.#o)}onUnsubscribe(){this.hasListeners()||(this.#a?.(),this.#a=void 0)}setEventListener(e){this.#o=e,this.#a?.(),this.#a=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#r!==e&&(this.#r=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#r?this.#r:"hidden"!==globalThis.document?.visibilityState}},pm=new class extends fm{#i=!0;#a;#o;constructor(){super(),this.#o=e=>{if("undefined"!=typeof window&&window.addEventListener){const 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.#a||this.setEventListener(this.#o)}onUnsubscribe(){this.hasListeners()||(this.#a?.(),this.#a=void 0)}setEventListener(e){this.#o=e,this.#a?.(),this.#a=e(this.setOnline.bind(this))}setOnline(e){this.#i!==e&&(this.#i=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#i}};function mm(){let e,t;const n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}function gm(e){return Math.min(1e3*2**e,3e4)}function ym(e){return"online"!==(e??"online")||pm.isOnline()}var vm=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function bm(e){let t,n=!1,r=0;const a=mm(),o=()=>"pending"!==a.status,i=()=>hm.isFocused()&&("always"===e.networkMode||pm.isOnline())&&e.canRun(),s=()=>ym(e.networkMode)&&e.canRun(),l=e=>{o()||(t?.(),a.resolve(e))},c=e=>{o()||(t?.(),a.reject(e))},u=()=>new Promise(n=>{t=e=>{(o()||i())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,o()||e.onContinue?.()}),d=()=>{if(o())return;let t;const a=0===r?e.initialPromise:void 0;try{t=a??e.fn()}catch(s){t=Promise.reject(s)}Promise.resolve(t).then(l).catch(t=>{if(o())return;const a=e.retry??(lm.isServer()?0:3),s=e.retryDelay??gm,l="function"==typeof s?s(r,t):s,f=!0===a||"number"==typeof a&&r<a||"function"==typeof a&&a(r,t);var h;!n&&f?(r++,e.onFail?.(r,t),(h=l,new Promise(e=>{zp.setTimeout(e,h)})).then(()=>i()?void 0:u()).then(()=>{n?c(t):d()})):c(t)})};return{promise:a,status:()=>a.status,cancel:t=>{if(!o()){const n=new vm(t);c(n),e.onCancel?.(n)}},continue:()=>(t?.(),a),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:s,start:()=>(s()?d():u().then(d),a)}}var xm=class extends dm{#s;#l;#c;#u;constructor(e){super(),this.#s=e.client,this.mutationId=e.mutationId,this.#c=e.mutationCache,this.#l=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},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.#l.includes(e)||(this.#l.push(e),this.clearGcTimeout(),this.#c.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#l=this.#l.filter(t=>t!==e),this.scheduleGc(),this.#c.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#l.length||("pending"===this.state.status?this.scheduleGc():this.#c.remove(this))}continue(){return this.#u?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#d({type:"continue"})},n={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#u=bm({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#c.canRun(this)});const r="pending"===this.state.status,a=!this.#u.canStart();try{if(r)t();else{this.#d({type:"pending",variables:e,isPaused:a}),this.#c.config.onMutate&&await this.#c.config.onMutate(e,this,n);const t=await(this.options.onMutate?.(e,n));t!==this.state.context&&this.#d({type:"pending",context:t,variables:e,isPaused:a})}const o=await this.#u.start();return await(this.#c.config.onSuccess?.(o,e,this.state.context,this,n)),await(this.options.onSuccess?.(o,e,this.state.context,n)),await(this.#c.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n)),await(this.options.onSettled?.(o,null,e,this.state.context,n)),this.#d({type:"success",data:o}),o}catch(o){try{await(this.#c.config.onError?.(o,e,this.state.context,this,n))}catch(i){Promise.reject(i)}try{await(this.options.onError?.(o,e,this.state.context,n))}catch(i){Promise.reject(i)}try{await(this.#c.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n))}catch(i){Promise.reject(i)}try{await(this.options.onSettled?.(void 0,o,e,this.state.context,n))}catch(i){Promise.reject(i)}throw this.#d({type:"error",error:o}),o}finally{this.#c.runNext(this)}}#d(e){this.state=(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),um.batch(()=>{this.#l.forEach(t=>{t.onMutationUpdate(e)}),this.#c.notify({mutation:this,type:"updated",action:e})})}};var wm=class extends fm{#s;#f=void 0;#h;#p;constructor(e,t){super(),this.#s=e,this.setOptions(t),this.bindMethods(),this.#m()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#s.defaultMutationOptions(e),Jp(this.options,t)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#h,observer:this}),t?.mutationKey&&this.options.mutationKey&&Gp(t.mutationKey)!==Gp(this.options.mutationKey)?this.reset():"pending"===this.#h?.state.status&&this.#h.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#h?.removeObserver(this)}onMutationUpdate(e){this.#m(),this.#g(e)}getCurrentResult(){return this.#f}reset(){this.#h?.removeObserver(this),this.#h=void 0,this.#m(),this.#g()}mutate(e,t){return this.#p=t,this.#h?.removeObserver(this),this.#h=this.#s.getMutationCache().build(this.#s,this.options),this.#h.addObserver(this),this.#h.execute(e)}#m(){const e=this.#h?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#f={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#g(e){um.batch(()=>{if(this.#p&&this.hasListeners()){const n=this.#f.variables,r=this.#f.context,a={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if("success"===e?.type){try{this.#p.onSuccess?.(e.data,n,r,a)}catch(t){Promise.reject(t)}try{this.#p.onSettled?.(e.data,null,n,r,a)}catch(t){Promise.reject(t)}}else if("error"===e?.type){try{this.#p.onError?.(e.error,n,r,a)}catch(t){Promise.reject(t)}try{this.#p.onSettled?.(void 0,e.error,n,r,a)}catch(t){Promise.reject(t)}}}this.listeners.forEach(e=>{e(this.#f)})})}};function Sm(e){return{onFetch:(t,n)=>{const r=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],i=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let n=!1;const c=e=>{!function(e,t,n){let r,a=!1;Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(r??=t(),a||(a=!0,r.aborted?n():r.addEventListener("abort",n,{once:!0})),r)})}(e,()=>t.signal,()=>n=!0)},u=im(t.options,t.fetchOptions),d=async(e,r,a)=>{if(n)return Promise.reject(t.signal.reason);if(null==r&&e.pages.length)return Promise.resolve(e);const o=await u((()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:a?"backward":"forward",meta:t.options.meta};return c(e),e})()),{maxPages:i}=t.options,s=a?am:rm;return{pages:s(e.pages,o,i),pageParams:s(e.pageParams,r,i)}};if(a&&o.length){const e="backward"===a,t=e?Em:km,n={pages:o,pageParams:i};s=await d(n,t(r,n),e)}else{const t=e??o.length;do{const e=0===l?i[0]??r.initialPageParam:km(r,s);if(l>0&&null==e)break;s=await d(s,e),l++}while(l<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=c}}}function km(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Em(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Cm=class extends dm{#y;#v;#b;#x;#s;#u;#w;#S;constructor(e){super(),this.#S=!1,this.#w=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#x=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#v=Tm(this.options),this.state=e.state??this.#v,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#y}get promise(){return this.#u?.promise}setOptions(e){if(this.options={...this.#w,...e},e?._type&&(this.#y=e._type),this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=Tm(this.options);void 0!==e.data&&(this.setState(jm(e.data,e.dataUpdatedAt)),this.#v=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#x.remove(this)}setData(e,t){const n=nm(this.state.data,e,this.options);return this.#d({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#d({type:"setState",state:e})}cancel(e){const t=this.#u?.promise;return this.#u?.cancel(e),t?t.then(Bp).catch(Bp):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#v}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==Hp(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===om||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===$p(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!Vp(this.state.dataUpdatedAt,e))}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#u?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#u?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#x.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.#u&&(this.#S||this.#k()?this.#u.cancel({revert:!0}):this.#u.cancelRetry()),this.scheduleGc()),this.#x.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#k(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#d({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#u?.status())if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#u)return this.#u.continueRetry(),this.#u.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}const n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#S=!0,n.signal)})},a=()=>{const e=im(this.options,t),n=(()=>{const e={client:this.#s,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)},o=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:a};return r(e),e})();("infinite"===this.#y?Sm(this.options.pages):this.options.behavior)?.onFetch(o,this),this.#b=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===o.fetchOptions?.meta||this.#d({type:"fetch",meta:o.fetchOptions?.meta}),this.#u=bm({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:e=>{e instanceof vm&&e.revert&&this.setState({...this.#b,fetchStatus:"idle"}),n.abort()},onFail:(e,t)=>{this.#d({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#d({type:"pause"})},onContinue:()=>{this.#d({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const e=await this.#u.start();if(void 0===e)throw new Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#x.config.onSuccess?.(e,this),this.#x.config.onSettled?.(e,this.state.error,this),e}catch(i){if(i instanceof vm){if(i.silent)return this.#u.promise;if(i.revert){if(void 0===this.state.data)throw i;return this.state.data}}throw this.#d({type:"error",error:i}),this.#x.config.onError?.(i,this),this.#x.config.onSettled?.(this.state.data,i,this),i}finally{this.scheduleGc()}}#d(e){this.state=(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,...Nm(t.data,this.options),fetchMeta:e.meta??null};case"success":const n={...t,...jm(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#b=e.manual?n:void 0,n;case"error":const 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),um.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#x.notify({query:this,type:"updated",action:e})})}};function Nm(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ym(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function jm(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Tm(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?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 Rm=class extends fm{constructor(e={}){super(),this.config=e,this.#E=new Map}#E;build(e,t,n){const r=t.queryKey,a=t.queryHash??Kp(r,t);let o=this.get(a);return o||(o=new Cm({client:e,queryKey:r,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#E.has(e.queryHash)||(this.#E.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#E.get(e.queryHash);t&&(e.destroy(),t===e&&this.#E.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){um.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#E.get(e)}getAll(){return[...this.#E.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(e=>qp(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>qp(e,t)):t}notify(e){um.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){um.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){um.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Om=class extends fm{constructor(e={}){super(),this.config=e,this.#C=new Set,this.#N=new Map,this.#j=0}#C;#N;#j;build(e,t,n){const r=new xm({client:e,mutationCache:this,mutationId:++this.#j,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#C.add(e);const t=Pm(e);if("string"==typeof t){const n=this.#N.get(t);n?n.push(e):this.#N.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#C.delete(e)){const t=Pm(e);if("string"==typeof t){const n=this.#N.get(t);if(n)if(n.length>1){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#N.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Pm(e);if("string"==typeof t){const n=this.#N.get(t)?.find(e=>"pending"===e.state.status);return!n||n===e}return!0}runNext(e){const t=Pm(e);return"string"==typeof t?(this.#N.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){um.batch(()=>{this.#C.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#C.clear(),this.#N.clear()})}getAll(){return Array.from(this.#C)}find(e){const t={exact:!0,...e};return this.getAll().find(e=>Wp(t,e))}findAll(e={}){return this.getAll().filter(t=>Wp(e,t))}notify(e){um.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return um.batch(()=>Promise.all(e.map(e=>e.continue().catch(Bp))))}};function Pm(e){return e.options.scope?.id}var Am=class extends fm{constructor(e,t){super(),this.options=t,this.#s=e,this.#T=null,this.#R=mm(),this.bindMethods(),this.setOptions(t)}#s;#O=void 0;#P=void 0;#f=void 0;#A;#_;#R;#T;#D;#M;#L;#I;#z;#F;#B=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#O.addObserver(this),_m(this.#O,this.options)?this.#U():this.updateResult(),this.#V())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Dm(this.#O,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Dm(this.#O,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#$(),this.#H(),this.#O.removeObserver(this)}setOptions(e){const t=this.options,n=this.#O;if(this.options=this.#s.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof Hp(this.options.enabled,this.#O))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#q(),this.#O.setOptions(this.options),t._defaulted&&!Jp(this.options,t)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#O,observer:this});const r=this.hasListeners();r&&Mm(this.#O,n,this.options,t)&&this.#U(),this.updateResult(),!r||this.#O===n&&Hp(this.options.enabled,this.#O)===Hp(t.enabled,this.#O)&&$p(this.options.staleTime,this.#O)===$p(t.staleTime,this.#O)||this.#W();const a=this.#K();!r||this.#O===n&&Hp(this.options.enabled,this.#O)===Hp(t.enabled,this.#O)&&a===this.#F||this.#G(a)}getOptimisticResult(e){const t=this.#s.getQueryCache().build(this.#s,e),n=this.createResult(t,e);return function(e,t){return!Jp(e.getCurrentResult(),t)}(this,n)&&(this.#f=n,this.#_=this.options,this.#A=this.#O.state),n}getCurrentResult(){return this.#f}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),"promise"===n&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#R.status||this.#R.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,n))})}trackProp(e){this.#B.add(e)}getCurrentQuery(){return this.#O}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#s.defaultQueryOptions(e),n=this.#s.getQueryCache().build(this.#s,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#U({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#f))}#U(e){this.#q();let t=this.#O.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Bp)),t}#W(){this.#$();const e=$p(this.options.staleTime,this.#O);if(lm.isServer()||this.#f.isStale||!Up(e))return;const t=Vp(this.#f.dataUpdatedAt,e)+1;this.#I=zp.setTimeout(()=>{this.#f.isStale||this.updateResult()},t)}#K(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#O):this.options.refetchInterval)??!1}#G(e){this.#H(),this.#F=e,!lm.isServer()&&!1!==Hp(this.options.enabled,this.#O)&&Up(this.#F)&&0!==this.#F&&(this.#z=zp.setInterval(()=>{(this.options.refetchIntervalInBackground||hm.isFocused())&&this.#U()},this.#F))}#V(){this.#W(),this.#G(this.#K())}#$(){void 0!==this.#I&&(zp.clearTimeout(this.#I),this.#I=void 0)}#H(){void 0!==this.#z&&(zp.clearInterval(this.#z),this.#z=void 0)}createResult(e,t){const n=this.#O,r=this.options,a=this.#f,o=this.#A,i=this.#_,s=e!==n?e.state:this.#P,{state:l}=e;let c,u={...l},d=!1;if(t._optimisticResults){const a=this.hasListeners(),o=!a&&_m(e,t),i=a&&Mm(e,n,t,r);(o||i)&&(u={...u,...Nm(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(u.fetchStatus="idle")}let{error:f,errorUpdatedAt:h,status:p}=u;c=u.data;let m=!1;if(void 0!==t.placeholderData&&void 0===c&&"pending"===p){let e;a?.isPlaceholderData&&t.placeholderData===i?.placeholderData?(e=a.data,m=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#L?.state.data,this.#L):t.placeholderData,void 0!==e&&(p="success",c=nm(a?.data,e,t),d=!0)}if(t.select&&void 0!==c&&!m)if(a&&c===o?.data&&t.select===this.#D)c=this.#M;else try{this.#D=t.select,c=t.select(c),c=nm(a?.data,c,t),this.#M=c,this.#T=null}catch(S){this.#T=S}this.#T&&(f=this.#T,c=this.#M,h=Date.now(),p="error");const g="fetching"===u.fetchStatus,y="pending"===p,v="error"===p,b=y&&g,x=void 0!==c,w={status:p,fetchStatus:u.fetchStatus,isPending:y,isSuccess:"success"===p,isError:v,isInitialLoading:b,isLoading:b,data:c,dataUpdatedAt:u.dataUpdatedAt,error:f,errorUpdatedAt:h,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:u.dataUpdateCount>s.dataUpdateCount||u.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!y,isLoadingError:v&&!x,isPaused:"paused"===u.fetchStatus,isPlaceholderData:d,isRefetchError:v&&x,isStale:Lm(e,t),refetch:this.refetch,promise:this.#R,isEnabled:!1!==Hp(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=void 0!==w.data,r="error"===w.status&&!t,a=e=>{r?e.reject(w.error):t&&e.resolve(w.data)},o=()=>{a(this.#R=w.promise=mm())},i=this.#R;switch(i.status){case"pending":e.queryHash===n.queryHash&&a(i);break;case"fulfilled":(r||w.data!==i.value)&&o();break;case"rejected":r&&w.error===i.reason||o()}}return w}updateResult(){const e=this.#f,t=this.createResult(this.#O,this.options);if(this.#A=this.#O.state,this.#_=this.options,void 0!==this.#A.data&&(this.#L=this.#O),Jp(t,e))return;this.#f=t;this.#g({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!this.#B.size)return!0;const r=new Set(n??this.#B);return this.options.throwOnError&&r.add("error"),Object.keys(this.#f).some(t=>{const n=t;return this.#f[n]!==e[n]&&r.has(n)})})()})}#q(){const e=this.#s.getQueryCache().build(this.#s,this.options);if(e===this.#O)return;const t=this.#O;this.#O=e,this.#P=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#V()}#g(e){um.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#f)}),this.#s.getQueryCache().notify({query:this.#O,type:"observerResultsUpdated"})})}};function _m(e,t){return function(e,t){return!1!==Hp(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===Hp(t.retryOnMount,e))}(e,t)||void 0!==e.state.data&&Dm(e,t,t.refetchOnMount)}function Dm(e,t,n){if(!1!==Hp(t.enabled,e)&&"static"!==$p(t.staleTime,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&Lm(e,t)}return!1}function Mm(e,t,n,r){return(e!==t||!1===Hp(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&Lm(e,n)}function Lm(e,t){return!1!==Hp(t.enabled,e)&&e.isStaleByTime($p(t.staleTime,e))}var Im=k.createContext(void 0),zm=e=>{const t=k.useContext(Im);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Fm=({client:e,children:t})=>(k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,Rc.jsx)(Im.Provider,{value:e,children:t}));var Bm=k.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),Um=k.createContext(!1),Vm=(Um.Provider,(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()}));function $m(e,t,n){const r=k.useContext(Um),a=k.useContext(Bm),o=zm(n),i=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(i);const s=o.getQueryCache().get(i.queryHash),l=!1!==e.subscribed;i._optimisticResults=r?"isRestoring":l?"optimistic":void 0,(e=>{if(e.suspense){const t=1e3,n=e=>"static"===e?e:Math.max(e??t,t),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>n(r(...e)):n(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(i),((e,t,n)=>{const r=n?.state.error&&"function"==typeof e.throwOnError?sm(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))})(i,a,s),(e=>{k.useEffect(()=>{e.clearReset()},[e])})(a);const c=!o.getQueryCache().get(i.queryHash),[u]=k.useState(()=>new t(o,i)),d=u.getOptimisticResult(i),f=!r&&l;if(k.useSyncExternalStore(k.useCallback(e=>{const t=f?u.subscribe(um.batchCalls(e)):Bp;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),k.useEffect(()=>{u.setOptions(i)},[i,u]),((e,t)=>e?.suspense&&t.isPending)(i,d))throw Vm(i,u,a);if((({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&void 0===e.data||sm(n,[e.error,r])))({result:d,errorResetBoundary:a,throwOnError:i.throwOnError,query:s,suspense:i.suspense}))throw d.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(i,d),i.experimental_prefetchInRender&&!lm.isServer()&&((e,t)=>e.isLoading&&e.isFetching&&!t)(d,r)&&(c?Vm(i,u,a):s?.promise)?.catch(Bp).finally(()=>{u.updateResult()}),i.notifyOnChangeProps?d:u.trackResult(d)}function Hm(e,t){return $m(e,Am,t)}function qm(e,t){const n=zm(t),[r]=k.useState(()=>new wm(n,e));k.useEffect(()=>{r.setOptions(e)},[r,e]);const a=k.useSyncExternalStore(k.useCallback(e=>r.subscribe(um.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=k.useCallback((e,t)=>{r.mutate(e,t).catch(Bp)},[r]);if(a.error&&sm(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}var Wm=i((e,t)=>{t.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}),Km=i((e,t)=>{var n="object"==typeof global&&global&&global.Object===Object&&global;t.exports=n}),Gm=i((e,t)=>{var n=Km(),r="object"==typeof self&&self&&self.Object===Object&&self,a=n||r||Function("return this")();t.exports=a}),Ym=i((e,t)=>{var n=Gm();t.exports=function(){return n.Date.now()}}),Xm=i((e,t)=>{var n=/\s/;t.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}}),Qm=i((e,t)=>{var n=Xm(),r=/^\s+/;t.exports=function(e){return e?e.slice(0,n(e)+1).replace(r,""):e}}),Jm=i((e,t)=>{var n=Gm().Symbol;t.exports=n}),Zm=i((e,t)=>{var n=Jm(),r=Object.prototype,a=r.hasOwnProperty,o=r.toString,i=n?n.toStringTag:void 0;t.exports=function(e){var t=a.call(e,i),n=e[i];try{e[i]=void 0;var r=!0}catch(l){}var s=o.call(e);return r&&(t?e[i]=n:delete e[i]),s}}),eg=i((e,t)=>{var n=Object.prototype.toString;t.exports=function(e){return n.call(e)}}),tg=i((e,t)=>{var n=Jm(),r=Zm(),a=eg(),o=n?n.toStringTag:void 0;t.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?r(e):a(e)}}),ng=i((e,t)=>{t.exports=function(e){return null!=e&&"object"==typeof e}}),rg=i((e,t)=>{var n=tg(),r=ng();t.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==n(e)}}),ag=i((e,t)=>{var n=Qm(),r=Wm(),a=rg(),o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;t.exports=function(e){if("number"==typeof e)return e;if(a(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var c=i.test(e);return c||s.test(e)?l(e.slice(2),c?2:8):o.test(e)?NaN:+e}}),og=i((e,t)=>{var n=Wm(),r=Ym(),a=ag(),o=Math.max,i=Math.min;t.exports=function(e,t,s){var l,c,u,d,f,h,p=0,m=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=l,r=c;return l=c=void 0,p=t,d=e.apply(r,n)}function b(e){var n=e-h;return void 0===h||n>=t||n<0||g&&e-p>=u}function x(){var e=r();if(b(e))return w(e);f=setTimeout(x,function(e){var n=t-(e-h);return g?i(n,u-(e-p)):n}(e))}function w(e){return f=void 0,y&&l?v(e):(l=c=void 0,d)}function S(){var e=r(),n=b(e);if(l=arguments,c=this,h=e,n){if(void 0===f)return function(e){return p=e,f=setTimeout(x,t),m?v(e):d}(h);if(g)return clearTimeout(f),f=setTimeout(x,t),v(h)}return void 0===f&&(f=setTimeout(x,t)),d}return t=a(t)||0,n(s)&&(m=!!s.leading,u=(g="maxWait"in s)?o(a(s.maxWait)||0,t):u,y="trailing"in s?!!s.trailing:y),S.cancel=function(){void 0!==f&&clearTimeout(f),p=0,l=h=c=f=void 0},S.flush=function(){return void 0===f?d:w(r())},S}}),ig=i((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,a,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(a=r;0!==a--;)if(!e(t[a],n[a]))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((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=r;0!==a--;)if(!Object.prototype.hasOwnProperty.call(n,o[a]))return!1;for(a=r;0!==a--;){var i=o[a];if(!e(t[i],n[i]))return!1}return!0}return t!=t&&n!=n}});function sg(e,t){return function(){return e.apply(t,arguments)}}var lg,{toString:cg}=Object.prototype,{getPrototypeOf:ug}=Object,{iterator:dg,toStringTag:fg}=Symbol,hg=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),pg=(e,t)=>{let n=e;const r=[];for(;null!=n&&n!==Object.prototype;){if(-1!==r.indexOf(n))return!1;if(r.push(n),hg(n,t))return!0;n=ug(n)}return!1},mg=(lg=Object.create(null),e=>{const t=cg.call(e);return lg[t]||(lg[t]=t.slice(8,-1).toLowerCase())}),gg=e=>(e=e.toLowerCase(),t=>mg(t)===e),yg=e=>t=>typeof t===e,{isArray:vg}=Array,bg=yg("undefined");function xg(e){return null!==e&&!bg(e)&&null!==e.constructor&&!bg(e.constructor)&&kg(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var wg=gg("ArrayBuffer");var Sg=yg("string"),kg=yg("function"),Eg=yg("number"),Cg=e=>null!==e&&"object"==typeof e,Ng=e=>{if(!Cg(e))return!1;const t=ug(e);return!(null!==t&&t!==Object.prototype&&null!==ug(t)||pg(e,fg)||pg(e,dg))},jg=gg("Date"),Tg=gg("File"),Rg=gg("Blob"),Og=gg("FileList");var Pg="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},Ag=void 0!==Pg.FormData?Pg.FormData:void 0,_g=gg("URLSearchParams"),[Dg,Mg,Lg,Ig]=["ReadableStream","Request","Response","Headers"].map(gg);function zg(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,a;if("object"!=typeof e&&(e=[e]),vg(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(xg(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let i;for(r=0;r<o;r++)i=a[r],t.call(null,e[i],i,e)}}function Fg(e,t){if(xg(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,a=n.length;for(;a-- >0;)if(r=n[a],t===r.toLowerCase())return r;return null}var Bg="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Ug=e=>!bg(e)&&e!==Bg;var Vg,$g=(Vg="undefined"!=typeof Uint8Array&&ug(Uint8Array),e=>Vg&&e instanceof Vg),Hg=gg("HTMLFormElement"),{propertyIsEnumerable:qg}=Object.prototype,Wg=gg("RegExp"),Kg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};zg(n,(n,a)=>{let o;!1!==(o=t(n,a,e))&&(r[a]=o||n)}),Object.defineProperties(e,r)};var Gg,Yg,Xg,Qg,Jg=gg("AsyncFunction"),Zg=(Gg="function"==typeof setImmediate,Yg=kg(Bg.postMessage),Gg?setImmediate:Yg?(Xg=`axios@${Math.random()}`,Qg=[],Bg.addEventListener("message",({source:e,data:t})=>{e===Bg&&t===Xg&&Qg.length&&Qg.shift()()},!1),e=>{Qg.push(e),Bg.postMessage(Xg,"*")}):e=>setTimeout(e)),ey="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Bg):"undefined"!=typeof process&&process.nextTick||Zg,ty=e=>null!=e&&kg(e[dg]),ny={isArray:vg,isArrayBuffer:wg,isBuffer:xg,isFormData:e=>{if(!e)return!1;if(Ag&&e instanceof Ag)return!0;const t=ug(e);if(!t||t===Object.prototype)return!1;if(!kg(e.append))return!1;const n=mg(e);return"formdata"===n||"object"===n&&kg(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&wg(e.buffer),t},isString:Sg,isNumber:Eg,isBoolean:e=>!0===e||!1===e,isObject:Cg,isPlainObject:Ng,isEmptyObject:e=>{if(!Cg(e)||xg(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:Dg,isRequest:Mg,isResponse:Lg,isHeaders:Ig,isUndefined:bg,isDate:jg,isFile:Tg,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:Rg,isRegExp:Wg,isFunction:kg,isStream:e=>Cg(e)&&kg(e.pipe),isURLSearchParams:_g,isTypedArray:$g,isFileList:Og,forEach:zg,merge:function e(...t){const{caseless:n,skipUndefined:r}=Ug(this)&&this||{},a={},o=(t,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const i=n&&"string"==typeof o&&Fg(a,o)||o,s=hg(a,i)?a[i]:void 0;Ng(s)&&Ng(t)?a[i]=e(s,t):Ng(t)?a[i]=e({},t):vg(t)?a[i]=t.slice():r&&bg(t)||(a[i]=t)};for(let i=0,s=t.length;i<s;i++){const e=t[i];if(!e||xg(e))continue;if(zg(e,o),"object"!=typeof e||vg(e))continue;const n=Object.getOwnPropertySymbols(e);for(let t=0;t<n.length;t++){const r=n[t];qg.call(e,r)&&o(e[r],r)}}return a},extend:(e,t,n,{allOwnKeys:r}={})=>(zg(t,(t,r)=>{n&&kg(t)?Object.defineProperty(e,r,{__proto__:null,value:sg(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let a,o,i;const s={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)i=a[o],r&&!r(i,e,t)||s[i]||(t[i]=e[i],s[i]=!0);e=!1!==n&&ug(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:mg,kindOfTest:gg,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(vg(e))return e;let t=e.length;if(!Eg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[dg]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Hg,hasOwnProperty:hg,hasOwnProp:hg,hasOwnInPrototypeChain:pg,getSafeProp:(e,t)=>null!=e&&pg(e,t)?e[t]:void 0,reduceDescriptors:Kg,freezeMethods:e=>{Kg(e,(t,n)=>{if(kg(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];kg(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return vg(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Fg,global:Bg,isContextDefined:Ug,isSpecCompliantForm:function(e){return!!(e&&kg(e.append)&&"FormData"===e[fg]&&e[dg])},toJSONObject:e=>{const t=new WeakSet,n=e=>{if(Cg(e)){if(t.has(e))return;if(xg(e))return e;if(!("toJSON"in e)){t.add(e);const r=vg(e)?[]:{};return zg(e,(e,t)=>{const a=n(e);!bg(a)&&(r[t]=a)}),t.delete(e),r}}return e};return n(e)},isAsyncFn:Jg,isThenable:e=>e&&(Cg(e)||kg(e))&&kg(e.then)&&kg(e.catch),setImmediate:Zg,asap:ey,isIterable:ty,isSafeIterable:e=>null!=e&&pg(e,dg)&&ty(e)},ry=ny.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var ay=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),oy=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function iy(e,t){return ny.isArray(e)?e.map(e=>iy(e,t)):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(t,""))}function sy(e){const t=Object.create(null);return ny.forEach(e.toJSON(),(e,n)=>{t[n]=(e=>iy(e,oy))(e)}),t}var ly=Symbol("internals");function cy(e){return e&&String(e).trim().toLowerCase()}function uy(e){return!1===e||null==e?e:ny.isArray(e)?e.map(uy):(e=>iy(e,ay))(String(e))}function dy(e,t,n,r,a){return ny.isFunction(r)?r.call(this,t,n):(a&&(t=n),ny.isString(t)?ny.isString(r)?-1!==t.indexOf(r):ny.isRegExp(r)?r.test(t):void 0:void 0)}var fy=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function a(e,t,n){const a=cy(t);if(!a)return;const o=ny.findKey(r,a);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=uy(e))}const o=(e,t)=>ny.forEach(e,(e,n)=>a(e,n,t));if(ny.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(ny.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,r,a;return e&&e.split("\n").forEach(function(e){a=e.indexOf(":"),n=e.substring(0,a).trim().toLowerCase(),r=e.substring(a+1).trim(),!n||t[n]&&ry[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(ny.isObject(e)&&ny.isSafeIterable(e)){let n,r,a=Object.create(null);for(const t of e){if(!ny.isArray(t))throw new TypeError("Object iterator must return a key-value pair");r=t[0],ny.hasOwnProp(a,r)?(n=a[r],a[r]=ny.isArray(n)?[...n,t[1]]:[n,t[1]]):a[r]=t[1]}o(a,t)}else null!=e&&a(t,e,n);return this}get(e,t){if(e=cy(e)){const n=ny.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(ny.isFunction(t))return t.call(this,e,n);if(ny.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=cy(e)){const n=ny.findKey(this,e);return!(!n||void 0===this[n]||t&&!dy(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function a(e){if(e=cy(e)){const a=ny.findKey(n,e);!a||t&&!dy(0,n[a],a,t)||(delete n[a],r=!0)}}return ny.isArray(e)?e.forEach(a):a(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const a=t[n];e&&!dy(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,n={};return ny.forEach(this,(r,a)=>{const o=ny.findKey(n,a);if(o)return t[o]=uy(r),void delete t[a];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(a):String(a).trim();i!==a&&delete t[a],t[i]=uy(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ny.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&ny.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[ly]=this[ly]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=cy(e);t[r]||(!function(e,t){const n=ny.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,a){return this[r].call(this,t,e,n,a)},configurable:!0})})}(n,e),t[r]=!0)}return ny.isArray(e)?e.forEach(r):r(e),this}};fy.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ny.reduceDescriptors(fy.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),ny.freezeMethods(fy);function hy(e,t){const n=new Set(t.map(e=>String(e).toLowerCase())),r=[],a=e=>{if(null===e||"object"!=typeof e)return e;if(ny.isBuffer(e))return e;if(-1!==r.indexOf(e))return;let t;if(e instanceof fy&&(e=e.toJSON()),r.push(e),ny.isArray(e))t=[],e.forEach((e,n)=>{const r=a(e);ny.isUndefined(r)||(t[n]=r)});else{if(!ny.isPlainObject(e)&&function(e){if(ny.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(ny.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return r.pop(),e;t=Object.create(null);for(const[r,o]of Object.entries(e)){const e=n.has(r.toLowerCase())?"[REDACTED ****]":a(o);ny.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return a(e)}var py=class e extends Error{static from(t,n,r,a,o,i){const s=new e(t.message,n||t.code,r,a,o);return Object.defineProperty(s,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),s.name=t.name,null!=t.status&&null==s.status&&(s.status=t.status),i&&Object.assign(s,i),s}constructor(e,t,n,r,a){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a,this.status=a.status)}toJSON(){const e=this.config,t=e&&ny.hasOwnProp(e,"redact")?e.redact:void 0,n=ny.isArray(t)&&t.length>0?hy(e,t):ny.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};py.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",py.ERR_BAD_OPTION="ERR_BAD_OPTION",py.ECONNABORTED="ECONNABORTED",py.ETIMEDOUT="ETIMEDOUT",py.ECONNREFUSED="ECONNREFUSED",py.ERR_NETWORK="ERR_NETWORK",py.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",py.ERR_DEPRECATED="ERR_DEPRECATED",py.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",py.ERR_BAD_REQUEST="ERR_BAD_REQUEST",py.ERR_CANCELED="ERR_CANCELED",py.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",py.ERR_INVALID_URL="ERR_INVALID_URL",py.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function my(e){return ny.isPlainObject(e)||ny.isArray(e)}function gy(e){return ny.endsWith(e,"[]")?e.slice(0,-2):e}function yy(e,t,n){return e?e.concat(t).map(function(e,t){return e=gy(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}var vy=ny.toFlatObject(ny,{},null,function(e){return/^is[A-Z]/.test(e)});function by(e,t,n){if(!ny.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=ny.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!ny.isUndefined(t[e])})).metaTokens,a=n.visitor||h,o=n.dots,i=n.indexes,s=n.Blob||"undefined"!=typeof Blob&&Blob,l=void 0===n.maxDepth?100:n.maxDepth,c=s&&ny.isSpecCompliantForm(t),u=[];if(!ny.isFunction(a))throw new TypeError("visitor must be a function");function d(e){if(null===e)return"";if(ny.isDate(e))return e.toISOString();if(ny.isBoolean(e))return e.toString();if(!c&&ny.isBlob(e))throw new py("Blob is not supported. Use a Buffer instead.");if(ny.isArrayBuffer(e)||ny.isTypedArray(e)){if(c&&"function"==typeof s)return new s([e]);if("undefined"!=typeof Buffer)return Buffer.from(e);throw new py("Blob is not supported. Use a Buffer instead.",py.ERR_NOT_SUPPORT)}return e}function f(e){if(e>l)throw new py("Object is too deeply nested ("+e+" levels). Max depth: "+l,py.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(e,n,a){let s=e;if(ny.isReactNative(t)&&ny.isReactNativeBlob(e))return t.append(yy(a,n,o),d(e)),!1;if(e&&!a&&"object"==typeof e)if(ny.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=function(e,t){if(l===1/0)return JSON.stringify(e);const n=[];return JSON.stringify(e,function(e,r){if(!ny.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),f(t+n.length-1),r})}(e,1);else if(ny.isArray(e)&&function(e){return ny.isArray(e)&&!e.some(my)}(e)||(ny.isFileList(e)||ny.endsWith(n,"[]"))&&(s=ny.toArray(e)))return n=gy(n),s.forEach(function(e,r){!ny.isUndefined(e)&&null!==e&&t.append(!0===i?yy([n],r,o):null===i?n:n+"[]",d(e))}),!1;return!!my(e)||(t.append(yy(a,n,o),d(e)),!1)}const p=Object.assign(vy,{defaultVisitor:h,convertValue:d,isVisitable:my});if(!ny.isObject(e))throw new TypeError("data must be an object");return function e(n,r,o=0){if(!ny.isUndefined(n)){if(f(o),-1!==u.indexOf(n))throw new Error("Circular reference detected in "+r.join("."));u.push(n),ny.forEach(n,function(n,i){!0===(!(ny.isUndefined(n)||null===n)&&a.call(t,n,ny.isString(i)?i.trim():i,r,p))&&e(n,r?r.concat(i):[i],o+1)}),u.pop()}}(e),t}function xy(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function wy(e,t){this._pairs=[],e&&by(e,this,t)}var Sy=wy.prototype;function ky(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ey(e,t,n){if(!t)return e;e=e||"";const r=ny.isFunction(n)?{serialize:n}:n,a=ny.getSafeProp(r,"encode")||ky,o=ny.getSafeProp(r,"serialize");let i;if(i=o?o(t,r):ny.isURLSearchParams(t)?t.toString():new wy(t,r).toString(a),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Sy.append=function(e,t){this._pairs.push([e,t])},Sy.toString=function(e){const t=e?t=>e.call(this,t,xy):xy;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var Cy=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ny.forEach(this.handlers,function(t){null!==t&&e(t)})}},Ny={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},jy={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:wy,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ty=s({hasBrowserEnv:()=>Ry,hasStandardBrowserEnv:()=>Py,hasStandardBrowserWebWorkerEnv:()=>Ay,navigator:()=>Oy,origin:()=>_y}),Ry="undefined"!=typeof window&&"undefined"!=typeof document,Oy="object"==typeof navigator&&navigator||void 0,Py=Ry&&(!Oy||["ReactNative","NativeScript","NS"].indexOf(Oy.product)<0),Ay="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,_y=Ry&&window.location.href||"http://localhost",Dy={...Ty,...jy};function My(e){if(e>100)throw new py("FormData field is too deeply nested ("+e+" levels). Max depth: 100",py.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Ly(e){function t(e,n,r,a){My(a);let o=e[a++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),s=a>=e.length;return o=!o&&ny.isArray(r)?r.length:o,s?(ny.hasOwnProp(r,o)?r[o]=ny.isArray(r[o])?r[o].concat(n):[r[o],n]:r[o]=n,!i):(ny.hasOwnProp(r,o)&&ny.isObject(r[o])||(r[o]=[]),t(e,n,r[o],a)&&ny.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const a=n.length;let o;for(r=0;r<a;r++)o=n[r],t[o]=e[o];return t}(r[o])),!i)}if(ny.isFormData(e)&&ny.isFunction(e.entries)){const n={};return ny.forEachEntry(e,(e,r)=>{t(function(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;null!==(r=n.exec(e));)My(t.length),t.push("[]"===r[0]?"":r[1]||r[0]);return t}(e),r,n,0)}),n}return null}var Iy=(e,t)=>null!=e&&ny.hasOwnProp(e,t)?e[t]:void 0;var zy={transitional:Ny,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,a=ny.isObject(e);if(a&&ny.isHTMLForm(e)&&(e=new FormData(e)),ny.isFormData(e))return r?JSON.stringify(Ly(e)):e;if(ny.isArrayBuffer(e)||ny.isBuffer(e)||ny.isStream(e)||ny.isFile(e)||ny.isBlob(e)||ny.isReadableStream(e))return e;if(ny.isArrayBufferView(e))return e.buffer;if(ny.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){const t=Iy(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return by(e,new Dy.classes.URLSearchParams,{visitor:function(e,t,n,r){return Dy.isNode&&ny.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((o=ny.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=Iy(this,"env"),r=n&&n.FormData;return by(o?{"files[]":e}:e,r&&new r,t)}}return a||r?(t.setContentType("application/json",!1),function(e,t,n){if(ny.isString(e))try{return(t||JSON.parse)(e),ny.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=Iy(this,"transitional")||zy.transitional,n=t&&t.forcedJSONParsing,r=Iy(this,"responseType"),a="json"===r;if(ny.isResponse(e)||ny.isReadableStream(e))return e;if(e&&ny.isString(e)&&(n&&!r||a)){const n=!(t&&t.silentJSONParsing)&&a;try{return JSON.parse(e,Iy(this,"parseReviver"))}catch(o){if(n){if("SyntaxError"===o.name)throw py.from(o,py.ERR_BAD_RESPONSE,this,null,Iy(this,"response"));throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Dy.classes.FormData,Blob:Dy.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function Fy(e,t){const n=this||zy,r=t||n,a=fy.from(r.headers);let o=r.data;return ny.forEach(e,function(e){o=e.call(n,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function By(e){return!(!e||!e.__CANCEL__)}ny.forEach(["delete","get","head","post","put","patch","query"],e=>{zy.headers[e]={}});var Uy=class extends py{constructor(e,t,n){super(null==e?"canceled":e,py.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Vy(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new py("Request failed with status code "+n.status,n.status>=400&&n.status<500?py.ERR_BAD_REQUEST:py.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}var $y=(e,t,n=3)=>{let r=0;const a=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a,o=0,i=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[i];a||(a=l),n[o]=s,r[o]=l;let u=i,d=0;for(;u!==o;)d+=n[u++],u%=e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-a<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,a=0,o=1e3/t;const i=(t,o=Date.now())=>{a=o,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-a;s>=o?i(e,t):(n=e,r||(r=setTimeout(()=>{r=null,i(n)},o-s)))},()=>n&&i(n)]}(n=>{if(!n||"number"!=typeof n.loaded)return;const o=n.loaded,i=n.lengthComputable?n.total:void 0,s=null!=i?Math.min(o,i):o,l=Math.max(0,s-r),c=a(l);r=Math.max(r,s),e({loaded:s,total:i,progress:i?s/i:void 0,bytes:l,rate:c||void 0,estimated:c&&i?(i-s)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},Hy=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},qy=e=>(...t)=>ny.asap(()=>e(...t)),Wy=Dy.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Dy.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Dy.origin),Dy.navigator&&/(msie|trident)/i.test(Dy.navigator.userAgent)):()=>!0,Ky=Dy.hasStandardBrowserEnv?{write(e,t,n,r,a,o,i){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];ny.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),ny.isString(r)&&s.push(`path=${r}`),ny.isString(a)&&s.push(`domain=${a}`),!0===o&&s.push("secure"),ny.isString(i)&&s.push(`SameSite=${i}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const a=t[r].replace(/^\s+/,""),o=a.indexOf("=");if(-1!==o&&a.slice(0,o)===e)try{return decodeURIComponent(a.slice(o+1))}catch(n){return a.slice(o+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};var Gy=/^https?:(?!\/\/)/i,Yy=/[\t\n\r]/g;function Xy(e,t){if("string"==typeof e&&Gy.test(function(e){return function(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}(e).replace(Yy,"")}(e)))throw new py('Invalid URL: missing "//" after protocol',py.ERR_INVALID_URL,t)}function Qy(e,t,n,r){Xy(t,r);let a=!("string"==typeof(o=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o));var o;return e&&(a||!1===n)?(Xy(e,r),function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t)):t}var Jy=e=>e instanceof fy?{...e}:e;function Zy(e,t){e=e||{},t=t||{};const n=Object.create(null);function r(e,t,n,r){return ny.isPlainObject(e)&&ny.isPlainObject(t)?ny.merge.call({caseless:r},e,t):ny.isPlainObject(t)?ny.merge({},t):ny.isArray(t)?t.slice():t}function a(e,t,n,a){return ny.isUndefined(t)?ny.isUndefined(e)?void 0:r(void 0,e,0,a):r(e,t,0,a)}function o(e,t){if(!ny.isUndefined(t))return r(void 0,t)}function i(e,t){return ny.isUndefined(t)?ny.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,a,o){return ny.hasOwnProp(t,o)?r(n,a):ny.hasOwnProp(e,o)?r(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:s,headers:(e,t,n)=>a(Jy(e),Jy(t),0,!0)};return ny.forEach(Object.keys({...e,...t}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const o=ny.hasOwnProp(l,r)?l[r]:a,i=o(ny.hasOwnProp(e,r)?e[r]:void 0,ny.hasOwnProp(t,r)?t[r]:void 0,r);ny.isUndefined(i)&&o!==s||(n[r]=i)}),ny.hasOwnProp(t,"validateStatus")&&ny.isUndefined(t.validateStatus)&&!1===function(n){const r=ny.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!ny.isUndefined(r)){if(!ny.isPlainObject(r))return;if(ny.hasOwnProp(r,n))return r[n]}const a=ny.hasOwnProp(e,"transitional")?e.transitional:void 0;if(ny.isPlainObject(a)&&ny.hasOwnProp(a,n))return a[n]}("validateStatusUndefinedResolves")&&(ny.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}var ev=["content-type","content-length"];function tv(e){const t=Zy({},e),n=e=>ny.hasOwnProp(t,e)?t[e]:void 0,r=n("data");let a=n("withXSRFToken");const o=n("xsrfHeaderName"),i=n("xsrfCookieName");let s=n("headers");const l=n("auth"),c=n("baseURL"),u=n("allowAbsoluteUrls"),d=n("url");if(t.headers=s=fy.from(s),t.url=Ey(Qy(c,d,u,t),n("params"),n("paramsSerializer")),l){const t=ny.getSafeProp(l,"username")||"",n=ny.getSafeProp(l,"password")||"";try{s.set("Authorization","Basic "+btoa(t+":"+(n?encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))):"")))}catch(f){throw py.from(f,py.ERR_BAD_OPTION_VALUE,e)}}if(ny.isFormData(r)&&(Dy.hasStandardBrowserEnv||Dy.hasStandardBrowserWebWorkerEnv||ny.isReactNative(r)?s.setContentType(void 0):ny.isFunction(r.getHeaders)&&function(e,t,n){"content-only"===n?Object.entries(t||{}).forEach(([t,n])=>{ev.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}(s,r.getHeaders(),n("formDataHeaderPolicy"))),Dy.hasStandardBrowserEnv&&(ny.isFunction(a)&&(a=a(t)),!0===a||null==a&&Wy(t.url))){const e=o&&i&&Ky.read(i);e&&s.set(o,e)}return t}var nv="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=tv(e);let a=r.data;const o=fy.from(r.headers).normalize();let i,s,l,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:h}=r;function p(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=fy.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Vy(function(e){t(e),p()},function(e){n(e),p()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&m.responseURL.startsWith("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new py("Request aborted",py.ECONNABORTED,e,m)),p(),m=null)},m.onerror=function(t){const r=new py(t&&t.message?t.message:"Network Error",py.ERR_NETWORK,e,m);r.event=t||null,n(r),p(),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const a=r.transitional||Ny;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new py(t,a.clarifyTimeoutError?py.ETIMEDOUT:py.ECONNABORTED,e,m)),p(),m=null},void 0===a&&o.setContentType(null),"setRequestHeader"in m&&ny.forEach(sy(o),function(e,t){m.setRequestHeader(t,e)}),ny.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),h&&([l,u]=$y(h,!0),m.addEventListener("progress",l)),f&&m.upload&&([s,c]=$y(f),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new Uy(null,e,m):t),m.abort(),p(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const y=function(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}(r.url);if(y&&!Dy.protocols.includes(y))return n(new py("Unsupported protocol "+y+":",py.ERR_BAD_REQUEST,e)),void p();m.send(a||null)})},rv=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const a=function(e){if(!r){r=!0,i();const t=e instanceof Error?e:this.reason;n.abort(t instanceof py?t:new Uy(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,a(new py(`timeout of ${t}ms exceeded`,py.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)}),e=null)};e.forEach(e=>e.addEventListener("abort",a,{once:!0}));const{signal:s}=n;return s.unsubscribe=()=>ny.asap(i),s},av=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,a=0;for(;a<n;)r=a+t,yield e.slice(a,r),a=r},ov=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},iv=(e,t,n,r)=>{const a=async function*(e,t){for await(const n of ov(e))yield*av(n,t)}(e,t);let o,i=0,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await a.next();if(t)return s(),void e.close();let o=r.byteLength;n&&n(i+=o),e.enqueue(new Uint8Array(r))}catch(nu){throw s(nu),nu}},cancel:e=>(s(e),a.return())},{highWaterMark:2})},sv=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,lv=(e,t,n)=>t+2<n&&sv(e.charCodeAt(t+1))&&sv(e.charCodeAt(t+2));var cv="1.18.1",{isFunction:uv}=ny,dv=e=>{if(!ny.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},fv=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},hv=e=>{const t=void 0!==ny.global&&null!==ny.global?ny.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=ny.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:a,Request:o,Response:i}=e,s=a?uv(a):"function"==typeof fetch,l=uv(o),c=uv(i);if(!s)return!1;const u=s&&uv(n),d=s&&("function"==typeof r?(f=new r,e=>f.encode(e)):async e=>new Uint8Array(await new o(e).arrayBuffer()));var f;const h=l&&u&&fv(()=>{let e=!1;const t=new o(Dy.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),p=c&&u&&fv(()=>ny.isReadableStream(new i("").body)),m={stream:p&&(e=>e.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new py(`Response type '${e}' is not supported`,py.ERR_NOT_SUPPORT,n)})});const g=async e=>null==e?0:ny.isBlob(e)?e.size:ny.isSpecCompliantForm(e)?(await new o(Dy.origin,{method:"POST",body:e}).arrayBuffer()).byteLength:ny.isArrayBufferView(e)||ny.isArrayBuffer(e)?e.byteLength:(ny.isURLSearchParams(e)&&(e+=""),ny.isString(e)?(await d(e)).byteLength:void 0);return async e=>{let{url:t,method:n,data:s,signal:c,cancelToken:d,timeout:f,onDownloadProgress:y,onUploadProgress:v,responseType:b,headers:x,withCredentials:w="same-origin",fetchOptions:S,maxContentLength:k,maxBodyLength:E}=tv(e);const C=ny.isNumber(k)&&k>-1,N=ny.isNumber(E)&&E>-1;let j=a||fetch;b=b?(b+"").toLowerCase():"text";let T=rv([c,d&&d.toAbortSignal()],f),R=null;const O=T&&T.unsubscribe&&(()=>{T.unsubscribe()});let P,A=null;const _=()=>new py("Request body larger than maxBodyLength limit",py.ERR_BAD_REQUEST,e,R);try{let a;const c=(t=>ny.hasOwnProp(e,t)?e[t]:void 0)("auth");if(c&&(a={username:ny.getSafeProp(c,"username")||"",password:ny.getSafeProp(c,"password")||""}),(e=>{const t=e.indexOf("://");let n=e;return-1!==t&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")})(t)){const e=new URL(t,Dy.origin);a||!e.username&&!e.password||(a={username:dv(e.username),password:dv(e.password)}),(e.username||e.password)&&(e.username="",e.password="",t=e.href)}if(a&&(x.delete("authorization"),x.set("Authorization","Basic "+btoa((D=(a.username||"")+":"+(a.password||""),encodeURIComponent(D).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))),C&&"string"==typeof t&&t.startsWith("data:")&&function(e){if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length;const t=r.length;for(let s=0;s<t;s++)if(37===r.charCodeAt(s)&&s+2<t){const t=r.charCodeAt(s+1),n=r.charCodeAt(s+2);sv(t)&&sv(n)&&(e-=2,s+=2)}let n=0,a=t-1;const o=e=>e>=2&&37===r.charCodeAt(e-2)&&51===r.charCodeAt(e-1)&&(68===r.charCodeAt(e)||100===r.charCodeAt(e));a>=0&&(61===r.charCodeAt(a)?(n++,a--):o(a)&&(n++,a-=3)),1===n&&a>=0&&(61===r.charCodeAt(a)||o(a))&&n++;const i=3*Math.floor(e/4)-(n||0);return i>0?i:0}let a=0;for(let o=0,i=r.length;o<i;o++){const e=r.charCodeAt(o);if(37===e&&lv(r,o,i))a+=1,o+=2;else if(e<128)a+=1;else if(e<2048)a+=2;else if(e>=55296&&e<=56319&&o+1<i){const e=r.charCodeAt(o+1);e>=56320&&e<=57343?(a+=4,o++):a+=3}else a+=3}return a}(t)>k)throw new py("maxContentLength size of "+k+" exceeded",py.ERR_BAD_RESPONSE,e,R);if(N&&"get"!==n&&"head"!==n){const e=await g(s);if("number"==typeof e&&isFinite(e)&&(P=e,e>E))throw _()}const d=N&&(ny.isReadableStream(s)||ny.isStream(s)),f=(e,t,n)=>iv(e,65536,e=>{if(N&&e>E)throw A=_();t&&t(e)},n);if(h&&"get"!==n&&"head"!==n&&(v||d)){if(P=null==P?await(async(e,t)=>{const n=ny.toFiniteNumber(e.getContentLength());return null==n?g(t):n})(x,s):P,0!==P||d){let e,n=new o(t,{method:"POST",body:s,duplex:"half"});if(ny.isFormData(s)&&(e=n.headers.get("content-type"))&&x.setContentType(e),n.body){const[e,t]=v&&Hy(P,$y(qy(v)))||[];s=f(n.body,e,t)}}}else if(d&&!l&&u&&"get"!==n&&"head"!==n)s=f(s);else if(d&&l&&!h&&"get"!==n&&"head"!==n)throw new py("Stream request bodies are not supported by the current fetch implementation",py.ERR_NOT_SUPPORT,e,R);ny.isString(w)||(w=w?"include":"omit");const M=l&&"credentials"in o.prototype;if(ny.isFormData(s)){const e=x.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&x.delete("content-type")}x.set("User-Agent","axios/"+cv,!1);const L={...S,signal:T,method:n.toUpperCase(),headers:sy(x.normalize()),body:s,duplex:"half",credentials:M?w:void 0};R=l&&new o(t,L);let I=await(l?j(R,S):j(t,L));const z=fy.from(I.headers);if(C){const t=ny.toFiniteNumber(z.getContentLength());if(null!=t&&t>k)throw new py("maxContentLength size of "+k+" exceeded",py.ERR_BAD_RESPONSE,e,R)}const F=p&&("stream"===b||"response"===b);if(p&&I.body&&(y||C||F&&O)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=I[e]});const n=ny.toFiniteNumber(z.getContentLength()),[r,a]=y&&Hy(n,$y(qy(y),!0))||[];let o=0;const s=t=>{if(C&&(o=t,o>k))throw new py("maxContentLength size of "+k+" exceeded",py.ERR_BAD_RESPONSE,e,R);r&&r(t)};I=new i(iv(I.body,65536,s,()=>{a&&a(),O&&O()}),t)}b=b||"text";let B=await m[ny.findKey(m,b)||"text"](I,e);if(C&&!p&&!F){let t;if(null!=B&&("number"==typeof B.byteLength?t=B.byteLength:"number"==typeof B.size?t=B.size:"string"==typeof B&&(t="function"==typeof r?(new r).encode(B).byteLength:B.length)),"number"==typeof t&&t>k)throw new py("maxContentLength size of "+k+" exceeded",py.ERR_BAD_RESPONSE,e,R)}return!F&&O&&O(),await new Promise((t,n)=>{Vy(t,n,{data:B,headers:fy.from(I.headers),status:I.status,statusText:I.statusText,config:e,request:R})})}catch(nu){if(O&&O(),T&&T.aborted&&T.reason instanceof py){const n=T.reason;throw n.config=e,R&&(n.request=R),nu!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:nu,writable:!0,enumerable:!1,configurable:!0}),n}if(A)throw R&&!A.request&&(A.request=R),A;if(nu instanceof py)throw R&&!nu.request&&(nu.request=R),nu;if(nu&&"TypeError"===nu.name&&/Load failed|fetch/i.test(nu.message)){const n=new py("Network Error",py.ERR_NETWORK,e,R,nu&&nu.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:nu.cause||nu,writable:!0,enumerable:!1,configurable:!0}),n}throw py.from(nu,nu&&nu.code,e,R,nu&&nu.response)}var D}},pv=new Map,mv=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,o=[r,a,n];let i,s,l=o.length,c=pv;for(;l--;)i=o[l],s=c.get(i),void 0===s&&c.set(i,s=l?new Map:hv(t)),c=s;return s},gv=(mv(),{http:null,xhr:nv,fetch:{get:mv}});ny.forEach(gv,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var yv=e=>`- ${e}`,vv=e=>ny.isFunction(e)||null===e||!1===e;var bv={getAdapter:function(e,t){e=ny.isArray(e)?e:[e];const{length:n}=e;let r,a;const o={};for(let i=0;i<n;i++){let n;if(r=e[i],a=r,!vv(r)&&(a=gv[(n=String(r)).toLowerCase()],void 0===a))throw new py(`Unknown adapter '${n}'`);if(a&&(ny.isFunction(a)||(a=a.get(t))))break;o[n||"#"+i]=a}if(!a){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new py("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(yv).join("\n"):" "+yv(e[0]):"as no adapter specified"),py.ERR_NOT_SUPPORT)}return a},adapters:gv};function xv(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Uy(null,e)}function wv(e){return xv(e),e.headers=fy.from(e.headers),e.data=Fy.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),bv.getAdapter(e.adapter||zy.adapter,e)(e).then(function(t){xv(e),e.response=t;try{t.data=Fy.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=fy.from(t.headers),t},function(t){if(!By(t)&&(xv(e),t&&t.response)){e.response=t.response;try{t.response.data=Fy.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=fy.from(t.response.headers)}return Promise.reject(t)})}var Sv={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Sv[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var kv={};Sv.transitional=function(e,t,n){return(r,a,o)=>{if(!1===e)throw new py(function(e,t){return"[Axios v"+cv+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}(a," has been removed"+(t?" in "+t:"")),py.ERR_DEPRECATED);return t&&!kv[a]&&(kv[a]=!0),!e||e(r,a,o)}},Sv.spelling=function(e){return(e,t)=>!0};var Ev={assertOptions:function(e,t,n){if("object"!=typeof e||null===e)throw new py("options must be an object",py.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const o=r[a],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const t=e[o],n=void 0===t||i(t,o,e);if(!0!==n)throw new py("option "+o+" must be "+n,py.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new py("Unknown option "+o,py.ERR_BAD_OPTION)}},validators:Sv},Cv=Ev.validators,Nv=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Cy,response:new Cy}}async request(e,t){try{return await this._request(e,t)}catch(nu){if(nu instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=(()=>{if(!t.stack)return"";const e=t.stack.indexOf("\n");return-1===e?"":t.stack.slice(e+1)})();try{if(nu.stack){if(r){const t=r.indexOf("\n"),n=-1===t?-1:r.indexOf("\n",t+1),a=-1===n?"":r.slice(n+1);String(nu.stack).endsWith(a)||(nu.stack+="\n"+r)}}else nu.stack=r}catch(n){}}throw nu}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Zy(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:a}=t;void 0!==n&&Ev.assertOptions(n,{silentJSONParsing:Cv.transitional(Cv.boolean),forcedJSONParsing:Cv.transitional(Cv.boolean),clarifyTimeoutError:Cv.transitional(Cv.boolean),legacyInterceptorReqResOrdering:Cv.transitional(Cv.boolean),advertiseZstdAcceptEncoding:Cv.transitional(Cv.boolean),validateStatusUndefinedResolves:Cv.transitional(Cv.boolean)},!1),null!=r&&(ny.isFunction(r)?t.paramsSerializer={serialize:r}:Ev.assertOptions(r,{encode:Cv.function,serialize:Cv.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ev.assertOptions(t,{baseUrl:Cv.spelling("baseURL"),withXsrfToken:Cv.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=a&&ny.merge(a.common,a[t.method]);a&&ny.forEach(["delete","get","head","post","put","patch","query","common"],e=>{delete a[e]}),t.headers=fy.concat(o,a);const i=[];let s=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;s=s&&e.synchronous;const n=t.transitional||Ny;n&&n.legacyInterceptorReqResOrdering?i.unshift(e.fulfilled,e.rejected):i.push(e.fulfilled,e.rejected)});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!s){const e=[wv.bind(this),void 0];for(e.unshift(...i),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=i.length;let f=t;for(;d<u;){const e=i[d++],t=i[d++];try{f=e(f)}catch(h){t.call(this,h);break}}try{c=wv.call(this,f)}catch(h){return Promise.reject(h)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Ey(Qy((e=Zy(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};ny.forEach(["delete","get","head","options"],function(e){Nv.prototype[e]=function(t,n){return this.request(Zy(n||{},{method:e,url:t,data:n&&ny.hasOwnProp(n,"data")?n.data:void 0}))}}),ny.forEach(["post","put","patch","query"],function(e){function t(t){return function(n,r,a){return this.request(Zy(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Nv.prototype[e]=t(),"query"!==e&&(Nv.prototype[e+"Form"]=t(!0))});var jv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(jv).forEach(([e,t])=>{jv[t]=e});var Tv=function e(t){const n=new Nv(t),r=sg(Nv.prototype.request,n);return ny.extend(r,Nv.prototype,n,{allOwnKeys:!0}),ny.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Zy(t,n))},r}(zy);Tv.Axios=Nv,Tv.CanceledError=Uy,Tv.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,a){n.reason||(n.reason=new Uy(e,r,a),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},Tv.isCancel=By,Tv.VERSION=cv,Tv.toFormData=by,Tv.AxiosError=py,Tv.Cancel=Tv.CanceledError,Tv.all=function(e){return Promise.all(e)},Tv.spread=function(e){return function(t){return e.apply(null,t)}},Tv.isAxiosError=function(e){return ny.isObject(e)&&!0===e.isAxiosError},Tv.mergeConfig=Zy,Tv.AxiosHeaders=fy,Tv.formToJSON=e=>Ly(ny.isHTMLForm(e)?new FormData(e):e),Tv.getAdapter=bv.getAdapter,Tv.HttpStatusCode=jv,Tv.default=Tv;var Rv=c(og(),1),Ov=c(ig(),1),Pv=Tv.create({baseURL:"/api",headers:{"Content-Type":"application/json"}}),Av=(0,k.createContext)(null),_v=new Set(["schema","globals","config","settings","system","admin","api","content","draft","live"]),Dv=e=>e.length<=63&&/^[a-z][a-z0-9_]*$/.test(e)&&!_v.has(e),Mv=(e,t)=>{let n=e.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"");n||(n="item");let r=n,a=1;for(;t.has(r)||r.length>63;)r=`${n.slice(0,60)}_${a}`,a++;return r};function Lv(e,t){if(!t)return e;for(const n of e){if(n.id===t)return n.fields??[];if(n.fields){const e=Lv(n.fields,t);if(null!==e)return e}}return null}function Iv(e,t){const n=e.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||"field";if(!t.has(n))return n;let r=2;for(;t.has(`${n}_${r}`);)r++;return`${n}_${r}`}var zv=e=>Array.isArray(e)?e.map(e=>({...e,id:e.id||`field_${Date.now()}_${Math.random().toString(36).slice(2,9)}`,fields:Array.isArray(e.fields)?zv(e.fields):void 0})):[],Fv=e=>Array.isArray(e)?e.map(e=>({...e,id:e.id||`node_${Date.now()}_${Math.random().toString(36).slice(2,9)}`,fields:zv(e.fields||[])})):[];function Bv(e,t,n){return e.map(e=>e.id===t?{...e,...n}:e.fields&&e.fields.length>0?{...e,fields:Bv(e.fields,t,n)}:e)}function Uv(e,t){return e.filter(e=>e.id!==t).map(e=>e.fields?{...e,fields:Uv(e.fields,t)}:e)}function Vv(e,t,n){return e.map(e=>e.id===t?{...e,fields:[...e.fields||[],n]}:e.fields&&e.fields.length>0?{...e,fields:Vv(e.fields,t,n)}:e)}function $v(e){const t=(0,S.c)(85),{children:n,projectId:r}=e,a=zm();let o,i,s,l;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={siteName:"Default Site",tagline:"Built with CMS",branding:{},metadata:{},seo:{}},i=[],s=[],t[0]=o,t[1]=i,t[2]=s):(o=t[0],i=t[1],s=t[2]),t[3]!==r?(l={schemaVersion:"5.0",projectId:r,config:o,pages:i,collections:s},t[3]=r,t[4]=l):l=t[4];const c=l,[u,d]=(0,k.useState)(c),f=(0,k.useRef)(c),[h,p]=(0,k.useState)(null),[m,g]=(0,k.useState)(null),[y,v]=(0,k.useState)("idle"),[b,x]=(0,k.useState)(!1),[w,E]=(0,k.useState)(null),C=(0,k.useRef)(null),N=(0,k.useRef)(!1),j=(0,k.useRef)(null);let T;t[5]===Symbol.for("react.memo_cache_sentinel")?(T=e=>{f.current=e,d(e)},t[5]=T):T=t[5];const R=T;let O;t[6]!==r?(O={queryKey:["project-schema-state",r],queryFn:async()=>(await Pv.get(`/content/schema/${r}`)).data,staleTime:3e4,gcTime:0},t[6]=r,t[7]=O):O=t[7];const{data:P,isLoading:A}=Hm(O);let _,D,M,L,I;t[8]!==h||t[9]!==P?(_=()=>{if(P?.draft&&!N.current){const e={...P.draft,pages:Fv(P.draft.pages||[]),collections:Fv(P.draft.collections||[])};R(e),E(e),C.current=P.meta.lastSaved;const t=[...e.pages,...e.collections];!h&&t.length>0&&p(t[0].id),v("saved"),N.current=!0}},D=[P,h,R],t[8]=h,t[9]=P,t[10]=_,t[11]=D):(_=t[10],D=t[11]),(0,k.useEffect)(_,D),t[12]===Symbol.for("react.memo_cache_sentinel")?(M=()=>{N.current=!1,C.current=null,E(null)},t[12]=M):M=t[12],t[13]!==r?(L=[r],t[13]=r,t[14]=L):L=t[14],(0,k.useEffect)(M,L),t[15]!==P?(I=()=>{P?.draft&&(R(P.draft),E(P.draft),C.current=P.meta.lastSaved,x(!1),v("saved"),oh.success("Resolved to server version"))},t[15]=P,t[16]=I):I=t[16];const z=I;let F;t[17]!==z||t[18]!==P?(F=()=>{P?.meta.lastSaved&&C.current&&new Date(P.meta.lastSaved).getTime()>new Date(C.current).getTime()&&(x(!0),oh.warning("Newer draft detected on server",{description:"Your local changes may conflict. Choose how to resolve.",action:{label:"Resolve",onClick:()=>z()}}))},t[17]=z,t[18]=P,t[19]=F):F=t[19];const B=P?.meta.lastSaved;let U,V;t[20]!==z||t[21]!==B?(U=[B,z],t[20]=z,t[21]=B,t[22]=U):U=t[22],(0,k.useEffect)(F,U);e:{if(!w){V=!1;break e}let e;t[23]!==w||t[24]!==u?(e=(0,Ov.default)(u,w),t[23]=w,t[24]=u,t[25]=e):e=t[25],V=!e}const $=V,H=rb;let q;t[26]===Symbol.for("react.memo_cache_sentinel")?(q=(e,t)=>{const n=f.current;if(!e)return{valid:!1,error:"API identifier is required"};if(!/^[a-z]/.test(e))return{valid:!1,error:"Must start with a lowercase letter"};if(!/^[a-z][a-z0-9_]*$/.test(e))return{valid:!1,error:"Only lowercase letters, numbers and underscores"};if(e.length>63)return{valid:!1,error:"Max 63 characters"};if(_v.has(e))return{valid:!1,error:`"${e}" is a reserved identifier`,suggestion:Mv(`my_${e}`,new Set)};const r=new Set([...n.pages,...n.collections].filter(e=>e.id!==t).map(nb));return r.has(e)?{valid:!1,error:"This identifier is already in use by another page or collection",suggestion:Mv(e,r)}:{valid:!0}},t[26]=q):q=t[26];const W=q;let K;t[27]===Symbol.for("react.memo_cache_sentinel")?(K=(e,t,n,r)=>{const a=f.current,o=a.pages.find(t=>t.id===e)||a.collections.find(t=>t.id===e);if(!o)return{valid:!0};if(!t)return{valid:!1,error:"API identifier is required"};if(!/^[a-zA-Z_]/.test(t))return{valid:!1,error:"Must start with a letter or underscore"};if(!/^[a-zA-Z0-9_]+$/.test(t))return{valid:!1,error:"Only letters, numbers and underscores"};const i=Lv(o.fields,n)??[],s=new Set(i.filter(e=>e.id!==r).map(tb));return s.has(t)?{valid:!1,error:"A field with this identifier already exists at this level",suggestion:Iv(t,s)}:{valid:!0}},t[27]=K):K=t[27];const G=K,Y=(0,k.useRef)(null);let X,Q,J,Z,ee;t[28]!==b||t[29]!==r?(X=async e=>{if(b)throw new Error("CONFLICT_DETECTED");const t=H(e);return{...(await Pv.patch(`/content/schema/${r}/draft`,{schema:t})).data,savedSchema:t}},t[28]=b,t[29]=r,t[30]=X):X=t[30],t[31]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>{v("saving"),x(!1)},t[31]=Q):Q=t[31],t[32]!==r||t[33]!==a?(J=e=>{v("saved");const t=(new Date).toISOString();(!C.current||t>C.current)&&(E(e.savedSchema),C.current=t),a.setQueryData(["project-schema-state",r],t=>t?{...t,draft:e.savedSchema,meta:{...t.meta,lastSaved:C.current}}:t)},t[32]=r,t[33]=a,t[34]=J):J=t[34],t[35]!==z?(Z=e=>{e instanceof Error&&"CONFLICT_DETECTED"===e.message?(x(!0),oh.error("Conflict detected",{description:"Your changes conflict with the server version.",action:{label:"Use Server",onClick:()=>z()}})):(v("error"),oh.error("Failed to save draft"))},t[35]=z,t[36]=Z):Z=t[36],t[37]!==X||t[38]!==J||t[39]!==Z?(ee={mutationFn:X,onMutate:Q,onSuccess:J,onError:Z},t[37]=X,t[38]=J,t[39]=Z,t[40]=ee):ee=t[40];const te=qm(ee);let ne;t[41]!==te?(ne=()=>{Y.current=te},t[41]=te,t[42]=ne):ne=t[42],(0,k.useEffect)(ne);const re=(0,k.useRef)(null);let ae,oe,ie;t[43]===Symbol.for("react.memo_cache_sentinel")?(ae=()=>(re.current=(0,Rv.default)(e=>{Y.current&&(j.current=Y.current.mutateAsync(e).then(eb).catch(Zv))},1e3,{leading:!1,trailing:!0}),()=>{re.current?.cancel()}),oe=[],t[43]=ae,t[44]=oe):(ae=t[43],oe=t[44]),(0,k.useEffect)(ae,oe),t[45]===Symbol.for("react.memo_cache_sentinel")?(ie=e=>{R(e),re.current?.(e)},t[45]=ie):ie=t[45];const se=ie;let le;t[46]!==te?(le=()=>{x(!1);const e=f.current;j.current?j.current.then(()=>te.mutate(e)):te.mutate(e),oh.info("Overwriting server with your local changes")},t[46]=te,t[47]=le):le=t[47];const ce=le;let ue;t[48]===Symbol.for("react.memo_cache_sentinel")?(ue=(e,t)=>{const n=f.current;se(n.pages.some(t=>t.id===e)?{...n,pages:n.pages.map(n=>n.id===e?t(n):n)}:{...n,collections:n.collections.map(n=>n.id===e?t(n):n)})},t[48]=ue):ue=t[48];const de=ue;let fe;t[49]===Symbol.for("react.memo_cache_sentinel")?(fe=e=>{const t=f.current,n=[...t.pages,...t.collections].map(Jv),r=new Set(n),a=Mv("SINGLETON"===e?"page":"collection",r),o=`node_${Date.now()}_${Math.random().toString(36).slice(2,7)}`,i={id:o,name:"SINGLETON"===e?"New Page":"New Collection",apiKey:a,type:e,fields:[{id:`field_${Date.now()}_${Math.random().toString(36).slice(2,7)}`,name:"title",label:"Title",type:"TEXT_SHORT",validation:{required:!0}}],createdAt:(new Date).toISOString(),cacheStrategy:"stale-while-revalidate"};se("SINGLETON"===e?{...t,pages:[...t.pages,i]}:{...t,collections:[...t.collections,i]}),p(o)},t[49]=fe):fe=t[49];const he=fe;let pe;t[50]===Symbol.for("react.memo_cache_sentinel")?(pe=(e,t)=>{de(e,n=>{const r={...n,...t};if(t.apiKey&&t.apiKey!==n.apiKey){const n=f.current,a=new Set([...n.pages,...n.collections].filter(t=>t.id!==e).map(Qv));Dv(t.apiKey)&&!a.has(t.apiKey)||(r.apiKey=Mv(t.apiKey,a))}return r})},t[50]=pe):pe=t[50];const me=pe;let ge;t[51]===Symbol.for("react.memo_cache_sentinel")?(ge=e=>{const t=f.current;se({...t,pages:t.pages.filter(t=>t.id!==e),collections:t.collections.filter(t=>t.id!==e)}),p(t=>t===e?null:t)},t[51]=ge):ge=t[51];const ye=ge;let ve;t[52]===Symbol.for("react.memo_cache_sentinel")?(ve=(e,t,n,r)=>{const a=void 0===r?{}:r,o=`field_${Date.now()}_${Math.random().toString(36).slice(2,7)}`;de(e,e=>{const r=(i=Lv(e.fields,n)??e.fields,new Set(i.map(e=>e.name)));var i;const s=Iv(a.name||t.toLowerCase().replace(/_/g,"_"),r),l="SECTION"===t||"OBJECT"===t||"LIST"===t||"ARRAY"===t?{id:o,label:a.label||`New ${t.charAt(0)+t.slice(1).toLowerCase()}`,type:t,fields:[],...a,name:s}:{id:o,label:a.label||`New ${t.replace(/_/g," ")}`,type:t,...a,name:s};return n?{...e,fields:Vv(e.fields,n,l)}:{...e,fields:[...e.fields,l]}}),g(o)},t[52]=ve):ve=t[52];const be=ve;let xe;t[53]===Symbol.for("react.memo_cache_sentinel")?(xe=(e,t,n)=>{de(e,e=>{if(n.name){const r=(e,t,n)=>{for(const a of e){if(a.id===t)return n;if(a.fields){const e=r(a.fields,t,a.id);if(void 0!==e)return e}}},a=r(e.fields,t),o=Lv(e.fields,a)??e.fields,i=new Set(o.filter(e=>e.id!==t).map(Xv));if(i.has(n.name)){const e=Iv(n.name,i);oh.warning(`"${n.name}" is already in use at this level`,{description:`Renamed to "${e}" to avoid conflicts`}),n={...n,name:e}}}return{...e,fields:Bv(e.fields,t,n)}})},t[53]=xe):xe=t[53];const we=xe;let Se;t[54]===Symbol.for("react.memo_cache_sentinel")?(Se=(e,t)=>{de(e,e=>({...e,fields:Uv(e.fields,t)})),g(e=>e===t?null:e)},t[54]=Se):Se=t[54];const ke=Se;let Ee;t[55]===Symbol.for("react.memo_cache_sentinel")?(Ee=(e,t)=>{de(e,e=>({...e,fields:t}))},t[55]=Ee):Ee=t[55];const Ce=Ee;let Ne,je,Te;t[56]!==te||t[57]!==r?(Ne=async()=>(j.current&&await j.current,re.current?.flush(),te.isPending&&await te.mutateAsync(f.current).catch(Yv),(await Pv.post(`/content/schema/${r}/publish`)).data),t[56]=te,t[57]=r,t[58]=Ne):Ne=t[58],t[59]!==r||t[60]!==a?(je=e=>{a.invalidateQueries({queryKey:["project-schema-state",r]}),oh.success("Schema published to production",{description:`Published at ${new Date(e.publishedAt).toLocaleTimeString()}`})},t[59]=r,t[60]=a,t[61]=je):je=t[61],t[62]!==Ne||t[63]!==je?(Te={mutationFn:Ne,onSuccess:je,onError:Gv},t[62]=Ne,t[63]=je,t[64]=Te):Te=t[64];const Re=qm(Te);let Oe;t[65]!==Re?(Oe=async()=>{await Re.mutateAsync()},t[65]=Re,t[66]=Oe):Oe=t[66];const Pe=Oe;let Ae;t[67]===Symbol.for("react.memo_cache_sentinel")?(Ae=()=>re.current?.flush(),t[67]=Ae):Ae=t[67];const _e=Ae;let De;t[68]===Symbol.for("react.memo_cache_sentinel")?(De=e=>{const t=e,n=H({...e,pages:e.pages||t.nodes?.filter(Kv).map(Wv)||[],collections:e.collections||t.nodes?.filter(qv).map(Hv)||[]}),r={...n,pages:Fv(n.pages),collections:Fv(n.collections)};se(r);const a=[...r.pages,...r.collections];a.length>0&&p(a[0].id),oh.success("Schema imported")},t[68]=De):De=t[68];const Me=De,Le=P?.meta.lastSaved||null,Ie=P?.meta.lastPublished||null;let ze;t[69]!==ce||t[70]!==b||t[71]!==$||t[72]!==A||t[73]!==Pe||t[74]!==z||t[75]!==u||t[76]!==m||t[77]!==h||t[78]!==y||t[79]!==Le||t[80]!==Ie?(ze={schema:u,selectedNodeId:h,selectedFieldId:m,syncStatus:y,isLoading:A,lastSaved:Le,lastPublished:Ie,isDirty:$,hasConflict:b,setSelectedNodeId:p,setSelectedFieldId:g,addNode:he,updateNode:me,deleteNode:ye,addField:be,updateField:we,deleteField:ke,reorderFields:Ce,publishSchema:Pe,forceSync:_e,importSchema:Me,resolveConflict:z,forceOverwriteServer:ce,validateNodeApiKey:W,validateFieldName:G},t[69]=ce,t[70]=b,t[71]=$,t[72]=A,t[73]=Pe,t[74]=z,t[75]=u,t[76]=m,t[77]=h,t[78]=y,t[79]=Le,t[80]=Ie,t[81]=ze):ze=t[81];const Fe=ze;let Be;return t[82]!==n||t[83]!==Fe?(Be=(0,Rc.jsx)(Av.Provider,{value:Fe,children:n}),t[82]=n,t[83]=Fe,t[84]=Be):Be=t[84],Be}function Hv(e){return{id:e.id,name:e.name,apiKey:e.apiKey,type:"COLLECTION",fields:e.fields,createdAt:(new Date).toISOString()}}function qv(e){return"COLLECTION"===e.type}function Wv(e){return{id:e.id,name:e.name,apiKey:e.apiKey,type:"SINGLETON",fields:e.fields,createdAt:(new Date).toISOString()}}function Kv(e){return"SINGLETON"===e.type}function Gv(){return oh.error("Publish failed")}function Yv(){}function Xv(e){return e.name}function Qv(e){return e.apiKey}function Jv(e){return e.apiKey}function Zv(){}function eb(){}function tb(e){return e.name}function nb(e){return e.apiKey}function rb(e){const t=new Set,n=e=>{let n=e.apiKey;return Dv(n)||(n=Mv(n||"node",t)),t.has(n)&&(n=Mv(n,t)),t.add(n),{...e,apiKey:n}};return{...e,pages:e.pages.map(n),collections:e.collections.map(n)}}var ab=()=>{const e=(0,k.useContext)(Av);if(!e)throw new Error("useSchema must be used within a SchemaProvider");return e},ob=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,ib=mh,sb=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return ib(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(e=>{const t=null==n?void 0:n[e],r=null==o?void 0:o[e];if(null===t)return null;const i=ob(t)||ob(r);return a[e][i]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return ib(e,i,null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.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({...o,...s}[t]):{...o,...s}[t]===n})?[...e,n,r]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)};"undefined"==typeof window||!window.document||window.document.createElement;function lb(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function cb(e,t=[]){let n=[];const r=()=>{const t=n.map(e=>k.createContext(e));return function(n){const r=n?.[e]||t;return k.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){const a=k.createContext(r);a.displayName=t+"Context";const o=n.length;n=[...n,r];const i=t=>{const{scope:n,children:r,...i}=t,s=n?.[e]?.[o]||a,l=k.useMemo(()=>i,Object.values(i));return(0,Rc.jsx)(s.Provider,{value:l,children:r})};return i.displayName=t+"Provider",[i,function(n,i){const s=i?.[e]?.[o]||a,l=k.useContext(s);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},ub(r,...t)]}function ub(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var db=globalThis?.document?k.useLayoutEffect:()=>{},fb=k[" useInsertionEffect ".trim().toString()]||db;function hb({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,i]=function({defaultProp:e,onChange:t}){const[n,r]=k.useState(e),a=k.useRef(n),o=k.useRef(t);return fb(()=>{o.current=t},[t]),k.useEffect(()=>{a.current!==n&&(o.current?.(n),a.current=n)},[n,a]),[n,r,o]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:a;{const t=k.useRef(void 0!==e);k.useEffect(()=>{t.current;t.current=s},[s,r])}return[l,k.useCallback(t=>{if(s){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&i.current?.(n)}else o(t)},[s,e,o,i])]}function pb(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function mb(...e){return t=>{let n=!1;const r=e.map(e=>{const r=pb(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():pb(e[t],null)}}}}function gb(...e){return k.useCallback(mb(...e),e)}function yb(e){const t=k.forwardRef((t,n)=>{let{children:r,...a}=t,o=null,i=!1;const s=[];Sb(r)&&"function"==typeof Cb&&(r=Cb(r._payload)),k.Children.forEach(r,e=>{if(t=e,k.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===bb){i=!0;const t=e;let n="child"in t.props?t.props.child:t.props.children;Sb(n)&&"function"==typeof Cb&&(n=Cb(n._payload)),o=xb(t,n),s.push(o?.props?.children)}else s.push(e);var t}),o?o=k.cloneElement(o,void 0,s):!i&&1===k.Children.count(r)&&k.isValidElement(r)&&(o=r);const l=o?function(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)}(o):void 0,c=gb(n,l);if(!o){if(r||0===r)throw new Error(i?Eb(e):kb(e));return r}const u=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(a,o.props??{});return o.type!==k.Fragment&&(u.ref=n?c:l),k.cloneElement(o,u)});return t.displayName=`${e}.Slot`,t}var vb=yb("Slot"),bb=Symbol.for("radix.slottable");var xb=(e,t)=>{if("child"in e.props){const t=e.props.child;return k.isValidElement(t)?k.cloneElement(t,void 0,e.props.children(t.props.children)):null}return k.isValidElement(t)?t:null};var wb=Symbol.for("react.lazy");function Sb(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===wb&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}var kb=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Eb=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Cb=k[" use ".trim().toString()],Nb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=yb(`Primitive.${t}`),r=k.forwardRef((e,r)=>{const{asChild:a,...o}=e,i=a?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,Rc.jsx)(i,{...o,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function jb(e,t){e&&x.flushSync(()=>e.dispatchEvent(t))}var Tb=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=k.useState(),r=k.useRef(null),a=k.useRef(e),o=k.useRef("none"),[i,s]=(l=e?"mounted":"unmounted",c={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},k.useReducer((e,t)=>c[e][t]??e,l));var l,c;return k.useEffect(()=>{const e=Ob(r.current);o.current="mounted"===i?e:"none"},[i]),db(()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=Ob(t);s(e?"MOUNT":"none"===i||"none"===t?.display?"UNMOUNT":n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,s]),db(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=Ob(r.current).includes(CSS.escape(o.animationName));if(o.target===t&&i&&(s("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},l=e=>{e.target===t&&(o.current=Ob(r.current))};return t.addEventListener("animationstart",l),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",l),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:k.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}(t),a="function"==typeof n?n({present:r.isPresent}):k.Children.only(n),o=function(...e){const t=k.useRef(e);return t.current=e,k.useCallback(e=>{const n=t.current;let r=!1;const a=n.map(t=>{const n=Rb(t,e);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let e=0;e<a.length;e++){const t=a[e];"function"==typeof t?t():Rb(n[e],null)}}},[])}(r.ref,function(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)}(a));return"function"==typeof n||r.isPresent?k.cloneElement(a,{ref:o}):null};function Rb(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Ob(e){return e?.animationName||"none"}Tb.displayName="Presence";var Pb=k[" useId ".trim().toString()]||(()=>{}),Ab=0;function _b(e){const[t,n]=k.useState(Pb());return db(()=>{e||n(e=>e??String(Ab++))},[e]),e||(t?`radix-${t}`:"")}var Db="Collapsible",[Mb,Lb]=cb(Db),[Ib,zb]=Mb(Db),Fb=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:o,onOpenChange:i,...s}=e,[l,c]=hb({prop:r,defaultProp:a??!1,onChange:i,caller:Db});return(0,Rc.jsx)(Ib,{scope:n,disabled:o,contentId:_b(),open:l,onOpenToggle:k.useCallback(()=>c(e=>!e),[c]),children:(0,Rc.jsx)(Nb.div,{"data-state":qb(l),"data-disabled":o?"":void 0,...s,ref:t})})});Fb.displayName=Db;var Bb="CollapsibleTrigger",Ub=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,a=zb(Bb,n);return(0,Rc.jsx)(Nb.button,{type:"button","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open||!1,"data-state":qb(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:lb(e.onClick,a.onOpenToggle)})});Ub.displayName=Bb;var Vb="CollapsibleContent",$b=k.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=zb(Vb,e.__scopeCollapsible);return(0,Rc.jsx)(Tb,{present:n||a.open,children:({present:e})=>(0,Rc.jsx)(Hb,{...r,ref:t,present:e})})});$b.displayName=Vb;var Hb=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:a,...o}=e,i=zb(Vb,n),[s,l]=k.useState(r),c=k.useRef(null),u=gb(t,c),d=k.useRef(0),f=d.current,h=k.useRef(0),p=h.current,m=i.open||s,g=k.useRef(m),y=k.useRef(void 0);return k.useEffect(()=>{const e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),db(()=>{const e=c.current;if(e){y.current=y.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();d.current=t.height,h.current=t.width,g.current||(e.style.transitionDuration=y.current.transitionDuration,e.style.animationName=y.current.animationName),l(r)}},[i.open,r]),(0,Rc.jsx)(Nb.div,{"data-state":qb(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...o,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style},children:m&&a})});function qb(e){return e?"open":"closed"}var Wb=Fb;function Kb(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...e)=>t.current?.(...e),[])}var Gb,Yb="dismissableLayer.update",Xb="dismissableLayer.pointerDownOutside",Qb="dismissableLayer.focusOutside",Jb=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Zb=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...c}=e,u=k.useContext(Jb),[d,f]=k.useState(null),h=d?.ownerDocument??globalThis?.document,[,p]=k.useState({}),m=gb(t,e=>f(e)),g=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(y),b=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,w=b>=v,S=k.useRef(!1),E=function(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o}=t,i=Kb(e),s=k.useRef(!1),l=k.useRef(!1),c=k.useRef(new Map),u=k.useRef(()=>{});return k.useEffect(()=>{function e(){l.current=!1,a.current=!1,c.current.clear()}function t(){return Array.from(c.current.values()).some(Boolean)}function d(e){if(!l.current)return;const t=e.target;t instanceof Node&&[...o].some(e=>e.contains(t))||c.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{l.current&&u.current()},0)}function f(e){l.current&&c.current.set(e.type,!1)}const h=o=>{if(o.target&&!s.current){let s=function(){n.removeEventListener("click",u.current);const r=t();e(),r||tx(Xb,i,d,{discrete:!0})};const d={originalEvent:o};l.current=!0,a.current=r&&0===o.button,c.current.clear(),r&&0===o.button?(n.removeEventListener("click",u.current),u.current=s,n.addEventListener("click",u.current,{once:!0})):s()}else n.removeEventListener("click",u.current),e();s.current=!1},p=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const r of p)n.addEventListener(r,d,!0),n.addEventListener(r,f);const m=window.setTimeout(()=>{n.addEventListener("pointerdown",h)},0);return()=>{window.clearTimeout(m),n.removeEventListener("pointerdown",h),n.removeEventListener("click",u.current);for(const e of p)n.removeEventListener(e,d,!0),n.removeEventListener(e,f)}},[n,i,r,a,o]),{onPointerDownCapture:()=>s.current=!0}}(e=>{const t=e.target;if(!(t instanceof Node))return;const n=[...u.branches].some(e=>e.contains(t));w&&!n&&(o?.(e),s?.(e),e.defaultPrevented||l?.())},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces}),C=function(e,t=globalThis?.document){const n=Kb(e),r=k.useRef(!1);return k.useEffect(()=>{const e=e=>{e.target&&!r.current&&tx(Qb,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{if(r&&S.current)return;const t=e.target;[...u.branches].some(e=>e.contains(t))||(i?.(e),s?.(e),e.defaultPrevented||l?.())},h);return function(e,t=globalThis?.document){const n=Kb(e);k.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{b===u.layers.size-1&&(a?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},h),k.useEffect(()=>{if(d)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Gb=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ex(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),0===u.layersWithOutsidePointerEventsDisabled.size&&(h.body.style.pointerEvents=Gb))}},[d,h,n,u]),k.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ex())},[d,u]),k.useEffect(()=>{const e=()=>p({});return document.addEventListener(Yb,e),()=>document.removeEventListener(Yb,e)},[]),(0,Rc.jsx)(Nb.div,{...c,ref:m,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:lb(e.onFocusCapture,C.onFocusCapture),onBlurCapture:lb(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:lb(e.onPointerDownCapture,E.onPointerDownCapture)})});Zb.displayName="DismissableLayer";function ex(){const e=new CustomEvent(Yb);document.dispatchEvent(e)}function tx(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?jb(a,o):a.dispatchEvent(o)}k.forwardRef((e,t)=>{const n=k.useContext(Jb),r=k.useRef(null),a=gb(t,r);return k.useEffect(()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,Rc.jsx)(Nb.div,{...e,ref:a})}).displayName="DismissableLayerBranch";var nx="focusScope.autoFocusOnMount",rx="focusScope.autoFocusOnUnmount",ax={bubbles:!1,cancelable:!0},ox=k.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=k.useState(null),c=Kb(a),u=Kb(o),d=k.useRef(null),f=gb(t,e=>l(e)),h=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(r){let e=function(e){if(h.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:cx(d.current,{select:!0})},t=function(e){if(h.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||cx(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&cx(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const 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,h.paused]),k.useEffect(()=>{if(s){ux.add(h);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(nx,ax);s.addEventListener(nx,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(cx(r,{select:t}),document.activeElement!==n)return}((e=ix(s),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&cx(s))}return()=>{s.removeEventListener(nx,c),setTimeout(()=>{const e=new CustomEvent(rx,ax);s.addEventListener(rx,u),s.dispatchEvent(e),e.defaultPrevented||cx(t??document.body,{select:!0}),s.removeEventListener(rx,u),ux.remove(h)},0)}}var e},[s,c,u,h]);const p=k.useCallback(e=>{if(!n&&!r)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=function(e){const t=ix(e);return[sx(t,e),sx(t.reverse(),e)]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&cx(o,{select:!0})):(e.preventDefault(),n&&cx(r,{select:!0})):a===t&&e.preventDefault()}},[n,r,h.paused]);return(0,Rc.jsx)(Nb.div,{tabIndex:-1,...i,ref:f,onKeyDown:p})});function ix(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;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 sx(e,t){for(const n of e)if(!lx(n,{upTo:t}))return n}function lx(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function cx(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}ox.displayName="FocusScope";var ux=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=dx(e,t),e.unshift(t)},remove(t){e=dx(e,t),e[0]?.resume()}}}();function dx(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var fx=k.forwardRef((e,t)=>{const{container:n,...r}=e,[a,o]=k.useState(!1);db(()=>o(!0),[]);const i=n||a&&globalThis?.document?.body;return i?x.createPortal((0,Rc.jsx)(Nb.div,{...r,ref:t}),i):null});fx.displayName="Portal";var hx=0,px=null;function mx(){k.useEffect(()=>{px||(px={start:gx(),end:gx()});const{start:e,end:t}=px;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),hx++,()=>{1===hx&&(px?.start.remove(),px?.end.remove(),px=null),hx=Math.max(0,hx-1)}},[])}function gx(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var yx=function(){return yx=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},yx.apply(this,arguments)};function vx(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}var bx="right-scroll-bar-position",xx="width-before-scroll-bar";function wx(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Sx="undefined"!=typeof window?k.useLayoutEffect:k.useEffect,kx=new WeakMap;function Ex(e,t){var n,r,a,o=(n=t||null,r=function(t){return e.forEach(function(e){return wx(e,t)})},(a=(0,k.useState)(function(){return{value:n,callback:r,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}})[0]).callback=r,a.facade);return Sx(function(){var t=kx.get(o);if(t){var n=new Set(t),r=new Set(e),a=o.current;n.forEach(function(e){r.has(e)||wx(e,null)}),r.forEach(function(e){n.has(e)||wx(e,a)})}kx.set(o,e)},[e]),o}function Cx(e){return e}var Nx=function(e){var t=e.sideCar,n=vx(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return k.createElement(r,yx({},n))};Nx.isSideCarExport=!0;var jx=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Cx);var n=[],r=!1;return{read:function(){if(r)throw new 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 a=t(e,r);return n.push(a),function(){n=n.filter(function(e){return e!==a})}},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 a=n;n=[],a.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(o)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=yx({async:!0,ssr:!1},e),t}(),Tx=function(){},Rx=k.forwardRef(function(e,t){var n=k.useRef(null),r=k.useState({onScrollCapture:Tx,onWheelCapture:Tx,onTouchMoveCapture:Tx}),a=r[0],o=r[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,h=e.noRelative,p=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,v=void 0===y?"div":y,b=e.gapMode,x=vx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,S=Ex([n,t]),E=yx(yx({},x),a);return k.createElement(k.Fragment,null,u&&k.createElement(w,{sideCar:jx,removeScrollBar:c,shards:d,noRelative:h,noIsolation:p,inert:m,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:b}),i?k.cloneElement(k.Children.only(s),yx(yx({},E),{ref:S})):k.createElement(v,yx({},E,{className:l,ref:S}),s))});Rx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Rx.classNames={fullWidth:xx,zeroRight:bx};function Ox(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var Px=function(){var e=0,t=null;return{add:function(n){var r,a;0==e&&(t=Ox())&&(a=n,(r=t).styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ax=function(){var e,t=(e=Px(),function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},_x={left:0,top:0,right:0,gap:0},Dx=function(e){return parseInt(e||"",10)||0},Mx=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return _x;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[Dx(n),Dx(r),Dx(a)]}(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])}},Lx=Ax(),Ix="data-scroll-locked",zx=function(e,t,n,r){var a=e.left,o=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(Ix,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(bx," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(xx," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(bx," .").concat(bx," {\n right: 0 ").concat(r,";\n }\n \n .").concat(xx," .").concat(xx," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Ix,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Fx=function(){var e=parseInt(document.body.getAttribute("data-scroll-locked")||"0",10);return isFinite(e)?e:0},Bx=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;k.useEffect(function(){return document.body.setAttribute(Ix,(Fx()+1).toString()),function(){var e=Fx()-1;e<=0?document.body.removeAttribute(Ix):document.body.setAttribute(Ix,e.toString())}},[]);var o=k.useMemo(function(){return Mx(a)},[a]);return k.createElement(Lx,{styles:zx(o,!t,a,n?"":"!important")})},Ux=!1;if("undefined"!=typeof window)try{var Vx=Object.defineProperty({},"passive",{get:function(){return Ux=!0,!0}});window.addEventListener("test",Vx,Vx),window.removeEventListener("test",Vx,Vx)}catch(nu){Ux=!1}var $x=!!Ux&&{passive:!1},Hx=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},qx=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Wx(e,r)){var a=Kx(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Wx=function(e,t){return"v"===e?function(e){return Hx(e,"overflowY")}(t):function(e){return Hx(e,"overflowX")}(t)},Kx=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Gx=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Yx=function(e){return[e.deltaX,e.deltaY]},Xx=function(e){return e&&"current"in e?e.current:e},Qx=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Jx=0,Zx=[];function ew(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var tw,nw=(tw=function(e){var t=k.useRef([]),n=k.useRef([0,0]),r=k.useRef(),a=k.useState(Jx++)[0],o=k.useState(Ax)[0],i=k.useRef(e);k.useEffect(function(){i.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(Xx),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var s=k.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=Gx(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],c="deltaY"in e?e.deltaY:s[1]-o[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=window.getSelection(),h=f&&f.anchorNode;if(h&&(h===u||h.contains(u)))return!1;var p=qx(d,u);if(!p)return!0;if(p?a=d:(a="v"===d?"h":"v",p=qx(d,u)),!p)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=a),!a)return!0;var m=r.current||a;return function(e,t,n,r,a){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,s=n.target,l=t.contains(s),c=!1,u=i>0,d=0,f=0;do{if(!s)break;var h=Kx(e,s),p=h[0],m=h[1]-h[2]-o*p;(p||m)&&Wx(e,s)&&(d+=m,f+=p);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(a&&Math.abs(d)<1||!a&&i>d)||!u&&(a&&Math.abs(f)<1||!a&&-i>f))&&(c=!0),c}(m,t,e,"h"===m?l:c,!0)},[]),l=k.useCallback(function(e){var n=e;if(Zx.length&&Zx[Zx.length-1]===o){var r="deltaY"in n?Yx(n):Gx(n),a=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,a=r,t[0]===a[0]&&t[1]===a[1]);var t,a})[0];if(a&&a.should)n.cancelable&&n.preventDefault();else if(!a){var l=(i.current.shards||[]).map(Xx).filter(Boolean).filter(function(e){return e.contains(n.target)});(l.length>0?s(n,l[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),c=k.useCallback(function(e,n,r,a){var o={name:e,delta:n,target:r,should:a,shadowParent:ew(r)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),u=k.useCallback(function(e){n.current=Gx(e),r.current=void 0},[]),d=k.useCallback(function(t){c(t.type,Yx(t),t.target,s(t,e.lockRef.current))},[]),f=k.useCallback(function(t){c(t.type,Gx(t),t.target,s(t,e.lockRef.current))},[]);k.useEffect(function(){return Zx.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,$x),document.addEventListener("touchmove",l,$x),document.addEventListener("touchstart",u,$x),function(){Zx=Zx.filter(function(e){return e!==o}),document.removeEventListener("wheel",l,$x),document.removeEventListener("touchmove",l,$x),document.removeEventListener("touchstart",u,$x)}},[]);var h=e.removeScrollBar,p=e.inert;return k.createElement(k.Fragment,null,p?k.createElement(o,{styles:Qx(a)}):null,h?k.createElement(Bx,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},jx.useMedium(tw),Nx),rw=k.forwardRef(function(e,t){return k.createElement(Rx,yx({},e,{ref:t,sideCar:nw}))});rw.classNames=Rx.classNames;var aw=new WeakMap,ow=new WeakMap,iw={},sw=0,lw=function(e){return e&&(e.host||lw(e.parentNode))},cw=function(e,t,n,r){var a=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=lw(t);return n&&e.contains(n)?n:null}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);iw[n]||(iw[n]=new WeakMap);var o=iw[n],i=[],s=new Set,l=new Set(a),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};a.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),a=null!==t&&"false"!==t,l=(aw.get(e)||0)+1,c=(o.get(e)||0)+1;aw.set(e,l),o.set(e,c),i.push(e),1===l&&a&&ow.set(e,!0),1===c&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(d){}})};return u(t),s.clear(),sw++,function(){i.forEach(function(e){var t=aw.get(e)-1,a=o.get(e)-1;aw.set(e,t),o.set(e,a),t||(ow.has(e)||e.removeAttribute(r),ow.delete(e)),a||e.removeAttribute(n)}),--sw||(aw=new WeakMap,aw=new WeakMap,ow=new WeakMap,iw={})}},uw=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),cw(r,a,n,"aria-hidden")):function(){return null}},dw="Dialog",[fw,hw]=cb(dw),[pw,mw]=fw(dw),gw=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,s=k.useRef(null),l=k.useRef(null),[c,u]=hb({prop:r,defaultProp:a??!1,onChange:o,caller:dw});return(0,Rc.jsx)(pw,{scope:t,triggerRef:s,contentRef:l,contentId:_b(),titleId:_b(),descriptionId:_b(),open:c,onOpenChange:u,onOpenToggle:k.useCallback(()=>u(e=>!e),[u]),modal:i,children:n})};gw.displayName=dw;var yw="DialogTrigger";k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=mw(yw,n),o=gb(t,a.triggerRef);return(0,Rc.jsx)(Nb.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":Iw(a.open),...r,ref:o,onClick:lb(e.onClick,a.onOpenToggle)})}).displayName=yw;var vw="DialogPortal",[bw,xw]=fw(vw,{forceMount:void 0}),ww=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=mw(vw,t);return(0,Rc.jsx)(bw,{scope:t,forceMount:n,children:k.Children.map(r,e=>(0,Rc.jsx)(Tb,{present:n||o.open,children:(0,Rc.jsx)(fx,{asChild:!0,container:a,children:e})}))})};ww.displayName=vw;var Sw="DialogOverlay",kw=k.forwardRef((e,t)=>{const n=xw(Sw,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=mw(Sw,e.__scopeDialog);return o.modal?(0,Rc.jsx)(Tb,{present:r||o.open,children:(0,Rc.jsx)(Cw,{...a,ref:t})}):null});kw.displayName=Sw;var Ew=yb("DialogOverlay.RemoveScroll"),Cw=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=mw(Sw,n),o=gb(t,function(){const e=k.useContext(Jb),[t,n]=k.useState(null);return k.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}());return(0,Rc.jsx)(rw,{as:Ew,allowPinchZoom:!0,shards:[a.contentRef],children:(0,Rc.jsx)(Nb.div,{"data-state":Iw(a.open),...r,ref:o,style:{pointerEvents:"auto",...r.style}})})}),Nw="DialogContent",jw=k.forwardRef((e,t)=>{const n=xw(Nw,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=mw(Nw,e.__scopeDialog);return(0,Rc.jsx)(Tb,{present:r||o.open,children:o.modal?(0,Rc.jsx)(Tw,{...a,ref:t}):(0,Rc.jsx)(Rw,{...a,ref:t})})});jw.displayName=Nw;var Tw=k.forwardRef((e,t)=>{const n=mw(Nw,e.__scopeDialog),r=k.useRef(null),a=gb(t,n.contentRef,r);return k.useEffect(()=>{const e=r.current;if(e)return uw(e)},[]),(0,Rc.jsx)(Ow,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:lb(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:lb(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:lb(e.onFocusOutside,e=>e.preventDefault())})}),Rw=k.forwardRef((e,t)=>{const n=mw(Nw,e.__scopeDialog),r=k.useRef(!1),a=k.useRef(!1);return(0,Rc.jsx)(Ow,{...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,a.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const o=t.target;n.triggerRef.current?.contains(o)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})}),Ow=k.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,s=mw(Nw,n);return mx(),(0,Rc.jsx)(Rc.Fragment,{children:(0,Rc.jsx)(ox,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,Rc.jsx)(Zb,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Iw(s.open),...i,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),Pw="DialogTitle",Aw=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=mw(Pw,n);return(0,Rc.jsx)(Nb.h2,{id:a.titleId,...r,ref:t})});Aw.displayName=Pw;var _w="DialogDescription",Dw=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=mw(_w,n);return(0,Rc.jsx)(Nb.p,{id:a.descriptionId,...r,ref:t})});Dw.displayName=_w;var Mw="DialogClose",Lw=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=mw(Mw,n);return(0,Rc.jsx)(Nb.button,{type:"button",...r,ref:t,onClick:lb(e.onClick,()=>a.onOpenChange(!1))})});function Iw(e){return e?"open":"closed"}function zw(e){const t=e+"CollectionProvider",[n,r]=cb(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e=>{const{scope:t,children:n}=e,r=k.useRef(null),o=k.useRef(new Map).current;return(0,Rc.jsx)(a,{scope:t,itemMap:o,collectionRef:r,children:n})};i.displayName=t;const s=e+"CollectionSlot",l=yb(s),c=k.forwardRef((e,t)=>{const{scope:n,children:r}=e;return(0,Rc.jsx)(l,{ref:gb(t,o(s,n).collectionRef),children:r})});c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=yb(u),h=k.forwardRef((e,t)=>{const{scope:n,children:r,...a}=e,i=k.useRef(null),s=gb(t,i),l=o(u,n);return k.useEffect(()=>(l.itemMap.set(i,{ref:i,...a}),()=>{l.itemMap.delete(i)})),(0,Rc.jsx)(f,{[d]:"",ref:s,children:r})});return h.displayName=u,[{Provider:i,Slot:c,ItemSlot:h},function(t){const n=o(e+"CollectionConsumer",t);return k.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const 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])},r]}Lw.displayName=Mw;var Fw=k.createContext(void 0);function Bw(e){const t=k.useContext(Fw);return e||t||"ltr"}var Uw=["top","right","bottom","left"],Vw=Math.min,$w=Math.max,Hw=Math.round,qw=Math.floor,Ww=e=>({x:e,y:e}),Kw={left:"right",right:"left",bottom:"top",top:"bottom"};function Gw(e,t,n){return $w(e,Vw(t,n))}function Yw(e,t){return"function"==typeof e?e(t):e}function Xw(e){return e.split("-")[0]}function Qw(e){return e.split("-")[1]}function Jw(e){return"x"===e?"y":"x"}function Zw(e){return"y"===e?"height":"width"}function eS(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function tS(e){return Jw(eS(e))}function nS(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var rS=["left","right"],aS=["right","left"],oS=["top","bottom"],iS=["bottom","top"];function sS(e,t,n,r){const a=Qw(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?aS:rS:t?rS:aS;case"left":case"right":return t?oS:iS;default:return[]}}(Xw(e),"start"===n,r);return a&&(o=o.map(e=>e+"-"+a),t&&(o=o.concat(o.map(nS)))),o}function lS(e){const t=Xw(e);return Kw[t]+e.slice(t.length)}function cS(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function uS(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function dS(e,t,n){let{reference:r,floating:a}=e;const o=eS(t),i=tS(t),s=Zw(i),l=Xw(t),c="y"===o,u=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,f=r[s]/2-a[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-a.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-a.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Qw(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1)}return h}async function fS(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:o,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Yw(t,e),p=cS(h),m=s[f?"floating"===d?"reference":"floating":d],g=uS(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),b=await(null==o.isElement?void 0:o.isElement(v))&&await(null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},x=uS(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-x.top+p.top)/b.y,bottom:(x.bottom-g.bottom+p.bottom)/b.y,left:(g.left-x.left+p.left)/b.x,right:(x.right-g.right+p.right)/b.x}}function hS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pS(e){return Uw.some(t=>e[t]>=0)}var mS=new Set(["left","top"]);function gS(){return"undefined"!=typeof window}function yS(e){return xS(e)?(e.nodeName||"").toLowerCase():"#document"}function vS(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function bS(e){var t;return null==(t=(xS(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function xS(e){return!!gS()&&(e instanceof Node||e instanceof vS(e).Node)}function wS(e){return!!gS()&&(e instanceof Element||e instanceof vS(e).Element)}function SS(e){return!!gS()&&(e instanceof HTMLElement||e instanceof vS(e).HTMLElement)}function kS(e){return!(!gS()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof vS(e).ShadowRoot)}function ES(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=DS(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==a&&"contents"!==a}function CS(e){return/^(table|td|th)$/.test(yS(e))}function NS(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var jS,TS=/transform|translate|scale|rotate|perspective|filter/,RS=/paint|layout|strict|content/,OS=e=>!!e&&"none"!==e;function PS(e){const t=wS(e)?DS(e):e;return OS(t.transform)||OS(t.translate)||OS(t.scale)||OS(t.rotate)||OS(t.perspective)||!AS()&&(OS(t.backdropFilter)||OS(t.filter))||TS.test(t.willChange||"")||RS.test(t.contain||"")}function AS(){return null==jS&&(jS="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),jS}function _S(e){return/^(html|body|#document)$/.test(yS(e))}function DS(e){return vS(e).getComputedStyle(e)}function MS(e){return wS(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function LS(e){if("html"===yS(e))return e;const t=e.assignedSlot||e.parentNode||kS(e)&&e.host||bS(e);return kS(t)?t.host:t}function IS(e){const t=LS(e);return _S(t)?e.ownerDocument?e.ownerDocument.body:e.body:SS(t)&&ES(t)?t:IS(t)}function zS(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=IS(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=vS(a);if(o){const e=FS(i);return t.concat(i,i.visualViewport||[],ES(a)?a:[],e&&n?zS(e):[])}return t.concat(a,zS(a,[],n))}function FS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function BS(e){const t=DS(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=SS(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=Hw(n)!==o||Hw(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function US(e){return wS(e)?e:e.contextElement}function VS(e){const t=US(e);if(!SS(t))return Ww(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=BS(t);let i=(o?Hw(n.width):n.width)/r,s=(o?Hw(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}var $S=Ww(0);function HS(e){const t=vS(e);return AS()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:$S}function qS(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=US(e);let i=Ww(1);t&&(r?wS(r)&&(i=VS(r)):i=VS(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==vS(e))&&t}(o,n,r)?HS(o):Ww(0);let l=(a.left+s.x)/i.x,c=(a.top+s.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(o){const e=vS(o),t=r&&wS(r)?vS(r):r;let n=e,a=FS(n);for(;a&&r&&t!==n;){const e=VS(a),t=a.getBoundingClientRect(),r=DS(a),o=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=i,n=vS(a),a=FS(n)}}return uS({width:u,height:d,x:l,y:c})}function WS(e,t){const n=MS(e).scrollLeft;return t?t.left+n:qS(bS(e)).left+n}function KS(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-WS(e,n),y:n.top+t.scrollTop}}function GS(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=vS(e),r=bS(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,l=0;if(a){o=a.width,i=a.height;const e=AS();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}const c=WS(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-a);i<=25&&(o-=i)}else c<=25&&(o+=c);return{width:o,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=bS(e),n=MS(e),r=e.ownerDocument.body,a=$w(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=$w(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+WS(e);const s=-n.scrollTop;return"rtl"===DS(r).direction&&(i+=$w(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}(bS(e));else if(wS(t))r=function(e,t){const n=qS(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=SS(e)?VS(e):Ww(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:r*o.y}}(t,n);else{const n=HS(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return uS(r)}function YS(e,t){const n=LS(e);return!(n===t||!wS(n)||_S(n))&&("fixed"===DS(n).position||YS(n,t))}function XS(e,t){const n=t.get(e);if(n)return n;let r=zS(e,[],!1).filter(e=>wS(e)&&"body"!==yS(e)),a=null;const o="fixed"===DS(e).position;let i=o?LS(e):e;for(;wS(i)&&!_S(i);){const t=DS(i),n=PS(i);n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&("absolute"===a.position||"fixed"===a.position)||ES(i)&&!n&&YS(e,i))?r=r.filter(e=>e!==i):a=t,i=LS(i)}return t.set(e,r),r}function QS(e,t,n){const r=SS(t),a=bS(t),o="fixed"===n,i=qS(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Ww(0);function c(){l.x=WS(a)}if(r||!r&&!o)if(("body"!==yS(t)||ES(a))&&(s=MS(t)),r){const e=qS(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&c();o&&!r&&a&&c();const u=!a||r||o?Ww(0):KS(a,s);return{x:i.left+s.scrollLeft-l.x-u.x,y:i.top+s.scrollTop-l.y-u.y,width:i.width,height:i.height}}function JS(e){return"static"===DS(e).position}function ZS(e,t){if(!SS(e)||"fixed"===DS(e).position)return null;if(t)return t(e);let n=e.offsetParent;return bS(e)===n&&(n=n.ownerDocument.body),n}function ek(e,t){const n=vS(e);if(NS(e))return n;if(!SS(e)){let t=LS(e);for(;t&&!_S(t);){if(wS(t)&&!JS(t))return t;t=LS(t)}return n}let r=ZS(e,t);for(;r&&CS(r)&&JS(r);)r=ZS(r,t);return r&&_S(r)&&JS(r)&&!PS(r)?n:r||function(e){let t=LS(e);for(;SS(t)&&!_S(t);){if(PS(t))return t;if(NS(t))return null;t=LS(t)}return null}(e)||n}var tk={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o="fixed"===a,i=bS(r),s=!!t&&NS(t.floating);if(r===i||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Ww(1);const u=Ww(0),d=SS(r);if((d||!d&&!o)&&(("body"!==yS(r)||ES(i))&&(l=MS(r)),d)){const e=qS(r);c=VS(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!i||d||o?Ww(0):KS(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:bS,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[..."clippingAncestors"===n?NS(t)?[]:XS(t,this._c):[].concat(n),r],i=GS(t,o[0],a);let s=i.top,l=i.right,c=i.bottom,u=i.left;for(let d=1;d<o.length;d++){const e=GS(t,o[d],a);s=$w(e.top,s),l=Vw(e.right,l),c=Vw(e.bottom,c),u=$w(e.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:ek,getElementRects:async function(e){const t=this.getOffsetParent||ek,n=this.getDimensions,r=await n(e.floating);return{reference:QS(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=BS(e);return{width:t,height:n}},getScale:VS,isElement:wS,isRTL:function(e){return"rtl"===DS(e).direction}};function nk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function rk(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=US(e),u=a||o?[...c?zS(c):[],...t?zS(t):[]]:[];u.forEach(e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const a=bS(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=c;if(s||t(),!f||!h)return;const p={rootMargin:-qw(d)+"px "+-qw(a.clientWidth-(u+f))+"px "+-qw(a.clientHeight-(d+h))+"px "+-qw(u)+"px",threshold:$w(0,Vw(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return i();r?i(!1,r):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==r||nk(c,e.getBoundingClientRect())||i(),m=!1}try{r=new IntersectionObserver(g,{...p,root:a.ownerDocument})}catch(y){r=new IntersectionObserver(g,p)}r.observe(e)}(!0),o}(c,n):null;let f,h=-1,p=null;i&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),c&&!l&&p.observe(c),t&&p.observe(t));let m=l?qS(e):null;return l&&function t(){const r=qS(e);m&&!nk(m,r)&&n();m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)}),d?.(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(f)}}var ak=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=Xw(n),s=Qw(n),l="y"===eS(n),c=mS.has(i)?-1:1,u=o&&l?-1:1,d=Yw(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof p&&(h="end"===s?-1*p:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:i}}}}},ok=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Yw(e,t),u={x:n,y:r},d=await o.detectOverflow(t,c),f=eS(Xw(a)),h=Jw(f);let p=u[h],m=u[f];if(i){const e="y"===h?"bottom":"right";p=Gw(p+d["y"===h?"top":"left"],p,p-d[e])}if(s){const e="y"===f?"bottom":"right";m=Gw(m+d["y"===f?"top":"left"],m,m-d[e])}const g=l.fn({...t,[h]:p,[f]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:i,[f]:s}}}}}},ik=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=Yw(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const y=Xw(a),v=eS(s),b=Xw(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=f||(b||!m?[lS(s)]:function(e){const t=lS(e);return[nS(e),t,nS(t)]}(s)),S="none"!==p;!f&&S&&w.push(...sS(s,m,p,x));const k=[s,...w],E=await l.detectOverflow(t,g),C=[];let N=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&C.push(E[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Qw(e),a=tS(e),o=Zw(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=lS(i)),[i,lS(i)]}(a,i,x);C.push(E[e[0]],E[e[1]])}if(N=[...N,{placement:a,overflows:C}],!C.every(e=>e<=0)){var j,T;const e=((null==(j=o.flip)?void 0:j.index)||0)+1,t=k[e];if(t&&("alignment"!==d||v===eS(t)||N.every(e=>eS(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:N},reset:{placement:t}};let n=null==(T=N.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:T.placement;if(!n)switch(h){case"bestFit":{var R;const e=null==(R=N.filter(e=>{if(S){const t=eS(e.placement);return t===v||"y"===t}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])?void 0:R[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}},sk=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:i,elements:s}=t,{apply:l=()=>{},...c}=Yw(e,t),u=await i.detectOverflow(t,c),d=Xw(a),f=Qw(a),h="y"===eS(a),{width:p,height:m}=o.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const v=m-u.top-u.bottom,b=p-u.left-u.right,x=Vw(m-u[g],v),w=Vw(p-u[y],b),S=!t.middlewareData.shift;let k=x,E=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(E=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(k=v),S&&!f){const e=$w(u.left,0),t=$w(u.right,0),n=$w(u.top,0),r=$w(u.bottom,0);h?E=p-2*(0!==e||0!==t?e+t:$w(u.left,u.right)):k=m-2*(0!==n||0!==r?n+r:$w(u.top,u.bottom))}await l({...t,availableWidth:E,availableHeight:k});const C=await i.getDimensions(s.floating);return p!==C.width||m!==C.height?{reset:{rects:!0}}:{}}}},lk=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...o}=Yw(e,t);switch(a){case"referenceHidden":{const e=hS(await r.detectOverflow(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:pS(e)}}}case"escaped":{const e=hS(await r.detectOverflow(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:pS(e)}}}default:return{}}}}},ck=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Yw(e,t)||{};if(null==c)return{};const d=cS(u),f={x:n,y:r},h=tS(a),p=Zw(h),m=await i.getDimensions(c),g="y"===h,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=o.reference[p]+o.reference[h]-f[h]-o.floating[p],w=f[h]-o.reference[h],S=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let k=S?S[b]:0;k&&await(null==i.isElement?void 0:i.isElement(S))||(k=s.floating[b]||o.floating[p]);const E=x/2-w/2,C=k/2-m[p]/2-1,N=Vw(d[y],C),j=Vw(d[v],C),T=N,R=k-m[p]-j,O=k/2-m[p]/2+E,P=Gw(T,O,R),A=!l.arrow&&null!=Qw(a)&&O!==P&&o.reference[p]/2-(O<T?N:j)-m[p]/2<0,_=A?O<T?O-T:O-R:0;return{[h]:f[h]+_,data:{[h]:P,centerOffset:O-P-_,...A&&{alignmentOffset:_}},reset:A}}}),uk=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Yw(e,t),u={x:n,y:r},d=eS(a),f=Jw(d);let h=u[f],p=u[d];const m=Yw(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===f?"height":"width",t=o.reference[f]-o.floating[e]+g.mainAxis,n=o.reference[f]+o.reference[e]-g.mainAxis;h<t?h=t:h>n&&(h=n)}if(c){var y,v;const e="y"===f?"width":"height",t=mS.has(Xw(a)),n=o.reference[d]-o.floating[e]+(t&&(null==(y=i.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(v=i.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);p<n?p=n:p>r&&(p=r)}return{[f]:h,[d]:p}}}},dk=(e,t,n)=>{const r=new Map,a={platform:tk,...n},o={...a.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:fS},l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=dS(c,r,l),f=r,h=0;const p={};for(let m=0;m<o.length;m++){const n=o[m];if(!n)continue;const{name:g,fn:y}=n,{x:v,y:b,data:x,reset:w}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:a,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=b?b:d,p[g]={...p[g],...x},w&&h<50&&(h++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):w.rects),({x:u,y:d}=dS(c,f,l))),m=-1)}return{x:u,y:d,placement:f,strategy:a,middlewareData:p}})(e,t,{...a,platform:o})},fk="undefined"!=typeof document?k.useLayoutEffect:function(){};function hk(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!hk(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!==r--;){const n=a[r];if(("_owner"!==n||!e.$$typeof)&&!hk(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function pk(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mk(e,t){const n=pk(e);return Math.round(t*n)/n}function gk(e){const t=k.useRef(e);return fk(()=>{t.current=e}),t}var yk=(e,t)=>{const n=ak(e);return{name:n.name,fn:n.fn,options:[e,t]}},vk=(e,t)=>{const n=ok(e);return{name:n.name,fn:n.fn,options:[e,t]}},bk=(e,t)=>({fn:uk(e).fn,options:[e,t]}),xk=(e,t)=>{const n=ik(e);return{name:n.name,fn:n.fn,options:[e,t]}},wk=(e,t)=>{const n=sk(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sk=(e,t)=>{const n=lk(e);return{name:n.name,fn:n.fn,options:[e,t]}},kk=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(a=n,{}.hasOwnProperty.call(a,"current"))?null!=n.current?ck({element:n.current,padding:r}).fn(t):{}:n?ck({element:n,padding:r}).fn(t):{};var a}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ek=k.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return(0,Rc.jsx)(Nb.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,Rc.jsx)("polygon",{points:"0,0 30,0 15,10"})})});Ek.displayName="Arrow";var Ck=Ek;function Nk(e){const[t,n]=k.useState(void 0);return db(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}var jk="Popper",[Tk,Rk]=cb(jk),[Ok,Pk]=Tk(jk),Ak=e=>{const{__scopePopper:t,children:n}=e,[r,a]=k.useState(null),[o,i]=k.useState(void 0);return(0,Rc.jsx)(Ok,{scope:t,anchor:r,onAnchorChange:a,placementState:o,setPlacementState:i,children:n})};Ak.displayName=jk;var _k="PopperAnchor",Dk=k.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=Pk(_k,n),i=k.useRef(null),s=o.onAnchorChange,l=gb(t,k.useCallback(e=>{i.current=e,e&&s(e)},[s])),c=k.useRef(null);k.useEffect(()=>{if(!r)return;const e=c.current;c.current=r.current,e!==c.current&&s(c.current)});const u=o.placementState&&Hk(o.placementState),d=u?.[0],f=u?.[1];return r?null:(0,Rc.jsx)(Nb.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...a,ref:l})});Dk.displayName=_k;var Mk="PopperContent",[Lk,Ik]=Tk(Mk),zk=k.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:o="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:p,...m}=e,g=Pk(Mk,n),[y,v]=k.useState(null),b=gb(t,e=>v(e)),[w,S]=k.useState(null),E=Nk(w),C=E?.width??0,N=E?.height??0,j=r+("center"!==o?"-"+o:""),T="number"==typeof u?u:{top:0,right:0,bottom:0,left:0,...u},R=Array.isArray(c)?c:[c],O=R.length>0,P={padding:T,boundary:R.filter(Vk),altBoundary:O},{refs:A,floatingStyles:_,placement:D,isPositioned:M,middlewareData:L}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=k.useState(r);hk(f,r)||h(r);const[p,m]=k.useState(null),[g,y]=k.useState(null),v=k.useCallback(e=>{e!==E.current&&(E.current=e,m(e))},[]),b=k.useCallback(e=>{e!==C.current&&(C.current=e,y(e))},[]),w=o||p,S=i||g,E=k.useRef(null),C=k.useRef(null),N=k.useRef(u),j=null!=l,T=gk(l),R=gk(a),O=gk(c),P=k.useCallback(()=>{if(!E.current||!C.current)return;const e={placement:t,strategy:n,middleware:f};R.current&&(e.platform=R.current),dk(E.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==O.current};A.current&&!hk(N.current,t)&&(N.current=t,x.flushSync(()=>{d(t)}))})},[f,t,n,R,O]);fk(()=>{!1===c&&N.current.isPositioned&&(N.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);const A=k.useRef(!1);fk(()=>(A.current=!0,()=>{A.current=!1}),[]),fk(()=>{if(w&&(E.current=w),S&&(C.current=S),w&&S){if(T.current)return T.current(w,S,P);P()}},[w,S,P,T,j]);const _=k.useMemo(()=>({reference:E,floating:C,setReference:v,setFloating:b}),[v,b]),D=k.useMemo(()=>({reference:w,floating:S}),[w,S]),M=k.useMemo(()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=mk(D.floating,u.x),r=mk(D.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...pk(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,D.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:P,refs:_,elements:D,floatingStyles:M}),[u,P,_,D,M])}({strategy:"fixed",placement:j,whileElementsMounted:(...e)=>rk(...e,{animationFrame:"always"===h}),elements:{reference:g.anchor},middleware:[yk({mainAxis:a+N,alignmentAxis:i}),l&&vk({mainAxis:!0,crossAxis:!1,limiter:"partial"===d?bk():void 0,...P}),l&&xk({...P}),wk({...P,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),w&&kk({element:w,padding:s}),$k({arrowWidth:C,arrowHeight:N}),f&&Sk({strategy:"referenceHidden",...P,boundary:O?P.boundary:void 0})]}),I=g.setPlacementState;db(()=>(I(D),()=>{I(void 0)}),[D,I]);const[z,F]=Hk(D),B=Kb(p);db(()=>{M&&B?.()},[M,B]);const U=L.arrow?.x,V=L.arrow?.y,$=0!==L.arrow?.centerOffset,[H,q]=k.useState();return db(()=>{y&&q(window.getComputedStyle(y).zIndex)},[y]),(0,Rc.jsx)("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:M?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,Rc.jsx)(Lk,{scope:n,placedSide:z,placedAlign:F,onArrowChange:S,arrowX:U,arrowY:V,shouldHideArrow:$,children:(0,Rc.jsx)(Nb.div,{"data-side":z,"data-align":F,...m,ref:b,style:{...m.style,animation:M?void 0:"none"}})})})});zk.displayName=Mk;var Fk="PopperArrow",Bk={top:"bottom",right:"left",bottom:"top",left:"right"},Uk=k.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,a=Ik(Fk,n),o=Bk[a.placedSide];return(0,Rc.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,Rc.jsx)(Ck,{...r,ref:t,style:{...r.style,display:"block"}})})});function Vk(e){return null!==e}Uk.displayName=Fk;var $k=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,o=0!==a.arrow?.centerOffset,i=o?0:e.arrowWidth,s=o?0:e.arrowHeight,[l,c]=Hk(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(a.arrow?.x??0)+i/2,f=(a.arrow?.y??0)+s/2;let h="",p="";return"bottom"===l?(h=o?u:`${d}px`,p=-s+"px"):"top"===l?(h=o?u:`${d}px`,p=`${r.floating.height+s}px`):"right"===l?(h=-s+"px",p=o?u:`${f}px`):"left"===l&&(h=`${r.floating.width+s}px`,p=o?u:`${f}px`),{data:{x:h,y:p}}}});function Hk(e){const[t,n="center"]=e.split("-");return[t,n]}var qk=Ak,Wk=Dk,Kk=zk,Gk=Uk,Yk="rovingFocusGroup.onEntryFocus",Xk={bubbles:!1,cancelable:!0},Qk="RovingFocusGroup",[Jk,Zk,eE]=zw(Qk),[tE,nE]=cb(Qk,[eE]),[rE,aE]=tE(Qk),oE=k.forwardRef((e,t)=>(0,Rc.jsx)(Jk.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,Rc.jsx)(Jk.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,Rc.jsx)(iE,{...e,ref:t})})}));oE.displayName=Qk;var iE=k.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,f=k.useRef(null),h=gb(t,f),p=Bw(o),[m,g]=hb({prop:i,defaultProp:s??null,onChange:l,caller:Qk}),[y,v]=k.useState(!1),b=Kb(c),x=Zk(n),w=k.useRef(!1),[S,E]=k.useState(0);return k.useEffect(()=>{const e=f.current;if(e)return e.addEventListener(Yk,b),()=>e.removeEventListener(Yk,b)},[b]),(0,Rc.jsx)(rE,{scope:n,orientation:r,dir:p,loop:a,currentTabStopId:m,onItemFocus:k.useCallback(e=>g(e),[g]),onItemShiftTab:k.useCallback(()=>v(!0),[]),onFocusableItemAdd:k.useCallback(()=>E(e=>e+1),[]),onFocusableItemRemove:k.useCallback(()=>E(e=>e-1),[]),children:(0,Rc.jsx)(Nb.div,{tabIndex:y||0===S?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:lb(e.onMouseDown,()=>{w.current=!0}),onFocus:lb(e.onFocus,e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!y){const t=new CustomEvent(Yk,Xk);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter(e=>e.focusable);uE([e.find(e=>e.active),e.find(e=>e.id===m),...e].filter(Boolean).map(e=>e.ref.current),u)}}w.current=!1}),onBlur:lb(e.onBlur,()=>v(!1))})})}),sE="RovingFocusGroupItem",lE=k.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,children:i,...s}=e,l=_b(),c=o||l,u=aE(sE,n),d=u.currentTabStopId===c,f=Zk(n),{onFocusableItemAdd:h,onFocusableItemRemove:p,currentTabStopId:m}=u;return k.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),(0,Rc.jsx)(Jk.ItemSlot,{scope:n,id:c,focusable:r,active:a,children:(0,Rc.jsx)(Nb.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:lb(e.onMouseDown,e=>{r?u.onItemFocus(c):e.preventDefault()}),onFocus:lb(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:lb(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:cE[r]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let a=f().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)a.reverse();else if("prev"===t||"next"===t){"prev"===t&&a.reverse();const o=a.indexOf(e.currentTarget);a=u.loop?(r=o+1,(n=a).map((e,t)=>n[(r+t)%n.length])):a.slice(o+1)}setTimeout(()=>uE(a))}var n,r}),children:"function"==typeof i?i({isCurrentTabStop:d,hasTabStop:null!=m}):i})})});lE.displayName=sE;var cE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function uE(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var dE=oE,fE=lE,hE=["Enter"," "],pE=["ArrowUp","PageDown","End"],mE=["ArrowDown","PageUp","Home",...pE],gE={ltr:[...hE,"ArrowRight"],rtl:[...hE,"ArrowLeft"]},yE={ltr:["ArrowLeft"],rtl:["ArrowRight"]},vE="Menu",[bE,xE,wE]=zw(vE),[SE,kE]=cb(vE,[wE,Rk,nE]),EE=Rk(),CE=nE(),[NE,jE]=SE(vE),[TE,RE]=SE(vE),OE=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:o,modal:i=!0}=e,s=EE(t),[l,c]=k.useState(null),u=k.useRef(!1),d=Kb(o),f=Bw(a);return k.useEffect(()=>{const e=()=>{u.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>u.current=!1;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})}},[]),k.useEffect(()=>{if(!n)return;const e=()=>d(!1);return window.addEventListener("blur",e),()=>window.removeEventListener("blur",e)},[n,d]),(0,Rc.jsx)(qk,{...s,children:(0,Rc.jsx)(NE,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:c,children:(0,Rc.jsx)(TE,{scope:t,onClose:k.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:i,children:r})})})};OE.displayName=vE;var PE=k.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=EE(n);return(0,Rc.jsx)(Wk,{...a,...r,ref:t})});PE.displayName="MenuAnchor";var AE="MenuPortal",[_E,DE]=SE(AE,{forceMount:void 0}),ME=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,o=jE(AE,t);return(0,Rc.jsx)(_E,{scope:t,forceMount:n,children:(0,Rc.jsx)(Tb,{present:n||o.open,children:(0,Rc.jsx)(fx,{asChild:!0,container:a,children:r})})})};ME.displayName=AE;var LE="MenuContent",[IE,zE]=SE(LE),FE=k.forwardRef((e,t)=>{const n=DE(LE,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=jE(LE,e.__scopeMenu),i=RE(LE,e.__scopeMenu);return(0,Rc.jsx)(bE.Provider,{scope:e.__scopeMenu,children:(0,Rc.jsx)(Tb,{present:r||o.open,children:(0,Rc.jsx)(bE.Slot,{scope:e.__scopeMenu,children:i.modal?(0,Rc.jsx)(BE,{...a,ref:t}):(0,Rc.jsx)(UE,{...a,ref:t})})})})}),BE=k.forwardRef((e,t)=>{const n=jE(LE,e.__scopeMenu),r=k.useRef(null),a=gb(t,r);return k.useEffect(()=>{const e=r.current;if(e)return uw(e)},[]),(0,Rc.jsx)($E,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:lb(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),UE=k.forwardRef((e,t)=>{const n=jE(LE,e.__scopeMenu);return(0,Rc.jsx)($E,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),VE=yb("MenuContent.ScrollLock"),$E=k.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,disableOutsideScroll:p,...m}=e,g=jE(LE,n),y=RE(LE,n),v=EE(n),b=CE(n),x=xE(n),[w,S]=k.useState(null),E=k.useRef(null),C=gb(t,E,g.onContentChange),N=k.useRef(0),j=k.useRef(""),T=k.useRef(0),R=k.useRef(null),O=k.useRef("right"),P=k.useRef(0),A=p?rw:k.Fragment,_=p?{as:VE,allowPinchZoom:!0}:void 0,D=e=>{const t=j.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,a=n.find(e=>e.ref.current===r)?.textValue,o=function(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=(i=e,s=Math.max(a,0),i.map((e,t)=>i[(s+t)%i.length]));var i,s;1===r.length&&(o=o.filter(e=>e!==n));const l=o.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}(n.map(e=>e.textValue),t,a),i=n.find(e=>e.textValue===o)?.ref.current;!function e(t){j.current=t,window.clearTimeout(N.current),""!==t&&(N.current=window.setTimeout(()=>e(""),1e3))}(t),i&&setTimeout(()=>i.focus())};k.useEffect(()=>()=>window.clearTimeout(N.current),[]),mx();const M=k.useCallback(e=>O.current===R.current?.side&&function(e,t){return!!t&&function(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const e=t[o],s=t[i],l=e.x,c=e.y,u=s.x,d=s.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(a=!a)}return a}({x:e.clientX,y:e.clientY},t)}(e,R.current?.area),[]);return(0,Rc.jsx)(IE,{scope:n,searchRef:j,onItemEnter:k.useCallback(e=>{M(e)&&e.preventDefault()},[M]),onItemLeave:k.useCallback(e=>{M(e)||(E.current?.focus(),S(null))},[M]),onTriggerLeave:k.useCallback(e=>{M(e)&&e.preventDefault()},[M]),pointerGraceTimerRef:T,onPointerGraceIntentChange:k.useCallback(e=>{R.current=e},[]),children:(0,Rc.jsx)(A,{..._,children:(0,Rc.jsx)(ox,{asChild:!0,trapped:a,onMountAutoFocus:lb(o,e=>{e.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,Rc.jsx)(Zb,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,children:(0,Rc.jsx)(dE,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:w,onCurrentTabStopIdChange:S,onEntryFocus:lb(l,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,Rc.jsx)(Kk,{role:"menu","aria-orientation":"vertical","data-state":gC(g.open),"data-radix-menu-content":"",dir:y.dir,...v,...m,ref:C,style:{outline:"none",...m.style},onKeyDown:lb(m.onKeyDown,e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&D(e.key));const a=E.current;if(e.target!==a)return;if(!mE.includes(e.key))return;e.preventDefault();const o=x().filter(e=>!e.disabled).map(e=>e.ref.current);pE.includes(e.key)&&o.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(o)}),onBlur:lb(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(N.current),j.current="")}),onPointerMove:lb(e.onPointerMove,bC(e=>{const t=e.target,n=P.current!==e.clientX;e.currentTarget.contains(t)&&n&&(O.current=e.clientX>P.current?"right":"left",P.current=e.clientX)}))})})})})})})});FE.displayName=LE;var HE=k.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,Rc.jsx)(Nb.div,{role:"group",...r,ref:t})});HE.displayName="MenuGroup";var qE=k.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,Rc.jsx)(Nb.div,{...r,ref:t})});qE.displayName="MenuLabel";var WE="MenuItem",KE="menu.itemSelect",GE=k.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,o=k.useRef(null),i=RE(WE,e.__scopeMenu),s=zE(WE,e.__scopeMenu),l=gb(t,o),c=k.useRef(!1);return(0,Rc.jsx)(YE,{...a,ref:l,disabled:n,onClick:lb(e.onClick,()=>{const e=o.current;if(!n&&e){const t=new CustomEvent(KE,{bubbles:!0,cancelable:!0});e.addEventListener(KE,e=>r?.(e),{once:!0}),jb(e,t),t.defaultPrevented?c.current=!1:i.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),c.current=!0},onPointerUp:lb(e.onPointerUp,e=>{c.current||e.currentTarget?.click()}),onKeyDown:lb(e.onKeyDown,e=>{const t=""!==s.searchRef.current;n||t&&" "===e.key||hE.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});GE.displayName=WE;var YE=k.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,i=zE(WE,n),s=CE(n),l=k.useRef(null),c=gb(t,l),[u,d]=k.useState(!1),[f,h]=k.useState("");return k.useEffect(()=>{const e=l.current;e&&h((e.textContent??"").trim())},[o.children]),(0,Rc.jsx)(bE.ItemSlot,{scope:n,disabled:r,textValue:a??f,children:(0,Rc.jsx)(fE,{asChild:!0,...s,focusable:!r,children:(0,Rc.jsx)(Nb.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:c,onPointerMove:lb(e.onPointerMove,bC(e=>{r?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:lb(e.onPointerLeave,bC(e=>i.onItemLeave(e))),onFocus:lb(e.onFocus,()=>d(!0)),onBlur:lb(e.onBlur,()=>d(!1))})})})}),XE=k.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return(0,Rc.jsx)(aC,{scope:e.__scopeMenu,checked:n,children:(0,Rc.jsx)(GE,{role:"menuitemcheckbox","aria-checked":yC(n)?"mixed":n,...a,ref:t,"data-state":vC(n),onSelect:lb(a.onSelect,()=>r?.(!!yC(n)||!n),{checkForDefaultPrevented:!1})})})});XE.displayName="MenuCheckboxItem";var QE="MenuRadioGroup",[JE,ZE]=SE(QE,{value:void 0,onValueChange:()=>{}}),eC=k.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,o=Kb(r);return(0,Rc.jsx)(JE,{scope:e.__scopeMenu,value:n,onValueChange:o,children:(0,Rc.jsx)(HE,{...a,ref:t})})});eC.displayName=QE;var tC="MenuRadioItem",nC=k.forwardRef((e,t)=>{const{value:n,...r}=e,a=ZE(tC,e.__scopeMenu),o=n===a.value;return(0,Rc.jsx)(aC,{scope:e.__scopeMenu,checked:o,children:(0,Rc.jsx)(GE,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":vC(o),onSelect:lb(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});nC.displayName=tC;var rC="MenuItemIndicator",[aC,oC]=SE(rC,{checked:!1}),iC=k.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,o=oC(rC,n);return(0,Rc.jsx)(Tb,{present:r||yC(o.checked)||!0===o.checked,children:(0,Rc.jsx)(Nb.span,{...a,ref:t,"data-state":vC(o.checked)})})});iC.displayName=rC;var sC=k.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,Rc.jsx)(Nb.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});sC.displayName="MenuSeparator";var lC=k.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=EE(n);return(0,Rc.jsx)(Gk,{...a,...r,ref:t})});lC.displayName="MenuArrow";var cC="MenuSub",[uC,dC]=SE(cC),fC="MenuSubTrigger",hC=k.forwardRef((e,t)=>{const n=jE(fC,e.__scopeMenu),r=RE(fC,e.__scopeMenu),a=dC(fC,e.__scopeMenu),o=zE(fC,e.__scopeMenu),i=k.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=o,c={__scopeMenu:e.__scopeMenu},u=k.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return k.useEffect(()=>u,[u]),k.useEffect(()=>{const e=s.current;return()=>{window.clearTimeout(e),l(null)}},[s,l]),(0,Rc.jsx)(PE,{asChild:!0,...c,children:(0,Rc.jsx)(YE,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.open?a.contentId:void 0,"data-state":gC(n.open),...e,ref:mb(t,a.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:lb(e.onPointerMove,bC(t=>{o.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||i.current||(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:lb(e.onPointerLeave,bC(e=>{u();const t=n.content?.getBoundingClientRect();if(t){const r=n.content?.dataset.side,a="right"===r,i=a?-5:5,l=t[a?"left":"right"],c=t[a?"right":"left"];o.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:l,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:l,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:lb(e.onKeyDown,t=>{const a=""!==o.searchRef.current;e.disabled||a&&" "===t.key||gE[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});hC.displayName=fC;var pC="MenuSubContent",mC=k.forwardRef((e,t)=>{const n=DE(LE,e.__scopeMenu),{forceMount:r=n.forceMount,align:a="start",...o}=e,i=jE(LE,e.__scopeMenu),s=RE(LE,e.__scopeMenu),l=dC(pC,e.__scopeMenu),c=k.useRef(null),u=gb(t,c);return(0,Rc.jsx)(bE.Provider,{scope:e.__scopeMenu,children:(0,Rc.jsx)(Tb,{present:r||i.open,children:(0,Rc.jsx)(bE.Slot,{scope:e.__scopeMenu,children:(0,Rc.jsx)($E,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:a,side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:lb(e.onFocusOutside,e=>{e.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:lb(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:lb(e.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),n=yE[s.dir].includes(e.key);t&&n&&(i.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})})})})})});function gC(e){return e?"open":"closed"}function yC(e){return"indeterminate"===e}function vC(e){return yC(e)?"indeterminate":e?"checked":"unchecked"}function bC(e){return t=>"mouse"===t.pointerType?e(t):void 0}mC.displayName=pC;var xC=OE,wC=PE,SC=ME,kC=FE,EC=HE,CC=qE,NC=GE,jC=XE,TC=eC,RC=nC,OC=iC,PC=sC,AC=lC,_C=hC,DC=mC,MC="DropdownMenu",[LC,IC]=cb(MC,[kE]),zC=kE(),[FC,BC]=LC(MC),UC=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,l=zC(t),c=k.useRef(null),[u,d]=hb({prop:a,defaultProp:o??!1,onChange:i,caller:MC});return(0,Rc.jsx)(FC,{scope:t,triggerId:_b(),triggerRef:c,contentId:_b(),open:u,onOpenChange:d,onOpenToggle:k.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,Rc.jsx)(xC,{...l,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};UC.displayName=MC;var VC="DropdownMenuTrigger",$C=k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,o=BC(VC,n),i=zC(n);return(0,Rc.jsx)(wC,{asChild:!0,...i,children:(0,Rc.jsx)(Nb.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:mb(t,o.triggerRef),onPointerDown:lb(e.onPointerDown,e=>{r||0!==e.button||!1!==e.ctrlKey||(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:lb(e.onKeyDown,e=>{r||(["Enter"," "].includes(e.key)&&o.onOpenToggle(),"ArrowDown"===e.key&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});$C.displayName=VC;var HC=e=>{const{__scopeDropdownMenu:t,...n}=e,r=zC(t);return(0,Rc.jsx)(SC,{...r,...n})};HC.displayName="DropdownMenuPortal";var qC="DropdownMenuContent",WC=k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=BC(qC,n),o=zC(n),i=k.useRef(!1);return(0,Rc.jsx)(kC,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...r,ref:t,onCloseAutoFocus:lb(e.onCloseAutoFocus,e=>{i.current||a.triggerRef.current?.focus(),i.current=!1,e.preventDefault()}),onInteractOutside:lb(e.onInteractOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.modal&&!r||(i.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)"}})});WC.displayName=qC;k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zC(n);return(0,Rc.jsx)(EC,{...a,...r,ref:t})}).displayName="DropdownMenuGroup";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zC(n);return(0,Rc.jsx)(CC,{...a,...r,ref:t})}).displayName="DropdownMenuLabel";var KC=k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zC(n);return(0,Rc.jsx)(NC,{...a,...r,ref:t})});KC.displayName="DropdownMenuItem";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zC(n);return(0,Rc.jsx)(jC,{...a,...r,ref:t})}).displayName="DropdownMenuCheckboxItem";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zC(n);return(0,Rc.jsx)(TC,{...a,...r,ref:t})}).displayName="DropdownMenuRadioGroup";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zC(n);return(0,Rc.jsx)(RC,{...a,...r,ref:t})}).displayName="DropdownMenuRadioItem";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zC(n);return(0,Rc.jsx)(OC,{...a,...r,ref:t})}).displayName="DropdownMenuItemIndicator";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zC(n);return(0,Rc.jsx)(PC,{...a,...r,ref:t})}).displayName="DropdownMenuSeparator";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zC(n);return(0,Rc.jsx)(AC,{...a,...r,ref:t})}).displayName="DropdownMenuArrow";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zC(n);return(0,Rc.jsx)(_C,{...a,...r,ref:t})}).displayName="DropdownMenuSubTrigger";k.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=zC(n);return(0,Rc.jsx)(DC,{...a,...r,ref:t,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)"}})}).displayName="DropdownMenuSubContent";var GC=UC,YC=$C,XC=HC,QC=WC,JC=KC,ZC=k.forwardRef((e,t)=>(0,Rc.jsx)(Nb.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));ZC.displayName="Label";var eN=ZC;function tN(e,[t,n]){return Math.min(n,Math.max(t,e))}var nN="ScrollArea",[rN,aN]=cb(nN),[oN,iN]=rN(nN),sN=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:o=600,...i}=e,[s,l]=k.useState(null),[c,u]=k.useState(null),[d,f]=k.useState(null),[h,p]=k.useState(null),[m,g]=k.useState(null),[y,v]=k.useState(0),[b,x]=k.useState(0),[w,S]=k.useState(!1),[E,C]=k.useState(!1),N=gb(t,e=>l(e)),j=Bw(a);return(0,Rc.jsx)(oN,{scope:n,type:r,dir:j,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:p,scrollbarXEnabled:w,onScrollbarXEnabledChange:S,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:C,onCornerWidthChange:v,onCornerHeightChange:x,children:(0,Rc.jsx)(Nb.div,{dir:j,...i,ref:N,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});sN.displayName=nN;var lN="ScrollAreaViewport",cN=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,i=iN(lN,n),s=gb(t,k.useRef(null),i.onViewportChange);return(0,Rc.jsxs)(Rc.Fragment,{children:[(0,Rc.jsx)(uN,{nonce:a}),(0,Rc.jsx)(Nb.div,{"data-radix-scroll-area-viewport":"",...o,ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,Rc.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});cN.displayName=lN;var uN=k.memo(({nonce:e})=>(0,Rc.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e}),(e,t)=>e.nonce===t.nonce),dN="ScrollAreaScrollbar",fN=k.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=iN(dN,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=a,s="horizontal"===e.orientation;return k.useEffect(()=>(s?o(!0):i(!0),()=>{s?o(!1):i(!1)}),[s,o,i]),"hover"===a.type?(0,Rc.jsx)(hN,{...r,ref:t,forceMount:n}):"scroll"===a.type?(0,Rc.jsx)(pN,{...r,ref:t,forceMount:n}):"auto"===a.type?(0,Rc.jsx)(mN,{...r,ref:t,forceMount:n}):"always"===a.type?(0,Rc.jsx)(gN,{...r,ref:t,"data-state":"visible"}):null});fN.displayName=dN;var hN=k.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=iN(dN,e.__scopeScrollArea),[o,i]=k.useState(!1);return k.useEffect(()=>{const e=a.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),i(!0)},r=()=>{t=window.setTimeout(()=>i(!1),a.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[a.scrollArea,a.scrollHideDelay]),(0,Rc.jsx)(Tb,{present:n||o,children:(0,Rc.jsx)(mN,{"data-state":o?"visible":"hidden",...r,ref:t})})}),pN=k.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=iN(dN,e.__scopeScrollArea),o="horizontal"===e.orientation,i=MN(()=>l("SCROLL_END"),100),[s,l]=(c="hidden",u={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},k.useReducer((e,t)=>u[e][t]??e,c));var c,u;return k.useEffect(()=>{if("idle"===s){const e=window.setTimeout(()=>l("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,a.scrollHideDelay,l]),k.useEffect(()=>{const e=a.viewport,t=o?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(l("SCROLL"),i()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[a.viewport,o,l,i]),(0,Rc.jsx)(Tb,{present:n||"hidden"!==s,children:(0,Rc.jsx)(gN,{"data-state":"hidden"===s?"hidden":"visible",...r,ref:t,onPointerEnter:lb(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:lb(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),mN=k.forwardRef((e,t)=>{const n=iN(dN,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,i]=k.useState(!1),s="horizontal"===e.orientation,l=MN(()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;i(s?e:t)}},10);return LN(n.viewport,l),LN(n.content,l),(0,Rc.jsx)(Tb,{present:r||o,children:(0,Rc.jsx)(gN,{"data-state":o?"visible":"hidden",...a,ref:t})})}),gN=k.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,a=iN(dN,e.__scopeScrollArea),o=k.useRef(null),i=k.useRef(0),[s,l]=k.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=RN(s.viewport,s.content),u={...r,sizes:s,onSizesChange:l,hasThumb:Boolean(c>0&&c<1),onThumbChange:e=>o.current=e,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:e=>i.current=e};function d(e,t){return function(e,t,n,r="ltr"){const a=ON(n),o=a/2,i=t||o,s=a-i,l=n.scrollbar.paddingStart+i,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d="ltr"===r?[0,u]:[-1*u,0];return AN([l,c],d)(e)}(e,i.current,s,t)}return"horizontal"===n?(0,Rc.jsx)(yN,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=PN(a.viewport.scrollLeft,s,a.dir);o.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=d(e,a.dir))}}):"vertical"===n?(0,Rc.jsx)(vN,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=PN(a.viewport.scrollTop,s);o.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=d(e))}}):null}),yN=k.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=iN(dN,e.__scopeScrollArea),[i,s]=k.useState(),l=k.useRef(null),c=gb(t,l,o.onScrollbarXChange);return k.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Rc.jsx)(wN,{"data-orientation":"horizontal",...a,ref:c,sizes:n,style:{bottom:0,left:"rtl"===o.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===o.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ON(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){const r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),_N(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:TN(i.paddingLeft),paddingEnd:TN(i.paddingRight)}})}})}),vN=k.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=iN(dN,e.__scopeScrollArea),[i,s]=k.useState(),l=k.useRef(null),c=gb(t,l,o.onScrollbarYChange);return k.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Rc.jsx)(wN,{"data-orientation":"vertical",...a,ref:c,sizes:n,style:{top:0,right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ON(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){const r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),_N(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:TN(i.paddingTop),paddingEnd:TN(i.paddingBottom)}})}})}),[bN,xN]=rN(dN),wN=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=e,h=iN(dN,n),[p,m]=k.useState(null),g=gb(t,e=>m(e)),y=k.useRef(null),v=k.useRef(""),b=h.viewport,x=r.content-r.viewport,w=Kb(u),S=Kb(l),E=MN(d,10);function C(e){y.current&&c({x:e.clientX-y.current.left,y:e.clientY-y.current.top})}return k.useEffect(()=>{const e=e=>{const t=e.target;p?.contains(t)&&w(e,x)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[b,p,x,w]),k.useEffect(S,[r,S]),LN(p,E),LN(h.content,E),(0,Rc.jsx)(bN,{scope:n,scrollbar:p,hasThumb:a,onThumbChange:Kb(o),onThumbPointerUp:Kb(i),onThumbPositionChange:S,onThumbPointerDown:Kb(s),children:(0,Rc.jsx)(Nb.div,{...f,ref:g,style:{position:"absolute",...f.style},onPointerDown:lb(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),y.current=p.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),C(e))}),onPointerMove:lb(e.onPointerMove,C),onPointerUp:lb(e.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=v.current,h.viewport&&(h.viewport.style.scrollBehavior=""),y.current=null})})})}),SN="ScrollAreaThumb",kN=k.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=xN(SN,e.__scopeScrollArea);return(0,Rc.jsx)(Tb,{present:n||a.hasThumb,children:(0,Rc.jsx)(EN,{ref:t,...r})})}),EN=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=iN(SN,n),i=xN(SN,n),{onThumbPositionChange:s}=i,l=gb(t,e=>i.onThumbChange(e)),c=k.useRef(void 0),u=MN(()=>{c.current&&(c.current(),c.current=void 0)},100);return k.useEffect(()=>{const e=o.viewport;if(e){const t=()=>{u(),c.current||(c.current=DN(e,s),s())};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[o.viewport,u,s]),(0,Rc.jsx)(Nb.div,{"data-state":i.hasThumb?"visible":"hidden",...a,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:lb(e.onPointerDownCapture,e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;i.onThumbPointerDown({x:n,y:r})}),onPointerUp:lb(e.onPointerUp,i.onThumbPointerUp)})});kN.displayName=SN;var CN="ScrollAreaCorner",NN=k.forwardRef((e,t)=>{const n=iN(CN,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?(0,Rc.jsx)(jN,{...e,ref:t}):null});NN.displayName=CN;var jN=k.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=iN(CN,n),[o,i]=k.useState(0),[s,l]=k.useState(0),c=Boolean(o&&s);return LN(a.scrollbarX,()=>{const e=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(e),l(e)}),LN(a.scrollbarY,()=>{const e=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(e),i(e)}),c?(0,Rc.jsx)(Nb.div,{...r,ref:t,style:{width:o,height:s,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...e.style}}):null});function TN(e){return e?parseInt(e,10):0}function RN(e,t){const n=e/t;return isNaN(n)?0:n}function ON(e){const t=RN(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function PN(e,t,n="ltr"){const r=ON(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,i=t.content-t.viewport,s=o-r,l=tN(e,"ltr"===n?[0,i]:[-1*i,0]);return AN([0,i],[0,s])(l)}function AN(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function _N(e,t){return e>0&&e<t}var DN=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function a(){const o={left:e.scrollLeft,top:e.scrollTop},i=n.left!==o.left,s=n.top!==o.top;(i||s)&&t(),n=o,r=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(r)};function MN(e,t){const n=Kb(e),r=k.useRef(0);return k.useEffect(()=>()=>window.clearTimeout(r.current),[]),k.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function LN(e,t){const n=Kb(t);db(()=>{let t=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var IN=sN,zN=cN,FN=NN;function BN(e){const t=k.useRef({value:e,previous:e});return k.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var UN=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"}),VN=k.forwardRef((e,t)=>(0,Rc.jsx)(Nb.span,{...e,ref:t,style:{...UN,...e.style}}));VN.displayName="VisuallyHidden";var $N=VN,HN=[" ","Enter","ArrowUp","ArrowDown"],qN=[" ","Enter"],WN="Select",[KN,GN,YN]=zw(WN),[XN,QN]=cb(WN,[YN,Rk]),JN=Rk(),[ZN,ej]=XN(WN),[tj,nj]=XN(WN);function rj(e){const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:i,defaultValue:s,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:h,form:p,internal_do_not_use_render:m}=e,g=JN(t),[y,v]=k.useState(null),[b,x]=k.useState(null),[w,S]=k.useState(!1),E=Bw(c),[C,N]=hb({prop:r,defaultProp:a??!1,onChange:o,caller:WN}),[j,T]=hb({prop:i,defaultProp:s,onChange:l,caller:WN}),R=k.useRef(null),O=!y||(!!p||!!y.closest("form")),[P,A]=k.useState(new Set),_=_b(),D=Array.from(P).map(e=>e.props.value).join(";"),M=k.useCallback(e=>{A(t=>new Set(t).add(e))},[]),L=k.useCallback(e=>{A(t=>{const n=new Set(t);return n.delete(e),n})},[]),I={required:h,trigger:y,onTriggerChange:v,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:w,onValueNodeHasChildrenChange:S,contentId:_,value:j,onValueChange:T,open:C,onOpenChange:N,dir:E,triggerPointerDownPosRef:R,disabled:f,name:u,autoComplete:d,form:p,nativeOptions:P,nativeSelectKey:D,isFormControl:O};return(0,Rc.jsx)(qk,{...g,children:(0,Rc.jsx)(ZN,{scope:t,...I,children:(0,Rc.jsx)(KN.Provider,{scope:t,children:(0,Rc.jsx)(tj,{scope:t,onNativeOptionAdd:M,onNativeOptionRemove:L,children:Gj(m)?m(I):n})})})})}rj.displayName="SelectProvider";var aj=e=>{const{__scopeSelect:t,children:n,...r}=e;return(0,Rc.jsx)(rj,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,Rc.jsxs)(Rc.Fragment,{children:[n,e?(0,Rc.jsx)(Kj,{__scopeSelect:t}):null]})})};aj.displayName=WN;var oj="SelectTrigger",ij=k.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=JN(n),i=ej(oj,n),s=i.disabled||r,l=gb(t,i.onTriggerChange),c=GN(n),u=k.useRef("touch"),[d,f,h]=Xj(e=>{const t=c().filter(e=>!e.disabled),n=Qj(t,e,t.find(e=>e.value===i.value));void 0!==n&&i.onValueChange(n.value)}),p=e=>{s||(i.onOpenChange(!0),h()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,Rc.jsx)(Wk,{asChild:!0,...o,children:(0,Rc.jsx)(Nb.button,{type:"button",role:"combobox","aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Yj(i.value)?"":void 0,...a,ref:l,onClick:lb(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==u.current&&p(e)}),onPointerDown:lb(a.onPointerDown,e=>{u.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(p(e),e.preventDefault())}),onKeyDown:lb(a.onKeyDown,e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),t&&" "===e.key||HN.includes(e.key)&&(p(),e.preventDefault())})})})});ij.displayName=oj;var sj="SelectValue",lj=k.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...s}=e,l=ej(sj,n),{onValueNodeHasChildrenChange:c}=l,u=void 0!==o,d=gb(t,l.onValueNodeChange);db(()=>{c(u)},[c,u]);const f=Yj(l.value);return(0,Rc.jsx)(Nb.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:"none"},children:(0,Rc.jsx)(k.Fragment,{children:f?i:o},f?"placeholder":"value")})});lj.displayName=sj;var cj=k.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return(0,Rc.jsx)(Nb.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});cj.displayName="SelectIcon";var uj="SelectPortal",[dj,fj]=XN(uj,{forceMount:void 0}),hj=e=>{const{__scopeSelect:t,forceMount:n,...r}=e;return(0,Rc.jsx)(dj,{scope:e.__scopeSelect,forceMount:n,children:(0,Rc.jsx)(fx,{asChild:!0,...r})})};hj.displayName=uj;var pj="SelectContent",mj=k.forwardRef((e,t)=>{const n=fj(pj,e.__scopeSelect),{forceMount:r=n.forceMount,...a}=e,o=ej(pj,e.__scopeSelect),[i,s]=k.useState();return db(()=>{s(new DocumentFragment)},[]),(0,Rc.jsx)(Tb,{present:r||o.open,children:({present:e})=>e?(0,Rc.jsx)(wj,{...a,ref:t}):(0,Rc.jsx)(gj,{...a,fragment:i})})});mj.displayName=pj;var gj=k.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,fragment:a}=e;return a?x.createPortal((0,Rc.jsx)(vj,{scope:n,children:(0,Rc.jsx)(KN.Slot,{scope:n,children:(0,Rc.jsx)("div",{ref:t,children:r})})}),a):null});gj.displayName="SelectContentFragment";var yj=10,[vj,bj]=XN(pj),xj=yb("SelectContent.RemoveScroll"),wj=k.forwardRef((e,t)=>{const{__scopeSelect:n}=e,{position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:i,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:g,...y}=e,v=ej(pj,n),[b,x]=k.useState(null),[w,S]=k.useState(null),E=gb(t,e=>x(e)),[C,N]=k.useState(null),[j,T]=k.useState(null),R=GN(n),[O,P]=k.useState(!1),A=k.useRef(!1);k.useEffect(()=>{if(b)return uw(b)},[b]),mx();const _=k.useCallback(e=>{const[t,...n]=R().map(e=>e.ref.current),[r]=n.slice(-1),a=document.activeElement;for(const o of e){if(o===a)return;if(o?.scrollIntoView({block:"nearest"}),o===t&&w&&(w.scrollTop=0),o===r&&w&&(w.scrollTop=w.scrollHeight),o?.focus(),document.activeElement!==a)return}},[R,w]),D=k.useCallback(()=>_([C,b]),[_,C,b]);k.useEffect(()=>{O&&D()},[O,D]);const{onOpenChange:M,triggerPointerDownPosRef:L}=v;k.useEffect(()=>{if(b){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(L.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||M(!1),document.removeEventListener("pointermove",t),L.current=null};return null!==L.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[b,M,L]),k.useEffect(()=>{const e=()=>M(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[M]);const[I,z]=Xj(e=>{const t=R().filter(e=>!e.disabled),n=Qj(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),F=k.useCallback((e,t,n)=>{const r=!A.current&&!n;(void 0!==v.value&&v.value===t||r)&&(N(e),r&&(A.current=!0))},[v.value]),B=k.useCallback(()=>b?.focus(),[b]),U=k.useCallback((e,t,n)=>{const r=!A.current&&!n;(void 0!==v.value&&v.value===t||r)&&T(e)},[v.value]),V="popper"===r?kj:Sj,$=V===kj?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:p,hideWhenDetached:m,avoidCollisions:g}:{};return(0,Rc.jsx)(vj,{scope:n,content:b,viewport:w,onViewportChange:S,itemRefCallback:F,selectedItem:C,onItemLeave:B,itemTextRefCallback:U,focusSelectedItem:D,selectedItemText:j,position:r,isPositioned:O,searchRef:I,children:(0,Rc.jsx)(rw,{as:xj,allowPinchZoom:!0,children:(0,Rc.jsx)(ox,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:lb(a,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,Rc.jsx)(Zb,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,Rc.jsx)(V,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:e=>e.preventDefault(),...y,...$,onPlaced:()=>P(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:lb(y.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=R().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>_(t)),e.preventDefault()}})})})})})})});wj.displayName="SelectContentImpl";var Sj=k.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=ej(pj,n),i=bj(pj,n),[s,l]=k.useState(null),[c,u]=k.useState(null),d=gb(t,e=>u(e)),f=GN(n),h=k.useRef(!1),p=k.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:v}=i,b=k.useCallback(()=>{if(o.trigger&&o.valueNode&&s&&c&&m&&g&&y){const e=o.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),a=y.getBoundingClientRect();if("rtl"!==o.dir){const r=a.left-t.left,o=n.left-r,i=e.left-o,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-yj,d=tN(o,[yj,Math.max(yj,u-c)]);s.style.minWidth=l+"px",s.style.left=d+"px"}else{const r=t.right-a.right,o=window.innerWidth-n.right-r,i=window.innerWidth-e.right-o,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-yj,d=tN(o,[yj,Math.max(yj,u-c)]);s.style.minWidth=l+"px",s.style.right=d+"px"}const i=f(),l=window.innerHeight-2*yj,u=m.scrollHeight,d=window.getComputedStyle(c),p=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),x=p+v+u+parseInt(d.paddingBottom,10)+b,w=Math.min(5*g.offsetHeight,x),S=window.getComputedStyle(m),k=parseInt(S.paddingTop,10),E=parseInt(S.paddingBottom,10),C=e.top+e.height/2-yj,N=l-C,j=g.offsetHeight/2,T=p+v+(g.offsetTop+j),R=x-T;if(T<=C){const e=i.length>0&&g===i[i.length-1].ref.current;s.style.bottom="0px";const t=c.clientHeight-m.offsetTop-m.offsetHeight,n=T+Math.max(N,j+(e?E:0)+t+b);s.style.height=n+"px"}else{const e=i.length>0&&g===i[0].ref.current;s.style.top="0px";const t=Math.max(C,p+m.offsetTop+(e?k:0)+j)+R;s.style.height=t+"px",m.scrollTop=T-C+m.offsetTop}s.style.margin=`${yj}px 0`,s.style.minHeight=w+"px",s.style.maxHeight=l+"px",r?.(),requestAnimationFrame(()=>h.current=!0)}},[f,o.trigger,o.valueNode,s,c,m,g,y,o.dir,r]);db(()=>b(),[b]);const[x,w]=k.useState();return db(()=>{c&&w(window.getComputedStyle(c).zIndex)},[c]),(0,Rc.jsx)(Ej,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:k.useCallback(e=>{e&&!0===p.current&&(b(),v?.(),p.current=!1)},[b,v]),children:(0,Rc.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:(0,Rc.jsx)(Nb.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});Sj.displayName="SelectItemAlignedPosition";var kj=k.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=yj,...o}=e,i=JN(n);return(0,Rc.jsx)(Kk,{...i,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.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)"}})});kj.displayName="SelectPopperPosition";var[Ej,Cj]=XN(pj,{}),Nj="SelectViewport",jj=k.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=bj(Nj,n),i=Cj(Nj,n),s=gb(t,o.onViewportChange),l=k.useRef(0);return(0,Rc.jsxs)(Rc.Fragment,{children:[(0,Rc.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,Rc.jsx)(KN.Slot,{scope:n,children:(0,Rc.jsx)(Nb.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:lb(a.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(r?.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*yj,a=parseFloat(n.style.minHeight),o=parseFloat(n.style.height),i=Math.max(a,o);if(i<r){const a=i+e,o=Math.min(r,a),s=a-o;n.style.height=o+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop})})})]})});jj.displayName=Nj;var Tj="SelectGroup",[Rj,Oj]=XN(Tj);k.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=_b();return(0,Rc.jsx)(Rj,{scope:n,id:a,children:(0,Rc.jsx)(Nb.div,{role:"group","aria-labelledby":a,...r,ref:t})})}).displayName=Tj;var Pj="SelectLabel";k.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Oj(Pj,n);return(0,Rc.jsx)(Nb.div,{id:a.id,...r,ref:t})}).displayName=Pj;var Aj="SelectItem",[_j,Dj]=XN(Aj),Mj=k.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,s=ej(Aj,n),l=bj(Aj,n),c=s.value===r,[u,d]=k.useState(o??""),[f,h]=k.useState(!1),p=gb(t,e=>l.itemRefCallback?.(e,r,a)),m=_b(),g=k.useRef("touch"),y=()=>{a||(s.onValueChange(r),s.onOpenChange(!1))};return(0,Rc.jsx)(_j,{scope:n,value:r,disabled:a,textId:m,isSelected:c,onItemTextChange:k.useCallback(e=>{d(t=>t||(e?.textContent??"").trim())},[]),children:(0,Rc.jsx)(KN.ItemSlot,{scope:n,value:r,disabled:a,textValue:u,children:(0,Rc.jsx)(Nb.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:p,onFocus:lb(i.onFocus,()=>h(!0)),onBlur:lb(i.onBlur,()=>h(!1)),onClick:lb(i.onClick,()=>{"mouse"!==g.current&&y()}),onPointerUp:lb(i.onPointerUp,()=>{"mouse"===g.current&&y()}),onPointerDown:lb(i.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:lb(i.onPointerMove,e=>{g.current=e.pointerType,a?l.onItemLeave?.():"mouse"===g.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:lb(i.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:lb(i.onKeyDown,e=>{""!==l.searchRef?.current&&" "===e.key||(qN.includes(e.key)&&y()," "===e.key&&e.preventDefault())})})})})});Mj.displayName=Aj;var Lj="SelectItemText",Ij=k.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,i=ej(Lj,n),s=bj(Lj,n),l=Dj(Lj,n),c=nj(Lj,n),[u,d]=k.useState(null),f=gb(t,e=>d(e),l.onItemTextChange,e=>s.itemTextRefCallback?.(e,l.value,l.disabled)),h=u?.textContent,p=k.useMemo(()=>(0,Rc.jsx)("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=c;return db(()=>(m(p),()=>g(p)),[m,g,p]),(0,Rc.jsxs)(Rc.Fragment,{children:[(0,Rc.jsx)(Nb.span,{id:l.textId,...o,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren&&!Yj(i.value)?x.createPortal(o.children,i.valueNode):null]})});Ij.displayName=Lj;var zj="SelectItemIndicator",Fj=k.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Dj(zj,n).isSelected?(0,Rc.jsx)(Nb.span,{"aria-hidden":!0,...r,ref:t}):null});Fj.displayName=zj;var Bj="SelectScrollUpButton",Uj=k.forwardRef((e,t)=>{const n=bj(Bj,e.__scopeSelect),r=Cj(Bj,e.__scopeSelect),[a,o]=k.useState(!1),i=gb(t,r.onScrollButtonChange);return db(()=>{if(n.viewport&&n.isPositioned){let e=function(){o(t.scrollTop>0)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),a?(0,Rc.jsx)(Hj,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});Uj.displayName=Bj;var Vj="SelectScrollDownButton",$j=k.forwardRef((e,t)=>{const n=bj(Vj,e.__scopeSelect),r=Cj(Vj,e.__scopeSelect),[a,o]=k.useState(!1),i=gb(t,r.onScrollButtonChange);return db(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight;o(Math.ceil(t.scrollTop)<e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),a?(0,Rc.jsx)(Hj,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});$j.displayName=Vj;var Hj=k.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=bj("SelectScrollButton",n),i=k.useRef(null),s=GN(n),l=k.useCallback(()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)},[]);return k.useEffect(()=>()=>l(),[l]),db(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),(0,Rc.jsx)(Nb.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:lb(a.onPointerDown,()=>{null===i.current&&(i.current=window.setInterval(r,50))}),onPointerMove:lb(a.onPointerMove,()=>{o.onItemLeave?.(),null===i.current&&(i.current=window.setInterval(r,50))}),onPointerLeave:lb(a.onPointerLeave,()=>{l()})})});k.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return(0,Rc.jsx)(Nb.div,{"aria-hidden":!0,...r,ref:t})}).displayName="SelectSeparator";var qj="SelectArrow";k.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=JN(n);return"popper"===bj(qj,n).position?(0,Rc.jsx)(Gk,{...a,...r,ref:t}):null}).displayName=qj;var Wj="SelectBubbleInput",Kj=k.forwardRef(({__scopeSelect:e,...t},n)=>{const r=ej(Wj,e),{value:a,onValueChange:o,required:i,disabled:s,name:l,autoComplete:c,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,h=k.useRef(null),p=gb(n,h),m=a??"",g=BN(m),y=Array.from(d).some(e=>""===(e.props.value??""));return k.useEffect(()=>{const e=h.current;if(!e)return;const t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(g!==m&&n){const t=new Event("change",{bubbles:!0});n.call(e,m),e.dispatchEvent(t)}},[g,m]),(0,Rc.jsxs)(Nb.select,{"aria-hidden":!0,required:i,tabIndex:-1,name:l,autoComplete:c,disabled:s,form:u,onChange:e=>o(e.target.value),...t,style:{...UN,...t.style},ref:p,defaultValue:m,children:[Yj(a)&&!y?(0,Rc.jsx)("option",{value:""}):null,Array.from(d)]},f)});function Gj(e){return"function"==typeof e}function Yj(e){return""===e||void 0===e}function Xj(e){const t=Kb(e),n=k.useRef(""),r=k.useRef(0),a=k.useCallback(e=>{const a=n.current+e;t(a),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(a)},[t]),o=k.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return k.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}function Qj(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=(i=e,s=Math.max(a,0),i.map((e,t)=>i[(s+t)%i.length]));var i,s;1===r.length&&(o=o.filter(e=>e!==n));const l=o.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}Kj.displayName=Wj;var Jj="horizontal",Zj=["horizontal","vertical"],eT=k.forwardRef((e,t)=>{const{decorative:n,orientation:r=Jj,...a}=e,o=function(e){return Zj.includes(e)}(r)?r:Jj,i=n?{role:"none"}:{"aria-orientation":"vertical"===o?o:void 0,role:"separator"};return(0,Rc.jsx)(Nb.div,{"data-orientation":o,...i,...a,ref:t})});eT.displayName="Separator";var tT=eT,nT="Switch",[rT,aT]=cb(nT),[oT,iT]=rT(nT);function sT(e){const{__scopeSwitch:t,checked:n,children:r,defaultChecked:a,disabled:o,form:i,name:s,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,h]=hb({prop:n,defaultProp:a??!1,onChange:l,caller:nT}),[p,m]=k.useState(null),[g,y]=k.useState(null),v={checked:f,setChecked:h,disabled:o,control:p,setControl:m,name:s,form:i,value:u,hasConsumerStoppedPropagationRef:k.useRef(!1),required:c,defaultChecked:a,isFormControl:!p||(!!i||!!p.closest("form")),bubbleInput:g,setBubbleInput:y};return(0,Rc.jsx)(oT,{scope:t,...v,children:mT(d)?d(v):r})}var lT="SwitchTrigger",cT=k.forwardRef(({__scopeSwitch:e,onClick:t,...n},r)=>{const{value:a,disabled:o,checked:i,required:s,setControl:l,setChecked:c,hasConsumerStoppedPropagationRef:u,isFormControl:d,bubbleInput:f}=iT(lT,e),h=gb(r,l);return(0,Rc.jsx)(Nb.button,{type:"button",role:"switch","aria-checked":i,"aria-required":s,"data-state":gT(i),"data-disabled":o?"":void 0,disabled:o,value:a,...n,ref:h,onClick:lb(t,e=>{c(e=>!e),f&&d&&(u.current=e.isPropagationStopped(),u.current||e.stopPropagation())})})});cT.displayName=lT;var uT=k.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:o,required:i,disabled:s,value:l,onCheckedChange:c,form:u,...d}=e;return(0,Rc.jsx)(sT,{__scopeSwitch:n,checked:a,defaultChecked:o,disabled:s,required:i,onCheckedChange:c,name:r,form:u,value:l,internal_do_not_use_render:({isFormControl:e})=>(0,Rc.jsxs)(Rc.Fragment,{children:[(0,Rc.jsx)(cT,{...d,ref:t,__scopeSwitch:n}),e&&(0,Rc.jsx)(pT,{__scopeSwitch:n})]})})});uT.displayName=nT;var dT="SwitchThumb",fT=k.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,a=iT(dT,n);return(0,Rc.jsx)(Nb.span,{"data-state":gT(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});fT.displayName=dT;var hT="SwitchBubbleInput",pT=k.forwardRef(({__scopeSwitch:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:o,defaultChecked:i,required:s,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:h}=iT(hT,e),p=gb(n,h),m=BN(o),g=Nk(r);k.useEffect(()=>{const e=f;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set,r=!a.current;if(m!==o&&n){const t=new Event("click",{bubbles:r});n.call(e,o),e.dispatchEvent(t)}},[f,m,o,a]);const y=k.useRef(o);return(0,Rc.jsx)(Nb.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:s,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:p,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function mT(e){return"function"==typeof e}function gT(e){return e?"checked":"unchecked"}pT.displayName=hT;var yT="Tabs",[vT,bT]=cb(yT,[nE]),xT=nE(),[wT,ST]=vT(yT),kT=k.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:o,orientation:i="horizontal",dir:s,activationMode:l="automatic",...c}=e,u=Bw(s),[d,f]=hb({prop:r,onChange:a,defaultProp:o??"",caller:yT});return(0,Rc.jsx)(wT,{scope:n,baseId:_b(),value:d,onValueChange:f,orientation:i,dir:u,activationMode:l,children:(0,Rc.jsx)(Nb.div,{dir:u,"data-orientation":i,...c,ref:t})})});kT.displayName=yT;var ET="TabsList",CT=k.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,o=ST(ET,n),i=xT(n);return(0,Rc.jsx)(dE,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:r,children:(0,Rc.jsx)(Nb.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:t})})});CT.displayName=ET;var NT="TabsTrigger",jT=k.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...o}=e,i=ST(NT,n),s=xT(n),l=OT(i.baseId,r),c=PT(i.baseId,r),u=r===i.value;return(0,Rc.jsx)(fE,{asChild:!0,...s,focusable:!a,active:u,children:(0,Rc.jsx)(Nb.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:l,...o,ref:t,onMouseDown:lb(e.onMouseDown,e=>{a||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)}),onKeyDown:lb(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)}),onFocus:lb(e.onFocus,()=>{const e="manual"!==i.activationMode;u||a||!e||i.onValueChange(r)})})})});jT.displayName=NT;var TT="TabsContent",RT=k.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:o,...i}=e,s=ST(TT,n),l=OT(s.baseId,r),c=PT(s.baseId,r),u=r===s.value,d=k.useRef(u);return k.useEffect(()=>{const e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,Rc.jsx)(Tb,{present:a||u,children:({present:n})=>(0,Rc.jsx)(Nb.div,{"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!n,id:c,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:n&&o})})});function OT(e,t){return`${e}-trigger-${t}`}function PT(e,t){return`${e}-content-${t}`}RT.displayName=TT;var AT=kT,_T=CT,DT=jT,MT=RT,[LT,IT]=cb("Tooltip",[Rk]),zT=Rk(),FT="TooltipProvider",BT=700,UT="tooltip.open",[VT,$T]=LT(FT),HT=e=>{const{__scopeTooltip:t,delayDuration:n=BT,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,i=k.useRef(!0),s=k.useRef(!1),l=k.useRef(0);return k.useEffect(()=>{const e=l.current;return()=>window.clearTimeout(e)},[]),(0,Rc.jsx)(VT,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:k.useCallback(()=>{r<=0||(window.clearTimeout(l.current),i.current=!1)},[r]),onClose:k.useCallback(()=>{r<=0||(window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:k.useCallback(e=>{s.current=e},[]),disableHoverableContent:a,children:o})};HT.displayName=FT;var qT="Tooltip",[WT,KT]=LT(qT),GT=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:o,disableHoverableContent:i,delayDuration:s}=e,l=$T(qT,e.__scopeTooltip),c=zT(t),[u,d]=k.useState(null),f=_b(),h=k.useRef(0),p=i??l.disableHoverableContent,m=s??l.delayDuration,g=k.useRef(!1),[y,v]=hb({prop:r,defaultProp:a??!1,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(UT))):l.onClose(),o?.(e)},caller:qT}),b=k.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),x=k.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,v(!0)},[v]),w=k.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v(!1)},[v]),S=k.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,v(!0),h.current=0},m)},[m,v]);return k.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),(0,Rc.jsx)(qk,{...c,children:(0,Rc.jsx)(WT,{scope:t,contentId:f,open:y,stateAttribute:b,trigger:u,onTriggerChange:d,onTriggerEnter:k.useCallback(()=>{l.isOpenDelayedRef.current?S():x()},[l.isOpenDelayedRef,S,x]),onTriggerLeave:k.useCallback(()=>{p?w():(window.clearTimeout(h.current),h.current=0)},[w,p]),onOpen:x,onClose:w,disableHoverableContent:p,children:n})})};GT.displayName=qT;var YT="TooltipTrigger",XT=k.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=KT(YT,n),o=$T(YT,n),i=zT(n),s=gb(t,k.useRef(null),a.onTriggerChange),l=k.useRef(!1),c=k.useRef(!1),u=k.useCallback(()=>l.current=!1,[]);return k.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),(0,Rc.jsx)(Wk,{asChild:!0,...i,children:(0,Rc.jsx)(Nb.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:s,onPointerMove:lb(e.onPointerMove,e=>{"touch"!==e.pointerType&&(c.current||o.isPointerInTransitRef.current||(a.onTriggerEnter(),c.current=!0))}),onPointerLeave:lb(e.onPointerLeave,()=>{a.onTriggerLeave(),c.current=!1}),onPointerDown:lb(e.onPointerDown,()=>{a.open&&a.onClose(),l.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:lb(e.onFocus,()=>{l.current||a.onOpen()}),onBlur:lb(e.onBlur,a.onClose),onClick:lb(e.onClick,a.onClose)})})});XT.displayName=YT;var QT="TooltipPortal",[JT,ZT]=LT(QT,{forceMount:void 0}),eR=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:a}=e,o=KT(QT,t);return(0,Rc.jsx)(JT,{scope:t,forceMount:n,children:(0,Rc.jsx)(Tb,{present:n||o.open,children:(0,Rc.jsx)(fx,{asChild:!0,container:a,children:r})})})};eR.displayName=QT;var tR="TooltipContent",nR=k.forwardRef((e,t)=>{const n=ZT(tR,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,i=KT(tR,e.__scopeTooltip);return(0,Rc.jsx)(Tb,{present:r||i.open,children:i.disableHoverableContent?(0,Rc.jsx)(sR,{side:a,...o,ref:t}):(0,Rc.jsx)(rR,{side:a,...o,ref:t})})}),rR=k.forwardRef((e,t)=>{const n=KT(tR,e.__scopeTooltip),r=$T(tR,e.__scopeTooltip),a=k.useRef(null),o=gb(t,a),[i,s]=k.useState(null),{trigger:l,onClose:c}=n,u=a.current,{onPointerInTransitChange:d}=r,f=k.useCallback(()=>{s(null),d(!1)},[d]),h=k.useCallback((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},a=function(e,t,n=5){const 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})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),o=function(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}(t.getBoundingClientRect());s(function(e){const 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?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...a,...o])),d(!0)},[d]);return k.useEffect(()=>()=>f(),[f]),k.useEffect(()=>{if(l&&u){const e=e=>h(e,u),t=e=>h(e,l);return l.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}},[l,u,h,f]),k.useEffect(()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=l?.contains(t)||u?.contains(t),a=!function(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const e=t[o],s=t[i],l=e.x,c=e.y,u=s.x,d=s.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(a=!a)}return a}(n,i);r?f():a&&(f(),c())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[l,u,i,c,f]),(0,Rc.jsx)(sR,{...e,ref:o})}),[aR,oR]=LT(qT,{isInside:!1}),iR=function(e){const t=e=>"child"in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=bb,t}("TooltipContent"),sR=k.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...s}=e,l=KT(tR,n),c=zT(n),{onClose:u}=l;return k.useEffect(()=>(document.addEventListener(UT,u),()=>document.removeEventListener(UT,u)),[u]),k.useEffect(()=>{if(l.trigger){const e=e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&u()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[l.trigger,u]),(0,Rc.jsx)(Zb,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,Rc.jsxs)(Kk,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.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,Rc.jsx)(iR,{children:r}),(0,Rc.jsx)(aR,{scope:n,isInside:!0,children:(0,Rc.jsx)($N,{id:l.contentId,role:"tooltip",children:a||r})})]})})});nR.displayName=tR;var lR="TooltipArrow",cR=k.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=zT(n);return oR(lR,n).isInside?null:(0,Rc.jsx)(Gk,{...a,...r,ref:t})});cR.displayName=lR;var uR=HT,dR=GT,fR=XT,hR=eR,pR=nR,mR=cR,gR=sb("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function yR(e){const t=(0,S.c)(16);let n,r,a,o,i;t[0]!==e?(({className:n,variant:a,size:o,asChild:i,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=i):(n=t[1],r=t[2],a=t[3],o=t[4],i=t[5]);const s=void 0===a?"default":a,l=void 0===o?"default":o,c=void 0!==i&&i?vb:"button";let u,d;return t[6]!==n||t[7]!==l||t[8]!==s?(u=Lp(gR({variant:s,size:l,className:n})),t[6]=n,t[7]=l,t[8]=s,t[9]=u):u=t[9],t[10]!==c||t[11]!==r||t[12]!==l||t[13]!==u||t[14]!==s?(d=(0,Rc.jsx)(c,{"data-slot":"button","data-variant":s,"data-size":l,className:u,...r}),t[10]=c,t[11]=r,t[12]=l,t[13]=u,t[14]=s,t[15]=d):d=t[15],d}function vR(e){const t=(0,S.c)(10);let n,r,a,o,i;return t[0]!==e?(({className:n,type:a,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a):(n=t[1],r=t[2],a=t[3]),t[4]!==n?(o=Lp("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:ring focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),t[4]=n,t[5]=o):o=t[5],t[6]!==r||t[7]!==o||t[8]!==a?(i=(0,Rc.jsx)("input",{type:a,"data-slot":"input",className:o,...r}),t[6]=r,t[7]=o,t[8]=a,t[9]=i):i=t[9],i}function bR(e){const t=(0,S.c)(8);let n,r,a,o;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(a=Lp("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",n),t[3]=n,t[4]=a):a=t[4],t[5]!==r||t[6]!==a?(o=(0,Rc.jsx)(eN,{"data-slot":"label",className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function xR(e){const t=(0,S.c)(11);let n,r,a;t[0]!==e?(({className:n,size:a,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a):(n=t[1],r=t[2],a=t[3]);const o=void 0===a?"default":a;let i,s,l;return t[4]!==n?(i=Lp("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",n),t[4]=n,t[5]=i):i=t[5],t[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,Rc.jsx)(fT,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"}),t[6]=s):s=t[6],t[7]!==r||t[8]!==o||t[9]!==i?(l=(0,Rc.jsx)(uT,{"data-slot":"switch","data-size":o,className:i,...r,children:s}),t[7]=r,t[8]=o,t[9]=i,t[10]=l):l=t[10],l}function wR(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,Rc.jsx)(aj,{"data-slot":"select",...n}),t[2]=n,t[3]=r):r=t[3],r}function SR(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,Rc.jsx)(lj,{"data-slot":"select-value",...n}),t[2]=n,t[3]=r):r=t[3],r}function kR(e){const t=(0,S.c)(13);let n,r,a,o;t[0]!==e?(({className:r,size:o,children:n,...a}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o):(n=t[1],r=t[2],a=t[3],o=t[4]);const i=void 0===o?"default":o;let s,l,c;return t[5]!==r?(s=Lp("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",r),t[5]=r,t[6]=s):s=t[6],t[7]===Symbol.for("react.memo_cache_sentinel")?(l=(0,Rc.jsx)(cj,{asChild:!0,children:(0,Rc.jsx)(Bd,{className:"pointer-events-none size-4 text-muted-foreground"})}),t[7]=l):l=t[7],t[8]!==n||t[9]!==a||t[10]!==i||t[11]!==s?(c=(0,Rc.jsxs)(ij,{"data-slot":"select-trigger","data-size":i,className:s,...a,children:[n,l]}),t[8]=n,t[9]=a,t[10]=i,t[11]=s,t[12]=c):c=t[12],c}function ER(e){const t=(0,S.c)(24);let n,r,a,o,i;t[0]!==e?(({className:r,children:n,position:o,align:i,...a}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=i):(n=t[1],r=t[2],a=t[3],o=t[4],i=t[5]);const s=void 0===o?"item-aligned":o,l=void 0===i?"center":i,c="item-aligned"===s,u="popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let d,f;t[6]!==r||t[7]!==u?(d=Lp("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",u,r),t[6]=r,t[7]=u,t[8]=d):d=t[8],t[9]===Symbol.for("react.memo_cache_sentinel")?(f=(0,Rc.jsx)(NR,{}),t[9]=f):f=t[9];const h="popper"===s&&"";let p,m,g,y;return t[10]!==h?(p=Lp("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",h),t[10]=h,t[11]=p):p=t[11],t[12]!==n||t[13]!==s||t[14]!==p?(m=(0,Rc.jsx)(jj,{"data-position":s,className:p,children:n}),t[12]=n,t[13]=s,t[14]=p,t[15]=m):m=t[15],t[16]===Symbol.for("react.memo_cache_sentinel")?(g=(0,Rc.jsx)(jR,{}),t[16]=g):g=t[16],t[17]!==l||t[18]!==s||t[19]!==a||t[20]!==c||t[21]!==d||t[22]!==m?(y=(0,Rc.jsx)(hj,{children:(0,Rc.jsxs)(mj,{"data-slot":"select-content","data-align-trigger":c,className:d,position:s,align:l,...a,children:[f,m,g]})}),t[17]=l,t[18]=s,t[19]=a,t[20]=c,t[21]=d,t[22]=m,t[23]=y):y=t[23],y}function CR(e){const t=(0,S.c)(13);let n,r,a,o,i,s,l;return t[0]!==e?(({className:r,children:n,...a}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a):(n=t[1],r=t[2],a=t[3]),t[4]!==r?(o=Lp("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",r),t[4]=r,t[5]=o):o=t[5],t[6]===Symbol.for("react.memo_cache_sentinel")?(i=(0,Rc.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:(0,Rc.jsx)(Fj,{children:(0,Rc.jsx)(Fd,{className:"pointer-events-none"})})}),t[6]=i):i=t[6],t[7]!==n?(s=(0,Rc.jsx)(Ij,{children:n}),t[7]=n,t[8]=s):s=t[8],t[9]!==a||t[10]!==o||t[11]!==s?(l=(0,Rc.jsxs)(Mj,{"data-slot":"select-item",className:o,...a,children:[i,s]}),t[9]=a,t[10]=o,t[11]=s,t[12]=l):l=t[12],l}function NR(e){const t=(0,S.c)(9);let n,r,a,o,i;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(a=Lp("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),t[3]=n,t[4]=a):a=t[4],t[5]===Symbol.for("react.memo_cache_sentinel")?(o=(0,Rc.jsx)(Vd,{}),t[5]=o):o=t[5],t[6]!==r||t[7]!==a?(i=(0,Rc.jsx)(Uj,{"data-slot":"select-scroll-up-button",className:a,...r,children:o}),t[6]=r,t[7]=a,t[8]=i):i=t[8],i}function jR(e){const t=(0,S.c)(9);let n,r,a,o,i;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(a=Lp("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),t[3]=n,t[4]=a):a=t[4],t[5]===Symbol.for("react.memo_cache_sentinel")?(o=(0,Rc.jsx)(Bd,{}),t[5]=o):o=t[5],t[6]!==r||t[7]!==a?(i=(0,Rc.jsx)($j,{"data-slot":"select-scroll-down-button",className:a,...r,children:o}),t[6]=r,t[7]=a,t[8]=i):i=t[8],i}var TR=sb("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function RR(e){const t=(0,S.c)(13);let n,r,a,o;t[0]!==e?(({className:n,variant:a,asChild:o,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o):(n=t[1],r=t[2],a=t[3],o=t[4]);const i=void 0===a?"default":a,s=void 0!==o&&o?vb:"span";let l,c;return t[5]!==n||t[6]!==i?(l=Lp(TR({variant:i}),n),t[5]=n,t[6]=i,t[7]=l):l=t[7],t[8]!==s||t[9]!==r||t[10]!==l||t[11]!==i?(c=(0,Rc.jsx)(s,{"data-slot":"badge","data-variant":i,className:l,...r}),t[8]=s,t[9]=r,t[10]=l,t[11]=i,t[12]=c):c=t[12],c}function OR(e){const t=(0,S.c)(6);let n,r;t[0]!==e?(({delayDuration:r,...n}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);const a=void 0===r?0:r;let o;return t[3]!==a||t[4]!==n?(o=(0,Rc.jsx)(uR,{"data-slot":"tooltip-provider",delayDuration:a,...n}),t[3]=a,t[4]=n,t[5]=o):o=t[5],o}function PR(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,Rc.jsx)(dR,{"data-slot":"tooltip",...n}),t[2]=n,t[3]=r):r=t[3],r}function AR(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,Rc.jsx)(fR,{"data-slot":"tooltip-trigger",...n}),t[2]=n,t[3]=r):r=t[3],r}function _R(e){const t=(0,S.c)(13);let n,r,a,o;t[0]!==e?(({className:r,sideOffset:o,children:n,...a}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o):(n=t[1],r=t[2],a=t[3],o=t[4]);const i=void 0===o?0:o;let s,l,c;return t[5]!==r?(s=Lp("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",r),t[5]=r,t[6]=s):s=t[6],t[7]===Symbol.for("react.memo_cache_sentinel")?(l=(0,Rc.jsx)(mR,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"}),t[7]=l):l=t[7],t[8]!==n||t[9]!==a||t[10]!==i||t[11]!==s?(c=(0,Rc.jsx)(hR,{children:(0,Rc.jsxs)(pR,{"data-slot":"tooltip-content",sideOffset:i,className:s,...a,children:[n,l]})}),t[8]=n,t[9]=a,t[10]=i,t[11]=s,t[12]=c):c=t[12],c}var DR=["TEXT_SHORT","TEXT_LONG","RICH_TEXT","EMAIL","URL","PHONE","SLUG","PASSWORD"],MR=["NUMBER","PERCENT","CURRENCY","RATING","SCORE"],LR=["SELECT","MULTI_SELECT","TAG_SELECT"],IR=["OBJECT","LIST","ARRAY","SECTION"],zR={TEXT_SHORT:{label:"Short Text",color:"text-blue-400",description:"Single-line string, up to ~255 chars"},TEXT_LONG:{label:"Long Text",color:"text-blue-400",description:"Multi-line plain text content"},RICH_TEXT:{label:"Rich Text",color:"text-blue-400",description:"HTML or markdown editor output"},EMAIL:{label:"Email",color:"text-blue-400",description:"Validated email address"},URL:{label:"URL",color:"text-blue-400",description:"Validated web address"},PHONE:{label:"Phone",color:"text-blue-400",description:"International phone number"},SLUG:{label:"Slug",color:"text-blue-400",description:"URL-safe identifier, e.g. my-post"},PASSWORD:{label:"Password",color:"text-blue-400",description:"Stored hashed, never returned"},NUMBER:{label:"Number",color:"text-emerald-400",description:"Integer or decimal value"},PERCENT:{label:"Percent",color:"text-emerald-400",description:"0–100 percentage value"},CURRENCY:{label:"Currency",color:"text-emerald-400",description:"Monetary amount in cents"},RATING:{label:"Rating",color:"text-emerald-400",description:"Star rating (default 1–5)"},SCORE:{label:"Score",color:"text-emerald-400",description:"Numeric score with min/max"},BOOLEAN:{label:"Boolean",color:"text-orange-400",description:"True / false toggle"},DATE:{label:"Date",color:"text-pink-400",description:"Calendar date, no time"},DATE_TIME:{label:"Date & Time",color:"text-pink-400",description:"ISO 8601 timestamp"},TIME:{label:"Time",color:"text-pink-400",description:"HH:MM time value"},COLOR:{label:"Color",color:"text-violet-400",description:"Hex or HSL color value"},IMAGE:{label:"Image",color:"text-violet-400",description:"Single uploaded image"},VIDEO:{label:"Video",color:"text-violet-400",description:"Video file or embed"},AUDIO:{label:"Audio",color:"text-violet-400",description:"Audio file"},FILE:{label:"File",color:"text-violet-400",description:"Generic file upload"},GALLERY:{label:"Gallery",color:"text-violet-400",description:"Ordered list of images"},OBJECT:{label:"Object",color:"text-amber-400",description:"Structured nested fields"},ARRAY:{label:"Array",color:"text-amber-400",description:"Ordered list of typed items"},LIST:{label:"List",color:"text-amber-400",description:"Arbitrary list of items"},SECTION:{label:"Section",color:"text-purple-400",description:"Visual grouping of fields"},SELECT:{label:"Select",color:"text-cyan-400",description:"Single choice from list"},MULTI_SELECT:{label:"Multi Select",color:"text-cyan-400",description:"Multiple choices from list"},TAG_SELECT:{label:"Tag Select",color:"text-cyan-400",description:"Freeform tag input"},REFERENCE:{label:"Reference",color:"text-cyan-400",description:"Link to another content type"},LOCATION:{label:"Location",color:"text-rose-400",description:"Geographic coordinates or address"},JSON:{label:"JSON",color:"text-gray-400",description:"Raw JSON blob"},CODE:{label:"Code",color:"text-gray-400",description:"Syntax-highlighted code editor"}};function FR(e){const t=(0,S.c)(2),{children:n}=e;let r;return t[0]!==n?(r=(0,Rc.jsx)("p",{className:"text-[9px] font-bold text-gray-600 uppercase tracking-[0.12em] mb-2 px-0.5",children:n}),t[0]=n,t[1]=r):r=t[1],r}function BR(e){const t=(0,S.c)(3),{text:n}=e;let r,a;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)(uf,{className:"h-3 w-3 text-gray-700 cursor-help hover:text-gray-500 transition-colors shrink-0"})}),t[0]=r):r=t[0],t[1]!==n?(a=(0,Rc.jsxs)(PR,{children:[r,(0,Rc.jsx)(_R,{side:"right",className:"max-w-52 text-[11px] leading-relaxed bg-[#1a1b22] border-white/10 text-gray-300",children:n})]}),t[1]=n,t[2]=a):a=t[2],a}function UR(e){const t=(0,S.c)(13),{label:n,hint:r,children:a,mono:o}=e,i=void 0!==o&&o&&"font-mono normal-case text-[10px]";let s,l,c,u,d;return t[0]!==i?(s=Lp("text-[10px] font-semibold text-gray-500 uppercase tracking-wider leading-none",i),t[0]=i,t[1]=s):s=t[1],t[2]!==n||t[3]!==s?(l=(0,Rc.jsx)(bR,{className:s,children:n}),t[2]=n,t[3]=s,t[4]=l):l=t[4],t[5]!==r?(c=r&&(0,Rc.jsx)(BR,{text:r}),t[5]=r,t[6]=c):c=t[6],t[7]!==l||t[8]!==c?(u=(0,Rc.jsxs)("div",{className:"flex items-center gap-1.5",children:[l,c]}),t[7]=l,t[8]=c,t[9]=u):u=t[9],t[10]!==a||t[11]!==u?(d=(0,Rc.jsxs)("div",{className:"space-y-1.5",children:[u,a]}),t[10]=a,t[11]=u,t[12]=d):d=t[12],d}function VR(e){const t=(0,S.c)(32),{label:n,description:r,checked:a,onChange:o,accent:i,disabled:s}=e,l=void 0===i?"indigo":i,c=void 0!==s&&s;let u,d,f,h,p,m,g,y,v;if(t[0]!==l||t[1]!==a||t[2]!==r||t[3]!==c||t[4]!==n||t[5]!==o){const e={indigo:"data-[state=checked]:bg-indigo-500",amber:"data-[state=checked]:bg-amber-500",emerald:"data-[state=checked]:bg-emerald-500",rose:"data-[state=checked]:bg-rose-500",blue:"data-[state=checked]:bg-blue-500"}[l],i=c&&"opacity-40 pointer-events-none";let s,y;t[13]!==i?(m=Lp("flex items-center justify-between gap-3 px-3 py-2.5",i),t[13]=i,t[14]=m):m=t[14],t[15]!==n?(s=(0,Rc.jsx)("p",{className:"text-[12px] font-medium text-gray-300 leading-tight",children:n}),t[15]=n,t[16]=s):s=t[16],t[17]!==r?(y=r&&(0,Rc.jsx)("p",{className:"text-[10px] text-gray-600 mt-0.5 leading-snug",children:r}),t[17]=r,t[18]=y):y=t[18],t[19]!==s||t[20]!==y?(g=(0,Rc.jsxs)("div",{className:"min-w-0 flex-1",children:[s,y]}),t[19]=s,t[20]=y,t[21]=g):g=t[21],u=xR,d=a,f=o,h=c,p=Lp("shrink-0",e),t[0]=l,t[1]=a,t[2]=r,t[3]=c,t[4]=n,t[5]=o,t[6]=u,t[7]=d,t[8]=f,t[9]=h,t[10]=p,t[11]=m,t[12]=g}else u=t[6],d=t[7],f=t[8],h=t[9],p=t[10],m=t[11],g=t[12];return t[22]!==u||t[23]!==d||t[24]!==f||t[25]!==h||t[26]!==p?(y=(0,Rc.jsx)(u,{checked:d,onCheckedChange:f,disabled:h,className:p}),t[22]=u,t[23]=d,t[24]=f,t[25]=h,t[26]=p,t[27]=y):y=t[27],t[28]!==m||t[29]!==g||t[30]!==y?(v=(0,Rc.jsxs)("div",{className:m,children:[g,y]}),t[28]=m,t[29]=g,t[30]=y,t[31]=v):v=t[31],v}function $R(e){const t=(0,S.c)(5),{children:n,className:r}=e;let a,o;return t[0]!==r?(a=Lp("rounded-xl border border-white/[0.07] bg-white/2.5 overflow-hidden divide-y divide-white/5",r),t[0]=r,t[1]=a):a=t[1],t[2]!==n||t[3]!==a?(o=(0,Rc.jsx)("div",{className:a,children:n}),t[2]=n,t[3]=a,t[4]=o):o=t[4],o}function HR(e){const t=(0,S.c)(16),{active:n,label:r,icon:a,onClick:o,badge:i}=e,s=n?"bg-indigo-500/12 text-white border border-indigo-500/20":"text-gray-500 hover:text-gray-300 hover:bg-white/4 border border-transparent";let l;t[0]!==s?(l=Lp("w-full flex items-center gap-2.5 px-3 py-2 rounded-lg text-left transition-all text-[12px] font-medium",s),t[0]=s,t[1]=l):l=t[1];const c=n?"text-indigo-400":"text-gray-700";let u,d,f,h;return t[2]!==a||t[3]!==c?(u=(0,Rc.jsx)("span",{className:c,children:a}),t[2]=a,t[3]=c,t[4]=u):u=t[4],t[5]!==r?(d=(0,Rc.jsx)("span",{className:"flex-1",children:r}),t[5]=r,t[6]=d):d=t[6],t[7]!==n||t[8]!==i?(f=void 0!==i&&i>0&&(0,Rc.jsx)("span",{className:Lp("text-[9px] font-bold px-1.5 py-0.5 rounded-full",n?"bg-indigo-500/20 text-indigo-300":"bg-white/6 text-gray-600"),children:i}),t[7]=n,t[8]=i,t[9]=f):f=t[9],t[10]!==o||t[11]!==l||t[12]!==u||t[13]!==d||t[14]!==f?(h=(0,Rc.jsxs)("button",{type:"button",onClick:o,className:l,children:[u,d,f]}),t[10]=o,t[11]=l,t[12]=u,t[13]=d,t[14]=f,t[15]=h):h=t[15],h}function qR(e){const t=(0,S.c)(220),{field:n,nodeId:r,parentFieldId:a}=e,{updateField:o,forceSync:i,schema:s,validateFieldName:l}=ab(),[c,u]=(0,k.useState)("identity"),[d,f]=(0,k.useState)(n.label),[h,p]=(0,k.useState)(n.name),[m,g]=(0,k.useState)(n.description||""),[y,v]=(0,k.useState)(n.placeholder||"");let b;t[0]!==n.defaultValue?(b=n.defaultValue?.toString()||"",t[0]=n.defaultValue,t[1]=b):b=t[1];const[x,w]=(0,k.useState)(b);let E;t[2]!==n.validation?(E=n.validation||{},t[2]=n.validation,t[3]=E):E=t[3];const[C,N]=(0,k.useState)(E);let j,T;t[4]!==n.options?(j=n.options||[],t[4]=n.options,t[5]=j):j=t[5],t[6]!==j?(T=j.map(GR),t[6]=j,t[7]=T):T=t[7];const[R,O]=(0,k.useState)(T),[P,A]=(0,k.useState)(""),[_,D]=(0,k.useState)(n.isLocalized||!1),[M,L]=(0,k.useState)(n.isHidden||!1),[I,z]=(0,k.useState)(n.uiOptions?.width||"full");let F;t[8]!==n.referenceTo?(F=n.referenceTo||[],t[8]=n.referenceTo,t[9]=F):F=t[9];const[B,U]=(0,k.useState)(F),[V,$]=(0,k.useState)("idle"),[H,q]=(0,k.useState)(""),[W,K]=(0,k.useState)(""),G=(0,k.useRef)(null),[Y,X]=(0,k.useState)(!1),Q=(0,k.useRef)(null),[J,Z]=(0,k.useState)(n);let ee,te,ne;n!==J&&(Z(n),f(n.label),p(n.name),g(n.description||""),v(n.placeholder||""),w(n.defaultValue?.toString()||""),N(n.validation||{}),O((n.options||[]).map(KR)),D(n.isLocalized||!1),L(n.isHidden||!1),z(n.uiOptions?.width||"full"),U(n.referenceTo||[]),$("idle"),q(""),K("")),t[10]===Symbol.for("react.memo_cache_sentinel")?(ee=()=>()=>{G.current&&clearTimeout(G.current)},te=[],t[10]=ee,t[11]=te):(ee=t[10],te=t[11]),(0,k.useEffect)(ee,te),t[12]!==n.type?(ne=DR.includes(n.type),t[12]=n.type,t[13]=ne):ne=t[13];const re=ne;let ae;t[14]!==n.type?(ae=MR.includes(n.type),t[14]=n.type,t[15]=ae):ae=t[15];const oe=ae;let ie;t[16]!==n.type?(ie=LR.includes(n.type),t[16]=n.type,t[17]=ie):ie=t[17];const se=ie,le="REFERENCE"===n.type;let ce;t[18]!==n.type?(ce=IR.includes(n.type),t[18]=n.type,t[19]=ce):ce=t[19];const ue=ce,de=void 0!==C.minLength,fe=void 0!==C.maxLength,he=void 0!==C.min,pe=void 0!==C.max;let me;t[20]!==de||t[21]!==fe||t[22]!==he||t[23]!==pe||t[24]!==C.pattern||t[25]!==C.required||t[26]!==C.unique?(me=[C.required,C.unique,de,fe,he,pe,C.pattern].filter(Boolean),t[20]=de,t[21]=fe,t[22]=he,t[23]=pe,t[24]=C.pattern,t[25]=C.required,t[26]=C.unique,t[27]=me):me=t[27];const ge=me.length;let ye,ve,be,xe,we,Se,ke,Ee,Ce,Ne,je;if(t[28]!==c||t[29]!==x||t[30]!==m||t[31]!==n||t[32]!==i||t[33]!==se||t[34]!==ue||t[35]!==M||t[36]!==_||t[37]!==oe||t[38]!==le||t[39]!==re||t[40]!==d||t[41]!==h||t[42]!==Y||t[43]!==H||t[44]!==V||t[45]!==W||t[46]!==P||t[47]!==r||t[48]!==R||t[49]!==a||t[50]!==y||t[51]!==B||t[52]!==s.collections||t[53]!==s.pages||t[54]!==I||t[55]!==o||t[56]!==l||t[57]!==C||t[58]!==ge){const e=[...s.pages||[],...s.collections||[]].map(WR);let b,S;if(t[67]!==c||t[68]!==x||t[69]!==m||t[70]!==n||t[71]!==i||t[72]!==se||t[73]!==ue||t[74]!==M||t[75]!==_||t[76]!==oe||t[77]!==le||t[78]!==re||t[79]!==d||t[80]!==h||t[81]!==Y||t[82]!==H||t[83]!==V||t[84]!==W||t[85]!==P||t[86]!==r||t[87]!==R||t[88]!==a||t[89]!==y||t[90]!==B||t[91]!==I||t[92]!==o||t[93]!==l||t[94]!==C||t[95]!==ge){const e=zR[n.type]??{label:n.type.replace(/_/g," "),color:"text-gray-400",description:""};let s,k,E;t[103]!==x||t[104]!==m||t[105]!==n.id||t[106]!==i||t[107]!==se||t[108]!==M||t[109]!==_||t[110]!==le||t[111]!==d||t[112]!==h||t[113]!==r||t[114]!==R||t[115]!==y||t[116]!==B||t[117]!==I||t[118]!==o||t[119]!==C?(s=e=>{o(r,n.id,{label:d,name:h,description:m||void 0,placeholder:y||void 0,defaultValue:x||void 0,validation:Object.keys(C).length>0?C:void 0,options:se?R:void 0,isLocalized:_,isHidden:M,uiOptions:{width:I},referenceTo:le?B:void 0,...e}),i()},t[103]=x,t[104]=m,t[105]=n.id,t[106]=i,t[107]=se,t[108]=M,t[109]=_,t[110]=le,t[111]=d,t[112]=h,t[113]=r,t[114]=R,t[115]=y,t[116]=B,t[117]=I,t[118]=o,t[119]=C,t[120]=s):s=t[120],S=s,t[121]!==S?(k=()=>S(),t[121]=S,t[122]=k):k=t[122],b=k,t[123]!==n.id||t[124]!==r||t[125]!==a||t[126]!==l?(E=e=>{const t=l(r,e,a,n.id);t.valid?($("valid"),q(""),K("")):($("error"),q(t.error||"Invalid identifier"),K(t.suggestion||""))},t[123]=n.id,t[124]=r,t[125]=a,t[126]=l,t[127]=E):E=t[127];const N=E;let j;t[128]!==N?(j=e=>{const t=e.target.value.replace(/[^a-zA-Z0-9_]/g,"_");p(t),$("idle"),G.current&&clearTimeout(G.current),G.current=setTimeout(()=>N(t),280)},t[128]=N,t[129]=j):j=t[129];const T=j;let D;t[130]!==n.id||t[131]!==n.name||t[132]!==h||t[133]!==r||t[134]!==a||t[135]!==S||t[136]!==l||t[137]!==N?(D=()=>{N(h),h!==n.name&&l(r,h,a,n.id).valid&&S({name:h})},t[130]=n.id,t[131]=n.name,t[132]=h,t[133]=r,t[134]=a,t[135]=S,t[136]=l,t[137]=N,t[138]=D):D=t[138];const L=D;let z;t[139]!==W||t[140]!==S?(z=()=>{W&&(p(W),$("valid"),q(""),K(""),S({name:W}))},t[139]=W,t[140]=S,t[141]=z):z=t[141];const F=z;let U;t[142]!==n.id||t[143]!==d||t[144]!==r||t[145]!==a||t[146]!==S||t[147]!==l?(U=()=>{const e=d.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"").slice(0,60);if(!e)return;const t=l(r,e,a,n.id),o=t.valid?e:t.suggestion||e;p(o),$("valid"),q(""),S({name:o})},t[142]=n.id,t[143]=d,t[144]=r,t[145]=a,t[146]=S,t[147]=l,t[148]=U):U=t[148];const J=U;let Z;t[149]!==h?(Z=()=>{navigator.clipboard.writeText(h),X(!0),setTimeout(()=>X(!1),1500)},t[149]=h,t[150]=Z):Z=t[150];const ee=Z;let te;t[151]!==P||t[152]!==R||t[153]!==S?(te=()=>{if(!P.trim())return;const e=[...R,P.trim()];O(e),A(""),setTimeout(()=>S({options:e}),0)},t[151]=P,t[152]=R,t[153]=S,t[154]=te):te=t[154];const ne=te;let ae;t[155]!==R||t[156]!==S?(ae=e=>{const t=R.filter((t,n)=>n!==e);O(t),setTimeout(()=>S({options:t}),0)},t[155]=R,t[156]=S,t[157]=ae):ae=t[157];const ie=ae;let ce;t[158]!==R?(ce=(e,t)=>{const n=[...R];n[e]=t,O(n)},t[158]=R,t[159]=ce):ce=t[159];const de=ce,fe={idle:"border-white/10 focus-visible:border-indigo-500/60",valid:"border-emerald-500/40 focus-visible:border-emerald-500/70",error:"border-red-500/40 focus-visible:border-red-500/60"}[V];ye=OR,ke="flex h-full min-h-0";const he="identity"===c;let pe,me,xe;t[160]===Symbol.for("react.memo_cache_sentinel")?(pe=(0,Rc.jsx)(sf,{className:"h-3.5 w-3.5"}),me=()=>u("identity"),t[160]=pe,t[161]=me):(pe=t[160],me=t[161]),t[162]!==he?(xe=(0,Rc.jsx)(HR,{active:he,label:"Identity",icon:pe,onClick:me}),t[162]=he,t[163]=xe):xe=t[163];const we="validation"===c;let Se,Ce,Ne;t[164]===Symbol.for("react.memo_cache_sentinel")?(Se=(0,Rc.jsx)(Df,{className:"h-3.5 w-3.5"}),Ce=()=>u("validation"),t[164]=Se,t[165]=Ce):(Se=t[164],Ce=t[165]),t[166]!==we||t[167]!==ge?(Ne=(0,Rc.jsx)(HR,{active:we,label:"Validation",icon:Se,onClick:Ce,badge:ge}),t[166]=we,t[167]=ge,t[168]=Ne):Ne=t[168];const je="presentation"===c;let Te,Re,Oe;t[169]===Symbol.for("react.memo_cache_sentinel")?(Te=(0,Rc.jsx)(Dd,{className:"h-3.5 w-3.5"}),Re=()=>u("presentation"),t[169]=Te,t[170]=Re):(Te=t[169],Re=t[170]),t[171]!==je?(Oe=(0,Rc.jsx)(HR,{active:je,label:"Display",icon:Te,onClick:Re}),t[171]=je,t[172]=Oe):Oe=t[172];const Pe="advanced"===c;let Ae,_e,De,Me;t[173]===Symbol.for("react.memo_cache_sentinel")?(Ae=(0,Rc.jsx)(xd,{className:"h-3.5 w-3.5"}),_e=()=>u("advanced"),t[173]=Ae,t[174]=_e):(Ae=t[173],_e=t[174]),t[175]!==Pe?(De=(0,Rc.jsx)(HR,{active:Pe,label:"Advanced",icon:Ae,onClick:_e}),t[175]=Pe,t[176]=De):De=t[176],t[177]===Symbol.for("react.memo_cache_sentinel")?(Me=(0,Rc.jsx)("p",{className:"text-[9px] font-bold text-gray-700 uppercase tracking-widest",children:"Type"}),t[177]=Me):Me=t[177];const Le=Lp("text-[11px] font-semibold leading-tight",e.color);let Ie,ze,Fe;t[178]!==Le||t[179]!==e?(Ie=(0,Rc.jsx)("p",{className:Le,children:e.label}),t[178]=Le,t[179]=e,t[180]=Ie):Ie=t[180],t[181]!==e?(ze=e.description&&(0,Rc.jsx)("p",{className:"text-[9px] text-gray-700 leading-snug",children:e.description}),t[181]=e,t[182]=ze):ze=t[182],t[183]!==Ie||t[184]!==ze?(Fe=(0,Rc.jsx)("div",{className:"mt-auto pt-3 px-1",children:(0,Rc.jsxs)("div",{className:"rounded-lg border border-white/6 bg-white/2 p-2 space-y-1",children:[Me,Ie,ze]})}),t[183]=Ie,t[184]=ze,t[185]=Fe):Fe=t[185],t[186]!==xe||t[187]!==Ne||t[188]!==Oe||t[189]!==De||t[190]!==Fe?(Ee=(0,Rc.jsxs)("div",{className:"w-36 shrink-0 border-r border-white/6 flex flex-col py-3 px-2 gap-0.5 bg-black/20",children:[xe,Ne,Oe,De,Fe]}),t[186]=xe,t[187]=Ne,t[188]=Oe,t[189]=De,t[190]=Fe,t[191]=Ee):Ee=t[191],ve="flex-1 overflow-y-auto min-h-0",be="identity"===c&&(0,Rc.jsxs)("div",{className:"p-4 space-y-5",children:[(0,Rc.jsx)(UR,{label:"Display label",hint:"The human-readable name shown in the editor UI and API docs.",children:(0,Rc.jsx)(vR,{ref:Q,value:d,onChange:e=>f(e.target.value),onBlur:b,placeholder:"e.g. Full Name",className:"bg-black/50 border-white/10 text-[13px] text-white focus-visible:ring-0 focus-visible:border-indigo-500/60"})}),(0,Rc.jsx)(UR,{label:"API identifier",hint:"The machine name used in API responses and generated TypeScript types. Must be unique within this level.",children:(0,Rc.jsxs)("div",{className:"space-y-2",children:[(0,Rc.jsxs)("div",{className:"relative group/nameinput",children:[(0,Rc.jsx)(vR,{value:h,onChange:T,onBlur:L,placeholder:"e.g. full_name",spellCheck:!1,className:Lp("font-mono text-[13px] bg-black/50 text-indigo-300/90 pr-20 transition-all focus-visible:ring-0",fe)}),(0,Rc.jsxs)("div",{className:"absolute right-1 top-1/2 -translate-y-1/2 flex items-center gap-0.5 opacity-0 group-hover/nameinput:opacity-100 focus-within:opacity-100 transition-opacity",children:["valid"===V&&(0,Rc.jsx)(Fd,{className:"h-3.5 w-3.5 text-emerald-400 mr-0.5"}),"error"===V&&(0,Rc.jsx)(vd,{className:"h-3.5 w-3.5 text-red-400 mr-0.5"}),(0,Rc.jsxs)(PR,{children:[(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)("button",{type:"button",onClick:J,className:"p-1.5 rounded hover:bg-white/8 text-gray-600 hover:text-indigo-400 transition-colors",children:(0,Rc.jsx)(Rd,{className:"h-3 w-3"})})}),(0,Rc.jsx)(_R,{side:"top",className:"text-xs",children:"Generate from label"})]}),(0,Rc.jsxs)(PR,{children:[(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)("button",{type:"button",onClick:ee,className:"p-1.5 rounded hover:bg-white/8 text-gray-600 hover:text-gray-300 transition-colors",children:Y?(0,Rc.jsx)(Fd,{className:"h-3 w-3 text-emerald-400"}):(0,Rc.jsx)(Wd,{className:"h-3 w-3"})})}),(0,Rc.jsx)(_R,{side:"top",className:"text-xs",children:Y?"Copied!":"Copy identifier"})]})]})]}),"error"===V&&(0,Rc.jsxs)("div",{className:"rounded-lg border border-red-500/15 bg-red-950/30 px-3 py-2.5 space-y-2",children:[(0,Rc.jsxs)("div",{className:"flex items-start gap-2",children:[(0,Rc.jsx)(vd,{className:"h-3.5 w-3.5 text-red-400 mt-0.5 shrink-0"}),(0,Rc.jsx)("p",{className:"text-[11px] text-red-400 leading-snug",children:H})]}),W&&(0,Rc.jsxs)("button",{type:"button",onClick:F,className:"flex items-center gap-1.5 text-[11px] text-indigo-400 hover:text-indigo-300 transition-colors",children:[(0,Rc.jsx)(Rd,{className:"h-3 w-3"}),"Use"," ",(0,Rc.jsx)("code",{className:"font-mono bg-indigo-500/12 border border-indigo-500/20 px-1.5 py-0.5 rounded-md text-[10px]",children:W})]})]}),(0,Rc.jsxs)("div",{className:"flex items-center gap-2 rounded-md bg-black/40 border border-white/5 px-2.5 py-1.5",children:[(0,Rc.jsx)("span",{className:"text-[10px] text-gray-700 font-mono shrink-0",children:"Response key:"}),(0,Rc.jsxs)("code",{className:"text-[11px] text-indigo-400/80 font-mono truncate",children:[".",h||"field_name"]})]})]})}),(0,Rc.jsx)(UR,{label:"Help text",hint:"Shown below the field in the content editor. Use this to guide editors.",children:(0,Rc.jsx)(vR,{value:m,onChange:e=>g(e.target.value),onBlur:b,placeholder:"Instructions for content editors…",className:"bg-black/50 border-white/10 text-[13px] focus-visible:ring-0 focus-visible:border-indigo-500/60"})}),(re||oe)&&(0,Rc.jsx)(UR,{label:"Placeholder",hint:"Ghost text shown inside the input when empty.",children:(0,Rc.jsx)(vR,{value:y,onChange:e=>v(e.target.value),onBlur:b,placeholder:"e.g. Enter a value…",className:"bg-black/50 border-white/10 text-[13px] focus-visible:ring-0 focus-visible:border-indigo-500/60"})}),!ue&&(0,Rc.jsx)(UR,{label:"Default value",hint:"Pre-filled when a new entry is created. Can be overridden by editors.",children:"BOOLEAN"===n.type?(0,Rc.jsxs)(wR,{value:x,onValueChange:e=>{w(e),setTimeout(()=>S({defaultValue:e||void 0}),0)},children:[(0,Rc.jsx)(kR,{className:"bg-black/50 border-white/10 text-[13px]",children:(0,Rc.jsx)(SR,{placeholder:"No default"})}),(0,Rc.jsxs)(ER,{className:"bg-[#0d0e14] border-white/10",children:[(0,Rc.jsx)(CR,{value:"",children:"No default"}),(0,Rc.jsx)(CR,{value:"true",children:"True"}),(0,Rc.jsx)(CR,{value:"false",children:"False"})]})]}):(0,Rc.jsx)(vR,{value:x,onChange:e=>w(e.target.value),onBlur:b,placeholder:"Optional…",className:"bg-black/50 border-white/10 text-[13px] focus-visible:ring-0 focus-visible:border-indigo-500/60"})}),se&&(0,Rc.jsxs)("div",{className:"space-y-2",children:[(0,Rc.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rc.jsx)(FR,{children:"Options"}),(0,Rc.jsx)(RR,{variant:"outline",className:"text-[9px] border-white/10 text-gray-600 font-mono",children:R.length})]}),(0,Rc.jsxs)("div",{className:"space-y-1.5",children:[0===R.length?(0,Rc.jsxs)("div",{className:"rounded-lg border border-dashed border-white/8 py-5 text-center",children:[(0,Rc.jsx)("p",{className:"text-[11px] text-gray-600",children:"No options yet"}),(0,Rc.jsx)("p",{className:"text-[10px] text-gray-700 mt-0.5",children:"Add options below"})]}):R.map((e,t)=>(0,Rc.jsxs)("div",{className:"group/opt flex items-center gap-1.5",children:[(0,Rc.jsx)("div",{className:"text-gray-700 cursor-grab shrink-0",children:(0,Rc.jsx)(of,{className:"h-3.5 w-3.5"})}),(0,Rc.jsx)(vR,{value:e,onChange:e=>de(t,e.target.value),onBlur:b,className:"flex-1 h-8 bg-black/50 border-white/10 text-[12px] focus-visible:ring-0 focus-visible:border-indigo-500/60"}),(0,Rc.jsx)("button",{type:"button",onClick:()=>ie(t),className:"shrink-0 p-1.5 rounded text-gray-700 hover:text-red-400 opacity-0 group-hover/opt:opacity-100 transition-all hover:bg-red-500/8",children:(0,Rc.jsx)(Ff,{className:"h-3 w-3"})})]},t)),(0,Rc.jsxs)("div",{className:"flex gap-1.5 pt-0.5",children:[(0,Rc.jsx)(vR,{value:P,onChange:e=>A(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),ne())},placeholder:"Add an option…",className:"flex-1 h-8 bg-black/50 border-white/10 text-[12px] focus-visible:ring-0 focus-visible:border-indigo-500/60"}),(0,Rc.jsx)(yR,{type:"button",onClick:ne,disabled:!P.trim(),size:"sm",className:"h-8 px-2.5 bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 hover:bg-indigo-500/18 disabled:opacity-30",children:(0,Rc.jsx)(Nf,{className:"h-3.5 w-3.5"})})]})]})]})]}),t[67]=c,t[68]=x,t[69]=m,t[70]=n,t[71]=i,t[72]=se,t[73]=ue,t[74]=M,t[75]=_,t[76]=oe,t[77]=le,t[78]=re,t[79]=d,t[80]=h,t[81]=Y,t[82]=H,t[83]=V,t[84]=W,t[85]=P,t[86]=r,t[87]=R,t[88]=a,t[89]=y,t[90]=B,t[91]=I,t[92]=o,t[93]=l,t[94]=C,t[95]=ge,t[96]=ye,t[97]=b,t[98]=S,t[99]=ve,t[100]=be,t[101]=ke,t[102]=Ee}else ye=t[96],b=t[97],S=t[98],ve=t[99],be=t[100],ke=t[101],Ee=t[102];t[192]!==c||t[193]!==n.type||t[194]!==b||t[195]!==ue||t[196]!==oe||t[197]!==re||t[198]!==S||t[199]!==C||t[200]!==ge?(xe="validation"===c&&(0,Rc.jsxs)("div",{className:"p-4 space-y-5",children:[(0,Rc.jsxs)("div",{className:"space-y-1",children:[(0,Rc.jsx)(FR,{children:"Constraints"}),(0,Rc.jsxs)($R,{children:[(0,Rc.jsx)(VR,{label:"Required",description:"Block save when this field is empty",checked:C.required||!1,onChange:e=>{const t={...C,required:e};N(t),setTimeout(()=>S({validation:t}),0)},accent:"amber"}),(0,Rc.jsx)(VR,{label:"Unique",description:"Reject duplicate values across all entries",checked:C.unique||!1,onChange:e=>{const t={...C,unique:e};N(t),setTimeout(()=>S({validation:t}),0)},accent:"indigo",disabled:"BOOLEAN"===n.type||ue})]})]}),re&&(0,Rc.jsxs)("div",{className:"space-y-2",children:[(0,Rc.jsx)(FR,{children:"Length"}),(0,Rc.jsx)("div",{className:"grid grid-cols-2 gap-2",children:[{key:"minLength",label:"Min chars"},{key:"maxLength",label:"Max chars"}].map(e=>{const{key:t,label:n}=e;return(0,Rc.jsx)(UR,{label:n,children:(0,Rc.jsx)(vR,{type:"number",value:C[t]??"",onChange:e=>N({...C,[t]:parseInt(e.target.value)||void 0}),onBlur:b,min:"0",placeholder:"—",className:"bg-black/50 border-white/10 text-[13px] h-8 focus-visible:ring-0 focus-visible:border-indigo-500/60"})},t)})}),(void 0!==C.minLength||void 0!==C.maxLength)&&(0,Rc.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-md bg-black/30 border border-white/5",children:[(0,Rc.jsx)("span",{className:"text-[10px] text-gray-600",children:"Range:"}),(0,Rc.jsxs)("code",{className:"text-[10px] text-indigo-400/80 font-mono",children:[C.minLength??0," – ",C.maxLength??"∞"," chars"]})]})]}),oe&&(0,Rc.jsxs)("div",{className:"space-y-2",children:[(0,Rc.jsx)(FR,{children:"Range"}),(0,Rc.jsx)("div",{className:"grid grid-cols-2 gap-2",children:[{key:"min",label:"Min"},{key:"max",label:"Max"}].map(e=>{const{key:t,label:n}=e;return(0,Rc.jsx)(UR,{label:n,children:(0,Rc.jsx)(vR,{type:"number",value:C[t]??"",onChange:e=>N({...C,[t]:parseFloat(e.target.value)||void 0}),onBlur:b,step:"any",placeholder:"—",className:"bg-black/50 border-white/10 text-[13px] h-8 focus-visible:ring-0 focus-visible:border-indigo-500/60"})},t)})})]}),re&&(0,Rc.jsxs)(UR,{label:"Pattern",hint:"A regular expression the value must match. Leave empty to skip pattern validation.",children:[(0,Rc.jsxs)("div",{className:"relative",children:[(0,Rc.jsx)("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-700 text-[12px] font-mono pointer-events-none select-none",children:"/"}),(0,Rc.jsx)(vR,{value:C.pattern||"",onChange:e=>N({...C,pattern:e.target.value||void 0}),onBlur:b,placeholder:"^[A-Za-z]+$",spellCheck:!1,className:"bg-black/50 border-white/10 text-[13px] font-mono pl-6 pr-6 focus-visible:ring-0 focus-visible:border-indigo-500/60"}),(0,Rc.jsx)("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-700 text-[12px] font-mono pointer-events-none select-none",children:"/"})]}),C.pattern&&(0,Rc.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-md bg-black/30 border border-white/5 mt-1.5",children:[(0,Rc.jsx)("span",{className:"text-[10px] text-gray-600 font-mono shrink-0",children:"test:"}),(0,Rc.jsxs)("code",{className:"text-[10px] text-indigo-400/80 font-mono truncate",children:["new RegExp(",JSON.stringify(C.pattern),").test(value)"]})]})]}),0===ge&&(0,Rc.jsxs)("div",{className:"rounded-xl border border-dashed border-white/8 py-6 text-center",children:[(0,Rc.jsx)("p",{className:"text-[11px] text-gray-600",children:"No validation rules set"}),(0,Rc.jsx)("p",{className:"text-[10px] text-gray-700 mt-0.5",children:"Anything will be accepted"})]})]}),t[192]=c,t[193]=n.type,t[194]=b,t[195]=ue,t[196]=oe,t[197]=re,t[198]=S,t[199]=C,t[200]=ge,t[201]=xe):xe=t[201],t[202]!==c||t[203]!==M||t[204]!==S||t[205]!==I?(we="presentation"===c&&(0,Rc.jsxs)("div",{className:"p-4 space-y-5",children:[(0,Rc.jsxs)("div",{className:"space-y-2",children:[(0,Rc.jsx)(FR,{children:"Editor width"}),(0,Rc.jsx)("div",{className:"grid grid-cols-3 gap-1.5",children:["full","half","third"].map(e=>{const t={full:{label:"Full",pct:"100%",bars:3},half:{label:"Half",pct:"50%",bars:2},third:{label:"Third",pct:"33%",bars:1}}[e];return(0,Rc.jsxs)("button",{type:"button",onClick:()=>{z(e),setTimeout(()=>S({uiOptions:{width:e}}),0)},className:Lp("flex flex-col items-center gap-1.5 py-3 px-2 rounded-xl border transition-all",I===e?"bg-indigo-500/10 border-indigo-500/25 text-indigo-300":"bg-white/2 border-white/6 text-gray-500 hover:border-white/10 hover:text-gray-400"),children:[(0,Rc.jsx)("div",{className:"flex gap-0.5 w-full justify-center",children:Array.from({length:3}).map((n,r)=>(0,Rc.jsx)("div",{className:Lp("h-1 rounded-full transition-all",r<t.bars?I===e?"bg-indigo-400":"bg-gray-600":"bg-white/8"),style:{flex:r<t.bars?1:"0 0 8px"}},r))}),(0,Rc.jsx)("span",{className:"text-[10px] font-semibold",children:t.pct})]},e)})})]}),(0,Rc.jsxs)("div",{className:"space-y-1",children:[(0,Rc.jsx)(FR,{children:"Visibility"}),(0,Rc.jsx)($R,{children:(0,Rc.jsx)(VR,{label:"Hide in API",description:"Field exists but won't appear in responses",checked:M,onChange:e=>{L(e),setTimeout(()=>S({isHidden:e}),0)},accent:"rose"})}),M&&(0,Rc.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-md bg-rose-950/30 border border-rose-500/15 mt-1.5",children:[(0,Rc.jsx)(Qd,{className:"h-3 w-3 text-rose-400 shrink-0"}),(0,Rc.jsx)("p",{className:"text-[10px] text-rose-400/80",children:"Hidden — omitted from all API responses"})]}),!M&&(0,Rc.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-md bg-black/20 border border-white/5 mt-1.5",children:[(0,Rc.jsx)(Jd,{className:"h-3 w-3 text-gray-600 shrink-0"}),(0,Rc.jsx)("p",{className:"text-[10px] text-gray-600",children:"Visible — included in API responses"})]})]})]}),t[202]=c,t[203]=M,t[204]=S,t[205]=I,t[206]=we):we=t[206],Se="advanced"===c&&(0,Rc.jsxs)("div",{className:"p-4 space-y-5",children:[(0,Rc.jsxs)("div",{className:"space-y-1",children:[(0,Rc.jsx)(FR,{children:"Internationalization"}),(0,Rc.jsx)($R,{children:(0,Rc.jsx)(VR,{label:"Localize this field",description:"Store a separate value per locale",checked:_,onChange:e=>{D(e),setTimeout(()=>S({isLocalized:e}),0)},accent:"blue"})}),_&&(0,Rc.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-md bg-blue-950/30 border border-blue-500/15 mt-1.5",children:[(0,Rc.jsx)(af,{className:"h-3 w-3 text-blue-400 shrink-0"}),(0,Rc.jsx)("p",{className:"text-[10px] text-blue-400/80",children:"Localized — per-locale value stored"})]})]}),le&&(0,Rc.jsxs)("div",{className:"space-y-2",children:[(0,Rc.jsx)(FR,{children:"Allowed types"}),0===e.length?(0,Rc.jsxs)("div",{className:"rounded-xl border border-dashed border-white/8 py-6 text-center",children:[(0,Rc.jsx)("p",{className:"text-[11px] text-gray-600",children:"No content types yet"}),(0,Rc.jsx)("p",{className:"text-[10px] text-gray-700 mt-0.5",children:"Create pages or collections first"})]}):(0,Rc.jsx)("div",{className:"space-y-1.5",children:e.map(e=>{const{apiKey:t,name:n,type:r}=e,a=B.includes(t);return(0,Rc.jsxs)("button",{type:"button",onClick:()=>{const e=a?B.filter(e=>e!==t):[...B,t];U(e),setTimeout(()=>S({referenceTo:e}),0)},className:Lp("w-full flex items-center gap-3 px-3 py-2.5 rounded-xl border text-left transition-all",a?"bg-indigo-500/8 border-indigo-500/25":"bg-white/2 border-white/6 hover:border-white/10"),children:[(0,Rc.jsx)("div",{className:Lp("h-2 w-2 rounded-full shrink-0","SINGLETON"===r?"bg-cyan-400":"bg-violet-400")}),(0,Rc.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Rc.jsx)("p",{className:Lp("text-[12px] font-medium leading-tight",a?"text-white":"text-gray-400"),children:n}),(0,Rc.jsx)("p",{className:"text-[10px] font-mono text-gray-600 mt-0.5",children:t})]}),(0,Rc.jsx)("div",{className:Lp("h-4 w-4 rounded border-2 flex items-center justify-center shrink-0 transition-all",a?"bg-indigo-500 border-indigo-500":"border-white/20"),children:a&&(0,Rc.jsx)(Fd,{className:"h-2.5 w-2.5 text-white"})})]},t)})}),0===B.length&&e.length>0&&(0,Rc.jsx)("p",{className:"text-[10px] text-gray-600 px-0.5",children:"No types selected — any reference is allowed"})]}),(0,Rc.jsxs)("div",{className:"space-y-1",children:[(0,Rc.jsx)(FR,{children:"Internal ID"}),(0,Rc.jsxs)("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(n.id)},className:"w-full flex items-center gap-2 px-3 py-2 rounded-lg bg-black/40 border border-white/5 hover:border-white/10 transition-colors group/id",children:[(0,Rc.jsx)("code",{className:"text-[10px] font-mono text-gray-600 group-hover/id:text-gray-400 flex-1 text-left truncate transition-colors",children:n.id}),(0,Rc.jsx)(Wd,{className:"h-3 w-3 text-gray-700 shrink-0 group-hover/id:text-gray-500 transition-colors"})]}),(0,Rc.jsx)("p",{className:"text-[9px] text-gray-700 px-0.5",children:"Stable across renames — safe to use as a database key"})]})]}),t[28]=c,t[29]=x,t[30]=m,t[31]=n,t[32]=i,t[33]=se,t[34]=ue,t[35]=M,t[36]=_,t[37]=oe,t[38]=le,t[39]=re,t[40]=d,t[41]=h,t[42]=Y,t[43]=H,t[44]=V,t[45]=W,t[46]=P,t[47]=r,t[48]=R,t[49]=a,t[50]=y,t[51]=B,t[52]=s.collections,t[53]=s.pages,t[54]=I,t[55]=o,t[56]=l,t[57]=C,t[58]=ge,t[59]=ye,t[60]=ve,t[61]=be,t[62]=xe,t[63]=we,t[64]=Se,t[65]=ke,t[66]=Ee}else ye=t[59],ve=t[60],be=t[61],xe=t[62],we=t[63],Se=t[64],ke=t[65],Ee=t[66];return t[207]!==ve||t[208]!==be||t[209]!==xe||t[210]!==we||t[211]!==Se?(Ce=(0,Rc.jsxs)("div",{className:ve,children:[be,xe,we,Se]}),t[207]=ve,t[208]=be,t[209]=xe,t[210]=we,t[211]=Se,t[212]=Ce):Ce=t[212],t[213]!==ke||t[214]!==Ee||t[215]!==Ce?(Ne=(0,Rc.jsxs)("div",{className:ke,children:[Ee,Ce]}),t[213]=ke,t[214]=Ee,t[215]=Ce,t[216]=Ne):Ne=t[216],t[217]!==ye||t[218]!==Ne?(je=(0,Rc.jsx)(ye,{children:Ne}),t[217]=ye,t[218]=Ne,t[219]=je):je=t[219],je}function WR(e){return{apiKey:e.apiKey,name:e.name,type:e.type}}function KR(e){return"string"==typeof e?e:e.value}function GR(e){return"string"==typeof e?e:e.value}function YR(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,Rc.jsx)(GC,{"data-slot":"dropdown-menu",...n}),t[2]=n,t[3]=r):r=t[3],r}function XR(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,Rc.jsx)(YC,{"data-slot":"dropdown-menu-trigger",...n}),t[2]=n,t[3]=r):r=t[3],r}function QR(e){const t=(0,S.c)(12);let n,r,a,o;t[0]!==e?(({className:n,align:a,sideOffset:o,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o):(n=t[1],r=t[2],a=t[3],o=t[4]);const i=void 0===a?"start":a,s=void 0===o?4:o;let l,c;return t[5]!==n?(l=Lp("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 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 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),t[5]=n,t[6]=l):l=t[6],t[7]!==i||t[8]!==r||t[9]!==s||t[10]!==l?(c=(0,Rc.jsx)(XC,{children:(0,Rc.jsx)(QC,{"data-slot":"dropdown-menu-content",sideOffset:s,align:i,className:l,...r})}),t[7]=i,t[8]=r,t[9]=s,t[10]=l,t[11]=c):c=t[11],c}function JR(e){const t=(0,S.c)(12);let n,r,a,o;t[0]!==e?(({className:n,inset:r,variant:o,...a}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o):(n=t[1],r=t[2],a=t[3],o=t[4]);const i=void 0===o?"default":o;let s,l;return t[5]!==n?(s=Lp("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",n),t[5]=n,t[6]=s):s=t[6],t[7]!==r||t[8]!==a||t[9]!==s||t[10]!==i?(l=(0,Rc.jsx)(JC,{"data-slot":"dropdown-menu-item","data-inset":r,"data-variant":i,className:s,...a}),t[7]=r,t[8]=a,t[9]=s,t[10]=i,t[11]=l):l=t[11],l}function ZR(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,Rc.jsx)(gw,{"data-slot":"sheet",...n}),t[2]=n,t[3]=r):r=t[3],r}function eO(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,Rc.jsx)(ww,{"data-slot":"sheet-portal",...n}),t[2]=n,t[3]=r):r=t[3],r}function tO(e){const t=(0,S.c)(8);let n,r,a,o;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(a=Lp("fixed inset-0 z-50 backdrop-brightness-80 backdrop-grayscale-90 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",n),t[3]=n,t[4]=a):a=t[4],t[5]!==r||t[6]!==a?(o=(0,Rc.jsx)(kw,{"data-slot":"sheet-overlay",className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function nO(e){const t=(0,S.c)(17);let n,r,a,o,i;t[0]!==e?(({className:r,children:n,side:o,showCloseButton:i,...a}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=i):(n=t[1],r=t[2],a=t[3],o=t[4],i=t[5]);const s=void 0===o?"right":o,l=void 0===i||i;let c,u,d,f;return t[6]===Symbol.for("react.memo_cache_sentinel")?(c=(0,Rc.jsx)(tO,{}),t[6]=c):c=t[6],t[7]!==r?(u=Lp("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",r),t[7]=r,t[8]=u):u=t[8],t[9]!==l?(d=l&&(0,Rc.jsx)(Lw,{"data-slot":"sheet-close",asChild:!0,children:(0,Rc.jsxs)(yR,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm",children:[(0,Rc.jsx)(Wf,{}),(0,Rc.jsx)("span",{className:"sr-only",children:"Close"})]})}),t[9]=l,t[10]=d):d=t[10],t[11]!==n||t[12]!==a||t[13]!==s||t[14]!==u||t[15]!==d?(f=(0,Rc.jsxs)(eO,{children:[c,(0,Rc.jsxs)(jw,{"data-slot":"sheet-content","data-side":s,className:u,...a,children:[n,d]})]}),t[11]=n,t[12]=a,t[13]=s,t[14]=u,t[15]=d,t[16]=f):f=t[16],f}function rO(e){const t=(0,S.c)(8);let n,r,a,o;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(a=Lp("flex flex-col gap-0.5 p-4",n),t[3]=n,t[4]=a):a=t[4],t[5]!==r||t[6]!==a?(o=(0,Rc.jsx)("div",{"data-slot":"sheet-header",className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function aO(e){const t=(0,S.c)(8);let n,r,a,o;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(a=Lp("font-heading text-base font-medium text-foreground",n),t[3]=n,t[4]=a):a=t[4],t[5]!==r||t[6]!==a?(o=(0,Rc.jsx)(Aw,{"data-slot":"sheet-title",className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function oO(e){const t=(0,S.c)(8);let n,r,a,o;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(a=Lp("text-sm text-muted-foreground",n),t[3]=n,t[4]=a):a=t[4],t[5]!==r||t[6]!==a?(o=(0,Rc.jsx)(Dw,{"data-slot":"sheet-description",className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}var iO={TEXT_SHORT:Vf,TEXT_LONG:Od,RICH_TEXT:lf,NUMBER:sf,BOOLEAN:zf,DATE:zd,DATE_TIME:$d,COLOR:Sf,IMAGE:cf,VIDEO:qf,AUDIO:wf,FILE:ef,URL:pf,EMAIL:vf,PHONE:Ef,SLUG:pf,LOCATION:bf,OBJECT:nf,LIST:gf,ARRAY:gf,SECTION:Cd,REFERENCE:pf,GALLERY:Ed,KEY_VALUE:ff,RATING:Mf,PERCENT:kf,CURRENCY:Gd,ICON:_f,PASSWORD:yf},sO={TEXT_SHORT:"text-blue-400 bg-blue-500/10",TEXT_LONG:"text-blue-400 bg-blue-500/10",RICH_TEXT:"text-blue-400 bg-blue-500/10",NUMBER:"text-emerald-400 bg-emerald-500/10",PERCENT:"text-emerald-400 bg-emerald-500/10",CURRENCY:"text-emerald-400 bg-emerald-500/10",RATING:"text-emerald-400 bg-emerald-500/10",BOOLEAN:"text-orange-400 bg-orange-500/10",DATE:"text-pink-400 bg-pink-500/10",DATE_TIME:"text-pink-400 bg-pink-500/10",IMAGE:"text-violet-400 bg-violet-500/10",VIDEO:"text-violet-400 bg-violet-500/10",AUDIO:"text-violet-400 bg-violet-500/10",FILE:"text-violet-400 bg-violet-500/10",GALLERY:"text-violet-400 bg-violet-500/10",OBJECT:"text-amber-400 bg-amber-500/10",LIST:"text-amber-400 bg-amber-500/10",ARRAY:"text-amber-400 bg-amber-500/10",SECTION:"text-purple-400 bg-purple-500/10",REFERENCE:"text-cyan-400 bg-cyan-500/10",LOCATION:"text-rose-400 bg-rose-500/10"},lO=e=>sO[e]??"text-gray-400 bg-white/[0.06]",cO=new Set(["OBJECT","LIST","ARRAY","SECTION"]),uO=[{type:"TEXT_SHORT",label:"Short Text",group:"Text"},{type:"TEXT_LONG",label:"Long Text",group:"Text"},{type:"RICH_TEXT",label:"Rich Text",group:"Text"},{type:"SLUG",label:"Slug",group:"Text"},{type:"EMAIL",label:"Email",group:"Text"},{type:"PHONE",label:"Phone",group:"Text"},{type:"URL",label:"URL",group:"Text"},{type:"PASSWORD",label:"Password",group:"Text"},{type:"NUMBER",label:"Number",group:"Number"},{type:"PERCENT",label:"Percent",group:"Number"},{type:"CURRENCY",label:"Currency",group:"Number"},{type:"RATING",label:"Rating",group:"Number"},{type:"BOOLEAN",label:"Boolean",group:"Toggle"},{type:"DATE",label:"Date",group:"Date"},{type:"DATE_TIME",label:"Date & Time",group:"Date"},{type:"IMAGE",label:"Image",group:"Media"},{type:"VIDEO",label:"Video",group:"Media"},{type:"AUDIO",label:"Audio",group:"Media"},{type:"FILE",label:"File",group:"Media"},{type:"GALLERY",label:"Gallery",group:"Media"},{type:"COLOR",label:"Color",group:"Design"},{type:"ICON",label:"Icon",group:"Design"},{type:"SELECT",label:"Select",group:"Choice"},{type:"MULTI_SELECT",label:"Multi Select",group:"Choice"},{type:"REFERENCE",label:"Reference",group:"Relation"},{type:"OBJECT",label:"Object",group:"Structure"},{type:"LIST",label:"List",group:"Structure"},{type:"ARRAY",label:"Array",group:"Structure"},{type:"KEY_VALUE",label:"Key-Value",group:"Structure"},{type:"LOCATION",label:"Location",group:"Geo"},{type:"JSON",label:"JSON",group:"Advanced"},{type:"CODE",label:"Code",group:"Advanced"}];function dO(e){const t=(0,S.c)(187),{field:n,nodeId:r,depth:a,onSelect:o,isSelected:i}=e,s=void 0===a?0:a,l=void 0!==i&&i,{deleteField:c,updateField:u,addField:d}=ab(),[f,h]=(0,k.useState)(!1),[p,m]=(0,k.useState)(!0),[g,y]=(0,k.useState)(!1),[v,b]=(0,k.useState)(n.label),[x,w]=(0,k.useState)(!1),E=s>0;let C;t[0]!==n.id||t[1]!==E?(C={id:n.id,disabled:E},t[0]=n.id,t[1]=E,t[2]=C):C=t[2];const{attributes:N,listeners:j,setNodeRef:T,transform:R,transition:O,isDragging:P}=dn(C);let A;t[3]!==R?(A=q.Transform.toString(R),t[3]=R,t[4]=A):A=t[4];const _=16*s;let D;t[5]!==A||t[6]!==_||t[7]!==O?(D={transform:A,transition:O,marginLeft:_},t[5]=A,t[6]=_,t[7]=O,t[8]=D):D=t[8];const M=D,L=iO[n.type]||Vf;let I,z,F,B,U,V,$,H,W,K,G,Y,X,Q,J,Z,ee,te,ne,re,ae,oe,ie,se,le,ce;if(t[9]!==L||t[10]!==d||t[11]!==N||t[12]!==c||t[13]!==s||t[14]!==n||t[15]!==P||t[16]!==g||t[17]!==p||t[18]!==l||t[19]!==f||t[20]!==j||t[21]!==x||t[22]!==r||t[23]!==o||t[24]!==T||t[25]!==M||t[26]!==v||t[27]!==u){const e=lO(n.type);let a;t[41]!==n.type?(a=cO.has(n.type),t[41]=n.type,t[42]=a):a=t[42];const i=a;let S;t[43]!==n.fields?(S=n.fields||[],t[43]=n.fields,t[44]=S):S=t[44];const k=S;let E;t[45]!==n.id||t[46]!==n.label||t[47]!==n.name||t[48]!==r||t[49]!==v||t[50]!==u?(E=()=>{const e=v.trim();if(e&&e!==n.label&&(u(r,n.id,{label:e}),n.name.startsWith("field_")||""===n.name)){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"");u(r,n.id,{name:t})}y(!1)},t[45]=n.id,t[46]=n.label,t[47]=n.name,t[48]=r,t[49]=v,t[50]=u,t[51]=E):E=t[51];const C=E;let R;t[52]!==n.label||t[53]!==C?(R=e=>{"Enter"===e.key&&C(),"Escape"===e.key&&(b(n.label),y(!1))},t[52]=n.label,t[53]=C,t[54]=R):R=t[54];const O=R;let A;t[55]!==d||t[56]!==n.id||t[57]!==r?(A=e=>{w(!1),requestAnimationFrame(()=>d(r,e,n.id))},t[55]=d,t[56]=n.id,t[57]=r,t[58]=A):A=t[58];const _=A;let D;t[59]===Symbol.for("react.memo_cache_sentinel")?(D={},uO.forEach(e=>{D[e.group]||(D[e.group]=[]),D[e.group].push(e)}),t[59]=D):D=t[59];const q=D;U=OR;const Q=P&&"opacity-40 z-50",J=0===s?"border-white/6 bg-[#0C0D12] hover:border-white/10":"border-white/4 bg-white/2 hover:border-white/[0.07]",Z=l&&"border-indigo-500/40 bg-indigo-500/4 ring-1 ring-inset ring-indigo-500/10";let ee,te,ne,re,ae,oe,ie,se,le,ce,ue,de,fe,he,pe,me,ge,ye,ve,be,xe,we,Se,ke,Ee,Ce;if(t[60]!==Q||t[61]!==J||t[62]!==Z?(ee=Lp("group relative rounded-lg border transition-all duration-100",Q,J,Z),t[60]=Q,t[61]=J,t[62]=Z,t[63]=ee):ee=t[63],t[64]!==o?(te=()=>o?.(),t[64]=o,t[65]=te):te=t[65],t[66]!==N||t[67]!==s||t[68]!==j?(ne=0===s?(0,Rc.jsx)("button",{...N,...j,className:"shrink-0 cursor-grab active:cursor-grabbing text-gray-700 hover:text-gray-400 transition-colors -ml-1 p-0.5",onClick:gO,children:(0,Rc.jsx)(of,{className:"h-3.5 w-3.5"})}):(0,Rc.jsx)("div",{className:"w-4 shrink-0"}),t[66]=N,t[67]=s,t[68]=j,t[69]=ne):ne=t[69],t[70]!==i||t[71]!==p?(re=i?(0,Rc.jsx)("button",{className:"shrink-0 text-gray-600 hover:text-gray-300 transition-colors",onClick:e=>{e.stopPropagation(),m(mO)},children:p?(0,Rc.jsx)(Bd,{className:"h-3.5 w-3.5"}):(0,Rc.jsx)(Ud,{className:"h-3.5 w-3.5"})}):(0,Rc.jsx)("div",{className:"w-3.5 shrink-0"}),t[70]=i,t[71]=p,t[72]=re):re=t[72],t[73]!==n.label||t[74]!==O||t[75]!==C||t[76]!==g||t[77]!==v?(ae=g?(0,Rc.jsx)(vR,{value:v,onChange:e=>b(e.target.value),onBlur:C,onKeyDown:O,onClick:pO,className:"h-6 px-2 py-0 bg-black border-indigo-500/60 text-sm font-medium text-white rounded-md",autoFocus:!0}):(0,Rc.jsx)("div",{className:"text-[13px] font-medium text-gray-200 truncate leading-tight cursor-pointer hover:text-white transition-colors",onDoubleClick:e=>{e.stopPropagation(),b(n.label),y(!0)},children:n.label}),t[73]=n.label,t[74]=O,t[75]=C,t[76]=g,t[77]=v,t[78]=ae):ae=t[78],t[79]!==n.name?(oe=(0,Rc.jsx)("span",{className:"text-[10px] font-mono text-gray-600 truncate max-w-20",children:n.name}),t[79]=n.name,t[80]=oe):oe=t[80],t[81]!==n.type){let e;t[83]===Symbol.for("react.memo_cache_sentinel")?(e=/_/g,t[83]=e):e=t[83],ie=n.type.replace(e," "),t[81]=n.type,t[82]=ie}else ie=t[82];t[84]!==ie?(se=(0,Rc.jsx)("span",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-wide px-1 py-px rounded bg-white/15 shrink-0",children:ie}),t[84]=ie,t[85]=se):se=t[85],t[86]!==n.validation?.required?(le=n.validation?.required&&(0,Rc.jsx)("span",{className:"text-[9px] font-bold text-amber-500/80 shrink-0",children:"●"}),t[86]=n.validation?.required,t[87]=le):le=t[87],t[88]!==n.isLocalized?(ce=n.isLocalized&&(0,Rc.jsx)("span",{className:"text-[9px] text-blue-400/70 shrink-0",children:"🌐"}),t[88]=n.isLocalized,t[89]=ce):ce=t[89],t[90]!==i||t[91]!==k?(ue=i&&(0,Rc.jsxs)("span",{className:"text-[10px] text-gray-700 shrink-0",children:[k.length," field",1!==k.length?"s":""]}),t[90]=i,t[91]=k,t[92]=ue):ue=t[92],t[93]!==oe||t[94]!==se||t[95]!==le||t[96]!==ce||t[97]!==ue?(de=(0,Rc.jsxs)("div",{className:"flex items-center gap-1.5 mt-0.5",children:[oe,se,le,ce,ue]}),t[93]=oe,t[94]=se,t[95]=le,t[96]=ce,t[97]=ue,t[98]=de):de=t[98],t[99]!==ae||t[100]!==de?(fe=(0,Rc.jsxs)("div",{className:"flex-1 min-w-0",children:[ae,de]}),t[99]=ae,t[100]=de,t[101]=fe):fe=t[101],t[102]!==i||t[103]!==n.label||t[104]!==_||t[105]!==x?(he=i&&(0,Rc.jsxs)(YR,{open:x,onOpenChange:w,children:[(0,Rc.jsxs)(PR,{children:[(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)(XR,{asChild:!0,children:(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-200",onClick:hO,children:(0,Rc.jsx)(Nf,{className:"h-3.5 w-3.5"})})})}),(0,Rc.jsx)(_R,{side:"top",className:"text-xs",children:"Add nested field"})]}),(0,Rc.jsxs)(QR,{align:"end",className:"w-52 max-h-80 overflow-y-auto bg-[#0F1015] border-white/10",onClick:fO,children:[(0,Rc.jsxs)("div",{className:"px-3 py-2 border-b border-white/6 flex items-center justify-between",children:[(0,Rc.jsxs)("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-wider",children:["Add to ",n.label]}),(0,Rc.jsx)("button",{onClick:()=>w(!1),className:"text-gray-600 hover:text-gray-400",children:(0,Rc.jsx)(Wf,{className:"h-3 w-3"})})]}),Object.entries(q).map(e=>{const[t,n]=e;return(0,Rc.jsxs)("div",{children:[(0,Rc.jsx)("div",{className:"px-3 pt-2 pb-1 text-[9px] font-bold text-gray-600 uppercase tracking-wider",children:t}),n.map(e=>{const{type:t,label:n}=e,r=iO[t]||Vf,a=lO(t).split(" ")[0];return(0,Rc.jsxs)(JR,{onSelect:e=>{e.preventDefault(),_(t)},className:"flex items-center gap-2 cursor-pointer px-3 py-1.5",children:[(0,Rc.jsx)(r,{className:Lp("h-3.5 w-3.5 shrink-0",a)}),(0,Rc.jsx)("span",{className:"text-[12px]",children:n})]},t)})]},t)})]})]}),t[102]=i,t[103]=n.label,t[104]=_,t[105]=x,t[106]=he):he=t[106],t[107]!==d||t[108]!==n||t[109]!==r?(pe=e=>{e.stopPropagation(),d(r,n.type,void 0,{...n,id:`field_${Date.now()}`,name:`${n.name}_copy`,label:`${n.label} (Copy)`})},t[107]=d,t[108]=n,t[109]=r,t[110]=pe):pe=t[110],t[111]===Symbol.for("react.memo_cache_sentinel")?(me=(0,Rc.jsx)(Wd,{className:"h-3.5 w-3.5"}),t[111]=me):me=t[111],t[112]!==pe?(ge=(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-200",onClick:pe,children:me})}),t[112]=pe,t[113]=ge):ge=t[113],t[114]===Symbol.for("react.memo_cache_sentinel")?(ye=(0,Rc.jsx)(_R,{side:"top",className:"text-xs",children:"Duplicate"}),t[114]=ye):ye=t[114],t[115]!==ge?(ve=(0,Rc.jsxs)(PR,{children:[ge,ye]}),t[115]=ge,t[116]=ve):ve=t[116],t[117]===Symbol.for("react.memo_cache_sentinel")?(be=(0,Rc.jsxs)(PR,{children:[(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-gray-200",onClick:e=>{e.stopPropagation(),h(!0)},children:(0,Rc.jsx)(Af,{className:"h-3.5 w-3.5"})})}),(0,Rc.jsx)(_R,{side:"top",className:"text-xs",children:"Configure"})]}),t[117]=be):be=t[117],t[118]!==c||t[119]!==n.id||t[120]!==r?(xe=e=>{e.stopPropagation(),c(r,n.id)},t[118]=c,t[119]=n.id,t[120]=r,t[121]=xe):xe=t[121],t[122]===Symbol.for("react.memo_cache_sentinel")?(we=(0,Rc.jsx)(Ff,{className:"h-3.5 w-3.5"}),t[122]=we):we=t[122],t[123]!==xe?(Se=(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-500 hover:text-red-400",onClick:xe,children:we})}),t[123]=xe,t[124]=Se):Se=t[124],t[125]===Symbol.for("react.memo_cache_sentinel")?(ke=(0,Rc.jsx)(_R,{side:"top",className:"text-xs",children:"Delete"}),t[125]=ke):ke=t[125],t[126]!==Se?(Ee=(0,Rc.jsxs)(PR,{children:[Se,ke]}),t[126]=Se,t[127]=Ee):Ee=t[127],t[128]!==he||t[129]!==ve||t[130]!==Ee?(Ce=(0,Rc.jsxs)("div",{className:"flex items-center gap-0.5 ml-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[he,ve,be,Ee]}),t[128]=he,t[129]=ve,t[130]=Ee,t[131]=Ce):Ce=t[131];const Ne=(0,Rc.jsxs)("div",{className:"flex items-center px-3 py-2.5 gap-2",children:[ne,re,(0,Rc.jsx)("div",{className:Lp("h-8.5 w-8.5 rounded-sm flex items-center justify-center shrink-0",e.split(" ")[1]),children:(0,Rc.jsx)(L,{className:Lp("h-4.5 w-4.5",e.split(" ")[0])})}),fe,Ce]});let je;t[132]!==i||t[133]!==s||t[134]!==p||t[135]!==k||t[136]!==r?(je=i&&p&&(0,Rc.jsx)("div",{className:Lp("pb-2 space-y-1.5",0===s?"px-3":"px-2"),children:(0,Rc.jsx)("div",{className:Lp("border-l-2 ml-3 pl-3 space-y-1.5","border-white/5"),children:0===k.length?(0,Rc.jsxs)("div",{className:"py-4 text-center text-[11px] bg-white/5 rounded-md text-gray-500 italic",children:["No fields — click"," ",(0,Rc.jsx)("span",{className:"text-gray-500 not-italic font-mono",children:"+"})," ","to add"]}):k.map(e=>(0,Rc.jsx)(dO,{field:e,nodeId:r,depth:s+1},e.id))})}),t[132]=i,t[133]=s,t[134]=p,t[135]=k,t[136]=r,t[137]=je):je=t[137],t[138]!==T||t[139]!==M||t[140]!==ee||t[141]!==te||t[142]!==Ne||t[143]!==je?(G=(0,Rc.jsxs)("div",{ref:T,style:M,className:ee,onClick:te,children:[Ne,je]}),t[138]=T,t[139]=M,t[140]=ee,t[141]=te,t[142]=Ne,t[143]=je,t[144]=G):G=t[144],B=ZR,W=f,K=h,F=nO,H="w-100 space-y-0! gap-0! sm:max-w-lg! bg-card border-white/8 text-white overflow-y-auto",z=rO,$=" mb-0! border-b border-white/6",V="flex items-center gap-2",X=Lp("h-7 w-7 rounded-md flex items-center justify-center shrink-0",e.split(" ")[1]),I=L,Y=Lp("h-3.5 w-3.5",e.split(" ")[0]),t[9]=L,t[10]=d,t[11]=N,t[12]=c,t[13]=s,t[14]=n,t[15]=P,t[16]=g,t[17]=p,t[18]=l,t[19]=f,t[20]=j,t[21]=x,t[22]=r,t[23]=o,t[24]=T,t[25]=M,t[26]=v,t[27]=u,t[28]=I,t[29]=z,t[30]=F,t[31]=B,t[32]=U,t[33]=V,t[34]=$,t[35]=H,t[36]=W,t[37]=K,t[38]=G,t[39]=Y,t[40]=X}else I=t[28],z=t[29],F=t[30],B=t[31],U=t[32],V=t[33],$=t[34],H=t[35],W=t[36],K=t[37],G=t[38],Y=t[39],X=t[40];if(t[145]!==I||t[146]!==Y?(Q=(0,Rc.jsx)(I,{className:Y}),t[145]=I,t[146]=Y,t[147]=Q):Q=t[147],t[148]!==Q||t[149]!==X?(J=(0,Rc.jsx)("div",{className:X,children:Q}),t[148]=Q,t[149]=X,t[150]=J):J=t[150],t[151]!==n.label?(Z=(0,Rc.jsx)(aO,{className:"text-white text-sm",children:n.label}),t[151]=n.label,t[152]=Z):Z=t[152],t[153]!==n.type){let e;t[155]===Symbol.for("react.memo_cache_sentinel")?(e=/_/g,t[155]=e):e=t[155],ee=n.type.replace(e," "),t[153]=n.type,t[154]=ee}else ee=t[154];return t[156]!==ee?(te=(0,Rc.jsx)(oO,{className:"text-gray-600 text-[11px] font-mono",children:ee}),t[156]=ee,t[157]=te):te=t[157],t[158]!==Z||t[159]!==te?(ne=(0,Rc.jsxs)("div",{children:[Z,te]}),t[158]=Z,t[159]=te,t[160]=ne):ne=t[160],t[161]!==V||t[162]!==J||t[163]!==ne?(re=(0,Rc.jsxs)("div",{className:V,children:[J,ne]}),t[161]=V,t[162]=J,t[163]=ne,t[164]=re):re=t[164],t[165]!==z||t[166]!==$||t[167]!==re?(ae=(0,Rc.jsx)(z,{className:$,children:re}),t[165]=z,t[166]=$,t[167]=re,t[168]=ae):ae=t[168],t[169]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>h(!1),t[169]=oe):oe=t[169],t[170]!==n||t[171]!==r?(ie=(0,Rc.jsx)(qR,{field:n,nodeId:r,onClose:oe}),t[170]=n,t[171]=r,t[172]=ie):ie=t[172],t[173]!==F||t[174]!==H||t[175]!==ae||t[176]!==ie?(se=(0,Rc.jsxs)(F,{className:H,children:[ae,ie]}),t[173]=F,t[174]=H,t[175]=ae,t[176]=ie,t[177]=se):se=t[177],t[178]!==B||t[179]!==W||t[180]!==K||t[181]!==se?(le=(0,Rc.jsx)(B,{open:W,onOpenChange:K,children:se}),t[178]=B,t[179]=W,t[180]=K,t[181]=se,t[182]=le):le=t[182],t[183]!==U||t[184]!==G||t[185]!==le?(ce=(0,Rc.jsxs)(U,{children:[G,le]}),t[183]=U,t[184]=G,t[185]=le,t[186]=ce):ce=t[186],ce}function fO(e){return e.stopPropagation()}function hO(e){return e.stopPropagation()}function pO(e){return e.stopPropagation()}function mO(e){return!e}function gO(e){return e.stopPropagation()}function yO(e){const t=(0,S.c)(10);let n,r,a;t[0]!==e?(({className:n,orientation:a,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a):(n=t[1],r=t[2],a=t[3]);const o=void 0===a?"horizontal":a;let i,s;return t[4]!==n?(i=Lp("group/tabs flex gap-2 data-horizontal:flex-col",n),t[4]=n,t[5]=i):i=t[5],t[6]!==o||t[7]!==r||t[8]!==i?(s=(0,Rc.jsx)(AT,{"data-slot":"tabs","data-orientation":o,className:i,...r}),t[6]=o,t[7]=r,t[8]=i,t[9]=s):s=t[9],s}var vO=sb("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function bO(e){const t=(0,S.c)(11);let n,r,a;t[0]!==e?(({className:n,variant:a,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a):(n=t[1],r=t[2],a=t[3]);const o=void 0===a?"default":a;let i,s;return t[4]!==n||t[5]!==o?(i=Lp(vO({variant:o}),n),t[4]=n,t[5]=o,t[6]=i):i=t[6],t[7]!==r||t[8]!==i||t[9]!==o?(s=(0,Rc.jsx)(_T,{"data-slot":"tabs-list","data-variant":o,className:i,...r}),t[7]=r,t[8]=i,t[9]=o,t[10]=s):s=t[10],s}function xO(e){const t=(0,S.c)(8);let n,r,a,o;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(a=Lp("relative inline-flex cursor-pointer h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",n),t[3]=n,t[4]=a):a=t[4],t[5]!==r||t[6]!==a?(o=(0,Rc.jsx)(DT,{"data-slot":"tabs-trigger",className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function wO(e){const t=(0,S.c)(8);let n,r,a,o;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(a=Lp("flex-1 text-sm outline-none",n),t[3]=n,t[4]=a):a=t[4],t[5]!==r||t[6]!==a?(o=(0,Rc.jsx)(MT,{"data-slot":"tabs-content",className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function SO(e){const t=(0,S.c)(14);let n,r,a,o,i,s,l,c;return t[0]!==e?(({className:r,children:n,...a}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a):(n=t[1],r=t[2],a=t[3]),t[4]!==r?(o=Lp("relative",r),t[4]=r,t[5]=o):o=t[5],t[6]!==n?(i=(0,Rc.jsx)(zN,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring focus-visible:ring-ring/50 focus-visible:outline-1",children:n}),t[6]=n,t[7]=i):i=t[7],t[8]===Symbol.for("react.memo_cache_sentinel")?(s=(0,Rc.jsx)(kO,{}),l=(0,Rc.jsx)(FN,{}),t[8]=s,t[9]=l):(s=t[8],l=t[9]),t[10]!==a||t[11]!==o||t[12]!==i?(c=(0,Rc.jsxs)(IN,{"data-slot":"scroll-area",className:o,...a,children:[i,s,l]}),t[10]=a,t[11]=o,t[12]=i,t[13]=c):c=t[13],c}function kO(e){const t=(0,S.c)(11);let n,r,a;t[0]!==e?(({className:n,orientation:a,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a):(n=t[1],r=t[2],a=t[3]);const o=void 0===a?"vertical":a;let i,s,l;return t[4]!==n?(i=Lp("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",n),t[4]=n,t[5]=i):i=t[5],t[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,Rc.jsx)(kN,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),t[6]=s):s=t[6],t[7]!==o||t[8]!==r||t[9]!==i?(l=(0,Rc.jsx)(fN,{"data-slot":"scroll-area-scrollbar","data-orientation":o,orientation:o,className:i,...r,children:s}),t[7]=o,t[8]=r,t[9]=i,t[10]=l):l=t[10],l}function EO(e){const t=(0,S.c)(71),{node:n}=e,[r,a]=(0,k.useState)("typescript");let o;t[0]!==n?(o=function(e){return`export interface ${_O(e.apiKey||e.name)} {\n${e.fields.filter(e=>!e.isHidden).map(e=>{const t=e.validation?.required?"":"?",n=OO(e);return`${e.description?` /** ${e.description} */\n`:""} ${e.name}${t}: ${n};`}).join("\n")}\n}`}(n),t[0]=n,t[1]=o):o=t[1];const i=o;let s;t[2]!==n?(s=function(e){const t=DO(e.apiKey||e.name)+"Schema";return`import { z } from "zod";\n\nexport const ${t} = z.object({\n${e.fields.filter(e=>!e.isHidden).map(e=>{let t=PO(e);return e.validation?.required||(t+=".optional()"),` ${e.name}: ${t},`}).join("\n")}\n});\n\nexport type ${_O(e.apiKey||e.name)} = z.infer<typeof ${t}>;`}(n),t[2]=n,t[3]=s):s=t[3];const l=s;let c;t[4]!==n?(c=function(e){const t=_O(e.apiKey||e.name);return`# Type definition\ntype ${t} {\n${e.fields.filter(e=>!e.isHidden).map(e=>{const t=AO(e),n=e.validation?.required?"!":"";return`${e.description?` """\n ${e.description}\n """\n`:""} ${e.name}: ${t}${n}`}).join("\n")}\n}\n\n# Input type for mutations\ninput ${t}Input {\n${e.fields.filter(e=>!e.isHidden).map(e=>` ${e.name}: ${AO(e)}`).join("\n")}\n}`}(n),t[4]=n,t[5]=c):c=t[5];const u=c;let d;t[6]!==n?(d=function(e){const t=_O(e.apiKey||e.name),n="SINGLETON"===e.type,r=e.fields.filter(e=>!e.isHidden).slice(0,3),a=r.map(e=>{const n=`${DO(t)}.${e.name}`;switch(e.type){case"TEXT_SHORT":case"TEXT_LONG":case"RICH_TEXT":return` <p>{${n}}</p>`;case"IMAGE":return` <img src={${n}?.url} alt={${n}?.alt} />`;case"BOOLEAN":return` {${n} && <span>✓ ${e.label}</span>}`;case"NUMBER":case"CURRENCY":case"RATING":default:return` <span>{${n}}</span>`;case"URL":return` <a href={${n}}>${e.label}</a>`}}).join("\n");if(n){const n=DO(t);return`// ─── Next.js Server Component (Singleton) ───\nimport { nexus } from "@nexushub/client";\nimport type { ${t} } from "@/types/nexus";\n\nexport default async function Page() {\n // ⚡ Loads from .nexus/local/pages/${e.apiKey}.nex in dev\n const ${n} = await nexus.getPage<${t}>("${e.apiKey}");\n\n return (\n <main>\n${a||` <h1>{${n}.title}</h1>`}\n </main>\n );\n}`}const o=DO(t).replace(/s$/,"");return`// ─── Next.js Server Component (Collection) ───\nimport { nexus } from "@nexushub/client";\nimport type { ${t} } from "@/types/nexus";\n\nexport default async function CollectionPage() {\n // ⚡ Loads from .nexus/local/collections/${e.apiKey}.nex in dev\n const { items, total } = await nexus.content.getCollection<${t}>("${e.apiKey}", {\n page: 1,\n limit: 10,\n sort: "createdAt",\n order: "desc",\n });\n\n return (\n <section>\n <p>{total} items</p>\n {items.map((${o}) => (\n <article key={${o}.id}>\n${r.map(e=>` <span>{${o}.${e.name}}</span>`).join("\n")||` <span>{${o}.id}</span>`}\n </article>\n ))}\n </section>\n );\n}`}(n),t[6]=n,t[7]=d):d=t[7];const f=d,h=jO;let p;t[8]!==u||t[9]!==n.apiKey||t[10]!==f||t[11]!==i||t[12]!==l?(p=()=>{const e=[`// TypeScript Interface\n${i}`,`\n\n// Zod Schema\n${l}`,`\n\n// GraphQL Types\n${u}`,`\n\n// SDK Usage\n${f}`].join("\n"),t=new Blob([e],{type:"text/plain"}),r=URL.createObjectURL(t),a=document.createElement("a");a.href=r,a.download=`${n.apiKey}-types.ts`,a.click(),URL.revokeObjectURL(r),oh.success("All code downloaded")},t[8]=u,t[9]=n.apiKey,t[10]=f,t[11]=i,t[12]=l,t[13]=p):p=t[13];const m=p;let g,y,v,b,x,w,E,C,N,j,T,R,O,P,A;if(t[14]===Symbol.for("react.memo_cache_sentinel")?(g=(0,Rc.jsx)(gd,{className:"h-3 w-3"}),t[14]=g):g=t[14],t[15]!==r||t[16]!==m||t[17]!==u||t[18]!==n.apiKey||t[19]!==f||t[20]!==i||t[21]!==l){const e=[{id:"typescript",label:"Types",icon:g,code:i,language:"typescript",badge:"TS"},{id:"query",label:"Query",icon:(0,Rc.jsx)(If,{className:"h-3 w-3"}),code:f,language:"typescript",badge:"SDK"},{id:"zod",label:"Zod",icon:(0,Rc.jsx)(xd,{className:"h-3 w-3"}),code:l,language:"typescript",badge:"ZOD"},{id:"graphql",label:"GQL",icon:(0,Rc.jsx)(kd,{className:"h-3 w-3"}),code:u,language:"graphql",badge:"GQL"}];let o,s,c,d,p,S,k,j,T;v=e.find(e=>e.id===r),y=OR,b="flex flex-col gap-3",t[30]===Symbol.for("react.memo_cache_sentinel")?(o=(0,Rc.jsx)("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-wider",children:"Generated Code"}),t[30]=o):o=t[30],t[31]!==n.apiKey?(s=(0,Rc.jsxs)("div",{className:"flex items-center gap-2",children:[o,(0,Rc.jsx)(RR,{variant:"outline",className:"text-[9px] px-1.5 py-0 h-4 font-mono text-indigo-400 border-indigo-500/30 bg-indigo-500/10",children:n.apiKey})]}),t[31]=n.apiKey,t[32]=s):s=t[32],t[33]===Symbol.for("react.memo_cache_sentinel")?(c=(0,Rc.jsxs)(PR,{children:[(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)(XR,{asChild:!0,children:(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",className:"h-6 w-6 text-gray-500 hover:text-white",children:(0,Rc.jsx)(Bd,{className:"h-3.5 w-3.5"})})})}),(0,Rc.jsx)(_R,{children:"Export options"})]}),t[33]=c):c=t[33],t[34]!==u||t[35]!==f||t[36]!==i||t[37]!==l?(d=()=>h("All code",[i,l,u,f].join("\n\n")),t[34]=u,t[35]=f,t[36]=i,t[37]=l,t[38]=d):d=t[38],t[39]===Symbol.for("react.memo_cache_sentinel")?(p=(0,Rc.jsx)(Wd,{className:"h-3.5 w-3.5"}),t[39]=p):p=t[39],t[40]!==d?(S=(0,Rc.jsxs)(JR,{className:"text-xs gap-2 cursor-pointer",onClick:d,children:[p," Copy all"]}),t[40]=d,t[41]=S):S=t[41],t[42]===Symbol.for("react.memo_cache_sentinel")?(k=(0,Rc.jsx)(Yd,{className:"h-3.5 w-3.5"}),t[42]=k):k=t[42],t[43]!==m?(j=(0,Rc.jsxs)(JR,{className:"text-xs gap-2 cursor-pointer",onClick:m,children:[k," Download .ts file"]}),t[43]=m,t[44]=j):j=t[44],t[45]!==S||t[46]!==j?(T=(0,Rc.jsxs)(YR,{children:[c,(0,Rc.jsxs)(QR,{align:"end",className:"bg-[#0A0B10] border-white/10 text-sm",children:[S,j]})]}),t[45]=S,t[46]=j,t[47]=T):T=t[47],t[48]!==s||t[49]!==T?(x=(0,Rc.jsxs)("div",{className:"flex items-center justify-between",children:[s,T]}),t[48]=s,t[49]=T,t[50]=x):x=t[50],w=(0,Rc.jsxs)(yO,{value:r,onValueChange:a,className:"w-full",children:[(0,Rc.jsx)(bO,{className:"w-full h-8 bg-white/4 rounded-full grid grid-cols-4 p-0.5",children:e.map(NO)}),e.map(e=>(0,Rc.jsx)(wO,{value:e.id,className:"mt-2",children:(0,Rc.jsx)(TO,{code:e.code,language:e.language,label:`${e.badge}`,onCopy:()=>h(e.label,e.code)})},e.id))]}),N="flex items-center justify-between px-0.5",E="text-[9px] text-gray-600 font-mono",C=v.code.split("\n"),t[15]=r,t[16]=m,t[17]=u,t[18]=n.apiKey,t[19]=f,t[20]=i,t[21]=l,t[22]=y,t[23]=v,t[24]=b,t[25]=x,t[26]=w,t[27]=E,t[28]=C,t[29]=N}else y=t[22],v=t[23],b=t[24],x=t[25],w=t[26],E=t[27],C=t[28],N=t[29];return t[51]!==v.language||t[52]!==E||t[53]!==C.length?(j=(0,Rc.jsxs)("span",{className:E,children:[C.length," lines ·"," ",v.language]}),t[51]=v.language,t[52]=E,t[53]=C.length,t[54]=j):j=t[54],t[55]!==n.fields?(T=n.fields.filter(CO),t[55]=n.fields,t[56]=T):T=t[56],t[57]!==T.length?(R=(0,Rc.jsxs)("span",{className:"text-[9px] text-gray-700",children:[T.length," fields exported"]}),t[57]=T.length,t[58]=R):R=t[58],t[59]!==j||t[60]!==R||t[61]!==N?(O=(0,Rc.jsxs)("div",{className:N,children:[j,R]}),t[59]=j,t[60]=R,t[61]=N,t[62]=O):O=t[62],t[63]!==b||t[64]!==x||t[65]!==w||t[66]!==O?(P=(0,Rc.jsxs)("div",{className:b,children:[x,w,O]}),t[63]=b,t[64]=x,t[65]=w,t[66]=O,t[67]=P):P=t[67],t[68]!==y||t[69]!==P?(A=(0,Rc.jsx)(y,{children:P}),t[68]=y,t[69]=P,t[70]=A):A=t[70],A}function CO(e){return!e.isHidden}function NO(e){return(0,Rc.jsxs)(xO,{value:e.id,className:"text-[10px] font-bold rounded-full h-full data-[state=active]:bg-white/8 data-[state=active]:text-white data-[state=active]:shadow-none text-gray-500 hover:text-gray-300 transition-all flex items-center gap-1 px-1",children:[(0,Rc.jsx)("span",{className:"text-[10px]",children:e.icon}),e.label]},e.id)}function jO(e,t){navigator.clipboard.writeText(t),oh.success(`${e} copied`)}function TO(e){const t=(0,S.c)(52),{code:n,language:r,label:a,onCopy:o}=e,[i,s]=(0,k.useState)(!1);let l;t[0]!==n||t[1]!==r?(l=function(e,t){let n=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");const r=[],a=[];n=n.replace(/((?:`[^`]*`)|(?:"[^"]*")|(?:'[^']*'))/g,e=>(r.push(e),`___STRING_${r.length-1}___`));const o="graphql"===t?/(\s*#.*)/g:/(\/\/.*)/g;if(n=n.replace(o,e=>(a.push(e),`___COMMENT_${a.length-1}___`)),"typescript"===t||"javascript"===t){const e={import:"#c586c0",export:"#c586c0",from:"#c586c0",return:"#c586c0",default:"#c586c0",if:"#c586c0",else:"#c586c0",for:"#c586c0",while:"#c586c0",switch:"#c586c0",case:"#c586c0",break:"#c586c0",const:"#569cd6",let:"#569cd6",var:"#569cd6",function:"#569cd6",interface:"#569cd6",type:"#569cd6",class:"#569cd6",declare:"#569cd6",module:"#569cd6",extends:"#569cd6",as:"#569cd6",async:"#569cd6",await:"#569cd6",string:"#4ec9b0",number:"#4ec9b0",boolean:"#4ec9b0",unknown:"#4ec9b0",any:"#4ec9b0",void:"#4ec9b0",Record:"#4ec9b0",Promise:"#4ec9b0",Array:"#4ec9b0",Object:"#4ec9b0",JSON:"#4ec9b0",ID:"#4ec9b0",null:"#569cd6",undefined:"#569cd6",true:"#569cd6",false:"#569cd6",new:"#c586c0"},t=Object.keys(e).join("|"),r=new RegExp(`(<[^>]*>)|\\b(${t})\\b`,"g");n=n.replace(r,(t,n,r)=>r?`<span style="color:${e[r]}">${r}</span>`:t),n=n.replace(/(<\/??)([a-zA-Z1-6]+)\b/g,(e,t,n)=>`${t}<span style="color:${/^[A-Z]/.test(n)?"#4ec9b0":"#569cd6"}">${n}</span>`);const a=/(<[^>]*>)|\b([A-Z][a-zA-Z0-9_]+)\b/g,o=new Set(["Record","Date","Promise","Array","Object","JSON","ID","String","Float","Boolean","DateTime","Asset","GeoPoint"]);n=n.replace(a,(e,t,n)=>n&&!o.has(n)?`<span style="color:#4ec9b0;font-weight:600">${n}</span>`:e),n=n.replace(/(<[^>]*>)|\b([a-zA-Z_][a-zA-Z0-9_]*)(?=\s*\()/g,(e,t,n)=>n?`<span style="color:#dcdcaa">${n}</span>`:e),n=n.replace(/(<[^>]*>)|\b([a-zA-Z_][a-zA-Z0-9_]*)(?=\s*(\??\s*:|=))/g,(e,t,n)=>n?`<span style="color:#9cdcfe">${n}</span>`:e),n=n.replace(/(<[^>]*>)|(\.\??)([a-zA-Z_][a-zA-Z0-9_]*)\b/g,(e,t,n,r)=>r?`${n}<span style="color:#9cdcfe">${r}</span>`:e),n=n.replace(/(<[^>]*>)|\b(\d+\.?\d*)\b/g,(e,t,n)=>n?`<span style="color:#b5cea8">${n}</span>`:e)}else if("graphql"===t){const e={type:"#c586c0",input:"#c586c0",String:"#4ec9b0",Float:"#4ec9b0",Boolean:"#4ec9b0",DateTime:"#4ec9b0",Asset:"#4ec9b0",ID:"#4ec9b0",JSON:"#4ec9b0",GeoPoint:"#4ec9b0",Int:"#4ec9b0"},t=Object.keys(e).join("|"),r=new RegExp(`(<[^>]*>)|\\b(${t})\\b`,"g");n=n.replace(r,(t,n,r)=>r?`<span style="color:${e[r]}">${r}</span>`:t),n=n.replace(/(<[^>]*>)|\b([A-Z][a-zA-Z0-9_]+)\b/g,(t,n,r)=>r&&!e[r]?`<span style="color:#4ec9b0;font-weight:600">${r}</span>`:t),n=n.replace(/(<[^>]*>)|\b([a-zA-Z_][a-zA-Z0-9_]*)(?=\s*:)/g,(e,t,n)=>n&&!["type","input"].includes(n)?`<span style="color:#9cdcfe">${n}</span>`:e),n=n.replace(/!/g,'<span style="color:#f44747">!</span>')}return n=n.replace(/___STRING_(\d+)___/g,(e,t)=>`<span style="color:#ce9178">${r[parseInt(t,10)]}</span>`),n=n.replace(/___COMMENT_(\d+)___/g,(e,t)=>`<span style="color:#6a9955;font-style:italic">${a[parseInt(t,10)]}</span>`),n}(n,r),t[0]=n,t[1]=r,t[2]=l):l=t[2];const c=l;let u,d,f,h,p,m,g,y,v,b,x,w,E;if(t[3]!==n||t[4]!==i||t[5]!==a||t[6]!==o){const e=n.split("\n");let r;t[15]!==o?(r=()=>{o(),s(!0),setTimeout(()=>s(!1),1800)},t[15]=o,t[16]=r):r=t[16];const l=r;let c,v;g=" overflow-hidden border-l border-t border-white/8 bg-[#050505]",t[17]===Symbol.for("react.memo_cache_sentinel")?(c=(0,Rc.jsxs)("div",{className:"flex gap-1",children:[(0,Rc.jsx)("div",{className:"h-2 w-2 rounded-full bg-white/10"}),(0,Rc.jsx)("div",{className:"h-2 w-2 rounded-full bg-white/10"}),(0,Rc.jsx)("div",{className:"h-2 w-2 rounded-full bg-white/10"})]}),t[17]=c):c=t[17],t[18]!==a?(v=(0,Rc.jsxs)("div",{className:"flex items-center gap-2",children:[c,(0,Rc.jsx)("span",{className:"text-[9px] font-bold text-gray-600 uppercase tracking-wider ml-1",children:a})]}),t[18]=a,t[19]=v):v=t[19];const b="h-6 w-6 transition-colors "+(i?"text-emerald-400 hover:text-emerald-400":"text-gray-600 hover:text-white");let x,w;t[20]!==i?(x=i?(0,Rc.jsx)(Fd,{className:"h-3.5 w-3.5"}):(0,Rc.jsx)(Wd,{className:"h-3.5 w-3.5"}),t[20]=i,t[21]=x):x=t[21],t[22]!==l||t[23]!==b||t[24]!==x?(w=(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",className:b,onClick:l,children:x})}),t[22]=l,t[23]=b,t[24]=x,t[25]=w):w=t[25];const S=i?"Copied!":"Copy code";let k,E;t[26]!==S?(k=(0,Rc.jsx)(_R,{children:S}),t[26]=S,t[27]=k):k=t[27],t[28]!==w||t[29]!==k?(E=(0,Rc.jsx)(OR,{children:(0,Rc.jsxs)(PR,{children:[w,k]})}),t[28]=w,t[29]=k,t[30]=E):E=t[30],t[31]!==v||t[32]!==E?(y=(0,Rc.jsxs)("div",{className:"flex items-center justify-between px-3 py-1.5 bg-white/2 border-b border-white/5",children:[v,E]}),t[31]=v,t[32]=E,t[33]=y):y=t[33],u=SO,m="min-h-[calc(100vh-20rem)] max-h-[calc(100vh-20rem) h-full overflow-x-scroll",p="flex text-[11px] h-full font-mono leading-relaxed",d="select-none text-right pr-3 pl-3 pt-3 pb-3 text-gray-700 border-r border-white/5 bg-black/40 ",f="true",h=e.map(RO),t[3]=n,t[4]=i,t[5]=a,t[6]=o,t[7]=u,t[8]=d,t[9]=f,t[10]=h,t[11]=p,t[12]=m,t[13]=g,t[14]=y}else u=t[7],d=t[8],f=t[9],h=t[10],p=t[11],m=t[12],g=t[13],y=t[14];return t[34]!==d||t[35]!==f||t[36]!==h?(v=(0,Rc.jsx)("div",{className:d,"aria-hidden":f,children:h}),t[34]=d,t[35]=f,t[36]=h,t[37]=v):v=t[37],t[38]!==c?(b=(0,Rc.jsx)("pre",{className:"flex-1 p-3 h-full select-text wrap-break-word max-w-67 overflow-x-auto no-scrollbar text-gray-300",dangerouslySetInnerHTML:{__html:c}}),t[38]=c,t[39]=b):b=t[39],t[40]!==b||t[41]!==p||t[42]!==v?(x=(0,Rc.jsxs)("div",{className:p,children:[v,b]}),t[40]=b,t[41]=p,t[42]=v,t[43]=x):x=t[43],t[44]!==u||t[45]!==x||t[46]!==m?(w=(0,Rc.jsx)(u,{className:m,children:x}),t[44]=u,t[45]=x,t[46]=m,t[47]=w):w=t[47],t[48]!==w||t[49]!==g||t[50]!==y?(E=(0,Rc.jsxs)("div",{className:g,children:[y,w]}),t[48]=w,t[49]=g,t[50]=y,t[51]=E):E=t[51],E}function RO(e,t){return(0,Rc.jsx)("div",{className:"leading-relaxed ",children:t+1},t)}function OO(e,t=" "){switch(e.type){case"TEXT_SHORT":case"TEXT_LONG":case"RICH_TEXT":case"EMAIL":case"URL":case"PHONE":case"SLUG":case"COLOR":case"SELECT":case"PASSWORD":case"ICON":case"GRADIENT":case"DATE":case"DATE_TIME":case"TIME":return"string";case"NUMBER":case"PERCENT":case"RATING":case"SCORE":case"CURRENCY":return"number";case"BOOLEAN":return"boolean";case"IMAGE":case"VIDEO":case"AUDIO":case"FILE":case"DOCUMENT":return"{ url: string; alt?: string; mimeType?: string; size?: number }";case"GALLERY":return"Array<{ url: string; alt?: string }>";case"JSON":case"CODE":return"Record<string, unknown>";case"OBJECT":case"SECTION":return e.fields?`{\n${e.fields.filter(e=>!e.isHidden).map(e=>`${t} ${e.name}${e.validation?.required?"":"?"}: ${OO(e,t+" ")};`).join("\n")}\n${t}}`:"Record<string, unknown>";case"LIST":case"ARRAY":if(e.fields&&e.fields.length>0){const n=e.fields[0];return"OBJECT"===n.type&&n.fields?`Array<{\n${n.fields.filter(e=>!e.isHidden).map(e=>`${t} ${e.name}${e.validation?.required?"":"?"}: ${OO(e,t+" ")};`).join("\n")}\n${t}}>`:`Array<${OO(n,t)}>`}return"unknown[]";case"REFERENCE":return"string | { id: string; _type?: string }";case"REFERENCE_LIST":return"string[] | Array<{ id: string }>";case"KEY_VALUE":return"Record<string, string>";case"LOCATION":case"COORDINATES":return"{ lat: number; lng: number; address?: string }";case"ADDRESS":return"{ street?: string; city?: string; state?: string; postalCode?: string; country?: string }";default:return"unknown"}}function PO(e){let t="z.";switch(e.type){case"TEXT_SHORT":case"TEXT_LONG":case"RICH_TEXT":case"EMAIL":case"URL":case"PHONE":case"SLUG":case"COLOR":case"SELECT":case"PASSWORD":case"ICON":case"GRADIENT":case"DATE":case"DATE_TIME":case"TIME":t+="string()";break;case"NUMBER":case"PERCENT":case"RATING":case"SCORE":case"CURRENCY":t+="number()";break;case"BOOLEAN":t+="boolean()";break;case"IMAGE":case"VIDEO":case"AUDIO":case"FILE":case"DOCUMENT":t+="object({ url: z.string(), alt: z.string().optional(), mimeType: z.string().optional(), size: z.number().optional() })";break;case"GALLERY":t+="array(z.object({ url: z.string(), alt: z.string().optional() }))";break;case"JSON":case"CODE":t+="record(z.string(), z.any())";break;case"OBJECT":case"SECTION":if(e.fields){t+=`object({\n${e.fields.filter(e=>!e.isHidden).map(e=>{let t=PO(e);return e.validation?.required||(t+=".optional()"),` ${e.name}: ${t}`}).join(",\n")}\n })`}else t+="record(z.string(), z.any())";break;case"LIST":case"ARRAY":if(e.fields&&e.fields.length>0){const n=e.fields[0];if("OBJECT"===n.type&&n.fields){t+=`array(z.object({\n${n.fields.filter(e=>!e.isHidden).map(e=>{let t=PO(e);return e.validation?.required||(t+=".optional()"),` ${e.name}: ${t}`}).join(",\n")}\n }))`}else t+=`array(${PO(n)})`}else t+="array(z.any())";break;case"REFERENCE":t+="union([z.string(), z.object({ id: z.string() })])";break;case"REFERENCE_LIST":t+="array(z.union([z.string(), z.object({ id: z.string() })]))";break;case"KEY_VALUE":t+="record(z.string(), z.string())";break;case"LOCATION":case"COORDINATES":t+="object({ lat: z.number(), lng: z.number(), address: z.string().optional() })";break;default:t+="any()"}return e.validation?.minLength&&(t+=`.min(${e.validation.minLength})`),e.validation?.maxLength&&(t+=`.max(${e.validation.maxLength})`),e.validation?.min&&(t+=`.min(${e.validation.min})`),e.validation?.max&&(t+=`.max(${e.validation.max})`),e.validation?.pattern&&(t+=`.regex(/${e.validation.pattern}/)`),t}function AO(e){switch(e.type){case"TEXT_SHORT":case"TEXT_LONG":case"RICH_TEXT":case"EMAIL":case"URL":case"PHONE":case"SLUG":case"COLOR":case"SELECT":case"PASSWORD":case"ICON":case"GRADIENT":default:return"String";case"NUMBER":case"PERCENT":case"RATING":case"SCORE":case"CURRENCY":return"Float";case"BOOLEAN":return"Boolean";case"DATE":case"DATE_TIME":case"TIME":return"DateTime";case"IMAGE":case"VIDEO":case"AUDIO":case"FILE":case"DOCUMENT":return"Asset";case"GALLERY":return"[Asset]";case"JSON":case"CODE":case"KEY_VALUE":return"JSON";case"OBJECT":case"SECTION":return e.fields?_O(e.name):"JSON";case"LIST":case"ARRAY":return e.fields&&e.fields.length>0?`[${AO(e.fields[0])}]`:"[String]";case"REFERENCE":return"ID";case"REFERENCE_LIST":return"[ID]";case"LOCATION":case"COORDINATES":return"GeoPoint"}}function _O(e){return e.replace(/[^a-zA-Z0-9]+(.)/g,(e,t)=>t.toUpperCase()).replace(/^[a-z]/,e=>e.toUpperCase())}function DO(e){return e.replace(/[^a-zA-Z0-9]+(.)/g,(e,t)=>t.toUpperCase()).replace(/^[A-Z]/,e=>e.toLowerCase())}function MO(e){const t=(0,S.c)(8);let n,r,a,o;return t[0]!==e?(({className:n,...r}=e),t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]),t[3]!==n?(a=Lp("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),t[3]=n,t[4]=a):a=t[4],t[5]!==r||t[6]!==a?(o=(0,Rc.jsx)("textarea",{"data-slot":"textarea",className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function LO(e){const t=(0,S.c)(12);let n,r,a,o;t[0]!==e?(({className:n,orientation:a,decorative:o,...r}=e),t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o):(n=t[1],r=t[2],a=t[3],o=t[4]);const i=void 0===a?"horizontal":a,s=void 0===o||o;let l,c;return t[5]!==n?(l=Lp("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",n),t[5]=n,t[6]=l):l=t[6],t[7]!==s||t[8]!==i||t[9]!==r||t[10]!==l?(c=(0,Rc.jsx)(tT,{"data-slot":"separator",decorative:s,orientation:i,className:l,...r}),t[7]=s,t[8]=i,t[9]=r,t[10]=l,t[11]=c):c=t[11],c}function IO(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,Rc.jsx)(Wb,{"data-slot":"collapsible",...n}),t[2]=n,t[3]=r):r=t[3],r}function zO(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,Rc.jsx)(Ub,{"data-slot":"collapsible-trigger",...n}),t[2]=n,t[3]=r):r=t[3],r}function FO(e){const t=(0,S.c)(4);let n,r;return t[0]!==e?(({...n}=e),t[0]=e,t[1]=n):n=t[1],t[2]!==n?(r=(0,Rc.jsx)($b,{"data-slot":"collapsible-content",...n}),t[2]=n,t[3]=r):r=t[3],r}var BO=()=>`item_${Math.random().toString(36).substring(2,10)}`;function UO({node:e,projectId:t}){const n=zm(),r="COLLECTION"===e.type,[a,o]=(0,k.useState)(r?[]:{}),[i,s]=(0,k.useState)("idle"),[l,c]=(0,k.useState)(null),{data:u,isLoading:d}=Hm({queryKey:["project-content",t],queryFn:async()=>(await Pv.get(`/content/${t}/data`)).data,staleTime:0,gcTime:0});(0,k.useEffect)(()=>{let t=!0;const n=requestAnimationFrame(()=>{if(t)if(u?.data){const t=u.data[e.apiKey];o(r?(Array.isArray(t)?t:[]).map(e=>({...e,status:e.status||"draft"})):t&&"object"==typeof t&&!Array.isArray(t)?t:{})}else o(r?[]:{})});return()=>{t=!1,cancelAnimationFrame(n)}},[u,e.apiKey,r]);const f=qm({mutationFn:async r=>{const a={...n.getQueryData(["project-content",t])?.data||{},[e.apiKey]:r};return(await Pv.put(`/content/${t}/data`,{data:a})).data},onMutate:()=>s("saving"),onSuccess:()=>{s("saved"),n.invalidateQueries({queryKey:["project-content",t]}),setTimeout(()=>s("idle"),1500)},onError:e=>{s("error"),oh.error("Failed to save content preview",{description:"Your changes are preserved locally."})}}),h=(0,k.useMemo)(()=>(0,Rv.default)(e=>f.mutate(e),800),[f]);(0,k.useEffect)(()=>()=>{h.cancel()},[h]);const p=(0,k.useCallback)(()=>{h.flush()},[h]),m=(0,k.useCallback)((e,t)=>{o(n=>{const r={...n,[e]:t};return h(r),r})},[h]),g=(0,k.useCallback)(e=>{o(e),h(e)},[h]),y=(0,k.useCallback)((e,t)=>{t.stopPropagation();const n=[...a],r=n[e].status||"draft";n[e]={...n[e],status:"draft"===r?"published":"draft"},g(n),oh.success("Record updated to "+("draft"===r?"Published":"Draft"))},[a,g]),v=(0,k.useCallback)((e,t)=>{if(t.stopPropagation(),confirm("Are you sure you want to delete this record?")){const t=[...a];t.splice(e,1),g(t),l===e&&c(null),oh.success("Record deleted")}},[a,l,g]),b=(0,k.useCallback)((e,t)=>{t.stopPropagation();const n={...a[e],id:BO(),status:"draft"};"string"==typeof n.name?n.name+=" (Copy)":"string"==typeof n.title&&(n.title+=" (Copy)"),g([...a,n]),oh.success("Record duplicated")},[a,g]),x=(0,k.useMemo)(()=>e.fields.filter(e=>!e.isHidden),[e.fields]),{completedFields:w,totalExpectedFields:S}=(0,k.useMemo)(()=>{let e,t=0;if(r){const n=a;e=n.length*x.length,n.forEach(e=>{x.forEach(n=>{const r=e[n.name];null==r||""===r||Array.isArray(r)&&0===r.length||t++})})}else e=x.length,x.forEach(e=>{const n=a[e.name];null==n||""===n||Array.isArray(n)&&0===n.length||t++});return{completedFields:t,totalExpectedFields:e}},[r,a,x]),E=S>0?Math.round(w/S*100):0;return d?(0,Rc.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3",children:[(0,Rc.jsx)(Tf,{className:"h-6 w-6 animate-spin text-indigo-500"}),(0,Rc.jsx)("span",{className:"text-xs text-gray-500",children:"Loading preview…"})]}):(0,Rc.jsx)(OR,{children:(0,Rc.jsxs)("div",{className:"max-w-3xl mx-auto pb-12 px-6 py-6",children:[(0,Rc.jsxs)("div",{className:"mb-6 rounded-xl border border-white/8 bg-linear-to-br from-[#0d0e15] to-[#0a0b10] overflow-hidden shadow-xl",children:[(0,Rc.jsx)("div",{className:"p-5",children:(0,Rc.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,Rc.jsxs)("div",{className:"min-w-0",children:[(0,Rc.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[r?(0,Rc.jsx)(Kd,{className:"h-4 w-4 text-violet-400 shrink-0"}):(0,Rc.jsx)(Cd,{className:"h-4 w-4 text-cyan-400 shrink-0"}),(0,Rc.jsx)("h2",{className:"text-base font-bold text-white truncate",children:e.name}),(0,Rc.jsx)(RR,{variant:"outline",className:Lp("text-[9px] px-1.5 py-0 h-4 shrink-0",r?"text-violet-400 border-violet-500/30 bg-violet-500/10":"text-cyan-400 border-cyan-500/30 bg-cyan-500/10"),children:e.type})]}),(0,Rc.jsx)("p",{className:"text-[10px] font-mono text-gray-600 mt-0.5",children:e.apiKey}),e.description&&(0,Rc.jsx)("p",{className:"text-xs text-gray-400 mt-2 leading-relaxed",children:e.description})]}),(0,Rc.jsxs)("div",{className:"flex flex-col items-end gap-2 shrink-0",children:["saving"===i&&(0,Rc.jsxs)(RR,{variant:"outline",className:"text-amber-400 border-amber-500/30 bg-amber-500/5 text-[10px] whitespace-nowrap",children:[(0,Rc.jsx)(Tf,{className:"h-2.5 w-2.5 mr-1 animate-spin"})," ","Saving…"]}),"saved"===i&&(0,Rc.jsxs)(RR,{variant:"outline",className:"text-emerald-400 border-emerald-500/30 bg-emerald-500/5 text-[10px] whitespace-nowrap",children:[(0,Rc.jsx)(bd,{className:"h-2.5 w-2.5 mr-1"})," Saved"]}),"error"===i&&(0,Rc.jsxs)(RR,{variant:"outline",className:"text-red-400 border-red-500/30 bg-red-500/5 text-[10px] whitespace-nowrap",children:[(0,Rc.jsx)(vd,{className:"h-2.5 w-2.5 mr-1"})," Error"]}),(0,Rc.jsxs)(yR,{size:"sm",className:"h-7 px-3 text-[11px] bg-indigo-600 hover:bg-indigo-500 text-white gap-1.5",onClick:()=>f.mutate(a),disabled:"saving"===i,children:["saving"===i?(0,Rc.jsx)(Tf,{className:"h-3 w-3 animate-spin"}):(0,Rc.jsx)(Of,{className:"h-3 w-3"}),"Save Preview"]})]})]})}),(0,Rc.jsxs)("div",{className:"px-5 pb-4",children:[(0,Rc.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,Rc.jsx)("span",{className:"text-[9px] font-bold text-gray-600 uppercase tracking-wider",children:"Preview Content Completion"}),(0,Rc.jsxs)("span",{className:"text-[9px] font-mono text-gray-500",children:[w,"/",S," fields"]})]}),(0,Rc.jsx)("div",{className:"h-1 bg-white/5 rounded-full overflow-hidden",children:(0,Rc.jsx)("div",{className:"h-full bg-linear-to-r from-indigo-600 to-violet-600 rounded-full transition-all duration-500",style:{width:`${E}%`}})})]})]}),0===x.length?(0,Rc.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 text-center border border-dashed border-white/10 rounded-2xl",children:[(0,Rc.jsx)("div",{className:"h-12 w-12 rounded-xl bg-white/3 border border-white/6 flex items-center justify-center mb-3",children:(0,Rc.jsx)(Cd,{className:"h-5 w-5 text-gray-600"})}),(0,Rc.jsx)("p",{className:"text-sm font-medium text-gray-400",children:"No fields yet"}),(0,Rc.jsx)("p",{className:"text-xs text-gray-600 mt-1",children:"Add fields to this schema to start previewing the content entry UI."})]}):r?(0,Rc.jsxs)("div",{className:"space-y-4",children:[(0,Rc.jsxs)("div",{className:"flex items-center justify-between pb-3 border-b border-white/10",children:[(0,Rc.jsxs)("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest",children:["Collection Records (",(a||[]).length,")"]}),(0,Rc.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rc.jsxs)("span",{className:"flex items-center gap-1.5 text-[10px] font-bold text-emerald-400 bg-emerald-500/10 px-2.5 py-1 rounded-full border border-emerald-500/20",children:[(0,Rc.jsx)("div",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400"}),(a||[]).filter(e=>"published"===e.status).length," ","Published"]}),(0,Rc.jsxs)("span",{className:"flex items-center gap-1.5 text-[10px] font-bold text-amber-400 bg-amber-500/10 px-2.5 py-1 rounded-full border border-amber-500/20",children:[(0,Rc.jsx)("div",{className:"h-1.5 w-1.5 rounded-full bg-amber-400"}),(a||[]).filter(e=>"published"!==e.status).length," ","Drafts"]})]})]}),(a||[]).map((e,t)=>{const n=((e,t)=>{if(!e)return`Record ${t+1}`;for(const n of["name","title","label","headline","subject"])if("string"==typeof e[n]&&e[n].trim())return e[n].trim();return`Record ${t+1}`})(e,t),r=(e=>{if(!e)return null;for(const t of["description","content","bio","excerpt","summary","subtitle"])if("string"==typeof e[t]&&e[t].trim())return e[t].trim();return null})(e),o=e.status||"draft",i=l===t;return(0,Rc.jsxs)("div",{className:Lp("group relative rounded-xl border transition-all duration-300 overflow-hidden",i?"border-violet-500/40 bg-[#0A0B10] shadow-2xl shadow-violet-500/10":"border-white/10 bg-white/5 hover:border-white/20 hover:bg-white/10 cursor-pointer"),children:[(0,Rc.jsxs)("div",{className:"flex flex-col p-4",onClick:()=>c(i?null:t),children:[(0,Rc.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Rc.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,Rc.jsx)("div",{className:Lp("h-2.5 w-2.5 rounded-full shrink-0 shadow-sm","published"===o?"bg-emerald-500 shadow-emerald-500/50":"bg-amber-500 shadow-amber-500/50")}),(0,Rc.jsx)("span",{className:Lp("text-sm font-bold truncate max-w-[200px] sm:max-w-sm transition-colors",i?"text-violet-300":"text-gray-100"),children:n}),(0,Rc.jsx)(RR,{variant:"outline",className:Lp("text-[9px] uppercase tracking-widest px-2 py-0.5 hidden sm:flex shrink-0","published"===o?"text-emerald-400 bg-emerald-500/10 border-emerald-500/30":"text-amber-400 bg-amber-500/10 border-amber-500/30"),children:o})]}),(0,Rc.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,Rc.jsxs)("div",{className:Lp("flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity bg-black/40 px-1.5 py-1 rounded-lg backdrop-blur-sm border border-white/5 mr-2",i&&"opacity-100"),children:[(0,Rc.jsxs)(PR,{children:[(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",className:"h-6 w-6 text-gray-400 hover:text-emerald-400",onClick:e=>y(t,e),children:"published"===o?(0,Rc.jsx)(_d,{className:"h-3 w-3"}):(0,Rc.jsx)(Pf,{className:"h-3 w-3"})})}),(0,Rc.jsx)(_R,{children:"published"===o?"Unpublish":"Publish"})]}),(0,Rc.jsxs)(PR,{children:[(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",className:"h-6 w-6 text-gray-400 hover:text-blue-400",onClick:e=>b(t,e),children:(0,Rc.jsx)(Wd,{className:"h-3 w-3"})})}),(0,Rc.jsx)(_R,{children:"Duplicate"})]}),(0,Rc.jsxs)(PR,{children:[(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",className:"h-6 w-6 text-gray-400 hover:text-red-400",onClick:e=>v(t,e),children:(0,Rc.jsx)(Ff,{className:"h-3 w-3"})})}),(0,Rc.jsx)(_R,{children:"Delete"})]})]}),(0,Rc.jsx)("div",{className:"h-6 w-6 flex items-center justify-center text-gray-500",children:i?(0,Rc.jsx)(Vd,{className:"h-4 w-4"}):(0,Rc.jsx)(Sd,{className:"h-4 w-4"})})]})]}),!i&&r&&(0,Rc.jsx)("div",{className:"line-clamp-2 text-xs text-gray-400 leading-relaxed pr-8 pl-5",children:r})]}),(0,Rc.jsx)(Ic,{children:i&&(0,Rc.jsx)(ld.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden border-t border-white/5",children:(0,Rc.jsx)("div",{className:"p-6 space-y-6 bg-black/20",children:x.map(n=>(0,Rc.jsx)(VO,{field:n,value:e[n.name],onChange:e=>{const r=[...a];r[t]={...r[t],[n.name]:e},g(r)},onBlur:p},n.id))})})})]},e.id||t)}),(0,Rc.jsxs)(yR,{className:"w-full border border-dashed border-white/15 bg-white/2 hover:bg-white/5 hover:border-violet-500/50 text-gray-300 hover:text-violet-300 h-12 transition-all rounded-xl",onClick:()=>{const e=a||[],t={id:BO(),status:"draft"};x.forEach(e=>{t[e.name]=e.defaultValue??nP(e.type)}),g([...e,t]),c(e.length)},children:[(0,Rc.jsx)(Nf,{className:"h-4 w-4 mr-2"})," Add Collection Record"]})]}):(0,Rc.jsx)("div",{className:"space-y-6",children:x.map(e=>(0,Rc.jsx)(VO,{field:e,value:a[e.name],onChange:t=>m(e.name,t),onBlur:p},e.id))})]})})}function VO({field:e,value:t,onChange:n,onBlur:r,depth:a=0}){const[o,i]=(0,k.useState)(!0),[s,l]=(0,k.useState)(!1),[c,u]=(0,k.useState)(null),[d,f]=(0,k.useState)(!1),[h,p]=(0,k.useState)(null),[m,g]=(0,k.useState)(null),y=a>0,v=(0,k.useMemo)(()=>e.options?e.options.map(e=>"string"==typeof e?{value:e,label:e}:e):[],[e.options]),b=()=>{switch(e.type){case"TEXT_SHORT":case"SLUG":return(0,Rc.jsxs)("div",{className:"relative",children:["SLUG"===e.type&&(0,Rc.jsx)(sf,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-500 pointer-events-none"}),(0,Rc.jsx)(vR,{type:"text",value:"string"==typeof t?t:"",onChange:t=>{let r=t.target.value;"SLUG"===e.type&&(r=r.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")),n(r)},onBlur:r,placeholder:e.placeholder||`Enter ${e.label.toLowerCase()}…`,className:Lp("bg-black/40 border-white/8 text-sm focus:border-indigo-500/60 focus:ring-0 transition-colors","SLUG"===e.type&&"pl-9 font-mono text-indigo-300")}),"SLUG"===e.type&&(0,Rc.jsx)(yR,{type:"button",variant:"ghost",size:"icon",className:"absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7 text-gray-500 hover:text-indigo-400",title:"Auto-generate",onClick:()=>oh.info("Generates slug based on surrounding title fields."),children:(0,Rc.jsx)(Rf,{className:"h-3.5 w-3.5"})})]});case"PASSWORD":return(0,Rc.jsx)(HO,{value:"string"==typeof t?t:"",onChange:n,onBlur:r,placeholder:e.placeholder});case"TEXT_LONG":return(0,Rc.jsx)(MO,{value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,placeholder:e.placeholder||`Enter ${e.label.toLowerCase()}…`,rows:4,className:"bg-black/40 border-white/8 resize-y text-sm focus:border-indigo-500/60 focus:ring-0 transition-colors"});case"RICH_TEXT":return(0,Rc.jsx)(tP,{value:"string"==typeof t?t:"",onChange:n,onBlur:r,placeholder:e.placeholder});case"NUMBER":case"PERCENT":case"CURRENCY":{const a=.01,o=e.config?.min,i=e.config?.max;return(0,Rc.jsxs)("div",{className:"relative flex items-center",children:["CURRENCY"===e.type&&(0,Rc.jsx)(Gd,{className:"absolute left-3 h-3.5 w-3.5 text-gray-500"}),(0,Rc.jsx)(vR,{type:"number",value:"number"==typeof t?t:"",onChange:e=>n(parseFloat(e.target.value)||0),onBlur:r,min:o,max:i,step:a,placeholder:e.placeholder||"0",className:Lp("bg-black/40 border-white/8 focus:border-indigo-500/60 focus:ring-0 font-mono","CURRENCY"===e.type&&"pl-9","PERCENT"===e.type&&"pr-9")}),"PERCENT"===e.type&&(0,Rc.jsx)(kf,{className:"absolute right-3 h-3.5 w-3.5 text-gray-500"})]})}case"RATING":{const a="number"==typeof t?t:0,o=e.config?.max??5;return(0,Rc.jsxs)("div",{className:"flex items-center gap-2 bg-black/20 border border-white/6 p-3 rounded-xl",children:[(0,Rc.jsx)("div",{className:"flex gap-1",children:Array.from({length:o}).map((e,t)=>{const o=t+1;return(0,Rc.jsx)("button",{type:"button",onMouseEnter:()=>u(o),onMouseLeave:()=>u(null),onClick:()=>{n(o),r()},className:"transition-transform active:scale-95 hover:scale-110",children:(0,Rc.jsx)(Mf,{className:Lp("h-5 w-5 transition-colors",o<=(c??a)?"fill-amber-400 text-amber-400 drop-shadow-[0_0_8px_rgba(251,191,36,0.5)]":"text-white/20 fill-transparent hover:text-amber-300")})},t)})}),(0,Rc.jsxs)("span",{className:"text-xs font-mono font-bold text-gray-500 mt-1 ml-2",children:["(",a," / ",o,")"]})]})}case"PROGRESS":{const e="number"==typeof t?t:0;return(0,Rc.jsxs)("div",{className:"space-y-2 bg-black/20 border border-white/6 p-4 rounded-xl",children:[(0,Rc.jsxs)("div",{className:"flex justify-between items-center text-xs font-bold text-gray-500",children:[(0,Rc.jsx)("span",{children:"Progress Indicator"}),(0,Rc.jsxs)("span",{className:"font-mono text-indigo-400",children:[e,"%"]})]}),(0,Rc.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Rc.jsx)("input",{type:"range",min:"0",max:"100",value:e,onChange:e=>{n(parseInt(e.target.value,10)),r()},className:"flex-1 accent-indigo-500 bg-white/10 rounded-lg h-1.5 appearance-none cursor-pointer"}),(0,Rc.jsx)(vR,{type:"number",min:"0",max:"100",value:e,onChange:e=>{let t=parseInt(e.target.value,10);isNaN(t)&&(t=0),n(Math.max(0,Math.min(100,t)))},onBlur:r,className:"w-16 text-center text-xs font-mono font-bold h-8 bg-black/40 border border-white/10 focus:border-indigo-500/50"})]})]})}case"SCORE":{const e="number"==typeof t?t:0;return(0,Rc.jsxs)("div",{className:"space-y-3 bg-black/20 border border-white/6 p-4 rounded-xl",children:[(0,Rc.jsxs)("div",{className:"flex justify-between items-center text-xs font-bold text-gray-500",children:[(0,Rc.jsx)("span",{children:"Metric Score"}),(0,Rc.jsxs)("span",{className:"font-mono text-emerald-400",children:[e," / 100"]})]}),(0,Rc.jsx)("div",{className:"h-1.5 w-full bg-white/5 rounded-full overflow-hidden",children:(0,Rc.jsx)("div",{className:"h-full bg-linear-to-r from-emerald-500 to-teal-400 transition-all duration-300",style:{width:`${e}%`}})}),(0,Rc.jsx)(vR,{type:"number",value:e,onChange:e=>{let t=parseInt(e.target.value,10);isNaN(t)&&(t=0),n(Math.max(0,Math.min(100,t)))},onBlur:r,className:"w-full bg-black/40 border-white/10 text-center font-mono font-bold focus:border-emerald-500/50",placeholder:"Assign Score 0-100"})]})}case"METRIC_CARD":{const e=t||{};return(0,Rc.jsxs)("div",{className:"space-y-3 bg-black/20 border border-white/6 p-4 rounded-xl",children:[(0,Rc.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,Rc.jsxs)("div",{children:[(0,Rc.jsx)("label",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-wider mb-1.5 block",children:"Prefix"}),(0,Rc.jsx)(vR,{type:"text",placeholder:"$",value:e.prefix||"",onChange:t=>n({...e,prefix:t.target.value}),onBlur:r,className:"bg-black/40 border-white/8 text-xs font-mono focus:border-indigo-500/50"})]}),(0,Rc.jsxs)("div",{children:[(0,Rc.jsx)("label",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-wider mb-1.5 block",children:"Main Stat"}),(0,Rc.jsx)(vR,{type:"text",placeholder:"1,280",value:e.stat||"",onChange:t=>n({...e,stat:t.target.value}),onBlur:r,className:"bg-black/40 border-white/8 text-xs font-bold focus:border-indigo-500/50"})]})]}),(0,Rc.jsxs)("div",{children:[(0,Rc.jsx)("label",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-wider mb-1.5 block",children:"Suffix"}),(0,Rc.jsx)(vR,{type:"text",placeholder:"/ mo",value:e.suffix||"",onChange:t=>n({...e,suffix:t.target.value}),onBlur:r,className:"bg-black/40 border-white/8 text-xs focus:border-indigo-500/50"})]}),(0,Rc.jsxs)("div",{className:"border border-white/5 rounded-lg bg-white/2 p-4 flex flex-col items-center justify-center mt-2 shadow-inner",children:[(0,Rc.jsx)("span",{className:"text-[9px] font-bold text-gray-600 uppercase tracking-widest",children:"Preview"}),(0,Rc.jsxs)("div",{className:"text-2xl font-black mt-1 text-white",children:[(0,Rc.jsx)("span",{className:"text-gray-400",children:e.prefix||""}),e.stat||"0",(0,Rc.jsx)("span",{className:"text-sm font-medium text-gray-500 ml-1",children:e.suffix||""})]})]})]})}case"BOOLEAN":return(0,Rc.jsxs)("div",{className:"flex items-center gap-3 py-1",children:[(0,Rc.jsx)(xR,{checked:"boolean"==typeof t&&t,onCheckedChange:e=>{n(e),r()},className:"data-[state=checked]:bg-indigo-500"}),(0,Rc.jsx)("span",{className:Lp("text-sm font-medium transition-colors",t?"text-indigo-300":"text-gray-500"),children:t?"Enabled":"Disabled"})]});case"WORKFLOW_STATE":return(0,Rc.jsx)("div",{className:"flex items-center flex-wrap gap-2",children:["draft","review","approved","published"].map(e=>(0,Rc.jsx)("button",{onClick:()=>{n(e),r()},className:Lp("rounded-full px-3 py-1.5 text-xs font-semibold capitalize transition-all border",t===e?"bg-indigo-500/20 text-indigo-300 border-indigo-500/40 shadow-[0_0_10px_rgba(99,102,241,0.2)]":"bg-white/5 text-gray-500 border-transparent hover:bg-white/10 hover:text-gray-300"),children:e},e))});case"DATE":return(0,Rc.jsx)(vR,{type:"date",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,className:"bg-black/40 border-white/8 text-sm focus:border-indigo-500/60 focus:ring-0 scheme-dark"});case"DATE_TIME":{const e=t||"",a=e.split("T")[0]||"",o=e.split("T")[1]||"";return(0,Rc.jsxs)("div",{className:"flex gap-2",children:[(0,Rc.jsx)(vR,{type:"date",value:a,onChange:e=>{const t=o||"12:00";n(`${e.target.value}T${t}`)},onBlur:r,className:"flex-1 bg-black/40 border-white/8 text-sm focus:border-indigo-500/60 focus:ring-0 scheme-dark"}),(0,Rc.jsx)(vR,{type:"time",value:o,onChange:e=>{n(`${a||(new Date).toISOString().split("T")[0]}T${e.target.value}`)},onBlur:r,className:"flex-1 bg-black/40 border-white/8 text-sm focus:border-indigo-500/60 focus:ring-0 scheme-dark"})]})}case"TIME":return(0,Rc.jsxs)("div",{className:"relative",children:[(0,Rc.jsx)($d,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-500 pointer-events-none"}),(0,Rc.jsx)(vR,{type:"time",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,className:"pl-9 bg-black/40 border-white/8 text-sm focus:border-indigo-500/60 focus:ring-0 scheme-dark"})]});case"IMAGE":case"VIDEO":case"AUDIO":case"FILE":case"DOCUMENT":case"LOTTIE":case"ASSET_SELECT":{const a=t||"",o="IMAGE"===e.type||"ASSET_SELECT"===e.type,i="VIDEO"===e.type,s="AUDIO"===e.type,l="LOTTIE"===e.type;return(0,Rc.jsxs)("div",{className:"space-y-3",children:[a?(0,Rc.jsxs)(Rc.Fragment,{children:[o&&(0,Rc.jsxs)("div",{className:"group relative aspect-video w-full max-w-sm rounded-xl overflow-hidden border border-white/10 bg-black/60 shadow-lg",children:[(0,Rc.jsx)("img",{src:a,alt:e.label,className:"h-full w-full object-cover transition-transform duration-500 group-hover:scale-105",onError:e=>{e.target.style.display="none"}}),(0,Rc.jsxs)("div",{className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-3 backdrop-blur-[2px]",children:[(0,Rc.jsx)(yR,{size:"icon",variant:"secondary",onClick:()=>g(a),className:"h-8 w-8 bg-white/10 hover:bg-white/20 border border-white/20 text-white",children:(0,Rc.jsx)(xf,{className:"h-3.5 w-3.5"})}),(0,Rc.jsx)(yR,{size:"icon",variant:"secondary",onClick:()=>window.open(a,"_blank"),className:"h-8 w-8 bg-white/10 hover:bg-white/20 border border-white/20 text-white",children:(0,Rc.jsx)(Xd,{className:"h-3.5 w-3.5"})}),(0,Rc.jsx)(yR,{size:"icon",variant:"destructive",onClick:()=>{n(""),r()},className:"h-8 w-8 bg-red-500/80 hover:bg-red-500 border border-red-500 text-white",children:(0,Rc.jsx)(Ff,{className:"h-3.5 w-3.5"})})]})]}),i&&(0,Rc.jsx)("div",{className:"relative aspect-video w-full max-w-sm rounded-xl overflow-hidden border border-white/10 bg-black/60 shadow-lg",children:(0,Rc.jsx)("video",{src:a,className:"h-full w-full object-cover",controls:!0})}),s&&(0,Rc.jsxs)("div",{className:"flex items-center gap-3 p-3 rounded-xl border border-white/10 bg-white/5",children:[(0,Rc.jsx)("div",{className:"h-10 w-10 rounded-lg bg-indigo-500/20 flex items-center justify-center shrink-0",children:(0,Rc.jsx)(wf,{className:"h-5 w-5 text-indigo-400"})}),(0,Rc.jsx)("audio",{src:a,controls:!0,className:"w-full h-8"})]}),!o&&!i&&!s&&(0,Rc.jsxs)("div",{className:"flex items-center gap-3 p-3 rounded-xl border border-white/10 bg-white/5",children:[(0,Rc.jsx)("div",{className:"h-10 w-10 rounded-lg bg-indigo-500/20 flex items-center justify-center shrink-0",children:l?(0,Rc.jsx)(Ld,{className:"h-5 w-5 text-indigo-400"}):(0,Rc.jsx)(Zd,{className:"h-5 w-5 text-indigo-400"})}),(0,Rc.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,Rc.jsx)("p",{className:"text-sm font-semibold text-gray-200 truncate",children:a.split("/").pop()}),(0,Rc.jsxs)("p",{className:"text-[9px] text-gray-500 uppercase tracking-widest mt-0.5",children:[e.type," Linked"]})]}),(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",onClick:()=>window.open(a,"_blank"),className:"h-8 w-8 text-gray-400 hover:text-indigo-400",children:(0,Rc.jsx)(Xd,{className:"h-4 w-4"})}),(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",onClick:()=>{n(""),r()},className:"h-8 w-8 text-gray-400 hover:text-red-400",children:(0,Rc.jsx)(Ff,{className:"h-4 w-4"})})]})]}):(0,Rc.jsxs)("div",{onClick:()=>oh.info("Media Library integration coming soon."),className:"cursor-pointer rounded-xl border border-dashed border-white/15 bg-white/2 p-6 text-center hover:border-indigo-500/50 hover:bg-indigo-500/5 transition-all group",children:[o?(0,Rc.jsx)(cf,{className:"mx-auto mb-2 h-8 w-8 text-gray-600 group-hover:text-indigo-400 transition-colors"}):i?(0,Rc.jsx)(qf,{className:"mx-auto mb-2 h-8 w-8 text-gray-600 group-hover:text-indigo-400 transition-colors"}):(0,Rc.jsx)(nf,{className:"mx-auto mb-2 h-8 w-8 text-gray-600 group-hover:text-indigo-400 transition-colors"}),(0,Rc.jsxs)("div",{className:"text-sm font-medium text-gray-400 group-hover:text-indigo-300",children:["Click to browse ",e.type.toLowerCase()," library"]})]}),(0,Rc.jsxs)("div",{className:"relative",children:[(0,Rc.jsx)(hf,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-500 pointer-events-none"}),(0,Rc.jsx)(vR,{type:"url",value:a,onChange:e=>n(e.target.value),onBlur:r,placeholder:`Or paste external ${e.type.toLowerCase()} URL here...`,className:"pl-9 bg-black/40 border-white/8 text-sm focus:border-indigo-500/60 focus:ring-0"}),!o&&!i&&!s&&(0,Rc.jsx)(Hf,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-500 pointer-events-none"})]}),m&&(0,Rc.jsxs)("div",{className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-8",onClick:()=>g(null),children:[(0,Rc.jsx)(yR,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 text-gray-400 hover:text-white",onClick:()=>g(null),children:(0,Rc.jsx)(Wf,{className:"h-5 w-5"})}),(0,Rc.jsx)("img",{src:m,alt:"Full preview",className:"max-w-full max-h-full object-contain rounded-lg",onClick:e=>e.stopPropagation()})]})]})}case"GALLERY":return(0,Rc.jsx)(XO,{images:Array.isArray(t)?t.filter(e=>"string"==typeof e):[],onChange:n,onBlur:r});case"COLOR":return(0,Rc.jsx)(qO,{value:"string"==typeof t?t:"#6366f1",onChange:n,onBlur:r});case"URL":{const e=t||"",a=e=>e&&/\.(jpg|jpeg|png|gif|bmp|webp|svg|avif)$/i.test(e),o=e=>e&&/\.(mp4|webm|ogg|mov)$/i.test(e),i=e=>e&&/\.(mp3|wav|ogg|flac)$/i.test(e),s=e=>e&&e.includes("youtube.com")||e.includes("youtu.be");return(0,Rc.jsxs)("div",{className:"space-y-3",children:[e&&(0,Rc.jsxs)("div",{className:"p-3 bg-black/20 border border-white/6 rounded-xl flex flex-col gap-2",children:[a(e)&&(0,Rc.jsx)("img",{src:e,alt:"Preview",className:"w-full max-h-40 object-contain rounded-lg bg-black/40"}),o(e)&&(0,Rc.jsx)("video",{src:e,controls:!0,className:"w-full max-h-40 rounded-lg bg-black/40"}),i(e)&&(0,Rc.jsx)("audio",{src:e,controls:!0,className:"w-full h-10"}),s(e)&&(0,Rc.jsxs)("div",{className:"flex items-center justify-center bg-red-500/10 border border-red-500/20 text-red-400 py-4 rounded-lg",children:[(0,Rc.jsx)(Cf,{className:"h-6 w-6 mr-2"})," YouTube Video Linked"]}),!a(e)&&!o(e)&&!i(e)&&!s(e)&&(0,Rc.jsxs)("a",{href:e,target:"_blank",rel:"noreferrer",className:"flex items-center gap-3 p-3 rounded-lg hover:bg-white/5 transition-colors border border-white/5",children:[(0,Rc.jsx)("div",{className:"h-8 w-8 rounded-md bg-white/10 flex items-center justify-center",children:(0,Rc.jsx)(af,{className:"h-4 w-4 text-gray-400"})}),(0,Rc.jsx)("div",{className:"min-w-0 flex-1",children:(0,Rc.jsx)("p",{className:"text-xs text-blue-400 truncate",children:e})}),(0,Rc.jsx)(Xd,{className:"h-4 w-4 text-gray-500"})]})]}),(0,Rc.jsxs)("div",{className:"relative",children:[(0,Rc.jsx)(hf,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-500 pointer-events-none"}),(0,Rc.jsx)(vR,{type:"url",value:e,onChange:e=>n(e.target.value),onBlur:r,placeholder:"https://example.com",className:"pl-9 bg-black/40 border-white/8 text-sm focus:border-indigo-500/60 focus:ring-0"})]})]})}case"EMAIL":return(0,Rc.jsxs)("div",{className:"relative",children:[(0,Rc.jsx)(vf,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-500 pointer-events-none"}),(0,Rc.jsx)(vR,{type:"email",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,placeholder:e.placeholder||"hello@example.com",className:"pl-9 bg-black/40 border-white/8 text-sm focus:border-indigo-500/60 focus:ring-0"})]});case"PHONE":return(0,Rc.jsxs)("div",{className:"relative",children:[(0,Rc.jsx)(Ef,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-500 pointer-events-none"}),(0,Rc.jsx)(vR,{type:"tel",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,placeholder:e.placeholder||"+1 (555) 000-0000",className:"pl-9 bg-black/40 border-white/8 text-sm focus:border-indigo-500/60 focus:ring-0"})]});case"SELECT":return(0,Rc.jsxs)(wR,{value:"string"==typeof t?t:"",onValueChange:e=>{n(e),r()},children:[(0,Rc.jsx)(kR,{className:"bg-black/40 border-white/8 text-sm focus:ring-0 focus:border-indigo-500/60",children:(0,Rc.jsx)(SR,{placeholder:"Choose an option…"})}),(0,Rc.jsx)(ER,{className:"bg-[#0d0e15] border-white/10",children:v.map(e=>(0,Rc.jsx)(CR,{value:e.value,children:e.label},e.value))})]});case"MULTI_SELECT":return(0,Rc.jsx)(WO,{selectedValues:Array.isArray(t)?t.filter(e=>"string"==typeof e):[],options:e.options||[],onChange:n,onBlur:r});case"TAG_SELECT":return(0,Rc.jsx)(YO,{tags:Array.isArray(t)?t.filter(e=>"string"==typeof e):[],onChange:n,onBlur:r,placeholder:e.placeholder});case"REFERENCE":return(0,Rc.jsxs)("div",{className:"relative",children:[(0,Rc.jsx)(Kd,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-indigo-400 pointer-events-none"}),(0,Rc.jsx)(vR,{type:"text",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,placeholder:"Select or enter reference ID...",className:"pl-9 bg-black/40 border-white/8 text-sm font-mono focus:border-indigo-500/60 focus:ring-0"}),(0,Rc.jsx)(yR,{type:"button",variant:"ghost",size:"icon",className:"absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7 text-gray-500 hover:text-indigo-400",onClick:()=>oh.info("Reference search dialog coming soon."),children:(0,Rc.jsx)(Xd,{className:"h-3.5 w-3.5"})})]});case"REFERENCE_LIST":{const e=Array.isArray(t)?t.filter(e=>"string"==typeof e):[];return(0,Rc.jsxs)("div",{className:"space-y-2 p-3 rounded-xl bg-black/20 border border-white/6",children:[e.length>0?(0,Rc.jsx)("div",{className:"space-y-1.5",children:e.map((t,a)=>(0,Rc.jsxs)("div",{className:"flex items-center justify-between p-2 rounded-lg bg-white/5 border border-white/5",children:[(0,Rc.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rc.jsx)(Kd,{className:"h-3.5 w-3.5 text-indigo-400"}),(0,Rc.jsx)("span",{className:"text-xs font-mono text-gray-300",children:t})]}),(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",className:"h-6 w-6 text-gray-500 hover:text-red-400",onClick:()=>{n(e.filter((e,t)=>t!==a)),r()},children:(0,Rc.jsx)(Ff,{className:"h-3 w-3"})})]},a))}):(0,Rc.jsx)("div",{className:"text-xs text-gray-500 italic text-center py-2",children:"No references selected"}),(0,Rc.jsx)("div",{className:"flex gap-2",children:(0,Rc.jsx)(vR,{type:"text",placeholder:"Enter ref ID and press Enter...",onKeyDown:t=>{if("Enter"===t.key){t.preventDefault();const a=t.currentTarget;a.value.trim()&&!e.includes(a.value.trim())&&(n([...e,a.value.trim()]),a.value="",r())}},className:"flex-1 bg-black/40 border-white/8 text-sm font-mono focus:border-indigo-500/60 focus:ring-0"})})]})}case"OBJECT":case"SECTION":{const s=t||{};return(0,Rc.jsx)(IO,{open:o,onOpenChange:i,className:"mt-1",children:(0,Rc.jsxs)("div",{className:"rounded-xl border border-white/6 bg-[#0c0d14] overflow-hidden shadow-sm",children:[(0,Rc.jsx)(zO,{asChild:!0,children:(0,Rc.jsxs)(yR,{variant:"ghost",className:"w-full flex items-center justify-between p-3 h-auto hover:bg-white/3 rounded-none border-b border-transparent data-[state=open]:border-white/5",children:[(0,Rc.jsxs)("div",{className:"flex items-center gap-2",children:[o?(0,Rc.jsx)(Bd,{className:"h-3.5 w-3.5 text-gray-500"}):(0,Rc.jsx)(Ud,{className:"h-3.5 w-3.5 text-gray-500"}),(0,Rc.jsx)("span",{className:"text-xs font-semibold text-indigo-300",children:e.label})]}),(0,Rc.jsxs)(RR,{variant:"outline",className:"text-[9px] bg-black/40 border-white/8 text-gray-400",children:[e.fields?.filter(e=>!e.isHidden).length||0," ","fields"]})]})}),(0,Rc.jsx)(FO,{className:"p-4 space-y-4",children:e.fields?.filter(e=>!e.isHidden).map(e=>(0,Rc.jsx)(VO,{field:e,value:s[e.name]??e.defaultValue??null,onChange:t=>n({...s,[e.name]:t}),onBlur:r,depth:a+1},e.id))})]})})}case"LIST":case"ARRAY":{const o=Array.isArray(t)?t:[],i=e.fields?.[0]?.fields||e.fields||[],s=0===i.length;return(0,Rc.jsxs)("div",{className:"space-y-3 mt-1 bg-black/20 p-3 rounded-xl border border-white/6",children:[(0,Rc.jsxs)("div",{className:"space-y-3",children:[o.map((e,t)=>(0,Rc.jsxs)("div",{className:"relative rounded-xl border border-white/8 bg-[#0c0d14] shadow-sm overflow-hidden group",children:[(0,Rc.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b border-white/5 bg-white/2",children:[(0,Rc.jsxs)("div",{className:"flex items-center gap-2 text-[10px] font-bold text-gray-500 uppercase tracking-wider",children:[(0,Rc.jsx)(of,{className:"h-3.5 w-3.5 opacity-40 cursor-grab"}),"Item ",t+1]}),(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",className:"h-6 w-6 text-gray-500 hover:text-red-400 hover:bg-red-500/10 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{n(o.filter((e,n)=>n!==t)),r()},children:(0,Rc.jsx)(Ff,{className:"h-3.5 w-3.5"})})]}),(0,Rc.jsx)("div",{className:"p-4 space-y-4",children:s?(0,Rc.jsx)(vR,{type:"text",value:"string"==typeof e?e:"",onChange:e=>{const r=[...o];r[t]=e.target.value,n(r)},onBlur:r,className:"bg-black/40 border-white/8 text-sm focus:border-indigo-500/60 focus:ring-0",placeholder:"Item value…"}):i.filter(e=>!e.isHidden).map(i=>(0,Rc.jsx)(VO,{field:i,value:e?.[i.name]??i.defaultValue??null,onChange:r=>{const a=[...o];a[t]={...e,[i.name]:r},n(a)},onBlur:r,depth:a+1},i.id))})]},e?.id||t)),0===o.length&&(0,Rc.jsx)("div",{className:"py-6 text-center border border-dashed border-white/10 rounded-xl bg-white/2",children:(0,Rc.jsx)("p",{className:"text-[11px] text-gray-500 font-medium",children:"Empty List"})})]}),(0,Rc.jsxs)(yR,{variant:"outline",className:"w-full h-9 border-dashed border-white/15 hover:border-indigo-500/40 hover:bg-indigo-500/10 text-gray-400 hover:text-indigo-300 text-xs gap-2 transition-all",onClick:()=>{const e=s?"":{id:BO(),...i.reduce((e,t)=>(e[t.name]=t.defaultValue??nP(t.type),e),{})};n([...o,e]),r()},children:[(0,Rc.jsx)(Nf,{className:"h-3.5 w-3.5"})," Add ",e.label]})]})}case"LOCATION":case"COORDINATES":case"MAP":return(0,Rc.jsx)(JO,{value:t||{},onChange:n,onBlur:r});case"GEO_JSON":return(0,Rc.jsxs)("div",{className:"space-y-3 bg-black/20 border border-white/6 p-4 rounded-xl",children:[(0,Rc.jsxs)("div",{className:"flex justify-between items-center text-xs font-bold text-gray-500",children:[(0,Rc.jsx)("span",{children:"GeoJSON Boundary"}),(0,Rc.jsx)("span",{className:"font-mono text-indigo-400",children:"Preview"})]}),(0,Rc.jsx)("pre",{className:"font-mono text-[10px] text-gray-400 bg-black/60 border border-white/5 rounded-lg p-3 overflow-auto max-h-32",children:JSON.stringify(t||{},null,2)}),(0,Rc.jsx)(yR,{type:"button",variant:"secondary",className:"w-full h-8 text-xs bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border border-indigo-500/30",onClick:()=>{n({type:"Feature",geometry:{type:"Polygon",coordinates:[[[-34,18],[-34.5,18.2],[-34.2,18.5],[-34,18]]]},properties:{name:"Default Bounds"}}),r()},children:"Inject Dummy Coordinates"})]});case"KEY_VALUE":return(0,Rc.jsx)(ZO,{pairs:t||{},onChange:n,onBlur:r});case"MATRIX":{const e=t||{},a=Object.entries(e);return(0,Rc.jsxs)("div",{className:"space-y-3 bg-black/20 border border-white/6 p-4 rounded-xl overflow-x-auto",children:[(0,Rc.jsxs)("table",{className:"w-full border-collapse",children:[(0,Rc.jsx)("thead",{children:(0,Rc.jsxs)("tr",{children:[(0,Rc.jsx)("th",{className:"px-2 py-1 text-left text-[10px] font-bold text-gray-500 uppercase border-b border-white/10",children:"Key"}),(0,Rc.jsx)("th",{className:"px-2 py-1 text-left text-[10px] font-bold text-gray-500 uppercase border-b border-white/10",children:"Values"})]})}),(0,Rc.jsx)("tbody",{children:a.map(([e,t],n)=>(0,Rc.jsxs)("tr",{className:"border-b border-white/5",children:[(0,Rc.jsx)("td",{className:"px-2 py-2 text-xs font-mono text-indigo-400",children:e}),(0,Rc.jsx)("td",{className:"px-2 py-2 text-xs font-mono text-gray-400",children:Array.isArray(t)?t.join(", "):String(t)})]},n))})]}),(0,Rc.jsx)(vR,{type:"text",placeholder:"Type key and press Enter...",onKeyDown:t=>{"Enter"===t.key&&(t.preventDefault(),t.currentTarget.value.trim()&&(n({...e,[t.currentTarget.value.trim()]:[]}),t.currentTarget.value="",r()))},className:"bg-black/40 border-white/8 text-xs h-8 focus:border-indigo-500/50"})]})}case"JSON":case"CODE":{const a="object"==typeof t?JSON.stringify(t,null,2):String(t||"");return(0,Rc.jsxs)("div",{className:"space-y-1",children:[(0,Rc.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rc.jsx)("span",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-wider",children:"JSON"===e.type?"JSON Payload":"Source Code"}),(0,Rc.jsx)("button",{onClick:()=>l(!s),className:"text-[9px] text-indigo-400 hover:text-indigo-300",children:s?"Hide":"Expand"})]}),(0,Rc.jsx)(MO,{value:a,onChange:t=>{try{n("JSON"===e.type?JSON.parse(t.target.value):t.target.value)}catch{n(t.target.value)}},onBlur:r,rows:s?12:5,className:"bg-[#0a0b10] border-white/8 font-mono text-emerald-400/90 resize-y text-[11px] focus:border-indigo-500/60 focus:ring-0 leading-relaxed",spellCheck:!1})]})}case"EMBED":{const e=t||"";return(0,Rc.jsxs)("div",{className:"space-y-3",children:[(0,Rc.jsx)(MO,{rows:4,value:e,onChange:e=>n(e.target.value),onBlur:r,placeholder:"<iframe src='...' />",className:"w-full font-mono text-[11px] rounded-xl border border-white/8 bg-black/40 p-3 leading-relaxed focus:border-indigo-500/60 focus:ring-0"}),e&&(0,Rc.jsxs)("div",{className:"border border-white/10 rounded-xl overflow-hidden bg-black/60 p-1",children:[(0,Rc.jsxs)("div",{className:"text-[10px] font-bold text-indigo-400 p-2 border-b border-white/5 uppercase tracking-widest flex items-center gap-1.5",children:[(0,Rc.jsx)(Uf,{className:"h-3.5 w-3.5"})," Output Render"]}),(0,Rc.jsx)("div",{className:"p-3 overflow-auto max-h-48 flex items-center justify-center bg-white/5",dangerouslySetInnerHTML:{__html:e}})]})]})}case"API_RESPONSE":{const e=t||{};return(0,Rc.jsxs)("div",{className:"space-y-3 bg-black/20 border border-white/6 p-4 rounded-xl",children:[(0,Rc.jsx)(vR,{type:"url",placeholder:"https://api.example.com/data",value:e.url||"",onChange:t=>n({...e,url:t.target.value}),onBlur:r,className:"bg-black/40 border-white/8 font-mono text-xs focus:border-indigo-500/60"}),(0,Rc.jsxs)(yR,{type:"button",onClick:async()=>{if(e.url){f(!0);try{const t=await(await fetch(e.url)).json();p(JSON.stringify(t,null,2)),oh.success("Connection successful")}catch(nu){p(String(nu)),oh.error("Connection failed")}finally{f(!1)}}},disabled:d||!e.url,className:"w-full h-8 text-xs bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border border-indigo-500/30",children:[(0,Rc.jsx)(Ad,{className:Lp("h-3.5 w-3.5 mr-1.5",d&&"animate-spin")}),"Test Endpoint"]}),h&&(0,Rc.jsx)("pre",{className:"p-3 bg-black/60 rounded-lg max-h-32 overflow-auto text-[10px] text-emerald-400 font-mono border border-white/5",children:h})]})}case"FORMULA":return(0,Rc.jsxs)("div",{className:"space-y-2 bg-black/20 border border-white/6 p-4 rounded-xl",children:[(0,Rc.jsxs)("div",{className:"flex items-center gap-2 text-xs font-bold text-gray-400",children:[(0,Rc.jsx)(Id,{className:"h-4 w-4 text-indigo-400"})," Expression"]}),(0,Rc.jsx)("code",{className:"text-[11px] text-indigo-300 font-mono block p-2 bg-black/40 rounded border border-white/5",children:e.config?.formula||"N/A"})]});case"CHART":return(0,Rc.jsxs)("div",{className:"rounded-xl border border-white/6 bg-black/20 p-6 text-center",children:[(0,Rc.jsx)(yd,{className:"mx-auto mb-2 h-10 w-10 text-indigo-400"}),(0,Rc.jsx)("div",{className:"text-xs font-medium text-gray-400",children:"Chart Visualization"})]});case"AI_GENERATED":return(0,Rc.jsxs)("div",{className:"relative",children:[(0,Rc.jsx)(MO,{value:t||"",onChange:e=>n(e.target.value),onBlur:r,rows:4,className:"bg-black/40 border-white/8 text-sm focus:border-indigo-500/60 focus:ring-0 pr-12",placeholder:"AI content block..."}),(0,Rc.jsx)(yR,{type:"button",size:"icon",className:"absolute top-2 right-2 h-7 w-7 bg-indigo-500 hover:bg-indigo-400 text-white rounded shadow-lg shadow-indigo-500/20",onClick:()=>{oh.loading("Generating content..."),setTimeout(()=>{n("Nexus generative AI perfectly bridges schema modeling with smart content drafting."),r(),oh.dismiss(),oh.success("Generation complete")},1e3)},children:(0,Rc.jsx)(Pd,{className:"h-3.5 w-3.5"})})]});default:return(0,Rc.jsx)(vR,{type:"text",value:"string"==typeof t?t:"",onChange:e=>n(e.target.value),onBlur:r,placeholder:e.placeholder||"Enter value...",className:"bg-black/40 border-white/8 text-sm focus:border-indigo-500/60 focus:ring-0"})}};return"BOOLEAN"===e.type?(0,Rc.jsxs)("div",{className:Lp("rounded-lg border border-white/6 bg-white/2 p-3",y&&"border-l-2 border-l-indigo-500/40 rounded-l-none"),children:[(0,Rc.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Rc.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rc.jsx)(bR,{className:"text-sm font-medium text-gray-200",children:e.label}),e.validation?.required&&(0,Rc.jsx)("span",{className:"text-red-400 text-xs",children:"*"})]}),b()]}),e.description&&(0,Rc.jsx)("p",{className:"text-[10px] text-gray-500 mt-1 leading-relaxed",children:e.description})]}):(0,Rc.jsxs)("div",{className:Lp("flex flex-col mb-4",y&&"pl-4 border-l border-white/10"),children:[(0,Rc.jsxs)("div",{className:"flex items-center justify-between mb-1.5 group",children:[(0,Rc.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rc.jsxs)(bR,{className:"text-[13px] font-semibold text-gray-200",children:[e.label,e.validation?.required&&(0,Rc.jsx)("span",{className:"text-red-400 ml-1 text-xs",children:"*"})]}),(0,Rc.jsx)("span",{className:"text-[9px] font-mono text-gray-500 bg-white/5 px-1.5 py-0.5 rounded border border-white/5",children:e.name}),(0,Rc.jsx)($O,{type:e.type})]}),("OBJECT"===e.type||"SECTION"===e.type)&&(0,Rc.jsx)("button",{onClick:()=>i(!o),className:"text-gray-500 hover:text-white transition-colors p-1",children:o?(0,Rc.jsx)(Bd,{className:"h-4 w-4"}):(0,Rc.jsx)(Ud,{className:"h-4 w-4"})})]}),e.description&&(0,Rc.jsx)("p",{className:"text-[11px] text-gray-500 mb-2.5 leading-relaxed max-w-[90%]",children:e.description}),(0,Rc.jsx)(Ic,{children:(!["OBJECT","SECTION"].includes(e.type)||o)&&(0,Rc.jsx)(ld.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"w-full",children:b()})})]})}function $O(e){const t=(0,S.c)(8),{type:n}=e;let r;if(t[0]!==n){let e;t[2]===Symbol.for("react.memo_cache_sentinel")?(e=/_/g,t[2]=e):e=t[2],r=n.replace(e," "),t[0]=n,t[1]=r}else r=t[1];const a=r;let o,i;return t[3]!==n?(o=Lp("text-[8px] font-bold uppercase tracking-widest",{TEXT_SHORT:"text-blue-400",TEXT_LONG:"text-blue-400",RICH_TEXT:"text-blue-400",NUMBER:"text-emerald-400",BOOLEAN:"text-orange-400",IMAGE:"text-violet-400",OBJECT:"text-amber-400",LIST:"text-amber-400",SELECT:"text-cyan-400",DATE:"text-pink-400",JSON:"text-gray-400",CODE:"text-gray-400"}[n]||"text-gray-500"),t[3]=n,t[4]=o):o=t[4],t[5]!==a||t[6]!==o?(i=(0,Rc.jsx)("span",{className:o,children:a}),t[5]=a,t[6]=o,t[7]=i):i=t[7],i}function HO(e){const t=(0,S.c)(18),{value:n,onChange:r,onBlur:a,placeholder:o}=e,[i,s]=(0,k.useState)(!1),l=i?"text":"password";let c;t[0]!==r?(c=e=>r(e.target.value),t[0]=r,t[1]=c):c=t[1];const u=o||"••••••••";let d,f,h,p,m;return t[2]!==a||t[3]!==l||t[4]!==c||t[5]!==u||t[6]!==n?(d=(0,Rc.jsx)(vR,{type:l,value:n,onChange:c,onBlur:a,placeholder:u,className:"pr-10 bg-black/40 border-white/8 focus:border-indigo-500/60 focus:ring-0 font-mono text-sm"}),t[2]=a,t[3]=l,t[4]=c,t[5]=u,t[6]=n,t[7]=d):d=t[7],t[8]!==i?(f=()=>s(!i),t[8]=i,t[9]=f):f=t[9],t[10]!==i?(h=i?(0,Rc.jsx)(Qd,{className:"h-4 w-4"}):(0,Rc.jsx)(Jd,{className:"h-4 w-4"}),t[10]=i,t[11]=h):h=t[11],t[12]!==f||t[13]!==h?(p=(0,Rc.jsx)("button",{type:"button",onClick:f,className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-300 transition-colors",children:h}),t[12]=f,t[13]=h,t[14]=p):p=t[14],t[15]!==d||t[16]!==p?(m=(0,Rc.jsxs)("div",{className:"relative",children:[d,p]}),t[15]=d,t[16]=p,t[17]=m):m=t[17],m}function qO(e){const t=(0,S.c)(29),{value:n,onChange:r,onBlur:a}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=["#6366f1","#8b5cf6","#ec4899","#f43f5e","#f97316","#eab308","#22c55e","#14b8a6","#3b82f6","#ffffff","#71717a","#09090b"],t[0]=o):o=t[0];const i=o;let s,l,c,u,d,f,h,p,m,g;return t[1]!==r?(s=e=>r(e.target.value),t[1]=r,t[2]=s):s=t[2],t[3]!==a||t[4]!==s||t[5]!==n?(l=(0,Rc.jsx)("input",{type:"color",value:n,onChange:s,onBlur:a,className:"sr-only"}),t[3]=a,t[4]=s,t[5]=n,t[6]=l):l=t[6],t[7]!==n?(c=(0,Rc.jsx)("div",{className:"h-9 w-12 rounded-md border border-white/10 cursor-pointer shadow-inner",style:{backgroundColor:n}}),t[7]=n,t[8]=c):c=t[8],t[9]!==l||t[10]!==c?(u=(0,Rc.jsxs)("label",{className:"relative cursor-pointer",children:[l,c]}),t[9]=l,t[10]=c,t[11]=u):u=t[11],t[12]===Symbol.for("react.memo_cache_sentinel")?(d=(0,Rc.jsx)(Sf,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-500"}),t[12]=d):d=t[12],t[13]!==r?(f=e=>r(e.target.value),t[13]=r,t[14]=f):f=t[14],t[15]!==a||t[16]!==f||t[17]!==n?(h=(0,Rc.jsxs)("div",{className:"relative flex-1",children:[d,(0,Rc.jsx)(vR,{type:"text",value:n,onChange:f,onBlur:a,placeholder:"#000000",className:"pl-8 bg-black/40 border-white/8 font-mono text-sm focus:border-indigo-500/60"})]}),t[15]=a,t[16]=f,t[17]=n,t[18]=h):h=t[18],t[19]!==u||t[20]!==h?(p=(0,Rc.jsxs)("div",{className:"flex gap-2 items-center",children:[u,h]}),t[19]=u,t[20]=h,t[21]=p):p=t[21],t[22]!==a||t[23]!==r||t[24]!==n?(m=(0,Rc.jsx)("div",{className:"flex flex-wrap gap-1",children:i.map(e=>(0,Rc.jsx)("button",{type:"button",onClick:()=>{r(e),a()},className:Lp("h-5 w-5 rounded cursor-pointer border-2 transition-all hover:scale-110",n===e?"border-white":"border-transparent"),style:{backgroundColor:e},title:e},e))}),t[22]=a,t[23]=r,t[24]=n,t[25]=m):m=t[25],t[26]!==m||t[27]!==p?(g=(0,Rc.jsxs)("div",{className:"space-y-2 p-3 rounded-lg bg-black/20 border border-white/6",children:[p,m]}),t[26]=m,t[27]=p,t[28]=g):g=t[28],g}function WO(e){const t=(0,S.c)(39),{selectedValues:n,options:r,onChange:a,onBlur:o}=e;let i,s,l,c,u,d,f,h,p,m,g,y;if(t[0]!==o||t[1]!==a||t[2]!==r||t[3]!==n){const e=r.map(GO);h="space-y-2 p-3 rounded-lg bg-black/20 border border-white/6",t[13]!==o||t[14]!==a||t[15]!==n?(p=n.length>0&&(0,Rc.jsx)("div",{className:"flex flex-wrap gap-1.5",children:n.map((e,t)=>(0,Rc.jsxs)(RR,{variant:"secondary",className:"gap-1 bg-indigo-500/15 border border-indigo-500/20 text-indigo-300 hover:bg-indigo-500/25 text-xs",children:[e,(0,Rc.jsx)("button",{onClick:()=>{a(n.filter((e,n)=>n!==t)),o()},className:"ml-0.5 text-indigo-400 hover:text-white",children:(0,Rc.jsx)(Wf,{className:"h-2.5 w-2.5"})})]},t))}),t[13]=o,t[14]=a,t[15]=n,t[16]=p):p=t[16],s=wR,u="",t[17]!==o||t[18]!==a||t[19]!==n?(d=e=>{e&&!n.includes(e)&&(a([...n,e]),o())},t[17]=o,t[18]=a,t[19]=n,t[20]=d):d=t[20];const m=n.length>0?"Add more…":"Choose options…";let g;t[21]!==m?(f=(0,Rc.jsx)(kR,{className:"bg-black/40 border-white/8 focus:ring-0 focus:border-indigo-500/60",children:(0,Rc.jsx)(SR,{placeholder:m})}),t[21]=m,t[22]=f):f=t[22],i=ER,l="bg-[#0d0e15] border-white/8",t[23]!==n?(g=e=>!n.includes(e.value),t[23]=n,t[24]=g):g=t[24],c=e.filter(g).map(KO),t[0]=o,t[1]=a,t[2]=r,t[3]=n,t[4]=i,t[5]=s,t[6]=l,t[7]=c,t[8]=u,t[9]=d,t[10]=f,t[11]=h,t[12]=p}else i=t[4],s=t[5],l=t[6],c=t[7],u=t[8],d=t[9],f=t[10],h=t[11],p=t[12];return t[25]!==i||t[26]!==l||t[27]!==c?(m=(0,Rc.jsx)(i,{className:l,children:c}),t[25]=i,t[26]=l,t[27]=c,t[28]=m):m=t[28],t[29]!==s||t[30]!==u||t[31]!==d||t[32]!==f||t[33]!==m?(g=(0,Rc.jsxs)(s,{value:u,onValueChange:d,children:[f,m]}),t[29]=s,t[30]=u,t[31]=d,t[32]=f,t[33]=m,t[34]=g):g=t[34],t[35]!==h||t[36]!==p||t[37]!==g?(y=(0,Rc.jsxs)("div",{className:h,children:[p,g]}),t[35]=h,t[36]=p,t[37]=g,t[38]=y):y=t[38],y}function KO(e){return(0,Rc.jsx)(CR,{value:e.value,children:e.label},e.value)}function GO(e){return"string"==typeof e?{value:e,label:e}:e}function YO(e){const t=(0,S.c)(31),{tags:n,onChange:r,onBlur:a,placeholder:o}=e,[i,s]=(0,k.useState)("");let l;t[0]!==a||t[1]!==r||t[2]!==n?(l=e=>{const t=e.trim();t&&!n.includes(t)&&(r([...n,t]),s(""),a())},t[0]=a,t[1]=r,t[2]=n,t[3]=l):l=t[3];const c=l;let u,d,f,h;t[4]!==a||t[5]!==r||t[6]!==n?(u=n.length>0&&(0,Rc.jsx)("div",{className:"flex flex-wrap gap-1.5",children:n.map((e,t)=>(0,Rc.jsxs)(RR,{variant:"secondary",className:"gap-1 bg-white/6 border border-white/8 text-gray-300 hover:bg-white/10 text-xs",children:[e,(0,Rc.jsx)("button",{onClick:()=>{r(n.filter((e,n)=>n!==t)),a()},className:"ml-0.5 text-gray-500 hover:text-red-400",children:(0,Rc.jsx)(Wf,{className:"h-2.5 w-2.5"})})]},t))}),t[4]=a,t[5]=r,t[6]=n,t[7]=u):u=t[7],t[8]===Symbol.for("react.memo_cache_sentinel")?(d=e=>s(e.target.value),t[8]=d):d=t[8],t[9]!==c||t[10]!==i?(f=e=>{"Enter"!==e.key&&","!==e.key||(e.preventDefault(),c(i))},h=()=>c(i),t[9]=c,t[10]=i,t[11]=f,t[12]=h):(f=t[11],h=t[12]);const p=o||"Type a tag and press Enter…";let m,g,y,v,b,x,w;return t[13]!==i||t[14]!==f||t[15]!==h||t[16]!==p?(m=(0,Rc.jsx)(vR,{type:"text",value:i,onChange:d,onKeyDown:f,onBlur:h,placeholder:p,className:"flex-1 bg-black/40 border-white/8 text-sm focus:border-indigo-500/60 focus:ring-0"}),t[13]=i,t[14]=f,t[15]=h,t[16]=p,t[17]=m):m=t[17],t[18]!==c||t[19]!==i?(g=()=>c(i),t[18]=c,t[19]=i,t[20]=g):g=t[20],t[21]===Symbol.for("react.memo_cache_sentinel")?(y=(0,Rc.jsx)(Nf,{className:"h-3.5 w-3.5"}),t[21]=y):y=t[21],t[22]!==g?(v=(0,Rc.jsx)(yR,{type:"button",variant:"secondary",size:"sm",onClick:g,className:"bg-white/6 hover:bg-white/10 text-gray-300",children:y}),t[22]=g,t[23]=v):v=t[23],t[24]!==v||t[25]!==m?(b=(0,Rc.jsxs)("div",{className:"flex gap-2",children:[m,v]}),t[24]=v,t[25]=m,t[26]=b):b=t[26],t[27]===Symbol.for("react.memo_cache_sentinel")?(x=(0,Rc.jsx)("p",{className:"text-[9px] text-gray-700",children:"Press Enter or comma to add"}),t[27]=x):x=t[27],t[28]!==b||t[29]!==u?(w=(0,Rc.jsxs)("div",{className:"space-y-2 p-3 rounded-lg bg-black/20 border border-white/6",children:[u,b,x]}),t[28]=b,t[29]=u,t[30]=w):w=t[30],w}function XO(e){const t=(0,S.c)(27),{images:n,onChange:r,onBlur:a}=e,[o,i]=(0,k.useState)("");let s;t[0]!==n||t[1]!==a||t[2]!==r||t[3]!==o?(s=()=>{const e=o.trim();e&&(r([...n,e]),i(""),a())},t[0]=n,t[1]=a,t[2]=r,t[3]=o,t[4]=s):s=t[4];const l=s;let c,u,d,f,h;t[5]!==n||t[6]!==a||t[7]!==r?(c=n.length>0&&(0,Rc.jsx)("div",{className:"grid grid-cols-3 gap-2",children:n.map((e,t)=>(0,Rc.jsxs)("div",{className:"relative group aspect-square rounded-lg overflow-hidden border border-white/8 bg-black/40",children:[(0,Rc.jsx)("img",{src:e,alt:`Gallery ${t+1}`,className:"w-full h-full object-cover opacity-90 group-hover:opacity-100 transition-opacity",onError:QO}),(0,Rc.jsx)("button",{onClick:()=>{r(n.filter((e,n)=>n!==t)),a()},className:"absolute top-1 right-1 h-6 w-6 rounded-full bg-black/70 border border-white/20 flex items-center justify-center text-gray-400 hover:text-red-400 opacity-0 group-hover:opacity-100 transition-all",children:(0,Rc.jsx)(Wf,{className:"h-3 w-3"})})]},t))}),t[5]=n,t[6]=a,t[7]=r,t[8]=c):c=t[8],t[9]===Symbol.for("react.memo_cache_sentinel")?(u=e=>i(e.target.value),t[9]=u):u=t[9],t[10]!==l?(d=e=>"Enter"===e.key&&l(),t[10]=l,t[11]=d):d=t[11],t[12]!==d||t[13]!==o?(f=(0,Rc.jsx)(vR,{type:"url",value:o,onChange:u,onKeyDown:d,placeholder:"https://example.com/image.jpg",className:"flex-1 bg-black/40 border-white/8 text-sm focus:border-indigo-500/60 focus:ring-0"}),t[12]=d,t[13]=o,t[14]=f):f=t[14],t[15]!==o?(h=o.trim(),t[15]=o,t[16]=h):h=t[16];const p=!h;let m,g,y,v;return t[17]===Symbol.for("react.memo_cache_sentinel")?(m=(0,Rc.jsx)(Nf,{className:"h-3.5 w-3.5"}),t[17]=m):m=t[17],t[18]!==l||t[19]!==p?(g=(0,Rc.jsxs)(yR,{type:"button",variant:"secondary",size:"sm",onClick:l,disabled:p,className:"bg-white/6 hover:bg-white/10 text-gray-300 gap-1",children:[m," Add"]}),t[18]=l,t[19]=p,t[20]=g):g=t[20],t[21]!==f||t[22]!==g?(y=(0,Rc.jsxs)("div",{className:"flex gap-2",children:[f,g]}),t[21]=f,t[22]=g,t[23]=y):y=t[23],t[24]!==y||t[25]!==c?(v=(0,Rc.jsxs)("div",{className:"space-y-3 p-3 rounded-xl bg-black/20 border border-white/6",children:[c,y]}),t[24]=y,t[25]=c,t[26]=v):v=t[26],v}function QO(e){e.target.src="",e.target.style.display="none"}function JO(e){const t=(0,S.c)(33),{value:n,onChange:r,onBlur:a}=e;let o,i;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,Rc.jsx)("label",{className:"text-[10px] text-gray-600 font-mono mb-1 block",children:"Latitude"}),t[0]=o):o=t[0],t[1]===Symbol.for("react.memo_cache_sentinel")?(i=(0,Rc.jsx)(qd,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-500 pointer-events-none"}),t[1]=i):i=t[1];const s=n.lat??"";let l,c,u,d;t[2]!==r||t[3]!==n?(l=e=>r({...n,lat:parseFloat(e.target.value)||0}),t[2]=r,t[3]=n,t[4]=l):l=t[4],t[5]!==a||t[6]!==s||t[7]!==l?(c=(0,Rc.jsxs)("div",{children:[o,(0,Rc.jsxs)("div",{className:"relative",children:[i,(0,Rc.jsx)(vR,{type:"number",value:s,onChange:l,onBlur:a,placeholder:"0.0000",step:"0.0001",className:"pl-9 bg-black/40 border-white/8 text-sm font-mono focus:border-indigo-500/60 focus:ring-0"})]})]}),t[5]=a,t[6]=s,t[7]=l,t[8]=c):c=t[8],t[9]===Symbol.for("react.memo_cache_sentinel")?(u=(0,Rc.jsx)("label",{className:"text-[10px] text-gray-600 font-mono mb-1 block",children:"Longitude"}),t[9]=u):u=t[9],t[10]===Symbol.for("react.memo_cache_sentinel")?(d=(0,Rc.jsx)(af,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-500 pointer-events-none"}),t[10]=d):d=t[10];const f=n.lng??"";let h,p,m,g,y;t[11]!==r||t[12]!==n?(h=e=>r({...n,lng:parseFloat(e.target.value)||0}),t[11]=r,t[12]=n,t[13]=h):h=t[13],t[14]!==a||t[15]!==f||t[16]!==h?(p=(0,Rc.jsxs)("div",{children:[u,(0,Rc.jsxs)("div",{className:"relative",children:[d,(0,Rc.jsx)(vR,{type:"number",value:f,onChange:h,onBlur:a,placeholder:"0.0000",step:"0.0001",className:"pl-9 bg-black/40 border-white/8 text-sm font-mono focus:border-indigo-500/60 focus:ring-0"})]})]}),t[14]=a,t[15]=f,t[16]=h,t[17]=p):p=t[17],t[18]!==p||t[19]!==c?(m=(0,Rc.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[c,p]}),t[18]=p,t[19]=c,t[20]=m):m=t[20],t[21]===Symbol.for("react.memo_cache_sentinel")?(g=(0,Rc.jsx)("label",{className:"text-[10px] text-gray-600 font-mono mb-1 block",children:"Address"}),t[21]=g):g=t[21],t[22]===Symbol.for("react.memo_cache_sentinel")?(y=(0,Rc.jsx)(bf,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-500 pointer-events-none"}),t[22]=y):y=t[22];const v=n.address??"";let b,x,w;return t[23]!==r||t[24]!==n?(b=e=>r({...n,address:e.target.value}),t[23]=r,t[24]=n,t[25]=b):b=t[25],t[26]!==a||t[27]!==v||t[28]!==b?(x=(0,Rc.jsxs)("div",{children:[g,(0,Rc.jsxs)("div",{className:"relative",children:[y,(0,Rc.jsx)(vR,{type:"text",value:v,onChange:b,onBlur:a,placeholder:"123 Main St, City, Country",className:"pl-9 bg-black/40 border-white/8 text-sm focus:border-indigo-500/60 focus:ring-0"})]})]}),t[26]=a,t[27]=v,t[28]=b,t[29]=x):x=t[29],t[30]!==m||t[31]!==x?(w=(0,Rc.jsxs)("div",{className:"space-y-2 p-3 rounded-lg bg-black/20 border border-white/6",children:[m,x]}),t[30]=m,t[31]=x,t[32]=w):w=t[32],w}function ZO({pairs:e,onChange:t,onBlur:n}){const[r,a]=(0,k.useState)(""),[o,i]=(0,k.useState)(""),s=()=>{r.trim()&&(t({...e,[r.trim()]:o}),a(""),i(""),n())};return(0,Rc.jsxs)("div",{className:"space-y-2 p-3 rounded-xl bg-black/20 border border-white/6",children:[Object.entries(e).length>0&&(0,Rc.jsxs)("div",{className:"space-y-1.5",children:[Object.entries(e).map(([r,a])=>(0,Rc.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Rc.jsx)(vR,{type:"text",value:r,onChange:n=>{const o={...e};delete o[r],o[n.target.value]=a,t(o)},onBlur:n,className:"w-2/5 bg-black/40 border-white/8 font-mono text-xs focus:border-indigo-500/60",placeholder:"key"}),(0,Rc.jsx)("span",{className:"text-gray-600 text-xs select-none",children:"→"}),(0,Rc.jsx)(vR,{type:"text",value:a,onChange:n=>t({...e,[r]:n.target.value}),onBlur:n,className:"flex-1 bg-black/40 border-white/8 text-xs focus:border-indigo-500/60",placeholder:"value"}),(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0 text-gray-600 hover:text-red-400 hover:bg-red-500/10",onClick:()=>{const a={...e};delete a[r],t(a),n()},children:(0,Rc.jsx)(Ff,{className:"h-3 w-3"})})]},r)),(0,Rc.jsx)(LO,{className:"bg-white/5 my-2"})]}),(0,Rc.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Rc.jsx)(vR,{type:"text",value:r,onChange:e=>a(e.target.value),onKeyDown:e=>"Enter"===e.key&&s(),placeholder:"new key",className:"w-2/5 bg-black/40 border-white/8 font-mono text-xs focus:border-indigo-500/60"}),(0,Rc.jsx)("span",{className:"text-gray-600 text-xs select-none",children:"→"}),(0,Rc.jsx)(vR,{type:"text",value:o,onChange:e=>i(e.target.value),onKeyDown:e=>"Enter"===e.key&&s(),placeholder:"value",className:"flex-1 bg-black/40 border-white/8 text-xs focus:border-indigo-500/60"}),(0,Rc.jsx)(yR,{type:"button",onClick:s,disabled:!r.trim(),variant:"secondary",size:"sm",className:"h-8 bg-white/6 hover:bg-white/10 text-gray-300",children:(0,Rc.jsx)(Nf,{className:"h-3.5 w-3.5"})})]})]})}var eP=[{type:"bold",icon:(0,Rc.jsx)(Md,{className:"h-3.5 w-3.5"}),label:"Bold",before:"**",after:"**"},{type:"italic",icon:(0,Rc.jsx)(df,{className:"h-3.5 w-3.5"}),label:"Italic",before:"_",after:"_"},{type:"underline",icon:(0,Rc.jsx)($f,{className:"h-3.5 w-3.5"}),label:"Underline",before:"<u>",after:"</u>"},null,{type:"heading",icon:(0,Rc.jsx)(sf,{className:"h-3.5 w-3.5"}),label:"Heading",before:"## ",after:""},{type:"quote",icon:(0,Rc.jsx)(jf,{className:"h-3.5 w-3.5"}),label:"Quote",before:"> ",after:""},{type:"code",icon:(0,Rc.jsx)(Hd,{className:"h-3.5 w-3.5"}),label:"Code",before:"`",after:"`"},null,{type:"bullet",icon:(0,Rc.jsx)(gf,{className:"h-3.5 w-3.5"}),label:"Bullet list",before:"- ",after:""},{type:"ordered",icon:(0,Rc.jsx)(mf,{className:"h-3.5 w-3.5"}),label:"Numbered list",before:"1. ",after:""},{type:"link",icon:(0,Rc.jsx)(hf,{className:"h-3.5 w-3.5"}),label:"Link",before:"[",after:"](url)"}];function tP(e){const t=(0,S.c)(17),{value:n,onChange:r,onBlur:a,placeholder:o}=e,i=(0,k.useRef)(null);let s;t[0]!==r||t[1]!==n?(s=(e,t)=>{const a=i.current;if(!a)return;const o=a.selectionStart,s=a.selectionEnd;r(n.substring(0,o)+e+n.substring(o,s)+t+n.substring(s)),setTimeout(()=>{a.focus(),a.setSelectionRange(o+e.length,s+e.length)},0)},t[0]=r,t[1]=n,t[2]=s):s=t[2];const l=s;let c,u,d;t[3]!==l?(c=eP.map((e,t)=>e?(0,Rc.jsxs)(PR,{children:[(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)(yR,{type:"button",variant:"ghost",className:"h-7 w-7 p-0 text-gray-500 hover:text-white hover:bg-white/6 rounded",onClick:()=>l(e.before,e.after),children:e.icon})}),(0,Rc.jsx)(_R,{className:"text-xs",children:e.label})]},e.label):(0,Rc.jsx)("div",{className:"w-px h-4 bg-white/8 mx-0.5"},t)),t[3]=l,t[4]=c):c=t[4],t[5]!==c?(u=(0,Rc.jsx)("div",{className:"flex items-center gap-0.5 px-2 py-1.5 bg-white/2 border-b border-white/6 flex-wrap",children:(0,Rc.jsx)(OR,{children:c})}),t[5]=c,t[6]=u):u=t[6],t[7]!==r?(d=e=>r(e.target.value),t[7]=r,t[8]=d):d=t[8];const f=o||"Write content in Markdown…";let h,p;return t[9]!==a||t[10]!==d||t[11]!==f||t[12]!==n?(h=(0,Rc.jsx)(MO,{ref:i,value:n,onChange:d,onBlur:a,placeholder:f,rows:7,className:"bg-transparent border-0 focus-visible:ring-0 resize-y text-sm rounded-none",spellCheck:!0}),t[9]=a,t[10]=d,t[11]=f,t[12]=n,t[13]=h):h=t[13],t[14]!==u||t[15]!==h?(p=(0,Rc.jsxs)("div",{className:"rounded-lg border border-white/8 overflow-hidden bg-black/40 focus-within:border-indigo-500/60 transition-colors",children:[u,h]}),t[14]=u,t[15]=h,t[16]=p):p=t[16],p}function nP(e){switch(e){case"TEXT_SHORT":case"TEXT_LONG":case"RICH_TEXT":case"EMAIL":case"PHONE":case"URL":case"SLUG":case"COLOR":case"CODE":case"JSON":case"ICON":case"GRADIENT":case"PASSWORD":case"DATE":case"DATE_TIME":case"TIME":case"SELECT":case"REFERENCE":case"IMAGE":case"VIDEO":case"AUDIO":case"FILE":case"DOCUMENT":default:return"";case"NUMBER":case"PERCENT":case"CURRENCY":case"RATING":case"SCORE":return 0;case"BOOLEAN":return!1;case"MULTI_SELECT":case"TAG_SELECT":case"GALLERY":case"ARRAY":case"LIST":return[];case"OBJECT":case"LOCATION":case"COORDINATES":case"ADDRESS":case"KEY_VALUE":case"SECTION":return{}}}function rP(e){const t=(0,S.c)(27),{title:n,icon:r,children:a,className:o,collapsible:i,defaultOpen:s}=e,l=void 0!==i&&i,[c,u]=(0,k.useState)(void 0===s||s);let d;t[0]!==o?(d=Lp("rounded-xl border border-white/6 overflow-hidden",o),t[0]=o,t[1]=d):d=t[1];const f=l?"hover:bg-white/3 transition-colors cursor-pointer":"cursor-default",h=c?"border-b border-white/6":"";let p,m,g,y,v,b,x,w;return t[2]!==f||t[3]!==h?(p=Lp("w-full flex items-center gap-2 px-3.5 py-2.5 text-left",f,h),t[2]=f,t[3]=h,t[4]=p):p=t[4],t[5]!==l?(m=()=>l&&u(aP),t[5]=l,t[6]=m):m=t[6],t[7]!==r?(g=r&&(0,Rc.jsx)("span",{className:"text-gray-500 shrink-0",children:r}),t[7]=r,t[8]=g):g=t[8],t[9]!==n?(y=(0,Rc.jsx)("span",{className:"text-[10px] font-bold text-gray-400 uppercase tracking-widest flex-1",children:n}),t[9]=n,t[10]=y):y=t[10],t[11]!==l||t[12]!==c?(v=l&&(0,Rc.jsx)(Bd,{className:Lp("h-3 w-3 text-gray-600 transition-transform duration-150",c?"rotate-180":"")}),t[11]=l,t[12]=c,t[13]=v):v=t[13],t[14]!==v||t[15]!==p||t[16]!==m||t[17]!==g||t[18]!==y?(b=(0,Rc.jsxs)("button",{className:p,onClick:m,type:"button",children:[g,y,v]}),t[14]=v,t[15]=p,t[16]=m,t[17]=g,t[18]=y,t[19]=b):b=t[19],t[20]!==a||t[21]!==c?(x=c&&(0,Rc.jsx)("div",{className:"p-3.5 space-y-3",children:a}),t[20]=a,t[21]=c,t[22]=x):x=t[22],t[23]!==b||t[24]!==x||t[25]!==d?(w=(0,Rc.jsxs)("div",{className:d,children:[b,x]}),t[23]=b,t[24]=x,t[25]=d,t[26]=w):w=t[26],w}function aP(e){return!e}function oP(e){const t=(0,S.c)(10),{label:n,hint:r,children:a}=e;let o,i,s,l;return t[0]!==n?(o=(0,Rc.jsx)(bR,{className:"text-[11px] font-semibold text-gray-400 uppercase tracking-wider leading-none",children:n}),t[0]=n,t[1]=o):o=t[1],t[2]!==r?(i=r&&(0,Rc.jsxs)(PR,{children:[(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)(uf,{className:"h-3 w-3 text-gray-600 cursor-help"})}),(0,Rc.jsx)(_R,{side:"right",className:"max-w-48 text-xs",children:r})]}),t[2]=r,t[3]=i):i=t[3],t[4]!==o||t[5]!==i?(s=(0,Rc.jsxs)("div",{className:"flex items-center gap-1.5",children:[o,i]}),t[4]=o,t[5]=i,t[6]=s):s=t[6],t[7]!==a||t[8]!==s?(l=(0,Rc.jsxs)("div",{className:"space-y-1.5",children:[s,a]}),t[7]=a,t[8]=s,t[9]=l):l=t[9],l}function iP(e){const t=(0,S.c)(24),{label:n,description:r,checked:a,onCheckedChange:o,icon:i,accentColor:s}=e,l=void 0===s?"indigo":s;let c,u,d,f,h,p,m,g,y;if(t[0]!==l||t[1]!==a||t[2]!==i){const e={indigo:"text-indigo-400",emerald:"text-emerald-400",amber:"text-amber-400",rose:"text-rose-400"}[l];d="flex items-center justify-between gap-3 py-0.5",c="flex items-start gap-2 min-w-0",u=i&&(0,Rc.jsx)("span",{className:Lp("mt-0.5 shrink-0 opacity-70",a?e:"text-gray-600"),children:i}),t[0]=l,t[1]=a,t[2]=i,t[3]=c,t[4]=u,t[5]=d}else c=t[3],u=t[4],d=t[5];return t[6]!==n?(f=(0,Rc.jsx)("p",{className:"text-[12px] font-medium text-gray-300 leading-tight",children:n}),t[6]=n,t[7]=f):f=t[7],t[8]!==r?(h=r&&(0,Rc.jsx)("p",{className:"text-[10px] text-gray-600 mt-0.5 leading-tight",children:r}),t[8]=r,t[9]=h):h=t[9],t[10]!==f||t[11]!==h?(p=(0,Rc.jsxs)("div",{className:"min-w-0",children:[f,h]}),t[10]=f,t[11]=h,t[12]=p):p=t[12],t[13]!==c||t[14]!==u||t[15]!==p?(m=(0,Rc.jsxs)("div",{className:c,children:[u,p]}),t[13]=c,t[14]=u,t[15]=p,t[16]=m):m=t[16],t[17]!==a||t[18]!==o?(g=(0,Rc.jsx)(xR,{checked:a,onCheckedChange:o,className:"shrink-0 data-[state=checked]:bg-indigo-500"}),t[17]=a,t[18]=o,t[19]=g):g=t[19],t[20]!==d||t[21]!==m||t[22]!==g?(y=(0,Rc.jsxs)("div",{className:d,children:[m,g]}),t[20]=d,t[21]=m,t[22]=g,t[23]=y):y=t[23],y}function sP(e){const t=(0,S.c)(215),{node:n,onUpdate:r}=e,{forceSync:a,validateNodeApiKey:o}=ab(),[i,s]=(0,k.useState)(n.apiKey||""),[l,c]=(0,k.useState)(n.description||""),[u,d]=(0,k.useState)(n.previewUrl||""),[f,h]=(0,k.useState)(n.cacheStrategy||"stale-while-revalidate"),[p,m]=(0,k.useState)(n.isDraft||!1),[g,y]=(0,k.useState)(n.enableVersioning||!1),[v,b]=(0,k.useState)(n.isHidden||!1),[x,w]=(0,k.useState)("idle"),[E,C]=(0,k.useState)(""),[N,j]=(0,k.useState)(""),[T,R]=(0,k.useState)(!1),O=(0,k.useRef)(null),[P,A]=(0,k.useState)(n);let _;n!==P&&(A(n),s(n.apiKey||""),c(n.description||""),d(n.previewUrl||""),h(n.cacheStrategy||"stale-while-revalidate"),m(n.isDraft||!1),y(n.enableVersioning||!1),b(n.isHidden||!1),w("idle"),C("")),t[0]!==n.id||t[1]!==o?(_=e=>{if(!e)return w("idle"),void C("");const t=o(e,n.id);t.valid?(w("valid"),C(""),j("")):(w("error"),C(t.error||"Invalid identifier"),j(t.suggestion||""))},t[0]=n.id,t[1]=o,t[2]=_):_=t[2];const D=_;let M;t[3]!==D?(M=e=>{const t=e.target.value.toLowerCase().replace(/[^a-z0-9_]/g,"_").replace(/^_+/,"");s(t),w("idle"),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>D(t),300)},t[3]=D,t[4]=M):M=t[4];const L=M;let I,z,F;t[5]===Symbol.for("react.memo_cache_sentinel")?(I=()=>()=>{O.current&&clearTimeout(O.current)},z=[],t[5]=I,t[6]=z):(I=t[5],z=t[6]),(0,k.useEffect)(I,z),t[7]!==i||t[8]!==x||t[9]!==a||t[10]!==n.apiKey||t[11]!==n.id||t[12]!==r||t[13]!==D||t[14]!==o?(F=()=>{D(i),i!==n.apiKey&&"error"!==x&&o(i,n.id).valid&&(r(n.id,{apiKey:i}),a())},t[7]=i,t[8]=x,t[9]=a,t[10]=n.apiKey,t[11]=n.id,t[12]=r,t[13]=D,t[14]=o,t[15]=F):F=t[15];const B=F;let U;t[16]!==N||t[17]!==a||t[18]!==n.id||t[19]!==r?(U=()=>{N&&(s(N),w("valid"),C(""),j(""),r(n.id,{apiKey:N}),a())},t[16]=N,t[17]=a,t[18]=n.id,t[19]=r,t[20]=U):U=t[20];const V=U;let $;t[21]!==a||t[22]!==n.id||t[23]!==n.name||t[24]!==r||t[25]!==o?($=()=>{const e=(n.name||"page").toLowerCase().trim().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"").slice(0,63);const t=o(e,n.id),i=t.valid?e:t.suggestion||e;s(i),w("valid"),C(""),r(n.id,{apiKey:i}),a(),oh.success("API key generated from name")},t[21]=a,t[22]=n.id,t[23]=n.name,t[24]=r,t[25]=o,t[26]=$):$=t[26];const H=$;let q;t[27]!==i?(q=()=>{navigator.clipboard.writeText(`/api/${i}`),R(!0),oh.success("API path copied"),setTimeout(()=>R(!1),2e3)},t[27]=i,t[28]=q):q=t[28];const W=q;let K;t[29]!==a||t[30]!==n.id||t[31]!==r?(K=e=>{r(n.id,e),a()},t[29]=a,t[30]=n.id,t[31]=r,t[32]=K):K=t[32];const G=K;let Y,X,Q;t[33]===Symbol.for("react.memo_cache_sentinel")?(Y={label:"Stale-While-Revalidate",desc:"Serve cached, refresh in background",icon:(0,Rc.jsx)(Tf,{className:"h-3 w-3"})},t[33]=Y):Y=t[33],t[34]===Symbol.for("react.memo_cache_sentinel")?(X={label:"Cache First",desc:"Serve from cache, fallback to network",icon:(0,Rc.jsx)(Df,{className:"h-3 w-3"})},t[34]=X):X=t[34],t[35]===Symbol.for("react.memo_cache_sentinel")?(Q={"stale-while-revalidate":Y,"cache-first":X,"no-cache":{label:"No Cache",desc:"Always fetch fresh from server",icon:(0,Rc.jsx)(af,{className:"h-3 w-3"})}},t[35]=Q):Q=t[35];const J=Q;let Z,ee,te,ne,re,ae,oe,ie,se,le,ce,ue,de,fe,he,pe,me,ge,ye,ve,be,xe,we,Se,ke,Ee,Ce,Ne,je,Te;if(t[36]!==i||t[37]!==x||t[38]!==B||t[39]!==L){const e={idle:"border-white/10",valid:"border-emerald-500/50",error:"border-red-500/50",warning:"border-amber-500/50"}[x];let n;t[56]===Symbol.for("react.memo_cache_sentinel")?(n={idle:null,valid:(0,Rc.jsx)(Fd,{className:"h-3.5 w-3.5 text-emerald-400"}),error:(0,Rc.jsx)(vd,{className:"h-3.5 w-3.5 text-red-400"}),warning:(0,Rc.jsx)(vd,{className:"h-3.5 w-3.5 text-amber-400"})},t[56]=n):n=t[56],re=n[x],ne=OR,pe="space-y-2.5 pb-4",te=rP,fe="Identity",t[57]===Symbol.for("react.memo_cache_sentinel")?(he=(0,Rc.jsx)(sf,{className:"h-3 w-3"}),t[57]=he):he=t[57],ee=oP,ue="API Identifier",de="The machine-readable key used in API endpoints, SDK queries, and generated code. Must be unique across all pages and collections.",ce="space-y-1.5",le="relative",Z=vR,ae=i,oe=L,ie=B,se=Lp("font-mono text-[13px] bg-black/60 pr-20 transition-colors",e,"focus-visible:ring-0 focus-visible:border-indigo-500/60"),t[36]=i,t[37]=x,t[38]=B,t[39]=L,t[40]=Z,t[41]=ee,t[42]=te,t[43]=ne,t[44]=re,t[45]=ae,t[46]=oe,t[47]=ie,t[48]=se,t[49]=le,t[50]=ce,t[51]=ue,t[52]=de,t[53]=fe,t[54]=he,t[55]=pe}else Z=t[40],ee=t[41],te=t[42],ne=t[43],re=t[44],ae=t[45],oe=t[46],ie=t[47],se=t[48],le=t[49],ce=t[50],ue=t[51],de=t[52],fe=t[53],he=t[54],pe=t[55];t[58]!==Z||t[59]!==ae||t[60]!==oe||t[61]!==ie||t[62]!==se?(me=(0,Rc.jsx)(Z,{value:ae,onChange:oe,onBlur:ie,className:se,placeholder:"e.g. blog_posts",spellCheck:!1}),t[58]=Z,t[59]=ae,t[60]=oe,t[61]=ie,t[62]=se,t[63]=me):me=t[63],t[64]!==re?(ge=re&&(0,Rc.jsx)("span",{className:"mr-1",children:re}),t[64]=re,t[65]=ge):ge=t[65],t[66]===Symbol.for("react.memo_cache_sentinel")?(ye=(0,Rc.jsx)(Rd,{className:"h-3.5 w-3.5"}),t[66]=ye):ye=t[66],t[67]!==H?(ve=(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-600 hover:text-gray-300",onClick:H,type:"button",children:ye})}),t[67]=H,t[68]=ve):ve=t[68],t[69]===Symbol.for("react.memo_cache_sentinel")?(be=(0,Rc.jsx)(_R,{side:"top",className:"text-xs",children:"Auto-generate from name"}),t[69]=be):be=t[69],t[70]!==ve?(xe=(0,Rc.jsxs)(PR,{children:[ve,be]}),t[70]=ve,t[71]=xe):xe=t[71],t[72]!==T?(we=T?(0,Rc.jsx)(Fd,{className:"h-3.5 w-3.5 text-emerald-400"}):(0,Rc.jsx)(Wd,{className:"h-3.5 w-3.5"}),t[72]=T,t[73]=we):we=t[73],t[74]!==W||t[75]!==we?(Se=(0,Rc.jsx)(AR,{asChild:!0,children:(0,Rc.jsx)(yR,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-600 hover:text-gray-300",onClick:W,type:"button",children:we})}),t[74]=W,t[75]=we,t[76]=Se):Se=t[76],t[77]===Symbol.for("react.memo_cache_sentinel")?(ke=(0,Rc.jsx)(_R,{side:"top",className:"text-xs",children:"Copy API path"}),t[77]=ke):ke=t[77],t[78]!==Se?(Ee=(0,Rc.jsxs)(PR,{children:[Se,ke]}),t[78]=Se,t[79]=Ee):Ee=t[79],t[80]!==ge||t[81]!==xe||t[82]!==Ee?(Ce=(0,Rc.jsxs)("div",{className:"absolute right-1 top-1/2 -translate-y-1/2 flex items-center gap-0.5",children:[ge,xe,Ee]}),t[80]=ge,t[81]=xe,t[82]=Ee,t[83]=Ce):Ce=t[83],t[84]!==le||t[85]!==me||t[86]!==Ce?(Ne=(0,Rc.jsxs)("div",{className:le,children:[me,Ce]}),t[84]=le,t[85]=me,t[86]=Ce,t[87]=Ne):Ne=t[87],t[88]!==E||t[89]!==x||t[90]!==N||t[91]!==V?(je="error"===x&&(0,Rc.jsxs)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/5 px-3 py-2 space-y-1.5",children:[(0,Rc.jsxs)("p",{className:"text-[11px] text-red-400 flex items-center gap-1.5",children:[(0,Rc.jsx)(vd,{className:"h-3 w-3 shrink-0"}),E]}),N&&(0,Rc.jsxs)("button",{onClick:V,className:"flex items-center gap-1.5 text-[11px] text-indigo-400 hover:text-indigo-300 transition-colors",type:"button",children:[(0,Rc.jsx)(Rd,{className:"h-3 w-3"}),"Use"," ",(0,Rc.jsx)("code",{className:"font-mono bg-indigo-500/10 px-1 rounded",children:N})," ","instead"]})]}),t[88]=E,t[89]=x,t[90]=N,t[91]=V,t[92]=je):je=t[92],t[93]===Symbol.for("react.memo_cache_sentinel")?(Te=(0,Rc.jsx)("span",{className:"text-[10px] text-gray-600 font-mono",children:"Endpoint:"}),t[93]=Te):Te=t[93];const Re=i||"…";let Oe,Pe,Ae,_e,De,Me,Le,Ie,ze,Fe,Be,Ue,Ve,$e,He,qe,We,Ke,Ge,Ye,Xe,Qe,Je,Ze,et,tt,nt,rt,at,ot,it,st,lt,ct,ut,dt,ft,ht,pt,mt,gt;t[94]!==Re?(Oe=(0,Rc.jsxs)("div",{className:"flex items-center gap-1.5 bg-white/3 rounded-md px-2.5 py-1.5 border border-white/5",children:[Te,(0,Rc.jsxs)("code",{className:"text-[10px] text-indigo-400 font-mono truncate",children:["/api/",Re]})]}),t[94]=Re,t[95]=Oe):Oe=t[95],t[96]!==ce||t[97]!==Ne||t[98]!==je||t[99]!==Oe?(Pe=(0,Rc.jsxs)("div",{className:ce,children:[Ne,je,Oe]}),t[96]=ce,t[97]=Ne,t[98]=je,t[99]=Oe,t[100]=Pe):Pe=t[100],t[101]!==ee||t[102]!==ue||t[103]!==de||t[104]!==Pe?(Ae=(0,Rc.jsx)(ee,{label:ue,hint:de,children:Pe}),t[101]=ee,t[102]=ue,t[103]=de,t[104]=Pe,t[105]=Ae):Ae=t[105],t[106]===Symbol.for("react.memo_cache_sentinel")?(_e=e=>c(e.target.value),t[106]=_e):_e=t[106],t[107]!==l||t[108]!==n.description||t[109]!==G?(De=()=>{l!==n.description&&G({description:l||void 0})},t[107]=l,t[108]=n.description,t[109]=G,t[110]=De):De=t[110],t[111]!==l||t[112]!==De?(Me=(0,Rc.jsx)(oP,{label:"Description",hint:"Internal documentation for your team. Appears in the SDK and generated type comments.",children:(0,Rc.jsx)(MO,{value:l,onChange:_e,onBlur:De,className:"bg-black/60 border-white/10 text-[13px] resize-none focus-visible:ring-0 focus-visible:border-indigo-500/60 min-h-16",placeholder:"What kind of content lives here?",rows:2})}),t[111]=l,t[112]=De,t[113]=Me):Me=t[113],t[114]===Symbol.for("react.memo_cache_sentinel")?(Le=e=>d(e.target.value),t[114]=Le):Le=t[114],t[115]!==n.previewUrl||t[116]!==u||t[117]!==G?(Ie=()=>{u!==n.previewUrl&&G({previewUrl:u||void 0})},t[115]=n.previewUrl,t[116]=u,t[117]=G,t[118]=Ie):Ie=t[118],t[119]!==u||t[120]!==Ie?(ze=(0,Rc.jsx)(vR,{value:u,onChange:Le,onBlur:Ie,className:"font-mono text-[13px] bg-black/60 border-white/10 focus-visible:ring-0 focus-visible:border-indigo-500/60",placeholder:"/preview/{slug}",spellCheck:!1}),t[119]=u,t[120]=Ie,t[121]=ze):ze=t[121],t[122]!==u?(Fe=u&&(0,Rc.jsxs)("p",{className:"text-[10px] text-gray-600 font-mono truncate",children:["e.g."," ",(0,Rc.jsx)("span",{className:"text-gray-500",children:u.replace(/\{slug\}/g,"example-post").replace(/\{id\}/g,"abc123")})]}),t[122]=u,t[123]=Fe):Fe=t[123],t[124]!==ze||t[125]!==Fe?(Be=(0,Rc.jsxs)(oP,{label:"Preview URL Pattern",hint:'Use {slug} or {id} as dynamic placeholders. Clicking "Preview" in the editor will open this URL.',children:[ze,Fe]}),t[124]=ze,t[125]=Fe,t[126]=Be):Be=t[126],t[127]!==te||t[128]!==fe||t[129]!==he||t[130]!==Ae||t[131]!==Me||t[132]!==Be?(Ue=(0,Rc.jsxs)(te,{title:fe,icon:he,children:[Ae,Me,Be]}),t[127]=te,t[128]=fe,t[129]=he,t[130]=Ae,t[131]=Me,t[132]=Be,t[133]=Ue):Ue=t[133],t[134]===Symbol.for("react.memo_cache_sentinel")?(Ve=(0,Rc.jsx)(Kf,{className:"h-3 w-3"}),t[134]=Ve):Ve=t[134],t[135]===Symbol.for("react.memo_cache_sentinel")?($e=Object.entries(J),t[135]=$e):$e=t[135],t[136]!==f||t[137]!==G?(He=(0,Rc.jsx)(rP,{title:"Cache Strategy",icon:Ve,children:(0,Rc.jsx)("div",{className:"space-y-2",children:$e.map(e=>{const[t,n]=e;return(0,Rc.jsxs)("button",{type:"button",onClick:()=>{h(t),G({cacheStrategy:t})},className:Lp("w-full flex items-center gap-3 px-3 py-2.5 rounded-lg border text-left transition-all",f===t?"border-indigo-500/40 bg-indigo-500/8 text-white":"border-white/6 bg-white/2 text-gray-400 hover:bg-white/4 hover:border-white/10"),children:[(0,Rc.jsx)("span",{className:Lp("shrink-0",f===t?"text-indigo-400":"text-gray-600"),children:n.icon}),(0,Rc.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,Rc.jsx)("p",{className:"text-[12px] font-medium leading-tight",children:n.label}),(0,Rc.jsx)("p",{className:"text-[10px] text-gray-600 mt-0.5",children:n.desc})]}),f===t&&(0,Rc.jsx)(Fd,{className:"h-3.5 w-3.5 text-indigo-400 shrink-0"})]},t)})})}),t[136]=f,t[137]=G,t[138]=He):He=t[138],t[139]===Symbol.for("react.memo_cache_sentinel")?(qe=(0,Rc.jsx)(Lf,{className:"h-3 w-3"}),t[139]=qe):qe=t[139],t[140]!==G?(We=e=>{m(e),G({isDraft:e})},t[140]=G,t[141]=We):We=t[141],t[142]===Symbol.for("react.memo_cache_sentinel")?(Ke=(0,Rc.jsx)(yf,{className:"h-3.5 w-3.5"}),t[142]=Ke):Ke=t[142],t[143]!==p||t[144]!==We?(Ge=(0,Rc.jsx)(iP,{label:"Draft Mode",description:"Content hidden from live API until published",checked:p,onCheckedChange:We,icon:Ke,accentColor:"amber"}),t[143]=p,t[144]=We,t[145]=Ge):Ge=t[145],t[146]===Symbol.for("react.memo_cache_sentinel")?(Ye=(0,Rc.jsx)("div",{className:"my-2 border-t border-white/5"}),t[146]=Ye):Ye=t[146],t[147]!==G?(Xe=e=>{y(e),G({enableVersioning:e})},t[147]=G,t[148]=Xe):Xe=t[148],t[149]===Symbol.for("react.memo_cache_sentinel")?(Qe=(0,Rc.jsx)($d,{className:"h-3.5 w-3.5"}),t[149]=Qe):Qe=t[149],t[150]!==g||t[151]!==Xe?(Je=(0,Rc.jsx)(iP,{label:"Version History",description:"Track revisions and enable rollbacks",checked:g,onCheckedChange:Xe,icon:Qe,accentColor:"indigo"}),t[150]=g,t[151]=Xe,t[152]=Je):Je=t[152],t[153]===Symbol.for("react.memo_cache_sentinel")?(Ze=(0,Rc.jsx)("div",{className:"my-2 border-t border-white/5"}),t[153]=Ze):Ze=t[153],t[154]!==G?(et=e=>{b(e),G({isHidden:e})},t[154]=G,t[155]=et):et=t[155],t[156]!==v?(tt=v?(0,Rc.jsx)(Qd,{className:"h-3.5 w-3.5"}):(0,Rc.jsx)(Jd,{className:"h-3.5 w-3.5"}),t[156]=v,t[157]=tt):tt=t[157],t[158]!==v||t[159]!==et||t[160]!==tt?(nt=(0,Rc.jsx)(iP,{label:"Hidden",description:"Exclude from schema explorer and SDK typings",checked:v,onCheckedChange:et,icon:tt,accentColor:"rose"}),t[158]=v,t[159]=et,t[160]=tt,t[161]=nt):nt=t[161],t[162]!==Ge||t[163]!==Je||t[164]!==nt?(rt=(0,Rc.jsx)(rP,{title:"Behavior",icon:qe,collapsible:!0,defaultOpen:!0,children:(0,Rc.jsxs)("div",{className:"space-y-1",children:[Ge,Ye,Je,Ze,nt]})}),t[162]=Ge,t[163]=Je,t[164]=nt,t[165]=rt):rt=t[165],t[166]===Symbol.for("react.memo_cache_sentinel")?(at=(0,Rc.jsx)(Kd,{className:"h-3 w-3"}),t[166]=at):at=t[166],t[167]===Symbol.for("react.memo_cache_sentinel")?(ot=(0,Rc.jsx)($d,{className:"h-3 w-3"}),t[167]=ot):ot=t[167],t[168]!==n.createdAt?(it=n.createdAt?new Date(n.createdAt).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"}):"—",t[168]=n.createdAt,t[169]=it):it=t[169],t[170]!==it?(st=(0,Rc.jsx)(lP,{icon:ot,label:"Created",children:it}),t[170]=it,t[171]=st):st=t[171],t[172]===Symbol.for("react.memo_cache_sentinel")?(lt=(0,Rc.jsx)(Tf,{className:"h-3 w-3"}),t[172]=lt):lt=t[172],t[173]!==n.updatedAt?(ct=n.updatedAt?new Date(n.updatedAt).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"}):"Never",t[173]=n.updatedAt,t[174]=ct):ct=t[174],t[175]!==ct?(ut=(0,Rc.jsx)(lP,{icon:lt,label:"Updated",children:ct}),t[175]=ct,t[176]=ut):ut=t[176],t[177]===Symbol.for("react.memo_cache_sentinel")?(dt=(0,Rc.jsx)(yf,{className:"h-3 w-3"}),t[177]=dt):dt=t[177],t[178]!==n.type?(ft=(0,Rc.jsx)(lP,{icon:dt,label:"Type",children:(0,Rc.jsx)("span",{className:"font-mono text-indigo-400",children:n.type})}),t[178]=n.type,t[179]=ft):ft=t[179],t[180]===Symbol.for("react.memo_cache_sentinel")?(ht=(0,Rc.jsx)(sf,{className:"h-3 w-3"}),t[180]=ht):ht=t[180],t[181]!==n.id?(pt=()=>{navigator.clipboard.writeText(n.id),oh.success("ID copied")},t[181]=n.id,t[182]=pt):pt=t[182],t[183]!==n.id||t[184]!==pt?(mt=(0,Rc.jsx)(lP,{icon:ht,label:"Internal ID",children:(0,Rc.jsx)("button",{onClick:pt,className:"font-mono text-[10px] text-gray-500 hover:text-gray-300 transition-colors truncate max-w-36 text-left",title:n.id,type:"button",children:n.id})}),t[183]=n.id,t[184]=pt,t[185]=mt):mt=t[185],t[186]!==st||t[187]!==ut||t[188]!==ft||t[189]!==mt?(gt=(0,Rc.jsx)(rP,{title:"Metadata",icon:at,collapsible:!0,defaultOpen:!1,children:(0,Rc.jsxs)("div",{className:"space-y-2",children:[st,ut,ft,mt]})}),t[186]=st,t[187]=ut,t[188]=ft,t[189]=mt,t[190]=gt):gt=t[190];const yt=n.isDraft?"border-amber-500/30 text-amber-400 bg-amber-500/5":"border-emerald-500/30 text-emerald-400 bg-emerald-500/5";let vt;t[191]!==yt?(vt=Lp("text-[10px] font-semibold px-2 py-0.5 rounded-full",yt),t[191]=yt,t[192]=vt):vt=t[192];const bt=n.isDraft?"Draft":"Published";let xt,wt,St,kt,Et,Ct,Nt;return t[193]!==vt||t[194]!==bt?(xt=(0,Rc.jsx)(RR,{variant:"outline",className:vt,children:bt}),t[193]=vt,t[194]=bt,t[195]=xt):xt=t[195],t[196]!==v?(wt=v&&(0,Rc.jsx)(RR,{variant:"outline",className:"text-[10px] font-semibold px-2 py-0.5 rounded-full border-gray-500/30 text-gray-500 bg-white/3",children:"Hidden"}),t[196]=v,t[197]=wt):wt=t[197],t[198]!==g?(St=g&&(0,Rc.jsx)(RR,{variant:"outline",className:"text-[10px] font-semibold px-2 py-0.5 rounded-full border-indigo-500/30 text-indigo-400 bg-indigo-500/5",children:"Versioned"}),t[198]=g,t[199]=St):St=t[199],t[200]===Symbol.for("react.memo_cache_sentinel")?(kt=(0,Rc.jsx)("span",{className:"ml-auto text-[10px] text-gray-700",children:"Auto-saved"}),t[200]=kt):kt=t[200],t[201]!==xt||t[202]!==wt||t[203]!==St?(Et=(0,Rc.jsxs)("div",{className:"flex items-center gap-2 pt-1",children:[xt,wt,St,kt]}),t[201]=xt,t[202]=wt,t[203]=St,t[204]=Et):Et=t[204],t[205]!==pe||t[206]!==Ue||t[207]!==He||t[208]!==rt||t[209]!==gt||t[210]!==Et?(Ct=(0,Rc.jsxs)("div",{className:pe,children:[Ue,He,rt,gt,Et]}),t[205]=pe,t[206]=Ue,t[207]=He,t[208]=rt,t[209]=gt,t[210]=Et,t[211]=Ct):Ct=t[211],t[212]!==ne||t[213]!==Ct?(Nt=(0,Rc.jsx)(ne,{children:Ct}),t[212]=ne,t[213]=Ct,t[214]=Nt):Nt=t[214],Nt}function lP(e){const t=(0,S.c)(10),{icon:n,label:r,children:a}=e;let o,i,s,l;return t[0]!==n?(o=(0,Rc.jsx)("span",{className:"text-gray-700 shrink-0",children:n}),t[0]=n,t[1]=o):o=t[1],t[2]!==r?(i=(0,Rc.jsx)("span",{className:"text-gray-600 shrink-0 w-16",children:r}),t[2]=r,t[3]=i):i=t[3],t[4]!==a?(s=(0,Rc.jsx)("span",{className:"text-gray-400 truncate",children:a}),t[4]=a,t[5]=s):s=t[5],t[6]!==o||t[7]!==i||t[8]!==s?(l=(0,Rc.jsxs)("div",{className:"flex items-center gap-2 text-[11px]",children:[o,i,s]}),t[6]=o,t[7]=i,t[8]=s,t[9]=l):l=t[9],l}var cP=[{label:"Page Builder",types:[{type:"SECTION",label:"Section (Repeatable)",icon:(0,Rc.jsx)(Cd,{className:"h-4 w-4"})}]},{label:"Text",types:[{type:"TEXT_SHORT",label:"Short Text",icon:(0,Rc.jsx)(Vf,{className:"h-4 w-4"})},{type:"TEXT_LONG",label:"Long Text",icon:(0,Rc.jsx)(Od,{className:"h-4 w-4"})},{type:"RICH_TEXT",label:"Rich Text",icon:(0,Rc.jsx)(lf,{className:"h-4 w-4"})},{type:"SLUG",label:"Slug",icon:(0,Rc.jsx)(hf,{className:"h-4 w-4"})},{type:"PASSWORD",label:"Password",icon:(0,Rc.jsx)(yf,{className:"h-4 w-4"})}]},{label:"Numeric",types:[{type:"NUMBER",label:"Number",icon:(0,Rc.jsx)(sf,{className:"h-4 w-4"})},{type:"PERCENT",label:"Percent",icon:(0,Rc.jsx)(kf,{className:"h-4 w-4"})},{type:"CURRENCY",label:"Currency",icon:(0,Rc.jsx)(Gd,{className:"h-4 w-4"})},{type:"RATING",label:"Rating",icon:(0,Rc.jsx)(Mf,{className:"h-4 w-4"})},{type:"SCORE",label:"Score",icon:(0,Rc.jsx)(Bf,{className:"h-4 w-4"})}]},{label:"Date & Time",types:[{type:"DATE",label:"Date",icon:(0,Rc.jsx)(zd,{className:"h-4 w-4"})},{type:"DATE_TIME",label:"Date & Time",icon:(0,Rc.jsx)($d,{className:"h-4 w-4"})},{type:"TIME",label:"Time",icon:(0,Rc.jsx)($d,{className:"h-4 w-4"})}]},{label:"Media",types:[{type:"IMAGE",label:"Image",icon:(0,Rc.jsx)(cf,{className:"h-4 w-4"})},{type:"VIDEO",label:"Video",icon:(0,Rc.jsx)(qf,{className:"h-4 w-4"})},{type:"AUDIO",label:"Audio",icon:(0,Rc.jsx)(wf,{className:"h-4 w-4"})},{type:"FILE",label:"File",icon:(0,Rc.jsx)(ef,{className:"h-4 w-4"})},{type:"DOCUMENT",label:"Document",icon:(0,Rc.jsx)(ef,{className:"h-4 w-4"})},{type:"GALLERY",label:"Gallery",icon:(0,Rc.jsx)(Ed,{className:"h-4 w-4"})},{type:"LOTTIE",label:"Lottie",icon:(0,Rc.jsx)(Ld,{className:"h-4 w-4"})}]},{label:"Selection",types:[{type:"BOOLEAN",label:"Boolean",icon:(0,Rc.jsx)(zf,{className:"h-4 w-4"})},{type:"SELECT",label:"Select",icon:(0,Rc.jsx)(gf,{className:"h-4 w-4"})},{type:"MULTI_SELECT",label:"Multi Select",icon:(0,Rc.jsx)(Cd,{className:"h-4 w-4"})},{type:"TAG_SELECT",label:"Tag Select",icon:(0,Rc.jsx)(Lf,{className:"h-4 w-4"})}]},{label:"Reference",types:[{type:"REFERENCE",label:"Reference",icon:(0,Rc.jsx)(hf,{className:"h-4 w-4"})},{type:"REFERENCE_LIST",label:"Reference List",icon:(0,Rc.jsx)(gf,{className:"h-4 w-4"})},{type:"ASSET_SELECT",label:"Asset Select",icon:(0,Rc.jsx)(cf,{className:"h-4 w-4"})}]},{label:"Structured",types:[{type:"OBJECT",label:"Object",icon:(0,Rc.jsx)(tf,{className:"h-4 w-4"})},{type:"LIST",label:"List",icon:(0,Rc.jsx)(gf,{className:"h-4 w-4"})},{type:"KEY_VALUE",label:"Key-Value",icon:(0,Rc.jsx)(ff,{className:"h-4 w-4"})},{type:"MATRIX",label:"Matrix",icon:(0,Rc.jsx)(Ed,{className:"h-4 w-4"})},{type:"SORTABLE_LIST",label:"Sortable List",icon:(0,Rc.jsx)(gf,{className:"h-4 w-4"})}]},{label:"Geo",types:[{type:"LOCATION",label:"Location",icon:(0,Rc.jsx)(bf,{className:"h-4 w-4"})},{type:"COORDINATES",label:"Coordinates",icon:(0,Rc.jsx)(af,{className:"h-4 w-4"})},{type:"ADDRESS",label:"Address",icon:(0,Rc.jsx)(bf,{className:"h-4 w-4"})}]},{label:"Advanced",types:[{type:"COLOR",label:"Color",icon:(0,Rc.jsx)(Sf,{className:"h-4 w-4"})},{type:"GRADIENT",label:"Gradient",icon:(0,Rc.jsx)(Sf,{className:"h-4 w-4"})},{type:"ICON",label:"Icon",icon:(0,Rc.jsx)(_f,{className:"h-4 w-4"})},{type:"BLEND_MODE",label:"Blend Mode",icon:(0,Rc.jsx)(Cd,{className:"h-4 w-4"})},{type:"FORMULA",label:"Formula",icon:(0,Rc.jsx)(Id,{className:"h-4 w-4"})},{type:"CHART",label:"Chart",icon:(0,Rc.jsx)(yd,{className:"h-4 w-4"})},{type:"JSON",label:"JSON",icon:(0,Rc.jsx)(Hd,{className:"h-4 w-4"})},{type:"CODE",label:"Code",icon:(0,Rc.jsx)(Hd,{className:"h-4 w-4"})},{type:"AI_GENERATED",label:"AI Generated",icon:(0,Rc.jsx)(Pd,{className:"h-4 w-4"})},{type:"WORKFLOW_STATE",label:"Workflow State",icon:(0,Rc.jsx)(rf,{className:"h-4 w-4"})}]}];function uP(e){const t=(0,S.c)(27),{nodeId:n,parentFieldId:r}=e,{addField:a}=ab(),[o,i]=(0,k.useState)(!1),[s,l]=(0,k.useState)("");let c,u,d,f,h,p;if(t[0]!==a||t[1]!==o||t[2]!==n||t[3]!==r||t[4]!==s){let e;t[9]!==s?(e=e=>({...e,types:e.types.filter(e=>e.label.toLowerCase().includes(s.toLowerCase())||e.type.toLowerCase().includes(s.toLowerCase()))}),t[9]=s,t[10]=e):e=t[10];const h=cP.map(e).filter(dP);let p;t[11]!==a||t[12]!==n||t[13]!==r?(p=e=>{a(n,e,r),i(!1),l("")},t[11]=a,t[12]=n,t[13]=r,t[14]=p):p=t[14];const m=p;let g,y;d="relative mt-4",t[15]!==o?(g=()=>i(!o),t[15]=o,t[16]=g):g=t[16],t[17]===Symbol.for("react.memo_cache_sentinel")?(y=(0,Rc.jsx)(Nf,{className:"h-4 w-4"}),t[17]=y):y=t[17],t[18]!==g?(f=(0,Rc.jsxs)("button",{onClick:g,className:"w-full py-3 rounded-xl border border-dashed border-white/10 hover:border-indigo-500/30 hover:bg-indigo-500/5 text-xs font-bold text-gray-500 hover:text-indigo-400 transition-all flex items-center justify-center gap-2",children:[y," Add Field"]}),t[18]=g,t[19]=f):f=t[19],c=Ic,u=o&&(0,Rc.jsxs)(ld.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"absolute left-0 right-0 pb-4 mt-2 w-120 max-h-125 overflow-hidden rounded-4xl border border-white/10 bg-[#0D0E12] shadow-2xl z-50",children:[(0,Rc.jsx)("div",{className:"p-3 relative border-b border-white/5",children:(0,Rc.jsx)("input",{"aria-label":"search field types",type:"text",placeholder:"Search field types...",value:s,onChange:e=>l(e.target.value),className:"w-full bg-muted-foreground/20 border border-white/10 rounded-full px-3 py-2 text-sm focus:border-indigo-500/50 focus:outline-none",autoFocus:!0})}),(0,Rc.jsxs)("div",{className:"max-h-100 overflow-y-auto p-2 custom-scrollbar",children:[h.map(e=>(0,Rc.jsxs)("div",{className:"mb-3",children:[(0,Rc.jsx)("h4",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-wider px-2 mb-1",children:e.label}),(0,Rc.jsx)("div",{className:"grid grid-cols-3 gap-1",children:e.types.map(e=>(0,Rc.jsxs)("button",{onClick:()=>m(e.type),className:"flex items-center gap-2 px-3 py-2 rounded-lg text-xs hover:bg-white/5 text-left transition-colors",children:[(0,Rc.jsx)("span",{className:"text-gray-400",children:e.icon}),(0,Rc.jsx)("span",{children:e.label})]},e.type))})]},e.label)),0===h.length&&(0,Rc.jsx)("div",{className:"py-8 text-center text-gray-500 text-sm",children:"No field types found"})]})]}),t[0]=a,t[1]=o,t[2]=n,t[3]=r,t[4]=s,t[5]=c,t[6]=u,t[7]=d,t[8]=f}else c=t[5],u=t[6],d=t[7],f=t[8];return t[20]!==c||t[21]!==u?(h=(0,Rc.jsx)(c,{children:u}),t[20]=c,t[21]=u,t[22]=h):h=t[22],t[23]!==d||t[24]!==f||t[25]!==h?(p=(0,Rc.jsxs)("div",{className:d,children:[f,h]}),t[23]=d,t[24]=f,t[25]=h,t[26]=p):p=t[26],p}function dP(e){return e.types.length>0}function fP(e){const t=(0,S.c)(5),{projectId:n}=e;let r,a;return t[0]!==n?(r=(0,Rc.jsx)(hP,{projectId:n}),t[0]=n,t[1]=r):r=t[1],t[2]!==n||t[3]!==r?(a=(0,Rc.jsx)($v,{projectId:n,children:r}),t[2]=n,t[3]=r,t[4]=a):a=t[4],a}function hP({projectId:e}){const{schema:t,selectedNodeId:n,setSelectedNodeId:r,selectedFieldId:a,setSelectedFieldId:o,syncStatus:i,isLoading:s,addNode:l,deleteNode:c,updateNode:u,reorderFields:d,importSchema:f,publishSchema:h,isDirty:p}=ab(),[m,g]=(0,k.useState)("visual"),[y,v]=(0,k.useState)("sdk"),[b,x]=(0,k.useState)(null),[w,S]=(0,k.useState)(!1),E=(0,k.useRef)(null),C=(0,k.useRef)(null),N=(0,k.useMemo)(()=>t.pages.find(e=>e.id===n)||t.collections.find(e=>e.id===n),[t.pages,t.collections,n]),j=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,k.useMemo)(()=>[...t].filter(e=>null!=e),[...t])}(re(Qe,{activationConstraint:{distance:4}}),re(We,{coordinateGetter:pn})),T=(0,k.useCallback)(e=>{x(String(e.active.id))},[]),R=(0,k.useCallback)(e=>{x(null);const{active:t,over:n}=e;if(!N||!n||t.id===n.id)return;const r=N.fields.findIndex(e=>e.id===t.id),a=N.fields.findIndex(e=>e.id===n.id);-1!==r&&-1!==a&&d(N.id,Yt(N.fields,r,a))},[N,d]),O=(0,k.useCallback)(()=>{const n=new Blob([JSON.stringify(t,null,2)],{type:"application/json"}),r=URL.createObjectURL(n),a=document.createElement("a");a.href=r,a.download=`schema-${e}.json`,a.click(),URL.revokeObjectURL(r),oh.success("Schema exported")},[t,e]),P=(0,k.useCallback)(e=>{const t=e.target.files?.[0];if(!t)return;const n=new FileReader;n.onload=e=>{try{f(JSON.parse(e.target?.result))}catch{oh.error("Invalid JSON schema")}E.current&&(E.current.value="")},n.readAsText(t)},[f]),A=(0,k.useMemo)(()=>{const e=t=>t.reduce((t,n)=>t+1+(n.fields?e(n.fields):0),0);return N?e(N.fields):0},[N]),_=(0,k.useMemo)(()=>N?.fields.find(e=>e.id===b),[N,b]);return s?(0,Rc.jsx)("div",{className:"flex h-screen w-screen items-center justify-center bg-[#060608]",children:(0,Rc.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,Rc.jsxs)("div",{className:"relative",children:[(0,Rc.jsx)("div",{className:"h-10 w-10 rounded-xl bg-indigo-500/20 flex items-center justify-center",children:(0,Rc.jsx)(Kd,{className:"h-5 w-5 text-indigo-400"})}),(0,Rc.jsx)("div",{className:"absolute -inset-1 rounded-2xl border border-indigo-500/30 animate-pulse"})]}),(0,Rc.jsx)("p",{className:"text-xs text-gray-500 tracking-widest uppercase font-medium",children:"Loading schema…"})]})}):(0,Rc.jsxs)("div",{className:"flex h-screen w-screen overflow-hidden font-sans text-gray-200 bg-[#060608]",children:[(0,Rc.jsxs)("aside",{className:"flex w-65 shrink-0 flex-col border-r border-white/6 bg-[#08090d]",children:[(0,Rc.jsxs)("div",{className:"h-12 flex items-center gap-2.5 px-4 border-b border-white/6 shrink-0",children:[(0,Rc.jsx)("div",{className:"h-6 w-6 rounded-md bg-linear-to-br from-indigo-500 to-violet-600 flex items-center justify-center shrink-0",children:(0,Rc.jsx)(Kd,{className:"h-3.5 w-3.5 text-white"})}),(0,Rc.jsx)("span",{className:"text-sm font-semibold text-white tracking-tight",children:"Schema Studio"}),(0,Rc.jsxs)("div",{className:"ml-auto flex gap-1",children:[(0,Rc.jsx)("button",{onClick:O,className:"p-1.5 rounded-md hover:bg-white/6 text-gray-500 hover:text-gray-300 transition-colors",title:"Export schema",children:(0,Rc.jsx)(Yd,{className:"h-3.5 w-3.5"})}),(0,Rc.jsxs)("label",{className:"p-1.5 rounded-md hover:bg-white/6 text-gray-500 hover:text-gray-300 transition-colors cursor-pointer",title:"Import schema",children:[(0,Rc.jsx)("input",{type:"file",accept:".json",className:"hidden",ref:E,onChange:P}),(0,Rc.jsx)(Hf,{className:"h-3.5 w-3.5"})]})]})]}),(0,Rc.jsxs)("div",{className:"p-3 border-b border-white/6 shrink-0 flex gap-2",children:[(0,Rc.jsxs)("button",{onClick:()=>l("SINGLETON"),className:"flex-1 flex items-center justify-center gap-1.5 rounded-lg py-2 text-[11px] font-semibold text-cyan-400 bg-cyan-500/8 hover:bg-cyan-500/[0.14] border border-cyan-500/20 hover:border-cyan-500/30 transition-all",children:[(0,Rc.jsx)(jd,{className:"h-3.5 w-3.5"})," Page"]}),(0,Rc.jsxs)("button",{onClick:()=>l("COLLECTION"),className:"flex-1 flex items-center justify-center gap-1.5 rounded-lg py-2 text-[11px] font-semibold text-violet-400 bg-violet-500/8 hover:bg-violet-500/[0.14] border border-violet-500/20 hover:border-violet-500/30 transition-all",children:[(0,Rc.jsx)(Cd,{className:"h-3.5 w-3.5"})," Collection"]})]}),(0,Rc.jsxs)("div",{className:"flex-1 overflow-y-auto py-3 space-y-4",children:[(0,Rc.jsx)(pP,{label:"Pages",icon:(0,Rc.jsx)(Zd,{className:"h-3 w-3"}),nodes:t.pages,selectedNodeId:n,onSelect:e=>{r(e),o(null)},onDelete:c,empty:"No pages yet"}),(0,Rc.jsx)(pP,{label:"Collections",icon:(0,Rc.jsx)(Kd,{className:"h-3 w-3"}),nodes:t.collections,selectedNodeId:n,onSelect:e=>{r(e),o(null)},onDelete:c,empty:"No collections yet"})]}),(0,Rc.jsxs)("div",{className:"p-3 border-t border-white/6 space-y-3 shrink-0",children:[(0,Rc.jsx)(yP,{status:i,isDirty:p}),(0,Rc.jsxs)("div",{className:"rounded-lg border border-white/6 bg-white/2 p-3 space-y-2.5",children:[(0,Rc.jsx)("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest",children:"Deploy"}),(0,Rc.jsx)(vP,{icon:(0,Rc.jsx)(If,{className:"h-3 w-3"}),label:"Preview changes",cmd:"npx nexus diff",color:"cyan"}),(0,Rc.jsx)(vP,{icon:(0,Rc.jsx)(Kf,{className:"h-3 w-3"}),label:"Push to production",cmd:"npx nexus push",color:"violet"})]})]})]}),(0,Rc.jsxs)("main",{className:"flex-1 flex flex-col overflow-hidden min-w-0",children:[(0,Rc.jsxs)("header",{className:"h-12 flex items-center shrink-0 border-b border-white/6 bg-[#08090d]/60 backdrop-blur-sm px-5 gap-4",children:[(0,Rc.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[(0,Rc.jsx)("span",{className:"text-[11px] text-gray-600 hidden sm:block",children:"Model"}),N&&(0,Rc.jsxs)(Rc.Fragment,{children:[(0,Rc.jsx)(Ud,{className:"h-3 w-3 text-gray-700 shrink-0 hidden sm:block"}),w?(0,Rc.jsx)("input",{ref:C,defaultValue:N.name,onBlur:e=>{e.target.value.trim()&&u(N.id,{name:e.target.value.trim()}),S(!1)},onKeyDown:e=>{"Enter"===e.key&&e.currentTarget.blur(),"Escape"===e.key&&S(!1)},className:"bg-white/6 border border-indigo-500/50 rounded-md px-2 py-0.5 text-sm font-medium text-white outline-none min-w-0 max-w-55",autoFocus:!0,onFocus:e=>e.target.select()}):(0,Rc.jsxs)("button",{className:"flex items-center gap-1.5 group",onClick:()=>S(!0),children:[(0,Rc.jsx)("span",{className:"text-sm font-medium text-white truncate max-w-50",children:N.name}),(0,Rc.jsx)(Td,{className:"h-3 w-3 text-gray-600 opacity-0 group-hover:opacity-100 transition-opacity shrink-0"})]}),(0,Rc.jsx)(gP,{type:N.type})]})]}),N&&(0,Rc.jsx)("div",{className:"flex items-center gap-0.5 bg-white/4 rounded-lg p-0.5 border border-white/6",children:["visual","json","preview"].map(e=>(0,Rc.jsx)("button",{onClick:()=>g(e),className:Lp("px-3 py-1 rounded-md text-[11px] font-semibold capitalize transition-all",m===e?"bg-white/10 text-white":"text-gray-500 hover:text-gray-300"),children:e},e))}),(0,Rc.jsxs)("button",{onClick:async()=>{await h()},className:Lp("flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[11px] font-semibold transition-all",p?"bg-indigo-500 hover:bg-indigo-400 text-white":"bg-white/4 text-gray-500 border border-white/6 cursor-default"),children:[(0,Rc.jsx)(Kf,{className:"h-3 w-3"}),"Publish"]})]}),(0,Rc.jsxs)("div",{className:"flex-1 overflow-hidden flex min-h-0",children:[(0,Rc.jsx)("div",{className:"flex-1 overflow-y-auto min-h-0",children:(0,Rc.jsx)(Ic,{mode:"wait",children:N?"visual"===m?(0,Rc.jsxs)(ld.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0},transition:{duration:.15},className:"max-w-2xl mx-auto px-6 py-8",children:[(0,Rc.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Rc.jsxs)("div",{className:"space-y-1",children:[(0,Rc.jsx)("div",{className:"flex items-center gap-2 text-[10px] font-mono text-gray-600 uppercase tracking-widest",children:(0,Rc.jsxs)("span",{className:"font-mono text-gray-500",children:["/",N.apiKey]})}),(0,Rc.jsxs)("p",{className:"text-xs text-gray-600",children:[A," field",1!==A?"s":""," ","defined"]})]}),(0,Rc.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-gray-600",children:[(0,Rc.jsx)($d,{className:"h-3 w-3"}),(0,Rc.jsxs)("span",{className:"font-mono",children:["v",N.version??"1.0.0"]})]})]}),(0,Rc.jsxs)(Pt,{sensors:j,collisionDetection:fe,onDragStart:T,onDragEnd:R,children:[(0,Rc.jsx)(rn,{items:N.fields.map(e=>e.id),strategy:en,children:(0,Rc.jsxs)("div",{className:"space-y-2",children:[0===N.fields.length&&(0,Rc.jsxs)("div",{className:"py-12 text-center border border-dashed border-white/6 rounded-xl",children:[(0,Rc.jsx)("p",{className:"text-sm text-gray-600 mb-1",children:"No fields yet"}),(0,Rc.jsx)("p",{className:"text-xs text-gray-700",children:"Use the button below to add your first field"})]}),N.fields.map(e=>(0,Rc.jsx)(dO,{field:e,nodeId:N.id,onSelect:()=>o(e.id),isSelected:a===e.id},e.id))]})}),(0,Rc.jsx)(Gt,{children:_&&(0,Rc.jsxs)("div",{className:"rounded-xl border border-indigo-500/40 bg-[#0A0B10] p-3 shadow-2xl opacity-90 ring-1 ring-indigo-500/20",children:[(0,Rc.jsx)("p",{className:"text-sm font-medium text-white",children:_.label}),(0,Rc.jsx)("p",{className:"text-[10px] text-gray-500 font-mono mt-0.5",children:_.type})]})})]}),(0,Rc.jsx)(uP,{nodeId:N.id})]},`visual-${N.id}`):"json"===m?(0,Rc.jsx)(ld.div,{initial:{opacity:0},animate:{opacity:1},className:"h-full p-6",children:(0,Rc.jsxs)("div",{className:"h-full w-full border border-white/6 mx-auto max-w-5xl bg-muted/20 overflow-hidden",children:[(0,Rc.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-white/6",children:[(0,Rc.jsxs)("div",{className:"flex gap-1.5",children:[(0,Rc.jsx)("div",{className:"h-2.5 w-2.5 rounded-full bg-red-500/60"}),(0,Rc.jsx)("div",{className:"h-2.5 w-2.5 rounded-full bg-yellow-500/60"}),(0,Rc.jsx)("div",{className:"h-2.5 w-2.5 rounded-full bg-green-500/60"})]}),(0,Rc.jsx)("span",{className:"text-[10px] text-gray-600 font-mono ml-1",children:"schema.json"}),(0,Rc.jsx)("button",{onClick:O,className:"ml-auto text-[10px] text-gray-600 hover:text-gray-400 transition-colors font-mono",children:"download ↓"})]}),(0,Rc.jsx)("div",{className:"pb-8 relative h-full w-full overflow-scroll",children:(0,Rc.jsx)("pre",{className:"p-5 text-xs overflow-scroll relative flex font-mono text-indigo-300/80 whitespace-pre-wrap leading-relaxed",children:JSON.stringify(t,null,2)})})]})},"json"):(0,Rc.jsx)(UO,{node:N,projectId:e}):(0,Rc.jsxs)(ld.div,{initial:{opacity:0},animate:{opacity:1},className:"h-full flex flex-col items-center justify-center gap-6 p-8",children:[(0,Rc.jsx)("div",{className:"relative",children:(0,Rc.jsx)("div",{className:"h-20 w-20 rounded-2xl bg-white/3 border border-white/6 flex items-center justify-center",children:(0,Rc.jsx)(gd,{className:"h-9 w-9 text-gray-700"})})}),(0,Rc.jsxs)("div",{className:"text-center space-y-2",children:[(0,Rc.jsx)("p",{className:"text-base font-semibold text-gray-400",children:"No node selected"}),(0,Rc.jsx)("p",{className:"text-sm text-gray-600 max-w-xs",children:"Create a page or collection from the sidebar to start building your schema"})]}),(0,Rc.jsxs)("div",{className:"flex gap-2",children:[(0,Rc.jsxs)("button",{onClick:()=>l("SINGLETON"),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium text-cyan-400 bg-cyan-500/8 hover:bg-cyan-500/[0.14] border border-cyan-500/20 transition-all",children:[(0,Rc.jsx)(jd,{className:"h-4 w-4"})," New Page"]}),(0,Rc.jsxs)("button",{onClick:()=>l("COLLECTION"),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium text-violet-400 bg-violet-500/8 hover:bg-violet-500/[0.14] border border-violet-500/20 transition-all",children:[(0,Rc.jsx)(Cd,{className:"h-4 w-4"})," New Collection"]})]})]},"empty")})}),(0,Rc.jsxs)("aside",{className:"w-88 shrink-0 border-l border-white/6 bg-[#08090d] flex flex-col",children:[(0,Rc.jsx)("div",{className:"shrink-0 border-b border-white/6",children:N?(0,Rc.jsxs)(Rc.Fragment,{children:[(0,Rc.jsxs)("div",{className:"flex items-center gap-2 px-4 pt-3 pb-2",children:[(0,Rc.jsx)("div",{className:Lp("h-2 w-2 rounded-full shrink-0","SINGLETON"===N.type?"bg-cyan-400":"bg-violet-400")}),(0,Rc.jsx)("span",{className:"text-[11px] font-semibold text-gray-300 truncate flex-1",children:N.name}),(0,Rc.jsxs)("span",{className:"text-[10px] font-mono text-gray-600 shrink-0",children:[A," field",1!==A?"s":""]})]}),(0,Rc.jsx)("div",{className:"flex px-2 pb-0 gap-0.5",children:[{id:"sdk",label:"Code",icon:(0,Rc.jsx)(If,{className:"h-3 w-3"})},{id:"config",label:"Settings",icon:(0,Rc.jsx)(Kf,{className:"h-3 w-3"})}].map(({id:e,label:t,icon:n})=>(0,Rc.jsxs)("button",{onClick:()=>{v(e),o(null)},className:Lp("flex-1 flex items-center justify-center gap-1.5 py-2 text-[11px] font-semibold rounded-t-lg transition-all border-b-2",y===e?"text-white border-indigo-500 bg-white/4":"text-gray-600 hover:text-gray-400 border-transparent hover:bg-white/2"),children:[(0,Rc.jsx)("span",{className:Lp(y===e?"text-indigo-400":"text-gray-700"),children:n}),t]},e))})]}):(0,Rc.jsx)("div",{className:"h-17 flex items-center px-4",children:(0,Rc.jsx)("span",{className:"text-[11px] text-gray-600 font-medium",children:"Properties"})})}),(0,Rc.jsx)("div",{className:"flex-1 overflow-y-auto min-h-0",children:"sdk"===y&&N?(0,Rc.jsx)("div",{className:"p-4",children:(0,Rc.jsx)(EO,{node:N})}):"config"===y&&N?(0,Rc.jsx)("div",{className:"p-3",children:(0,Rc.jsx)(sP,{node:N,onUpdate:u})}):(0,Rc.jsxs)("div",{className:"flex flex-col items-center justify-center h-48 text-center gap-3 p-6",children:[(0,Rc.jsx)("div",{className:"h-10 w-10 rounded-xl bg-white/3 border border-white/6 flex items-center justify-center",children:(0,Rc.jsx)(wd,{className:"h-5 w-5 text-gray-700"})}),(0,Rc.jsxs)("div",{className:"space-y-1",children:[(0,Rc.jsx)("p",{className:"text-xs font-medium text-gray-500",children:"Nothing selected"}),(0,Rc.jsx)("p",{className:"text-[10px] text-gray-700 max-w-44",children:"Select a page or collection to view its settings and generated code"})]})]})})]})]})]})]})}function pP(e){const t=(0,S.c)(15),{label:n,icon:r,nodes:a,selectedNodeId:o,onSelect:i,onDelete:s,empty:l}=e;let c,u,d,f;return t[0]!==a.length?(c=(0,Rc.jsx)("span",{className:"ml-auto font-mono text-gray-700",children:a.length}),t[0]=a.length,t[1]=c):c=t[1],t[2]!==r||t[3]!==n||t[4]!==c?(u=(0,Rc.jsxs)("div",{className:"flex items-center gap-1.5 px-2 pb-1.5 text-[10px] font-bold text-gray-600 uppercase tracking-wider",children:[r," ",n,c]}),t[2]=r,t[3]=n,t[4]=c,t[5]=u):u=t[5],t[6]!==l||t[7]!==a||t[8]!==s||t[9]!==i||t[10]!==o?(d=0===a.length?(0,Rc.jsx)("p",{className:"text-[11px] text-gray-700 px-2 py-1 italic",children:l}):(0,Rc.jsx)("div",{className:"space-y-0.5",children:a.map(e=>(0,Rc.jsx)(mP,{node:e,isSelected:o===e.id,onSelect:()=>i(e.id),onDelete:()=>s(e.id)},e.id))}),t[6]=l,t[7]=a,t[8]=s,t[9]=i,t[10]=o,t[11]=d):d=t[11],t[12]!==u||t[13]!==d?(f=(0,Rc.jsxs)("div",{className:"px-2",children:[u,d]}),t[12]=u,t[13]=d,t[14]=f):f=t[14],f}function mP(e){const t=(0,S.c)(27),{node:n,isSelected:r,onSelect:a,onDelete:o}=e,i=r?"bg-indigo-500/12 text-white":"hover:bg-white/4 text-gray-400 hover:text-gray-200";let s;t[0]!==i?(s=Lp("group flex items-center rounded-lg transition-all cursor-pointer",i),t[0]=i,t[1]=s):s=t[1];const l="SINGLETON"===n.type?"bg-cyan-400":"bg-violet-400";let c,u;t[2]!==l?(c=Lp("h-3 w-3 rounded-full shrink-0",l),t[2]=l,t[3]=c):c=t[3],t[4]!==c?(u=(0,Rc.jsx)("div",{className:c}),t[4]=c,t[5]=u):u=t[5];const d=n.name||"Untitled";let f,h,p,m,g,y,v,b;return t[6]!==d?(f=(0,Rc.jsx)("p",{className:"text-[13px] font-medium truncate leading-tight",children:d}),t[6]=d,t[7]=f):f=t[7],t[8]!==n.apiKey?(h=(0,Rc.jsxs)("p",{className:"text-[10px] font-mono text-gray-600 truncate",children:["/",n.apiKey]}),t[8]=n.apiKey,t[9]=h):h=t[9],t[10]!==f||t[11]!==h?(p=(0,Rc.jsxs)("div",{className:"min-w-0 flex-1",children:[f,h]}),t[10]=f,t[11]=h,t[12]=p):p=t[12],t[13]!==r?(m=r&&(0,Rc.jsx)("div",{className:"h-1.5 w-1.5 rounded-full bg-indigo-400 shrink-0"}),t[13]=r,t[14]=m):m=t[14],t[15]!==a||t[16]!==m||t[17]!==u||t[18]!==p?(g=(0,Rc.jsxs)("button",{onClick:a,className:"flex-1 flex items-center gap-2.5 px-2.5 py-2 text-left min-w-0",children:[u,p,m]}),t[15]=a,t[16]=m,t[17]=u,t[18]=p,t[19]=g):g=t[19],t[20]===Symbol.for("react.memo_cache_sentinel")?(y=(0,Rc.jsx)(Ff,{className:"h-3.5 w-3.5"}),t[20]=y):y=t[20],t[21]!==o?(v=(0,Rc.jsx)("button",{onClick:o,className:"shrink-0 p-2 opacity-0 group-hover:opacity-100 hover:text-red-400 transition-all mr-1",title:"Delete",children:y}),t[21]=o,t[22]=v):v=t[22],t[23]!==g||t[24]!==v||t[25]!==s?(b=(0,Rc.jsxs)("div",{className:s,children:[g,v]}),t[23]=g,t[24]=v,t[25]=s,t[26]=b):b=t[26],b}function gP(e){const t=(0,S.c)(5),{type:n}=e,r="SINGLETON"===n?"bg-cyan-500/10 text-cyan-400 border border-cyan-500/20":"bg-violet-500/10 text-violet-400 border border-violet-500/20";let a;t[0]!==r?(a=Lp("text-[10px] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded-md shrink-0",r),t[0]=r,t[1]=a):a=t[1];const o="SINGLETON"===n?"Page":"Collection";let i;return t[2]!==a||t[3]!==o?(i=(0,Rc.jsx)("span",{className:a,children:o}),t[2]=a,t[3]=o,t[4]=i):i=t[4],i}function yP(e){const t=(0,S.c)(4),{status:n,isDirty:r}=e;if("saving"===n){let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,Rc.jsxs)("div",{className:"flex items-center gap-1.5 px-2 py-1.5 rounded-md bg-yellow-500/8 border border-yellow-500/20 text-yellow-400 text-[10px] font-semibold",children:[(0,Rc.jsx)(Tf,{className:"h-3 w-3 animate-spin"}),"Saving…"]}),t[0]=e):e=t[0],e}if("error"===n){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,Rc.jsxs)("div",{className:"flex items-center gap-1.5 px-2 py-1.5 rounded-md bg-red-500/8 border border-red-500/20 text-red-400 text-[10px] font-semibold",children:[(0,Rc.jsx)(vd,{className:"h-3 w-3"}),"Save failed"]}),t[1]=e):e=t[1],e}if("saved"===n&&!r){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,Rc.jsxs)("div",{className:"flex items-center gap-1.5 px-2 py-1.5 rounded-md bg-emerald-500/8 border border-emerald-500/20 text-emerald-400 text-[10px] font-semibold",children:[(0,Rc.jsx)(bd,{className:"h-3 w-3"}),"All changes saved"]}),t[2]=e):e=t[2],e}let a;return t[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,Rc.jsxs)("div",{className:"flex items-center gap-1.5 px-2 py-1.5 rounded-md bg-white/3 border border-white/6 text-gray-600 text-[10px] font-semibold",children:[(0,Rc.jsx)("div",{className:"h-2 w-2 rounded-full bg-amber-400/60"}),"Unsaved changes"]}),t[3]=a):a=t[3],a}function vP(e){const t=(0,S.c)(17),{icon:n,label:r,cmd:a,color:o}=e,i="cyan"===o?"text-cyan-400":"text-violet-400";let s,l,c,u,d,f;return t[0]!==i||t[1]!==n?(s=(0,Rc.jsx)("span",{className:i,children:n}),t[0]=i,t[1]=n,t[2]=s):s=t[2],t[3]!==r||t[4]!==s?(l=(0,Rc.jsxs)("div",{className:"flex items-center gap-1 text-[10px] text-gray-600",children:[s,r]}),t[3]=r,t[4]=s,t[5]=l):l=t[5],t[6]!==i?(c=Lp("w-full text-left bg-black/40 text-[10px] font-mono p-2 rounded-md border border-white/6 select-all hover:border-white/10 transition-colors",i),t[6]=i,t[7]=c):c=t[7],t[8]!==a?(u=()=>{navigator.clipboard.writeText(a).then(bP)},t[8]=a,t[9]=u):u=t[9],t[10]!==a||t[11]!==c||t[12]!==u?(d=(0,Rc.jsx)("button",{className:c,onClick:u,title:"Click to copy",children:a}),t[10]=a,t[11]=c,t[12]=u,t[13]=d):d=t[13],t[14]!==l||t[15]!==d?(f=(0,Rc.jsxs)("div",{className:"space-y-1",children:[l,d]}),t[14]=l,t[15]=d,t[16]=f):f=t[16],f}function bP(){return oh.success("Copied to clipboard")}function xP(){const e=(0,S.c)(15),[t,n]=(0,k.useState)(null),[r,a]=(0,k.useState)(null);let o,i,s,l,c;if(e[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{Pv.get("/context").then(e=>{e.data.projectId?(n(e.data.projectId),document.documentElement.classList.add("dark")):a("No Project ID found in CLI context.")}).catch(e=>{a(e.response?.data?.error||e.message||"Failed to connect to Local CLI.")})},i=[],e[0]=o,e[1]=i):(o=e[0],i=e[1]),(0,k.useEffect)(o,i),r){let t,n,a,o,i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(t=(0,Rc.jsx)(vd,{className:"h-12 w-12 text-red-500 mb-4"}),n=(0,Rc.jsx)("h1",{className:"text-xl font-bold mb-2",children:"Studio Initialization Failed"}),e[2]=t,e[3]=n):(t=e[2],n=e[3]),e[4]!==r?(a=(0,Rc.jsx)("p",{className:"text-gray-400 font-mono text-sm",children:r}),e[4]=r,e[5]=a):a=e[5],e[6]===Symbol.for("react.memo_cache_sentinel")?(o=(0,Rc.jsx)("p",{className:"text-gray-500 text-xs mt-4",children:"Make sure you are running 'npx nexus studio'"}),e[6]=o):o=e[6],e[7]!==a?(i=(0,Rc.jsxs)("div",{className:"h-screen w-screen flex flex-col items-center justify-center bg-[#050505] text-white",children:[t,n,a,o]}),e[7]=a,e[8]=i):i=e[8],i}if(!t){let t;return e[9]===Symbol.for("react.memo_cache_sentinel")?(t=(0,Rc.jsxs)("div",{className:"h-screen w-screen flex flex-col items-center justify-center bg-[#050505] text-white",children:[(0,Rc.jsx)(Nd,{className:"h-8 w-8 animate-spin text-cyan-500 mb-4"}),(0,Rc.jsx)("p",{className:"text-sm text-gray-400 tracking-widest uppercase",children:"Connecting to CLI Gateway..."})]}),e[9]=t):t=e[9],t}return e[10]!==t?(s=(0,Rc.jsx)(fP,{projectId:t}),e[10]=t,e[11]=s):s=e[11],e[12]===Symbol.for("react.memo_cache_sentinel")?(l=(0,Rc.jsx)(hh,{theme:"dark",position:"bottom-right"}),e[12]=l):l=e[12],e[13]!==s?(c=(0,Rc.jsxs)(Rc.Fragment,{children:[s,l]}),e[13]=s,e[14]=c):c=e[14],c}var wP=new class{#Y;#c;#w;#X;#Q;#J;#Z;#ee;constructor(e={}){this.#Y=e.queryCache||new Rm,this.#c=e.mutationCache||new Om,this.#w=e.defaultOptions||{},this.#X=new Map,this.#Q=new Map,this.#J=0}mount(){this.#J++,1===this.#J&&(this.#Z=hm.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#Y.onFocus())}),this.#ee=pm.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#Y.onOnline())}))}unmount(){this.#J--,0===this.#J&&(this.#Z?.(),this.#Z=void 0,this.#ee?.(),this.#ee=void 0)}isFetching(e){return this.#Y.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#c.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#Y.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#Y.build(this,t),r=n.state.data;return void 0===r?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime($p(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#Y.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=this.#Y.get(r.queryHash)?.state.data,o=function(e,t){return"function"==typeof e?e(t):e}(t,a);if(void 0!==o)return this.#Y.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return um.batch(()=>this.#Y.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#Y.get(t.queryHash)?.state}removeQueries(e){const t=this.#Y;um.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const n=this.#Y;return um.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=um.batch(()=>this.#Y.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Bp).catch(Bp)}invalidateQueries(e,t={}){return um.batch(()=>(this.#Y.findAll(e).forEach(e=>{e.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=um.batch(()=>this.#Y.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Bp)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(r).then(Bp)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=this.#Y.build(this,t);return n.isStaleByTime($p(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Bp).catch(Bp)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Bp).catch(Bp)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return pm.isOnline()?this.#c.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#Y}getMutationCache(){return this.#c}getDefaultOptions(){return this.#w}setDefaultOptions(e){this.#w=e}setQueryDefaults(e,t){this.#X.set(Gp(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#X.values()],n={};return t.forEach(t=>{Yp(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#Q.set(Gp(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#Q.values()],n={};return t.forEach(t=>{Yp(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#w.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Kp(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===om&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#w.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#Y.clear(),this.#c.clear()}}({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});w.createRoot(document.getElementById("root")).render((0,Rc.jsx)(k.StrictMode,{children:(0,Rc.jsx)(Fm,{client:wP,children:(0,Rc.jsx)(xP,{})})}));
|