@pipe0/openapi-proxy 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +147 -2
- package/dist/THIRD-PARTY-NOTICES.txt +75 -0
- package/dist/cli.js +14250 -0
- package/dist/editor/THIRD-PARTY-NOTICES.txt +781 -0
- package/dist/editor/assets/index-CvzUBQpE.js +119 -0
- package/dist/editor/assets/index-DoE_teP1.css +2 -0
- package/dist/editor/assets/inter-latin-opsz-normal-BwkfbSeq.woff2 +0 -0
- package/dist/editor/index.html +14 -0
- package/package.json +67 -4
- package/schema.json +302 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((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.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.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`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(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 P(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,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(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 F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var L=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)};function R(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,L)}catch(e){L(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function z(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else R(z.bind(null,e))}var ee={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ee,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=z,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=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.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 D(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)E.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 D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=R,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),u=o(((e,t)=>{t.exports=l()})),d=e=>(e.match(/\d+[xX]\d+|[A-Z]?[a-z]+|[A-Z]|\d+/g)??[]).join(`-`).toLowerCase();function f(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:d(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var p=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},m=e=>{let t=p(e);return t.charAt(0).toUpperCase()+t.slice(1)},h=(...e)=>{let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of n.split(/\s+/))e&&t.add(e);return[...t].join(` `)},g={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function _(e){return e!=null}function v(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??g.width,a=e.size??e.height??g.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?h(...c):h(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??g[`stroke-width`])*Number(e.size??e.width??g.width)/Number(t.size??t.width??g.width):t.strokeWidth??g[`stroke-width`];return[`svg`,{...Object.entries(g).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&_(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&_(t.width)&&{[r(`width`)]:t.width},...`height`in t&&_(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function y(e,t={}){return v(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var b=e=>{if(typeof e!=`object`||!e)return!1;for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&(t.startsWith(`aria-`)||t===`role`||t===`title`)&&e[t]!=null)return!0;return!1},x=c(u(),1),S=(0,x.createContext)({}),C=()=>(0,x.useContext)(S),w=(0,x.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:S=``}=C()??{},w=!!c||b(d),[T,E,D=[]]=y(u,{color:e??v,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:h(S,s),hasA11yProp:w,attributes:d});return(0,x.createElement)(T,{ref:f,...E},[...D.map(([e,t])=>(0,x.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function T(e,t=[],n=[]){let r=typeof e==`string`?f(e,t,n):e,i=(0,x.forwardRef)(({className:e,...t},n)=>(0,x.createElement)(w,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=m(r.name)),i}var E={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};E.node;var D=T(E),O={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};O.node;var k=T(O),A={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};A.node;var j=T(A),M={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};M.node;var N=T(M),P={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};P.node;var F=T(P),I={name:`code`,size:24,node:[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]};I.node;var L=T(I),R={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};R.node;var z=T(R),ee={name:`dices`,size:24,node:[[`rect`,{width:`12`,height:`12`,x:`2`,y:`10`,rx:`2`,ry:`2`,key:`6agr2n`}],[`path`,{d:`m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6`,key:`1o487t`}],[`path`,{d:`M6 18h.01`,key:`uhywen`}],[`path`,{d:`M10 14h.01`,key:`ssrbsk`}],[`path`,{d:`M15 6h.01`,key:`cblpky`}],[`path`,{d:`M18 9h.01`,key:`2061c0`}]]};ee.node;var B=T(ee),V={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};V.node;var te=T(V),ne={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};ne.node;var re=T(ne),H={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};H.node;var U=T(H),ie={name:`file-pen-line`,size:24,node:[[`path`,{d:`M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z`,key:`ukzhwg`}],[`path`,{d:`M14.487 7.858A1 1 0 0 1 14 7V2`,key:`1klhew`}],[`path`,{d:`M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516`,key:`rxaxab`}],[`path`,{d:`M8 18h1`,key:`13wk12`}]],aliases:[`file-signature`]};ie.node;var W=T(ie),G={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};G.node;var ae=T(G),oe={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]};oe.node;var se=T(oe),ce={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};ce.node;var le=T(ce),ue={name:`layers`,size:24,node:[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]],aliases:[`layers-3`]};ue.node;var de=T(ue),fe={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};fe.node;var pe=T(fe),me={name:`loader`,size:24,node:[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]};me.node;var he=T(me),ge={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};ge.node;var _e=T(ge),ve={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};ve.node;var ye=T(ve),be={name:`package`,size:24,node:[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]};be.node;var xe=T(be),Se={name:`plug`,size:24,node:[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]};Se.node;var Ce=T(Se),we={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};we.node;var Te=T(we),Ee={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};Ee.node;var De=T(Ee),Oe={name:`rocket`,size:24,node:[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]};Oe.node;var ke=T(Oe),Ae={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Ae.node;var je=T(Ae),Me={name:`shield`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]};Me.node;var Ne=T(Me),Pe={name:`star`,size:24,node:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]};Pe.node;var Fe=T(Pe),Ie={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};Ie.node;var Le=T(Ie),Re={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};Re.node;var ze=T(Re),Be={name:`waypoints`,size:24,node:[[`path`,{d:`m10.586 5.414-5.172 5.172`,key:`4mc350`}],[`path`,{d:`m18.586 13.414-5.172 5.172`,key:`8c96vv`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`circle`,{cx:`12`,cy:`20`,r:`2`,key:`144qzu`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}],[`circle`,{cx:`20`,cy:`12`,r:`2`,key:`1xzzfp`}],[`circle`,{cx:`4`,cy:`12`,r:`2`,key:`1hvhnz`}]]};Be.node;var Ve=T(Be),He={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};He.node;var Ue=T(He),We={name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]};We.node;var Ge=T(We),Ke=o((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}}}})),qe=o(((e,t)=>{t.exports=Ke()})),Je=o((e=>{var t=u();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`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(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.browser=function(e){return{$$typeof:o,_reason:e}},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 c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.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=d(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=d(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,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority: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=d(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=d(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,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority: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 l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),Ye=o(((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=Je()})),Xe=o((e=>{var t=qe(),n=u(),r=Ye();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){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function p(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&p(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function m(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function h(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function g(e){var t=[null,null],n=m(e);return n===null||_(t,e,n.child,{foundSelf:!1}),t}function _(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&_(e,t,n.child,r))return!0;n=n.sibling}return!1}function v(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var y=null,b=null;function x(e,t,n){return e===n||e===t&&(y=e,!0)}function S(e,t,n){return e===n?(b=e,!1):e===t&&(b!==null&&(y=e),!0)}function C(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function w(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var T=Object.assign,E=Symbol.for(`react.element`),D=Symbol.for(`react.transitional.element`),O=Symbol.for(`react.portal`),k=Symbol.for(`react.fragment`),A=Symbol.for(`react.strict_mode`),j=Symbol.for(`react.profiler`),M=Symbol.for(`react.consumer`),N=Symbol.for(`react.context`),P=Symbol.for(`react.forward_ref`),F=Symbol.for(`react.suspense`),I=Symbol.for(`react.suspense_list`),L=Symbol.for(`react.memo`),R=Symbol.for(`react.lazy`),z=Symbol.for(`react.activity`),ee=Symbol.for(`react.legacy_hidden`),B=Symbol.for(`react.memo_cache_sentinel`),V=Symbol.for(`react.view_transition`),te=Symbol.for(`react.recoverable`),ne=Symbol.iterator;function re(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var H=Symbol.for(`react.client.reference`);function U(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===H?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case k:return`Fragment`;case j:return`Profiler`;case A:return`StrictMode`;case F:return`Suspense`;case I:return`SuspenseList`;case z:return`Activity`;case V:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case O:return`Portal`;case N:return e.displayName||`Context`;case M:return(e._context.displayName||`Context`)+`.Consumer`;case P:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case L:return t=e.displayName||null,t===null?U(e.type)||`Memo`:t;case R:t=e._payload,e=e._init;try{return U(e(t))}catch{}}return null}var ie=Array.isArray,W=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},oe=[],se=-1;function ce(e){return{current:e}}function le(e){0>se||(e.current=oe[se],oe[se]=null,se--)}function ue(e,t){se++,oe[se]=e.current,e.current=t}var de=ce(null),fe=ce(null),pe=ce(null),me=ce(null);function he(e,t){switch(ue(pe,t),ue(fe,e),ue(de,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}le(de),ue(de,e)}function ge(){le(de),le(fe),le(pe)}function _e(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,ue(me,e)),t=de.current;var n=dp(t,e.type);t!==n&&(ue(fe,e),ue(de,n))}function ve(e){fe.current===e&&(le(de),le(fe)),me.current===e&&(le(me),sh._currentValue=ae)}var ye,be;function xe(e){if(ye===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ye=t&&t[1]||``,be=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+ye+e+be}var Se=!1;function Ce(e,t){if(!e||Se)return``;Se=!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}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
+
`),l=s.split(`
|
|
5
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Se=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?xe(n):``}function we(e,t){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe(`Lazy`);case 13:return e.child!==t&&t!==null?xe(`Suspense Fallback`):xe(`Suspense`);case 19:return xe(`SuspenseList`);case 0:case 15:return Ce(e.type,!1);case 11:return Ce(e.type.render,!1);case 1:return Ce(e.type,!0);case 31:return xe(`Activity`);case 30:return xe(`ViewTransition`);default:return``}}function Te(e){try{var t=``,n=null;do t+=we(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var Ee=Object.prototype.hasOwnProperty,De=t.unstable_scheduleCallback,Oe=t.unstable_cancelCallback,ke=t.unstable_shouldYield,Ae=t.unstable_requestPaint,je=t.unstable_now,Me=t.unstable_getCurrentPriorityLevel,Ne=t.unstable_ImmediatePriority,Pe=t.unstable_UserBlockingPriority,Fe=t.unstable_NormalPriority,Ie=t.unstable_LowPriority,Le=t.unstable_IdlePriority,Re=t.log,ze=t.unstable_setDisableYieldValue,Be=null,Ve=null;function He(e){if(typeof Re==`function`&&ze(e),Ve&&typeof Ve.setStrictMode==`function`)try{Ve.setStrictMode(Be,e)}catch{}}var Ue=Math.clz32?Math.clz32:Ke,We=Math.log,Ge=Math.LN2;function Ke(e){return e>>>=0,e===0?32:31-(We(e)/Ge|0)|0}var Je=256,Xe=262144,Ze=4194304;function Qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $e(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Ue(n),i=1<<r;t|=e[r],n&=~i}return t}function nt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function rt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function it(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function at(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ot(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ue(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&st(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function st(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ue(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ct(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ue(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function lt(e,t){var n=t&-t;return n=n&42?1:ut(n),(n&(e.suspendedLanes|t))===0?n:0}function ut(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function dt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ft(){var e=G.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function pt(e,t){var n=G.p;try{return G.p=e,t()}finally{G.p=n}}var mt=Math.random().toString(36).slice(2),ht=`__reactFiber$`+mt,gt=`__reactProps$`+mt,_t=`__reactContainer$`+mt,vt=`__reactEvents$`+mt,yt=`__reactListeners$`+mt,bt=`__reactHandles$`+mt,xt=`__reactResources$`+mt,St=`__reactMarker$`+mt,Ct=`__reactLoad$`+mt;function wt(e){delete e[ht],delete e[gt],delete e[yt],delete e[bt]}function Tt(e){var t;if(t=e[ht])return t;for(var n=e.parentNode;n;){if(t=n[_t]||n[ht]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fm(e);e!==null;){if(n=e[ht])return n;e=fm(e)}return t}e=n,n=e.parentNode}return null}function Et(e){if(e=e[ht]||e[_t]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Dt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ot(e){var t=e[xt];return t||=e[xt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function kt(e){e[St]=!0}function At(e){e[Ct]=void 0}var jt=new Set,K={};function Mt(e,t){Nt(e,t),Nt(e+`Capture`,t)}function Nt(e,t){for(K[e]=t,e=0;e<t.length;e++)jt.add(t[e])}var Pt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Ft={},It={};function Lt(e){return Ee.call(It,e)?!0:Ee.call(Ft,e)?!1:Pt.test(e)?It[e]=!0:(Ft[e]=!0,!1)}var Rt=!1;function zt(){var e=Rt;return Rt=!1,e}function Bt(e,t,n){if(Lt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Vt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Ht(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Ut(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Wt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Gt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Kt(e){if(!e._valueTracker){var t=Wt(e)?`checked`:`value`;e._valueTracker=Gt(e,t,``+e[t])}}function qt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Wt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var Jt=/[\n"\\]/g;function Yt(e){return e.replace(Jt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Xt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Ut(t)):e.value!==``+Ut(t)&&(e.value=``+Ut(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Qt(e,Ut(n)):o===`number`&&e.value==t?Qt(e,Ut(e.value)):Qt(e,Ut(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Ut(s):e.removeAttribute(`name`)}function Zt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Kt(e);return}n=n==null?``:``+Ut(n),t=t==null?n:``+Ut(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Kt(e)}function Qt(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function $t(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Ut(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function en(e,t,n){t!=null&&(t=``+Ut(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Ut(n)}function tn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ie(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Ut(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Kt(e)}function nn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function an(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||rn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function on(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Rt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(an(e,a,r),Rt=!0)}else for(var o in t)t.hasOwnProperty(o)&&an(e,o,t[o])}function sn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var cn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),ln=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function un(e){return ln.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function dn(){}var fn=null;function pn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mn=null,hn=null;function gn(e){var t=Et(e);if(t&&(e=t.stateNode)){var n=e[gt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Xt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Yt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[gt]||null;if(!a)throw Error(i(90));Xt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&qt(r)}break a;case`textarea`:en(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&$t(e,!!n.multiple,t,!1)}}}var _n=!1;function vn(e,t,n){if(_n)return e(t,n);_n=!0;try{return e(t)}finally{if(_n=!1,(mn!==null||hn!==null)&&(zd(),mn&&(t=mn,e=hn,hn=mn=null,gn(t),e)))for(t=0;t<e.length;t++)gn(e[t])}}function yn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[gt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var bn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,xn=!1;if(bn)try{var Sn={};Object.defineProperty(Sn,"passive",{get:function(){xn=!0}}),window.addEventListener(`test`,Sn,Sn),window.removeEventListener(`test`,Sn,Sn)}catch{xn=!1}var Cn=null,wn=null,Tn=null;function En(){if(Tn)return Tn;var e,t=wn,n=t.length,r,i=`value`in Cn?Cn.value:Cn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Tn=i.slice(e,1<r?1-r:void 0)}function Dn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function On(){return!0}function kn(){return!1}function An(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?On:kn,this.isPropagationStopped=kn,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=On)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=On)},persist:function(){},isPersistent:On}),t}var jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mn=An(jn),Nn=T({},jn,{view:0,detail:0}),Pn=An(Nn),Fn,In,Ln,Rn=T({},Nn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:J,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Ln&&(Ln&&e.type===`mousemove`?(Fn=e.screenX-Ln.screenX,In=e.screenY-Ln.screenY):In=Fn=0,Ln=e),Fn)},movementY:function(e){return`movementY`in e?e.movementY:In}}),zn=An(Rn),q=An(T({},Rn,{dataTransfer:0})),Bn=An(T({},Nn,{relatedTarget:0})),Vn=An(T({},jn,{animationName:0,elapsedTime:0,pseudoElement:0})),Hn=An(T({},jn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Un=An(T({},jn,{data:0})),Wn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Gn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Kn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function qn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Kn[e])?!!t[e]:!1}function J(){return qn}var Jn=An(T({},Nn,{key:function(e){if(e.key){var t=Wn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Dn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Gn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:J,charCode:function(e){return e.type===`keypress`?Dn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Dn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Yn=An(T({},Rn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Xn=An(T({},jn,{submitter:0})),Zn=An(T({},Nn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:J})),Qn=An(T({},jn,{propertyName:0,elapsedTime:0,pseudoElement:0})),$n=An(T({},Rn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),er=An(T({},jn,{newState:0,oldState:0,source:0})),tr=[9,13,27,32],nr=bn&&`CompositionEvent`in window,rr=null;bn&&`documentMode`in document&&(rr=document.documentMode);var ir=bn&&`TextEvent`in window&&!rr,ar=bn&&(!nr||rr&&8<rr&&11>=rr),or=` `,sr=!1;function cr(e,t){switch(e){case`keyup`:return tr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function lr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ur=!1;function dr(e,t){switch(e){case`compositionend`:return lr(t);case`keypress`:return t.which===32?(sr=!0,or):null;case`textInput`:return e=t.data,e===or&&sr?null:e;default:return null}}function fr(e,t){if(ur)return e===`compositionend`||!nr&&cr(e,t)?(e=En(),Tn=wn=Cn=null,ur=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return ar&&t.locale!==`ko`?null:t.data;default:return null}}var pr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Y(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!pr[e.type]:t===`textarea`}function mr(e,t,n,r){mn?hn?hn.push(r):hn=[r]:mn=r,t=Jf(t,`onChange`),0<t.length&&(n=new Mn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var hr=null,gr=null;function _r(e){Bf(e,0)}function vr(e){if(qt(Dt(e)))return e}function yr(e,t){if(e===`change`)return t}var br=!1;if(bn){var xr;if(bn){var Sr=`oninput`in document;if(!Sr){var Cr=document.createElement(`div`);Cr.setAttribute(`oninput`,`return;`),Sr=typeof Cr.oninput==`function`}xr=Sr}else xr=!1;br=xr&&(!document.documentMode||9<document.documentMode)}function wr(){hr&&(hr.detachEvent(`onpropertychange`,Tr),gr=hr=null)}function Tr(e){if(e.propertyName===`value`&&vr(gr)){var t=[];mr(t,gr,e,pn(e)),vn(_r,t)}}function X(e,t,n){e===`focusin`?(wr(),hr=t,gr=n,hr.attachEvent(`onpropertychange`,Tr)):e===`focusout`&&wr()}function Er(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return vr(gr)}function Dr(e,t){if(e===`click`)return vr(t)}function Or(e,t){if(e===`input`||e===`change`)return vr(t)}function kr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ar=typeof Object.is==`function`?Object.is:kr;function jr(e,t){if(Ar(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ee.call(t,i)||!Ar(e[i],t[i]))return!1}return!0}function Mr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Nr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Pr(e,t){var n=Nr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Nr(n)}}function Fr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ir(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Mr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mr(e.document)}return t}function Lr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Rr=bn&&`documentMode`in document&&11>=document.documentMode,zr=null,Br=null,Vr=null,Hr=!1;function Ur(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hr||zr==null||zr!==Mr(r)||(r=zr,`selectionStart`in r&&Lr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vr&&jr(Vr,r)||(Vr=r,r=Jf(Br,`onSelect`),0<r.length&&(t=new Mn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=zr)))}function Wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Gr={animationend:Wr(`Animation`,`AnimationEnd`),animationiteration:Wr(`Animation`,`AnimationIteration`),animationstart:Wr(`Animation`,`AnimationStart`),transitionrun:Wr(`Transition`,`TransitionRun`),transitionstart:Wr(`Transition`,`TransitionStart`),transitioncancel:Wr(`Transition`,`TransitionCancel`),transitionend:Wr(`Transition`,`TransitionEnd`)},Kr={},qr={};bn&&(qr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Gr.animationend.animation,delete Gr.animationiteration.animation,delete Gr.animationstart.animation),`TransitionEvent`in window||delete Gr.transitionend.transition);function Jr(e){if(Kr[e])return Kr[e];if(!Gr[e])return e;var t=Gr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qr)return Kr[e]=t[n];return e}var Yr=Jr(`animationend`),Xr=Jr(`animationiteration`),Zr=Jr(`animationstart`),Qr=Jr(`transitionrun`),$r=Jr(`transitionstart`),ei=Jr(`transitioncancel`),ti=Jr(`transitionend`),ni=new Map,ri=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ri.push(`scrollEnd`);function ii(e,t){ni.set(e,t),Mt(t,[e])}var ai=0;function oi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=bd.identifierPrefix;var n=ai++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function si(e){if(e==null||typeof e==`string`)return e;var t=null,n=Od;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function ci(e,t){return e=si(e),t=si(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var li=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)},ui=[],di=0,fi=0;function pi(){for(var e=di,t=fi=di=0;t<e;){var n=ui[t];ui[t++]=null;var r=ui[t];ui[t++]=null;var i=ui[t];ui[t++]=null;var a=ui[t];if(ui[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&_i(n,i,a)}}function mi(e,t,n,r){ui[di++]=e,ui[di++]=t,ui[di++]=n,ui[di++]=r,fi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function hi(e,t,n,r){return mi(e,t,n,r),vi(e)}function gi(e,t){return mi(e,null,null,t),vi(e)}function _i(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ue(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function vi(e){if(50<kd)throw kd=0,Ad=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yi={};function bi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xi(e,t,n,r){return new bi(e,t,n,r)}function Si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ci(e,t){var n=e.alternate;return n===null?(n=xi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function wi(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ti(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Si(r)&&(s=1);else if(typeof r==`string`)s=qm(e,n,de.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case z:return e=xi(31,n,t,a),e.elementType=z,e.lanes=o,e;case k:return Ei(n.children,a,o,t);case A:s=8,a|=24;break;case j:return e=xi(12,n,t,a|2),e.elementType=j,e.lanes=o,e;case F:return e=xi(13,n,t,a),e.elementType=F,e.lanes=o,e;case I:return e=xi(19,n,t,a),e.elementType=I,e.lanes=o,e;case ee:case V:return e=a|32,e=xi(30,n,t,e),e.elementType=V,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case N:s=10;break a;case M:s=9;break a;case P:s=11;break a;case L:s=14;break a;case R:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=xi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ei(e,t,n,r){return e=xi(7,e,r,t),e.lanes=n,e}function Di(e,t,n){return e=xi(6,e,null,t),e.lanes=n,e}function Oi(e){var t=xi(18,null,null,0);return t.stateNode=e,t}function ki(e,t,n){return t=xi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ai=new WeakMap;function ji(e,t){if(typeof e==`object`&&e){var n=Ai.get(e);return n===void 0?(t={value:e,source:t,stack:Te(t)},Ai.set(e,t),t):n}return{value:e,source:t,stack:Te(t)}}var Mi=[],Ni=0,Pi=null,Fi=0,Ii=[],Li=0,Ri=null,zi=1,Bi=``;function Vi(e,t){Mi[Ni++]=Fi,Mi[Ni++]=Pi,Pi=e,Fi=t}function Hi(e,t,n){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,Ri=e;var r=zi;e=Bi;var i=32-Ue(r)-1;r&=~(1<<i),n+=1;var a=32-Ue(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,zi=1<<32-Ue(t)+i|n<<i|r,Bi=a+e}else zi=1<<a|n<<i|r,Bi=e}function Ui(e){e.return!==null&&(Vi(e,1),Hi(e,1,0))}function Wi(e){for(;e===Pi;)Pi=Mi[--Ni],Mi[Ni]=null,Fi=Mi[--Ni],Mi[Ni]=null;for(;e===Ri;)Ri=Ii[--Li],Ii[Li]=null,Bi=Ii[--Li],Ii[Li]=null,zi=Ii[--Li],Ii[Li]=null}function Gi(e,t){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,zi=t.id,Bi=t.overflow,Ri=e}var Ki=null,qi=null,Ji=!1,Yi=null,Xi=!1,Zi=Error(i(519));function Qi(e){throw ia(ji(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Zi}function $i(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ht]=e,t[gt]=r,n){case`dialog`:Vf(`cancel`,t),Vf(`close`,t);break;case`iframe`:case`object`:case`embed`:Vf(`load`,t);break;case`video`:case`audio`:for(n=0;n<Rf.length;n++)Vf(Rf[n],t);break;case`source`:Vf(`error`,t);break;case`img`:case`image`:case`link`:Vf(`error`,t),Vf(`load`,t);break;case`details`:Vf(`toggle`,t);break;case`input`:Vf(`invalid`,t),Zt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Vf(`invalid`,t);break;case`textarea`:Vf(`invalid`,t),tn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||ep(t.textContent,n)?(r.popover!=null&&(Vf(`beforetoggle`,t),Vf(`toggle`,t)),r.onScroll!=null&&Vf(`scroll`,t),r.onScrollEnd!=null&&Vf(`scrollend`,t),r.onClick!=null&&(t.onclick=dn),t=!0):t=!1,t||Qi(e,!0)}function ea(e){for(Ki=e.return;Ki;)switch(Ki.tag){case 5:case 31:case 13:Xi=!1;return;case 27:case 3:Xi=!0;return;default:Ki=Ki.return}}function ta(e){if(e!==Ki)return!1;if(!Ji)return ea(e),Ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||pp(e.type,e.memoizedProps)),n=!n),n&&qi&&Qi(e),ea(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=dm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=dm(e)}else t===27?(t=qi,Sp(e.type)?(e=um,um=null,qi=e):qi=t):qi=Ki?lm(e.stateNode.nextSibling):null;return!0}function na(){qi=Ki=null,Ji=!1}function ra(){var e=Yi;return e!==null&&(fd===null?fd=e:fd.push.apply(fd,e),Yi=null),e}function ia(e){Yi===null?Yi=[e]:Yi.push(e)}var aa=ce(null),oa=null,sa=null;function ca(e,t,n){ue(aa,t._currentValue),t._currentValue=n}function la(e){e._currentValue=aa.current,le(aa)}function ua(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function da(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ua(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ua(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ua(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function fa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Ar(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===me.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}a=a.return}return e!==null&&da(t,e,n,r),t.flags|=262144,e!==null}function pa(e){for(e=e.firstContext;e!==null;){if(!Ar(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ma(e){oa=e,sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ha(e){return _a(oa,e)}function ga(e,t){return oa===null&&ma(e),_a(e,t)}function _a(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},sa===null){if(e===null)throw Error(i(308));sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sa=sa.next=t;return n}var va=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ya=t.unstable_scheduleCallback,ba=t.unstable_NormalPriority,xa={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sa(){return{controller:new va,data:new Map,refCount:0}}function Ca(e){e.refCount--,e.refCount===0&&ya(ba,function(){e.controller.abort()})}function wa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Ta=null;function Ea(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Da=null,Oa=0,ka=0,Aa=null;function ja(e,t){if(Da===null){var n=Da=[];Oa=0,ka=Nf(),Aa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Oa++,t.then(Ma,Ma),t}function Ma(){if(--Oa===0&&(Ta=null,Da!==null)){Aa!==null&&(Aa.status=`fulfilled`);var e=Da;Da=null,ka=0,Aa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Na(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Pa=W.S;W.S=function(e,t){if(hd=je(),typeof t==`object`&&t&&typeof t.then==`function`&&ja(e,t),Ta!==null)for(var n=yf;n!==null;)wa(n,Ta),n=n.next;if(n=e.types,n!==null){for(var r=yf;r!==null;)wa(r,n),r=r.next;if(ka!==0){r=Ta,r===null&&(r=Ta=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Pa!==null&&Pa(e,t)};var Fa=ce(null);function Ia(){var e=Fa.current;return e===null?Xu.pooledCache:e}function La(e,t){t===null?ue(Fa,Fa.current):ue(Fa,t.pool)}function Ra(){var e=Ia();return e===null?null:{parent:xa._currentValue,pool:e}}var za=Error(i(460)),Ba=Error(i(474)),Va=Error(i(542)),Ha={then:function(){}};function Ua(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(dn,dn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ja(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(dn,dn);else{if(e=Xu,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ja(e),e}throw Ka=t,za}}function Ga(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ka=e,za):e}}var Ka=null;function qa(){if(Ka===null)throw Error(i(459));var e=Ka;return Ka=null,e}function Ja(e){if(e===za||e===Va)throw Error(i(483))}var Ya=null,Xa=0;function Za(e){var t=Xa;return Xa+=1,Ya===null&&(Ya=[]),Wa(Ya,e,t)}function Qa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function $a(e,t){throw t.$$typeof===E?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function eo(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Di(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===k?(e=d(e,t,n.props.children,r,n.key),Qa(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===R&&Ga(i)===t.type)?(t=a(t,n.props),Qa(t,n),t.return=e,t):(t=Ti(n.type,n.key,n.props,null,e.mode,r),Qa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ki(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ei(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case D:return n=Ti(t.type,t.key,t.props,null,e.mode,n),Qa(n,t),n.return=e,n;case O:return t=ki(t,e.mode,n),t.return=e,t;case R:return t=Ga(t),f(e,t,n)}if(ie(t)||re(t))return t=Ei(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Za(t),n);if(t.$$typeof===N)return f(e,ga(e,t),n);$a(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case D:return n.key===i?l(e,t,n,r):null;case O:return n.key===i?u(e,t,n,r):null;case R:return n=Ga(n),p(e,t,n,r)}if(ie(n)||re(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Za(n),r);if(n.$$typeof===N)return p(e,t,ga(e,n),r);$a(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case D:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case O:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case R:return r=Ga(r),m(e,t,n,r,i)}if(ie(r)||re(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Za(r),i);if(r.$$typeof===N)return m(e,t,n,ga(t,r),i);$a(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ji&&Vi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ji&&Vi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ji&&Vi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ji&&Vi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ji&&Vi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ji&&Vi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case D:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),Qa(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===R&&Ga(l)===r.type){n(e,r.sibling),c=a(r,o.props),Qa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=Ei(o.props.children,e.mode,c,o.key),Qa(c,o),c.return=e,e=c):(c=Ti(o.type,o.key,o.props,null,e.mode,c),Qa(c,o),c.return=e,e=c)}return s(e);case O:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=ki(o,e.mode,c),c.return=e,e=c}return s(e);case R:return o=Ga(o),_(e,r,o,c)}if(ie(o))return h(e,r,o,c);if(re(o)){if(l=re(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,Za(o),c);if(o.$$typeof===N)return _(e,r,ga(e,o),c);$a(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Xa=0;var i=_(e,t,n,r);return Ya=null,i}catch(t){if(t===za||t===Va)throw t;var a=xi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var to=eo(!0),no=eo(!1),ro=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function oo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function so(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Yu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=vi(e),_i(e,null,n),t}return mi(e,r,t,n),vi(e)}function co(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ct(e,n)}}function lo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var uo=!1;function fo(){if(uo){var e=Aa;if(e!==null)throw e}}function po(e,t,n,r){uo=!1;var i=e.updateQueue;ro=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Qu&f)===f:(r&f)===f){f!==0&&f===ka&&(uo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=T({},d,f);break a;case 2:ro=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),od|=o,e.lanes=o,e.memoizedState=d}}function mo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function ho(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)mo(n[e],t)}var go=ce(null),_o=ce(0);function vo(e,t){e=id,ue(_o,e),ue(go,t),id=e|t.baseLanes}function yo(){ue(_o,id),ue(go,go.current)}function bo(){id=_o.current,le(go),le(_o)}var xo=ce(null),So=null;function Co(e){var t=e.alternate;ue(Oo,Oo.current&1),ue(xo,e),So===null&&(t===null||go.current!==null||t.memoizedState!==null)&&(So=e)}function wo(e){ue(Oo,Oo.current),ue(xo,e),So===null&&(So=e)}function To(e){e.tag===22?(ue(Oo,Oo.current),ue(xo,e),So===null&&(So=e)):Eo()}function Eo(){ue(Oo,Oo.current),ue(xo,xo.current)}function Do(e){le(xo),So===e&&(So=null),le(Oo)}var Oo=ce(0);function ko(e,t){ue(xo,xo.current),ue(Oo,t)}function Ao(e){le(Oo),le(xo),So===e&&(So=null)}function jo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||om(n)||sm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Mo=0,No=null,Po=null,Fo=null,Io=!1,Lo=!1,Ro=!1,zo=0,Bo=0,Vo=null,Ho=0;function Uo(){throw Error(i(321))}function Wo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ar(e[n],t[n]))return!1;return!0}function Go(e,t,n,r,i,a){return Mo=a,No=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,W.H=e===null||e.memoizedState===null?cc:lc,Ro=!1,a=n(r,i),Ro=!1,Lo&&(a=qo(t,n,r,i)),Ko(e),a}function Ko(e){W.H=sc;var t=Po!==null&&Po.next!==null;if(Mo=0,Fo=Po=No=null,Io=!1,Bo=0,Vo=null,t)throw Error(i(300));e===null||Ec||(e=e.dependencies,e!==null&&pa(e)&&(Ec=!0))}function qo(e,t,n,r){No=e;var a=0;do{if(Lo&&(Vo=null),Bo=0,Lo=!1,25<=a)throw Error(i(301));if(a+=1,Fo=Po=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}W.H=uc,o=t(n,r)}while(Lo);return o}function Jo(){var e=W.H,t=e.useState()[0];return t=typeof t.then==`function`?ts(t):t,e=e.useState()[0],(Po===null?null:Po.memoizedState)!==e&&(No.flags|=1024),t}function Yo(){var e=zo!==0;return zo=0,e}function Xo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Zo(e){if(Io){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Io=!1}Mo=0,Fo=Po=No=null,Lo=!1,Bo=zo=0,Vo=null}function Qo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e,Fo}function $o(){if(Po===null){var e=No.alternate;e=e===null?null:e.memoizedState}else e=Po.next;var t=Fo===null?No.memoizedState:Fo.next;if(t!==null)Fo=t,Po=e;else{if(e===null)throw No.alternate===null?Error(i(467)):Error(i(310));Po=e,e={memoizedState:Po.memoizedState,baseState:Po.baseState,baseQueue:Po.baseQueue,queue:Po.queue,next:null},Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e}return Fo}function es(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ts(e){var t=Bo;return Bo+=1,Vo===null&&(Vo=[]),e=Wa(Vo,e,t),t=No,(Fo===null?t.memoizedState:Fo.next)===null&&(t=t.alternate,W.H=t===null||t.memoizedState===null?cc:lc),e}function ns(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return ts(e);if(e.$$typeof===te)return;if(e.$$typeof===N)return ha(e)}throw Error(i(438,String(e)))}function rs(e){var t=null,n=No.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=No.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=es(),No.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=B;return t.index++,n}function is(e,t){return typeof t==`function`?t(e):t}function as(e){return os($o(),Po,e)}function os(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Mo&f)===f:(Qu&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ka&&(d=!0);else if((Mo&p)===p){u=u.next,p===ka&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,No.lanes|=p,od|=p;f=u.action,Ro&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,No.lanes|=f,od|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Ar(o,e.memoizedState)&&(Ec=!0,d&&(n=Aa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ss(e){var t=$o(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Ar(o,t.memoizedState)||(Ec=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function cs(e,t,n){var r=No,a=$o(),o=Ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Ar((Po||a).memoizedState,n);if(s&&(a.memoizedState=n,Ec=!0),a=a.queue,Ns(ds.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Fo!==null&&!!(Fo.memoizedState.tag&1),Os(e?9:8,{destroy:void 0},us.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Xu===null)throw Error(i(349));o||Mo&127||ls(r,t,n)}return n}function ls(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=No.updateQueue,t===null?(t=es(),No.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function us(e,t,n,r){t.value=n,t.getSnapshot=r,fs(t)&&ps(e)}function ds(e,t,n){return n(function(){fs(t)&&ps(e)})}function fs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ar(e,n)}catch{return!0}}function ps(e){var t=gi(e,2);t!==null&&Pd(t,e,2)}function ms(e){var t=Qo();if(typeof e==`function`){var n=e;if(e=n(),Ro){He(!0);try{n()}finally{He(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:e},t}function hs(e,t,n,r){return e.baseState=n,os(e,Po,typeof r==`function`?r:is)}function gs(e,t,n,r,a){if(ic(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};W.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,_s(t,o)):(o.next=n.next,t.pending=n.next=o)}}function _s(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=W.T,o={};o.types=a===null?null:a.types,W.T=o;try{var s=n(i,r),c=W.S;c!==null&&c(o,s),vs(e,t,s)}catch(n){bs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),W.T=a}}else try{a=n(i,r),vs(e,t,a)}catch(n){bs(e,t,n)}}function vs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ys(e,t,n)},function(n){return bs(e,t,n)}):ys(e,t,n)}function ys(e,t,n){t.status=`fulfilled`,t.value=n,xs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,_s(e,n)))}function bs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,xs(t),t=t.next;while(t!==r)}e.action=null}function xs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ss(e,t){return t}function Cs(e,t){if(Ji){var n=Xu.formState;if(n!==null){a:{var r=No;if(Ji){if(qi){b:{for(var i=qi,a=Xi;i.nodeType!==8;)if(!a||(i=lm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){qi=lm(i.nextSibling),r=i.data===`F!`;break a}}Qi(r)}r=!1}r&&(t=n[0])}}return n=Qo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ss,lastRenderedState:t},n.queue=r,n=tc.bind(null,No,r),r.dispatch=n,r=ms(!1),a=rc.bind(null,No,!1,r.queue),r=Qo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=gs.bind(null,No,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ws(e){return Ts($o(),Po,e)}function Ts(e,t,n){if(t=os(e,t,Ss)[0],e=as(is)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=ts(t)}catch(e){throw e===za?Va:e}else r=t;t=$o();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(No.flags|=2048,Os(9,{destroy:void 0},Es.bind(null,i,n),null)),[r,a,e]}function Es(e,t){e.action=t}function Ds(e){var t=$o(),n=Po;if(n!==null)return Ts(t,n,e);$o(),t=t.memoizedState,n=$o();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=No.updateQueue,t===null&&(t=es(),No.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ks(){return $o().memoizedState}function As(e,t,n,r){var i=Qo();No.flags|=e,i.memoizedState=Os(1|t,{destroy:void 0},n,r===void 0?null:r)}function js(e,t,n,r){var i=$o();r=r===void 0?null:r;var a=i.memoizedState.inst;Po!==null&&r!==null&&Wo(r,Po.memoizedState.deps)?i.memoizedState=Os(t,a,n,r):(No.flags|=e,i.memoizedState=Os(1|t,a,n,r))}function Ms(e,t){As(8390656,8,e,t)}function Ns(e,t){js(2048,8,e,t)}function Ps(e){No.flags|=4;var t=No.updateQueue;if(t===null)t=es(),No.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Fs(e){var t=$o().memoizedState;return Ps({ref:t,nextImpl:e}),function(){if(Yu&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Is(e,t){return js(4,2,e,t)}function Ls(e,t){return js(4,4,e,t)}function Rs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function zs(e,t,n){n=n==null?null:n.concat([e]),js(4,4,Rs.bind(null,t,e),n)}function Bs(){}function Vs(e,t){var n=$o();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Wo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Hs(e,t){var n=$o();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Wo(t,r[1]))return r[0];if(r=e(),Ro){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r}function Us(e,t,n){return n===void 0||Mo&1073741824&&!(Qu&261930)?e.memoizedState=t:(e.memoizedState=n,e=Md(),No.lanes|=e,od|=e,n)}function Ws(e,t,n,r){return Ar(n,t)?n:go.current===null?!(Mo&106)||Mo&1073741824&&!(Qu&261930)?(Ec=!0,e.memoizedState=n):(e=Md(),No.lanes|=e,od|=e,t):(e=Us(e,n,r),Ar(e,t)||(Ec=!0),e)}function Gs(e,t,n,r,i){var a=G.p;G.p=a!==0&&8>a?a:8;var o=W.T,s={};s.types=o===null?null:o.types,W.T=s,rc(e,!1,t,n);try{var c=i(),l=W.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?nc(e,t,Na(c,r),jd(e)):nc(e,t,r,jd(e))}catch(n){nc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{G.p=a,o!==null&&s.types!==null&&(o.types=s.types),W.T=o}}function Ks(){}function qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Js(e).queue;Gs(e,a,t,ae,n===null?Ks:function(){return Ys(e),n(r)})}function Js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:ae},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ys(e){var t=Js(e);t.next===null&&(t=e.alternate.memoizedState),nc(e,t.next.queue,{},jd())}function Xs(){return ha(sh)}function Zs(){return $o().memoizedState}function Qs(){return $o().memoizedState}function $s(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jd();e=oo(n);var r=so(t,e,n);r!==null&&(Pd(r,t,n),co(r,t,n)),t={cache:Sa()},e.payload=t;return}t=t.return}}function ec(e,t,n){var r=jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ic(e)?ac(t,n):(n=hi(e,t,n,r),n!==null&&(Pd(n,e,r),oc(n,t,r)))}function tc(e,t,n){nc(e,t,n,jd())}function nc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ic(e))ac(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ar(s,o))return mi(e,t,i,0),Xu===null&&pi(),!1}catch{}if(n=hi(e,t,i,r),n!==null)return Pd(n,e,r),oc(n,t,r),!0}return!1}function rc(e,t,n,r){if(r={lane:2,revertLane:Nf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ic(e)){if(t)throw Error(i(479))}else t=hi(e,n,r,2),t!==null&&Pd(t,e,2)}function ic(e){var t=e.alternate;return e===No||t!==null&&t===No}function ac(e,t){Lo=Io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function oc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ct(e,n)}}var sc={readContext:ha,use:ns,useCallback:Uo,useContext:Uo,useEffect:Uo,useImperativeHandle:Uo,useLayoutEffect:Uo,useInsertionEffect:Uo,useMemo:Uo,useReducer:Uo,useRef:Uo,useState:Uo,useDebugValue:Uo,useDeferredValue:Uo,useTransition:Uo,useSyncExternalStore:Uo,useId:Uo,useHostTransitionStatus:Uo,useFormState:Uo,useActionState:Uo,useOptimistic:Uo,useMemoCache:Uo,useCacheRefresh:Uo,useEffectEvent:Uo},cc={readContext:ha,use:ns,useCallback:function(e,t){return Qo().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:Ms,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),As(4194308,4,Rs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return As(4194308,4,e,t)},useInsertionEffect:function(e,t){As(4,2,e,t)},useMemo:function(e,t){var n=Qo();t=t===void 0?null:t;var r=e();if(Ro){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Qo();if(n!==void 0){var i=n(t);if(Ro){He(!0);try{n(t)}finally{He(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ec.bind(null,No,e),[r.memoizedState,e]},useRef:function(e){var t=Qo();return e={current:e},t.memoizedState=e},useState:function(e){e=ms(e);var t=e.queue,n=tc.bind(null,No,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Bs,useDeferredValue:function(e,t){return Us(Qo(),e,t)},useTransition:function(){var e=ms(!1);return e=Gs.bind(null,No,e.queue,!0,!1),Qo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=No,a=Qo();if(Ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Xu===null)throw Error(i(349));Qu&127||ls(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ms(ds.bind(null,r,o,e),[e]),r.flags|=2048,Os(9,{destroy:void 0},us.bind(null,r,o,n,t),null),n},useId:function(){var e=Qo(),t=Xu.identifierPrefix;if(Ji){var n=Bi,r=zi;n=(r&~(1<<32-Ue(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=zo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Ho++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Xs,useFormState:Cs,useActionState:Cs,useOptimistic:function(e){var t=Qo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=rc.bind(null,No,!0,n),n.dispatch=t,[e,t]},useMemoCache:rs,useCacheRefresh:function(){return Qo().memoizedState=$s.bind(null,No)},useEffectEvent:function(e){var t=Qo(),n={impl:e};return t.memoizedState=n,function(){if(Yu&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},lc={readContext:ha,use:ns,useCallback:Vs,useContext:ha,useEffect:Ns,useImperativeHandle:zs,useInsertionEffect:Is,useLayoutEffect:Ls,useMemo:Hs,useReducer:as,useRef:ks,useState:function(){return as(is)},useDebugValue:Bs,useDeferredValue:function(e,t){return Ws($o(),Po.memoizedState,e,t)},useTransition:function(){var e=as(is)[0],t=$o().memoizedState;return[typeof e==`boolean`?e:ts(e),t]},useSyncExternalStore:cs,useId:Zs,useHostTransitionStatus:Xs,useFormState:ws,useActionState:ws,useOptimistic:function(e,t){return hs($o(),Po,e,t)},useMemoCache:rs,useCacheRefresh:Qs,useEffectEvent:Fs},uc={readContext:ha,use:ns,useCallback:Vs,useContext:ha,useEffect:Ns,useImperativeHandle:zs,useInsertionEffect:Is,useLayoutEffect:Ls,useMemo:Hs,useReducer:ss,useRef:ks,useState:function(){return ss(is)},useDebugValue:Bs,useDeferredValue:function(e,t){var n=$o();return Po===null?Us(n,e,t):Ws(n,Po.memoizedState,e,t)},useTransition:function(){var e=ss(is)[0],t=$o().memoizedState;return[typeof e==`boolean`?e:ts(e),t]},useSyncExternalStore:cs,useId:Zs,useHostTransitionStatus:Xs,useFormState:Ds,useActionState:Ds,useOptimistic:function(e,t){var n=$o();return Po===null?(n.baseState=e,[e,n.queue.dispatch]):hs(n,Po,e,t)},useMemoCache:rs,useCacheRefresh:Qs,useEffectEvent:Fs};function dc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=jd(),i=oo(r);i.payload=t,n!=null&&(i.callback=n),t=so(e,i,r),t!==null&&(Pd(t,e,r),co(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=jd(),i=oo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=so(e,i,r),t!==null&&(Pd(t,e,r),co(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=jd(),r=oo(n);r.tag=2,t!=null&&(r.callback=t),t=so(e,r,n),t!==null&&(Pd(t,e,n),co(t,e,n))}};function pc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!jr(n,r)||!jr(i,a):!0}function mc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&fc.enqueueReplaceState(t,t.state,null)}function hc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=T({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function gc(e){li(e)}function _c(e){console.error(e)}function vc(e){li(e)}function yc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function bc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function xc(e,t,n){return n=oo(n),n.tag=3,n.payload={element:null},n.callback=function(){yc(e,t)},n}function Sc(e){return e=oo(e),e.tag=3,e}function Cc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){bc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){bc(t,n,r),typeof i!=`function`&&(vd===null?vd=new Set([this]):vd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function wc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&fa(t,n,a,!0),n=xo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return So===null?Kd():n.alternate===null&&ad===0&&(ad=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ha?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),pf(e,r,a)),!1;case 22:return n.flags|=65536,r===Ha?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),pf(e,r,a)),!1}throw Error(i(435,n.tag))}return pf(e,r,a),Kd(),!1}if(Ji)return t=xo.current,t===null?(r!==Zi&&(t=Error(i(423),{cause:r}),ia(ji(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ji(r,n),a=xc(e.stateNode,r,a),lo(e,a),ad!==4&&(ad=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Zi&&(e=Error(i(422),{cause:r}),ia(ji(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ji(o,n),dd===null?dd=[o]:dd.push(o),ad!==4&&(ad=2),t===null)return!0;r=ji(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=xc(n.stateNode,r,e),lo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(vd===null||!vd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Sc(a),Cc(a,e,n,r),lo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Tc=Error(i(461)),Ec=!1;function Dc(e,t,n,r){t.child=e===null?no(t,null,n,r):to(t,e.child,n,r)}function Oc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ma(t),r=Go(e,t,n,o,a,i),s=Yo(),e!==null&&!Ec?(Xo(e,t,i),nl(e,t,i)):(Ji&&s&&Ui(t),t.flags|=1,Dc(e,t,r,i),t.child)}function kc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Ac(e,t,a,r,i)):(e=Ti(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!rl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?jr:n,n(o,r)&&e.ref===t.ref)return nl(e,t,i)}return t.flags|=1,e=Ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ac(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(jr(a,r)&&e.ref===t.ref){if(Ec=!1,t.pendingProps=r=a,rl(e,i))e.flags&131072&&(Ec=!0);else return t.lanes=e.lanes,nl(e,t,i)}}return Rc(e,t,n,r,i)}function jc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Nc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&La(t,a===null?null:a.cachePool),a===null?yo():vo(t,a),To(t);else return r=t.lanes=536870912,Nc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&La(t,null),yo(),Eo()):(La(t,a.cachePool),vo(t,a),Eo(),t.memoizedState=null);return Dc(e,t,i,n),t.child}function Mc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Nc(e,t,n,r,i){var a=Ia();return a=a===null?null:{parent:xa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&La(t,null),yo(),To(t),e!==null&&fa(e,t,r,!0),t.childLanes=i,null}function Pc(e,t){return t=qc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Fc(e,t,n){return to(t,e.child,null,n),e=Pc(t,t.pendingProps),e.flags|=2,Do(t),t.memoizedState=null,e}function Ic(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Ji){if(r.mode===`hidden`)return e=Pc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Mc(null,e);if(wo(t),(e=qi)?(e=am(e,Xi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return t.lanes=536870912,null}return Pc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(wo(t),a){if(t.flags&256)t.flags&=-257,t=Fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Ec||fa(e,t,n,!1),a=(n&e.childLanes)!==0,Ec||a){if(go.current===null){if(r=Xu,r!==null&&(s=lt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,gi(e,s),Pd(r,e,s),Tc;Kd()}t=Fc(e,t,n)}else e=o.treeContext,qi=lm(s.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Pc(t,r),t.flags|=134221824;return t}return e=Ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Lc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Rc(e,t,n,r,i){return ma(t),n=Go(e,t,n,r,void 0,i),r=Yo(),e!==null&&!Ec?(Xo(e,t,i),nl(e,t,i)):(Ji&&r&&Ui(t),t.flags|=1,Dc(e,t,n,i),t.child)}function zc(e,t,n,r,i,a){return ma(t),t.updateQueue=null,n=qo(t,r,n,i),Ko(e),r=Yo(),e!==null&&!Ec?(Xo(e,t,a),nl(e,t,a)):(Ji&&r&&Ui(t),t.flags|=1,Dc(e,t,n,a),t.child)}function Bc(e,t,n,r,i){if(ma(t),t.stateNode===null){var a=yi,o=n.contextType;typeof o==`object`&&o&&(a=ha(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=fc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},io(t),o=n.contextType,a.context=typeof o==`object`&&o?ha(o):yi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(dc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&fc.enqueueReplaceState(a,a.state,null),po(t,r,a,i),fo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=hc(n,s);a.props=c;var l=a.context,u=n.contextType;o=yi,typeof u==`object`&&u&&(o=ha(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&mc(t,a,r,o),ro=!1;var f=t.memoizedState;a.state=f,po(t,r,a,i),fo(),l=t.memoizedState,s||f!==l||ro?(typeof d==`function`&&(dc(t,n,d,r),l=t.memoizedState),(c=ro||pc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ao(e,t),o=t.memoizedProps,u=hc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=yi,typeof l==`object`&&l&&(c=ha(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&mc(t,a,r,c),ro=!1,f=t.memoizedState,a.state=f,po(t,r,a,i),fo();var p=t.memoizedState;o!==d||f!==p||ro||e!==null&&e.dependencies!==null&&pa(e.dependencies)?(typeof s==`function`&&(dc(t,n,s,r),p=t.memoizedState),(u=ro||pc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&pa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Lc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=to(t,e.child,null,i),t.child=to(t,null,n,i)):Dc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=nl(e,t,i),e}function Vc(e,t,n,r){return na(),t.flags|=256,Dc(e,t,n,r),t.child}var Hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Uc(e){return{baseLanes:e,cachePool:Ra()}}function Wc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ld),e}function Gc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Oo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(Ji){if(i?Co(t):Eo(),(e=qi)?(e=am(e,Xi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return t.lanes=sm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Eo(),i=t.mode,a=qc({mode:`hidden`,children:a},i),r=Ei(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Uc(n),r.childLanes=Wc(e,o,n),t.memoizedState=Hc,Mc(null,r)):(Co(t),Kc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return Yc(e,t,a,o,r,c,s,n)}return i?(Eo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Ci(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ei(i,a,n,null),i.flags|=2):i=Ci(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Mc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Uc(n):(a=i.cachePool,a===null?a=Ra():(s=xa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Wc(e,o,n),t.memoizedState=Hc,Mc(e.child,r)):(Co(t),n=e.child,e=n.sibling,n=Ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Kc(e,t){return t=qc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function qc(e,t){return e=xi(22,e,null,t),e.lanes=0,e}function Jc(e,t,n){return to(t,e.child,null,n),e=Kc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yc(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Co(t),t.flags&=-257,Jc(e,t,c)):t.memoizedState===null?(Eo(),o=a.fallback,s=t.mode,a=qc({mode:`visible`,children:a.children},s),o=Ei(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,to(t,e.child,null,c),a=t.child,a.memoizedState=Uc(c),a.childLanes=Wc(e,r,c),t.memoizedState=Hc,Mc(null,a)):(Eo(),t.child=e.child,t.flags|=128,null);if(Co(t),sm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ia({value:a,source:null,stack:null})),Jc(e,t,c)}if(Ec||fa(e,t,c,!1),r=(c&e.childLanes)!==0,Ec||r){if(go.current!==null)return Jc(e,t,c);if(r=Xu,r!==null&&(a=lt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,gi(e,a),Pd(r,e,a),Tc;return om(o)||Kd(),Jc(e,t,c)}return om(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,qi=lm(o.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Kc(t,a.children),t.flags|=134221824,t)}function Xc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ua(e.return,t,n)}function Zc(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&jo(n)===null&&(t=e),e=e.sibling}return t}function Qc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function $c(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function el(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Oo.current;if(t.flags&128)return ko(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,ko(t,o),i===`backwards`&&e!==null?($c(e),Dc(e,t,r,n),$c(e)):Dc(e,t,r,n),r=Ji?Fi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xc(e,n,t);else if(e.tag===19)Xc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=Zc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,$c(t)),Qc(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&jo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Qc(t,!0,n,null,a,r);break;case`together`:Qc(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=Zc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Qc(t,!1,i,n,a,r)}return t.child}function tl(e,t,n){var r=t.pendingProps;return ca(t,t.type,r.value),Dc(e,t,r.children,n),t.child}function nl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),od|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(fa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function rl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&pa(e)))}function il(e,t,n){switch(t.tag){case 3:he(t,t.stateNode.containerInfo),ca(t,xa,e.memoizedState.cache),na();break;case 27:case 5:_e(t);break;case 4:he(t,t.stateNode.containerInfo);break;case 10:ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,wo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Co(t),t.flags|=128,null;r=fa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Gc(e,t,n):(Co(t),e=nl(e,t,n),e===null?null:e.sibling)}Co(t);break;case 19:if(t.flags&128)return el(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(fa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return el(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ko(t,Oo.current),r)break;return null;case 22:return t.lanes=0,jc(e,t,n,t.pendingProps);case 24:ca(t,xa,e.memoizedState.cache)}return nl(e,t,n)}function al(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Ec=!0;else{if(!rl(e,n)&&!(t.flags&128))return Ec=!1,il(e,t,n);Ec=!!(e.flags&131072)}}else Ec=!1,Ji&&t.flags&1048576&&Hi(t,Fi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ga(t.elementType),t.type=e,typeof e==`function`)Si(e)?(r=hc(e,r),t.tag=1,t=Bc(null,t,e,r,n)):(t.tag=0,t=Rc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===P){t.tag=11,t=Oc(null,t,e,r,n);break a}if(a===L){t.tag=14,t=kc(null,t,e,r,n);break a}if(a===N){t.tag=10,t.type=e,t=tl(null,t,n);break a}}throw t=U(e)||e,Error(i(306,t,``))}}return t;case 0:return Rc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=hc(r,t.pendingProps),Bc(e,t,r,a,n);case 3:a:{if(he(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,ao(e,t),po(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ca(t,xa,r),r!==o.cache&&da(t,[xa],n,!0),fo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Vc(e,t,r,n);break a}if(r!==a){a=ji(Error(i(424)),t),ia(a),t=Vc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(qi=lm(e.firstChild),Ki=t,Ji=!0,Yi=null,Xi=!0,n=no(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(na(),r===a){t=nl(e,t,n);break a}Dc(e,t,r,n)}t=t.child}return t;case 26:return Lc(e,t),e===null?(n=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ji||(t.stateNode=fp(t.type,t.pendingProps,pe.current,t)):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _e(t),e===null&&Ji&&(r=t.stateNode=hm(t.type,t.pendingProps,pe.current),Ki=t,Xi=!0,a=qi,Sp(t.type)?(um=a,qi=lm(r.firstChild)):qi=a),Dc(e,t,t.pendingProps.children,n),Lc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ji&&((a=r=qi)&&(r=rm(r,t.type,t.pendingProps,Xi),r===null?a=!1:(t.stateNode=r,Ki=t,qi=lm(r.firstChild),Xi=!1,a=!0)),a||Qi(t)),_e(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,pp(a,o)?r=null:s!==null&&pp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Go(e,t,Jo,null,null,n),sh._currentValue=a),Lc(e,t),Dc(e,t,r,n),t.child;case 6:return e===null&&Ji&&((e=n=qi)&&(n=im(n,t.pendingProps,Xi),n===null?e=!1:(t.stateNode=n,Ki=t,qi=null,e=!0)),e||Qi(t)),null;case 13:return Gc(e,t,n);case 4:return he(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=to(t,null,r,n):Dc(e,t,r,n),t.child;case 11:return Oc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Lc(e,t),Dc(e,t,r,n),t.child;case 8:return Dc(e,t,t.pendingProps.children,n),t.child;case 12:return Dc(e,t,t.pendingProps.children,n),t.child;case 10:return tl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ma(t),a=ha(a),r=r(a),t.flags|=1,Dc(e,t,r,n),t.child;case 14:return kc(e,t,t.type,t.pendingProps,n);case 15:return Ac(e,t,t.type,t.pendingProps,n);case 19:return el(e,t,n);case 31:return Ic(e,t,n);case 22:return jc(e,t,n,t.pendingProps);case 24:return ma(t),r=ha(xa),e===null?(a=Ia(),a===null&&(a=Xu,o=Sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},io(t),ca(t,xa,a)):((e.lanes&n)!==0&&(ao(e,t),po(t,null,null,n),fo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ca(t,xa,r),r!==a.cache&&da(t,[xa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ca(t,xa,r))),Dc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:Ji&&Ui(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Lc(e,t),Dc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function ol(e){e.flags|=4}function sl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Jm(t,r):Jm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Ud())e.flags|=8192;else throw Ka=Ha,Ba}}else e.flags&=-16777217}function cl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t)){if(Ud())e.flags|=8192;else throw Ka=Ha,Ba}}function ll(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:rt(),e.lanes|=t,ud|=t)}function ul(e,t){if(!Ji)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function dl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function fl(e,t,n){var r=t.pendingProps;switch(Wi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dl(t),null;case 1:return dl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),la(xa),ge(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ta(t)?ol(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ra())),dl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(ol(t),o===null?(dl(t),sl(t,a,null,r,n)):(dl(t),cl(t,o))):o?o===e.memoizedState?(dl(t),t.flags&=-16777217):(ol(t),dl(t),cl(t,o)):(e=e.memoizedProps,e!==r&&ol(t),dl(t),sl(t,a,e,r,n)),null;case 27:if(ve(t),n=pe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ol(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return dl(t),t.subtreeFlags&=-33554433,null}e=de.current,ta(t)?$i(t,e):(e=hm(a,r,n),t.stateNode=e,ol(t))}return dl(t),t.subtreeFlags&=-33554433,null;case 5:if(ve(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ol(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return dl(t),t.subtreeFlags&=-33554433,null}if(o=de.current,ta(t))$i(t,o);else{var s=lp(pe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ht]=t,o[gt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(rp(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&ol(t)}}return dl(t),t.subtreeFlags&=-33554433,sl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ol(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=pe.current,ta(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ht]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||Qi(t,!0)}else e=lp(e).createTextNode(r),e[ht]=t,t.stateNode=e}return dl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ta(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ht]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dl(t),e=!1}else n=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Do(t),t):(Do(t),null);if(t.flags&128)throw Error(i(558))}return dl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ta(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ht]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dl(t),a=!1}else a=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Do(t),t):(Do(t),null)}return Do(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ll(t,t.updateQueue),dl(t),null);case 4:return ge(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,dl(t),null;case 10:return la(t.type),dl(t),null;case 19:if(Ao(t),r=t.memoizedState,r===null)return dl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)ul(r,!1);else{if(ad!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=jo(e),o!==null){for(t.flags|=128,ul(r,!1),e=o.updateQueue,t.updateQueue=e,ll(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)wi(n,e),n=n.sibling;return ko(t,Oo.current&1|2),Ji&&Vi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&je()>gd&&(t.flags|=128,a=!0,ul(r,!1),t.lanes=4194304)}}else{if(!a){if(e=jo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ll(t,e),ul(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!Ji)return dl(t),null}else 2*je()-r.renderingStartTime>gd&&n!==536870912&&(t.flags|=128,a=!0,ul(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=je(),e.sibling=null,o=Oo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||Ji?ko(t,o):(n=o,ue(xo,t),ue(Oo,n),So===null&&(So=t)),Ji&&Vi(t,r.treeForkCount),e}return dl(t),null;case 22:case 23:return Do(t),bo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(dl(t),t.subtreeFlags&6&&(t.flags|=8192)):dl(t),n=t.updateQueue,n!==null&&ll(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&le(Fa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),la(xa),dl(t),null;case 25:return null;case 30:return t.flags|=33554432,dl(t),null}throw Error(i(156,t.tag))}function pl(e,t){switch(Wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(xa),ge(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(Do(t),t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Do(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ao(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ge(),null;case 10:return la(t.type),null;case 22:case 23:return Do(t),bo(),e!==null&&le(Fa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(xa),null;case 25:return null;default:return null}}function ml(e,t){switch(Wi(t),t.tag){case 3:la(xa),ge();break;case 26:case 27:case 5:ve(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&Do(t);break;case 13:Do(t);break;case 19:Ao(t);break;case 10:la(t.type);break;case 22:case 23:Do(t),bo(),e!==null&&le(Fa);break;case 24:la(xa)}}function hl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ff(t,t.return,e)}}function gl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ff(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ff(t,t.return,e)}}function _l(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ho(t,n)}catch(t){ff(e,e.return,t)}}}function vl(e,t,n){n.props=hc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ff(e,t,n)}}function yl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=oi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);p(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ff(e,t,n)}}function bl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ff(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ff(e,t,n)}else n.current=null}}function xl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)em(e.stateNode,t[n])}function Sl(e){for(var t=e.return;t!==null&&(Tl(t)&&em(e.stateNode,t.stateNode),!wl(t));)t=t.return}function Cl(e){for(var t=e.return;t!==null&&(Tl(t)&&tm(e.stateNode,t.stateNode),!wl(t));)t=t.return}function wl(e){return e.tag===5||e.tag===3||e.tag===27}function Tl(e){return e&&e.tag===7&&e.stateNode!==null}function El(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ff(e,e.return,t)}}function Dl(e,t,n){try{var r=e.stateNode;ap(r,e.type,n,t),r[gt]=t}catch(t){ff(e,e.return,t)}}function Ol(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sp(e.type)||e.tag===4}function kl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ol(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Sp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Al(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=dn)),xl(e,r),Rt=!0;else if(i!==4&&(i===27&&(xl(e,r),r=null,Sp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Al(e,t,n,r),e=e.sibling;e!==null;)Al(e,t,n,r),e=e.sibling}function jl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),xl(e,r),Rt=!0;else if(i!==4&&(i===27&&(xl(e,r),r=null,Sp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(jl(e,t,n,r),e=e.sibling;e!==null;)jl(e,t,n,r),e=e.sibling}function Ml(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);rp(t,r,n),t[ht]=e,t[gt]=n}catch(t){ff(e,e.return,t)}}var Nl=!1,Pl=null;function Fl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Nl=!0)}var Il=null;function Ll(){var e=Il;return Il=null,e}var Rl=0;function zl(e,t,n,r,i){return Rl=0,Bl(e.child,t,n,r,i)}function Bl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Op(o);r.push(s),s.view&&(a=!0)}else a||Op(o).view&&(a=!0);Nl=!0,Tp(o,Rl===0?t:t+`_`+Rl,n),Rl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Bl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Vl(e,t){for(;e!==null;)e.tag===5?Ep(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Vl(e.child,t),e=e.sibling}function Hl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Hl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=ci(t.default,t.share),t!==`none`&&(zl(e,n,t,null,!1)||Vl(e.child,!1))}e=e.sibling}}function Ul(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=oi(r,n),a=ci(r.default,n.paired?r.share:r.enter);a===`none`?Hl(e):zl(e,i,a,null,!1)?(Hl(e),n.paired||t||Nd(e,r.onEnter)):Vl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ul(e,t),e=e.sibling;else Hl(e)}function Wl(e){if(Pl!==null&&Pl.size!==0){var t=Pl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=ci(n.default,n.share);if(a!==`none`&&(zl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Nd(e,n.onShare)):Vl(e.child,!1)),t.delete(r),t.size===0)break}}}Wl(e)}e=e.sibling}}}function Gl(e){if(e.tag===30){var t=e.memoizedProps,n=oi(t,e.stateNode),r=Pl===null?void 0:Pl.get(n),i=ci(t.default,r===void 0?t.exit:t.share);i!==`none`&&(zl(e,n,i,null,!1)?r===void 0?Nd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Pl.delete(n),Nd(e,t.onShare)):Vl(e.child,!1)),Pl!==null&&Wl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Gl(e),e=e.sibling;else Pl!==null&&Wl(e)}function Kl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=oi(t,e.stateNode);t=ci(t.default,t.update),e.flags&=-5,t!==`none`&&zl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Kl(e);e=e.sibling}}function ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Vl(e.child,!1))}ql(e)}e=e.sibling}}function Jl(e){if(e.tag===30)e.stateNode.paired=null,Vl(e.child,!1),ql(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Jl(e),e=e.sibling;else ql(e)}function Yl(e){for(e=e.child;e!==null;)e.tag===30?Vl(e.child,!1):e.subtreeFlags&33554432&&Yl(e),e=e.sibling}function Xl(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Rl<a.length){var l=a[Rl],u=Op(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Tp(c,Rl===0?n:n+`_`+Rl,i),s&&e.flags&4||(Il===null&&(Il=[]),Il.push(c,Rl===0?r:r+`_`+Rl,t.memoizedProps)),Rl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Xl(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function Zl(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=oi(n,r),a=ci(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(kp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Rl=0,i=Xl(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Nd(e,n.onUpdate))}else e.subtreeFlags&33554432&&Zl(e,t);e=e.sibling}}var Ql=!1,$l=!1,eu=!1,tu=!1,nu=typeof WeakSet==`function`?WeakSet:Set,ru=null,iu=!1,au=!1,ou=!1,su=!1;function cu(e,t,n){if(e=e.containerInfo,$=gh,e=Ir(e),Lr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(cp={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,ru=t,t=n?9270:1024;ru!==null;){if(e=ru,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Gl(r[a]);if(e.alternate===null&&e.flags&2)n&&Fl(e),lu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Gl(r),lu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Fl(e),lu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,ru=r):(n&&Kl(e),lu(n))}}Pl=null}function lu(e){for(;ru!==null;){var t=ru,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=hc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){ff(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)nm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:nm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=oi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=ci(a.default,a.update),a!==`none`&&zl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,ru=r;break}ru=t.return}}function uu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Au(e,n),r&4&&hl(5,n);break;case 1:if(Au(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){ff(n,n.return,e)}else{var i=hc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ff(n,n.return,e)}}}r&64&&_l(n),r&512&&yl(n,n.return);break;case 3:if(Au(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ho(e,t)}catch(e){ff(n,n.return,e)}}break;case 27:t===null&&r&4&&Ml(n);case 26:case 5:Au(e,n),t===null&&r&4&&El(n),r&512&&yl(n,n.return);break;case 12:Au(e,n);break;case 31:Au(e,n),r&4&&yu(e,n);break;case 13:Au(e,n),r&4&&bu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=gf.bind(null,n),cm(e,n))));break;case 22:if(r=n.memoizedState!==null||Ql,!r){var a=t!==null&&t.memoizedState!==null||$l;t=Ql,i=$l,Ql=r,($l=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Mu(e,n,r)):Au(e,n),Ql=t,$l=i}break;case 30:Au(e,n),r&512&&yl(n,n.return);break;case 7:r&512&&yl(n,n.return);default:Au(e,n)}}function du(e,t){for(e=e.child;e!==null;)fu(e,t),e=e.sibling}function fu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){ff(e,e.return,t)}pu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Rt=!0}catch(t){ff(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?wp(s,!0):wp(e.stateNode,!1)}catch(t){ff(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&du(e,t);break;default:du(e,t)}}function pu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:fu(n,r);break a;case 22:n.memoizedState===null&&pu(n,r);break a;default:pu(n,r)}}e=e.sibling}}function mu(e){var t=e.alternate;t!==null&&(e.alternate=null,mu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&wt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var hu=null,gu=!1;function _u(e,t,n){for(n=n.child;n!==null;)vu(e,t,n),n=n.sibling}function vu(e,t,n){if(Ve&&typeof Ve.onCommitFiberUnmount==`function`)try{Ve.onCommitFiberUnmount(Be,n)}catch{}switch(n.tag){case 26:$l||bl(n,t),_u(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!$l&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$l||bl(n,t),Cl(n);var r=hu,i=gu;Sp(n.type)&&(hu=n.stateNode,gu=!1),_u(e,t,n),gm(n.stateNode,n.type,n.memoizedProps),hu=r,gu=i;break;case 5:$l||bl(n,t),Cl(n);case 6:if(n.tag===6&&Cl(n),r=hu,i=gu,hu=null,_u(e,t,n),hu=r,gu=i,hu!==null){if(gu)try{(hu.nodeType===9?hu.body:hu.nodeName===`HTML`?hu.ownerDocument.body:hu).removeChild(n.stateNode),Rt=!0}catch(e){ff(n,t,e)}else try{hu.removeChild(n.stateNode),Rt=!0}catch(e){ff(n,t,e)}}break;case 18:hu!==null&&(gu?(e=hu,Cp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):Cp(hu,n.stateNode));break;case 4:r=hu,i=gu,hu=n.stateNode.containerInfo,gu=!0,_u(e,t,n),hu=r,gu=i;break;case 0:case 11:case 14:case 15:gl(2,n,t),$l||gl(4,n,t),_u(e,t,n);break;case 1:$l||(bl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&vl(n,t,r)),_u(e,t,n);break;case 21:_u(e,t,n);break;case 22:$l=(r=$l)||n.memoizedState!==null,_u(e,t,n),$l=r;break;case 30:bl(n,t),_u(e,t,n);break;case 7:$l||bl(n,t),_u(e,t,n);break;default:_u(e,t,n)}}function yu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){ff(t,t.return,e)}}}function bu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){ff(t,t.return,e)}}function xu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nu),t;default:throw Error(i(435,e.tag))}}function Su(e,t){var n=xu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=_f.bind(null,e,t);t.then(r,r)}})}function Cu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Sp(l.type)){hu=l.stateNode,gu=!1;break a}break;case 5:hu=l.stateNode,gu=!1;break a;case 3:case 4:hu=l.stateNode.containerInfo,gu=!0;break a}l=l.return}if(hu===null)throw Error(i(160));vu(s,c,o),hu=null,gu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Tu(t,e,n),t=t.sibling}var wu=null;function Tu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Cu(t,e,n),Eu(e),a&4&&(gl(3,e,e.return),hl(3,e),gl(5,e,e.return));break;case 1:Cu(t,e,n),Eu(e),a&512&&($l||r===null||bl(r,r.return)),a&64&&Ql&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=wu,Cu(t,e,n),Eu(e),a&512&&($l||r===null||bl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(Ql)e.stateNode=fp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[St]||r[ht]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),rp(r,t,n),r[ht]=e,kt(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),rp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Gm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),rp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[ht]=e,kt(r),t=r}e.stateNode=t}}else Ql||Km(o,e.type,e.stateNode)}else e.stateNode=Bm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Dl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||$l||t.parentNode.removeChild(t)):a.count--,n===null?Ql||Km(o,e.type,e.stateNode):Bm(o,n,e.memoizedProps))}break;case 27:Cu(t,e,n),Eu(e),a&512&&($l||r===null||bl(r,r.return)),r!==null&&a&4&&Dl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=eu,eu=!1,Cu(t,e,n),eu=o,Eu(e),a&512&&($l||r===null||bl(r,r.return)),e.flags&32){t=e.stateNode;try{nn(t,``),Rt=!0}catch(t){ff(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Dl(e,t,r===null?t:r.memoizedProps)),a&1024&&(tu=!0);break;case 6:if(Cu(t,e,n),Eu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Rt=!0}catch(t){ff(e,e.return,t)}}break;case 3:if(Rt=!1,Wm=null,o=wu,wu=bm(t.containerInfo),Cu(t,e,n),wu=o,Eu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){ff(e,e.return,t)}tu&&(tu=!1,Du(e)),Rt=!1;break;case 4:a=eu,eu=Ql,r=zt(),o=wu,wu=bm(e.stateNode.containerInfo),Cu(t,e,n),Eu(e),wu=o,Rt&&au&&(ou=!0),Rt=r,eu=a;break;case 12:Cu(t,e,n),Eu(e);break;case 31:Cu(t,e,n),Eu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Su(e,t)));break;case 13:Cu(t,e,n),Eu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(md=je()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Su(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=Ql,l=$l,u=eu;Ql=c||o,eu=u||o,$l=l||s,Cu(t,e,n),$l=l,eu=u,Ql=c,Eu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||Ql||$l||(t=s||$l,n=Ql,r=$l,Ql=o||Ql,$l=t,ju(e,2),Ql=n,$l=r),!o&&eu||du(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Su(e,n))));break;case 19:Cu(t,e,n),Eu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Su(e,t)));break;case 30:a&512&&($l||r===null||bl(r,r.return)),a=zt(),o=au,s=(n&335544064)===n,c=e.memoizedProps,au=s&&ci(c.default,c.update)!==`none`,Cu(t,e,n),Eu(e),s&&r!==null&&Rt&&(e.flags|=4),au=o,Rt=a;break;case 21:break;case 7:a&512&&($l||r===null||bl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Cu(t,e,n),Eu(e)}}function Eu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Ol(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Tl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(wl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;jl(e,kl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(nn(l,``),n.flags&=-33),jl(e,kl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Al(e,kl(e),u,s);break;default:throw Error(i(161))}}catch(t){ff(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Du(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Du(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function Ou(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)ku(t,e),t=t.sibling;else Zl(t,!1)}function ku(e,t){var n=e.alternate;if(n===null)Ul(e,!1);else switch(e.tag){case 3:if(su=iu=!1,Ll(),Ou(t,e),!iu&&!ou){if(e=Il,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ep(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),su=!0}Il=null;break;case 5:Ou(t,e);break;case 4:r=iu,iu=!1,Ou(t,e),iu&&(ou=!0),iu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Ou(t,e):Ul(e,!1));break;case 30:r=iu,i=Ll(),iu=!1,Ou(t,e),iu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=oi(a,o),o=oi(n.memoizedProps,o);var s=ci(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Rl=0,t=Xl(e,n,t,o,s,a,!0),Rl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Nd(e,e.memoizedProps.onUpdate),Il=i):i!==null&&(i.push.apply(i,Il),Il=i),iu=e.flags&32?!0:r;break;default:Ou(t,e)}}function Au(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)uu(e,t.alternate,t),t=t.sibling}function ju(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:gl(4,n,n.return),ju(n,r);break;case 1:bl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&vl(n,n.return,i),ju(n,r);break;case 27:r&2&&gm(n.stateNode,n.type,n.memoizedProps);case 5:bl(n,n.return),n.tag!==5&&n.tag!==27||Cl(n),ju(n,r);break;case 6:Cl(n);break;case 26:bl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||$l||i.parentNode.removeChild(i),ju(n,r);break;case 22:n.memoizedState===null&&ju(n,r);break;case 30:bl(n,n.return),ju(n,r);break;case 7:bl(n,n.return);default:ju(n,r)}e=e.sibling}}function Mu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Mu(i,a,n),hl(4,a);break;case 1:if(Mu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){ff(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)mo(l[i],c)}catch(e){ff(r,r.return,e)}}s&&o&64&&_l(a),yl(a,a.return);break;case 27:n&2&&Ml(a);case 5:a.tag!==5&&a.tag!==27||Sl(a),Mu(i,a,n),s&&r===null&&o&4&&El(a),yl(a,a.return);break;case 6:Sl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||Ql||Km(bm(c.ownerDocument),a.type,c),Mu(i,a,n),s&&r===null&&o&4&&El(a),yl(a,a.return);break;case 12:Mu(i,a,n);break;case 31:Mu(i,a,n),s&&o&4&&yu(i,a);break;case 13:Mu(i,a,n),s&&o&4&&bu(i,a);break;case 22:a.memoizedState===null&&Mu(i,a,n),yl(a,a.return);break;case 30:Mu(i,a,n),yl(a,a.return);break;case 7:yl(a,a.return);default:Mu(i,a,n)}t=t.sibling}}function Nu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ca(n))}function Pu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e))}function Fu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Iu(e,t,n,r),t=t.sibling;else i&&Yl(t)}function Iu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Jl(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Fu(e,t,n,r),a&2048&&hl(9,t);break;case 1:Fu(e,t,n,r);break;case 3:Fu(e,t,n,r),i&&su&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Ca(a)));break;case 12:if(a&2048){Fu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){ff(t,t.return,e)}}else Fu(e,t,n,r);break;case 31:Fu(e,t,n,r);break;case 13:Fu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Jl(t),o._visibility&2?Fu(e,t,n,r):(o._visibility|=2,Lu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Jl(s),o._visibility&2?Fu(e,t,n,r):Ru(e,t)),a&2048&&Nu(s,t);break;case 24:Fu(e,t,n,r),a&2048&&Pu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Vl(a.child,!0),Vl(t.child,!0))),Fu(e,t,n,r);break;default:Fu(e,t,n,r)}}function Lu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Lu(a,o,s,c,i),hl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Lu(a,o,s,c,i)):u._visibility&2?Lu(a,o,s,c,i):Ru(a,o),i&&l&2048&&Nu(o.alternate,o);break;case 24:Lu(a,o,s,c,i),i&&l&2048&&Pu(o.alternate,o);break;default:Lu(a,o,s,c,i)}t=t.sibling}}function Ru(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ru(n,r),i&2048&&Nu(r.alternate,r);break;case 24:Ru(n,r),i&2048&&Pu(r.alternate,r);break;default:Ru(n,r)}t=t.sibling}}var zu=8192;function Bu(e,t,n){if(e.subtreeFlags&zu)for(e=e.child;e!==null;)Vu(e,t,n),e=e.sibling}function Vu(e,t,n){switch(e.tag){case 26:Bu(e,t,n),e.flags&zu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Zm(n,e)):Qm(n,wu,e.memoizedState,e.memoizedProps));break;case 5:Bu(e,t,n),e.flags&zu&&(e=e.stateNode,(t&335544128)===t&&Zm(n,e));break;case 3:case 4:var r=wu;wu=bm(e.stateNode.containerInfo),Bu(e,t,n),wu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=zu,zu=16777216,Bu(e,t,n),zu=r):Bu(e,t,n));break;case 30:if((e.flags&zu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Pl===null&&(Pl=new Map),Pl.set(r,i)}Bu(e,t,n);break;default:Bu(e,t,n)}}function Hu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Uu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ru=r,Ku(r,e)}Hu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Wu(e),e=e.sibling}function Wu(e){switch(e.tag){case 0:case 11:case 15:Uu(e),e.flags&2048&&gl(9,e,e.return);break;case 3:Uu(e);break;case 12:Uu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Gu(e)):Uu(e);break;default:Uu(e)}}function Gu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ru=r,Ku(r,e)}Hu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:gl(8,t,t.return),Gu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Gu(t));break;default:Gu(t)}e=e.sibling}}function Ku(e,t){for(;ru!==null;){var n=ru;switch(n.tag){case 0:case 11:case 15:gl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ru=r;else a:for(n=e;ru!==null;){r=ru;var i=r.sibling,a=r.return;if(mu(r),r===n){ru=null;break a}if(i!==null){i.return=a,ru=i;break a}ru=a}}}var qu={getCacheForType:function(e){var t=ha(xa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ha(xa).controller.signal}},Ju=typeof WeakMap==`function`?WeakMap:Map,Yu=0,Xu=null,Zu=null,Qu=0,$u=0,ed=null,td=!1,nd=!1,rd=!1,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=0,dd=null,fd=null,pd=!1,md=0,hd=0,gd=1/0,_d=null,vd=null,yd=0,bd=null,xd=null,Sd=0,Cd=0,wd=null,Td=null,Ed=null,Dd=null,Od=null,kd=0,Ad=null;function jd(){return Yu&2&&Qu!==0?Qu&-Qu:W.T===null?ft():Nf()}function Md(){if(ld===0){if(!(Qu&536870912)||Ji){var e=Xe;Xe<<=1,!(Xe&3932160)&&(Xe=262144),ld=e}else ld=536870912}return e=xo.current,e!==null&&(e.flags|=32),ld}function Nd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Pp(oi(e.memoizedProps,n))),Dd===null&&(Dd=[]),Dd.push(t.bind(null,r))}}function Pd(e,t,n){(e===Xu&&($u===2||$u===9)||e.cancelPendingCommit!==null)&&(Vd(e,0),Rd(e,Qu,ld,!1)),at(e,n),Yu&2&&e===Xu||(e===Xu&&(!(Yu&2)&&(sd|=n),ad===4&&Rd(e,Qu,ld,!1)),Tf(e))}function Fd(e,t,n){if(Yu&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||et(e,t),a=r?Jd(e,t):qd(e,t,!0),o=r;do{if(a===0){nd&&!r&&Rd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Ld(n))a=qd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=dd;var l=c.current.memoizedState.isDehydrated;if(l&&(Vd(c,s).flags|=256),s=qd(c,s,!1),s!==2&&s!==6){if(rd&&!l){c.errorRecoveryDisabledLanes|=o,sd|=o,a=4;break a}o=fd,fd=a,o!==null&&(fd===null?fd=o:fd.push.apply(fd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Vd(e,0),Rd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Rd(r,t,ld,!td);break a;case 2:fd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=md+300-je(),10<a)){if(Rd(r,t,ld,!td),$e(r,0,!0)!==0)break a;Sd=t,r.timeoutHandle=gp(Id.bind(null,r,n,fd,_d,pd,t,ld,sd,ud,td,o,`Throttled`,-0,0),a);break a}Id(r,n,fd,_d,pd,t,ld,sd,ud,td,o,null,-0,0)}break}}while(1);Tf(e)}function Id(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:dn},Pl=null,Vu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=nh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?md-je():(a&4194048)===a?hd-je():0,m=eh(d,m),m!==null)?(Sd=a,e.cancelPendingCommit=m(ef.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Rd(e,a,o,!l)):ef(e,t,a,n,r,i,o,s,c,l,u,d)}function Ld(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ar(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Rd(e,t,n,r){t=tt(e,t),t&=~cd,t&=~sd,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ue(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&st(e,n,t)}function zd(){return Yu&6?!0:(Ef(0,!1),!1)}function Bd(){if(Zu!==null){if($u===0)var e=Zu.return;else e=Zu,sa=oa=null,Zo(e),Ya=null,Xa=0,e=Zu;for(;e!==null;)ml(e.alternate,e),e=e.return;Zu=null}}function Vd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,_p(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Sd=0,Bd(),Xu=e,Zu=n=Ci(e.current,null),Qu=t,$u=0,ed=null,td=!1,nd=et(e,t),rd=!1,ud=ld=cd=sd=od=ad=0,fd=dd=null,pd=!1,id=tt(e,t),pi(),n}function Hd(e,t){No=null,W.H=sc,t===za||t===Va?(t=qa(),$u=3):t===Ba?(t=qa(),$u=4):$u=t===Tc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,ed=t,Zu===null&&(ad=1,yc(e,ji(t,e.current)))}function Ud(){var e=xo.current;return e===null?!0:(Qu&4194048)===Qu?So===null:(Qu&62914560)===Qu||Qu&536870912?e===So:!1}function Wd(){var e=W.H;return W.H=sc,e===null?sc:e}function Gd(){var e=W.A;return W.A=qu,e}function Kd(){ad=4,td||(Qu&4194048)!==Qu&&xo.current!==null||(nd=!0),!(od&134217727)&&!(sd&134217727)||Xu===null||Rd(Xu,Qu,ld,!1)}function qd(e,t,n){var r=Yu;Yu|=2;var i=Wd(),a=Gd();(Xu!==e||Qu!==t)&&(_d=null,Vd(e,t)),t=!1;var o=ad;a:do try{if($u!==0&&Zu!==null){var s=Zu,c=ed;switch($u){case 8:Bd(),o=6;break a;case 3:case 2:case 9:case 6:xo.current===null&&(t=!0);var l=$u;if($u=0,ed=null,Zd(e,s,c,l),n&&nd){o=0;break a}break;default:l=$u,$u=0,ed=null,Zd(e,s,c,l)}}Z(),o=ad;break}catch(t){Hd(e,t)}while(1);return t&&e.shellSuspendCounter++,sa=oa=null,Yu=r,W.H=i,W.A=a,Zu===null&&(Xu=null,Qu=0,pi()),o}function Z(){for(;Zu!==null;)Q(Zu)}function Jd(e,t){var n=Yu;Yu|=2;var r=Wd(),a=Gd();Xu!==e||Qu!==t?(_d=null,gd=je()+500,Vd(e,t)):nd=et(e,t);a:do try{if($u!==0&&Zu!==null){t=Zu;var o=ed;b:switch($u){case 1:$u=0,ed=null,Zd(e,t,o,1);break;case 2:case 9:if(Ua(o)){$u=0,ed=null,Xd(t);break}t=function(){$u!==2&&$u!==9||Xu!==e||($u=7),Tf(e)},o.then(t,t);break a;case 3:$u=7;break a;case 4:$u=5;break a;case 7:Ua(o)?($u=0,ed=null,Xd(t)):($u=0,ed=null,Zd(e,t,o,7));break;case 5:var s=null;switch(Zu.tag){case 26:s=Zu.memoizedState;case 5:case 27:var c=Zu;if(s?Ym(s):c.stateNode.complete){$u=0,ed=null;var l=c.sibling;if(l!==null)Zu=l;else{var u=c.return;u===null?Zu=null:(Zu=u,Qd(u))}break b}}$u=0,ed=null,Zd(e,t,o,5);break;case 6:$u=0,ed=null,Zd(e,t,o,6);break;case 8:Bd(),ad=6;break a;default:throw Error(i(462))}}Yd();break}catch(t){Hd(e,t)}while(1);return sa=oa=null,W.H=r,W.A=a,Yu=n,Zu===null?(Xu=null,Qu=0,pi(),ad):0}function Yd(){for(;Zu!==null&&!ke();)Q(Zu)}function Q(e){var t=al(e.alternate,e,id);e.memoizedProps=e.pendingProps,t===null?Qd(e):Zu=t}function Xd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=zc(n,t,t.pendingProps,t.type,void 0,Qu);break;case 11:t=zc(n,t,t.pendingProps,t.type.render,t.ref,Qu);break;case 5:Zo(t);var r=t;r===Ki&&(Ji?(ea(r),r.tag===5&&r.stateNode!=null&&(qi=r.stateNode)):(ea(r),Ji=!0));default:ml(n,t),t=Zu=wi(t,id),t=al(n,t,id)}e.memoizedProps=e.pendingProps,t===null?Qd(e):Zu=t}function Zd(e,t,n,r){sa=oa=null,Zo(t),Ya=null,Xa=0;var i=t.return;try{if(wc(e,i,t,n,Qu)){ad=1,yc(e,ji(n,e.current)),Zu=null;return}}catch(t){if(i!==null)throw Zu=i,t;ad=1,yc(e,ji(n,e.current)),Zu=null;return}t.flags&32768?(Ji||r===1?e=!0:nd||Qu&536870912?e=!1:(td=e=!0,(r===2||r===9||r===3||r===6)&&(r=xo.current,r!==null&&r.tag===13&&(r.flags|=16384))),$d(t,e)):Qd(t)}function Qd(e){var t=e;do{if(t.flags&32768){$d(t,td);return}e=t.return;var n=fl(t.alternate,t,id);if(n!==null){Zu=n;return}if(t=t.sibling,t!==null){Zu=t;return}Zu=t=e}while(t!==null);ad===0&&(ad=5)}function $d(e,t){do{var n=pl(e.alternate,e);if(n!==null){n.flags&=32767,Zu=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Zu=e;return}Zu=e=n}while(e!==null);ad=6,Zu=null}function ef(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do lf();while(yd!==0);if(Yu&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Xu&&(Zu=Xu=null,Qu=0),xd=t,bd=e,Sd=n,wd=a,Td=r,tf(e,t,n,s,c,l,f)}}function tf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Cd=s,s|=fi,ot(e,n,s,r,i,a),Dd=null,(n&335544064)===n?(Od=Ea(e),r=10262):(Od=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,vf(Fe,function(){return uf(),null})):(e.callbackNode=null,e.callbackPriority=0),Nl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=W.T,W.T=null,i=G.p,G.p=2,a=Yu,Yu|=4;try{cu(e,t,n)}finally{Yu=a,G.p=i,W.T=r}}yd=1,Nl?Ed=Mp(o,e.containerInfo,Od,af,of,rf,sf,uf,nf,null,null):(af(),of(),sf())}function nf(e){if(yd!==0){var t=bd.onRecoverableError;t(e,{componentStack:null})}}function rf(){yd===3&&(yd=0,ku(xd,bd),yd=4)}function af(){if(yd===1){yd=0;var e=bd,t=xd,n=Sd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=W.T,W.T=null;var i=G.p;G.p=2;var a=Yu;Yu|=4;try{au=ou=!1,Tu(t,e,n),n=cp;var o=Ir(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Fr(s.ownerDocument.documentElement,s)){if(c!==null&&Lr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Pr(s,h),v=Pr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gh=!!$,cp=$=null}finally{Yu=a,G.p=i,W.T=r}}e.current=t,yd=2}}function of(){if(yd===2){yd=0;var e=bd,t=xd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=W.T,W.T=null;var r=G.p;G.p=2;var i=Yu;Yu|=4;try{uu(e,t.alternate,t)}finally{Yu=i,G.p=r,W.T=n}}yd=3}}function sf(){if(yd===4||yd===3){yd=0;var e=Ed;Ed=null,Ae();var t=bd,n=xd,r=Sd,i=Td,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?yd=5:(yd=0,xd=bd=null,cf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(vd=null),dt(r),n=n.stateNode,Ve&&typeof Ve.onCommitFiberRoot==`function`)try{Ve.onCommitFiberRoot(Be,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=W.T,a=G.p,G.p=2,W.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{W.T=n,G.p=a}}if(i=Dd,o=Od,Od=null,i!==null&&(Dd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Sd&3&&lf(),Tf(t),a=t.pendingLanes,r&261930&&a&42?t===Ad?kd++:(kd=0,Ad=t):(kd=0,Ad=null),Ef(0,!1)}}function cf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ca(t)))}function lf(){return Ed!==null&&(Ed.skipTransition(),Ed=null),af(),of(),sf(),uf()}function uf(){if(yd!==5)return!1;var e=bd,t=Cd;Cd=0;var n=dt(Sd),r=W.T,a=G.p;try{G.p=32>n?32:n,W.T=null,n=wd,wd=null;var o=bd,s=Sd;if(yd=0,xd=bd=null,Sd=0,Yu&6)throw Error(i(331));var c=Yu;if(Yu|=4,Wu(o.current),Iu(o,o.current,s,n),Yu=c,Ef(0,!1),Ve&&typeof Ve.onPostCommitFiberRoot==`function`)try{Ve.onPostCommitFiberRoot(Be,o)}catch{}return!0}finally{G.p=a,W.T=r,cf(e,t)}}function df(e,t,n){t=ji(n,t),t=xc(e.stateNode,t,2),e=so(e,t,2),e!==null&&(at(e,2),Tf(e))}function ff(e,t,n){if(e.tag===3)df(e,e,n);else for(;t!==null;){if(t.tag===3){df(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vd===null||!vd.has(r))){e=ji(n,e),n=Sc(2),r=so(t,n,2),r!==null&&(Cc(n,r,t,e),at(r,2),Tf(r));break}}t=t.return}}function pf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ju;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(rd=!0,i.add(n),e=mf.bind(null,e,t,n),t.then(e,e))}function mf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Xu===e&&(Qu&n)===n&&(ad===4||ad===3&&(Qu&62914560)===Qu&&300>je()-md?Yu&2?cd|=n:Vd(e,0):cd|=n,ud===Qu&&(ud=0)),Tf(e)}function hf(e,t){t===0&&(t=rt()),e=gi(e,t),e!==null&&(at(e,t),Tf(e))}function gf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hf(e,n)}function _f(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),hf(e,n)}function vf(e,t){return De(e,t)}var yf=null,bf=null,xf=!1,Sf=!1,Cf=!1,wf=0;function Tf(e){e!==bf&&e.next===null&&(bf===null?yf=bf=e:bf=bf.next=e),Sf=!0,xf||(xf=!0,Mf())}function Ef(e,t){if(!Cf&&Sf){Cf=!0;do for(var n=!1,r=yf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ue(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,jf(r,a))}else a=Qu,a=$e(r,r===Xu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,jf(r,a))}r=r.next}while(n);Cf=!1}}function Df(){Of()}function Of(){Sf=xf=!1;var e=0;wf!==0&&hp()&&(e=wf);for(var t=je(),n=null,r=yf;r!==null;){var i=r.next,a=kf(r,t);a===0?(r.next=null,n===null?yf=i:n.next=i,i===null&&(bf=n)):(n=r,(e!==0||a&3)&&(Sf=!0)),r=i}yd!==0&&yd!==5||Ef(e,!1),wf!==0&&(wf=0)}function kf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ue(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=nt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Xu,n=Qu,n=$e(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&($u===2||$u===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Oe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||et(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Oe(r),dt(n)){case 2:case 8:n=Pe;break;case 32:n=Fe;break;case 268435456:n=Le;break;default:n=Fe}return r=Af.bind(null,e),n=De(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Oe(r),e.callbackPriority=2,e.callbackNode=null,2}function Af(e,t){if(yd!==0&&yd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(lf()&&e.callbackNode!==n)return null;var r=Qu;return r=$e(e,e===Xu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Fd(e,r,t),kf(e,je()),e.callbackNode!=null&&e.callbackNode===n?Af.bind(null,e):null)}function jf(e,t){if(lf())return null;Fd(e,t,!0)}function Mf(){bp(function(){Yu&6?De(Ne,Df):Of()})}function Nf(){if(wf===0){var e=ka;e===0&&(e=Je,Je<<=1,!(Je&261888)&&(Je=256)),wf=e}return wf}function Pf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:un(e)}function Ff(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Pf((i[gt]||null).action),o=r.submitter;o&&(t=(t=o[gt]||null)?Pf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Mn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(wf!==0){var e=new FormData(i,o);qs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),qs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var If=0;If<ri.length;If++){var Lf=ri[If];ii(Lf.toLowerCase(),`on`+(Lf[0].toUpperCase()+Lf.slice(1)))}ii(Yr,`onAnimationEnd`),ii(Xr,`onAnimationIteration`),ii(Zr,`onAnimationStart`),ii(`dblclick`,`onDoubleClick`),ii(`focusin`,`onFocus`),ii(`focusout`,`onBlur`),ii(Qr,`onTransitionRun`),ii($r,`onTransitionStart`),ii(ei,`onTransitionCancel`),ii(ti,`onTransitionEnd`),Nt(`onMouseEnter`,[`mouseout`,`mouseover`]),Nt(`onMouseLeave`,[`mouseout`,`mouseover`]),Nt(`onPointerEnter`,[`pointerout`,`pointerover`]),Nt(`onPointerLeave`,[`pointerout`,`pointerover`]),Mt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Mt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Mt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Mt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Mt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Mt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Rf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),zf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Rf));function Bf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}}}}function Vf(e,t){var n=t[vt];n===void 0&&(n=t[vt]=new Set);var r=e+`__bubble`;n.has(r)||(Gf(t,e,2,!1),n.add(r))}function Hf(e,t,n){var r=0;t&&(r|=4),Gf(n,e,r,t)}var Uf=`_reactListening`+Math.random().toString(36).slice(2);function Wf(e){if(!e[Uf]){e[Uf]=!0,jt.forEach(function(t){t!==`selectionchange`&&(zf.has(t)||Hf(t,!1,e),Hf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Uf]||(t[Uf]=!0,Hf(`selectionchange`,!1,t))}}function Gf(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!xn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Kf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Tt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}vn(function(){var r=a,i=pn(n),s=[];a:{var c=ni.get(e);if(c!==void 0){var l=Mn,u=e;switch(e){case`keypress`:if(Dn(n)===0)break a;case`keydown`:case`keyup`:l=Jn;break;case`focusin`:u=`focus`,l=Bn;break;case`focusout`:u=`blur`,l=Bn;break;case`beforeblur`:case`afterblur`:l=Bn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=zn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=q;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Zn;break;case Yr:case Xr:case Zr:l=Vn;break;case ti:l=Qn;break;case`scroll`:case`scrollend`:l=Pn;break;case`wheel`:l=$n;break;case`copy`:case`cut`:case`paste`:l=Hn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Yn;break;case`submit`:l=Xn;break;case`toggle`:case`beforetoggle`:l=er}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=yn(m,p),g!=null&&d.push(qf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==fn&&(u=n.relatedTarget||n.fromElement)&&(Tt(u)||u[_t]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Tt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=zn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Yn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Dt(c),h=l==null?u:Dt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Tt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?w(c,l,Yf):null,c!==null&&Xf(s,u,c,d,!1),l!==null&&f!==null&&Xf(s,f,l,d,!0)))}a:{if(c=r?Dt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=yr;else if(Y(c)){if(br)_=Or;else{_=Er;var v=X}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&sn(r.elementType)&&(_=yr):_=Dr;if(_&&=_(e,r)){mr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Dt(r):window,e){case`focusin`:(Y(v)||v.contentEditable===`true`)&&(zr=v,Br=r,Vr=null);break;case`focusout`:Vr=Br=zr=null;break;case`mousedown`:Hr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Hr=!1,Ur(s,n,i);break;case`selectionchange`:if(Rr)break;case`keydown`:case`keyup`:Ur(s,n,i)}var y;if(nr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else ur?cr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(ar&&n.locale!==`ko`&&(ur||b!==`onCompositionStart`?b===`onCompositionEnd`&&ur&&(y=En()):(Cn=i,wn=`value`in Cn?Cn.value:Cn.textContent,ur=!0)),v=Jf(r,b),0<v.length&&(b=new Un(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=lr(n),y!==null&&(b.data=y)))),(y=ir?dr(e,n):fr(e,n))&&(b=Jf(r,`onBeforeInput`),0<b.length&&(v=new Un(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Ff(s,e,r,n,i)}Bf(s,t)})}function qf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Jf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=yn(e,n),i!=null&&r.unshift(qf(e,i,a)),i=yn(e,t),i!=null&&r.push(qf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Yf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=yn(n,a),l!=null&&o.unshift(qf(n,l,c))):i||(l=yn(n,a),l!=null&&o.push(qf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Zf=/\r\n?/g,Qf=/\u0000|\uFFFD/g;function $f(e){return(typeof e==`string`?e:``+e).replace(Zf,`
|
|
9
|
+
`).replace(Qf,``)}function ep(e,t){return t=$f(t),$f(e)===t}function tp(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||nn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&nn(e,``+r);else return;break;case`className`:Vt(e,`class`,r);break;case`tabIndex`:Vt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Vt(e,n,r);break;case`style`:on(e,r,o);return;case`data`:if(t!==`object`){Vt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=un(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&tp(e,t,`name`,a.name,a,null),tp(e,t,`formEncType`,a.formEncType,a,null),tp(e,t,`formMethod`,a.formMethod,a,null),tp(e,t,`formTarget`,a.formTarget,a,null)):(tp(e,t,`encType`,a.encType,a,null),tp(e,t,`method`,a.method,a,null),tp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=un(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=dn);return;case`onScroll`:r!=null&&Vf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Vf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=un(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Vf(`beforetoggle`,e),Vf(`toggle`,e),Bt(e,`popover`,r);break;case`xlinkActuate`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ht(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ht(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ht(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ht(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Bt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=cn.get(n)||n,Bt(e,n,r);else return}Rt=!0}function np(e,t,n,r,a,o){switch(n){case`style`:on(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)nn(e,r);else if(typeof r==`number`||typeof r==`bigint`)nn(e,``+r);else return;break;case`onScroll`:r!=null&&Vf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Vf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=dn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!K.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[gt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Rt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Bt(e,n,r)}return}Rt=!0}function rp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Vf(`error`,e),Vf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:tp(e,t,o,s,n,null)}}a&&tp(e,t,`srcSet`,n.srcSet,n,null),r&&tp(e,t,`src`,n.src,n,null);return;case`input`:Vf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:tp(e,t,r,d,n,null)}}Zt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Vf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:tp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&$t(e,!!r,n,!0):$t(e,!!r,t,!1);return;case`textarea`:for(s in Vf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:tp(e,t,s,c,n,null)}tn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:tp(e,t,l,r,n,null)}return;case`dialog`:Vf(`beforetoggle`,e),Vf(`toggle`,e),Vf(`cancel`,e),Vf(`close`,e);break;case`iframe`:case`object`:Vf(`load`,e);break;case`video`:case`audio`:for(r=0;r<Rf.length;r++)Vf(Rf[r],e);break;case`image`:Vf(`error`,e),Vf(`load`,e);break;case`details`:Vf(`toggle`,e);break;case`embed`:case`source`:case`link`:Vf(`error`,e),Vf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:tp(e,t,u,r,n,null)}return;default:if(sn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&np(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&tp(e,t,c,r,n,null))}var ip={};function ap(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||tp(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Rt=!0),o=m;break;case`name`:m!==f&&(Rt=!0),a=m;break;case`checked`:m!==f&&(Rt=!0),u=m;break;case`defaultChecked`:m!==f&&(Rt=!0),d=m;break;case`value`:m!==f&&(Rt=!0),s=m;break;case`defaultValue`:m!==f&&(Rt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&tp(e,t,p,m,r,f)}}Xt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||tp(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Rt=!0),p=o;break;case`defaultValue`:o!==l&&(Rt=!0),c=o;break;case`multiple`:o!==l&&(Rt=!0),s=o;default:o!==l&&tp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?$t(e,!!n,n?[]:``,!1):$t(e,!!n,t,!0)):$t(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:tp(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Rt=!0),p=a;break;case`defaultValue`:a!==o&&(Rt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&tp(e,t,s,a,r,o)}en(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:tp(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Rt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:tp(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&tp(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:tp(e,t,u,p,r,m)}return;default:if(sn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&np(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||np(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&tp(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||tp(e,t,f,p,r,m)}function op(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function sp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&op(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&op(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var $=null,cp=null;function lp(e){return e.nodeType===9?e:e.ownerDocument}function up(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function dp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function fp(e,t,n,r){return n=lp(n).createElement(e),n[ht]=r,n[gt]=t,rp(n,e,t),kt(n),n}function pp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var mp=null;function hp(){var e=window.event;return e&&e.type===`popstate`?e!==mp&&(mp=e,!0):(mp=null,!1)}var gp=typeof setTimeout==`function`?setTimeout:void 0,_p=typeof clearTimeout==`function`?clearTimeout:void 0,vp=typeof Promise==`function`?Promise:void 0,yp=typeof requestAnimationFrame==`function`?requestAnimationFrame:gp,bp=typeof queueMicrotask==`function`?queueMicrotask:vp===void 0?gp:function(e){return vp.resolve(null).then(e).catch(xp)};function xp(e){setTimeout(function(){throw e})}function Sp(e){return e===`head`}function Cp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_m(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_m(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[St]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_m(e.ownerDocument.body)}n=i}while(n);Hh(t)}function wp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Tp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ep(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Dp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Op(e){return Dp(e.getBoundingClientRect(),getComputedStyle(e),e)}function kp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Dp(t,n,e)}function Ap(e){return e.documentElement.clientHeight}function jp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Mp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Ap(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Xm(f),u>$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Np(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Np.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Np.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Np.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Pp(e){return{name:e,group:new Np(`group`,e),imagePair:new Np(`image-pair`,e),old:new Np(`old`,e),new:new Np(`new`,e)}}function Fp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Fp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Bp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Rp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,Ip,e,s,r)}this._eventListeners=a}};function Ip(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Fp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Bp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Rp(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,Lp,e,n,i),r.splice(t,1),a!==null&&a()}};function Lp(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function Rp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function zp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Bp(e,t,n,r){if(e.length===0)return-1;r=zp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&zp(a.optionsOrUseCapture)===r)return i}return-1}Fp.prototype.dispatchEvent=function(e){var t=m(this._fragmentFiber);if(t===null)return!0;t=v(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Rp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Fp.prototype.focus=function(e){p(this._fragmentFiber.child,!0,Vp,e,void 0,void 0)};function Vp(e,t){return e.tag!==6&&(e=v(e),pm(e,t))}Fp.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,Hp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Vp(t[n],e);n--);};function Hp(e,t){return t.push(e),!1}Fp.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=lp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,Up,e,void 0,void 0))};function Up(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Fp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag===6||(e=v(e),t.observe(e)),!1}Fp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,Gp,e,void 0,void 0);for(var n=t=0;n<Kp.length;n++){var r=Kp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Kp[t++]=r}Kp.length=t}};function Gp(e,t){return e.tag===6||(e=v(e),t.unobserve(e)),!1}var Kp=[],qp=!1;function Jp(e,t,n){Kp.push({fragmentInstance:e,observer:t,instance:n}),qp||(qp=!0,mm(function(){qp=!1;var e=Kp;Kp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Fp.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,Yp,e,void 0,void 0),e};function Yp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=v(e),t.push.apply(t,e.getClientRects());return!1}Fp.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Fp.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,Hp,n,void 0,void 0);var r=v(t);if(n.length===0){if(n=r,h(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=g(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=v(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=v(n[0]),i=v(n[n.length-1]);var a=h(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Xp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Xp(e,t,n,r,i){var a=Tt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=m(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=w(n,a,C),t===null?t=!1:(p(t,!0,x,a,n),a=y,y=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=w(r,a,C),t===null?t=!1:(p(t,!0,S,a,r),a=y,b=y=null,t=a!==null)),t):!1}function Zp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Fp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];p(this._fragmentFiber.child,!1,Hp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=g(this._fragmentFiber);if(r=n?r[1]||r[0]||m(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=v(r),Zp(e,n);return}if(r=v(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=v(a),Zp(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function Qp(e,t){return e=v(e),$p(e,t),!1}function $p(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function em(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Kp.length;i++){var a=Kp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Kp[r++]=a)}Kp.length=r,n.observe(e)}),$p(e,t))}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Rp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Jp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function nm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:nm(n),wt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[St])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lm(e.nextSibling),e===null)break}return null}function im(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lm(e.nextSibling),e===null))return null;return e}function am(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lm(e.nextSibling),e===null))return null;return e}function om(e){return e.data===`$?`||e.data===`$~`}function sm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var um=null;function dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function fm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function pm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function mm(e){yp(function(){yp(function(t){return e(t)})})}function hm(e,t,n){switch(t=lp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function gm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&tp(e,t,r,null,ip,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===dn&&(e.onclick=null),wt(e)}function _m(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);wt(e)}var vm=new Map,ym=new Set;function bm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var xm=G.d;G.d={f:Sm,r:Cm,D:Em,C:Dm,L:Om,m:km,X:jm,S:Am,M:Mm};function Sm(){var e=xm.f(),t=zd();return e||t}function Cm(e){var t=Et(e);t!==null&&t.tag===5&&t.type===`form`?Ys(t):xm.r(e)}var wm=typeof document>`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=Yt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),rp(t,`link`,e),kt(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+Yt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Yt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Yt(n.imageSizes)+`"]`)):i+=`[href="`+Yt(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);rp(o,`link`,e),t===`style`&&(o[Ct]=!0,o.onload=o.onerror=function(){At(o)}),kt(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Yt(r)+`"][href="`+Yt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=T({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),rp(r,`link`,e),kt(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Ot(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);kt(c),rp(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Ot(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=T({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),kt(a),rp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Ot(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),kt(a),rp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=pe.current)?bm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Ot(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=Ot(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Ot(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+Yt(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Ct]){r.loading=1;return}}else t=e.createElement(`link`),t[Ct]=!0,t.onload=t.onerror=At.bind(null,t),rp(t,`link`,n),kt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+Yt(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Yt(n.href)+`"]`);if(r)return t.instance=r,kt(r),r;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),kt(r),rp(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,kt(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),kt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),rp(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,kt(a),a):(r=n,(a=vm.get(o))&&(r=T({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),kt(a),rp(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wm=null;function Gm(e,t,n){if(Wm===null){var r=new Map,i=Wm=new Map;i.set(n,r)}else i=Wm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[St]||a[ht]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Km(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,kt(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),kt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),rp(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*sp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=nh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sh={$$typeof:N,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function ch(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=it(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=it(0),this.hiddenUpdates=it(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=xi(3,null,null,t),e.current=a,a.stateNode=e,t=Sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},io(a),e}function uh(e){return e?(e=yi,e):yi}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=oo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=so(e,r,t),n!==null&&(Pd(n,e,t),co(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=gi(e,67108864);t!==null&&Pd(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=jd();t=ut(t);var n=gi(e,t);n!==null&&Pd(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=W.T;W.T=null;var a=G.p;try{G.p=2,yh(e,t,n,r)}finally{G.p=a,W.T=i}}function vh(e,t,n,r){var i=W.T;W.T=null;var a=G.p;try{G.p=8,yh(e,t,n,r)}finally{G.p=a,W.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Kf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=Et(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ue(o);s.entanglements[1]|=c,o&=~c}Tf(a),!(Yu&6)&&(gd=je()+500,Ef(0,!1))}}break;case 31:case 13:s=gi(a,2),s!==null&&Pd(s,a,2),zd(),ph(a,2)}if(a=bh(r),a===null&&Kf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Kf(e,t,r,null,n)}}function bh(e){return e=pn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=Tt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xh=e,null}function Ch(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Me()){case Ne:return 2;case Pe:return 8;case Fe:case Ie:return 32;case Le:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Et(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=Tt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,pt(e.priority,function(){hh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,pt(e.priority,function(){hh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);fn=r,n.target.dispatchEvent(r),fn=null}else return t=Et(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sh(r||n)===null)continue;break}var a=Et(n);a!==null&&(e.splice(t,3),t-=3,qs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[gt]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[gt]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dh(n,jd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),zd(),t[_t]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=ft();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.1`)throw Error(i(527,Kh,`19.3.1`));G.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:W,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{Be=Jh.inject(qh),Ve=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=gc,s=_c,c=vc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[_t]=t.current,Wf(e),new Wh(t)}})),Ze=o(((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=Xe()}))(),Qe=c(Ye(),1);function $e(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var et=e=>{switch(e){case`success`:return rt;case`info`:return at;case`warning`:return it;case`error`:return ot;default:return null}},tt=Array(12).fill(0),nt=({visible:e,className:t})=>x.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},x.createElement(`div`,{className:`sonner-spinner`},tt.map((e,t)=>x.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),rt=x.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},x.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),it=x.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},x.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),at=x.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},x.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),ot=x.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},x.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),st=x.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},x.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),x.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),ct=()=>{let[e,t]=x.useState(document.hidden);return x.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},lt=1,ut=100,dt=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:lt++,ft=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-ut;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=dt(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],x.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(mt(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!x.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!x.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!x.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!x.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=dt(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},pt=(e,t)=>ft.message(e,t),mt=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,ht=Object.assign(pt,{success:ft.success,info:ft.info,warning:ft.warning,error:ft.error,custom:ft.custom,message:ft.message,promise:ft.promise,dismiss:ft.dismiss,loading:ft.loading},{getHistory:()=>ft.toasts,getToasts:()=>ft.getActiveToasts()});$e(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function gt(e){return e.label!==void 0}var _t=3,vt=`24px`,yt=`16px`,bt=4e3,xt=356,St=14,Ct=45,wt=200;function Tt(...e){return e.filter(Boolean).join(` `)}function Et(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var Dt=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:S,expandByDefault:C,classNames:w,icons:T,closeButtonAriaLabel:E=`Close toast`}=e,[D,O]=x.useState(null),[k,A]=x.useState(null),[j,M]=x.useState(!1),[N,P]=x.useState(!1),[F,I]=x.useState(!1),[L,R]=x.useState(!1),[z,ee]=x.useState(!1),[B,V]=x.useState(0),[te,ne]=x.useState(0),re=x.useRef(n.duration||y||bt),H=x.useRef(null),U=x.useRef(null),ie=c===0,W=c+1<=o,G=n.type,ae=G??`default`,oe=n.dismissible!==!1,se=n.className||``,ce=n.descriptionClassName||``,le=x.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),ue=x.useMemo(()=>n.closeButton??p,[n.closeButton,p]),de=x.useMemo(()=>n.duration||y||bt,[n.duration,y]),fe=x.useRef(0),pe=x.useRef(0),me=x.useRef(0),he=x.useRef(null),[ge,_e]=b.split(`-`),ve=x.useMemo(()=>s.reduce((e,t,n)=>n>=le?e:e+t.height,0),[s,le]),ye=ct(),be=x.useMemo(()=>e.swipeDirections??Et(b),[e.swipeDirections,b]),xe=n.invert||t,Se=G===`loading`;pe.current=x.useMemo(()=>le*S+ve,[le,ve]),x.useEffect(()=>{re.current=de},[de]),x.useEffect(()=>{M(!0)},[]),x.useEffect(()=>{let e=U.current;if(e){let t=e.getBoundingClientRect().height;return ne(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),x.useLayoutEffect(()=>{if(!j)return;let e=U.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ne(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[j,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Ce=x.useCallback(()=>{P(!0),V(pe.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},wt)},[n,d,a,pe]);x.useEffect(()=>{if(n.promise&&G===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||ye?(()=>{if(me.current<fe.current){let e=new Date().getTime()-fe.current;re.current-=e}me.current=new Date().getTime()})():re.current!==1/0&&(fe.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Ce()},re.current)),()=>clearTimeout(e)},[u,i,n,G,ye,Ce]),x.useEffect(()=>{n.delete&&(Ce(),n.onDismiss==null||n.onDismiss.call(n,n))},[Ce,n.delete]);function we(){return T?.loading?x.createElement(`div`,{className:Tt(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":G===`loading`},T.loading):x.createElement(nt,{className:Tt(w?.loader,n?.classNames?.loader),visible:G===`loading`})}let Te=n.icon||T?.[G]||et(G);return x.createElement(`li`,{tabIndex:0,ref:U,className:Tt(_,se,w?.toast,n?.classNames?.toast,w?.[ae],n?.classNames?.[ae]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":j,"data-promise":!!n.promise,"data-swiped":z,"data-removed":N,"data-visible":W,"data-y-position":ge,"data-x-position":_e,"data-index":c,"data-front":ie,"data-swiping":F,"data-dismissible":oe,"data-type":G,"data-invert":xe,"data-swipe-out":L,"data-swipe-direction":k,"data-expanded":!!(u||C&&j),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${N?B:pe.current}px`,"--initial-height":C?`auto`:`${te}px`,...m,...n.style},onDragEnd:()=>{I(!1),O(null),he.current=null},onPointerDown:e=>{e.button!==2&&!Se&&oe&&(H.current=new Date,V(pe.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(I(!0),he.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(L||!oe)return;he.current=null;let e=Number(U.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(U.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-H.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if((D===`x`?be.includes(e>0?`right`:`left`):be.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=Ct||a>.11))V(pe.current),n.onDismiss==null||n.onDismiss.call(n,n),A(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Ce(),R(!0);else{var o,s;(o=U.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=U.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),ee(!1),I(!1),O(null)}},onPointerMove:e=>{var t,n;if(!he.current||!oe||window.getSelection()?.toString().length>0)return;let r=e.clientY-he.current.y,i=e.clientX-he.current.x;!D&&(Math.abs(i)>1||Math.abs(r)>1)&&O(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(be.includes(`top`)||be.includes(`bottom`)){if(be.includes(`top`)&&r<0||be.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(D===`x`&&(be.includes(`left`)||be.includes(`right`))){if(be.includes(`left`)&&i<0||be.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&ee(!0),(t=U.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=U.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},ue&&!n.jsx&&G!==`loading`?x.createElement(`button`,{"aria-label":E,"data-disabled":Se,"data-close-button":!0,onClick:Se||!oe?()=>{}:()=>{Ce(),n.onDismiss==null||n.onDismiss.call(n,n)},className:Tt(w?.closeButton,n?.classNames?.closeButton)},T?.close??st):null,(G||n.icon||n.promise)&&n.icon!==null&&(T?.[G]!==null||n.icon)?x.createElement(`div`,{"data-icon":``,className:Tt(w?.icon,n?.classNames?.icon)},G===`loading`?n.icon||we():n.promise?we():null,G===`loading`?null:Te):null,x.createElement(`div`,{"data-content":``,className:Tt(w?.content,n?.classNames?.content)},x.createElement(`div`,{"data-title":``,className:Tt(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?x.createElement(`div`,{"data-description":``,className:Tt(v,ce,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),x.isValidElement(n.cancel)?n.cancel:n.cancel&>(n.cancel)?x.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{gt(n.cancel)&&oe&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Ce())},className:Tt(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,x.isValidElement(n.action)?n.action:n.action&>(n.action)?x.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{gt(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),e.defaultPrevented||Ce())},className:Tt(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function Ot(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function kt(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?yt:vt;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var At=x.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=_t,toastOptions:g,dir:_=Ot(),gap:v=St,icons:y,customAriaLabel:b,containerAriaLabel:S=`Notifications`}=e,[C,w]=x.useState([]),T=x.useMemo(()=>n?C.filter(e=>e.toasterId===n):C.filter(e=>!e.toasterId),[C,n]),E=x.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[D,O]=x.useState([]),[k,A]=x.useState(!1),[j,M]=x.useState(!1),[N,P]=x.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),F=x.useRef(null),I=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),L=x.useRef(null),R=x.useRef(!1),z=x.useCallback(e=>{w(t=>(t.find(t=>t.id===e.id)?.delete||ft.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return x.useEffect(()=>ft.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{Qe.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),x.useEffect(()=>{if(d!==`system`){P(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?P(`dark`):P(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{P(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{P(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),x.useEffect(()=>{C.length<=1&&A(!1)},[C]),x.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;A(!0),(t=F.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===F.current||F.current?.contains(document.activeElement))&&A(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),x.useEffect(()=>{if(F.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,R.current=!1)}},[F.current]),x.createElement(`section`,{ref:t,"aria-label":b??`${S} ${I}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},E.map((t,n)=>{let[i,a]=t.split(`-`);return T.length?x.createElement(`ol`,{key:t,dir:_===`auto`?Ot():_,tabIndex:-1,ref:F,className:c,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${D[0]?.height||0}px`,"--width":`${xt}px`,"--gap":`${v}px`,...m,...kt(l,u)},onBlur:e=>{R.current&&!e.currentTarget.contains(e.relatedTarget)&&(R.current=!1,L.current&&=(L.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||R.current||(R.current=!0,L.current=e.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{j||A(!1)},onDragEnd:()=>A(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||M(!0)},onPointerUp:()=>M(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>x.createElement(Dt,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:j,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:z,toasts:T.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:O,expandByDefault:o,gap:v,expanded:k,swipeDirections:e.swipeDirections}))):null}))}),jt=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),K=o(((e,t)=>{t.exports=jt()}))(),Mt=(0,x.createContext)(``);function Nt({slug:e,children:t}){let n=(0,x.useContext)(Mt);return(0,K.jsx)(`a`,{href:`${n}/docs/${e}`,target:`_blank`,rel:`noreferrer`,className:`font-medium whitespace-nowrap text-foreground underline decoration-border underline-offset-4 hover:decoration-current`,children:t})}function Pt(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Pt(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Ft(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Pt(e))&&(r&&(r+=` `),r+=t);return r}var It=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Lt=(e,t)=>({classGroupId:e,validator:t}),Rt=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),zt=`-`,Bt=[],Vt=`arbitrary..`,Ht=e=>{let t=Gt(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Wt(e);let n=e.split(zt);return Ut(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?It(i,t):t:i||Bt}return n[e]||Bt}}},Ut=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Ut(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(zt):e.slice(t).join(zt),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Wt=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Vt+r:void 0})(),Gt=e=>{let{theme:t,classGroups:n}=e;return Kt(n,t)},Kt=(e,t)=>{let n=Rt();for(let r in e){let i=e[r];qt(i,n,r,t)}return n},qt=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Jt(i,t,n,r)}},Jt=(e,t,n,r)=>{typeof e==`string`?Yt(e,t,n):typeof e==`function`?Xt(e,t,n,r):Zt(e,t,n,r)},Yt=(e,t,n)=>{let r=e===``?t:Qt(t,e);r.classGroupId=n},Xt=(e,t,n,r)=>{$t(e)?qt(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(Lt(n,e)))},Zt=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];qt(o,Qt(t,a),n,r)}},Qt=(e,t)=>{let n=e,r=t.split(zt),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Rt(),n.nextPart.set(t,i)),n=i}return n},$t=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,en=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},tn=`!`,nn=`:`,rn=[],an=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),on=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let c=e[s];if(n===0&&r===0){if(c===nn){t.push(e.slice(i,s)),i=s+1;continue}if(c===`/`){a=s;continue}}if(c===`[`)n++;else if(c===`]`)n--;else if(c===`(`)r++;else if(c===`)`)r--;else if(c===`\\`)s++;else if(c===`"`||c===`'`)for(;++s<o;){let t=e[s];if(t===`\\`)s++;else if(t===c)break}}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(tn)?(c=s.slice(0,-1),l=!0):s.startsWith(tn)&&(c=s.slice(1),l=!0);let u=l&&s.startsWith(tn)?1:0,d=a&&a>i?a-i-u:void 0;return an(t,l,c,d)};if(t){let e=t+nn,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):an(rn,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},sn=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},cn=e=>({cache:en(e.cacheSize),parseClassName:on(e),sortModifiers:sn(e),postfixLookupClassGroupIds:ln(e),...Ht(e)}),ln=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},un=/\s+/,dn=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(un),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+tn:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},fn=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=pn(n))&&(i&&(i+=` `),i+=r);return i},pn=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=pn(e[r]))&&(n&&(n+=` `),n+=t);return n},mn=(e,...t)=>{let n,r,i,a,o=o=>(n=cn(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=dn(e,n);return i(e,a),a};return a=o,(...e)=>a(fn(...e))},hn=[],gn=e=>{let t=t=>t[e]||hn;return t.isThemeGetter=!0,t.themeKey=e,t},_n=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,vn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,bn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|Q|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^--spacing\(.+\)|^0$/,Sn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark|contrast-color|device-cmyk|--alpha)\(.+\)$/i,Cn=/^(?:_*[+-]?(?:\d|\.\d)|[\w-]+\(|_*(?:inherit|initial|revert(?:-layer)?|unset)_*$)/i,wn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Tn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,En=e=>yn.test(e),Dn=e=>!!e&&!Number.isNaN(Number(e)),On=e=>!!e&&Number.isInteger(Number(e)),kn=e=>e.endsWith(`%`)&&Dn(e.slice(0,-1)),An=e=>bn.test(e),jn=()=>!0,Mn=e=>xn.test(e)&&!Sn.test(e),Nn=e=>Cn.test(e)&&!Sn.test(e),Pn=()=>!1,Fn=e=>wn.test(e),In=e=>Tn.test(e),Ln=e=>!q(e)&&!J(e),Rn=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),zn=e=>nr(e,or,Pn),q=e=>_n.test(e),Bn=e=>nr(e,sr,Mn),Vn=e=>nr(e,cr,Nn),Hn=e=>nr(e,lr,Dn),Un=e=>nr(e,dr,jn),Wn=e=>nr(e,ur,Pn),Gn=e=>nr(e,ir,Pn),Kn=e=>nr(e,ar,In),qn=e=>nr(e,fr,Fn),J=e=>vn.test(e),Jn=e=>rr(e,sr),Yn=e=>rr(e,cr,!0),Xn=e=>rr(e,ur),Zn=e=>rr(e,ir),Qn=e=>rr(e,or),$n=e=>rr(e,ar),er=e=>rr(e,fr,!0),tr=e=>rr(e,dr,!0),nr=(e,t,n)=>{let r=_n.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},rr=(e,t,n=!1)=>{let r=vn.exec(e);return r?r[1]?t(r[1]):n:!1},ir=e=>e===`position`||e===`percentage`,ar=e=>e===`image`||e===`url`,or=e=>e===`length`||e===`size`||e===`bg-size`,sr=e=>e===`length`,cr=e=>e!==`color`,lr=e=>e===`number`,ur=e=>e===`family-name`,dr=e=>e===`number`||e===`weight`,fr=e=>e===`shadow`,pr=mn(()=>{let e=gn(`color`),t=gn(`font`),n=gn(`text`),r=gn(`font-weight`),i=gn(`tracking`),a=gn(`leading`),o=gn(`breakpoint`),s=gn(`container`),c=gn(`spacing`),l=gn(`radius`),u=gn(`shadow`),d=gn(`inset-shadow`),f=gn(`text-shadow`),p=gn(`drop-shadow`),m=gn(`blur`),h=gn(`perspective`),g=gn(`aspect`),_=gn(`ease`),v=gn(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),J,q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[J,q,c],T=()=>[En,`full`,`auto`,...w()],E=()=>[On,`none`,`subgrid`,J,q],D=()=>[`auto`,{span:[`full`,On,J,q]},On,J,q],O=()=>[On,`auto`,J,q],k=()=>[`auto`,`min`,`max`,`fr`,J,q],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[En,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[s,En,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[En,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,J,q],L=()=>[...b(),Zn,Gn,{position:[J,q]}],R=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],z=()=>[`auto`,`cover`,`contain`,Qn,zn,{size:[J,q]}],ee=()=>[kn,Jn,Bn],B=()=>[``,`none`,`full`,l,J,q],V=()=>[``,Dn,Jn,Bn],te=()=>[`solid`,`dashed`,`dotted`,`double`],ne=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],re=()=>[Dn,kn,Yn,Vn],H=()=>[``,`none`,m,J,q],U=()=>[`none`,Dn,J,q],ie=()=>[`none`,Dn,J,q],W=()=>[Dn,J,q],G=()=>[En,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[An],breakpoint:[An],color:[jn],container:[An],"drop-shadow":[An],ease:[`in`,`out`,`in-out`],font:[Ln],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[An],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[An],shadow:[An],spacing:[`px`,Dn],text:[An],"text-shadow":[An],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,En,q,J,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,J,q]}],"container-named":[Rn],columns:[{columns:[Dn,`auto`,q,J,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`],"not-sr":[`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[On,`auto`,J,q]}],basis:[{basis:[En,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Dn,En,`auto`,`initial`,`none`,J,q]}],grow:[{grow:[``,Dn,J,q]}],shrink:[{shrink:[``,Dn,J,q]}],order:[{order:[On,`first`,`last`,`none`,J,q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...N()]}],"font-size":[{text:[`base`,n,Jn,Bn]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,tr,Un]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,kn,q]}],"font-family":[{font:[Xn,Wn,t]}],"font-features":[{"font-features":[q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,J,q]}],"line-clamp":[{"line-clamp":[Dn,`none`,J,q]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,J,q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,J,q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...te(),`wavy`]}],"text-decoration-thickness":[{decoration:[Dn,`from-font`,`auto`,Jn,Zn,Bn]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Dn,`auto`,J,q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[On,J,q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,J,q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,J,q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:z()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},On,J,q],radial:[``,J,q],conic:[``,On,J,q]},$n,Kn]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-bs":[{"border-bs":V()}],"border-w-be":[{"border-be":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":V()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...te(),`hidden`,`none`]}],"divide-style":[{divide:[...te(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...te(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Dn,J,q]}],"outline-w":[{outline:[``,Dn,Jn,Bn]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`inner`,`none`,u,er,qn]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,er,qn]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:V()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Dn,Bn]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,er,qn]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Dn,J,q]}],"mix-blend":[{"mix-blend":[...ne(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ne()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Dn]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[J,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{mask:[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Dn]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,J,q]}],filter:[{filter:[``,`none`,J,q]}],blur:[{blur:H()}],brightness:[{brightness:[Dn,J,q]}],contrast:[{contrast:[Dn,J,q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,er,qn]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,Dn,J,q]}],"hue-rotate":[{"hue-rotate":[Dn,J,q]}],invert:[{invert:[``,Dn,J,q]}],saturate:[{saturate:[Dn,J,q]}],sepia:[{sepia:[``,Dn,J,q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,J,q]}],"backdrop-blur":[{"backdrop-blur":H()}],"backdrop-brightness":[{"backdrop-brightness":[Dn,J,q]}],"backdrop-contrast":[{"backdrop-contrast":[Dn,J,q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Dn,J,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Dn,J,q]}],"backdrop-invert":[{"backdrop-invert":[``,Dn,J,q]}],"backdrop-opacity":[{"backdrop-opacity":[Dn,J,q]}],"backdrop-saturate":[{"backdrop-saturate":[Dn,J,q]}],"backdrop-sepia":[{"backdrop-sepia":[``,Dn,J,q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,J,q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Dn,`initial`,J,q]}],ease:[{ease:[`linear`,`initial`,_,J,q]}],delay:[{delay:[Dn,J,q]}],animate:[{animate:[`none`,v,J,q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,J,q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:U()}],"rotate-x":[{"rotate-x":U()}],"rotate-y":[{"rotate-y":U()}],"rotate-z":[{"rotate-z":U()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":[`scale-3d`],skew:[{skew:W()}],"skew-x":[{"skew-x":W()}],"skew-y":[{"skew-y":W()}],transform:[{transform:[J,q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":[`translate-none`],zoom:[{zoom:[On,J,q]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,J,q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,J,q]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[Dn,Jn,Bn,Hn]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],"place-content":[`align-content`,`justify-content`],"place-items":[`align-items`,`justify-items`],"place-self":[`align-self`,`justify-self`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],sr:`not-sr.position.size.w.h.p.px.py.ps.pe.pbs.pbe.pt.pr.pb.pl.m.mx.my.ms.me.mbs.mbe.mt.mr.mb.ml.overflow.overflow-x.overflow-y.whitespace`.split(`.`),"not-sr":[`sr`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],"mask-image-x-from-pos":[`mask-image-r-from-pos`,`mask-image-l-from-pos`],"mask-image-x-to-pos":[`mask-image-r-to-pos`,`mask-image-l-to-pos`],"mask-image-x-from-color":[`mask-image-r-from-color`,`mask-image-l-from-color`],"mask-image-x-to-color":[`mask-image-r-to-color`,`mask-image-l-to-color`],"mask-image-y-from-pos":[`mask-image-t-from-pos`,`mask-image-b-from-pos`],"mask-image-y-to-pos":[`mask-image-t-to-pos`,`mask-image-b-to-pos`],"mask-image-y-from-color":[`mask-image-t-from-color`,`mask-image-b-from-color`],"mask-image-y-to-color":[`mask-image-t-to-color`,`mask-image-b-to-color`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Y(...e){return pr(Ft(e))}function mr(e){return e<1e3?`${e} B`:e<1e6?`${(e/1e3).toFixed(+(e<1e4))} KB`:`${(e/1e6).toFixed(1)} MB`}function hr(e){return new Blob([e]).size}function gr(e,t,n=`${t}s`){return`${e.toLocaleString(`en-US`)} ${e===1?t:n}`}function _r(e){return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}var vr=typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform)?`⌘`:`Ctrl`;function yr(e){return e.replace(/^https?:\/\//,``)}function br({label:e,hint:t,error:n,htmlFor:r,children:i,className:a}){return(0,K.jsxs)(`div`,{className:Y(`flex flex-col gap-1.5`,a),children:[e&&(0,K.jsx)(`label`,{htmlFor:r,className:`text-[13px] leading-5 font-medium`,children:e}),(0,K.jsx)(`div`,{children:i}),n?(0,K.jsx)(`p`,{role:`alert`,className:`text-[12.5px] leading-[18px] text-bad-foreground`,children:n}):t&&(0,K.jsx)(`p`,{className:`max-w-prose text-[12.5px] leading-[18px] text-muted-foreground`,children:t})]})}function xr({tone:e=`bad`,children:t,action:n,className:r}){return(0,K.jsxs)(`div`,{role:e===`bad`?`alert`:`status`,className:Y(`flex flex-wrap items-center gap-x-3 gap-y-1.5 rounded-lg px-3.5 py-2.5 text-[13px] leading-5 ring-1 ring-inset`,{bad:`bg-bad text-bad-foreground ring-bad-edge/20`,warn:`bg-warn text-warn-foreground ring-warn-edge/25`,accent:`bg-primary/6 text-foreground ring-primary/20 dark:bg-primary/12`,neutral:`bg-muted/60 text-foreground ring-border`}[e],r),children:[(0,K.jsx)(`div`,{className:`min-w-0 flex-1`,children:t}),n&&(0,K.jsx)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:n})]})}function Sr(e){let t=e.sources.find(e=>e.main)??e.sources[0];return t?[t,...e.sources.filter(e=>e!==t)]:[]}function Cr(e){return e.name??`main`}var wr=[`get`,`put`,`post`,`delete`,`options`,`head`,`patch`,`trace`,`query`],Tr=[`schemas`,`responses`,`parameters`,`examples`,`requestBodies`,`headers`,`securitySchemes`,`links`,`callbacks`,`pathItems`,`mediaTypes`];function X(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Er={depth:200,size:3e7},Dr={depth:400,size:3e7},Or=class extends Error{code;constructor(e,t){super(t),this.name=`DocumentTooComplexError`,this.code=e}};function kr(e){return new Or(`too-deep`,`The document is nested more than ${e} levels deep.`)}var Ar=e=>new Or(`not-plain-data`,e);function jr(e,t,n={}){let r=[e],i=[1],a=0;for(;r.length>0;){let e=r.pop(),o=i.pop(),s=2*o+2;if(zr(),typeof e==`string`)a+=Mr(e,s);else if(typeof e!=`object`||!e)n.plainDataOnly&&Nr(e),a+=String(e).length;else{if(o>t.depth)throw kr(t.depth);if(Array.isArray(e)){a+=2+(e.length+1)*s;for(let t of e)r.push(t),i.push(o+1)}else{n.plainDataOnly&&Pr(e);let t=Object.keys(e);a+=2+(t.length+1)*s;for(let n of t)a+=Mr(n,s)+4+(n.length>1e3?s:0),r.push(e[n]),i.push(o+1)}}if(a>t.size)throw new Or(`too-large`,`The document comes to more than ${Math.round(t.size/1e6)} MB when it is written out, with everything it repeats and every level it nests.`)}return a}function Mr(e,t){zr(e.length>>>5);let n=2,r=0;for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);i===10?r+=1:n+=i<32||i>=127?6:i===34||i===92?2:1}return r===0?n:n+(r+1)*t}function Nr(e){if(e!==null&&typeof e!=`boolean`&&!(typeof e==`number`&&Number.isFinite(e)))throw Ar(typeof e==`number`?`The document holds a number that JSON cannot express (infinity, or not a number).`:`The document holds a value that JSON cannot express.`)}function Pr(e){if(!X(e))return;let t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)throw Ar(`The document holds a value that JSON cannot express (a YAML set, date or binary value).`);if(Object.hasOwn(e,`__proto__`))throw Ar("The document has a key named `__proto__`, which is not accepted. No OpenAPI document needs one.")}var Fr=2e7,Ir=5,Lr;function Rr(e){if(Lr!==void 0)return e();Lr=Fr;try{return e()}finally{Lr=void 0}}function zr(e=1){if(Lr!==void 0&&(Lr-=e,Lr<0))throw new Or(`too-much-work`,`Working on this document takes more steps than are allowed. It repeats or nests something in a way that multiplies the work.`)}function Br(e){zr(1+(e>>>Ir))}function Vr(e){let t=new Set(e?.operations??[]),n=new Set(e?.tags??[]);return e=>t.has(e.key)||e.tags.some(e=>n.has(e))}function Hr(e,t){let n=t.include?Vr(t.include):()=>!0,r=Vr(t.exclude),i=new Set;for(let t of e.entries)zr(t.tags.length+1),n(t)&&!r(t)&&i.add(t.key);return i}function Ur(e){return e.normalize(`NFKD`).replace(/[̀-ͯ]/g,``).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,64).replace(/-+$/g,``)}var Wr=/^[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$/;function Gr(e){return Wr.test(e)}var Kr={title:200,description:5e3,servers:20,url:2e3},qr=/^(?:https?:\/\/|\/)[^\s{}]*$/;function Jr(e){if(e==null)return null;if(!X(e))return{problem:`overrides must be an object or null.`};let t={};for(let n of[`title`,`description`]){let r=e[n];if(r!=null&&r!==``){if(typeof r!=`string`||r.length>Kr[n])return{problem:`${n} must be text of up to ${Kr[n]} characters.`};r.trim()!==``&&(t[n]=n===`title`?r.trim():r)}}let n=e.servers;if(n!=null){if(!Array.isArray(n)||n.length>Kr.servers)return{problem:`servers must be a list of up to ${Kr.servers} entries.`};let e=[];for(let t of n){let n=X(t)&&typeof t.url==`string`?t.url.trim():``;if(n.length>Kr.url||!qr.test(n))return{problem:`A server needs a URL that starts with https://, http:// or /, without spaces or {variables}.`};let r=t.description;if(r!=null&&typeof r!=`string`)return{problem:`A server's description must be text.`};let i=typeof r==`string`?r.trim().slice(0,200):``;e.push(i===``?{url:n}:{url:n,description:i})}e.length>0&&(t.servers=e)}return Object.keys(t).length===0?null:t}function Yr(e,t){if(!t)return e;let{title:n,description:r,servers:i}=t;if(n===void 0&&r===void 0&&i===void 0)return e;let a={},o=i?.map(e=>({...e}));for(let t of Object.keys(e))t===`info`?(a.info={...X(e.info)?e.info:{},...n===void 0?{}:{title:n},...r===void 0?{}:{description:r}},o&&!Object.hasOwn(e,`servers`)&&(a.servers=o)):t===`servers`&&o?a.servers=o:a[t]=e[t];return o&&!Object.hasOwn(a,`servers`)&&(a.servers=o),a}var Xr=[`file`,`book`,`code`,`globe`,`lock`,`users`,`bot`,`terminal`,`package`,`rocket`,`flask`,`shield`,`star`,`zap`,`layers`,`plug`],Zr=e=>({operations:new Set(e?.operations??[]),tags:new Set(e?.tags??[])}),Qr=e=>({include:e.include?Zr(e.include):void 0,exclude:Zr(e.exclude)}),$r=(e,t)=>e.operations.has(t.key)||t.tags.some(t=>e.tags.has(t)),ei=(e,t)=>(!e.include||$r(e.include,t))&&!$r(e.exclude,t);function ti(e){let t={};return e.tags.size>0&&(t.tags=[...e.tags].sort()),e.operations.size>0&&(t.operations=[...e.operations].sort()),t}function ni(e){let t={};return e.include&&(t.include=ti(e.include)),(e.exclude.tags.size>0||e.exclude.operations.size>0)&&(t.exclude=ti(e.exclude)),t}function ri(e){return ni(Qr(e))}function ii(e,t){for(let n of e){let{include:e,exclude:r}=t;e&&n.tags.some(t=>e.tags.has(t))&&e.operations.delete(n.key),(e&&!$r(e,n)||n.tags.some(e=>r.tags.has(e)))&&r.operations.delete(n.key)}}function ai(e,t,n,r){let i=Qr(t),a=Qr(t);r(a);for(let t of e){if(n.has(t.key))continue;let e=ei(i,t),r=ei(a,t);e&&!r?a.include?.operations.add(t.key):!e&&r&&a.exclude.operations.add(t.key)}return ii(e,a),ni(a)}function oi(e){return e.include?`hidden`:`served`}function si(e,t){if(e.exclude?.tags?.includes(t))return`hidden`;if(e.include?.tags?.includes(t))return`served`}function ci(e,t,n,r){let i=new Set(n),a=e.filter(e=>i.has(e.key));return ai(e,t,i,e=>{for(let t of a){if(ei(e,t)===r)continue;let{include:n,exclude:i}=e;if(r){i.operations.delete(t.key);for(let e of t.tags)i.tags.delete(e);n&&!$r(n,t)&&n.operations.add(t.key);continue}let a=!n||t.tags.some(e=>n.tags.has(e));n?.operations.delete(t.key),a&&i.operations.add(t.key)}})}function li(e,t,n,r){let i=e.filter(e=>e.tags.includes(n));return ai(e,t,new Set(i.map(e=>e.key)),({include:e,exclude:t})=>{if(r){t.tags.delete(n);for(let n of i){t.operations.delete(n.key);for(let e of n.tags)t.tags.delete(e);e?.operations.delete(n.key)}e?.tags.add(n)}else if(e){e.tags.delete(n);for(let n of i)e.operations.delete(n.key),$r(e,n)&&t.operations.add(n.key)}else{t.tags.add(n);for(let e of i)t.operations.delete(e.key)}})}function ui(e,t,n){let r=Qr(t);return!r.include&&e.filter(e=>e.tags.includes(n)).some(e=>ei(r,e))?t:ai(e,t,new Set,({include:e,exclude:t})=>{e?(e.tags.add(n),t.tags.delete(n)):t.tags.add(n)})}function di(e,t,n){return si(t,n)===void 0?t:ai(e,t,new Set,({include:e,exclude:t})=>{e?.tags.delete(n),t.tags.delete(n)})}function fi(e,t,n){if(oi(t)===n)return t;let r=Qr(t),i=new Set(e.filter(e=>ei(r,e)).map(e=>e.key)),a=new Set(e.map(e=>e.key)),o=new Map;for(let t of e)for(let e of new Set(t.tags)){let n=o.get(e);n?n.push(t):o.set(e,[t])}let s={tags:new Set(r.exclude.tags),operations:new Set([...r.exclude.operations].filter(e=>!a.has(e)))};if(n===`served`){for(let[e,t]of o)t.every(e=>!i.has(e.key))&&s.tags.add(e);for(let t of e)!i.has(t.key)&&!$r(s,t)&&s.operations.add(t.key);return ni({include:void 0,exclude:s})}let c={tags:new Set,operations:new Set};for(let[e,t]of o)t.every(e=>i.has(e.key))&&c.tags.add(e);for(let t of e)i.has(t.key)&&!$r(c,t)&&c.operations.add(t.key);return ni({include:c,exclude:s})}var pi=4;function mi(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function hi(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function gi(e){let t=`#`;for(let n of e)t+=`/${_i(String(n))}`;return Br(t.length*pi),t}function _i(e){return mi(e).replace(/%/g,`%25`).replace(/[^\u0021-\u007e]/gu,e=>{try{return encodeURIComponent(e)}catch{return e}})}function vi(e){if(e===`#`)return[];if(e.startsWith(`#/`))return Br(e.length*pi),e.slice(2).split(`/`).map(e=>hi(yi(e)))}function yi(e){if(!e.includes(`%`))return e;try{return decodeURIComponent(e)}catch{return e}}function bi(e,t){let n=vi(t);if(!n)return;zr(n.length);let r=e;for(let e of n)if(Array.isArray(r)){if(!/^(0|[1-9]\d*)$/.test(e))return;r=r[Number(e)]}else if(X(r)){if(!Object.hasOwn(r,e))return;r=r[e]}else return;return r}var xi=new Set([`example`,`default`,`const`,`enum`,`value`,`dataValue`,`serializedValue`,`externalValue`]),Si=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`,`paths`,`webhooks`,`x-webhooks`,`callbacks`,`responses`,`headers`,`content`,`encoding`,`examples`,`links`,`variables`,`schemas`,`parameters`,`requestBodies`,`securitySchemes`,`pathItems`,`mediaTypes`]);function Ci(e,t){let n=[],r=(e,i,a)=>{if(zr(),typeof e!=`object`||!e)return e;if(a>Dr.depth)throw kr(Dr.depth);if(Array.isArray(e)){let t;for(let i=0;i<e.length;i++){n.push(i);let o=r(e[i],!1,a+1);n.pop(),o!==e[i]&&(t??=e.slice(),t[i]=o)}return t??e}let o=e;if(!i&&t.object){let e=t.object(o,n,e=>r(e,!1,a+1));if(e!==void 0)return e}let s;for(let e of Object.keys(o)){let c=o[e],l;i?(n.push(e),l=r(c,!1,a+1),n.pop()):wi(e,c)?l=c:(l=t.keyword?.(e,c,o),l===void 0&&(n.push(e),l=r(c,Si.has(e)&&X(c),a+1),n.pop())),l!==c&&(s??={...o},s[e]=l)}return s??o};return r(e,!1,1)}function wi(e,t){return xi.has(e)||e===`examples`&&Array.isArray(t)}function Ti(e){if(!e.startsWith(`#/components/`))return;let[,t,n]=vi(e)??[];return t===void 0||n===void 0?void 0:{group:t,name:n}}function Ei(e,t){return gi([`components`,e,t])}function Di(e){let t=new Map,n=new Set,r=new Set,i=new Set,a=e=>{if(!e.startsWith(`#`)){i.add(e);return}let n=vi(e);if(!n)return;let[a,o,s]=n;a===`components`&&o!==void 0&&s!==void 0?t.set(Ei(o,s),{group:o,name:s}):n.length>0&&r.add(gi(n))},o=e=>{typeof e==`string`&&(e.startsWith(`#`)?a(e):t.set(Ei(`schemas`,e),{group:`schemas`,name:e}))};return Ci(e,{keyword(e,t){if(e===`$ref`&&typeof t==`string`)return a(t),t;if(e===`discriminator`&&X(t)){if(X(t.mapping)){let e=Object.values(t.mapping);zr(e.length);for(let t of e)o(t)}return o(t.defaultMapping),t}if(e===`security`&&Array.isArray(t)){for(let e of t){if(!X(e))continue;let t=Object.keys(e);zr(t.length+1);for(let e of t)n.add(e)}return t}}}),{refs:[...t.values()],securitySchemes:[...n],pointers:[...r],external:[...i]}}function Oi(e){return X(e.discriminator)?!0:Array.isArray(e.allOf)&&e.allOf.some(e=>X(e)&&X(e.discriminator))}function ki(e){let t=new Map,n=e?.schemas;if(!X(n))return t;let r=[],i=new Map,a=Object.keys(n);zr(a.length);for(let e of a){let t=n[e];if(X(t)&&(Oi(t)&&r.push(e),Array.isArray(t.allOf))){zr(t.allOf.length);for(let n of t.allOf){let t=X(n)&&typeof n.$ref==`string`?Ti(n.$ref):void 0;if(t?.group!==`schemas`||t.name===e)continue;let r=i.get(t.name)??new Set;i.set(t.name,r),r.add(e)}}}for(let e=r.pop();e!==void 0;e=r.pop()){let n=i.get(e);n&&!t.has(e)&&(zr(n.size),t.set(e,[...n]),r.push(...n))}return t}function Ai(e,t){let n=new Set,r=[],i=ki(t),a=e=>{let t=`${e.group}/${e.name}`;n.has(t)||(n.add(t),r.push(e))},o=e=>{for(let t of e.refs)a(t);for(let t of e.securitySchemes)a({group:`securitySchemes`,name:t})};for(let t of e)o(Di(t));for(let e=r.pop();e;e=r.pop()){zr();let n=t?.[e.group],r=X(n)&&Object.hasOwn(n,e.name)?n[e.name]:void 0;if(r!==void 0&&(o(Di(r)),e.group===`schemas`))for(let t of i.get(e.name)??[])a({group:`schemas`,name:t})}return n}var ji=new Set(wr),Mi=`webhook:`;function Ni(e){return ji.has(e)}function Pi(e,t){return`${e.toUpperCase()} ${t}`}function Fi(e,t){return`${e.toUpperCase()} ${Mi}${t}`}function Ii(e){let t=[],n=Object.keys(e);zr(n.length);for(let r of n){let n=e[r];if(ji.has(r))X(n)&&t.push({method:r.toUpperCase(),operation:n,name:r,additional:!1});else if(r===`additionalOperations`&&X(n)){let e=Object.keys(n);zr(e.length);for(let r of e){let e=n[r];X(e)&&t.push({method:r.toUpperCase(),operation:e,name:r,additional:!0})}}}return t}function Li(e,t){let n=new Map,r=new Map;zr(t.length);for(let{name:e,operation:i,additional:a}of t)(a?r:n).set(e,i);let i={},a=Object.keys(e);zr(a.length);for(let t of a)ji.has(t)?(n.has(t)&&(i[t]=n.get(t)),n.delete(t)):t===`additionalOperations`?(r.size>0&&(i[t]=Object.fromEntries(r)),r.clear()):i[t]=e[t];for(let[e,t]of n)i[e]=t;return r.size>0&&(i.additionalOperations=Object.fromEntries(r)),i}function Ri(e,t){let n=t,r,i=new Set;for(;;){let t=n.$ref;if(typeof t!=`string`)return r??n;if(i.has(n))return;i.add(n);let a=bi(e,t);if(!X(a))return;let{$ref:o,...s}=r??n;Object.keys(s).length===0?r=a:(zr(Object.keys(a).length),r={...a,...s}),n=a}}function zi(e,t){for(let n of[!1,!0]){let r=n?e.webhooks:e.paths;if(X(r))for(let i of Object.keys(r)){zr();let a=r[i];if(!X(a))continue;let o=Ri(e,a);if(o)for(let{method:e,operation:r}of Ii(o)){let a=n?Fi(e,i):Pi(e,i);Br(a.length),t({key:a,method:e,path:i,webhook:n,operation:r,item:o})}}}}var Bi=[`items`,`additionalProperties`,`not`,`if`,`then`,`else`,`contains`,`propertyNames`,`unevaluatedItems`,`unevaluatedProperties`,`contentSchema`],Vi=[`allOf`,`anyOf`,`oneOf`,`prefixItems`],Hi=[`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`];function Ui(e,t){let n,r=Object.keys(e);zr(r.length);for(let i of r){let r=e[i],a=t(i,r);a!==r&&(n??={...e},n[i]=a)}return n??e}var Wi=(e,t)=>{if(Array.isArray(e)){zr(e.length);let n=!1,r=e.map(e=>{let r=t(e);return r!==e&&(n=!0),r});return n?r:e}return X(e)?Ui(e,(e,n)=>t(n)):e};function Gi(e,t,n=``){if(zr(),typeof e==`boolean`)return t.boolean?.(e,n)??e;if(!X(e))return e;let r=Ui(e,(e,n)=>Bi.includes(e)?Gi(n,t,e):Vi.includes(e)||Hi.includes(e)?Wi(n,n=>Gi(n,t,e)):n);return t.schema(r)}function Ki(e,t){return qi(e,t)}function qi(e,t){let{schema:n,operation:r}=t,i=n?e=>Gi(e,{...t,schema:n}):e=>e,a=(e,t)=>Wi(e,t),o=(e,t)=>X(e)&&e.$ref===void 0?Ui(e,t):e,s=e=>o(e,(e,t)=>e===`schema`||e===`itemSchema`?i(t):e===`encoding`?a(t,e=>o(e,(e,t)=>e===`headers`?a(t,c):t)):t),c=e=>o(e,(e,t)=>e===`schema`?i(t):e===`content`?a(t,s):t),l=e=>o(e,(e,t)=>e===`content`?a(t,s):t),u=e=>o(e,(e,t)=>e===`headers`?a(t,c):e===`content`?a(t,s):t),d=e=>{let t=o(e,(e,t)=>e===`parameters`?a(t,c):e===`requestBody`?l(t):e===`responses`?a(t,u):e===`callbacks`?a(t,p):t);return r&&X(t)&&t.$ref===void 0?r(t):t},f=e=>o(e,(e,t)=>e===`parameters`?a(t,c):Ni(e)?d(t):e===`additionalOperations`?a(t,d):t),p=e=>o(e,(e,t)=>f(t)),m=new Map([[`schemas`,i],[`parameters`,c],[`headers`,c],[`requestBodies`,l],[`responses`,u],[`callbacks`,p],[`pathItems`,f],[`mediaTypes`,s]]);return Ui(e,(e,t)=>e===`paths`||e===`webhooks`||e===`x-webhooks`?a(t,f):e===`components`&&X(t)?Ui(t,(e,t)=>{let n=m.get(e);return n?a(t,n):t}):t)}function Ji(e){return typeof e==`string`&&e.startsWith(`#/`)&&!e.startsWith(`#/components/`)}function Yi(e,t){let n=new Map,r=0,i=e=>{let t=vi(e);return t?gi(t):e},a=e=>{if(n.size===0)return;let t=i(e);for(let e=t.length;e>1;e=t.lastIndexOf(`/`,e-1)){Br(e);let r=n.get(t.slice(0,e));if(r!==void 0)return r+t.slice(e)}},o=o=>Ci({[o]:e[o]},{object(o,s,c){let l=o.$ref;if(!Ji(l)||bi(e,l)!==void 0)return;let u=a(l);if(u!==void 0)return{...o,$ref:u};let d=bi(t,l);if(d===void 0)return;n.set(i(l),gi(s)),r+=1;let{$ref:f,...p}=o;return c(X(d)?{...d,...p}:d)}})[o],s=Object.keys(e),c=[...s.filter(e=>e===`paths`||e===`webhooks`),...s.filter(e=>e!==`paths`&&e!==`webhooks`)],l;for(let t of c){let n=o(t);n!==e[t]&&(l??={...e},l[t]=n)}return{doc:l??e,inlined:r}}var Xi=Symbol.for(`yaml.alias`),Zi=Symbol.for(`yaml.document`),Qi=Symbol.for(`yaml.map`),$i=Symbol.for(`yaml.pair`),ea=Symbol.for(`yaml.scalar`),ta=Symbol.for(`yaml.seq`),na=Symbol.for(`yaml.node.type`),ra=e=>!!e&&typeof e==`object`&&e[na]===Xi,ia=e=>!!e&&typeof e==`object`&&e[na]===Zi,aa=e=>!!e&&typeof e==`object`&&e[na]===Qi,oa=e=>!!e&&typeof e==`object`&&e[na]===$i,sa=e=>!!e&&typeof e==`object`&&e[na]===ea,ca=e=>!!e&&typeof e==`object`&&e[na]===ta;function la(e){if(e&&typeof e==`object`)switch(e[na]){case Qi:case ta:return!0}return!1}function ua(e){if(e&&typeof e==`object`)switch(e[na]){case Xi:case Qi:case ea:case ta:return!0}return!1}var da=e=>(sa(e)||la(e))&&!!e.anchor,fa=Symbol(`break visit`),pa=Symbol(`skip children`),ma=Symbol(`remove node`);function ha(e,t){let n=_a(t);ia(e)?ga(null,e.contents,n,Object.freeze([e]))===ma&&(e.contents=null):ga(null,e,n,Object.freeze([]))}ha.BREAK=fa,ha.SKIP=pa,ha.REMOVE=ma;function ga(e,t,n,r){let i=va(e,t,n,r);if(ua(i)||oa(i))return ya(e,r,i),ga(e,i,n,r);if(typeof i!=`symbol`){if(la(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=ga(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===fa)return fa;else i===ma&&(t.items.splice(e,1),--e)}}else if(oa(t)){r=Object.freeze(r.concat(t));let e=ga(`key`,t.key,n,r);if(e===fa)return fa;e===ma&&(t.key=null);let i=ga(`value`,t.value,n,r);if(i===fa)return fa;i===ma&&(t.value=null)}}return i}function _a(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function va(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(aa(t))return n.Map?.(e,t,r);if(ca(t))return n.Seq?.(e,t,r);if(oa(t))return n.Pair?.(e,t,r);if(sa(t))return n.Scalar?.(e,t,r);if(ra(t))return n.Alias?.(e,t,r)}function ya(e,t,n){let r=t[t.length-1];if(la(r))r.items[e]=n;else if(oa(r))e===`key`?r.key=n:r.value=n;else if(ia(r))r.contents=n;else{let e=ra(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var ba={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},xa=e=>e.replace(/[!,[\]{}]/g,e=>ba[e]),Sa=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+xa(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&ua(e.contents)){let t={};ha(e.contents,(e,n)=>{ua(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||e&&!r.some(e=>e.startsWith(a))||t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
10
|
+
`)}};Sa.defaultYaml={explicit:!1,version:`1.2`},Sa.defaultTags={"!!":`tag:yaml.org,2002:`};function Ca(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function wa(e){let t=new Set;return ha(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function Ta(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function Ea(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=wa(e);let a=Ta(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(sa(t.node)||la(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function Da(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=Da(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=Da(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=Da(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=Da(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function Oa(e,t,n){if(Array.isArray(e))return e.map((e,t)=>Oa(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!da(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var ka=class{constructor(e){Object.defineProperty(this,na,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!ia(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=Oa(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?Da(i,{"":o},``,o):o}},Aa=class extends ka{constructor(e){super(Xi),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],ha(e,{Node:(e,t)=>{(ra(t)||da(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);if(a||=(Oa(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=ja(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`)}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r=`*${this.source}`;if(e){if(Ca(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function ja(e,t,n){if(ra(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(la(t)){let r=0;for(let i of t.items){let t=ja(e,i,n);t>r&&(r=t)}return r}if(oa(t)){let r=ja(e,t.key,n),i=ja(e,t.value,n);return Math.max(r,i)}return 1}var Ma=e=>!e||typeof e!=`function`&&typeof e!=`object`,Na=class extends ka{constructor(e){super(ea),this.value=e}toJSON(e,t){return t?.keep?this.value:Oa(this.value,e,t)}toString(){return String(this.value)}};Na.BLOCK_FOLDED=`BLOCK_FOLDED`,Na.BLOCK_LITERAL=`BLOCK_LITERAL`,Na.PLAIN=`PLAIN`,Na.QUOTE_DOUBLE=`QUOTE_DOUBLE`,Na.QUOTE_SINGLE=`QUOTE_SINGLE`;var Pa=`tag:yaml.org,2002:`;function Fa(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function Ia(e,t,n){if(ia(e)&&(e=e.contents),ua(e))return e;if(oa(e)){let t=n.schema[Qi].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new Aa(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=Pa+t.slice(2));let l=Fa(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new Na(e);return c&&(c.node=t),t}l=e instanceof Map?o[Qi]:Symbol.iterator in Object(e)?o[ta]:o[Qi]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new Na(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function La(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return Ia(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var Ra=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,za=class extends ka{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>ua(t)||oa(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ra(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(la(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,La(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(la(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&sa(i)?i.value:i:la(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!oa(t))return!1;let n=t.value;return n==null||e&&sa(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return la(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(la(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,La(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},Ba=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function Va(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Ha=(e,t,n)=>e.endsWith(`
|
|
11
|
+
`)?Va(n,t):n.includes(`
|
|
12
|
+
`)?`
|
|
13
|
+
`+Va(n,t):(e.endsWith(` `)?``:` `)+n,Ua=`flow`,Wa=`block`,Ga=`quoted`;function Ka(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=qa(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
|
|
14
|
+
`)n===`block`&&(h=qa(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
|
|
15
|
+
`&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
|
|
16
|
+
`&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function qa(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
|
|
17
|
+
`);r=t,i=t+1,a=e[i]}return r}var Ja=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ya=e=>/^(%|---|\.\.\.)/m.test(e);function Xa(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
|
|
18
|
+
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function Za(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(Ya(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
|
|
19
|
+
|
|
20
|
+
`;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
|
|
21
|
+
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:Ka(o,a,Ga,Ja(t,!1))}function Qa(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
22
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return Za(e,t);let n=t.indent||(Ya(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:Ka(r,n,Ua,Ja(t,!1))}function $a(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=Za;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?Qa:i&&!t?Za:n?Qa:Za}return r(e,t)}var eo;try{eo=RegExp(`(^|(?<!
|
|
23
|
+
))
|
|
24
|
+
+(?!
|
|
25
|
+
|$)`,`g`)}catch{eo=/\n+(?!\n|$)/g}function to({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return $a(n,r);let l=r.indent||(r.forceBlockIndent||Ya(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===Na.BLOCK_FOLDED?!1:t===Na.BLOCK_LITERAL||!Xa(n,c,l.length);if(!n)return u?`|
|
|
26
|
+
`:`>
|
|
27
|
+
`;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
|
|
28
|
+
`&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
|
|
29
|
+
`);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
|
|
30
|
+
`&&(p=p.slice(0,-1)),p.replace(eo,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
|
|
31
|
+
`)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
|
|
32
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=Ja(r,!0);o!==`folded`&&t!==Na.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=Ka(`${v}${e}${p}`,l,Wa,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function no(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
|
|
33
|
+
`)||u&&/[[\]{},]/.test(a))return $a(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
|
|
34
|
+
`)?$a(a,t):to(e,t,n,r);if(!s&&!u&&i!==Na.PLAIN&&a.includes(`
|
|
35
|
+
`))return to(e,t,n,r);if(Ya(a)){if(c===``)return t.forceBlockIndent=!0,to(e,t,n,r);if(s&&c===l)return $a(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return $a(a,t)}return s?d:Ka(d,c,Ua,Ja(t,!1))}function ro(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==Na.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=Na.QUOTE_DOUBLE);let c=e=>{switch(e){case Na.BLOCK_FOLDED:case Na.BLOCK_LITERAL:return i||a?$a(o.value,t):to(o,t,n,r);case Na.QUOTE_DOUBLE:return Za(o.value,t);case Na.QUOTE_SINGLE:return Qa(o.value,t);case Na.PLAIN:return no(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function io(e,t){let n=Object.assign({blockQuote:!0,commentString:Ba,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function ao(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(sa(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function oo(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(sa(e)||la(e))&&e.anchor;a&&Ca(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function so(e,t,n,r){if(oa(e))return e.toString(t,n,r);if(ra(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=ua(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=ao(t.doc.schema.tags,a);let o=oo(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):sa(a)?ro(a,t,n,r):a.toString(t,n,r);return o?sa(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function co({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=ua(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(la(e)||!ua(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||la(e)||(sa(e)?e.type===Na.BLOCK_FOLDED||e.type===Na.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=so(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=Ha(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=Ha(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=Ha(g,n.indent,l(f))));let _,v,y;ua(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&sa(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&ca(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=so(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
|
|
36
|
+
`:``,v){let e=l(v);S+=`\n${Va(e,n.indent)}`}x===``&&!n.inFlow?S===`
|
|
37
|
+
`&&y&&(S=`
|
|
38
|
+
|
|
39
|
+
`):S+=`\n${n.indent}`}else if(!p&&la(t)){let e=x[0],r=x.indexOf(`
|
|
40
|
+
`),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else(x===``||x[0]===`
|
|
41
|
+
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=Ha(g,n.indent,l(y)):h&&i&&i(),g}function lo(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var uo=`<<`,fo={identify:e=>e===uo||typeof e==`symbol`&&e.description===uo,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new Na(Symbol(uo)),{addToJSMap:mo}),stringify:()=>uo},po=(e,t)=>(fo.identify(t)||sa(t)&&(!t.type||t.type===Na.PLAIN)&&fo.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===fo.tag&&e.default);function mo(e,t,n){let r=go(e,n);if(ca(r))for(let n of r.items)ho(e,t,n);else if(Array.isArray(r))for(let n of r)ho(e,t,n);else ho(e,t,r)}function ho(e,t,n){let r=go(e,n);if(!aa(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function go(e,t){return e&&ra(t)?t.resolve(e.doc,e):t}function _o(e,t,{key:n,value:r}){if(ua(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(po(e,n))mo(e,t,r);else{let i=Oa(n,``,e);if(t instanceof Map)t.set(i,Oa(r,i,e));else if(t instanceof Set)t.add(i);else{let a=vo(n,i,e),o=Oa(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function vo(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(ua(e)&&n?.doc){let t=io(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),lo(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function yo(e,t,n){return new bo(Ia(e,void 0,n),Ia(t,void 0,n))}var bo=class e{constructor(e,t=null){Object.defineProperty(this,na,{value:$i}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return ua(n)&&(n=n.clone(t)),ua(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return _o(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?co(this,e,t,n):JSON.stringify(this)}};function xo(e,t,n){return(t.inFlow??e.flow?Co:So)(e,t,n)}function So({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(ua(i))!d&&i.spaceBefore&&f.push(``),wo(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(oa(i)){let e=ua(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),wo(n,f,e.commentBefore,d))}d=!1;let s=so(i,u,()=>o=null,()=>d=!0);o&&(s+=Ha(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
|
|
42
|
+
`}}return e?(p+=`
|
|
43
|
+
`+Va(l(e),c),s&&s()):d&&o&&o(),p}function Co({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(ua(i))i.spaceBefore&&d.push(``),wo(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(oa(i)){let e=ua(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),wo(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=ua(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=so(i,c,()=>a=null);l||=d.length>u||o.includes(`
|
|
44
|
+
`),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=Ha(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
|
|
45
|
+
`;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function wo({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=Va(t(r),e);n.push(i.trimStart())}}function To(e,t){let n=sa(t)?t.value:t;for(let r of e)if(oa(r)&&(r.key===t||r.key===n||sa(r.key)&&r.key.value===n))return r}var Eo=class extends za{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(Qi,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(yo(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=oa(e)?e:!e||typeof e!=`object`||!(`key`in e)?new bo(e,e?.value):new bo(e.key,e.value);let r=To(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);sa(r.value)&&Ma(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=To(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=To(this.items,e)?.value;return(!t&&sa(n)?n.value:n)??void 0}has(e){return!!To(this.items,e)}set(e,t){this.add(new bo(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)_o(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!oa(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),xo(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},Do={collection:`map`,default:!0,nodeClass:Eo,tag:`tag:yaml.org,2002:map`,resolve(e,t){return aa(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>Eo.from(e,t,n)},Oo=class extends za{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(ta,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=ko(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=ko(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&sa(r)?r.value:r}has(e){let t=ko(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=ko(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];sa(r)&&Ma(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(Oa(e,String(r++),t));return n}toString(e,t,n){return e?xo(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(Ia(a,void 0,n))}}return i}};function ko(e){let t=sa(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var Ao={collection:`seq`,default:!0,nodeClass:Oo,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return ca(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>Oo.from(e,t,n)},jo={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),ro(e,t,n,r)}},Mo={identify:e=>e==null,createNode:()=>new Na(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Na(null),stringify:({source:e},t)=>typeof e==`string`&&Mo.test.test(e)?e:t.options.nullStr},No={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Na(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&No.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function Po({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^-?\d/.test(a)&&!a.includes(`e`)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-->0;)a+=`0`}return a}var Fo={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:Po},Io={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Po(e)}},Lo={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new Na(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:Po},Ro=e=>typeof e==`bigint`||Number.isInteger(e),zo=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function Bo(e,t,n){let{value:r}=e;return Ro(r)&&r>=0?n+r.toString(t):Po(e)}var Vo={identify:e=>Ro(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>zo(e,2,8,n),stringify:e=>Bo(e,8,`0o`)},Ho={identify:Ro,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>zo(e,0,10,n),stringify:Po},Uo={identify:e=>Ro(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>zo(e,2,16,n),stringify:e=>Bo(e,16,`0x`)},Wo=[Do,Ao,jo,Mo,No,Vo,Ho,Uo,Fo,Io,Lo];function Go(e){return typeof e==`bigint`||Number.isInteger(e)}var Ko=({value:e})=>JSON.stringify(e),qo=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:Ko},{identify:e=>e==null,createNode:()=>new Na(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:Ko},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:Ko},{identify:Go,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Go(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Ko}],Jo=[Do,Ao].concat(qo,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),Yo={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,t){if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return t(`This environment does not support reading binary tags; either Buffer or atob is required`),e},stringify({comment:e,type:t,value:n},r,i,a){if(!n)return``;let o=n,s;if(typeof btoa==`function`){let e=``;for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);s=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(t??=Na.BLOCK_LITERAL,t!==Na.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===Na.BLOCK_LITERAL?`
|
|
46
|
+
`:` `)}return ro({comment:e,type:t,value:s},r,i,a)}};function Xo(e,t){if(ca(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!oa(r)){if(aa(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new bo(new Na(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=oa(r)?r:new bo(r)}}else t(`Expected a sequence for this tag`);return e}function Zo(e,t,n){let{replacer:r}=n,i=new Oo(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(yo(o,s,n))}return i}var Qo={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:Xo,createNode:Zo},$o=class e extends Oo{constructor(){super(),this.add=Eo.prototype.add.bind(this),this.delete=Eo.prototype.delete.bind(this),this.get=Eo.prototype.get.bind(this),this.has=Eo.prototype.has.bind(this),this.set=Eo.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(oa(e)?(r=Oa(e.key,``,t),i=Oa(e.value,r,t)):r=Oa(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=Zo(e,t,n),i=new this;return i.items=r.items,i}};$o.tag=`tag:yaml.org,2002:omap`;var es={collection:`seq`,identify:e=>e instanceof Map,nodeClass:$o,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=Xo(e,t),r=[];for(let{key:e}of n.items)sa(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new $o,n)},createNode:(e,t,n)=>$o.from(e,t,n)};function ts({value:e,source:t},n){return t&&(e?ns:rs).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var ns={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Na(!0),stringify:ts},rs={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Na(!1),stringify:ts},is={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:Po},as={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Po(e)}},os={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new Na(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:Po},ss=e=>typeof e==`bigint`||Number.isInteger(e);function cs(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function ls(e,t,n){let{value:r}=e;if(ss(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return Po(e)}var us={identify:ss,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>cs(e,2,2,n),stringify:e=>ls(e,2,`0b`)},ds={identify:ss,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>cs(e,1,8,n),stringify:e=>ls(e,8,`0`)},fs={identify:ss,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>cs(e,0,10,n),stringify:Po},ps={identify:ss,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>cs(e,2,16,n),stringify:e=>ls(e,16,`0x`)},ms=class e extends Eo{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=oa(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new bo(e.key,null):new bo(e,null),To(this.items,t.key)||this.items.push(t)}get(e,t){let n=To(this.items,e);return!t&&oa(n)?sa(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=To(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new bo(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(yo(e,null,n));return i}};ms.tag=`tag:yaml.org,2002:set`;var hs={collection:`map`,identify:e=>e instanceof Set,nodeClass:ms,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>ms.from(e,t,n),resolve(e,t){if(aa(e)){if(e.hasAllNullValues(!0))return Object.assign(new ms,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function gs(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function _s(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Po(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}var vs={identify:e=>typeof e==`bigint`||Number.isInteger(e),default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>gs(e,n),stringify:_s},ys={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>gs(e,!1),stringify:_s},bs={identify:e=>e instanceof Date,default:!0,tag:`tag:yaml.org,2002:timestamp`,test:RegExp(`^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$`),resolve(e){let t=e.match(bs.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=gs(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,``)??``},xs=[Do,Ao,jo,Mo,ns,rs,us,ds,fs,ps,is,as,os,Yo,fo,es,Qo,hs,vs,ys,bs],Ss=new Map([[`core`,Wo],[`failsafe`,[Do,Ao,jo]],[`json`,Jo],[`yaml11`,xs],[`yaml-1.1`,xs]]),Cs={binary:Yo,bool:No,float:Lo,floatExp:Io,floatNaN:Fo,floatTime:ys,int:Ho,intHex:Uo,intOct:Vo,intTime:vs,map:Do,merge:fo,null:Mo,omap:es,pairs:Qo,seq:Ao,set:hs,timestamp:bs},ws={"tag:yaml.org,2002:binary":Yo,"tag:yaml.org,2002:merge":fo,"tag:yaml.org,2002:omap":es,"tag:yaml.org,2002:pairs":Qo,"tag:yaml.org,2002:set":hs,"tag:yaml.org,2002:timestamp":bs};function Ts(e,t,n){let r=Ss.get(t);if(r&&!e)return n&&!r.includes(fo)?r.concat(fo):r.slice();let i=r;if(!i){if(Array.isArray(e))i=[];else{let e=Array.from(Ss.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(fo)),i.reduce((e,t)=>{let n=typeof t==`string`?Cs[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(Cs).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}var Es=(e,t)=>e.key<t.key?-1:+(e.key>t.key),Ds=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?Ts(e,`compat`):e?Ts(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?ws:{},this.tags=Ts(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,Qi,{value:Do}),Object.defineProperty(this,ea,{value:jo}),Object.defineProperty(this,ta,{value:Ao}),this.sortMapEntries=typeof a==`function`?a:a===!0?Es:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function Os(e,t){let n=[],r=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push(`---`);let i=io(e,t),{commentString:a}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(``);let t=a(e.commentBefore);n.unshift(Va(t,``))}let o=!1,s=null;if(e.contents){if(ua(e.contents)){if(e.contents.spaceBefore&&r&&n.push(``),e.contents.commentBefore){let t=a(e.contents.commentBefore);n.push(Va(t,``))}i.forceBlockIndent=!!e.comment,s=e.contents.comment}let t=s?void 0:()=>o=!0,c=so(e.contents,i,()=>s=null,t);s&&(c+=Ha(c,``,a(s))),(c[0]===`|`||c[0]===`>`)&&n[n.length-1]===`---`?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(so(e.contents,i));if(e.directives?.docEnd){if(e.comment){let t=a(e.comment);t.includes(`
|
|
47
|
+
`)?(n.push(`...`),n.push(Va(t,``))):n.push(`... ${t}`)}else n.push(`...`)}else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,``)),t&&((!o||s)&&n[n.length-1]!==``&&n.push(``),n.push(Va(a(t),``)))}return n.join(`
|
|
48
|
+
`)+`
|
|
49
|
+
`}var ks=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,na,{value:Zi});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new Sa({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[na]:{value:Zi}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=ua(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){As(this.contents)&&this.contents.add(e)}addIn(e,t){As(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=wa(this);e.anchor=!t||n.has(t)?Ta(t||`a`,n):t}return new Aa(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=Ea(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=Ia(e,l,p);return o&&la(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new bo(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return As(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ra(e)?this.contents!=null&&(this.contents=null,!0):As(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return la(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Ra(e)?!t&&sa(this.contents)?this.contents.value:this.contents:la(this.contents)?this.contents.getIn(e,t):void 0}has(e){return la(this.contents)?this.contents.has(e):!1}hasIn(e){return Ra(e)?this.contents!==void 0:la(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=La(this.schema,[e],t):As(this.contents)&&this.contents.set(e,t)}setIn(e,t){Ra(e)?this.contents=t:this.contents==null?this.contents=La(this.schema,Array.from(e),t):As(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new Sa({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new Sa({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new Ds(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=Oa(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?Da(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return Os(this,e)}};function As(e){if(la(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var js=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},Ms=class extends js{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},Ns=class extends js{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},Ps=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
|
|
50
|
+
`),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function Fs(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),!1),h&&=(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),null),i.type){case`space`:!t&&(n!==`doc-start`||r?.type!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:b&&n===`seq-item-ind`||(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||r?.type===`block-map`||r?.type===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function Is(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
|
|
51
|
+
`))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(Is(t.key)||Is(t.value))return!0}return!1;default:return!0}}function Ls(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&Is(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function Rs(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||sa(e)&&sa(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var zs=`All mapping items must start at the same column`;function Bs({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??Eo)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=Fs(l,{indicator:`explicit-key-ind`,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in u&&u.indent!==r.indent&&i(s,`BAD_INDENT`,zs)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
|
|
52
|
+
`+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||Is(u))&&i(u??l[l.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else p.found?.indent!==r.indent&&i(s,`BAD_INDENT`,zs);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&Ls(r.indent,u,i),n.atKey=!1,Rs(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=Fs(d??[],{indicator:`map-value-ind`,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type===`block-scalar`});if(s=_.end,_.found){m&&(f?.type===`block-map`&&!_.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&p.start<_.found.offset-1024&&i(g.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&Ls(r.indent,f,i),s=c.range[2];let l=new bo(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),_.comment&&(g.comment?g.comment+=`
|
|
53
|
+
`+_.comment:g.comment=_.comment);let e=new bo(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function Vs({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??Oo)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=Fs(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||l)l?.type===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&Ls(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function Hs(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}var Us=`Block collections are not allowed within flow collections`,Ws=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function Gs({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a?.nodeClass)??(o?Eo:Oo))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=Fs(d,{flow:s,indicator:`explicit-key-ind`,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(h.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),h.comment&&(c.comment?c.comment+=`
|
|
54
|
+
`+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&Is(f)&&i(f,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)h.comma&&i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(h.comma||i(h.start,`MISSING_CHAR`,`Missing , between ${s} items`),h.comment){let e=``;loop:for(let t of d)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];oa(t)&&(t=t.value??t.key),t.comment?t.comment+=`
|
|
55
|
+
`+e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],Ws(m)&&i(r.range,`BLOCK_IN_FLOW`,Us)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);Ws(f)&&i(g.range,`BLOCK_IN_FLOW`,Us),n.atKey=!1;let _=Fs(p??[],{flow:s,indicator:`map-value-ind`,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}h.start<_.found.offset-1024&&i(_.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else m&&(`source`in m&&m.source?.[0]===`:`?i(m,`MISSING_CHAR`,`Missing space after : in ${s}`):i(_.start,`MISSING_CHAR`,`Missing , or : between ${s} items`));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?Ws(m)&&i(v.range,`BLOCK_IN_FLOW`,Us):_.comment&&(g.comment?g.comment+=`
|
|
56
|
+
`+_.comment:g.comment=_.comment);let y=new bo(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;Rs(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new Eo(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o?`}`:`]`,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=Hs(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
|
|
57
|
+
`+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function Ks(e,t,n,r,i,a){let o=n.type===`block-map`?Bs(e,t,n,r,a):n.type===`block-seq`?Vs(e,t,n,r,a):Gs(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function qs(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let s=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!a||!o||o===`!`||o===Eo.tagName&&s===`map`||o===Oo.tagName&&s===`seq`)return Ks(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${s} collection, but expects ${r.collection??`scalar`}`,!0):i(a,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${o}`,!0),Ks(e,t,n,i,o)}let l=Ks(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=ua(u)?u:new Na(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function Js(e,t,n){let r=t.offset,i=Ys(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?Na.BLOCK_FOLDED:Na.BLOCK_LITERAL,o=t.source?Xs(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
|
|
58
|
+
`.repeat(Math.max(1,o.length-1)):``,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a===``||a===`\r`)i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d=``,f=``,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+`
|
|
59
|
+
`;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===Na.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
|
|
60
|
+
`):t.length>c||r[0]===` `?(f===` `?f=`
|
|
61
|
+
`:!p&&f===`
|
|
62
|
+
`&&(f=`
|
|
63
|
+
|
|
64
|
+
`),d+=f+t.slice(c)+r,f=`
|
|
65
|
+
`,p=!0):r===``?f===`
|
|
66
|
+
`?d+=`
|
|
67
|
+
`:f=`
|
|
68
|
+
`:(d+=f+r,f=` `,p=!1)}switch(i.chomp){case`-`:break;case`+`:for(let e=s;e<o.length;++e)d+=`
|
|
69
|
+
`+o[e][0].slice(c);d[d.length-1]!==`
|
|
70
|
+
`&&(d+=`
|
|
71
|
+
`);break;default:d+=`
|
|
72
|
+
`}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function Ys({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function Xs(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function Zs(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=Na.PLAIN,c=Qs(a,l);break;case`single-quoted-scalar`:s=Na.QUOTE_SINGLE,c=$s(a,l);break;case`double-quoted-scalar`:s=Na.QUOTE_DOUBLE,c=tc(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=Hs(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function Qs(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),ec(e)}function $s(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),ec(e.slice(1,-1)).replace(/''/g,`'`)}function ec(e){let t=/(.*?)\r?\n/sy,n=t.exec(e);if(!n)return e;let r,i;try{r=RegExp(`(?<![ ])[ ]+$`),i=RegExp(`^[ ]+|(?<![ ])[ ]+$`,`g`)}catch{r=/[ \t]+$/,i=/^[ \t]+|[ \t]+$/g}let a=n[1].replace(r,``),o=` `,s=t.lastIndex;for(;n=t.exec(e);){let e=n[1].replace(i,``);e===``?o===`
|
|
73
|
+
`?a+=o:o=`
|
|
74
|
+
`:(a+=o+e,o=` `),s=t.lastIndex}let c=/[ \t]*(.*)/sy;return c.lastIndex=s,n=c.exec(e),a+o+(n?.[1]??``)}function tc(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!==`\r`||e[r+1]!==`
|
|
75
|
+
`){if(i===`
|
|
76
|
+
`){let{fold:t,offset:i}=nc(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=rc[i];if(a)n+=a;else if(i===`
|
|
77
|
+
`)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
|
|
78
|
+
`)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a=i===`x`?2:i===`u`?4:8;n+=ic(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
|
|
79
|
+
`&&(a!==`\r`||e[r+2]!==`
|
|
80
|
+
`)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function nc(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
|
|
81
|
+
`||r===`\r`)&&(r!==`\r`||e[t+2]===`
|
|
82
|
+
`);)r===`
|
|
83
|
+
`&&(n+=`
|
|
84
|
+
`),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}var rc={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
|
|
85
|
+
`,r:`\r`,t:` `,v:`\v`,N:`
`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function ic(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}}function ac(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?Js(e,t,r):Zs(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[ea]:c?oc(e.schema,i,c,n,r):t.type===`scalar`?sc(e,i,t,r):e.schema[ea];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=sa(a)?a:new Na(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new Na(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function oc(e,t,n,r,i){if(n===`!`)return e[ea];let a=[];for(let t of e.tags)if(!t.collection&&t.tag===n){if(t.default&&t.test)a.push(t);else return t}for(let e of a)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[ea])}function sc({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>(t.default===!0||e&&t.default===`key`)&&t.test?.test(r))||n[ea];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[ea];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function cc(e,t,n){if(t){n??=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];n?.type===`space`;)e+=n.source.length,n=t[++r];break}}return e}var lc={composeNode:uc,composeEmptyNode:dc};function uc(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=fc(e,t,r),(s||c)&&r(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:l=ac(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=qs(lc,e,t,n,r),s&&(l.anchor=s.source.substring(1))}catch(e){r(t,`RESOURCE_EXHAUSTION`,e instanceof Error?e.message:String(e))}break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),u=!1}return l??=dc(e,t.offset,void 0,null,n,r),s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!sa(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function dc(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=ac(e,{type:`scalar`,offset:cc(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function fc({options:e},{offset:t,source:n,end:r},i){let a=new Aa(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=Hs(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function pc(e,t,{offset:n,start:r,value:i,end:a},o){let s=new ks(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=Fs(r,{indicator:`doc-start`,next:i??a?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?uc(c,i,l,o):dc(c,l.end,r,null,l,o);let u=s.contents.range[2],d=Hs(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function mc(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function hc(e){let t=``,n=!1,r=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case`#`:t+=(t===``?``:r?`
|
|
86
|
+
|
|
87
|
+
`:`
|
|
88
|
+
`)+(a.substring(1)||` `),n=!0,r=!1;break;case`%`:e[i+1]?.[0]!==`#`&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var gc=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=mc(e);r?this.warnings.push(new Ns(i,t,n)):this.errors.push(new Ms(i,t,n))},this.directives=new Sa({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=hc(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(la(i)&&!i.flow&&i.items.length>0){let e=i.items[0];oa(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:hc(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=mc(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=pc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new Ms(mc(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new Ms(mc(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=Hs(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Ms(mc(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new ks(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}},_c=Symbol(`break visit`),vc=Symbol(`skip children`),yc=Symbol(`remove item`);function bc(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),xc(Object.freeze([]),e,t)}bc.BREAK=_c,bc.SKIP=vc,bc.REMOVE=yc,bc.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},bc.parentCollection=(e,t)=>{let n=bc.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function xc(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=xc(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===_c)return _c;else r===yc&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function Sc(e){switch(e){case``:return`byte-order-mark`;case``:return`doc-mode`;case``:return`flow-error-end`;case``:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
|
|
89
|
+
`:case`\r
|
|
90
|
+
`:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function Cc(e){switch(e){case void 0:case` `:case`
|
|
91
|
+
`:case`\r`:case` `:return!0;default:return!1}}var wc=new Set(`0123456789ABCDEFabcdef`),Tc=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),Ec=new Set(`,[]{}`),Dc=new Set(` ,[]{}
|
|
92
|
+
\r `),Oc=e=>!e||Dc.has(e),kc=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
|
|
93
|
+
`||t===`\r`&&this.buffer[e+1]===`
|
|
94
|
+
`}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
|
|
95
|
+
`||!t&&!this.atEnd)return e+n+1}return t===`
|
|
96
|
+
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&Cc(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!=`number`||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
97
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&Cc(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Cc(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&Cc(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,`block-start`}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil(Oc),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&Cc(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield``,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(Oc),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||Cc(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
|
|
98
|
+
`,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
|
|
99
|
+
`,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>Cc(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
|
|
100
|
+
`:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
|
|
101
|
+
`)break}default:break loop}if(!n&&!this.atEnd)return this.setNext(`block-scalar`);if(t>=this.indentNext){this.indentNext=this.blockScalarIndent===-1?t:this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
|
|
102
|
+
`,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===` `;)n=this.buffer[++r];if(n===` `){for(;n===` `||n===` `||n===`\r`||n===`
|
|
103
|
+
`;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r===`\r`&&(r=this.buffer[--n]);let i=n;for(;r===` `;)r=this.buffer[--n];if(r===`
|
|
104
|
+
`&&n>=this.pos&&n+1+t>i)e=n;else break}while(1);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(Cc(r)||e&&Ec.has(r))break;t=n}else if(Cc(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
|
|
105
|
+
`?(n+=1,r=`
|
|
106
|
+
`,i=this.buffer[n+1]):t=n),i===`#`||e&&Ec.has(i))break;if(r===`
|
|
107
|
+
`){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&Ec.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield``,yield*this.pushToIndex(t+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case`!`:e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case`&`:e+=yield*this.pushUntil(Oc),e+=yield*this.pushSpaces(!0);continue loop;case`-`:case`?`:case`:`:{let t=this.flowLevel>0,n=this.charAt(1);if(Cc(n)||t&&Ec.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!Cc(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Tc.has(t))t=this.buffer[++e];else if(t===`%`&&wc.has(this.buffer[e+1])&&wc.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
108
|
+
`?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
|
|
109
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},Ac=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function jc(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function Mc(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function Nc(e){switch(e?.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function Pc(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function Fc(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break loop}for(;e[++t]?.type===`space`;);return e.splice(t,e.length)}function Ic(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function Lc(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!jc(t.start,`explicit-key-ind`)&&!jc(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,Nc(t.value)?t.value.end?Ic(t.value.end,t.sep):t.value.end=t.sep:Ic(t.start,t.sep),delete t.sep)}var Rc=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new kc,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=Sc(e);if(!t){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t===`scalar`)this.atNewLine=!1,this.atScalar=!0,this.type=`scalar`;else{switch(this.type=t,yield*this.step(),t){case`newline`:this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case`space`:this.atNewLine&&e[0]===` `&&(this.indent+=e.length);break;case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:this.atNewLine&&(this.indent+=e.length);break;case`doc-mode`:case`flow-error-end`:return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&e?.type!==`doc-end`){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source})}else{if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&Lc(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&Mc(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case`directive-line`:yield{type:`directive`,offset:this.offset,source:this.source};return;case`byte-order-mark`:case`space`:case`comment`:case`newline`:yield this.sourceToken;return;case`doc-mode`:case`doc-start`:{let e={type:`document`,offset:this.offset,start:[]};this.type===`doc-start`&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case`doc-start`:Mc(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case`anchor`:case`tag`:case`space`:case`comment`:case`newline`:e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type===`map-value-ind`){let t=Fc(Pc(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case`space`:case`comment`:case`newline`:e.props.push(this.sourceToken);return;case`scalar`:if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf(`
|
|
110
|
+
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
|
111
|
+
`,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Ic(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey){if(!t.sep){if(jc(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=Fc(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(jc(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(Nc(t.key)&&!jc(t.sep,`newline`)){let e=Fc(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken)}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):jc(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!jc(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Ic(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||jc(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.type===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=Fc(Pc(t));Lc(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
|
|
112
|
+
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
|
113
|
+
`,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=Fc(Pc(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=Fc(Pc(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function zc(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Ac||null,prettyErrors:t}}function Bc(e,t={}){let{lineCounter:n,prettyErrors:r}=zc(t),i=new Rc(n?.addNewLine),a=new gc(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new Ms(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(Ps(e,n)),o.warnings.forEach(Ps(e,n))),o}var Vc=class extends Error{code;constructor(e,t){super(t),this.name=`SpecParseError`,this.code=e}};function Hc(e){return Rr(()=>{try{return Uc(e)}catch(e){throw e instanceof Or?new Vc(e.code===`not-plain-data`?`not-openapi`:`too-complex`,e.message):e}})}function Uc(e){let t=e.charCodeAt(0)===65279?e.slice(1):e,n=t.trimStart();if(n===``)throw new Vc(`invalid-syntax`,`The document is empty.`);Br(t.length);let r,i=`yaml`;if(n.startsWith(`{`))try{r=JSON.parse(t),i=`json`}catch(e){try{r=Wc(t)}catch(t){throw t instanceof Or?t:new Vc(`invalid-syntax`,`Not valid JSON: ${e instanceof Error?e.message:String(e)}`)}}else r=Wc(t);if(!X(r))throw new Vc(`not-openapi`,`The document is not an object.`);if(jr(r,Er,{plainDataOnly:!0}),typeof r.swagger==`string`)throw new Vc(`unsupported-version`,`Swagger 2.0 documents are not supported. Convert the document to OpenAPI 3.x first.`);let a=r.openapi;if(typeof a!=`string`)throw new Vc(`not-openapi`,"This doesn't look like an OpenAPI document: the `openapi` field is missing.");if(!a.startsWith(`3.`))throw new Vc(`unsupported-version`,`OpenAPI ${a} is not supported. Only OpenAPI 3.x documents are.`);let o=a.split(`.`).slice(0,2).join(`.`),s=i===`json`&&!/^\{\s*\n/.test(n.slice(0,4096));return{doc:r,format:i,specVersion:o,minified:s}}function Wc(e){zr(e.length>>>2);let t=new Ac,n;try{n=Bc(e,{schema:`core`,lineCounter:t,uniqueKeys:!1,prettyErrors:!1})}catch(e){throw Gc(e instanceof Error?e.message:String(e))}let[r]=n.errors;if(r){let{line:e,col:n}=t.linePos(r.pos[0]);throw Gc(`${r.message} (line ${e}, column ${n})`)}let i=new Map,a=Symbol(`building`),o=(e,t)=>{if(zr(),t>Er.depth)throw kr(Er.depth);if(ra(e)){if(!i.has(e.source))throw Gc(`*${e.source} has no anchor before it.`);let t=i.get(e.source);if(t===a)throw Gc(`*${e.source} refers to the value it is inside of.`);return t}let n=e?.anchor;typeof n==`string`&&i.set(n,a);let r=null;if(ca(e))r=e.items.map(e=>oa(e)?s({},e,t+1):o(e,t+1));else if(aa(e)){let n={};for(let r of e.items)s(n,r,t+1);r=n}else sa(e)&&(r=e.value);return typeof n==`string`&&i.get(n)===a&&i.set(n,r),r},s=(e,t,n)=>{let r=o(t.key,n);if(typeof r==`object`?r!==null:typeof r==`symbol`)throw new Vc(`not-openapi`,`The document uses a list, a map or a tagged value as the key of a YAML map. Keys have to be text.`);return Object.defineProperty(e,r===null?``:String(r),{value:o(t.value,n),enumerable:!0,writable:!0,configurable:!0}),e};return o(n.contents,1)}var Gc=e=>new Vc(`invalid-syntax`,`Not valid YAML: ${e}`);function Kc(e){let t=[],n=[``],r=e=>{for(let t=n.length;t<=e;t++)n.push(`${n[t-1]} `);return n[e]},i=e=>{Br(e.length),t.push(e,`
|
|
114
|
+
`)},a=(e,t,n,o)=>{if(zr(),typeof e==`string`){let a=rl(e);if(!a){i(`${t} ${el(e)}`);return}i(`${t} ${a.header}`);let o=r(n);for(let e of a.lines)i(e===``?``:o+e)}else if(Array.isArray(e)){if(e.length===0){i(`${t} []`);return}o||i(t),e.forEach((e,i)=>{a(e,`${i===0&&o?`${t} `:r(n)}-`,n+1,!0)})}else if(X(e)){let s=qc(e);if(s.length===0){i(`${t} {}`);return}o||i(t),s.forEach((s,c)=>{let l=c===0&&o?`${t} `:r(n);s.length>1e3?(i(`${l}? ${tl(s)}`),a(e[s],`${r(n)}:`,n+1,!1)):a(e[s],`${l}${el(s)}:`,n+1,!1)})}else i(`${t} ${typeof e==`boolean`?String(e):Jc(e)}`)},o=qc(e);if(o.length===0)return`{}
|
|
115
|
+
`;for(let t of o)t.length>1e3?(i(`? ${tl(t)}`),a(e[t],`:`,1,!1)):a(e[t],`${el(t)}:`,1,!1);return t.join(``)}var qc=e=>Object.keys(e).filter(t=>e[t]!==void 0);function Jc(e){if(typeof e!=`number`||!Number.isFinite(e))return`null`;let t=String(e);return t.includes(`e`)&&!t.includes(`.`)?t.replace(`e`,`.0e`):t}var Yc=`\\u{20}-\\u{7e}\\u{a1}-\\u{2027}\\u{202a}-\\u{d7ff}\\u{e000}-\\u{fefe}\\u{ff00}-\\u{fffd}\\u{10000}-\\u{10ffff}`,Xc=RegExp(`^[A-Za-z_/$][${Yc}]*$`,`u`),Zc=/: | #|[:\s]$/,Qc=/^(?:true|false|null|yes|no|on|off|y|n)$/i,$c=/^\d+\.\d+\.[A-Za-z0-9.+-]+$/;function el(e){return Br(e.length),$c.test(e)||Xc.test(e)&&!Zc.test(e)&&!Qc.test(e)?e:tl(e)}function tl(e){return JSON.stringify(e).replace(/[\u007f-\u009f\u2028\u2029\ufeff\ufffe\uffff]/g,e=>`\\u${e.charCodeAt(0).toString(16).padStart(4,`0`)}`)}var nl=RegExp(`^[\\t\\n${Yc}]*$`,`u`);function rl(e){if(!e.includes(`
|
|
116
|
+
`)||(Br(e.length),/^\s/.test(e)||!nl.test(e)))return;let t=e.split(`
|
|
117
|
+
`);return t.at(-1)===``?(t.pop(),{header:t.at(-1)===``?`|+`:`|`,lines:t}):{header:`|-`,lines:t}}function il(e,t,n={}){return Rr(()=>{if(t===`yaml`)return Kc(e);let r=n.minified?JSON.stringify(e):`${JSON.stringify(e,null,2)}\n`;return Br(r.length),r})}function al(e){return Rr(()=>ol(e))}function ol(e){let t=[],n=new Map;if(Array.isArray(e.tags)){zr(e.tags.length);for(let t of e.tags)X(t)&&typeof t.name==`string`&&n.set(t.name,{name:t.name,count:0,description:typeof t.description==`string`?t.description:void 0})}return zi(e,({key:e,method:r,path:i,webhook:a,operation:o})=>{let s=[];if(Array.isArray(o.tags)){zr(o.tags.length);for(let e of new Set(o.tags)){if(typeof e!=`string`)continue;s.push(e);let t=n.get(e);t?t.count+=1:n.set(e,{name:e,count:1})}}let c=typeof o.summary==`string`?sl(o.summary):typeof o.description==`string`?sl(o.description):void 0;t.push({key:e,method:r,path:i,tags:s,operationId:typeof o.operationId==`string`?o.operationId:void 0,summary:c,deprecated:o.deprecated===!0||void 0,webhook:a?!0:void 0})}),{entries:t,tags:[...n.values()],totalOperations:t.length}}function sl(e){let t=e.slice(0,1024).trim().split(`
|
|
118
|
+
`,1)[0]??``;return t.length>140?`${t.slice(0,139)}…`:t}function cl(e,t){let n=new Set(e.entries.map(e=>e.key)),r=new Set(e.tags.filter(e=>e.count>0).map(e=>e.name)),i=e=>({operations:(e?.operations??[]).filter(e=>!n.has(e)),tags:(e?.tags??[]).filter(e=>!r.has(e))});return{include:i(t.include),exclude:i(t.exclude)}}function ll(e,t){let n=!1,r=[];for(let[i,a]of Object.entries(e)){let e=t(i,a);e===void 0?r.push([i,a]):(n=!0,r.push(...e))}return n?Object.fromEntries(r):e}var ul=new Set([`title`,`description`,`default`,`example`,`examples`,`deprecated`,`readOnly`,`writeOnly`,`externalDocs`,`xml`]);function dl(e){let t={},n={};for(let[r,i]of Object.entries(e))ul.has(r)||r.startsWith(`x-`)?t[r]=i:n[r]=i;return[t,n]}var fl=e=>X(e)&&(e.type===`null`||e.nullable===!0&&Array.isArray(e.enum)&&e.enum.length===1&&e.enum[0]===null&&Object.keys(e).length===2),pl={name:`a reference with siblings becomes allOf`,apply(e){return typeof e.$ref!=`string`||Object.keys(e).length===1?e:ll(e,(e,t)=>e===`$ref`?[[`allOf`,[{$ref:t}]]]:void 0)}},ml={name:`const becomes a one-value enum`,apply(e){return`const`in e?ll(e,(t,n)=>t===`const`?`enum`in e?[]:[[`enum`,[n]]]:void 0):e}},hl={name:`a null alternative becomes nullable`,apply(e){for(let t of[`anyOf`,`oneOf`]){let n=e[t];if(!Array.isArray(n)||!n.some(fl))continue;let r=n.filter(e=>!fl(e)),[i]=r,a=r.length===1&&X(i)&&i.$ref===void 0&&Object.keys(i).every(t=>!Object.hasOwn(e,t));return ll(e,e=>{if(e===t)return r.length===0?[[`nullable`,!0]]:a?[...Object.entries(i),[`nullable`,!0]]:r.length===1?[[`allOf`,[i]],[`nullable`,!0]]:[[t,r],[`nullable`,!0]]})}return e}},gl={name:`a list of types becomes one type`,apply(e){let{type:t}=e;if(t!==`null`&&!Array.isArray(t))return e;let n=t===`null`?[`null`]:t,r=n.filter(e=>e!==`null`),i=n.includes(`null`)?[[`nullable`,!0]]:[];return ll(e,t=>{if(t!==`type`)return;if(r.length===0)return`enum`in e?i:[[`enum`,[null]],...i];if(r.length===1)return[[`type`,r[0]],...i];let n=r.map(e=>({type:e}));return`anyOf`in e?[[`allOf`,[...Array.isArray(e.allOf)?e.allOf:[],{anyOf:n}]],...i]:[[`anyOf`,n],...i]})}},_l={name:`exclusive bounds become flags`,apply(e){let t=e;for(let[e,n,r]of[[`exclusiveMinimum`,`minimum`,Math.max],[`exclusiveMaximum`,`maximum`,Math.min]]){let i=t[e];if(typeof i!=`number`)continue;let a=t[n],o=typeof a!=`number`||r(i,a)===i;t=ll(t,t=>{if(t===n)return[];if(t===e)return o?[[n,i],[e,!0]]:[[n,a]]})}return t}},vl={name:`examples becomes example`,apply(e,t){return Array.isArray(e.examples)?(e.examples.length>1&&t(`all but the first example of a schema`),ll(e,(t,n)=>{if(t!==`examples`)return;let r=n;return`example`in e||r.length===0?[]:[[`example`,r[0]]]})):e}},yl={name:`content keywords become format`,apply(e,t){if(!(`contentMediaType`in e)&&!(`contentEncoding`in e)&&!(`contentSchema`in e))return e;let n=e.contentEncoding===`base64`||e.contentEncoding===`base64url`?`byte`:e.contentMediaType===`application/octet-stream`?`binary`:void 0;n||t(`the media type of a string's content`);let r=`format`in e||!n;return ll(e,e=>{if([`contentMediaType`,`contentEncoding`,`contentSchema`].includes(e))return r?[]:(r=!0,[[`format`,n]])})}},bl=new Map([[`$schema`,void 0],[`$id`,void 0],[`$anchor`,void 0],[`$comment`,void 0],[`$vocabulary`,void 0],[`$dynamicAnchor`,void 0],[`$dynamicRef`,`dynamic references`],[`$defs`,`definitions local to a schema ($defs)`],[`definitions`,`definitions local to a schema`],[`patternProperties`,`properties matched by pattern (patternProperties)`],[`propertyNames`,`rules for property names (propertyNames)`],[`unevaluatedProperties`,`unevaluatedProperties`],[`unevaluatedItems`,`unevaluatedItems`],[`prefixItems`,`tuples (prefixItems)`],[`contains`,`contains`],[`minContains`,`contains`],[`maxContains`,`contains`],[`if`,`conditions (if, then, else)`],[`then`,void 0],[`else`,void 0],[`dependentSchemas`,`dependent schemas`],[`dependentRequired`,`dependent required properties`]]),xl={from:`3.1`,to:`3.0`,schemas:[pl,ml,gl,hl,_l,vl,yl,{name:`keywords 3.0 does not have are removed`,apply(e,t){return Object.keys(e).some(e=>bl.has(e))?ll(e,e=>{if(!bl.has(e))return;let n=bl.get(e);return n&&t(n),[]}):e}},{name:`arrays without items get items: {}`,apply(e){return e.type===`array`&&!(`items`in e)?{...e,items:{}}:e}}],document:[{name:`webhooks move to x-webhooks`,apply(e,t){if(e.webhooks===void 0)return e;let n=!X(e.webhooks)||Object.keys(e.webhooks).length===0;return n||t(`webhooks as a standard section (they are kept under x-webhooks)`),Object.fromEntries(Object.entries(e).flatMap(([e,t])=>e===`webhooks`?n?[]:[[`x-webhooks`,t]]:[[e,t]]))}},{name:`referenced path items are inlined`,apply(e){let t=e.components;if(!X(t)||t.pathItems===void 0)return e;let n=t=>X(t)?Object.fromEntries(Object.entries(t).map(([t,n])=>[t,X(n)&&typeof n.$ref==`string`?Ri(e,n)??n:n])):t,{pathItems:r,...i}=t,a={...e,components:i};return e.paths!==void 0&&(a.paths=n(e.paths)),e[`x-webhooks`]!==void 0&&(a[`x-webhooks`]=n(e[`x-webhooks`])),Object.keys(i).length===0&&delete a.components,a}},{name:`mutualTLS security schemes are removed`,apply(e,t){let n=e.components,r=X(n)?n.securitySchemes:void 0;if(!X(r))return e;let i=new Set(Object.keys(r).filter(e=>{let t=r[e];return X(t)&&t.type===`mutualTLS`}));if(i.size===0)return e;t(`mutual TLS security schemes`);let a=e=>{zr(e.length);let t=e.filter(e=>!X(e)||!Object.keys(e).some(e=>i.has(e)));return t.length===e.length?e:t},o=Ci(e,{keyword:(e,t)=>e===`security`&&Array.isArray(t)?a(t):void 0});return{...o,components:{...o.components,securitySchemes:Object.fromEntries(Object.entries(r).filter(([e])=>!i.has(e)))}}}},{name:`top-level fields 3.0 lacks are removed, and paths is present`,apply(e){let t={...e,openapi:`3.0.3`};if(delete t.jsonSchemaDialect,X(t.info)){let{summary:e,...n}=t.info;if(typeof e==`string`&&n.description===void 0&&(n.description=e),X(n.license)){let{identifier:e,...t}=n.license;n.license=t}t.info=n}return t.paths===void 0&&(t.paths={}),t}}]};function Sl(e,t){return t===`additionalProperties`?e:e?{}:{not:{}}}var Cl={from:`3.0`,to:`3.1`,schemas:[{name:`nullable becomes the type null`,apply(e){if(!(`nullable`in e))return e;let{nullable:t,...n}=e;if(t!==!0)return n;if(typeof n.type==`string`)return{...n,type:[n.type,`null`]};if(Array.isArray(n.type))return n.type.includes(`null`)?n:{...n,type:[...n.type,`null`]};let[r,i]=dl(n);return Object.keys(i).length===0?n:{...r,anyOf:[i,{type:`null`}]}}},{name:`exclusive bounds become numbers`,apply(e){let t=e;for(let[e,n]of[[`exclusiveMinimum`,`minimum`],[`exclusiveMaximum`,`maximum`]]){if(typeof t[e]!=`boolean`)continue;let r=t[e]===!0&&typeof t[n]==`number`,i=t[n];t=ll(t,t=>{if(t===e)return[];if(t===n&&r)return[[e,i]]})}return t}},{name:`example becomes examples`,apply(e){return`example`in e?ll(e,(t,n)=>{if(t===`example`)return`examples`in e?[]:[[`examples`,[n]]]}):e}}],document:[{name:`version`,apply:e=>({...e,openapi:`3.1.0`})}]},wl=[`3.0`,`3.1`],Tl=class extends Error{constructor(e){super(e),this.name=`ConvertError`}};function El(e){return(typeof e.openapi==`string`?e.openapi:``).split(`.`).slice(0,2).join(`.`)}var Dl=[Cl,xl];function Ol(e){let t=El(e);return wl.filter(e=>e===t||Dl.some(n=>n.from===t&&n.to===e))}function kl(e,t){return Rr(()=>Al(e,t))}function Al(e,t){let n=El(e);if(n===t)return{doc:e,losses:[]};let r=Dl.find(e=>e.from===n&&e.to===t);if(!r)throw new Tl(`An OpenAPI ${n} document cannot be converted to ${t} yet.`);let i=new Map,a=e=>i.set(e,(i.get(e)??0)+1),o=Ki(e,{schema:e=>r.schemas.reduce((e,t)=>t.apply(e,a),e),...t===`3.0`?{boolean:Sl}:{}});for(let e of r.document)o=e.apply(o,a);return{doc:o,losses:[...i].map(([e,t])=>({what:e,count:t}))}}var jl=new Set(Tr);function Ml(e,t){return Rr(()=>Nl(e,t))}function Nl(e,t){let n=al(e),r=Hr(n,t),i={};for(let[t,n]of Object.entries(e))t===`paths`||t===`webhooks`?i[t]=Pl(e,n,r,t===`webhooks`):i[t]=n;let a=Yi(i,e);i=a.doc;let o=a.inlined,s=X(i.components)?i.components:void 0,c=[];for(let[e,t]of Object.entries(i))e!==`components`&&c.push({[e]:t});for(let[e,t]of Object.entries(s??{}))jl.has(e)||c.push(t);let l=Ai(c,s),u=Fl(e,n.entries,r),d={},f={},p={};for(let[e,t]of Object.entries(i))if(e===`components`){let e=Ll(t,l,d,f);e!==void 0&&(p.components=e)}else if(e===`tags`&&Array.isArray(t)){zr(t.length);let e=t.filter(e=>X(e)&&typeof e.name==`string`&&u.has(e.name));e.length>0&&(p.tags=e)}else if(e===`x-tagGroups`&&Array.isArray(t)){let n=Il(t,u);n.length>0&&(p[e]=n)}else p[e]=t;return{doc:p,stats:{keptOperations:r.size,totalOperations:n.totalOperations,keptComponents:d,totalComponents:f,unmatched:cl(n,t),inlinedRefs:o}}}function Pl(e,t,n,r){let i={};if(!X(t))return i;for(let a of Object.keys(t)){zr();let o=t[a];if(!X(o))continue;let s=Ri(e,o);if(!s)continue;let c=Ii(s),l=c.filter(({method:e})=>n.has(r?Fi(e,a):Pi(e,a)));l.length!==0&&(i[a]=l.length===c.length?o:Li(s,l))}return i}function Fl(e,t,n){let r=new Set;for(let e of t)if(n.has(e.key)){zr(e.tags.length+1);for(let t of e.tags)r.add(t)}if(Array.isArray(e.tags)){let t=new Map;for(let n of e.tags)X(n)&&typeof n.name==`string`&&typeof n.parent==`string`&&t.set(n.name,n.parent);for(let e of[...r]){let n=t.get(e);for(;n!==void 0&&!r.has(n);)zr(),r.add(n),n=t.get(n)}}return r}function Il(e,t){let n=[];for(let r of e){if(!X(r)||!Array.isArray(r.tags)){n.push(r);continue}zr(r.tags.length+1);let e=r.tags.filter(e=>typeof e==`string`&&t.has(e));e.length!==0&&n.push(e.length===r.tags.length?r:{...r,tags:e})}return n}function Ll(e,t,n,r){if(!X(e))return;let i={};for(let[a,o]of Object.entries(e)){if(!jl.has(a)||!X(o)){i[a]=o;continue}let e=Object.keys(o);zr(e.length),r[a]=e.length;let s={};for(let n of e)t.has(`${a}/${n}`)&&(s[n]=o[n]);let c=Object.keys(s).length;n[a]=c,c>0&&(i[a]=s)}return Object.keys(i).length>0?i:void 0}function Rl(e,t){return Rr(()=>{let n=zl(e,t),r={...n,doc:Yr(n.doc,t.overrides)};return jr(r.doc,Dr),r})}function zl(e,t){let n=Ml(e,t.selection);if(!t.version)return{...n,losses:[]};if(!Ol(n.doc).includes(t.version)){let e=El(n.doc);return{...n,losses:[{what:`the conversion itself: an OpenAPI ${e} document cannot be converted to ${t.version} yet`,count:1}]}}let{doc:r,losses:i}=kl(n.doc,t.version);return{doc:r,stats:n.stats,losses:i}}function Bl(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var Vl=Bl(`https://base-ui.com/production-error`,`Base UI`),Hl=x.createContext(void 0);function Ul(e){let t=x.useContext(Hl);if(t===void 0&&!e)throw Error(Vl(33));return t}var Wl=x.createContext(void 0);function Gl(e){let t=x.useContext(Wl);if(t===void 0&&!e)throw Error(Vl(36));return t}var Kl={};function ql(e,t){let n=x.useRef(Kl);return n.current===Kl&&(n.current=e(t)),n}function Jl(e,t,n,r){let i=ql(Xl).current;return Zl(i,e,t,n,r)&&$l(i,[e,t,n,r]),i.callback}function Yl(e){let t=ql(Xl).current;return Ql(t,e)&&$l(t,e),t.callback}function Xl(){return{callback:null,cleanup:null,refs:[]}}function Zl(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Ql(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function $l(e,t){e.refs=t,e.callback=t.every(e=>e==null)?null:n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var eu=19;function tu(e){return eu>=e}function nu(e){if(!x.isValidElement(e))return null;let t=e,n=t.props;return(tu(19)?n?.ref:t.ref)??null}function ru(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function iu(){}var au=Object.freeze([]),ou=Object.freeze({});function su(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e)}else i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function cu(e,t){return typeof e==`function`?e(t):e}function lu(e,t){return typeof e==`function`?e(t):e}var uu={};function du(e,t,n,r,i){if(!n&&!r&&!i&&!e)return pu(t);let a=pu(e);return t&&(a=mu(a,t)),n&&(a=mu(a,n)),r&&(a=mu(a,r)),i&&(a=mu(a,i)),a}function fu(e){if(e.length===0)return uu;if(e.length===1)return pu(e[0]);let t=pu(e[0]);for(let n=1;n<e.length;n+=1)t=mu(t,e[n]);return t}function pu(e){return vu(e)?{...e(uu)}:hu(e)}function mu(e,t){return vu(t)?t(e):gu(e,t)}function hu(e){let t={...e};for(let e in t){let n=t[e];_u(e,n)&&(t[e]=bu(n))}return t}function gu(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=ru(e.style,r);break;case`className`:e[n]=Su(e.className,r);break;default:e[n]=_u(n,r)?yu(e[n],r):r}}return e}function _u(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function vu(e){return typeof e==`function`}function yu(e,t){return t?e?(...n)=>{let r=n[0];if(Cu(r)){let i=r;xu(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:bu(t):e}function bu(e){return e&&((...t)=>{let n=t[0];return Cu(n)&&xu(n),e(...t)})}function xu(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Su(e,t){return t?e?t+` `+e:t:e}function Cu(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function wu(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=Ou(r));let i=Tu(t,n,r);if(n.enabled===!1)return null;let a=n.state??ou;return ku(e,r,i,a)}function Tu(e,t,n){let{className:r,style:i}=e,{state:a=ou,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?cu(r,a):void 0,d=l?lu(i,a):void 0,f=l?su(a,c):ou,p=l&&s?Eu(s):void 0,m=l?ru(f,p)??{}:ou;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?Yl([m.ref,nu(n),...o]):Jl(m.ref,nu(n),o):Jl(null,null)),l?(u!==void 0&&(m.className=Su(m.className,u)),d!==void 0&&(m.style=ru(m.style,d)),m):ou}function Eu(e){return Array.isArray(e)?fu(e):du(void 0,e)}var Du=Symbol.for(`react.lazy`);function Ou(e){if(e?.$$typeof!==Du)return e;let t=x.Children.toArray(e)[0];return x.isValidElement(t)?t:e}function ku(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=du(n,t.props);return e.ref=n.ref,x.cloneElement(t,e)}return Au(e,n)}function Au(e,t){return e===`button`?(0,x.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,x.createElement)(`img`,{alt:``,...t,key:t.key}):x.createElement(e,t)}var ju=`data-starting-style`,Mu=`data-ending-style`,Nu={[ju]:``},Pu={[Mu]:``},Fu={transitionStatus(e){return e===`starting`?Nu:e===`ending`?Pu:null}},Iu=`data-open`,Lu=`data-closed`,Ru=`data-anchor-hidden`,zu=`data-popup-open`,Bu=`data-pressed`,Vu={[zu]:``},Hu={[zu]:``,[Bu]:``},Uu={[Iu]:``},Wu={[Lu]:``},Gu={[Ru]:``},Ku={open(e){return e?Vu:null}},qu={open(e){return e?Hu:null}},Ju={open(e){return e?Uu:Wu},anchorHidden(e){return e?Gu:null}},Yu={...Ju,...Fu},Xu=x.createContext(void 0);function Zu(e=!0){let t=x.useContext(Xu);if(t===void 0&&!e)throw Error(Vl(25));return t}var Qu=`none`,$u=`trigger-press`,ed=`trigger-hover`,td=`trigger-focus`,nd=`outside-press`,rd=`item-press`,id=`close-press`,ad=`focus-out`,od=`escape-key`,sd=`list-navigation`,cd=`keyboard`,ld=`pointer`,ud=`cancel-open`,dd=`sibling-open`,fd=`disabled`,pd=`imperative-action`;function md({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=x.useRef(e!==void 0),[a,o]=x.useState(()=>t);return[i&&e!==void 0?e:a,x.useCallback(e=>{i||o(e)},[])]}var hd=x.createContext(null);function gd(e=`root`){let t=x.useContext(hd),n=x.useContext(Wl);return t===null||n===void 0?null:(e===`submenu-trigger`?n.virtualFocus||n.parentVirtualFocus:n.virtualFocus)?t:null}var _d={visible:!0,ref:null};function vd(){return _d}function yd(e,t,n=`root`){let r=gd(n),i=((n===`submenu-trigger`?r?.useSubmenuTrigger:r?.useItem)??vd)({label:e.label,children:e.children,render:e.render}),a=Jl(t,i.ref);return{visible:i.visible,ref:a,props:i.props}}function bd(){return typeof window<`u`}function xd(e){return wd(e)?(e.nodeName||``).toLowerCase():`#document`}function Sd(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cd(e){return((wd(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function wd(e){return bd()?e instanceof Node||e instanceof Sd(e).Node:!1}function Td(e){return bd()?e instanceof Element||e instanceof Sd(e).Element:!1}function Ed(e){return bd()?e instanceof HTMLElement||e instanceof Sd(e).HTMLElement:!1}function Dd(e){return!bd()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Sd(e).ShadowRoot}function Od(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=zd(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function kd(e){return/^(table|td|th)$/.test(xd(e))}function Ad(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var jd=/transform|translate|scale|rotate|perspective|filter/,Md=/paint|layout|strict|content/,Nd=e=>!!e&&e!==`none`,Pd;function Fd(e){let t=Td(e)?zd(e):e;return Nd(t.transform)||Nd(t.translate)||Nd(t.scale)||Nd(t.rotate)||Nd(t.perspective)||!Ld()&&(Nd(t.backdropFilter)||Nd(t.filter))||jd.test(t.willChange||``)||Md.test(t.contain||``)}function Id(e){let t=Vd(e);for(;Ed(t)&&!Rd(t);){if(Fd(t))return t;if(Ad(t))return null;t=Vd(t)}return null}function Ld(){return Pd??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Pd}function Rd(e){return/^(html|body|#document)$/.test(xd(e))}function zd(e){return Sd(e).getComputedStyle(e)}function Bd(e){return Td(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vd(e){if(xd(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Dd(e)&&e.host||Cd(e);return Dd(t)?t.host:t}function Hd(e){let t=Vd(e);return Rd(t)?(e.ownerDocument||e).body:Ed(t)&&Od(t)?t:Hd(t)}function Ud(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Hd(e),i=r===e.ownerDocument?.body,a=Sd(r);if(i){let e=Wd(a);return t.concat(a,a.visualViewport||[],Od(r)?r:[],e&&n?Ud(e):[])}return t.concat(r,Ud(r,[],n))}function Wd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Gd={...x},Kd=Gd.useInsertionEffect,qd=Kd&&Kd!==Gd.useLayoutEffect?Kd:e=>e();function Z(e){let t=ql(Jd).current;return t.next=e,qd(t.effect),t.trampoline}function Jd(){let e={next:void 0,callback:Yd,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Yd(){}var Q=typeof document<`u`?x.useLayoutEffect:()=>{},Xd=x.createContext(void 0);function Zd(e=!1){let t=x.useContext(Xd);if(t===void 0&&!e)throw Error(Vl(16));return t}function Qd(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:x.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function $d(e){return e?.ownerDocument||document}function ef(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(Sd(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function tf(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=x.useRef(null),s=Zd(!0),c=a??s!==void 0,{props:l}=Qd({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=x.useCallback(()=>{let e=o.current;nf(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return Q(u,[u]),{getButtonProps:x.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return du({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(xu(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=nf(r),s=!i&&rf(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),ef(r,e))}else!l||i||!d&&!u?n&&s&&d&&e.preventDefault():e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),ef(r,e)))},onKeyUp(e){t||(xu(e),a?.(e),e.target===e.currentTarget&&i&&c&&nf(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||i||c||e.defaultPrevented||e.key!==` `||(e.preventBaseUIHandler(),ef(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:Z(e=>{o.current=e,u()})}}function nf(e){return Ed(e)&&e.tagName===`BUTTON`}function rf(e){return Ed(e)&&e.tagName===`A`&&!!e.href}function af(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:of,platform:sf,maxTouchPoints:cf}=af(),lf=of.toLowerCase(),uf=sf.toLowerCase(),df=/^i(os$|p)/.test(uf)||uf===`macintel`&&cf>1,ff=`android`,pf=uf===ff||lf.includes(ff),mf=!df&&uf.startsWith(`mac`);uf.startsWith(`win`),!pf&&/^(linux|chrome os)/.test(uf);var hf=mf||df,gf=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!gf&&lf.includes(`firefox`),!gf&&lf.includes(`chrom`);var _f=hf,vf=/jsdom|happydom/.test(lf);function yf(e){e.preventDefault()}function bf(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,l=Gl(),u=Zu(!0),d=c.type===`submenu-trigger`,f=d?l.parentVirtualFocus:l.virtualFocus,p=(d&&l.parent.type===`menu`?l.parent.store:l.store).useState(`webkitAriaSelected`,n),{events:m}=a.useState(`floatingTreeRoot`),h=a.useState(`open`),g=u!==void 0,_=!f&&h&&n?0:-1;return x.useMemo(()=>({id:r,role:`menuitem`,tabIndex:_,"aria-selected":p,onMouseDown:f?yf:void 0,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&m.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&m.emit(`close`,{domEvent:e.nativeEvent,reason:rd})},onMouseUp(e){if(u){let t=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,g&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||g&&!mf&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!g||e.button===2)&&c.type===`regular-item`&&ef(s.current,e,{detail:1,pointerType:`mouse`})}}),[t,_,r,m,i,a.context.allowMouseUpTriggerRef,o,s,u,g,c.type,p,f])}var xf={type:`regular-item`};function Sf(e){let{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=x.useRef(null),{getButtonProps:d,buttonRef:f}=tf({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=bf({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=x.useCallback(e=>du(p,{onMouseEnter(e){c.type===`submenu-trigger`&&c.setActive(e.nativeEvent)}},e,d),[p,d,c]),h=Jl(u,f);return x.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var Cf=x.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function wf(){return x.useContext(Cf)}function Tf(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=wf(),u=x.useRef(-1),[d,f]=x.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=x.useRef(null),h=x.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return Q(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}function Ef(){let[,e]=x.useState({});return x.useCallback(()=>{e({})},[])}var Df=0;function Of(e,t=`mui`){let n=x.useRef(void 0),r=Ef(),i=e??n.current;return x.useEffect(()=>{n.current??(Df+=1,n.current=`${t}-${Df}`,e??r())},[e,t,r]),i}var kf=Gd.useId;function Af(e,t){if(kf!==void 0){let n=kf();return e??(t?`${t}-${n}`:n)}return Of(e,t)}function jf(e){return Af(e,`base-ui`)}var Mf=`data-checked`,Nf=`data-unchecked`,Pf={checked(e){return e?{[Mf]:``}:{[Nf]:``}},...Fu};function Ff(e,t,n,r){let i=!1,a=!1,o=r??ou;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function If(e,t,n){let r=n??ou;return{reason:e,event:t??new Event(`base-ui`),...r}}function Lf(e){x.useEffect(e,au)}var Rf=null;globalThis.requestAnimationFrame;var zf=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},Bf=class e{static create(){return new e}static request(e){return zf.request(e)}static cancel(e){return zf.cancel(e)}currentId=Rf;request(e){this.cancel(),this.currentId=zf.request(()=>{this.currentId=Rf,e()})}cancel=()=>{this.currentId!==Rf&&(zf.cancel(this.currentId),this.currentId=Rf)};disposeEffect=()=>this.cancel};function Vf(){let e=ql(Bf.create).current;return Lf(e.disposeEffect),e}function Hf(e,t=!1,n=!1,r=!1){let[i,a]=x.useState(e&&t?`idle`:void 0),[o,s]=x.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),Q(()=>{if(!e&&o&&i!==`ending`&&n){let e=Bf.request(()=>{a(`ending`)});return()=>{Bf.cancel(e)}}},[e,o,i,n]),Q(()=>{if(!e||t||i===void 0)return;let n=Bf.request(()=>{a(void 0)});return()=>{Bf.cancel(n)}},[t,e,i]),Q(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=Bf.request(()=>{a(`idle`)});return()=>{Bf.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function Uf(e){return e==null?e:`current`in e?e.current:e}function Wf(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var Gf=null;function Kf(e){if(!Gf){let e=[];Gf=e,queueMicrotask(()=>{Gf=null,Qe.flushSync(()=>{for(let t of e)t()})})}Gf.push(e)}function qf(e,t=!1,n=!1){let r=Vf();return Z((i,a=null)=>{r.cancel();let o=Uf(e);if(o==null)return;let s=o,c=()=>{n?Kf(()=>{a?.aborted||i()}):Qe.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(Wf(s).map(e=>e.finished.then(iu))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(Wf(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=ju;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function Jf(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=Z(a),s=qf(r,n,i);x.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var Yf=x.createContext(void 0),Xf=x.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,{store:d}=Gl(),f=Tf({guess:!0,label:a}),p=jf(i),m=d.useState(`disabled`),h=d.useState(`isActive`,f.index),g=d.useState(`floatingNodeId`),_=d.useState(`itemProps`),v=s||m,{getItemProps:y,itemRef:b}=Sf({closeOnClick:c,disabled:v,highlighted:h,id:p,store:d,nativeButton:o,nodeId:g,itemMetadata:xf});return wu(`div`,e,{state:{disabled:v,highlighted:h},props:[_,u,y],ref:[b,t,f.ref]})}),Zf=x.forwardRef(function(e,t){let n=yd(e,t);return n.visible?(0,K.jsx)(Xf,{...e,ref:n.ref}):null}),Qf=0,$f=class e{static create(){return new e}currentId=Qf;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Qf,t()},e)}isStarted(){return this.currentId!==Qf}clear=()=>{this.currentId!==Qf&&(clearTimeout(this.currentId),this.currentId=Qf)};disposeEffect=()=>this.clear};function ep(){let e=ql($f.create).current;return Lf(e.disposeEffect),e}function tp(e){e.preventDefault(),e.stopPropagation()}function np(e){return`nativeEvent`in e}function rp(e){return e.pointerType===``&&e.isTrusted?!0:pf&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function ip(e){return vf?!1:!pf&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(pf||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function ap(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function op(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function sp(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function $(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Dd(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function cp(e,t){let n=e;for(;n;){if(Td(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(Dd(n)?n.host:null)}return null}function lp(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var up=`data-base-ui-focusable`,dp=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,fp=`ArrowLeft`,pp=`ArrowRight`,mp=`ArrowUp`,hp=`ArrowDown`,gp=`data-trigger-disabled`;function _p(e,t){if(!Td(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(gp);for(let[,e]of t.entries())if($(e,n))return!e.hasAttribute(gp);return!1}function vp(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function yp(e){return e.matches(`html,body`)}function bp(e){return Ed(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function xp(e){return cp(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${dp}`)!=null}function Sp(e){return e?e.getAttribute(`role`)===`combobox`&&bp(e):!1}function Cp(e){if(!e||vf)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function wp(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Tp(e,t){return t!=null&&!ap(t)?0:typeof e==`function`?e():e}function Ep(e,t,n){let r=Tp(e,n);return typeof r==`number`?r:r?.[t]}function Dp(e){return typeof e==`function`?e():e}function Op(e,t){return t||e===`click`||e===`mousedown`}function kp(e){return e?.includes(`mouse`)&&e!==`mousedown`}var Ap=x.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new $f,currentIdRef:{current:null},currentContextRef:{current:null}});function jp(e,t){e.current=t.current}function Mp(e,t={open:!1}){let{open:n}=t,r=e.useState(`floatingId`),{currentIdRef:i,delayRef:a,timeoutMs:o,initialDelayRef:s,currentContextRef:c,hasProvider:l,timeout:u}=x.useContext(Ap),[d,f]=x.useState(!1),p=x.useRef(n);return Q(()=>{p.current=n},[n]),Q(()=>{function t(){c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,a.current=s.current,u.clear()}if(i.current&&!n&&i.current===r){if(f(!1),o){let n=r;return u.start(o,()=>{e.select(`open`)||i.current&&i.current!==n||t()}),()=>{(p.current||i.current!==n)&&u.clear()}}t()}},[n,r,i,a,o,s,c,u,e]),Q(()=>{if(!n)return;let t=c.current,o=i.current;u.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:f},i.current=r,a.current={open:0,close:Ep(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,Ff(Qu))):(f(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),Q(()=>()=>{if(i.current===r){if(c.current=null,!p.current)return;i.current=null,jp(a,s),u.clear()}},[c,i,a,r,s,u]),x.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:d}),[i,l,a,d])}function Np(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Pp(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function Fp(e){let t=ql(Ip,e).current;return t.next=e,Q(t.effect),t}function Ip(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Lp={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Rp={...Lp,position:`fixed`,margin:0,top:0,left:0},zp={...Lp,position:`absolute`},Bp=x.forwardRef(function(e,t){let[n,r]=x.useState();Q(()=>{_f&&gf&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,K.jsx)(`span`,{...e,ref:t,style:Rp,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),Vp=Math.min,Hp=Math.max,Up=Math.round,Wp=Math.floor,Gp=e=>({x:e,y:e}),Kp={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function qp(e,t,n){return Hp(e,Vp(t,n))}function Jp(e,t){return typeof e==`function`?e(t):e}function Yp(e){return e.split(`-`)[0]}function Xp(e){return e.split(`-`)[1]}function Zp(e){return e===`x`?`y`:`x`}function Qp(e){return e===`y`?`height`:`width`}function $p(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function em(e){return Zp($p(e))}function tm(e,t,n){n===void 0&&(n=!1);let r=Xp(e),i=em(e),a=Qp(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=um(o)),[o,um(o)]}function nm(e){let t=um(e);return[rm(e),t,rm(t)]}function rm(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var im=[`left`,`right`],am=[`right`,`left`],om=[`top`,`bottom`],sm=[`bottom`,`top`];function cm(e,t,n){switch(e){case`top`:case`bottom`:return n?t?am:im:t?im:am;case`left`:case`right`:return t?om:sm;default:return[]}}function lm(e,t,n,r){let i=Xp(e),a=cm(Yp(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(rm)))),a}function um(e){let t=Yp(e);return Kp[t]+e.slice(t.length)}function dm(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function fm(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:dm(e)}function pm(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function mm(e,t){return t<0||t>=e.length}function hm(e,t){return vm(e.current,{disabledIndices:t})}function gm(e,t){return vm(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function _m(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>vm(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:mm(e,u)?-1:u,wrapped:d}}function vm(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&ym(e,a,r));return a}function ym(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!xm(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function bm(e){return e.visibility===`hidden`||e.visibility===`collapse`}function xm(e,t=e?zd(e):null){return!e||!e.isConnected||!t||bm(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var Sm=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Cm(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Dd(n)?n.host:null}function wm(e){for(let t of Array.from(e.children))if(xd(t)===`summary`)return t;return null}function Tm(e,t){let n=wm(t);return!!n&&(e===n||$(n,e))}function Em(e){let t=e?xd(e):``;return e!=null&&e.matches(Sm)&&(t!==`summary`||e.parentElement!=null&&xd(e.parentElement)===`details`&&wm(e.parentElement)===e)&&(t!==`details`||wm(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Dm(e){if(!Em(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Cm(t)){let n=t!==e,r=xd(t)===`slot`;if(t.hasAttribute(`inert`)||n&&xd(t)===`details`&&!t.open&&!Tm(e,t)||t.hasAttribute(`hidden`)||!r&&!Om(t,n))return!1}return!0}function Om(e,t){let n=zd(e);return t?n.display!==`none`:xm(e,n)}function km(e){let t=e.tabIndex;if(t<0){let t=xd(e);if(t===`details`||t===`audio`||t===`video`||Ed(e)&&e.isContentEditable)return 0}return t}function Am(e){if(xd(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function jm(e,t){let n=Am(e);if(!n)return!0;let r=t.find(e=>{let t=Am(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Am(e);return t?.name===n.name&&t.form===n.form})===n}function Mm(e){if(Ed(e)&&xd(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Ed(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Nm(e,t){Mm(e).forEach(e=>{Em(e)&&t.push(e),Nm(e,t)})}function Pm(e,t,n){Mm(e).forEach(e=>{Ed(e)&&e.matches(t)&&n.push(e),Pm(e,t,n)})}function Fm(e){return Dm(e)&&km(e)>=0}function Im(e){let t=[];return Nm(e,t),t.filter(Dm)}function Lm(e){let t=Im(e);return t.filter(e=>km(e)>=0&&jm(e,t))}function Rm(e,t){let n=Lm(e),r=n.length;if(r===0)return;let i=sp($d(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function zm(e){return Rm($d(e).body,1)||e}function Bm(e){return Rm($d(e).body,-1)||e}function Vm(e,t,n){if(!e)return null;let r=[];Nm($d(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(Dm);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!$(n,o)&&Fm(o)&&jm(o,a))return o}return r[i]}function Hm(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!$(n,r)}function Um(e){Lm(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Wm(e){let t=[];Pm(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Gm(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Gm(e,t.id,n)])}function Km(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function qm(e){return`data-base-ui-${e}`}var Jm=0;function Ym(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Jm);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),iu;let o=requestAnimationFrame(a);return Jm=o,()=>{Jm===o&&(cancelAnimationFrame(o),Jm=0)}}var Xm=`data-base-ui-inert`,Zm=new WeakMap,Qm=new WeakSet,$m=new WeakMap,eh=0;function th(e){return e?Dd(e)?e.host:th(e.parentNode):null}var nh=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=th(t);return e.contains(n)?n:null}).filter(e=>e!=null),rh=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},ih=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{xd(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function ah(e,t,n,{mark:r=!0}){let i=nh(t,e),a=r?ih(t,rh(i),new Set(i)):[],o=[],s=[];if(n){let e=nh(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);ih(t,rh(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(Zm.get(e)||0)+1;Zm.set(e,r),o.push(e),r===1&&n&&Qm.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=($m.get(e)||0)+1;$m.set(e,t),s.push(e),t===1&&e.setAttribute(Xm,``)}),eh+=1,()=>{o.forEach(e=>{let t=(Zm.get(e)||0)-1;Zm.set(e,t),t||(Qm.has(e)||e.removeAttribute(`aria-hidden`),Qm.delete(e))}),r&&s.forEach(e=>{let t=($m.get(e)||0)-1;$m.set(e,t),t||e.removeAttribute(Xm)}),--eh,eh||(Zm=new WeakMap,Qm=new WeakSet,$m=new WeakMap)}}function oh(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=$d(e[0]).body;return ah(e,i,n,{mark:r})}var sh={style:{transition:`none`}},ch={fallbackAxisSide:`none`},lh={fallbackAxisSide:`end`},uh={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},dh=x.createContext(null),fh=()=>x.useContext(dh),ph=qm(`portal`);function mh(e={}){let{ref:t,container:n,componentProps:r=ou,elementProps:i}=e,a=Af(),o=fh()?.portalNode,[s,c]=x.useState(null),[l,u]=x.useState(null),d=Z(e=>{e!==null&&u(e)}),f=x.useRef(null);Q(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(wd(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=wu(`div`,r,{ref:[t,d],props:[{id:a,[ph]:``},i]}),m=s&&p?Qe.createPortal(p,s):null;return{node:l,nodeId:x.isValidElement(p)?p.props.id:void 0,subtree:m}}var hh=x.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=mh({container:o,ref:t,componentProps:e,elementProps:c}),f=x.useRef(null),p=x.useRef(null),m=x.useRef(null),h=x.useRef(null),[g,_]=x.useState(null),v=x.useRef(!1),y=g?.modal,b=g?.open,S=!!g&&!g.modal&&g.open&&!!l;x.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Hm(e)&&(e.type===`focusin`?v.current&&=(Wm(l),!1):(Um(l),v.current=!0))}return Pp(Np(l,`focusin`,e,!0),Np(l,`focusout`,e,!0))},[l,y]),Q(()=>{l&&b===!0&&v.current&&(Wm(l),v.current=!1)},[b,l]);let C=x.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,K.jsxs)(x.Fragment,{children:[d,(0,K.jsxs)(dh.Provider,{value:C,children:[S&&l&&(0,K.jsx)(Bp,{"data-type":`outside`,ref:f,onFocus:e=>{Hm(e,l)?m.current?.focus():Bm(g?g.domReference:null)?.focus()}}),S&&l&&(0,K.jsx)(`span`,{role:s,"aria-owns":u,style:uh}),l&&Qe.createPortal(a,l),S&&l&&(0,K.jsx)(Bp,{"data-type":`outside`,ref:p,onFocus:e=>{Hm(e,l)?h.current?.focus():(zm(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Ff(`focus-out`,e.nativeEvent)))}})]})]})});function gh(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var _h=class{nodesRef={current:[]};events=gh();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},vh=x.createContext(null),yh=x.createContext(null),bh=()=>x.useContext(vh)?.id||null,xh=e=>{let t=x.useContext(yh);return e??t};function Sh(e){let t=Af(),n=xh(e),r=bh();return Q(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Ch(e){let{children:t,id:n}=e,r=bh();return(0,K.jsx)(vh.Provider,{value:x.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function wh(e){let{children:t,externalTree:n}=e,r=ql(()=>n??new _h).current;return(0,K.jsx)(yh.Provider,{value:r,children:t})}function Th(e,t){let n=Sd(lp(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(rp(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Eh=20,Dh=[];function Oh(){Dh=Dh.filter(e=>e.deref()?.isConnected)}function kh(e){Oh(),e&&xd(e)!==`body`&&(Dh.push(new WeakRef(e)),Dh.length>Eh&&(Dh=Dh.slice(-20)))}function Ah(){return Oh(),Dh[Dh.length-1]?.deref()}function jh(e){return e?Fm(e)?e:Lm(e)[0]||e:null}function Mh(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Im(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Fm(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Nh(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:b}=t.context,S=Z(()=>b.current.floatingContext?.nodeId),C=i===!1,w=Sp(_)&&C,T=Fp(i),E=Fp(a),D=Fp(o),O=Fp(u),k=Fp(g),A=xh(m),j=fh(),M=x.useRef(!1),N=x.useRef(!1),P=x.useRef(!1),F=x.useRef(null),I=x.useRef(``),L=x.useRef(``),R=x.useRef(null),z=x.useRef(null),ee=Jl(R,p,j?.beforeInsideRef),B=Jl(z,j?.afterInsideRef),V=ep(),te=ep(),ne=Vf(),re=j!=null,H=wp(v),U=Z((e=H)=>e?Lm(e):[]),ie=Z(()=>h?.().filter(e=>e!=null)??[]);x.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&$(H,sp($d(H)))&&U().length===0&&!w&&tp(e)}return Np($d(H),`keydown`,e)},[r,H,c,w,U]),x.useEffect(()=>{if(r||!g)return;let e=$d(H);function t(){P.current=!1}function n(e){let t=lp(e),n=ie(),r=$(v,t)||$(_,t)||$(j?.portalNode,t)||n.some(e=>e===t||$(e,t));P.current=!r,L.current=e.pointerType||`keyboard`,cp(t,`[data-base-ui-click-trigger]`)&&(N.current=!0,te.start(0,()=>{N.current=!1}))}function i(){L.current=`keyboard`}return Pp(Np(e,`pointerdown`,n,!0),Np(e,`pointerup`,t,!0),Np(e,`pointercancel`,t,!0),Np(e,`keydown`,i,!0),t)},[r,v,_,H,g,j,te,ie]),x.useEffect(()=>{if(r||!l)return;let e=$d(H);function n(){N.current=!0,te.start(0,()=>{N.current=!1})}function i(e){let t=lp(e);Fm(t)&&(F.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=lp(n);c&&r==null&&a!=null&&$(v,a)&&kh(a),queueMicrotask(()=>{let o=S(),l=t.context.triggerElements,u=ie(),p=r?.hasAttribute(qm(`focus-guard`))&&[R.current,z.current,j?.beforeInsideRef.current,j?.afterInsideRef.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,Uf(f),Uf(d)].includes(r),m=!($(_,r)||$(v,r)||$(r,v)||$(j?.portalNode,r)||u.some(e=>e===r||$(e,r))||l.hasMatchingElement(e=>$(e,r))||p||A&&(Gm(A.nodesRef.current,o).find(e=>$(e.context?.elements.floating,r)||$(e.context?.elements.domReference,r))||Km(A.nodesRef.current,o).find(e=>[e.context?.elements.floating,wp(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&H&&Mh(H),s&&i!==_&&!xm(a)&&sp(e)===e.body){if(Ed(H)&&(H.focus(),s===`popup`)){ne.request(()=>{H.focus()});return}let e=U(),t=F.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||H;Ed(n)&&n.focus()}b.current.insideReactTree?b.current.insideReactTree=!1:(w||!c)&&r&&m&&!N.current&&(w||r!==Ah())&&(M.current=!0,t.setOpen(!1,Ff(ad,n)))})}function o(){P.current||(b.current.insideReactTree=!0,V.start(0,()=>{b.current.insideReactTree=!1}))}let u=Ed(_)?_:null;if(v||u)return Pp(u&&Np(u,`focusout`,a),u&&Np(u,`pointerdown`,n),v&&Np(v,`focusin`,i),v&&Np(v,`focusout`,a),v&&j&&Np(v,`focusout`,o,!0))},[r,_,v,H,c,A,j,t,l,s,U,w,S,b,V,te,ne,d,f,ie]),x.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(j?.portalNode?.querySelectorAll(`[${qm(`portal`)}]`)||[]),t=(A?Km(A.nodesRef.current,S()):[]).find(e=>Sp(e.context?.elements.domReference||null))?.context?.elements.domReference,n=oh([v,...e,R.current,z.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,...ie(),t,Uf(f),Uf(d),w?_:null].filter(e=>e!=null),{ariaHidden:c||w,mark:!1}),i=oh([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,j,w,A,S,d,f,ie]),Q(()=>{if(!g||r||!Ed(H))return;I.current=``,L.current=``;let e=$d(H),t=sp(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(O.current||``):n;if(r===void 0||r===!1||$(H,t))return;let i=null,a=()=>(i??=U(H),i[0]||H),o;o=r===!0||r===null?a():Uf(r),o||=a();let s=$(H,sp(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&rp(c);Ym(o,{sync:l,preventScroll:o===H,shouldFocus(){if(!k.current)return!1;if(s)return!0;let t=sp(e);return!(t!==o&&$(H,t))}})})},[r,g,H,U,T,O,k,b]);let W=x.useRef(null);Q(()=>{if(r||!H){W.current=null;return}W.current&&=(W.current.cancelled=!0,null);let e=$d(H),t=sp(e),n=O.current==null;kh(t);function i(e){if(e.open||(I.current=Th(e.nativeEvent,L.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(qm(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(M.current=!0),e.reason===`outside-press`){if(e.nested)M.current=!1;else if(rp(e.nativeEvent)||ip(e.nativeEvent))M.current=!1;else{let e=!1;$d(H).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?M.current=!1:M.current=!0}}}y.on(`openchange`,i);function a(e){let r=E.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&xd(t)!==`body`?t:null,s=n?o||a:a||o;return s||=Ah()||null,typeof i==`boolean`?s:Uf(i)||s||null}return()=>{y.off(`openchange`,i);let t=sp(e),n=ie(),r=$(v,t)||n.some(e=>e===t||$(e,t))||A&&Gm(A.nodesRef.current,S(),!1).some(e=>$(e.context?.elements.floating,t)),o=E.current,s=I.current,c=a(s),l={cancelled:!1};W.current=l,queueMicrotask(()=>{W.current===l&&(W.current=null);let n=jh(c),i=D.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!M.current&&Ed(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}M.current=!1})}},[r,v,H,E,D,O,y,A,_,S,ie]),Q(()=>{if(!gf||g||!v)return;let e=sp($d(v));Ed(e)&&bp(e)&&$(v,e)&&e.blur()},[g,v]),Q(()=>{if(!r&&j)return j.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{j.setFocusManagerState(null)}},[r,j,c,g,t,l,_]),Q(()=>{if(!r&&H)return Mh(H),()=>{queueMicrotask(Oh)}},[r,H]);let G=!r&&(!c||!w)&&(re||c);return(0,K.jsxs)(x.Fragment,{children:[G&&(0,K.jsx)(Bp,{"data-type":`inside`,ref:ee,onFocus:e=>{if(c){let e=U();Ym(e[e.length-1])}else j?.portalNode&&(M.current=!1,Hm(e,j.portalNode)?zm(_)?.focus():Uf(f??j.beforeOutsideRef)?.focus())}}),n,G&&(0,K.jsx)(Bp,{"data-type":`inside`,ref:B,onFocus:e=>{c?Ym(U()[0]):j?.portalNode&&(l&&(M.current=!0),Hm(e,j.portalNode)?Bm(_)?.focus():Uf(d??j.afterOutsideRef)?.focus())}})]})}function Ph(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=$u}=t,l=e.context.dataRef,u=x.useRef(void 0),d=Vf(),f=ep(),p=x.useMemo(()=>{function t(t,n,r,i){let a=Ff(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=ap(e.pointerType,!0)&&ip(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||ap(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=lp(s),p=bp(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;r===`mousedown`&&o?u.current=void 0:ap(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return x.useMemo(()=>n?{reference:p}:ou,[n,p])}function Fh(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,(!i||c)&&(d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Ih(e){return e!=null&&e.clientX!=null}function Lh(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=e.useState(`open`),a=e.useState(`floatingElement`),o=e.useState(`domReferenceElement`),s=e.context.dataRef,c=x.useRef(!1),l=x.useRef(null),[u,d]=x.useState(),[f,p]=x.useState([]),m=Z(t=>{e.set(`positionReference`,t)}),h=Z((t,n,i)=>{c.current||(!s.current.openEvent||Ih(s.current.openEvent))&&e.set(`positionReference`,Fh(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=Z(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),_=ap(u)?a:i;x.useEffect(()=>{if(!n){m(o);return}if(!_)return;function e(){l.current?.(),l.current=null}let t=Sd(a);function r(t){let n=lp(t);$(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||Ih(s.current.openEvent)?l.current=Np(t,`mousemove`,r):m(o),e},[_,n,a,s,o,e,h,m,f]),x.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),x.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),x.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let v=x.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return x.useMemo(()=>n?{reference:v,trigger:v}:{},[n,v])}function Rh(){return!1}function zh(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Bh(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=Rh,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=xh(c),m=Z(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=Z(()=>a),{escapeKey:v,outsidePress:y}=zh(s),b=x.useRef(!1),S=x.useRef(!1),C=x.useRef(!1),w=x.useRef(!1),T=x.useRef(!1),E=x.useRef(``),D=x.useRef(null),O=ep(),k=ep(),A=ep(),j=Z(()=>{k.clear(),d.current.insideReactTree=!1}),M=Z(e=>{let t=d.current.floatingContext?.nodeId;return(p?Gm(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),N=Z(t=>vp(t,e.select(`floatingElement`))||vp(t,e.select(`domReferenceElement`))),P=Z(t=>{o()&&e.setOpen(!1,Ff($u,t.nativeEvent))}),F=Z(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=np(t)?t.nativeEvent:t;if(T.current||i.isComposing||!v&&M(`__escapeKeyBubbles`))return;let a=Ff(od,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),I=Z(()=>{d.current.insideReactTree=!0,k.start(0,j)}),L=Z(t=>{if(!l||!n||t.button!==0)return;let r=lp(t.nativeEvent);$(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,S.current=!1))}),R=Z(e=>{l&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(S.current=!0)});x.useEffect(()=>{function e(e){e.open||(w.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),x.useEffect(()=>j,[j]),x.useEffect(()=>{if(!l||!n)return l||(w.current=!1,T.current=!1,E.current=``,D.current=null),j;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new $f,i=$d(u);function a(){A.clear(),T.current=!0}function o(){T.current=!0,A.start(gf?5:0,()=>{T.current=!1})}function s(){C.current=!0,t.start(0,()=>{C.current=!1})}function c(){b.current=!1,S.current=!1}function f(){let e=E.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function x(e){let t=d.current.floatingContext?.nodeId,n=p&&Gm(p.nodesRef.current,t).some(t=>vp(e,t.context?.elements.floating));return N(e)||n}function k(n){if(m(n)){n.type!==`click`&&!N(n)&&(t.clear(),C.current=!1),j();return}if(d.current.insideReactTree){j();return}let r=lp(n),i=`[${qm(`inert`)}]`,a=Td(r)?r.getRootNode():null,o=Array.from((Dd(a)?a:$d(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>$(e,r))))return;let c=Td(r)?r:null;for(;c&&!Rd(c);){let e=Vd(c);if(Rd(e)||!Td(e))break;c=e}if(!(o.length&&Td(r)&&!yp(r)&&!$(r,e.select(`floatingElement`))&&o.every(e=>!$(c,e)))){if(Ed(r)&&!(`touches`in n)){let e=Rd(r),t=zd(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!x(n)){if(f()===`intentional`){if(n.detail!==0&&!rp(n)&&!w.current)return;if(C.current){t.clear(),C.current=!1;return}}typeof h==`function`&&!h(n)||M(`__outsidePressBubbles`)||(e.setOpen(!1,Ff(nd,n)),j())}}}function P(t){f()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!N(t)&&k(t)}function I(t){if(f()!==`sloppy`||!e.select(`open`)||!n||N(t))return;let r=t.touches[0];r&&(D.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},O.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=lp(e);if(!n)return;let r=Np(n,e.type,()=>{t(e),r()})}function R(e){E.current=`touch`,L(e,I)}function z(e){O.clear(),e.type===`pointerdown`&&(e.button===0&&(w.current=!0),E.current=e.pointerType),(e.type!==`mousedown`||!D.current||D.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?P(e):k(e)})}function ee(e){if(e.type===`pointercancel`&&(w.current=!1),!b.current)return;let n=S.current;c(),f()===`intentional`&&(e.type===`pointercancel`?n&&s():x(e)||(n?s():(typeof h!=`function`||h(e))&&(t.clear(),C.current=!0,j())))}function B(e){if(f()!==`sloppy`||!D.current||N(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-D.current.startX),r=Math.abs(t.clientY-D.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(D.current.dismissOnTouchEnd=!0),i>10&&(k(e),O.clear(),D.current=null)}function V(e){L(e,B)}function te(e){f()===`sloppy`&&D.current&&!N(e)&&(D.current.dismissOnTouchEnd&&k(e),O.clear(),D.current=null)}function ne(e){L(e,te)}let re=Pp(r&&Pp(Np(i,`keydown`,F),Np(i,`compositionstart`,a),Np(i,`compositionend`,o)),g&&Pp(Np(i,`click`,z,!0),Np(i,`pointerdown`,z,!0),Np(i,`pointerup`,ee,!0),Np(i,`pointercancel`,ee,!0),Np(i,`mousedown`,z,!0),Np(i,`mouseup`,ee,!0),Np(i,`touchstart`,R,{capture:!0,passive:!0}),Np(i,`touchmove`,V,{capture:!0,passive:!0}),Np(i,`touchend`,ne,{capture:!0,passive:!0})));return()=>{re(),t.clear(),c(),C.current=!1}},[d,u,r,g,h,l,n,v,y,F,j,_,M,N,p,e,O,A]);let z=x.useMemo(()=>({onKeyDown:F,onPointerDown:P,onClick:P}),[F,P]),ee=x.useMemo(()=>({onKeyDown:F,onPointerDown:R,onMouseDown:R,onClickCapture:I,onMouseDownCapture(e){I(),L(e)},onPointerDownCapture(e){I(),L(e)},onMouseUpCapture:I,onTouchEndCapture:I,onTouchMoveCapture:I}),[F,I,L,R]);return x.useMemo(()=>n?{reference:z,floating:ee,trigger:z}:{},[n,z,ee])}function Vh(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),Q(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};Td(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function Hh(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=Z(i),{mounted:c,setMounted:l,transitionStatus:u}=Hf(t,!1,!1,o),d=!t&&r;Q(()=>{t&&s(!1)},[t,s]);let f=x.useRef(c),p=x.useRef(!1),m=Ef(),h=()=>{f.current=!1,l(!1),a()};Q(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=Z(()=>{f.current&&(t?(p.current=!0,m()):h())});return Jf({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var Uh={tabIndex:-1,[up]:``};function Wh(e){return t=>t!==`touch`||e.current}function Gh(e,t=!1){let n=Af(),r=bh()!=null,i=ql(()=>e(n,r)).current;return Vh({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function Kh({handle:e,store:t}){return Q(()=>e.attachStore(t),[e,t]),null}function qh(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function Jh(e,t){let n=x.useRef(null);return Z(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),qh(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),qh(t))})}function Yh(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function Xh(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Zh(e,t,n,r={}){let i=n.reason,a=i===ed,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=Xh(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=Yh(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?Qe.flushSync(l):l()}function Qh(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Jh(e,n),o=Z(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=Z(e=>{a(e),e&&o(e)});return Q(()=>(s(t.current),()=>s(null)),[s,t,n,e]),Q(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function $h(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=x.useRef(null),i=e.useState(`open`);Q(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=Ff(Qu);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function eg(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=Hh({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return ql(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function tg(e,t){e.useSyncedValues(t),Q(()=>()=>{e.update({activeTriggerProps:ou,inactiveTriggerProps:ou,popupProps:ou})},[e])}function ng(e,t){Q(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),Q(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var rg=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},ig=o((e=>{var t=u();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),ag=o(((e,t)=>{t.exports=ig()})),og=o((e=>{var t=u(),n=ag();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),sg=o(((e,t)=>{t.exports=og()})),cg=[],lg=void 0;function ug(){return lg}function dg(e){cg.push(e)}function fg(e){let t=(t,n)=>{let r=ql(mg).current,i;try{lg=r;for(let e of cg)e.before(r);i=e(t,n);for(let e of cg)e.after(r);r.didInitialize=!0}finally{lg=void 0}return i};return t.displayName=e.displayName||e.name,t}function pg(e){return x.forwardRef(fg(e))}function mg(){return{didInitialize:!1}}var hg=ag(),gg=sg(),_g=tu(19)?bg:xg;function vg(e,t,n,r,i){return _g(e,t,n,r,i)}function yg(e,t,n,r,i){let a=x.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,hg.useSyncExternalStore)(e.subscribe,a,a)}dg({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,hg.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function bg(e,t,n,r,i){let a=ug();if(!a)return yg(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function xg(e,t,n,r,i){return(0,gg.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Sg=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return vg(this,e,t,n,r)}},Cg=class extends Sg{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){x.useDebugValue(e);let n=this;Q(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;Q(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;Q(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){x.useDebugValue(e);let n=this,r=t!==void 0;Q(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return x.useDebugValue(e),vg(this,this.selectors[e],t,n,r)}useContextCallback(e,t){x.useDebugValue(e);let n=Z(t??iu);this.context[e]=n}useStateSetter(e){let t=x.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},wg={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},Tg=class extends Cg{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:gh(),nested:n,triggerElements:i},wg),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&op(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Eg(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Tg({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:ou,inactiveTriggerProps:ou,popupProps:ou}}var Dg=e=>e.triggerIdProp??e.activeTriggerId,Og=e=>e.openProp??e.open,kg=e=>(e.popupElement?.id??e.floatingId)||void 0;function Ag(e,t){return t!==void 0&&Og(e)&&Dg(e)===t}function jg(e,t){return Ag(e,t)?!0:t!==void 0&&Og(e)&&Dg(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var Mg={open:Og,mounted:e=>e.mounted,transitionStatus:e=>Og(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Dg,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:kg,isTriggerActive:(e,t)=>t!==void 0&&Dg(e)===t,isOpenedByTrigger:(e,t)=>Ag(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Dg(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>jg(e,t)?kg(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function Ng(e){let t=x.useCallback(t=>e===void 0?iu:e.subscribeStore(t),[e]),n=x.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,hg.useSyncExternalStore)(t,n,()=>e?.serverStore)}var Pg=mf&&gf;function Fg(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=x.useRef(!1),s=x.useRef(null),c=x.useRef(!0),l=ep();x.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=Sd(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&Ed(t)&&t===sp($d(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return Pp(Np(r,`blur`,i),Pg&&Np(r,`keydown`,a,!0),Pg&&Np(r,`pointerdown`,l,!0))},[e,n]),x.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);Td(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=x.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=lp(n.nativeEvent);if(Td(a)){if(Pg&&!n.relatedTarget){if(!c.current&&!bp(a))return}else if(!Cp(a))return}let u=_p(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;e.select(`open`)&&u||!r?e.setOpen(!0,Ff(td,d,f)):l.start(r,()=>{o.current||e.setOpen(!0,Ff(td,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=Td(r)&&r.hasAttribute(qm(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=sp($d(t));!r&&n===t||$(a.current.floatingContext?.refs.floating.current,n)||$(t,n)||o||_p(r??n,e.context.triggerElements)||e.setOpen(!1,Ff(td,i))})}}},[a,r,e,l]);return x.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var Ig=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new $f;restTimeout=new $f;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Lg=new WeakMap;function Rg(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Lg.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Lg.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function zg(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Lg.get(n);a&&a!==e&&Rg(a),Rg(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Lg.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Bg(e){let t=e.context.dataRef.current,n=ql(()=>t.hoverInteractionState??Ig.create()).current;return t.hoverInteractionState||=n,Lf(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Vg(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=xh(),u=bh(),d=Bg(e),f=ep(),p=Z(()=>Op(c.current.openEvent?.type,d.interactedInside)),m=Z(()=>kp(c.current.openEvent?.type)),h=Z(()=>{Rg(d)});Q(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),x.useEffect(()=>h,[h]),Q(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&Td(s)&&o){let e=s,t=o,n=$d(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??cp(e,`[data-rootownerid]`)??n.body;return zg(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),x.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&Gm(l.nodesRef.current,u).length>0)}function a(t){let n=Ep(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,Ff(ed,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=lp(e);xp(t)?d.interactedInside=cp(t,`[aria-haspopup]`)!=null:d.interactedInside=!1}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(_p(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;l&&r&&Td(o)&&Gm(l.nodesRef.current,r,!1).some(e=>$(e.context?.elements.floating,o))||(d.handler?d.handler(n):(h(),m()&&!p()&&a(n)))}function v(n){l&&u&&!t()&&f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,Ff(ed,n)),l.events.emit(`floating.closed`,n)})}let y=o;return Pp(y&&Np(y,`mouseenter`,g),y&&Np(y,`mouseleave`,_),y&&Np(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var Hg={current:null};function Ug(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Hg,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=xh(l),v=Bg(e),y=x.useRef(!1),b=Fp(i),S=Fp(r),C=Fp(o),w=Fp(n),T=Fp(p),E=Fp(f),D=Z(()=>Op(h.current.openEvent?.type,v.interactedInside)),O=Z(()=>T.current?.()!==!1),k=Z((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!$(t,n);if(!Td(r))return!1;let a=r;return i.hasMatchingElement(e=>$(e,a))&&(!t||!$(t,a))}),A=Z(()=>{v.handler&&=($d(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),j=Z(()=>{Rg(v)});return u&&(v.handleCloseOptions=i?.__options),x.useEffect(()=>A,[A]),x.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===ed,A(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,A]),x.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=Ep(S.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,Ff(ed,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,Ff(ed,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!Td(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!ap(v.pointerType))return;let n=Dp(C.current),r=Ep(S.current,`open`,v.pointerType),i=lp(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(Td(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if($(t,i)){c=t;break}}Td(o)&&Td(s)&&!e.context.triggerElements.hasElement(o)&&$(o,s)&&(c=s);let l=c!=null&&k(s,c,i),u=e.select(`open`),d=E.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&Td(c)&&Td(s)&&$(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;h?O()&&e.setOpen(!0,Ff(ed,t,c)):m||(r?v.openChangeTimeout.start(r,()=>{g&&O()&&e.setOpen(!0,Ff(ed,t,c))}):g&&O()&&e.setOpen(!0,Ff(ed,t,c)))}function o(n){if(D()){j();return}A();let r=$d(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!_p(n.relatedTarget,e.context.triggerElements)){if(b.current&&i){e.select(`open`)||v.openChangeTimeout.clear();let a=c.current;v.handler=b.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){j(),A(),w.current&&!D()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,v.handler),v.handler(n)}else v.pointerType===`touch`&&$(e.select(`floatingElement`),n.relatedTarget)||t(n)}}function l(e){$(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?Np(r,`mouseout`,l):void 0;return s?Pp(Np(r,`mousemove`,i,{once:!0}),Np(r,`mouseenter`,i),Np(r,`mouseleave`,o),f):Pp(Np(r,`mouseenter`,i),Np(r,`mouseleave`,o),f)},[A,j,h,S,e,n,b,v,u,k,D,a,s,C,c,_,w,d,E,O,m]),x.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=k(i,r,t.target);if(a&&!ap(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;zg(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=Dp(C.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,D())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&O()&&e.setOpen(!0,Ff(ed,n,r))}v.pointerType===`touch`?Qe.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,D,k,a,e,C,O])}function Wg(e){return gf&&e.movementX===0&&e.movementY===0}function Gg(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Kg(e,t){return Gg(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function qg(e,t,n){return Gg(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Jg(e,t,n){return Gg(t,n?e===fp:e===pp,e===hp)}function Yg(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:Gg(t,n?e===pp:e===fp,e===mp)}function Xg(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,triggerOrientation:_=g,parentOrientation:v,id:y,resetOnPointerLeave:b=!0,externalTree:S,nestedReturnFocusRef:C,grid:w}=t,T=w!=null,E=e.useState(`open`),D=e.useState(`floatingElement`),O=e.useState(`domReferenceElement`),k=e.context.dataRef,A=wp(D),j=Sp(O),M=Fp(A),N=bh(),P=xh(S),F=x.useRef(f),I=x.useRef(o??-1),L=x.useRef(null),R=x.useRef(!0),z=Z(e=>{i(I.current===-1?null:I.current,e)}),ee=x.useRef(!!D),B=x.useRef(E),V=x.useRef(!1),te=x.useRef(!1),ne=x.useRef(null),re=Fp(h),H=Fp(E),U=Fp(o),ie=Fp(b),W=Vf(),G=Vf(),ae=Z(()=>{W.cancel();function e(e){d||(ne.current=Ym(e,{sync:V.current,preventScroll:!0}))}let t=n.current[I.current],r=te.current;t&&e(t),(V.current?e=>e():e=>W.request(e))(()=>{let i=n.current[I.current]||t;i&&(t||e(i),de&&(r||!R.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});Q(()=>{k.current.orientation=g},[k,g]),Q(()=>{E||(L.current=null),E&&f===`auto`||(F.current=f)},[E,f]),Q(()=>{a&&(E&&D?(I.current=o??-1,F.current&&o!=null&&(te.current=!0,z())):ee.current&&(I.current=-1,z()))},[a,E,D,o,z]),Q(()=>{if(a){if(!E)V.current=!1;else if(D){if(r==null){if(V.current=!1,U.current!=null)return;if(ee.current&&(I.current=-1,ae()),(!B.current||!ee.current)&&F.current&&(L.current!=null||F.current===!0&&L.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>G.request(e):queueMicrotask)(t),e+=1):(I.current=L.current==null||qg(L.current,_,u)||l?hm(n):gm(n),L.current=null,z())};t()}}else mm(n.current,r)||(I.current=r,ae(),te.current=!1)}}},[a,E,D,r,U,l,n,_,u,z,ae,G]),Q(()=>{if(!a||D||!P||d||!ee.current)return;let e=P.nodesRef.current,t=e.find(e=>e.id===N)?.context?.elements.floating,n=sp($d(O??t??null)),r=e.some(e=>e.context&&$(e.context.elements.floating,n));t&&!r&&R.current&&t.focus({preventScroll:!0})},[a,D,O,P,N,d]),Q(()=>{B.current=E,ee.current=!!D});let oe=r!=null,se=Z(e=>{if(!H.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(I.current!==t||r!==t)&&(I.current=t,z(e))}),ce=Z(()=>v??P?.nodesRef.current.find(e=>e.id===N)?.context?.dataRef?.current.orientation),le=Z(()=>hm(n,re.current)),ue=Z(t=>{if(R.current=!1,V.current=!0,t.which===229||!H.current&&t.currentTarget===M.current)return;if(l&&Yg(t.key,g,u,T)){Kg(t.key,ce())||tp(t),e.setOpen(!1,Ff(sd,t.nativeEvent));let n=C?.current??O;Ed(n)&&n.focus();return}r!=null&&r!==I.current&&!mm(n.current,r)&&(I.current=r);let i=I.current,a=hm(n,h),o=gm(n,h);if(j||(t.key===`Home`&&(tp(t),I.current=a,z(t)),t.key===`End`&&(tp(t),I.current=o,z(t))),w!=null){let e=w(t,I.current,n,g,c,u,h,a,o);if(e!=null&&e!==I.current&&(I.current=e,z(t)),g===`both`)return}if(Kg(t.key,g)){tp(t);let e=sp(t.currentTarget.ownerDocument);if(E&&!d&&$(t.currentTarget,e)&&!n.current.some(t=>t!=null&&$(t,e))){I.current=qg(t.key,g,u)?a:o,z(t),r===I.current&&ae();return}let{index:l,wrapped:f}=_m(n.current,i,{decrement:!qg(t.key,g,u),loopFocus:c,allowEscape:s,disabledIndices:h,minIndex:a,maxIndex:o});f&&(V.current=!1),I.current=l,z(t)}}),de=x.useMemo(()=>({onFocus(e){V.current=!0,se(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){Wg(e)||(V.current=!0,te.current=!1,p&&se(e))},onPointerLeave(e){if(!H.current||!R.current||e.pointerType===`touch`)return;V.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&ie.current&&(ne.current?.(),ne.current=null,I.current=-1,z(e),!d)){let e=M.current,t=sp($d(e));e&&$(e,t)&&e.focus({preventScroll:!0})}}}),[se,H,M,p,n,z,ie,d]),fe=x.useMemo(()=>d&&E&&oe&&{"aria-activedescendant":`${y}-${r}`},[d,E,oe,y,r]),pe=x.useMemo(()=>({...j?{}:fe,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&E&&!d){let n=lp(t.nativeEvent);if(n&&!$(M.current,n))return;tp(t);let r=Ff(ad,t.nativeEvent);e.setOpen(!1,r);let i=C?.current??O;!r.isCanceled&&Ed(i)&&i.focus()}else ue(t)},onPointerMove(e){Wg(e)||(R.current=!0)}}),[fe,ue,M,j,e,E,d,O,C]),me=x.useMemo(()=>{function t(t){e.setOpen(!0,Ff(sd,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&rp(e.nativeEvent)&&(F.current=!d)}function r(e){F.current=f,f===`auto`&&ip(e.nativeEvent)&&(F.current=!0)}return{onKeyDown(n){let r=e.select(`open`);R.current=!1;let i=n.key.startsWith(`Arrow`),a=Jg(n.key,ce(),u),o=Kg(n.key,r?g:_),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||bp(n.currentTarget)))return ue(n);if(r||m||!i){if(s){let e=Kg(n.key,ce());L.current=l&&e?null:n.key}l?a&&(tp(n),r?(I.current=le(),z(n),d&&M.current?.focus()):t(n)):o&&(U.current!=null&&(I.current=U.current),tp(n),!r&&m?t(n):ue(n),r&&z(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(I.current=-1,z(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[ue,f,le,l,z,e,m,g,_,ce,u,U,d,M]),he=x.useMemo(()=>({...fe,...me}),[fe,me]);return x.useMemo(()=>a?{reference:he,floating:pe,item:de,trigger:me}:{},[a,he,pe,me,de])}function Zg(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=Z(s),f=e.useState(`open`),p=ep(),m=x.useRef(``),h=x.useRef(u??i??-1),g=x.useRef(null),_=Z(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!xm(n)||n?.matches(`:disabled`)?!1:o==null||!ym(au,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&s(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(tp(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(tp(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),v=Z(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);$(r,n)||$(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});Q(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let y=x.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return x.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var Qg=.1,$g=Qg*Qg,e_=.5;function t_(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function n_(e,t,n,r,i,a,o,s,c,l){let u=!1;return t_(e,t,n,r,i,a)&&(u=!u),t_(e,t,i,a,o,s)&&(u=!u),t_(e,t,o,s,c,l)&&(u=!u),t_(e,t,c,l,n,r)&&(u=!u),u}function r_(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function i_(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function a_(e={}){let{blockPointerEvents:t=!1}=e,n=new $f,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*$g;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=lp(r),g=r.type===`mouseleave`,_=$(u,h),v=$(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&Td(r.relatedTarget)&&$(u,r.relatedTarget))return;function y(){return!!(s&&Gm(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=i_(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=i_(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=i_(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=i_(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!r_(d,f,x)||!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?e_/2:e_*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+e_+1,o=C||T?S.bottom-e_:S.top,s=C?T?S.bottom-e_:S.top:S.bottom-e_;M=n_(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?e_/2:e_*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-e_,o=C||T?S.top+e_:S.bottom,s=C?T?S.top+e_:S.bottom:S.top+e_;M=n_(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?e_/2:e_*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+e_+1,o=w||E?S.right-e_:S.left,s=w?E?S.right-e_:S.left:S.right-e_;M=n_(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?e_/2:e_*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-e_,o=w||E?S.left+e_:S.right,s=w?E?S.left+e_:S.right:S.left+e_;M=n_(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function o_(e,t,n){let{reference:r,floating:i}=e,a=$p(t),o=em(t),s=Qp(o),c=Yp(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}}let m=Xp(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function s_(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}=Jp(t,e),p=fm(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=pm(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=pm(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 c_=50,l_=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:s_},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=o_(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<c_&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=o_(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},u_=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}=Jp(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Yp(r),_=$p(o),v=Yp(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[um(o)]:nm(o)),x=p!==`none`;!d&&x&&b.push(...lm(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=tm(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`||_===$p(t)||T.every(e=>$p(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=$p(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}if(r!==n)return{reset:{placement:n}}}return{}}}},d_=new Set([`left`,`top`]);async function f_(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Yp(n),s=Xp(n),c=$p(n)===`y`,l=d_.has(o)?-1:1,u=a&&c?-1:1,d=Jp(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 p_=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 f_(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}}}}},m_=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Jp(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=$p(i),p=Zp(f),m=u[p],h=u[f],g=(e,t)=>qp(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},h_=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}=Jp(e,t),u={x:n,y:r},d=$p(i),f=Zp(d),p=u[f],m=u[d],h=Jp(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};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=d_.has(Yp(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}}}},g_=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Jp(e,t),c=await i.detectOverflow(t,s),l=Yp(n),u=Xp(n),d=$p(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Vp(p-c[m],g),y=Vp(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Hp(c.left,c.right):S=p-2*Hp(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function __(e){let t=zd(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ed(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Up(n)!==a||Up(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function v_(e){return Td(e)?e:e.contextElement}function y_(e){let t=v_(e);if(!Ed(t))return Gp(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=__(t),o=(a?Up(n.width):n.width)/r,s=(a?Up(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var b_=Gp(0);function x_(e){let t=Sd(e);return!Ld()||!t.visualViewport?b_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function S_(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Sd(e)}function C_(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=v_(e),o=Gp(1);t&&(r?Td(r)&&(o=y_(r)):o=y_(e));let s=S_(a,n,r)?x_(a):Gp(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&&r){let e=Sd(a),t=Td(r)?Sd(r):r,n=e,i=Wd(n);for(;i&&t!==n;){let e=y_(i),t=i.getBoundingClientRect(),r=zd(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=Sd(i),i=Wd(n)}}return pm({width:u,height:d,x:c,y:l})}function w_(e,t){let n=Bd(e).scrollLeft;return t?t.left+n:C_(Cd(e)).left+n}function T_(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-w_(e,n),y:n.top+t.scrollTop}}function E_(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Cd(r),s=t?Ad(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Gp(1),u=Gp(0),d=Ed(r);if((d||!a)&&((xd(r)!==`body`||Od(o))&&(c=Bd(r)),d)){let e=C_(r);l=y_(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?T_(o,c):Gp(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 D_(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function O_(e){let t=Bd(e),n=e.ownerDocument.body,r=Hp(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Hp(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+w_(e),o=-t.scrollTop;return zd(n).direction===`rtl`&&(a+=Hp(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var k_=25;function A_(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Sd(e),a=Cd(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Ld()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(w_(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=k_&&(s-=o)}return{width:s,height:c,x:l,y:u}}function j_(e,t){let n=C_(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=y_(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function M_(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=A_(e,n,t);else if(t===`document`)r=O_(Cd(e));else if(Td(t))r=j_(t,n);else{let n=x_(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return pm(r)}function N_(e,t){let n=t.get(e);if(n)return n;let r=Ud(e,[],!1).filter(e=>Td(e)&&xd(e)!==`body`),i=null,a=zd(e).position===`fixed`,o=a?Vd(e):e;for(;Td(o)&&!Rd(o);){let e=zd(o),t=Fd(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Vd(o)}return t.set(e,r),r}function P_(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ad(t)?[]:N_(t,this._c):[].concat(n),r],o=M_(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=M_(t,a[e],i);s=Hp(n.top,s),c=Vp(n.right,c),l=Vp(n.bottom,l),u=Hp(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function F_(e){let{width:t,height:n}=__(e);return{width:t,height:n}}function I_(e,t,n){let r=Ed(t),i=Cd(t),a=n===`fixed`,o=C_(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Gp(0);if((r||!a)&&((xd(t)!==`body`||Od(i))&&(s=Bd(t)),r)){let e=C_(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=w_(i));let l=i&&!r&&!a?T_(i,s):Gp(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function L_(e){return zd(e).position===`static`}function R_(e,t){if(!Ed(e)||zd(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Cd(e)===n&&(n=n.ownerDocument.body),n}function z_(e,t){let n=Sd(e);if(Ad(e))return n;if(!Ed(e)){let t=Vd(e);for(;t&&!Rd(t);){if(Td(t)&&!L_(t))return t;t=Vd(t)}return n}let r=R_(e,t);for(;r&&kd(r)&&L_(r);)r=R_(r,t);return r&&Rd(r)&&L_(r)&&!Fd(r)?n:r||Id(e)||n}var B_=async function(e){let t=this.getOffsetParent||z_,n=this.getDimensions,r=await n(e.floating);return{reference:I_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function V_(e){return zd(e).direction===`rtl`}var H_={convertOffsetParentRelativeRectToViewportRelativeRect:E_,getDocumentElement:Cd,getClippingRect:P_,getOffsetParent:z_,getElementRects:B_,getClientRects:D_,getDimensions:F_,getScale:y_,isElement:Td,isRTL:V_};function U_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function W_(e,t,n){let r=null,i,a=Cd(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Wp(d),h=Wp(a.clientWidth-(u+f)),g=Wp(a.clientHeight-(d+p)),_=Wp(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Hp(0,Vp(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!U_(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Sd(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function G_(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=v_(e),u=i||a?[...l?Ud(l):[],...t?Ud(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?W_(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?C_(e):null;c&&g();function g(){let t=C_(e);h&&!U_(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 K_=p_,q_=m_,J_=u_,Y_=g_,X_=h_,Z_=(e,t,n)=>{let r=new Map,i=n??{},a={...H_,...i.platform,_c:r};return l_(e,t,{...i,platform:a})},Q_=typeof document<`u`?x.useLayoutEffect:function(){};function $_(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(!$_(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)&&!$_(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ev(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tv(e,t){let n=ev(e);return Math.round(t*n)/n}function nv(e){let t=x.useRef(e);return Q_(()=>{t.current=e}),t}function rv(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]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=x.useState(r);$_(f,r)||p(r);let[m,h]=x.useState(null),[g,_]=x.useState(null),v=x.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=x.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),b=a||m,S=o||g,C=x.useRef(null),w=x.useRef(null),T=x.useRef(u),E=c!=null,D=nv(c),O=nv(i),k=nv(l),A=x.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Z_(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!$_(T.current,t)&&(T.current=t,Qe.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Q_(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=x.useRef(!1);Q_(()=>(j.current=!0,()=>{j.current=!1}),[]),Q_(()=>{if(b&&(C.current=b),S&&(w.current=S),b&&S){if(D.current)return D.current(b,S,A);A()}},[b,S,A,D,E]);let M=x.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),N=x.useMemo(()=>({reference:b,floating:S}),[b,S]),P=x.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=tv(N.floating,u.x),r=tv(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ev(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return x.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var iv=(e,t)=>{let n=K_(e);return{name:n.name,fn:n.fn,options:[e,t]}},av=(e,t)=>{let n=q_(e);return{name:n.name,fn:n.fn,options:[e,t]}},ov=(e,t)=>({fn:X_(e).fn,options:[e,t]}),sv=(e,t)=>{let n=J_(e);return{name:n.name,fn:n.fn,options:[e,t]}},cv=(e,t)=>{let n=Y_(e);return{name:n.name,fn:n.fn,options:[e,t]}},lv=x.createContext(void 0);function uv(e){let t=x.useContext(lv);if(t===void 0&&!e)throw Error(Vl(69));return t}var dv=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]);function fv(e){return e===`starting`?sh:ou}var pv=x.createContext(void 0);function mv(){return x.useContext(pv)}function hv(e,t){let n=Ou(e.render);if(x.isValidElement(n)){let e=n.props;if(Object.hasOwn(e,`id`))return e.id??``}return e.id??t}function gv(e,t,n){let r=hv(e,t),i=r===t?void 0:r;return[r,x.useCallback(e=>n?.(e?i:void 0),[i,n])]}function _v(e,t,n){let r=Ou(e.render),i=x.isValidElement(r)?r.props:void 0,a=e[`aria-label`]??i?.[`aria-label`],o=e[`aria-labelledby`]??i?.[`aria-labelledby`];return o==null&&!a&&(o=t?t.id||void 0:n||void 0),o}var vv=x.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,id:o,initialFocus:s,...c}=e,{store:l,defaultFloatingId:u,setRenderedFloatingId:d,virtualFocus:f,orientation:p}=Gl(),m=mv(),{side:h,align:g}=Ul(),_=uv(!0)!=null,v=l.useState(`open`),y=l.useState(`transitionStatus`),b=l.useState(`popupProps`),S=l.useState(`mounted`),C=l.useState(`instantType`),w=l.useState(`activeTriggerElement`),T=l.useState(`parent`),E=l.useState(`lastOpenChangeReason`),D=l.useState(`rootId`),O=l.useState(`floatingRootContext`),k=l.useState(`floatingTreeRoot`),A=l.useState(`closeDelay`),j=l.useState(`hoverEnabled`),M=l.useState(`disabled`),N=l.useState(`openMethod`),P=l.useState(`activeTriggerId`),F=l.useState(`listElement`),[I,L]=gv(e,u,d),R=_v(e,w,P),z=T.type===`menu`?m:void 0,ee=T.type===`context-menu`,B=s??T.type!==`menu`;s===void 0&&F&&T.type!==`menu`&&(B=()=>l.state.activeIndex===null&&F),Jf({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}}),x.useEffect(()=>{function e(e){l.setOpen(!1,Ff(e.reason,e.domEvent))}return k.events.on(`close`,e),()=>{k.events.off(`close`,e)}},[k.events,l]),Vg(O,{enabled:j&&!M&&!ee&&T.type!==`menubar`,closeDelay:A});let V=l.useStateSetter(`popupElement`),{parentVirtualFocusRef:te,handleFocus:ne}=(x.useContext(hd)?.useParentHandoff??bv)(l,T,v,f),re=wu(`div`,e,{state:{transitionStatus:y,side:h,align:g,open:v,nested:T.type===`menu`,instant:C},ref:[t,l.context.popupRef,V,L],stateAttributesMapping:Yu,props:[b,{id:I,...F?{role:`presentation`}:{role:`menu`,"aria-orientation":p===`horizontal`?`horizontal`:void 0,"aria-labelledby":R},onKeyDown(e){z?.onPopupKeyDown?.(e),_&&dv.has(e.key)&&e.stopPropagation()},onFocus:ne},fv(y),c,{"data-rootownerid":D}]}),H=T.type===void 0||ee;(w||T.type===`menubar`&&E!==`outside-press`)&&(H=!0);let U=z?.getReturnElement??te;return(0,K.jsx)(Nh,{context:O,openInteractionType:N,modal:ee,disabled:!S,returnFocus:a??U??H,explicitReturnFocus:a===void 0&&U?!1:void 0,initialFocus:B,restoreFocus:!0,getInsideElements:T.type===void 0?()=>[l.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:T.type===`menubar`?void 0:k,previousFocusableElement:w,nextFocusableElement:T.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:re})}),yv={parentVirtualFocusRef:void 0,handleFocus:void 0};function bv(){return yv}var xv=x.forwardRef(function(e,t){let n=gd()?.Popup??vv;return(0,K.jsx)(n,{...e,ref:t})}),Sv=x.createContext(void 0);function Cv(){let e=x.useContext(Sv);if(e===void 0)throw Error(Vl(32));return e}var wv=x.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=Gl();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,K.jsx)(Sv.Provider,{value:n,children:(0,K.jsx)(hh,{ref:t,...r,portalOwnerRole:o})})});function Tv(e){return tu(19)?e:e?`true`:void 0}function Ev(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=x.useState(null),d=x.useRef(null),f=xh(n),p=x.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=rv({...e,elements:{...p,...l&&{reference:l}}}),h=x.useCallback(e=>{let t=Td(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=x.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=x.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=x.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return Q(()=>{o&&(d.current=o)},[o]),Q(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),x.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var Dv=x.createContext(void 0);function Ov(){return x.useContext(Dv)?.direction??`ltr`}var kv=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}=Jp(e,t)||{};if(l==null)return{};let d=fm(u),f={x:n,y:r},p=em(i),m=Qp(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=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=qp(D,k,O),j=!c.arrow&&Xp(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Av=(e,t)=>{let{name:n,fn:r}=kv(e);return{name:n,fn:r,options:[e,t]}},jv={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},Mv={sideX:`left`,sideY:`top`},Nv=`--available-width`,Pv=`--available-height`,Fv=`--anchor-width`,Iv=`--anchor-height`,Lv=`--transform-origin`,Rv=Nv,zv=Pv;function Bv(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Vv(e,t,n){let{rects:r,placement:i}=e;return{side:Bv(t,Yp(i),n),align:Xp(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Hv(e){return Uv(e,Ev)}function Uv(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:b,lazyFlip:S=!1,externalTree:C}=e,w=_.side||`flip`,T=_.align||`flip`,E=_.fallbackAxisSide||`end`,D=v?.crossAxis??!1,O=v?.rootBoundary,k=typeof n==`function`?n:void 0,A=Z(k),j=k?A:n,M=Fp(n),N=Fp(g),P=Ov()===`rtl`,[F,I]=x.useState(null);!g&&F!==null&&I(null);let L=S===`placement`,R=F?Yp(F):null,z=F&&L?Xp(F)||`center`:null,ee=R||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":P?`left`:`right`,"inline-start":P?`right`:`left`}[i],B=z||o,V=B===`center`?ee:`${ee}-${B}`,te=l;typeof te==`number`?te={top:te,right:te,bottom:te,left:te}:te&&={top:te.top||0,right:te.right||0,bottom:te.bottom||0,left:te.left||0};let ne=+(i===`bottom`),re=+(i===`top`),H=+(i===`right`),U=+(i===`left`),ie={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:te},W=x.useRef(null),G=Fp(a),ae=Fp(s),oe=typeof a==`function`?0:a,se=typeof s==`function`?0:s,ce=[];p&&ce.push(p),ce.push(iv(e=>{let t=Vv(e,i,P),n=typeof G.current==`function`?G.current(t):G.current,r=typeof ae.current==`function`?ae.current(t):ae.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[oe,se,P,i]));let le=T===`none`&&w!==`shift`,ue=!le&&(u||D||w===`shift`),de=w===`none`?null:sv({...ie,padding:{top:te.top+1+ne,right:te.right+1+U,bottom:te.bottom+1+re,left:te.left+1+H},mainAxis:!D&&w===`flip`,crossAxis:T===`flip`&&`alignment`,fallbackAxisSideDirection:E}),fe=le?null:av({...ie,rootBoundary:O,mainAxis:T!==`none`,crossAxis:ue,limiter:u||D?void 0:ov(e=>{if(!W.current)return{};let{width:t,height:n}=W.current.getBoundingClientRect(),r=$p(Yp(e.placement)),i=r===`y`?t:n,a=r===`y`?te.left+te.right:te.top+te.bottom;return{offset:i/2+a/2}})},[ie,u,D,O,te,T]);w===`shift`||T===`shift`||B===`center`?ce.push(fe,de):ce.push(de,fe),ce.push(cv({...ie,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!N.current)return;let i=e.style;i.setProperty(Rv,`${t}px`),i.setProperty(zv,`${n}px`);let a=Sd(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(Fv,`${u}px`),i.setProperty(Iv,`${d}px`)}}),Av(e=>({element:W.current||$d(e.elements.floating).createElement(`div`),padding:W.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=Yp(r),u=Xp(r),d=$p(l)===`y`,f=W.current,p=typeof a==`function`?a(Vv(e,i,P)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return ue&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(Lv,d?`${m} ${h}`:`${h} ${m}`),{}}},jv,b),Q(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let pe=x.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:me,elements:he,x:ge,y:_e,middlewareData:ve,update:ye,placement:be,context:xe,isPositioned:Se,floatingStyles:Ce}=t({rootContext:h,open:m?g:void 0,placement:V,middleware:ce,strategy:r,whileElementsMounted:m?void 0:(...e)=>G_(...e,pe),nodeId:y,externalTree:C}),{sideX:we,sideY:Te}=ve.adaptiveOrigin||Mv,Ee=Se?r:`fixed`,De=x.useMemo(()=>{let e;return e=Se?b?{position:Ee,[we]:ge,[Te]:_e}:{...Ce,position:Ee}:{position:Ee,top:0,left:0},e[Rv]=`100vw`,e[zv]=`100vh`,Se||(e.opacity=0),e},[b,Ee,we,ge,Te,_e,Ce,Se]),Oe=x.useRef(null);Q(()=>{if(!g)return;let e=M.current,t=typeof e==`function`?e():e,n=(Wv(t)?t.current:t)||null;n!==Oe.current&&(me.setPositionReference(n),Oe.current=n)},[g,me,j,M]),x.useEffect(()=>{if(!g)return;let e=M.current;typeof e!=`function`&&Wv(e)&&e.current!==Oe.current&&(me.setPositionReference(e.current),Oe.current=e.current)},[g,me,j,M]),x.useEffect(()=>{if(m&&g&&he.reference&&he.floating)return G_(he.reference,he.floating,ye,pe)},[m,g,he,ye,pe]);let ke=Yp(be),Ae=Bv(i,ke,P),je=Xp(be)||`center`,Me=!!ve.hide?.referenceHidden;Q(()=>{S&&g&&Se&&(ke!==ee||L&&je!==B)&&I(be)},[S,L,g,Se,be,ke,je,ee,B]);let Ne=x.useMemo(()=>({position:`absolute`,top:ve.arrow?.y,left:ve.arrow?.x}),[ve.arrow]),Pe=ve.arrow?.centerOffset!==0;return x.useMemo(()=>({positionerStyles:De,arrowStyles:Ne,arrowRef:W,arrowUncentered:Pe,side:Ae,align:je,physicalSide:ke,anchorHidden:Me,refs:me,context:xe,isPositioned:Se,update:ye}),[De,Ne,W,Pe,Ae,je,ke,Me,me,xe,Se,ye])}function Wv(e){return e!=null&&`current`in e}function Gv(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=Z(i),[,o]=x.useState(0),s=ql(qv).current,c=ql(Kv).current,l=x.useRef(0),u=x.useRef(!0),d=x.useRef(null),f=x.useRef(null),p=Z(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=Z((e,t)=>{c.set(e,t),p()}),h=Z(e=>{c.delete(e),p()}),g=Z(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!Xv(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&Zv(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=Yv(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=Z(()=>{let[e,t]=Jv(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});Q(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),Q(()=>{u.current&&v()}),Q(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=Z(e=>(s.add(e),()=>{s.delete(e)})),b=x.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,K.jsx)(Cf.Provider,{value:b,children:t})}function Kv(){return new Map}function qv(){return new Set}function Jv(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>Zv(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function Yv(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Xv(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function Zv(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}var Qv=x.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,K.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function $v(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=x.useRef(null),o=x.useRef(null),s=qf(r);Q(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),Q(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}function ey(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),wu(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},fv(r),i],stateAttributesMapping:Ju})}var ty={},ny={},ry=``;function iy(e,t){return Od(e)?e:t}function ay(e,t,n){return/hidden|clip/.test(e.getComputedStyle(iy(t,n)).overflowY)}function oy(e){if(typeof document>`u`)return!1;let t=$d(e);return Sd(t).innerWidth-t.documentElement.clientWidth>0}function sy(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=$d(e),n=t.documentElement,r=t.body,i=iy(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function cy(e){let t=$d(e),n=t.documentElement,r=t.body,i=iy(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function ly(e){let t=$d(e),n=t.documentElement,r=t.body,i=Sd(n),a=0,o=0,s=!1,c=Bf.create();if(gf&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,ty={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},ry=n.style.scrollBehavior,ny={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=iy(n,r);s=sy(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,ty),Object.assign(r.style,ny),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=ry)}function d(){u(),c.request(l)}l();let f=Np(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var uy=new class{lockCount=0;restore=null;timeoutLock=$f.create();timeoutUnlock=$f.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=$d(e),n=t.documentElement,r=t.body,i=Sd(n);if(ay(i,n,r)){let t=new i.MutationObserver(()=>{ay(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=df||!oy(e);this.restore=a?cy(e):ly(e)}};function dy(e=!0,t=null){Q(()=>{if(e)return uy.acquire(t)},[e,t])}var fy=20;function py(e,t,n,r){let[i,a]=x.useState(!1);Q(()=>{if(!e||!t||n==null){a(!1);return}let r=$d(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-fy)},[e,t,n]),dy(e&&(!t||i),r)}var my=x.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=ch,style:g,..._}=e,{store:v,virtualFocus:y,syncHighlightedItem:b}=Gl(),S=Cv(),C=Zu(!0),w=v.useState(`parent`),T=v.useState(`floatingRootContext`),E=v.useState(`floatingTreeRoot`),D=v.useState(`mounted`),O=v.useState(`open`),k=v.useState(`modal`),A=v.useState(`openMethod`),j=v.useState(`activeTriggerElement`),M=v.useState(`transitionStatus`),N=v.useState(`positionerElement`),P=v.useState(`instantType`),F=v.useState(`adaptiveOrigin`),I=v.useState(`lastOpenChangeReason`),L=v.useState(`floatingNodeId`),R=v.useState(`floatingParentNodeId`),z=T.useState(`domReferenceElement`),ee=n,B=c,V=l,te=s,ne=h;w.type===`context-menu`&&(ee=n??w.context?.anchor,te??=`start`,!o&&te!==`center`&&(V=e.alignOffset??2,B=e.sideOffset??-5));let re=o,H=te;w.type===`menu`?(re??=`inline-end`,H??=`start`,ne=e.collisionAvoidance??lh):w.type===`menubar`&&(re??=w.context.orientation===`vertical`?`inline-end`:`bottom`,H??=`start`);let U=w.type===`context-menu`,ie=Hv({anchor:ee,floatingRootContext:T,positionMethod:C?`fixed`:r,mounted:D,side:re,sideOffset:B,align:H,alignOffset:V,arrowPadding:U?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:L,keepMounted:S,disableAnchorTracking:m,collisionAvoidance:ne,shift:U?{crossAxis:!(`side`in ne&&ne.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:E,adaptiveOrigin:F,lazyFlip:y?`placement`:!1});x.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===L&&v.set(`hoverEnabled`,!1),e.nodeId!==L&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,Ff(dd)))}return E.events.on(`menuopenchange`,e),()=>{E.events.off(`menuopenchange`,e)}},[v,E.events,L]),x.useEffect(()=>{if(v.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==v.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;v.setOpen(!1,Ff(t))}return E.events.on(`menuopenchange`,e),()=>{E.events.off(`menuopenchange`,e)}},[E.events,v]);let W=ep();x.useEffect(()=>{O||W.clear()},[O,W]),x.useEffect(()=>{function e(e){if(O&&e.nodeId===v.select(`floatingParentNodeId`)){if(e.target&&j&&j!==e.target){let e=v.select(`closeDelay`);e>0?W.isStarted()||W.start(e,()=>{v.setOpen(!1,Ff(dd))}):v.setOpen(!1,Ff(dd))}else W.clear()}}return E.events.on(`itemhover`,e),()=>{E.events.off(`itemhover`,e)}},[E.events,O,j,v,W]),x.useEffect(()=>{let e={open:O,nodeId:L,parentNodeId:R,reason:v.select(`lastOpenChangeReason`)};E.events.emit(`menuopenchange`,e)},[E.events,O,v,L,R]),$v({store:v,domReference:z,positionerElement:N,open:O});let G={open:O,side:ie.side,align:ie.align,anchorHidden:ie.anchorHidden,nested:w.type===`menu`,instant:P},ae=w.type===`menubar`&&w.context.modal;py(O&&(ae||k&&I!==`trigger-hover`),A===`touch`,N,j);let oe=ey(e,G,{styles:ie.positionerStyles,transitionStatus:M,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!D,inert:!O}),se=D&&w.type!==`menu`&&(w.type!==`menubar`&&k&&I!==`trigger-hover`||w.type===`menubar`&&w.context.modal),ce=null;return w.type===`menubar`?ce=w.context.contentElement:w.type===void 0&&(ce=j),(0,K.jsxs)(Hl.Provider,{value:ie,children:[se&&(0,K.jsx)(Qv,{ref:w.type===`context-menu`||w.type===`nested-context-menu`?w.context.internalBackdropRef:null,inert:Tv(!O),cutout:ce}),(0,K.jsx)(Ch,{id:L,children:(0,K.jsx)(Gv,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,onMapChange:b,children:oe})})]})}),hy=x.createContext(void 0);function gy(){let e=x.useContext(hy);if(e===void 0)throw Error(Vl(34));return e}var _y=x.forwardRef(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,style:c,"aria-labelledby":l,...u}=e,[d,f]=x.useState(void 0),[p,m]=md({controlled:i,default:a,name:`MenuRadioGroup`}),h=Z((e,t)=>{o?.(e,t),t.isCanceled||m(e)}),g=wu(`div`,e,{state:{disabled:s},ref:t,props:{role:`group`,"aria-labelledby":l??d,"aria-disabled":s||void 0,...u}}),_=x.useMemo(()=>({value:p,setValue:h,disabled:s}),[p,h,s]);return(0,K.jsx)(Yf.Provider,{value:f,children:(0,K.jsx)(hy.Provider,{value:_,children:g})})}),vy=x.memo(x.forwardRef(function(e,t){let n=gd()?.RadioGroup??_y;return(0,K.jsx)(n,{...e,ref:t})})),yy=x.createContext(void 0);function by(){let e=x.useContext(yy);if(e===void 0)throw Error(Vl(35));return e}var xy=x.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,value:l,style:u,...d}=e,{store:f}=Gl(),{value:p,setValue:m,disabled:h}=gy(),g=Tf({guess:!0,label:a}),_=jf(i),v=f.useState(`isActive`,g.index),y=f.useState(`floatingNodeId`),b=f.useState(`itemProps`),S=f.useState(`disabled`),C=s||h||S,w=p===l,{getItemProps:T,itemRef:E}=Sf({closeOnClick:c,disabled:C,highlighted:v,id:_,store:f,nativeButton:o,nodeId:y,itemMetadata:xf}),D=x.useMemo(()=>({disabled:C,highlighted:v,checked:w}),[C,v,w]);function O(e){let t=Ff(rd,e.nativeEvent,void 0,{preventUnmountOnClose:iu});m(l,t)}let k=wu(`div`,e,{state:D,stateAttributesMapping:Pf,props:[b,{role:`menuitemradio`,"aria-checked":w,onClick:O},d,T],ref:[E,t,g.ref]});return(0,K.jsx)(yy.Provider,{value:D,children:k})}),Sy=x.forwardRef(function(e,t){let n=yd(e,t);return n.visible?(0,K.jsx)(xy,{...e,ref:n.ref}):null}),Cy=x.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=by(),c=x.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=Hf(s.checked);return Jf({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}}),wu(`span`,e,{state:{checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l},stateAttributesMapping:Pf,ref:[t,c],props:{"aria-hidden":!0,...o},enabled:a||u})}),wy=x.createContext(null);function Ty(e){let t=x.useContext(wy);if(t===null&&!e)throw Error(Vl(5));return t}function Ey(e){let t=x.useRef(``),n=x.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:x.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function Dy(e,t){let n=x.useRef(e),r=Z(t);Q(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function Oy(e,t){let{onClick:n,onPointerDown:r}=Ey(Z((n,r)=>{(typeof e==`function`?e():e)||t(r||(df?`touch`:``))}));return x.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function ky(e){let[t,n]=x.useState(null),r=Oy(e,n);return Dy(e,t=>{t&&!e&&n(null)}),x.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function Ay(e){return e==null?Qu:e.type.startsWith(`key`)?cd:e.type.startsWith(`mouse`)||e.type.startsWith(`pointer`)?ld:Qu}var jy={...Mg,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,t)=>{let n=Mg.triggerPopupId(e,t);return n?e.listElement?.id||n:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>gf&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType===`trigger-change`&&!Mg.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},My=class extends Cg{constructor(e,t,n=!1){let r=new rg,i=Py(r,t,n,e);super(i,Ny(r),jy),this.observe(`parent`,e=>{e.type===`menu`?this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef:e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){let e=this.state.parent;if(e.type!==`menu`)return;let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);return e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);(t!==i||n!==a||r!==o)&&(t=i,n=a,r=o,this.notifyAll())})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}setActiveIndex(e,t,n){if(this.state.activeIndex!==e){let r=(e===null?void 0:this.context.itemDomElements.current[e])===this.context.reportedItem;this.context.highlightReason=r?`none`:t,this.context.highlightEvent=r?void 0:n}this.set(`activeIndex`,e)}highlightItem(e,t,n){let r=this.context.itemDomElements.current.indexOf(e);r>-1&&this.setActiveIndex(r,t,n)}};function Ny(e){return{positionerRef:x.createRef(),popupRef:x.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:`none`,highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:x.createRef(),beforeTriggerFocusGuardRef:x.createRef(),beforeContentFocusGuardRef:x.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function Py(e,t,n=!1,r){return{...Eg(e,t,n),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:ou,inputProps:ou,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new _h,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:ou,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var Fy=x.createContext(null);function Iy(e,t){return(e===`trigger-press`||e===`item-press`)&&t?.detail===0}function Ly(e,t){return e===`list-navigation`||Iy(e,t)}var Ry=fg(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,onItemHighlighted:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:u=`vertical`,actionsRef:d,closeParentOnEsc:f=!1,handle:p,triggerId:m,defaultTriggerId:h=null,highlightItemOnHover:g=!0,isSubmenu:_=!1,virtualFocus:v=!1,virtualFocusRef:y,allowEscape:b=!0,resetOnPointerLeave:S=!0}=e,C=Zu(!0),w=Gl(!0),T=Ty(!0),E=w?.store,D=w?.virtualFocus??!1,O=x.useMemo(()=>_&&E?{type:`menu`,store:E}:T?{type:`menubar`,context:T}:C&&!E?{type:`context-menu`,context:C}:{type:void 0},[C,E,T,_]),k=jf(),A=jf(),[j,M]=x.useState(void 0),N=(j??A)||void 0,P=bh(),F=O.type===`menu`?O.store:void 0,I=(n??o)&&F?.state.transitionStatus===`starting`,L=ql(()=>I?F?.state.instantType:void 0).current,R=ql(()=>{let e=new My({open:o,openProp:n,activeTriggerId:h,triggerIdProp:m,parent:O,disabled:s,highlightItemOnHover:g,modal:O.type===void 0?c:void 0,rootId:k,instantType:L},N,P!=null);return e.context.virtualFocusRef=y,e}).current;R.useControlledProp(`openProp`,n),R.useControlledProp(`triggerIdProp`,m),R.useContextCallback(`onOpenChangeComplete`,i);let z=R.useState(`floatingTreeRoot`),ee=Sh(z),B=R.useState(`open`),V=R.useState(`activeTriggerElement`),te=R.useState(`positionerElement`),ne=R.useState(`hoverEnabled`),re=R.useState(`disabled`),H=R.useState(`lastOpenChangeReason`),U=R.useState(`parent`),ie=R.useState(`activeIndex`),W=R.useState(`keyboardOpen`),G=R.useState(`payload`),ae=R.useState(`floatingParentNodeId`),oe=x.useRef(null),se=x.useRef(U.type!==`context-menu`),ce=ep(),le=x.useRef(!0),ue=ep(),de=ae!=null,{openMethod:fe,triggerProps:pe}=ky(B);R.useSyncedValues({disabled:s,highlightItemOnHover:g,modal:U.type===void 0?c:void 0,openMethod:fe,rootId:k}),$h(R);let{forceUnmount:me,transitionStatus:he}=eg(B,R,()=>{R.set(`allowMouseEnter`,!1)},I),ge=qf(R.context.popupRef);x.useEffect(()=>{if(L===void 0)return;let e=()=>{R.state.instantType===L&&R.set(`instantType`,void 0)};if(!B){e();return}if(he!==void 0)return;if(R.context.popupRef.current==null){e();return}let t=new AbortController;return ge(e,t.signal),()=>{t.abort()}},[L,B,he,ge,R]),Q(()=>{C&&!w?R.update({parent:{type:`context-menu`,context:C},floatingNodeId:ee,floatingParentNodeId:P}):(w||!R.select(`activeTriggerElement`))&&R.update({floatingNodeId:ee,floatingParentNodeId:P})},[C,w,ee,P,V,R]),x.useEffect(()=>{B||(oe.current=null),U.type===`context-menu`&&(B?ce.start(500,()=>{se.current=!0}):(ce.clear(),se.current=!1))},[ce,B,U.type]),Q(()=>{!B&&!ne&&R.set(`hoverEnabled`,!0)},[B,ne,R]);let _e=Z((e,t)=>{let n=t.reason;if(!e&&!R.select(`open`)||B===e&&t.trigger===V&&H===n)return;let i=Xh(t);if(!e&&t.trigger==null&&(t.trigger=V??void 0),r?.(e,t),t.isCanceled)return;R.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&n!==`item-press`&&a?.type===`click`&&a.pointerType===`touch`&&!le.current)return;e&&n===`trigger-focus`?(le.current=!1,ue.start(300,()=>{le.current=!0})):(le.current=!0,ue.clear());let o=!e&&(n===`escape-key`||n==null);oe.current=t.event;let s=Yh(R.state,e,t.trigger,i());s.openChangeReason=n,s.keyboardOpen=e&&Ly(n,a),s.instantType=U.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?`group`:Iy(n,a)?`click`:o?`dismiss`:void 0,R.update(s)}),ve=Vh({popupStore:R,floatingRootContext:R.state.floatingRootContext,floatingId:N,nested:P!=null,onOpenChange:_e}),ye=ve.context.events;Q(()=>{let e=({open:e,eventDetails:t})=>_e(e,t);return ye.on(`setOpen`,e),()=>{ye?.off(`setOpen`,e)}},[ye,_e]),Q(()=>R.subscribeToParentMenu(),[R]);let be=x.useCallback(()=>{R.setOpen(!1,Ff(pd))},[R]);x.useImperativeHandle(d,()=>({unmount:me,close:be}),[me,be]);let xe;U.type===`context-menu`&&(xe=U.context),x.useImperativeHandle(xe?.positionerRef,()=>te,[te]),x.useImperativeHandle(xe?.actionsRef,()=>({setOpen:_e}),[_e]);let Se=Bh(ve,{enabled:!re,bubbles:{escapeKey:f&&U.type===`menu`},outsidePress(){return U.type!==`context-menu`||oe.current?.type===`contextmenu`||se.current},externalTree:de?z:void 0}),Ce=Ov(),we=Xg(ve,{enabled:!re,listRef:R.context.itemDomElements,activeIndex:ie,virtual:v,nested:U.type===`menubar`||!v&&U.type!==void 0,parentOrientation:U.type===`menubar`?U.context.orientation:void 0,loopFocus:l,focusItemOnOpen:v?W:void 0,allowEscape:v&&l&&b,orientation:u,triggerOrientation:v?`vertical`:u,rtl:Ce===`rtl`,disabledIndices:au,onNavigate(e,t){R.setActiveIndex(e,Ay(t),t?.nativeEvent)},openOnArrowKeyDown:U.type!==`context-menu`&&!(v&&_),externalTree:!v&&de?z:void 0,nestedReturnFocusRef:F?.context.virtualFocusRef,focusItemOnHover:g,resetOnPointerLeave:S}),Te=x.useCallback(e=>{R.context.typingRef.current=e},[R]),Ee=Zg(ve,{enabled:!re&&!v,listRef:R.context.itemLabels,elementsRef:R.context.itemDomElements,activeIndex:ie,resetMs:500,onMatch:(e,t)=>{B&&e!==ie&&R.setActiveIndex(e,cd,t.nativeEvent)},onTyping:Te}),De=Z(a),Oe=x.useRef(-1),ke=Z(()=>{let e=R.state.activeIndex,t=e===null?void 0:R.context.itemDomElements.current[e]??void 0;if(t?.isConnected===!1)return;let n=t===void 0?-1:e;if(Oe.current===n&&R.context.reportedItem===t)return;Oe.current=n,R.context.reportedItem=t,v&&R.set(`highlightedItem`,t);let{highlightReason:r,highlightEvent:i}=R.context;R.context.highlightReason=Qu,R.context.highlightEvent=void 0,a&&De(t,If(r,i,{label:t===void 0?void 0:R.context.itemLabels.current[n]??void 0}))});Q(()=>{ke()},[ie,ke]);let Ae=x.useMemo(()=>{if(!v)return we.reference;if(!we.trigger)return ou;let{onFocus:e,...t}=we.trigger;return t},[v,we.reference,we.trigger]);R.useSyncedValue(`inputProps`,v?we.reference??ou:ou);let je=x.useMemo(()=>{let e=du(Ee.reference,Ae,Se.reference,{onMouseMove(){R.set(`allowMouseEnter`,!0)}},pe);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=B,e},[R,Ee.reference,Ae,Se.reference,pe,B]),Me=x.useMemo(()=>{let e=du(we.trigger,Se.trigger,pe);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[we.trigger,Se.trigger,pe]);ql(()=>(R.update({inactiveTriggerProps:Me}),null)),tg(R,{floatingRootContext:ve,activeTriggerProps:je,inactiveTriggerProps:Me,popupProps:x.useMemo(()=>du(Uh,{onMouseMove(){R.set(`allowMouseEnter`,!0),U.type===`menu`&&R.set(`hoverEnabled`,!1)},onClick(){R.select(`hoverEnabled`)&&R.set(`hoverEnabled`,!1)},onKeyDown(e){let t=R.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},Ee.floating,we.floating,Se.floating),[U.type,R,Ee.floating,we.floating,Se.floating]),itemProps:we.item??ou});let Ne=x.useMemo(()=>({store:R,parent:O,orientation:u,loopFocus:l,allowEscape:b,defaultFloatingId:A,setRenderedFloatingId:M,virtualFocus:v,parentVirtualFocus:D,syncHighlightedItem:ke}),[R,O,u,l,b,A,v,D,ke]),Pe=typeof t==`function`?t({payload:G}):t,Fe=(0,K.jsxs)(Wl.Provider,{value:Ne,children:[p&&(0,K.jsx)(Kh,{handle:p,store:R}),Pe]});return(U.type===void 0||U.type===`context-menu`)&&(Fe=(0,K.jsx)(wh,{externalTree:z,children:Fe})),Fe});function zy(e){let t=x.useContext(Fy);if(t===null)return(0,K.jsx)(Ry,{...e});let n=t.Root;return(0,K.jsx)(Fy.Provider,{value:null,children:(0,K.jsx)(n,{...t.options,...e})})}var By=5;function Vy(e,t){let n=Hy(t);return e.clientX>=n.left-By&&e.clientX<=n.right+By&&e.clientY>=n.top-By&&e.clientY<=n.bottom+By}function Hy(e){let t=e.getBoundingClientRect(),n=Sd(e);if(vf)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function Uy(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Zd(),{ref:i,index:a}=Tf(e),o=n===a,s=x.useRef(null),c=Jl(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}function Wy(e){let{render:t,className:n,style:r,state:i=ou,props:a=au,refs:o=au,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=Uy({metadata:s});return wu(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}function Gy(e){if(Ed(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!Rd(e))return Gy(Vd(e))}function Ky(e,t){function n(n,r,i){let a=n.currentTarget;Qe.flushSync(()=>{e.setOpen(!1,Ff(ad,n.nativeEvent,a))}),Vm(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&Hm(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function qy(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=x.useRef(!1);return x.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,$d(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:ou,[t,n,r])}var Jy=pg(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:c,delay:l=100,closeDelay:u=0,handle:d,payload:f,...p}=e,m=Gl(!0),h=Ng(d)??m?.store;if(!h)throw Error(Vl(85));let g=jf(s),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerControlsId`,g),S=x.useRef(null),C=Xy(),w=Zd(!0),T=xh(),E=x.useMemo(()=>T??new _h,[T]),{registerTrigger:D,isMountedByThisTrigger:O}=Qh(g,S,h,{payload:f,closeDelay:u,parent:C,floatingTreeRoot:E,floatingNodeId:Sh(E),floatingParentNodeId:bh(),keyboardEventRelay:w?.relayKeyboardEvent}),k=C.type===`menubar`,A=h.useState(`disabled`),j=a||A||k&&C.context.disabled,{getButtonProps:M,buttonRef:N}=tf({disabled:j,native:o});x.useEffect(()=>{!y&&C.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,y,C.type]);let P=x.useRef(null),F=ep(),I=Z(e=>{if(!P.current)return;F.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;$(P.current,t)||$(h.select(`positionerElement`),t)||t===P.current||t!=null&&Gy(t)===h.select(`rootId`)||Vy(e,P.current)||E.events.emit(`close`,{domEvent:e,reason:ud})});x.useEffect(()=>{let e=$d(P.current);if(y&&h.select(`lastOpenChangeReason`)===`trigger-hover`)return e.addEventListener(`mouseup`,I,{once:!0}),()=>{e.removeEventListener(`mouseup`,I)}},[y,I,h]);let L=k&&C.context.hasSubmenuOpen,R=Ug(v,{enabled:(c??L)&&!j&&(!k||L&&!O),handleClose:a_({blockPointerEvents:!k}),mouseOnly:!0,move:!1,restMs:C.type===void 0?l:void 0,delay:{close:u},triggerElementRef:S,externalTree:E,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),z=Yy(y,h.select(`lastOpenChangeReason`)),ee=Ph(v,{enabled:!j,event:y&&k?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:C.type===void 0&&z}),B=Fg(v,{enabled:!j&&L}),V=qy({open:y,enabled:k,mouseDownAction:`open`}),te=x.useMemo(()=>du(B.reference,ee.reference),[B.reference,ee.reference]),ne=h.useState(`triggerProps`,O),re=h.useState(`filterTriggerProps`),{handlePreFocusGuardFocus:H,handleFocusTargetFocus:U}=Ky(h,S),ie={disabled:j,open:y},W=[P,t,N,D,S],G=[te,R??ou,ne,{"aria-haspopup":`menu`,"aria-controls":b,id:g,onMouseDown:e=>{h.select(`open`)||(F.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),$d(e.currentTarget).addEventListener(`mouseup`,I,{once:!0}))}},re,k?{role:`menuitem`}:{},V,p,M],ae=wu(`button`,e,{enabled:!k,stateAttributesMapping:qu,state:ie,ref:W,props:G});return k?(0,K.jsx)(Wy,{tag:`button`,render:n,className:r,style:i,state:ie,refs:W,props:G,stateAttributesMapping:qu}):y?(0,K.jsxs)(x.Fragment,{children:[(0,K.jsx)(Bp,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:H},`${g}-pre-focus-guard`),(0,K.jsx)(x.Fragment,{children:ae},g),(0,K.jsx)(Bp,{ref:h.context.triggerFocusTargetRef,onFocus:U},`${g}-post-focus-guard`)]}):(0,K.jsx)(x.Fragment,{children:ae},g)});function Yy(e,t){let n=ep(),[r,i]=x.useState(!1);return Q(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Xy(){let e=Ty(!0);return x.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}var Zy=x.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return wu(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function Qy({...e}){return(0,K.jsx)(zy,{"data-slot":`dropdown-menu`,...e})}function $y({...e}){return(0,K.jsx)(Jy,{"data-slot":`dropdown-menu-trigger`,...e})}function eb({align:e=`start`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=4,className:i,...a}){return(0,K.jsx)(wv,{children:(0,K.jsx)(my,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:(0,K.jsx)(xv,{"data-slot":`dropdown-menu-content`,className:Y(`z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,i),...a})})})}function tb({className:e,inset:t,variant:n=`default`,...r}){return(0,K.jsx)(Zf,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:Y(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function nb({...e}){return(0,K.jsx)(vy,{"data-slot":`dropdown-menu-radio-group`,...e})}function rb({className:e,children:t,inset:n,...r}){return(0,K.jsxs)(Sy,{"data-slot":`dropdown-menu-radio-item`,"data-inset":n,className:Y(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[(0,K.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-radio-item-indicator`,children:(0,K.jsx)(Cy,{children:(0,K.jsx)(j,{})})}),t]})}function ib({className:e,...t}){return(0,K.jsx)(Zy,{"data-slot":`dropdown-menu-separator`,className:Y(`-mx-1 my-1 h-px bg-border`,e),...t})}var ab={file:{icon:ae,label:`Document`},book:{icon:D,label:`Docs`},code:{icon:L,label:`SDK`},globe:{icon:le,label:`Public`},lock:{icon:_e,label:`Internal`},users:{icon:ze,label:`Partners`},bot:{icon:k,label:`Agents`},terminal:{icon:Le,label:`Command line`},package:{icon:xe,label:`Package`},rocket:{icon:ke,label:`Production`},flask:{icon:se,label:`Staging`},shield:{icon:Ne,label:`Admin`},star:{icon:Fe,label:`Star`},zap:{icon:Ge,label:`Fast`},layers:{icon:de,label:`Layers`},plug:{icon:Ce,label:`Integration`}};function ob({name:e,className:t}){let n=e??`file`,r=ab[n].icon;return(0,K.jsx)(r,{"data-icon":n,className:Y(`size-4 shrink-0`,t),"aria-hidden":`true`})}function sb({value:e,onChange:t,disabled:n}){return(0,K.jsxs)(Qy,{children:[(0,K.jsx)($y,{disabled:n,"aria-label":`Variant icon`,title:`Change the icon shown in the navigation`,className:`grid size-8 shrink-0 place-items-center rounded-md text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 aria-expanded:bg-muted/60`,children:(0,K.jsx)(ob,{name:e,className:`size-[18px]`})}),(0,K.jsx)(eb,{align:`start`,className:`grid w-auto grid-cols-4 gap-0.5 p-1.5`,children:Xr.map(n=>(0,K.jsx)(tb,{"aria-label":ab[n].label,title:ab[n].label,onClick:()=>t(n),className:Y(`grid size-8 place-items-center p-0`,(e??`file`)===n&&`bg-muted text-foreground`),children:(0,K.jsx)(ob,{name:n})},n))})]})}function cb(e){let t=Hc(e);return{doc:t.doc,minified:t.minified,bytes:hr(e)}}function lb(e,t){return`${e===null?``:`/${e}`}.${t}`}var ub=e=>e.definition.name??e.definition.project,db=e=>e.definition.project,fb=e=>({...e.include?{include:e.include}:{},...e.exclude?{exclude:e.exclude}:{}});function pb(e){return Object.entries(e.definition.variants).flatMap(([t,n])=>{let r=e.state.variants[t];return r?[{slug:t,name:n.name??t,definition:n,selection:fb(n),state:r}]:[]})}var mb=e=>{if(e.definition.sources.length<2)return;let[t]=Sr(e.definition);return t?Cr(t):void 0};function hb(e,t,n,r=t){let i={},a=!1;for(let[o,s]of Object.entries(e.variants))o===r?(n&&(i[t]=n),a=!0):i[o]=s;return!a&&n&&(i[t]=n),{...e,variants:i}}function gb(e){let{selection:t,overrides:n,...r}=e,i={};for(let[e,t]of Object.entries(r))t!=null&&t!==``&&(i[e]=t);return t.include&&(i.include=t.include),t.exclude&&(i.exclude=t.exclude),n&&Object.keys(n).length>0&&(i.overrides=n),i}var _b=x.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=tf({disabled:i,focusableWhenDisabled:a,native:o});return wu(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),vb=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,yb=Ft,bb=(e,t)=>n=>{if(t?.variants==null)return yb(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=vb(t)||vb(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return yb(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},xb=bb(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`material-solid text-primary-foreground`,outline:`material-raised material-raised-hover text-foreground`,secondary:`material-raised material-raised-hover text-foreground`,ghost:`text-muted-foreground hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/60`,destructive:`material-solid material-danger text-destructive-foreground focus-visible:border-destructive/40 focus-visible:ring-destructive/20`,"destructive-ghost":`text-destructive hover:bg-destructive/10 focus-visible:ring-destructive/20`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function Sb({className:e,variant:t=`default`,size:n=`default`,loading:r=!1,disabled:i,children:a,...o}){return(0,K.jsxs)(_b,{"data-slot":`button`,className:Y(xb({variant:t,size:n,className:e})),disabled:i||r,...o,children:[r?(0,K.jsx)(pe,{className:`animate-spin`}):null,a]})}async function Cb(e){try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.append(t),t.select();let n=document.execCommand(`copy`);return t.remove(),n}}function wb({value:e,label:t,what:n=`Copied`,onClick:r,...i}){let[a,o]=(0,x.useState)(!1),s=(0,x.useRef)(void 0);return(0,x.useEffect)(()=>()=>clearTimeout(s.current),[]),(0,K.jsxs)(Sb,{variant:`outline`,size:t?`default`:`icon`,"aria-label":t?void 0:`Copy`,...i,onClick:async t=>{r?.(t),await Cb(e)?(ht.success(n),o(!0),clearTimeout(s.current),s.current=setTimeout(()=>o(!1),1500)):ht.error(`Could not copy. Select the text and copy it by hand.`)},children:[a?(0,K.jsx)(j,{}):(0,K.jsx)(z,{}),t]})}function Tb({method:e,className:t}){return(0,K.jsx)(`span`,{"data-method":e,className:Y(`method inline-block w-11 shrink-0 text-[11px] leading-none font-semibold`,t),children:e})}function Eb({path:e,webhook:t,className:n}){if(t)return(0,K.jsx)(`span`,{className:Y(`min-w-0 truncate`,n),children:e});let r=e.split(/(\{[^}]*\}|\/)/g).filter(e=>e!==``);return(0,K.jsx)(`span`,{className:Y(`min-w-0 truncate`,n),children:r.map((e,t)=>{let n=`${t}:${e}`;return e===`/`?(0,K.jsx)(`span`,{className:`px-[1.5px] text-faint`,children:`/`},n):e.startsWith(`{`)?(0,K.jsx)(`span`,{className:`mx-px rounded-[5px] bg-primary/[0.07] px-1 py-px text-[12px] font-semibold text-primary ring-1 ring-primary/20 ring-inset dark:bg-primary/[0.14]`,children:e.slice(1,-1)},n):(0,K.jsx)(`span`,{children:e},n)})})}function Db(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var Ob=`data-valid`,kb=`data-invalid`,Ab={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},jb={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Mb={valid(e){return e===null?null:e?{[Ob]:``}:{[kb]:``}}},Nb=`data-checked`,Pb=`data-unchecked`;function Fb(e){return{checked(t){return e.indeterminate?{}:t?{[Nb]:``}:{[Pb]:``}},...Mb}}var Ib={invalid:void 0,name:void 0,validityData:{state:Ab,errors:[],error:``,value:``,initialValue:null},setValidityData:iu,disabled:void 0,setTouched:iu,setDirty:iu,setFilled:iu,setFocused:iu,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:jb,registerFieldControl:iu,validation:{getValidationProps:(e,t=ou)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:iu,getInputControl:()=>null,commit:async()=>{},change:iu}},Lb=x.createContext(Ib);function Rb(e=!0){let t=x.useContext(Lb);if(t.setValidityData===iu&&!e)throw Error(Vl(28));return t}function zb(e,t,n){let{setFocused:r,focusOwnerRef:i}=Rb(),a=Z(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return Q(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}function Bb(e,t,n,r,i=!0,a){let{registerFieldControl:o}=Rb(),s=ql(()=>Symbol());Q(()=>{let c=s.current;i?o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}):o(c,void 0)},[e,i,r,t,a,o,s,n]),Q(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var Vb=x.createContext({disabled:!1});function Hb(){return x.useContext(Vb)}var Ub=x.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:iu,validationMode:`onSubmit`,submitCountRef:{current:0}});function Wb(){return x.useContext(Ub)}var Gb=x.createContext({controlId:void 0,registerControlId:iu,resetControlId:iu,labelId:void 0,setLabelId:iu,messageIds:[],setMessageIds:iu,getDescriptionProps:e=>e});function Kb(){return x.useContext(Gb)}function qb(e,t,n,r=!0,i,a){let[o,s]=x.useState(),c=jf(i?`${i}-label`:void 0),l=!!a?.trim(),u=e??(l?void 0:t)??o;return Q(()=>{let i=e||t||l||!r?void 0:Jb(n.current,c);o!==i&&s(i)}),u}function Jb(e,t){let n=Yb(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function Yb(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}function Xb(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=Kb(),o=jf(),s=ql(()=>Symbol()),c=x.useRef(!1),l=x.useRef(!1),u=Z(()=>{c.current&&i!==iu&&(c.current=!1,i(s.current,void 0))});return Q(()=>{if(!n||i===iu){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}e===void 0?u():(c.current=!0,i(s.current,e))},[t,n,i,a,o,s,u]),Q(()=>u,[u]),(n?r:void 0)??t??o}var Zb=x.createContext(void 0);function Qb(){return x.useContext(Zb)}var $b=x.createContext(void 0);function ex(){let e=x.useContext($b);if(e===void 0)throw Error(Vl(14));return e}var tx=`data-parent`,nx=x.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,form:s,id:c,indeterminate:l=!1,inputRef:u,name:d,onCheckedChange:f,parent:p=!1,readOnly:m=!1,render:h,required:g=!1,uncheckedValue:_,value:v,nativeButton:y=!1,style:b,...S}=e,{clearErrors:C}=Wb(),{disabled:w,name:T,setDirty:E,setFilled:D,setTouched:O,state:k,validationMode:A,validityData:j,validation:M}=Rb(),N=Hb(),{labelId:P,registerControlId:F,getDescriptionProps:I}=Kb(),L=Qb(),R=L?.allValues===void 0?void 0:L.parent,z=R!==void 0,ee=w||N.disabled||L?.disabled||o,B=T??d,V=v??B,te=jf(),ne=L?.registerControlId!==F,re=Xb({id:c||void 0,enabled:ne}),H=y?re:te,U={};z&&(p?U=R.getParentProps():V!==void 0&&(U=R.getChildProps(V)));let{checked:ie=n,indeterminate:W=l,onCheckedChange:G,...ae}=U,oe=L?.value,se=x.useRef(null),ce=zb(ee,se),{getButtonProps:le,buttonRef:ue}=tf({disabled:ee,native:y}),de=L?.validation??M,[fe,pe]=md({controlled:V!==void 0&&oe!==void 0&&!p?oe.includes(V):ie,default:i,name:`Checkbox`,state:`checked`}),me=z?!!ie:fe,he=z&&W||l;Bb(se,te,fe,void 0,!L&&!ee,d);let ge=R?.registerChildId,_e=x.useRef(null),ve=de.registerInput,ye=L?V:void 0,be=x.useCallback(e=>ve(e,{controlRef:se,value:ye}),[ve,ye]),xe=Jl(u,_e,p?void 0:be),Se=qb(a,P,_e,!y,re,S[`aria-label`]);Q(()=>{_e.current&&(_e.current.indeterminate=he),L||D(fe)},[fe,he,L,D]),Dy(fe,()=>{L||(C(B),E(fe!==j.initialValue),de.change(fe))});let Ce=du({checked:fe,disabled:ee,form:s,name:p?void 0:B,id:y?void 0:re,required:g,ref:xe,style:B?zp:Rp,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=Ff(Qu,e.nativeEvent);if(f?.(t,n),!n.isCanceled&&(G?.(t,n),!n.isCanceled&&(pe(t),V!==void 0&&L!==void 0&&!p&&!z))){let e=t?[...L.value,V]:L.value.filter(e=>e!==V);L.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){se.current?.focus()}},v===void 0?ou:{value:(L?fe&&v:v)||``},I,e=>de.getValidationProps(ee,e));x.useEffect(()=>{if(!R||V===void 0)return;let e=R.disabledStatesRef.current;return e.set(V,ee),()=>{e.delete(V)}},[R,ee,V]);let we=x.useMemo(()=>({...k,checked:me,disabled:ee,readOnly:m,required:g,indeterminate:he}),[k,me,ee,m,g,he]),Te=Fb(we),Ee=wu(`span`,e,{state:we,ref:[ue,se,t],props:[{id:H,role:`checkbox`,"aria-checked":he?`mixed`:me,"aria-readonly":m||void 0,"aria-required":g||void 0,"aria-labelledby":Se,[tx]:p?``:void 0,onFocus(){ce(!0)},onBlur(){let e=_e.current;e&&(O(!0),ce(!1),A===`onBlur`&&de.commit(L?oe:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=_e.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),Sd(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||Db(t)?.click()})},onClick(e){if(m||ee)return;e.preventDefault();let t=_e.current;t&&ef(t,e)}},S,ae,le,I,e=>de.getValidationProps(ee,e)],stateAttributesMapping:Te}),De=Ee.props.id;return Q(()=>{if(ge&&!p&&V!==void 0&&De!==void 0)return ge(V,De)},[ge,p,V,De]),(0,K.jsxs)($b.Provider,{value:we,children:[Ee,!fe&&!L&&B&&!p&&_!==void 0&&(0,K.jsx)(`input`,{type:`hidden`,form:s,name:B,value:_,disabled:ee}),(0,K.jsx)(`input`,{...Ce,suppressHydrationWarning:!0})]})}),rx=x.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=ex(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=Hf(c),f=x.useRef(null),p={...s,transitionStatus:u};Jf({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...Fb(s),...Fu},h=a||l,g=wu(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null});function ix({className:e,...t}){return(0,K.jsx)(nx,{"data-slot":`checkbox`,className:Y(`peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary data-readonly:cursor-default data-readonly:data-checked:border-transparent data-readonly:data-checked:bg-foreground/45 data-readonly:data-indeterminate:border-transparent data-readonly:data-indeterminate:bg-foreground/45 dark:data-readonly:data-checked:bg-foreground/45`,e),...t,children:(0,K.jsx)(rx,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none [&>svg]:size-3.5`,children:t.indeterminate?(0,K.jsx)(ye,{}):(0,K.jsx)(j,{})})})}function ax({className:e,...t}){return(0,K.jsx)(`kbd`,{"data-slot":`kbd`,className:Y(`pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3`,e),...t})}function ox({value:e,options:t,onValueChange:n,"aria-label":r,className:i}){return(0,K.jsx)(`div`,{role:`radiogroup`,"aria-label":r,className:Y(`inline-flex h-8 items-center gap-0.5 rounded-lg bg-muted p-0.5`,i),onKeyDown:r=>{if(r.key!==`ArrowLeft`&&r.key!==`ArrowRight`)return;r.preventDefault();let i=t[(t.findIndex(t=>t.value===e)+(r.key===`ArrowRight`?1:-1)+t.length)%t.length];i&&(n(i.value),r.currentTarget.querySelectorAll(`button`)[t.indexOf(i)]?.focus())},children:t.map(t=>{let r=t.value===e;return(0,K.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,tabIndex:r?0:-1,onClick:()=>n(t.value),className:Y(`inline-flex h-7 shrink-0 items-center gap-1.5 rounded-[7px] px-2.5 text-[13px] leading-none font-medium whitespace-nowrap outline-none select-none focus-visible:ring-3 focus-visible:ring-ring/50`,r?`material-raised text-foreground`:`border border-transparent text-muted-foreground hover:text-foreground`),children:[t.label,t.count!==void 0&&(0,K.jsx)(`span`,{className:Y(`text-[11.5px] font-medium tabular-nums`,r?`text-muted-foreground`:`text-faint`),children:t.count.toLocaleString(`en-US`)})]},t.value)})})}var sx=`\0untagged`,cx=`\0webhooks`;function lx(e){let t=new Map;for(let n of e)for(let e of n.tags.length>0?new Set(n.tags):[sx]){let r=t.get(e);r?r.push(n):t.set(e,[n])}let n=t.get(sx);t.delete(sx);let r=[...t].map(([e,t])=>({id:e,label:e,tag:e,entries:t}));return n&&r.push({id:sx,label:`No tag`,entries:n}),r}function ux(e){let t=e=>e.split(`/`).filter(Boolean),n=e.filter(e=>!e.webhook).map(e=>t(e.path)),r=0;for(;n.length>1;r++){let e=n[0]?.[r];if(e===void 0||e.startsWith(`{`)||!n.every(t=>t[r]===e&&t.length>r+1))break}let i=new Map;for(let n of e){let e=t(n.path).slice(r),a=n.webhook?cx:e.find(e=>!e.startsWith(`{`))??`/`,o=i.get(a);o?o.entries.push(n):i.set(a,{id:a,label:a===cx?`Webhooks`:a,entries:[n]})}return[...i.values()]}function dx(e){let[t,n,...r]=e;return n===void 0?String(t):r.length===0?`${t} and ${n}`:`${t}, ${n} and ${gr(r.length,`other tag`)}`}function fx({entries:e,selection:t,onChange:n,view:r,onViewChange:i,mainSource:a,readOnly:o=!1,className:s}){let c=o?()=>{}:n,[l,u]=(0,x.useState)(``),[d,f]=(0,x.useState)(new Set),p=e.filter(e=>e.tags.length>0).length/(e.length||1)>=.5?`tag`:`path`,m=(0,x.useRef)(null),h=(0,x.useRef)(null);(0,x.useEffect)(()=>{let e=e=>{e.key!==`/`||_r(e.target)||e.metaKey||e.ctrlKey||(e.preventDefault(),m.current?.focus())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]);let g=(0,x.useMemo)(()=>Hr({entries:e,tags:[],totalOperations:e.length},t),[e,t]),_=(0,x.useMemo)(()=>p===`tag`?lx(e):ux(e),[e,p]),v=l.trim().toLowerCase(),y=e=>r===`served`&&!g.has(e.key)||r===`hidden`&&g.has(e.key)?!1:v===``||e.path.toLowerCase().includes(v)||e.method.toLowerCase()===v||(e.summary?.toLowerCase().includes(v)??!1)||(e.operationId?.toLowerCase().includes(v)??!1)||(e.source?.toLowerCase().includes(v)??!1)||e.tags.some(e=>e.toLowerCase().includes(v)),b=_.map(e=>({group:e,shown:e.entries.filter(y)})).filter(({shown:e})=>e.length>0),S=new Set(b.flatMap(({shown:e})=>e.map(e=>e.key))),C=oi(t),w=C===`hidden`,T=w?(t.include?.tags??[]).filter(e=>si(t,e)===`served`):t.exclude?.tags??[],E=e.filter(e=>g.has(e.key)).length,D=(n,r)=>c(r?ui(e,t,n):di(e,t,n)),O=n=>{let r=n.entries.every(e=>g.has(e.key));c(n.tag?li(e,t,n.tag,!r):ci(e,t,n.entries.map(e=>e.key),!r))},k=()=>{let n=E<e.length,r=t;for(let t of lx(e))r=t.tag?li(e,r,t.tag,n):ci(e,r,t.entries.map(e=>e.key),n);c(r)},A=n=>c(ci(e,t,[n.key],!g.has(n.key)));return(0,K.jsxs)(`div`,{className:Y(`flex min-h-0 min-w-0 flex-col`,s),children:[(0,K.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2.5 border-b px-5 py-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,K.jsx)(je,{className:`pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-faint`}),(0,K.jsx)(`input`,{ref:m,type:`search`,value:l,onChange:e=>u(e.target.value),onKeyDown:e=>{e.key===`Escape`?(u(``),e.currentTarget.blur()):e.key===`ArrowDown`&&(e.preventDefault(),h.current?.querySelector(`[data-slot="checkbox"]`)?.focus())},placeholder:`Filter operations`,"aria-label":`Filter operations`,className:`h-8 w-full rounded-lg border border-input bg-transparent pr-8 pl-8 text-sm outline-none placeholder:text-faint focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 dark:bg-input/30`}),l===``?(0,K.jsx)(ax,{className:`absolute top-1/2 right-2 -translate-y-1/2`,children:`/`}):(0,K.jsx)(`button`,{type:`button`,onClick:()=>{u(``),m.current?.focus()},className:`absolute top-1/2 right-2 -translate-y-1/2 rounded text-faint hover:text-foreground`,"aria-label":`Clear filter`,children:(0,K.jsx)(Ue,{className:`size-4`})})]}),(0,K.jsx)(ox,{"aria-label":`Show`,value:r,onValueChange:i,options:[{value:`all`,label:`All`},{value:`served`,label:`Served`},{value:`hidden`,label:`Hidden`}]})]}),v!==``&&S.size>0&&o&&(0,K.jsx)(`span`,{className:`text-[13px] text-muted-foreground`,"aria-live":`polite`,children:gr(S.size,`match`,`matches`)}),v!==``&&S.size>0&&!o&&(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:`flex-1 text-[13px] text-muted-foreground`,"aria-live":`polite`,children:gr(S.size,`match`,`matches`)}),(0,K.jsx)(Sb,{variant:`outline`,size:`sm`,onClick:()=>c(ci(e,t,S,!0)),children:`Serve all`}),(0,K.jsx)(Sb,{variant:`outline`,size:`sm`,onClick:()=>c(ci(e,t,S,!1)),children:`Hide all`})]})]}),(0,K.jsxs)(`div`,{ref:h,onKeyDown:e=>{if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;let t=[...h.current?.querySelectorAll(`[data-slot="checkbox"]`)??[]],n=t[t.indexOf(document.activeElement)+(e.key===`ArrowDown`?1:-1)];n&&(e.preventDefault(),n.focus())},className:`scroll-quiet min-h-0 flex-1 overflow-y-auto overscroll-contain px-3 pb-3`,children:[e.length>0&&v===``&&r===`all`&&(0,K.jsxs)(`div`,{className:`flex h-10 items-center gap-2.5 border-b px-2`,children:[(0,K.jsx)(ix,{readOnly:o,checked:E===e.length,indeterminate:E>0&&E<e.length,onCheckedChange:k,"aria-label":`Serve all operations`}),(0,K.jsxs)(`span`,{className:`text-[13px] text-muted-foreground`,children:[`All operations`,(0,K.jsxs)(`span`,{className:`ml-1.5 text-[12px] tabular-nums text-faint`,children:[E,` of `,e.length]})]})]}),b.length===0&&(0,K.jsx)(`p`,{className:`px-2 py-12 text-center text-[13px] text-muted-foreground`,children:e.length===0?`This document defines no operations.`:v===``?`Nothing to show here.`:`No operation matches the filter.`}),b.map(({group:e,shown:n})=>{let i=e.entries.filter(e=>g.has(e.key)).length,s=i===e.entries.length,c=e.tag!==void 0&&si(t,e.tag)===(w?`served`:`hidden`),l=w?i>0:i===0,u=d.has(e.id)&&v===``&&r===`all`;return(0,K.jsxs)(`section`,{children:[(0,K.jsxs)(`div`,{className:`group/header sticky top-0 z-10 flex h-10 items-center gap-2.5 bg-background px-2`,children:[(0,K.jsx)(ix,{readOnly:o,checked:s,indeterminate:!s&&i>0,onCheckedChange:()=>O(e),"aria-label":`${e.label}: serve all operations`}),(0,K.jsxs)(`button`,{type:`button`,onClick:()=>{let t=new Set(d);t.has(e.id)?t.delete(e.id):t.add(e.id),f(t)},"aria-expanded":!u,className:`flex min-w-0 flex-1 items-center gap-1.5 rounded text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50`,children:[(0,K.jsx)(`span`,{className:`truncate text-[13px] font-semibold`,children:e.label}),(0,K.jsxs)(`span`,{className:`text-[12px] tabular-nums text-faint`,children:[i,` of `,e.entries.length]}),(0,K.jsx)(F,{className:Y(`size-3.5 shrink-0 text-faint transition-transform`,!u&&`rotate-90`)})]}),e.tag&&(c||l)&&(0,K.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5 text-[12px] text-muted-foreground`,title:`When the source adds an operation to ${e.label}, ${w?`serve`:`hide`} it as well.`,children:[(0,K.jsx)(ix,{readOnly:o,checked:c,onCheckedChange:()=>D(e.tag,!c),"aria-label":`${e.label}: ${w?`serve`:`hide`} operations added later`}),(0,K.jsxs)(`span`,{"aria-hidden":`true`,className:`cursor-default`,onClick:()=>D(e.tag,!c),children:[w?`Serve`:`Hide`,` operations added later`]})]})]}),!u&&(0,K.jsx)(`ul`,{children:n.map(e=>{let t=g.has(e.key);return(0,K.jsx)(`li`,{children:(0,K.jsxs)(`div`,{onClick:()=>A(e),title:[e.deprecated?`Deprecated.`:``,e.summary??``].filter(Boolean).join(` `),className:`flex h-8 cursor-default items-center gap-2.5 rounded-md px-2 hover:bg-muted/60`,children:[(0,K.jsx)(ix,{readOnly:o,checked:t,onCheckedChange:()=>A(e),onClick:e=>e.stopPropagation(),"aria-label":e.key}),(0,K.jsx)(Tb,{method:e.method,className:Y(!t&&`opacity-55`)}),(0,K.jsx)(Eb,{path:e.path,webhook:e.webhook,className:Y(`flex-1 text-[13.5px]`,!t&&`text-muted-foreground`,e.deprecated&&`line-through decoration-faint`)}),e.webhook&&(0,K.jsx)(`span`,{className:`text-[12px] text-muted-foreground`,children:`webhook`}),e.source&&e.source!==a&&(0,K.jsx)(`span`,{className:`shrink-0 text-[12px] text-faint`,children:e.source})]})},e.key)})})]},e.id)})]}),(0,K.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-1.5 border-t px-5 py-2.5`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsxs)(`span`,{className:`flex h-8 items-center text-[13px] text-muted-foreground`,children:[`Operations your API adds later are`,o?` ${C}.`:``]}),!o&&(0,K.jsx)(ox,{"aria-label":`Operations your API adds later are`,value:C,onValueChange:n=>c(fi(e,t,n)),options:[{value:`hidden`,label:`Hidden`},{value:`served`,label:`Served`}]})]}),(0,K.jsx)(`p`,{className:`text-[12.5px] leading-[18px] text-faint`,children:T.length>0?`Except in ${dx(T)}, where they are ${w?`served`:`hidden`}.`:`In every tag.`})]})]})}var px=x.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFilled:y,validationMode:b,validation:S}=Rb(),{clearErrors:C,elementRef:w,submitCountRef:T}=Wb(),E=h||s,D=m??a,O={...p,disabled:E},{labelId:k}=Kb(),A=Xb({id:i}),j=o!==void 0,M=o==null?void 0:String(o),N=Z(()=>S.inputRef.current?.value);Bb(S.inputRef,A,M,N,!E,a),Q(()=>{let e=M??S.inputRef.current?.value;e!==void 0&&y(e!==``)},[M,l,S.inputRef,y]),Dy(M,()=>{M!==void 0&&(C(D),_(M!==(v.initialValue??``)),S.change(M))});let P=x.useRef(null),F=zb(E,P),I=ep();return wu(`input`,e,{ref:[t,P],state:O,props:[{id:A,disabled:E,name:D,ref:S.inputRef,"aria-labelledby":k,autoFocus:u,...j?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=Ff(Qu,e.nativeEvent);c?.(t,n),j||(_(t!==(v.initialValue??``)),y(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(C(D),S.change(t)))},onFocus(){F(!0)},onBlur(e){if(g(!0),F(!1),b===`onBlur`){let t=e.currentTarget.value;S.commit(t),j&&queueMicrotask(()=>{let e=S.inputRef.current?.value;e!==void 0&&e!==t&&e!==(v.initialValue??``)&&S.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===w.current&&!e.defaultPrevented){let t=e.currentTarget,n=T.current;I.start(0,()=>{T.current===n&&S.commit(t.value)})}else S.commit(t)}}},f,e=>S.getValidationProps(E,e)],stateAttributesMapping:Mb})}),mx=x.forwardRef(function(e,t){return(0,K.jsx)(px,{ref:t,...e})});function hx({className:e,type:t,...n}){return(0,K.jsx)(mx,{type:t,"data-slot":`input`,className:Y(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}var gx=x.createContext(void 0);function _x(e){let t=x.useContext(gx);if(!e&&t===void 0)throw Error(Vl(27));return t}var vx=x.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=_x(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return wu(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:Yu,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),yx=x.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=_x(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=tf({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,Ff(id,e.nativeEvent))}return wu(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),bx=x.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=_x(),c=jf(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),wu(`p`,e,{ref:t,props:[{id:c},o]})}),xx=x.createContext(void 0);function Sx(){let e=x.useContext(xx);if(e===void 0)throw Error(Vl(26));return e}var Cx=`--nested-dialogs`,wx=`data-nested-dialog-open`,Tx={...Ju,...Fu,nestedDialogOpen(e){return e?{[wx]:``}:null}},Ex=x.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=_x(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);Sx(),Jf({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?Wh(c.context.popupRef):o,w=g>0,T=c.useStateSetter(`popupElement`),E=wu(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...Uh,hidden:!m,onKeyDown(e){dv.has(e.key)&&e.stopPropagation()},style:{[Cx]:g}},s],ref:[t,c.context.popupRef,T],stateAttributesMapping:Tx});return(0,K.jsx)(Nh,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:E})}),Dx=x.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=_x(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,K.jsx)(xx.Provider,{value:n,children:(0,K.jsxs)(hh,{ref:t,...r,children:[a&&o===!0&&(0,K.jsx)(Qv,{ref:i.context.internalBackdropRef,inert:Tv(!s)}),e.children]})}):null});function Ox({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`mounted`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=x.useState(0),[d,f]=x.useState(0),p=l===0,m=Bh(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=lp(t);if(p&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||$(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return dy(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{(e.select(`open`)||e.select(`mounted`))&&(u(t),f(n))}),Q(()=>{!r&&!i&&(u(0),f(0))},[r,i]),Q(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),tg(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var kx={...Mg,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},Ax=class extends Cg{constructor(e,t,n){let r=new rg,i=jx(e,r,t,n);super(i,Mx(r),kx)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled||(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(Yh(this.state,e,t.trigger)))}};function jx(e,t,n,r=!1){return{...Eg(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Mx(e){return{popupRef:x.createRef(),backdropRef:x.createRef(),internalBackdropRef:x.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Nx(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=_x(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=Gh((e,t)=>new Ax({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let S=b.useState(`open`),C=b.useState(`mounted`),w=b.useState(`payload`);ng(b,S),$h(b);let{forceUnmount:T}=eg(S,b);x.useImperativeHandle(l,()=>({unmount:T,close:()=>b.setOpen(!1,Ff(pd))}),[T,b]);let E=S||C||u!=null;return(0,K.jsxs)(gx.Provider,{value:b,children:[u&&(0,K.jsx)(Kh,{handle:u,store:b}),E&&(0,K.jsx)(Ox,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:w}):n]})}var Px=fg(function(e){return Nx(`dialog`,e)}),Fx=x.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=_x(),c=jf(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),wu(`h2`,e,{ref:t,props:[{id:c},o]})});function Ix({...e}){return(0,K.jsx)(Px,{"data-slot":`sheet`,...e})}function Lx({...e}){return(0,K.jsx)(Dx,{"data-slot":`sheet-portal`,...e})}function Rx({className:e,...t}){return(0,K.jsx)(vx,{"data-slot":`sheet-overlay`,className:Y(`fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs`,e),...t})}function zx({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,K.jsxs)(Lx,{children:[(0,K.jsx)(Rx,{}),(0,K.jsxs)(Ex,{"data-slot":`sheet-content`,"data-side":n,className:Y(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,e),...i,children:[t,r&&(0,K.jsxs)(yx,{"data-slot":`sheet-close`,render:(0,K.jsx)(Sb,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`}),children:[(0,K.jsx)(Ue,{}),(0,K.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Bx({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`sheet-header`,className:Y(`flex flex-col gap-0.5 p-4`,e),...t})}function Vx({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`sheet-footer`,className:Y(`mt-auto flex flex-col gap-2 p-4`,e),...t})}function Hx({className:e,...t}){return(0,K.jsx)(Fx,{"data-slot":`sheet-title`,className:Y(`text-base font-medium text-foreground`,e),...t})}function Ux({className:e,...t}){return(0,K.jsx)(bx,{"data-slot":`sheet-description`,className:Y(`text-sm text-muted-foreground`,e),...t})}function Wx(e){let t=X(e?.info)?e.info:{},n=(Array.isArray(e?.servers)?e.servers:[]).flatMap(e=>X(e)&&typeof e.url==`string`?[{url:e.url,...typeof e.description==`string`?{description:e.description}:{}}]:[]);return{title:typeof t.title==`string`?t.title:``,description:typeof t.description==`string`?t.description:``,servers:n}}function Gx(e){return e?Object.keys(e).length:0}function Kx({doc:e,mainSource:t,value:n,inherited:r,scope:i=`variant`,readOnly:a=!1,onChange:o,onClose:s}){let c=Wx(e),l={title:r?.title??c.title,description:r?.description??c.description,servers:r?.servers??c.servers},u=r!==void 0&&Object.keys(r).length>0,d=r?.servers?`the project says`:`in the document`,[f,p]=(0,x.useState)(n?.title??``),[m,h]=(0,x.useState)(n?.description??``),[g,_]=(0,x.useState)(n?.servers??[]),[v,y]=(0,x.useState)(!1),b=Jr({title:f,description:m,servers:g.filter(e=>e.url.trim()!==``)}),S=b&&`problem`in b?b.problem:void 0,C=(e,t)=>_(n=>n.map((n,r)=>r===e?{...n,...t}:n));return(0,K.jsx)(Ix,{open:!0,onOpenChange:e=>!e&&s(),children:(0,K.jsxs)(zx,{className:`w-full gap-0 data-[side=right]:sm:max-w-lg`,children:[(0,K.jsxs)(Bx,{className:`border-b pr-12`,children:[(0,K.jsx)(Hx,{children:`Title and servers`}),(0,K.jsxs)(Ux,{className:`text-[13px]`,children:[i===`project`?`What readers of every variant see at the top, unless a variant says something else.`:`What readers of this variant see at the top.`,` `,i===`project`&&!a&&`Saved at once, for every variant that does not set its own. `,`An empty field uses what`,` `,u?`the project says, and then what ${t} says`:`${t} says`,`. `,(0,K.jsx)(Nt,{slug:`several-documents#environments`,children:`Environments`})]})]}),(0,K.jsxs)(`form`,{className:`flex min-h-0 flex-1 flex-col`,onSubmit:e=>{if(e.preventDefault(),a||v||S||b&&`problem`in b)return;let t=o(b);if(!(t instanceof Promise))return s();y(!0),t.then(s,()=>y(!1))},children:[(0,K.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto p-4`,children:[(0,K.jsx)(br,{label:`Title`,htmlFor:`override-title`,children:(0,K.jsx)(hx,{id:`override-title`,value:f,onChange:e=>p(e.target.value),placeholder:l.title,maxLength:200,readOnly:a})}),(0,K.jsx)(br,{label:`Description`,htmlFor:`override-description`,children:(0,K.jsx)(`textarea`,{id:`override-description`,value:m,onChange:e=>h(e.target.value),placeholder:l.description.slice(0,300),rows:4,maxLength:5e3,readOnly:a,className:`w-full rounded-lg border border-input bg-background px-2.5 py-2 text-sm outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`})}),(0,K.jsx)(br,{label:`Servers`,error:S,hint:g.length>0?`Where the API is reached. Tools use the first unless someone picks another.`:void 0,children:(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[g.length===0&&(0,K.jsx)(`p`,{className:`text-[13px] leading-5 text-muted-foreground`,children:l.servers.length>0?`As ${d}: ${l.servers.map(e=>e.url).join(`, `)}`:`The document lists none.`}),g.map((e,t)=>(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(hx,{"aria-label":`Server ${t+1} URL`,value:e.url,onChange:e=>C(t,{url:e.target.value}),placeholder:`https://staging.example.com`,className:`min-w-0 flex-[2] text-[13px] md:text-[13px]`,spellCheck:!1,autoComplete:`off`,readOnly:a}),(0,K.jsx)(hx,{"aria-label":`Server ${t+1} description`,value:e.description??``,onChange:e=>C(t,{description:e.target.value}),placeholder:t===0?`Staging`:`Production`,className:`min-w-0 flex-1`,maxLength:200,readOnly:a}),!a&&(0,K.jsx)(Sb,{variant:`ghost`,size:`icon-sm`,"aria-label":`Remove server ${t+1}`,onClick:()=>_(e=>e.filter((e,n)=>n!==t)),children:(0,K.jsx)(Ue,{})})]},t)),(0,K.jsxs)(`div`,{className:a?`hidden`:`flex flex-wrap gap-2`,children:[(0,K.jsxs)(Sb,{variant:`outline`,size:`sm`,onClick:()=>_(e=>e.length===0&&l.servers.length>0?l.servers:[...e,{url:``}]),children:[(0,K.jsx)(Te,{}),g.length===0&&l.servers.length>0?`Change the servers`:`Add server`]}),g.length>0&&(0,K.jsx)(Sb,{variant:`ghost`,size:`sm`,onClick:()=>_([]),children:r?.servers?`Use the project's`:`Use the document's`})]})]})})]}),(0,K.jsx)(Vx,{className:`flex-row items-center border-t`,children:a?(0,K.jsx)(Sb,{onClick:s,children:`Close`}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Sb,{type:`submit`,disabled:!!S,loading:v,children:i===`project`?`Save`:`Done`}),(0,K.jsx)(Sb,{variant:`ghost`,onClick:s,children:`Cancel`})]})})]})]})})}var qx=/("(?:\\.|[^"\\])*")(\s*:)?|\b(?:true|false|null)\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|[{}[\],]/g;function Jx(e){let t=[],n=0;for(let r of e.matchAll(qx)){let i=r.index;i>n&&t.push([`plain`,e.slice(n,i)]);let[a,o,s]=r;o===void 0?/^[{}[\],]$/.test(a)?t.push([`punctuation`,a]):t.push([`number`,a]):(t.push([s?`key`:`string`,o]),s&&t.push([`punctuation`,s])),n=i+a.length}return n<e.length&&t.push([`plain`,e.slice(n)]),t}var Yx=/^(\s*(?:- )*)([^\s#'"][^:#]*|'[^']*'|"[^"]*")(:)(\s|$)(.*)$/;function Xx(e){return e===``?[]:/^(?:-?\d+(?:\.\d+)?|true|false|null|~)$/.test(e)?[[`number`,e]]:/^[|>][+-]?$|^[[\]{}]+$/.test(e)?[[`punctuation`,e]]:[[`string`,e]]}function Zx(e){let t=Yx.exec(e);if(t){let[,e=``,n=``,r=``,i=``,a=``]=t;return[[`punctuation`,e],[`key`,n],[`punctuation`,r+i],...Xx(a)]}let n=/^(\s*- )(.*)$/.exec(e);return n?[[`punctuation`,n[1]??``],...Xx(n[2]??``)]:[[`string`,e]]}function Qx(e,t){return t===`json`?Jx(e):Zx(e)}function $x({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`skeleton`,className:Y(`animate-pulse rounded-md bg-muted`,e),...t})}var eS=x.createContext(void 0);function tS(e){let t=x.useContext(eS);if(t===void 0&&!e)throw Error(Vl(72));return t}var nS={...Mg,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},rS=class extends Cg{constructor(e,t,n){let r=new rg;super(iS(e,r,t,n),aS(r),nS)}setOpen=(e,t)=>{Zh(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Ff($u,e))}};function iS(e,t,n,r=!1){return{...Eg(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function aS(e){return{popupRef:x.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var oS=fg(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=Gh((e,t)=>new rS({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),$h(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=eg(h,p),S=p.useState(`isInstantPhase`),C=p.useState(`instantType`),w=p.useState(`lastOpenChangeReason`),T=x.useRef(null);Q(()=>{m&&t&&p.setOpen(!1,Ff(fd))},[m,t,p]),Q(()=>{b===`ending`&&w===`none`||b!==`ending`&&S?(C!==`delay`&&(T.current=C),p.set(`instantType`,`delay`)):T.current!==null&&(p.set(`instantType`,T.current),T.current=null)},[b,S,w,C,p]),Q(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),x.useImperativeHandle(o,()=>({unmount:y,close:()=>p.setOpen(!1,Ff(pd))}),[y,p]);let E=h||_||!t&&a!==`none`;return(0,K.jsxs)(eS.Provider,{value:p,children:[l&&(0,K.jsx)(Kh,{handle:l,store:p}),E&&(0,K.jsx)(sS,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function sS({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=Bh(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=Lh(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=x.useMemo(()=>du(a.reference,i.reference),[a.reference,i.reference]);return tg(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??ou}),null}var cS=x.createContext(void 0);function lS(){return x.useContext(cS)}var uS=`data-base-ui-tooltip-trigger`;function dS(e){let t=lp(e);return Td(t)?t:null}var fS=pg(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=tS(!0),m=Ng(a)??p;if(!m)throw Error(Vl(82));let h=jf(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=x.useRef(null),b=u??0,{registerTrigger:S,isMountedByThisTrigger:C}=Qh(h,y,m,{payload:o,closeOnClick:l,closeDelay:b}),w=lS(),{activeIdRef:T,delayRef:E,isInstantPhase:D,hasProvider:O}=Mp(v,{open:_}),k=Bg(v);m.useSyncedValue(`isInstantPhase`,D);let A=m.useState(`disabled`),j=s??A,M=Fp(j),N=m.useState(`trackCursorAxis`),P=m.useState(`disableHoverablePopup`),F=x.useRef(!1),I=ep(),L=x.useRef(void 0);function R(){return O&&T.current!=null?0:c??w??600}function z(e){let t=y.current;if(!t||!e)return!1;let n=cp(e,`[${uS}]`);return n!==null&&n!==t&&$(t,n)}function ee(e){let t=z(e);return F.current=t,t&&(k.openChangeTimeout.clear(),k.restTimeout.clear(),k.restTimeoutPending=!1,I.clear()),t}let B=Ug(v,{enabled:!j,mouseOnly:!0,move:!1,handleClose:!P&&N!==`both`?a_():null,restMs:R,delay(){return u==null&&O?{close:Ep(E.current,`close`)}:{close:b}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!F.current}}),V=Fg(v,{enabled:!j}).reference,te=e=>{let t=F.current,n=dS(e),r=ee(n),i=y.current,a=i&&n&&$(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`)m.setOpen(!1,Ff(ed,e));else if(t&&!r&&a&&!M.current&&!m.select(`open`)&&i&&ap(L.current)){let t=()=>{F.current||M.current||m.select(`open`)||m.setOpen(!0,Ff(ed,e,i))},n=R();n===0?(I.clear(),t()):I.start(n,t)}},ne=m.useState(`appliedTriggerProps`,C||N!==`none`);return wu(`button`,e,{state:{open:_},ref:[t,S,y],props:[B,V,ne,{onMouseOver(e){te(e.nativeEvent)},onFocus(e){z(dS(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){F.current=!1,I.clear(),L.current=void 0},onPointerEnter(e){L.current=e.pointerType},onPointerDown(e){L.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[gp]:j?``:void 0,[uS]:j?void 0:``},f],stateAttributesMapping:Ku})}),pS=x.createContext(void 0);function mS(){let e=x.useContext(pS);if(e===void 0)throw Error(Vl(70));return e}var hS=x.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=mh({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,K.jsxs)(x.Fragment,{children:[l,c&&Qe.createPortal(n,c)]})}),gS=x.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return tS().useState(`mounted`)||n?(0,K.jsx)(pS.Provider,{value:n,children:(0,K.jsx)(hS,{ref:t,...r})}):null}),_S=x.createContext(void 0);function vS(){let e=x.useContext(_S);if(e===void 0)throw Error(Vl(71));return e}var yS=x.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=lh,style:g,..._}=e,v=tS(),y=mS(),b=v.useState(`open`),S=v.useState(`mounted`),C=v.useState(`trackCursorAxis`),w=v.useState(`disableHoverablePopup`),T=v.useState(`floatingRootContext`),E=v.useState(`instantType`),D=v.useState(`transitionStatus`),O=Hv({anchor:i,positionMethod:a,floatingRootContext:T,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`adaptiveOrigin`)}),k=ey(e,x.useMemo(()=>({open:b,side:O.side,align:O.align,anchorHidden:O.anchorHidden,instant:C===`none`?E:`tracking-cursor`}),[b,O.side,O.align,O.anchorHidden,C,E]),{styles:O.positionerStyles,transitionStatus:D,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!S,inert:!b||C===`both`||w});return(0,K.jsx)(_S.Provider,{value:O,children:k})}),bS=x.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=tS(),{side:s,align:c}=vS(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);Jf({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Vg(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return wu(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[Uh,f,fv(d),a],stateAttributesMapping:Yu})}),xS=x.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=tS(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=vS();return wu(`div`,e,{state:{open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:Ju})});function SS({...e}){return(0,K.jsx)(oS,{"data-slot":`tooltip`,...e})}function CS({...e}){return(0,K.jsx)(fS,{"data-slot":`tooltip-trigger`,...e})}function wS({className:e,side:t=`top`,sideOffset:n=4,align:r=`center`,alignOffset:i=0,children:a,...o}){return(0,K.jsx)(gS,{children:(0,K.jsx)(yS,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,K.jsxs)(bS,{"data-slot":`tooltip-content`,className:Y(`z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...o,children:[a,(0,K.jsx)(xS,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`})]})})})}var TS=400,ES={key:`text-(--code-key)`,string:`text-(--code-string)`,number:`text-(--code-number)`,punctuation:`text-(--code-punctuation)`,plain:``};function DS({source:e,sourceVersion:t,selection:n,version:r,overrides:i,onVersionChange:a,path:o,format:s,onFormatChange:c,filename:l,className:u}){let[d,f]=(0,x.useState)(TS),p=(0,x.useDeferredValue)(n),m=p!==n,h=(0,x.useMemo)(()=>{if(e)try{let t=Rl(e.doc,{selection:p,version:r,overrides:i}),n=il(t.doc,`json`,{minified:e.minified});return{...t,bytes:hr(n)}}catch(e){return{failure:e instanceof Or?e.message:`This selection could not be put together.`}}},[e,p,r,i]),g=(0,x.useMemo)(()=>!h||`failure`in h||!e?``:il(h.doc,s),[h,e,s]),_=(0,x.useMemo)(()=>g.split(`
|
|
119
|
+
`),[g]);if(e===null)return(0,K.jsx)(`div`,{className:Y(`flex flex-col justify-center p-5`,u),children:(0,K.jsx)(`p`,{className:`text-center text-[13px] text-muted-foreground`,children:`There is no preview: the document could not be loaded.`})});if(!e||!h)return(0,K.jsxs)(`div`,{className:Y(`flex flex-col gap-4 p-5`,u),"aria-busy":`true`,children:[(0,K.jsx)($x,{className:`h-14`}),(0,K.jsx)($x,{className:`h-64`})]});if(`failure`in h)return(0,K.jsx)(`div`,{className:Y(`p-5`,u),children:(0,K.jsxs)(xr,{tone:`bad`,children:[(0,K.jsx)(`span`,{className:`font-medium`,children:`This variant cannot be served as it is.`}),` `,h.failure]})});let{stats:v,bytes:y}=h,b={kept:v.keptComponents.schemas??0,total:v.totalComponents.schemas??0};return(0,K.jsxs)(`div`,{className:Y(`flex min-h-0 min-w-0 flex-col`,u),children:[(0,K.jsx)(`div`,{className:`flex shrink-0 flex-col gap-3 border-b px-5 py-3`,children:(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(ox,{"aria-label":`Format`,value:s,onValueChange:c,options:[{value:`json`,label:`JSON`},{value:`yaml`,label:`YAML`}]}),(0,K.jsxs)(`p`,{className:Y(`min-w-0 flex-1 truncate text-[13px] text-muted-foreground transition-opacity`,m&&`opacity-60`),title:`${mr(y)}. ${b.kept} of ${b.total} schemas come along: the ones the served operations use.`,children:[(0,K.jsx)(`span`,{className:`font-medium text-foreground tabular-nums`,"data-testid":`served-operations`,children:v.keptOperations.toLocaleString(`en-US`)}),` `,`of `,v.totalOperations.toLocaleString(`en-US`),` operations`]}),(0,K.jsx)(OS,{sourceVersion:t,version:r,onChange:a,path:o,format:s}),(0,K.jsxs)(SS,{children:[(0,K.jsx)(CS,{render:(0,K.jsx)(wb,{value:g,what:`Document copied`,size:`icon`,variant:`ghost`})}),(0,K.jsx)(wS,{children:`Copy the document`})]}),(0,K.jsxs)(SS,{children:[(0,K.jsx)(CS,{render:(0,K.jsx)(Sb,{variant:`ghost`,size:`icon`,"aria-label":`Download`,onClick:()=>{let e=new Blob([g],{type:s===`json`?`application/json`:`application/yaml`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`${l}.${s}`,n.click(),URL.revokeObjectURL(t)}}),children:(0,K.jsx)(te,{})}),(0,K.jsx)(wS,{children:`Download`})]})]})}),h.losses.length>0&&(0,K.jsxs)(`p`,{className:`shrink-0 border-b bg-subtle px-5 py-2 text-[12.5px] leading-5 text-muted-foreground`,children:[(0,K.jsxs)(`span`,{className:`font-medium text-foreground`,children:[`OpenAPI `,r,` cannot say everything.`]}),` `,`Left out: `,h.losses.map(e=>`${e.what} (${e.count})`).join(`, `),`.`]}),v.keptOperations===0&&(0,K.jsx)(`p`,{className:`shrink-0 border-b bg-subtle px-5 py-2 text-[12.5px] leading-5 text-muted-foreground`,children:`Nothing is served yet. The document is valid, and empty.`}),(0,K.jsxs)(`div`,{className:Y(`scroll-quiet min-h-0 flex-1 overflow-auto bg-subtle transition-opacity`,m&&`opacity-60`),children:[(0,K.jsx)(`pre`,{className:`min-w-max px-5 py-3 font-mono text-[12px] leading-[19px]`,"data-testid":`result-document`,children:_.slice(0,d).map((e,t)=>(0,K.jsx)(`div`,{children:Qx(e,s).map(([e,t],n)=>(0,K.jsx)(`span`,{className:ES[e],children:t},n))},t))}),_.length>d&&(0,K.jsxs)(`div`,{className:`sticky left-0 flex items-center gap-3 border-t bg-background px-5 py-2.5 text-[12.5px] text-muted-foreground`,children:[(0,K.jsxs)(`span`,{children:[d.toLocaleString(`en-US`),` of `,_.length.toLocaleString(`en-US`),` lines`]}),(0,K.jsx)(Sb,{variant:`outline`,size:`sm`,onClick:()=>f(e=>e+TS*5),children:`Show more`})]})]})]})}function OS({sourceVersion:e,version:t,onChange:n,path:r,format:i}){let a=wl.filter(t=>t!==e);if(!wl.some(t=>t===e))return(0,K.jsxs)(`span`,{className:`text-[13px] text-muted-foreground`,children:[`OpenAPI `,e]});let o=(e,t)=>(0,K.jsx)(rb,{value:e??``,closeOnClick:!0,children:(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,K.jsx)(`span`,{children:t}),r&&(0,K.jsxs)(`span`,{className:`truncate text-[12.5px] leading-[18px] text-muted-foreground`,children:[r,lb(e,i)]})]})},e??`own`);return(0,K.jsxs)(Qy,{children:[(0,K.jsxs)($y,{render:(0,K.jsx)(Sb,{variant:`ghost`,size:`sm`,"aria-label":`OpenAPI version`}),children:[`OpenAPI `,t??e,(0,K.jsx)(N,{})]}),(0,K.jsx)(eb,{align:`end`,className:`w-80`,children:(0,K.jsxs)(nb,{value:t??``,onValueChange:e=>n(e===``?null:e),children:[o(null,`${e}, as your API has it`),a.map(e=>o(e,`${e}, converted`))]})})]})}function kS(){let e=``;for(let t of crypto.getRandomValues(new Uint8Array(16)))e+=`abcdefghijklmnopqrstuvwxyz0123456789`[t%36];return e}var AS={taken:`Already in use.`,invalid:`2 to 64 characters: a-z, 0-9 and hyphens, not at the ends.`};function jS({prefix:e,value:t,onChange:n,status:r,label:i,allowRandom:a=!1,className:o,id:s}){let c=r===`taken`||r===`invalid`;return(0,K.jsxs)(`div`,{className:Y(`flex h-8 min-w-0 items-center rounded-lg border border-input text-[13px] transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 dark:bg-input/30`,c&&`border-destructive focus-within:border-destructive focus-within:ring-destructive/20`,o),children:[(0,K.jsx)(`span`,{className:`max-w-[60%] shrink truncate pl-2.5 text-faint`,dir:`rtl`,title:e,children:(0,K.jsx)(`bdi`,{children:e})}),(0,K.jsx)(`input`,{id:s,value:t,onChange:e=>n(e.target.value.toLowerCase().replace(/[^a-z0-9-]+/g,`-`).slice(0,64)),placeholder:`docs`,spellCheck:!1,autoComplete:`off`,"aria-label":i,"aria-invalid":c,className:`h-full min-w-16 flex-1 bg-transparent pr-1 outline-none placeholder:text-faint`}),(0,K.jsxs)(`span`,{className:`flex w-6 shrink-0 justify-center`,"aria-hidden":`true`,children:[r===`available`&&(0,K.jsx)(j,{className:`size-3.5 text-ok-foreground`}),r===`checking`&&(0,K.jsx)(he,{className:`size-3.5 animate-spin text-faint`})]}),a&&(0,K.jsx)(`button`,{type:`button`,onClick:()=>n(kS()),title:`Use a random, unguessable slug`,"aria-label":`Use a random, unguessable slug`,className:`flex h-full shrink-0 items-center border-l px-2 text-muted-foreground outline-none hover:text-foreground focus-visible:text-foreground`,children:(0,K.jsx)(B,{className:`size-4`})})]})}var MS=bb(`inline-flex h-[18px] shrink-0 items-center rounded-[5px] px-1.5 text-[11.5px] leading-none font-medium whitespace-nowrap ring-1 ring-inset`,{variants:{tone:{neutral:`bg-muted/70 text-foreground/70 ring-border`,ok:`bg-ok text-ok-foreground ring-ok-edge/20`,warn:`bg-warn text-warn-foreground ring-warn-edge/25`,bad:`bg-bad text-bad-foreground ring-bad-edge/20`,accent:`bg-primary/8 text-primary ring-primary/20 dark:bg-primary/15`}},defaultVariants:{tone:`neutral`}});function NS({tone:e,className:t,...n}){return(0,K.jsx)(`span`,{"data-slot":`status-chip`,className:Y(MS({tone:e}),t),...n})}var PS={public:{label:`Public`,means:`Anyone with the URL can read it.`},private:{label:`Private`,means:`Readers send a user API key.`}},FS=`inherit`;function IS({stated:e,inherited:t,onChange:n,disabled:r}){let i=e??t.value,a=i===`private`?_e:i===`public`?le:Ve,o=t.from===`project`?`the project`:`the workspace`,s=i?PS[i].label:`Workspace default`,c=e===void 0&&i!==null;return(0,K.jsxs)(Qy,{children:[(0,K.jsxs)($y,{render:(0,K.jsx)(Sb,{variant:`outline`,"aria-label":`Who can read it: ${s}${c?` by default`:``}`,disabled:r}),children:[(0,K.jsx)(a,{}),s,c&&(0,K.jsx)(`span`,{className:`font-normal text-muted-foreground`,children:`by default`}),(0,K.jsx)(N,{className:`text-muted-foreground`})]}),(0,K.jsx)(eb,{align:`start`,className:`w-72`,children:(0,K.jsxs)(nb,{value:e??FS,onValueChange:e=>n(e===FS?void 0:e),children:[[`public`,`private`].map(e=>(0,K.jsx)(rb,{value:e,closeOnClick:!0,children:(0,K.jsxs)(`span`,{className:`flex flex-col`,children:[(0,K.jsx)(`span`,{children:PS[e].label}),(0,K.jsx)(`span`,{className:`text-[12.5px] leading-[18px] text-muted-foreground`,children:PS[e].means})]})},e)),(0,K.jsx)(ib,{}),(0,K.jsx)(rb,{value:FS,closeOnClick:!0,children:(0,K.jsxs)(`span`,{className:`flex flex-col`,children:[(0,K.jsx)(`span`,{children:`Default`}),(0,K.jsx)(`span`,{className:`text-[12.5px] leading-[18px] text-muted-foreground`,children:t.value?`As ${o} says, which is ${t.value} at the moment.`:`As the workspace it is deployed to says.`})]})})]})})]})}function LS(e){return Nx(`alert-dialog`,e)}function RS({...e}){return(0,K.jsx)(LS,{"data-slot":`alert-dialog`,...e})}function zS({...e}){return(0,K.jsx)(Dx,{"data-slot":`alert-dialog-portal`,...e})}function BS({className:e,...t}){return(0,K.jsx)(vx,{"data-slot":`alert-dialog-overlay`,className:Y(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function VS({className:e,size:t=`default`,...n}){return(0,K.jsxs)(zS,{children:[(0,K.jsx)(BS,{}),(0,K.jsx)(Ex,{"data-slot":`alert-dialog-content`,"data-size":t,className:Y(`group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...n})]})}function HS({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:Y(`grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,e),...t})}function US({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:Y(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,e),...t})}function WS({className:e,...t}){return(0,K.jsx)(Fx,{"data-slot":`alert-dialog-title`,className:Y(`text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,e),...t})}function GS({className:e,...t}){return(0,K.jsx)(bx,{"data-slot":`alert-dialog-description`,className:Y(`text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function KS({className:e,...t}){return(0,K.jsx)(Sb,{"data-slot":`alert-dialog-action`,className:Y(e),...t})}function qS({className:e,variant:t=`outline`,size:n=`default`,...r}){return(0,K.jsx)(yx,{"data-slot":`alert-dialog-cancel`,className:Y(e),render:(0,K.jsx)(Sb,{variant:t,size:n}),...r})}function JS({...e}){return(0,K.jsx)(Px,{"data-slot":`dialog`,...e})}function YS({...e}){return(0,K.jsx)(Dx,{"data-slot":`dialog-portal`,...e})}function XS({...e}){return(0,K.jsx)(yx,{"data-slot":`dialog-close`,...e})}function ZS({className:e,...t}){return(0,K.jsx)(vx,{"data-slot":`dialog-overlay`,className:Y(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function QS({className:e,children:t,showCloseButton:n=!0,...r}){return(0,K.jsxs)(YS,{children:[(0,K.jsx)(ZS,{}),(0,K.jsxs)(Ex,{"data-slot":`dialog-content`,className:Y(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[t,n&&(0,K.jsxs)(yx,{"data-slot":`dialog-close`,render:(0,K.jsx)(Sb,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,K.jsx)(Ue,{}),(0,K.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function $S({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`dialog-header`,className:Y(`flex flex-col gap-2`,e),...t})}function eC({className:e,showCloseButton:t=!1,children:n,...r}){return(0,K.jsxs)(`div`,{"data-slot":`dialog-footer`,className:Y(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,K.jsx)(yx,{render:(0,K.jsx)(Sb,{variant:`outline`}),children:`Close`})]})}function tC({className:e,...t}){return(0,K.jsx)(Fx,{"data-slot":`dialog-title`,className:Y(`text-base leading-none font-medium`,e),...t})}function nC({className:e,...t}){return(0,K.jsx)(bx,{"data-slot":`dialog-description`,className:Y(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}var rC={include:{}},iC=(e,t)=>JSON.stringify(ri(e))===JSON.stringify(ri(t));function aC(){return(0,K.jsxs)(`div`,{className:`flex h-full flex-col gap-4 p-5`,children:[(0,K.jsx)($x,{className:`h-9 w-72`}),(0,K.jsx)($x,{className:`h-8 w-full max-w-xl`}),(0,K.jsx)($x,{className:`min-h-0 flex-1`})]})}var oC={save:`Publish changes`,saved:`Published`,unsaved:`Unpublished changes`};function sC(e,t){let[n,r]=(0,x.useState)(!1),[i,a]=(0,x.useState)();return{start:n=>{r(!0),a(n),e(n).then(()=>{r(!1),a(void 0),t.done?.(n)},e=>{r(!1),a(void 0),t.failed(e)})},pending:n,input:i}}function cC({project:e,variant:t,template:n,justCreated:r=!1,document:i,apply:a,describeError:o,onCreated:s,onRenamed:c,onDeleted:l,onDuplicate:u,onDirtyChange:d,banner:f,onViewAsFile:p,privateAction:m,words:h=oC}){let g=e=>ht.error(o(e)),[_]=(0,x.useState)(r),v=db(e),y=e.state.can.edit,b=t??n,S={name:t?.definition.name??``,selection:t?.selection??rC,overrides:t?.definition.overrides??null},[C,w]=(0,x.useState)(S.name),[T,E]=(0,x.useState)(``),[D,O]=(0,x.useState)(!1),[k,A]=(0,x.useState)(b?.selection??rC),[j,M]=(0,x.useState)(null),[N,P]=(0,x.useState)(n?.definition.visibility),F=t?t.definition.visibility:N,I=e.definition.visibility===void 0?{value:e.state.defaultVisibility,from:`workspace`}:{value:e.definition.visibility,from:`project`},L=F??I.value,[R,z]=(0,x.useState)(b?.definition.overrides??null),[ee,B]=(0,x.useState)(b?.definition.icon??null),[V,te]=(0,x.useState)(!1),[ne,H]=(0,x.useState)(`all`),[U,ie]=(0,x.useState)(`json`),[W,G]=(0,x.useState)(!1),[ae,oe]=(0,x.useState)(!1),[se,ce]=(0,x.useState)(!1),le=t?`idle`:uC(e,T),ue=e=>JSON.stringify(R)===JSON.stringify(e),de=e=>C.trim()!==e.name||!iC(k,e.selection)||!ue(e.overrides),fe=JSON.stringify(S),[pe,me]=(0,x.useState)(fe);t&&pe!==fe&&(me(fe),y&&de(JSON.parse(pe))||(w(S.name),A(S.selection),z(S.overrides)));let he=t?y&&de(S):C.trim()!==``||!iC(k,rC)||R!==null,ge=(0,x.useEffectEvent)(e=>d?.(e));(0,x.useEffect)(()=>(ge(he),()=>ge(!1)),[he]);let _e=sC(()=>a(e=>hb(e,T,gb({name:C.trim(),...ee?{icon:ee}:{},...N?{visibility:N}:{},selection:k,...R?{overrides:R}:{}}))),{done:()=>s(T),failed:g}),ve=e=>a(n=>{let r=n.variants[t.slug]??{},{include:i,exclude:a,...o}={...r,...e(r)};return hb(n,t.slug,gb({...o,selection:{...i?{include:i}:{},...a?{exclude:a}:{}}}))}),ye=sC(()=>ve(()=>({name:C.trim()===``?void 0:C.trim(),include:k.include,exclude:k.exclude,overrides:R??void 0})),{done:()=>ht.success(h.saved),failed:g}),be=sC(e=>ve(()=>({icon:e??void 0})),{failed:g}),xe=sC(e=>ve(()=>({visibility:e})),{done:t=>{let n=t??I.value;ht.success(n===`private`?e.state.can.keys?`Private: readers need a user API key`:`Private once it is deployed`:n===`public`?`Public: anyone with the URL can read it`:`It is what the workspace says now`)},failed:g}),Se=e=>{if(!t)return P(e);e!==F&&((e??I.value)!==`public`||L===`public`||window.confirm(`Make this variant public? Anyone with its URL will be able to read it.`))&&xe.start(e)},Ce=k.include!==void 0&&!k.include.operations?.length&&!k.include.tags?.length,we=C.trim()!==``&&le===`available`,Te=_e.pending||ye.pending,Ee=()=>{!Te&&y&&(t?he&&ye.start():we?Ce?G(!0):_e.start():C.trim()===``&&window.document.getElementById(`variant-name`)?.focus())},De=(0,x.useEffectEvent)(()=>{window.document.querySelector(`[role="dialog"], [role="alertdialog"]`)||Ee()});(0,x.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&(e.key===`Enter`||e.key.toLowerCase()===`s`)&&(e.preventDefault(),De())};return window.document.addEventListener(`keydown`,e),()=>window.document.removeEventListener(`keydown`,e)},[]);let Oe=t?t.state.notFound.include.operations.filter(e=>k.include?.operations?.includes(e)):[],ke=JSON.stringify({...e.definition.overrides,...R}),Ae=(0,x.useMemo)(()=>ke===`{}`?null:JSON.parse(ke),[ke]),je=t?be.input??t.definition.icon??null:ee;return(0,K.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,K.jsxs)(`header`,{className:`shrink-0 border-b px-5 pt-4 pb-3.5`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-1 basis-full items-center gap-2.5 sm:basis-0`,children:[(0,K.jsx)(sb,{value:je,disabled:!y,onChange:e=>t?be.start(e):B(e)}),(0,K.jsx)(`input`,{id:`variant-name`,value:C,onChange:e=>{w(e.target.value),!t&&!D&&E(Ur(e.target.value))},placeholder:t?t.slug:`Name this variant`,"aria-label":`Variant name`,maxLength:100,readOnly:!y||_e.pending,autoFocus:!t,autoComplete:`off`,className:`type-title -ml-1.5 min-w-0 flex-1 truncate rounded-md bg-transparent px-1.5 outline-none placeholder:text-faint hover:bg-muted/60 focus-visible:bg-muted/60`})]}),!y&&(0,K.jsx)(NS,{tone:`neutral`,children:`Deployed from a file`}),y&&t&&he&&(0,K.jsx)(NS,{tone:`warn`,children:h.unsaved}),y&&t&&he&&(0,K.jsx)(Sb,{variant:`ghost`,onClick:()=>{w(S.name),A(S.selection),z(S.overrides)},children:`Discard`}),y&&(0,K.jsxs)(Sb,{onClick:Ee,loading:Te,disabled:t?!he:!we,children:[t?h.save:`Create variant`,(0,K.jsxs)(ax,{className:`hidden bg-primary-foreground/15 text-primary-foreground/90 sm:inline-flex`,children:[vr,`↵`]})]}),(0,K.jsxs)(Sb,{variant:`outline`,onClick:()=>te(!0),children:[`Title and servers`,Gx(R)>0&&(0,K.jsx)(`span`,{className:`rounded-full bg-primary/12 px-1.5 text-[11.5px] leading-[18px] font-medium text-primary tabular-nums`,children:Gx(R)})]}),t&&y&&(0,K.jsxs)(Qy,{children:[(0,K.jsx)($y,{render:(0,K.jsx)(Sb,{variant:`outline`,size:`icon`,"aria-label":`More actions`}),children:(0,K.jsx)(re,{})}),(0,K.jsxs)(eb,{align:`end`,className:`w-56`,children:[(0,K.jsx)(tb,{disabled:he,onClick:()=>oe(!0),children:(0,K.jsxs)(`span`,{className:`flex flex-col`,children:[(0,K.jsx)(`span`,{children:`Change URL`}),he&&(0,K.jsx)(`span`,{className:`text-[12.5px] leading-[18px] text-muted-foreground`,children:`Save or discard your changes first`})]})}),p&&(0,K.jsx)(tb,{onClick:p,children:`View as file`}),(0,K.jsx)(tb,{onClick:()=>u(t.slug),children:`Duplicate`}),(0,K.jsx)(ib,{}),(0,K.jsx)(tb,{variant:`destructive`,onClick:()=>ce(!0),children:`Delete variant`})]})]})]}),(0,K.jsx)(`div`,{className:`mt-2.5`,children:t?(0,K.jsx)(lC,{url:t.state.url,suffix:lb(j,U),format:U,onFormatChange:ie,celebrate:_,stated:F,inherited:I,onVisibilityChange:Se,busy:xe.pending||!y,withKeys:e.state.can.keys,privateAction:m?.({version:j,format:U})}):(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[(0,K.jsx)(jS,{label:`URL slug`,prefix:`${yr(e.state.urlPrefix)}${v}/`,value:T,onChange:e=>{E(e),O(!0)},status:le,allowRandom:!0,className:`w-full max-w-xl`}),(0,K.jsx)(IS,{stated:F,inherited:I,onChange:Se}),(0,K.jsx)(`span`,{className:`text-[12.5px] text-muted-foreground`,"aria-live":`polite`,children:le===`taken`||le===`invalid`?AS[le]:L===`private`?`Where this variant will be served. Readers will need a user API key.`:`Where this variant will be served, as JSON and YAML.`})]})})]}),f&&(0,K.jsx)(`div`,{className:`shrink-0 border-b bg-subtle px-5 py-3`,children:f}),Oe.length>0&&(0,K.jsx)(`div`,{className:`flex shrink-0 flex-col gap-2 border-b bg-subtle px-5 py-3`,children:(0,K.jsxs)(xr,{tone:`warn`,children:[(0,K.jsxs)(`p`,{children:[(0,K.jsx)(`span`,{className:`font-medium`,children:Oe.length===1?`A selected operation is not in the document`:`${Oe.length} selected operations are not in the document`}),`, so `,Oe.length===1?`it is`:`they are`,` left out. Once the document has`,` `,Oe.length===1?`it`:`them`,`, `,Oe.length===1?`it is`:`they are`,` `,`served.`]}),(0,K.jsx)(`ul`,{className:`mt-1.5 flex flex-col gap-1`,children:Oe.map(e=>{let[t=``,...n]=e.split(` `);return(0,K.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(Tb,{method:t}),(0,K.jsx)(Eb,{path:n.join(` `),webhook:n[0]?.startsWith(`webhook:`),className:`text-[13px]`})]},e)})})]})}),(0,K.jsxs)(`div`,{className:`grid min-h-0 flex-1 lg:grid-cols-[minmax(0,1fr)_minmax(340px,40%)]`,children:[(0,K.jsx)(fx,{className:`lg:border-r`,entries:e.state.operations,selection:k,onChange:A,readOnly:!y||_e.pending,view:ne,onViewChange:H,mainSource:mb(e)}),(0,K.jsx)(DS,{className:`hidden lg:flex`,source:i,sourceVersion:e.state.specVersion,selection:k,version:j,overrides:Ae,onVersionChange:M,path:t?new URL(t.state.url).pathname:void 0,format:U,onFormatChange:ie,filename:t?.slug??(T||`openapi`)})]}),V&&(0,K.jsx)(Kx,{doc:i?.doc,mainSource:mb(e)??`the document`,value:R,inherited:e.definition.overrides,readOnly:!y,onChange:z,onClose:()=>te(!1)}),(0,K.jsx)(RS,{open:W,onOpenChange:G,children:(0,K.jsxs)(VS,{children:[(0,K.jsxs)(HS,{children:[(0,K.jsx)(WS,{children:`Create a variant with nothing in it?`}),(0,K.jsx)(GS,{children:`No operations are served, so this URL will answer with a valid document that has no paths. You can change the selection whenever you like.`})]}),(0,K.jsxs)(US,{children:[(0,K.jsx)(qS,{children:`Back to selecting`}),(0,K.jsx)(KS,{onClick:()=>{G(!1),_e.start()},children:`Create it empty`})]})]})}),t&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(dC,{open:ae,onOpenChange:oe,project:e,variant:t,apply:a,failed:g,onChanged:c}),(0,K.jsx)(fC,{open:se,onOpenChange:ce,variant:t,apply:a,failed:g,onDeleted:()=>{ht.success(`Deleted ${t.name}`),l()}})]})]})}function lC({url:e,suffix:t,format:n,onFormatChange:r,celebrate:i,stated:a,inherited:o,onVisibilityChange:s,busy:c,withKeys:l,privateAction:u}){let d=`${e}${t}`,{origin:f,pathname:p}=new URL(e),m=(a??o.value)===`private`;return(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(`div`,{className:Y(`flex h-8 max-w-xl min-w-0 flex-1 items-center rounded-lg border bg-subtle px-2.5`,i&&`animate-arrive`),children:(0,K.jsxs)(`code`,{className:`truncate font-sans text-[13px]`,title:d,"data-testid":`variant-url`,children:[(0,K.jsx)(`span`,{className:`text-faint`,children:f}),p,(0,K.jsx)(`span`,{className:`text-faint`,children:t})]})}),(0,K.jsx)(ox,{"aria-label":`Format`,className:`lg:hidden`,value:n,onValueChange:r,options:[{value:`json`,label:`JSON`},{value:`yaml`,label:`YAML`}]}),(0,K.jsx)(wb,{value:d,label:`Copy URL`,what:`URL copied`,autoFocus:i}),(0,K.jsx)(IS,{stated:a,inherited:o,onChange:s,disabled:c}),(!m||!l)&&(0,K.jsxs)(SS,{children:[(0,K.jsx)(CS,{render:(0,K.jsx)(Sb,{variant:`outline`,size:`icon`,"aria-label":`Open in a new tab`,nativeButton:!1,render:(0,K.jsx)(`a`,{href:d,target:`_blank`,rel:`noreferrer`})}),children:(0,K.jsx)(U,{})}),(0,K.jsx)(wS,{children:`Open in a new tab`})]})]}),m&&(0,K.jsxs)(`p`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-[12.5px] leading-[18px] text-muted-foreground`,children:[l?(0,K.jsxs)(`span`,{children:[`Readers send a user API key as`,` `,(0,K.jsx)(`span`,{className:`font-medium text-foreground`,children:`Authorization: Bearer`}),`.`]}):(0,K.jsx)(`span`,{children:`Once deployed, readers send a user API key. On this machine it is served without one.`}),u,(0,K.jsx)(Nt,{slug:`private-variants`,children:`How private variants work`})]})]})}function uC(e,t,n){return t===``?`idle`:Gr(t)?t===n?`available`:Object.hasOwn(e.definition.variants,t)?`taken`:`available`:`invalid`}function dC({open:e,onOpenChange:t,project:n,variant:r,apply:i,failed:a,onChanged:o}){let[s,c]=(0,x.useState)(r.slug);(0,x.useEffect)(()=>{e&&c(r.slug)},[e,r.slug]);let l=uC(n,s,r.slug),u=sC(()=>i(e=>hb(e,s,e.variants[r.slug],r.slug)),{done:()=>{t(!1),ht.success(`URL changed`),o(s)},failed:a});return(0,K.jsx)(JS,{open:e,onOpenChange:t,children:(0,K.jsx)(QS,{className:`sm:max-w-md`,children:(0,K.jsxs)(`form`,{className:`contents`,onSubmit:e=>{e.preventDefault(),l===`available`&&s!==r.slug&&u.start()},children:[(0,K.jsxs)($S,{children:[(0,K.jsx)(tC,{children:`Change the URL`}),(0,K.jsx)(nC,{children:`Anything still requesting the old URL will get a 404, and a user API key made for this variant alone stops working. Update your consumers first, or right after.`})]}),(0,K.jsx)(br,{error:l===`taken`||l===`invalid`?AS[l]:void 0,children:(0,K.jsx)(jS,{label:`URL slug`,prefix:`${yr(n.state.urlPrefix)}${db(n)}/`,value:s,onChange:c,status:l,allowRandom:!0})}),(0,K.jsxs)(eC,{children:[(0,K.jsx)(XS,{render:(0,K.jsx)(Sb,{variant:`outline`}),children:`Cancel`}),(0,K.jsx)(Sb,{type:`submit`,disabled:l!==`available`||s===r.slug,loading:u.pending,children:`Change URL`})]})]})})})}function fC({open:e,onOpenChange:t,variant:n,apply:r,failed:i,onDeleted:a}){let o=sC(()=>r(e=>hb(e,n.slug,void 0)),{done:a,failed:i});return(0,K.jsx)(RS,{open:e,onOpenChange:t,children:(0,K.jsxs)(VS,{children:[(0,K.jsxs)(HS,{children:[(0,K.jsxs)(WS,{children:[`Delete `,n.name,`?`]}),(0,K.jsxs)(GS,{children:[(0,K.jsx)(`span`,{className:`font-medium text-foreground`,children:yr(n.state.url)}),` stops working at once. Anything still requesting it will get a 404. This cannot be undone.`]})]}),(0,K.jsxs)(US,{children:[(0,K.jsx)(qS,{children:`Cancel`}),(0,K.jsx)(KS,{variant:`destructive`,onClick:()=>o.start(),loading:o.pending,children:`Delete variant`})]})]})})}var pC=`https://openapi-proxy.app`,mC=class extends Error{code;constructor(e,t){super(e),this.code=t}};async function hC(e,t){let n;try{n=await fetch(e,t)}catch{throw new mC(`The local server is not answering. Is openapi-proxy dev still running?`,`unreachable`)}if(!n.ok){let e=await n.json().catch(()=>({}));throw new mC(e.error??`The request failed (${n.status}).`,e.code??`unknown`)}return e.endsWith(`/document`)?n.text():n.json()}function gC(e){let[t=``,n=``]=e.replace(/^#\/?/,``).split(`?`),r=new URLSearchParams(n);if(t===`new`){let e=r.get(`from`);return e?{at:`new`,from:e}:{at:`new`}}return t.startsWith(`v/`)?{at:`variant`,slug:decodeURIComponent(t.slice(2)),created:r.has(`created`)}:{at:`home`}}var _C,vC=e=>{_C=e,window.location.hash=e};function yC(e){let[t,n]=(0,x.useState)(window.location.hash),r=(0,x.useRef)(window.location.hash),i=(0,x.useEffectEvent)(e);(0,x.useEffect)(()=>{let e=()=>{let e=window.location.hash;e!==r.current&&(e!==_C&&!i()?window.location.hash=r.current:(_C=void 0,r.current=e,n(e)))};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let a=(0,x.useCallback)(e=>{window.history.replaceState(null,``,e),r.current=e,n(e)},[]);return{place:gC(t),replace:a}}var bC=`group/nav flex h-8 items-center gap-2 rounded-lg px-2 text-[13px] text-foreground/75 outline-none hover:bg-foreground/5 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50`,xC=`is-active material-solid font-medium text-primary-foreground hover:text-primary-foreground`;function SC(){let[e,t]=(0,x.useState)(),[n,r]=(0,x.useState)(),[i,a]=(0,x.useState)(),[o,s]=(0,x.useState)(!1),[c,l]=(0,x.useState)(!1),u=(0,x.useRef)(!1),d=()=>!u.current||window.confirm(`Leave without saving? What you changed is discarded.`),{place:f,replace:p}=yC(d),[m,h]=(0,x.useState)(0),g=(0,x.useRef)(void 0),_=(0,x.useRef)(0),v=(0,x.useRef)(void 0),y=(0,x.useRef)(Promise.resolve()),b=(0,x.useCallback)(async(e={})=>{s(!0),_.current+=1;let n=_.current;try{let[i]=await hC(`/api/projects`);if(!i)throw new mC(`The server has no project.`,`not-found`);if(n!==_.current)return v.current;if(e.keepDraft&&u.current&&v.current&&v.current.state.revision!==i.state.revision)return l(!0),a(void 0),v.current;if(l(!1),g.current!==i.state.documentHash){let e=await hC(`/api/projects/${i.definition.project}/document`);if(n!==_.current)return v.current;g.current=i.state.documentHash,r({hash:i.state.documentHash,doc:cb(e)})}return v.current=i,t(i),a(void 0),i}catch(e){n===_.current&&a(e instanceof Error?e.message:`Something went wrong.`);return}finally{n===_.current&&s(!1)}},[]);(0,x.useEffect)(()=>{b();let e=()=>void b({keepDraft:!0});return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},[b]),(0,x.useEffect)(()=>{let e=e=>{u.current&&e.preventDefault()};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[]);let S=e=>{let t=y.current.catch(()=>void 0).then(async()=>{let t=v.current;if(!t)throw new mC(`The file has not been read yet.`,`not-ready`);try{await hC(`/api/projects/${t.definition.project}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({definition:e(t.definition),ifRevision:t.state.revision})})}catch(e){throw e instanceof mC&&e.code===`conflict`&&l(!0),e}await b()});return y.current=t,t},C=e?pb(e):[],w=f.at===`variant`?C.find(e=>e.slug===f.slug):void 0,T=e?ub(e):`openapi-proxy`;(0,x.useEffect)(()=>{window.document.title=w?`${w.name} · ${T}`:T},[w,T]),(0,x.useEffect)(()=>{if(!e||f.at!==`home`)return;let[t]=C;p(t?`#/v/${encodeURIComponent(t.slug)}`:`#/new`)});let E=e=>{if(!(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)){if(e.currentTarget.hash===window.location.hash)return e.preventDefault();d()?_C=e.currentTarget.hash:e.preventDefault()}},D=f.at===`variant`&&f.created;(0,x.useEffect)(()=>{D&&p(window.location.hash.replace(/\?created$/,``))},[D,p]);let O=i?(0,K.jsxs)(xr,{tone:`bad`,action:(0,K.jsxs)(Sb,{variant:`outline`,onClick:()=>void b({keepDraft:!0}),loading:o,children:[!o&&(0,K.jsx)(De,{}),` Try again`]}),children:[(0,K.jsx)(`span`,{className:`font-medium`,children:`The project could not be read again.`}),` `,i,` What is on screen is from before.`]}):c?(0,K.jsxs)(xr,{tone:`warn`,action:(0,K.jsx)(Sb,{variant:`outline`,loading:o,onClick:()=>void b().then(e=>{e&&h(e=>e+1)}),children:`Read the file again`}),children:[(0,K.jsx)(`span`,{className:`font-medium`,children:`The file was changed somewhere else.`}),` What you changed here is not saved, and cannot be saved over it. Reading the file again discards what you changed here.`]}):void 0;return(0,K.jsxs)(Mt,{value:pC,children:[(0,K.jsxs)(`div`,{className:`flex h-svh overflow-hidden`,children:[(0,K.jsxs)(`aside`,{className:`hidden w-60 shrink-0 flex-col border-r border-sidebar-border bg-sidebar md:flex`,children:[(0,K.jsxs)(`div`,{className:`flex h-14 shrink-0 items-center gap-2 px-4`,children:[(0,K.jsx)(`span`,{className:`text-[15px] font-semibold tracking-tight`,children:`openapi-proxy`}),(0,K.jsx)(`span`,{className:`rounded-full bg-foreground/8 px-1.5 text-[11.5px] leading-[18px] text-muted-foreground`,children:`local`})]}),e&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`px-4`,children:[(0,K.jsx)(`p`,{className:`truncate text-[13px] font-medium`,title:T,children:T}),(0,K.jsxs)(`p`,{className:`mt-0.5 flex items-center gap-1.5 text-[12.5px] text-muted-foreground`,children:[(0,K.jsx)(W,{className:`size-3.5 shrink-0`}),(0,K.jsx)(`span`,{className:`truncate`,children:`Saves go to your definition file`})]})]}),(0,K.jsxs)(`div`,{className:`mt-5 flex h-6 items-center justify-between pr-2 pl-4`,children:[(0,K.jsx)(`h2`,{className:`text-[11.5px] font-medium text-muted-foreground`,children:`Variants`}),(0,K.jsx)(Sb,{variant:`ghost`,size:`icon-xs`,"aria-label":`New variant`,onClick:()=>{d()&&vC(`#/new`)},children:(0,K.jsx)(Te,{})})]}),(0,K.jsxs)(`nav`,{"aria-label":`Variants`,className:`scroll-quiet mt-1 flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto px-2 pb-2`,children:[C.map(e=>(0,K.jsxs)(`a`,{href:`#/v/${encodeURIComponent(e.slug)}`,onClick:E,className:Y(bC,e===w&&xC),children:[(0,K.jsx)(ob,{name:e.definition.icon??null,className:Y(`text-muted-foreground group-hover/nav:text-foreground`,`group-[.is-active]/nav:text-primary-foreground`)}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name})]},e.slug)),C.length===0&&(0,K.jsx)(`p`,{className:`px-2 py-1 text-[12.5px] leading-5 text-muted-foreground`,children:`None yet. Each variant is a selection of the document with its own URL.`})]}),(0,K.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-1.5 border-t border-sidebar-border px-4 py-3 text-[12.5px] leading-[18px] text-muted-foreground`,children:[(0,K.jsxs)(`p`,{children:[gr(e.state.operations.length,`operation`),` in`,` `,gr(e.state.sources.length,`document`),`, read each time a variant is asked for.`]}),(0,K.jsxs)(`p`,{children:[`To put it online: `,(0,K.jsx)(`span`,{className:`text-foreground`,children:`openapi-proxy deploy`}),`.`,` `,(0,K.jsx)(Nt,{slug:`in-your-repository`,children:`How`})]})]})]})]}),(0,K.jsxs)(`main`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:[e&&(0,K.jsxs)(`div`,{className:`flex h-12 shrink-0 items-center gap-2 border-b px-3 md:hidden`,children:[(0,K.jsx)(`span`,{className:`text-[13px] font-medium`,children:`Variant`}),(0,K.jsxs)(`select`,{"aria-label":`Variant`,className:`h-8 min-w-0 flex-1 rounded-lg border border-input bg-background px-2 text-[13px]`,value:w?.slug??``,onChange:e=>{d()&&vC(e.target.value===``?`#/new`:`#/v/${encodeURIComponent(e.target.value)}`)},children:[(0,K.jsx)(`option`,{value:``,children:`New variant`}),C.map(e=>(0,K.jsx)(`option`,{value:e.slug,children:e.name},e.slug))]})]}),(0,K.jsx)(`div`,{className:`min-h-0 flex-1`,children:!e&&i?(0,K.jsxs)(`div`,{className:`mx-auto flex h-full max-w-xl flex-col justify-center gap-3 px-6`,children:[(0,K.jsxs)(xr,{tone:`bad`,action:(0,K.jsxs)(Sb,{variant:`outline`,onClick:()=>void b(),loading:o,children:[!o&&(0,K.jsx)(De,{}),` Try again`]}),children:[(0,K.jsx)(`span`,{className:`font-medium`,children:`The project could not be read.`}),` `,i]}),(0,K.jsx)(`p`,{className:`text-[13px] leading-5 text-muted-foreground`,children:`The definition file and its documents are read each time. Fix what it says, and try again.`})]}):!e||f.at===`home`?(0,K.jsx)(aC,{}):f.at===`variant`&&!w?(0,K.jsxs)(`div`,{className:`flex h-full flex-col`,children:[O&&(0,K.jsx)(`div`,{className:`shrink-0 border-b bg-subtle px-5 py-3`,children:O}),(0,K.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-1 px-6 text-center`,children:[(0,K.jsxs)(`p`,{className:`type-heading`,children:[`The file has no variant `,f.slug]}),(0,K.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:`It may have been renamed or taken out of the file.`})]})]}):(0,K.jsx)(cC,{project:e,variant:w,template:f.at===`new`?C.find(e=>e.slug===f.from):void 0,justCreated:D,banner:O,document:n?.doc,apply:S,describeError:e=>e instanceof Error?e.message:`Something went wrong.`,onDirtyChange:e=>{u.current=e},onCreated:e=>vC(`#/v/${encodeURIComponent(e)}?created`),onRenamed:e=>p(`#/v/${encodeURIComponent(e)}`),onDeleted:()=>{u.current=!1,p(`#/`)},onDuplicate:e=>{d()&&vC(`#/new?from=${encodeURIComponent(e)}`)},words:{save:`Save to file`,saved:`Saved to the file`,unsaved:`Unsaved changes`}},`${m}:${w?`v:${w.slug}`:`new:${f.at===`new`?f.from??``:``}`}`)})]})]}),(0,K.jsx)(At,{position:`bottom-right`,theme:`system`})]})}var CC=window.matchMedia(`(prefers-color-scheme: dark)`),wC=()=>window.document.documentElement.classList.toggle(`dark`,CC.matches);wC(),CC.addEventListener(`change`,wC),(0,Ze.createRoot)(window.document.getElementById(`root`)).render((0,K.jsx)(x.StrictMode,{children:(0,K.jsx)(SC,{})}));
|