@zuplo/editor 1.0.27978357620 → 1.0.28023527921
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.html +1 -1
- package/dist/client/static/css/{main-z1XNroiq.css → main-BDPOODlM.css} +1 -1
- package/dist/client/static/js/{editor.main-KLXktRFb.js → editor.main-CFZQhyYc.js} +2 -2
- package/dist/client/static/js/{editor.main-KLXktRFb.js.map → editor.main-CFZQhyYc.js.map} +1 -1
- package/dist/client/static/js/{main-D2iBP6CM.js → main-DD9s-wcp.js} +3 -3
- package/dist/client/static/js/{main-D2iBP6CM.js.map → main-DD9s-wcp.js.map} +1 -1
- package/dist/client/static/js/{main.local-AVsmIycL.js → main.local-FLq5GCWm.js} +4 -4
- package/dist/client/static/js/{main.local-AVsmIycL.js.map → main.local-FLq5GCWm.js.map} +1 -1
- package/dist/client/static/js/{monaco.contribution-WOC9E2OR.js → monaco.contribution-BC7kmEIw.js} +3 -3
- package/dist/client/static/js/{monaco.contribution-WOC9E2OR.js.map → monaco.contribution-BC7kmEIw.js.map} +1 -1
- package/dist/client/static/js/{tsMode-CWIGgg33.js → tsMode-CFiwD-Uu.js} +2 -2
- package/dist/client/static/js/{tsMode-CWIGgg33.js.map → tsMode-CFiwD-Uu.js.map} +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/static/js/editor.main-
|
|
2
|
-
import{a as e,i as t,n,r,t as i}from"./chunk-D9Tnb9aB.js";import{t as a}from"./main-D2iBP6CM.js";var o=i((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),s=i(((e,t)=>{t.exports=o()})),c=i((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),l=i(((e,t)=>{t.exports=c()})),u=i((e=>{var t=s();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=i.p;try{if(c.T=null,i.p=2,e)return e()}finally{c.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.7`})),d=i(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=u()})),f=i((e=>{var t=l(),n=s(),r=d();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(o(e)!==e)throw Error(i(188))}function p(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return f(a),e;if(s===r)return f(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,l=a.child;l;){if(l===n){c=!0,n=a,r=s;break}if(l===r){c=!0,r=a,n=s;break}l=l.sibling}if(!c){for(l=s.child;l;){if(l===n){c=!0,n=s,r=a;break}if(l===r){c=!0,r=s,n=a;break}l=l.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R={pending:!1,data:null,method:null,action:null},z=[],ee=-1;function te(e){return{current:e}}function ne(e){0>ee||(e.current=z[ee],z[ee]=null,ee--)}function B(e,t){ee++,z[ee]=e.current,e.current=t}var re=te(null),ie=te(null),ae=te(null),oe=te(null);function se(e,t){switch(B(ae,t),B(ie,e),B(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?bd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=bd(t),e=xd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ne(re),B(re,e)}function ce(){ne(re),ne(ie),ne(ae)}function le(e){e.memoizedState!==null&&B(oe,e);var t=re.current,n=xd(t,e.type);t!==n&&(B(ie,e),B(re,n))}function ue(e){ie.current===e&&(ne(re),ne(ie)),oe.current===e&&(ne(oe),wf._currentValue=R)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/static/js/editor.main-CFZQhyYc.js","/static/js/chunk-D9Tnb9aB.js","/static/js/main-DD9s-wcp.js","/static/js/editor.api2-BgpEDUgR.js","/static/css/editor-DU9oqspw.css","/static/js/workers-BAYC34vF.js","/static/js/monaco.contribution-BC7kmEIw.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,i as t,n,r,t as i}from"./chunk-D9Tnb9aB.js";import{t as a}from"./main-DD9s-wcp.js";var o=i((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),s=i(((e,t)=>{t.exports=o()})),c=i((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),l=i(((e,t)=>{t.exports=c()})),u=i((e=>{var t=s();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=i.p;try{if(c.T=null,i.p=2,e)return e()}finally{c.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.7`})),d=i(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=u()})),f=i((e=>{var t=l(),n=s(),r=d();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(o(e)!==e)throw Error(i(188))}function p(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return f(a),e;if(s===r)return f(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,l=a.child;l;){if(l===n){c=!0,n=a,r=s;break}if(l===r){c=!0,r=a,n=s;break}l=l.sibling}if(!c){for(l=s.child;l;){if(l===n){c=!0,n=s,r=a;break}if(l===r){c=!0,r=s,n=a;break}l=l.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R={pending:!1,data:null,method:null,action:null},z=[],ee=-1;function te(e){return{current:e}}function ne(e){0>ee||(e.current=z[ee],z[ee]=null,ee--)}function B(e,t){ee++,z[ee]=e.current,e.current=t}var re=te(null),ie=te(null),ae=te(null),oe=te(null);function se(e,t){switch(B(ae,t),B(ie,e),B(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?bd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=bd(t),e=xd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ne(re),B(re,e)}function ce(){ne(re),ne(ie),ne(ae)}function le(e){e.memoizedState!==null&&B(oe,e);var t=re.current,n=xd(t,e.type);t!==n&&(B(ie,e),B(re,n))}function ue(e){ie.current===e&&(ne(re),ne(ie)),oe.current===e&&(ne(oe),wf._currentValue=R)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+de+e+fe}var me=!1;function he(e,t){if(!e||me)return``;me=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
5
|
`),l=s.split(`
|
|
@@ -93,7 +93,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
93
93
|
`},_xe=0,TT=[];function vxe(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),i=g.useState(_xe++)[0],a=g.useState(vT)[0],o=g.useRef(e);g.useEffect(function(){o.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Obe([e.lockRef.current],(e.shards||[]).map(mxe),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=g.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=wT(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=oxe(d,u);if(!f)return!0;if(f?l=d:(l=d===`v`?`h`:`v`,f=oxe(d,u)),!f)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var p=r.current||l;return fxe(p,t,e,p===`h`?s:c,!0)},[]),c=g.useCallback(function(e){var n=e;if(!(!TT.length||TT[TT.length-1]!==a)){var r=`deltaY`in n?pxe(n):wT(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&hxe(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(mxe).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=g.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:yxe(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=g.useCallback(function(e){n.current=wT(e),r.current=void 0},[]),d=g.useCallback(function(t){l(t.type,pxe(t),t.target,s(t,e.lockRef.current))},[]),f=g.useCallback(function(t){l(t.type,wT(t),t.target,s(t,e.lockRef.current))},[]);g.useEffect(function(){return TT.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,CT),document.addEventListener(`touchmove`,c,CT),document.addEventListener(`touchstart`,u,CT),function(){TT=TT.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,CT),document.removeEventListener(`touchmove`,c,CT),document.removeEventListener(`touchstart`,u,CT)}},[]);var p=e.removeScrollBar,m=e.inert;return g.createElement(g.Fragment,null,m?g.createElement(a,{styles:gxe(i)}):null,p?g.createElement(txe,{gapMode:e.gapMode}):null)}function yxe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var bxe=zbe(Bbe,vxe),ET=g.forwardRef(function(e,t){return g.createElement(_T,dT({},e,{ref:t,sideCar:bxe}))});ET.classNames=_T.classNames;var DT=[`Enter`,` `],xxe=[`ArrowDown`,`PageUp`,`Home`],Sxe=[`ArrowUp`,`PageDown`,`End`],Cxe=[...xxe,...Sxe],wxe={ltr:[...DT,`ArrowRight`],rtl:[...DT,`ArrowLeft`]},Txe={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},OT=`Menu`,[kT,Exe,Dxe]=Qi(OT),[AT,Oxe]=Wi(OT,[Dxe,Xw,rT]),jT=Xw(),kxe=rT(),[Axe,MT]=AT(OT),[jxe,NT]=AT(OT),Mxe=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=jT(t),[c,l]=g.useState(null),u=g.useRef(!1),d=la(a),f=QC(i);return g.useEffect(()=>{let 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})}},[]),(0,U.jsx)(Qw,{...s,children:(0,U.jsx)(Axe,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,U.jsx)(jxe,{scope:t,onClose:g.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Mxe.displayName=OT;var Nxe=`MenuAnchor`,PT=g.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=jT(n);return(0,U.jsx)($w,{...i,...r,ref:t})});PT.displayName=Nxe;var FT=`MenuPortal`,[Pxe,Fxe]=AT(FT,{forceMount:void 0}),Ixe=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=MT(FT,t);return(0,U.jsx)(Pxe,{scope:t,forceMount:n,children:(0,U.jsx)(Ma,{present:n||a.open,children:(0,U.jsx)(Aa,{asChild:!0,container:i,children:r})})})};Ixe.displayName=FT;var IT=`MenuContent`,[Lxe,LT]=AT(IT),Rxe=g.forwardRef((e,t)=>{let n=Fxe(IT,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=MT(IT,e.__scopeMenu),o=NT(IT,e.__scopeMenu);return(0,U.jsx)(kT.Provider,{scope:e.__scopeMenu,children:(0,U.jsx)(Ma,{present:r||a.open,children:(0,U.jsx)(kT.Slot,{scope:e.__scopeMenu,children:o.modal?(0,U.jsx)(zxe,{...i,ref:t}):(0,U.jsx)(Bxe,{...i,ref:t})})})})}),zxe=g.forwardRef((e,t)=>{let n=MT(IT,e.__scopeMenu),r=g.useRef(null),i=Vi(t,r);return g.useEffect(()=>{let e=r.current;if(e)return uT(e)},[]),(0,U.jsx)(RT,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ri(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Bxe=g.forwardRef((e,t)=>{let n=MT(IT,e.__scopeMenu);return(0,U.jsx)(RT,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Vxe=Gi(`MenuContent.ScrollLock`),RT=g.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,_=MT(IT,n),v=NT(IT,n),y=jT(n),b=kxe(n),x=Exe(n),[S,C]=g.useState(null),w=g.useRef(null),T=Vi(t,w,_.onContentChange),E=g.useRef(0),D=g.useRef(``),O=g.useRef(0),k=g.useRef(null),A=g.useRef(`right`),j=g.useRef(0),M=m?ET:g.Fragment,N=m?{as:Vxe,allowPinchZoom:!0}:void 0,P=e=>{let t=D.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=_Se(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){D.current=t,window.clearTimeout(E.current),t!==``&&(E.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};g.useEffect(()=>()=>window.clearTimeout(E.current),[]),ew();let F=g.useCallback(e=>A.current===k.current?.side&&ySe(e,k.current?.area),[]);return(0,U.jsx)(Lxe,{scope:n,searchRef:D,onItemEnter:g.useCallback(e=>{F(e)&&e.preventDefault()},[F]),onItemLeave:g.useCallback(e=>{F(e)||(w.current?.focus(),C(null))},[F]),onTriggerLeave:g.useCallback(e=>{F(e)&&e.preventDefault()},[F]),pointerGraceTimerRef:O,onPointerGraceIntentChange:g.useCallback(e=>{k.current=e},[]),children:(0,U.jsx)(M,{...N,children:(0,U.jsx)(rw,{asChild:!0,trapped:i,onMountAutoFocus:Ri(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,U.jsx)(_a,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,U.jsx)(iT,{asChild:!0,...b,dir:v.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:Ri(c,e=>{v.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,U.jsx)(sbe,{role:`menu`,"aria-orientation":`vertical`,"data-state":mSe(_.open),"data-radix-menu-content":``,dir:v.dir,...y,...h,ref:T,style:{outline:`none`,...h.style},onKeyDown:Ri(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&P(e.key));let i=w.current;if(e.target!==i||!Cxe.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled).map(e=>e.ref.current);Sxe.includes(e.key)&&a.reverse(),hSe(a)}),onBlur:Ri(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),D.current=``)}),onPointerMove:Ri(e.onPointerMove,qT(e=>{let t=e.target,n=j.current!==e.clientX;e.currentTarget.contains(t)&&n&&(A.current=e.clientX>j.current?`right`:`left`,j.current=e.clientX)}))})})})})})})});Rxe.displayName=IT;var Hxe=`MenuGroup`,zT=g.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,U.jsx)(Ea.div,{role:`group`,...r,ref:t})});zT.displayName=Hxe;var Uxe=`MenuLabel`,Wxe=g.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,U.jsx)(Ea.div,{...r,ref:t})});Wxe.displayName=Uxe;var BT=`MenuItem`,Gxe=`menu.itemSelect`,VT=g.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=g.useRef(null),o=NT(BT,e.__scopeMenu),s=LT(BT,e.__scopeMenu),c=Vi(t,a),l=g.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Gxe,{bubbles:!0,cancelable:!0});e.addEventListener(Gxe,e=>r?.(e),{once:!0}),Da(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,U.jsx)(Kxe,{...i,ref:c,disabled:n,onClick:Ri(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:Ri(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:Ri(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||DT.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});VT.displayName=BT;var Kxe=g.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=LT(BT,n),s=kxe(n),c=g.useRef(null),l=Vi(t,c),[u,d]=g.useState(!1),[f,p]=g.useState(``);return g.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,U.jsx)(kT.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,U.jsx)(aT,{asChild:!0,...s,focusable:!r,children:(0,U.jsx)(Ea.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:Ri(e.onPointerMove,qT(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ri(e.onPointerLeave,qT(e=>o.onItemLeave(e))),onFocus:Ri(e.onFocus,()=>d(!0)),onBlur:Ri(e.onBlur,()=>d(!1))})})})}),qxe=`MenuCheckboxItem`,Jxe=g.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,U.jsx)(tSe,{scope:e.__scopeMenu,checked:n,children:(0,U.jsx)(VT,{role:`menuitemcheckbox`,"aria-checked":GT(n)?`mixed`:n,...i,ref:t,"data-state":KT(n),onSelect:Ri(i.onSelect,()=>r?.(GT(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Jxe.displayName=qxe;var Yxe=`MenuRadioGroup`,[Xxe,Zxe]=AT(Yxe,{value:void 0,onValueChange:()=>{}}),Qxe=g.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=la(r);return(0,U.jsx)(Xxe,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,U.jsx)(zT,{...i,ref:t})})});Qxe.displayName=Yxe;var $xe=`MenuRadioItem`,eSe=g.forwardRef((e,t)=>{let{value:n,...r}=e,i=Zxe($xe,e.__scopeMenu),a=n===i.value;return(0,U.jsx)(tSe,{scope:e.__scopeMenu,checked:a,children:(0,U.jsx)(VT,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":KT(a),onSelect:Ri(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});eSe.displayName=$xe;var HT=`MenuItemIndicator`,[tSe,nSe]=AT(HT,{checked:!1}),rSe=g.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=nSe(HT,n);return(0,U.jsx)(Ma,{present:r||GT(a.checked)||a.checked===!0,children:(0,U.jsx)(Ea.span,{...i,ref:t,"data-state":KT(a.checked)})})});rSe.displayName=HT;var iSe=`MenuSeparator`,aSe=g.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,U.jsx)(Ea.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});aSe.displayName=iSe;var oSe=`MenuArrow`,sSe=g.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=jT(n);return(0,U.jsx)(cbe,{...i,...r,ref:t})});sSe.displayName=oSe;var UT=`MenuSub`,[cSe,lSe]=AT(UT),uSe=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=MT(UT,t),o=jT(t),[s,c]=g.useState(null),[l,u]=g.useState(null),d=la(i);return g.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,U.jsx)(Qw,{...o,children:(0,U.jsx)(Axe,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,U.jsx)(cSe,{scope:t,contentId:aw(),triggerId:aw(),trigger:s,onTriggerChange:c,children:n})})})};uSe.displayName=UT;var WT=`MenuSubTrigger`,dSe=g.forwardRef((e,t)=>{let n=MT(WT,e.__scopeMenu),r=NT(WT,e.__scopeMenu),i=lSe(WT,e.__scopeMenu),a=LT(WT,e.__scopeMenu),o=g.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=g.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return g.useEffect(()=>u,[u]),g.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,U.jsx)(PT,{asChild:!0,...l,children:(0,U.jsx)(Kxe,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":mSe(n.open),...e,ref:Bi(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ri(e.onPointerMove,qT(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:Ri(e.onPointerLeave,qT(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Ri(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||wxe[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});dSe.displayName=WT;var fSe=`MenuSubContent`,pSe=g.forwardRef((e,t)=>{let n=Fxe(IT,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=MT(IT,e.__scopeMenu),o=NT(IT,e.__scopeMenu),s=lSe(fSe,e.__scopeMenu),c=g.useRef(null),l=Vi(t,c);return(0,U.jsx)(kT.Provider,{scope:e.__scopeMenu,children:(0,U.jsx)(Ma,{present:r||a.open,children:(0,U.jsx)(kT.Slot,{scope:e.__scopeMenu,children:(0,U.jsx)(RT,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Ri(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Ri(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:Ri(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Txe[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});pSe.displayName=fSe;function mSe(e){return e?`open`:`closed`}function GT(e){return e===`indeterminate`}function KT(e){return GT(e)?`indeterminate`:e?`checked`:`unchecked`}function hSe(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function gSe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function _Se(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=gSe(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function vSe(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function ySe(e,t){return t?vSe({x:e.clientX,y:e.clientY},t):!1}function qT(e){return t=>t.pointerType===`mouse`?e(t):void 0}var bSe=Mxe,xSe=PT,SSe=Ixe,CSe=Rxe,wSe=zT,TSe=Wxe,ESe=VT,DSe=Jxe,OSe=Qxe,kSe=eSe,ASe=rSe,jSe=aSe,MSe=sSe,NSe=uSe,PSe=dSe,FSe=pSe,JT=`DropdownMenu`,[ISe,LSe]=Wi(JT,[Oxe]),YT=Oxe(),[RSe,zSe]=ISe(JT),BSe=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=YT(t),l=g.useRef(null),[u,d]=La({prop:i,defaultProp:a??!1,onChange:o,caller:JT});return(0,U.jsx)(RSe,{scope:t,triggerId:aw(),triggerRef:l,contentId:aw(),open:u,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,U.jsx)(bSe,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};BSe.displayName=JT;var VSe=`DropdownMenuTrigger`,HSe=g.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=zSe(VSe,n),o=YT(n);return(0,U.jsx)(xSe,{asChild:!0,...o,children:(0,U.jsx)(Ea.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:Bi(t,a.triggerRef),onPointerDown:Ri(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:Ri(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});HSe.displayName=VSe;var USe=`DropdownMenuPortal`,WSe=e=>{let{__scopeDropdownMenu:t,...n}=e,r=YT(t);return(0,U.jsx)(SSe,{...r,...n})};WSe.displayName=USe;var GSe=`DropdownMenuContent`,KSe=g.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=zSe(GSe,n),a=YT(n),o=g.useRef(!1);return(0,U.jsx)(CSe,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Ri(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:Ri(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});KSe.displayName=GSe;var qSe=`DropdownMenuGroup`,JSe=g.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=YT(n);return(0,U.jsx)(wSe,{...i,...r,ref:t})});JSe.displayName=qSe;var YSe=`DropdownMenuLabel`,XSe=g.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=YT(n);return(0,U.jsx)(TSe,{...i,...r,ref:t})});XSe.displayName=YSe;var ZSe=`DropdownMenuItem`,QSe=g.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=YT(n);return(0,U.jsx)(ESe,{...i,...r,ref:t})});QSe.displayName=ZSe;var $Se=`DropdownMenuCheckboxItem`,eCe=g.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=YT(n);return(0,U.jsx)(DSe,{...i,...r,ref:t})});eCe.displayName=$Se;var tCe=`DropdownMenuRadioGroup`,nCe=g.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=YT(n);return(0,U.jsx)(OSe,{...i,...r,ref:t})});nCe.displayName=tCe;var rCe=`DropdownMenuRadioItem`,iCe=g.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=YT(n);return(0,U.jsx)(kSe,{...i,...r,ref:t})});iCe.displayName=rCe;var aCe=`DropdownMenuItemIndicator`,oCe=g.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=YT(n);return(0,U.jsx)(ASe,{...i,...r,ref:t})});oCe.displayName=aCe;var sCe=`DropdownMenuSeparator`,cCe=g.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=YT(n);return(0,U.jsx)(jSe,{...i,...r,ref:t})});cCe.displayName=sCe;var lCe=`DropdownMenuArrow`,uCe=g.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=YT(n);return(0,U.jsx)(MSe,{...i,...r,ref:t})});uCe.displayName=lCe;var dCe=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=YT(t),[s,c]=La({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,U.jsx)(NSe,{...o,open:s,onOpenChange:c,children:n})},fCe=`DropdownMenuSubTrigger`,pCe=g.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=YT(n);return(0,U.jsx)(PSe,{...i,...r,ref:t})});pCe.displayName=fCe;var mCe=`DropdownMenuSubContent`,hCe=g.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=YT(n);return(0,U.jsx)(FSe,{...i,...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)`}})});hCe.displayName=mCe;var gCe=BSe,_Ce=HSe,vCe=WSe,yCe=KSe,bCe=JSe,xCe=XSe,SCe=QSe,CCe=eCe,wCe=oCe,TCe=cCe,ECe=dCe,DCe=pCe,OCe=hCe;function XT({...e}){return(0,U.jsx)(gCe,{"data-slot":`dropdown-menu`,...e})}function ZT({...e}){return(0,U.jsx)(_Ce,{"data-slot":`dropdown-menu-trigger`,...e})}function QT({className:e,sideOffset:t=4,...n}){return(0,U.jsx)(vCe,{children:(0,U.jsx)(yCe,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:W(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md`,e),...n})})}function kCe({...e}){return(0,U.jsx)(bCe,{"data-slot":`dropdown-menu-group`,...e})}function $T({className:e,inset:t,variant:n=`default`,...r}){return(0,U.jsx)(SCe,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:W(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r})}function ACe({className:e,children:t,checked:n,...r}){return(0,U.jsxs)(CCe,{"data-slot":`dropdown-menu-checkbox-item`,className:W(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),checked:n,...r,children:[(0,U.jsx)(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:(0,U.jsx)(wCe,{children:(0,U.jsx)(wc,{className:`size-4`})})}),t]})}function eE({className:e,inset:t,...n}){return(0,U.jsx)(xCe,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:W(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,e),...n})}function tE({className:e,...t}){return(0,U.jsx)(TCe,{"data-slot":`dropdown-menu-separator`,className:W(`bg-border -mx-1 my-1 h-px`,e),...t})}function jCe({...e}){return(0,U.jsx)(ECe,{"data-slot":`dropdown-menu-sub`,...e})}function MCe({className:e,inset:t,children:n,...r}){return(0,U.jsxs)(DCe,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":t,className:W(`focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,U.jsx)(Ec,{className:`ml-auto size-4`})]})}function NCe({className:e,...t}){return(0,U.jsx)(OCe,{"data-slot":`dropdown-menu-sub-content`,className:W(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg`,e),...t})}var PCe=Qs(``,{variants:{variant:{default:`cursor-pointer text-indigo-600 dark:text-indigo-300 hover:underline`,neutral:`cursor-pointer hover:underline`,ghost:`cursor-pointer hover:no-underline`},showIcon:{true:`inline-flex items-center gap-x-1`}},defaultVariants:{variant:`default`}}),nE=({className:e,variant:t,showIcon:n,children:r,...i})=>(0,U.jsxs)(`a`,{target:`_blank`,rel:`noreferrer`,className:W(PCe({variant:t,showIcon:n,className:e})),...i,children:[r,n&&(0,U.jsx)(Yc,{className:`size-[1em]`})]}),FCe=(0,g.createContext)({});function ICe(e){let t=(0,g.useRef)(null);return t.current===null&&(t.current=e()),t.current}var rE=(0,g.createContext)(null),LCe=(0,g.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function RCe(e=!0){let t=(0,g.useContext)(rE);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,g.useId)();(0,g.useEffect)(()=>{e&&i(a)},[e]);let o=(0,g.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var iE=typeof window<`u`,zCe=iE?g.useLayoutEffect:g.useEffect,aE=e=>e,oE=aE,sE=aE,cE={skipAnimations:!1,useManualTiming:!1};function BCe(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var lE=[`read`,`resolveKeyframes`,`update`,`preRender`,`render`,`postRender`],VCe=40;function HCe(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=lE.reduce((e,t)=>(e[t]=BCe(a),e),{}),{read:s,resolveKeyframes:c,update:l,preRender:u,render:d,postRender:f}=o,p=()=>{let a=cE.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,VCe),1),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:lE.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||m(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<lE.length;t++)o[lE[t]].cancel(e)},state:i,steps:o}}var{schedule:uE,cancel:dE,state:fE,steps:pE}=HCe(typeof requestAnimationFrame<`u`?requestAnimationFrame:aE,!0),UCe=(0,g.createContext)({strict:!1}),WCe={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`]},mE={};for(let e in WCe)mE[e]={isEnabled:t=>WCe[e].some(e=>!!t[e])};function GCe(e){for(let t in e)mE[t]={...mE[t],...e[t]}}var KCe=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.ignoreStrict.viewport`.split(`.`));function hE(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||KCe.has(e)}function qCe(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var JCe=n((()=>{})),YCe=r({default:()=>ZCe}),XCe,ZCe,QCe=n((()=>{JCe(),XCe=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ZCe=qCe(function(e){return XCe.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})})),$Ce=e=>!hE(e);function ewe(e){e&&($Ce=t=>t.startsWith(`on`)?!hE(t):e(t))}try{ewe((QCe(),t(YCe)).default)}catch{}function twe(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||($Ce(i)||n===!0&&hE(i)||!t&&!hE(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}function nwe(e){if(typeof Proxy>`u`)return e;let t=new Map;return new Proxy((...t)=>e(...t),{get:(n,r)=>r===`create`?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}var gE=(0,g.createContext)({});function _E(e){return typeof e==`string`||Array.isArray(e)}function vE(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}var yE=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],bE=[`initial`,...yE];function xE(e){return vE(e.animate)||bE.some(t=>_E(e[t]))}function rwe(e){return!!(xE(e)||e.variants)}function iwe(e,t){if(xE(e)){let{initial:t,animate:n}=e;return{initial:t===!1||_E(t)?t:void 0,animate:_E(n)?n:void 0}}return e.inherit===!1?{}:t}function awe(e){let{initial:t,animate:n}=iwe(e,(0,g.useContext)(gE));return(0,g.useMemo)(()=>({initial:t,animate:n}),[owe(t),owe(n)])}function owe(e){return Array.isArray(e)?e.join(` `):e}var swe=Symbol.for(`motionComponentSymbol`);function SE(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function cwe(e,t,n){return(0,g.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):SE(n)&&(n.current=r))},[t])}var CE=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),lwe=`data-`+CE(`framerAppearId`),{schedule:wE,cancel:uwe}=HCe(queueMicrotask,!1),dwe=(0,g.createContext)({});function fwe(e,t,n,r,i){let{visualElement:a}=(0,g.useContext)(gE),o=(0,g.useContext)(UCe),s=(0,g.useContext)(rE),c=(0,g.useContext)(LCe).reducedMotion,l=(0,g.useRef)(null);r||=o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:a,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));let u=l.current,d=(0,g.useContext)(dwe);u&&!u.projection&&i&&(u.type===`html`||u.type===`svg`)&&pwe(l.current,n,i,d);let f=(0,g.useRef)(!1);(0,g.useInsertionEffect)(()=>{u&&f.current&&u.update(n,s)});let p=n[lwe],m=(0,g.useRef)(!!p&&!window.MotionHandoffIsComplete?.call(window,p)&&window.MotionHasOptimisedAnimation?.call(window,p));return zCe(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),wE.render(u.render),m.current&&u.animationState&&u.animationState.animateChanges())}),(0,g.useEffect)(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&=(queueMicrotask(()=>{var e;(e=window.MotionHandoffMarkAsComplete)==null||e.call(window,p)}),!1))}),u}function pwe(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:mwe(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&SE(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,layoutScroll:c,layoutRoot:l})}function mwe(e){if(e)return e.options.allowProjection===!1?mwe(e.parent):e.projection}function hwe({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&GCe(e);function a(a,o){let s,c={...(0,g.useContext)(LCe),...a,layoutId:gwe(a)},{isStatic:l}=c,u=awe(a),d=r(a,l);if(!l&&iE){_we(c,e);let n=vwe(c);s=n.MeasureLayout,u.visualElement=fwe(i,d,c,t,n.ProjectionNode)}return(0,U.jsxs)(gE.Provider,{value:u,children:[s&&u.visualElement?(0,U.jsx)(s,{visualElement:u.visualElement,...c}):null,n(i,a,cwe(d,u.visualElement,o),d,l,u.visualElement)]})}a.displayName=`motion.${typeof i==`string`?i:`create(${i.displayName??i.name??``})`}`;let o=(0,g.forwardRef)(a);return o[swe]=i,o}function gwe({layoutId:e}){let t=(0,g.useContext)(FCe).id;return t&&e!==void 0?t+`-`+e:e}function _we(e,t){(0,g.useContext)(UCe).strict}function vwe(e){let{drag:t,layout:n}=mE;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}var ywe=[`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 TE(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(ywe.indexOf(e)>-1||/[A-Z]/u.test(e))}function bwe(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function EE(e,t,n,r){if(typeof t==`function`){let[i,a]=bwe(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=bwe(r);t=t(n===void 0?e.custom:n,i,a)}return t}var DE=e=>Array.isArray(e),xwe=e=>!!(e&&typeof e==`object`&&e.mix&&e.toValue),Swe=e=>DE(e)?e[e.length-1]||0:e,OE=e=>!!(e&&e.getVelocity);function kE(e){let t=OE(e)?e.get():e;return xwe(t)?t.toValue():t}function Cwe({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,a){let o={latestValues:Twe(r,i,a,e),renderState:t()};return n&&(o.onMount=e=>n({props:r,current:e,...o}),o.onUpdate=e=>n(e)),o}var wwe=e=>(t,n)=>{let r=(0,g.useContext)(gE),i=(0,g.useContext)(rE),a=()=>Cwe(e,t,r,i);return n?a():ICe(a)};function Twe(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=kE(a[e]);let{initial:o,animate:s}=e,c=xE(e),l=rwe(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!vE(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=EE(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var AE=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],jE=new Set(AE),Ewe=e=>t=>typeof t==`string`&&t.startsWith(e),Dwe=Ewe(`--`),Owe=Ewe(`var(--`),ME=e=>Owe(e)?kwe.test(e.split(`/*`)[0].trim()):!1,kwe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Awe=(e,t)=>t&&typeof e==`number`?t.transform(e):e,NE=(e,t,n)=>n>t?t:n<e?e:n,PE={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},FE={...PE,transform:e=>NE(0,1,e)},IE={...PE,default:1},LE=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),RE=LE(`deg`),zE=LE(`%`),BE=LE(`px`),jwe=LE(`vh`),Mwe=LE(`vw`),Nwe={...zE,parse:e=>zE.parse(e)/100,transform:e=>zE.transform(e*100)},Pwe={borderWidth:BE,borderTopWidth:BE,borderRightWidth:BE,borderBottomWidth:BE,borderLeftWidth:BE,borderRadius:BE,radius:BE,borderTopLeftRadius:BE,borderTopRightRadius:BE,borderBottomRightRadius:BE,borderBottomLeftRadius:BE,width:BE,maxWidth:BE,height:BE,maxHeight:BE,top:BE,right:BE,bottom:BE,left:BE,padding:BE,paddingTop:BE,paddingRight:BE,paddingBottom:BE,paddingLeft:BE,margin:BE,marginTop:BE,marginRight:BE,marginBottom:BE,marginLeft:BE,backgroundPositionX:BE,backgroundPositionY:BE},Fwe={rotate:RE,rotateX:RE,rotateY:RE,rotateZ:RE,scale:IE,scaleX:IE,scaleY:IE,scaleZ:IE,skew:RE,skewX:RE,skewY:RE,distance:BE,translateX:BE,translateY:BE,translateZ:BE,x:BE,y:BE,z:BE,perspective:BE,transformPerspective:BE,opacity:FE,originX:Nwe,originY:Nwe,originZ:BE},Iwe={...PE,transform:Math.round},VE={...Pwe,...Fwe,zIndex:Iwe,size:BE,fillOpacity:FE,strokeOpacity:FE,numOctaves:Iwe},Lwe={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Rwe=AE.length;function zwe(e,t,n){let r=``,i=!0;for(let a=0;a<Rwe;a++){let o=AE[a],s=e[o];if(s===void 0)continue;let c=!0;if(c=typeof s==`number`?s===(o.startsWith(`scale`)?1:0):parseFloat(s)===0,!c||n){let e=Awe(s,VE[o]);if(!c){i=!1;let t=Lwe[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function HE(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(jE.has(e)){o=!0;continue}else if(Dwe(e)){i[e]=n;continue}else{let t=Awe(n,VE[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=zwe(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var Bwe={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Vwe={offset:`strokeDashoffset`,array:`strokeDasharray`};function Hwe(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Bwe:Vwe;e[a.offset]=BE.transform(-r);let o=BE.transform(t),s=BE.transform(n);e[a.array]=`${o} ${s}`}function Uwe(e,t,n){return typeof e==`string`?e:BE.transform(t+n*e)}function Wwe(e,t,n){return`${Uwe(t,e.x,e.width)} ${Uwe(n,e.y,e.height)}`}function UE(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:c=0,...l},u,d){if(HE(e,l,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=Wwe(m,i===void 0?.5:i,a===void 0?.5:a)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&Hwe(f,o,s,c,!1)}var WE=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Gwe=()=>({...WE(),attrs:{}}),GE=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Kwe(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(let t in n)e.style.setProperty(t,n[t])}var qwe=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`]);function Jwe(e,t,n,r){Kwe(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(qwe.has(n)?n:CE(n),t.attrs[n])}var KE={};function Ywe(e){Object.assign(KE,e)}function Xwe(e,{layout:t,layoutId:n}){return jE.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!KE[e]||e===`opacity`)}function qE(e,t,n){let{style:r}=e,i={};for(let a in r)(OE(r[a])||t.style&&OE(t.style[a])||Xwe(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function Zwe(e,t,n){let r=qE(e,t,n);for(let n in e)if(OE(e[n])||OE(t[n])){let t=AE.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}function Qwe(e,t){try{t.dimensions=typeof e.getBBox==`function`?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}var $we=[`x`,`y`,`width`,`height`,`cx`,`cy`,`r`],eTe={useVisualState:wwe({scrapeMotionValuesFromProps:Zwe,createRenderState:Gwe,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let a=!!e.drag;if(!a){for(let e in i)if(jE.has(e)){a=!0;break}}if(!a)return;let o=!t;if(t)for(let n=0;n<$we.length;n++){let r=$we[n];e[r]!==t[r]&&(o=!0)}o&&uE.read(()=>{Qwe(n,r),uE.render(()=>{UE(r,i,GE(n.tagName),e.transformTemplate),Jwe(n,r)})})}})},tTe={useVisualState:wwe({scrapeMotionValuesFromProps:qE,createRenderState:WE})};function nTe(e,t,n){for(let r in t)!OE(t[r])&&!Xwe(r,n)&&(e[r]=t[r])}function rTe({transformTemplate:e},t){return(0,g.useMemo)(()=>{let n=WE();return HE(n,t,e),Object.assign({},n.vars,n.style)},[t])}function iTe(e,t){let n=e.style||{},r={};return nTe(r,n,e),Object.assign(r,rTe(e,t)),r}function aTe(e,t){let n={},r=iTe(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function oTe(e,t,n,r){let i=(0,g.useMemo)(()=>{let n=Gwe();return UE(n,t,GE(r),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};nTe(t,e.style,e),i.style={...t,...i.style}}return i}function sTe(e=!1){return(t,n,r,{latestValues:i},a)=>{let o=(TE(t)?oTe:aTe)(n,i,a,t),s=twe(n,typeof t==`string`,e),c=t===g.Fragment?{}:{...s,...o,ref:r},{children:l}=n,u=(0,g.useMemo)(()=>OE(l)?l.get():l,[l]);return(0,g.createElement)(t,{...c,children:u})}}function cTe(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return hwe({...TE(n)?eTe:tTe,preloadedFeatures:e,useRender:sTe(r),createVisualElement:t,Component:n})}}function lTe(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function JE(e,t,n){let r=e.getProps();return EE(r,t,n===void 0?r.custom:n,e)}function YE(e,t){return e?e[t]||e.default||e:void 0}var uTe=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...AE]),XE;function dTe(){XE=void 0}var ZE={now:()=>(XE===void 0&&ZE.set(fE.isProcessing||cE.useManualTiming?fE.timestamp:performance.now()),XE),set:e=>{XE=e,queueMicrotask(dTe)}};function QE(e,t){e.indexOf(t)===-1&&e.push(t)}function $E(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var eD=class{constructor(){this.subscriptions=[]}add(e){return QE(this.subscriptions,e),()=>$E(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function fTe(e,t){return t?1e3/t*e:0}var pTe=30,mTe=e=>!isNaN(parseFloat(e)),hTe={current:void 0},gTe=class{constructor(e,t={}){this.version=`11.18.2`,this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let n=ZE.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=ZE.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=mTe(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new eD);let n=this.events[e].add(t);return e===`change`?()=>{n(),uE.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}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()}get(){return hTe.current&&hTe.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=ZE.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>pTe)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,pTe);return fTe(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function tD(e,t){return new gTe(e,t)}function _Te(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,tD(n))}function vTe(e,t){let{transitionEnd:n={},transition:r={},...i}=JE(e,t)||{};i={...i,...n};for(let t in i)_Te(e,t,Swe(i[t]))}function yTe(e){return!!(OE(e)&&e.add)}function nD(e,t){let n=e.getValue(`willChange`);if(yTe(n))return n.add(t)}function bTe(e){return e.props[lwe]}function rD(e){let t;return()=>(t===void 0&&(t=e()),t)}var xTe=rD(()=>window.ScrollTimeline!==void 0),STe=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>`finished`in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){let n=this.animations.map(n=>{if(xTe()&&n.attachTimeline)return n.attachTimeline(e);if(typeof t==`function`)return t(n)});return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get startTime(){return this.getAll(`startTime`)}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll(`flatten`)}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}},CTe=class extends STe{then(e,t){return Promise.all(this.animations).then(e).catch(t)}},iD=e=>e*1e3,aD=e=>e/1e3,wTe={current:!1};function oD(e){return typeof e==`function`}function TTe(e,t){e.timeline=t,e.onfinish=null}var sD=e=>Array.isArray(e)&&typeof e[0]==`number`,ETe={linearEasing:void 0};function DTe(e,t){let n=rD(e);return()=>ETe[t]??n()}var cD=DTe(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),lD=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},OTe=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=e(lD(0,i-1,t))+`, `;return`linear(${r.substring(0,r.length-2)})`};function kTe(e){return!!(typeof e==`function`&&cD()||!e||typeof e==`string`&&(e in dD||cD())||sD(e)||Array.isArray(e)&&e.every(kTe))}var uD=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,dD={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:uD([0,.65,.55,1]),circOut:uD([.55,0,1,.45]),backIn:uD([.31,.01,.66,-.59]),backOut:uD([.33,1.53,.69,.99])};function ATe(e,t){if(e)return typeof e==`function`&&cD()?OTe(e,t):sD(e)?uD(e):Array.isArray(e)?e.map(e=>ATe(e,t)||dD.easeOut):dD[e]}var jTe=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,MTe=1e-7,NTe=12;function PTe(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=jTe(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>MTe&&++s<NTe);return o}function fD(e,t,n,r){if(e===t&&n===r)return aE;let i=t=>PTe(t,0,1,e,n);return e=>e===0||e===1?e:jTe(i(e),t,r)}var FTe=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ITe=e=>t=>1-e(1-t),LTe=fD(.33,1.53,.69,.99),pD=ITe(LTe),RTe=FTe(pD),zTe=e=>(e*=2)<1?.5*pD(e):.5*(2-2**(-10*(e-1))),mD=e=>1-Math.sin(Math.acos(e)),BTe=ITe(mD),VTe=FTe(mD),HTe=e=>/^0[^.\s]+$/u.test(e);function UTe(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||HTe(e)}var hD=e=>Math.round(e*1e5)/1e5,gD=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function WTe(e){return e==null}var GTe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,_D=(e,t)=>n=>!!(typeof n==`string`&>e.test(n)&&n.startsWith(e)||t&&!WTe(n)&&Object.prototype.hasOwnProperty.call(n,t)),KTe=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(gD);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},qTe=e=>NE(0,255,e),vD={...PE,transform:e=>Math.round(qTe(e))},yD={test:_D(`rgb`,`red`),parse:KTe(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+vD.transform(e)+`, `+vD.transform(t)+`, `+vD.transform(n)+`, `+hD(FE.transform(r))+`)`};function JTe(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var bD={test:_D(`#`),parse:JTe,transform:yD.transform},xD={test:_D(`hsl`,`hue`),parse:KTe(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+zE.transform(hD(t))+`, `+zE.transform(hD(n))+`, `+hD(FE.transform(r))+`)`},SD={test:e=>yD.test(e)||bD.test(e)||xD.test(e),parse:e=>yD.test(e)?yD.parse(e):xD.test(e)?xD.parse(e):bD.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?yD.transform(e):xD.transform(e)},YTe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function XTe(e){return isNaN(e)&&typeof e==`string`&&(e.match(gD)?.length||0)+(e.match(YTe)?.length||0)>0}var ZTe=`number`,QTe=`color`,$Te=`var`,eEe=`var(`,tEe="${}",nEe=/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 CD(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(nEe,e=>(SD.test(e)?(r.color.push(a),i.push(QTe),n.push(SD.parse(e))):e.startsWith(eEe)?(r.var.push(a),i.push($Te),n.push(e)):(r.number.push(a),i.push(ZTe),n.push(parseFloat(e))),++a,tEe)).split(tEe),indexes:r,types:i}}function rEe(e){return CD(e).values}function iEe(e){let{split:t,types:n}=CD(e),r=t.length;return e=>{let i=``;for(let a=0;a<r;a++)if(i+=t[a],e[a]!==void 0){let t=n[a];t===ZTe?i+=hD(e[a]):t===QTe?i+=SD.transform(e[a]):i+=e[a]}return i}}var aEe=e=>typeof e==`number`?0:e;function oEe(e){let t=rEe(e);return iEe(e)(t.map(aEe))}var wD={test:XTe,parse:rEe,createTransformer:iEe,getAnimatableNone:oEe},sEe=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function cEe(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(gD)||[];if(!r)return e;let i=n.replace(r,``),a=sEe.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}var lEe=/\b([a-z-]*)\(.*?\)/gu,TD={...wD,getAnimatableNone:e=>{let t=e.match(lEe);return t?t.map(cEe).join(` `):e}},uEe={...VE,color:SD,backgroundColor:SD,outlineColor:SD,fill:SD,stroke:SD,borderColor:SD,borderTopColor:SD,borderRightColor:SD,borderBottomColor:SD,borderLeftColor:SD,filter:TD,WebkitFilter:TD},ED=e=>uEe[e];function dEe(e,t){let n=ED(e);return n!==TD&&(n=wD),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var fEe=new Set([`auto`,`none`,`0`]);function pEe(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!fEe.has(t)&&CD(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=dEe(n,i)}var mEe=e=>e===PE||e===BE,hEe=(e,t)=>parseFloat(e.split(`, `)[t]),gEe=(e,t)=>(n,{transform:r})=>{if(r===`none`||!r)return 0;let i=r.match(/^matrix3d\((.+)\)$/u);if(i)return hEe(i[1],t);{let t=r.match(/^matrix\((.+)\)$/u);return t?hEe(t[1],e):0}},_Ee=new Set([`x`,`y`,`z`]),vEe=AE.filter(e=>!_Ee.has(e));function yEe(e){let t=[];return vEe.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}var DD={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-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:gEe(4,13),y:gEe(5,14)};DD.translateX=DD.x,DD.translateY=DD.y;var OD=new Set,kD=!1,AD=!1;function bEe(){if(AD){let e=Array.from(OD).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=yEe(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{var r;(r=e.getValue(t))==null||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}AD=!1,kD=!1,OD.forEach(e=>e.complete()),OD.clear()}function xEe(){OD.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(AD=!0)})}function SEe(){xEe(),bEe()}var jD=class{constructor(e,t,n,r,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(OD.add(this),kD||(kD=!0,uE.read(xEe),uE.resolveKeyframes(bEe))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let i=0;i<e.length;i++)if(e[i]===null)if(i===0){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),OD.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,OD.delete(this))}resume(){this.isComplete||this.scheduleResolve()}},CEe=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),wEe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function TEe(e){let t=wEe.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var EEe=4;function DEe(e,t,n=1){sE(n<=EEe,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[r,i]=TEe(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return CEe(e)?parseFloat(e):e}return ME(i)?DEe(i,t,n+1):i}var OEe=e=>t=>t.test(e),kEe=[PE,BE,zE,RE,Mwe,jwe,{test:e=>e===`auto`,parse:e=>e}],AEe=e=>kEe.find(OEe(e)),jEe=class extends jD{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),ME(r))){let i=DEe(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!uTe.has(n)||e.length!==2)return;let[r,i]=e,a=AEe(r),o=AEe(i);if(a!==o)if(mEe(a)&&mEe(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)UTe(e[t])&&n.push(t);n.length&&pEe(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=DD[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=DD[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},MEe=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(wD.test(e)||e===`0`)&&!e.startsWith(`url(`));function NEe(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function PEe(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=MEe(i,t),s=MEe(a,t);return oE(o===s,`You are trying to animate ${t} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`),!o||!s?!1:NEe(e)||(n===`spring`||oD(n))&&r}var FEe=e=>e!==null;function MD(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(FEe),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}var IEe=40,LEe=class{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ZE.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>IEe?this.resolvedAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&SEe(),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=ZE.now(),this.hasAttemptedResolve=!0;let{name:n,type:r,velocity:i,delay:a,onComplete:o,onUpdate:s,isGenerator:c}=this.options;if(!c&&!PEe(e,n,r,i))if(wTe.current||!a){s&&s(MD(e,this.options,t)),o&&o(),this.resolveFinishedPromise();return}else this.options.duration=0;let l=this.initPlayback(e,t);l!==!1&&(this._resolved={keyframes:e,finalKeyframe:t,...l},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type=`keyframes`,this.options.ease=`linear`}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}},REe=2e4;function zEe(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}var ND=(e,t,n)=>e+(t-e)*n;function PD(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function BEe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=PD(s,r,e+1/3),a=PD(s,r,e),o=PD(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function FD(e,t){return n=>n>0?t:e}var ID=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},VEe=[bD,yD,xD],HEe=e=>VEe.find(t=>t.test(e));function UEe(e){let t=HEe(e);if(oE(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===xD&&(n=BEe(n)),n}var WEe=(e,t)=>{let n=UEe(e),r=UEe(t);if(!n||!r)return FD(e,t);let i={...n};return e=>(i.red=ID(n.red,r.red,e),i.green=ID(n.green,r.green,e),i.blue=ID(n.blue,r.blue,e),i.alpha=ND(n.alpha,r.alpha,e),yD.transform(i))},GEe=(e,t)=>n=>t(e(n)),LD=(...e)=>e.reduce(GEe),RD=new Set([`none`,`hidden`]);function KEe(e,t){return RD.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function qEe(e,t){return n=>ND(e,t,n)}function zD(e){return typeof e==`number`?qEe:typeof e==`string`?ME(e)?FD:SD.test(e)?WEe:ZEe:Array.isArray(e)?JEe:typeof e==`object`?SD.test(e)?WEe:YEe:FD}function JEe(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>zD(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function YEe(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=zD(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function XEe(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var ZEe=(e,t)=>{let n=wD.createTransformer(t),r=CD(e),i=CD(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?RD.has(e)&&!i.values.length||RD.has(t)&&!r.values.length?KEe(e,t):LD(JEe(XEe(r,i),i.values),n):(oE(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),FD(e,t))};function QEe(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?ND(e,t,n):zD(e)(e,t)}var $Ee=5;function eDe(e,t,n){let r=Math.max(t-$Ee,0);return fTe(n-e(r),t-r)}var BD={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},VD=.001;function tDe({duration:e=BD.duration,bounce:t=BD.bounce,velocity:n=BD.velocity,mass:r=BD.mass}){let i,a;oE(e<=iD(BD.maxDuration),`Spring duration must be 10 seconds or less`);let o=1-t;o=NE(BD.minDamping,BD.maxDamping,o),e=NE(BD.minDuration,BD.maxDuration,aD(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=HD(t,o),c=Math.exp(-i);return VD-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=HD(t**2,o);return(-i(t)+VD>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-VD+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=rDe(i,a,s);if(e=iD(e),isNaN(c))return{stiffness:BD.stiffness,damping:BD.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var nDe=12;function rDe(e,t,n){let r=n;for(let n=1;n<nDe;n++)r-=e(r)/t(r);return r}function HD(e,t){return e*Math.sqrt(1-t*t)}var iDe=[`duration`,`bounce`],aDe=[`stiffness`,`damping`,`mass`];function oDe(e,t){return t.some(t=>e[t]!==void 0)}function sDe(e){let t={velocity:BD.velocity,stiffness:BD.stiffness,damping:BD.damping,mass:BD.mass,isResolvedFromDuration:!1,...e};if(!oDe(e,aDe)&&oDe(e,iDe))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*NE(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:BD.mass,stiffness:i,damping:a}}else{let n=tDe(e);t={...t,...n,mass:BD.mass},t.isResolvedFromDuration=!0}return t}function cDe(e=BD.visualDuration,t=BD.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=sDe({...n,velocity:-aD(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=aD(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?BD.restSpeed.granular:BD.restSpeed.default,i||=v?BD.restDelta.granular:BD.restDelta.default;let y;if(h<1){let e=HD(_,h);y=t=>o-Math.exp(-h*_*t)*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=0;h<1&&(n=e===0?iD(m):eDe(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(zEe(b),REe),t=OTe(t=>b.next(e*t).value,e,30);return e+`ms `+t}};return b}function lDe({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=cDe({keyframes:[f.value,m(f.value)],velocity:eDe(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}var uDe=fD(.42,0,1,1),dDe=fD(0,0,.58,1),fDe=fD(.42,0,.58,1),pDe=e=>Array.isArray(e)&&typeof e[0]!=`number`,mDe={linear:aE,easeIn:uDe,easeInOut:fDe,easeOut:dDe,circIn:mD,circInOut:VTe,circOut:BTe,backIn:pD,backInOut:RTe,backOut:LTe,anticipate:zTe},hDe=e=>{if(sD(e)){sE(e.length===4,`Cubic bezier arrays must contain four numerical values.`);let[t,n,r,i]=e;return fD(t,n,r,i)}else if(typeof e==`string`)return sE(mDe[e]!==void 0,`Invalid easing type '${e}'`),mDe[e];return e};function gDe(e,t,n){let r=[],i=n||QEe,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=LD(Array.isArray(t)?t[n]||aE:t,a)),r.push(a)}return r}function _De(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(sE(a===t.length,`Both input and output ranges must be the same length`),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=gDe(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=lD(e[r],e[r+1],n);return s[r](i)};return n?t=>l(NE(e[0],e[a-1],t)):l}function vDe(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=lD(0,t,r);e.push(ND(n,1,i))}}function yDe(e){let t=[0];return vDe(t,e.length-1),t}function bDe(e,t){return e.map(e=>e*t)}function xDe(e,t){return e.map(()=>t||fDe).splice(0,e.length-1)}function UD({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=pDe(r)?r.map(hDe):hDe(r),a={done:!1,value:t[0]},o=_De(bDe(n&&n.length===t.length?n:yDe(t),e),t,{ease:Array.isArray(i)?i:xDe(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var SDe=e=>{let t=({timestamp:t})=>e(t);return{start:()=>uE.update(t,!0),stop:()=>dE(t),now:()=>fE.isProcessing?fE.timestamp:ZE.now()}},CDe={decay:lDe,inertia:lDe,tween:UD,keyframes:UD,spring:cDe},wDe=e=>e/100,WD=class extends LEe{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState=`running`,this.startTime=null,this.state=`idle`,this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state===`idle`)return;this.teardown();let{onStop:e}=this.options;e&&e()};let{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new(r?.KeyframeResolver||jD)(i,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){let{type:t=`keyframes`,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=this.options,o=oD(t)?t:CDe[t]||UD,s,c;o!==UD&&typeof e[0]!=`number`&&(s=LD(wDe,QEe(e[0],e[1])),e=[0,100]);let l=o({...this.options,keyframes:e});i===`mirror`&&(c=o({...this.options,keyframes:[...e].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=zEe(l));let{calculatedDuration:u}=l,d=u+r,f=d*(n+1)-r;return{generator:l,mirroredGenerator:c,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:d,totalDuration:f}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState===`paused`||!e?this.pause():this.state=this.pendingPlayState}tick(e,t=!1){let{resolved:n}=this;if(!n){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:r,generator:i,mirroredGenerator:a,mapPercentToKeyframes:o,keyframes:s,calculatedDuration:c,totalDuration:l,resolvedDuration:u}=n;if(this.startTime===null)return i.next(0);let{delay:d,repeat:f,repeatType:p,repeatDelay:m,onUpdate:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-l/this.speed,this.startTime)),t?this.currentTime=e:this.holdTime===null?this.currentTime=Math.round(e-this.startTime)*this.speed:this.currentTime=this.holdTime;let g=this.currentTime-d*(this.speed>=0?1:-1),_=this.speed>=0?g<0:g>l;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=l);let v=this.currentTime,y=i;if(f){let e=Math.min(this.currentTime,l)/u,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,f+1),t%2&&(p===`reverse`?(n=1-n,m&&(n-=m/u)):p===`mirror`&&(y=a)),v=NE(0,1,n)*u}let b=_?{done:!1,value:s[0]}:y.next(v);o&&(b.value=o(b.value));let{done:x}=b;!_&&c!==null&&(x=this.speed>=0?this.currentTime>=l:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&r!==void 0&&(b.value=MD(s,this.options,r)),h&&h(b.value),S&&this.finish(),b}get duration(){let{resolved:e}=this;return e?aD(e.calculatedDuration):0}get time(){return aD(this.currentTime)}set time(e){e=iD(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=aD(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState=`running`;return}if(this.isStopped)return;let{driver:e=SDe,onPlay:t,startTime:n}=this.options;this.driver||=e(e=>this.tick(e)),t&&t();let r=this.driver.now();this.holdTime===null?this.startTime?this.state===`finished`&&(this.startTime=r):this.startTime=n??this.calcStartTime():this.startTime=r-this.holdTime,this.state===`finished`&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state=`running`,this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState=`paused`;return}this.state=`paused`,this.holdTime=this.currentTime??0}complete(){this.state!==`running`&&this.play(),this.pendingPlayState=this.state=`finished`,this.holdTime=null}finish(){this.teardown(),this.state=`finished`;let{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state=`idle`,this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}},TDe=new Set([`opacity`,`clipPath`,`filter`,`transform`]);function EDe(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeInOut`,times:c}={}){let l={[t]:n};c&&(l.offset=c);let u=ATe(s,i);return Array.isArray(u)&&(l.easing=u),e.animate(l,{delay:r,duration:i,easing:Array.isArray(u)?`linear`:u,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`})}var DDe=rD(()=>Object.hasOwnProperty.call(Element.prototype,`animate`)),GD=10,ODe=2e4;function kDe(e){return oD(e.type)||e.type===`spring`||!kTe(e.ease)}function ADe(e,t){let n=new WD({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),r={done:!1,value:e[0]},i=[],a=0;for(;!r.done&&a<ODe;)r=n.sample(a),i.push(r.value),a+=GD;return{times:void 0,keyframes:i,duration:a-GD,ease:`linear`}}var jDe={anticipate:zTe,backInOut:RTe,circInOut:VTe};function MDe(e){return e in jDe}var NDe=class extends LEe{constructor(e){super(e);let{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new jEe(i,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:i,type:a,motionValue:o,name:s,startTime:c}=this.options;if(!o.owner||!o.owner.current)return!1;if(typeof i==`string`&&cD()&&MDe(i)&&(i=jDe[i]),kDe(this.options)){let{onComplete:t,onUpdate:o,motionValue:s,element:c,...l}=this.options,u=ADe(e,l);e=u.keyframes,e.length===1&&(e[1]=e[0]),n=u.duration,r=u.times,i=u.ease,a=`keyframes`}let l=EDe(o.owner.current,s,e,{...this.options,duration:n,times:r,ease:i});return l.startTime=c??this.calcStartTime(),this.pendingTimeline?(TTe(l,this.pendingTimeline),this.pendingTimeline=void 0):l.onfinish=()=>{let{onComplete:n}=this.options;o.set(MD(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:l,duration:n,times:r,type:a,ease:i,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return aD(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return aD(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.currentTime=iD(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return`idle`;let{animation:t}=e;return t.playState}get startTime(){let{resolved:e}=this;if(!e)return null;let{animation:t}=e;return t.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{let{resolved:t}=this;if(!t)return aE;let{animation:n}=t;TTe(n,e)}return aE}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.playState===`finished`&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state===`idle`)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:n,duration:r,type:i,ease:a,times:o}=e;if(t.playState===`idle`||t.playState===`finished`)return;if(this.time){let{motionValue:e,onUpdate:t,onComplete:s,element:c,...l}=this.options,u=new WD({...l,keyframes:n,duration:r,type:i,ease:a,times:o,isGenerator:!0}),d=iD(this.time);e.setWithVelocity(u.sample(d-GD).value,u.sample(d).value,GD)}let{onStop:s}=this.options;s&&s(),this.cancel()}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!t||!t.owner||!(t.owner.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return DDe()&&n&&TDe.has(n)&&!s&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}},PDe={type:`spring`,stiffness:500,damping:25,restSpeed:10},FDe=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),IDe={type:`keyframes`,duration:.8},LDe={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},RDe=(e,{keyframes:t})=>t.length>2?IDe:jE.has(e)?e.startsWith(`scale`)?FDe(t[1]):PDe:LDe;function zDe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}var KD=(e,t,n,r={},i,a)=>o=>{let s=YE(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=iD(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};zDe(s)||(u={...u,...RDe(e,u)}),u.duration&&=iD(u.duration),u.repeatDelay&&=iD(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(wTe.current||cE.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),d&&!a&&t.get()!==void 0){let e=MD(u.keyframes,s);if(e!==void 0)return uE.update(()=>{u.onUpdate(e),u.onComplete()}),new CTe([])}return!a&&NDe.supports(u)?new NDe(u):new WD(u)};function BDe({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function VDe(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);let c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||l&&BDe(l,t))continue;let o={delay:n,...YE(a||{},t)},u=!1;if(window.MotionHandoffAnimation){let n=bTe(e);if(n){let e=window.MotionHandoffAnimation(n,t,uE);e!==null&&(o.startTime=e,u=!0)}}nD(e,t),r.start(KD(t,r,i,e.shouldReduceMotion&&uTe.has(t)?{type:!1}:o,e,u));let d=r.animation;d&&c.push(d)}return o&&Promise.all(c).then(()=>{uE.update(()=>{o&&vTe(e,o)})}),c}function qD(e,t,n={}){let r=JE(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(VDe(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return HDe(e,t,a+r,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function HDe(e,t,n=0,r=0,i=1,a){let o=[],s=(e.variantChildren.size-1)*r,c=i===1?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(UDe).forEach((e,r)=>{e.notify(`AnimationStart`,t),o.push(qD(e,t,{...a,delay:n+c(r)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(o)}function UDe(e,t){return e.sortNodePosition(t)}function WDe(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>qD(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=qD(e,t,n);else{let i=typeof t==`function`?JE(e,t,n.custom):t;r=Promise.all(VDe(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var GDe=bE.length;function KDe(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&KDe(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<GDe;n++){let r=bE[n],i=e.props[r];(_E(i)||i===!1)&&(t[r]=i)}return t}var qDe=[...yE].reverse(),JDe=yE.length;function YDe(e){return t=>Promise.all(t.map(({animation:t,options:n})=>WDe(e,t,n)))}function XDe(e){let t=YDe(e),n=QDe(),r=!0,i=t=>(n,r)=>{let i=JE(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=KDe(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<JDe;t++){let f=qDe[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=_E(m),g=f===a?p.isActive:null;g===!1&&(d=t);let _=m===s[f]&&m!==o[f]&&h;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),p.protectedKeys={...u},!p.isActive&&g===null||!m&&!p.prevProp||vE(m)||typeof m==`boolean`)continue;let v=ZDe(p.prevProp,m),y=v||f===a&&p.isActive&&!_&&h||t>d&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},T=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=DE(t)&&DE(n)?!lTe(t,n):t!==n,r?t==null?l.add(e):T(e):t!==void 0&&l.has(e)?T(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1),y&&(!(_&&v)||b)&&c.push(...x.map(e=>({animation:e,options:{type:f}})))}if(l.size){let t={};l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){var i;if(n[t].isActive===r)return Promise.resolve();(i=e.variantChildren)==null||i.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let a=o(t);for(let e in n)n[e].protectedKeys={};return a}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=QDe(),r=!0}}}function ZDe(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!lTe(t,e):!1}function JD(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function QDe(){return{animate:JD(!0),whileInView:JD(),whileHover:JD(),whileTap:JD(),whileDrag:JD(),whileFocus:JD(),exit:JD()}}var YD=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},$De=class extends YD{constructor(e){super(e),e.animationState||=XDe(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();vE(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}},eOe=0,tOe={animation:{Feature:$De},exit:{Feature:class extends YD{constructor(){super(...arguments),this.id=eOe++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},XD={x:!1,y:!1};function nOe(){return XD.x||XD.y}function rOe(e){return e===`x`||e===`y`?XD[e]?null:(XD[e]=!0,()=>{XD[e]=!1}):XD.x||XD.y?null:(XD.x=XD.y=!0,()=>{XD.x=XD.y=!1})}var ZD=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function QD(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function $D(e){return{point:{x:e.pageX,y:e.pageY}}}var iOe=e=>t=>ZD(t)&&e(t,$D(t));function eO(e,t,n,r){return QD(e,t,iOe(n),r)}var aOe=(e,t)=>Math.abs(e-t);function oOe(e,t){let n=aOe(e.x,t.x),r=aOe(e.y,t.y);return Math.sqrt(n**2+r**2)}var sOe=class{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=nO(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=oOe(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=fE;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=tO(t,this.transformPagePoint),uE.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=nO(e.type===`pointercancel`?this.lastMoveEventInfo:tO(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!ZD(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;let a=tO($D(e),this.transformPagePoint),{point:o}=a,{timestamp:s}=fE;this.history=[{...o,timestamp:s}];let{onSessionStart:c}=t;c&&c(e,nO(a,this.history)),this.removeListeners=LD(eO(this.contextWindow,`pointermove`,this.handlePointerMove),eO(this.contextWindow,`pointerup`,this.handlePointerUp),eO(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),dE(this.updatePoint)}};function tO(e,t){return t?{point:t(e.point)}:e}function cOe(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nO({point:e},t){return{point:e,delta:cOe(e,uOe(t)),offset:cOe(e,lOe(t)),velocity:dOe(t,.1)}}function lOe(e){return e[0]}function uOe(e){return e[e.length-1]}function dOe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=uOe(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>iD(t)));)n--;if(!r)return{x:0,y:0};let a=aD(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var fOe=1e-4,pOe=1-fOe,mOe=1+fOe,hOe=.01,gOe=0-hOe,_Oe=0+hOe;function rO(e){return e.max-e.min}function vOe(e,t,n){return Math.abs(e-t)<=n}function yOe(e,t,n,r=.5){e.origin=r,e.originPoint=ND(t.min,t.max,e.origin),e.scale=rO(n)/rO(t),e.translate=ND(n.min,n.max,e.origin)-e.originPoint,(e.scale>=pOe&&e.scale<=mOe||isNaN(e.scale))&&(e.scale=1),(e.translate>=gOe&&e.translate<=_Oe||isNaN(e.translate))&&(e.translate=0)}function iO(e,t,n,r){yOe(e.x,t.x,n.x,r?r.originX:void 0),yOe(e.y,t.y,n.y,r?r.originY:void 0)}function bOe(e,t,n){e.min=n.min+t.min,e.max=e.min+rO(t)}function xOe(e,t,n){bOe(e.x,t.x,n.x),bOe(e.y,t.y,n.y)}function SOe(e,t,n){e.min=t.min-n.min,e.max=e.min+rO(t)}function aO(e,t,n){SOe(e.x,t.x,n.x),SOe(e.y,t.y,n.y)}function COe(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ND(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ND(n,e,r.max):Math.min(e,n)),e}function wOe(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function TOe(e,{top:t,left:n,bottom:r,right:i}){return{x:wOe(e.x,n,i),y:wOe(e.y,t,r)}}function EOe(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function DOe(e,t){return{x:EOe(e.x,t.x),y:EOe(e.y,t.y)}}function OOe(e,t){let n=.5,r=rO(e),i=rO(t);return i>r?n=lD(t.min,t.max-r,e.min):r>i&&(n=lD(e.min,e.max-i,t.min)),NE(0,1,n)}function kOe(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var oO=.35;function AOe(e=oO){return e===!1?e=0:e===!0&&(e=oO),{x:jOe(e,`left`,`right`),y:jOe(e,`top`,`bottom`)}}function jOe(e,t,n){return{min:MOe(e,t),max:MOe(e,n)}}function MOe(e,t){return typeof e==`number`?e:e[t]||0}var NOe=()=>({translate:0,scale:1,origin:0,originPoint:0}),sO=()=>({x:NOe(),y:NOe()}),POe=()=>({min:0,max:0}),cO=()=>({x:POe(),y:POe()});function lO(e){return[e(`x`),e(`y`)]}function FOe({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function IOe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function LOe(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function uO(e){return e===void 0||e===1}function dO({scale:e,scaleX:t,scaleY:n}){return!uO(e)||!uO(t)||!uO(n)}function fO(e){return dO(e)||ROe(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ROe(e){return zOe(e.x)||zOe(e.y)}function zOe(e){return e&&e!==`0%`}function pO(e,t,n){return n+t*(e-n)}function BOe(e,t,n,r,i){return i!==void 0&&(e=pO(e,i,r)),pO(e,n,r)+t}function mO(e,t=0,n=1,r,i){e.min=BOe(e.min,t,n,r,i),e.max=BOe(e.max,t,n,r,i)}function VOe(e,{x:t,y:n}){mO(e.x,t.translate,t.scale,t.originPoint),mO(e.y,n.translate,n.scale,n.originPoint)}var HOe=.999999999999,UOe=1.0000000000001;function WOe(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&gO(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,VOe(e,o)),r&&fO(a.latestValues)&&gO(e,a.latestValues))}t.x<UOe&&t.x>HOe&&(t.x=1),t.y<UOe&&t.y>HOe&&(t.y=1)}function hO(e,t){e.min+=t,e.max+=t}function GOe(e,t,n,r,i=.5){mO(e,t,n,ND(e.min,e.max,i),r)}function gO(e,t){GOe(e.x,t.x,t.scaleX,t.scale,t.originX),GOe(e.y,t.y,t.scaleY,t.scale,t.originY)}function KOe(e,t){return FOe(LOe(e.getBoundingClientRect(),t))}function qOe(e,t,n){let r=KOe(e,n),{scroll:i}=t;return i&&(hO(r.x,i.offset.x),hO(r.y,i.offset.y)),r}var JOe=({current:e})=>e?e.ownerDocument.defaultView:null,YOe=new WeakMap,XOe=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=cO(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let r=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor($D(e).point)},i=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=rOe(n),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),lO(e=>{let t=this.getAxisMotionValue(e).get()||0;if(zE.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=rO(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&uE.postRender(()=>i(e,t)),nD(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},a=(e,t)=>{let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=ZOe(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},o=(e,t)=>this.stop(e,t),s=()=>lO(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new sOe(e,{onSessionStart:r,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:JOe(this.visualElement)})}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=t;this.startAnimation(r);let{onDragEnd:i}=this.getProps();i&&uE.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!_O(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=COe(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&SE(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=TOe(n.layoutBox,e):this.constraints=!1,this.elastic=AOe(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&lO(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=kOe(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!SE(e))return!1;let n=e.current;sE(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=qOe(n,r.root,this.visualElement.getTransformPagePoint()),a=DOe(r.layout.layoutBox,i);if(t){let e=t(IOe(a));this.hasMutatedConstraints=!!e,e&&(a=FOe(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=lO(o=>{if(!_O(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return nD(this.visualElement,e),n.start(KD(e,n,0,t,this.visualElement,!1))}stopAnimation(){lO(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){lO(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){lO(t=>{let{drag:n}=this.getProps();if(!_O(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-ND(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!SE(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};lO(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=OOe({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),lO(t=>{if(!_O(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(ND(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;YOe.set(this.visualElement,this);let e=this.visualElement.current,t=eO(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();SE(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),uE.read(n);let a=QD(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(lO(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{a(),t(),i(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=oO,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function _O(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ZOe(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var QOe=class extends YD{constructor(e){super(e),this.removeGroupControls=aE,this.removeListeners=aE,this.controls=new XOe(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||aE}unmount(){this.removeGroupControls(),this.removeListeners()}},$Oe=e=>(t,n)=>{e&&uE.postRender(()=>e(t,n))},eke=class extends YD{constructor(){super(...arguments),this.removePointerDownListener=aE}onPointerDown(e){this.session=new sOe(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:JOe(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:$Oe(e),onStart:$Oe(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&uE.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=eO(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},vO={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function tke(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var yO={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(BE.test(e))e=parseFloat(e);else return e;return`${tke(e,t.target.x)}% ${tke(e,t.target.y)}%`}},nke={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=wD.parse(e);if(i.length>5)return r;let a=wD.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=ND(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},rke=class extends g.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;Ywe(ake),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),vO.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,a=n.projection;return a?(a.isPresent=i,r||e.layoutDependency!==t||t===void 0?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||uE.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),wE.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function ike(e){let[t,n]=RCe(),r=(0,g.useContext)(FCe);return(0,U.jsx)(rke,{...e,layoutGroup:r,switchLayoutGroup:(0,g.useContext)(dwe),isPresent:t,safeToRemove:n})}var ake={borderRadius:{...yO,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:yO,borderTopRightRadius:yO,borderBottomLeftRadius:yO,borderBottomRightRadius:yO,boxShadow:nke};function oke(e,t,n){let r=OE(e)?e:tD(e);return r.start(KD(``,r,t,n)),r.animation}function ske(e){return e instanceof SVGElement&&e.tagName!==`svg`}var cke=(e,t)=>e.depth-t.depth,lke=class{constructor(){this.children=[],this.isDirty=!1}add(e){QE(this.children,e),this.isDirty=!0}remove(e){$E(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(cke),this.isDirty=!1,this.children.forEach(e)}};function uke(e,t){let n=ZE.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(dE(r),e(a-t))};return uE.read(r,!0),()=>dE(r)}var dke=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],fke=dke.length,pke=e=>typeof e==`string`?parseFloat(e):e,mke=e=>typeof e==`number`||BE.test(e);function hke(e,t,n,r,i,a){i?(e.opacity=ND(0,n.opacity===void 0?1:n.opacity,_ke(r)),e.opacityExit=ND(t.opacity===void 0?1:t.opacity,0,vke(r))):a&&(e.opacity=ND(t.opacity===void 0?1:t.opacity,n.opacity===void 0?1:n.opacity,r));for(let i=0;i<fke;i++){let a=`border${dke[i]}Radius`,o=gke(t,a),s=gke(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||mke(o)===mke(s)?(e[a]=Math.max(ND(pke(o),pke(s),r),0),(zE.test(s)||zE.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=ND(t.rotate||0,n.rotate||0,r))}function gke(e,t){return e[t]===void 0?e.borderRadius:e[t]}var _ke=yke(0,.5,BTe),vke=yke(.5,.95,aE);function yke(e,t,n){return r=>r<e?0:r>t?1:n(lD(e,t,r))}function bke(e,t){e.min=t.min,e.max=t.max}function bO(e,t){bke(e.x,t.x),bke(e.y,t.y)}function xke(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ske(e,t,n,r,i){return e-=t,e=pO(e,1/n,r),i!==void 0&&(e=pO(e,1/i,r)),e}function Cke(e,t=0,n=1,r=.5,i,a=e,o=e){if(zE.test(t)&&(t=parseFloat(t),t=ND(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=ND(a.min,a.max,r);e===a&&(s-=t),e.min=Ske(e.min,t,n,s,i),e.max=Ske(e.max,t,n,s,i)}function wke(e,t,[n,r,i],a,o){Cke(e,t[n],t[r],t[i],t.scale,a,o)}var Tke=[`x`,`scaleX`,`originX`],Eke=[`y`,`scaleY`,`originY`];function Dke(e,t,n,r){wke(e.x,t,Tke,n?n.x:void 0,r?r.x:void 0),wke(e.y,t,Eke,n?n.y:void 0,r?r.y:void 0)}function Oke(e){return e.translate===0&&e.scale===1}function kke(e){return Oke(e.x)&&Oke(e.y)}function Ake(e,t){return e.min===t.min&&e.max===t.max}function jke(e,t){return Ake(e.x,t.x)&&Ake(e.y,t.y)}function Mke(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Nke(e,t){return Mke(e.x,t.x)&&Mke(e.y,t.y)}function Pke(e){return rO(e.x)/rO(e.y)}function Fke(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Ike=class{constructor(){this.members=[]}add(e){QE(this.members,e),e.scheduleRender()}remove(e){if($E(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function Lke(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var xO={type:`projectionFrame`,totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},SO=typeof window<`u`&&window.MotionDebug!==void 0,CO=[``,`X`,`Y`,`Z`],Rke={visibility:`hidden`},zke=1e3,Bke=0;function wO(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Vke(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=bTe(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,uE,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Vke(r)}function Hke({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Bke++,this.animationId=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.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,SO&&(xO.totalNodes=xO.resolvedTargetDeltas=xO.recalculatedProjection=0),this.nodes.forEach(Gke),this.nodes.forEach(Qke),this.nodes.forEach($ke),this.nodes.forEach(Kke),SO&&window.MotionDebug.record(xO)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new lke)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new eD),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ske(t),this.instance=t;let{layoutId:r,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||r)&&(this.isLayoutDirty=!0),e){let n,r=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=uke(r,250),vO.hasAnimatedSinceResize&&(vO.hasAnimatedSinceResize=!1,this.nodes.forEach(Zke))})}r&&this.root.registerSharedNode(r,this),this.options.animate!==!1&&a&&(r||i)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let i=this.options.transition||a.getDefaultTransition()||oAe,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),c=!this.targetLayout||!Nke(this.targetLayout,r)||n,l=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,l);let t={...YE(i,`layout`),onPlay:o,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Zke(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,dE(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(eAe),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Vke(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Jke);return}this.isUpdating||this.nodes.forEach(Yke),this.isUpdating=!1,this.nodes.forEach(Xke),this.nodes.forEach(Uke),this.nodes.forEach(Wke),this.clearAllSnapshots();let e=ZE.now();fE.delta=NE(0,1e3/60,e-fE.timestamp),fE.timestamp=e,fE.isProcessing=!0,pE.update.process(fE),pE.preRender.process(fE),pE.render.process(fE),fE.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,wE.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qke),this.sharedNodes.forEach(tAe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,uE.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){uE.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=cO(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!kke(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&(t||fO(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),uAe(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return cO();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(fAe))){let{scroll:e}=this.root;e&&(hO(t.x,e.offset.x),hO(t.y,e.offset.y))}return t}removeElementScroll(e){let t=cO();if(bO(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&bO(t,e),hO(t.x,i.offset.x),hO(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=cO();bO(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&gO(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),fO(r.latestValues)&&gO(n,r.latestValues)}return fO(this.latestValues)&&gO(n,this.latestValues),n}removeTransform(e){let t=cO();bO(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!fO(n.latestValues))continue;dO(n.latestValues)&&n.updateSnapshot();let r=cO();bO(r,n.measurePageBox()),Dke(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return fO(this.latestValues)&&Dke(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==fE.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!(!this.layout||!(r||i))){if(this.resolvedRelativeTargetAt=fE.timestamp,!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout&&this.animationProgress!==1?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=cO(),this.relativeTargetOrigin=cO(),aO(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),bO(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=cO(),this.targetWithTransforms=cO()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),xOe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):bO(this.target,this.layout.layoutBox),VOe(this.target,this.targetDelta)):bO(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&this.animationProgress!==1?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=cO(),this.relativeTargetOrigin=cO(),aO(this.relativeTargetOrigin,this.target,e.target),bO(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}SO&&xO.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||dO(this.parent.latestValues)||ROe(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===fE.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;bO(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;WOe(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=cO());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xke(this.prevProjectionDelta.x,this.projectionDelta.x),xke(this.prevProjectionDelta.y,this.projectionDelta.y)),iO(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Fke(this.projectionDelta.x,this.prevProjectionDelta.x)||!Fke(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),SO&&xO.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if((t=this.options.visualElement)==null||t.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=sO(),this.projectionDelta=sO(),this.projectionDeltaWithTransform=sO()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=sO();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=cO(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(aAe));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;nAe(a.x,e.x,n),nAe(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(aO(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),iAe(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&jke(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=cO(),bO(d,this.relativeTarget)),s&&(this.animationValues=i,hke(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&=(dE(this.pendingAnimation),void 0),this.pendingAnimation=uE.update(()=>{vO.hasAnimatedSinceResize=!0,this.currentAnimation=oke(0,zke,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(zke),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&dAe(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||cO();let t=rO(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=rO(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}bO(t,n),gO(t,i),iO(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ike),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&wO(`z`,e,r,this.animationValues);for(let t=0;t<CO.length;t++)wO(`rotate${CO[t]}`,e,r,this.animationValues),wO(`skew${CO[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return Rke;let t={visibility:``},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.opacity=``,t.pointerEvents=kE(e?.pointerEvents)||``,t.transform=n?n(this.latestValues,``):`none`,t;let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){let t={};return this.options.layoutId&&(t.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,t.pointerEvents=kE(e?.pointerEvents)||``),this.hasProjected&&!fO(this.latestValues)&&(t.transform=n?n({},``):`none`,this.hasProjected=!1),t}let i=r.animationValues||r.latestValues;this.applyTransformsToTarget(),t.transform=Lke(this.projectionDeltaWithTransform,this.treeScale,i),n&&(t.transform=n(i,t.transform));let{x:a,y:o}=this.projectionDelta;t.transformOrigin=`${a.origin*100}% ${o.origin*100}% 0`,r.animationValues?t.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:t.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let e in KE){if(i[e]===void 0)continue;let{correct:n,applyTo:a}=KE[e],o=t.transform===`none`?i[e]:n(i[e],r);if(a){let e=a.length;for(let n=0;n<e;n++)t[a[n]]=o}else t[e]=o}return this.options.layoutId&&(t.pointerEvents=r===this?kE(e?.pointerEvents)||``:`none`),t}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Jke),this.root.sharedNodes.clear()}}}function Uke(e){e.updateLayout()}function Wke(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?lO(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=rO(r);r.min=n[e].min,r.max=r.min+i}):dAe(i,t.layoutBox,n)&&lO(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=rO(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=sO();iO(o,n,t.layoutBox);let s=sO();a?iO(s,e.applyTransform(r,!0),t.measuredBox):iO(s,n,t.layoutBox);let c=!kke(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=cO();aO(o,t.layoutBox,i.layoutBox);let s=cO();aO(s,n,a.layoutBox),Nke(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeTargetChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Gke(e){SO&&xO.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Kke(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function qke(e){e.clearSnapshot()}function Jke(e){e.clearMeasurements()}function Yke(e){e.isLayoutDirty=!1}function Xke(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Zke(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Qke(e){e.resolveTargetDelta()}function $ke(e){e.calcProjection()}function eAe(e){e.resetSkewAndRotation()}function tAe(e){e.removeLeadSnapshot()}function nAe(e,t,n){e.translate=ND(t.translate,0,n),e.scale=ND(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function rAe(e,t,n,r){e.min=ND(t.min,n.min,r),e.max=ND(t.max,n.max,r)}function iAe(e,t,n,r){rAe(e.x,t.x,n.x,r),rAe(e.y,t.y,n.y,r)}function aAe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var oAe={duration:.45,ease:[.4,0,.1,1]},sAe=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),cAe=sAe(`applewebkit/`)&&!sAe(`chrome/`)?Math.round:aE;function lAe(e){e.min=cAe(e.min),e.max=cAe(e.max)}function uAe(e){lAe(e.x),lAe(e.y)}function dAe(e,t,n){return e===`position`||e===`preserve-aspect`&&!vOe(Pke(t),Pke(n),.2)}function fAe(e){return e!==e.root&&e.scroll?.wasRoot}var pAe=Hke({attachResizeListener:(e,t)=>QD(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),TO={current:void 0},mAe=Hke({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!TO.current){let e=new pAe({});e.mount(window),e.setOptions({layoutScroll:!0}),TO.current=e}return TO.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),hAe={pan:{Feature:eke},drag:{Feature:QOe,ProjectionNode:mAe,MeasureLayout:ike}};function gAe(e,t,n){if(e instanceof Element)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function _Ae(e,t){let n=gAe(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function vAe(e){return t=>{t.pointerType===`touch`||nOe()||e(t)}}function yAe(e,t,n={}){let[r,i,a]=_Ae(e,n),o=vAe(e=>{let{target:n}=e,r=t(e);if(typeof r!=`function`||!n)return;let a=vAe(e=>{r(e),n.removeEventListener(`pointerleave`,a)});n.addEventListener(`pointerleave`,a,i)});return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}function bAe(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&uE.postRender(()=>i(t,$D(t)))}var xAe=class extends YD{mount(){let{current:e}=this.node;e&&(this.unmount=yAe(e,e=>(bAe(this.node,e,`Start`),e=>bAe(this.node,e,`End`))))}unmount(){}},SAe=class extends YD{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=LD(QD(this.node.current,`focus`,()=>this.onFocus()),QD(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}},CAe=(e,t)=>t?e===t?!0:CAe(e,t.parentElement):!1,wAe=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function TAe(e){return wAe.has(e.tagName)||e.tabIndex!==-1}var EO=new WeakSet;function EAe(e){return t=>{t.key===`Enter`&&e(t)}}function DO(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var DAe=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=EAe(()=>{if(EO.has(n))return;DO(n,`down`);let e=EAe(()=>{DO(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>DO(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function OAe(e){return ZD(e)&&!nOe()}function kAe(e,t,n={}){let[r,i,a]=_Ae(e,n),o=e=>{let r=e.currentTarget;if(!OAe(e)||EO.has(r))return;EO.add(r);let a=t(e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),!(!OAe(e)||!EO.has(r))&&(EO.delete(r),typeof a==`function`&&a(e,{success:t}))},s=e=>{o(e,n.useGlobalTarget||CAe(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{!TAe(e)&&e.getAttribute(`tabindex`)===null&&(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),e.addEventListener(`focus`,e=>DAe(e,i),i)}),a}function AAe(e,t,n){let{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&uE.postRender(()=>i(t,$D(t)))}var jAe=class extends YD{mount(){let{current:e}=this.node;e&&(this.unmount=kAe(e,e=>(AAe(this.node,e,`Start`),(e,{success:t})=>AAe(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},OO=new WeakMap,kO=new WeakMap,MAe=e=>{let t=OO.get(e.target);t&&t(e)},NAe=e=>{e.forEach(MAe)};function PAe({root:e,...t}){let n=e||document;kO.has(n)||kO.set(n,{});let r=kO.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(NAe,{root:e,...t})),r[i]}function FAe(e,t,n){let r=PAe(t);return OO.set(e,n),r.observe(e),()=>{OO.delete(e),r.unobserve(e)}}var IAe={some:0,all:1},LAe=class extends YD{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:IAe[r]};return FAe(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(RAe(e,t))&&this.startObserver()}unmount(){}};function RAe({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var zAe={inView:{Feature:LAe},tap:{Feature:jAe},focus:{Feature:SAe},hover:{Feature:xAe}},BAe={layout:{ProjectionNode:mAe,MeasureLayout:ike}},AO={current:null},jO={current:!1};function VAe(){if(jO.current=!0,iE)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>AO.current=e.matches;e.addListener(t),t()}else AO.current=!1}var HAe=[...kEe,SD,wD],UAe=e=>HAe.find(OEe(e)),MO=new WeakMap;function WAe(e,t,n){for(let r in t){let i=t[r],a=n[r];if(OE(i))e.addValue(r,i);else if(OE(a))e.addValue(r,tD(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,tD(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var NO=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],GAe=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=jD,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=ZE.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,uE.render(this.render,!1,!0))};let{latestValues:s,renderState:c,onUpdate:l}=a;this.onUpdate=l,this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=xE(t),this.isVariantNode=rwe(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];s[e]!==void 0&&OE(t)&&t.set(s[e],!1)}}mount(e){this.current=e,MO.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)),jO.current||VAe(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:AO.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){MO.delete(this.current),this.projection&&this.projection.unmount(),dE(this.notifyUpdate),dE(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=jE.has(e),r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&uE.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=t.on(`renderRequest`,this.scheduleRender),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i(),a&&a(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in mE){let t=mE[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):cO()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<NO.length;t++){let n=NO[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=WAe(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=tD(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(CEe(n)||HTe(n))?n=parseFloat(n):!UAe(n)&&wD.test(t)&&(n=dEe(e,t)),this.setBaseTarget(e,OE(n)?n.get():n)),OE(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=EE(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!OE(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new eD),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}},PO=class extends GAe{constructor(){super(...arguments),this.KeyframeResolver=jEe}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;OE(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function KAe(e){return window.getComputedStyle(e)}var qAe=class extends PO{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Kwe}readValueFromInstance(e,t){if(jE.has(t)){let e=ED(t);return e&&e.default||0}else{let n=KAe(e),r=(Dwe(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return KOe(e,t)}build(e,t,n){HE(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return qE(e,t,n)}},JAe=class extends PO{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=cO}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(jE.has(t)){let e=ED(t);return e&&e.default||0}return t=qwe.has(t)?t:CE(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Zwe(e,t,n)}build(e,t,n){UE(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){Jwe(e,t,n,r)}mount(e){this.isSVGTag=GE(e.tagName),super.mount(e)}},YAe=(e,t)=>TE(e)?new JAe(t):new qAe(t,{allowProjection:e!==g.Fragment}),FO=nwe(cTe({...tOe,...zAe,...hAe,...BAe},YAe)),IO={"in-progress":`Build in progress`,failed:`Last build failed`,success:`Gateway deployed`,idle:`No deployment yet`},LO=({status:e,className:t})=>e===`in-progress`?(0,U.jsx)(vl,{size:14,"aria-label":IO[e],className:W(`animate-spin text-yellow-500`,t)}):(0,U.jsx)(`span`,{role:`img`,"aria-label":IO[e],className:W(`w-2 h-2 shrink-0 rounded-full`,{"bg-green-500":e===`success`,"bg-red-500":e===`failed`,"bg-neutral-400":e===`idle`},t)}),XAe=({children:e,className:t,...n})=>(0,U.jsx)(`div`,{className:W(`sticky flex flex-col w-full border-b px-4 py-3 bg-white dark:bg-[#141412] z-10`,t),style:{top:`var(--banner-height, 0px)`},...n,children:e}),ZAe=2e3,RO=(e,{onCopy:t,showToast:n=!0}={showToast:!0,onCopy:()=>{}})=>{let r=typeof e==`string`?()=>e:e,[i,a]=(0,g.useState)(`idle`),o=(0,g.useRef)(void 0),s=mu();(0,g.useEffect)(()=>{a(`idle`)},[e]);let c=()=>{a(`copied`),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{a(`idle`)},ZAe)};return{copyToClipboard:async()=>{setTimeout(()=>a(e=>e===`idle`?`loading`:e),5);let i=typeof e==`string`?e:await r();try{await navigator.clipboard.writeText(i)}catch{a(`failed`),s.error(`Failed to copy to clipboard`);return}c(),t?.(),n&&s.success((0,U.jsxs)(`div`,{className:`flex gap-2 items-center text-xs font-medium`,children:[(0,U.jsx)(zc,{strokeWidth:2,size:16}),(0,U.jsx)(`div`,{children:`Copied to clipboard`})]}))},state:i}},zO=(e,t=`api`)=>QAe(e,t)?.url,QAe=(e,t=`api`)=>e.deploymentVersion?.stages.find(e=>e.stage===t),$Ae=({count:e})=>!e||e===0?null:(0,U.jsx)(`span`,{className:`absolute top-1 right-0 h-2 w-2 rounded-full bg-blue-400`}),BO=({children:e,to:t,badgeCount:n,end:r})=>(0,U.jsx)(Nr,{end:r,to:t,className:({isActive:e,isPending:t})=>W(`font-medium relative items-center px-2 py-1 rounded-md text-neutral-900 dark:text-white text-sm transition-colors`,`rounded-md hover:text-zuplo-600`,e&&`text-zuplo-700`,t&&`text-zuplo-700 animate-pulse`),children:({isActive:t})=>(0,U.jsxs)(U.Fragment,{children:[t&&(0,U.jsx)(FO.div,{layoutId:`local-navigation-item-background`,transition:{type:`spring`,bounce:.1,duration:.4},className:`absolute inset-0 rounded-md -z-10 bg-zuplo-100`}),e,(0,U.jsx)($Ae,{count:n})]})}),eje=()=>{let e=gu(),[t,n]=(0,g.useState)(!1),r=zO(e.environment),{copyToClipboard:i,state:a}=RO(r??``);return(0,U.jsxs)(XT,{open:t,onOpenChange:n,children:[(0,U.jsx)(ZT,{asChild:!0,children:(0,U.jsxs)(Y,{variant:`outline`,size:`sm`,className:`gap-2 flex justify-between h-8 mt-1`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(LO,{status:`success`}),`Deployment URLs`]}),(0,U.jsx)(Tc,{size:16})]})}),(0,U.jsx)(QT,{className:`divide-y p-0`,align:`end`,children:r?(0,U.jsxs)(`div`,{className:`p-4`,children:[(0,U.jsx)(`div`,{className:`font-medium text-lg`,children:`Local Development`}),(0,U.jsx)(`div`,{className:`h-2`}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`uppercase text-muted-foreground font-semibold text-xs`,children:`Gateway`}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(LO,{status:`success`}),(0,U.jsx)(`div`,{className:`text-sm max-w-52 truncate break-all`,children:(0,U.jsx)(nE,{href:r,target:`_blank`,variant:`ghost`,rel:`noopener noreferrer`,className:`hover:underline`,children:r})}),(0,U.jsx)(`button`,{type:`button`,className:`p-1 hover:bg-muted rounded-md transition-colors`,onClick:()=>{i(),n(!1)},children:a===`copied`?(0,U.jsx)(wc,{size:16,className:`text-green-500`}):(0,U.jsx)(Wc,{size:16})})]})]})]}):(0,U.jsxs)(`div`,{className:`w-60 p-5 text-center`,children:[(0,U.jsx)(`div`,{className:`text-2xl font-medium`,children:`🙈`}),(0,U.jsx)(`div`,{className:`text-md mt-4`,children:`Deployment URL not configured. Make sure your local gateway is running.`})]})})]})},tje=()=>(0,U.jsxs)(XAe,{className:`flex-row justify-between`,children:[(0,U.jsxs)(`nav`,{"aria-label":`Sidebar`,className:`flex gap-2 items-center`,children:[(0,U.jsx)(BO,{end:!0,to:`/dev/project/local`,children:`Project`}),(0,U.jsx)(BO,{to:`/dev/project/local/edit`,children:`Code`})]}),(0,U.jsx)(eje,{})]}),VO=(0,g.createContext)({chromeBottom:0});function nje({height:e,children:t}){let n={chromeBottom:(0,g.useContext)(VO).chromeBottom+e};return(0,U.jsx)(VO.Provider,{value:n,children:t})}function rje(){return(0,g.useContext)(VO).chromeBottom}var ije=({children:e,className:t,offset:n=0})=>{let r=rje();return(0,U.jsx)(`div`,{className:W(t),style:{height:`calc(100vh - ${r+n}px)`},children:e})};function HO(e,t,n){let{reference:r,floating:i}=e,a=_w(t),o=vw(t),s=gw(o),c=pw(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(mw(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}var aje=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=HO(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=HO(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function UO(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=fw(t,e),p=xw(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Sw(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Sw(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var oje=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=fw(e,t)||{};if(l==null)return{};let d=xw(u),f={x:n,y:r},p=vw(i),m=gw(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=ow(d[_],T),D=ow(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=dw(O,A,k),M=!c.arrow&&mw(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),sje=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=fw(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=pw(r),_=_w(o),v=pw(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[bw(o)]:Sve(o)),x=p!==`none`;!d&&x&&b.push(...Ove(o,m,p,y));let S=[o,...b],C=await UO(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=xve(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==_w(t))||T.every(e=>_w(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=_w(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function WO(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function GO(e){return _ve.some(t=>e[t]>=0)}var cje=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n}=t,{strategy:r=`referenceHidden`,...i}=fw(e,t);switch(r){case`referenceHidden`:{let e=WO(await UO(t,{...i,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:GO(e)}}}case`escaped`:{let e=WO(await UO(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:GO(e)}}}default:return{}}}}},KO=new Set([`left`,`top`]);async function lje(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=pw(n),s=mw(n),c=_w(n)===`y`,l=KO.has(o)?-1:1,u=a&&c?-1:1,d=fw(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var uje=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await lje(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},dje=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=fw(e,t),l={x:n,y:r},u=await UO(t,c),d=_w(pw(i)),f=hw(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=dw(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=dw(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},fje=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=fw(e,t),u={x:n,y:r},d=_w(i),f=hw(d),p=u[f],m=u[d],h=fw(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=KO.has(pw(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},pje=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=fw(e,t),u=await UO(t,l),d=pw(i),f=mw(i),p=_w(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=ow(h-u[g],v),x=ow(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=sw(u.left,0),t=sw(u.right,0),n=sw(u.top,0),r=sw(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:sw(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:sw(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function qO(e){let t=Fw(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=kw(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=cw(n)!==a||cw(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function JO(e){return Ow(e)?e:e.contextElement}function YO(e){let t=JO(e);if(!kw(t))return uw(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=qO(t),o=(a?cw(n.width):n.width)/r,s=(a?cw(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var mje=uw(0);function XO(e){let t=Ew(e);return!Nw()||!t.visualViewport?mje:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hje(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ew(e)?!1:t}function ZO(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=JO(e),o=uw(1);t&&(r?Ow(r)&&(o=YO(r)):o=YO(e));let s=hje(a,n,r)?XO(a):uw(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Ew(a),t=r&&Ow(r)?Ew(r):r,n=e,i=zw(n);for(;i&&r&&t!==n;){let e=YO(i),t=i.getBoundingClientRect(),r=Fw(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ew(i),i=zw(n)}}return Sw({width:u,height:d,x:c,y:l})}function QO(e,t){let n=Iw(e).scrollLeft;return t?t.left+n:ZO(Dw(e)).left+n}function $O(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-QO(e,n),y:n.top+t.scrollTop}}function gje(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Dw(r),s=t?jw(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=uw(1),u=uw(0),d=kw(r);if((d||!d&&!a)&&((Tw(r)!==`body`||Aw(o))&&(c=Iw(r)),kw(r))){let e=ZO(r);l=YO(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?$O(o,c):uw(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function _je(e){return Array.from(e.getClientRects())}function vje(e){let t=Dw(e),n=Iw(e),r=e.ownerDocument.body,i=sw(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=sw(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+QO(e),s=-n.scrollTop;return Fw(r).direction===`rtl`&&(o+=sw(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var ek=25;function yje(e,t){let n=Ew(e),r=Dw(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Nw();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=QO(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=ek&&(a-=o)}else l<=ek&&(a+=l);return{width:a,height:o,x:s,y:c}}var bje=new Set([`absolute`,`fixed`]);function xje(e,t){let n=ZO(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=kw(e)?YO(e):uw(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function tk(e,t,n){let r;if(t===`viewport`)r=yje(e,n);else if(t===`document`)r=vje(Dw(e));else if(Ow(t))r=xje(t,n);else{let n=XO(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Sw(r)}function nk(e,t){let n=Lw(e);return n===t||!Ow(n)||Pw(n)?!1:Fw(n).position===`fixed`||nk(n,t)}function Sje(e,t){let n=t.get(e);if(n)return n;let r=Rw(e,[],!1).filter(e=>Ow(e)&&Tw(e)!==`body`),i=null,a=Fw(e).position===`fixed`,o=a?Lw(e):e;for(;Ow(o)&&!Pw(o);){let t=Fw(o),n=Mw(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&bje.has(i.position)||Aw(o)&&!n&&nk(e,o))?r=r.filter(e=>e!==o):i=t,o=Lw(o)}return t.set(e,r),r}function Cje(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?jw(t)?[]:Sje(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=tk(t,n,i);return e.top=sw(r.top,e.top),e.right=ow(r.right,e.right),e.bottom=ow(r.bottom,e.bottom),e.left=sw(r.left,e.left),e},tk(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function wje(e){let{width:t,height:n}=qO(e);return{width:t,height:n}}function Tje(e,t,n){let r=kw(t),i=Dw(t),a=n===`fixed`,o=ZO(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=uw(0);function l(){c.x=QO(i)}if(r||!r&&!a)if((Tw(t)!==`body`||Aw(i))&&(s=Iw(t)),r){let e=ZO(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?$O(i,s):uw(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function rk(e){return Fw(e).position===`static`}function ik(e,t){if(!kw(e)||Fw(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Dw(e)===n&&(n=n.ownerDocument.body),n}function ak(e,t){let n=Ew(e);if(jw(e))return n;if(!kw(e)){let t=Lw(e);for(;t&&!Pw(t);){if(Ow(t)&&!rk(t))return t;t=Lw(t)}return n}let r=ik(e,t);for(;r&&Kve(r)&&rk(r);)r=ik(r,t);return r&&Pw(r)&&rk(r)&&!Mw(r)?n:r||Zve(e)||n}var Eje=async function(e){let t=this.getOffsetParent||ak,n=this.getDimensions,r=await n(e.floating);return{reference:Tje(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Dje(e){return Fw(e).direction===`rtl`}var Oje={convertOffsetParentRelativeRectToViewportRelativeRect:gje,getDocumentElement:Dw,getClippingRect:Cje,getOffsetParent:ak,getElementRects:Eje,getClientRects:_je,getDimensions:wje,getScale:YO,isElement:Ow,isRTL:Dje};function ok(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kje(e,t){let n=null,r,i=Dw(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=lw(d),h=lw(i.clientWidth-(u+f)),g=lw(i.clientHeight-(d+p)),_=lw(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:sw(0,ow(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!ok(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Aje(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=JO(e),u=i||a?[...l?Rw(l):[],...Rw(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?kje(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?ZO(e):null;c&&g();function g(){let t=ZO(e);h&&!ok(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var jje=uje,Mje=dje,Nje=sje,Pje=pje,Fje=cje,sk=oje,Ije=fje,Lje=(e,t,n)=>{let r=new Map,i={platform:Oje,...n},a={...i.platform,_c:r};return aje(e,t,{...i,platform:a})},ck=typeof document<`u`?g.useLayoutEffect:function(){};function lk(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!lk(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!lk(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function uk(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dk(e,t){let n=uk(e);return Math.round(t*n)/n}function fk(e){let t=g.useRef(e);return ck(()=>{t.current=e}),t}function Rje(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=g.useState(r);lk(f,r)||p(r);let[m,h]=g.useState(null),[_,v]=g.useState(null),y=g.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=g.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||m,S=o||_,C=g.useRef(null),w=g.useRef(null),T=g.useRef(u),E=c!=null,D=fk(c),O=fk(i),k=fk(l),A=g.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Lje(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!lk(T.current,t)&&(T.current=t,ji.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);ck(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=g.useRef(!1);ck(()=>(j.current=!0,()=>{j.current=!1}),[]),ck(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=g.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=g.useMemo(()=>({reference:x,floating:S}),[x,S]),P=g.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=dk(N.floating,u.x),r=dk(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...uk(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return g.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var zje=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:sk({element:r.current,padding:i}).fn(n):r?sk({element:r,padding:i}).fn(n):{}}}},Bje=(e,t)=>({...jje(e),options:[e,t]}),Vje=(e,t)=>({...Mje(e),options:[e,t]}),Hje=(e,t)=>({...Ije(e),options:[e,t]}),Uje=(e,t)=>({...Nje(e),options:[e,t]}),Wje=(e,t)=>({...Pje(e),options:[e,t]}),Gje=(e,t)=>({...Fje(e),options:[e,t]}),Kje=(e,t)=>({...zje(e),options:[e,t]}),qje=`Arrow`,pk=g.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,U.jsx)(sa.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,U.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});pk.displayName=qje;var Jje=pk,mk=`Popper`,[hk,gk]=Wi(mk),[Yje,_k]=hk(mk),vk=e=>{let{__scopePopper:t,children:n}=e,[r,i]=g.useState(null);return(0,U.jsx)(Yje,{scope:t,anchor:r,onAnchorChange:i,children:n})};vk.displayName=mk;var yk=`PopperAnchor`,bk=g.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=_k(yk,n),o=g.useRef(null),s=Vi(t,o),c=g.useRef(null);return g.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,U.jsx)(sa.div,{...i,ref:s})});bk.displayName=yk;var xk=`PopperContent`,[Xje,Zje]=hk(xk),Sk=g.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,_=_k(xk,n),[v,y]=g.useState(null),b=Vi(t,e=>y(e)),[x,S]=g.useState(null),C=Jw(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter($je),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=Rje({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>Aje(...e,{animationFrame:p===`always`}),elements:{reference:_.anchor},middleware:[Bje({mainAxis:i+T,alignmentAxis:o}),c&&Vje({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Hje():void 0,...A}),c&&Uje({...A}),Wje({...A,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),x&&Kje({element:x,padding:s}),eMe({arrowWidth:w,arrowHeight:T}),f&&Gje({strategy:`referenceHidden`,...A})]}),[I,L]=Tk(N),R=la(m);Oa(()=>{P&&R?.()},[P,R]);let z=F.arrow?.x,ee=F.arrow?.y,te=F.arrow?.centerOffset!==0,[ne,B]=g.useState();return Oa(()=>{v&&B(window.getComputedStyle(v).zIndex)},[v]),(0,U.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ne,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,U.jsx)(Xje,{scope:n,placedSide:I,onArrowChange:S,arrowX:z,arrowY:ee,shouldHideArrow:te,children:(0,U.jsx)(sa.div,{"data-side":I,"data-align":L,...h,ref:b,style:{...h.style,animation:P?void 0:`none`}})})})});Sk.displayName=xk;var Ck=`PopperArrow`,Qje={top:`bottom`,right:`left`,bottom:`top`,left:`right`},wk=g.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Zje(Ck,n),a=Qje[i.placedSide];return(0,U.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,U.jsx)(Jje,{...r,ref:t,style:{...r.style,display:`block`}})})});wk.displayName=Ck;function $je(e){return e!==null}var eMe=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Tk(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Tk(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Ek=vk,Dk=bk,Ok=Sk,kk=wk,tMe=`Portal`,Ak=g.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=g.useState(!1);Oa(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?ji.createPortal((0,U.jsx)(sa.div,{...r,ref:t}),o):null});Ak.displayName=tMe;function nMe(e,t){return g.useReducer((e,n)=>t[e][n]??e,e)}var jk=e=>{let{present:t,children:n}=e,r=rMe(t),i=typeof n==`function`?n({present:r.isPresent}):g.Children.only(n),a=Vi(r.ref,iMe(i));return typeof n==`function`||r.isPresent?g.cloneElement(i,{ref:a}):null};jk.displayName=`Presence`;function rMe(e){let[t,n]=g.useState(),r=g.useRef(null),i=g.useRef(e),a=g.useRef(`none`),[o,s]=nMe(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return g.useEffect(()=>{let e=Mk(r.current);a.current=o===`mounted`?e:`none`},[o]),Oa(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Mk(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Oa(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Mk(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Mk(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:g.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Mk(e){return e?.animationName||`none`}function iMe(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Nk=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`}),aMe=`VisuallyHidden`,Pk=g.forwardRef((e,t)=>(0,U.jsx)(sa.span,{...e,ref:t,style:{...Nk,...e.style}}));Pk.displayName=aMe;var oMe=Pk,[Fk,sMe]=Wi(`Tooltip`,[gk]),Ik=gk(),Lk=`TooltipProvider`,cMe=700,Rk=`tooltip.open`,[lMe,zk]=Fk(Lk),Bk=e=>{let{__scopeTooltip:t,delayDuration:n=cMe,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=g.useRef(!0),s=g.useRef(!1),c=g.useRef(0);return g.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,U.jsx)(lMe,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:g.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};Bk.displayName=Lk;var Vk=`Tooltip`,[uMe,Hk]=Fk(Vk),Uk=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=zk(Vk,e.__scopeTooltip),l=Ik(t),[u,d]=g.useState(null),f=aw(),p=g.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,_=g.useRef(!1),[v,y]=La({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Rk))):c.onClose(),a?.(e)},caller:Vk}),b=g.useMemo(()=>v?_.current?`delayed-open`:`instant-open`:`closed`,[v]),x=g.useCallback(()=>{window.clearTimeout(p.current),p.current=0,_.current=!1,y(!0)},[y]),S=g.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y(!1)},[y]),C=g.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{_.current=!0,y(!0),p.current=0},h)},[h,y]);return g.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,U.jsx)(Ek,{...l,children:(0,U.jsx)(uMe,{scope:t,contentId:f,open:v,stateAttribute:b,trigger:u,onTriggerChange:d,onTriggerEnter:g.useCallback(()=>{c.isOpenDelayedRef.current?C():x()},[c.isOpenDelayedRef,C,x]),onTriggerLeave:g.useCallback(()=>{m?S():(window.clearTimeout(p.current),p.current=0)},[S,m]),onOpen:x,onClose:S,disableHoverableContent:m,children:n})})};Uk.displayName=Vk;var Wk=`TooltipTrigger`,Gk=g.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Hk(Wk,n),a=zk(Wk,n),o=Ik(n),s=Vi(t,g.useRef(null),i.onTriggerChange),c=g.useRef(!1),l=g.useRef(!1),u=g.useCallback(()=>c.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,U.jsx)(Dk,{asChild:!0,...o,children:(0,U.jsx)(sa.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:$i(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:$i(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:$i(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:$i(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:$i(e.onBlur,i.onClose),onClick:$i(e.onClick,i.onClose)})})});Gk.displayName=Wk;var Kk=`TooltipPortal`,[dMe,fMe]=Fk(Kk,{forceMount:void 0}),qk=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Hk(Kk,t);return(0,U.jsx)(dMe,{scope:t,forceMount:n,children:(0,U.jsx)(jk,{present:n||a.open,children:(0,U.jsx)(Ak,{asChild:!0,container:i,children:r})})})};qk.displayName=Kk;var Jk=`TooltipContent`,Yk=g.forwardRef((e,t)=>{let n=fMe(Jk,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Hk(Jk,e.__scopeTooltip);return(0,U.jsx)(jk,{present:r||o.open,children:o.disableHoverableContent?(0,U.jsx)(Xk,{side:i,...a,ref:t}):(0,U.jsx)(pMe,{side:i,...a,ref:t})})}),pMe=g.forwardRef((e,t)=>{let n=Hk(Jk,e.__scopeTooltip),r=zk(Jk,e.__scopeTooltip),i=g.useRef(null),a=Vi(t,i),[o,s]=g.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=g.useCallback(()=>{s(null),d(!1)},[d]),p=g.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=vMe(r,_Me(r,n.getBoundingClientRect())),a=yMe(t.getBoundingClientRect());s(xMe([...i,...a])),d(!0)},[d]);return g.useEffect(()=>()=>f(),[f]),g.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),g.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!bMe(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,U.jsx)(Xk,{...e,ref:a})}),[mMe,hMe]=Fk(Vk,{isInside:!1}),gMe=ra(`TooltipContent`),Xk=g.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=Hk(Jk,n),l=Ik(n),{onClose:u}=c;return g.useEffect(()=>(document.addEventListener(Rk,u),()=>document.removeEventListener(Rk,u)),[u]),g.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,U.jsx)(_a,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,U.jsxs)(Ok,{"data-state":c.stateAttribute,...l,...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,U.jsx)(gMe,{children:r}),(0,U.jsx)(mMe,{scope:n,isInside:!0,children:(0,U.jsx)(oMe,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});Yk.displayName=Jk;var Zk=`TooltipArrow`,Qk=g.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Ik(n);return hMe(Zk,n).isInside?null:(0,U.jsx)(kk,{...i,...r,ref:t})});Qk.displayName=Zk;function _Me(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function vMe(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function yMe(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function bMe(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function xMe(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),SMe(t)}function SMe(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var CMe=Bk,$k=Uk,eA=Gk,wMe=qk,TMe=Yk,tA=Qk;function nA({delayDuration:e=0,...t}){return(0,U.jsx)(CMe,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function rA({...e}){return(0,U.jsx)(nA,{children:(0,U.jsx)($k,{"data-slot":`tooltip`,...e})})}function iA({...e}){return(0,U.jsx)(eA,{"data-slot":`tooltip-trigger`,...e})}function aA({className:e,sideOffset:t=0,children:n,...r}){return(0,U.jsx)(wMe,{children:(0,U.jsxs)(TMe,{"data-slot":`tooltip-content`,sideOffset:t,className:W(`bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance`,e),...r,children:[n,(0,U.jsx)(tA,{className:`bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]`})]})})}var oA=({className:e,...t})=>(0,U.jsx)(tA,{...t,className:W(`fill-white -translate-y-px drop-shadow-md [clip-path:inset(0_-10px_-10px_-10px)]`,e)}),sA=({children:e,content:t,open:n,defaultOpen:r,onOpenChange:i,side:a=`top`,align:o=`center`,className:s,asChild:c=!0,...l})=>t?(0,U.jsxs)($k,{open:n,defaultOpen:r,onOpenChange:i,children:[(0,U.jsx)(eA,{asChild:c,children:e}),(0,U.jsxs)(aA,{side:a,align:o,className:s,...l,children:[t,(0,U.jsx)(oA,{})]})]}):e,cA={width:5,height:5,borderRadius:`50%`},EMe=({className:e,color:t=`white`})=>(0,U.jsxs)(FO.div,{className:`flex items-center gap-1`,initial:`hidden`,animate:`visible`,variants:{visible:{transition:{staggerChildren:.2}}},children:[(0,U.jsx)(FO.div,{className:W(t===`white`?`bg-white/60`:`bg-zuplo-600/60`,e),variants:{hidden:{opacity:0,y:3},visible:{opacity:1,y:0,transition:{y:{type:`spring`,stiffness:300,damping:10,repeat:1/0,repeatType:`reverse`}}}},style:cA}),(0,U.jsx)(FO.div,{className:W(t===`white`?`bg-white/60`:`bg-zuplo-600/60`,e),variants:{hidden:{opacity:0,y:3},visible:{opacity:1,y:0,transition:{y:{type:`spring`,stiffness:300,damping:10,repeat:1/0,repeatType:`reverse`}}}},style:cA}),(0,U.jsx)(FO.div,{className:W(t===`white`?`bg-white/60`:`bg-zuplo-600/60`,e),variants:{hidden:{opacity:0,y:3},visible:{opacity:1,y:0,transition:{y:{type:`spring`,stiffness:300,damping:10,repeat:1/0,repeatType:`reverse`}}}},style:cA})]}),lA=({children:e,className:t,loading:n,alternative:r,variant:i=`default`})=>(0,U.jsxs)(`div`,{className:`relative`,children:[(0,U.jsx)(`div`,{className:W(t,`transition-opacity`,n&&`opacity-0`),children:e}),(0,U.jsx)(`div`,{className:W(`absolute top-1/2 left-1/2 opacity-0 transform -translate-x-1/2 -translate-y-1/2`,n&&`opacity-100`),children:r??(0,U.jsx)(EMe,{color:i===`default`?`white`:`primary`})})]});function uA(){return uA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uA.apply(null,arguments)}function dA(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function DMe(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function fA(...e){return t=>e.forEach(e=>DMe(e,t))}function pA(...e){return(0,g.useCallback)(fA(...e),e)}function OMe(e,t){let n=(0,g.createContext)(t);function r(e){let{children:t,...r}=e,i=(0,g.useMemo)(()=>r,Object.values(r));return(0,g.createElement)(n.Provider,{value:i},t)}function i(r){let i=(0,g.useContext)(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return r.displayName=e+`Provider`,[r,i]}function kMe(e,t=[]){let n=[];function r(t,r){let i=(0,g.createContext)(r),a=n.length;n=[...n,r];function o(t){let{scope:n,children:r,...o}=t,s=n?.[e][a]||i,c=(0,g.useMemo)(()=>o,Object.values(o));return(0,g.createElement)(s.Provider,{value:c},r)}function s(n,o){let s=(0,g.useContext)(o?.[e][a]||i);if(s)return s;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return o.displayName=t+`Provider`,[o,s]}let i=()=>{let t=n.map(e=>(0,g.createContext)(e));return function(n){let r=n?.[e]||t;return(0,g.useMemo)(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,AMe(i,...t)]}function AMe(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return(0,g.useMemo)(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var mA=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},jMe=g.useId||(()=>void 0),MMe=0;function hA(e){let[t,n]=g.useState(jMe());return mA(()=>{e||n(e=>e??String(MMe++))},[e]),e||(t?`radix-${t}`:``)}function gA(e){let t=(0,g.useRef)(e);return(0,g.useEffect)(()=>{t.current=e}),(0,g.useMemo)(()=>(...e)=>t.current?.call(t,...e),[])}function NMe({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=PMe({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=gA(n);return[o,(0,g.useCallback)(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function PMe({defaultProp:e,onChange:t}){let n=(0,g.useState)(e),[r]=n,i=(0,g.useRef)(r),a=gA(t);return(0,g.useEffect)(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}function _A(){return _A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_A.apply(null,arguments)}var vA=(0,g.forwardRef)((e,t)=>{let{children:n,...r}=e,i=g.Children.toArray(n),a=i.find(IMe);if(a){let e=a.props.children,n=i.map(t=>t===a?g.Children.count(e)>1?g.Children.only(null):(0,g.isValidElement)(e)?e.props.children:null:t);return(0,g.createElement)(yA,_A({},r,{ref:t}),(0,g.isValidElement)(e)?(0,g.cloneElement)(e,void 0,n):null)}return(0,g.createElement)(yA,_A({},r,{ref:t}),n)});vA.displayName=`Slot`;var yA=(0,g.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,g.isValidElement)(n)?(0,g.cloneElement)(n,{...LMe(r,n.props),ref:t?fA(t,n.ref):n.ref}):g.Children.count(n)>1?g.Children.only(null):null});yA.displayName=`SlotClone`;var FMe=({children:e})=>(0,g.createElement)(g.Fragment,null,e);function IMe(e){return(0,g.isValidElement)(e)&&e.type===FMe}function LMe(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{a(...e),i(...e)}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}var bA=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=(0,g.forwardRef)((e,n)=>{let{asChild:r,...i}=e,a=r?vA:t;return(0,g.useEffect)(()=>{window[Symbol.for(`radix-ui`)]=!0},[]),(0,g.createElement)(a,_A({},i,{ref:n}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),RMe=(0,g.forwardRef)((e,t)=>{let{container:n=globalThis==null?void 0:globalThis.document?.body,...r}=e;return n?ji.createPortal((0,g.createElement)(bA.div,_A({},r,{ref:t})),n):null});function zMe(e,t){return(0,g.useReducer)((e,n)=>t[e][n]??e,e)}var xA=e=>{let{present:t,children:n}=e,r=BMe(t),i=typeof n==`function`?n({present:r.isPresent}):g.Children.only(n),a=pA(r.ref,i.ref);return typeof n==`function`||r.isPresent?(0,g.cloneElement)(i,{ref:a}):null};xA.displayName=`Presence`;function BMe(e){let[t,n]=(0,g.useState)(),r=(0,g.useRef)({}),i=(0,g.useRef)(e),a=(0,g.useRef)(`none`),[o,s]=zMe(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return(0,g.useEffect)(()=>{let e=SA(r.current);a.current=o===`mounted`?e:`none`},[o]),mA(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=SA(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),mA(()=>{if(t){let e=e=>{let n=SA(r.current).includes(e.animationName);e.target===t&&n&&(0,ji.flushSync)(()=>s(`ANIMATION_END`))},n=e=>{e.target===t&&(a.current=SA(r.current))};return t.addEventListener(`animationstart`,n),t.addEventListener(`animationcancel`,e),t.addEventListener(`animationend`,e),()=>{t.removeEventListener(`animationstart`,n),t.removeEventListener(`animationcancel`,e),t.removeEventListener(`animationend`,e)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:(0,g.useCallback)(e=>{e&&(r.current=getComputedStyle(e)),n(e)},[])}}function SA(e){return e?.animationName||`none`}var CA=0;function VMe(){(0,g.useEffect)(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??wA()),document.body.insertAdjacentElement(`beforeend`,e[1]??wA()),CA++,()=>{CA===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),CA--}},[])}function wA(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.cssText=`outline: none; opacity: 0; position: fixed; pointer-events: none`,e}var TA=Lbe(),EA=function(){},DA=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:EA,onWheelCapture:EA,onTouchMoveCapture:EA}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,h=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=fT(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noIsolation`,`inert`,`allowPinchZoom`,`as`]),b=f,x=Pbe([n,t]),S=dT(dT({},y),i);return g.createElement(g.Fragment,null,u&&g.createElement(b,{sideCar:TA,removeScrollBar:l,shards:d,noIsolation:p,inert:m,setCallbacks:a,allowPinchZoom:!!h,lockRef:n}),o?g.cloneElement(g.Children.only(s),dT(dT({},S),{ref:x})):g.createElement(v,dT({},S,{className:c,ref:x}),s))});DA.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},DA.classNames={fullWidth:mT,zeroRight:pT};var OA=!1;if(typeof window<`u`)try{var kA=Object.defineProperty({},`passive`,{get:function(){return OA=!0,!0}});window.addEventListener(`test`,kA,kA),window.removeEventListener(`test`,kA,kA)}catch{OA=!1}var AA=OA?{passive:!1}:!1,HMe=function(e){return e.tagName===`TEXTAREA`},jA=function(e,t){var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!HMe(e)&&n[t]===`visible`)},UMe=function(e){return jA(e,`overflowY`)},WMe=function(e){return jA(e,`overflowX`)},MA=function(e,t){var n=t;do{if(typeof ShadowRoot<`u`&&n instanceof ShadowRoot&&(n=n.host),NA(e,n)){var r=PA(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},GMe=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},KMe=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},NA=function(e,t){return e===`v`?UMe(t):WMe(t)},PA=function(e,t){return e===`v`?GMe(t):KMe(t)},qMe=function(e,t){return e===`h`&&t===`rtl`?-1:1},JMe=function(e,t,n,r,i){var a=qMe(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{var p=PA(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&NA(e,s)&&(d+=h,f+=m),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&d===0||!i&&o>d)||!u&&(i&&f===0||!i&&-o>f))&&(l=!0),l},FA=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},IA=function(e){return[e.deltaX,e.deltaY]},LA=function(e){return e&&`current`in e?e.current:e},YMe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},XMe=function(e){return`
|
|
94
94
|
.block-interactivity-${e} {pointer-events: none;}
|
|
95
95
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
96
|
-
`},ZMe=0,RA=[];function QMe(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),i=g.useState(ZMe++)[0],a=g.useState(function(){return vT()})[0],o=g.useRef(e);g.useEffect(function(){o.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Obe([e.lockRef.current],(e.shards||[]).map(LA),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=g.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2)return!o.current.allowPinchZoom;var i=FA(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=MA(d,u);if(!f)return!0;if(f?l=d:(l=d===`v`?`h`:`v`,f=MA(d,u)),!f)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var p=r.current||l;return JMe(p,t,e,p===`h`?s:c,!0)},[]),c=g.useCallback(function(e){var n=e;if(!(!RA.length||RA[RA.length-1]!==a)){var r=`deltaY`in n?IA(n):FA(n),i=t.current.filter(function(e){return e.name===n.type&&e.target===n.target&&YMe(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(LA).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=g.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=g.useCallback(function(e){n.current=FA(e),r.current=void 0},[]),d=g.useCallback(function(t){l(t.type,IA(t),t.target,s(t,e.lockRef.current))},[]),f=g.useCallback(function(t){l(t.type,FA(t),t.target,s(t,e.lockRef.current))},[]);g.useEffect(function(){return RA.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,AA),document.addEventListener(`touchmove`,c,AA),document.addEventListener(`touchstart`,u,AA),function(){RA=RA.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,AA),document.removeEventListener(`touchmove`,c,AA),document.removeEventListener(`touchstart`,u,AA)}},[]);var p=e.removeScrollBar,m=e.inert;return g.createElement(g.Fragment,null,m?g.createElement(a,{styles:XMe(i)}):null,p?g.createElement(txe,{gapMode:`margin`}):null)}var $Me=zbe(TA,QMe),zA=g.forwardRef(function(e,t){return g.createElement(DA,dT({},e,{ref:t,sideCar:$Me}))});zA.classNames=DA.classNames;var BA=`Dialog`,[VA,eNe]=kMe(BA),[tNe,HA]=VA(BA),nNe=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=(0,g.useRef)(null),c=(0,g.useRef)(null),[l=!1,u]=NMe({prop:r,defaultProp:i,onChange:a});return(0,g.createElement)(tNe,{scope:t,triggerRef:s,contentRef:c,contentId:hA(),titleId:hA(),descriptionId:hA(),open:l,onOpenChange:u,onOpenToggle:(0,g.useCallback)(()=>u(e=>!e),[u]),modal:o},n)},rNe=`DialogTrigger`,iNe=(0,g.forwardRef)((e,t)=>{let{__scopeDialog:n,...r}=e,i=HA(rNe,n),a=pA(t,i.triggerRef);return(0,g.createElement)(bA.button,uA({type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":YA(i.open)},r,{ref:a,onClick:dA(e.onClick,i.onOpenToggle)}))}),UA=`DialogPortal`,[aNe,WA]=VA(UA,{forceMount:void 0}),oNe=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=HA(UA,t);return(0,g.createElement)(aNe,{scope:t,forceMount:n},g.Children.map(r,e=>(0,g.createElement)(xA,{present:n||a.open},(0,g.createElement)(RMe,{asChild:!0,container:i},e))))},GA=`DialogOverlay`,sNe=(0,g.forwardRef)((e,t)=>{let n=WA(GA,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=HA(GA,e.__scopeDialog);return a.modal?(0,g.createElement)(xA,{present:r||a.open},(0,g.createElement)(cNe,uA({},i,{ref:t}))):null}),cNe=(0,g.forwardRef)((e,t)=>{let{__scopeDialog:n,...r}=e,i=HA(GA,n);return(0,g.createElement)(zA,{as:vA,allowPinchZoom:!0,shards:[i.contentRef]},(0,g.createElement)(bA.div,uA({"data-state":YA(i.open)},r,{ref:t,style:{pointerEvents:`auto`,...r.style}})))}),KA=`DialogContent`,lNe=(0,g.forwardRef)((e,t)=>{let n=WA(KA,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=HA(KA,e.__scopeDialog);return(0,g.createElement)(xA,{present:r||a.open},a.modal?(0,g.createElement)(uNe,uA({},i,{ref:t})):(0,g.createElement)(dNe,uA({},i,{ref:t})))}),uNe=(0,g.forwardRef)((e,t)=>{let n=HA(KA,e.__scopeDialog),r=(0,g.useRef)(null),i=pA(t,n.contentRef,r);return(0,g.useEffect)(()=>{let e=r.current;if(e)return uT(e)},[]),(0,g.createElement)(qA,uA({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:dA(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),(t=n.triggerRef.current)==null||t.focus()}),onPointerDownOutside:dA(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:dA(e.onFocusOutside,e=>e.preventDefault())}))}),dNe=(0,g.forwardRef)((e,t)=>{let n=HA(KA,e.__scopeDialog),r=(0,g.useRef)(!1),i=(0,g.useRef)(!1);return(0,g.createElement)(qA,uA({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a;if((a=e.onCloseAutoFocus)==null||a.call(e,t),!t.defaultPrevented){var o;r.current||(o=n.triggerRef.current)==null||o.focus(),t.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:t=>{var a;(a=e.onInteractOutside)==null||a.call(e,t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let o=t.target;n.triggerRef.current?.contains(o)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}}))}),qA=(0,g.forwardRef)((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=HA(KA,n),c=pA(t,(0,g.useRef)(null));return VMe(),(0,g.createElement)(g.Fragment,null,(0,g.createElement)(rw,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a},(0,g.createElement)(_a,uA({role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":YA(s.open)},o,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),JA=`DialogTitle`,fNe=(0,g.forwardRef)((e,t)=>{let{__scopeDialog:n,...r}=e,i=HA(JA,n);return(0,g.createElement)(bA.h2,uA({id:i.titleId},r,{ref:t}))}),pNe=`DialogDescription`,mNe=(0,g.forwardRef)((e,t)=>{let{__scopeDialog:n,...r}=e,i=HA(pNe,n);return(0,g.createElement)(bA.p,uA({id:i.descriptionId},r,{ref:t}))}),hNe=`DialogClose`,gNe=(0,g.forwardRef)((e,t)=>{let{__scopeDialog:n,...r}=e,i=HA(hNe,n);return(0,g.createElement)(bA.button,uA({type:`button`},r,{ref:t,onClick:dA(e.onClick,()=>i.onOpenChange(!1))}))});function YA(e){return e?`open`:`closed`}var[_Ne,vNe]=OMe(`DialogTitleWarning`,{contentName:KA,titleName:JA,docsSlug:`dialog`}),XA=nNe,ZA=iNe,QA=oNe,$A=sNe,ej=lNe,tj=fNe,nj=mNe,rj=gNe;function ij({...e}){return(0,U.jsx)(XA,{"data-slot":`dialog`,...e})}function aj({...e}){return(0,U.jsx)(ZA,{"data-slot":`dialog-trigger`,...e})}function yNe({...e}){return(0,U.jsx)(QA,{"data-slot":`dialog-portal`,...e})}function oj({...e}){return(0,U.jsx)(rj,{"data-slot":`dialog-close`,...e})}function bNe({className:e,...t}){return(0,U.jsx)($A,{"data-slot":`dialog-overlay`,className:W(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,e),...t})}function sj({className:e,children:t,showCloseButton:n=!0,...r}){return(0,U.jsxs)(yNe,{"data-slot":`dialog-portal`,children:[(0,U.jsx)(bNe,{}),(0,U.jsxs)(ej,{"data-slot":`dialog-content`,className:W(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg`,e),...r,children:[t,n&&(0,U.jsxs)(rj,{"data-slot":`dialog-close`,className:`ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,U.jsx)(nu,{}),(0,U.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function cj({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`dialog-header`,className:W(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function lj({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`dialog-footer`,className:W(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function uj({className:e,...t}){return(0,U.jsx)(tj,{"data-slot":`dialog-title`,className:W(`text-lg leading-none font-semibold`,e),...t})}function dj({className:e,...t}){return(0,U.jsx)(nj,{"data-slot":`dialog-description`,className:W(`text-muted-foreground text-sm`,e),...t})}function xNe({open:e,editors:t,onSelect:n,onCancel:r}){let[i,a]=(0,g.useState)(null);return(0,U.jsx)(ij,{open:e,onOpenChange:e=>!e&&r(),children:(0,U.jsxs)(sj,{className:`sm:max-w-md`,children:[(0,U.jsxs)(cj,{children:[(0,U.jsx)(uj,{children:`Choose Your Editor`}),(0,U.jsx)(dj,{children:`Select which editor you'd like to use for opening files. This preference will be saved for future use.`})]}),(0,U.jsx)(`div`,{className:`space-y-2 py-4`,children:t.map(e=>(0,U.jsx)(`button`,{type:`button`,className:`w-full text-left px-4 py-3 rounded-md border transition-colors ${i===e.id?`border-blue-500 bg-blue-50 dark:bg-blue-950/40`:`border-gray-200 dark:border-neutral-700 hover:border-gray-300 dark:hover:border-neutral-600 hover:bg-gray-50 dark:hover:bg-neutral-800/60`}`,onClick:()=>a(e.id),children:(0,U.jsx)(`div`,{className:`font-medium`,children:e.name})},e.id))}),(0,U.jsxs)(lj,{children:[(0,U.jsx)(Y,{variant:`ghost`,onClick:r,children:`Cancel`}),(0,U.jsx)(Y,{variant:`default`,onClick:()=>{i&&n(i)},disabled:!i,children:`Save Preference`})]})]})})}var fj=`/api/v1/editor`;function SNe(){let[e]=Br(),[t,n]=(0,g.useState)(null),[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)([]),[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(!0);(0,g.useEffect)(()=>{(async()=>{try{let e=await fetch(`${fj}/list`);if(!e.ok)throw Error(`Failed to fetch editors: ${e.status}`);o((await e.json()).editors);let t=await fetch(`${fj}/detect`);if(!t.ok)throw Error(`Failed to detect editor: ${t.status}`);let r=await t.json();r.editor&&r.name&&(n(r.editor),i(r.name))}catch(e){_.default.error(`Failed to load editor preference:`,e)}finally{u(!1)}})()},[]);let d=(0,g.useCallback)(async e=>{try{if((await fetch(`${fj}/preference`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({editor:e})})).ok){let t=a.find(t=>t.id===e);t&&(n(e),i(t.name)),c(!1)}}catch(e){_.default.error(`Failed to save editor preference:`,e)}},[a]),f=(0,g.useCallback)(async()=>{let n=e.get(`path`);if(!n){_.default.warn(`No file path in URL`);return}if(!t){c(!0);return}try{let e=await fetch(`${fj}/open`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({file:n})});if(!e.ok){let t=await e.json();_.default.error(`Failed to open file in editor:`,t.message);return}let t=await e.json();t.url&&window.open(t.url,`_blank`)}catch(e){_.default.error(`Failed to open file in editor:`,e)}},[e,t]);return{hasEditor:!!t,editorName:r,isLoading:l,showPreferenceDialog:s,setShowPreferenceDialog:c,availableEditors:a,savePreference:d,openInEditor:f}}var pj=`$import(@zuplo/runtime)`,CNe=e=>new Promise(t=>setTimeout(t,e)),mj=e=>{let t=(0,g.useRef)(e);return t.current=e,(0,g.useEffect)(()=>{t.current=e},[e]),t},hj=e=>{let[t,n]=(0,g.useState)(`idle`),[r,i]=(0,g.useState)(),[a,o]=(0,g.useState)(null);return{state:t,error:r,execute:(0,g.useCallback)(async(...t)=>{n(`loading`),o(null),i(void 0);try{let r=await e(...t);return n(`hasValue`),o(r),r}catch(e){throw i(e instanceof Error?e:Error(e)),n(`hasError`),e}},[e]),value:a}},gj=function(e){return e.PRODUCTION=`PRODUCTION`,e.PREVIEW=`PREVIEW`,e.WORKING_COPY=`WORKING_COPY`,e}({});function wNe(e,...t){return e==null?!1:t.includes(e)}var _j=()=>({isReadOnly:gu().environment.environmentType!==gj.WORKING_COPY});function vj(){return new URLSearchParams(Sn().search)}function yj(e,t){let[n,r]=Br(),i=Object.fromEntries(n);return[n.get(e)??t,t=>r(t===void 0?Object.fromEntries(Object.entries(i).filter(([t])=>t!==e)):{...i,[e]:t})]}function TNe(e,t){let[n,r]=Br();return[n.get(e)?n.getAll(e):t,t=>r({...Object.fromEntries(n),[e]:t})]}var ENe=i(((e,t)=>{t.exports=n;function n(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var a=i(e,t,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+e.length,a[1]),post:n.slice(a[1]+t.length)}}function r(e,t){var n=t.match(e);return n?n[0]:null}n.range=i;function i(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:(i=r.pop(),i<a&&(a=i,o=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(s=[a,o])}return s}})),DNe=e(i(((e,t)=>{var n=ENe();t.exports=f;var r=`\0SLASH`+Math.random()+`\0`,i=`\0OPEN`+Math.random()+`\0`,a=`\0CLOSE`+Math.random()+`\0`,o=`\0COMMA`+Math.random()+`\0`,s=`\0PERIOD`+Math.random()+`\0`;function c(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function l(e){return e.split(`\\\\`).join(r).split(`\\{`).join(i).split(`\\}`).join(a).split(`\\,`).join(o).split(`\\.`).join(s)}function u(e){return e.split(r).join(`\\`).split(i).join(`{`).split(a).join(`}`).split(o).join(`,`).split(s).join(`.`)}function d(e){if(!e)return[``];var t=[],r=n(`{`,`}`,e);if(!r)return e.split(`,`);var i=r.pre,a=r.body,o=r.post,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;var c=d(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),t.push.apply(t,s),t}function f(e){return e?(e.substr(0,2)===`{}`&&(e=`\\{\\}`+e.substr(2)),_(l(e),!0).map(u)):[]}function p(e){return`{`+e+`}`}function m(e){return/^-?0\d/.test(e)}function h(e,t){return e<=t}function g(e,t){return e>=t}function _(e,t){var r=[],i=n(`{`,`}`,e);if(!i)return[e];var o=i.pre,s=i.post.length?_(i.post,!1):[``];if(/\$$/.test(i.pre))for(var l=0;l<s.length;l++){var u=o+`{`+i.body+`}`+s[l];r.push(u)}else{var f=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),v=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),y=f||v,b=i.body.indexOf(`,`)>=0;if(!y&&!b)return i.post.match(/,(?!,).*\}/)?(e=i.pre+`{`+i.body+a+i.post,_(e)):[e];var x;if(y)x=i.body.split(/\.\./);else if(x=d(i.body),x.length===1&&(x=_(x[0],!1).map(p),x.length===1))return s.map(function(e){return i.pre+x[0]+e});var S;if(y){var C=c(x[0]),w=c(x[1]),T=Math.max(x[0].length,x[1].length),E=x.length==3?Math.abs(c(x[2])):1,D=h;w<C&&(E*=-1,D=g);var O=x.some(m);S=[];for(var k=C;D(k,w);k+=E){var A;if(v)A=String.fromCharCode(k),A===`\\`&&(A=``);else if(A=String(k),O){var j=T-A.length;if(j>0){var M=Array(j+1).join(`0`);A=k<0?`-`+M+A.slice(1):M+A}}S.push(A)}}else{S=[];for(var N=0;N<x.length;N++)S.push.apply(S,_(x[N],!1))}for(var N=0;N<S.length;N++)for(var l=0;l<s.length;l++){var u=o+S[N]+s[l];(!t||y||u)&&r.push(u)}}return r}}))()),ONe=1024*64,bj=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>ONe)throw TypeError(`pattern is too long`)},kNe={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`,!0],"[:alpha:]":[`\\p{L}\\p{Nl}`,!0],"[:ascii:]":[`\\x00-\\x7f`,!1],"[:blank:]":[`\\p{Zs}\\t`,!0],"[:cntrl:]":[`\\p{Cc}`,!0],"[:digit:]":[`\\p{Nd}`,!0],"[:graph:]":[`\\p{Z}\\p{C}`,!0,!0],"[:lower:]":[`\\p{Ll}`,!0],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}`,!0],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`,!0],"[:upper:]":[`\\p{Lu}`,!0],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`,!0],"[:xdigit:]":[`A-Fa-f0-9`,!1]},xj=e=>e.replace(/[[\]\\-]/g,`\\$&`),ANe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),Sj=e=>e.join(``),jNe=(e,t)=>{let n=t;if(e.charAt(n)!==`[`)throw Error(`not in a brace expression`);let r=[],i=[],a=n+1,o=!1,s=!1,c=!1,l=!1,u=n,d=``;WHILE:for(;a<e.length;){let t=e.charAt(a);if((t===`!`||t===`^`)&&a===n+1){l=!0,a++;continue}if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t===`\\`&&!c){c=!0,a++;continue}if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(kNe))if(e.startsWith(t,a)){if(d)return[`$.`,!1,e.length-n,!0];a+=t.length,l?i.push(o):r.push(o),s||=c;continue WHILE}}if(c=!1,d){t>d?r.push(xj(d)+`-`+xj(t)):t===d&&r.push(xj(t)),d=``,a++;continue}if(e.startsWith(`-]`,a+1)){r.push(xj(t+`-`)),a+=2;continue}if(e.startsWith(`-`,a+1)){d=t,a+=2;continue}r.push(xj(t)),a++}if(u<a)return[``,!1,0,!1];if(!r.length&&!i.length)return[`$.`,!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l)return[ANe(r[0].length===2?r[0].slice(-1):r[0]),!1,u-n,!1];let f=`[`+(l?`^`:``)+Sj(r)+`]`,p=`[`+(l?``:`^`)+Sj(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},Cj=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,`$1$2`).replace(/\\([^\/])/g,`$1`),MNe=new Set([`!`,`?`,`+`,`*`,`@`]),wj=e=>MNe.has(e),Tj=e=>wj(e.type),NNe=new Map([[`!`,[`@`]],[`?`,[`?`,`@`]],[`@`,[`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`]]]),PNe=new Map([[`!`,[`?`]],[`@`,[`?`]],[`+`,[`?`,`*`]]]),FNe=new Map([[`!`,[`?`,`@`]],[`?`,[`?`,`@`]],[`@`,[`?`,`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`,`?`,`*`]]]),Ej=new Map([[`!`,new Map([[`!`,`@`]])],[`?`,new Map([[`*`,`*`],[`+`,`*`]])],[`@`,new Map([[`!`,`!`],[`?`,`?`],[`@`,`@`],[`*`,`*`],[`+`,`+`]])],[`+`,new Map([[`?`,`*`],[`*`,`*`]])]]),INe=`(?!\\.\\.?(?:$|/))`,Dj=`(?!\\.)`,LNe=new Set([`[`,`.`]),RNe=new Set([`..`,`.`]),zNe=new Set(`().*{}+?[]^$\\!`),BNe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),Oj=`[^/]`,kj=Oj+`*?`,Aj=Oj+`+?`,jj=class e{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.type?this.#l=this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#l=this.#r.map(e=>String(e)).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(...t){for(let n of t)if(n!==``){if(typeof n!=`string`&&!(n instanceof e&&n.#i===this))throw Error(`invalid part: `+n);this.#r.push(n)}}toJSON(){let e=this.type===null?this.#r.slice().map(e=>typeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let t=this.#i;for(let n=0;n<this.#a;n++){let r=t.#r[n];if(!(r instanceof e&&r.type===`!`))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type===`!`)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(t){let n=new e(this.type,t);for(let e of this.#r)n.copyIn(e);return n}static#f(t,n,r,i,a){let o=i.maxExtglobRecursion??2,s=!1,c=!1,l=-1,u=!1;if(n.type===null){let d=r,f=``;for(;d<t.length;){let r=t.charAt(d++);if(s||r===`\\`){s=!s,f+=r;continue}if(c){d===l+1?(r===`^`||r===`!`)&&(u=!0):r===`]`&&!(d===l+2&&u)&&(c=!1),f+=r;continue}else if(r===`[`){c=!0,l=d,u=!1,f+=r;continue}if(!i.noext&&wj(r)&&t.charAt(d)===`(`&&a<=o){n.push(f),f=``;let o=new e(r,n);d=e.#f(t,o,d,i,a+1),n.push(o);continue}f+=r}return n.push(f),d}let d=r+1,f=new e(null,n),p=[],m=``;for(;d<t.length;){let r=t.charAt(d++);if(s||r===`\\`){s=!s,m+=r;continue}if(c){d===l+1?(r===`^`||r===`!`)&&(u=!0):r===`]`&&!(d===l+2&&u)&&(c=!1),m+=r;continue}else if(r===`[`){c=!0,l=d,u=!1,m+=r;continue}if(wj(r)&&t.charAt(d)===`(`&&(a<=o||n&&n.#h(r))){let o=n&&n.#h(r)?0:1;f.push(m),m=``;let s=new e(r,f);f.push(s),d=e.#f(t,s,d,i,a+o);continue}if(r===`|`){f.push(m),m=``,p.push(f),f=new e(null,n);continue}if(r===`)`)return m===``&&n.#r.length===0&&(n.#u=!0),f.push(m),m=``,n.push(...p,f),d;m+=r}return n.type=null,n.#t=void 0,n.#r=[t.substring(r-1)],d}#p(e){return this.#m(e,PNe)}#m(e,t=NNe){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null)return!1;let n=e.#r[0];return!n||typeof n!=`object`||n.type===null?!1:this.#h(n.type,t)}#h(e,t=FNe){return!!t.get(this.type)?.includes(e)}#g(t,n){let r=t.#r[0],i=new e(null,r,this.options);i.#r.push(``),r.push(i),this.#_(t,n)}#_(e,t){let n=e.#r[0];this.#r.splice(t,1,...n.#r);for(let e of n.#r)typeof e==`object`&&(e.#i=this);this.#l=void 0}#v(e){return!!Ej.get(this.type)?.has(e)}#y(e){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null||this.#r.length!==1)return!1;let t=e.#r[0];return!t||typeof t!=`object`||t.type===null?!1:this.#v(t.type)}#b(e){let t=Ej.get(this.type),n=e.#r[0],r=t?.get(n.type);if(!r)return!1;this.#r=n.#r;for(let e of this.#r)typeof e==`object`&&(e.#i=this);this.type=r,this.#l=void 0,this.#u=!1}#x(){if(Tj(this)){let e=0,t=!1;do{t=!0;for(let e=0;e<this.#r.length;e++){let n=this.#r[e];typeof n==`object`&&(n.#x(),this.#m(n)?(t=!1,this.#_(n,e)):this.#p(n)?(t=!1,this.#g(n,e)):this.#y(n)&&(t=!1,this.#b(n)))}}while(!t&&++e<10)}else for(let e of this.#r)typeof e==`object`&&e.#x();this.#l=void 0}static fromGlob(t,n={}){let r=new e(null,void 0,n);return e.#f(t,r,0,n,0),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#c.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(){if(this.#e===this&&(this.#x(),this.#d()),!Tj(this)){let t=this.isStart()&&this.isEnd(),n=this.#r.map(n=>{let[r,i,a,o]=typeof n==`string`?e.#S(n,this.#t,t):n.toRegExpSource();return this.#t=this.#t||a,this.#n=this.#n||o,r}).join(``),r=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&RNe.has(this.#r[0]))){let e=LNe,t=this.#c.dot&&e.has(n.charAt(0))||n.startsWith(`\\.`)&&e.has(n.charAt(2))||n.startsWith(`\\.\\.`)&&e.has(n.charAt(4)),i=!this.#c.dot&&e.has(n.charAt(0));r=t?INe:i?Dj:``}let i=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(i=`(?:$|\\/)`),[r+n+i,Cj(n),this.#t=!!this.#t,this.#n]}let t=this.type===`!`?`(?:(?!(?:`:`(?:`,n=this.#r.map(e=>{if(typeof e==`string`)throw Error(`string type in extglob ast??`);let[t,n,r,i]=e.toRegExpSource();return this.#n=this.#n||i,t}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`);if(this.isStart()&&this.isEnd()&&!n&&this.type!==`!`){let e=this.toString(),t=this;return t.#r=[e],t.type=null,t.#t=void 0,[e,Cj(this.toString()),!1,!1]}let r=``;if(this.type===`!`&&this.#u)r=(this.isStart()&&!this.#c.dot?Dj:``)+Aj;else{let e=this.type===`!`?`))`+(this.isStart()&&!this.#c.dot?Dj:``)+kj+`)`:this.type===`@`?`)`:`)${this.type}`;r=t+n+e}return[r,Cj(n),this.#t=!!this.#t,this.#n]}static#S(e,t,n=!1){let r=!1,i=``,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e.charAt(s);if(c!==`*`&&(o=!1),r){r=!1,i+=(zNe.has(c)?`\\`:``)+c;continue}if(c===`\\`){s===e.length-1?i+=`\\\\`:r=!0;continue}if(c===`[`){let[n,r,o,c]=jNe(e,s);if(o){i+=n,a||=r,s+=o-1,t||=c;continue}}if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?Aj:kj,t=!0;continue}if(c===`?`){i+=Oj,t=!0;continue}i+=BNe(c)}return[i,Cj(e),!!t,a]}},VNe=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),Mj=(e,t,n={})=>(bj(t),!n.nocomment&&t.charAt(0)===`#`?!1:new Vj(t,n).match(e)),HNe=/^\*+([^+@!?\*\[\(]*)$/,UNe=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),WNe=e=>t=>t.endsWith(e),GNe=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),KNe=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),qNe=/^\*+\.\*+$/,JNe=e=>!e.startsWith(`.`)&&e.includes(`.`),YNe=e=>e!==`.`&&e!==`..`&&e.includes(`.`),XNe=/^\.\*+$/,ZNe=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),QNe=/^\*+$/,$Ne=e=>e.length!==0&&!e.startsWith(`.`),ePe=e=>e.length!==0&&e!==`.`&&e!==`..`,tPe=/^\?+([^+@!?\*\[\(]*)?$/,nPe=([e,t=``])=>{let n=Nj([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},rPe=([e,t=``])=>{let n=Pj([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},iPe=([e,t=``])=>{let n=Pj([e]);return t?e=>n(e)&&e.endsWith(t):n},aPe=([e,t=``])=>{let n=Nj([e]);return t?e=>n(e)&&e.endsWith(t):n},Nj=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},Pj=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},Fj=typeof process==`object`&&process?{}.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,Ij={win32:{sep:`\\`},posix:{sep:`/`}};Mj.sep=Fj===`win32`?Ij.win32.sep:Ij.posix.sep;var Lj=Symbol(`globstar **`);Mj.GLOBSTAR=Lj;var oPe=`[^/]*?`,sPe=`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`,cPe=`(?:(?!(?:\\/|^)\\.).)*?`;Mj.filter=(e,t={})=>n=>Mj(n,e,t);var Rj=(e,t={})=>Object.assign({},e,t);Mj.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return Mj;let t=Mj;return Object.assign((n,r,i={})=>t(n,r,Rj(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,Rj(e,n))}static defaults(n){return t.defaults(Rj(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n,r={}){super(t,n,Rj(e,r))}static fromGlob(n,r={}){return t.AST.fromGlob(n,Rj(e,r))}},unescape:(n,r={})=>t.unescape(n,Rj(e,r)),escape:(n,r={})=>t.escape(n,Rj(e,r)),filter:(n,r={})=>t.filter(n,Rj(e,r)),defaults:n=>t.defaults(Rj(e,n)),makeRe:(n,r={})=>t.makeRe(n,Rj(e,r)),braceExpand:(n,r={})=>t.braceExpand(n,Rj(e,r)),match:(n,r,i={})=>t.match(n,r,Rj(e,i)),sep:t.sep,GLOBSTAR:Lj})};var zj=(e,t={})=>(bj(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,DNe.default)(e));Mj.braceExpand=zj,Mj.makeRe=(e,t={})=>new Vj(e,t).makeRe(),Mj.match=(e,t,n={})=>{let r=new Vj(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};var Bj=/[?*]|[+@!]\(.*?\)|\[|\]/,lPe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),Vj=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){bj(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||Fj,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!Bj.test(e[2]))&&!Bj.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let n=0;n<e[t].length;n++)e[t][n]===`**`&&(e[t][n]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];n===1&&r===``&&e[0]===``||(r===`.`||r===``)&&(t=!0,e.splice(n,1),n--)}e[0]===`.`&&e.length===2&&(e[1]===`.`||e[1]===``)&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];e===1&&r===``&&n[0]===``||(r===`.`||r===``)&&(t=!0,n.splice(e,1),e--)}n[0]===`.`&&n.length===2&&(n[1]===`.`||n[1]===``)&&(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);r&&(e[t]=r,e[n]=[])}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let r=0,i=0;if(this.isWindows){let n=e[0]===``&&e[1]===``&&e[2]===`?`&&typeof e[3]==`string`&&/^[a-z]:$/i.test(e[3]),a=t[0]===``&&t[1]===``&&t[2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3]);if(n&&a){let n=e[3],a=t[3];n.toLowerCase()===a.toLowerCase()&&(e[3]=a,r=3,i=3)}else if(a&&typeof e[0]==`string`){let n=t[3],r=e[0];n.toLowerCase()===r.toLowerCase()&&(t[3]=r,i=3)}else if(n&&typeof t[0]==`string`){let n=e[3];n.toLowerCase()===t[0].toLowerCase()&&(t[0]=n,r=3)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(Lj)?this.#e(e,t,n,r,i):this.#n(e,t,n,r,i)}#e(e,t,n,r,i){let a=t.indexOf(Lj,i),o=t.lastIndexOf(Lj),[s,c,l]=n?[t.slice(i,a),t.slice(a+1),[]]:[t.slice(i,a),t.slice(a+1,o),t.slice(o+1)];if(s.length){let t=e.slice(r,r+s.length);if(!this.#n(t,s,n,0,0))return!1;r+=s.length}let u=0;if(l.length){if(l.length+r>e.length)return!1;let t=e.length-l.length;if(this.#n(e,l,n,t,0))u=l.length;else{if(e[e.length-1]!==``||r+l.length===e.length||(t--,!this.#n(e,l,n,t,0)))return!1;u=l.length+1}}if(!c.length){let t=!!u;for(let n=r;n<e.length-u;n++){let r=String(e[n]);if(t=!0,r===`.`||r===`..`||!this.options.dot&&r.startsWith(`.`))return!1}return n||t}let d=[[[],0]],f=d[0],p=0,m=[0];for(let e of c)e===Lj?(m.push(p),f=[[],0],d.push(f)):(f[0].push(e),p++);let h=d.length-1,g=e.length-u;for(let e of d)e[1]=g-(m[h--]+e[0].length);return!!this.#t(e,d,r,0,n,0,!!u)}#t(e,t,n,r,i,a,o){let s=t[r];if(!s){for(let t=n;t<e.length;t++){o=!0;let n=e[t];if(n===`.`||n===`..`||!this.options.dot&&n.startsWith(`.`))return!1}return o}let[c,l]=s;for(;n<=l;){if(this.#n(e.slice(0,n+c.length),c,i,n,0)&&a<this.maxGlobstarRecursion){let s=this.#t(e,t,n+c.length,r+1,i,a+1,o);if(s!==!1)return s}let s=e[n];if(s===`.`||s===`..`||!this.options.dot&&s.startsWith(`.`))return!1;n++}return i||null}#n(e,t,n,r,i){let a,o,s,c;for(a=r,o=i,c=e.length,s=t.length;a<c&&o<s;a++,o++){this.debug(`matchOne loop`);let n=t[o],r=e[a];if(this.debug(t,n,r),n===!1||n===Lj)return!1;let i;if(typeof n==`string`?(i=r===n,this.debug(`string match`,n,r,i)):(i=n.test(r),this.debug(`pattern match`,n,r,i)),!i)return!1}if(a===c&&o===s)return!0;if(a===c)return n;if(o===s)return a===c-1&&e[a]===``;throw Error(`wtf?`)}braceExpand(){return zj(this.pattern,this.options)}parse(e){bj(e);let t=this.options;if(e===`**`)return Lj;if(e===``)return``;let n,r=null;(n=e.match(QNe))?r=t.dot?ePe:$Ne:(n=e.match(HNe))?r=(t.nocase?t.dot?KNe:GNe:t.dot?WNe:UNe)(n[1]):(n=e.match(tPe))?r=(t.nocase?t.dot?rPe:nPe:t.dot?iPe:aPe)(n):(n=e.match(qNe))?r=t.dot?YNe:JNe:(n=e.match(XNe))&&(r=ZNe);let i=jj.fromGlob(e,this.options).toMMPattern();return r?Object.assign(i,{test:r}):i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?oPe:t.dot?sPe:cPe,r=new Set(t.nocase?[`i`]:[]),i=e.map(e=>{let t=e.map(e=>{if(e instanceof RegExp)for(let t of e.flags.split(``))r.add(t);return typeof e==`string`?lPe(e):e===Lj?Lj:e._src});return t.forEach((e,r)=>{let i=t[r+1],a=t[r-1];e!==Lj||a===Lj||(a===void 0?i!==void 0&&i!==Lj?t[r+1]=`(?:\\/|`+n+`\\/)?`+i:t[r]=n:i===void 0?t[r-1]=a+`(?:\\/|`+n+`)?`:i!==Lj&&(t[r-1]=a+`(?:\\/|\\/`+n+`\\/)`+i,t[r+1]=Lj))}),t.filter(e=>e!==Lj).join(`/`)}).join(`|`),[a,o]=e.length>1?[`(?:`,`)`]:[``,``];i=`^`+a+i+o+`$`,this.negate&&(i=`^(?!`+i+`).+$`);try{this.regexp=new RegExp(i,[...r].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^\/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e=0;e<i.length;e++){let o=i[e],s=r;if(n.matchBase&&o.length===1&&(s=[a]),this.matchOne(s,o,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return Mj.defaults(e).Minimatch}};Mj.AST=jj,Mj.Minimatch=Vj,Mj.escape=VNe,Mj.unescape=Cj;function Hj(e){let t=new Date;switch(e){case`7d`:t.setUTCDate(t.getUTCDate()-7);break;case`30d`:t.setUTCDate(t.getUTCDate()-30);break;case`3m`:t.setUTCMonth(t.getUTCMonth()-3);break}return t.toISOString()}async function Uj(e,t){let n=t.pageSize??30,{page:r,pageSize:i,order:a=`DESC`,orderBy:o=`periodStart`,...s}=t,{data:c,error:l}=await xv.GET(`/v3/metering/{bucketId}/billing/invoices`,{params:{path:{bucketId:e},query:{page:r,pageSize:n,expand:[`lines`],order:a,orderBy:o,...s}}});if(l||!c)throw l??Error(`Failed to load invoices`);return c}var uPe=15;async function dPe(e,t,n=6){let r=await Uj(e,{page:1,pageSize:n,createdAfter:Hj(`3m`),order:`DESC`,orderBy:`periodStart`,customers:[t]}),i=r.items??[];if(i.length===0||i.every(e=>e.customer?.id===t))return r;let a=[],o=1;for(;a.length<n&&o<=uPe;){let r=await Uj(e,{page:o,pageSize:30,createdAfter:Hj(`3m`),order:`DESC`,orderBy:`periodStart`}),i=r.items??[];if(i.length===0)break;for(let e of i)if(e.customer?.id===t&&(a.push(e),a.length>=n))break;let s=r.pageSize??30,c=Math.max(1,Math.ceil((r.totalCount??0)/s));if(o>=c)break;o++}let s=a.slice(0,n);return{...r,items:s,totalCount:s.length,page:1,pageSize:n}}var Wj={orderBy:`createdAt`,order:`DESC`},Gj=`/v3/metering/{bucketId}/plans`,fPe=`/v3/metering/{bucketId}/customers`;function pPe(e){if(!e)return;let t={};return e.page!=null&&(t.page=e.page,t.pageSize=e.pageSize??30),e.status?.length&&(t.status=e.status),Object.keys(t).length>0?t:void 0}function mPe(e,t){let n=pPe(t);return n?{params:{path:{bucketId:e},query:n}}:{params:{path:{bucketId:e}}}}function hPe(e){if(!e)return;let t={orderBy:e.orderBy??Wj.orderBy,order:e.order??Wj.order};return e.page!=null&&(t.page=e.page,t.pageSize=e.pageSize??30),e.planKey&&(t.planKey=e.planKey),e.name&&(t.name=e.name),e.key&&(t.key=e.key),e.primaryEmail&&(t.primaryEmail=e.primaryEmail),Object.keys(t).length>0?t:void 0}function gPe(e,t){let n=hPe(t);return n?{params:{path:{bucketId:e},query:n}}:{params:{path:{bucketId:e}}}}function _Pe(e){let t={page:e.page??1,pageSize:e.pageSize??30};return e.includeArchived!=null&&(t.includeArchived=e.includeArchived),t}function vPe(e,t,n){return Array.isArray(e)?{items:e,totalCount:e.length,page:t,pageSize:n}:e}var Kj={ai:{providerAssignments:{list:(e,t)=>Sv.queryOptions(`get`,`/v1/accounts/{accountName}/projects/{projectName}/ai-provider-assignments`,{params:{path:{accountName:e,projectName:t}}},{select:e=>e.data})}},deployments:{list:(e,t)=>Sv.queryOptions(`get`,`/v1/accounts/{accountName}/projects/{projectName}/deployments`,{params:{path:{accountName:e,projectName:t}}}),versions:{list:e=>Sv.queryOptions(`get`,`/v1/deployments/{deploymentName}/versions`,{params:{path:{deploymentName:e}}})}},mcp:{origins:{list:e=>Sv.queryOptions(`get`,`/v1/buckets/{bucketId}/mcp/configurations/{configurationId}/origins`,{params:{path:e}})},teams:{list:e=>Sv.queryOptions(`get`,`/v1/buckets/{bucketId}/mcp/configurations/teams`,{params:{path:e}})},server:{listTeams:e=>Sv.queryOptions(`get`,`/v1/buckets/{bucketId}/mcp/configurations/{configurationId}/servers/{virtualServerId}/teams`,{params:{path:e}})},servers:{list:e=>Sv.queryOptions(`get`,`/v1/buckets/{bucketId}/mcp/configurations/{configurationId}/servers`,{params:{path:e}})}},metering:{customers:{list:(e,t)=>Sv.queryOptions(`get`,fPe,gPe(e,t),t?.page==null?void 0:{placeholderData:tv}),get:(e,t)=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/customers/{customerIdOrKey}`,{params:{path:{bucketId:e,customerIdOrKey:t}}}),subscriptions:(e,t)=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/customers/{customerIdOrKey}/subscriptions`,{params:{path:{bucketId:e,customerIdOrKey:t}}})},plans:{list:(e,t)=>Sv.queryOptions(`get`,Gj,mPe(e,t),t?.page==null?void 0:{placeholderData:tv}),get:(e,t)=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/plans/{planId}`,{params:{path:{bucketId:e,planId:t}}}),listByKey:(e,t)=>Sv.queryOptions(`get`,Gj,{params:{path:{bucketId:e},query:{key:[t]}}})},meters:{list:e=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/meters`,{params:{path:{bucketId:e}}})},configuration:{get:e=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/monetization-configuration`,{params:{path:{bucketId:e}}})},features:{list:(e,t)=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/features`,{params:{path:{bucketId:e},query:t?{includeArchived:t}:void 0}},{select:e=>Array.isArray(e)?e:e.items}),listPaginated:(e,t)=>{let n=t.page??1,r=t.pageSize??30;return Sv.queryOptions(`get`,`/v3/metering/{bucketId}/features`,{params:{path:{bucketId:e},query:_Pe(t)}},{select:e=>vPe(e,n,r),placeholderData:tv})}},planInvites:{list:e=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/plan-invites`,{params:{path:{bucketId:e}}})},billingReadiness:{get:e=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/billing-readiness`,{params:{path:{bucketId:e}}})},stripe:{setup:e=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/setup/stripe`,{params:{path:{bucketId:e}}})},subscriptions:{get:(e,t)=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/subscriptions/{subscriptionId}`,{params:{path:{bucketId:e,subscriptionId:t}}}),access:(e,t)=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/subscriptions/{subscriptionId}/access`,{params:{path:{bucketId:e,subscriptionId:t}}})},invoices:{list:(e,t,n,r,i,a)=>({queryKey:[`metering`,e,`invoices`,t,n,r??`all`,a,i],queryFn:()=>Uj(e,{page:n,pageSize:30,createdAfter:Hj(t),order:i,orderBy:a,...r?.length?{statuses:r}:{}}),placeholderData:tv}),forCustomer:(e,t)=>({queryKey:[`metering`,e,`invoices`,`customer`,t],queryFn:()=>dPe(e,t)})}}},yPe=async e=>qj(e,await a(()=>import(`./editor.main-KLXktRFb.js`),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),qj=(e,t)=>{let n=e.split(`.`).pop();if(n)return t.languages.getLanguages().find(e=>e.extensions?.includes(`.${n}`))},Jj=e=>{let t=Object.entries(e).flatMap(([e,t])=>t?[[e,t]]:[]);return new URLSearchParams(t).toString()},X={user:{preferences:()=>({url:`${H}/v1/users/me/preferences`})},authApiKey:e=>({url:`${H}/v1/auth/api-keys/${e}`}),authAccountApiKeys:e=>({url:`${H}/v1/auth/api-keys?accountName=${e}`}),authCurrentUserAccountRoles:e=>({url:`${H}/v1/auth/users/me?accountName=${e}`}),authUserAccountRoles:(e,t)=>({url:`${H}/v1/auth/users/${t}?accountName=${e}`}),authProjectUsersRoles:(e,t,{includeInheritedRoles:n}={includeInheritedRoles:!1})=>({url:`${H}/v1/auth/users?accountName=${e}&projectName=${t}&includeInheritedRoles=${n}`}),authAccountUsersRoles:e=>({url:`${H}/v1/auth/users?accountName=${e}`}),mfaFactors:()=>({url:`${H}/v1/mfa/factors`}),accountMemberInviteDetails:e=>({url:`${H}/v1/account-member-invites/${e}`}),accountMemberInvites:e=>({url:`${H}/v1/accounts/${e}/account-member-invites`}),accountAuditLogs:(e,t)=>{let n=new URLSearchParams;t?.limit&&n.append(`limit`,t.limit.toString()),t?.offset&&n.append(`offset`,t.offset.toString()),t?.action&&n.append(`action`,t.action),t?.startDate&&n.append(`startDate`,t.startDate),t?.endDate&&n.append(`endDate`,t.endDate),t?.actor&&n.append(`actor`,t.actor),t?.success!==void 0&&n.append(`success`,t.success.toString());let r=n.toString();return{url:`${H}/v1/accounts/${e}/audit-logs${r?`?${r}`:``}`}},account:e=>({url:`${H}/v1/accounts/${e}`}),accounts:()=>({url:`${H}/v1/accounts`}),accountSourceControlRepoList:e=>({url:`${H}/v1/accounts/${e}/$repo-list`}),accountSourceControlAzureProjects:(e,t)=>({url:`${H}/v1/accounts/${e}/source-control/$azure-projects?organization=${t}`}),accountSourceControlNamespaces:e=>({url:`${H}/v1/accounts/${e}/$namespaces`}),accountSourceControlRepos:(e,t,n)=>({url:`${H}/v1/accounts/${e}/$repos?${new URLSearchParams({namespace:t,query:n??``})}`}),accountsSourceControlConfigurations:()=>({url:`${H}/v1/user/me/source-control-configs`}),accountUsageAnalyticsByDate:(e,t,n)=>({url:`${H}/v1/analytics/${e}/usage?from=${t}&to=${n}&version=2`}),billing:e=>({url:`${H}/v1/accounts/${e}/billings`}),buildLogs:(e,t)=>({url:`${H}/v2/deployments/${e}/build-logs/${t}`}),cdnContent:e=>({url:`${fi}${e}`}),chatIdentity:()=>({url:`${H}/v1/chat-identity`}),knockIdentity:()=>({url:`${H}/v1/knock-identity`}),bucketConfigurations:e=>({url:`${H}/v1/buckets/${e}/configurations`}),bucketConfigurationTeams:e=>({url:`${H}/v1/buckets/${e}/configurations/teams`}),bucketConfigurationApps:e=>({url:`${H}/v1/buckets/${e}/configurations/apps`}),bucketConfiguration:(e,t)=>({url:`${H}/v1/buckets/${e}/configurations/${t}`}),bucketConfigurationUsage:(e,t)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/usage`}),bucketConfigurationMembers:(e,t)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/members`}),bucketConfigurationMember:(e,t,n)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/members/${encodeURIComponent(n)}`}),supportedAiProviders:e=>({url:`${H}/v1/buckets/${e}/providers`}),aiProviderAssignments:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/ai-provider-assignments`}),hierarchicalQuota:e=>({url:`${H}/v1/hierarchical-quota/${e}`}),bucketConfigurationRequestCount:(e,t,n,r,i)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/request-count?${Jj({startDate:n,endDate:r,granularity:i})}`}),bucketConfigurationCostUsage:(e,t,n,r,i)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/cost-usage?${Jj({startDate:n,endDate:r,granularity:i})}`}),bucketConfigurationTokenUsage:(e,t,n,r,i,a)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/token-usage?${Jj({startDate:n,endDate:r,granularity:i,tokenType:a})}`}),bucketConfigurationTtfb:(e,t,n,r,i)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/ttfb?${Jj({startDate:n,endDate:r,granularity:i})}`}),bucketConfigurationBlocksErrorsWarnings:(e,t,n,r,i)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/blocks-errors-warnings?${Jj({startDate:n,endDate:r,granularity:i})}`}),consumer:(e,t)=>({url:`${H}/v1/api-keys/${e}/consumers/${t}`}),consumersForBucket:(e,t)=>{let n=Jj({limit:t?.limit?.toString(),offset:t?.offset?.toString(),name:t?.name,email:t?.email});return{url:`${H}/v1/api-keys/${e}/consumers${n?`?${n}`:``}`}},customDomains:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/custom-domains`}),accountCustomDomains:e=>({url:`${H}/v1/accounts/${e}/custom-domains`}),deploymentVersions:e=>({url:`${H}/v1/deployments/${e}/versions`}),environments:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/deployments`}),environmentVariables:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/environment-variables`}),file:(e,t)=>({url:`${H}/v1/deployments/${e}/fs/file?path=${t}`}),fsStats:e=>({url:`${H}/v1/deployments/${e}/fs/stats`}),gitBranches:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/$branches`}),projectSyncStatus:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/sync-status`}),maxRpsAnalytics:(e,t,n)=>{let r=Jj(n);return{url:`${H}/v2/deployments/${e}/analytics/max-rps?filter=${t}&limit=10${r?`&${r}`:``}`}},meteringBucket:(e,t)=>({url:`${H}/v1/metering/accounts/${e}/buckets/${t}/`}),meteringPlans:(e,t)=>({url:`${H}/v1/metering/accounts/${e}/buckets/${t}/plans`}),meteringSubscriptions:(e,t)=>({url:`${H}/v1/metering/accounts/${e}/buckets/${t}/subscriptions`}),meteringSubscriptionQuotas:(e,t,n)=>({url:`${H}/v1/metering/accounts/${e}/buckets/${t}/subscriptions/${n}/quotas`}),primaryAnalytics:(e,t)=>({url:`${H}/v2/deployments/${e}/analytics/metrics?filter=${t}`}),project:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}`}),projects:e=>({url:`${H}/v1/accounts/${e}/projects`}),permissions:(e,t)=>({url:`${H}/v1/permissions/${e}/${t}`}),permissionsProject:(e,t)=>({url:`${H}/v1/permissions/project/${e}|${t}`}),permissionsAiTeam:e=>({url:`${H}/v1/permissions/ai_team/${e}`}),logViewerRequests:(e,t)=>{let n=new URLSearchParams;return n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.cursor&&n.append(`cursor`,t.cursor),t.limit&&n.append(`limit`,t.limit.toString()),t.httpMethod&&n.append(`httpMethod`,t.httpMethod),t.httpStatus&&n.append(`httpStatus`,t.httpStatus),t.routePath&&n.append(`routePath`,t.routePath),t.search&&n.append(`search`,t.search),t.severity&&n.append(`severity`,t.severity),{url:`${H}/v2/deployments/${e}/logs/requests?${n}`}},logViewerRequestDetail:(e,t,n)=>{let r=new URLSearchParams;n&&r.append(`timestamp`,n);let i=r.toString();return{url:`${H}/v2/deployments/${e}/logs/requests/${t}${i?`?${i}`:``}`}},logViewerHistogram:(e,t)=>{let n=new URLSearchParams;return n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.intervalSeconds&&n.append(`intervalSeconds`,t.intervalSeconds.toString()),t.httpMethod&&n.append(`httpMethod`,t.httpMethod),t.httpStatus&&n.append(`httpStatus`,t.httpStatus),t.routePath&&n.append(`routePath`,t.routePath),t.search&&n.append(`search`,t.search),t.severity&&n.append(`severity`,t.severity),{url:`${H}/v2/deployments/${e}/logs/histogram?${n}`}},logViewerFacets:(e,t)=>{let n=new URLSearchParams;return n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.facets&&n.append(`facets`,t.facets),t.httpMethod&&n.append(`httpMethod`,t.httpMethod),t.httpStatus&&n.append(`httpStatus`,t.httpStatus),t.routePath&&n.append(`routePath`,t.routePath),t.search&&n.append(`search`,t.search),t.severity&&n.append(`severity`,t.severity),{url:`${H}/v2/deployments/${e}/logs/facets?${n}`}},logViewerRequestsScoped:(e,t)=>{let n=new URLSearchParams;return n.append(`account`,e.accountName),e.projectName&&n.append(`project`,e.projectName),e.deploymentName&&n.append(`deploymentName`,e.deploymentName),n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.cursor&&n.append(`cursor`,t.cursor),t.limit&&n.append(`limit`,t.limit.toString()),t.httpMethod&&n.append(`httpMethod`,t.httpMethod),t.httpStatus&&n.append(`httpStatus`,t.httpStatus),t.routePath&&n.append(`routePath`,t.routePath),t.search&&n.append(`search`,t.search),t.severity&&n.append(`severity`,t.severity),{url:`${H}/v2/logs/requests?${n}`}},logViewerRequestDetailScoped:(e,t,n)=>{let r=new URLSearchParams;return r.append(`account`,e.accountName),e.projectName&&r.append(`project`,e.projectName),e.deploymentName&&r.append(`deploymentName`,e.deploymentName),n&&r.append(`timestamp`,n),{url:`${H}/v2/logs/requests/${t}?${r}`}},logViewerHistogramScoped:(e,t)=>{let n=new URLSearchParams;return n.append(`account`,e.accountName),e.projectName&&n.append(`project`,e.projectName),e.deploymentName&&n.append(`deploymentName`,e.deploymentName),n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.intervalSeconds&&n.append(`intervalSeconds`,t.intervalSeconds.toString()),t.httpMethod&&n.append(`httpMethod`,t.httpMethod),t.httpStatus&&n.append(`httpStatus`,t.httpStatus),t.routePath&&n.append(`routePath`,t.routePath),t.search&&n.append(`search`,t.search),t.severity&&n.append(`severity`,t.severity),{url:`${H}/v2/logs/histogram?${n}`}},logViewerFacetsScoped:(e,t)=>{let n=new URLSearchParams;return n.append(`account`,e.accountName),e.projectName&&n.append(`project`,e.projectName),e.deploymentName&&n.append(`deploymentName`,e.deploymentName),n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.facets&&n.append(`facets`,t.facets),t.httpMethod&&n.append(`httpMethod`,t.httpMethod),t.httpStatus&&n.append(`httpStatus`,t.httpStatus),t.routePath&&n.append(`routePath`,t.routePath),t.search&&n.append(`search`,t.search),t.severity&&n.append(`severity`,t.severity),{url:`${H}/v2/logs/facets?${n}`}},tracesListScoped:(e,t)=>{let n=new URLSearchParams;return n.append(`account`,e.accountName),e.projectName&&n.append(`project`,e.projectName),e.deploymentName&&n.append(`deploymentName`,e.deploymentName),n.append(`start`,t.start),n.append(`end`,t.end),t.statusCode&&n.append(`statusCode`,t.statusCode),t.method&&n.append(`method`,t.method),t.route&&n.append(`route`,t.route),t.service&&n.append(`service`,t.service),t.hasError!==void 0&&n.append(`hasError`,String(t.hasError)),t.search&&n.append(`search`,t.search),t.limit&&n.append(`limit`,String(t.limit)),t.cursor&&n.append(`cursor`,t.cursor),{url:`${H}/v2/traces?${n}`}},traceDetailScoped:(e,t)=>{let n=new URLSearchParams;return n.append(`account`,e.accountName),e.projectName&&n.append(`project`,e.projectName),e.deploymentName&&n.append(`deploymentName`,e.deploymentName),{url:`${H}/v2/traces/${encodeURIComponent(t)}?${n}`}},traceStatsScoped:(e,t)=>{let n=new URLSearchParams;return n.append(`account`,e.accountName),e.projectName&&n.append(`project`,e.projectName),e.deploymentName&&n.append(`deploymentName`,e.deploymentName),n.append(`start`,t.start),n.append(`end`,t.end),t.intervalSeconds&&n.append(`intervalSeconds`,t.intervalSeconds.toString()),t.statusCode&&n.append(`statusCode`,t.statusCode),t.method&&n.append(`method`,t.method),t.route&&n.append(`route`,t.route),t.service&&n.append(`service`,t.service),t.hasError!==void 0&&n.append(`hasError`,String(t.hasError)),t.search&&n.append(`search`,t.search),{url:`${H}/v2/trace-stats?${n}`}},traceFacetsScoped:(e,t)=>{let n=new URLSearchParams;return n.append(`account`,e.accountName),e.projectName&&n.append(`project`,e.projectName),e.deploymentName&&n.append(`deploymentName`,e.deploymentName),n.append(`start`,t.start),n.append(`end`,t.end),t.facets&&n.append(`facets`,t.facets),t.statusCode&&n.append(`statusCode`,t.statusCode),t.method&&n.append(`method`,t.method),t.route&&n.append(`route`,t.route),t.service&&n.append(`service`,t.service),t.hasError!==void 0&&n.append(`hasError`,String(t.hasError)),t.search&&n.append(`search`,t.search),{url:`${H}/v2/trace-facets?${n}`}},topRpsAnalytics:(e,t,n,r)=>{let i=Jj(r);return{url:`${H}/v2/deployments/${e}/analytics/top-rps?filter=${t}${n?`&sortBy=${n}`:``}&limit=10${i?`&${i}`:``}`}},topRpsByIpAnalytics:(e,t,n,r)=>{let i=Jj(r);return{url:`${H}/v2/deployments/${e}/analytics/top-rps-by-ip?filter=${t}${n?`&sortBy=${n}`:``}&limit=10${i?`&${i}`:``}`}},topTenIpAddressesAnalytics:(e,t,n)=>{let r=Jj(n);return{url:`${H}/v2/deployments/${e}/analytics/top-ip-addresses?filter=${t}&limit=10${r?`&${r}`:``}`}},topTenLocationsAnalytics:(e,t,n)=>{let r=Jj(n);return{url:`${H}/v2/deployments/${e}/analytics/top-locations?filter=${t}&limit=10${r?`&${r}`:``}`}},topTenRoutesAnalytics:(e,t,n)=>{let r=Jj(n);return{url:`${H}/v2/deployments/${e}/analytics/top-routes?filter=${t}&limit=10${r?`&${r}`:``}`}},topTenSubsAnalytics:(e,t,n)=>{let r=Jj(n);return{url:`${H}/v2/deployments/${e}/analytics/top-subs?filter=${t}&limit=10${r?`&${r}`:``}`}},usersMe:()=>({url:`${H}/v1/users/me`}),identityConnections:e=>({url:`${H}/v1/accounts/${e}/identity-connections`}),identityConnectionTicket:e=>({url:`${H}/v1/accounts/${e}/identity-connections/ticket`}),mcpBucketConfigurations:e=>({url:`${H}/v1/buckets/${e}/mcp/configurations`}),mcpBucketConfigurationTeam:(e,t)=>({url:`${H}/v1/buckets/${e}/mcp/configurations/teams/${t}`}),mcpBucketConfigurationsTeams:e=>({url:`${H}/v1/buckets/${e}/mcp/configurations/teams`}),mcpGatewayIdpMetadata:(e,t)=>({url:`${H}/v1/buckets/${e}/mcp/${t}/idp-metadata`}),mcpGatewayOrigins:(e,t,n)=>{let r=new URLSearchParams;n?.limit&&r.append(`limit`,n.limit.toString()),n?.offset&&r.append(`offset`,n.offset.toString());let i=r.toString();return{url:`${H}/v1/buckets/${t}/mcp/configurations/${e}/origins${i?`?${i}`:``}`}},mcpGatewayOriginServer:(e,t,n)=>({url:`${H}/v1/buckets/${t}/mcp/configurations/${e}/origins/${n}`}),mcpGatewayVirtualServers:(e,t,n)=>{let r=new URLSearchParams;n?.limit&&r.append(`limit`,n.limit.toString()),n?.offset&&r.append(`offset`,n.offset.toString());let i=r.toString();return{url:`${H}/v1/buckets/${t}/mcp/configurations/${e}/servers${i?`?${i}`:``}`}},mcpGatewayVirtualServer:(e,t,n)=>({url:`${H}/v1/buckets/${t}/mcp/configurations/${e}/servers/${n}`}),mcpGatewayVirtualServerTools:(e,t,n)=>({url:`${H}/v1/buckets/${t}/mcp/configurations/${e}/servers/${n}/tools`}),analyticsRequests:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.intervalSeconds&&t.append(`intervalSeconds`,e.intervalSeconds.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return e.compare&&t.append(`compare`,`previous`),{url:`${H}/v2/analytics/requests?${t}`}},analyticsRequestsField:(e,t)=>{let n=new URLSearchParams;if(n.append(`account`,t.accountName),t.projectName&&n.append(`project`,t.projectName),n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.offset!=null&&n.append(`offset`,t.offset.toString()),t.limit!=null&&n.append(`limit`,t.limit.toString()),t.filters)for(let e of t.filters)n.append(`filter`,e);return{url:`${H}/v2/analytics/requests/fields/${e}?${n}`}},analyticsConsumers:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.offset!=null&&t.append(`offset`,e.offset.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/consumers?${t}`}},analyticsAgents:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.offset!=null&&t.append(`offset`,e.offset.toString()),e.includeOther===!0&&t.append(`includeOther`,`true`),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/agents?${t}`}},analyticsAgentsTimeSeries:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.includeOther===!0&&t.append(`includeOther`,`true`),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/agents/timeseries?${t}`}},analyticsBackend:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/backend?${t}`}},analyticsEdge:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/edge?${t}`}},analyticsAiGateway:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.intervalSeconds&&t.append(`intervalSeconds`,e.intervalSeconds.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/ai-gateway?${t}`}},analyticsAiGatewayField:(e,t)=>{let n=new URLSearchParams;if(n.append(`account`,t.accountName),t.projectName&&n.append(`project`,t.projectName),n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.offset!=null&&n.append(`offset`,t.offset.toString()),t.limit!=null&&n.append(`limit`,t.limit.toString()),t.filters)for(let e of t.filters)n.append(`filter`,e);return{url:`${H}/v2/analytics/ai-gateway/fields/${e}?${n}`}},analyticsAiGatewayTimeseries:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),t.append(`groupBy`,e.groupBy),e.intervalSeconds&&t.append(`intervalSeconds`,e.intervalSeconds.toString()),e.limitGroups&&t.append(`limitGroups`,e.limitGroups.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/ai-gateway/timeseries?${t}`}},analyticsMcp:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.intervalSeconds&&t.append(`intervalSeconds`,e.intervalSeconds.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/mcp?${t}`}},analyticsGraphql:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.intervalSeconds&&t.append(`intervalSeconds`,e.intervalSeconds.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/graphql?${t}`}},analyticsMcpField:(e,t)=>{let n=new URLSearchParams;if(n.append(`account`,t.accountName),t.projectName&&n.append(`project`,t.projectName),n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.offset!=null&&n.append(`offset`,t.offset.toString()),t.limit!=null&&n.append(`limit`,t.limit.toString()),t.filters)for(let e of t.filters)n.append(`filter`,e);return{url:`${H}/v2/analytics/mcp/fields/${e}?${n}`}},analyticsMcpCapabilities:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.view&&t.append(`view`,e.view),e.capabilityType&&t.append(`capabilityType`,e.capabilityType),e.limit&&t.append(`limit`,e.limit.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/mcp/capabilities?${t}`}},analyticsMcpEvents:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.offset!=null&&t.append(`offset`,e.offset.toString()),e.limit!=null&&t.append(`limit`,e.limit.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/mcp/events?${t}`}},analyticsMcpBreakdown:(e,t)=>{let n=new URLSearchParams;if(n.append(`account`,t.accountName),t.projectName&&n.append(`project`,t.projectName),n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.offset!=null&&n.append(`offset`,t.offset.toString()),t.limit!=null&&n.append(`limit`,t.limit.toString()),t.filters)for(let e of t.filters)n.append(`filter`,e);return{url:`${H}/v2/analytics/mcp/breakdowns/${e}?${n}`}},analyticsUsage:e=>{let t=new URLSearchParams;return t.append(`account`,e.accountName),t.append(`from`,e.from),t.append(`to`,e.to),{url:`${H}/v2/analytics/usage?${t}`}}},Yj={auth:{createApiKey:e=>({url:`${H}/v1/auth/api-keys`,method:`POST`,json:!0,body:JSON.stringify(e),invalidateKeys:[X.authAccountApiKeys(e.accountName)],acceptableStatuses:[200]}),deleteApiKey:(e,t)=>({url:`${H}/v1/auth/api-keys/${e}`,method:`DELETE`,invalidateKeys:[X.authApiKey(e),X.authAccountApiKeys(t)],acceptableStatuses:[204]}),updateUsersRole:({userId:e,accountName:t,projectName:n,role:r})=>({url:`${H}/v1/auth/users/${e}`,method:`PATCH`,json:!0,body:JSON.stringify({accountName:t,projectName:n,role:r}),parseResponse:!1,invalidateKeys:n?[X.authProjectUsersRoles(t,n,{includeInheritedRoles:!1}),X.authProjectUsersRoles(t,n,{includeInheritedRoles:!0}),X.authAccountUsersRoles(t)]:[X.authAccountUsersRoles(t)],acceptableStatuses:[201,200]})},accounts:{createAccount:e=>({url:`${H}/v1/accounts`,method:`POST`,json:!0,body:JSON.stringify(e),invalidateKeys:[X.accounts()],acceptableStatuses:[201]}),deleteAccount:e=>({url:`${H}/v1/accounts/${e.name}`,method:`DELETE`,invalidateKeys:[X.accounts()],acceptableStatuses:[200]}),createCustomDomain:({accountName:e,projectName:t,isAlias:n,hostname:r,deploymentName:i,stage:a})=>({url:`${H}/v1/accounts/${e}/custom-domains`,method:`POST`,body:JSON.stringify({hostname:r,isAlias:n,deploymentName:i,stage:a}),invalidateKeys:[X.accounts(),X.projects(e),X.environments(e,t),X.customDomains(e,t),Kj.deployments.list(e,t).queryKey],acceptableStatuses:[200]}),deleteAccountMemberInvite:({accountName:e,inviteId:t})=>({url:`${H}/v1/accounts/${e}/account-member-invites/${t}`,method:`DELETE`,invalidateKeys:[X.accountMemberInvites(e)],acceptableStatuses:[204]}),deleteCustomDomain:({accountName:e,projectName:t,hostname:n,deploymentName:r})=>({url:`${H}/v1/accounts/${e}/custom-domains?hostname=${n}&deploymentName=${r}`,method:`DELETE`,invalidateKeys:[X.accounts(),X.projects(e),X.environments(e,t),X.customDomains(e,t),Kj.deployments.list(e,t).queryKey],acceptableStatuses:[204]}),editCustomDomain:({accountName:e,projectName:t,hostname:n,deploymentName:r})=>({url:`${H}/v1/accounts/${e}/custom-domains`,method:`PATCH`,body:JSON.stringify({hostname:n,deploymentName:r}),invalidateKeys:[X.accounts(),X.projects(e),X.environments(e,t),X.customDomains(e,t),Kj.deployments.list(e,t).queryKey],acceptableStatuses:[200]}),resendAccountMemberInvite:({accountName:e,inviteId:t})=>({url:`${H}/v1/accounts/${e}/account-member-invites/${t}/$resend`,method:`PATCH`,body:JSON.stringify({}),invalidateKeys:[X.accountMemberInvites(e)],acceptableStatuses:[201]}),billingUpgrade:(e,t,n,r)=>({method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({successUrl:n,cancelUrl:r}),url:`${H}/v1/accounts/${e}/upgrade/${t}`}),updateAccount:({accountName:e,...t})=>({url:`${H}/v1/accounts/${e}`,method:`PATCH`,body:JSON.stringify(t),json:!0,invalidateKeys:[X.accounts()],acceptableStatuses:[200]})},ai:{createBucketConfiguration:(e,t)=>({url:`${H}/v1/buckets/${e}/configurations`,method:`POST`,json:!0,body:JSON.stringify(t),acceptableStatuses:[201,200],invalidateKeys:[X.bucketConfigurations(e),X.bucketConfigurationTeams(e)]}),updateBucketConfiguration:(e,t,n)=>({url:`${H}/v1/buckets/${e}/configurations/${t}`,method:`PATCH`,json:!0,body:JSON.stringify(n),acceptableStatuses:[200,201],invalidateKeys:[X.bucketConfigurationTeams(e),X.bucketConfiguration(e,t),X.bucketConfigurations(e)]}),deleteBucketConfiguration:(e,t)=>({url:`${H}/v1/buckets/${e}/configurations/${t}`,method:`DELETE`,acceptableStatuses:[204],invalidateKeys:[X.bucketConfigurations(e)]}),createBucketConfigurationMember:(e,t,n,r)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/members`,method:`POST`,json:!0,body:JSON.stringify({sub:n,role:r}),acceptableStatuses:[201,200],invalidateKeys:[X.bucketConfiguration(e,t),X.bucketConfigurationMembers(e,t)]}),putBucketConfigurationMemberRole:(e,t,n,r)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/members/${encodeURIComponent(n)}`,method:`PUT`,json:!0,body:JSON.stringify({role:r}),acceptableStatuses:[204,200],invalidateKeys:[X.bucketConfiguration(e,t),X.bucketConfigurationMembers(e,t),X.bucketConfigurationTeams(e)]}),deleteBucketConfigurationMember:(e,t,n)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/members/${encodeURIComponent(n)}`,method:`DELETE`,acceptableStatuses:[204],invalidateKeys:[X.bucketConfigurationMembers(e,t)]}),updateBucketConfigurationMember:(e,t,n,r)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/members/${encodeURIComponent(n)}`,method:`PATCH`,json:!0,body:JSON.stringify({role:r}),acceptableStatuses:[200],invalidateKeys:[X.bucketConfigurationMembers(e,t)]}),createBucketAiProvider:(e,{name:t,baseURL:n,label:r,description:i})=>({url:`${H}/v1/buckets/${e}/providers`,method:`POST`,json:!0,body:JSON.stringify({label:r,baseURL:n,name:t,description:i})}),createAiProviderModel:(e,t,{model:n,kind:r,inputCostPerToken:i,outputCostPerToken:a,status:o})=>({url:`${H}/v1/buckets/${e}/providers/${t}/models`,method:`POST`,json:!0,body:JSON.stringify({model:n,kind:r,inputCostPerToken:i,outputCostPerToken:a,status:o}),invalidateKeys:[X.supportedAiProviders(e)],acceptableStatuses:[200]}),createAiProviderAssignment:(e,t,n)=>({url:`${H}/v1/accounts/${e}/projects/${t}/ai-provider-assignments`,method:`POST`,body:JSON.stringify({...n,metadata:JSON.stringify(n.metadata)}),headers:{"content-type":`application/json`},invalidateKeys:[X.aiProviderAssignments(e,t)],acceptableStatuses:[201]}),updateAiProviderAssignment:(e,t,n,r)=>({url:`${H}/v1/accounts/${e}/projects/${t}/ai-provider-assignments/${n}`,method:`PATCH`,body:JSON.stringify({...r,...r.metadata?{metadata:JSON.stringify(r.metadata)}:{}}),headers:{"content-type":`application/json`},invalidateKeys:[X.aiProviderAssignments(e,t)],acceptableStatuses:[200]}),deleteAiProviderAssignment:(e,t,n)=>({url:`${H}/v1/accounts/${e}/projects/${t}/ai-provider-assignments/${n}`,method:`DELETE`,invalidateKeys:[X.aiProviderAssignments(e,t)],acceptableStatuses:[204]})},projects:{createProject:(e,t,{productType:n,...r}={})=>({url:`${H}/v1/accounts/${e}/projects`,method:`POST`,body:JSON.stringify({name:t,productType:n,options:r}),removeKeys:[X.projects(e)],acceptableStatuses:[201]}),createProjectWithRepo:(e,t,n,r,i)=>({url:`${H}/v1/accounts/${e}/projects/$create-with-repo`,method:`POST`,body:JSON.stringify({projectName:t,orgName:n,repositoryName:r,defaultBranch:i}),removeKeys:[X.projects(e)],acceptableStatuses:[201]}),createProjectFromRepo:(e,t,n,r)=>({url:`${H}/v1/accounts/${e}/projects/$create-from-repo`,method:`POST`,body:JSON.stringify({projectName:t,sourceRepoUrl:n,defaultBranch:r}),removeKeys:[X.projects(e)],acceptableStatuses:[201]}),createRepoFromProject:(e,t,n,r,i,a)=>({url:`${H}/v1/accounts/${e}/projects/${t}/$create-repo`,method:`POST`,body:JSON.stringify({orgName:n,repositoryName:r,defaultBranch:i,otherParams:a}),invalidateKeys:[X.projects(e),X.environments(e,t),Kj.deployments.list(e,t).queryKey],acceptableStatuses:[201]}),connectProjectToRepo:(e,t,n,r,i,a)=>({url:`${H}/v1/accounts/${e}/projects/${t}/$connect`,method:`PATCH`,body:JSON.stringify({orgName:n,repositoryURL:r,defaultBranch:i,forceConnect:a}),invalidateKeys:[X.projects(e),X.environments(e,t),Kj.deployments.list(e,t).queryKey],acceptableStatuses:[201]}),disconnectProjectFromRepo:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/$disconnect`,method:`POST`,body:JSON.stringify({}),invalidateKeys:[X.projects(e)],acceptableStatuses:[201]}),initProject:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/$init`,method:`POST`,body:JSON.stringify({}),invalidateKeys:[X.projects(e)],acceptableStatuses:[201]}),deleteProject:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}`,method:`DELETE`,invalidateKeys:[X.projects(e),Kj.deployments.list(e,t).queryKey],removeKeys:[X.environments(e,t)],acceptableStatuses:[204]}),archiveProject:e=>({url:`${H}/v1/deployments/${e}/archive`,method:`POST`,body:JSON.stringify({}),acceptableStatuses:[200]}),updateDefaultBranch:({accountName:e,projectName:t,defaultBranch:n,sourceRepoUrl:r})=>({url:`${H}/v1/accounts/${e}/projects/${t}/$update-default-branch`,method:`PATCH`,body:JSON.stringify({defaultBranch:n,sourceRepoUrl:r}),headers:{"content-type":`application/json`},invalidateKeys:[X.projects(e),Kj.deployments.list(e,t).queryKey],removeKeys:[X.environments(e,t)],acceptableStatuses:[200]})},consumers:{createConsumer:e=>{let t={...e.consumer,accountName:e.accountName,projectName:e.projectName,environmentType:e.environmentType};return{url:`${H}/v1/api-keys/${e.bucketId}/consumers`,method:`POST`,body:JSON.stringify(t),headers:{"content-type":`application/json`},invalidateKeys:[X.consumersForBucket(e.bucketId)],acceptableStatuses:[201]}},updateConsumer:e=>({url:`${H}/v1/api-keys/${e.bucketId}/consumers/${e.consumer.id}`,method:`PATCH`,body:JSON.stringify({...e.consumer}),headers:{"content-type":`application/json`},invalidateKeys:[X.consumersForBucket(e.bucketId)],acceptableStatuses:[200]}),removeConsumer:e=>({url:`${H}/v1/api-keys/${e.bucketId}/consumers/${e.consumer.id}`,method:`DELETE`,invalidateKeys:[X.consumersForBucket(e.bucketId)]})},environmentVariables:{updateEnvironmentVariable:e=>({url:`${H}/v1/accounts/${e.accountName}/projects/${e.projectName}/environment-variables/${e.variableData.id}`,method:`PATCH`,body:JSON.stringify(e.variableData),invalidateKeys:[X.environmentVariables(e.accountName,e.projectName)],acceptableStatuses:[200]}),createEnvironmentVariable:e=>({url:`${H}/v1/accounts/${e.accountName}/projects/${e.projectName}/environment-variables`,method:`POST`,body:JSON.stringify(e.variableData),invalidateKeys:[X.environmentVariables(e.accountName,e.projectName)],acceptableStatuses:[201]}),deleteEnvironmentVariable:e=>({url:`${H}/v1/accounts/${e.accountName}/projects/${e.projectName}/environment-variables/${e.id}`,method:`DELETE`,invalidateKeys:[X.environmentVariables(e.accountName,e.projectName)],acceptableStatuses:[204]})},users:{updatePreferences:e=>({url:`${H}/v1/users/me/preferences`,method:`PUT`,invalidateKeys:[X.user.preferences()],body:JSON.stringify({data:e}),headers:{"content-type":`application/json`},acceptableStatuses:[200]}),requestVerificationEmail:()=>({url:`${H}/v1/users/me/$send-verification-email`,method:`POST`,invalidateKeys:[],acceptableStatuses:[201]}),enrollMfaFactor:e=>({url:`${H}/v1/mfa/factors/enroll`,method:`POST`,body:JSON.stringify({factor:e}),invalidateKeys:[X.mfaFactors()],acceptableStatuses:[200],json:!0}),deleteMfaEnrollment:e=>({url:`${H}/v1/mfa/factors/enrollments/${e}`,method:`DELETE`,invalidateKeys:[X.mfaFactors()],acceptableStatuses:[200]})},sourceControlCredentials:{tokenExchangeSourceControlCredentials:(e,t,n)=>({url:`${H}/v1/accounts/${e}/source-control-configs/${t}/$token-exchange`,method:`POST`,body:JSON.stringify({code:n}),invalidateKeys:[X.accountsSourceControlConfigurations()],acceptableStatuses:[201]}),revokeSourceControlCredentials:(e,t)=>({url:`${H}/v1/accounts/${e}/source-control-configs/${t}/$revoke-token`,method:`DELETE`,invalidateKeys:[X.accountsSourceControlConfigurations()],acceptableStatuses:[204]})},sourceControlOperations:{commitPush:(e,t,n,r)=>({url:`${H}/v1/accounts/${e}/projects/${t}/$commit-push`,method:`POST`,body:JSON.stringify({branchName:r,commitMessage:n}),acceptableStatuses:[201]}),sync:(e,t,n)=>({url:`${H}/v1/accounts/${e}/projects/${t}/$sync`,method:`POST`,body:JSON.stringify({branchName:n}),acceptableStatuses:[201,200],invalidateKeys:[]})},testDesigner:{makeTestRequest:({environmentName:e,testRequest:t,overrideUrl:n})=>{let r={body:t.body,deployment:e,headers:t.headers,method:t.method,overrideUrl:n,path:t.pathname};return{url:`${li}/v1/test`,method:`POST`,body:JSON.stringify(r),acceptableStatuses:[200],headers:{"content-type":`application/json`}}}},featureRequest:{requestFeature:({email:e,featureName:t,information:n})=>{let r={featureName:t,information:{email:e,...n}};return{url:`${H}/v1/feature-access-request`,method:`POST`,body:JSON.stringify(r),acceptableStatuses:[200],headers:{"content-type":`application/json`}}}},fileTransactions:{saveFile:({environmentName:e,file:t})=>{let n={"content-type":`text/plain`};return t.lastModified&&(n[`if-unmodified-since`]=new Date(t.lastModified).toUTCString()),{url:`${H}/v1/deployments/${e}/fs/file?path=${t.path}`,method:`POST`,body:t.content,headers:n,acceptableStatuses:[204,200],invalidateKeys:[X.file(e,t.path),X.deploymentVersions(e),Kj.deployments.versions.list(e).queryKey]}},renameFile:({environmentName:e,path:t,newPath:n})=>({url:`${H}/v1/deployments/${e}/fs/file?path=${t}`,method:`PATCH`,body:JSON.stringify({newPath:n}),acceptableStatuses:[204,200],headers:{"content-type":`application/json`},invalidateKeys:[]}),saveMultipleFiles:async({environmentName:e,files:t})=>{let n=new FormData,r={};for(let e of t)if(e.lastModified){let t=`x-if-unmodified-since-${encodeURIComponent(e.path)}`;r[t]=new Date(e.lastModified).toUTCString()}for(let{content:e,path:r}of t){let t=(await yPe(r))?.id;n.append(`files[]`,new File([e??``],r,{type:t===`text/typescript`?`text/javascript`:t}),r)}let i=t.map(({path:t})=>X.file(e,t));return{url:`${H}/v1/deployments/${e}/fs/files`,method:`POST`,body:n,headers:r,acceptableStatuses:[204,200],invalidateKeys:[...i,X.deploymentVersions(e),Kj.deployments.versions.list(e).queryKey]}},deleteFile:({environmentName:e,filePath:t})=>({url:`${H}/v1/deployments/${e}/fs/delete?path=${t}`,method:`DELETE`,acceptableStatuses:[204,200]})},directories:{createDirectory:({environmentName:e,path:t})=>({url:`${H}/v1/deployments/${e}/fs/dir?path=${t}`,method:`POST`,body:JSON.stringify({}),acceptableStatuses:[201]})},environments:{redeploy:({environmentName:e,isWorkingCopy:t,version:n})=>({url:t?`${H}/v1/deployments/${e}/$redeploy`:`${H}/v1/deployments/${e}/versions/${n}/$redeploy`,method:`POST`,body:JSON.stringify({}),acceptableStatuses:[200],invalidateKeys:[X.deploymentVersions(e),Kj.deployments.versions.list(e).queryKey]}),delete:({environmentName:e})=>({url:`${H}/v1/deployments/${e}`,method:`DELETE`,body:JSON.stringify({}),acceptableStatuses:[200]})},accountInvite:{acceptAccountInvite:e=>({url:`${H}/v1/account-member-invites/${e}`,method:`POST`,body:JSON.stringify({}),invalidateKeys:[X.accounts()],acceptableStatuses:[201]}),createAccountInvite:(e,t,n)=>{let r=n?.project?.name?[X.authProjectUsersRoles(e,n.project.name),n.team?.id?X.bucketConfigurationMembers(n.team?.bucketId,n.team?.id):[],X.authProjectUsersRoles(e,n.project.name,{includeInheritedRoles:!1}),X.authProjectUsersRoles(e,n.project.name,{includeInheritedRoles:!0})].flat():[];return{url:`${H}/v1/accounts/${e}/account-member-invites`,method:`POST`,body:JSON.stringify({userEmail:t,metadata:n}),invalidateKeys:[X.accountMemberInvites(e),X.authAccountUsersRoles(e),...r],acceptableStatuses:[201]}}},identity:{chatIdentity:e=>({url:`${H}/v1/chat-identity`,method:`POST`,json:!0,headers:{"content-type":`application/json`},body:JSON.stringify(e),invalidateKeys:[X.chatIdentity()],acceptableStatuses:[200]})},metering:{createMeteringPlan:(e,t,n)=>({url:`${H}/v1/metering/accounts/${e}/buckets/${t}/plans`,method:`POST`,headers:{"Content-Type":`application/json`},invalidateKeys:[X.meteringPlans(e,t),X.meteringBucket(e,t)],body:JSON.stringify(n)}),deleteMeteringPlan:(e,t,n)=>({url:`${H}/v1/metering/accounts/${e}/buckets/${t}/plans/${n}`,invalidateKeys:[X.meteringPlans(e,t),X.meteringBucket(e,t)],method:`DELETE`}),updateMeteringPlan:(e,t,{id:n,...r})=>({url:`${H}/v1/metering/accounts/${e}/buckets/${t}/plans/${n}`,invalidateKeys:[X.meteringPlans(e,t),X.meteringBucket(e,t)],method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)})},mcpGateway:{deleteMcpTeam:(e,t)=>({url:`${H}/v1/buckets/${e}/mcp/configurations/teams/${t}`,method:`DELETE`,acceptableStatuses:[204],invalidateKeys:[X.mcpBucketConfigurationsTeams(e)]}),createMcpTeam:(e,t)=>({url:`${H}/v1/buckets/${e}/mcp/configurations/teams`,method:`POST`,json:!0,body:JSON.stringify(t),acceptableStatuses:[201,200],invalidateKeys:[X.mcpBucketConfigurationsTeams(e)]}),updateMcpTeam:(e,t,n)=>({url:`${H}/v1/buckets/${e}/mcp/configurations/teams/${t}`,method:`PATCH`,json:!0,body:JSON.stringify(n),acceptableStatuses:[201,200],invalidateKeys:[X.mcpBucketConfigurations(e),X.mcpBucketConfigurationsTeams(e),X.mcpBucketConfigurationTeam(e,t)]})},logs:{sourcemap:e=>({url:`${H}/v1/logs/sourcemap`,method:`POST`,json:!0,body:JSON.stringify(e),acceptableStatuses:[200]})},identityConnections:{createTicket:e=>({url:`${H}/v1/accounts/${e}/identity-connections/ticket`,method:`POST`,json:!0,body:JSON.stringify({}),invalidateKeys:[X.identityConnections(e)],acceptableStatuses:[200]})},migration:{migrateDevPortal:e=>({url:`${H}/v1/migrate/dev-portal`,method:`POST`,json:!1,body:JSON.stringify({deploymentName:e}),headers:{"content-type":`application/json`},acceptableStatuses:[200]})}},Xj=e=>{let t=mv(),n=z_(),r=Eae();return{fetch:async i=>{let a=bi(),o;try{o=await Uoe(t=>{let n=new Headers(i.headers);return i.json&&i.method!==`DELETE`&&n.set(`content-type`,`application/json`),n.set(`authorization`,`Bearer ${t}`),n.set(`zuplo-request-id`,a),fetch(i.url,{...e,method:i.method,headers:n,body:i.body})},n,r)}catch(e){throw e instanceof si&&e.setTraceId(a),e instanceof TypeError?new oi({type:`https://zup.fail/api-request-failed`,title:`API request failed`,status:500,instance:i.url,traceId:a}):e}if(!(i.acceptableStatuses??[200]).includes(o.status)){let e=new si(`Unexpected response: ${o.status} calling ${i.method}: ${i.url}`,{traceId:a});throw await e.tryReadResponse(o),e}return i.invalidateKeys?.forEach(e=>{if(Array.isArray(e))t.invalidateQueries({queryKey:e,exact:!1});else if(`url`in e&&e.url){let n=e.url.split(`?`)[0];t.invalidateQueries({predicate:e=>{let t=e.queryKey[0];return typeof t==`string`&&t.split(`?`)[0]===n}})}}),i.removeKeys?.forEach(e=>{t.removeQueries({queryKey:[e.url]})}),i.parseResponse===!1?o:i.json?await o.json():o}}},bPe=()=>{let e=Xj();return bv({mutationFn:async t=>await e.fetch(Yj.directories.createDirectory(t))})},xPe=`API request failed`;async function Zj(e,t,n={}){let{text:r,extractData:i}=n;if(!e||typeof e!=`string`)throw new oi({type:`https://zup.fail/missing-url`,title:`Missing URL`});let a=bi(),o;try{o=await Uoe(t=>{let n=new Request(e);return n.headers.set(`authorization`,`Bearer ${t}`),n.headers.set(`zuplo-request-id`,a),fetch(n)},t,()=>{wi().then(({handleLogout:e})=>e())})}catch(t){throw t instanceof TypeError?new oi({type:`https://zup.fail/api-request-failed`,title:xPe,instance:e,traceId:a},{cause:t}):(t instanceof si&&t.setTraceId(a),t)}if(!o.ok){let e=new si(`Error while making request. Please try again or contact support if the problem persists.`,{traceId:a});throw await e.tryReadResponse(o),e}try{let e=r?await o.clone().text():await o.clone().json();return i?e.data:e}catch(t){let n=await o.clone().text();throw M_.captureException(t,{message:`Failed to parse response of ${e} to JSON`,responseText:n,status:o.status,traceId:a,requestUrl:e}),t}}function SPe(e,t={}){let n=z_();return zoe({queries:e.map(e=>({queryKey:[e.url,t.extractData],queryFn:()=>Zj(e.url,n,t)}))})}function Qj(e,{text:t,extractData:n=!0,...r}={}){let i=z_();return yv({queryKey:[e.url,n],queryFn:async({queryKey:e})=>{let[r]=e;return Zj(r,i,{text:t,extractData:n})},...r})}function $j(e,{enabled:t,text:n,extractData:r,...i}={}){let a=z_();return vv({enabled:t,queryKey:[e.url,r],queryFn:async({queryKey:e})=>{let[t]=e;return Zj(t,a,{text:n,extractData:r})},...i})}var eM={".ts":`typescript`,".tsx":`typescript`,".js":`javascript`,".jsx":`javascript`,".mjs":`javascript`,".cjs":`javascript`,".json":`json`,".html":`html`,".htm":`html`,".xml":`xml`,".svg":`xml`,".yaml":`yaml`,".yml":`yaml`,".md":`markdown`,".mdx":`markdown`,".css":`css`,".scss":`scss`,".sass":`sass`,".less":`less`,".py":`python`,".rs":`rust`,".go":`go`,".java":`java`,".c":`c`,".cpp":`cpp`,".cs":`csharp`,".php":`php`,".rb":`ruby`,".sh":`shell`,".bash":`shell`,".zsh":`shell`,".sql":`sql`,".graphql":`graphql`,".gql":`graphql`,".env":`plaintext`,".toml":`toml`,".ini":`ini`,".properties":`properties`,".dockerfile":`dockerfile`,Dockerfile:`dockerfile`,".makefile":`makefile`,Makefile:`makefile`};function tM(e){let t=e.split(`/`).pop()||``;if(eM[t])return eM[t];let n=t.lastIndexOf(`.`);return n===-1?`plaintext`:eM[t.slice(n)]||`plaintext`}var CPe=(e,t,n)=>$j(X.file(e,t),{...n,text:!0,select:e=>({content:e,contentType:`text/plain`,language:tM(t),path:t})}),nM=()=>{let e=Xj();return bv({mutationFn:async t=>{let n=await e.fetch({...Yj.fileTransactions.saveFile(t),parseResponse:!1}),r=n.headers.get(`Last-Modified`),i=r?new Date(r).getTime():void 0;return{...await n.json(),lastModified:i}}})},rM=e=>{let t=Xj();return bv({mutationFn:async e=>{if(!e.environmentName||!e.files)throw Error(`No environment name or files provided`);return await(await t.fetch(await Yj.fileTransactions.saveMultipleFiles(e))).json()},mutationKey:rM.mutationKey,...e})};rM.mutationKey=[`saveStatus`];var wPe=()=>{let e=Xj();return bv({mutationFn:async t=>await e.fetch(Yj.fileTransactions.deleteFile(t))})},TPe=()=>{let e=Xj();return bv({mutationFn:async t=>await e.fetch(Yj.fileTransactions.renameFile(t))})},iM=null,aM=null;function EPe(){return aM??=a(()=>import(`./editor.main-KLXktRFb.js`).then(e=>(iM=e,e)),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),aM}function oM(){let[e,t]=(0,g.useState)(iM);return(0,g.useEffect)(()=>{if(iM){t(iM);return}let e=!0;return EPe().then(n=>{e&&t(n)}),()=>{e=!1}},[]),e}function sM(e,t,n){let r=(0,g.useRef)(!1);(0,g.useEffect)(()=>{if(!e)return;if(!r.current){r.current=!0;return}let i=requestAnimationFrame(()=>{if(n.current)try{e.editor.setTheme(t)}catch{}});return()=>cancelAnimationFrame(i)},[e,t,n])}var cM={display:`flex`,position:`relative`,textAlign:`initial`};function DPe({value:e,defaultValue:t,language:n,defaultLanguage:r,path:i,theme:a=`vs`,line:o,options:s={},overrideServices:c,onChange:l,onMount:u,beforeMount:d,className:f,width:p=`100%`,height:m=`100%`,keepCurrentModel:h=!1,wrapperProps:_}){let v=oM(),y=(0,g.useRef)(null),b=(0,g.useRef)(null),x=(0,g.useRef)(l);x.current=l;let S=(0,g.useRef)(h);S.current=h;let C=(0,g.useRef)(!1);return(0,g.useEffect)(()=>{if(!v)return;let l=y.current;if(!l)return;d?.(v);let f=i?v.Uri.parse(i):void 0,p=f&&v.editor.getModel(f)||v.editor.createModel(e??t??``,n??r,f),m=v.editor.create(l,{...s,model:p,theme:a},c);b.current=m,o!=null&&m.revealLine(o);let h=m.onDidChangeModelContent(e=>{C.current||x.current?.(m.getValue(),e)});return u?.(m,v),()=>{h.dispose();let e=m.getModel();m.dispose(),S.current||e?.dispose(),b.current=null}},[v]),(0,g.useEffect)(()=>{let t=b.current;if(!t||e===void 0)return;let n=t.getModel();!n||e===n.getValue()||(C.current=!0,t.executeEdits(``,[{range:n.getFullModelRange(),text:e,forceMoveMarkers:!0}]),t.pushUndoStop(),C.current=!1)},[e]),(0,g.useEffect)(()=>{let e=b.current?.getModel();v&&e&&n&&v.editor.setModelLanguage(e,n)},[v,n]),sM(v,a,b),(0,g.useEffect)(()=>{b.current?.updateOptions(s)},[s]),(0,g.useEffect)(()=>{o!=null&&b.current?.revealLine(o)},[o]),(0,U.jsx)(`section`,{..._,style:{...cM,width:p,height:m},children:(0,U.jsx)(`div`,{ref:y,className:f,style:{width:`100%`}})})}function OPe({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,theme:a=`vs`,options:o={},onMount:s,beforeMount:c,className:l,width:u=`100%`,height:d=`100%`,keepCurrentOriginalModel:f=!1,keepCurrentModifiedModel:p=!1,wrapperProps:m}){let h=oM(),_=(0,g.useRef)(null),v=(0,g.useRef)(null),y=(0,g.useRef)(f);y.current=f;let b=(0,g.useRef)(p);return b.current=p,(0,g.useEffect)(()=>{if(!h)return;let l=_.current;if(!l)return;c?.(h);let u=h.editor.createDiffEditor(l,{...o,theme:a});return v.current=u,u.setModel({original:h.editor.createModel(e??``,r??n),modified:h.editor.createModel(t??``,i??n)}),s?.(u,h),()=>{let e=u.getModel();u.dispose(),y.current||e?.original.dispose(),b.current||e?.modified.dispose(),v.current=null}},[h]),(0,g.useEffect)(()=>{let t=v.current?.getModel();t&&e!=null&&e!==t.original.getValue()&&t.original.setValue(e)},[e]),(0,g.useEffect)(()=>{let e=v.current?.getModel();e&&t!=null&&t!==e.modified.getValue()&&e.modified.setValue(t)},[t]),sM(h,a,v),(0,U.jsx)(`section`,{...m,style:{...cM,width:u,height:d},children:(0,U.jsx)(`div`,{ref:_,className:l,style:{width:`100%`}})})}var lM=(e=[])=>{let t=On(),n=Object.keys(t);if(e.some(e=>!n.includes(e)))throw Error(`${e.join(`, `)} are required`);return t};function uM(e,t){let n=t.map(e=>e.fileGlob),r=t.flatMap(e=>{let t=[e.folderName];return e.subdirectoryGlob?t.concat(e.subdirectoryGlob):t});return e.filter(e=>e.type===Zr.Directory&&r.some(t=>Mj(e.path,t))?!0:n.find(t=>Mj(e.path,t))!==void 0)}function kPe(e,t){return(0,g.useCallback)(async()=>uM(await ki(t,`/`),e),[t,e])}function dM(){let{logEvent:e}=I_(),t=yM(),n=wu(),r=Cu(e=>e.showSaveConflict);return rM({onMutate:({files:e})=>{e.forEach(e=>{t({...e,saveState:Qr.saving})})},onSuccess:async(e,{files:n})=>{n.forEach(n=>{let r=e.files?.[n.path];_.default.debug(`Updated ${n.path} after save - lastModified: ${r}`),t({...n,lastModified:r,saveState:Qr.unmodified})})},onError:(i,{files:a})=>{if(i instanceof Error&&`status`in i&&i.status===412){let e=i;if(e.instance)try{let t=JSON.parse(e.instance).conflictedFiles;t&&t.length>0&&r(t[0])}catch(e){_.default.error(`Failed to parse conflict error instance data`,e)}return}a.forEach(e=>{t({...e,saveState:Qr.modified})}),e(`file-save-failed`,{fileNames:n.map(e=>e.path).join(`, `)})}})}function fM(){let e=gu(),{logEvent:t,captureException:n}=I_(),r=vM(),i=yM(),a=wPe(),{isReadOnly:o}=_j(),{execute:s}=hj(async s=>{if(o)return{success:!1,error:Error(`Unable to delete file - environment is read-only`)};let c=s.saveState;i({...s,saveState:Qr.removing});try{return await a.mutateAsync({environmentName:e.environment.name,filePath:s.path}),r(s.path),t(`file-deleted`,{fileName:s.path,account:e.account.name,project:e.project.name,environment:e.environment.name}),{success:!0}}catch(r){return t(`file-deletion-failed`,{account:e.account.name,project:e.project.name,environment:e.environment.name}),n(r),i({...s,saveState:c}),{success:!1,error:r}}});return s}function pM(){let e=oM(),{logEvent:t,captureException:n}=I_(),r=yM(),i=Cu(e=>e.projectTreeNodes),a=nM(),o=gu([`account`,`project`,`environment`]),{execute:s}=hj(async(s,c,l,u,d)=>{if(!e)return;let f=l??u.defaultFileTemplate,p=u.createExtensions[f],m=`${c}/${!p||s.toLowerCase().endsWith(`.${p}`)||s===u.predefinedTemplateFilename?.[f]?s:`${s}.${p}`}`,h=(l&&u.newFileTemplates[l]?.trimStart())??d??``,g=i.find(e=>e.path===m);if(g)return g;if(i.length===0){let e=(await ki(o.environment.name,c).catch(()=>[])).find(e=>e.path===m);if(e)return e}let _={content:h,path:m},v={saveState:Qr.new,type:Zr.File,..._};try{r(v),e.editor.createModel(_.content??``,void 0,e.Uri.file(m));let n=await a.mutateAsync({environmentName:o.environment.name,file:_,accountName:o.account.name,projectName:o.project.name});return r({...v,lastModified:n.lastModified,saveState:Qr.unmodified}),t(`file-added`,{account:o.account.name,project:o.project.name,environment:o.environment.name,fileName:v.path,strategy:u.name}),_}catch(e){t(`file-creation-failed`,{environment:o.environment.name}),n(e),r({...v,saveState:Qr.modified});return}});return s}function APe(e){let t=oM(),{logEvent:n,captureException:r}=I_(),i=lM([`account`,`project`]),a=yM(),o=vM(),s=TPe(),{execute:c}=hj(async(c,l)=>{if(t)try{a({...c,saveState:Qr.removing}),await s.mutateAsync({environmentName:e,path:c.path,newPath:l}),a({...c,saveState:Qr.new,path:l}),t.editor.createModel(c.content??``,void 0,t.Uri.file(l));let r=t.editor.getModel(t.Uri.file(c.path));a({...c,path:l}),r?.dispose(),o(c.path),n(`file-renamed`,{fileName:c.path,environment:e})}catch(t){n(`file-rename-failed`,{account:i.account,project:i.project,environment:e}),r(t),a({...c,saveState:Qr.unmodified});return}});return c}function jPe(e){let t=oM(),{logEvent:n,captureException:r}=I_(),i=yM(),a=bPe(),{execute:o}=hj(async(o,s,c)=>{if(!t)return Error(`Failed to acquire monaco instance. Please refresh the page.`);let l=`${s}/${o}`,u={path:l},d={saveState:Qr.new,type:Zr.Directory,...u};try{return i(d),await a.mutateAsync({environmentName:e,path:l}),i({...d,saveState:Qr.unmodified}),n(`directory-added`,{fileName:d.path,strategy:c.name,environment:e}),u}catch(t){return n(`directory-creation-failed`,{environment:e}),r(t),i({...d,saveState:Qr.modified}),t}});return o}function mM(){return gM(vj().get(`path`))}function hM(){let e=oM(),t=yM();return(0,g.useCallback)((n,r=!1,i=Qr.modified)=>{if(t({...n,saveState:i}),r&&e){let t=e.editor.getModel(e.Uri.file(n.path));t&&t.setValue(n.content??``)}},[e,t])}function gM(e){return Cu(t=>e?t.filesByPath[e]:void 0)}function MPe(e){let t=Cu(e=>e.projectTreeNodes),n=[],r=Object.values(e);return t.filter(e=>e.type===Zr.Directory).forEach(e=>{let t=r.find(t=>t.folderName===e.path);if(t)return n.push(t)}),r.sort((e,t)=>e.order-t.order)}function _M(e){return Cu(e=>e.projectTreeNodes).filter(t=>!t.path&&!e.fileGlob?!1:t.type===Zr.Directory&&e.subdirectoryGlob?Mj(t.path,e.subdirectoryGlob):Mj(t.path,e.fileGlob))}function vM(){let e=oM(),t=Cu(e=>e.removeFile),n=Cu(e=>e.filterProjectTreeNodes);return r=>{e&&e.editor.getModel(e.Uri.file(r))?.dispose(),t(r),n(e=>e.path!==r)}}function yM(){return Cu(e=>e.updateFile)}var NPe=e=>{let t=hM(),n=gM(e);return e=>{n&&t(n,!0,e)}};function bM(e,t){return[...e.slice(0,t),...e.slice(t+1)]}function xM(e){return`$import(${e})`}function PPe(e){let t=e.split(`/`).pop();return t?t.replace(`.ts`,``):``}function SM(e,t){let n=/\$import\((.*?)\)/g.exec(e);if(!n||n.length!==2)return`INVALID IMPORT STATEMENT`;let r=n[1];return t!==void 0&&r.indexOf(t)===0?r.substring(t.length):r}var CM=e=>{let t=``;switch(e){case`GITLAB`:t=`GitLab`;break;case`GITHUB`:t=`GitHub`;break;case`BITBUCKET`:t=`Bitbucket`;break;case`AZURE`:t=`Azure DevOps`;break;default:t=e;break}return t},FPe=(e,t)=>{let n=t.accounts.filter(t=>t.name===e),r;if(n[0].sourceControlConfigurations&&n[0].sourceControlConfigurations.length>0)r=n[0].sourceControlConfigurations[0];else{let e=t.global.filter(e=>e.provider===n[0].sourceControlProvider);r=e.length>0?e[0]:null}return r};function wM(e){if(!e)return``;if(typeof e==`object`){if(e instanceof si)return e.detail??e.title??e.message;if(`message`in e)return e.message}return typeof e==`string`?e:``}var TM=({error:e,size:t=24})=>{switch(e.status){case 401:return(0,U.jsx)(bl,{size:t});case 403:return(0,U.jsx)(wee,{size:t});case 404:return(0,U.jsx)(Cc,{size:t});default:return(0,U.jsx)(Ac,{size:t})}},IPe=({error:e})=>(0,U.jsx)(`div`,{className:`flex items-center gap-2 rounded-full border-2 border-neutral-100 bg-neutral-50 text-neutral-300 p-4`,children:(0,U.jsx)(TM,{error:e})}),LPe=({error:e})=>{switch(e.status){case 401:return(0,U.jsx)(nE,{href:`https://zuplo.com/docs/articles/accounts/managing-account-members`,children:`Learn more about Managing Account Members`});default:return null}},RPe=({error:e,title:t=`Unable to access`,children:n,className:r,variant:i=`default`})=>(0,U.jsxs)(AC,{variant:i,className:W(`w-full flex items-center gap-8`,r),children:[(0,U.jsx)(IPe,{error:e}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(jC,{children:t}),(0,U.jsxs)(MC,{className:`flex flex-col gap-2`,children:[wM(e),(0,U.jsx)(LPe,{error:e}),n]})]})]}),EM=({successMessage:e}={})=>{let t=mu();return{onSuccess:n=>{t.success(n??e,{icon:(0,U.jsx)(wc,{size:18})})},onError:e=>t.error(wM(e),{icon:e instanceof si?(0,U.jsx)(TM,{error:e,size:18}):(0,U.jsx)(Ac,{size:18})})}},DM=(e,t,n)=>vv({...Kj.deployments.list(e,t),...n,select:e=>e.data}),OM=(e,t={})=>Boe({...Kj.deployments.versions.list(e),...t,select:e=>({...e,data:e.data?.map(e=>({...e,stages:[...e.stages].sort((e,t)=>e.stage.localeCompare(t.stage))}))})}),kM=(e,t={})=>yv(OM(e,t)),zPe=()=>{let e=gu(),t=dM(),n=wu();return kM(e.environment.name),{isPending:t.isPending,isSuccess:t.isSuccess,saveAndDeploy:(0,g.useCallback)(async()=>t.mutateAsync({environmentName:e.environment.name,accountName:e.account.name,projectName:e.project.name,files:n}).catch(e=>{if(!(e instanceof Error&&`status`in e&&e.status===409))throw e}),[t,n,!1,e.environment.name,e.account.name,e.project.name])}},BPe=(e={})=>{let{isReadOnly:t=!1,onSave:n}=e,{saveAndDeploy:r,isPending:i,isSuccess:a}=zPe(),[o,s]=(0,g.useState)(null),c=Cu(e=>{let t=0;for(let n of e.projectTreeNodes){let r=n.path?e.filesByPath[n.path]:void 0;r&&r.saveState===Qr.modified&&t++}return t}),l=Cu(e=>{let t=0;for(let n of e.projectTreeNodes){let r=n.path?e.filesByPath[n.path]:void 0;r&&(r.saveState===Qr.modified||r.saveState===Qr.saving)&&t++}return t}),u=(0,g.useRef)(null),d=e=>{s(e),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{s(null)},1600)},f=mj(r),p=mj(n),m=pu(e=>e.addToast),h=(0,g.useRef)(!1),v=(0,g.useRef)(!1);return(0,g.useEffect)(()=>{let e=h.current;!e&&i?v.current=l>0:e&&!i&&a&&v.current&&(m({message:`Changes saved`,icon:(0,g.createElement)(wc,{size:18}),duration:2e3}),v.current=!1),h.current=i},[i,a,l,m]),(0,g.useEffect)(()=>{let e=async e=>{try{if(e.code===`KeyS`&&(e.metaKey||e.ctrlKey)){if(e.preventDefault(),t){d(`Read only environment`);return}let n=document.activeElement;if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement){let e=n.selectionEnd;n.blur(),n.focus(),(n instanceof HTMLInputElement&&n.type!==`checkbox`||n instanceof HTMLTextAreaElement)&&n.setSelectionRange(e,e),await CNe(100)}if(c===0){d(`No unsaved changes`);return}p.current?.(),await f.current()}}catch(e){_.default.error(`Error saving files:`,e),s(`Error saving files`)}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[t,c,f,p]),{showTooltip:o,isSaving:i,unsavedChangesCount:c,saveAll:r}},VPe=()=>{let{showTooltip:e,saveAll:t,isSaving:n,unsavedChangesCount:r}=BPe(),{hasEditor:i,editorName:a,isLoading:o,showPreferenceDialog:s,setShowPreferenceDialog:c,availableEditors:l,savePreference:u,openInEditor:d}=SNe();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`sticky bottom-0 h-12 border-t bg-surface-sunken items-center flex px-2 gap-x-2`,children:[(0,U.jsx)(sA,{open:!!e,content:e??``,children:(0,U.jsx)(Y,{variant:r>0||n?`default`:`ghost`,size:`sm`,className:`text-xs`,"data-test":`save`,disabled:n,onClick:async()=>{await t()},children:(0,U.jsxs)(lA,{className:`flex items-center gap-1 text-xs relative`,loading:n,children:[`Save`,(0,U.jsx)(`span`,{className:r>0?`text-white`:`text-muted-foreground`,children:`[⌘+S]`})]})})}),!o&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`h-6 w-px bg-border`}),(0,U.jsx)(sA,{content:i?`Open in ${a}`:`Choose editor to open files`,children:(0,U.jsxs)(Y,{variant:`ghost`,size:`sm`,onClick:d,className:`text-xs`,children:[(0,U.jsx)(Yc,{size:14}),`Open in Editor`]})})]})]}),(0,U.jsx)(xNe,{open:s,editors:l,onSelect:u,onCancel:()=>c(!1)})]})},AM=(0,g.createContext)(null);AM.displayName=`PanelGroupContext`;var jM={group:`data-panel-group`,groupDirection:`data-panel-group-direction`,groupId:`data-panel-group-id`,panel:`data-panel`,panelCollapsible:`data-panel-collapsible`,panelId:`data-panel-id`,panelSize:`data-panel-size`,resizeHandle:`data-resize-handle`,resizeHandleActive:`data-resize-handle-active`,resizeHandleEnabled:`data-panel-resize-handle-enabled`,resizeHandleId:`data-panel-resize-handle-id`,resizeHandleState:`data-resize-handle-state`},MM=10,NM=g.useLayoutEffect,PM=g.useId,HPe=typeof PM==`function`?PM:()=>null,UPe=0;function FM(e=null){let t=HPe(),n=(0,g.useRef)(e||t||null);return n.current===null&&(n.current=``+ UPe++),e??n.current}function IM({children:e,className:t=``,collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:a,id:o,maxSize:s,minSize:c,onCollapse:l,onExpand:u,onResize:d,order:f,style:p,tagName:m=`div`,...h}){let _=(0,g.useContext)(AM);if(_===null)throw Error(`Panel components must be rendered within a PanelGroup container`);let{collapsePanel:v,expandPanel:y,getPanelSize:b,getPanelStyle:x,groupId:S,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:T,resizePanel:E,unregisterPanel:D}=_,O=FM(o),k=(0,g.useRef)({callbacks:{onCollapse:l,onExpand:u,onResize:d},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:s,minSize:c},id:O,idIsFromProps:o!==void 0,order:f});(0,g.useRef)({didLogMissingDefaultSizeWarning:!1}),NM(()=>{let{callbacks:e,constraints:t}=k.current,a={...t};k.current.id=O,k.current.idIsFromProps=o!==void 0,k.current.order=f,e.onCollapse=l,e.onExpand=u,e.onResize=d,t.collapsedSize=n,t.collapsible=r,t.defaultSize=i,t.maxSize=s,t.minSize=c,(a.collapsedSize!==t.collapsedSize||a.collapsible!==t.collapsible||a.maxSize!==t.maxSize||a.minSize!==t.minSize)&&w(k.current,a)}),NM(()=>{let e=k.current;return T(e),()=>{D(e)}},[f,O,T,D]),(0,g.useImperativeHandle)(a,()=>({collapse:()=>{v(k.current)},expand:e=>{y(k.current,e)},getId(){return O},getSize(){return b(k.current)},isCollapsed(){return C(k.current)},isExpanded(){return!C(k.current)},resize:e=>{E(k.current,e)}}),[v,y,b,C,O,E]);let A=x(k.current,i);return(0,g.createElement)(m,{...h,children:e,className:t,id:O,style:{...A,...p},[jM.groupId]:S,[jM.panel]:``,[jM.panelCollapsible]:r||void 0,[jM.panelId]:O,[jM.panelSize]:parseFloat(``+A.flexGrow).toFixed(1)})}var LM=(0,g.forwardRef)((e,t)=>(0,g.createElement)(IM,{...e,forwardedRef:t}));IM.displayName=`Panel`,LM.displayName=`forwardRef(Panel)`;var WPe;function GPe(){return WPe}var RM=null,KPe=!0,zM=-1,BM=null;function qPe(e,t){if(t){let e=(t&XM)!==0,n=(t&ZM)!==0,r=(t&QM)!==0,i=(t&$M)!==0;if(e)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}switch(e){case`horizontal`:return`ew-resize`;case`intersection`:return`move`;case`vertical`:return`ns-resize`}}function JPe(){BM!==null&&(document.head.removeChild(BM),RM=null,BM=null,zM=-1)}function VM(e,t){if(!KPe)return;let n=qPe(e,t);if(RM!==n){if(RM=n,BM===null){BM=document.createElement(`style`);let e=GPe();e&&BM.setAttribute(`nonce`,e),document.head.appendChild(BM)}if(zM>=0){var r;(r=BM.sheet)==null||r.removeRule(zM)}zM=BM.sheet?.insertRule(`*{cursor: ${n} !important;}`)??-1}}function HM(e){return e.type===`keydown`}function UM(e){return e.type.startsWith(`pointer`)}function WM(e){return e.type.startsWith(`mouse`)}function GM(e){if(UM(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(WM(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function YPe(){if(typeof matchMedia==`function`)return matchMedia(`(pointer:coarse)`).matches?`coarse`:`fine`}function XPe(e,t,n){return n?e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y:e.x<=t.x+t.width&&e.x+e.width>=t.x&&e.y<=t.y+t.height&&e.y+e.height>=t.y}function ZPe(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:JM(e),b:JM(t)},r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;mN(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:qM(KM(n.a)),b:qM(KM(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var QPe=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function $Pe(e){let t=getComputedStyle(YM(e)??e).display;return t===`flex`||t===`inline-flex`}function eFe(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||$Pe(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||QPe.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function KM(e){let t=e.length;for(;t--;){let n=e[t];if(mN(n,`Missing node`),eFe(n))return n}return null}function qM(e){return e&&Number(getComputedStyle(e).zIndex)||0}function JM(e){let t=[];for(;e;)t.push(e),e=YM(e);return t}function YM(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}var XM=1,ZM=2,QM=4,$M=8,tFe=YPe()===`coarse`,eN=[],tN=!1,nN=new Map,rN=new Map,iN=new Set;function nFe(e,t,n,r,i){let{ownerDocument:a}=t,o={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:i},s=nN.get(a)??0;return nN.set(a,s+1),iN.add(o),fN(),function(){rN.delete(e),iN.delete(o);let t=nN.get(a)??1;if(nN.set(a,t-1),fN(),t===1&&nN.delete(a),eN.includes(o)){let e=eN.indexOf(o);e>=0&&eN.splice(e,1),uN(),i(`up`,!0,null)}}}function rFe(e){let{target:t}=e,{x:n,y:r}=GM(e);tN=!0,cN({target:t,x:n,y:r}),fN(),eN.length>0&&(pN(`down`,e),e.preventDefault(),sN(t)||e.stopImmediatePropagation())}function aN(e){let{x:t,y:n}=GM(e);if(tN&&e.buttons===0&&(tN=!1,pN(`up`,e)),!tN){let{target:r}=e;cN({target:r,x:t,y:n})}pN(`move`,e),uN(),eN.length>0&&e.preventDefault()}function oN(e){let{target:t}=e,{x:n,y:r}=GM(e);rN.clear(),tN=!1,eN.length>0&&(e.preventDefault(),sN(t)||e.stopImmediatePropagation()),pN(`up`,e),cN({target:t,x:n,y:r}),uN(),fN()}function sN(e){let t=e;for(;t;){if(t.hasAttribute(jM.resizeHandle))return!0;t=t.parentElement}return!1}function cN({target:e,x:t,y:n}){eN.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),iN.forEach(e=>{let{element:i,hitAreaMargins:a}=e,o=i.getBoundingClientRect(),{bottom:s,left:c,right:l,top:u}=o,d=tFe?a.coarse:a.fine;if(t>=c-d&&t<=l+d&&n>=u-d&&n<=s+d){if(r!==null&&document.contains(r)&&i!==r&&!i.contains(r)&&!r.contains(i)&&ZPe(r,i)>0){let e=r,t=!1;for(;e&&!e.contains(i);){if(XPe(e.getBoundingClientRect(),o,!0)){t=!0;break}e=e.parentElement}if(t)return}eN.push(e)}})}function lN(e,t){rN.set(e,t)}function uN(){let e=!1,t=!1;eN.forEach(n=>{let{direction:r}=n;r===`horizontal`?e=!0:t=!0});let n=0;rN.forEach(e=>{n|=e}),e&&t?VM(`intersection`,n):e?VM(`horizontal`,n):t?VM(`vertical`,n):JPe()}var dN=new AbortController;function fN(){dN.abort(),dN=new AbortController;let e={capture:!0,signal:dN.signal};iN.size&&(tN?(eN.length>0&&nN.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`contextmenu`,oN,e),r.addEventListener(`pointerleave`,aN,e),r.addEventListener(`pointermove`,aN,e))}),window.addEventListener(`pointerup`,oN,e),window.addEventListener(`pointercancel`,oN,e)):nN.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`pointerdown`,rFe,e),r.addEventListener(`pointermove`,aN,e))}))}function pN(e,t){iN.forEach(n=>{let{setResizeHandlerState:r}=n;r(e,eN.includes(n),t)})}function iFe(){let[e,t]=(0,g.useState)(0);return(0,g.useCallback)(()=>t(e=>e+1),[])}function mN(e,t){if(!e)throw console.error(t),Error(t)}function hN(e,t,n=MM){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function gN(e,t,n=MM){return hN(e,t,n)===0}function _N(e,t,n){return hN(e,t,n)===0}function aFe(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],a=t[r];if(!_N(i,a,n))return!1}return!0}function vN({panelConstraints:e,panelIndex:t,size:n}){let r=e[t];mN(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,maxSize:o=100,minSize:s=0}=r;if(hN(n,s)<0)if(a){let e=(i+s)/2;n=hN(n,e)<0?i:s}else n=s;return n=Math.min(o,n),n=parseFloat(n.toFixed(MM)),n}function yN({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(_N(e,0))return t;let o=[...t],[s,c]=r;mN(s!=null,`Invalid first pivot index`),mN(c!=null,`Invalid second pivot index`);let l=0;if(a===`keyboard`){{let r=e<0?c:s,i=n[r];mN(i,`Panel constraints not found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(mN(n!=null,`Previous layout not found for panel index ${r}`),_N(n,a)){let t=l-n;hN(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let r=e<0?s:c,i=n[r];mN(i,`No panel constraints found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(mN(n!=null,`Previous layout not found for panel index ${r}`),_N(n,l)){let t=n-a;hN(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let r=e<0?1:-1,i=e<0?c:s,a=0;for(;;){let e=t[i];mN(e!=null,`Previous layout not found for panel index ${i}`);let o=vN({panelConstraints:n,panelIndex:i,size:100})-e;if(a+=o,i+=r,i<0||i>=n.length)break}let o=Math.min(Math.abs(e),Math.abs(a));e=e<0?0-o:o}{let r=e<0?s:c;for(;r>=0&&r<n.length;){let i=Math.abs(e)-Math.abs(l),a=t[r];mN(a!=null,`Previous layout not found for panel index ${r}`);let s=a-i,c=vN({panelConstraints:n,panelIndex:r,size:s});if(!_N(a,c)&&(l+=a-c,o[r]=c,l.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?r--:r++}}if(aFe(i,o))return i;{let r=e<0?c:s,i=t[r];mN(i!=null,`Previous layout not found for panel index ${r}`);let a=i+l,u=vN({panelConstraints:n,panelIndex:r,size:a});if(o[r]=u,!_N(u,a)){let t=a-u,r=e<0?c:s;for(;r>=0&&r<n.length;){let i=o[r];mN(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=vN({panelConstraints:n,panelIndex:r,size:a});if(_N(i,s)||(t-=s-i,o[r]=s),_N(t,0))break;e>0?r--:r++}}}return _N(o.reduce((e,t)=>t+e,0),100)?o:i}function oFe({layout:e,panelsArray:t,pivotIndices:n}){let r=0,i=100,a=0,o=0,s=n[0];return mN(s!=null,`No pivot index found`),t.forEach((e,t)=>{let{constraints:n}=e,{maxSize:c=100,minSize:l=0}=n;t===s?(r=l,i=c):(a+=l,o+=c)}),{valueMax:Math.min(i,100-a),valueMin:Math.max(r,100-o),valueNow:e[s]}}function bN(e,t=document){return Array.from(t.querySelectorAll(`[${jM.resizeHandleId}][data-panel-group-id="${e}"]`))}function xN(e,t,n=document){return bN(e,n).findIndex(e=>e.getAttribute(jM.resizeHandleId)===t)??null}function SN(e,t,n){let r=xN(e,t,n);return r==null?[-1,-1]:[r,r+1]}function CN(e,t=document){return t instanceof HTMLElement&&t?.dataset?.panelGroupId==e?t:t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`)||null}function wN(e,t=document){return t.querySelector(`[${jM.resizeHandleId}="${e}"]`)||null}function sFe(e,t,n,r=document){let i=wN(t,r),a=bN(e,r),o=i?a.indexOf(i):-1;return[n[o]?.id??null,n[o+1]?.id??null]}function cFe({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:i,panelGroupElement:a,setLayout:o}){(0,g.useRef)({didWarnAboutMissingResizeHandle:!1}),NM(()=>{if(!a)return;let e=bN(n,a);for(let t=0;t<i.length-1;t++){let{valueMax:n,valueMin:a,valueNow:o}=oFe({layout:r,panelsArray:i,pivotIndices:[t,t+1]}),s=e[t];if(s!=null){let e=i[t];mN(e,`No panel data found for index "${t}"`),s.setAttribute(`aria-controls`,e.id),s.setAttribute(`aria-valuemax`,``+Math.round(n)),s.setAttribute(`aria-valuemin`,``+Math.round(a)),s.setAttribute(`aria-valuenow`,o==null?``:``+Math.round(o))}}return()=>{e.forEach((e,t)=>{e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-valuemax`),e.removeAttribute(`aria-valuemin`),e.removeAttribute(`aria-valuenow`)})}},[n,r,i,a]),(0,g.useEffect)(()=>{if(!a)return;let e=t.current;mN(e,`Eager values not found`);let{panelDataArray:i}=e;mN(CN(n,a)!=null,`No group found for id "${n}"`);let s=bN(n,a);mN(s,`No resize handles found for group id "${n}"`);let c=s.map(e=>{let t=e.getAttribute(jM.resizeHandleId);mN(t,`Resize handle element has no handle id attribute`);let[s,c]=sFe(n,t,i,a);if(s==null||c==null)return()=>{};let l=e=>{if(!e.defaultPrevented)switch(e.key){case`Enter`:{e.preventDefault();let c=i.findIndex(e=>e.id===s);if(c>=0){let e=i[c];mN(e,`No panel data found for index ${c}`);let s=r[c],{collapsedSize:l=0,collapsible:u,minSize:d=0}=e.constraints;if(s!=null&&u){let e=yN({delta:_N(s,l)?d-l:l-s,initialLayout:r,panelConstraints:i.map(e=>e.constraints),pivotIndices:SN(n,t,a),prevLayout:r,trigger:`keyboard`});r!==e&&o(e)}}break}}};return e.addEventListener(`keydown`,l),()=>{e.removeEventListener(`keydown`,l)}});return()=>{c.forEach(e=>e())}},[a,e,t,n,r,i,o])}function TN(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function EN(e,t){let n=e===`horizontal`,{x:r,y:i}=GM(t);return n?r:i}function lFe(e,t,n,r,i){let a=n===`horizontal`,o=wN(t,i);mN(o,`No resize handle element found for id "${t}"`);let s=o.getAttribute(jM.groupId);mN(s,`Resize handle element has no group id attribute`);let{initialCursorPosition:c}=r,l=EN(n,e),u=CN(s,i);mN(u,`No group element found for id "${s}"`);let d=u.getBoundingClientRect(),f=a?d.width:d.height;return(l-c)/f*100}function uFe(e,t,n,r,i,a){if(HM(e)){let t=n===`horizontal`,r=0;r=e.shiftKey?100:i??10;let a=0;switch(e.key){case`ArrowDown`:a=t?0:r;break;case`ArrowLeft`:a=t?-r:0;break;case`ArrowRight`:a=t?r:0;break;case`ArrowUp`:a=t?0:-r;break;case`End`:a=100;break;case`Home`:a=-100;break}return a}else return r==null?0:lFe(e,t,n,r,a)}function dFe({panelDataArray:e}){let t=Array(e.length),n=e.map(e=>e.constraints),r=0,i=100;for(let a=0;a<e.length;a++){let e=n[a];mN(e,`Panel constraints not found for index ${a}`);let{defaultSize:o}=e;o!=null&&(r++,t[a]=o,i-=o)}for(let a=0;a<e.length;a++){let o=n[a];mN(o,`Panel constraints not found for index ${a}`);let{defaultSize:s}=o;if(s!=null)continue;let c=e.length-r,l=i/c;r++,t[a]=l,i-=l}return t}function DN(e,t,n){t.forEach((t,r)=>{let i=e[r];mN(i,`Panel data not found for index ${r}`);let{callbacks:a,constraints:o,id:s}=i,{collapsedSize:c=0,collapsible:l}=o,u=n[s];if(u==null||t!==u){n[s]=t;let{onCollapse:e,onExpand:r,onResize:i}=a;i&&i(t,u),l&&(e||r)&&(r&&(u==null||gN(u,c))&&!gN(t,c)&&r(),e&&(u==null||!gN(u,c))&&gN(t,c)&&e())}})}function ON(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function fFe({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:i,precision:a=3}){let o=n[i],s;return s=o==null?e==null?`1`:e.toPrecision(a):r.length===1?`1`:o.toPrecision(a),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:`hidden`,pointerEvents:t===null?void 0:`none`}}function pFe(e,t=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function kN(e){try{if(typeof localStorage<`u`)e.getItem=e=>localStorage.getItem(e),e.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw Error(`localStorage not supported in this environment`)}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function AN(e){return`react-resizable-panels:${e}`}function jN(e){return e.map(e=>{let{constraints:t,id:n,idIsFromProps:r,order:i}=e;return r?n:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(`,`)}function MN(e,t){try{let n=AN(e),r=t.getItem(n);if(r){let e=JSON.parse(r);if(typeof e==`object`&&e)return e}}catch{}return null}function mFe(e,t,n){return(MN(e,n)??{})[jN(t)]??null}function hFe(e,t,n,r,i){let a=AN(e),o=jN(t),s=MN(e,i)??{};s[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(s))}catch(e){console.error(e)}}function NN({layout:e,panelConstraints:t}){let n=[...e],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(e=>`${e}%`).join(`, `)}`);if(!_N(r,100)&&n.length>0)for(let e=0;e<t.length;e++){let t=n[e];mN(t!=null,`No layout data found for index ${e}`),n[e]=100/r*t}let i=0;for(let e=0;e<t.length;e++){let r=n[e];mN(r!=null,`No layout data found for index ${e}`);let a=vN({panelConstraints:t,panelIndex:e,size:r});r!=a&&(i+=r-a,n[e]=a)}if(!_N(i,0))for(let e=0;e<t.length;e++){let r=n[e];mN(r!=null,`No layout data found for index ${e}`);let a=r+i,o=vN({panelConstraints:t,panelIndex:e,size:a});if(r!==o&&(i-=o-r,n[e]=o,_N(i,0)))break}return n}var gFe=100,PN={getItem:e=>(kN(PN),PN.getItem(e)),setItem:(e,t)=>{kN(PN),PN.setItem(e,t)}},FN={};function IN({autoSaveId:e=null,children:t,className:n=``,direction:r,forwardedRef:i,id:a=null,onLayout:o=null,keyboardResizeBy:s=null,storage:c=PN,style:l,tagName:u=`div`,...d}){let f=FM(a),p=(0,g.useRef)(null),[m,h]=(0,g.useState)(null),[_,v]=(0,g.useState)([]),y=iFe(),b=(0,g.useRef)({}),x=(0,g.useRef)(new Map),S=(0,g.useRef)(0),C=(0,g.useRef)({autoSaveId:e,direction:r,dragState:m,id:f,keyboardResizeBy:s,onLayout:o,storage:c}),w=(0,g.useRef)({layout:_,panelDataArray:[],panelDataArrayChanged:!1});(0,g.useRef)({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),(0,g.useImperativeHandle)(i,()=>({getId:()=>C.current.id,getLayout:()=>{let{layout:e}=w.current;return e},setLayout:e=>{let{onLayout:t}=C.current,{layout:n,panelDataArray:r}=w.current,i=NN({layout:e,panelConstraints:r.map(e=>e.constraints)});TN(n,i)||(v(i),w.current.layout=i,t&&t(i),DN(r,i,b.current))}}),[]),NM(()=>{C.current.autoSaveId=e,C.current.direction=r,C.current.dragState=m,C.current.id=f,C.current.onLayout=o,C.current.storage=c}),cFe({committedValuesRef:C,eagerValuesRef:w,groupId:f,layout:_,panelDataArray:w.current.panelDataArray,setLayout:v,panelGroupElement:p.current}),(0,g.useEffect)(()=>{let{panelDataArray:t}=w.current;if(e){if(_.length===0||_.length!==t.length)return;let n=FN[e];n??(n=pFe(hFe,gFe),FN[e]=n);let r=[...t],i=new Map(x.current);n(e,r,i,_,c)}},[e,_,c]),(0,g.useEffect)(()=>{});let T=(0,g.useCallback)(e=>{let{onLayout:t}=C.current,{layout:n,panelDataArray:r}=w.current;if(e.constraints.collapsible){let i=r.map(e=>e.constraints),{collapsedSize:a=0,panelSize:o,pivotIndices:s}=zN(r,e,n);if(mN(o!=null,`Panel size not found for panel "${e.id}"`),!gN(o,a)){x.current.set(e.id,o);let c=yN({delta:RN(r,e)===r.length-1?o-a:a-o,initialLayout:n,panelConstraints:i,pivotIndices:s,prevLayout:n,trigger:`imperative-api`});ON(n,c)||(v(c),w.current.layout=c,t&&t(c),DN(r,c,b.current))}}},[]),E=(0,g.useCallback)((e,t)=>{let{onLayout:n}=C.current,{layout:r,panelDataArray:i}=w.current;if(e.constraints.collapsible){let a=i.map(e=>e.constraints),{collapsedSize:o=0,panelSize:s=0,minSize:c=0,pivotIndices:l}=zN(i,e,r),u=t??c;if(gN(s,o)){let t=x.current.get(e.id),o=t!=null&&t>=u?t:u,c=yN({delta:RN(i,e)===i.length-1?s-o:o-s,initialLayout:r,panelConstraints:a,pivotIndices:l,prevLayout:r,trigger:`imperative-api`});ON(r,c)||(v(c),w.current.layout=c,n&&n(c),DN(i,c,b.current))}}},[]),D=(0,g.useCallback)(e=>{let{layout:t,panelDataArray:n}=w.current,{panelSize:r}=zN(n,e,t);return mN(r!=null,`Panel size not found for panel "${e.id}"`),r},[]),O=(0,g.useCallback)((e,t)=>{let{panelDataArray:n}=w.current;return fFe({defaultSize:t,dragState:m,layout:_,panelData:n,panelIndex:RN(n,e)})},[m,_]),k=(0,g.useCallback)(e=>{let{layout:t,panelDataArray:n}=w.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=zN(n,e,t);return mN(a!=null,`Panel size not found for panel "${e.id}"`),i===!0&&gN(a,r)},[]),A=(0,g.useCallback)(e=>{let{layout:t,panelDataArray:n}=w.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=zN(n,e,t);return mN(a!=null,`Panel size not found for panel "${e.id}"`),!i||hN(a,r)>0},[]),j=(0,g.useCallback)(e=>{let{panelDataArray:t}=w.current;t.push(e),t.sort((e,t)=>{let n=e.order,r=t.order;return n==null&&r==null?0:n==null?-1:r==null?1:n-r}),w.current.panelDataArrayChanged=!0,y()},[y]);NM(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;let{autoSaveId:e,onLayout:t,storage:n}=C.current,{layout:r,panelDataArray:i}=w.current,a=null;if(e){let t=mFe(e,i,n);t&&(x.current=new Map(Object.entries(t.expandToSizes)),a=t.layout)}a??=dFe({panelDataArray:i});let o=NN({layout:a,panelConstraints:i.map(e=>e.constraints)});TN(r,o)||(v(o),w.current.layout=o,t&&t(o),DN(i,o,b.current))}}),NM(()=>{let e=w.current;return()=>{e.layout=[]}},[]);let M=(0,g.useCallback)(e=>{let t=!1,n=p.current;return n&&window.getComputedStyle(n,null).getPropertyValue(`direction`)===`rtl`&&(t=!0),function(n){n.preventDefault();let r=p.current;if(!r)return()=>null;let{direction:i,dragState:a,id:o,keyboardResizeBy:s,onLayout:c}=C.current,{layout:l,panelDataArray:u}=w.current,{initialLayout:d}=a??{},f=SN(o,e,r),m=uFe(n,e,i,a,s,r),h=i===`horizontal`;h&&t&&(m=-m);let g=u.map(e=>e.constraints),_=yN({delta:m,initialLayout:d??l,panelConstraints:g,pivotIndices:f,prevLayout:l,trigger:HM(n)?`keyboard`:`mouse-or-touch`}),y=!ON(l,_);(UM(n)||WM(n))&&S.current!=m&&(S.current=m,!y&&m!==0?h?lN(e,m<0?XM:ZM):lN(e,m<0?QM:$M):lN(e,0)),y&&(v(_),w.current.layout=_,c&&c(_),DN(u,_,b.current))}},[]),N=(0,g.useCallback)((e,t)=>{let{onLayout:n}=C.current,{layout:r,panelDataArray:i}=w.current,a=i.map(e=>e.constraints),{panelSize:o,pivotIndices:s}=zN(i,e,r);mN(o!=null,`Panel size not found for panel "${e.id}"`);let c=yN({delta:RN(i,e)===i.length-1?o-t:t-o,initialLayout:r,panelConstraints:a,pivotIndices:s,prevLayout:r,trigger:`imperative-api`});ON(r,c)||(v(c),w.current.layout=c,n&&n(c),DN(i,c,b.current))},[]),P=(0,g.useCallback)((e,t)=>{let{layout:n,panelDataArray:r}=w.current,{collapsedSize:i=0,collapsible:a}=t,{collapsedSize:o=0,collapsible:s,maxSize:c=100,minSize:l=0}=e.constraints,{panelSize:u}=zN(r,e,n);u!=null&&(a&&s&&gN(u,i)?gN(i,o)||N(e,o):u<l?N(e,l):u>c&&N(e,c))},[N]),F=(0,g.useCallback)((e,t)=>{let{direction:n}=C.current,{layout:r}=w.current;if(!p.current)return;let i=wN(e,p.current);mN(i,`Drag handle element not found for id "${e}"`);let a=EN(n,t);h({dragHandleId:e,dragHandleRect:i.getBoundingClientRect(),initialCursorPosition:a,initialLayout:r})},[]),I=(0,g.useCallback)(()=>{h(null)},[]),L=(0,g.useCallback)(e=>{let{panelDataArray:t}=w.current,n=RN(t,e);n>=0&&(t.splice(n,1),delete b.current[e.id],w.current.panelDataArrayChanged=!0,y())},[y]),R=(0,g.useMemo)(()=>({collapsePanel:T,direction:r,dragState:m,expandPanel:E,getPanelSize:D,getPanelStyle:O,groupId:f,isPanelCollapsed:k,isPanelExpanded:A,reevaluatePanelConstraints:P,registerPanel:j,registerResizeHandle:M,resizePanel:N,startDragging:F,stopDragging:I,unregisterPanel:L,panelGroupElement:p.current}),[T,m,r,E,D,O,f,k,A,P,j,M,N,F,I,L]),z={display:`flex`,flexDirection:r===`horizontal`?`row`:`column`,height:`100%`,overflow:`hidden`,width:`100%`};return(0,g.createElement)(AM.Provider,{value:R},(0,g.createElement)(u,{...d,children:t,className:n,id:a,ref:p,style:{...z,...l},[jM.group]:``,[jM.groupDirection]:r,[jM.groupId]:f}))}var LN=(0,g.forwardRef)((e,t)=>(0,g.createElement)(IN,{...e,forwardedRef:t}));IN.displayName=`PanelGroup`,LN.displayName=`forwardRef(PanelGroup)`;function RN(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function zN(e,t,n){let r=RN(e,t),i=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t.constraints,panelSize:a,pivotIndices:i}}function _Fe({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){(0,g.useEffect)(()=>{if(e||n==null||r==null)return;let i=wN(t,r);if(i==null)return;let a=e=>{if(!e.defaultPrevented)switch(e.key){case`ArrowDown`:case`ArrowLeft`:case`ArrowRight`:case`ArrowUp`:case`End`:case`Home`:e.preventDefault(),n(e);break;case`F6`:{e.preventDefault();let n=i.getAttribute(jM.groupId);mN(n,`No group element found for id "${n}"`);let a=bN(n,r),o=xN(n,t,r);mN(o!==null,`No resize element found for id "${t}"`),a[e.shiftKey?o>0?o-1:a.length-1:o+1<a.length?o+1:0].focus();break}}};return i.addEventListener(`keydown`,a),()=>{i.removeEventListener(`keydown`,a)}},[r,e,t,n])}function BN({children:e=null,className:t=``,disabled:n=!1,hitAreaMargins:r,id:i,onBlur:a,onClick:o,onDragging:s,onFocus:c,onPointerDown:l,onPointerUp:u,style:d={},tabIndex:f=0,tagName:p=`div`,...m}){let h=(0,g.useRef)(null),_=(0,g.useRef)({onClick:o,onDragging:s,onPointerDown:l,onPointerUp:u});(0,g.useEffect)(()=>{_.current.onClick=o,_.current.onDragging=s,_.current.onPointerDown=l,_.current.onPointerUp=u});let v=(0,g.useContext)(AM);if(v===null)throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);let{direction:y,groupId:b,registerResizeHandle:x,startDragging:S,stopDragging:C,panelGroupElement:w}=v,T=FM(i),[E,D]=(0,g.useState)(`inactive`),[O,k]=(0,g.useState)(!1),[A,j]=(0,g.useState)(null),M=(0,g.useRef)({state:E});NM(()=>{M.current.state=E}),(0,g.useEffect)(()=>{if(n)j(null);else{let e=x(T);j(()=>e)}},[n,T,x]);let N=r?.coarse??15,P=r?.fine??5;(0,g.useEffect)(()=>{if(n||A==null)return;let e=h.current;mN(e,`Element ref not attached`);let t=!1;return nFe(T,e,y,{coarse:N,fine:P},(e,n,r)=>{if(!n){D(`inactive`);return}switch(e){case`down`:{D(`drag`),t=!1,mN(r,`Expected event to be defined for "down" action`),S(T,r);let{onDragging:e,onPointerDown:n}=_.current;e?.(!0),n?.();break}case`move`:{let{state:e}=M.current;t=!0,e!==`drag`&&D(`hover`),mN(r,`Expected event to be defined for "move" action`),A(r);break}case`up`:{D(`hover`),C();let{onClick:e,onDragging:n,onPointerUp:r}=_.current;n?.(!1),r?.(),t||e?.();break}}})},[N,y,n,P,x,T,A,S,C]),_Fe({disabled:n,handleId:T,resizeHandler:A,panelGroupElement:w});let F={touchAction:`none`,userSelect:`none`};return(0,g.createElement)(p,{...m,children:e,className:t,id:i,onBlur:()=>{k(!1),a?.()},onFocus:()=>{k(!0),c?.()},ref:h,role:`separator`,style:{...F,...d},tabIndex:f,[jM.groupDirection]:y,[jM.groupId]:b,[jM.resizeHandle]:``,[jM.resizeHandleActive]:E===`drag`?`pointer`:O?`keyboard`:void 0,[jM.resizeHandleEnabled]:!n,[jM.resizeHandleId]:T,[jM.resizeHandleState]:E})}BN.displayName=`PanelResizeHandle`;var VN=({className:e,...t})=>(0,U.jsx)(LN,{className:W(`flex h-full w-full data-[panel-group-direction=vertical]:flex-col`,e),...t}),HN=LM,UN=({withHandle:e,className:t,...n})=>(0,U.jsx)(BN,{className:W(`relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90`,t),...n,children:e&&(0,U.jsx)(`div`,{className:`z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border`,children:(0,U.jsx)(cl,{className:`h-2.5 w-2.5`})})});function WN({className:e,...t}){return(0,U.jsx)(`div`,{className:W(`animate-pulse rounded-md bg-primary/10`,e),...t})}var vFe=(0,g.createContext)(null),GN={didCatch:!1,error:null},yFe=class extends g.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=GN}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){let{error:t}=this.state;t!==null&&(this.props.onReset?.({args:e,reason:`imperative-api`}),this.setState(GN))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&t.error!==null&&bFe(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:`keys`}),this.setState(GN))}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:a}=this.state,o=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof t==`function`)o=t(e);else if(n)o=(0,g.createElement)(n,e);else if(r!==void 0)o=r;else throw a}return(0,g.createElement)(vFe.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function bFe(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}var KN=({children:e,fallback:t})=>{let n=F_();return(0,U.jsx)(yFe,{onError:(e,t)=>{let r={componentStack:t.componentStack};(e instanceof oi||e instanceof si)&&(r.errorType=e.type,r.errorStatus=e.status,r.errorDetail=e.detail,r.errorInstance=e.instance,r.traceId=e.traceId),n.captureException(e,r)},fallbackRender:({error:e,resetErrorBoundary:n})=>t({error:e,resetError:n}),children:e})},qN=({className:e})=>(0,U.jsxs)(`svg`,{className:e,viewBox:`0 0 86 86`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,children:[(0,U.jsx)(`title`,{children:`open-api-icon`}),(0,U.jsx)(`g`,{id:`Page-1`,stroke:`none`,strokeWidth:`1`,fill:`none`,fillRule:`evenodd`,children:(0,U.jsxs)(`g`,{id:`open-api-icon`,fill:`currentColor`,children:[(0,U.jsx)(`path`,{d:`M35,16 C39.1263484,16 43.0859173,16.7140679 46.7618776,18.0253747 L36.7225172,28.0635294 C36.1538485,28.0214262 35.5794264,28 35,28 C22.2974508,28 12,38.2974508 12,51 C12,63.7025492 22.2974508,74 35,74 C47.7025492,74 58,63.7025492 58,51 C58,50.4205736 57.9785738,49.8461515 57.9364706,49.2774828 L67.9749824,39.2391236 C69.2860617,42.9148016 70,46.8740262 70,51 C70,70.3299662 54.3299662,86 35,86 C15.6700338,86 0,70.3299662 0,51 C0,31.6700338 15.6700338,16 35,16 Z`,id:`Combined-Shape`}),(0,U.jsx)(`circle`,{id:`Oval`,cx:`35`,cy:`51`,r:`13`}),(0,U.jsx)(`circle`,{id:`Oval-Copy`,cx:`73`,cy:`13`,r:`13`}),(0,U.jsx)(`rect`,{id:`Rectangle`,transform:`translate(54.091883, 31.908117) rotate(-45.000000) translate(-54.091883, -31.908117) `,x:`27.0918831`,y:`26.4081169`,width:`54`,height:`11`})]})})]});function JN(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function xFe(e,t=[]){let n=[];function r(t,r){let i=g.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=g.useMemo(()=>o,Object.values(o));return(0,U.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=g.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>g.createContext(e));return function(n){let r=n?.[e]||t;return g.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,SFe(i,...t)]}function SFe(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function YN(e,t=[]){let n=[];function r(t,r){let i=g.createContext(r),a=n.length;n=[...n,r];function o(t){let{scope:n,children:r,...o}=t,s=n?.[e][a]||i,c=g.useMemo(()=>o,Object.values(o));return(0,U.jsx)(s.Provider,{value:c,children:r})}function s(n,o){let s=o?.[e][a]||i,c=g.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return o.displayName=t+`Provider`,[o,s]}let i=()=>{let t=n.map(e=>g.createContext(e));return function(n){let r=n?.[e]||t;return g.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,CFe(i,...t)]}function CFe(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function wFe(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function XN(...e){return t=>e.forEach(e=>wFe(e,t))}function ZN(...e){return g.useCallback(XN(...e),e)}var QN=g.forwardRef((e,t)=>{let{children:n,...r}=e,i=g.Children.toArray(n),a=i.find(EFe);if(a){let e=a.props.children,n=i.map(t=>t===a?g.Children.count(e)>1?g.Children.only(null):g.isValidElement(e)?e.props.children:null:t);return(0,U.jsx)($N,{...r,ref:t,children:g.isValidElement(e)?g.cloneElement(e,void 0,n):null})}return(0,U.jsx)($N,{...r,ref:t,children:n})});QN.displayName=`Slot`;var $N=g.forwardRef((e,t)=>{let{children:n,...r}=e;if(g.isValidElement(n)){let e=OFe(n);return g.cloneElement(n,{...DFe(r,n.props),ref:t?XN(t,e):e})}return g.Children.count(n)>1?g.Children.only(null):null});$N.displayName=`SlotClone`;var TFe=({children:e})=>(0,U.jsx)(U.Fragment,{children:e});function EFe(e){return g.isValidElement(e)&&e.type===TFe}function DFe(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{a(...e),i(...e)}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function OFe(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function kFe(e){let t=e+`CollectionProvider`,[n,r]=YN(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=g.useRef(null),a=g.useRef(new Map).current;return(0,U.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=g.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,U.jsx)(QN,{ref:ZN(t,a(s,n).collectionRef),children:r})});c.displayName=s;let l=e+`CollectionItemSlot`,u=`data-radix-collection-item`,d=g.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=g.useRef(null),s=ZN(t,o),c=a(l,n);return g.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,U.jsx)(QN,{[u]:``,ref:s,children:r})});d.displayName=l;function f(t){let n=a(e+`CollectionConsumer`,t);return g.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:c,ItemSlot:d},f,r]}var eP=globalThis?.document?g.useLayoutEffect:()=>{},AFe=g.useId||(()=>void 0),jFe=0;function tP(e){let[t,n]=g.useState(AFe());return eP(()=>{e||n(e=>e??String(jFe++))},[e]),e||(t?`radix-${t}`:``)}var nP=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=g.forwardRef((e,n)=>{let{asChild:r,...i}=e,a=r?QN:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,U.jsx)(a,{...i,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function rP(e){let t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...e)=>t.current?.(...e),[])}function iP({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=MFe({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=rP(n);return[o,g.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function MFe({defaultProp:e,onChange:t}){let n=g.useState(e),[r]=n,i=g.useRef(r),a=rP(t);return g.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var NFe=g.createContext(void 0);function aP(e){let t=g.useContext(NFe);return e||t||`ltr`}var oP=`rovingFocusGroup.onEntryFocus`,PFe={bubbles:!1,cancelable:!0},sP=`RovingFocusGroup`,[cP,lP,FFe]=kFe(sP),[IFe,uP]=YN(sP,[FFe]),[LFe,RFe]=IFe(sP),dP=g.forwardRef((e,t)=>(0,U.jsx)(cP.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,U.jsx)(cP.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,U.jsx)(zFe,{...e,ref:t})})}));dP.displayName=sP;var zFe=g.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=g.useRef(null),p=ZN(t,f),m=aP(a),[h=null,_]=iP({prop:o,defaultProp:s,onChange:c}),[v,y]=g.useState(!1),b=rP(l),x=lP(n),S=g.useRef(!1),[C,w]=g.useState(0);return g.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(oP,b),()=>e.removeEventListener(oP,b)},[b]),(0,U.jsx)(LFe,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:g.useCallback(e=>_(e),[_]),onItemShiftTab:g.useCallback(()=>y(!0),[]),onFocusableItemAdd:g.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:g.useCallback(()=>w(e=>e-1),[]),children:(0,U.jsx)(nP.div,{tabIndex:v||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:JN(e.onMouseDown,()=>{S.current=!0}),onFocus:JN(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(oP,PFe);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);mP([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:JN(e.onBlur,()=>y(!1))})})}),fP=`RovingFocusGroupItem`,pP=g.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,...o}=e,s=tP(),c=a||s,l=RFe(fP,n),u=l.currentTabStopId===c,d=lP(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=l;return g.useEffect(()=>{if(r)return f(),()=>p()},[r,f,p]),(0,U.jsx)(cP.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:(0,U.jsx)(nP.span,{tabIndex:u?0:-1,"data-orientation":l.orientation,...o,ref:t,onMouseDown:JN(e.onMouseDown,e=>{r?l.onItemFocus(c):e.preventDefault()}),onFocus:JN(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:JN(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){l.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=HFe(e,l.orientation,l.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=d().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=l.loop?UFe(n,r+1):n.slice(r+1)}setTimeout(()=>mP(n))}})})})});pP.displayName=fP;var BFe={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function VFe(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function HFe(e,t,n){let r=VFe(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return BFe[r]}function mP(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function UFe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var WFe=dP,GFe=pP;function KFe(e,t){return g.useReducer((e,n)=>t[e][n]??e,e)}var hP=e=>{let{present:t,children:n}=e,r=qFe(t),i=typeof n==`function`?n({present:r.isPresent}):g.Children.only(n),a=ZN(r.ref,JFe(i));return typeof n==`function`||r.isPresent?g.cloneElement(i,{ref:a}):null};hP.displayName=`Presence`;function qFe(e){let[t,n]=g.useState(),r=g.useRef({}),i=g.useRef(e),a=g.useRef(`none`),[o,s]=KFe(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return g.useEffect(()=>{let e=gP(r.current);a.current=o===`mounted`?e:`none`},[o]),eP(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=gP(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),eP(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=gP(r.current).includes(a.animationName);if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=gP(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:g.useCallback(e=>{e&&(r.current=getComputedStyle(e)),n(e)},[])}}function gP(e){return e?.animationName||`none`}function JFe(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var _P=`Tabs`,[YFe,XFe]=xFe(_P,[uP]),vP=uP(),[ZFe,yP]=YFe(_P),bP=g.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=aP(s),[d,f]=iP({prop:r,onChange:i,defaultProp:a});return(0,U.jsx)(ZFe,{scope:n,baseId:tP(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,U.jsx)(nP.div,{dir:u,"data-orientation":o,...l,ref:t})})});bP.displayName=_P;var xP=`TabsList`,SP=g.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=yP(xP,n),o=vP(n);return(0,U.jsx)(WFe,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,U.jsx)(nP.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});SP.displayName=xP;var CP=`TabsTrigger`,wP=g.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=yP(CP,n),s=vP(n),c=DP(o.baseId,r),l=OP(o.baseId,r),u=r===o.value;return(0,U.jsx)(GFe,{asChild:!0,...s,focusable:!i,active:u,children:(0,U.jsx)(nP.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:JN(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:JN(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:JN(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});wP.displayName=CP;var TP=`TabsContent`,EP=g.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=yP(TP,n),c=DP(s.baseId,r),l=OP(s.baseId,r),u=r===s.value,d=g.useRef(u);return g.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,U.jsx)(hP,{present:i||u,children:({present:n})=>(0,U.jsx)(nP.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});EP.displayName=TP;function DP(e,t){return`${e}-trigger-${t}`}function OP(e,t){return`${e}-content-${t}`}var kP=bP,AP=SP,jP=wP,MP=EP,NP=kP,QFe=Qs(`inline-flex items-center justify-center rounded-md bg-muted text-muted-foreground`,{variants:{variant:{default:``,underline:`w-full justify-start gap-6 rounded-none border-b border-border bg-transparent`},size:{sm:`h-8 px-1 py-1`,default:`h-10 p-1`}},compoundVariants:[{variant:`underline`,className:`h-auto p-0`}],defaultVariants:{variant:`default`,size:`default`}}),$Fe=Qs(`inline-flex items-center justify-center whitespace-nowrap rounded-xs font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-xs text-sm`,{variants:{variant:{default:``,underline:`gap-1.5 border-b-2 border-transparent text-muted-foreground hover:text-foreground data-[state=active]:border-brand data-[state=active]:bg-transparent data-[state=active]:text-brand data-[state=active]:shadow-none`},size:{sm:`px-2 py-0.5 rounded-sm`,default:`px-3 py-1.5`}},compoundVariants:[{variant:`underline`,className:`rounded-none px-1 py-2`}],defaultVariants:{variant:`default`,size:`default`}}),PP=g.forwardRef(({className:e,variant:t,size:n,...r},i)=>(0,U.jsx)(AP,{ref:i,className:W(QFe({variant:t,size:n}),e),...r}));PP.displayName=AP.displayName;var FP=g.forwardRef(({className:e,variant:t,size:n,...r},i)=>(0,U.jsx)(jP,{ref:i,className:W($Fe({variant:t,size:n}),e),...r}));FP.displayName=jP.displayName;var IP=g.forwardRef(({className:e,...t},n)=>(0,U.jsx)(MP,{ref:n,className:W(`data-[state=inactive]:hidden`,`mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));IP.displayName=MP.displayName;var eIe=[`@zuplo/runtime`,`@zuplo/graphql`,`@zuplo/otel`],LP=[{name:`@zuplo/test`,version:`0.0.0`,types:`types/@zuplo/test/latest/types.d.ts`},{name:`chai`,version:`0.0.0`,types:`types/@types/chai/latest/index.d.ts`},{name:`openapi-types`,version:`0.0.0`,types:`types/openapi-types/latest/index.d.ts`}],tIe=[{types:`types/@zuplo/runtime/types/environment.d.ts`,name:`@app/environment`},{types:`types/@zuplo/runtime/types/custom.d.ts`,name:`lib.custom.ts`},{types:`types/@zuplo/runtime/latest/global.d.ts`,name:`global.d.ts`}];async function nIe(){try{return await(await fetch(`https://cdn.zuplo.com/types/remote-modules.d.ts`)).text()}catch(e){M_.captureException(e)}}async function rIe(e,t){try{let n=await fetch(`${fi}/types/${e}/${t}/package.json`);if(!n.ok)throw Error(`Error loading package.json for ${e}`);return await n.json()}catch(e){M_.captureException(e)}}async function iIe(){try{let e=await fetch(`${fi}/types/@zuplo/bundled/bundles.json`);if(!e.ok)throw Error(`Error loading bundles from CDN`);let t=await e.json();return[...LP,...t.bundles]}catch(e){M_.captureException(e)}return[...LP]}async function RP(e){try{let t=await fetch(`${fi}/${e}`);if(!t.ok)throw Error(`Error loading type definition: ${e}`);return await t.text()}catch(e){M_.captureException(e)}}var zP=async(e,t,n)=>{let r=`https://cdn.jsdelivr.net/npm/${e}@${t}${n}`,i=await fetch(r);return i.ok?i.text():Error(`OK`)};async function aIe(e){await Promise.all(eIe.map(async t=>{let n=await rIe(t,`latest`);n&&(e.typescript.typescriptDefaults.addExtraLib(JSON.stringify(n),`file:///node_modules/${t}/package.json`),await Promise.all(Object.entries(n.exports).map(async([n,r])=>{let i=await RP(`types/${t}/latest/${r.types.substring(2)}`);if(i){let r=n===`.`?`index.d.ts`:`${n}.d.ts`;e.typescript.typescriptDefaults.addExtraLib(i,`file:///node_modules/${t}/${r}`)}})))}))}async function BP(e){let t=Object.keys(e.typescript.typescriptDefaults.getExtraLibs()),n=await iIe();await Promise.allSettled([...tIe.map(async({types:t,name:n})=>{let r=await RP(t);r&&e.typescript.typescriptDefaults.addExtraLib(r,n)}),...n.map(async n=>{if(t.includes(n.name))return;let r={name:n.name,version:n.version,types:`./index.d.ts`},i=await RP(n.types);i&&(e.typescript.typescriptDefaults.addExtraLib(JSON.stringify(r),`file:///node_modules/${n.name}/package.json`),e.typescript.typescriptDefaults.addExtraLib(i,`file:///node_modules/${n.name}/index.d.ts`))})])}var VP=null,oIe=`
|
|
96
|
+
`},ZMe=0,RA=[];function QMe(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),i=g.useState(ZMe++)[0],a=g.useState(function(){return vT()})[0],o=g.useRef(e);g.useEffect(function(){o.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Obe([e.lockRef.current],(e.shards||[]).map(LA),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=g.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2)return!o.current.allowPinchZoom;var i=FA(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=MA(d,u);if(!f)return!0;if(f?l=d:(l=d===`v`?`h`:`v`,f=MA(d,u)),!f)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var p=r.current||l;return JMe(p,t,e,p===`h`?s:c,!0)},[]),c=g.useCallback(function(e){var n=e;if(!(!RA.length||RA[RA.length-1]!==a)){var r=`deltaY`in n?IA(n):FA(n),i=t.current.filter(function(e){return e.name===n.type&&e.target===n.target&&YMe(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(LA).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=g.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=g.useCallback(function(e){n.current=FA(e),r.current=void 0},[]),d=g.useCallback(function(t){l(t.type,IA(t),t.target,s(t,e.lockRef.current))},[]),f=g.useCallback(function(t){l(t.type,FA(t),t.target,s(t,e.lockRef.current))},[]);g.useEffect(function(){return RA.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,AA),document.addEventListener(`touchmove`,c,AA),document.addEventListener(`touchstart`,u,AA),function(){RA=RA.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,AA),document.removeEventListener(`touchmove`,c,AA),document.removeEventListener(`touchstart`,u,AA)}},[]);var p=e.removeScrollBar,m=e.inert;return g.createElement(g.Fragment,null,m?g.createElement(a,{styles:XMe(i)}):null,p?g.createElement(txe,{gapMode:`margin`}):null)}var $Me=zbe(TA,QMe),zA=g.forwardRef(function(e,t){return g.createElement(DA,dT({},e,{ref:t,sideCar:$Me}))});zA.classNames=DA.classNames;var BA=`Dialog`,[VA,eNe]=kMe(BA),[tNe,HA]=VA(BA),nNe=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=(0,g.useRef)(null),c=(0,g.useRef)(null),[l=!1,u]=NMe({prop:r,defaultProp:i,onChange:a});return(0,g.createElement)(tNe,{scope:t,triggerRef:s,contentRef:c,contentId:hA(),titleId:hA(),descriptionId:hA(),open:l,onOpenChange:u,onOpenToggle:(0,g.useCallback)(()=>u(e=>!e),[u]),modal:o},n)},rNe=`DialogTrigger`,iNe=(0,g.forwardRef)((e,t)=>{let{__scopeDialog:n,...r}=e,i=HA(rNe,n),a=pA(t,i.triggerRef);return(0,g.createElement)(bA.button,uA({type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":YA(i.open)},r,{ref:a,onClick:dA(e.onClick,i.onOpenToggle)}))}),UA=`DialogPortal`,[aNe,WA]=VA(UA,{forceMount:void 0}),oNe=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=HA(UA,t);return(0,g.createElement)(aNe,{scope:t,forceMount:n},g.Children.map(r,e=>(0,g.createElement)(xA,{present:n||a.open},(0,g.createElement)(RMe,{asChild:!0,container:i},e))))},GA=`DialogOverlay`,sNe=(0,g.forwardRef)((e,t)=>{let n=WA(GA,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=HA(GA,e.__scopeDialog);return a.modal?(0,g.createElement)(xA,{present:r||a.open},(0,g.createElement)(cNe,uA({},i,{ref:t}))):null}),cNe=(0,g.forwardRef)((e,t)=>{let{__scopeDialog:n,...r}=e,i=HA(GA,n);return(0,g.createElement)(zA,{as:vA,allowPinchZoom:!0,shards:[i.contentRef]},(0,g.createElement)(bA.div,uA({"data-state":YA(i.open)},r,{ref:t,style:{pointerEvents:`auto`,...r.style}})))}),KA=`DialogContent`,lNe=(0,g.forwardRef)((e,t)=>{let n=WA(KA,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=HA(KA,e.__scopeDialog);return(0,g.createElement)(xA,{present:r||a.open},a.modal?(0,g.createElement)(uNe,uA({},i,{ref:t})):(0,g.createElement)(dNe,uA({},i,{ref:t})))}),uNe=(0,g.forwardRef)((e,t)=>{let n=HA(KA,e.__scopeDialog),r=(0,g.useRef)(null),i=pA(t,n.contentRef,r);return(0,g.useEffect)(()=>{let e=r.current;if(e)return uT(e)},[]),(0,g.createElement)(qA,uA({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:dA(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),(t=n.triggerRef.current)==null||t.focus()}),onPointerDownOutside:dA(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:dA(e.onFocusOutside,e=>e.preventDefault())}))}),dNe=(0,g.forwardRef)((e,t)=>{let n=HA(KA,e.__scopeDialog),r=(0,g.useRef)(!1),i=(0,g.useRef)(!1);return(0,g.createElement)(qA,uA({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a;if((a=e.onCloseAutoFocus)==null||a.call(e,t),!t.defaultPrevented){var o;r.current||(o=n.triggerRef.current)==null||o.focus(),t.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:t=>{var a;(a=e.onInteractOutside)==null||a.call(e,t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let o=t.target;n.triggerRef.current?.contains(o)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}}))}),qA=(0,g.forwardRef)((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=HA(KA,n),c=pA(t,(0,g.useRef)(null));return VMe(),(0,g.createElement)(g.Fragment,null,(0,g.createElement)(rw,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a},(0,g.createElement)(_a,uA({role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":YA(s.open)},o,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),JA=`DialogTitle`,fNe=(0,g.forwardRef)((e,t)=>{let{__scopeDialog:n,...r}=e,i=HA(JA,n);return(0,g.createElement)(bA.h2,uA({id:i.titleId},r,{ref:t}))}),pNe=`DialogDescription`,mNe=(0,g.forwardRef)((e,t)=>{let{__scopeDialog:n,...r}=e,i=HA(pNe,n);return(0,g.createElement)(bA.p,uA({id:i.descriptionId},r,{ref:t}))}),hNe=`DialogClose`,gNe=(0,g.forwardRef)((e,t)=>{let{__scopeDialog:n,...r}=e,i=HA(hNe,n);return(0,g.createElement)(bA.button,uA({type:`button`},r,{ref:t,onClick:dA(e.onClick,()=>i.onOpenChange(!1))}))});function YA(e){return e?`open`:`closed`}var[_Ne,vNe]=OMe(`DialogTitleWarning`,{contentName:KA,titleName:JA,docsSlug:`dialog`}),XA=nNe,ZA=iNe,QA=oNe,$A=sNe,ej=lNe,tj=fNe,nj=mNe,rj=gNe;function ij({...e}){return(0,U.jsx)(XA,{"data-slot":`dialog`,...e})}function aj({...e}){return(0,U.jsx)(ZA,{"data-slot":`dialog-trigger`,...e})}function yNe({...e}){return(0,U.jsx)(QA,{"data-slot":`dialog-portal`,...e})}function oj({...e}){return(0,U.jsx)(rj,{"data-slot":`dialog-close`,...e})}function bNe({className:e,...t}){return(0,U.jsx)($A,{"data-slot":`dialog-overlay`,className:W(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,e),...t})}function sj({className:e,children:t,showCloseButton:n=!0,...r}){return(0,U.jsxs)(yNe,{"data-slot":`dialog-portal`,children:[(0,U.jsx)(bNe,{}),(0,U.jsxs)(ej,{"data-slot":`dialog-content`,className:W(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg`,e),...r,children:[t,n&&(0,U.jsxs)(rj,{"data-slot":`dialog-close`,className:`ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,U.jsx)(nu,{}),(0,U.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function cj({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`dialog-header`,className:W(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function lj({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`dialog-footer`,className:W(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function uj({className:e,...t}){return(0,U.jsx)(tj,{"data-slot":`dialog-title`,className:W(`text-lg leading-none font-semibold`,e),...t})}function dj({className:e,...t}){return(0,U.jsx)(nj,{"data-slot":`dialog-description`,className:W(`text-muted-foreground text-sm`,e),...t})}function xNe({open:e,editors:t,onSelect:n,onCancel:r}){let[i,a]=(0,g.useState)(null);return(0,U.jsx)(ij,{open:e,onOpenChange:e=>!e&&r(),children:(0,U.jsxs)(sj,{className:`sm:max-w-md`,children:[(0,U.jsxs)(cj,{children:[(0,U.jsx)(uj,{children:`Choose Your Editor`}),(0,U.jsx)(dj,{children:`Select which editor you'd like to use for opening files. This preference will be saved for future use.`})]}),(0,U.jsx)(`div`,{className:`space-y-2 py-4`,children:t.map(e=>(0,U.jsx)(`button`,{type:`button`,className:`w-full text-left px-4 py-3 rounded-md border transition-colors ${i===e.id?`border-blue-500 bg-blue-50 dark:bg-blue-950/40`:`border-gray-200 dark:border-neutral-700 hover:border-gray-300 dark:hover:border-neutral-600 hover:bg-gray-50 dark:hover:bg-neutral-800/60`}`,onClick:()=>a(e.id),children:(0,U.jsx)(`div`,{className:`font-medium`,children:e.name})},e.id))}),(0,U.jsxs)(lj,{children:[(0,U.jsx)(Y,{variant:`ghost`,onClick:r,children:`Cancel`}),(0,U.jsx)(Y,{variant:`default`,onClick:()=>{i&&n(i)},disabled:!i,children:`Save Preference`})]})]})})}var fj=`/api/v1/editor`;function SNe(){let[e]=Br(),[t,n]=(0,g.useState)(null),[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)([]),[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(!0);(0,g.useEffect)(()=>{(async()=>{try{let e=await fetch(`${fj}/list`);if(!e.ok)throw Error(`Failed to fetch editors: ${e.status}`);o((await e.json()).editors);let t=await fetch(`${fj}/detect`);if(!t.ok)throw Error(`Failed to detect editor: ${t.status}`);let r=await t.json();r.editor&&r.name&&(n(r.editor),i(r.name))}catch(e){_.default.error(`Failed to load editor preference:`,e)}finally{u(!1)}})()},[]);let d=(0,g.useCallback)(async e=>{try{if((await fetch(`${fj}/preference`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({editor:e})})).ok){let t=a.find(t=>t.id===e);t&&(n(e),i(t.name)),c(!1)}}catch(e){_.default.error(`Failed to save editor preference:`,e)}},[a]),f=(0,g.useCallback)(async()=>{let n=e.get(`path`);if(!n){_.default.warn(`No file path in URL`);return}if(!t){c(!0);return}try{let e=await fetch(`${fj}/open`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({file:n})});if(!e.ok){let t=await e.json();_.default.error(`Failed to open file in editor:`,t.message);return}let t=await e.json();t.url&&window.open(t.url,`_blank`)}catch(e){_.default.error(`Failed to open file in editor:`,e)}},[e,t]);return{hasEditor:!!t,editorName:r,isLoading:l,showPreferenceDialog:s,setShowPreferenceDialog:c,availableEditors:a,savePreference:d,openInEditor:f}}var pj=`$import(@zuplo/runtime)`,CNe=e=>new Promise(t=>setTimeout(t,e)),mj=e=>{let t=(0,g.useRef)(e);return t.current=e,(0,g.useEffect)(()=>{t.current=e},[e]),t},hj=e=>{let[t,n]=(0,g.useState)(`idle`),[r,i]=(0,g.useState)(),[a,o]=(0,g.useState)(null);return{state:t,error:r,execute:(0,g.useCallback)(async(...t)=>{n(`loading`),o(null),i(void 0);try{let r=await e(...t);return n(`hasValue`),o(r),r}catch(e){throw i(e instanceof Error?e:Error(e)),n(`hasError`),e}},[e]),value:a}},gj=function(e){return e.PRODUCTION=`PRODUCTION`,e.PREVIEW=`PREVIEW`,e.WORKING_COPY=`WORKING_COPY`,e}({});function wNe(e,...t){return e==null?!1:t.includes(e)}var _j=()=>({isReadOnly:gu().environment.environmentType!==gj.WORKING_COPY});function vj(){return new URLSearchParams(Sn().search)}function yj(e,t){let[n,r]=Br(),i=Object.fromEntries(n);return[n.get(e)??t,t=>r(t===void 0?Object.fromEntries(Object.entries(i).filter(([t])=>t!==e)):{...i,[e]:t})]}function TNe(e,t){let[n,r]=Br();return[n.get(e)?n.getAll(e):t,t=>r({...Object.fromEntries(n),[e]:t})]}var ENe=i(((e,t)=>{t.exports=n;function n(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var a=i(e,t,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+e.length,a[1]),post:n.slice(a[1]+t.length)}}function r(e,t){var n=t.match(e);return n?n[0]:null}n.range=i;function i(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:(i=r.pop(),i<a&&(a=i,o=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(s=[a,o])}return s}})),DNe=e(i(((e,t)=>{var n=ENe();t.exports=f;var r=`\0SLASH`+Math.random()+`\0`,i=`\0OPEN`+Math.random()+`\0`,a=`\0CLOSE`+Math.random()+`\0`,o=`\0COMMA`+Math.random()+`\0`,s=`\0PERIOD`+Math.random()+`\0`;function c(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function l(e){return e.split(`\\\\`).join(r).split(`\\{`).join(i).split(`\\}`).join(a).split(`\\,`).join(o).split(`\\.`).join(s)}function u(e){return e.split(r).join(`\\`).split(i).join(`{`).split(a).join(`}`).split(o).join(`,`).split(s).join(`.`)}function d(e){if(!e)return[``];var t=[],r=n(`{`,`}`,e);if(!r)return e.split(`,`);var i=r.pre,a=r.body,o=r.post,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;var c=d(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),t.push.apply(t,s),t}function f(e){return e?(e.substr(0,2)===`{}`&&(e=`\\{\\}`+e.substr(2)),_(l(e),!0).map(u)):[]}function p(e){return`{`+e+`}`}function m(e){return/^-?0\d/.test(e)}function h(e,t){return e<=t}function g(e,t){return e>=t}function _(e,t){var r=[],i=n(`{`,`}`,e);if(!i)return[e];var o=i.pre,s=i.post.length?_(i.post,!1):[``];if(/\$$/.test(i.pre))for(var l=0;l<s.length;l++){var u=o+`{`+i.body+`}`+s[l];r.push(u)}else{var f=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),v=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),y=f||v,b=i.body.indexOf(`,`)>=0;if(!y&&!b)return i.post.match(/,(?!,).*\}/)?(e=i.pre+`{`+i.body+a+i.post,_(e)):[e];var x;if(y)x=i.body.split(/\.\./);else if(x=d(i.body),x.length===1&&(x=_(x[0],!1).map(p),x.length===1))return s.map(function(e){return i.pre+x[0]+e});var S;if(y){var C=c(x[0]),w=c(x[1]),T=Math.max(x[0].length,x[1].length),E=x.length==3?Math.abs(c(x[2])):1,D=h;w<C&&(E*=-1,D=g);var O=x.some(m);S=[];for(var k=C;D(k,w);k+=E){var A;if(v)A=String.fromCharCode(k),A===`\\`&&(A=``);else if(A=String(k),O){var j=T-A.length;if(j>0){var M=Array(j+1).join(`0`);A=k<0?`-`+M+A.slice(1):M+A}}S.push(A)}}else{S=[];for(var N=0;N<x.length;N++)S.push.apply(S,_(x[N],!1))}for(var N=0;N<S.length;N++)for(var l=0;l<s.length;l++){var u=o+S[N]+s[l];(!t||y||u)&&r.push(u)}}return r}}))()),ONe=1024*64,bj=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>ONe)throw TypeError(`pattern is too long`)},kNe={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`,!0],"[:alpha:]":[`\\p{L}\\p{Nl}`,!0],"[:ascii:]":[`\\x00-\\x7f`,!1],"[:blank:]":[`\\p{Zs}\\t`,!0],"[:cntrl:]":[`\\p{Cc}`,!0],"[:digit:]":[`\\p{Nd}`,!0],"[:graph:]":[`\\p{Z}\\p{C}`,!0,!0],"[:lower:]":[`\\p{Ll}`,!0],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}`,!0],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`,!0],"[:upper:]":[`\\p{Lu}`,!0],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`,!0],"[:xdigit:]":[`A-Fa-f0-9`,!1]},xj=e=>e.replace(/[[\]\\-]/g,`\\$&`),ANe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),Sj=e=>e.join(``),jNe=(e,t)=>{let n=t;if(e.charAt(n)!==`[`)throw Error(`not in a brace expression`);let r=[],i=[],a=n+1,o=!1,s=!1,c=!1,l=!1,u=n,d=``;WHILE:for(;a<e.length;){let t=e.charAt(a);if((t===`!`||t===`^`)&&a===n+1){l=!0,a++;continue}if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t===`\\`&&!c){c=!0,a++;continue}if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(kNe))if(e.startsWith(t,a)){if(d)return[`$.`,!1,e.length-n,!0];a+=t.length,l?i.push(o):r.push(o),s||=c;continue WHILE}}if(c=!1,d){t>d?r.push(xj(d)+`-`+xj(t)):t===d&&r.push(xj(t)),d=``,a++;continue}if(e.startsWith(`-]`,a+1)){r.push(xj(t+`-`)),a+=2;continue}if(e.startsWith(`-`,a+1)){d=t,a+=2;continue}r.push(xj(t)),a++}if(u<a)return[``,!1,0,!1];if(!r.length&&!i.length)return[`$.`,!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l)return[ANe(r[0].length===2?r[0].slice(-1):r[0]),!1,u-n,!1];let f=`[`+(l?`^`:``)+Sj(r)+`]`,p=`[`+(l?``:`^`)+Sj(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},Cj=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,`$1$2`).replace(/\\([^\/])/g,`$1`),MNe=new Set([`!`,`?`,`+`,`*`,`@`]),wj=e=>MNe.has(e),Tj=e=>wj(e.type),NNe=new Map([[`!`,[`@`]],[`?`,[`?`,`@`]],[`@`,[`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`]]]),PNe=new Map([[`!`,[`?`]],[`@`,[`?`]],[`+`,[`?`,`*`]]]),FNe=new Map([[`!`,[`?`,`@`]],[`?`,[`?`,`@`]],[`@`,[`?`,`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`,`?`,`*`]]]),Ej=new Map([[`!`,new Map([[`!`,`@`]])],[`?`,new Map([[`*`,`*`],[`+`,`*`]])],[`@`,new Map([[`!`,`!`],[`?`,`?`],[`@`,`@`],[`*`,`*`],[`+`,`+`]])],[`+`,new Map([[`?`,`*`],[`*`,`*`]])]]),INe=`(?!\\.\\.?(?:$|/))`,Dj=`(?!\\.)`,LNe=new Set([`[`,`.`]),RNe=new Set([`..`,`.`]),zNe=new Set(`().*{}+?[]^$\\!`),BNe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),Oj=`[^/]`,kj=Oj+`*?`,Aj=Oj+`+?`,jj=class e{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.type?this.#l=this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#l=this.#r.map(e=>String(e)).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(...t){for(let n of t)if(n!==``){if(typeof n!=`string`&&!(n instanceof e&&n.#i===this))throw Error(`invalid part: `+n);this.#r.push(n)}}toJSON(){let e=this.type===null?this.#r.slice().map(e=>typeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let t=this.#i;for(let n=0;n<this.#a;n++){let r=t.#r[n];if(!(r instanceof e&&r.type===`!`))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type===`!`)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(t){let n=new e(this.type,t);for(let e of this.#r)n.copyIn(e);return n}static#f(t,n,r,i,a){let o=i.maxExtglobRecursion??2,s=!1,c=!1,l=-1,u=!1;if(n.type===null){let d=r,f=``;for(;d<t.length;){let r=t.charAt(d++);if(s||r===`\\`){s=!s,f+=r;continue}if(c){d===l+1?(r===`^`||r===`!`)&&(u=!0):r===`]`&&!(d===l+2&&u)&&(c=!1),f+=r;continue}else if(r===`[`){c=!0,l=d,u=!1,f+=r;continue}if(!i.noext&&wj(r)&&t.charAt(d)===`(`&&a<=o){n.push(f),f=``;let o=new e(r,n);d=e.#f(t,o,d,i,a+1),n.push(o);continue}f+=r}return n.push(f),d}let d=r+1,f=new e(null,n),p=[],m=``;for(;d<t.length;){let r=t.charAt(d++);if(s||r===`\\`){s=!s,m+=r;continue}if(c){d===l+1?(r===`^`||r===`!`)&&(u=!0):r===`]`&&!(d===l+2&&u)&&(c=!1),m+=r;continue}else if(r===`[`){c=!0,l=d,u=!1,m+=r;continue}if(wj(r)&&t.charAt(d)===`(`&&(a<=o||n&&n.#h(r))){let o=n&&n.#h(r)?0:1;f.push(m),m=``;let s=new e(r,f);f.push(s),d=e.#f(t,s,d,i,a+o);continue}if(r===`|`){f.push(m),m=``,p.push(f),f=new e(null,n);continue}if(r===`)`)return m===``&&n.#r.length===0&&(n.#u=!0),f.push(m),m=``,n.push(...p,f),d;m+=r}return n.type=null,n.#t=void 0,n.#r=[t.substring(r-1)],d}#p(e){return this.#m(e,PNe)}#m(e,t=NNe){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null)return!1;let n=e.#r[0];return!n||typeof n!=`object`||n.type===null?!1:this.#h(n.type,t)}#h(e,t=FNe){return!!t.get(this.type)?.includes(e)}#g(t,n){let r=t.#r[0],i=new e(null,r,this.options);i.#r.push(``),r.push(i),this.#_(t,n)}#_(e,t){let n=e.#r[0];this.#r.splice(t,1,...n.#r);for(let e of n.#r)typeof e==`object`&&(e.#i=this);this.#l=void 0}#v(e){return!!Ej.get(this.type)?.has(e)}#y(e){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null||this.#r.length!==1)return!1;let t=e.#r[0];return!t||typeof t!=`object`||t.type===null?!1:this.#v(t.type)}#b(e){let t=Ej.get(this.type),n=e.#r[0],r=t?.get(n.type);if(!r)return!1;this.#r=n.#r;for(let e of this.#r)typeof e==`object`&&(e.#i=this);this.type=r,this.#l=void 0,this.#u=!1}#x(){if(Tj(this)){let e=0,t=!1;do{t=!0;for(let e=0;e<this.#r.length;e++){let n=this.#r[e];typeof n==`object`&&(n.#x(),this.#m(n)?(t=!1,this.#_(n,e)):this.#p(n)?(t=!1,this.#g(n,e)):this.#y(n)&&(t=!1,this.#b(n)))}}while(!t&&++e<10)}else for(let e of this.#r)typeof e==`object`&&e.#x();this.#l=void 0}static fromGlob(t,n={}){let r=new e(null,void 0,n);return e.#f(t,r,0,n,0),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#c.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(){if(this.#e===this&&(this.#x(),this.#d()),!Tj(this)){let t=this.isStart()&&this.isEnd(),n=this.#r.map(n=>{let[r,i,a,o]=typeof n==`string`?e.#S(n,this.#t,t):n.toRegExpSource();return this.#t=this.#t||a,this.#n=this.#n||o,r}).join(``),r=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&RNe.has(this.#r[0]))){let e=LNe,t=this.#c.dot&&e.has(n.charAt(0))||n.startsWith(`\\.`)&&e.has(n.charAt(2))||n.startsWith(`\\.\\.`)&&e.has(n.charAt(4)),i=!this.#c.dot&&e.has(n.charAt(0));r=t?INe:i?Dj:``}let i=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(i=`(?:$|\\/)`),[r+n+i,Cj(n),this.#t=!!this.#t,this.#n]}let t=this.type===`!`?`(?:(?!(?:`:`(?:`,n=this.#r.map(e=>{if(typeof e==`string`)throw Error(`string type in extglob ast??`);let[t,n,r,i]=e.toRegExpSource();return this.#n=this.#n||i,t}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`);if(this.isStart()&&this.isEnd()&&!n&&this.type!==`!`){let e=this.toString(),t=this;return t.#r=[e],t.type=null,t.#t=void 0,[e,Cj(this.toString()),!1,!1]}let r=``;if(this.type===`!`&&this.#u)r=(this.isStart()&&!this.#c.dot?Dj:``)+Aj;else{let e=this.type===`!`?`))`+(this.isStart()&&!this.#c.dot?Dj:``)+kj+`)`:this.type===`@`?`)`:`)${this.type}`;r=t+n+e}return[r,Cj(n),this.#t=!!this.#t,this.#n]}static#S(e,t,n=!1){let r=!1,i=``,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e.charAt(s);if(c!==`*`&&(o=!1),r){r=!1,i+=(zNe.has(c)?`\\`:``)+c;continue}if(c===`\\`){s===e.length-1?i+=`\\\\`:r=!0;continue}if(c===`[`){let[n,r,o,c]=jNe(e,s);if(o){i+=n,a||=r,s+=o-1,t||=c;continue}}if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?Aj:kj,t=!0;continue}if(c===`?`){i+=Oj,t=!0;continue}i+=BNe(c)}return[i,Cj(e),!!t,a]}},VNe=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),Mj=(e,t,n={})=>(bj(t),!n.nocomment&&t.charAt(0)===`#`?!1:new Vj(t,n).match(e)),HNe=/^\*+([^+@!?\*\[\(]*)$/,UNe=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),WNe=e=>t=>t.endsWith(e),GNe=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),KNe=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),qNe=/^\*+\.\*+$/,JNe=e=>!e.startsWith(`.`)&&e.includes(`.`),YNe=e=>e!==`.`&&e!==`..`&&e.includes(`.`),XNe=/^\.\*+$/,ZNe=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),QNe=/^\*+$/,$Ne=e=>e.length!==0&&!e.startsWith(`.`),ePe=e=>e.length!==0&&e!==`.`&&e!==`..`,tPe=/^\?+([^+@!?\*\[\(]*)?$/,nPe=([e,t=``])=>{let n=Nj([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},rPe=([e,t=``])=>{let n=Pj([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},iPe=([e,t=``])=>{let n=Pj([e]);return t?e=>n(e)&&e.endsWith(t):n},aPe=([e,t=``])=>{let n=Nj([e]);return t?e=>n(e)&&e.endsWith(t):n},Nj=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},Pj=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},Fj=typeof process==`object`&&process?{}.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,Ij={win32:{sep:`\\`},posix:{sep:`/`}};Mj.sep=Fj===`win32`?Ij.win32.sep:Ij.posix.sep;var Lj=Symbol(`globstar **`);Mj.GLOBSTAR=Lj;var oPe=`[^/]*?`,sPe=`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`,cPe=`(?:(?!(?:\\/|^)\\.).)*?`;Mj.filter=(e,t={})=>n=>Mj(n,e,t);var Rj=(e,t={})=>Object.assign({},e,t);Mj.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return Mj;let t=Mj;return Object.assign((n,r,i={})=>t(n,r,Rj(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,Rj(e,n))}static defaults(n){return t.defaults(Rj(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n,r={}){super(t,n,Rj(e,r))}static fromGlob(n,r={}){return t.AST.fromGlob(n,Rj(e,r))}},unescape:(n,r={})=>t.unescape(n,Rj(e,r)),escape:(n,r={})=>t.escape(n,Rj(e,r)),filter:(n,r={})=>t.filter(n,Rj(e,r)),defaults:n=>t.defaults(Rj(e,n)),makeRe:(n,r={})=>t.makeRe(n,Rj(e,r)),braceExpand:(n,r={})=>t.braceExpand(n,Rj(e,r)),match:(n,r,i={})=>t.match(n,r,Rj(e,i)),sep:t.sep,GLOBSTAR:Lj})};var zj=(e,t={})=>(bj(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,DNe.default)(e));Mj.braceExpand=zj,Mj.makeRe=(e,t={})=>new Vj(e,t).makeRe(),Mj.match=(e,t,n={})=>{let r=new Vj(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};var Bj=/[?*]|[+@!]\(.*?\)|\[|\]/,lPe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),Vj=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){bj(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||Fj,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!Bj.test(e[2]))&&!Bj.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let n=0;n<e[t].length;n++)e[t][n]===`**`&&(e[t][n]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];n===1&&r===``&&e[0]===``||(r===`.`||r===``)&&(t=!0,e.splice(n,1),n--)}e[0]===`.`&&e.length===2&&(e[1]===`.`||e[1]===``)&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];e===1&&r===``&&n[0]===``||(r===`.`||r===``)&&(t=!0,n.splice(e,1),e--)}n[0]===`.`&&n.length===2&&(n[1]===`.`||n[1]===``)&&(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);r&&(e[t]=r,e[n]=[])}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let r=0,i=0;if(this.isWindows){let n=e[0]===``&&e[1]===``&&e[2]===`?`&&typeof e[3]==`string`&&/^[a-z]:$/i.test(e[3]),a=t[0]===``&&t[1]===``&&t[2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3]);if(n&&a){let n=e[3],a=t[3];n.toLowerCase()===a.toLowerCase()&&(e[3]=a,r=3,i=3)}else if(a&&typeof e[0]==`string`){let n=t[3],r=e[0];n.toLowerCase()===r.toLowerCase()&&(t[3]=r,i=3)}else if(n&&typeof t[0]==`string`){let n=e[3];n.toLowerCase()===t[0].toLowerCase()&&(t[0]=n,r=3)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(Lj)?this.#e(e,t,n,r,i):this.#n(e,t,n,r,i)}#e(e,t,n,r,i){let a=t.indexOf(Lj,i),o=t.lastIndexOf(Lj),[s,c,l]=n?[t.slice(i,a),t.slice(a+1),[]]:[t.slice(i,a),t.slice(a+1,o),t.slice(o+1)];if(s.length){let t=e.slice(r,r+s.length);if(!this.#n(t,s,n,0,0))return!1;r+=s.length}let u=0;if(l.length){if(l.length+r>e.length)return!1;let t=e.length-l.length;if(this.#n(e,l,n,t,0))u=l.length;else{if(e[e.length-1]!==``||r+l.length===e.length||(t--,!this.#n(e,l,n,t,0)))return!1;u=l.length+1}}if(!c.length){let t=!!u;for(let n=r;n<e.length-u;n++){let r=String(e[n]);if(t=!0,r===`.`||r===`..`||!this.options.dot&&r.startsWith(`.`))return!1}return n||t}let d=[[[],0]],f=d[0],p=0,m=[0];for(let e of c)e===Lj?(m.push(p),f=[[],0],d.push(f)):(f[0].push(e),p++);let h=d.length-1,g=e.length-u;for(let e of d)e[1]=g-(m[h--]+e[0].length);return!!this.#t(e,d,r,0,n,0,!!u)}#t(e,t,n,r,i,a,o){let s=t[r];if(!s){for(let t=n;t<e.length;t++){o=!0;let n=e[t];if(n===`.`||n===`..`||!this.options.dot&&n.startsWith(`.`))return!1}return o}let[c,l]=s;for(;n<=l;){if(this.#n(e.slice(0,n+c.length),c,i,n,0)&&a<this.maxGlobstarRecursion){let s=this.#t(e,t,n+c.length,r+1,i,a+1,o);if(s!==!1)return s}let s=e[n];if(s===`.`||s===`..`||!this.options.dot&&s.startsWith(`.`))return!1;n++}return i||null}#n(e,t,n,r,i){let a,o,s,c;for(a=r,o=i,c=e.length,s=t.length;a<c&&o<s;a++,o++){this.debug(`matchOne loop`);let n=t[o],r=e[a];if(this.debug(t,n,r),n===!1||n===Lj)return!1;let i;if(typeof n==`string`?(i=r===n,this.debug(`string match`,n,r,i)):(i=n.test(r),this.debug(`pattern match`,n,r,i)),!i)return!1}if(a===c&&o===s)return!0;if(a===c)return n;if(o===s)return a===c-1&&e[a]===``;throw Error(`wtf?`)}braceExpand(){return zj(this.pattern,this.options)}parse(e){bj(e);let t=this.options;if(e===`**`)return Lj;if(e===``)return``;let n,r=null;(n=e.match(QNe))?r=t.dot?ePe:$Ne:(n=e.match(HNe))?r=(t.nocase?t.dot?KNe:GNe:t.dot?WNe:UNe)(n[1]):(n=e.match(tPe))?r=(t.nocase?t.dot?rPe:nPe:t.dot?iPe:aPe)(n):(n=e.match(qNe))?r=t.dot?YNe:JNe:(n=e.match(XNe))&&(r=ZNe);let i=jj.fromGlob(e,this.options).toMMPattern();return r?Object.assign(i,{test:r}):i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?oPe:t.dot?sPe:cPe,r=new Set(t.nocase?[`i`]:[]),i=e.map(e=>{let t=e.map(e=>{if(e instanceof RegExp)for(let t of e.flags.split(``))r.add(t);return typeof e==`string`?lPe(e):e===Lj?Lj:e._src});return t.forEach((e,r)=>{let i=t[r+1],a=t[r-1];e!==Lj||a===Lj||(a===void 0?i!==void 0&&i!==Lj?t[r+1]=`(?:\\/|`+n+`\\/)?`+i:t[r]=n:i===void 0?t[r-1]=a+`(?:\\/|`+n+`)?`:i!==Lj&&(t[r-1]=a+`(?:\\/|\\/`+n+`\\/)`+i,t[r+1]=Lj))}),t.filter(e=>e!==Lj).join(`/`)}).join(`|`),[a,o]=e.length>1?[`(?:`,`)`]:[``,``];i=`^`+a+i+o+`$`,this.negate&&(i=`^(?!`+i+`).+$`);try{this.regexp=new RegExp(i,[...r].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^\/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e=0;e<i.length;e++){let o=i[e],s=r;if(n.matchBase&&o.length===1&&(s=[a]),this.matchOne(s,o,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return Mj.defaults(e).Minimatch}};Mj.AST=jj,Mj.Minimatch=Vj,Mj.escape=VNe,Mj.unescape=Cj;function Hj(e){let t=new Date;switch(e){case`7d`:t.setUTCDate(t.getUTCDate()-7);break;case`30d`:t.setUTCDate(t.getUTCDate()-30);break;case`3m`:t.setUTCMonth(t.getUTCMonth()-3);break}return t.toISOString()}async function Uj(e,t){let n=t.pageSize??30,{page:r,pageSize:i,order:a=`DESC`,orderBy:o=`periodStart`,...s}=t,{data:c,error:l}=await xv.GET(`/v3/metering/{bucketId}/billing/invoices`,{params:{path:{bucketId:e},query:{page:r,pageSize:n,expand:[`lines`],order:a,orderBy:o,...s}}});if(l||!c)throw l??Error(`Failed to load invoices`);return c}var uPe=15;async function dPe(e,t,n=6){let r=await Uj(e,{page:1,pageSize:n,createdAfter:Hj(`3m`),order:`DESC`,orderBy:`periodStart`,customers:[t]}),i=r.items??[];if(i.length===0||i.every(e=>e.customer?.id===t))return r;let a=[],o=1;for(;a.length<n&&o<=uPe;){let r=await Uj(e,{page:o,pageSize:30,createdAfter:Hj(`3m`),order:`DESC`,orderBy:`periodStart`}),i=r.items??[];if(i.length===0)break;for(let e of i)if(e.customer?.id===t&&(a.push(e),a.length>=n))break;let s=r.pageSize??30,c=Math.max(1,Math.ceil((r.totalCount??0)/s));if(o>=c)break;o++}let s=a.slice(0,n);return{...r,items:s,totalCount:s.length,page:1,pageSize:n}}var Wj={orderBy:`createdAt`,order:`DESC`},Gj=`/v3/metering/{bucketId}/plans`,fPe=`/v3/metering/{bucketId}/customers`;function pPe(e){if(!e)return;let t={};return e.page!=null&&(t.page=e.page,t.pageSize=e.pageSize??30),e.status?.length&&(t.status=e.status),Object.keys(t).length>0?t:void 0}function mPe(e,t){let n=pPe(t);return n?{params:{path:{bucketId:e},query:n}}:{params:{path:{bucketId:e}}}}function hPe(e){if(!e)return;let t={orderBy:e.orderBy??Wj.orderBy,order:e.order??Wj.order};return e.page!=null&&(t.page=e.page,t.pageSize=e.pageSize??30),e.planKey&&(t.planKey=e.planKey),e.name&&(t.name=e.name),e.key&&(t.key=e.key),e.primaryEmail&&(t.primaryEmail=e.primaryEmail),Object.keys(t).length>0?t:void 0}function gPe(e,t){let n=hPe(t);return n?{params:{path:{bucketId:e},query:n}}:{params:{path:{bucketId:e}}}}function _Pe(e){let t={page:e.page??1,pageSize:e.pageSize??30};return e.includeArchived!=null&&(t.includeArchived=e.includeArchived),t}function vPe(e,t,n){return Array.isArray(e)?{items:e,totalCount:e.length,page:t,pageSize:n}:e}var Kj={ai:{providerAssignments:{list:(e,t)=>Sv.queryOptions(`get`,`/v1/accounts/{accountName}/projects/{projectName}/ai-provider-assignments`,{params:{path:{accountName:e,projectName:t}}},{select:e=>e.data})}},deployments:{list:(e,t)=>Sv.queryOptions(`get`,`/v1/accounts/{accountName}/projects/{projectName}/deployments`,{params:{path:{accountName:e,projectName:t}}}),versions:{list:e=>Sv.queryOptions(`get`,`/v1/deployments/{deploymentName}/versions`,{params:{path:{deploymentName:e}}})}},mcp:{origins:{list:e=>Sv.queryOptions(`get`,`/v1/buckets/{bucketId}/mcp/configurations/{configurationId}/origins`,{params:{path:e}})},teams:{list:e=>Sv.queryOptions(`get`,`/v1/buckets/{bucketId}/mcp/configurations/teams`,{params:{path:e}})},server:{listTeams:e=>Sv.queryOptions(`get`,`/v1/buckets/{bucketId}/mcp/configurations/{configurationId}/servers/{virtualServerId}/teams`,{params:{path:e}})},servers:{list:e=>Sv.queryOptions(`get`,`/v1/buckets/{bucketId}/mcp/configurations/{configurationId}/servers`,{params:{path:e}})}},metering:{customers:{list:(e,t)=>Sv.queryOptions(`get`,fPe,gPe(e,t),t?.page==null?void 0:{placeholderData:tv}),get:(e,t)=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/customers/{customerIdOrKey}`,{params:{path:{bucketId:e,customerIdOrKey:t}}}),subscriptions:(e,t)=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/customers/{customerIdOrKey}/subscriptions`,{params:{path:{bucketId:e,customerIdOrKey:t}}})},plans:{list:(e,t)=>Sv.queryOptions(`get`,Gj,mPe(e,t),t?.page==null?void 0:{placeholderData:tv}),get:(e,t)=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/plans/{planId}`,{params:{path:{bucketId:e,planId:t}}}),listByKey:(e,t)=>Sv.queryOptions(`get`,Gj,{params:{path:{bucketId:e},query:{key:[t]}}})},meters:{list:e=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/meters`,{params:{path:{bucketId:e}}})},configuration:{get:e=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/monetization-configuration`,{params:{path:{bucketId:e}}})},features:{list:(e,t)=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/features`,{params:{path:{bucketId:e},query:t?{includeArchived:t}:void 0}},{select:e=>Array.isArray(e)?e:e.items}),listPaginated:(e,t)=>{let n=t.page??1,r=t.pageSize??30;return Sv.queryOptions(`get`,`/v3/metering/{bucketId}/features`,{params:{path:{bucketId:e},query:_Pe(t)}},{select:e=>vPe(e,n,r),placeholderData:tv})}},planInvites:{list:e=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/plan-invites`,{params:{path:{bucketId:e}}})},billingReadiness:{get:e=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/billing-readiness`,{params:{path:{bucketId:e}}})},stripe:{setup:e=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/setup/stripe`,{params:{path:{bucketId:e}}})},subscriptions:{get:(e,t)=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/subscriptions/{subscriptionId}`,{params:{path:{bucketId:e,subscriptionId:t}}}),access:(e,t)=>Sv.queryOptions(`get`,`/v3/metering/{bucketId}/subscriptions/{subscriptionId}/access`,{params:{path:{bucketId:e,subscriptionId:t}}})},invoices:{list:(e,t,n,r,i,a)=>({queryKey:[`metering`,e,`invoices`,t,n,r??`all`,a,i],queryFn:()=>Uj(e,{page:n,pageSize:30,createdAfter:Hj(t),order:i,orderBy:a,...r?.length?{statuses:r}:{}}),placeholderData:tv}),forCustomer:(e,t)=>({queryKey:[`metering`,e,`invoices`,`customer`,t],queryFn:()=>dPe(e,t)})}}},yPe=async e=>qj(e,await a(()=>import(`./editor.main-CFZQhyYc.js`),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),qj=(e,t)=>{let n=e.split(`.`).pop();if(n)return t.languages.getLanguages().find(e=>e.extensions?.includes(`.${n}`))},Jj=e=>{let t=Object.entries(e).flatMap(([e,t])=>t?[[e,t]]:[]);return new URLSearchParams(t).toString()},X={user:{preferences:()=>({url:`${H}/v1/users/me/preferences`})},authApiKey:e=>({url:`${H}/v1/auth/api-keys/${e}`}),authAccountApiKeys:e=>({url:`${H}/v1/auth/api-keys?accountName=${e}`}),authCurrentUserAccountRoles:e=>({url:`${H}/v1/auth/users/me?accountName=${e}`}),authUserAccountRoles:(e,t)=>({url:`${H}/v1/auth/users/${t}?accountName=${e}`}),authProjectUsersRoles:(e,t,{includeInheritedRoles:n}={includeInheritedRoles:!1})=>({url:`${H}/v1/auth/users?accountName=${e}&projectName=${t}&includeInheritedRoles=${n}`}),authAccountUsersRoles:e=>({url:`${H}/v1/auth/users?accountName=${e}`}),mfaFactors:()=>({url:`${H}/v1/mfa/factors`}),accountMemberInviteDetails:e=>({url:`${H}/v1/account-member-invites/${e}`}),accountMemberInvites:e=>({url:`${H}/v1/accounts/${e}/account-member-invites`}),accountAuditLogs:(e,t)=>{let n=new URLSearchParams;t?.limit&&n.append(`limit`,t.limit.toString()),t?.offset&&n.append(`offset`,t.offset.toString()),t?.action&&n.append(`action`,t.action),t?.startDate&&n.append(`startDate`,t.startDate),t?.endDate&&n.append(`endDate`,t.endDate),t?.actor&&n.append(`actor`,t.actor),t?.success!==void 0&&n.append(`success`,t.success.toString());let r=n.toString();return{url:`${H}/v1/accounts/${e}/audit-logs${r?`?${r}`:``}`}},account:e=>({url:`${H}/v1/accounts/${e}`}),accounts:()=>({url:`${H}/v1/accounts`}),accountSourceControlRepoList:e=>({url:`${H}/v1/accounts/${e}/$repo-list`}),accountSourceControlAzureProjects:(e,t)=>({url:`${H}/v1/accounts/${e}/source-control/$azure-projects?organization=${t}`}),accountSourceControlNamespaces:e=>({url:`${H}/v1/accounts/${e}/$namespaces`}),accountSourceControlRepos:(e,t,n)=>({url:`${H}/v1/accounts/${e}/$repos?${new URLSearchParams({namespace:t,query:n??``})}`}),accountsSourceControlConfigurations:()=>({url:`${H}/v1/user/me/source-control-configs`}),accountUsageAnalyticsByDate:(e,t,n)=>({url:`${H}/v1/analytics/${e}/usage?from=${t}&to=${n}&version=2`}),billing:e=>({url:`${H}/v1/accounts/${e}/billings`}),buildLogs:(e,t)=>({url:`${H}/v2/deployments/${e}/build-logs/${t}`}),cdnContent:e=>({url:`${fi}${e}`}),chatIdentity:()=>({url:`${H}/v1/chat-identity`}),knockIdentity:()=>({url:`${H}/v1/knock-identity`}),bucketConfigurations:e=>({url:`${H}/v1/buckets/${e}/configurations`}),bucketConfigurationTeams:e=>({url:`${H}/v1/buckets/${e}/configurations/teams`}),bucketConfigurationApps:e=>({url:`${H}/v1/buckets/${e}/configurations/apps`}),bucketConfiguration:(e,t)=>({url:`${H}/v1/buckets/${e}/configurations/${t}`}),bucketConfigurationUsage:(e,t)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/usage`}),bucketConfigurationMembers:(e,t)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/members`}),bucketConfigurationMember:(e,t,n)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/members/${encodeURIComponent(n)}`}),supportedAiProviders:e=>({url:`${H}/v1/buckets/${e}/providers`}),aiProviderAssignments:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/ai-provider-assignments`}),hierarchicalQuota:e=>({url:`${H}/v1/hierarchical-quota/${e}`}),bucketConfigurationRequestCount:(e,t,n,r,i)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/request-count?${Jj({startDate:n,endDate:r,granularity:i})}`}),bucketConfigurationCostUsage:(e,t,n,r,i)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/cost-usage?${Jj({startDate:n,endDate:r,granularity:i})}`}),bucketConfigurationTokenUsage:(e,t,n,r,i,a)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/token-usage?${Jj({startDate:n,endDate:r,granularity:i,tokenType:a})}`}),bucketConfigurationTtfb:(e,t,n,r,i)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/ttfb?${Jj({startDate:n,endDate:r,granularity:i})}`}),bucketConfigurationBlocksErrorsWarnings:(e,t,n,r,i)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/blocks-errors-warnings?${Jj({startDate:n,endDate:r,granularity:i})}`}),consumer:(e,t)=>({url:`${H}/v1/api-keys/${e}/consumers/${t}`}),consumersForBucket:(e,t)=>{let n=Jj({limit:t?.limit?.toString(),offset:t?.offset?.toString(),name:t?.name,email:t?.email});return{url:`${H}/v1/api-keys/${e}/consumers${n?`?${n}`:``}`}},customDomains:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/custom-domains`}),accountCustomDomains:e=>({url:`${H}/v1/accounts/${e}/custom-domains`}),deploymentVersions:e=>({url:`${H}/v1/deployments/${e}/versions`}),environments:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/deployments`}),environmentVariables:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/environment-variables`}),file:(e,t)=>({url:`${H}/v1/deployments/${e}/fs/file?path=${t}`}),fsStats:e=>({url:`${H}/v1/deployments/${e}/fs/stats`}),gitBranches:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/$branches`}),projectSyncStatus:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/sync-status`}),maxRpsAnalytics:(e,t,n)=>{let r=Jj(n);return{url:`${H}/v2/deployments/${e}/analytics/max-rps?filter=${t}&limit=10${r?`&${r}`:``}`}},meteringBucket:(e,t)=>({url:`${H}/v1/metering/accounts/${e}/buckets/${t}/`}),meteringPlans:(e,t)=>({url:`${H}/v1/metering/accounts/${e}/buckets/${t}/plans`}),meteringSubscriptions:(e,t)=>({url:`${H}/v1/metering/accounts/${e}/buckets/${t}/subscriptions`}),meteringSubscriptionQuotas:(e,t,n)=>({url:`${H}/v1/metering/accounts/${e}/buckets/${t}/subscriptions/${n}/quotas`}),primaryAnalytics:(e,t)=>({url:`${H}/v2/deployments/${e}/analytics/metrics?filter=${t}`}),project:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}`}),projects:e=>({url:`${H}/v1/accounts/${e}/projects`}),permissions:(e,t)=>({url:`${H}/v1/permissions/${e}/${t}`}),permissionsProject:(e,t)=>({url:`${H}/v1/permissions/project/${e}|${t}`}),permissionsAiTeam:e=>({url:`${H}/v1/permissions/ai_team/${e}`}),logViewerRequests:(e,t)=>{let n=new URLSearchParams;return n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.cursor&&n.append(`cursor`,t.cursor),t.limit&&n.append(`limit`,t.limit.toString()),t.httpMethod&&n.append(`httpMethod`,t.httpMethod),t.httpStatus&&n.append(`httpStatus`,t.httpStatus),t.routePath&&n.append(`routePath`,t.routePath),t.search&&n.append(`search`,t.search),t.severity&&n.append(`severity`,t.severity),{url:`${H}/v2/deployments/${e}/logs/requests?${n}`}},logViewerRequestDetail:(e,t,n)=>{let r=new URLSearchParams;n&&r.append(`timestamp`,n);let i=r.toString();return{url:`${H}/v2/deployments/${e}/logs/requests/${t}${i?`?${i}`:``}`}},logViewerHistogram:(e,t)=>{let n=new URLSearchParams;return n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.intervalSeconds&&n.append(`intervalSeconds`,t.intervalSeconds.toString()),t.httpMethod&&n.append(`httpMethod`,t.httpMethod),t.httpStatus&&n.append(`httpStatus`,t.httpStatus),t.routePath&&n.append(`routePath`,t.routePath),t.search&&n.append(`search`,t.search),t.severity&&n.append(`severity`,t.severity),{url:`${H}/v2/deployments/${e}/logs/histogram?${n}`}},logViewerFacets:(e,t)=>{let n=new URLSearchParams;return n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.facets&&n.append(`facets`,t.facets),t.httpMethod&&n.append(`httpMethod`,t.httpMethod),t.httpStatus&&n.append(`httpStatus`,t.httpStatus),t.routePath&&n.append(`routePath`,t.routePath),t.search&&n.append(`search`,t.search),t.severity&&n.append(`severity`,t.severity),{url:`${H}/v2/deployments/${e}/logs/facets?${n}`}},logViewerRequestsScoped:(e,t)=>{let n=new URLSearchParams;return n.append(`account`,e.accountName),e.projectName&&n.append(`project`,e.projectName),e.deploymentName&&n.append(`deploymentName`,e.deploymentName),n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.cursor&&n.append(`cursor`,t.cursor),t.limit&&n.append(`limit`,t.limit.toString()),t.httpMethod&&n.append(`httpMethod`,t.httpMethod),t.httpStatus&&n.append(`httpStatus`,t.httpStatus),t.routePath&&n.append(`routePath`,t.routePath),t.search&&n.append(`search`,t.search),t.severity&&n.append(`severity`,t.severity),{url:`${H}/v2/logs/requests?${n}`}},logViewerRequestDetailScoped:(e,t,n)=>{let r=new URLSearchParams;return r.append(`account`,e.accountName),e.projectName&&r.append(`project`,e.projectName),e.deploymentName&&r.append(`deploymentName`,e.deploymentName),n&&r.append(`timestamp`,n),{url:`${H}/v2/logs/requests/${t}?${r}`}},logViewerHistogramScoped:(e,t)=>{let n=new URLSearchParams;return n.append(`account`,e.accountName),e.projectName&&n.append(`project`,e.projectName),e.deploymentName&&n.append(`deploymentName`,e.deploymentName),n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.intervalSeconds&&n.append(`intervalSeconds`,t.intervalSeconds.toString()),t.httpMethod&&n.append(`httpMethod`,t.httpMethod),t.httpStatus&&n.append(`httpStatus`,t.httpStatus),t.routePath&&n.append(`routePath`,t.routePath),t.search&&n.append(`search`,t.search),t.severity&&n.append(`severity`,t.severity),{url:`${H}/v2/logs/histogram?${n}`}},logViewerFacetsScoped:(e,t)=>{let n=new URLSearchParams;return n.append(`account`,e.accountName),e.projectName&&n.append(`project`,e.projectName),e.deploymentName&&n.append(`deploymentName`,e.deploymentName),n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.facets&&n.append(`facets`,t.facets),t.httpMethod&&n.append(`httpMethod`,t.httpMethod),t.httpStatus&&n.append(`httpStatus`,t.httpStatus),t.routePath&&n.append(`routePath`,t.routePath),t.search&&n.append(`search`,t.search),t.severity&&n.append(`severity`,t.severity),{url:`${H}/v2/logs/facets?${n}`}},tracesListScoped:(e,t)=>{let n=new URLSearchParams;return n.append(`account`,e.accountName),e.projectName&&n.append(`project`,e.projectName),e.deploymentName&&n.append(`deploymentName`,e.deploymentName),n.append(`start`,t.start),n.append(`end`,t.end),t.statusCode&&n.append(`statusCode`,t.statusCode),t.method&&n.append(`method`,t.method),t.route&&n.append(`route`,t.route),t.service&&n.append(`service`,t.service),t.hasError!==void 0&&n.append(`hasError`,String(t.hasError)),t.search&&n.append(`search`,t.search),t.limit&&n.append(`limit`,String(t.limit)),t.cursor&&n.append(`cursor`,t.cursor),{url:`${H}/v2/traces?${n}`}},traceDetailScoped:(e,t)=>{let n=new URLSearchParams;return n.append(`account`,e.accountName),e.projectName&&n.append(`project`,e.projectName),e.deploymentName&&n.append(`deploymentName`,e.deploymentName),{url:`${H}/v2/traces/${encodeURIComponent(t)}?${n}`}},traceStatsScoped:(e,t)=>{let n=new URLSearchParams;return n.append(`account`,e.accountName),e.projectName&&n.append(`project`,e.projectName),e.deploymentName&&n.append(`deploymentName`,e.deploymentName),n.append(`start`,t.start),n.append(`end`,t.end),t.intervalSeconds&&n.append(`intervalSeconds`,t.intervalSeconds.toString()),t.statusCode&&n.append(`statusCode`,t.statusCode),t.method&&n.append(`method`,t.method),t.route&&n.append(`route`,t.route),t.service&&n.append(`service`,t.service),t.hasError!==void 0&&n.append(`hasError`,String(t.hasError)),t.search&&n.append(`search`,t.search),{url:`${H}/v2/trace-stats?${n}`}},traceFacetsScoped:(e,t)=>{let n=new URLSearchParams;return n.append(`account`,e.accountName),e.projectName&&n.append(`project`,e.projectName),e.deploymentName&&n.append(`deploymentName`,e.deploymentName),n.append(`start`,t.start),n.append(`end`,t.end),t.facets&&n.append(`facets`,t.facets),t.statusCode&&n.append(`statusCode`,t.statusCode),t.method&&n.append(`method`,t.method),t.route&&n.append(`route`,t.route),t.service&&n.append(`service`,t.service),t.hasError!==void 0&&n.append(`hasError`,String(t.hasError)),t.search&&n.append(`search`,t.search),{url:`${H}/v2/trace-facets?${n}`}},topRpsAnalytics:(e,t,n,r)=>{let i=Jj(r);return{url:`${H}/v2/deployments/${e}/analytics/top-rps?filter=${t}${n?`&sortBy=${n}`:``}&limit=10${i?`&${i}`:``}`}},topRpsByIpAnalytics:(e,t,n,r)=>{let i=Jj(r);return{url:`${H}/v2/deployments/${e}/analytics/top-rps-by-ip?filter=${t}${n?`&sortBy=${n}`:``}&limit=10${i?`&${i}`:``}`}},topTenIpAddressesAnalytics:(e,t,n)=>{let r=Jj(n);return{url:`${H}/v2/deployments/${e}/analytics/top-ip-addresses?filter=${t}&limit=10${r?`&${r}`:``}`}},topTenLocationsAnalytics:(e,t,n)=>{let r=Jj(n);return{url:`${H}/v2/deployments/${e}/analytics/top-locations?filter=${t}&limit=10${r?`&${r}`:``}`}},topTenRoutesAnalytics:(e,t,n)=>{let r=Jj(n);return{url:`${H}/v2/deployments/${e}/analytics/top-routes?filter=${t}&limit=10${r?`&${r}`:``}`}},topTenSubsAnalytics:(e,t,n)=>{let r=Jj(n);return{url:`${H}/v2/deployments/${e}/analytics/top-subs?filter=${t}&limit=10${r?`&${r}`:``}`}},usersMe:()=>({url:`${H}/v1/users/me`}),identityConnections:e=>({url:`${H}/v1/accounts/${e}/identity-connections`}),identityConnectionTicket:e=>({url:`${H}/v1/accounts/${e}/identity-connections/ticket`}),mcpBucketConfigurations:e=>({url:`${H}/v1/buckets/${e}/mcp/configurations`}),mcpBucketConfigurationTeam:(e,t)=>({url:`${H}/v1/buckets/${e}/mcp/configurations/teams/${t}`}),mcpBucketConfigurationsTeams:e=>({url:`${H}/v1/buckets/${e}/mcp/configurations/teams`}),mcpGatewayIdpMetadata:(e,t)=>({url:`${H}/v1/buckets/${e}/mcp/${t}/idp-metadata`}),mcpGatewayOrigins:(e,t,n)=>{let r=new URLSearchParams;n?.limit&&r.append(`limit`,n.limit.toString()),n?.offset&&r.append(`offset`,n.offset.toString());let i=r.toString();return{url:`${H}/v1/buckets/${t}/mcp/configurations/${e}/origins${i?`?${i}`:``}`}},mcpGatewayOriginServer:(e,t,n)=>({url:`${H}/v1/buckets/${t}/mcp/configurations/${e}/origins/${n}`}),mcpGatewayVirtualServers:(e,t,n)=>{let r=new URLSearchParams;n?.limit&&r.append(`limit`,n.limit.toString()),n?.offset&&r.append(`offset`,n.offset.toString());let i=r.toString();return{url:`${H}/v1/buckets/${t}/mcp/configurations/${e}/servers${i?`?${i}`:``}`}},mcpGatewayVirtualServer:(e,t,n)=>({url:`${H}/v1/buckets/${t}/mcp/configurations/${e}/servers/${n}`}),mcpGatewayVirtualServerTools:(e,t,n)=>({url:`${H}/v1/buckets/${t}/mcp/configurations/${e}/servers/${n}/tools`}),analyticsRequests:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.intervalSeconds&&t.append(`intervalSeconds`,e.intervalSeconds.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return e.compare&&t.append(`compare`,`previous`),{url:`${H}/v2/analytics/requests?${t}`}},analyticsRequestsField:(e,t)=>{let n=new URLSearchParams;if(n.append(`account`,t.accountName),t.projectName&&n.append(`project`,t.projectName),n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.offset!=null&&n.append(`offset`,t.offset.toString()),t.limit!=null&&n.append(`limit`,t.limit.toString()),t.filters)for(let e of t.filters)n.append(`filter`,e);return{url:`${H}/v2/analytics/requests/fields/${e}?${n}`}},analyticsConsumers:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.offset!=null&&t.append(`offset`,e.offset.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/consumers?${t}`}},analyticsAgents:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.offset!=null&&t.append(`offset`,e.offset.toString()),e.includeOther===!0&&t.append(`includeOther`,`true`),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/agents?${t}`}},analyticsAgentsTimeSeries:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.includeOther===!0&&t.append(`includeOther`,`true`),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/agents/timeseries?${t}`}},analyticsBackend:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/backend?${t}`}},analyticsEdge:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/edge?${t}`}},analyticsAiGateway:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.intervalSeconds&&t.append(`intervalSeconds`,e.intervalSeconds.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/ai-gateway?${t}`}},analyticsAiGatewayField:(e,t)=>{let n=new URLSearchParams;if(n.append(`account`,t.accountName),t.projectName&&n.append(`project`,t.projectName),n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.offset!=null&&n.append(`offset`,t.offset.toString()),t.limit!=null&&n.append(`limit`,t.limit.toString()),t.filters)for(let e of t.filters)n.append(`filter`,e);return{url:`${H}/v2/analytics/ai-gateway/fields/${e}?${n}`}},analyticsAiGatewayTimeseries:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),t.append(`groupBy`,e.groupBy),e.intervalSeconds&&t.append(`intervalSeconds`,e.intervalSeconds.toString()),e.limitGroups&&t.append(`limitGroups`,e.limitGroups.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/ai-gateway/timeseries?${t}`}},analyticsMcp:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.intervalSeconds&&t.append(`intervalSeconds`,e.intervalSeconds.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/mcp?${t}`}},analyticsGraphql:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.intervalSeconds&&t.append(`intervalSeconds`,e.intervalSeconds.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/graphql?${t}`}},analyticsMcpField:(e,t)=>{let n=new URLSearchParams;if(n.append(`account`,t.accountName),t.projectName&&n.append(`project`,t.projectName),n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.offset!=null&&n.append(`offset`,t.offset.toString()),t.limit!=null&&n.append(`limit`,t.limit.toString()),t.filters)for(let e of t.filters)n.append(`filter`,e);return{url:`${H}/v2/analytics/mcp/fields/${e}?${n}`}},analyticsMcpCapabilities:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.view&&t.append(`view`,e.view),e.capabilityType&&t.append(`capabilityType`,e.capabilityType),e.limit&&t.append(`limit`,e.limit.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/mcp/capabilities?${t}`}},analyticsMcpEvents:e=>{let t=new URLSearchParams;if(t.append(`account`,e.accountName),e.projectName&&t.append(`project`,e.projectName),t.append(`startTime`,e.startTime),t.append(`endTime`,e.endTime),e.offset!=null&&t.append(`offset`,e.offset.toString()),e.limit!=null&&t.append(`limit`,e.limit.toString()),e.filters)for(let n of e.filters)t.append(`filter`,n);return{url:`${H}/v2/analytics/mcp/events?${t}`}},analyticsMcpBreakdown:(e,t)=>{let n=new URLSearchParams;if(n.append(`account`,t.accountName),t.projectName&&n.append(`project`,t.projectName),n.append(`startTime`,t.startTime),n.append(`endTime`,t.endTime),t.offset!=null&&n.append(`offset`,t.offset.toString()),t.limit!=null&&n.append(`limit`,t.limit.toString()),t.filters)for(let e of t.filters)n.append(`filter`,e);return{url:`${H}/v2/analytics/mcp/breakdowns/${e}?${n}`}},analyticsUsage:e=>{let t=new URLSearchParams;return t.append(`account`,e.accountName),t.append(`from`,e.from),t.append(`to`,e.to),{url:`${H}/v2/analytics/usage?${t}`}}},Yj={auth:{createApiKey:e=>({url:`${H}/v1/auth/api-keys`,method:`POST`,json:!0,body:JSON.stringify(e),invalidateKeys:[X.authAccountApiKeys(e.accountName)],acceptableStatuses:[200]}),deleteApiKey:(e,t)=>({url:`${H}/v1/auth/api-keys/${e}`,method:`DELETE`,invalidateKeys:[X.authApiKey(e),X.authAccountApiKeys(t)],acceptableStatuses:[204]}),updateUsersRole:({userId:e,accountName:t,projectName:n,role:r})=>({url:`${H}/v1/auth/users/${e}`,method:`PATCH`,json:!0,body:JSON.stringify({accountName:t,projectName:n,role:r}),parseResponse:!1,invalidateKeys:n?[X.authProjectUsersRoles(t,n,{includeInheritedRoles:!1}),X.authProjectUsersRoles(t,n,{includeInheritedRoles:!0}),X.authAccountUsersRoles(t)]:[X.authAccountUsersRoles(t)],acceptableStatuses:[201,200]})},accounts:{createAccount:e=>({url:`${H}/v1/accounts`,method:`POST`,json:!0,body:JSON.stringify(e),invalidateKeys:[X.accounts()],acceptableStatuses:[201]}),deleteAccount:e=>({url:`${H}/v1/accounts/${e.name}`,method:`DELETE`,invalidateKeys:[X.accounts()],acceptableStatuses:[200]}),createCustomDomain:({accountName:e,projectName:t,isAlias:n,hostname:r,deploymentName:i,stage:a})=>({url:`${H}/v1/accounts/${e}/custom-domains`,method:`POST`,body:JSON.stringify({hostname:r,isAlias:n,deploymentName:i,stage:a}),invalidateKeys:[X.accounts(),X.projects(e),X.environments(e,t),X.customDomains(e,t),Kj.deployments.list(e,t).queryKey],acceptableStatuses:[200]}),deleteAccountMemberInvite:({accountName:e,inviteId:t})=>({url:`${H}/v1/accounts/${e}/account-member-invites/${t}`,method:`DELETE`,invalidateKeys:[X.accountMemberInvites(e)],acceptableStatuses:[204]}),deleteCustomDomain:({accountName:e,projectName:t,hostname:n,deploymentName:r})=>({url:`${H}/v1/accounts/${e}/custom-domains?hostname=${n}&deploymentName=${r}`,method:`DELETE`,invalidateKeys:[X.accounts(),X.projects(e),X.environments(e,t),X.customDomains(e,t),Kj.deployments.list(e,t).queryKey],acceptableStatuses:[204]}),editCustomDomain:({accountName:e,projectName:t,hostname:n,deploymentName:r})=>({url:`${H}/v1/accounts/${e}/custom-domains`,method:`PATCH`,body:JSON.stringify({hostname:n,deploymentName:r}),invalidateKeys:[X.accounts(),X.projects(e),X.environments(e,t),X.customDomains(e,t),Kj.deployments.list(e,t).queryKey],acceptableStatuses:[200]}),resendAccountMemberInvite:({accountName:e,inviteId:t})=>({url:`${H}/v1/accounts/${e}/account-member-invites/${t}/$resend`,method:`PATCH`,body:JSON.stringify({}),invalidateKeys:[X.accountMemberInvites(e)],acceptableStatuses:[201]}),billingUpgrade:(e,t,n,r)=>({method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({successUrl:n,cancelUrl:r}),url:`${H}/v1/accounts/${e}/upgrade/${t}`}),updateAccount:({accountName:e,...t})=>({url:`${H}/v1/accounts/${e}`,method:`PATCH`,body:JSON.stringify(t),json:!0,invalidateKeys:[X.accounts()],acceptableStatuses:[200]})},ai:{createBucketConfiguration:(e,t)=>({url:`${H}/v1/buckets/${e}/configurations`,method:`POST`,json:!0,body:JSON.stringify(t),acceptableStatuses:[201,200],invalidateKeys:[X.bucketConfigurations(e),X.bucketConfigurationTeams(e)]}),updateBucketConfiguration:(e,t,n)=>({url:`${H}/v1/buckets/${e}/configurations/${t}`,method:`PATCH`,json:!0,body:JSON.stringify(n),acceptableStatuses:[200,201],invalidateKeys:[X.bucketConfigurationTeams(e),X.bucketConfiguration(e,t),X.bucketConfigurations(e)]}),deleteBucketConfiguration:(e,t)=>({url:`${H}/v1/buckets/${e}/configurations/${t}`,method:`DELETE`,acceptableStatuses:[204],invalidateKeys:[X.bucketConfigurations(e)]}),createBucketConfigurationMember:(e,t,n,r)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/members`,method:`POST`,json:!0,body:JSON.stringify({sub:n,role:r}),acceptableStatuses:[201,200],invalidateKeys:[X.bucketConfiguration(e,t),X.bucketConfigurationMembers(e,t)]}),putBucketConfigurationMemberRole:(e,t,n,r)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/members/${encodeURIComponent(n)}`,method:`PUT`,json:!0,body:JSON.stringify({role:r}),acceptableStatuses:[204,200],invalidateKeys:[X.bucketConfiguration(e,t),X.bucketConfigurationMembers(e,t),X.bucketConfigurationTeams(e)]}),deleteBucketConfigurationMember:(e,t,n)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/members/${encodeURIComponent(n)}`,method:`DELETE`,acceptableStatuses:[204],invalidateKeys:[X.bucketConfigurationMembers(e,t)]}),updateBucketConfigurationMember:(e,t,n,r)=>({url:`${H}/v1/buckets/${e}/configurations/${t}/members/${encodeURIComponent(n)}`,method:`PATCH`,json:!0,body:JSON.stringify({role:r}),acceptableStatuses:[200],invalidateKeys:[X.bucketConfigurationMembers(e,t)]}),createBucketAiProvider:(e,{name:t,baseURL:n,label:r,description:i})=>({url:`${H}/v1/buckets/${e}/providers`,method:`POST`,json:!0,body:JSON.stringify({label:r,baseURL:n,name:t,description:i})}),createAiProviderModel:(e,t,{model:n,kind:r,inputCostPerToken:i,outputCostPerToken:a,status:o})=>({url:`${H}/v1/buckets/${e}/providers/${t}/models`,method:`POST`,json:!0,body:JSON.stringify({model:n,kind:r,inputCostPerToken:i,outputCostPerToken:a,status:o}),invalidateKeys:[X.supportedAiProviders(e)],acceptableStatuses:[200]}),createAiProviderAssignment:(e,t,n)=>({url:`${H}/v1/accounts/${e}/projects/${t}/ai-provider-assignments`,method:`POST`,body:JSON.stringify({...n,metadata:JSON.stringify(n.metadata)}),headers:{"content-type":`application/json`},invalidateKeys:[X.aiProviderAssignments(e,t)],acceptableStatuses:[201]}),updateAiProviderAssignment:(e,t,n,r)=>({url:`${H}/v1/accounts/${e}/projects/${t}/ai-provider-assignments/${n}`,method:`PATCH`,body:JSON.stringify({...r,...r.metadata?{metadata:JSON.stringify(r.metadata)}:{}}),headers:{"content-type":`application/json`},invalidateKeys:[X.aiProviderAssignments(e,t)],acceptableStatuses:[200]}),deleteAiProviderAssignment:(e,t,n)=>({url:`${H}/v1/accounts/${e}/projects/${t}/ai-provider-assignments/${n}`,method:`DELETE`,invalidateKeys:[X.aiProviderAssignments(e,t)],acceptableStatuses:[204]})},projects:{createProject:(e,t,{productType:n,...r}={})=>({url:`${H}/v1/accounts/${e}/projects`,method:`POST`,body:JSON.stringify({name:t,productType:n,options:r}),removeKeys:[X.projects(e)],acceptableStatuses:[201]}),createProjectWithRepo:(e,t,n,r,i)=>({url:`${H}/v1/accounts/${e}/projects/$create-with-repo`,method:`POST`,body:JSON.stringify({projectName:t,orgName:n,repositoryName:r,defaultBranch:i}),removeKeys:[X.projects(e)],acceptableStatuses:[201]}),createProjectFromRepo:(e,t,n,r)=>({url:`${H}/v1/accounts/${e}/projects/$create-from-repo`,method:`POST`,body:JSON.stringify({projectName:t,sourceRepoUrl:n,defaultBranch:r}),removeKeys:[X.projects(e)],acceptableStatuses:[201]}),createRepoFromProject:(e,t,n,r,i,a)=>({url:`${H}/v1/accounts/${e}/projects/${t}/$create-repo`,method:`POST`,body:JSON.stringify({orgName:n,repositoryName:r,defaultBranch:i,otherParams:a}),invalidateKeys:[X.projects(e),X.environments(e,t),Kj.deployments.list(e,t).queryKey],acceptableStatuses:[201]}),connectProjectToRepo:(e,t,n,r,i,a)=>({url:`${H}/v1/accounts/${e}/projects/${t}/$connect`,method:`PATCH`,body:JSON.stringify({orgName:n,repositoryURL:r,defaultBranch:i,forceConnect:a}),invalidateKeys:[X.projects(e),X.environments(e,t),Kj.deployments.list(e,t).queryKey],acceptableStatuses:[201]}),disconnectProjectFromRepo:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/$disconnect`,method:`POST`,body:JSON.stringify({}),invalidateKeys:[X.projects(e)],acceptableStatuses:[201]}),initProject:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}/$init`,method:`POST`,body:JSON.stringify({}),invalidateKeys:[X.projects(e)],acceptableStatuses:[201]}),deleteProject:(e,t)=>({url:`${H}/v1/accounts/${e}/projects/${t}`,method:`DELETE`,invalidateKeys:[X.projects(e),Kj.deployments.list(e,t).queryKey],removeKeys:[X.environments(e,t)],acceptableStatuses:[204]}),archiveProject:e=>({url:`${H}/v1/deployments/${e}/archive`,method:`POST`,body:JSON.stringify({}),acceptableStatuses:[200]}),updateDefaultBranch:({accountName:e,projectName:t,defaultBranch:n,sourceRepoUrl:r})=>({url:`${H}/v1/accounts/${e}/projects/${t}/$update-default-branch`,method:`PATCH`,body:JSON.stringify({defaultBranch:n,sourceRepoUrl:r}),headers:{"content-type":`application/json`},invalidateKeys:[X.projects(e),Kj.deployments.list(e,t).queryKey],removeKeys:[X.environments(e,t)],acceptableStatuses:[200]})},consumers:{createConsumer:e=>{let t={...e.consumer,accountName:e.accountName,projectName:e.projectName,environmentType:e.environmentType};return{url:`${H}/v1/api-keys/${e.bucketId}/consumers`,method:`POST`,body:JSON.stringify(t),headers:{"content-type":`application/json`},invalidateKeys:[X.consumersForBucket(e.bucketId)],acceptableStatuses:[201]}},updateConsumer:e=>({url:`${H}/v1/api-keys/${e.bucketId}/consumers/${e.consumer.id}`,method:`PATCH`,body:JSON.stringify({...e.consumer}),headers:{"content-type":`application/json`},invalidateKeys:[X.consumersForBucket(e.bucketId)],acceptableStatuses:[200]}),removeConsumer:e=>({url:`${H}/v1/api-keys/${e.bucketId}/consumers/${e.consumer.id}`,method:`DELETE`,invalidateKeys:[X.consumersForBucket(e.bucketId)]})},environmentVariables:{updateEnvironmentVariable:e=>({url:`${H}/v1/accounts/${e.accountName}/projects/${e.projectName}/environment-variables/${e.variableData.id}`,method:`PATCH`,body:JSON.stringify(e.variableData),invalidateKeys:[X.environmentVariables(e.accountName,e.projectName)],acceptableStatuses:[200]}),createEnvironmentVariable:e=>({url:`${H}/v1/accounts/${e.accountName}/projects/${e.projectName}/environment-variables`,method:`POST`,body:JSON.stringify(e.variableData),invalidateKeys:[X.environmentVariables(e.accountName,e.projectName)],acceptableStatuses:[201]}),deleteEnvironmentVariable:e=>({url:`${H}/v1/accounts/${e.accountName}/projects/${e.projectName}/environment-variables/${e.id}`,method:`DELETE`,invalidateKeys:[X.environmentVariables(e.accountName,e.projectName)],acceptableStatuses:[204]})},users:{updatePreferences:e=>({url:`${H}/v1/users/me/preferences`,method:`PUT`,invalidateKeys:[X.user.preferences()],body:JSON.stringify({data:e}),headers:{"content-type":`application/json`},acceptableStatuses:[200]}),requestVerificationEmail:()=>({url:`${H}/v1/users/me/$send-verification-email`,method:`POST`,invalidateKeys:[],acceptableStatuses:[201]}),enrollMfaFactor:e=>({url:`${H}/v1/mfa/factors/enroll`,method:`POST`,body:JSON.stringify({factor:e}),invalidateKeys:[X.mfaFactors()],acceptableStatuses:[200],json:!0}),deleteMfaEnrollment:e=>({url:`${H}/v1/mfa/factors/enrollments/${e}`,method:`DELETE`,invalidateKeys:[X.mfaFactors()],acceptableStatuses:[200]})},sourceControlCredentials:{tokenExchangeSourceControlCredentials:(e,t,n)=>({url:`${H}/v1/accounts/${e}/source-control-configs/${t}/$token-exchange`,method:`POST`,body:JSON.stringify({code:n}),invalidateKeys:[X.accountsSourceControlConfigurations()],acceptableStatuses:[201]}),revokeSourceControlCredentials:(e,t)=>({url:`${H}/v1/accounts/${e}/source-control-configs/${t}/$revoke-token`,method:`DELETE`,invalidateKeys:[X.accountsSourceControlConfigurations()],acceptableStatuses:[204]})},sourceControlOperations:{commitPush:(e,t,n,r)=>({url:`${H}/v1/accounts/${e}/projects/${t}/$commit-push`,method:`POST`,body:JSON.stringify({branchName:r,commitMessage:n}),acceptableStatuses:[201]}),sync:(e,t,n)=>({url:`${H}/v1/accounts/${e}/projects/${t}/$sync`,method:`POST`,body:JSON.stringify({branchName:n}),acceptableStatuses:[201,200],invalidateKeys:[]})},testDesigner:{makeTestRequest:({environmentName:e,testRequest:t,overrideUrl:n})=>{let r={body:t.body,deployment:e,headers:t.headers,method:t.method,overrideUrl:n,path:t.pathname};return{url:`${li}/v1/test`,method:`POST`,body:JSON.stringify(r),acceptableStatuses:[200],headers:{"content-type":`application/json`}}}},featureRequest:{requestFeature:({email:e,featureName:t,information:n})=>{let r={featureName:t,information:{email:e,...n}};return{url:`${H}/v1/feature-access-request`,method:`POST`,body:JSON.stringify(r),acceptableStatuses:[200],headers:{"content-type":`application/json`}}}},fileTransactions:{saveFile:({environmentName:e,file:t})=>{let n={"content-type":`text/plain`};return t.lastModified&&(n[`if-unmodified-since`]=new Date(t.lastModified).toUTCString()),{url:`${H}/v1/deployments/${e}/fs/file?path=${t.path}`,method:`POST`,body:t.content,headers:n,acceptableStatuses:[204,200],invalidateKeys:[X.file(e,t.path),X.deploymentVersions(e),Kj.deployments.versions.list(e).queryKey]}},renameFile:({environmentName:e,path:t,newPath:n})=>({url:`${H}/v1/deployments/${e}/fs/file?path=${t}`,method:`PATCH`,body:JSON.stringify({newPath:n}),acceptableStatuses:[204,200],headers:{"content-type":`application/json`},invalidateKeys:[]}),saveMultipleFiles:async({environmentName:e,files:t})=>{let n=new FormData,r={};for(let e of t)if(e.lastModified){let t=`x-if-unmodified-since-${encodeURIComponent(e.path)}`;r[t]=new Date(e.lastModified).toUTCString()}for(let{content:e,path:r}of t){let t=(await yPe(r))?.id;n.append(`files[]`,new File([e??``],r,{type:t===`text/typescript`?`text/javascript`:t}),r)}let i=t.map(({path:t})=>X.file(e,t));return{url:`${H}/v1/deployments/${e}/fs/files`,method:`POST`,body:n,headers:r,acceptableStatuses:[204,200],invalidateKeys:[...i,X.deploymentVersions(e),Kj.deployments.versions.list(e).queryKey]}},deleteFile:({environmentName:e,filePath:t})=>({url:`${H}/v1/deployments/${e}/fs/delete?path=${t}`,method:`DELETE`,acceptableStatuses:[204,200]})},directories:{createDirectory:({environmentName:e,path:t})=>({url:`${H}/v1/deployments/${e}/fs/dir?path=${t}`,method:`POST`,body:JSON.stringify({}),acceptableStatuses:[201]})},environments:{redeploy:({environmentName:e,isWorkingCopy:t,version:n})=>({url:t?`${H}/v1/deployments/${e}/$redeploy`:`${H}/v1/deployments/${e}/versions/${n}/$redeploy`,method:`POST`,body:JSON.stringify({}),acceptableStatuses:[200],invalidateKeys:[X.deploymentVersions(e),Kj.deployments.versions.list(e).queryKey]}),delete:({environmentName:e})=>({url:`${H}/v1/deployments/${e}`,method:`DELETE`,body:JSON.stringify({}),acceptableStatuses:[200]})},accountInvite:{acceptAccountInvite:e=>({url:`${H}/v1/account-member-invites/${e}`,method:`POST`,body:JSON.stringify({}),invalidateKeys:[X.accounts()],acceptableStatuses:[201]}),createAccountInvite:(e,t,n)=>{let r=n?.project?.name?[X.authProjectUsersRoles(e,n.project.name),n.team?.id?X.bucketConfigurationMembers(n.team?.bucketId,n.team?.id):[],X.authProjectUsersRoles(e,n.project.name,{includeInheritedRoles:!1}),X.authProjectUsersRoles(e,n.project.name,{includeInheritedRoles:!0})].flat():[];return{url:`${H}/v1/accounts/${e}/account-member-invites`,method:`POST`,body:JSON.stringify({userEmail:t,metadata:n}),invalidateKeys:[X.accountMemberInvites(e),X.authAccountUsersRoles(e),...r],acceptableStatuses:[201]}}},identity:{chatIdentity:e=>({url:`${H}/v1/chat-identity`,method:`POST`,json:!0,headers:{"content-type":`application/json`},body:JSON.stringify(e),invalidateKeys:[X.chatIdentity()],acceptableStatuses:[200]})},metering:{createMeteringPlan:(e,t,n)=>({url:`${H}/v1/metering/accounts/${e}/buckets/${t}/plans`,method:`POST`,headers:{"Content-Type":`application/json`},invalidateKeys:[X.meteringPlans(e,t),X.meteringBucket(e,t)],body:JSON.stringify(n)}),deleteMeteringPlan:(e,t,n)=>({url:`${H}/v1/metering/accounts/${e}/buckets/${t}/plans/${n}`,invalidateKeys:[X.meteringPlans(e,t),X.meteringBucket(e,t)],method:`DELETE`}),updateMeteringPlan:(e,t,{id:n,...r})=>({url:`${H}/v1/metering/accounts/${e}/buckets/${t}/plans/${n}`,invalidateKeys:[X.meteringPlans(e,t),X.meteringBucket(e,t)],method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)})},mcpGateway:{deleteMcpTeam:(e,t)=>({url:`${H}/v1/buckets/${e}/mcp/configurations/teams/${t}`,method:`DELETE`,acceptableStatuses:[204],invalidateKeys:[X.mcpBucketConfigurationsTeams(e)]}),createMcpTeam:(e,t)=>({url:`${H}/v1/buckets/${e}/mcp/configurations/teams`,method:`POST`,json:!0,body:JSON.stringify(t),acceptableStatuses:[201,200],invalidateKeys:[X.mcpBucketConfigurationsTeams(e)]}),updateMcpTeam:(e,t,n)=>({url:`${H}/v1/buckets/${e}/mcp/configurations/teams/${t}`,method:`PATCH`,json:!0,body:JSON.stringify(n),acceptableStatuses:[201,200],invalidateKeys:[X.mcpBucketConfigurations(e),X.mcpBucketConfigurationsTeams(e),X.mcpBucketConfigurationTeam(e,t)]})},logs:{sourcemap:e=>({url:`${H}/v1/logs/sourcemap`,method:`POST`,json:!0,body:JSON.stringify(e),acceptableStatuses:[200]})},identityConnections:{createTicket:e=>({url:`${H}/v1/accounts/${e}/identity-connections/ticket`,method:`POST`,json:!0,body:JSON.stringify({}),invalidateKeys:[X.identityConnections(e)],acceptableStatuses:[200]})},migration:{migrateDevPortal:e=>({url:`${H}/v1/migrate/dev-portal`,method:`POST`,json:!1,body:JSON.stringify({deploymentName:e}),headers:{"content-type":`application/json`},acceptableStatuses:[200]})}},Xj=e=>{let t=mv(),n=z_(),r=Eae();return{fetch:async i=>{let a=bi(),o;try{o=await Uoe(t=>{let n=new Headers(i.headers);return i.json&&i.method!==`DELETE`&&n.set(`content-type`,`application/json`),n.set(`authorization`,`Bearer ${t}`),n.set(`zuplo-request-id`,a),fetch(i.url,{...e,method:i.method,headers:n,body:i.body})},n,r)}catch(e){throw e instanceof si&&e.setTraceId(a),e instanceof TypeError?new oi({type:`https://zup.fail/api-request-failed`,title:`API request failed`,status:500,instance:i.url,traceId:a}):e}if(!(i.acceptableStatuses??[200]).includes(o.status)){let e=new si(`Unexpected response: ${o.status} calling ${i.method}: ${i.url}`,{traceId:a});throw await e.tryReadResponse(o),e}return i.invalidateKeys?.forEach(e=>{if(Array.isArray(e))t.invalidateQueries({queryKey:e,exact:!1});else if(`url`in e&&e.url){let n=e.url.split(`?`)[0];t.invalidateQueries({predicate:e=>{let t=e.queryKey[0];return typeof t==`string`&&t.split(`?`)[0]===n}})}}),i.removeKeys?.forEach(e=>{t.removeQueries({queryKey:[e.url]})}),i.parseResponse===!1?o:i.json?await o.json():o}}},bPe=()=>{let e=Xj();return bv({mutationFn:async t=>await e.fetch(Yj.directories.createDirectory(t))})},xPe=`API request failed`;async function Zj(e,t,n={}){let{text:r,extractData:i}=n;if(!e||typeof e!=`string`)throw new oi({type:`https://zup.fail/missing-url`,title:`Missing URL`});let a=bi(),o;try{o=await Uoe(t=>{let n=new Request(e);return n.headers.set(`authorization`,`Bearer ${t}`),n.headers.set(`zuplo-request-id`,a),fetch(n)},t,()=>{wi().then(({handleLogout:e})=>e())})}catch(t){throw t instanceof TypeError?new oi({type:`https://zup.fail/api-request-failed`,title:xPe,instance:e,traceId:a},{cause:t}):(t instanceof si&&t.setTraceId(a),t)}if(!o.ok){let e=new si(`Error while making request. Please try again or contact support if the problem persists.`,{traceId:a});throw await e.tryReadResponse(o),e}try{let e=r?await o.clone().text():await o.clone().json();return i?e.data:e}catch(t){let n=await o.clone().text();throw M_.captureException(t,{message:`Failed to parse response of ${e} to JSON`,responseText:n,status:o.status,traceId:a,requestUrl:e}),t}}function SPe(e,t={}){let n=z_();return zoe({queries:e.map(e=>({queryKey:[e.url,t.extractData],queryFn:()=>Zj(e.url,n,t)}))})}function Qj(e,{text:t,extractData:n=!0,...r}={}){let i=z_();return yv({queryKey:[e.url,n],queryFn:async({queryKey:e})=>{let[r]=e;return Zj(r,i,{text:t,extractData:n})},...r})}function $j(e,{enabled:t,text:n,extractData:r,...i}={}){let a=z_();return vv({enabled:t,queryKey:[e.url,r],queryFn:async({queryKey:e})=>{let[t]=e;return Zj(t,a,{text:n,extractData:r})},...i})}var eM={".ts":`typescript`,".tsx":`typescript`,".js":`javascript`,".jsx":`javascript`,".mjs":`javascript`,".cjs":`javascript`,".json":`json`,".html":`html`,".htm":`html`,".xml":`xml`,".svg":`xml`,".yaml":`yaml`,".yml":`yaml`,".md":`markdown`,".mdx":`markdown`,".css":`css`,".scss":`scss`,".sass":`sass`,".less":`less`,".py":`python`,".rs":`rust`,".go":`go`,".java":`java`,".c":`c`,".cpp":`cpp`,".cs":`csharp`,".php":`php`,".rb":`ruby`,".sh":`shell`,".bash":`shell`,".zsh":`shell`,".sql":`sql`,".graphql":`graphql`,".gql":`graphql`,".env":`plaintext`,".toml":`toml`,".ini":`ini`,".properties":`properties`,".dockerfile":`dockerfile`,Dockerfile:`dockerfile`,".makefile":`makefile`,Makefile:`makefile`};function tM(e){let t=e.split(`/`).pop()||``;if(eM[t])return eM[t];let n=t.lastIndexOf(`.`);return n===-1?`plaintext`:eM[t.slice(n)]||`plaintext`}var CPe=(e,t,n)=>$j(X.file(e,t),{...n,text:!0,select:e=>({content:e,contentType:`text/plain`,language:tM(t),path:t})}),nM=()=>{let e=Xj();return bv({mutationFn:async t=>{let n=await e.fetch({...Yj.fileTransactions.saveFile(t),parseResponse:!1}),r=n.headers.get(`Last-Modified`),i=r?new Date(r).getTime():void 0;return{...await n.json(),lastModified:i}}})},rM=e=>{let t=Xj();return bv({mutationFn:async e=>{if(!e.environmentName||!e.files)throw Error(`No environment name or files provided`);return await(await t.fetch(await Yj.fileTransactions.saveMultipleFiles(e))).json()},mutationKey:rM.mutationKey,...e})};rM.mutationKey=[`saveStatus`];var wPe=()=>{let e=Xj();return bv({mutationFn:async t=>await e.fetch(Yj.fileTransactions.deleteFile(t))})},TPe=()=>{let e=Xj();return bv({mutationFn:async t=>await e.fetch(Yj.fileTransactions.renameFile(t))})},iM=null,aM=null;function EPe(){return aM??=a(()=>import(`./editor.main-CFZQhyYc.js`).then(e=>(iM=e,e)),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),aM}function oM(){let[e,t]=(0,g.useState)(iM);return(0,g.useEffect)(()=>{if(iM){t(iM);return}let e=!0;return EPe().then(n=>{e&&t(n)}),()=>{e=!1}},[]),e}function sM(e,t,n){let r=(0,g.useRef)(!1);(0,g.useEffect)(()=>{if(!e)return;if(!r.current){r.current=!0;return}let i=requestAnimationFrame(()=>{if(n.current)try{e.editor.setTheme(t)}catch{}});return()=>cancelAnimationFrame(i)},[e,t,n])}var cM={display:`flex`,position:`relative`,textAlign:`initial`};function DPe({value:e,defaultValue:t,language:n,defaultLanguage:r,path:i,theme:a=`vs`,line:o,options:s={},overrideServices:c,onChange:l,onMount:u,beforeMount:d,className:f,width:p=`100%`,height:m=`100%`,keepCurrentModel:h=!1,wrapperProps:_}){let v=oM(),y=(0,g.useRef)(null),b=(0,g.useRef)(null),x=(0,g.useRef)(l);x.current=l;let S=(0,g.useRef)(h);S.current=h;let C=(0,g.useRef)(!1);return(0,g.useEffect)(()=>{if(!v)return;let l=y.current;if(!l)return;d?.(v);let f=i?v.Uri.parse(i):void 0,p=f&&v.editor.getModel(f)||v.editor.createModel(e??t??``,n??r,f),m=v.editor.create(l,{...s,model:p,theme:a},c);b.current=m,o!=null&&m.revealLine(o);let h=m.onDidChangeModelContent(e=>{C.current||x.current?.(m.getValue(),e)});return u?.(m,v),()=>{h.dispose();let e=m.getModel();m.dispose(),S.current||e?.dispose(),b.current=null}},[v]),(0,g.useEffect)(()=>{let t=b.current;if(!t||e===void 0)return;let n=t.getModel();!n||e===n.getValue()||(C.current=!0,t.executeEdits(``,[{range:n.getFullModelRange(),text:e,forceMoveMarkers:!0}]),t.pushUndoStop(),C.current=!1)},[e]),(0,g.useEffect)(()=>{let e=b.current?.getModel();v&&e&&n&&v.editor.setModelLanguage(e,n)},[v,n]),sM(v,a,b),(0,g.useEffect)(()=>{b.current?.updateOptions(s)},[s]),(0,g.useEffect)(()=>{o!=null&&b.current?.revealLine(o)},[o]),(0,U.jsx)(`section`,{..._,style:{...cM,width:p,height:m},children:(0,U.jsx)(`div`,{ref:y,className:f,style:{width:`100%`}})})}function OPe({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,theme:a=`vs`,options:o={},onMount:s,beforeMount:c,className:l,width:u=`100%`,height:d=`100%`,keepCurrentOriginalModel:f=!1,keepCurrentModifiedModel:p=!1,wrapperProps:m}){let h=oM(),_=(0,g.useRef)(null),v=(0,g.useRef)(null),y=(0,g.useRef)(f);y.current=f;let b=(0,g.useRef)(p);return b.current=p,(0,g.useEffect)(()=>{if(!h)return;let l=_.current;if(!l)return;c?.(h);let u=h.editor.createDiffEditor(l,{...o,theme:a});return v.current=u,u.setModel({original:h.editor.createModel(e??``,r??n),modified:h.editor.createModel(t??``,i??n)}),s?.(u,h),()=>{let e=u.getModel();u.dispose(),y.current||e?.original.dispose(),b.current||e?.modified.dispose(),v.current=null}},[h]),(0,g.useEffect)(()=>{let t=v.current?.getModel();t&&e!=null&&e!==t.original.getValue()&&t.original.setValue(e)},[e]),(0,g.useEffect)(()=>{let e=v.current?.getModel();e&&t!=null&&t!==e.modified.getValue()&&e.modified.setValue(t)},[t]),sM(h,a,v),(0,U.jsx)(`section`,{...m,style:{...cM,width:u,height:d},children:(0,U.jsx)(`div`,{ref:_,className:l,style:{width:`100%`}})})}var lM=(e=[])=>{let t=On(),n=Object.keys(t);if(e.some(e=>!n.includes(e)))throw Error(`${e.join(`, `)} are required`);return t};function uM(e,t){let n=t.map(e=>e.fileGlob),r=t.flatMap(e=>{let t=[e.folderName];return e.subdirectoryGlob?t.concat(e.subdirectoryGlob):t});return e.filter(e=>e.type===Zr.Directory&&r.some(t=>Mj(e.path,t))?!0:n.find(t=>Mj(e.path,t))!==void 0)}function kPe(e,t){return(0,g.useCallback)(async()=>uM(await ki(t,`/`),e),[t,e])}function dM(){let{logEvent:e}=I_(),t=yM(),n=wu(),r=Cu(e=>e.showSaveConflict);return rM({onMutate:({files:e})=>{e.forEach(e=>{t({...e,saveState:Qr.saving})})},onSuccess:async(e,{files:n})=>{n.forEach(n=>{let r=e.files?.[n.path];_.default.debug(`Updated ${n.path} after save - lastModified: ${r}`),t({...n,lastModified:r,saveState:Qr.unmodified})})},onError:(i,{files:a})=>{if(i instanceof Error&&`status`in i&&i.status===412){let e=i;if(e.instance)try{let t=JSON.parse(e.instance).conflictedFiles;t&&t.length>0&&r(t[0])}catch(e){_.default.error(`Failed to parse conflict error instance data`,e)}return}a.forEach(e=>{t({...e,saveState:Qr.modified})}),e(`file-save-failed`,{fileNames:n.map(e=>e.path).join(`, `)})}})}function fM(){let e=gu(),{logEvent:t,captureException:n}=I_(),r=vM(),i=yM(),a=wPe(),{isReadOnly:o}=_j(),{execute:s}=hj(async s=>{if(o)return{success:!1,error:Error(`Unable to delete file - environment is read-only`)};let c=s.saveState;i({...s,saveState:Qr.removing});try{return await a.mutateAsync({environmentName:e.environment.name,filePath:s.path}),r(s.path),t(`file-deleted`,{fileName:s.path,account:e.account.name,project:e.project.name,environment:e.environment.name}),{success:!0}}catch(r){return t(`file-deletion-failed`,{account:e.account.name,project:e.project.name,environment:e.environment.name}),n(r),i({...s,saveState:c}),{success:!1,error:r}}});return s}function pM(){let e=oM(),{logEvent:t,captureException:n}=I_(),r=yM(),i=Cu(e=>e.projectTreeNodes),a=nM(),o=gu([`account`,`project`,`environment`]),{execute:s}=hj(async(s,c,l,u,d)=>{if(!e)return;let f=l??u.defaultFileTemplate,p=u.createExtensions[f],m=`${c}/${!p||s.toLowerCase().endsWith(`.${p}`)||s===u.predefinedTemplateFilename?.[f]?s:`${s}.${p}`}`,h=(l&&u.newFileTemplates[l]?.trimStart())??d??``,g=i.find(e=>e.path===m);if(g)return g;if(i.length===0){let e=(await ki(o.environment.name,c).catch(()=>[])).find(e=>e.path===m);if(e)return e}let _={content:h,path:m},v={saveState:Qr.new,type:Zr.File,..._};try{r(v),e.editor.createModel(_.content??``,void 0,e.Uri.file(m));let n=await a.mutateAsync({environmentName:o.environment.name,file:_,accountName:o.account.name,projectName:o.project.name});return r({...v,lastModified:n.lastModified,saveState:Qr.unmodified}),t(`file-added`,{account:o.account.name,project:o.project.name,environment:o.environment.name,fileName:v.path,strategy:u.name}),_}catch(e){t(`file-creation-failed`,{environment:o.environment.name}),n(e),r({...v,saveState:Qr.modified});return}});return s}function APe(e){let t=oM(),{logEvent:n,captureException:r}=I_(),i=lM([`account`,`project`]),a=yM(),o=vM(),s=TPe(),{execute:c}=hj(async(c,l)=>{if(t)try{a({...c,saveState:Qr.removing}),await s.mutateAsync({environmentName:e,path:c.path,newPath:l}),a({...c,saveState:Qr.new,path:l}),t.editor.createModel(c.content??``,void 0,t.Uri.file(l));let r=t.editor.getModel(t.Uri.file(c.path));a({...c,path:l}),r?.dispose(),o(c.path),n(`file-renamed`,{fileName:c.path,environment:e})}catch(t){n(`file-rename-failed`,{account:i.account,project:i.project,environment:e}),r(t),a({...c,saveState:Qr.unmodified});return}});return c}function jPe(e){let t=oM(),{logEvent:n,captureException:r}=I_(),i=yM(),a=bPe(),{execute:o}=hj(async(o,s,c)=>{if(!t)return Error(`Failed to acquire monaco instance. Please refresh the page.`);let l=`${s}/${o}`,u={path:l},d={saveState:Qr.new,type:Zr.Directory,...u};try{return i(d),await a.mutateAsync({environmentName:e,path:l}),i({...d,saveState:Qr.unmodified}),n(`directory-added`,{fileName:d.path,strategy:c.name,environment:e}),u}catch(t){return n(`directory-creation-failed`,{environment:e}),r(t),i({...d,saveState:Qr.modified}),t}});return o}function mM(){return gM(vj().get(`path`))}function hM(){let e=oM(),t=yM();return(0,g.useCallback)((n,r=!1,i=Qr.modified)=>{if(t({...n,saveState:i}),r&&e){let t=e.editor.getModel(e.Uri.file(n.path));t&&t.setValue(n.content??``)}},[e,t])}function gM(e){return Cu(t=>e?t.filesByPath[e]:void 0)}function MPe(e){let t=Cu(e=>e.projectTreeNodes),n=[],r=Object.values(e);return t.filter(e=>e.type===Zr.Directory).forEach(e=>{let t=r.find(t=>t.folderName===e.path);if(t)return n.push(t)}),r.sort((e,t)=>e.order-t.order)}function _M(e){return Cu(e=>e.projectTreeNodes).filter(t=>!t.path&&!e.fileGlob?!1:t.type===Zr.Directory&&e.subdirectoryGlob?Mj(t.path,e.subdirectoryGlob):Mj(t.path,e.fileGlob))}function vM(){let e=oM(),t=Cu(e=>e.removeFile),n=Cu(e=>e.filterProjectTreeNodes);return r=>{e&&e.editor.getModel(e.Uri.file(r))?.dispose(),t(r),n(e=>e.path!==r)}}function yM(){return Cu(e=>e.updateFile)}var NPe=e=>{let t=hM(),n=gM(e);return e=>{n&&t(n,!0,e)}};function bM(e,t){return[...e.slice(0,t),...e.slice(t+1)]}function xM(e){return`$import(${e})`}function PPe(e){let t=e.split(`/`).pop();return t?t.replace(`.ts`,``):``}function SM(e,t){let n=/\$import\((.*?)\)/g.exec(e);if(!n||n.length!==2)return`INVALID IMPORT STATEMENT`;let r=n[1];return t!==void 0&&r.indexOf(t)===0?r.substring(t.length):r}var CM=e=>{let t=``;switch(e){case`GITLAB`:t=`GitLab`;break;case`GITHUB`:t=`GitHub`;break;case`BITBUCKET`:t=`Bitbucket`;break;case`AZURE`:t=`Azure DevOps`;break;default:t=e;break}return t},FPe=(e,t)=>{let n=t.accounts.filter(t=>t.name===e),r;if(n[0].sourceControlConfigurations&&n[0].sourceControlConfigurations.length>0)r=n[0].sourceControlConfigurations[0];else{let e=t.global.filter(e=>e.provider===n[0].sourceControlProvider);r=e.length>0?e[0]:null}return r};function wM(e){if(!e)return``;if(typeof e==`object`){if(e instanceof si)return e.detail??e.title??e.message;if(`message`in e)return e.message}return typeof e==`string`?e:``}var TM=({error:e,size:t=24})=>{switch(e.status){case 401:return(0,U.jsx)(bl,{size:t});case 403:return(0,U.jsx)(wee,{size:t});case 404:return(0,U.jsx)(Cc,{size:t});default:return(0,U.jsx)(Ac,{size:t})}},IPe=({error:e})=>(0,U.jsx)(`div`,{className:`flex items-center gap-2 rounded-full border-2 border-neutral-100 bg-neutral-50 text-neutral-300 p-4`,children:(0,U.jsx)(TM,{error:e})}),LPe=({error:e})=>{switch(e.status){case 401:return(0,U.jsx)(nE,{href:`https://zuplo.com/docs/articles/accounts/managing-account-members`,children:`Learn more about Managing Account Members`});default:return null}},RPe=({error:e,title:t=`Unable to access`,children:n,className:r,variant:i=`default`})=>(0,U.jsxs)(AC,{variant:i,className:W(`w-full flex items-center gap-8`,r),children:[(0,U.jsx)(IPe,{error:e}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(jC,{children:t}),(0,U.jsxs)(MC,{className:`flex flex-col gap-2`,children:[wM(e),(0,U.jsx)(LPe,{error:e}),n]})]})]}),EM=({successMessage:e}={})=>{let t=mu();return{onSuccess:n=>{t.success(n??e,{icon:(0,U.jsx)(wc,{size:18})})},onError:e=>t.error(wM(e),{icon:e instanceof si?(0,U.jsx)(TM,{error:e,size:18}):(0,U.jsx)(Ac,{size:18})})}},DM=(e,t,n)=>vv({...Kj.deployments.list(e,t),...n,select:e=>e.data}),OM=(e,t={})=>Boe({...Kj.deployments.versions.list(e),...t,select:e=>({...e,data:e.data?.map(e=>({...e,stages:[...e.stages].sort((e,t)=>e.stage.localeCompare(t.stage))}))})}),kM=(e,t={})=>yv(OM(e,t)),zPe=()=>{let e=gu(),t=dM(),n=wu();return kM(e.environment.name),{isPending:t.isPending,isSuccess:t.isSuccess,saveAndDeploy:(0,g.useCallback)(async()=>t.mutateAsync({environmentName:e.environment.name,accountName:e.account.name,projectName:e.project.name,files:n}).catch(e=>{if(!(e instanceof Error&&`status`in e&&e.status===409))throw e}),[t,n,!1,e.environment.name,e.account.name,e.project.name])}},BPe=(e={})=>{let{isReadOnly:t=!1,onSave:n}=e,{saveAndDeploy:r,isPending:i,isSuccess:a}=zPe(),[o,s]=(0,g.useState)(null),c=Cu(e=>{let t=0;for(let n of e.projectTreeNodes){let r=n.path?e.filesByPath[n.path]:void 0;r&&r.saveState===Qr.modified&&t++}return t}),l=Cu(e=>{let t=0;for(let n of e.projectTreeNodes){let r=n.path?e.filesByPath[n.path]:void 0;r&&(r.saveState===Qr.modified||r.saveState===Qr.saving)&&t++}return t}),u=(0,g.useRef)(null),d=e=>{s(e),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{s(null)},1600)},f=mj(r),p=mj(n),m=pu(e=>e.addToast),h=(0,g.useRef)(!1),v=(0,g.useRef)(!1);return(0,g.useEffect)(()=>{let e=h.current;!e&&i?v.current=l>0:e&&!i&&a&&v.current&&(m({message:`Changes saved`,icon:(0,g.createElement)(wc,{size:18}),duration:2e3}),v.current=!1),h.current=i},[i,a,l,m]),(0,g.useEffect)(()=>{let e=async e=>{try{if(e.code===`KeyS`&&(e.metaKey||e.ctrlKey)){if(e.preventDefault(),t){d(`Read only environment`);return}let n=document.activeElement;if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement){let e=n.selectionEnd;n.blur(),n.focus(),(n instanceof HTMLInputElement&&n.type!==`checkbox`||n instanceof HTMLTextAreaElement)&&n.setSelectionRange(e,e),await CNe(100)}if(c===0){d(`No unsaved changes`);return}p.current?.(),await f.current()}}catch(e){_.default.error(`Error saving files:`,e),s(`Error saving files`)}};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[t,c,f,p]),{showTooltip:o,isSaving:i,unsavedChangesCount:c,saveAll:r}},VPe=()=>{let{showTooltip:e,saveAll:t,isSaving:n,unsavedChangesCount:r}=BPe(),{hasEditor:i,editorName:a,isLoading:o,showPreferenceDialog:s,setShowPreferenceDialog:c,availableEditors:l,savePreference:u,openInEditor:d}=SNe();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`sticky bottom-0 h-12 border-t bg-surface-sunken items-center flex px-2 gap-x-2`,children:[(0,U.jsx)(sA,{open:!!e,content:e??``,children:(0,U.jsx)(Y,{variant:r>0||n?`default`:`ghost`,size:`sm`,className:`text-xs`,"data-test":`save`,disabled:n,onClick:async()=>{await t()},children:(0,U.jsxs)(lA,{className:`flex items-center gap-1 text-xs relative`,loading:n,children:[`Save`,(0,U.jsx)(`span`,{className:r>0?`text-white`:`text-muted-foreground`,children:`[⌘+S]`})]})})}),!o&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`h-6 w-px bg-border`}),(0,U.jsx)(sA,{content:i?`Open in ${a}`:`Choose editor to open files`,children:(0,U.jsxs)(Y,{variant:`ghost`,size:`sm`,onClick:d,className:`text-xs`,children:[(0,U.jsx)(Yc,{size:14}),`Open in Editor`]})})]})]}),(0,U.jsx)(xNe,{open:s,editors:l,onSelect:u,onCancel:()=>c(!1)})]})},AM=(0,g.createContext)(null);AM.displayName=`PanelGroupContext`;var jM={group:`data-panel-group`,groupDirection:`data-panel-group-direction`,groupId:`data-panel-group-id`,panel:`data-panel`,panelCollapsible:`data-panel-collapsible`,panelId:`data-panel-id`,panelSize:`data-panel-size`,resizeHandle:`data-resize-handle`,resizeHandleActive:`data-resize-handle-active`,resizeHandleEnabled:`data-panel-resize-handle-enabled`,resizeHandleId:`data-panel-resize-handle-id`,resizeHandleState:`data-resize-handle-state`},MM=10,NM=g.useLayoutEffect,PM=g.useId,HPe=typeof PM==`function`?PM:()=>null,UPe=0;function FM(e=null){let t=HPe(),n=(0,g.useRef)(e||t||null);return n.current===null&&(n.current=``+ UPe++),e??n.current}function IM({children:e,className:t=``,collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:a,id:o,maxSize:s,minSize:c,onCollapse:l,onExpand:u,onResize:d,order:f,style:p,tagName:m=`div`,...h}){let _=(0,g.useContext)(AM);if(_===null)throw Error(`Panel components must be rendered within a PanelGroup container`);let{collapsePanel:v,expandPanel:y,getPanelSize:b,getPanelStyle:x,groupId:S,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:T,resizePanel:E,unregisterPanel:D}=_,O=FM(o),k=(0,g.useRef)({callbacks:{onCollapse:l,onExpand:u,onResize:d},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:s,minSize:c},id:O,idIsFromProps:o!==void 0,order:f});(0,g.useRef)({didLogMissingDefaultSizeWarning:!1}),NM(()=>{let{callbacks:e,constraints:t}=k.current,a={...t};k.current.id=O,k.current.idIsFromProps=o!==void 0,k.current.order=f,e.onCollapse=l,e.onExpand=u,e.onResize=d,t.collapsedSize=n,t.collapsible=r,t.defaultSize=i,t.maxSize=s,t.minSize=c,(a.collapsedSize!==t.collapsedSize||a.collapsible!==t.collapsible||a.maxSize!==t.maxSize||a.minSize!==t.minSize)&&w(k.current,a)}),NM(()=>{let e=k.current;return T(e),()=>{D(e)}},[f,O,T,D]),(0,g.useImperativeHandle)(a,()=>({collapse:()=>{v(k.current)},expand:e=>{y(k.current,e)},getId(){return O},getSize(){return b(k.current)},isCollapsed(){return C(k.current)},isExpanded(){return!C(k.current)},resize:e=>{E(k.current,e)}}),[v,y,b,C,O,E]);let A=x(k.current,i);return(0,g.createElement)(m,{...h,children:e,className:t,id:O,style:{...A,...p},[jM.groupId]:S,[jM.panel]:``,[jM.panelCollapsible]:r||void 0,[jM.panelId]:O,[jM.panelSize]:parseFloat(``+A.flexGrow).toFixed(1)})}var LM=(0,g.forwardRef)((e,t)=>(0,g.createElement)(IM,{...e,forwardedRef:t}));IM.displayName=`Panel`,LM.displayName=`forwardRef(Panel)`;var WPe;function GPe(){return WPe}var RM=null,KPe=!0,zM=-1,BM=null;function qPe(e,t){if(t){let e=(t&XM)!==0,n=(t&ZM)!==0,r=(t&QM)!==0,i=(t&$M)!==0;if(e)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}switch(e){case`horizontal`:return`ew-resize`;case`intersection`:return`move`;case`vertical`:return`ns-resize`}}function JPe(){BM!==null&&(document.head.removeChild(BM),RM=null,BM=null,zM=-1)}function VM(e,t){if(!KPe)return;let n=qPe(e,t);if(RM!==n){if(RM=n,BM===null){BM=document.createElement(`style`);let e=GPe();e&&BM.setAttribute(`nonce`,e),document.head.appendChild(BM)}if(zM>=0){var r;(r=BM.sheet)==null||r.removeRule(zM)}zM=BM.sheet?.insertRule(`*{cursor: ${n} !important;}`)??-1}}function HM(e){return e.type===`keydown`}function UM(e){return e.type.startsWith(`pointer`)}function WM(e){return e.type.startsWith(`mouse`)}function GM(e){if(UM(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(WM(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function YPe(){if(typeof matchMedia==`function`)return matchMedia(`(pointer:coarse)`).matches?`coarse`:`fine`}function XPe(e,t,n){return n?e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y:e.x<=t.x+t.width&&e.x+e.width>=t.x&&e.y<=t.y+t.height&&e.y+e.height>=t.y}function ZPe(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:JM(e),b:JM(t)},r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;mN(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:qM(KM(n.a)),b:qM(KM(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var QPe=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function $Pe(e){let t=getComputedStyle(YM(e)??e).display;return t===`flex`||t===`inline-flex`}function eFe(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||$Pe(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||QPe.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function KM(e){let t=e.length;for(;t--;){let n=e[t];if(mN(n,`Missing node`),eFe(n))return n}return null}function qM(e){return e&&Number(getComputedStyle(e).zIndex)||0}function JM(e){let t=[];for(;e;)t.push(e),e=YM(e);return t}function YM(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}var XM=1,ZM=2,QM=4,$M=8,tFe=YPe()===`coarse`,eN=[],tN=!1,nN=new Map,rN=new Map,iN=new Set;function nFe(e,t,n,r,i){let{ownerDocument:a}=t,o={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:i},s=nN.get(a)??0;return nN.set(a,s+1),iN.add(o),fN(),function(){rN.delete(e),iN.delete(o);let t=nN.get(a)??1;if(nN.set(a,t-1),fN(),t===1&&nN.delete(a),eN.includes(o)){let e=eN.indexOf(o);e>=0&&eN.splice(e,1),uN(),i(`up`,!0,null)}}}function rFe(e){let{target:t}=e,{x:n,y:r}=GM(e);tN=!0,cN({target:t,x:n,y:r}),fN(),eN.length>0&&(pN(`down`,e),e.preventDefault(),sN(t)||e.stopImmediatePropagation())}function aN(e){let{x:t,y:n}=GM(e);if(tN&&e.buttons===0&&(tN=!1,pN(`up`,e)),!tN){let{target:r}=e;cN({target:r,x:t,y:n})}pN(`move`,e),uN(),eN.length>0&&e.preventDefault()}function oN(e){let{target:t}=e,{x:n,y:r}=GM(e);rN.clear(),tN=!1,eN.length>0&&(e.preventDefault(),sN(t)||e.stopImmediatePropagation()),pN(`up`,e),cN({target:t,x:n,y:r}),uN(),fN()}function sN(e){let t=e;for(;t;){if(t.hasAttribute(jM.resizeHandle))return!0;t=t.parentElement}return!1}function cN({target:e,x:t,y:n}){eN.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),iN.forEach(e=>{let{element:i,hitAreaMargins:a}=e,o=i.getBoundingClientRect(),{bottom:s,left:c,right:l,top:u}=o,d=tFe?a.coarse:a.fine;if(t>=c-d&&t<=l+d&&n>=u-d&&n<=s+d){if(r!==null&&document.contains(r)&&i!==r&&!i.contains(r)&&!r.contains(i)&&ZPe(r,i)>0){let e=r,t=!1;for(;e&&!e.contains(i);){if(XPe(e.getBoundingClientRect(),o,!0)){t=!0;break}e=e.parentElement}if(t)return}eN.push(e)}})}function lN(e,t){rN.set(e,t)}function uN(){let e=!1,t=!1;eN.forEach(n=>{let{direction:r}=n;r===`horizontal`?e=!0:t=!0});let n=0;rN.forEach(e=>{n|=e}),e&&t?VM(`intersection`,n):e?VM(`horizontal`,n):t?VM(`vertical`,n):JPe()}var dN=new AbortController;function fN(){dN.abort(),dN=new AbortController;let e={capture:!0,signal:dN.signal};iN.size&&(tN?(eN.length>0&&nN.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`contextmenu`,oN,e),r.addEventListener(`pointerleave`,aN,e),r.addEventListener(`pointermove`,aN,e))}),window.addEventListener(`pointerup`,oN,e),window.addEventListener(`pointercancel`,oN,e)):nN.forEach((t,n)=>{let{body:r}=n;t>0&&(r.addEventListener(`pointerdown`,rFe,e),r.addEventListener(`pointermove`,aN,e))}))}function pN(e,t){iN.forEach(n=>{let{setResizeHandlerState:r}=n;r(e,eN.includes(n),t)})}function iFe(){let[e,t]=(0,g.useState)(0);return(0,g.useCallback)(()=>t(e=>e+1),[])}function mN(e,t){if(!e)throw console.error(t),Error(t)}function hN(e,t,n=MM){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function gN(e,t,n=MM){return hN(e,t,n)===0}function _N(e,t,n){return hN(e,t,n)===0}function aFe(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],a=t[r];if(!_N(i,a,n))return!1}return!0}function vN({panelConstraints:e,panelIndex:t,size:n}){let r=e[t];mN(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,maxSize:o=100,minSize:s=0}=r;if(hN(n,s)<0)if(a){let e=(i+s)/2;n=hN(n,e)<0?i:s}else n=s;return n=Math.min(o,n),n=parseFloat(n.toFixed(MM)),n}function yN({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(_N(e,0))return t;let o=[...t],[s,c]=r;mN(s!=null,`Invalid first pivot index`),mN(c!=null,`Invalid second pivot index`);let l=0;if(a===`keyboard`){{let r=e<0?c:s,i=n[r];mN(i,`Panel constraints not found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(mN(n!=null,`Previous layout not found for panel index ${r}`),_N(n,a)){let t=l-n;hN(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let r=e<0?s:c,i=n[r];mN(i,`No panel constraints found for index ${r}`);let{collapsedSize:a=0,collapsible:o,minSize:l=0}=i;if(o){let n=t[r];if(mN(n!=null,`Previous layout not found for panel index ${r}`),_N(n,l)){let t=n-a;hN(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let r=e<0?1:-1,i=e<0?c:s,a=0;for(;;){let e=t[i];mN(e!=null,`Previous layout not found for panel index ${i}`);let o=vN({panelConstraints:n,panelIndex:i,size:100})-e;if(a+=o,i+=r,i<0||i>=n.length)break}let o=Math.min(Math.abs(e),Math.abs(a));e=e<0?0-o:o}{let r=e<0?s:c;for(;r>=0&&r<n.length;){let i=Math.abs(e)-Math.abs(l),a=t[r];mN(a!=null,`Previous layout not found for panel index ${r}`);let s=a-i,c=vN({panelConstraints:n,panelIndex:r,size:s});if(!_N(a,c)&&(l+=a-c,o[r]=c,l.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?r--:r++}}if(aFe(i,o))return i;{let r=e<0?c:s,i=t[r];mN(i!=null,`Previous layout not found for panel index ${r}`);let a=i+l,u=vN({panelConstraints:n,panelIndex:r,size:a});if(o[r]=u,!_N(u,a)){let t=a-u,r=e<0?c:s;for(;r>=0&&r<n.length;){let i=o[r];mN(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=vN({panelConstraints:n,panelIndex:r,size:a});if(_N(i,s)||(t-=s-i,o[r]=s),_N(t,0))break;e>0?r--:r++}}}return _N(o.reduce((e,t)=>t+e,0),100)?o:i}function oFe({layout:e,panelsArray:t,pivotIndices:n}){let r=0,i=100,a=0,o=0,s=n[0];return mN(s!=null,`No pivot index found`),t.forEach((e,t)=>{let{constraints:n}=e,{maxSize:c=100,minSize:l=0}=n;t===s?(r=l,i=c):(a+=l,o+=c)}),{valueMax:Math.min(i,100-a),valueMin:Math.max(r,100-o),valueNow:e[s]}}function bN(e,t=document){return Array.from(t.querySelectorAll(`[${jM.resizeHandleId}][data-panel-group-id="${e}"]`))}function xN(e,t,n=document){return bN(e,n).findIndex(e=>e.getAttribute(jM.resizeHandleId)===t)??null}function SN(e,t,n){let r=xN(e,t,n);return r==null?[-1,-1]:[r,r+1]}function CN(e,t=document){return t instanceof HTMLElement&&t?.dataset?.panelGroupId==e?t:t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`)||null}function wN(e,t=document){return t.querySelector(`[${jM.resizeHandleId}="${e}"]`)||null}function sFe(e,t,n,r=document){let i=wN(t,r),a=bN(e,r),o=i?a.indexOf(i):-1;return[n[o]?.id??null,n[o+1]?.id??null]}function cFe({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:i,panelGroupElement:a,setLayout:o}){(0,g.useRef)({didWarnAboutMissingResizeHandle:!1}),NM(()=>{if(!a)return;let e=bN(n,a);for(let t=0;t<i.length-1;t++){let{valueMax:n,valueMin:a,valueNow:o}=oFe({layout:r,panelsArray:i,pivotIndices:[t,t+1]}),s=e[t];if(s!=null){let e=i[t];mN(e,`No panel data found for index "${t}"`),s.setAttribute(`aria-controls`,e.id),s.setAttribute(`aria-valuemax`,``+Math.round(n)),s.setAttribute(`aria-valuemin`,``+Math.round(a)),s.setAttribute(`aria-valuenow`,o==null?``:``+Math.round(o))}}return()=>{e.forEach((e,t)=>{e.removeAttribute(`aria-controls`),e.removeAttribute(`aria-valuemax`),e.removeAttribute(`aria-valuemin`),e.removeAttribute(`aria-valuenow`)})}},[n,r,i,a]),(0,g.useEffect)(()=>{if(!a)return;let e=t.current;mN(e,`Eager values not found`);let{panelDataArray:i}=e;mN(CN(n,a)!=null,`No group found for id "${n}"`);let s=bN(n,a);mN(s,`No resize handles found for group id "${n}"`);let c=s.map(e=>{let t=e.getAttribute(jM.resizeHandleId);mN(t,`Resize handle element has no handle id attribute`);let[s,c]=sFe(n,t,i,a);if(s==null||c==null)return()=>{};let l=e=>{if(!e.defaultPrevented)switch(e.key){case`Enter`:{e.preventDefault();let c=i.findIndex(e=>e.id===s);if(c>=0){let e=i[c];mN(e,`No panel data found for index ${c}`);let s=r[c],{collapsedSize:l=0,collapsible:u,minSize:d=0}=e.constraints;if(s!=null&&u){let e=yN({delta:_N(s,l)?d-l:l-s,initialLayout:r,panelConstraints:i.map(e=>e.constraints),pivotIndices:SN(n,t,a),prevLayout:r,trigger:`keyboard`});r!==e&&o(e)}}break}}};return e.addEventListener(`keydown`,l),()=>{e.removeEventListener(`keydown`,l)}});return()=>{c.forEach(e=>e())}},[a,e,t,n,r,i,o])}function TN(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function EN(e,t){let n=e===`horizontal`,{x:r,y:i}=GM(t);return n?r:i}function lFe(e,t,n,r,i){let a=n===`horizontal`,o=wN(t,i);mN(o,`No resize handle element found for id "${t}"`);let s=o.getAttribute(jM.groupId);mN(s,`Resize handle element has no group id attribute`);let{initialCursorPosition:c}=r,l=EN(n,e),u=CN(s,i);mN(u,`No group element found for id "${s}"`);let d=u.getBoundingClientRect(),f=a?d.width:d.height;return(l-c)/f*100}function uFe(e,t,n,r,i,a){if(HM(e)){let t=n===`horizontal`,r=0;r=e.shiftKey?100:i??10;let a=0;switch(e.key){case`ArrowDown`:a=t?0:r;break;case`ArrowLeft`:a=t?-r:0;break;case`ArrowRight`:a=t?r:0;break;case`ArrowUp`:a=t?0:-r;break;case`End`:a=100;break;case`Home`:a=-100;break}return a}else return r==null?0:lFe(e,t,n,r,a)}function dFe({panelDataArray:e}){let t=Array(e.length),n=e.map(e=>e.constraints),r=0,i=100;for(let a=0;a<e.length;a++){let e=n[a];mN(e,`Panel constraints not found for index ${a}`);let{defaultSize:o}=e;o!=null&&(r++,t[a]=o,i-=o)}for(let a=0;a<e.length;a++){let o=n[a];mN(o,`Panel constraints not found for index ${a}`);let{defaultSize:s}=o;if(s!=null)continue;let c=e.length-r,l=i/c;r++,t[a]=l,i-=l}return t}function DN(e,t,n){t.forEach((t,r)=>{let i=e[r];mN(i,`Panel data not found for index ${r}`);let{callbacks:a,constraints:o,id:s}=i,{collapsedSize:c=0,collapsible:l}=o,u=n[s];if(u==null||t!==u){n[s]=t;let{onCollapse:e,onExpand:r,onResize:i}=a;i&&i(t,u),l&&(e||r)&&(r&&(u==null||gN(u,c))&&!gN(t,c)&&r(),e&&(u==null||!gN(u,c))&&gN(t,c)&&e())}})}function ON(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function fFe({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:i,precision:a=3}){let o=n[i],s;return s=o==null?e==null?`1`:e.toPrecision(a):r.length===1?`1`:o.toPrecision(a),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:`hidden`,pointerEvents:t===null?void 0:`none`}}function pFe(e,t=10){let n=null;return(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}function kN(e){try{if(typeof localStorage<`u`)e.getItem=e=>localStorage.getItem(e),e.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw Error(`localStorage not supported in this environment`)}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function AN(e){return`react-resizable-panels:${e}`}function jN(e){return e.map(e=>{let{constraints:t,id:n,idIsFromProps:r,order:i}=e;return r?n:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(`,`)}function MN(e,t){try{let n=AN(e),r=t.getItem(n);if(r){let e=JSON.parse(r);if(typeof e==`object`&&e)return e}}catch{}return null}function mFe(e,t,n){return(MN(e,n)??{})[jN(t)]??null}function hFe(e,t,n,r,i){let a=AN(e),o=jN(t),s=MN(e,i)??{};s[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(s))}catch(e){console.error(e)}}function NN({layout:e,panelConstraints:t}){let n=[...e],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(e=>`${e}%`).join(`, `)}`);if(!_N(r,100)&&n.length>0)for(let e=0;e<t.length;e++){let t=n[e];mN(t!=null,`No layout data found for index ${e}`),n[e]=100/r*t}let i=0;for(let e=0;e<t.length;e++){let r=n[e];mN(r!=null,`No layout data found for index ${e}`);let a=vN({panelConstraints:t,panelIndex:e,size:r});r!=a&&(i+=r-a,n[e]=a)}if(!_N(i,0))for(let e=0;e<t.length;e++){let r=n[e];mN(r!=null,`No layout data found for index ${e}`);let a=r+i,o=vN({panelConstraints:t,panelIndex:e,size:a});if(r!==o&&(i-=o-r,n[e]=o,_N(i,0)))break}return n}var gFe=100,PN={getItem:e=>(kN(PN),PN.getItem(e)),setItem:(e,t)=>{kN(PN),PN.setItem(e,t)}},FN={};function IN({autoSaveId:e=null,children:t,className:n=``,direction:r,forwardedRef:i,id:a=null,onLayout:o=null,keyboardResizeBy:s=null,storage:c=PN,style:l,tagName:u=`div`,...d}){let f=FM(a),p=(0,g.useRef)(null),[m,h]=(0,g.useState)(null),[_,v]=(0,g.useState)([]),y=iFe(),b=(0,g.useRef)({}),x=(0,g.useRef)(new Map),S=(0,g.useRef)(0),C=(0,g.useRef)({autoSaveId:e,direction:r,dragState:m,id:f,keyboardResizeBy:s,onLayout:o,storage:c}),w=(0,g.useRef)({layout:_,panelDataArray:[],panelDataArrayChanged:!1});(0,g.useRef)({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),(0,g.useImperativeHandle)(i,()=>({getId:()=>C.current.id,getLayout:()=>{let{layout:e}=w.current;return e},setLayout:e=>{let{onLayout:t}=C.current,{layout:n,panelDataArray:r}=w.current,i=NN({layout:e,panelConstraints:r.map(e=>e.constraints)});TN(n,i)||(v(i),w.current.layout=i,t&&t(i),DN(r,i,b.current))}}),[]),NM(()=>{C.current.autoSaveId=e,C.current.direction=r,C.current.dragState=m,C.current.id=f,C.current.onLayout=o,C.current.storage=c}),cFe({committedValuesRef:C,eagerValuesRef:w,groupId:f,layout:_,panelDataArray:w.current.panelDataArray,setLayout:v,panelGroupElement:p.current}),(0,g.useEffect)(()=>{let{panelDataArray:t}=w.current;if(e){if(_.length===0||_.length!==t.length)return;let n=FN[e];n??(n=pFe(hFe,gFe),FN[e]=n);let r=[...t],i=new Map(x.current);n(e,r,i,_,c)}},[e,_,c]),(0,g.useEffect)(()=>{});let T=(0,g.useCallback)(e=>{let{onLayout:t}=C.current,{layout:n,panelDataArray:r}=w.current;if(e.constraints.collapsible){let i=r.map(e=>e.constraints),{collapsedSize:a=0,panelSize:o,pivotIndices:s}=zN(r,e,n);if(mN(o!=null,`Panel size not found for panel "${e.id}"`),!gN(o,a)){x.current.set(e.id,o);let c=yN({delta:RN(r,e)===r.length-1?o-a:a-o,initialLayout:n,panelConstraints:i,pivotIndices:s,prevLayout:n,trigger:`imperative-api`});ON(n,c)||(v(c),w.current.layout=c,t&&t(c),DN(r,c,b.current))}}},[]),E=(0,g.useCallback)((e,t)=>{let{onLayout:n}=C.current,{layout:r,panelDataArray:i}=w.current;if(e.constraints.collapsible){let a=i.map(e=>e.constraints),{collapsedSize:o=0,panelSize:s=0,minSize:c=0,pivotIndices:l}=zN(i,e,r),u=t??c;if(gN(s,o)){let t=x.current.get(e.id),o=t!=null&&t>=u?t:u,c=yN({delta:RN(i,e)===i.length-1?s-o:o-s,initialLayout:r,panelConstraints:a,pivotIndices:l,prevLayout:r,trigger:`imperative-api`});ON(r,c)||(v(c),w.current.layout=c,n&&n(c),DN(i,c,b.current))}}},[]),D=(0,g.useCallback)(e=>{let{layout:t,panelDataArray:n}=w.current,{panelSize:r}=zN(n,e,t);return mN(r!=null,`Panel size not found for panel "${e.id}"`),r},[]),O=(0,g.useCallback)((e,t)=>{let{panelDataArray:n}=w.current;return fFe({defaultSize:t,dragState:m,layout:_,panelData:n,panelIndex:RN(n,e)})},[m,_]),k=(0,g.useCallback)(e=>{let{layout:t,panelDataArray:n}=w.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=zN(n,e,t);return mN(a!=null,`Panel size not found for panel "${e.id}"`),i===!0&&gN(a,r)},[]),A=(0,g.useCallback)(e=>{let{layout:t,panelDataArray:n}=w.current,{collapsedSize:r=0,collapsible:i,panelSize:a}=zN(n,e,t);return mN(a!=null,`Panel size not found for panel "${e.id}"`),!i||hN(a,r)>0},[]),j=(0,g.useCallback)(e=>{let{panelDataArray:t}=w.current;t.push(e),t.sort((e,t)=>{let n=e.order,r=t.order;return n==null&&r==null?0:n==null?-1:r==null?1:n-r}),w.current.panelDataArrayChanged=!0,y()},[y]);NM(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;let{autoSaveId:e,onLayout:t,storage:n}=C.current,{layout:r,panelDataArray:i}=w.current,a=null;if(e){let t=mFe(e,i,n);t&&(x.current=new Map(Object.entries(t.expandToSizes)),a=t.layout)}a??=dFe({panelDataArray:i});let o=NN({layout:a,panelConstraints:i.map(e=>e.constraints)});TN(r,o)||(v(o),w.current.layout=o,t&&t(o),DN(i,o,b.current))}}),NM(()=>{let e=w.current;return()=>{e.layout=[]}},[]);let M=(0,g.useCallback)(e=>{let t=!1,n=p.current;return n&&window.getComputedStyle(n,null).getPropertyValue(`direction`)===`rtl`&&(t=!0),function(n){n.preventDefault();let r=p.current;if(!r)return()=>null;let{direction:i,dragState:a,id:o,keyboardResizeBy:s,onLayout:c}=C.current,{layout:l,panelDataArray:u}=w.current,{initialLayout:d}=a??{},f=SN(o,e,r),m=uFe(n,e,i,a,s,r),h=i===`horizontal`;h&&t&&(m=-m);let g=u.map(e=>e.constraints),_=yN({delta:m,initialLayout:d??l,panelConstraints:g,pivotIndices:f,prevLayout:l,trigger:HM(n)?`keyboard`:`mouse-or-touch`}),y=!ON(l,_);(UM(n)||WM(n))&&S.current!=m&&(S.current=m,!y&&m!==0?h?lN(e,m<0?XM:ZM):lN(e,m<0?QM:$M):lN(e,0)),y&&(v(_),w.current.layout=_,c&&c(_),DN(u,_,b.current))}},[]),N=(0,g.useCallback)((e,t)=>{let{onLayout:n}=C.current,{layout:r,panelDataArray:i}=w.current,a=i.map(e=>e.constraints),{panelSize:o,pivotIndices:s}=zN(i,e,r);mN(o!=null,`Panel size not found for panel "${e.id}"`);let c=yN({delta:RN(i,e)===i.length-1?o-t:t-o,initialLayout:r,panelConstraints:a,pivotIndices:s,prevLayout:r,trigger:`imperative-api`});ON(r,c)||(v(c),w.current.layout=c,n&&n(c),DN(i,c,b.current))},[]),P=(0,g.useCallback)((e,t)=>{let{layout:n,panelDataArray:r}=w.current,{collapsedSize:i=0,collapsible:a}=t,{collapsedSize:o=0,collapsible:s,maxSize:c=100,minSize:l=0}=e.constraints,{panelSize:u}=zN(r,e,n);u!=null&&(a&&s&&gN(u,i)?gN(i,o)||N(e,o):u<l?N(e,l):u>c&&N(e,c))},[N]),F=(0,g.useCallback)((e,t)=>{let{direction:n}=C.current,{layout:r}=w.current;if(!p.current)return;let i=wN(e,p.current);mN(i,`Drag handle element not found for id "${e}"`);let a=EN(n,t);h({dragHandleId:e,dragHandleRect:i.getBoundingClientRect(),initialCursorPosition:a,initialLayout:r})},[]),I=(0,g.useCallback)(()=>{h(null)},[]),L=(0,g.useCallback)(e=>{let{panelDataArray:t}=w.current,n=RN(t,e);n>=0&&(t.splice(n,1),delete b.current[e.id],w.current.panelDataArrayChanged=!0,y())},[y]),R=(0,g.useMemo)(()=>({collapsePanel:T,direction:r,dragState:m,expandPanel:E,getPanelSize:D,getPanelStyle:O,groupId:f,isPanelCollapsed:k,isPanelExpanded:A,reevaluatePanelConstraints:P,registerPanel:j,registerResizeHandle:M,resizePanel:N,startDragging:F,stopDragging:I,unregisterPanel:L,panelGroupElement:p.current}),[T,m,r,E,D,O,f,k,A,P,j,M,N,F,I,L]),z={display:`flex`,flexDirection:r===`horizontal`?`row`:`column`,height:`100%`,overflow:`hidden`,width:`100%`};return(0,g.createElement)(AM.Provider,{value:R},(0,g.createElement)(u,{...d,children:t,className:n,id:a,ref:p,style:{...z,...l},[jM.group]:``,[jM.groupDirection]:r,[jM.groupId]:f}))}var LN=(0,g.forwardRef)((e,t)=>(0,g.createElement)(IN,{...e,forwardedRef:t}));IN.displayName=`PanelGroup`,LN.displayName=`forwardRef(PanelGroup)`;function RN(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function zN(e,t,n){let r=RN(e,t),i=r===e.length-1?[r-1,r]:[r,r+1],a=n[r];return{...t.constraints,panelSize:a,pivotIndices:i}}function _Fe({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){(0,g.useEffect)(()=>{if(e||n==null||r==null)return;let i=wN(t,r);if(i==null)return;let a=e=>{if(!e.defaultPrevented)switch(e.key){case`ArrowDown`:case`ArrowLeft`:case`ArrowRight`:case`ArrowUp`:case`End`:case`Home`:e.preventDefault(),n(e);break;case`F6`:{e.preventDefault();let n=i.getAttribute(jM.groupId);mN(n,`No group element found for id "${n}"`);let a=bN(n,r),o=xN(n,t,r);mN(o!==null,`No resize element found for id "${t}"`),a[e.shiftKey?o>0?o-1:a.length-1:o+1<a.length?o+1:0].focus();break}}};return i.addEventListener(`keydown`,a),()=>{i.removeEventListener(`keydown`,a)}},[r,e,t,n])}function BN({children:e=null,className:t=``,disabled:n=!1,hitAreaMargins:r,id:i,onBlur:a,onClick:o,onDragging:s,onFocus:c,onPointerDown:l,onPointerUp:u,style:d={},tabIndex:f=0,tagName:p=`div`,...m}){let h=(0,g.useRef)(null),_=(0,g.useRef)({onClick:o,onDragging:s,onPointerDown:l,onPointerUp:u});(0,g.useEffect)(()=>{_.current.onClick=o,_.current.onDragging=s,_.current.onPointerDown=l,_.current.onPointerUp=u});let v=(0,g.useContext)(AM);if(v===null)throw Error(`PanelResizeHandle components must be rendered within a PanelGroup container`);let{direction:y,groupId:b,registerResizeHandle:x,startDragging:S,stopDragging:C,panelGroupElement:w}=v,T=FM(i),[E,D]=(0,g.useState)(`inactive`),[O,k]=(0,g.useState)(!1),[A,j]=(0,g.useState)(null),M=(0,g.useRef)({state:E});NM(()=>{M.current.state=E}),(0,g.useEffect)(()=>{if(n)j(null);else{let e=x(T);j(()=>e)}},[n,T,x]);let N=r?.coarse??15,P=r?.fine??5;(0,g.useEffect)(()=>{if(n||A==null)return;let e=h.current;mN(e,`Element ref not attached`);let t=!1;return nFe(T,e,y,{coarse:N,fine:P},(e,n,r)=>{if(!n){D(`inactive`);return}switch(e){case`down`:{D(`drag`),t=!1,mN(r,`Expected event to be defined for "down" action`),S(T,r);let{onDragging:e,onPointerDown:n}=_.current;e?.(!0),n?.();break}case`move`:{let{state:e}=M.current;t=!0,e!==`drag`&&D(`hover`),mN(r,`Expected event to be defined for "move" action`),A(r);break}case`up`:{D(`hover`),C();let{onClick:e,onDragging:n,onPointerUp:r}=_.current;n?.(!1),r?.(),t||e?.();break}}})},[N,y,n,P,x,T,A,S,C]),_Fe({disabled:n,handleId:T,resizeHandler:A,panelGroupElement:w});let F={touchAction:`none`,userSelect:`none`};return(0,g.createElement)(p,{...m,children:e,className:t,id:i,onBlur:()=>{k(!1),a?.()},onFocus:()=>{k(!0),c?.()},ref:h,role:`separator`,style:{...F,...d},tabIndex:f,[jM.groupDirection]:y,[jM.groupId]:b,[jM.resizeHandle]:``,[jM.resizeHandleActive]:E===`drag`?`pointer`:O?`keyboard`:void 0,[jM.resizeHandleEnabled]:!n,[jM.resizeHandleId]:T,[jM.resizeHandleState]:E})}BN.displayName=`PanelResizeHandle`;var VN=({className:e,...t})=>(0,U.jsx)(LN,{className:W(`flex h-full w-full data-[panel-group-direction=vertical]:flex-col`,e),...t}),HN=LM,UN=({withHandle:e,className:t,...n})=>(0,U.jsx)(BN,{className:W(`relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90`,t),...n,children:e&&(0,U.jsx)(`div`,{className:`z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border`,children:(0,U.jsx)(cl,{className:`h-2.5 w-2.5`})})});function WN({className:e,...t}){return(0,U.jsx)(`div`,{className:W(`animate-pulse rounded-md bg-primary/10`,e),...t})}var vFe=(0,g.createContext)(null),GN={didCatch:!1,error:null},yFe=class extends g.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=GN}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){let{error:t}=this.state;t!==null&&(this.props.onReset?.({args:e,reason:`imperative-api`}),this.setState(GN))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&t.error!==null&&bFe(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:`keys`}),this.setState(GN))}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:a}=this.state,o=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof t==`function`)o=t(e);else if(n)o=(0,g.createElement)(n,e);else if(r!==void 0)o=r;else throw a}return(0,g.createElement)(vFe.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function bFe(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}var KN=({children:e,fallback:t})=>{let n=F_();return(0,U.jsx)(yFe,{onError:(e,t)=>{let r={componentStack:t.componentStack};(e instanceof oi||e instanceof si)&&(r.errorType=e.type,r.errorStatus=e.status,r.errorDetail=e.detail,r.errorInstance=e.instance,r.traceId=e.traceId),n.captureException(e,r)},fallbackRender:({error:e,resetErrorBoundary:n})=>t({error:e,resetError:n}),children:e})},qN=({className:e})=>(0,U.jsxs)(`svg`,{className:e,viewBox:`0 0 86 86`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,children:[(0,U.jsx)(`title`,{children:`open-api-icon`}),(0,U.jsx)(`g`,{id:`Page-1`,stroke:`none`,strokeWidth:`1`,fill:`none`,fillRule:`evenodd`,children:(0,U.jsxs)(`g`,{id:`open-api-icon`,fill:`currentColor`,children:[(0,U.jsx)(`path`,{d:`M35,16 C39.1263484,16 43.0859173,16.7140679 46.7618776,18.0253747 L36.7225172,28.0635294 C36.1538485,28.0214262 35.5794264,28 35,28 C22.2974508,28 12,38.2974508 12,51 C12,63.7025492 22.2974508,74 35,74 C47.7025492,74 58,63.7025492 58,51 C58,50.4205736 57.9785738,49.8461515 57.9364706,49.2774828 L67.9749824,39.2391236 C69.2860617,42.9148016 70,46.8740262 70,51 C70,70.3299662 54.3299662,86 35,86 C15.6700338,86 0,70.3299662 0,51 C0,31.6700338 15.6700338,16 35,16 Z`,id:`Combined-Shape`}),(0,U.jsx)(`circle`,{id:`Oval`,cx:`35`,cy:`51`,r:`13`}),(0,U.jsx)(`circle`,{id:`Oval-Copy`,cx:`73`,cy:`13`,r:`13`}),(0,U.jsx)(`rect`,{id:`Rectangle`,transform:`translate(54.091883, 31.908117) rotate(-45.000000) translate(-54.091883, -31.908117) `,x:`27.0918831`,y:`26.4081169`,width:`54`,height:`11`})]})})]});function JN(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function xFe(e,t=[]){let n=[];function r(t,r){let i=g.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=g.useMemo(()=>o,Object.values(o));return(0,U.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=g.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>g.createContext(e));return function(n){let r=n?.[e]||t;return g.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,SFe(i,...t)]}function SFe(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function YN(e,t=[]){let n=[];function r(t,r){let i=g.createContext(r),a=n.length;n=[...n,r];function o(t){let{scope:n,children:r,...o}=t,s=n?.[e][a]||i,c=g.useMemo(()=>o,Object.values(o));return(0,U.jsx)(s.Provider,{value:c,children:r})}function s(n,o){let s=o?.[e][a]||i,c=g.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return o.displayName=t+`Provider`,[o,s]}let i=()=>{let t=n.map(e=>g.createContext(e));return function(n){let r=n?.[e]||t;return g.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,CFe(i,...t)]}function CFe(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function wFe(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function XN(...e){return t=>e.forEach(e=>wFe(e,t))}function ZN(...e){return g.useCallback(XN(...e),e)}var QN=g.forwardRef((e,t)=>{let{children:n,...r}=e,i=g.Children.toArray(n),a=i.find(EFe);if(a){let e=a.props.children,n=i.map(t=>t===a?g.Children.count(e)>1?g.Children.only(null):g.isValidElement(e)?e.props.children:null:t);return(0,U.jsx)($N,{...r,ref:t,children:g.isValidElement(e)?g.cloneElement(e,void 0,n):null})}return(0,U.jsx)($N,{...r,ref:t,children:n})});QN.displayName=`Slot`;var $N=g.forwardRef((e,t)=>{let{children:n,...r}=e;if(g.isValidElement(n)){let e=OFe(n);return g.cloneElement(n,{...DFe(r,n.props),ref:t?XN(t,e):e})}return g.Children.count(n)>1?g.Children.only(null):null});$N.displayName=`SlotClone`;var TFe=({children:e})=>(0,U.jsx)(U.Fragment,{children:e});function EFe(e){return g.isValidElement(e)&&e.type===TFe}function DFe(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{a(...e),i(...e)}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function OFe(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function kFe(e){let t=e+`CollectionProvider`,[n,r]=YN(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=g.useRef(null),a=g.useRef(new Map).current;return(0,U.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=g.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,U.jsx)(QN,{ref:ZN(t,a(s,n).collectionRef),children:r})});c.displayName=s;let l=e+`CollectionItemSlot`,u=`data-radix-collection-item`,d=g.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=g.useRef(null),s=ZN(t,o),c=a(l,n);return g.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,U.jsx)(QN,{[u]:``,ref:s,children:r})});d.displayName=l;function f(t){let n=a(e+`CollectionConsumer`,t);return g.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:c,ItemSlot:d},f,r]}var eP=globalThis?.document?g.useLayoutEffect:()=>{},AFe=g.useId||(()=>void 0),jFe=0;function tP(e){let[t,n]=g.useState(AFe());return eP(()=>{e||n(e=>e??String(jFe++))},[e]),e||(t?`radix-${t}`:``)}var nP=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=g.forwardRef((e,n)=>{let{asChild:r,...i}=e,a=r?QN:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,U.jsx)(a,{...i,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function rP(e){let t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...e)=>t.current?.(...e),[])}function iP({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=MFe({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=rP(n);return[o,g.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function MFe({defaultProp:e,onChange:t}){let n=g.useState(e),[r]=n,i=g.useRef(r),a=rP(t);return g.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var NFe=g.createContext(void 0);function aP(e){let t=g.useContext(NFe);return e||t||`ltr`}var oP=`rovingFocusGroup.onEntryFocus`,PFe={bubbles:!1,cancelable:!0},sP=`RovingFocusGroup`,[cP,lP,FFe]=kFe(sP),[IFe,uP]=YN(sP,[FFe]),[LFe,RFe]=IFe(sP),dP=g.forwardRef((e,t)=>(0,U.jsx)(cP.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,U.jsx)(cP.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,U.jsx)(zFe,{...e,ref:t})})}));dP.displayName=sP;var zFe=g.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=g.useRef(null),p=ZN(t,f),m=aP(a),[h=null,_]=iP({prop:o,defaultProp:s,onChange:c}),[v,y]=g.useState(!1),b=rP(l),x=lP(n),S=g.useRef(!1),[C,w]=g.useState(0);return g.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(oP,b),()=>e.removeEventListener(oP,b)},[b]),(0,U.jsx)(LFe,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:g.useCallback(e=>_(e),[_]),onItemShiftTab:g.useCallback(()=>y(!0),[]),onFocusableItemAdd:g.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:g.useCallback(()=>w(e=>e-1),[]),children:(0,U.jsx)(nP.div,{tabIndex:v||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:JN(e.onMouseDown,()=>{S.current=!0}),onFocus:JN(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(oP,PFe);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);mP([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:JN(e.onBlur,()=>y(!1))})})}),fP=`RovingFocusGroupItem`,pP=g.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,...o}=e,s=tP(),c=a||s,l=RFe(fP,n),u=l.currentTabStopId===c,d=lP(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=l;return g.useEffect(()=>{if(r)return f(),()=>p()},[r,f,p]),(0,U.jsx)(cP.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:(0,U.jsx)(nP.span,{tabIndex:u?0:-1,"data-orientation":l.orientation,...o,ref:t,onMouseDown:JN(e.onMouseDown,e=>{r?l.onItemFocus(c):e.preventDefault()}),onFocus:JN(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:JN(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){l.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=HFe(e,l.orientation,l.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=d().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=l.loop?UFe(n,r+1):n.slice(r+1)}setTimeout(()=>mP(n))}})})})});pP.displayName=fP;var BFe={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function VFe(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function HFe(e,t,n){let r=VFe(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return BFe[r]}function mP(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function UFe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var WFe=dP,GFe=pP;function KFe(e,t){return g.useReducer((e,n)=>t[e][n]??e,e)}var hP=e=>{let{present:t,children:n}=e,r=qFe(t),i=typeof n==`function`?n({present:r.isPresent}):g.Children.only(n),a=ZN(r.ref,JFe(i));return typeof n==`function`||r.isPresent?g.cloneElement(i,{ref:a}):null};hP.displayName=`Presence`;function qFe(e){let[t,n]=g.useState(),r=g.useRef({}),i=g.useRef(e),a=g.useRef(`none`),[o,s]=KFe(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return g.useEffect(()=>{let e=gP(r.current);a.current=o===`mounted`?e:`none`},[o]),eP(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=gP(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),eP(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=gP(r.current).includes(a.animationName);if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=gP(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:g.useCallback(e=>{e&&(r.current=getComputedStyle(e)),n(e)},[])}}function gP(e){return e?.animationName||`none`}function JFe(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var _P=`Tabs`,[YFe,XFe]=xFe(_P,[uP]),vP=uP(),[ZFe,yP]=YFe(_P),bP=g.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=aP(s),[d,f]=iP({prop:r,onChange:i,defaultProp:a});return(0,U.jsx)(ZFe,{scope:n,baseId:tP(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,U.jsx)(nP.div,{dir:u,"data-orientation":o,...l,ref:t})})});bP.displayName=_P;var xP=`TabsList`,SP=g.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=yP(xP,n),o=vP(n);return(0,U.jsx)(WFe,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,U.jsx)(nP.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});SP.displayName=xP;var CP=`TabsTrigger`,wP=g.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=yP(CP,n),s=vP(n),c=DP(o.baseId,r),l=OP(o.baseId,r),u=r===o.value;return(0,U.jsx)(GFe,{asChild:!0,...s,focusable:!i,active:u,children:(0,U.jsx)(nP.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:JN(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:JN(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:JN(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});wP.displayName=CP;var TP=`TabsContent`,EP=g.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=yP(TP,n),c=DP(s.baseId,r),l=OP(s.baseId,r),u=r===s.value,d=g.useRef(u);return g.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,U.jsx)(hP,{present:i||u,children:({present:n})=>(0,U.jsx)(nP.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});EP.displayName=TP;function DP(e,t){return`${e}-trigger-${t}`}function OP(e,t){return`${e}-content-${t}`}var kP=bP,AP=SP,jP=wP,MP=EP,NP=kP,QFe=Qs(`inline-flex items-center justify-center rounded-md bg-muted text-muted-foreground`,{variants:{variant:{default:``,underline:`w-full justify-start gap-6 rounded-none border-b border-border bg-transparent`},size:{sm:`h-8 px-1 py-1`,default:`h-10 p-1`}},compoundVariants:[{variant:`underline`,className:`h-auto p-0`}],defaultVariants:{variant:`default`,size:`default`}}),$Fe=Qs(`inline-flex items-center justify-center whitespace-nowrap rounded-xs font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-xs text-sm`,{variants:{variant:{default:``,underline:`gap-1.5 border-b-2 border-transparent text-muted-foreground hover:text-foreground data-[state=active]:border-brand data-[state=active]:bg-transparent data-[state=active]:text-brand data-[state=active]:shadow-none`},size:{sm:`px-2 py-0.5 rounded-sm`,default:`px-3 py-1.5`}},compoundVariants:[{variant:`underline`,className:`rounded-none px-1 py-2`}],defaultVariants:{variant:`default`,size:`default`}}),PP=g.forwardRef(({className:e,variant:t,size:n,...r},i)=>(0,U.jsx)(AP,{ref:i,className:W(QFe({variant:t,size:n}),e),...r}));PP.displayName=AP.displayName;var FP=g.forwardRef(({className:e,variant:t,size:n,...r},i)=>(0,U.jsx)(jP,{ref:i,className:W($Fe({variant:t,size:n}),e),...r}));FP.displayName=jP.displayName;var IP=g.forwardRef(({className:e,...t},n)=>(0,U.jsx)(MP,{ref:n,className:W(`data-[state=inactive]:hidden`,`mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));IP.displayName=MP.displayName;var eIe=[`@zuplo/runtime`,`@zuplo/graphql`,`@zuplo/otel`],LP=[{name:`@zuplo/test`,version:`0.0.0`,types:`types/@zuplo/test/latest/types.d.ts`},{name:`chai`,version:`0.0.0`,types:`types/@types/chai/latest/index.d.ts`},{name:`openapi-types`,version:`0.0.0`,types:`types/openapi-types/latest/index.d.ts`}],tIe=[{types:`types/@zuplo/runtime/types/environment.d.ts`,name:`@app/environment`},{types:`types/@zuplo/runtime/types/custom.d.ts`,name:`lib.custom.ts`},{types:`types/@zuplo/runtime/latest/global.d.ts`,name:`global.d.ts`}];async function nIe(){try{return await(await fetch(`https://cdn.zuplo.com/types/remote-modules.d.ts`)).text()}catch(e){M_.captureException(e)}}async function rIe(e,t){try{let n=await fetch(`${fi}/types/${e}/${t}/package.json`);if(!n.ok)throw Error(`Error loading package.json for ${e}`);return await n.json()}catch(e){M_.captureException(e)}}async function iIe(){try{let e=await fetch(`${fi}/types/@zuplo/bundled/bundles.json`);if(!e.ok)throw Error(`Error loading bundles from CDN`);let t=await e.json();return[...LP,...t.bundles]}catch(e){M_.captureException(e)}return[...LP]}async function RP(e){try{let t=await fetch(`${fi}/${e}`);if(!t.ok)throw Error(`Error loading type definition: ${e}`);return await t.text()}catch(e){M_.captureException(e)}}var zP=async(e,t,n)=>{let r=`https://cdn.jsdelivr.net/npm/${e}@${t}${n}`,i=await fetch(r);return i.ok?i.text():Error(`OK`)};async function aIe(e){await Promise.all(eIe.map(async t=>{let n=await rIe(t,`latest`);n&&(e.typescript.typescriptDefaults.addExtraLib(JSON.stringify(n),`file:///node_modules/${t}/package.json`),await Promise.all(Object.entries(n.exports).map(async([n,r])=>{let i=await RP(`types/${t}/latest/${r.types.substring(2)}`);if(i){let r=n===`.`?`index.d.ts`:`${n}.d.ts`;e.typescript.typescriptDefaults.addExtraLib(i,`file:///node_modules/${t}/${r}`)}})))}))}async function BP(e){let t=Object.keys(e.typescript.typescriptDefaults.getExtraLibs()),n=await iIe();await Promise.allSettled([...tIe.map(async({types:t,name:n})=>{let r=await RP(t);r&&e.typescript.typescriptDefaults.addExtraLib(r,n)}),...n.map(async n=>{if(t.includes(n.name))return;let r={name:n.name,version:n.version,types:`./index.d.ts`},i=await RP(n.types);i&&(e.typescript.typescriptDefaults.addExtraLib(JSON.stringify(r),`file:///node_modules/${n.name}/package.json`),e.typescript.typescriptDefaults.addExtraLib(i,`file:///node_modules/${n.name}/index.d.ts`))})])}var VP=null,oIe=`
|
|
97
97
|
declare module "@zuplo/zudoku-plugin-monetization" {
|
|
98
98
|
export interface ZuploMonetizationPluginOptions {
|
|
99
99
|
pricing?: {
|
|
@@ -1665,4 +1665,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1665
1665
|
`+n):e.stack=n}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=D9(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&M9.assertOptions(n,{silentJSONParsing:N9.transitional(N9.boolean),forcedJSONParsing:N9.transitional(N9.boolean),clarifyTimeoutError:N9.transitional(N9.boolean),legacyInterceptorReqResOrdering:N9.transitional(N9.boolean)},!1),r!=null&&($.isFunction(r)?t.paramsSerializer={serialize:r}:M9.assertOptions(r,{encode:N9.function,serialize:N9.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),M9.assertOptions(t,{baseUrl:N9.spelling(`baseURL`),withXsrfToken:N9.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&$.merge(i.common,i[t.method]);i&&$.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=C9.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||h9;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[C0t.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=C0t.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=D9(this.defaults,e),E1t(n0t(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};$.forEach([`delete`,`get`,`head`,`options`],function(e){P9.prototype[e]=function(t,n){return this.request(D9(n||{},{method:e,url:t,data:(n||{}).data}))}}),$.forEach([`post`,`put`,`patch`],function(e){function t(t){return function(n,r,i){return this.request(D9(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}P9.prototype[e]=t(),P9.prototype[e+`Form`]=t(!0)});var D0t=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let 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,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new T9(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let 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}}};function O0t(e){return function(t){return e.apply(null,t)}}function k0t(e){return $.isObject(e)&&e.isAxiosError===!0}var F9={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(F9).forEach(([e,t])=>{F9[t]=e});function A0t(e){let t=new P9(e),n=D$t(P9.prototype.request,t);return $.extend(n,P9.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return A0t(D9(e,t))},n}var I9=A0t(y9);I9.Axios=P9,I9.CanceledError=T9,I9.CancelToken=D0t,I9.isCancel=G1t,I9.VERSION=w0t,I9.toFormData=p9,I9.AxiosError=d9,I9.Cancel=I9.CanceledError,I9.all=function(e){return Promise.all(e)},I9.spread=O0t,I9.isAxiosError=k0t,I9.mergeConfig=D9,I9.AxiosHeaders=C9,I9.formToJSON=e=>I1t($.isHTMLForm(e)?new FormData(e):e),I9.getAdapter=S0t.getAdapter,I9.HttpStatusCode=F9,I9.default=I9;var j0t=e(i(((e,t)=>{var n=new Set(`ENOTFOUND.ENETUNREACH.UNABLE_TO_GET_ISSUER_CERT.UNABLE_TO_GET_CRL.UNABLE_TO_DECRYPT_CERT_SIGNATURE.UNABLE_TO_DECRYPT_CRL_SIGNATURE.UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY.CERT_SIGNATURE_FAILURE.CRL_SIGNATURE_FAILURE.CERT_NOT_YET_VALID.CERT_HAS_EXPIRED.CRL_NOT_YET_VALID.CRL_HAS_EXPIRED.ERROR_IN_CERT_NOT_BEFORE_FIELD.ERROR_IN_CERT_NOT_AFTER_FIELD.ERROR_IN_CRL_LAST_UPDATE_FIELD.ERROR_IN_CRL_NEXT_UPDATE_FIELD.OUT_OF_MEM.DEPTH_ZERO_SELF_SIGNED_CERT.SELF_SIGNED_CERT_IN_CHAIN.UNABLE_TO_GET_ISSUER_CERT_LOCALLY.UNABLE_TO_VERIFY_LEAF_SIGNATURE.CERT_CHAIN_TOO_LONG.CERT_REVOKED.INVALID_CA.PATH_LENGTH_EXCEEDED.INVALID_PURPOSE.CERT_UNTRUSTED.CERT_REJECTED.HOSTNAME_MISMATCH`.split(`.`));t.exports=e=>!n.has(e&&e.code)}))()),M0t=`axios-retry`;function N0t(e){return e.response||!e.code||[`ERR_CANCELED`,`ECONNABORTED`].includes(e.code)?!1:(0,j0t.default)(e)}var P0t=[`get`,`head`,`options`],F0t=P0t.concat([`put`,`delete`]);function L9(e){return e.code!==`ECONNABORTED`&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function I0t(e){return e.config?.method?L9(e)&&P0t.indexOf(e.config.method)!==-1:!1}function L0t(e){return e.config?.method?L9(e)&&F0t.indexOf(e.config.method)!==-1:!1}function R0t(e){return N0t(e)||L0t(e)}function R9(e=void 0){let t=e?.response?.headers[`retry-after`];if(!t)return 0;let n=(Number(t)||0)*1e3;return n===0&&(n=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,n)}function z0t(e=0,t=void 0){return Math.max(0,R9(t))}function B0t(e=0,t=void 0,n=100){let r=2**e*n,i=Math.max(r,R9(t));return i+i*.2*Math.random()}function V0t(e=100){return(t=0,n=void 0)=>{let r=t*e;return Math.max(r,R9(n))}}var H0t={retries:3,retryCondition:R0t,retryDelay:z0t,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function U0t(e,t){return{...H0t,...t,...e[M0t]}}function W0t(e,t,n=!1){let r=U0t(e,t||{});return r.retryCount=r.retryCount||0,(!r.lastRequestTime||n)&&(r.lastRequestTime=Date.now()),e[M0t]=r,r}function G0t(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function K0t(e,t){let{retries:n,retryCondition:r}=e,i=(e.retryCount||0)<n&&r(t);if(typeof i==`object`)try{return await i!==!1}catch{return!1}return i}async function q0t(e,t,n,r){t.retryCount+=1;let{retryDelay:i,shouldResetTimeout:a,onRetry:o}=t,s=i(t.retryCount,n);if(G0t(e,r),!a&&r.timeout&&t.lastRequestTime){let e=Date.now()-t.lastRequestTime,i=r.timeout-e-s;if(i<=0)return Promise.reject(n);r.timeout=i}return r.transformRequest=[e=>e],await o(t.retryCount,n,r),r.signal?.aborted?Promise.resolve(e(r)):new Promise(t=>{let n=()=>{clearTimeout(i),t(e(r))},i=setTimeout(()=>{t(e(r)),r.signal?.removeEventListener&&r.signal.removeEventListener(`abort`,n)},s);r.signal?.addEventListener&&r.signal.addEventListener(`abort`,n,{once:!0})})}async function J0t(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}var z9=(e,t)=>({requestInterceptorId:e.interceptors.request.use(e=>(W0t(e,t,!0),e[`axios-retry`]?.validateResponse&&(e.validateStatus=()=>!1),e)),responseInterceptorId:e.interceptors.response.use(null,async n=>{let{config:r}=n;if(!r)return Promise.reject(n);let i=W0t(r,t);return n.response&&i.validateResponse?.(n.response)?n.response:await K0t(i,n)?q0t(e,i,n,r):(await J0t(i,n),Promise.reject(n))})});z9.isNetworkError=N0t,z9.isSafeRequestError=I0t,z9.isIdempotentRequestError=L0t,z9.isNetworkOrIdempotentRequestError=R0t,z9.exponentialDelay=B0t,z9.linearDelay=V0t,z9.isRetryableError=L9;var Y0t=(typeof self<`u`?self:null)||(typeof window<`u`?window:null)||Y0t,B9=class{type=3;name=``;prefix=``;value=``;suffix=``;modifier=3;constructor(e,t,n,r,i,a){this.type=e,this.name=t,this.prefix=n,this.value=r,this.suffix=i,this.modifier=a}hasCustomName(){return this.name!==``&&typeof this.name!=`number`}},X0t=/[$_\p{ID_Start}]/u,Z0t=/[$_\u200C\u200D\p{ID_Continue}]/u,V9=`.*`;function Q0t(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}function $0t(e,t=!1){let n=[],r=0;for(;r<e.length;){let i=e[r],a=function(i){if(!t)throw TypeError(i);n.push({type:`INVALID_CHAR`,index:r,value:e[r++]})};if(i===`*`){n.push({type:`ASTERISK`,index:r,value:e[r++]});continue}if(i===`+`||i===`?`){n.push({type:`OTHER_MODIFIER`,index:r,value:e[r++]});continue}if(i===`\\`){n.push({type:`ESCAPED_CHAR`,index:r++,value:e[r++]});continue}if(i===`{`){n.push({type:`OPEN`,index:r,value:e[r++]});continue}if(i===`}`){n.push({type:`CLOSE`,index:r,value:e[r++]});continue}if(i===`:`){let t=``,i=r+1;for(;i<e.length;){let n=e.substr(i,1);if(i===r+1&&X0t.test(n)||i!==r+1&&Z0t.test(n)){t+=e[i++];continue}break}if(!t){a(`Missing parameter name at ${r}`);continue}n.push({type:`NAME`,index:r,value:t}),r=i;continue}if(i===`(`){let t=1,i=``,o=r+1,s=!1;if(e[o]===`?`){a(`Pattern cannot start with "?" at ${o}`);continue}for(;o<e.length;){if(!Q0t(e[o],!1)){a(`Invalid character '${e[o]}' at ${o}.`),s=!0;break}if(e[o]===`\\`){i+=e[o++]+e[o++];continue}if(e[o]===`)`){if(t--,t===0){o++;break}}else if(e[o]===`(`&&(t++,e[o+1]!==`?`)){a(`Capturing groups are not allowed at ${o}`),s=!0;break}i+=e[o++]}if(s)continue;if(t){a(`Unbalanced pattern at ${r}`);continue}if(!i){a(`Missing pattern at ${r}`);continue}n.push({type:`REGEX`,index:r,value:i}),r=o;continue}n.push({type:`CHAR`,index:r,value:e[r++]})}return n.push({type:`END`,index:r,value:``}),n}function e2t(e,t={}){let n=$0t(e);t.delimiter??=`/#?`,t.prefixes??=`./`;let r=`[^${H9(t.delimiter)}]+?`,i=[],a=0,o=0,s=new Set,c=e=>{if(o<n.length&&n[o].type===e)return n[o++].value},l=()=>c(`OTHER_MODIFIER`)??c(`ASTERISK`),u=e=>{let t=c(e);if(t!==void 0)return t;let{type:r,index:i}=n[o];throw TypeError(`Unexpected ${r} at ${i}, expected ${e}`)},d=()=>{let e=``,t;for(;t=c(`CHAR`)??c(`ESCAPED_CHAR`);)e+=t;return e},f=t.encodePart||(e=>e),p=``,m=e=>{p+=e},h=()=>{p.length&&(i.push(new B9(3,``,``,f(p),``,3)),p=``)},g=(e,t,n,o,c)=>{let l=3;switch(c){case`?`:l=1;break;case`*`:l=0;break;case`+`:l=2;break}if(!t&&!n&&l===3){m(e);return}if(h(),!t&&!n){if(!e)return;i.push(new B9(3,``,``,f(e),``,l));return}let u;u=n?n===`*`?V9:n:r;let d=2;u===r?(d=1,u=``):u===V9&&(d=0,u=``);let p;if(t?p=t:n&&(p=a++),s.has(p))throw TypeError(`Duplicate name '${p}'.`);s.add(p),i.push(new B9(d,p,f(e),u,f(o),l))};for(;o<n.length;){let e=c(`CHAR`),n=c(`NAME`),r=c(`REGEX`);if(!n&&!r&&(r=c(`ASTERISK`)),n||r){let i=e??``;t.prefixes.indexOf(i)===-1&&(m(i),i=``),h();let a=l();g(i,n,r,``,a);continue}let i=e??c(`ESCAPED_CHAR`);if(i){m(i);continue}if(c(`OPEN`)){let e=d(),t=c(`NAME`),n=c(`REGEX`);!t&&!n&&(n=c(`ASTERISK`));let r=d();u(`CLOSE`);let i=l();g(e,t,n,r,i);continue}h(),u(`END`)}return i}function H9(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}function t2t(e){return e&&e.ignoreCase?`ui`:`u`}function n2t(e,t,n){return r2t(e2t(e,n),t,n)}function U9(e){switch(e){case 0:return`*`;case 1:return`?`;case 2:return`+`;case 3:return``}}function r2t(e,t,n={}){n.delimiter??=`/#?`,n.prefixes??=`./`,n.sensitive??=!1,n.strict??=!1,n.end??=!0,n.start??=!0,n.endsWith=``;let r=n.start?`^`:``;for(let i of e){if(i.type===3){i.modifier===3?r+=H9(i.value):r+=`(?:${H9(i.value)})${U9(i.modifier)}`;continue}t&&t.push(i.name);let e=`[^${H9(n.delimiter)}]+?`,a=i.value;if(i.type===1?a=e:i.type===0&&(a=V9),!i.prefix.length&&!i.suffix.length){i.modifier===3||i.modifier===1?r+=`(${a})${U9(i.modifier)}`:r+=`((?:${a})${U9(i.modifier)})`;continue}if(i.modifier===3||i.modifier===1){r+=`(?:${H9(i.prefix)}(${a})${H9(i.suffix)})`,r+=U9(i.modifier);continue}r+=`(?:${H9(i.prefix)}`,r+=`((?:${a})(?:`,r+=H9(i.suffix),r+=H9(i.prefix),r+=`(?:${a}))*)${H9(i.suffix)})`,i.modifier===0&&(r+=`?`)}let i=`[${H9(n.endsWith)}]|$`,a=`[${H9(n.delimiter)}]`;if(n.end)return n.strict||(r+=`${a}?`),n.endsWith.length?r+=`(?=${i})`:r+=`$`,new RegExp(r,t2t(n));n.strict||(r+=`(?:${a}(?=${i}))?`);let o=!1;if(e.length){let t=e[e.length-1];t.type===3&&t.modifier===3&&(o=n.delimiter.indexOf(t)>-1)}return o||(r+=`(?=${a}|${i})`),new RegExp(r,t2t(n))}var W9={delimiter:``,prefixes:``,sensitive:!0,strict:!0},i2t={delimiter:`.`,prefixes:``,sensitive:!0,strict:!0},a2t={delimiter:`/`,prefixes:`/`,sensitive:!0,strict:!0};function o2t(e,t){return e.length?e[0]===`/`?!0:!t||e.length<2?!1:(e[0]==`\\`||e[0]==`{`)&&e[1]==`/`:!1}function s2t(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}function c2t(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}function l2t(e){return!e||e.length<2?!1:e[0]===`[`||(e[0]===`\\`||e[0]===`{`)&&e[1]===`[`}var u2t=[`ftp`,`file`,`http`,`https`,`ws`,`wss`];function d2t(e){if(!e)return!0;for(let t of u2t)if(e.test(t))return!0;return!1}function f2t(e,t){if(e=s2t(e,`#`),t||e===``)return e;let n=new URL(`https://example.com`);return n.hash=e,n.hash?n.hash.substring(1,n.hash.length):``}function p2t(e,t){if(e=s2t(e,`?`),t||e===``)return e;let n=new URL(`https://example.com`);return n.search=e,n.search?n.search.substring(1,n.search.length):``}function m2t(e,t){return t||e===``?e:l2t(e)?w2t(e):C2t(e)}function h2t(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.password=e,n.password}function g2t(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.username=e,n.username}function _2t(e,t,n){if(n||e===``)return e;if(t&&!u2t.includes(t))return new URL(`${t}:${e}`).pathname;let r=e[0]==`/`;return e=new URL(r?e:`/-`+e,`https://example.com`).pathname,r||(e=e.substring(2,e.length)),e}function v2t(e,t,n){return b2t(t)===e&&(e=``),n||e===``?e:T2t(e)}function y2t(e,t){return e=c2t(e,`:`),t||e===``?e:G9(e)}function b2t(e){switch(e){case`ws`:case`http`:return`80`;case`wws`:case`https`:return`443`;case`ftp`:return`21`;default:return``}}function G9(e){if(e===``)return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw TypeError(`Invalid protocol '${e}'.`)}function x2t(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.username=e,t.username}function S2t(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.password=e,t.password}function C2t(e){if(e===``)return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw TypeError(`Invalid hostname '${e}'`);let t=new URL(`https://example.com`);return t.hostname=e,t.hostname}function w2t(e){if(e===``)return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}function T2t(e){if(e===``||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw TypeError(`Invalid port '${e}'.`)}function E2t(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.pathname=e[0]===`/`?e:`/-`+e,e[0]===`/`?t.pathname:t.pathname.substring(2,t.pathname.length)}function D2t(e){return e===``?e:new URL(`data:${e}`).pathname}function O2t(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.search=e,t.search.substring(1,t.search.length)}function k2t(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.hash=e,t.hash.substring(1,t.hash.length)}var A2t=class{#e;#t=[];#n={};#r=0;#i=1;#a=0;#o=0;#s=0;#c=0;#l=!1;constructor(e){this.#e=e}get result(){return this.#n}parse(){for(this.#t=$0t(this.#e,!0);this.#r<this.#t.length;this.#r+=this.#i){if(this.#i=1,this.#t[this.#r].type===`END`){if(this.#o===0){this.#f(),this.#C()?this.#u(9,1):this.#S()?this.#u(8,1):this.#u(7,0);continue}else if(this.#o===2){this.#p(5);continue}this.#u(10,0);break}if(this.#s>0)if(this.#T())--this.#s;else continue;if(this.#w()){this.#s+=1;continue}switch(this.#o){case 0:this.#g()&&this.#p(1);break;case 1:if(this.#g()){this.#k();let e=7,t=1;this.#_()?(e=2,t=3):this.#l&&(e=2),this.#u(e,t)}break;case 2:this.#v()?this.#p(3):(this.#x()||this.#S()||this.#C())&&this.#p(5);break;case 3:this.#y()?this.#u(4,1):this.#v()&&this.#u(5,1);break;case 4:this.#v()&&this.#u(5,1);break;case 5:this.#E()?this.#c+=1:this.#D()&&--this.#c,this.#b()&&!this.#c?this.#u(6,1):this.#x()?this.#u(7,0):this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 6:this.#x()?this.#u(7,0):this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 7:this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 8:this.#C()&&this.#u(9,1);break;case 9:break;case 10:break}}this.#n.hostname!==void 0&&this.#n.port===void 0&&(this.#n.port=``)}#u(e,t){switch(this.#o){case 0:break;case 1:this.#n.protocol=this.#O();break;case 2:break;case 3:this.#n.username=this.#O();break;case 4:this.#n.password=this.#O();break;case 5:this.#n.hostname=this.#O();break;case 6:this.#n.port=this.#O();break;case 7:this.#n.pathname=this.#O();break;case 8:this.#n.search=this.#O();break;case 9:this.#n.hash=this.#O();break;case 10:break}this.#o!==0&&e!==10&&([1,2,3,4].includes(this.#o)&&[6,7,8,9].includes(e)&&(this.#n.hostname??=``),[1,2,3,4,5,6].includes(this.#o)&&[8,9].includes(e)&&(this.#n.pathname??=this.#l?`/`:``),[1,2,3,4,5,6,7].includes(this.#o)&&e===9&&(this.#n.search??=``)),this.#d(e,t)}#d(e,t){this.#o=e,this.#a=this.#r+t,this.#r+=t,this.#i=0}#f(){this.#r=this.#a,this.#i=0}#p(e){this.#f(),this.#o=e}#m(e){return e<0&&(e=this.#t.length-e),e<this.#t.length?this.#t[e]:this.#t[this.#t.length-1]}#h(e,t){let n=this.#m(e);return n.value===t&&(n.type===`CHAR`||n.type===`ESCAPED_CHAR`||n.type===`INVALID_CHAR`)}#g(){return this.#h(this.#r,`:`)}#_(){return this.#h(this.#r+1,`/`)&&this.#h(this.#r+2,`/`)}#v(){return this.#h(this.#r,`@`)}#y(){return this.#h(this.#r,`:`)}#b(){return this.#h(this.#r,`:`)}#x(){return this.#h(this.#r,`/`)}#S(){if(this.#h(this.#r,`?`))return!0;if(this.#t[this.#r].value!==`?`)return!1;let e=this.#m(this.#r-1);return e.type!==`NAME`&&e.type!==`REGEX`&&e.type!==`CLOSE`&&e.type!==`ASTERISK`}#C(){return this.#h(this.#r,`#`)}#w(){return this.#t[this.#r].type==`OPEN`}#T(){return this.#t[this.#r].type==`CLOSE`}#E(){return this.#h(this.#r,`[`)}#D(){return this.#h(this.#r,`]`)}#O(){let e=this.#t[this.#r],t=this.#m(this.#a).index;return this.#e.substring(t,e.index)}#k(){let e={};Object.assign(e,W9),e.encodePart=G9,this.#l=d2t(n2t(this.#O(),void 0,e))}},K9=[`protocol`,`username`,`password`,`hostname`,`port`,`pathname`,`search`,`hash`],q9=`*`;function j2t(e,t){if(typeof e!=`string`)throw TypeError(`parameter 1 is not of type 'string'.`);let n=new URL(e,t);return{protocol:n.protocol.substring(0,n.protocol.length-1),username:n.username,password:n.password,hostname:n.hostname,port:n.port,pathname:n.pathname,search:n.search===``?void 0:n.search.substring(1,n.search.length),hash:n.hash===``?void 0:n.hash.substring(1,n.hash.length)}}function J9(e,t){return t?X9(e):e}function Y9(e,t,n){let r;if(typeof t.baseURL==`string`)try{r=new URL(t.baseURL),t.protocol===void 0&&(e.protocol=J9(r.protocol.substring(0,r.protocol.length-1),n)),!n&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&(e.username=J9(r.username,n)),!n&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&t.password===void 0&&(e.password=J9(r.password,n)),t.protocol===void 0&&t.hostname===void 0&&(e.hostname=J9(r.hostname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&(e.port=J9(r.port,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&(e.pathname=J9(r.pathname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&(e.search=J9(r.search.substring(1,r.search.length),n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&t.hash===void 0&&(e.hash=J9(r.hash.substring(1,r.hash.length),n))}catch{throw TypeError(`invalid baseURL '${t.baseURL}'.`)}if(typeof t.protocol==`string`&&(e.protocol=y2t(t.protocol,n)),typeof t.username==`string`&&(e.username=g2t(t.username,n)),typeof t.password==`string`&&(e.password=h2t(t.password,n)),typeof t.hostname==`string`&&(e.hostname=m2t(t.hostname,n)),typeof t.port==`string`&&(e.port=v2t(t.port,e.protocol,n)),typeof t.pathname==`string`){if(e.pathname=t.pathname,r&&!o2t(e.pathname,n)){let t=r.pathname.lastIndexOf(`/`);t>=0&&(e.pathname=J9(r.pathname.substring(0,t+1),n)+e.pathname)}e.pathname=_2t(e.pathname,e.protocol,n)}return typeof t.search==`string`&&(e.search=p2t(t.search,n)),typeof t.hash==`string`&&(e.hash=f2t(t.hash,n)),e}function X9(e){return e.replace(/([+*?:{}()\\])/g,`\\$1`)}function M2t(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}function N2t(e,t){t.delimiter??=`/#?`,t.prefixes??=`./`,t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith=``;let n=`[^${M2t(t.delimiter)}]+?`,r=/[$_\u200C\u200D\p{ID_Continue}]/u,i=``;for(let a=0;a<e.length;++a){let o=e[a];if(o.type===3){if(o.modifier===3){i+=X9(o.value);continue}i+=`{${X9(o.value)}}${U9(o.modifier)}`;continue}let s=o.hasCustomName(),c=!!o.suffix.length||!!o.prefix.length&&(o.prefix.length!==1||!t.prefixes.includes(o.prefix)),l=a>0?e[a-1]:null,u=a<e.length-1?e[a+1]:null;if(!c&&s&&o.type===1&&o.modifier===3&&u&&!u.prefix.length&&!u.suffix.length)if(u.type===3){let e=u.value.length>0?u.value[0]:``;c=r.test(e)}else c=!u.hasCustomName();if(!c&&!o.prefix.length&&l&&l.type===3){let e=l.value[l.value.length-1];c=t.prefixes.includes(e)}c&&(i+=`{`),i+=X9(o.prefix),s&&(i+=`:${o.name}`),o.type===2?i+=`(${o.value})`:o.type===1?s||(i+=`(${n})`):o.type===0&&(!s&&(!l||l.type===3||l.modifier!==3||c||o.prefix!==``)?i+=`*`:i+=`(.*)`),o.type===1&&s&&o.suffix.length&&r.test(o.suffix[0])&&(i+=`\\`),i+=X9(o.suffix),c&&(i+=`}`),o.modifier!==3&&(i+=U9(o.modifier))}return i}var P2t=class{#e;#t={};#n={};#r={};#i={};#a=!1;constructor(e={},t,n){try{let r;if(typeof t==`string`?r=t:n=t,typeof e==`string`){let t=new A2t(e);if(t.parse(),e=t.result,r===void 0&&typeof e.protocol!=`string`)throw TypeError(`A base URL must be provided for a relative constructor string.`);e.baseURL=r}else{if(!e||typeof e!=`object`)throw TypeError(`parameter 1 is not of type 'string' and cannot convert to dictionary.`);if(r)throw TypeError(`parameter 1 is not of type 'string'.`)}typeof n>`u`&&(n={ignoreCase:!1});let i={ignoreCase:n.ignoreCase===!0};this.#e=Y9({pathname:q9,protocol:q9,username:q9,password:q9,hostname:q9,port:q9,search:q9,hash:q9},e,!0),b2t(this.#e.protocol)===this.#e.port&&(this.#e.port=``);let a;for(a of K9){if(!(a in this.#e))continue;let e={},t=this.#e[a];switch(this.#n[a]=[],a){case`protocol`:Object.assign(e,W9),e.encodePart=G9;break;case`username`:Object.assign(e,W9),e.encodePart=x2t;break;case`password`:Object.assign(e,W9),e.encodePart=S2t;break;case`hostname`:Object.assign(e,i2t),l2t(t)?e.encodePart=w2t:e.encodePart=C2t;break;case`port`:Object.assign(e,W9),e.encodePart=T2t;break;case`pathname`:d2t(this.#t.protocol)?(Object.assign(e,a2t,i),e.encodePart=E2t):(Object.assign(e,W9,i),e.encodePart=D2t);break;case`search`:Object.assign(e,W9,i),e.encodePart=O2t;break;case`hash`:Object.assign(e,W9,i),e.encodePart=k2t;break}try{this.#i[a]=e2t(t,e),this.#t[a]=r2t(this.#i[a],this.#n[a],e),this.#r[a]=N2t(this.#i[a],e),this.#a=this.#a||this.#i[a].some(e=>e.type===2)}catch{throw TypeError(`invalid ${a} pattern '${this.#e[a]}'.`)}}}catch(e){throw TypeError(`Failed to construct 'URLPattern': ${e.message}`)}}test(e={},t){let n={pathname:``,protocol:``,username:``,password:``,hostname:``,port:``,search:``,hash:``};if(typeof e!=`string`&&t)throw TypeError(`parameter 1 is not of type 'string'.`);if(typeof e>`u`)return!1;try{n=typeof e==`object`?Y9(n,e,!1):Y9(n,j2t(e,t),!1)}catch{return!1}let r;for(r of K9)if(!this.#t[r].exec(n[r]))return!1;return!0}exec(e={},t){let n={pathname:``,protocol:``,username:``,password:``,hostname:``,port:``,search:``,hash:``};if(typeof e!=`string`&&t)throw TypeError(`parameter 1 is not of type 'string'.`);if(typeof e>`u`)return;try{n=typeof e==`object`?Y9(n,e,!1):Y9(n,j2t(e,t),!1)}catch{return null}let r={};t?r.inputs=[e,t]:r.inputs=[e];let i;for(i of K9){let e=this.#t[i].exec(n[i]);if(!e)return null;let t={};for(let[n,r]of this.#n[i].entries())(typeof r==`string`||typeof r==`number`)&&(t[r]=e[n+1]);r[i]={input:n[i]??``,groups:t}}return r}static compareComponent(e,t,n){let r=(e,t)=>{for(let n of[`type`,`modifier`,`prefix`,`value`,`suffix`]){if(e[n]<t[n])return-1;if(e[n]!==t[n])return 1}return 0},i=new B9(3,``,``,``,``,3),a=new B9(0,``,``,``,``,3),o=(e,t)=>{let n=0;for(;n<Math.min(e.length,t.length);++n){let i=r(e[n],t[n]);if(i)return i}return e.length===t.length?0:r(e[n]??i,t[n]??i)};return!t.#r[e]&&!n.#r[e]?0:t.#r[e]&&!n.#r[e]?o(t.#i[e],[a]):!t.#r[e]&&n.#r[e]?o([a],n.#i[e]):o(t.#i[e],n.#i[e])}get protocol(){return this.#r.protocol}get username(){return this.#r.username}get password(){return this.#r.password}get hostname(){return this.#r.hostname}get port(){return this.#r.port}get pathname(){return this.#r.pathname}get search(){return this.#r.search}get hash(){return this.#r.hash}get hasRegExpGroups(){return this.#a}};globalThis.URLPattern||(globalThis.URLPattern=P2t),dS(),g.createContext(null),g.createContext(void 0),g.createContext(void 0),g.createContext(null),g.createContext(null);var F2t=(0,g.memo)(()=>null);function I2t(){let[e,t]=(0,g.useState)(0);return(0,g.useEffect)(()=>{let e=()=>{let e=document.getElementById(`_sidebar`);e&&t(e.getBoundingClientRect().height+(parseFloat(getComputedStyle(document.documentElement).getPropertyValue(`--banner-height`))||0))};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}var L2t=Dr(Xn((0,U.jsxs)(qn,{path:`/`,element:(0,U.jsx)(u$t,{enableUpdateNotifications:!1}),errorElement:(0,U.jsx)(eve,{id:`root`}),children:[(0,U.jsx)(qn,{index:!0,element:(0,U.jsx)(Gn,{replace:!0,to:window.localEditorConfig.defaultPath})}),(0,U.jsx)(qn,{path:`mcp-oauth-callback`,element:(0,U.jsx)(lge,{})}),(0,U.jsx)(qn,{path:`/:account/:project/:environment`,element:(0,U.jsx)(g$t,{}),children:(0,U.jsxs)(qn,{element:(0,U.jsx)(({navigation:e})=>{let[t,n]=(0,g.useState)(0);(0,g.useEffect)(()=>{let e=()=>{n(document.querySelector(`[data-banner="true"]`)?.offsetHeight||0)};e();let t=new MutationObserver(e);return t.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`class`,`style`]}),window.addEventListener(`resize`,e),()=>{t.disconnect(),window.removeEventListener(`resize`,e)}},[]);let r=I2t();return(0,U.jsxs)(`div`,{className:`min-h-screen flex flex-col`,style:{"--banner-height":`${t}px`},children:[(0,U.jsx)(F2t,{}),(0,U.jsxs)(`div`,{className:`flex-1 grid grid-cols-1 grid-rows-[min-content_auto]`,children:[e,(0,U.jsx)(nje,{height:r,children:(0,U.jsx)(g.Suspense,{fallback:null,children:(0,U.jsx)(Kn,{})})})]})]})},{navigation:(0,U.jsx)(tje,{})}),children:[(0,U.jsx)(qn,{index:!0,element:(0,U.jsx)(tZt,{})}),(0,U.jsx)(qn,{path:`edit`,element:(0,U.jsx)(pXt,{})})]})}),(0,U.jsx)(qn,{path:`*`,element:(0,U.jsx)(()=>(0,U.jsx)(`div`,{className:`flex items-center justify-center min-h-screen`,children:(0,U.jsx)(d$t,{})}),{})})]}))),R2t=({error:e})=>{let t,n,r=`N/A`,i=e.message,a,o;(e instanceof oi||e instanceof si)&&(t=e.type,n=e.message,r=e.status??r,i=e.detail,a=e.instance,o=e.traceId),n||=`Oh zup! Something went wrong.`;let s=t??`https://zuplo.com/docs/search?q=${n.replaceAll(` `,`+`)}`,c=t&&ni.includes(t);i||=r===403?`It looks like you might not have permission to access this resources.`:r===404?`We can't find this. If you believe this is a mistake let us know.`:`An error has occurred. If the problem persists let us know.`;let l=e?.stack?.split(`
|
|
1666
1666
|
`).splice(0,5).join(`
|
|
1667
1667
|
`);return(0,U.jsxs)(`div`,{className:`flex flex-col w-full mx-auto max-w-[800px] justify-center gap-4 items-center bg-white p-8`,children:[(0,U.jsxs)(`main`,{className:`flex flex-col gap-10`,children:[(0,U.jsx)(Ac,{className:`self-center shrink-0 w-14 h-14 text-pink-600`}),(0,U.jsxs)(`div`,{className:`text-center`,children:[(0,U.jsxs)(`p`,{className:`text-base font-semibold text-pink-600`,children:[`Status: `,r]}),(0,U.jsx)(`h1`,{className:`mt-2 text-2xl font-medium text-pink-600`,children:n}),(0,U.jsx)(`p`,{className:`mt-2 text-base`,children:i}),(0,U.jsxs)(`div`,{className:`mt-6 flex items-center justify-center gap-x-2`,children:[(0,U.jsx)(nE,{href:s,children:`Search docs for error`}),(0,U.jsx)(`span`,{"aria-hidden":`true`,children:` ·`}),(0,U.jsx)(nE,{href:`https://status.zuplo.com/`,children:`Check the status page`})]})]}),!c&&(0,U.jsxs)(Uz,{className:`flex flex-col`,children:[(0,U.jsx)(Wz,{className:`mb-2`,asChild:!0,children:(0,U.jsxs)(Y,{variant:`ghost`,children:[`Technical Details `,(0,U.jsx)(Tc,{size:18})]})}),(0,U.jsx)(Gz,{children:(0,U.jsxs)(`div`,{className:`border rounded-sm border-solid grid grid-cols-[min-content_1fr] gap-x-3 gap-y-1.5 p-4 text-sm`,children:[(0,U.jsx)(`div`,{children:`Timestamp:`}),(0,U.jsx)(`div`,{children:new Date().toISOString()}),void 0,o&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{children:`Trace ID:`}),(0,U.jsx)(`div`,{children:o})]}),t&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{children:`Type:`}),(0,U.jsx)(`a`,{className:`underline`,href:t,target:`_blank`,children:t})]}),a&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{children:`Instance:`}),(0,U.jsx)(`div`,{children:a})]}),(0,U.jsx)(`div`,{children:`URL:`}),(0,U.jsx)(`div`,{className:`break-all`,children:window.location.pathname+window.location.search}),(0,U.jsx)(`div`,{children:`Stacktrace:`}),(0,U.jsx)(`pre`,{className:`bg-gray-100 rounded-sm overflow-scroll p-2`,children:l})]})})]})]}),(0,U.jsx)(`div`,{className:`self-center`,children:(0,U.jsxs)(`div`,{className:`flex justify-center space-x-4`,children:[(0,U.jsx)(Y,{asChild:!0,children:(0,U.jsxs)(`a`,{href:`/`,children:[(0,U.jsx)(ul,{className:`w-4 h-4 text-base`}),`Go Home`]})}),(0,U.jsx)(Y,{className:`px-4 py-2 text-base`,variant:`outline`,asChild:!0,children:(0,U.jsxs)(`a`,{target:`_blank`,href:`mailto:${JC}`,rel:`noreferrer`,children:[(0,U.jsx)(Sl,{className:`w-4 h-4`}),` Email Support`]})}),(0,U.jsx)(ZC,{text:`Chat on Discord`})]})})]})},z2t=2,Z9=new Toe({defaultOptions:{queries:{retry:(e,t)=>ai(t)?e<=z2t:!1},mutations:{onSettled:async(e,t,n,r,i)=>{let{meta:a}=i;if(a?.invalidates&&Array.isArray(a.invalidates))for(let{queryKey:e}of a.invalidates)await Z9.invalidateQueries({queryKey:e})}}}}),B2t=3e3,V2t=8e3;async function H2t(){let e=new AbortController,t=setTimeout(()=>e.abort(),V2t);try{return await fetch(`/favicon.ico?_probe=${Date.now()}`,{method:`GET`,cache:`no-store`,signal:e.signal}),!0}catch{return!1}finally{clearTimeout(t)}}var U2t=()=>{let[e,t]=(0,g.useState)(()=>!ov.isOnline()),[n,r]=(0,g.useState)(!1),i=(0,g.useRef)(!1),a=(0,g.useCallback)(()=>{t(!1),r(!1),Z9.invalidateQueries()},[]),o=(0,g.useCallback)(async()=>{if(i.current)return;i.current=!0,r(!0);let e=await H2t();i.current=!1,e?a():r(!1)},[a]);return(0,g.useEffect)(()=>ov.subscribe(e=>{e?o():t(!0)}),[o]),(0,g.useEffect)(()=>Z9.getQueryCache().subscribe(e=>{e.type===`updated`&&e.action.type===`error`&&ai(e.action.error)&&t(!0)}),[]),(0,g.useEffect)(()=>{if(!e)return;o();let t=window.setInterval(()=>{o()},B2t);return()=>{window.clearInterval(t)}},[e,o]),e?(0,U.jsx)(Q_e,{isReconnecting:n,onRetry:()=>{o()}}):null},W2t=`zuplo-app-loader`;function G2t(e){typeof document>`u`||document.getElementById(W2t)?.setAttribute(`data-active`,e?`true`:`false`)}var K2t=250,q2t=(0,g.createContext)(null);function J2t(e,t){let n=new Set(e.requirements),r={...e.timestamps};switch(t.type){case`add`:return n.add(t.id),r[t.id]=Date.now(),{requirements:[...n],timestamps:r};case`remove`:return n.delete(t.id),delete r[t.id],{requirements:[...n],timestamps:r};default:throw Error()}}var Y2t=({children:e})=>{let[t,n]=(0,g.useReducer)(J2t,{requirements:[],timestamps:{}}),r=(0,g.useRef)(null),i=(0,g.useRef)(new Set),a=t.requirements.length>0,[o,s]=(0,g.useState)(!0),c=(0,g.useRef)(null);(0,g.useEffect)(()=>{if(a){c.current&&=(clearTimeout(c.current),null),s(!0);return}return c.current=setTimeout(()=>{s(!1),c.current=null},K2t),()=>{c.current&&=(clearTimeout(c.current),null)}},[a]),(0,g.useEffect)(()=>{G2t(o)},[o]);let l=(0,g.useCallback)(e=>n({type:`add`,id:e}),[]),u=(0,g.useCallback)(e=>n({type:`remove`,id:e}),[]);return(0,g.useEffect)(()=>(t.requirements.length>0?r.current=setInterval(()=>{let e=Date.now();t.requirements.forEach(n=>{let r=t.timestamps[n];r&&e-r>2e3&&(i.current.has(n)||(console.warn(`🐌 Slow loading detected: "${n}" has been loading for ${Math.round((e-r)/1e3)} seconds`),i.current.add(n)))})},2e3):(r.current&&=(clearInterval(r.current),null),i.current.clear()),()=>{r.current&&clearInterval(r.current)}),[t.requirements,t.timestamps]),(0,U.jsx)(q2t.Provider,{value:{add:l,remove:u},children:e})},X2t={zuplo:{id:`zuplo`,productName:`Zuplo Portal`,shortName:`Zuplo`,logo:`/zuplo.svg`,logoWhite:`/zuplo_white.svg`,favicon:`/favicon.ico`,docsUrl:`https://zuplo.com/docs`,logoAlt:`Zuplo`},akamai:{id:`akamai`,productName:`Akamai AI and API Manager`,shortName:`Akamai`,logo:`/brand/akamai/logo.svg`,logoDark:`/brand/akamai/logo-dark.svg`,logoWhite:`/brand/akamai/logo-white.svg`,favicon:`/brand/akamai/favicon.svg`,docsUrl:`https://techdocs.akamai.com`,logoAlt:`Akamai AI and API Manager`}},Z2t=e=>e===`zuplo`||e===`akamai`,Q2t=e=>X2t[e]??X2t.zuplo,Q9=`zuplo-color-scheme`,$9=`zuplo-brand`;`${Q9}${$9}`;var $2t=e=>e===`light`||e===`dark`||e===`system`,e4t=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches,t4t=(e,t)=>e===`system`?t?`dark`:`light`:e,n4t=()=>{try{let e=localStorage.getItem(Q9);return $2t(e)?e:`light`}catch{return`light`}},r4t=e=>{try{localStorage.setItem(Q9,e)}catch{}},i4t=()=>{try{let e=localStorage.getItem($9);return Z2t(e)?e:null}catch{return null}},a4t=e=>{try{localStorage.setItem($9,e)}catch{}},o4t=e=>{if(typeof document>`u`)return;let t=document.documentElement;t.classList.toggle(`dark`,e===`dark`),t.style.colorScheme=e},s4t=e=>{if(typeof document>`u`)return;let t=document.documentElement;e===`zuplo`?t.removeAttribute(`data-brand`):t.setAttribute(`data-brand`,e)},c4t=()=>i4t()??`zuplo`,l4t=e=>{let t=document.querySelector(`link[rel~="icon"]`);t&&(t.href=e)},u4t=({children:e})=>{let[t,n]=(0,g.useState)(n4t),[r,i]=(0,g.useState)(e4t),[a,o]=(0,g.useState)(c4t),s=t4t(t,r),c=Q2t(a);(0,g.useEffect)(()=>{if(t!==`system`||typeof window>`u`||!window.matchMedia)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);i(e.matches);let n=e=>i(e.matches);return e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[t]),(0,g.useEffect)(()=>{o4t(s)},[s]);let l=(0,g.useRef)(null);(0,g.useEffect)(()=>{if(s4t(a),l.current===null){let e=document.querySelector(`link[rel~="icon"]`);l.current={title:document.title,favicon:e?.getAttribute(`href`)??null}}a===`zuplo`?(document.title=l.current.title,l.current.favicon&&l4t(l.current.favicon)):(document.title=c.productName,l4t(c.favicon))},[a,c]);let u=(0,g.useCallback)(e=>{r4t(e),n(e)},[]),d=(0,g.useCallback)(()=>{u(s===`dark`?`light`:`dark`)},[s,u]),f=(0,g.useCallback)((e,t)=>{t?.persist!==!1&&a4t(e),o(e)},[]),p=(0,g.useMemo)(()=>({brand:c,brandId:a,setBrand:f,colorScheme:s,colorSchemePreference:t,setColorSchemePreference:u,toggleColorScheme:d}),[c,a,f,s,t,u,d]);return(0,U.jsx)(WP.Provider,{value:p,children:e})},d4t=({children:e})=>(0,U.jsx)(g.Suspense,{fallback:null,children:(0,U.jsx)(u4t,{children:(0,U.jsxs)(Doe,{client:Z9,children:[(0,U.jsx)(KN,{fallback:R2t,children:(0,U.jsx)(Y2t,{children:(0,U.jsx)(nA,{children:(0,U.jsx)(fpt,{children:e})})})}),(0,U.jsx)(U2t,{})]})})});w(),v(),(0,h.createRoot)(document.getElementById(`zuplo-portal`)).render((0,U.jsx)(g.StrictMode,{children:(0,U.jsx)(()=>{let[e,t]=(0,g.useState)(!0);if(typeof window.localEditorConfig!=`object`)return(0,U.jsx)(`p`,{children:`Local editor config is missing. This is an invalid state.`});let{apeContext:n}=window.localEditorConfig;return(0,U.jsx)(hu.Provider,{value:n,children:(0,U.jsx)(qoe,{children:(0,U.jsx)(Goe,{children:(0,U.jsxs)(d4t,{children:[(0,U.jsx)(Oee,{onDisconnect:()=>t(!1),onConnect:()=>t(!0)}),!e&&(0,U.jsx)(Ou,{}),(0,U.jsx)(uee,{router:L2t})]})})})})},{})}));
|
|
1668
|
-
//# sourceMappingURL=main.local-
|
|
1668
|
+
//# sourceMappingURL=main.local-FLq5GCWm.js.map
|