@package-broker/ui 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,198 @@
1
+ var fh=e=>{throw TypeError(e)};var Xo=(e,t,n)=>t.has(e)||fh("Cannot "+n);var E=(e,t,n)=>(Xo(e,t,"read from private field"),n?n.call(e):t.get(e)),Y=(e,t,n)=>t.has(e)?fh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),H=(e,t,n,r)=>(Xo(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),se=(e,t,n)=>(Xo(e,t,"access private method"),n);var Fl=(e,t,n,r)=>({set _(i){H(e,t,i,n)},get _(){return E(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Pa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pg={exports:{}},xo={},Tg={exports:{}},oe={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var bl=Symbol.for("react.element"),Zv=Symbol.for("react.portal"),Kv=Symbol.for("react.fragment"),Xv=Symbol.for("react.strict_mode"),Yv=Symbol.for("react.profiler"),Jv=Symbol.for("react.provider"),ek=Symbol.for("react.context"),tk=Symbol.for("react.forward_ref"),nk=Symbol.for("react.suspense"),rk=Symbol.for("react.memo"),ik=Symbol.for("react.lazy"),hh=Symbol.iterator;function sk(e){return e===null||typeof e!="object"?null:(e=hh&&e[hh]||e["@@iterator"],typeof e=="function"?e:null)}var Ig={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lg=Object.assign,Ag={};function ls(e,t,n){this.props=e,this.context=t,this.refs=Ag,this.updater=n||Ig}ls.prototype.isReactComponent={};ls.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};ls.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Og(){}Og.prototype=ls.prototype;function jd(e,t,n){this.props=e,this.context=t,this.refs=Ag,this.updater=n||Ig}var Rd=jd.prototype=new Og;Rd.constructor=jd;Lg(Rd,ls.prototype);Rd.isPureReactComponent=!0;var ph=Array.isArray,Dg=Object.prototype.hasOwnProperty,Pd={current:null},Fg={key:!0,ref:!0,__self:!0,__source:!0};function $g(e,t,n){var r,i={},s=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(s=""+t.key),t)Dg.call(t,r)&&!Fg.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var o=Array(a),u=0;u<a;u++)o[u]=arguments[u+2];i.children=o}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:bl,type:e,key:s,ref:l,props:i,_owner:Pd.current}}function lk(e,t){return{$$typeof:bl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Td(e){return typeof e=="object"&&e!==null&&e.$$typeof===bl}function ak(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var mh=/\/+/g;function Yo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ak(""+e.key):t.toString(36)}function ha(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case bl:case Zv:l=!0}}if(l)return l=e,i=i(l),e=r===""?"."+Yo(l,0):r,ph(i)?(n="",e!=null&&(n=e.replace(mh,"$&/")+"/"),ha(i,t,n,"",function(u){return u})):i!=null&&(Td(i)&&(i=lk(i,n+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(mh,"$&/")+"/")+e)),t.push(i)),1;if(l=0,r=r===""?".":r+":",ph(e))for(var a=0;a<e.length;a++){s=e[a];var o=r+Yo(s,a);l+=ha(s,t,n,o,i)}else if(o=sk(e),typeof o=="function")for(e=o.call(e),a=0;!(s=e.next()).done;)s=s.value,o=r+Yo(s,a++),l+=ha(s,t,n,o,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function $l(e,t,n){if(e==null)return e;var r=[],i=0;return ha(e,r,"","",function(s){return t.call(n,s,i++)}),r}function ok(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var at={current:null},pa={transition:null},uk={ReactCurrentDispatcher:at,ReactCurrentBatchConfig:pa,ReactCurrentOwner:Pd};function Mg(){throw Error("act(...) is not supported in production builds of React.")}oe.Children={map:$l,forEach:function(e,t,n){$l(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return $l(e,function(){t++}),t},toArray:function(e){return $l(e,function(t){return t})||[]},only:function(e){if(!Td(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};oe.Component=ls;oe.Fragment=Kv;oe.Profiler=Yv;oe.PureComponent=jd;oe.StrictMode=Xv;oe.Suspense=nk;oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uk;oe.act=Mg;oe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Lg({},e.props),i=e.key,s=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,l=Pd.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(o in t)Dg.call(t,o)&&!Fg.hasOwnProperty(o)&&(r[o]=t[o]===void 0&&a!==void 0?a[o]:t[o])}var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){a=Array(o);for(var u=0;u<o;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:bl,type:e.type,key:i,ref:s,props:r,_owner:l}};oe.createContext=function(e){return e={$$typeof:ek,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Jv,_context:e},e.Consumer=e};oe.createElement=$g;oe.createFactory=function(e){var t=$g.bind(null,e);return t.type=e,t};oe.createRef=function(){return{current:null}};oe.forwardRef=function(e){return{$$typeof:tk,render:e}};oe.isValidElement=Td;oe.lazy=function(e){return{$$typeof:ik,_payload:{_status:-1,_result:e},_init:ok}};oe.memo=function(e,t){return{$$typeof:rk,type:e,compare:t===void 0?null:t}};oe.startTransition=function(e){var t=pa.transition;pa.transition={};try{e()}finally{pa.transition=t}};oe.unstable_act=Mg;oe.useCallback=function(e,t){return at.current.useCallback(e,t)};oe.useContext=function(e){return at.current.useContext(e)};oe.useDebugValue=function(){};oe.useDeferredValue=function(e){return at.current.useDeferredValue(e)};oe.useEffect=function(e,t){return at.current.useEffect(e,t)};oe.useId=function(){return at.current.useId()};oe.useImperativeHandle=function(e,t,n){return at.current.useImperativeHandle(e,t,n)};oe.useInsertionEffect=function(e,t){return at.current.useInsertionEffect(e,t)};oe.useLayoutEffect=function(e,t){return at.current.useLayoutEffect(e,t)};oe.useMemo=function(e,t){return at.current.useMemo(e,t)};oe.useReducer=function(e,t,n){return at.current.useReducer(e,t,n)};oe.useRef=function(e){return at.current.useRef(e)};oe.useState=function(e){return at.current.useState(e)};oe.useSyncExternalStore=function(e,t,n){return at.current.useSyncExternalStore(e,t,n)};oe.useTransition=function(){return at.current.useTransition()};oe.version="18.3.1";Tg.exports=oe;var C=Tg.exports;const ck=yo(C);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var dk=C,fk=Symbol.for("react.element"),hk=Symbol.for("react.fragment"),pk=Object.prototype.hasOwnProperty,mk=dk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gk={key:!0,ref:!0,__self:!0,__source:!0};function zg(e,t,n){var r,i={},s=null,l=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)pk.call(t,r)&&!gk.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:fk,type:e,key:s,ref:l,props:i,_owner:mk.current}}xo.Fragment=hk;xo.jsx=zg;xo.jsxs=zg;Pg.exports=xo;var f=Pg.exports,Ku={},Ug={exports:{}},jt={},Bg={exports:{}},Vg={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(R,O){var k=R.length;R.push(O);e:for(;0<k;){var K=k-1>>>1,G=R[K];if(0<i(G,O))R[K]=O,R[k]=G,k=K;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var O=R[0],k=R.pop();if(k!==O){R[0]=k;e:for(var K=0,G=R.length,S=G>>>1;K<S;){var he=2*(K+1)-1,me=R[he],ye=he+1,tn=R[ye];if(0>i(me,k))ye<G&&0>i(tn,me)?(R[K]=tn,R[ye]=k,K=ye):(R[K]=me,R[he]=k,K=he);else if(ye<G&&0>i(tn,k))R[K]=tn,R[ye]=k,K=ye;else break e}}return O}function i(R,O){var k=R.sortIndex-O.sortIndex;return k!==0?k:R.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,a=l.now();e.unstable_now=function(){return l.now()-a}}var o=[],u=[],c=1,d=null,p=3,h=!1,m=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(R){for(var O=n(u);O!==null;){if(O.callback===null)r(u);else if(O.startTime<=R)r(u),O.sortIndex=O.expirationTime,t(o,O);else break;O=n(u)}}function w(R){if(y=!1,v(R),!m)if(n(o)!==null)m=!0,q(j);else{var O=n(u);O!==null&&B(w,O.startTime-R)}}function j(R,O){m=!1,y&&(y=!1,g(A),A=-1),h=!0;var k=p;try{for(v(O),d=n(o);d!==null&&(!(d.expirationTime>O)||R&&!D());){var K=d.callback;if(typeof K=="function"){d.callback=null,p=d.priorityLevel;var G=K(d.expirationTime<=O);O=e.unstable_now(),typeof G=="function"?d.callback=G:d===n(o)&&r(o),v(O)}else r(o);d=n(o)}if(d!==null)var S=!0;else{var he=n(u);he!==null&&B(w,he.startTime-O),S=!1}return S}finally{d=null,p=k,h=!1}}var N=!1,T=null,A=-1,L=5,b=-1;function D(){return!(e.unstable_now()-b<L)}function U(){if(T!==null){var R=e.unstable_now();b=R;var O=!0;try{O=T(!0,R)}finally{O?ee():(N=!1,T=null)}}else N=!1}var ee;if(typeof x=="function")ee=function(){x(U)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,I=F.port2;F.port1.onmessage=U,ee=function(){I.postMessage(null)}}else ee=function(){_(U,0)};function q(R){T=R,N||(N=!0,ee())}function B(R,O){A=_(function(){R(e.unstable_now())},O)}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(R){R.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,q(j))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(o)},e.unstable_next=function(R){switch(p){case 1:case 2:case 3:var O=3;break;default:O=p}var k=p;p=O;try{return R()}finally{p=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,O){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var k=p;p=R;try{return O()}finally{p=k}},e.unstable_scheduleCallback=function(R,O,k){var K=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?K+k:K):k=K,R){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=k+G,R={id:c++,callback:O,priorityLevel:R,startTime:k,expirationTime:G,sortIndex:-1},k>K?(R.sortIndex=k,t(u,R),n(o)===null&&R===n(u)&&(y?(g(A),A=-1):y=!0,B(w,k-K))):(R.sortIndex=G,t(o,R),m||h||(m=!0,q(j))),R},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(R){var O=p;return function(){var k=p;p=O;try{return R.apply(this,arguments)}finally{p=k}}}})(Vg);Bg.exports=Vg;var yk=Bg.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var xk=C,Nt=yk;function $(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var Hg=new Set,Gs={};function si(e,t){Qi(e,t),Qi(e+"Capture",t)}function Qi(e,t){for(Gs[e]=t,e=0;e<t.length;e++)Hg.add(t[e])}var Dn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xu=Object.prototype.hasOwnProperty,vk=/^[: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]*$/,gh={},yh={};function kk(e){return Xu.call(yh,e)?!0:Xu.call(gh,e)?!1:vk.test(e)?yh[e]=!0:(gh[e]=!0,!1)}function wk(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function bk(e,t,n,r){if(t===null||typeof t>"u"||wk(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ot(e,t,n,r,i,s,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=l}var We={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){We[e]=new ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];We[t]=new ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){We[e]=new ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){We[e]=new ot(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){We[e]=new ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){We[e]=new ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){We[e]=new ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){We[e]=new ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){We[e]=new ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var Id=/[\-:]([a-z])/g;function Ld(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Id,Ld);We[t]=new ot(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Id,Ld);We[t]=new ot(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Id,Ld);We[t]=new ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){We[e]=new ot(e,1,!1,e.toLowerCase(),null,!1,!1)});We.xlinkHref=new ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){We[e]=new ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ad(e,t,n,r){var i=We.hasOwnProperty(t)?We[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(bk(t,n,i,r)&&(n=null),r||i===null?kk(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Bn=xk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ml=Symbol.for("react.element"),mi=Symbol.for("react.portal"),gi=Symbol.for("react.fragment"),Od=Symbol.for("react.strict_mode"),Yu=Symbol.for("react.profiler"),qg=Symbol.for("react.provider"),Qg=Symbol.for("react.context"),Dd=Symbol.for("react.forward_ref"),Ju=Symbol.for("react.suspense"),ec=Symbol.for("react.suspense_list"),Fd=Symbol.for("react.memo"),Gn=Symbol.for("react.lazy"),Wg=Symbol.for("react.offscreen"),xh=Symbol.iterator;function xs(e){return e===null||typeof e!="object"?null:(e=xh&&e[xh]||e["@@iterator"],typeof e=="function"?e:null)}var Pe=Object.assign,Jo;function Ps(e){if(Jo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Jo=t&&t[1]||""}return`
34
+ `+Jo+e}var eu=!1;function tu(e,t){if(!e||eu)return"";eu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
+ `),s=r.stack.split(`
36
+ `),l=i.length-1,a=s.length-1;1<=l&&0<=a&&i[l]!==s[a];)a--;for(;1<=l&&0<=a;l--,a--)if(i[l]!==s[a]){if(l!==1||a!==1)do if(l--,a--,0>a||i[l]!==s[a]){var o=`
37
+ `+i[l].replace(" at new "," at ");return e.displayName&&o.includes("<anonymous>")&&(o=o.replace("<anonymous>",e.displayName)),o}while(1<=l&&0<=a);break}}}finally{eu=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ps(e):""}function Sk(e){switch(e.tag){case 5:return Ps(e.type);case 16:return Ps("Lazy");case 13:return Ps("Suspense");case 19:return Ps("SuspenseList");case 0:case 2:case 15:return e=tu(e.type,!1),e;case 11:return e=tu(e.type.render,!1),e;case 1:return e=tu(e.type,!0),e;default:return""}}function tc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case gi:return"Fragment";case mi:return"Portal";case Yu:return"Profiler";case Od:return"StrictMode";case Ju:return"Suspense";case ec:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qg:return(e.displayName||"Context")+".Consumer";case qg:return(e._context.displayName||"Context")+".Provider";case Dd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fd:return t=e.displayName||null,t!==null?t:tc(e.type)||"Memo";case Gn:t=e._payload,e=e._init;try{return tc(e(t))}catch{}}return null}function Ek(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return tc(t);case 8:return t===Od?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function kr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Gg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ck(e){var t=Gg(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,s.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zl(e){e._valueTracker||(e._valueTracker=Ck(e))}function Zg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Gg(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ta(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function nc(e,t){var n=t.checked;return Pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=kr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Kg(e,t){t=t.checked,t!=null&&Ad(e,"checked",t,!1)}function rc(e,t){Kg(e,t);var n=kr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ic(e,t.type,n):t.hasOwnProperty("defaultValue")&&ic(e,t.type,kr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function kh(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ic(e,t,n){(t!=="number"||Ta(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ts=Array.isArray;function Ni(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=""+kr(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 sc(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return Pe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function wh(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error($(92));if(Ts(n)){if(1<n.length)throw Error($(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:kr(n)}}function Xg(e,t){var n=kr(t.value),r=kr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function bh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Yg(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function lc(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Yg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ul,Jg=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ul=Ul||document.createElement("div"),Ul.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ul.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Zs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ds={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_k=["Webkit","ms","Moz","O"];Object.keys(Ds).forEach(function(e){_k.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ds[t]=Ds[e]})});function ey(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ds.hasOwnProperty(e)&&Ds[e]?(""+t).trim():t+"px"}function ty(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=ey(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Nk=Pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ac(e,t){if(t){if(Nk[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function oc(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 uc=null;function $d(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cc=null,ji=null,Ri=null;function Sh(e){if(e=Cl(e)){if(typeof cc!="function")throw Error($(280));var t=e.stateNode;t&&(t=So(t),cc(e.stateNode,e.type,t))}}function ny(e){ji?Ri?Ri.push(e):Ri=[e]:ji=e}function ry(){if(ji){var e=ji,t=Ri;if(Ri=ji=null,Sh(e),t)for(e=0;e<t.length;e++)Sh(t[e])}}function iy(e,t){return e(t)}function sy(){}var nu=!1;function ly(e,t,n){if(nu)return e(t,n);nu=!0;try{return iy(e,t,n)}finally{nu=!1,(ji!==null||Ri!==null)&&(sy(),ry())}}function Ks(e,t){var n=e.stateNode;if(n===null)return null;var r=So(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error($(231,t,typeof n));return n}var dc=!1;if(Dn)try{var vs={};Object.defineProperty(vs,"passive",{get:function(){dc=!0}}),window.addEventListener("test",vs,vs),window.removeEventListener("test",vs,vs)}catch{dc=!1}function jk(e,t,n,r,i,s,l,a,o){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Fs=!1,Ia=null,La=!1,fc=null,Rk={onError:function(e){Fs=!0,Ia=e}};function Pk(e,t,n,r,i,s,l,a,o){Fs=!1,Ia=null,jk.apply(Rk,arguments)}function Tk(e,t,n,r,i,s,l,a,o){if(Pk.apply(this,arguments),Fs){if(Fs){var u=Ia;Fs=!1,Ia=null}else throw Error($(198));La||(La=!0,fc=u)}}function li(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ay(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 Eh(e){if(li(e)!==e)throw Error($(188))}function Ik(e){var t=e.alternate;if(!t){if(t=li(e),t===null)throw Error($(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Eh(i),e;if(s===r)return Eh(i),t;s=s.sibling}throw Error($(188))}if(n.return!==r.return)n=i,r=s;else{for(var l=!1,a=i.child;a;){if(a===n){l=!0,n=i,r=s;break}if(a===r){l=!0,r=i,n=s;break}a=a.sibling}if(!l){for(a=s.child;a;){if(a===n){l=!0,n=s,r=i;break}if(a===r){l=!0,r=s,n=i;break}a=a.sibling}if(!l)throw Error($(189))}}if(n.alternate!==r)throw Error($(190))}if(n.tag!==3)throw Error($(188));return n.stateNode.current===n?e:t}function oy(e){return e=Ik(e),e!==null?uy(e):null}function uy(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=uy(e);if(t!==null)return t;e=e.sibling}return null}var cy=Nt.unstable_scheduleCallback,Ch=Nt.unstable_cancelCallback,Lk=Nt.unstable_shouldYield,Ak=Nt.unstable_requestPaint,Ae=Nt.unstable_now,Ok=Nt.unstable_getCurrentPriorityLevel,Md=Nt.unstable_ImmediatePriority,dy=Nt.unstable_UserBlockingPriority,Aa=Nt.unstable_NormalPriority,Dk=Nt.unstable_LowPriority,fy=Nt.unstable_IdlePriority,vo=null,fn=null;function Fk(e){if(fn&&typeof fn.onCommitFiberRoot=="function")try{fn.onCommitFiberRoot(vo,e,void 0,(e.current.flags&128)===128)}catch{}}var Gt=Math.clz32?Math.clz32:zk,$k=Math.log,Mk=Math.LN2;function zk(e){return e>>>=0,e===0?32:31-($k(e)/Mk|0)|0}var Bl=64,Vl=4194304;function Is(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Oa(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,l=n&268435455;if(l!==0){var a=l&~i;a!==0?r=Is(a):(s&=l,s!==0&&(r=Is(s)))}else l=n&~i,l!==0?r=Is(l):s!==0&&(r=Is(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Gt(t),i=1<<n,r|=e[n],t&=~i;return r}function Uk(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Bk(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-Gt(s),a=1<<l,o=i[l];o===-1?(!(a&n)||a&r)&&(i[l]=Uk(a,t)):o<=t&&(e.expiredLanes|=a),s&=~a}}function hc(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function hy(){var e=Bl;return Bl<<=1,!(Bl&4194240)&&(Bl=64),e}function ru(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Sl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Gt(t),e[t]=n}function Vk(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Gt(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function zd(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Gt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ve=0;function py(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var my,Ud,gy,yy,xy,pc=!1,Hl=[],cr=null,dr=null,fr=null,Xs=new Map,Ys=new Map,Xn=[],Hk="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 submit".split(" ");function _h(e,t){switch(e){case"focusin":case"focusout":cr=null;break;case"dragenter":case"dragleave":dr=null;break;case"mouseover":case"mouseout":fr=null;break;case"pointerover":case"pointerout":Xs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ys.delete(t.pointerId)}}function ks(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Cl(t),t!==null&&Ud(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function qk(e,t,n,r,i){switch(t){case"focusin":return cr=ks(cr,e,t,n,r,i),!0;case"dragenter":return dr=ks(dr,e,t,n,r,i),!0;case"mouseover":return fr=ks(fr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Xs.set(s,ks(Xs.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Ys.set(s,ks(Ys.get(s)||null,e,t,n,r,i)),!0}return!1}function vy(e){var t=Ar(e.target);if(t!==null){var n=li(t);if(n!==null){if(t=n.tag,t===13){if(t=ay(n),t!==null){e.blockedOn=t,xy(e.priority,function(){gy(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 ma(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mc(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);uc=r,n.target.dispatchEvent(r),uc=null}else return t=Cl(n),t!==null&&Ud(t),e.blockedOn=n,!1;t.shift()}return!0}function Nh(e,t,n){ma(e)&&n.delete(t)}function Qk(){pc=!1,cr!==null&&ma(cr)&&(cr=null),dr!==null&&ma(dr)&&(dr=null),fr!==null&&ma(fr)&&(fr=null),Xs.forEach(Nh),Ys.forEach(Nh)}function ws(e,t){e.blockedOn===t&&(e.blockedOn=null,pc||(pc=!0,Nt.unstable_scheduleCallback(Nt.unstable_NormalPriority,Qk)))}function Js(e){function t(i){return ws(i,e)}if(0<Hl.length){ws(Hl[0],e);for(var n=1;n<Hl.length;n++){var r=Hl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(cr!==null&&ws(cr,e),dr!==null&&ws(dr,e),fr!==null&&ws(fr,e),Xs.forEach(t),Ys.forEach(t),n=0;n<Xn.length;n++)r=Xn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Xn.length&&(n=Xn[0],n.blockedOn===null);)vy(n),n.blockedOn===null&&Xn.shift()}var Pi=Bn.ReactCurrentBatchConfig,Da=!0;function Wk(e,t,n,r){var i=ve,s=Pi.transition;Pi.transition=null;try{ve=1,Bd(e,t,n,r)}finally{ve=i,Pi.transition=s}}function Gk(e,t,n,r){var i=ve,s=Pi.transition;Pi.transition=null;try{ve=4,Bd(e,t,n,r)}finally{ve=i,Pi.transition=s}}function Bd(e,t,n,r){if(Da){var i=mc(e,t,n,r);if(i===null)hu(e,t,r,Fa,n),_h(e,r);else if(qk(i,e,t,n,r))r.stopPropagation();else if(_h(e,r),t&4&&-1<Hk.indexOf(e)){for(;i!==null;){var s=Cl(i);if(s!==null&&my(s),s=mc(e,t,n,r),s===null&&hu(e,t,r,Fa,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else hu(e,t,r,null,n)}}var Fa=null;function mc(e,t,n,r){if(Fa=null,e=$d(r),e=Ar(e),e!==null)if(t=li(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ay(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 Fa=e,null}function ky(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ok()){case Md:return 1;case dy:return 4;case Aa:case Dk:return 16;case fy:return 536870912;default:return 16}default:return 16}}var or=null,Vd=null,ga=null;function wy(){if(ga)return ga;var e,t=Vd,n=t.length,r,i="value"in or?or.value:or.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===i[s-r];r++);return ga=i.slice(e,1<r?1-r:void 0)}function ya(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 ql(){return!0}function jh(){return!1}function Rt(e){function t(n,r,i,s,l){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=l,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?ql:jh,this.isPropagationStopped=jh,this}return Pe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ql)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ql)},persist:function(){},isPersistent:ql}),t}var as={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hd=Rt(as),El=Pe({},as,{view:0,detail:0}),Zk=Rt(El),iu,su,bs,ko=Pe({},El,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qd,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!==bs&&(bs&&e.type==="mousemove"?(iu=e.screenX-bs.screenX,su=e.screenY-bs.screenY):su=iu=0,bs=e),iu)},movementY:function(e){return"movementY"in e?e.movementY:su}}),Rh=Rt(ko),Kk=Pe({},ko,{dataTransfer:0}),Xk=Rt(Kk),Yk=Pe({},El,{relatedTarget:0}),lu=Rt(Yk),Jk=Pe({},as,{animationName:0,elapsedTime:0,pseudoElement:0}),ew=Rt(Jk),tw=Pe({},as,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),nw=Rt(tw),rw=Pe({},as,{data:0}),Ph=Rt(rw),iw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sw={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"},lw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lw[e])?!!t[e]:!1}function qd(){return aw}var ow=Pe({},El,{key:function(e){if(e.key){var t=iw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ya(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qd,charCode:function(e){return e.type==="keypress"?ya(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ya(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),uw=Rt(ow),cw=Pe({},ko,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Th=Rt(cw),dw=Pe({},El,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qd}),fw=Rt(dw),hw=Pe({},as,{propertyName:0,elapsedTime:0,pseudoElement:0}),pw=Rt(hw),mw=Pe({},ko,{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}),gw=Rt(mw),yw=[9,13,27,32],Qd=Dn&&"CompositionEvent"in window,$s=null;Dn&&"documentMode"in document&&($s=document.documentMode);var xw=Dn&&"TextEvent"in window&&!$s,by=Dn&&(!Qd||$s&&8<$s&&11>=$s),Ih=" ",Lh=!1;function Sy(e,t){switch(e){case"keyup":return yw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ey(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yi=!1;function vw(e,t){switch(e){case"compositionend":return Ey(t);case"keypress":return t.which!==32?null:(Lh=!0,Ih);case"textInput":return e=t.data,e===Ih&&Lh?null:e;default:return null}}function kw(e,t){if(yi)return e==="compositionend"||!Qd&&Sy(e,t)?(e=wy(),ga=Vd=or=null,yi=!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 by&&t.locale!=="ko"?null:t.data;default:return null}}var ww={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 Ah(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ww[e.type]:t==="textarea"}function Cy(e,t,n,r){ny(r),t=$a(t,"onChange"),0<t.length&&(n=new Hd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ms=null,el=null;function bw(e){Dy(e,0)}function wo(e){var t=ki(e);if(Zg(t))return e}function Sw(e,t){if(e==="change")return t}var _y=!1;if(Dn){var au;if(Dn){var ou="oninput"in document;if(!ou){var Oh=document.createElement("div");Oh.setAttribute("oninput","return;"),ou=typeof Oh.oninput=="function"}au=ou}else au=!1;_y=au&&(!document.documentMode||9<document.documentMode)}function Dh(){Ms&&(Ms.detachEvent("onpropertychange",Ny),el=Ms=null)}function Ny(e){if(e.propertyName==="value"&&wo(el)){var t=[];Cy(t,el,e,$d(e)),ly(bw,t)}}function Ew(e,t,n){e==="focusin"?(Dh(),Ms=t,el=n,Ms.attachEvent("onpropertychange",Ny)):e==="focusout"&&Dh()}function Cw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return wo(el)}function _w(e,t){if(e==="click")return wo(t)}function Nw(e,t){if(e==="input"||e==="change")return wo(t)}function jw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xt=typeof Object.is=="function"?Object.is:jw;function tl(e,t){if(Xt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)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(!Xu.call(t,i)||!Xt(e[i],t[i]))return!1}return!0}function Fh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $h(e,t){var n=Fh(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}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Fh(n)}}function jy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ry(){for(var e=window,t=Ta();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ta(e.document)}return t}function Wd(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")}function Rw(e){var t=Ry(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&jy(n.ownerDocument.documentElement,n)){if(r!==null&&Wd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=$h(n,s);var l=$h(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Pw=Dn&&"documentMode"in document&&11>=document.documentMode,xi=null,gc=null,zs=null,yc=!1;function Mh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yc||xi==null||xi!==Ta(r)||(r=xi,"selectionStart"in r&&Wd(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}),zs&&tl(zs,r)||(zs=r,r=$a(gc,"onSelect"),0<r.length&&(t=new Hd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=xi)))}function Ql(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vi={animationend:Ql("Animation","AnimationEnd"),animationiteration:Ql("Animation","AnimationIteration"),animationstart:Ql("Animation","AnimationStart"),transitionend:Ql("Transition","TransitionEnd")},uu={},Py={};Dn&&(Py=document.createElement("div").style,"AnimationEvent"in window||(delete vi.animationend.animation,delete vi.animationiteration.animation,delete vi.animationstart.animation),"TransitionEvent"in window||delete vi.transitionend.transition);function bo(e){if(uu[e])return uu[e];if(!vi[e])return e;var t=vi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Py)return uu[e]=t[n];return e}var Ty=bo("animationend"),Iy=bo("animationiteration"),Ly=bo("animationstart"),Ay=bo("transitionend"),Oy=new Map,zh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Er(e,t){Oy.set(e,t),si(t,[e])}for(var cu=0;cu<zh.length;cu++){var du=zh[cu],Tw=du.toLowerCase(),Iw=du[0].toUpperCase()+du.slice(1);Er(Tw,"on"+Iw)}Er(Ty,"onAnimationEnd");Er(Iy,"onAnimationIteration");Er(Ly,"onAnimationStart");Er("dblclick","onDoubleClick");Er("focusin","onFocus");Er("focusout","onBlur");Er(Ay,"onTransitionEnd");Qi("onMouseEnter",["mouseout","mouseover"]);Qi("onMouseLeave",["mouseout","mouseover"]);Qi("onPointerEnter",["pointerout","pointerover"]);Qi("onPointerLeave",["pointerout","pointerover"]);si("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));si("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));si("onBeforeInput",["compositionend","keypress","textInput","paste"]);si("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));si("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));si("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ls="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(" "),Lw=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ls));function Uh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Tk(r,t,void 0,e),e.currentTarget=null}function Dy(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var l=r.length-1;0<=l;l--){var a=r[l],o=a.instance,u=a.currentTarget;if(a=a.listener,o!==s&&i.isPropagationStopped())break e;Uh(i,a,u),s=o}else for(l=0;l<r.length;l++){if(a=r[l],o=a.instance,u=a.currentTarget,a=a.listener,o!==s&&i.isPropagationStopped())break e;Uh(i,a,u),s=o}}}if(La)throw e=fc,La=!1,fc=null,e}function Ee(e,t){var n=t[bc];n===void 0&&(n=t[bc]=new Set);var r=e+"__bubble";n.has(r)||(Fy(t,e,2,!1),n.add(r))}function fu(e,t,n){var r=0;t&&(r|=4),Fy(n,e,r,t)}var Wl="_reactListening"+Math.random().toString(36).slice(2);function nl(e){if(!e[Wl]){e[Wl]=!0,Hg.forEach(function(n){n!=="selectionchange"&&(Lw.has(n)||fu(n,!1,e),fu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wl]||(t[Wl]=!0,fu("selectionchange",!1,t))}}function Fy(e,t,n,r){switch(ky(t)){case 1:var i=Wk;break;case 4:i=Gk;break;default:i=Bd}n=i.bind(null,t,n,e),i=void 0,!dc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function hu(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(l===4)for(l=r.return;l!==null;){var o=l.tag;if((o===3||o===4)&&(o=l.stateNode.containerInfo,o===i||o.nodeType===8&&o.parentNode===i))return;l=l.return}for(;a!==null;){if(l=Ar(a),l===null)return;if(o=l.tag,o===5||o===6){r=s=l;continue e}a=a.parentNode}}r=r.return}ly(function(){var u=s,c=$d(n),d=[];e:{var p=Oy.get(e);if(p!==void 0){var h=Hd,m=e;switch(e){case"keypress":if(ya(n)===0)break e;case"keydown":case"keyup":h=uw;break;case"focusin":m="focus",h=lu;break;case"focusout":m="blur",h=lu;break;case"beforeblur":case"afterblur":h=lu;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Rh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Xk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=fw;break;case Ty:case Iy:case Ly:h=ew;break;case Ay:h=pw;break;case"scroll":h=Zk;break;case"wheel":h=gw;break;case"copy":case"cut":case"paste":h=nw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Th}var y=(t&4)!==0,_=!y&&e==="scroll",g=y?p!==null?p+"Capture":null:p;y=[];for(var x=u,v;x!==null;){v=x;var w=v.stateNode;if(v.tag===5&&w!==null&&(v=w,g!==null&&(w=Ks(x,g),w!=null&&y.push(rl(x,w,v)))),_)break;x=x.return}0<y.length&&(p=new h(p,m,null,n,c),d.push({event:p,listeners:y}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==uc&&(m=n.relatedTarget||n.fromElement)&&(Ar(m)||m[Fn]))break e;if((h||p)&&(p=c.window===c?c:(p=c.ownerDocument)?p.defaultView||p.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=u,m=m?Ar(m):null,m!==null&&(_=li(m),m!==_||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(y=Rh,w="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(y=Th,w="onPointerLeave",g="onPointerEnter",x="pointer"),_=h==null?p:ki(h),v=m==null?p:ki(m),p=new y(w,x+"leave",h,n,c),p.target=_,p.relatedTarget=v,w=null,Ar(c)===u&&(y=new y(g,x+"enter",m,n,c),y.target=v,y.relatedTarget=_,w=y),_=w,h&&m)t:{for(y=h,g=m,x=0,v=y;v;v=di(v))x++;for(v=0,w=g;w;w=di(w))v++;for(;0<x-v;)y=di(y),x--;for(;0<v-x;)g=di(g),v--;for(;x--;){if(y===g||g!==null&&y===g.alternate)break t;y=di(y),g=di(g)}y=null}else y=null;h!==null&&Bh(d,p,h,y,!1),m!==null&&_!==null&&Bh(d,_,m,y,!0)}}e:{if(p=u?ki(u):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var j=Sw;else if(Ah(p))if(_y)j=Nw;else{j=Cw;var N=Ew}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(j=_w);if(j&&(j=j(e,u))){Cy(d,j,n,c);break e}N&&N(e,p,u),e==="focusout"&&(N=p._wrapperState)&&N.controlled&&p.type==="number"&&ic(p,"number",p.value)}switch(N=u?ki(u):window,e){case"focusin":(Ah(N)||N.contentEditable==="true")&&(xi=N,gc=u,zs=null);break;case"focusout":zs=gc=xi=null;break;case"mousedown":yc=!0;break;case"contextmenu":case"mouseup":case"dragend":yc=!1,Mh(d,n,c);break;case"selectionchange":if(Pw)break;case"keydown":case"keyup":Mh(d,n,c)}var T;if(Qd)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else yi?Sy(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(by&&n.locale!=="ko"&&(yi||A!=="onCompositionStart"?A==="onCompositionEnd"&&yi&&(T=wy()):(or=c,Vd="value"in or?or.value:or.textContent,yi=!0)),N=$a(u,A),0<N.length&&(A=new Ph(A,e,null,n,c),d.push({event:A,listeners:N}),T?A.data=T:(T=Ey(n),T!==null&&(A.data=T)))),(T=xw?vw(e,n):kw(e,n))&&(u=$a(u,"onBeforeInput"),0<u.length&&(c=new Ph("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=T))}Dy(d,t)})}function rl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function $a(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ks(e,n),s!=null&&r.unshift(rl(e,s,i)),s=Ks(e,t),s!=null&&r.push(rl(e,s,i))),e=e.return}return r}function di(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Bh(e,t,n,r,i){for(var s=t._reactName,l=[];n!==null&&n!==r;){var a=n,o=a.alternate,u=a.stateNode;if(o!==null&&o===r)break;a.tag===5&&u!==null&&(a=u,i?(o=Ks(n,s),o!=null&&l.unshift(rl(n,o,a))):i||(o=Ks(n,s),o!=null&&l.push(rl(n,o,a)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var Aw=/\r\n?/g,Ow=/\u0000|\uFFFD/g;function Vh(e){return(typeof e=="string"?e:""+e).replace(Aw,`
38
+ `).replace(Ow,"")}function Gl(e,t,n){if(t=Vh(t),Vh(e)!==t&&n)throw Error($(425))}function Ma(){}var xc=null,vc=null;function kc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var wc=typeof setTimeout=="function"?setTimeout:void 0,Dw=typeof clearTimeout=="function"?clearTimeout:void 0,Hh=typeof Promise=="function"?Promise:void 0,Fw=typeof queueMicrotask=="function"?queueMicrotask:typeof Hh<"u"?function(e){return Hh.resolve(null).then(e).catch($w)}:wc;function $w(e){setTimeout(function(){throw e})}function pu(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==="/$"){if(r===0){e.removeChild(i),Js(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Js(t)}function hr(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==="$?")break;if(t==="/$")return null}}return e}function qh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var os=Math.random().toString(36).slice(2),cn="__reactFiber$"+os,il="__reactProps$"+os,Fn="__reactContainer$"+os,bc="__reactEvents$"+os,Mw="__reactListeners$"+os,zw="__reactHandles$"+os;function Ar(e){var t=e[cn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Fn]||n[cn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=qh(e);e!==null;){if(n=e[cn])return n;e=qh(e)}return t}e=n,n=e.parentNode}return null}function Cl(e){return e=e[cn]||e[Fn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ki(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function So(e){return e[il]||null}var Sc=[],wi=-1;function Cr(e){return{current:e}}function Ce(e){0>wi||(e.current=Sc[wi],Sc[wi]=null,wi--)}function Se(e,t){wi++,Sc[wi]=e.current,e.current=t}var wr={},Ye=Cr(wr),mt=Cr(!1),Zr=wr;function Wi(e,t){var n=e.type.contextTypes;if(!n)return wr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function gt(e){return e=e.childContextTypes,e!=null}function za(){Ce(mt),Ce(Ye)}function Qh(e,t,n){if(Ye.current!==wr)throw Error($(168));Se(Ye,t),Se(mt,n)}function $y(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error($(108,Ek(e)||"Unknown",i));return Pe({},n,r)}function Ua(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wr,Zr=Ye.current,Se(Ye,e),Se(mt,mt.current),!0}function Wh(e,t,n){var r=e.stateNode;if(!r)throw Error($(169));n?(e=$y(e,t,Zr),r.__reactInternalMemoizedMergedChildContext=e,Ce(mt),Ce(Ye),Se(Ye,e)):Ce(mt),Se(mt,n)}var En=null,Eo=!1,mu=!1;function My(e){En===null?En=[e]:En.push(e)}function Uw(e){Eo=!0,My(e)}function _r(){if(!mu&&En!==null){mu=!0;var e=0,t=ve;try{var n=En;for(ve=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}En=null,Eo=!1}catch(i){throw En!==null&&(En=En.slice(e+1)),cy(Md,_r),i}finally{ve=t,mu=!1}}return null}var bi=[],Si=0,Ba=null,Va=0,It=[],Lt=0,Kr=null,Rn=1,Pn="";function Tr(e,t){bi[Si++]=Va,bi[Si++]=Ba,Ba=e,Va=t}function zy(e,t,n){It[Lt++]=Rn,It[Lt++]=Pn,It[Lt++]=Kr,Kr=e;var r=Rn;e=Pn;var i=32-Gt(r)-1;r&=~(1<<i),n+=1;var s=32-Gt(t)+i;if(30<s){var l=i-i%5;s=(r&(1<<l)-1).toString(32),r>>=l,i-=l,Rn=1<<32-Gt(t)+i|n<<i|r,Pn=s+e}else Rn=1<<s|n<<i|r,Pn=e}function Gd(e){e.return!==null&&(Tr(e,1),zy(e,1,0))}function Zd(e){for(;e===Ba;)Ba=bi[--Si],bi[Si]=null,Va=bi[--Si],bi[Si]=null;for(;e===Kr;)Kr=It[--Lt],It[Lt]=null,Pn=It[--Lt],It[Lt]=null,Rn=It[--Lt],It[Lt]=null}var Ct=null,St=null,_e=!1,Wt=null;function Uy(e,t){var n=Ot(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Gh(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ct=e,St=hr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ct=e,St=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Kr!==null?{id:Rn,overflow:Pn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ot(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ct=e,St=null,!0):!1;default:return!1}}function Ec(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Cc(e){if(_e){var t=St;if(t){var n=t;if(!Gh(e,t)){if(Ec(e))throw Error($(418));t=hr(n.nextSibling);var r=Ct;t&&Gh(e,t)?Uy(r,n):(e.flags=e.flags&-4097|2,_e=!1,Ct=e)}}else{if(Ec(e))throw Error($(418));e.flags=e.flags&-4097|2,_e=!1,Ct=e}}}function Zh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ct=e}function Zl(e){if(e!==Ct)return!1;if(!_e)return Zh(e),_e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!kc(e.type,e.memoizedProps)),t&&(t=St)){if(Ec(e))throw By(),Error($(418));for(;t;)Uy(e,t),t=hr(t.nextSibling)}if(Zh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){St=hr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}St=null}}else St=Ct?hr(e.stateNode.nextSibling):null;return!0}function By(){for(var e=St;e;)e=hr(e.nextSibling)}function Gi(){St=Ct=null,_e=!1}function Kd(e){Wt===null?Wt=[e]:Wt.push(e)}var Bw=Bn.ReactCurrentBatchConfig;function Ss(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error($(309));var r=n.stateNode}if(!r)throw Error($(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(l){var a=i.refs;l===null?delete a[s]:a[s]=l},t._stringRef=s,t)}if(typeof e!="string")throw Error($(284));if(!n._owner)throw Error($(290,e))}return e}function Kl(e,t){throw e=Object.prototype.toString.call(t),Error($(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Kh(e){var t=e._init;return t(e._payload)}function Vy(e){function t(g,x){if(e){var v=g.deletions;v===null?(g.deletions=[x],g.flags|=16):v.push(x)}}function n(g,x){if(!e)return null;for(;x!==null;)t(g,x),x=x.sibling;return null}function r(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function i(g,x){return g=yr(g,x),g.index=0,g.sibling=null,g}function s(g,x,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<x?(g.flags|=2,x):v):(g.flags|=2,x)):(g.flags|=1048576,x)}function l(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,x,v,w){return x===null||x.tag!==6?(x=bu(v,g.mode,w),x.return=g,x):(x=i(x,v),x.return=g,x)}function o(g,x,v,w){var j=v.type;return j===gi?c(g,x,v.props.children,w,v.key):x!==null&&(x.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Gn&&Kh(j)===x.type)?(w=i(x,v.props),w.ref=Ss(g,x,v),w.return=g,w):(w=Ea(v.type,v.key,v.props,null,g.mode,w),w.ref=Ss(g,x,v),w.return=g,w)}function u(g,x,v,w){return x===null||x.tag!==4||x.stateNode.containerInfo!==v.containerInfo||x.stateNode.implementation!==v.implementation?(x=Su(v,g.mode,w),x.return=g,x):(x=i(x,v.children||[]),x.return=g,x)}function c(g,x,v,w,j){return x===null||x.tag!==7?(x=Gr(v,g.mode,w,j),x.return=g,x):(x=i(x,v),x.return=g,x)}function d(g,x,v){if(typeof x=="string"&&x!==""||typeof x=="number")return x=bu(""+x,g.mode,v),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ml:return v=Ea(x.type,x.key,x.props,null,g.mode,v),v.ref=Ss(g,null,x),v.return=g,v;case mi:return x=Su(x,g.mode,v),x.return=g,x;case Gn:var w=x._init;return d(g,w(x._payload),v)}if(Ts(x)||xs(x))return x=Gr(x,g.mode,v,null),x.return=g,x;Kl(g,x)}return null}function p(g,x,v,w){var j=x!==null?x.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return j!==null?null:a(g,x,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ml:return v.key===j?o(g,x,v,w):null;case mi:return v.key===j?u(g,x,v,w):null;case Gn:return j=v._init,p(g,x,j(v._payload),w)}if(Ts(v)||xs(v))return j!==null?null:c(g,x,v,w,null);Kl(g,v)}return null}function h(g,x,v,w,j){if(typeof w=="string"&&w!==""||typeof w=="number")return g=g.get(v)||null,a(x,g,""+w,j);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Ml:return g=g.get(w.key===null?v:w.key)||null,o(x,g,w,j);case mi:return g=g.get(w.key===null?v:w.key)||null,u(x,g,w,j);case Gn:var N=w._init;return h(g,x,v,N(w._payload),j)}if(Ts(w)||xs(w))return g=g.get(v)||null,c(x,g,w,j,null);Kl(x,w)}return null}function m(g,x,v,w){for(var j=null,N=null,T=x,A=x=0,L=null;T!==null&&A<v.length;A++){T.index>A?(L=T,T=null):L=T.sibling;var b=p(g,T,v[A],w);if(b===null){T===null&&(T=L);break}e&&T&&b.alternate===null&&t(g,T),x=s(b,x,A),N===null?j=b:N.sibling=b,N=b,T=L}if(A===v.length)return n(g,T),_e&&Tr(g,A),j;if(T===null){for(;A<v.length;A++)T=d(g,v[A],w),T!==null&&(x=s(T,x,A),N===null?j=T:N.sibling=T,N=T);return _e&&Tr(g,A),j}for(T=r(g,T);A<v.length;A++)L=h(T,g,A,v[A],w),L!==null&&(e&&L.alternate!==null&&T.delete(L.key===null?A:L.key),x=s(L,x,A),N===null?j=L:N.sibling=L,N=L);return e&&T.forEach(function(D){return t(g,D)}),_e&&Tr(g,A),j}function y(g,x,v,w){var j=xs(v);if(typeof j!="function")throw Error($(150));if(v=j.call(v),v==null)throw Error($(151));for(var N=j=null,T=x,A=x=0,L=null,b=v.next();T!==null&&!b.done;A++,b=v.next()){T.index>A?(L=T,T=null):L=T.sibling;var D=p(g,T,b.value,w);if(D===null){T===null&&(T=L);break}e&&T&&D.alternate===null&&t(g,T),x=s(D,x,A),N===null?j=D:N.sibling=D,N=D,T=L}if(b.done)return n(g,T),_e&&Tr(g,A),j;if(T===null){for(;!b.done;A++,b=v.next())b=d(g,b.value,w),b!==null&&(x=s(b,x,A),N===null?j=b:N.sibling=b,N=b);return _e&&Tr(g,A),j}for(T=r(g,T);!b.done;A++,b=v.next())b=h(T,g,A,b.value,w),b!==null&&(e&&b.alternate!==null&&T.delete(b.key===null?A:b.key),x=s(b,x,A),N===null?j=b:N.sibling=b,N=b);return e&&T.forEach(function(U){return t(g,U)}),_e&&Tr(g,A),j}function _(g,x,v,w){if(typeof v=="object"&&v!==null&&v.type===gi&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ml:e:{for(var j=v.key,N=x;N!==null;){if(N.key===j){if(j=v.type,j===gi){if(N.tag===7){n(g,N.sibling),x=i(N,v.props.children),x.return=g,g=x;break e}}else if(N.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Gn&&Kh(j)===N.type){n(g,N.sibling),x=i(N,v.props),x.ref=Ss(g,N,v),x.return=g,g=x;break e}n(g,N);break}else t(g,N);N=N.sibling}v.type===gi?(x=Gr(v.props.children,g.mode,w,v.key),x.return=g,g=x):(w=Ea(v.type,v.key,v.props,null,g.mode,w),w.ref=Ss(g,x,v),w.return=g,g=w)}return l(g);case mi:e:{for(N=v.key;x!==null;){if(x.key===N)if(x.tag===4&&x.stateNode.containerInfo===v.containerInfo&&x.stateNode.implementation===v.implementation){n(g,x.sibling),x=i(x,v.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=Su(v,g.mode,w),x.return=g,g=x}return l(g);case Gn:return N=v._init,_(g,x,N(v._payload),w)}if(Ts(v))return m(g,x,v,w);if(xs(v))return y(g,x,v,w);Kl(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,x!==null&&x.tag===6?(n(g,x.sibling),x=i(x,v),x.return=g,g=x):(n(g,x),x=bu(v,g.mode,w),x.return=g,g=x),l(g)):n(g,x)}return _}var Zi=Vy(!0),Hy=Vy(!1),Ha=Cr(null),qa=null,Ei=null,Xd=null;function Yd(){Xd=Ei=qa=null}function Jd(e){var t=Ha.current;Ce(Ha),e._currentValue=t}function _c(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ti(e,t){qa=e,Xd=Ei=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(pt=!0),e.firstContext=null)}function Ft(e){var t=e._currentValue;if(Xd!==e)if(e={context:e,memoizedValue:t,next:null},Ei===null){if(qa===null)throw Error($(308));Ei=e,qa.dependencies={lanes:0,firstContext:e}}else Ei=Ei.next=e;return t}var Or=null;function ef(e){Or===null?Or=[e]:Or.push(e)}function qy(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ef(t)):(n.next=i.next,i.next=n),t.interleaved=n,$n(e,r)}function $n(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Zn=!1;function tf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qy(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ln(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function pr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,pe&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,$n(e,n)}return i=r.interleaved,i===null?(t.next=t,ef(r)):(t.next=i.next,i.next=t),r.interleaved=t,$n(e,n)}function xa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zd(e,n)}}function Xh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=l:s=s.next=l,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Qa(e,t,n,r){var i=e.updateQueue;Zn=!1;var s=i.firstBaseUpdate,l=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var o=a,u=o.next;o.next=null,l===null?s=u:l.next=u,l=o;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==l&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=o))}if(s!==null){var d=i.baseState;l=0,c=u=o=null,a=s;do{var p=a.lane,h=a.eventTime;if((r&p)===p){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,y=a;switch(p=t,h=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){d=m.call(h,d,p);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,p=typeof m=="function"?m.call(h,d,p):m,p==null)break e;d=Pe({},d,p);break e;case 2:Zn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[a]:p.push(a))}else h={eventTime:h,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,o=d):c=c.next=h,l|=p;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;p=a,a=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(c===null&&(o=d),i.baseState=o,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Yr|=l,e.lanes=l,e.memoizedState=d}}function Yh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error($(191,i));i.call(r)}}}var _l={},hn=Cr(_l),sl=Cr(_l),ll=Cr(_l);function Dr(e){if(e===_l)throw Error($(174));return e}function nf(e,t){switch(Se(ll,t),Se(sl,e),Se(hn,_l),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:lc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=lc(t,e)}Ce(hn),Se(hn,t)}function Ki(){Ce(hn),Ce(sl),Ce(ll)}function Wy(e){Dr(ll.current);var t=Dr(hn.current),n=lc(t,e.type);t!==n&&(Se(sl,e),Se(hn,n))}function rf(e){sl.current===e&&(Ce(hn),Ce(sl))}var Ne=Cr(0);function Wa(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 gu=[];function sf(){for(var e=0;e<gu.length;e++)gu[e]._workInProgressVersionPrimary=null;gu.length=0}var va=Bn.ReactCurrentDispatcher,yu=Bn.ReactCurrentBatchConfig,Xr=0,je=null,$e=null,Be=null,Ga=!1,Us=!1,al=0,Vw=0;function Ge(){throw Error($(321))}function lf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Xt(e[n],t[n]))return!1;return!0}function af(e,t,n,r,i,s){if(Xr=s,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,va.current=e===null||e.memoizedState===null?Ww:Gw,e=n(r,i),Us){s=0;do{if(Us=!1,al=0,25<=s)throw Error($(301));s+=1,Be=$e=null,t.updateQueue=null,va.current=Zw,e=n(r,i)}while(Us)}if(va.current=Za,t=$e!==null&&$e.next!==null,Xr=0,Be=$e=je=null,Ga=!1,t)throw Error($(300));return e}function of(){var e=al!==0;return al=0,e}function sn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?je.memoizedState=Be=e:Be=Be.next=e,Be}function $t(){if($e===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=Be===null?je.memoizedState:Be.next;if(t!==null)Be=t,$e=e;else{if(e===null)throw Error($(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},Be===null?je.memoizedState=Be=e:Be=Be.next=e}return Be}function ol(e,t){return typeof t=="function"?t(e):t}function xu(e){var t=$t(),n=t.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=e;var r=$e,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var l=i.next;i.next=s.next,s.next=l}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=l=null,o=null,u=s;do{var c=u.lane;if((Xr&c)===c)o!==null&&(o=o.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};o===null?(a=o=d,l=r):o=o.next=d,je.lanes|=c,Yr|=c}u=u.next}while(u!==null&&u!==s);o===null?l=r:o.next=a,Xt(r,t.memoizedState)||(pt=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=o,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,je.lanes|=s,Yr|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function vu(e){var t=$t(),n=t.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do s=e(s,l.action),l=l.next;while(l!==i);Xt(s,t.memoizedState)||(pt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Gy(){}function Zy(e,t){var n=je,r=$t(),i=t(),s=!Xt(r.memoizedState,i);if(s&&(r.memoizedState=i,pt=!0),r=r.queue,uf(Yy.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Be!==null&&Be.memoizedState.tag&1){if(n.flags|=2048,ul(9,Xy.bind(null,n,r,i,t),void 0,null),Ve===null)throw Error($(349));Xr&30||Ky(n,t,i)}return i}function Ky(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Xy(e,t,n,r){t.value=n,t.getSnapshot=r,Jy(t)&&ex(e)}function Yy(e,t,n){return n(function(){Jy(t)&&ex(e)})}function Jy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Xt(e,n)}catch{return!0}}function ex(e){var t=$n(e,1);t!==null&&Zt(t,e,1,-1)}function Jh(e){var t=sn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ol,lastRenderedState:e},t.queue=e,e=e.dispatch=Qw.bind(null,je,e),[t.memoizedState,e]}function ul(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=je.updateQueue,t===null?(t={lastEffect:null,stores:null},je.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function tx(){return $t().memoizedState}function ka(e,t,n,r){var i=sn();je.flags|=e,i.memoizedState=ul(1|t,n,void 0,r===void 0?null:r)}function Co(e,t,n,r){var i=$t();r=r===void 0?null:r;var s=void 0;if($e!==null){var l=$e.memoizedState;if(s=l.destroy,r!==null&&lf(r,l.deps)){i.memoizedState=ul(t,n,s,r);return}}je.flags|=e,i.memoizedState=ul(1|t,n,s,r)}function ep(e,t){return ka(8390656,8,e,t)}function uf(e,t){return Co(2048,8,e,t)}function nx(e,t){return Co(4,2,e,t)}function rx(e,t){return Co(4,4,e,t)}function ix(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function sx(e,t,n){return n=n!=null?n.concat([e]):null,Co(4,4,ix.bind(null,t,e),n)}function cf(){}function lx(e,t){var n=$t();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&lf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ax(e,t){var n=$t();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&lf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ox(e,t,n){return Xr&21?(Xt(n,t)||(n=hy(),je.lanes|=n,Yr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,pt=!0),e.memoizedState=n)}function Hw(e,t){var n=ve;ve=n!==0&&4>n?n:4,e(!0);var r=yu.transition;yu.transition={};try{e(!1),t()}finally{ve=n,yu.transition=r}}function ux(){return $t().memoizedState}function qw(e,t,n){var r=gr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},cx(e))dx(t,n);else if(n=qy(e,t,n,r),n!==null){var i=st();Zt(n,e,r,i),fx(n,t,r)}}function Qw(e,t,n){var r=gr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(cx(e))dx(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var l=t.lastRenderedState,a=s(l,n);if(i.hasEagerState=!0,i.eagerState=a,Xt(a,l)){var o=t.interleaved;o===null?(i.next=i,ef(t)):(i.next=o.next,o.next=i),t.interleaved=i;return}}catch{}finally{}n=qy(e,t,i,r),n!==null&&(i=st(),Zt(n,e,r,i),fx(n,t,r))}}function cx(e){var t=e.alternate;return e===je||t!==null&&t===je}function dx(e,t){Us=Ga=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zd(e,n)}}var Za={readContext:Ft,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useInsertionEffect:Ge,useLayoutEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useMutableSource:Ge,useSyncExternalStore:Ge,useId:Ge,unstable_isNewReconciler:!1},Ww={readContext:Ft,useCallback:function(e,t){return sn().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:ep,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ka(4194308,4,ix.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ka(4194308,4,e,t)},useInsertionEffect:function(e,t){return ka(4,2,e,t)},useMemo:function(e,t){var n=sn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=qw.bind(null,je,e),[r.memoizedState,e]},useRef:function(e){var t=sn();return e={current:e},t.memoizedState=e},useState:Jh,useDebugValue:cf,useDeferredValue:function(e){return sn().memoizedState=e},useTransition:function(){var e=Jh(!1),t=e[0];return e=Hw.bind(null,e[1]),sn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=je,i=sn();if(_e){if(n===void 0)throw Error($(407));n=n()}else{if(n=t(),Ve===null)throw Error($(349));Xr&30||Ky(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,ep(Yy.bind(null,r,s,e),[e]),r.flags|=2048,ul(9,Xy.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=sn(),t=Ve.identifierPrefix;if(_e){var n=Pn,r=Rn;n=(r&~(1<<32-Gt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=al++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Vw++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Gw={readContext:Ft,useCallback:lx,useContext:Ft,useEffect:uf,useImperativeHandle:sx,useInsertionEffect:nx,useLayoutEffect:rx,useMemo:ax,useReducer:xu,useRef:tx,useState:function(){return xu(ol)},useDebugValue:cf,useDeferredValue:function(e){var t=$t();return ox(t,$e.memoizedState,e)},useTransition:function(){var e=xu(ol)[0],t=$t().memoizedState;return[e,t]},useMutableSource:Gy,useSyncExternalStore:Zy,useId:ux,unstable_isNewReconciler:!1},Zw={readContext:Ft,useCallback:lx,useContext:Ft,useEffect:uf,useImperativeHandle:sx,useInsertionEffect:nx,useLayoutEffect:rx,useMemo:ax,useReducer:vu,useRef:tx,useState:function(){return vu(ol)},useDebugValue:cf,useDeferredValue:function(e){var t=$t();return $e===null?t.memoizedState=e:ox(t,$e.memoizedState,e)},useTransition:function(){var e=vu(ol)[0],t=$t().memoizedState;return[e,t]},useMutableSource:Gy,useSyncExternalStore:Zy,useId:ux,unstable_isNewReconciler:!1};function Vt(e,t){if(e&&e.defaultProps){t=Pe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Nc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Pe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _o={isMounted:function(e){return(e=e._reactInternals)?li(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=st(),i=gr(e),s=Ln(r,i);s.payload=t,n!=null&&(s.callback=n),t=pr(e,s,i),t!==null&&(Zt(t,e,i,r),xa(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=st(),i=gr(e),s=Ln(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=pr(e,s,i),t!==null&&(Zt(t,e,i,r),xa(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=st(),r=gr(e),i=Ln(n,r);i.tag=2,t!=null&&(i.callback=t),t=pr(e,i,r),t!==null&&(Zt(t,e,r,n),xa(t,e,r))}};function tp(e,t,n,r,i,s,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,l):t.prototype&&t.prototype.isPureReactComponent?!tl(n,r)||!tl(i,s):!0}function hx(e,t,n){var r=!1,i=wr,s=t.contextType;return typeof s=="object"&&s!==null?s=Ft(s):(i=gt(t)?Zr:Ye.current,r=t.contextTypes,s=(r=r!=null)?Wi(e,i):wr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=_o,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function np(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&&_o.enqueueReplaceState(t,t.state,null)}function jc(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},tf(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Ft(s):(s=gt(t)?Zr:Ye.current,i.context=Wi(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Nc(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&_o.enqueueReplaceState(i,i.state,null),Qa(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Xi(e,t){try{var n="",r=t;do n+=Sk(r),r=r.return;while(r);var i=n}catch(s){i=`
39
+ Error generating stack: `+s.message+`
40
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function ku(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Rc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Kw=typeof WeakMap=="function"?WeakMap:Map;function px(e,t,n){n=Ln(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Xa||(Xa=!0,Mc=r),Rc(e,t)},n}function mx(e,t,n){n=Ln(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Rc(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Rc(e,t),typeof r!="function"&&(mr===null?mr=new Set([this]):mr.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function rp(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Kw;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)||(i.add(n),e=c1.bind(null,e,t,n),t.then(e,e))}function ip(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function sp(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ln(-1,1),t.tag=2,pr(n,t,1))),n.lanes|=1),e)}var Xw=Bn.ReactCurrentOwner,pt=!1;function nt(e,t,n,r){t.child=e===null?Hy(t,null,n,r):Zi(t,e.child,n,r)}function lp(e,t,n,r,i){n=n.render;var s=t.ref;return Ti(t,i),r=af(e,t,n,r,s,i),n=of(),e!==null&&!pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Mn(e,t,i)):(_e&&n&&Gd(t),t.flags|=1,nt(e,t,r,i),t.child)}function ap(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!xf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,gx(e,t,s,r,i)):(e=Ea(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var l=s.memoizedProps;if(n=n.compare,n=n!==null?n:tl,n(l,r)&&e.ref===t.ref)return Mn(e,t,i)}return t.flags|=1,e=yr(s,r),e.ref=t.ref,e.return=t,t.child=e}function gx(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(tl(s,r)&&e.ref===t.ref)if(pt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(pt=!0);else return t.lanes=e.lanes,Mn(e,t,i)}return Pc(e,t,n,r,i)}function yx(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Se(_i,wt),wt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Se(_i,wt),wt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Se(_i,wt),wt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Se(_i,wt),wt|=r;return nt(e,t,i,n),t.child}function xx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Pc(e,t,n,r,i){var s=gt(n)?Zr:Ye.current;return s=Wi(t,s),Ti(t,i),n=af(e,t,n,r,s,i),r=of(),e!==null&&!pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Mn(e,t,i)):(_e&&r&&Gd(t),t.flags|=1,nt(e,t,n,i),t.child)}function op(e,t,n,r,i){if(gt(n)){var s=!0;Ua(t)}else s=!1;if(Ti(t,i),t.stateNode===null)wa(e,t),hx(t,n,r),jc(t,n,r,i),r=!0;else if(e===null){var l=t.stateNode,a=t.memoizedProps;l.props=a;var o=l.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ft(u):(u=gt(n)?Zr:Ye.current,u=Wi(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof l.getSnapshotBeforeUpdate=="function";d||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(a!==r||o!==u)&&np(t,l,r,u),Zn=!1;var p=t.memoizedState;l.state=p,Qa(t,r,l,i),o=t.memoizedState,a!==r||p!==o||mt.current||Zn?(typeof c=="function"&&(Nc(t,n,c,r),o=t.memoizedState),(a=Zn||tp(t,n,a,r,p,o,u))?(d||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=o),l.props=r,l.state=o,l.context=u,r=a):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,Qy(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Vt(t.type,a),l.props=u,d=t.pendingProps,p=l.context,o=n.contextType,typeof o=="object"&&o!==null?o=Ft(o):(o=gt(n)?Zr:Ye.current,o=Wi(t,o));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(a!==d||p!==o)&&np(t,l,r,o),Zn=!1,p=t.memoizedState,l.state=p,Qa(t,r,l,i);var m=t.memoizedState;a!==d||p!==m||mt.current||Zn?(typeof h=="function"&&(Nc(t,n,h,r),m=t.memoizedState),(u=Zn||tp(t,n,u,r,p,m,o)||!1)?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,m,o),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,m,o)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),l.props=r,l.state=m,l.context=o,r=u):(typeof l.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Tc(e,t,n,r,s,i)}function Tc(e,t,n,r,i,s){xx(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&Wh(t,n,!1),Mn(e,t,s);r=t.stateNode,Xw.current=t;var a=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=Zi(t,e.child,null,s),t.child=Zi(t,null,a,s)):nt(e,t,a,s),t.memoizedState=r.state,i&&Wh(t,n,!0),t.child}function vx(e){var t=e.stateNode;t.pendingContext?Qh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Qh(e,t.context,!1),nf(e,t.containerInfo)}function up(e,t,n,r,i){return Gi(),Kd(i),t.flags|=256,nt(e,t,n,r),t.child}var Ic={dehydrated:null,treeContext:null,retryLane:0};function Lc(e){return{baseLanes:e,cachePool:null,transitions:null}}function kx(e,t,n){var r=t.pendingProps,i=Ne.current,s=!1,l=(t.flags&128)!==0,a;if((a=l)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Se(Ne,i&1),e===null)return Cc(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,s?(r=t.mode,s=t.child,l={mode:"hidden",children:l},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=l):s=Ro(l,r,0,null),e=Gr(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Lc(n),t.memoizedState=Ic,e):df(t,l));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return Yw(e,t,l,r,a,i,n);if(s){s=r.fallback,l=t.mode,i=e.child,a=i.sibling;var o={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=o,t.deletions=null):(r=yr(i,o),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=yr(a,s):(s=Gr(s,l,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,l=e.child.memoizedState,l=l===null?Lc(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ic,r}return s=e.child,e=s.sibling,r=yr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function df(e,t){return t=Ro({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Xl(e,t,n,r){return r!==null&&Kd(r),Zi(t,e.child,null,n),e=df(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yw(e,t,n,r,i,s,l){if(n)return t.flags&256?(t.flags&=-257,r=ku(Error($(422))),Xl(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Ro({mode:"visible",children:r.children},i,0,null),s=Gr(s,i,l,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Zi(t,e.child,null,l),t.child.memoizedState=Lc(l),t.memoizedState=Ic,s);if(!(t.mode&1))return Xl(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error($(419)),r=ku(s,r,void 0),Xl(e,t,l,r)}if(a=(l&e.childLanes)!==0,pt||a){if(r=Ve,r!==null){switch(l&-l){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|l)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,$n(e,i),Zt(r,e,i,-1))}return yf(),r=ku(Error($(421))),Xl(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=d1.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,St=hr(i.nextSibling),Ct=t,_e=!0,Wt=null,e!==null&&(It[Lt++]=Rn,It[Lt++]=Pn,It[Lt++]=Kr,Rn=e.id,Pn=e.overflow,Kr=t),t=df(t,r.children),t.flags|=4096,t)}function cp(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),_c(e.return,t,n)}function wu(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function wx(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(nt(e,t,r.children,n),r=Ne.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cp(e,n,t);else if(e.tag===19)cp(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Se(Ne,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Wa(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),wu(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Wa(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}wu(t,!0,n,null,s);break;case"together":wu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function wa(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Mn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Yr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,n=yr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=yr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Jw(e,t,n){switch(t.tag){case 3:vx(t),Gi();break;case 5:Wy(t);break;case 1:gt(t.type)&&Ua(t);break;case 4:nf(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Se(Ha,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Se(Ne,Ne.current&1),t.flags|=128,null):n&t.child.childLanes?kx(e,t,n):(Se(Ne,Ne.current&1),e=Mn(e,t,n),e!==null?e.sibling:null);Se(Ne,Ne.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return wx(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Se(Ne,Ne.current),r)break;return null;case 22:case 23:return t.lanes=0,yx(e,t,n)}return Mn(e,t,n)}var bx,Ac,Sx,Ex;bx=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ac=function(){};Sx=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Dr(hn.current);var s=null;switch(n){case"input":i=nc(e,i),r=nc(e,r),s=[];break;case"select":i=Pe({},i,{value:void 0}),r=Pe({},r,{value:void 0}),s=[];break;case"textarea":i=sc(e,i),r=sc(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ma)}ac(n,r);var l;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(l in a)a.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Gs.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var o=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&o!==a&&(o!=null||a!=null))if(u==="style")if(a){for(l in a)!a.hasOwnProperty(l)||o&&o.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in o)o.hasOwnProperty(l)&&a[l]!==o[l]&&(n||(n={}),n[l]=o[l])}else n||(s||(s=[]),s.push(u,n)),n=o;else u==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,a=a?a.__html:void 0,o!=null&&a!==o&&(s=s||[]).push(u,o)):u==="children"?typeof o!="string"&&typeof o!="number"||(s=s||[]).push(u,""+o):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Gs.hasOwnProperty(u)?(o!=null&&u==="onScroll"&&Ee("scroll",e),s||a===o||(s=[])):(s=s||[]).push(u,o))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Ex=function(e,t,n,r){n!==r&&(t.flags|=4)};function Es(e,t){if(!_e)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ze(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&14680064,r|=i.flags&14680064,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 e1(e,t,n){var r=t.pendingProps;switch(Zd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return gt(t.type)&&za(),Ze(t),null;case 3:return r=t.stateNode,Ki(),Ce(mt),Ce(Ye),sf(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Zl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Wt!==null&&(Bc(Wt),Wt=null))),Ac(e,t),Ze(t),null;case 5:rf(t);var i=Dr(ll.current);if(n=t.type,e!==null&&t.stateNode!=null)Sx(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error($(166));return Ze(t),null}if(e=Dr(hn.current),Zl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[cn]=t,r[il]=s,e=(t.mode&1)!==0,n){case"dialog":Ee("cancel",r),Ee("close",r);break;case"iframe":case"object":case"embed":Ee("load",r);break;case"video":case"audio":for(i=0;i<Ls.length;i++)Ee(Ls[i],r);break;case"source":Ee("error",r);break;case"img":case"image":case"link":Ee("error",r),Ee("load",r);break;case"details":Ee("toggle",r);break;case"input":vh(r,s),Ee("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ee("invalid",r);break;case"textarea":wh(r,s),Ee("invalid",r)}ac(n,s),i=null;for(var l in s)if(s.hasOwnProperty(l)){var a=s[l];l==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Gl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Gl(r.textContent,a,e),i=["children",""+a]):Gs.hasOwnProperty(l)&&a!=null&&l==="onScroll"&&Ee("scroll",r)}switch(n){case"input":zl(r),kh(r,s,!0);break;case"textarea":zl(r),bh(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ma)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Yg(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[cn]=t,e[il]=r,bx(e,t,!1,!1),t.stateNode=e;e:{switch(l=oc(n,r),n){case"dialog":Ee("cancel",e),Ee("close",e),i=r;break;case"iframe":case"object":case"embed":Ee("load",e),i=r;break;case"video":case"audio":for(i=0;i<Ls.length;i++)Ee(Ls[i],e);i=r;break;case"source":Ee("error",e),i=r;break;case"img":case"image":case"link":Ee("error",e),Ee("load",e),i=r;break;case"details":Ee("toggle",e),i=r;break;case"input":vh(e,r),i=nc(e,r),Ee("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Pe({},r,{value:void 0}),Ee("invalid",e);break;case"textarea":wh(e,r),i=sc(e,r),Ee("invalid",e);break;default:i=r}ac(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var o=a[s];s==="style"?ty(e,o):s==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,o!=null&&Jg(e,o)):s==="children"?typeof o=="string"?(n!=="textarea"||o!=="")&&Zs(e,o):typeof o=="number"&&Zs(e,""+o):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Gs.hasOwnProperty(s)?o!=null&&s==="onScroll"&&Ee("scroll",e):o!=null&&Ad(e,s,o,l))}switch(n){case"input":zl(e),kh(e,r,!1);break;case"textarea":zl(e),bh(e);break;case"option":r.value!=null&&e.setAttribute("value",""+kr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ni(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ni(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ma)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ze(t),null;case 6:if(e&&t.stateNode!=null)Ex(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error($(166));if(n=Dr(ll.current),Dr(hn.current),Zl(t)){if(r=t.stateNode,n=t.memoizedProps,r[cn]=t,(s=r.nodeValue!==n)&&(e=Ct,e!==null))switch(e.tag){case 3:Gl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Gl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[cn]=t,t.stateNode=r}return Ze(t),null;case 13:if(Ce(Ne),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&St!==null&&t.mode&1&&!(t.flags&128))By(),Gi(),t.flags|=98560,s=!1;else if(s=Zl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error($(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error($(317));s[cn]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),s=!1}else Wt!==null&&(Bc(Wt),Wt=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ne.current&1?ze===0&&(ze=3):yf())),t.updateQueue!==null&&(t.flags|=4),Ze(t),null);case 4:return Ki(),Ac(e,t),e===null&&nl(t.stateNode.containerInfo),Ze(t),null;case 10:return Jd(t.type._context),Ze(t),null;case 17:return gt(t.type)&&za(),Ze(t),null;case 19:if(Ce(Ne),s=t.memoizedState,s===null)return Ze(t),null;if(r=(t.flags&128)!==0,l=s.rendering,l===null)if(r)Es(s,!1);else{if(ze!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=Wa(e),l!==null){for(t.flags|=128,Es(s,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,l=s.alternate,l===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Se(Ne,Ne.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ae()>Yi&&(t.flags|=128,r=!0,Es(s,!1),t.lanes=4194304)}else{if(!r)if(e=Wa(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Es(s,!0),s.tail===null&&s.tailMode==="hidden"&&!l.alternate&&!_e)return Ze(t),null}else 2*Ae()-s.renderingStartTime>Yi&&n!==1073741824&&(t.flags|=128,r=!0,Es(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(n=s.last,n!==null?n.sibling=l:t.child=l,s.last=l)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ae(),t.sibling=null,n=Ne.current,Se(Ne,r?n&1|2:n&1),t):(Ze(t),null);case 22:case 23:return gf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?wt&1073741824&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function t1(e,t){switch(Zd(t),t.tag){case 1:return gt(t.type)&&za(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(),Ce(mt),Ce(Ye),sf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return rf(t),null;case 13:if(Ce(Ne),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ce(Ne),null;case 4:return Ki(),null;case 10:return Jd(t.type._context),null;case 22:case 23:return gf(),null;case 24:return null;default:return null}}var Yl=!1,Ke=!1,n1=typeof WeakSet=="function"?WeakSet:Set,W=null;function Ci(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Le(e,t,r)}else n.current=null}function Oc(e,t,n){try{n()}catch(r){Le(e,t,r)}}var dp=!1;function r1(e,t){if(xc=Da,e=Ry(),Wd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var l=0,a=-1,o=-1,u=0,c=0,d=e,p=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(a=l+i),d!==s||r!==0&&d.nodeType!==3||(o=l+r),d.nodeType===3&&(l+=d.nodeValue.length),(h=d.firstChild)!==null;)p=d,d=h;for(;;){if(d===e)break t;if(p===n&&++u===i&&(a=l),p===s&&++c===r&&(o=l),(h=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=h}n=a===-1||o===-1?null:{start:a,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(vc={focusedElem:e,selectionRange:n},Da=!1,W=t;W!==null;)if(t=W,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,_=m.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:Vt(t.type,y),_);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(w){Le(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return m=dp,dp=!1,m}function Bs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Oc(t,n,s)}i=i.next}while(i!==r)}}function No(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Dc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Cx(e){var t=e.alternate;t!==null&&(e.alternate=null,Cx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[cn],delete t[il],delete t[bc],delete t[Mw],delete t[zw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function _x(e){return e.tag===5||e.tag===3||e.tag===4}function fp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_x(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Fc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ma));else if(r!==4&&(e=e.child,e!==null))for(Fc(e,t,n),e=e.sibling;e!==null;)Fc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}var qe=null,Qt=!1;function qn(e,t,n){for(n=n.child;n!==null;)Nx(e,t,n),n=n.sibling}function Nx(e,t,n){if(fn&&typeof fn.onCommitFiberUnmount=="function")try{fn.onCommitFiberUnmount(vo,n)}catch{}switch(n.tag){case 5:Ke||Ci(n,t);case 6:var r=qe,i=Qt;qe=null,qn(e,t,n),qe=r,Qt=i,qe!==null&&(Qt?(e=qe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):qe.removeChild(n.stateNode));break;case 18:qe!==null&&(Qt?(e=qe,n=n.stateNode,e.nodeType===8?pu(e.parentNode,n):e.nodeType===1&&pu(e,n),Js(e)):pu(qe,n.stateNode));break;case 4:r=qe,i=Qt,qe=n.stateNode.containerInfo,Qt=!0,qn(e,t,n),qe=r,Qt=i;break;case 0:case 11:case 14:case 15:if(!Ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,l=s.destroy;s=s.tag,l!==void 0&&(s&2||s&4)&&Oc(n,t,l),i=i.next}while(i!==r)}qn(e,t,n);break;case 1:if(!Ke&&(Ci(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Le(n,t,a)}qn(e,t,n);break;case 21:qn(e,t,n);break;case 22:n.mode&1?(Ke=(r=Ke)||n.memoizedState!==null,qn(e,t,n),Ke=r):qn(e,t,n);break;default:qn(e,t,n)}}function hp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new n1),t.forEach(function(r){var i=f1.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Bt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,l=t,a=l;e:for(;a!==null;){switch(a.tag){case 5:qe=a.stateNode,Qt=!1;break e;case 3:qe=a.stateNode.containerInfo,Qt=!0;break e;case 4:qe=a.stateNode.containerInfo,Qt=!0;break e}a=a.return}if(qe===null)throw Error($(160));Nx(s,l,i),qe=null,Qt=!1;var o=i.alternate;o!==null&&(o.return=null),i.return=null}catch(u){Le(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)jx(t,e),t=t.sibling}function jx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Bt(t,e),nn(e),r&4){try{Bs(3,e,e.return),No(3,e)}catch(y){Le(e,e.return,y)}try{Bs(5,e,e.return)}catch(y){Le(e,e.return,y)}}break;case 1:Bt(t,e),nn(e),r&512&&n!==null&&Ci(n,n.return);break;case 5:if(Bt(t,e),nn(e),r&512&&n!==null&&Ci(n,n.return),e.flags&32){var i=e.stateNode;try{Zs(i,"")}catch(y){Le(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,l=n!==null?n.memoizedProps:s,a=e.type,o=e.updateQueue;if(e.updateQueue=null,o!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&Kg(i,s),oc(a,l);var u=oc(a,s);for(l=0;l<o.length;l+=2){var c=o[l],d=o[l+1];c==="style"?ty(i,d):c==="dangerouslySetInnerHTML"?Jg(i,d):c==="children"?Zs(i,d):Ad(i,c,d,u)}switch(a){case"input":rc(i,s);break;case"textarea":Xg(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Ni(i,!!s.multiple,h,!1):p!==!!s.multiple&&(s.defaultValue!=null?Ni(i,!!s.multiple,s.defaultValue,!0):Ni(i,!!s.multiple,s.multiple?[]:"",!1))}i[il]=s}catch(y){Le(e,e.return,y)}}break;case 6:if(Bt(t,e),nn(e),r&4){if(e.stateNode===null)throw Error($(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(y){Le(e,e.return,y)}}break;case 3:if(Bt(t,e),nn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Js(t.containerInfo)}catch(y){Le(e,e.return,y)}break;case 4:Bt(t,e),nn(e);break;case 13:Bt(t,e),nn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(pf=Ae())),r&4&&hp(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Ke=(u=Ke)||c,Bt(t,e),Ke=u):Bt(t,e),nn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(W=e,c=e.child;c!==null;){for(d=W=c;W!==null;){switch(p=W,h=p.child,p.tag){case 0:case 11:case 14:case 15:Bs(4,p,p.return);break;case 1:Ci(p,p.return);var m=p.stateNode;if(typeof m.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(y){Le(r,n,y)}}break;case 5:Ci(p,p.return);break;case 22:if(p.memoizedState!==null){mp(d);continue}}h!==null?(h.return=p,W=h):mp(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,o=d.memoizedProps.style,l=o!=null&&o.hasOwnProperty("display")?o.display:null,a.style.display=ey("display",l))}catch(y){Le(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(y){Le(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Bt(t,e),nn(e),r&4&&hp(e);break;case 21:break;default:Bt(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(_x(n)){var r=n;break e}n=n.return}throw Error($(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Zs(i,""),r.flags&=-33);var s=fp(e);$c(e,s,i);break;case 3:case 4:var l=r.stateNode.containerInfo,a=fp(e);Fc(e,a,l);break;default:throw Error($(161))}}catch(o){Le(e,e.return,o)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function i1(e,t,n){W=e,Rx(e)}function Rx(e,t,n){for(var r=(e.mode&1)!==0;W!==null;){var i=W,s=i.child;if(i.tag===22&&r){var l=i.memoizedState!==null||Yl;if(!l){var a=i.alternate,o=a!==null&&a.memoizedState!==null||Ke;a=Yl;var u=Ke;if(Yl=l,(Ke=o)&&!u)for(W=i;W!==null;)l=W,o=l.child,l.tag===22&&l.memoizedState!==null?gp(i):o!==null?(o.return=l,W=o):gp(i);for(;s!==null;)W=s,Rx(s),s=s.sibling;W=i,Yl=a,Ke=u}pp(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,W=s):pp(e)}}function pp(e){for(;W!==null;){var t=W;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ke||No(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ke)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Vt(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Yh(t,s,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Yh(t,l,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var o=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":o.autoFocus&&n.focus();break;case"img":o.src&&(n.src=o.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Js(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}Ke||t.flags&512&&Dc(t)}catch(p){Le(t,t.return,p)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function mp(e){for(;W!==null;){var t=W;if(t===e){W=null;break}var n=t.sibling;if(n!==null){n.return=t.return,W=n;break}W=t.return}}function gp(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{No(4,t)}catch(o){Le(t,n,o)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(o){Le(t,i,o)}}var s=t.return;try{Dc(t)}catch(o){Le(t,s,o)}break;case 5:var l=t.return;try{Dc(t)}catch(o){Le(t,l,o)}}}catch(o){Le(t,t.return,o)}if(t===e){W=null;break}var a=t.sibling;if(a!==null){a.return=t.return,W=a;break}W=t.return}}var s1=Math.ceil,Ka=Bn.ReactCurrentDispatcher,ff=Bn.ReactCurrentOwner,Dt=Bn.ReactCurrentBatchConfig,pe=0,Ve=null,Fe=null,Qe=0,wt=0,_i=Cr(0),ze=0,cl=null,Yr=0,jo=0,hf=0,Vs=null,ht=null,pf=0,Yi=1/0,Sn=null,Xa=!1,Mc=null,mr=null,Jl=!1,ur=null,Ya=0,Hs=0,zc=null,ba=-1,Sa=0;function st(){return pe&6?Ae():ba!==-1?ba:ba=Ae()}function gr(e){return e.mode&1?pe&2&&Qe!==0?Qe&-Qe:Bw.transition!==null?(Sa===0&&(Sa=hy()),Sa):(e=ve,e!==0||(e=window.event,e=e===void 0?16:ky(e.type)),e):1}function Zt(e,t,n,r){if(50<Hs)throw Hs=0,zc=null,Error($(185));Sl(e,n,r),(!(pe&2)||e!==Ve)&&(e===Ve&&(!(pe&2)&&(jo|=n),ze===4&&Yn(e,Qe)),yt(e,r),n===1&&pe===0&&!(t.mode&1)&&(Yi=Ae()+500,Eo&&_r()))}function yt(e,t){var n=e.callbackNode;Bk(e,t);var r=Oa(e,e===Ve?Qe:0);if(r===0)n!==null&&Ch(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ch(n),t===1)e.tag===0?Uw(yp.bind(null,e)):My(yp.bind(null,e)),Fw(function(){!(pe&6)&&_r()}),n=null;else{switch(py(r)){case 1:n=Md;break;case 4:n=dy;break;case 16:n=Aa;break;case 536870912:n=fy;break;default:n=Aa}n=Fx(n,Px.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Px(e,t){if(ba=-1,Sa=0,pe&6)throw Error($(327));var n=e.callbackNode;if(Ii()&&e.callbackNode!==n)return null;var r=Oa(e,e===Ve?Qe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ja(e,r);else{t=r;var i=pe;pe|=2;var s=Ix();(Ve!==e||Qe!==t)&&(Sn=null,Yi=Ae()+500,Wr(e,t));do try{o1();break}catch(a){Tx(e,a)}while(!0);Yd(),Ka.current=s,pe=i,Fe!==null?t=0:(Ve=null,Qe=0,t=ze)}if(t!==0){if(t===2&&(i=hc(e),i!==0&&(r=i,t=Uc(e,i))),t===1)throw n=cl,Wr(e,0),Yn(e,r),yt(e,Ae()),n;if(t===6)Yn(e,r);else{if(i=e.current.alternate,!(r&30)&&!l1(i)&&(t=Ja(e,r),t===2&&(s=hc(e),s!==0&&(r=s,t=Uc(e,s))),t===1))throw n=cl,Wr(e,0),Yn(e,r),yt(e,Ae()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error($(345));case 2:Ir(e,ht,Sn);break;case 3:if(Yn(e,r),(r&130023424)===r&&(t=pf+500-Ae(),10<t)){if(Oa(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){st(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=wc(Ir.bind(null,e,ht,Sn),t);break}Ir(e,ht,Sn);break;case 4:if(Yn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var l=31-Gt(r);s=1<<l,l=t[l],l>i&&(i=l),r&=~s}if(r=i,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*s1(r/1960))-r,10<r){e.timeoutHandle=wc(Ir.bind(null,e,ht,Sn),r);break}Ir(e,ht,Sn);break;case 5:Ir(e,ht,Sn);break;default:throw Error($(329))}}}return yt(e,Ae()),e.callbackNode===n?Px.bind(null,e):null}function Uc(e,t){var n=Vs;return e.current.memoizedState.isDehydrated&&(Wr(e,t).flags|=256),e=Ja(e,t),e!==2&&(t=ht,ht=n,t!==null&&Bc(t)),e}function Bc(e){ht===null?ht=e:ht.push.apply(ht,e)}function l1(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Xt(s(),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 Yn(e,t){for(t&=~hf,t&=~jo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Gt(t),r=1<<n;e[n]=-1,t&=~r}}function yp(e){if(pe&6)throw Error($(327));Ii();var t=Oa(e,0);if(!(t&1))return yt(e,Ae()),null;var n=Ja(e,t);if(e.tag!==0&&n===2){var r=hc(e);r!==0&&(t=r,n=Uc(e,r))}if(n===1)throw n=cl,Wr(e,0),Yn(e,t),yt(e,Ae()),n;if(n===6)throw Error($(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ir(e,ht,Sn),yt(e,Ae()),null}function mf(e,t){var n=pe;pe|=1;try{return e(t)}finally{pe=n,pe===0&&(Yi=Ae()+500,Eo&&_r())}}function Jr(e){ur!==null&&ur.tag===0&&!(pe&6)&&Ii();var t=pe;pe|=1;var n=Dt.transition,r=ve;try{if(Dt.transition=null,ve=1,e)return e()}finally{ve=r,Dt.transition=n,pe=t,!(pe&6)&&_r()}}function gf(){wt=_i.current,Ce(_i)}function Wr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Dw(n)),Fe!==null)for(n=Fe.return;n!==null;){var r=n;switch(Zd(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&za();break;case 3:Ki(),Ce(mt),Ce(Ye),sf();break;case 5:rf(r);break;case 4:Ki();break;case 13:Ce(Ne);break;case 19:Ce(Ne);break;case 10:Jd(r.type._context);break;case 22:case 23:gf()}n=n.return}if(Ve=e,Fe=e=yr(e.current,null),Qe=wt=t,ze=0,cl=null,hf=jo=Yr=0,ht=Vs=null,Or!==null){for(t=0;t<Or.length;t++)if(n=Or[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var l=s.next;s.next=i,r.next=l}n.pending=r}Or=null}return e}function Tx(e,t){do{var n=Fe;try{if(Yd(),va.current=Za,Ga){for(var r=je.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Ga=!1}if(Xr=0,Be=$e=je=null,Us=!1,al=0,ff.current=null,n===null||n.return===null){ze=1,cl=t,Fe=null;break}e:{var s=e,l=n.return,a=n,o=t;if(t=Qe,a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){var u=o,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var p=c.alternate;p?(c.updateQueue=p.updateQueue,c.memoizedState=p.memoizedState,c.lanes=p.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=ip(l);if(h!==null){h.flags&=-257,sp(h,l,a,s,t),h.mode&1&&rp(s,u,t),t=h,o=u;var m=t.updateQueue;if(m===null){var y=new Set;y.add(o),t.updateQueue=y}else m.add(o);break e}else{if(!(t&1)){rp(s,u,t),yf();break e}o=Error($(426))}}else if(_e&&a.mode&1){var _=ip(l);if(_!==null){!(_.flags&65536)&&(_.flags|=256),sp(_,l,a,s,t),Kd(Xi(o,a));break e}}s=o=Xi(o,a),ze!==4&&(ze=2),Vs===null?Vs=[s]:Vs.push(s),s=l;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=px(s,o,t);Xh(s,g);break e;case 1:a=o;var x=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof x.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(mr===null||!mr.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var w=mx(s,a,t);Xh(s,w);break e}}s=s.return}while(s!==null)}Ax(n)}catch(j){t=j,Fe===n&&n!==null&&(Fe=n=n.return);continue}break}while(!0)}function Ix(){var e=Ka.current;return Ka.current=Za,e===null?Za:e}function yf(){(ze===0||ze===3||ze===2)&&(ze=4),Ve===null||!(Yr&268435455)&&!(jo&268435455)||Yn(Ve,Qe)}function Ja(e,t){var n=pe;pe|=2;var r=Ix();(Ve!==e||Qe!==t)&&(Sn=null,Wr(e,t));do try{a1();break}catch(i){Tx(e,i)}while(!0);if(Yd(),pe=n,Ka.current=r,Fe!==null)throw Error($(261));return Ve=null,Qe=0,ze}function a1(){for(;Fe!==null;)Lx(Fe)}function o1(){for(;Fe!==null&&!Lk();)Lx(Fe)}function Lx(e){var t=Dx(e.alternate,e,wt);e.memoizedProps=e.pendingProps,t===null?Ax(e):Fe=t,ff.current=null}function Ax(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=t1(n,t),n!==null){n.flags&=32767,Fe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ze=6,Fe=null;return}}else if(n=e1(n,t,wt),n!==null){Fe=n;return}if(t=t.sibling,t!==null){Fe=t;return}Fe=t=e}while(t!==null);ze===0&&(ze=5)}function Ir(e,t,n){var r=ve,i=Dt.transition;try{Dt.transition=null,ve=1,u1(e,t,n,r)}finally{Dt.transition=i,ve=r}return null}function u1(e,t,n,r){do Ii();while(ur!==null);if(pe&6)throw Error($(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error($(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(Vk(e,s),e===Ve&&(Fe=Ve=null,Qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Jl||(Jl=!0,Fx(Aa,function(){return Ii(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Dt.transition,Dt.transition=null;var l=ve;ve=1;var a=pe;pe|=4,ff.current=null,r1(e,n),jx(n,e),Rw(vc),Da=!!xc,vc=xc=null,e.current=n,i1(n),Ak(),pe=a,ve=l,Dt.transition=s}else e.current=n;if(Jl&&(Jl=!1,ur=e,Ya=i),s=e.pendingLanes,s===0&&(mr=null),Fk(n.stateNode),yt(e,Ae()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Xa)throw Xa=!1,e=Mc,Mc=null,e;return Ya&1&&e.tag!==0&&Ii(),s=e.pendingLanes,s&1?e===zc?Hs++:(Hs=0,zc=e):Hs=0,_r(),null}function Ii(){if(ur!==null){var e=py(Ya),t=Dt.transition,n=ve;try{if(Dt.transition=null,ve=16>e?16:e,ur===null)var r=!1;else{if(e=ur,ur=null,Ya=0,pe&6)throw Error($(331));var i=pe;for(pe|=4,W=e.current;W!==null;){var s=W,l=s.child;if(W.flags&16){var a=s.deletions;if(a!==null){for(var o=0;o<a.length;o++){var u=a[o];for(W=u;W!==null;){var c=W;switch(c.tag){case 0:case 11:case 15:Bs(8,c,s)}var d=c.child;if(d!==null)d.return=c,W=d;else for(;W!==null;){c=W;var p=c.sibling,h=c.return;if(Cx(c),c===u){W=null;break}if(p!==null){p.return=h,W=p;break}W=h}}}var m=s.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var _=y.sibling;y.sibling=null,y=_}while(y!==null)}}W=s}}if(s.subtreeFlags&2064&&l!==null)l.return=s,W=l;else e:for(;W!==null;){if(s=W,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Bs(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,W=g;break e}W=s.return}}var x=e.current;for(W=x;W!==null;){l=W;var v=l.child;if(l.subtreeFlags&2064&&v!==null)v.return=l,W=v;else e:for(l=x;W!==null;){if(a=W,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:No(9,a)}}catch(j){Le(a,a.return,j)}if(a===l){W=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,W=w;break e}W=a.return}}if(pe=i,_r(),fn&&typeof fn.onPostCommitFiberRoot=="function")try{fn.onPostCommitFiberRoot(vo,e)}catch{}r=!0}return r}finally{ve=n,Dt.transition=t}}return!1}function xp(e,t,n){t=Xi(n,t),t=px(e,t,1),e=pr(e,t,1),t=st(),e!==null&&(Sl(e,1,t),yt(e,t))}function Le(e,t,n){if(e.tag===3)xp(e,e,n);else for(;t!==null;){if(t.tag===3){xp(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(mr===null||!mr.has(r))){e=Xi(n,e),e=mx(t,e,1),t=pr(t,e,1),e=st(),t!==null&&(Sl(t,1,e),yt(t,e));break}}t=t.return}}function c1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=st(),e.pingedLanes|=e.suspendedLanes&n,Ve===e&&(Qe&n)===n&&(ze===4||ze===3&&(Qe&130023424)===Qe&&500>Ae()-pf?Wr(e,0):hf|=n),yt(e,t)}function Ox(e,t){t===0&&(e.mode&1?(t=Vl,Vl<<=1,!(Vl&130023424)&&(Vl=4194304)):t=1);var n=st();e=$n(e,t),e!==null&&(Sl(e,t,n),yt(e,n))}function d1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ox(e,n)}function f1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error($(314))}r!==null&&r.delete(t),Ox(e,n)}var Dx;Dx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||mt.current)pt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return pt=!1,Jw(e,t,n);pt=!!(e.flags&131072)}else pt=!1,_e&&t.flags&1048576&&zy(t,Va,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;wa(e,t),e=t.pendingProps;var i=Wi(t,Ye.current);Ti(t,n),i=af(null,t,r,e,i,n);var s=of();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,gt(r)?(s=!0,Ua(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,tf(t),i.updater=_o,t.stateNode=i,i._reactInternals=t,jc(t,r,e,n),t=Tc(null,t,r,!0,s,n)):(t.tag=0,_e&&s&&Gd(t),nt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(wa(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=p1(r),e=Vt(r,e),i){case 0:t=Pc(null,t,r,e,n);break e;case 1:t=op(null,t,r,e,n);break e;case 11:t=lp(null,t,r,e,n);break e;case 14:t=ap(null,t,r,Vt(r.type,e),n);break e}throw Error($(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Vt(r,i),Pc(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Vt(r,i),op(e,t,r,i,n);case 3:e:{if(vx(t),e===null)throw Error($(387));r=t.pendingProps,s=t.memoizedState,i=s.element,Qy(e,t),Qa(t,r,null,n);var l=t.memoizedState;if(r=l.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Xi(Error($(423)),t),t=up(e,t,r,n,i);break e}else if(r!==i){i=Xi(Error($(424)),t),t=up(e,t,r,n,i);break e}else for(St=hr(t.stateNode.containerInfo.firstChild),Ct=t,_e=!0,Wt=null,n=Hy(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gi(),r===i){t=Mn(e,t,n);break e}nt(e,t,r,n)}t=t.child}return t;case 5:return Wy(t),e===null&&Cc(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,l=i.children,kc(r,i)?l=null:s!==null&&kc(r,s)&&(t.flags|=32),xx(e,t),nt(e,t,l,n),t.child;case 6:return e===null&&Cc(t),null;case 13:return kx(e,t,n);case 4:return nf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Zi(t,null,r,n):nt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Vt(r,i),lp(e,t,r,i,n);case 7:return nt(e,t,t.pendingProps,n),t.child;case 8:return nt(e,t,t.pendingProps.children,n),t.child;case 12:return nt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,l=i.value,Se(Ha,r._currentValue),r._currentValue=l,s!==null)if(Xt(s.value,l)){if(s.children===i.children&&!mt.current){t=Mn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){l=s.child;for(var o=a.firstContext;o!==null;){if(o.context===r){if(s.tag===1){o=Ln(-1,n&-n),o.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?o.next=o:(o.next=c.next,c.next=o),u.pending=o}}s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),_c(s.return,n,t),a.lanes|=n;break}o=o.next}}else if(s.tag===10)l=s.type===t.type?null:s.child;else if(s.tag===18){if(l=s.return,l===null)throw Error($(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),_c(l,n,t),l=s.sibling}else l=s.child;if(l!==null)l.return=s;else for(l=s;l!==null;){if(l===t){l=null;break}if(s=l.sibling,s!==null){s.return=l.return,l=s;break}l=l.return}s=l}nt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ti(t,n),i=Ft(i),r=r(i),t.flags|=1,nt(e,t,r,n),t.child;case 14:return r=t.type,i=Vt(r,t.pendingProps),i=Vt(r.type,i),ap(e,t,r,i,n);case 15:return gx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Vt(r,i),wa(e,t),t.tag=1,gt(r)?(e=!0,Ua(t)):e=!1,Ti(t,n),hx(t,r,i),jc(t,r,i,n),Tc(null,t,r,!0,e,n);case 19:return wx(e,t,n);case 22:return yx(e,t,n)}throw Error($(156,t.tag))};function Fx(e,t){return cy(e,t)}function h1(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.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 Ot(e,t,n,r){return new h1(e,t,n,r)}function xf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function p1(e){if(typeof e=="function")return xf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Dd)return 11;if(e===Fd)return 14}return 2}function yr(e,t){var n=e.alternate;return n===null?(n=Ot(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&14680064,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}function Ea(e,t,n,r,i,s){var l=2;if(r=e,typeof e=="function")xf(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case gi:return Gr(n.children,i,s,t);case Od:l=8,i|=8;break;case Yu:return e=Ot(12,n,t,i|2),e.elementType=Yu,e.lanes=s,e;case Ju:return e=Ot(13,n,t,i),e.elementType=Ju,e.lanes=s,e;case ec:return e=Ot(19,n,t,i),e.elementType=ec,e.lanes=s,e;case Wg:return Ro(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qg:l=10;break e;case Qg:l=9;break e;case Dd:l=11;break e;case Fd:l=14;break e;case Gn:l=16,r=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=Ot(l,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Gr(e,t,n,r){return e=Ot(7,e,r,t),e.lanes=n,e}function Ro(e,t,n,r){return e=Ot(22,e,r,t),e.elementType=Wg,e.lanes=n,e.stateNode={isHidden:!1},e}function bu(e,t,n){return e=Ot(6,e,null,t),e.lanes=n,e}function Su(e,t,n){return t=Ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function m1(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ru(0),this.expirationTimes=ru(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ru(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function vf(e,t,n,r,i,s,l,a,o){return e=new m1(e,t,n,a,o),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ot(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},tf(s),e}function g1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:mi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function $x(e){if(!e)return wr;e=e._reactInternals;e:{if(li(e)!==e||e.tag!==1)throw Error($(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(gt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error($(171))}if(e.tag===1){var n=e.type;if(gt(n))return $y(e,n,t)}return t}function Mx(e,t,n,r,i,s,l,a,o){return e=vf(n,r,!0,e,i,s,l,a,o),e.context=$x(null),n=e.current,r=st(),i=gr(n),s=Ln(r,i),s.callback=t??null,pr(n,s,i),e.current.lanes=i,Sl(e,i,r),yt(e,r),e}function Po(e,t,n,r){var i=t.current,s=st(),l=gr(i);return n=$x(n),t.context===null?t.context=n:t.pendingContext=n,t=Ln(s,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=pr(i,t,l),e!==null&&(Zt(e,i,l,s),xa(e,i,l)),l}function eo(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function vp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function kf(e,t){vp(e,t),(e=e.alternate)&&vp(e,t)}function y1(){return null}var zx=typeof reportError=="function"?reportError:function(e){console.error(e)};function wf(e){this._internalRoot=e}To.prototype.render=wf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($(409));Po(e,t,null,null)};To.prototype.unmount=wf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Jr(function(){Po(null,e,null,null)}),t[Fn]=null}};function To(e){this._internalRoot=e}To.prototype.unstable_scheduleHydration=function(e){if(e){var t=yy();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Xn.length&&t!==0&&t<Xn[n].priority;n++);Xn.splice(n,0,e),n===0&&vy(e)}};function bf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Io(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function kp(){}function x1(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=eo(l);s.call(u)}}var l=Mx(t,r,e,0,null,!1,!1,"",kp);return e._reactRootContainer=l,e[Fn]=l.current,nl(e.nodeType===8?e.parentNode:e),Jr(),l}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=eo(o);a.call(u)}}var o=vf(e,0,!1,null,null,!1,!1,"",kp);return e._reactRootContainer=o,e[Fn]=o.current,nl(e.nodeType===8?e.parentNode:e),Jr(function(){Po(t,o,n,r)}),o}function Lo(e,t,n,r,i){var s=n._reactRootContainer;if(s){var l=s;if(typeof i=="function"){var a=i;i=function(){var o=eo(l);a.call(o)}}Po(t,l,e,i)}else l=x1(n,t,e,i,r);return eo(l)}my=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Is(t.pendingLanes);n!==0&&(zd(t,n|1),yt(t,Ae()),!(pe&6)&&(Yi=Ae()+500,_r()))}break;case 13:Jr(function(){var r=$n(e,1);if(r!==null){var i=st();Zt(r,e,1,i)}}),kf(e,1)}};Ud=function(e){if(e.tag===13){var t=$n(e,134217728);if(t!==null){var n=st();Zt(t,e,134217728,n)}kf(e,134217728)}};gy=function(e){if(e.tag===13){var t=gr(e),n=$n(e,t);if(n!==null){var r=st();Zt(n,e,t,r)}kf(e,t)}};yy=function(){return ve};xy=function(e,t){var n=ve;try{return ve=e,t()}finally{ve=n}};cc=function(e,t,n){switch(t){case"input":if(rc(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=So(r);if(!i)throw Error($(90));Zg(r),rc(r,i)}}}break;case"textarea":Xg(e,n);break;case"select":t=n.value,t!=null&&Ni(e,!!n.multiple,t,!1)}};iy=mf;sy=Jr;var v1={usingClientEntryPoint:!1,Events:[Cl,ki,So,ny,ry,mf]},Cs={findFiberByHostInstance:Ar,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},k1={bundleType:Cs.bundleType,version:Cs.version,rendererPackageName:Cs.rendererPackageName,rendererConfig:Cs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Bn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=oy(e),e===null?null:e.stateNode},findFiberByHostInstance:Cs.findFiberByHostInstance||y1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ea=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ea.isDisabled&&ea.supportsFiber)try{vo=ea.inject(k1),fn=ea}catch{}}jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=v1;jt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bf(t))throw Error($(200));return g1(e,t,null,n)};jt.createRoot=function(e,t){if(!bf(e))throw Error($(299));var n=!1,r="",i=zx;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=vf(e,1,!1,null,null,n,!1,r,i),e[Fn]=t.current,nl(e.nodeType===8?e.parentNode:e),new wf(t)};jt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error($(188)):(e=Object.keys(e).join(","),Error($(268,e)));return e=oy(t),e=e===null?null:e.stateNode,e};jt.flushSync=function(e){return Jr(e)};jt.hydrate=function(e,t,n){if(!Io(t))throw Error($(200));return Lo(null,e,t,!0,n)};jt.hydrateRoot=function(e,t,n){if(!bf(e))throw Error($(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",l=zx;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=Mx(t,null,e,1,n??null,i,!1,s,l),e[Fn]=t.current,nl(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new To(t)};jt.render=function(e,t,n){if(!Io(t))throw Error($(200));return Lo(null,e,t,!1,n)};jt.unmountComponentAtNode=function(e){if(!Io(e))throw Error($(40));return e._reactRootContainer?(Jr(function(){Lo(null,null,e,!1,function(){e._reactRootContainer=null,e[Fn]=null})}),!0):!1};jt.unstable_batchedUpdates=mf;jt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Io(n))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return Lo(e,t,n,!1,r)};jt.version="18.3.1-next-f1338f8080-20240426";function Ux(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ux)}catch(e){console.error(e)}}Ux(),Ug.exports=jt;var w1=Ug.exports,wp=w1;Ku.createRoot=wp.createRoot,Ku.hydrateRoot=wp.hydrateRoot;/**
41
+ * react-router v7.10.1
42
+ *
43
+ * Copyright (c) Remix Software Inc.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE.md file in the root directory of this source tree.
47
+ *
48
+ * @license MIT
49
+ */var bp="popstate";function b1(e={}){function t(r,i){let{pathname:s,search:l,hash:a}=r.location;return Vc("",{pathname:s,search:l,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:dl(i)}return E1(t,n,null,e)}function Re(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Mt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function S1(){return Math.random().toString(36).substring(2,10)}function Sp(e,t){return{usr:e.state,key:e.key,idx:t}}function Vc(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?us(t):t,state:n,key:t&&t.key||r||S1()}}function dl({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function us(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function E1(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,l=i.history,a="POP",o=null,u=c();u==null&&(u=0,l.replaceState({...l.state,idx:u},""));function c(){return(l.state||{idx:null}).idx}function d(){a="POP";let _=c(),g=_==null?null:_-u;u=_,o&&o({action:a,location:y.location,delta:g})}function p(_,g){a="PUSH";let x=Vc(y.location,_,g);u=c()+1;let v=Sp(x,u),w=y.createHref(x);try{l.pushState(v,"",w)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(w)}s&&o&&o({action:a,location:y.location,delta:1})}function h(_,g){a="REPLACE";let x=Vc(y.location,_,g);u=c();let v=Sp(x,u),w=y.createHref(x);l.replaceState(v,"",w),s&&o&&o({action:a,location:y.location,delta:0})}function m(_){return C1(_)}let y={get action(){return a},get location(){return e(i,l)},listen(_){if(o)throw new Error("A history only accepts one active listener");return i.addEventListener(bp,d),o=_,()=>{i.removeEventListener(bp,d),o=null}},createHref(_){return t(i,_)},createURL:m,encodeLocation(_){let g=m(_);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:h,go(_){return l.go(_)}};return y}function C1(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Re(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:dl(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Bx(e,t,n="/"){return _1(e,t,n,!1)}function _1(e,t,n,r){let i=typeof t=="string"?us(t):t,s=zn(i.pathname||"/",n);if(s==null)return null;let l=Vx(e);N1(l);let a=null;for(let o=0;a==null&&o<l.length;++o){let u=$1(s);a=D1(l[o],u,r)}return a}function Vx(e,t=[],n=[],r="",i=!1){let s=(l,a,o=i,u)=>{let c={relativePath:u===void 0?l.path||"":u,caseSensitive:l.caseSensitive===!0,childrenIndex:a,route:l};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(r)&&o)return;Re(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let d=An([r,c.relativePath]),p=n.concat(c);l.children&&l.children.length>0&&(Re(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),Vx(l.children,t,p,d,o)),!(l.path==null&&!l.index)&&t.push({path:d,score:A1(d,l.index),routesMeta:p})};return e.forEach((l,a)=>{var o;if(l.path===""||!((o=l.path)!=null&&o.includes("?")))s(l,a);else for(let u of Hx(l.path))s(l,a,!0,u)}),t}function Hx(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let l=Hx(r.join("/")),a=[];return a.push(...l.map(o=>o===""?s:[s,o].join("/"))),i&&a.push(...l),a.map(o=>e.startsWith("/")&&o===""?"/":o)}function N1(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:O1(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var j1=/^:[\w-]+$/,R1=3,P1=2,T1=1,I1=10,L1=-2,Ep=e=>e==="*";function A1(e,t){let n=e.split("/"),r=n.length;return n.some(Ep)&&(r+=L1),t&&(r+=P1),n.filter(i=>!Ep(i)).reduce((i,s)=>i+(j1.test(s)?R1:s===""?T1:I1),r)}function O1(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function D1(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",l=[];for(let a=0;a<r.length;++a){let o=r[a],u=a===r.length-1,c=s==="/"?t:t.slice(s.length)||"/",d=to({path:o.relativePath,caseSensitive:o.caseSensitive,end:u},c),p=o.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=to({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},c)),!d)return null;Object.assign(i,d.params),l.push({params:i,pathname:An([s,d.pathname]),pathnameBase:V1(An([s,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(s=An([s,d.pathnameBase]))}return l}function to(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=F1(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],l=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,{paramName:c,isOptional:d},p)=>{if(c==="*"){let m=a[p]||"";l=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const h=a[p];return d&&!h?u[c]=void 0:u[c]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:l,pattern:e}}function F1(e,t=!1,n=!0){Mt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,a,o)=>(r.push({paramName:a,isOptional:o!=null}),o?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function $1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Mt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function zn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var M1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,z1=e=>M1.test(e);function U1(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?us(e):e,s;if(n)if(z1(n))s=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),Mt(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${n}`)}n.startsWith("/")?s=Cp(n.substring(1),"/"):s=Cp(n,t)}else s=t;return{pathname:s,search:H1(r),hash:q1(i)}}function Cp(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Eu(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function B1(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function qx(e){let t=B1(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Qx(e,t,n,r=!1){let i;typeof e=="string"?i=us(e):(i={...e},Re(!i.pathname||!i.pathname.includes("?"),Eu("?","pathname","search",i)),Re(!i.pathname||!i.pathname.includes("#"),Eu("#","pathname","hash",i)),Re(!i.search||!i.search.includes("#"),Eu("#","search","hash",i)));let s=e===""||i.pathname==="",l=s?"/":i.pathname,a;if(l==null)a=n;else{let d=t.length-1;if(!r&&l.startsWith("..")){let p=l.split("/");for(;p[0]==="..";)p.shift(),d-=1;i.pathname=p.join("/")}a=d>=0?t[d]:"/"}let o=U1(i,a),u=l&&l!=="/"&&l.endsWith("/"),c=(s||l===".")&&n.endsWith("/");return!o.pathname.endsWith("/")&&(u||c)&&(o.pathname+="/"),o}var An=e=>e.join("/").replace(/\/\/+/g,"/"),V1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),H1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,q1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Q1(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function W1(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Wx=["POST","PUT","PATCH","DELETE"];new Set(Wx);var G1=["GET",...Wx];new Set(G1);var cs=C.createContext(null);cs.displayName="DataRouter";var Ao=C.createContext(null);Ao.displayName="DataRouterState";C.createContext(!1);var Gx=C.createContext({isTransitioning:!1});Gx.displayName="ViewTransition";var Z1=C.createContext(new Map);Z1.displayName="Fetchers";var K1=C.createContext(null);K1.displayName="Await";var Yt=C.createContext(null);Yt.displayName="Navigation";var Nl=C.createContext(null);Nl.displayName="Location";var gn=C.createContext({outlet:null,matches:[],isDataRoute:!1});gn.displayName="Route";var Sf=C.createContext(null);Sf.displayName="RouteError";function X1(e,{relative:t}={}){Re(jl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=C.useContext(Yt),{hash:i,pathname:s,search:l}=Rl(e,{relative:t}),a=s;return n!=="/"&&(a=s==="/"?n:An([n,s])),r.createHref({pathname:a,search:l,hash:i})}function jl(){return C.useContext(Nl)!=null}function yn(){return Re(jl(),"useLocation() may be used only in the context of a <Router> component."),C.useContext(Nl).location}var Zx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Kx(e){C.useContext(Yt).static||C.useLayoutEffect(e)}function Ef(){let{isDataRoute:e}=C.useContext(gn);return e?cb():Y1()}function Y1(){Re(jl(),"useNavigate() may be used only in the context of a <Router> component.");let e=C.useContext(cs),{basename:t,navigator:n}=C.useContext(Yt),{matches:r}=C.useContext(gn),{pathname:i}=yn(),s=JSON.stringify(qx(r)),l=C.useRef(!1);return Kx(()=>{l.current=!0}),C.useCallback((o,u={})=>{if(Mt(l.current,Zx),!l.current)return;if(typeof o=="number"){n.go(o);return}let c=Qx(o,JSON.parse(s),i,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:An([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,s,i,e])}C.createContext(null);function Xx(){let{matches:e}=C.useContext(gn),t=e[e.length-1];return t?t.params:{}}function Rl(e,{relative:t}={}){let{matches:n}=C.useContext(gn),{pathname:r}=yn(),i=JSON.stringify(qx(n));return C.useMemo(()=>Qx(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function J1(e,t){return Yx(e,t)}function Yx(e,t,n,r,i){var x;Re(jl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=C.useContext(Yt),{matches:l}=C.useContext(gn),a=l[l.length-1],o=a?a.params:{},u=a?a.pathname:"/",c=a?a.pathnameBase:"/",d=a&&a.route;{let v=d&&d.path||"";Jx(u,!d||v.endsWith("*")||v.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${v}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
50
+
51
+ Please change the parent <Route path="${v}"> to <Route path="${v==="/"?"*":`${v}/*`}">.`)}let p=yn(),h;if(t){let v=typeof t=="string"?us(t):t;Re(c==="/"||((x=v.pathname)==null?void 0:x.startsWith(c)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${v.pathname}" was given in the \`location\` prop.`),h=v}else h=p;let m=h.pathname||"/",y=m;if(c!=="/"){let v=c.replace(/^\//,"").split("/");y="/"+m.replace(/^\//,"").split("/").slice(v.length).join("/")}let _=Bx(e,{pathname:y});Mt(d||_!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Mt(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=ib(_&&_.map(v=>Object.assign({},v,{params:Object.assign({},o,v.params),pathname:An([c,s.encodeLocation?s.encodeLocation(v.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?c:An([c,s.encodeLocation?s.encodeLocation(v.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathnameBase])})),l,n,r,i);return t&&g?C.createElement(Nl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},g):g}function eb(){let e=ub(),t=Q1(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:s},"ErrorBoundary")," or"," ",C.createElement("code",{style:s},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:i},n):null,l)}var tb=C.createElement(eb,null),nb=class extends C.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?C.createElement(gn.Provider,{value:this.props.routeContext},C.createElement(Sf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function rb({routeContext:e,match:t,children:n}){let r=C.useContext(cs);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),C.createElement(gn.Provider,{value:e},n)}function ib(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,l=n==null?void 0:n.errors;if(l!=null){let c=s.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id])!==void 0);Re(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,c+1))}let a=!1,o=-1;if(n)for(let c=0;c<s.length;c++){let d=s[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(o=c),d.route.id){let{loaderData:p,errors:h}=n,m=d.route.loader&&!p.hasOwnProperty(d.route.id)&&(!h||h[d.route.id]===void 0);if(d.route.lazy||m){a=!0,o>=0?s=s.slice(0,o+1):s=[s[0]];break}}}let u=n&&r?(c,d)=>{var p,h;r(c,{location:n.location,params:((h=(p=n.matches)==null?void 0:p[0])==null?void 0:h.params)??{},unstable_pattern:W1(n.matches),errorInfo:d})}:void 0;return s.reduceRight((c,d,p)=>{let h,m=!1,y=null,_=null;n&&(h=l&&d.route.id?l[d.route.id]:void 0,y=d.route.errorElement||tb,a&&(o<0&&p===0?(Jx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,_=null):o===p&&(m=!0,_=d.route.hydrateFallbackElement||null)));let g=t.concat(s.slice(0,p+1)),x=()=>{let v;return h?v=y:m?v=_:d.route.Component?v=C.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=c,C.createElement(rb,{match:d,routeContext:{outlet:c,matches:g,isDataRoute:n!=null},children:v})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?C.createElement(nb,{location:n.location,revalidation:n.revalidation,component:y,error:h,children:x(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:u}):x()},null)}function Cf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sb(e){let t=C.useContext(cs);return Re(t,Cf(e)),t}function lb(e){let t=C.useContext(Ao);return Re(t,Cf(e)),t}function ab(e){let t=C.useContext(gn);return Re(t,Cf(e)),t}function _f(e){let t=ab(e),n=t.matches[t.matches.length-1];return Re(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function ob(){return _f("useRouteId")}function ub(){var r;let e=C.useContext(Sf),t=lb("useRouteError"),n=_f("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function cb(){let{router:e}=sb("useNavigate"),t=_f("useNavigate"),n=C.useRef(!1);return Kx(()=>{n.current=!0}),C.useCallback(async(i,s={})=>{Mt(n.current,Zx),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var _p={};function Jx(e,t,n){!t&&!_p[e]&&(_p[e]=!0,Mt(!1,n))}C.memo(db);function db({routes:e,future:t,state:n,unstable_onError:r}){return Yx(e,void 0,n,r,t)}function wn(e){Re(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function fb({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,unstable_useTransitions:l}){Re(!jl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),o=C.useMemo(()=>({basename:a,navigator:i,static:s,unstable_useTransitions:l,future:{}}),[a,i,s,l]);typeof n=="string"&&(n=us(n));let{pathname:u="/",search:c="",hash:d="",state:p=null,key:h="default"}=n,m=C.useMemo(()=>{let y=zn(u,a);return y==null?null:{location:{pathname:y,search:c,hash:d,state:p,key:h},navigationType:r}},[a,u,c,d,p,h,r]);return Mt(m!=null,`<Router basename="${a}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:C.createElement(Yt.Provider,{value:o},C.createElement(Nl.Provider,{children:t,value:m}))}function Np({children:e,location:t}){return J1(Hc(e),t)}function Hc(e,t=[]){let n=[];return C.Children.forEach(e,(r,i)=>{if(!C.isValidElement(r))return;let s=[...t,i];if(r.type===C.Fragment){n.push.apply(n,Hc(r.props.children,s));return}Re(r.type===wn,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Re(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=Hc(r.props.children,s)),n.push(l)}),n}var Ca="get",_a="application/x-www-form-urlencoded";function Oo(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function hb(e){return Oo(e)&&e.tagName.toLowerCase()==="button"}function pb(e){return Oo(e)&&e.tagName.toLowerCase()==="form"}function mb(e){return Oo(e)&&e.tagName.toLowerCase()==="input"}function gb(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function yb(e,t){return e.button===0&&(!t||t==="_self")&&!gb(e)}function qc(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function xb(e,t){let n=qc(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(s=>{n.append(i,s)})}),n}var ta=null;function vb(){if(ta===null)try{new FormData(document.createElement("form"),0),ta=!1}catch{ta=!0}return ta}var kb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Cu(e){return e!=null&&!kb.has(e)?(Mt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_a}"`),null):e}function wb(e,t){let n,r,i,s,l;if(pb(e)){let a=e.getAttribute("action");r=a?zn(a,t):null,n=e.getAttribute("method")||Ca,i=Cu(e.getAttribute("enctype"))||_a,s=new FormData(e)}else if(hb(e)||mb(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let o=e.getAttribute("formaction")||a.getAttribute("action");if(r=o?zn(o,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||Ca,i=Cu(e.getAttribute("formenctype"))||Cu(a.getAttribute("enctype"))||_a,s=new FormData(a,e),!vb()){let{name:u,type:c,value:d}=e;if(c==="image"){let p=u?`${u}.`:"";s.append(`${p}x`,"0"),s.append(`${p}y`,"0")}else u&&s.append(u,d)}}else{if(Oo(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ca,r=null,i=_a,l=e}return s&&i==="text/plain"&&(l=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Nf(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function bb(e,t,n){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${n}`:t&&zn(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function Sb(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Eb(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Cb(e,t,n){let r=await Promise.all(e.map(async i=>{let s=t.routes[i.route.id];if(s){let l=await Sb(s,n);return l.links?l.links():[]}return[]}));return Rb(r.flat(1).filter(Eb).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function jp(e,t,n,r,i,s){let l=(o,u)=>n[u]?o.route.id!==n[u].route.id:!0,a=(o,u)=>{var c;return n[u].pathname!==o.pathname||((c=n[u].route.path)==null?void 0:c.endsWith("*"))&&n[u].params["*"]!==o.params["*"]};return s==="assets"?t.filter((o,u)=>l(o,u)||a(o,u)):s==="data"?t.filter((o,u)=>{var d;let c=r.routes[o.route.id];if(!c||!c.hasLoader)return!1;if(l(o,u)||a(o,u))return!0;if(o.route.shouldRevalidate){let p=o.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:o.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function _b(e,t,{includeHydrateFallback:n}={}){return Nb(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function Nb(e){return[...new Set(e)]}function jb(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Rb(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let s=JSON.stringify(jb(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}function e0(){let e=C.useContext(cs);return Nf(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Pb(){let e=C.useContext(Ao);return Nf(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var jf=C.createContext(void 0);jf.displayName="FrameworkContext";function t0(){let e=C.useContext(jf);return Nf(e,"You must render this element inside a <HydratedRouter> element"),e}function Tb(e,t){let n=C.useContext(jf),[r,i]=C.useState(!1),[s,l]=C.useState(!1),{onFocus:a,onBlur:o,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,p=C.useRef(null);C.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let y=g=>{g.forEach(x=>{l(x.isIntersecting)})},_=new IntersectionObserver(y,{threshold:.5});return p.current&&_.observe(p.current),()=>{_.disconnect()}}},[e]),C.useEffect(()=>{if(r){let y=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(y)}}},[r]);let h=()=>{i(!0)},m=()=>{i(!1),l(!1)};return n?e!=="intent"?[s,p,{}]:[s,p,{onFocus:_s(a,h),onBlur:_s(o,m),onMouseEnter:_s(u,h),onMouseLeave:_s(c,m),onTouchStart:_s(d,h)}]:[!1,p,{}]}function _s(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ib({page:e,...t}){let{router:n}=e0(),r=C.useMemo(()=>Bx(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?C.createElement(Ab,{page:e,matches:r,...t}):null}function Lb(e){let{manifest:t,routeModules:n}=t0(),[r,i]=C.useState([]);return C.useEffect(()=>{let s=!1;return Cb(e,t,n).then(l=>{s||i(l)}),()=>{s=!0}},[e,t,n]),r}function Ab({page:e,matches:t,...n}){let r=yn(),{manifest:i,routeModules:s}=t0(),{basename:l}=e0(),{loaderData:a,matches:o}=Pb(),u=C.useMemo(()=>jp(e,t,o,i,r,"data"),[e,t,o,i,r]),c=C.useMemo(()=>jp(e,t,o,i,r,"assets"),[e,t,o,i,r]),d=C.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let m=new Set,y=!1;if(t.forEach(g=>{var v;let x=i.routes[g.route.id];!x||!x.hasLoader||(!u.some(w=>w.route.id===g.route.id)&&g.route.id in a&&((v=s[g.route.id])!=null&&v.shouldRevalidate)||x.hasClientLoader?y=!0:m.add(g.route.id))}),m.size===0)return[];let _=bb(e,l,"data");return y&&m.size>0&&_.searchParams.set("_routes",t.filter(g=>m.has(g.route.id)).map(g=>g.route.id).join(",")),[_.pathname+_.search]},[l,a,r,i,u,t,e,s]),p=C.useMemo(()=>_b(c,i),[c,i]),h=Lb(c);return C.createElement(C.Fragment,null,d.map(m=>C.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...n})),p.map(m=>C.createElement("link",{key:m,rel:"modulepreload",href:m,...n})),h.map(({key:m,link:y})=>C.createElement("link",{key:m,nonce:n.nonce,...y})))}function Ob(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var n0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{n0&&(window.__reactRouterVersion="7.10.1")}catch{}function Db({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=C.useRef();i.current==null&&(i.current=b1({window:r,v5Compat:!0}));let s=i.current,[l,a]=C.useState({action:s.action,location:s.location}),o=C.useCallback(u=>{n===!1?a(u):C.startTransition(()=>a(u))},[n]);return C.useLayoutEffect(()=>s.listen(o),[s,o]),C.createElement(fb,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:s,unstable_useTransitions:n===!0})}var r0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ji=C.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:l,state:a,target:o,to:u,preventScrollReset:c,viewTransition:d,...p},h){let{basename:m,unstable_useTransitions:y}=C.useContext(Yt),_=typeof u=="string"&&r0.test(u),g,x=!1;if(typeof u=="string"&&_&&(g=u,n0))try{let b=new URL(window.location.href),D=u.startsWith("//")?new URL(b.protocol+u):new URL(u),U=zn(D.pathname,m);D.origin===b.origin&&U!=null?u=U+D.search+D.hash:x=!0}catch{Mt(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let v=X1(u,{relative:i}),[w,j,N]=Tb(r,p),T=Mb(u,{replace:l,state:a,target:o,preventScrollReset:c,relative:i,viewTransition:d,unstable_useTransitions:y});function A(b){t&&t(b),b.defaultPrevented||T(b)}let L=C.createElement("a",{...p,...N,href:g||v,onClick:x||s?t:A,ref:Ob(h,j),target:o,"data-discover":!_&&n==="render"?"true":void 0});return w&&!_?C.createElement(C.Fragment,null,L,C.createElement(Ib,{page:v})):L});Ji.displayName="Link";var Qc=C.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:l,viewTransition:a,children:o,...u},c){let d=Rl(l,{relative:u.relative}),p=yn(),h=C.useContext(Ao),{navigator:m,basename:y}=C.useContext(Yt),_=h!=null&&qb(d)&&a===!0,g=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,x=p.pathname,v=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(x=x.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&y&&(v=zn(v,y)||v);const w=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let j=x===g||!i&&x.startsWith(g)&&x.charAt(w)==="/",N=v!=null&&(v===g||!i&&v.startsWith(g)&&v.charAt(g.length)==="/"),T={isActive:j,isPending:N,isTransitioning:_},A=j?t:void 0,L;typeof r=="function"?L=r(T):L=[r,j?"active":null,N?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let b=typeof s=="function"?s(T):s;return C.createElement(Ji,{...u,"aria-current":A,className:L,ref:c,style:b,to:l,viewTransition:a},typeof o=="function"?o(T):o)});Qc.displayName="NavLink";var Fb=C.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:s,method:l=Ca,action:a,onSubmit:o,relative:u,preventScrollReset:c,viewTransition:d,...p},h)=>{let{unstable_useTransitions:m}=C.useContext(Yt),y=Vb(),_=Hb(a,{relative:u}),g=l.toLowerCase()==="get"?"get":"post",x=typeof a=="string"&&r0.test(a),v=w=>{if(o&&o(w),w.defaultPrevented)return;w.preventDefault();let j=w.nativeEvent.submitter,N=(j==null?void 0:j.getAttribute("formmethod"))||l,T=()=>y(j||w.currentTarget,{fetcherKey:t,method:N,navigate:n,replace:i,state:s,relative:u,preventScrollReset:c,viewTransition:d});m&&n!==!1?C.startTransition(()=>T()):T()};return C.createElement("form",{ref:h,method:g,action:_,onSubmit:r?o:v,...p,"data-discover":!x&&e==="render"?"true":void 0})});Fb.displayName="Form";function $b(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function i0(e){let t=C.useContext(cs);return Re(t,$b(e)),t}function Mb(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:l,unstable_useTransitions:a}={}){let o=Ef(),u=yn(),c=Rl(e,{relative:s});return C.useCallback(d=>{if(yb(d,t)){d.preventDefault();let p=n!==void 0?n:dl(u)===dl(c),h=()=>o(e,{replace:p,state:r,preventScrollReset:i,relative:s,viewTransition:l});a?C.startTransition(()=>h()):h()}},[u,o,c,n,r,t,e,i,s,l,a])}function zb(e){Mt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=C.useRef(qc(e)),n=C.useRef(!1),r=yn(),i=C.useMemo(()=>xb(r.search,n.current?null:t.current),[r.search]),s=Ef(),l=C.useCallback((a,o)=>{const u=qc(typeof a=="function"?a(new URLSearchParams(i)):a);n.current=!0,s("?"+u,o)},[s,i]);return[i,l]}var Ub=0,Bb=()=>`__${String(++Ub)}__`;function Vb(){let{router:e}=i0("useSubmit"),{basename:t}=C.useContext(Yt),n=ob(),r=e.fetch,i=e.navigate;return C.useCallback(async(s,l={})=>{let{action:a,method:o,encType:u,formData:c,body:d}=wb(s,t);if(l.navigate===!1){let p=l.fetcherKey||Bb();await r(p,n,l.action||a,{preventScrollReset:l.preventScrollReset,formData:c,body:d,formMethod:l.method||o,formEncType:l.encType||u,flushSync:l.flushSync})}else await i(l.action||a,{preventScrollReset:l.preventScrollReset,formData:c,body:d,formMethod:l.method||o,formEncType:l.encType||u,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,i,t,n])}function Hb(e,{relative:t}={}){let{basename:n}=C.useContext(Yt),r=C.useContext(gn);Re(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...Rl(e||".",{relative:t})},l=yn();if(e==null){s.search=l.search;let a=new URLSearchParams(s.search),o=a.getAll("index");if(o.some(c=>c==="")){a.delete("index"),o.filter(d=>d).forEach(d=>a.append("index",d));let c=a.toString();s.search=c?`?${c}`:""}}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:An([n,s.pathname])),dl(s)}function qb(e,{relative:t}={}){let n=C.useContext(Gx);Re(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=i0("useViewTransitionState"),i=Rl(e,{relative:t});if(!n.isTransitioning)return!1;let s=zn(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=zn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return to(i.pathname,l)!=null||to(i.pathname,s)!=null}var ds=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qb={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Jn,Nd,vg,Wb=(vg=class{constructor(){Y(this,Jn,Qb);Y(this,Nd,!1)}setTimeoutProvider(e){H(this,Jn,e)}setTimeout(e,t){return E(this,Jn).setTimeout(e,t)}clearTimeout(e){E(this,Jn).clearTimeout(e)}setInterval(e,t){return E(this,Jn).setInterval(e,t)}clearInterval(e){E(this,Jn).clearInterval(e)}},Jn=new WeakMap,Nd=new WeakMap,vg),Fr=new Wb;function Gb(e){setTimeout(e,0)}var ei=typeof window>"u"||"Deno"in globalThis;function rt(){}function Zb(e,t){return typeof e=="function"?e(t):e}function Wc(e){return typeof e=="number"&&e>=0&&e!==1/0}function s0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function xr(e,t){return typeof e=="function"?e(t):e}function Tt(e,t){return typeof e=="function"?e(t):e}function Rp(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:l,stale:a}=e;if(l){if(r){if(t.queryHash!==Rf(l,t.options))return!1}else if(!fl(t.queryKey,l))return!1}if(n!=="all"){const o=t.isActive();if(n==="active"&&!o||n==="inactive"&&o)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function Pp(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(ti(t.options.mutationKey)!==ti(s))return!1}else if(!fl(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Rf(e,t){return((t==null?void 0:t.queryKeyHashFn)||ti)(e)}function ti(e){return JSON.stringify(e,(t,n)=>Gc(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function fl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>fl(e[n],t[n])):!1}var Kb=Object.prototype.hasOwnProperty;function l0(e,t){if(e===t)return e;const n=Tp(e)&&Tp(t);if(!n&&!(Gc(e)&&Gc(t)))return t;const i=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),l=s.length,a=n?new Array(l):{};let o=0;for(let u=0;u<l;u++){const c=n?u:s[u],d=e[c],p=t[c];if(d===p){a[c]=d,(n?u<i:Kb.call(e,c))&&o++;continue}if(d===null||p===null||typeof d!="object"||typeof p!="object"){a[c]=p;continue}const h=l0(d,p);a[c]=h,h===d&&o++}return i===l&&o===i?e:a}function no(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Tp(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Gc(e){if(!Ip(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ip(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ip(e){return Object.prototype.toString.call(e)==="[object Object]"}function Xb(e){return new Promise(t=>{Fr.setTimeout(t,e)})}function Zc(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?l0(e,t):t}function Yb(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Jb(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Pf=Symbol();function a0(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Pf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function o0(e,t){return typeof e=="function"?e(...t):!!e}var $r,er,Ai,kg,eS=(kg=class extends ds{constructor(){super();Y(this,$r);Y(this,er);Y(this,Ai);H(this,Ai,t=>{if(!ei&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){E(this,er)||this.setEventListener(E(this,Ai))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,er))==null||t.call(this),H(this,er,void 0))}setEventListener(t){var n;H(this,Ai,t),(n=E(this,er))==null||n.call(this),H(this,er,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){E(this,$r)!==t&&(H(this,$r,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof E(this,$r)=="boolean"?E(this,$r):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},$r=new WeakMap,er=new WeakMap,Ai=new WeakMap,kg),Tf=new eS;function Kc(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var tS=Gb;function nS(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=tS;const s=a=>{t?e.push(a):i(()=>{n(a)})},l=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(o=>{n(o)})})})};return{batch:a=>{let o;t++;try{o=a()}finally{t--,t||l()}return o},batchCalls:a=>(...o)=>{s(()=>{a(...o)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Me=nS(),Oi,tr,Di,wg,rS=(wg=class extends ds{constructor(){super();Y(this,Oi,!0);Y(this,tr);Y(this,Di);H(this,Di,t=>{if(!ei&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){E(this,tr)||this.setEventListener(E(this,Di))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,tr))==null||t.call(this),H(this,tr,void 0))}setEventListener(t){var n;H(this,Di,t),(n=E(this,tr))==null||n.call(this),H(this,tr,t(this.setOnline.bind(this)))}setOnline(t){E(this,Oi)!==t&&(H(this,Oi,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return E(this,Oi)}},Oi=new WeakMap,tr=new WeakMap,Di=new WeakMap,wg),ro=new rS;function iS(e){return Math.min(1e3*2**e,3e4)}function u0(e){return(e??"online")==="online"?ro.isOnline():!0}var Xc=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function c0(e){let t=!1,n=0,r;const i=Kc(),s=()=>i.status!=="pending",l=y=>{var _;if(!s()){const g=new Xc(y);p(g),(_=e.onCancel)==null||_.call(e,g)}},a=()=>{t=!0},o=()=>{t=!1},u=()=>Tf.isFocused()&&(e.networkMode==="always"||ro.isOnline())&&e.canRun(),c=()=>u0(e.networkMode)&&e.canRun(),d=y=>{s()||(r==null||r(),i.resolve(y))},p=y=>{s()||(r==null||r(),i.reject(y))},h=()=>new Promise(y=>{var _;r=g=>{(s()||u())&&y(g)},(_=e.onPause)==null||_.call(e)}).then(()=>{var y;r=void 0,s()||(y=e.onContinue)==null||y.call(e)}),m=()=>{if(s())return;let y;const _=n===0?e.initialPromise:void 0;try{y=_??e.fn()}catch(g){y=Promise.reject(g)}Promise.resolve(y).then(d).catch(g=>{var N;if(s())return;const x=e.retry??(ei?0:3),v=e.retryDelay??iS,w=typeof v=="function"?v(n,g):v,j=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,g);if(t||!j){p(g);return}n++,(N=e.onFail)==null||N.call(e,n,g),Xb(w).then(()=>u()?void 0:h()).then(()=>{t?p(g):m()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r==null||r(),i),cancelRetry:a,continueRetry:o,canStart:c,start:()=>(c()?m():h().then(m),i)}}var Mr,bg,d0=(bg=class{constructor(){Y(this,Mr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Wc(this.gcTime)&&H(this,Mr,Fr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ei?1/0:5*60*1e3))}clearGcTimeout(){E(this,Mr)&&(Fr.clearTimeout(E(this,Mr)),H(this,Mr,void 0))}},Mr=new WeakMap,bg),zr,Fi,Pt,Ur,Ue,yl,Br,Ht,bn,Sg,sS=(Sg=class extends d0{constructor(t){super();Y(this,Ht);Y(this,zr);Y(this,Fi);Y(this,Pt);Y(this,Ur);Y(this,Ue);Y(this,yl);Y(this,Br);H(this,Br,!1),H(this,yl,t.defaultOptions),this.setOptions(t.options),this.observers=[],H(this,Ur,t.client),H(this,Pt,E(this,Ur).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,H(this,zr,Ap(this.options)),this.state=t.state??E(this,zr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=E(this,Ue))==null?void 0:t.promise}setOptions(t){if(this.options={...E(this,yl),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Ap(this.options);n.data!==void 0&&(this.setState(Lp(n.data,n.dataUpdatedAt)),H(this,zr,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,Pt).remove(this)}setData(t,n){const r=Zc(this.state.data,t,this.options);return se(this,Ht,bn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){se(this,Ht,bn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=E(this,Ue))==null?void 0:r.promise;return(i=E(this,Ue))==null||i.cancel(t),n?n.then(rt).catch(rt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(this,zr))}isActive(){return this.observers.some(t=>Tt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Pf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>xr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!s0(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,Ue))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=E(this,Ue))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),E(this,Pt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(E(this,Ue)&&(E(this,Br)?E(this,Ue).cancel({revert:!0}):E(this,Ue).cancelRetry()),this.scheduleGc()),E(this,Pt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||se(this,Ht,bn).call(this,{type:"invalidate"})}async fetch(t,n){var o,u,c,d,p,h,m,y,_,g,x,v;if(this.state.fetchStatus!=="idle"&&((o=E(this,Ue))==null?void 0:o.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(E(this,Ue))return E(this,Ue).continueRetry(),E(this,Ue).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(j=>j.options.queryFn);w&&this.setOptions(w.options)}const r=new AbortController,i=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(H(this,Br,!0),r.signal)})},s=()=>{const w=a0(this.options,n),N=(()=>{const T={client:E(this,Ur),queryKey:this.queryKey,meta:this.meta};return i(T),T})();return H(this,Br,!1),this.options.persister?this.options.persister(w,N,this):w(N)},a=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:E(this,Ur),state:this.state,fetchFn:s};return i(w),w})();(u=this.options.behavior)==null||u.onFetch(a,this),H(this,Fi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&se(this,Ht,bn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta}),H(this,Ue,c0({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:w=>{w instanceof Xc&&w.revert&&this.setState({...E(this,Fi),fetchStatus:"idle"}),r.abort()},onFail:(w,j)=>{se(this,Ht,bn).call(this,{type:"failed",failureCount:w,error:j})},onPause:()=>{se(this,Ht,bn).call(this,{type:"pause"})},onContinue:()=>{se(this,Ht,bn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const w=await E(this,Ue).start();if(w===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(w),(h=(p=E(this,Pt).config).onSuccess)==null||h.call(p,w,this),(y=(m=E(this,Pt).config).onSettled)==null||y.call(m,w,this.state.error,this),w}catch(w){if(w instanceof Xc){if(w.silent)return E(this,Ue).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw se(this,Ht,bn).call(this,{type:"error",error:w}),(g=(_=E(this,Pt).config).onError)==null||g.call(_,w,this),(v=(x=E(this,Pt).config).onSettled)==null||v.call(x,this.state.data,w,this),w}finally{this.scheduleGc()}}},zr=new WeakMap,Fi=new WeakMap,Pt=new WeakMap,Ur=new WeakMap,Ue=new WeakMap,yl=new WeakMap,Br=new WeakMap,Ht=new WeakSet,bn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...f0(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...Lp(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return H(this,Fi,t.manual?i:void 0),i;case"error":const s=t.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Me.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),E(this,Pt).notify({query:this,type:"updated",action:t})})},Sg);function f0(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:u0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Lp(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ap(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var dt,ce,xl,et,Vr,$i,Cn,nr,vl,Mi,zi,Hr,qr,rr,Ui,xe,As,Yc,Jc,ed,td,nd,rd,id,h0,Eg,lS=(Eg=class extends ds{constructor(t,n){super();Y(this,xe);Y(this,dt);Y(this,ce);Y(this,xl);Y(this,et);Y(this,Vr);Y(this,$i);Y(this,Cn);Y(this,nr);Y(this,vl);Y(this,Mi);Y(this,zi);Y(this,Hr);Y(this,qr);Y(this,rr);Y(this,Ui,new Set);this.options=n,H(this,dt,t),H(this,nr,null),H(this,Cn,Kc()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,ce).addObserver(this),Op(E(this,ce),this.options)?se(this,xe,As).call(this):this.updateResult(),se(this,xe,td).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return sd(E(this,ce),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return sd(E(this,ce),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,se(this,xe,nd).call(this),se(this,xe,rd).call(this),E(this,ce).removeObserver(this)}setOptions(t){const n=this.options,r=E(this,ce);if(this.options=E(this,dt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Tt(this.options.enabled,E(this,ce))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");se(this,xe,id).call(this),E(this,ce).setOptions(this.options),n._defaulted&&!no(this.options,n)&&E(this,dt).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,ce),observer:this});const i=this.hasListeners();i&&Dp(E(this,ce),r,this.options,n)&&se(this,xe,As).call(this),this.updateResult(),i&&(E(this,ce)!==r||Tt(this.options.enabled,E(this,ce))!==Tt(n.enabled,E(this,ce))||xr(this.options.staleTime,E(this,ce))!==xr(n.staleTime,E(this,ce)))&&se(this,xe,Yc).call(this);const s=se(this,xe,Jc).call(this);i&&(E(this,ce)!==r||Tt(this.options.enabled,E(this,ce))!==Tt(n.enabled,E(this,ce))||s!==E(this,rr))&&se(this,xe,ed).call(this,s)}getOptimisticResult(t){const n=E(this,dt).getQueryCache().build(E(this,dt),t),r=this.createResult(n,t);return oS(this,r)&&(H(this,et,r),H(this,$i,this.options),H(this,Vr,E(this,ce).state)),r}getCurrentResult(){return E(this,et)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&E(this,Cn).status==="pending"&&E(this,Cn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){E(this,Ui).add(t)}getCurrentQuery(){return E(this,ce)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=E(this,dt).defaultQueryOptions(t),r=E(this,dt).getQueryCache().build(E(this,dt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return se(this,xe,As).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,et)))}createResult(t,n){var L;const r=E(this,ce),i=this.options,s=E(this,et),l=E(this,Vr),a=E(this,$i),u=t!==r?t.state:E(this,xl),{state:c}=t;let d={...c},p=!1,h;if(n._optimisticResults){const b=this.hasListeners(),D=!b&&Op(t,n),U=b&&Dp(t,r,n,i);(D||U)&&(d={...d,...f0(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:y,status:_}=d;h=d.data;let g=!1;if(n.placeholderData!==void 0&&h===void 0&&_==="pending"){let b;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(b=s.data,g=!0):b=typeof n.placeholderData=="function"?n.placeholderData((L=E(this,zi))==null?void 0:L.state.data,E(this,zi)):n.placeholderData,b!==void 0&&(_="success",h=Zc(s==null?void 0:s.data,b,n),p=!0)}if(n.select&&h!==void 0&&!g)if(s&&h===(l==null?void 0:l.data)&&n.select===E(this,vl))h=E(this,Mi);else try{H(this,vl,n.select),h=n.select(h),h=Zc(s==null?void 0:s.data,h,n),H(this,Mi,h),H(this,nr,null)}catch(b){H(this,nr,b)}E(this,nr)&&(m=E(this,nr),h=E(this,Mi),y=Date.now(),_="error");const x=d.fetchStatus==="fetching",v=_==="pending",w=_==="error",j=v&&x,N=h!==void 0,A={status:_,fetchStatus:d.fetchStatus,isPending:v,isSuccess:_==="success",isError:w,isInitialLoading:j,isLoading:j,data:h,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:y,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!v,isLoadingError:w&&!N,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:w&&N,isStale:If(t,n),refetch:this.refetch,promise:E(this,Cn),isEnabled:Tt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const b=ee=>{A.status==="error"?ee.reject(A.error):A.data!==void 0&&ee.resolve(A.data)},D=()=>{const ee=H(this,Cn,A.promise=Kc());b(ee)},U=E(this,Cn);switch(U.status){case"pending":t.queryHash===r.queryHash&&b(U);break;case"fulfilled":(A.status==="error"||A.data!==U.value)&&D();break;case"rejected":(A.status!=="error"||A.error!==U.reason)&&D();break}}return A}updateResult(){const t=E(this,et),n=this.createResult(E(this,ce),this.options);if(H(this,Vr,E(this,ce).state),H(this,$i,this.options),E(this,Vr).data!==void 0&&H(this,zi,E(this,ce)),no(n,t))return;H(this,et,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!E(this,Ui).size)return!0;const l=new Set(s??E(this,Ui));return this.options.throwOnError&&l.add("error"),Object.keys(E(this,et)).some(a=>{const o=a;return E(this,et)[o]!==t[o]&&l.has(o)})};se(this,xe,h0).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(this,xe,td).call(this)}},dt=new WeakMap,ce=new WeakMap,xl=new WeakMap,et=new WeakMap,Vr=new WeakMap,$i=new WeakMap,Cn=new WeakMap,nr=new WeakMap,vl=new WeakMap,Mi=new WeakMap,zi=new WeakMap,Hr=new WeakMap,qr=new WeakMap,rr=new WeakMap,Ui=new WeakMap,xe=new WeakSet,As=function(t){se(this,xe,id).call(this);let n=E(this,ce).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(rt)),n},Yc=function(){se(this,xe,nd).call(this);const t=xr(this.options.staleTime,E(this,ce));if(ei||E(this,et).isStale||!Wc(t))return;const r=s0(E(this,et).dataUpdatedAt,t)+1;H(this,Hr,Fr.setTimeout(()=>{E(this,et).isStale||this.updateResult()},r))},Jc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,ce)):this.options.refetchInterval)??!1},ed=function(t){se(this,xe,rd).call(this),H(this,rr,t),!(ei||Tt(this.options.enabled,E(this,ce))===!1||!Wc(E(this,rr))||E(this,rr)===0)&&H(this,qr,Fr.setInterval(()=>{(this.options.refetchIntervalInBackground||Tf.isFocused())&&se(this,xe,As).call(this)},E(this,rr)))},td=function(){se(this,xe,Yc).call(this),se(this,xe,ed).call(this,se(this,xe,Jc).call(this))},nd=function(){E(this,Hr)&&(Fr.clearTimeout(E(this,Hr)),H(this,Hr,void 0))},rd=function(){E(this,qr)&&(Fr.clearInterval(E(this,qr)),H(this,qr,void 0))},id=function(){const t=E(this,dt).getQueryCache().build(E(this,dt),this.options);if(t===E(this,ce))return;const n=E(this,ce);H(this,ce,t),H(this,xl,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},h0=function(t){Me.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(E(this,et))}),E(this,dt).getQueryCache().notify({query:E(this,ce),type:"observerResultsUpdated"})})},Eg);function aS(e,t){return Tt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Op(e,t){return aS(e,t)||e.state.data!==void 0&&sd(e,t,t.refetchOnMount)}function sd(e,t,n){if(Tt(t.enabled,e)!==!1&&xr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&If(e,t)}return!1}function Dp(e,t,n,r){return(e!==t||Tt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&If(e,n)}function If(e,t){return Tt(t.enabled,e)!==!1&&e.isStaleByTime(xr(t.staleTime,e))}function oS(e,t){return!no(e.getCurrentResult(),t)}function Fp(e){return{onFetch:(t,n)=>{var c,d,p,h,m;const r=t.options,i=(p=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],l=((m=t.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},o=0;const u=async()=>{let y=!1;const _=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},g=a0(t.options,t.fetchOptions),x=async(v,w,j)=>{if(y)return Promise.reject();if(w==null&&v.pages.length)return Promise.resolve(v);const T=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:w,direction:j?"backward":"forward",meta:t.options.meta};return _(D),D})(),A=await g(T),{maxPages:L}=t.options,b=j?Jb:Yb;return{pages:b(v.pages,A,L),pageParams:b(v.pageParams,w,L)}};if(i&&s.length){const v=i==="backward",w=v?uS:$p,j={pages:s,pageParams:l},N=w(r,j);a=await x(j,N,v)}else{const v=e??s.length;do{const w=o===0?l[0]??r.initialPageParam:$p(r,a);if(o>0&&w==null)break;a=await x(a,w),o++}while(o<v)}return a};t.options.persister?t.fetchFn=()=>{var y,_;return(_=(y=t.options).persister)==null?void 0:_.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function $p(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function uS(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var kl,an,tt,Qr,on,Wn,Cg,cS=(Cg=class extends d0{constructor(t){super();Y(this,on);Y(this,kl);Y(this,an);Y(this,tt);Y(this,Qr);H(this,kl,t.client),this.mutationId=t.mutationId,H(this,tt,t.mutationCache),H(this,an,[]),this.state=t.state||p0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){E(this,an).includes(t)||(E(this,an).push(t),this.clearGcTimeout(),E(this,tt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){H(this,an,E(this,an).filter(n=>n!==t)),this.scheduleGc(),E(this,tt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){E(this,an).length||(this.state.status==="pending"?this.scheduleGc():E(this,tt).remove(this))}continue(){var t;return((t=E(this,Qr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,a,o,u,c,d,p,h,m,y,_,g,x,v,w,j,N,T,A,L;const n=()=>{se(this,on,Wn).call(this,{type:"continue"})},r={client:E(this,kl),meta:this.options.meta,mutationKey:this.options.mutationKey};H(this,Qr,c0({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(b,D)=>{se(this,on,Wn).call(this,{type:"failed",failureCount:b,error:D})},onPause:()=>{se(this,on,Wn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,tt).canRun(this)}));const i=this.state.status==="pending",s=!E(this,Qr).canStart();try{if(i)n();else{se(this,on,Wn).call(this,{type:"pending",variables:t,isPaused:s}),await((a=(l=E(this,tt).config).onMutate)==null?void 0:a.call(l,t,this,r));const D=await((u=(o=this.options).onMutate)==null?void 0:u.call(o,t,r));D!==this.state.context&&se(this,on,Wn).call(this,{type:"pending",context:D,variables:t,isPaused:s})}const b=await E(this,Qr).start();return await((d=(c=E(this,tt).config).onSuccess)==null?void 0:d.call(c,b,t,this.state.context,this,r)),await((h=(p=this.options).onSuccess)==null?void 0:h.call(p,b,t,this.state.context,r)),await((y=(m=E(this,tt).config).onSettled)==null?void 0:y.call(m,b,null,this.state.variables,this.state.context,this,r)),await((g=(_=this.options).onSettled)==null?void 0:g.call(_,b,null,t,this.state.context,r)),se(this,on,Wn).call(this,{type:"success",data:b}),b}catch(b){try{throw await((v=(x=E(this,tt).config).onError)==null?void 0:v.call(x,b,t,this.state.context,this,r)),await((j=(w=this.options).onError)==null?void 0:j.call(w,b,t,this.state.context,r)),await((T=(N=E(this,tt).config).onSettled)==null?void 0:T.call(N,void 0,b,this.state.variables,this.state.context,this,r)),await((L=(A=this.options).onSettled)==null?void 0:L.call(A,void 0,b,t,this.state.context,r)),b}finally{se(this,on,Wn).call(this,{type:"error",error:b})}}finally{E(this,tt).runNext(this)}}},kl=new WeakMap,an=new WeakMap,tt=new WeakMap,Qr=new WeakMap,on=new WeakSet,Wn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Me.batch(()=>{E(this,an).forEach(r=>{r.onMutationUpdate(t)}),E(this,tt).notify({mutation:this,type:"updated",action:t})})},Cg);function p0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _n,qt,wl,_g,dS=(_g=class extends ds{constructor(t={}){super();Y(this,_n);Y(this,qt);Y(this,wl);this.config=t,H(this,_n,new Set),H(this,qt,new Map),H(this,wl,0)}build(t,n,r){const i=new cS({client:t,mutationCache:this,mutationId:++Fl(this,wl)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){E(this,_n).add(t);const n=na(t);if(typeof n=="string"){const r=E(this,qt).get(n);r?r.push(t):E(this,qt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(E(this,_n).delete(t)){const n=na(t);if(typeof n=="string"){const r=E(this,qt).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&E(this,qt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=na(t);if(typeof n=="string"){const r=E(this,qt).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=na(t);if(typeof n=="string"){const i=(r=E(this,qt).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Me.batch(()=>{E(this,_n).forEach(t=>{this.notify({type:"removed",mutation:t})}),E(this,_n).clear(),E(this,qt).clear()})}getAll(){return Array.from(E(this,_n))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Pp(n,r))}findAll(t={}){return this.getAll().filter(n=>Pp(t,n))}notify(t){Me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Me.batch(()=>Promise.all(t.map(n=>n.continue().catch(rt))))}},_n=new WeakMap,qt=new WeakMap,wl=new WeakMap,_g);function na(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Nn,ir,ft,jn,On,Na,ld,Ng,fS=(Ng=class extends ds{constructor(n,r){super();Y(this,On);Y(this,Nn);Y(this,ir);Y(this,ft);Y(this,jn);H(this,Nn,n),this.setOptions(r),this.bindMethods(),se(this,On,Na).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=E(this,Nn).defaultMutationOptions(n),no(this.options,r)||E(this,Nn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:E(this,ft),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ti(r.mutationKey)!==ti(this.options.mutationKey)?this.reset():((i=E(this,ft))==null?void 0:i.state.status)==="pending"&&E(this,ft).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=E(this,ft))==null||n.removeObserver(this)}onMutationUpdate(n){se(this,On,Na).call(this),se(this,On,ld).call(this,n)}getCurrentResult(){return E(this,ir)}reset(){var n;(n=E(this,ft))==null||n.removeObserver(this),H(this,ft,void 0),se(this,On,Na).call(this),se(this,On,ld).call(this)}mutate(n,r){var i;return H(this,jn,r),(i=E(this,ft))==null||i.removeObserver(this),H(this,ft,E(this,Nn).getMutationCache().build(E(this,Nn),this.options)),E(this,ft).addObserver(this),E(this,ft).execute(n)}},Nn=new WeakMap,ir=new WeakMap,ft=new WeakMap,jn=new WeakMap,On=new WeakSet,Na=function(){var r;const n=((r=E(this,ft))==null?void 0:r.state)??p0();H(this,ir,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},ld=function(n){Me.batch(()=>{var r,i,s,l,a,o,u,c;if(E(this,jn)&&this.hasListeners()){const d=E(this,ir).variables,p=E(this,ir).context,h={client:E(this,Nn),meta:this.options.meta,mutationKey:this.options.mutationKey};(n==null?void 0:n.type)==="success"?((i=(r=E(this,jn)).onSuccess)==null||i.call(r,n.data,d,p,h),(l=(s=E(this,jn)).onSettled)==null||l.call(s,n.data,null,d,p,h)):(n==null?void 0:n.type)==="error"&&((o=(a=E(this,jn)).onError)==null||o.call(a,n.error,d,p,h),(c=(u=E(this,jn)).onSettled)==null||c.call(u,void 0,n.error,d,p,h))}this.listeners.forEach(d=>{d(E(this,ir))})})},Ng),un,jg,hS=(jg=class extends ds{constructor(t={}){super();Y(this,un);this.config=t,H(this,un,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Rf(i,n);let l=this.get(s);return l||(l=new sS({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){E(this,un).has(t.queryHash)||(E(this,un).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=E(this,un).get(t.queryHash);n&&(t.destroy(),n===t&&E(this,un).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Me.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return E(this,un).get(t)}getAll(){return[...E(this,un).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Rp(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Rp(t,r)):n}notify(t){Me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Me.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Me.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},un=new WeakMap,jg),Ie,sr,lr,Bi,Vi,ar,Hi,qi,Rg,pS=(Rg=class{constructor(e={}){Y(this,Ie);Y(this,sr);Y(this,lr);Y(this,Bi);Y(this,Vi);Y(this,ar);Y(this,Hi);Y(this,qi);H(this,Ie,e.queryCache||new hS),H(this,sr,e.mutationCache||new dS),H(this,lr,e.defaultOptions||{}),H(this,Bi,new Map),H(this,Vi,new Map),H(this,ar,0)}mount(){Fl(this,ar)._++,E(this,ar)===1&&(H(this,Hi,Tf.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Ie).onFocus())})),H(this,qi,ro.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Ie).onOnline())})))}unmount(){var e,t;Fl(this,ar)._--,E(this,ar)===0&&((e=E(this,Hi))==null||e.call(this),H(this,Hi,void 0),(t=E(this,qi))==null||t.call(this),H(this,qi,void 0))}isFetching(e){return E(this,Ie).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return E(this,sr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,Ie).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=E(this,Ie).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(xr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return E(this,Ie).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=E(this,Ie).get(r.queryHash),s=i==null?void 0:i.state.data,l=Zb(t,s);if(l!==void 0)return E(this,Ie).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Me.batch(()=>E(this,Ie).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=E(this,Ie).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=E(this,Ie);Me.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=E(this,Ie);return Me.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Me.batch(()=>E(this,Ie).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(rt).catch(rt)}invalidateQueries(e,t={}){return Me.batch(()=>(E(this,Ie).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Me.batch(()=>E(this,Ie).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(rt)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(rt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=E(this,Ie).build(this,t);return n.isStaleByTime(xr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(rt).catch(rt)}fetchInfiniteQuery(e){return e.behavior=Fp(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(rt).catch(rt)}ensureInfiniteQueryData(e){return e.behavior=Fp(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ro.isOnline()?E(this,sr).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,Ie)}getMutationCache(){return E(this,sr)}getDefaultOptions(){return E(this,lr)}setDefaultOptions(e){H(this,lr,e)}setQueryDefaults(e,t){E(this,Bi).set(ti(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...E(this,Bi).values()],n={};return t.forEach(r=>{fl(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){E(this,Vi).set(ti(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...E(this,Vi).values()],n={};return t.forEach(r=>{fl(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...E(this,lr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Rf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Pf&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...E(this,lr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){E(this,Ie).clear(),E(this,sr).clear()}},Ie=new WeakMap,sr=new WeakMap,lr=new WeakMap,Bi=new WeakMap,Vi=new WeakMap,ar=new WeakMap,Hi=new WeakMap,qi=new WeakMap,Rg),m0=C.createContext(void 0),Nr=e=>{const t=C.useContext(m0);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},mS=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(m0.Provider,{value:e,children:t})),g0=C.createContext(!1),gS=()=>C.useContext(g0);g0.Provider;function yS(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var xS=C.createContext(yS()),vS=()=>C.useContext(xS),kS=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},wS=e=>{C.useEffect(()=>{e.clearReset()},[e])},bS=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||o0(n,[e.error,r])),SS=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},ES=(e,t)=>e.isLoading&&e.isFetching&&!t,CS=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Mp=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function _S(e,t,n){var d,p,h,m,y;const r=gS(),i=vS(),s=Nr(),l=s.defaultQueryOptions(e);(p=(d=s.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||p.call(d,l),l._optimisticResults=r?"isRestoring":"optimistic",SS(l),kS(l,i),wS(i);const a=!s.getQueryCache().get(l.queryHash),[o]=C.useState(()=>new t(s,l)),u=o.getOptimisticResult(l),c=!r&&e.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(_=>{const g=c?o.subscribe(Me.batchCalls(_)):rt;return o.updateResult(),g},[o,c]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),C.useEffect(()=>{o.setOptions(l)},[l,o]),CS(l,u))throw Mp(l,o,i);if(bS({result:u,errorResetBoundary:i,throwOnError:l.throwOnError,query:s.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw u.error;if((m=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||m.call(h,l,u),l.experimental_prefetchInRender&&!ei&&ES(u,r)){const _=a?Mp(l,o,i):(y=s.getQueryCache().get(l.queryHash))==null?void 0:y.promise;_==null||_.catch(rt).finally(()=>{o.updateResult()})}return l.notifyOnChangeProps?u:o.trackResult(u)}function Et(e,t){return _S(e,lS)}function br(e,t){const n=Nr(),[r]=C.useState(()=>new fS(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);const i=C.useSyncExternalStore(C.useCallback(l=>r.subscribe(Me.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=C.useCallback((l,a)=>{r.mutate(l,a).catch(rt)},[r]);if(i.error&&o0(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}/**
52
+ * @license lucide-react v0.468.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const NS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y0=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
57
+ * @license lucide-react v0.468.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */var jS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
62
+ * @license lucide-react v0.468.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const RS=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:l,...a},o)=>C.createElement("svg",{ref:o,...jS,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:y0("lucide",i),...a},[...l.map(([u,c])=>C.createElement(u,c)),...Array.isArray(s)?s:[s]]));/**
67
+ * @license lucide-react v0.468.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const He=(e,t)=>{const n=C.forwardRef(({className:r,...i},s)=>C.createElement(RS,{ref:s,iconNode:t,className:y0(`lucide-${NS(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
72
+ * @license lucide-react v0.468.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const PS=He("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
77
+ * @license lucide-react v0.468.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const TS=He("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
82
+ * @license lucide-react v0.468.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const x0=He("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
87
+ * @license lucide-react v0.468.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const IS=He("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
92
+ * @license lucide-react v0.468.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const ad=He("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
97
+ * @license lucide-react v0.468.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const LS=He("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
102
+ * @license lucide-react v0.468.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const AS=He("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
107
+ * @license lucide-react v0.468.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const OS=He("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
112
+ * @license lucide-react v0.468.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const DS=He("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
117
+ * @license lucide-react v0.468.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const ni=He("Package",[["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"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
122
+ * @license lucide-react v0.468.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const FS=He("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
127
+ * @license lucide-react v0.468.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const $S=He("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
132
+ * @license lucide-react v0.468.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const v0=He("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
137
+ * @license lucide-react v0.468.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const MS=He("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
142
+ * @license lucide-react v0.468.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const zS=He("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
147
+ * @license lucide-react v0.468.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const US=He("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
152
+ * @license lucide-react v0.468.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const od=He("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
157
+ * @license lucide-react v0.468.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */const Pl=He("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Do="/api",BS="composer_proxy_admin_token";function Fo(){return typeof window<"u"?localStorage.getItem(BS):null}async function Te(e,t={}){const n=Fo(),r={"Content-Type":"application/json",...t.headers};n&&(r.Authorization=`Bearer ${n}`);const i=await fetch(`${Do}${e}`,{...t,headers:r});if(!i.ok){const s=await i.json().catch(()=>({message:"Unknown error"}));throw new Error(s.message||`HTTP ${i.status}`)}return i.json()}async function VS(){try{const t=await(await fetch(`${Do}/auth/check`,{headers:{"Content-Type":"application/json"}})).json();return{authRequired:t.authRequired??!0,setupRequired:t.setupRequired??!1}}catch{return{authRequired:!0,setupRequired:!1}}}async function HS(e){return Te("/setup",{method:"POST",body:JSON.stringify(e)})}async function qS(){return Te("/stats")}async function k0(){return Te("/repositories")}async function QS(e){return Te("/repositories",{method:"POST",body:JSON.stringify(e)})}async function WS(e,t){return Te(`/repositories/${e}`,{method:"PUT",body:JSON.stringify(t)})}async function GS(e){return Te(`/repositories/${e}`,{method:"DELETE"})}async function ZS(e){return Te(`/repositories/${e}/sync`,{method:"POST"})}async function KS(){return Te("/tokens")}async function XS(e,t){return Te(`/tokens/${e}`,{method:"PATCH",body:JSON.stringify(t)})}async function YS(e){return Te(`/tokens/${e}`,{method:"DELETE"})}async function JS(e){const t=e?`?search=${encodeURIComponent(e)}`:"";return Te(`/packages${t}`)}async function eE(e){return Te(`/packages/${encodeURIComponent(e)}`)}async function tE(e,t){const n=Fo(),r={"Content-Type":"text/markdown"};n&&(r.Authorization=`Bearer ${n}`);const i=await fetch(`${Do}/packages/${encodeURIComponent(e)}/${encodeURIComponent(t)}/readme`,{headers:r});if(!i.ok){if(i.status===404)return null;throw new Error(`HTTP ${i.status}`)}return i.text()}async function nE(e,t){const n=Fo(),r={"Content-Type":"text/markdown"};n&&(r.Authorization=`Bearer ${n}`);const i=await fetch(`${Do}/packages/${encodeURIComponent(e)}/${encodeURIComponent(t)}/changelog`,{headers:r});if(!i.ok){if(i.status===404)return null;throw new Error(`HTTP ${i.status}`)}return i.text()}async function rE(e,t){return Te(`/packages/${encodeURIComponent(e)}/${encodeURIComponent(t)}/stats`)}async function $o(){return Te("/settings")}async function iE(e){return Te("/settings/packagist-mirroring",{method:"PUT",body:JSON.stringify({enabled:e})})}async function sE(e,t){return Te("/packages/add-from-mirror",{method:"POST",body:JSON.stringify({repository_id:e,package_names:t})})}async function lE(){return Te("/users").then(e=>e.users)}async function aE(e){return Te("/users",{method:"POST",body:JSON.stringify(e)})}async function oE(e){return Te(`/users/${e}`,{method:"DELETE"})}async function uE(){return Te("/auth/2fa/setup",{method:"POST"})}async function cE(e,t){return Te("/auth/2fa/enable",{method:"POST",body:JSON.stringify({secret:e,code:t})})}async function dE(){return Te("/auth/2fa/disable",{method:"POST"})}async function fE(e,t){return Te("/auth/invite/accept",{method:"POST",body:JSON.stringify({token:e,password:t})})}const zp="composer_proxy_sponsor_banner_dismissed";function hE(){const[e,t]=C.useState(!1);C.useEffect(()=>{if(typeof window<"u"){const r=localStorage.getItem(zp);t(r==="true")}},[]);const n=()=>{t(!0),typeof window<"u"&&localStorage.setItem(zp,"true")};return e?null:f.jsxs("div",{className:"relative bg-gradient-to-r from-pink-500/10 via-purple-500/10 to-pink-500/10 border border-pink-500/20 rounded-lg p-4 mb-6",children:[f.jsx("button",{onClick:n,className:"absolute top-2 right-2 text-slate-400 hover:text-slate-200 transition","aria-label":"Dismiss",children:f.jsx(Pl,{className:"w-4 h-4"})}),f.jsx("div",{className:"pr-8",children:f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx(ad,{className:"w-6 h-6 text-pink-400 fill-pink-400"}),f.jsxs("div",{className:"flex-1",children:[f.jsx("p",{className:"text-slate-200 font-medium mb-1",children:"Enjoying this project? Consider sponsoring!"}),f.jsx("p",{className:"text-slate-400 text-sm mb-3",children:"Built during evenings and weekends. Your support helps keep it going and funds new features, better docs, and faster bug fixes."}),f.jsxs("a",{href:"https://github.com/sponsors/lbajsarowicz",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-pink-500 to-purple-600 hover:from-pink-600 hover:to-purple-700 text-white text-sm font-semibold rounded-lg shadow-lg shadow-pink-500/25 transition",children:[f.jsx(ad,{className:"w-4 h-4 fill-current"}),f.jsx("span",{children:"Sponsor on GitHub"})]})]})]})})]})}function pE(){const{data:e,isLoading:t,error:n}=Et({queryKey:["stats"],queryFn:qS,refetchInterval:3e4}),r=[{title:"Active Repositories",value:(e==null?void 0:e.active_repos)??0,icon:ni,color:"from-primary-500 to-primary-700"},{title:"Cached Packages",value:(e==null?void 0:e.cached_packages)??0,icon:x0,color:"from-accent-500 to-accent-700"},{title:"Total Downloads",value:(e==null?void 0:e.total_downloads)??0,icon:IS,color:"from-emerald-500 to-emerald-700"}];return n?(console.error("Dashboard Error:",n),f.jsx("div",{className:"card p-6","data-testid":"dashboard-error",children:f.jsxs("p",{className:"text-red-400",children:["Error loading stats: ",n.message]})})):f.jsxs("div",{className:"space-y-8","data-testid":"dashboard-page",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"font-display text-2xl font-bold text-slate-100 mb-2","data-testid":"dashboard-heading",children:"Dashboard"}),f.jsx("p",{className:"text-slate-400",children:"Overview of your Composer proxy"})]}),f.jsx(hE,{}),f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6","data-testid":"stats-cards",children:r.map(i=>f.jsxs("div",{className:"card p-6","data-testid":`stat-card-${i.title.toLowerCase().replace(/\s+/g,"-")}`,children:[f.jsxs("div",{className:"flex items-center justify-between mb-4",children:[f.jsx("div",{className:`w-12 h-12 rounded-xl bg-gradient-to-br ${i.color} flex items-center justify-center shadow-lg`,children:f.jsx(i.icon,{className:"w-6 h-6 text-white"})}),t&&f.jsx("div",{className:"w-6 h-6 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin","aria-label":"Loading"})]}),f.jsx("p",{className:"text-slate-400 text-sm mb-1",children:i.title}),f.jsx("p",{className:"font-display text-3xl font-bold text-slate-100",children:t?"...":i.value.toLocaleString()})]},i.title))}),f.jsxs("div",{className:"card p-6","data-testid":"quick-start-section",children:[f.jsx("h3",{className:"font-display text-lg font-semibold text-slate-100 mb-4",children:"Quick Start"}),f.jsxs("div",{className:"space-y-4 text-slate-300",children:[f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("span",{className:"text-primary-400 font-bold",children:"1."}),f.jsxs("p",{children:["Add a ",f.jsx("strong",{children:"repository source"})," in the Repositories tab"]})]}),f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("span",{className:"text-primary-400 font-bold",children:"2."}),f.jsxs("p",{children:["Generate an ",f.jsx("strong",{children:"access token"})," in the Access Tokens tab"]})]}),f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("span",{className:"text-primary-400 font-bold",children:"3."}),f.jsxs("div",{className:"flex-1",children:[f.jsx("p",{className:"mb-3",children:"Configure your project to use this proxy:"}),f.jsxs("div",{className:"mb-4","data-testid":"composer-cli-config",children:[f.jsx("p",{className:"text-sm text-slate-400 mb-2",children:"Using Composer CLI:"}),f.jsx("pre",{className:"bg-slate-950 rounded-lg p-4 overflow-x-auto text-sm text-slate-300",children:f.jsxs("code",{"data-testid":"composer-cli-command",children:["composer config repositories.proxy composer ",window.location.origin]})})]}),f.jsxs("div",{"data-testid":"composer-json-config",children:[f.jsx("p",{className:"text-sm text-slate-400 mb-2",children:"Or manually edit composer.json:"}),f.jsx("pre",{className:"bg-slate-950 rounded-lg p-4 overflow-x-auto text-sm text-slate-300",children:f.jsx("code",{"data-testid":"composer-json-code",children:`{
162
+ "repositories": [
163
+ {
164
+ "type": "composer",
165
+ "url": "${window.location.origin}"
166
+ }
167
+ ]
168
+ }`})})]})]})]})]})]})]})}const io={http_basic:{label:"HTTP Basic (Username/Password)",fields:[{name:"username",label:"Username",type:"text"},{name:"password",label:"Password",type:"password"}]},github_token:{label:"GitHub Token",fields:[{name:"token",label:"Personal Access Token",type:"password"}]},gitlab_token:{label:"GitLab Token",fields:[{name:"token",label:"Personal/Project Access Token",type:"password"}]},bitbucket_app_password:{label:"Bitbucket App Password",fields:[{name:"username",label:"Username",type:"text"},{name:"password",label:"App Password",type:"password"}]},bitbucket_api_token:{label:"Bitbucket API Token",fields:[{name:"token",label:"Token",type:"password"}]},bitbucket_api_key:{label:"Bitbucket API Key",fields:[{name:"key",label:"API Key",type:"password"}]},bitbucket_server_pat:{label:"Bitbucket Server PAT",fields:[{name:"token",label:"Personal Access Token",type:"password"}]},bearer_token:{label:"Bearer Token",fields:[{name:"token",label:"Token",type:"password"}]},none:{label:"No Authentication",fields:[]}},so={composer:["http_basic","bearer_token"],git:["github_token","gitlab_token","bitbucket_app_password","bitbucket_api_token","bitbucket_api_key","bitbucket_server_pat"]};var ge;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const s={};for(const l of i)s[l]=l;return s},e.getValidEnumValues=i=>{const s=e.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),l={};for(const a of s)l[a]=i[a];return e.objectValues(l)},e.objectValues=i=>e.objectKeys(i).map(function(s){return i[s]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const l in i)Object.prototype.hasOwnProperty.call(i,l)&&s.push(l);return s},e.find=(i,s)=>{for(const l of i)if(s(l))return l},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(l=>typeof l=="string"?`'${l}'`:l).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(ge||(ge={}));var Up;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Up||(Up={}));const Z=ge.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Kn=e=>{switch(typeof e){case"undefined":return Z.undefined;case"string":return Z.string;case"number":return Number.isNaN(e)?Z.nan:Z.number;case"boolean":return Z.boolean;case"function":return Z.function;case"bigint":return Z.bigint;case"symbol":return Z.symbol;case"object":return Array.isArray(e)?Z.array:e===null?Z.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Z.promise:typeof Map<"u"&&e instanceof Map?Z.map:typeof Set<"u"&&e instanceof Set?Z.set:typeof Date<"u"&&e instanceof Date?Z.date:Z.object;default:return Z.unknown}},z=ge.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Un extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(s){return s.message},r={_errors:[]},i=s=>{for(const l of s.issues)if(l.code==="invalid_union")l.unionErrors.map(i);else if(l.code==="invalid_return_type")i(l.returnTypeError);else if(l.code==="invalid_arguments")i(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let a=r,o=0;for(;o<l.path.length;){const u=l.path[o];o===l.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(l))):a[u]=a[u]||{_errors:[]},a=a[u],o++}}};return i(this),r}static assert(t){if(!(t instanceof Un))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ge.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const s=i.path[0];n[s]=n[s]||[],n[s].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Un.create=e=>new Un(e);const ud=(e,t)=>{let n;switch(e.code){case z.invalid_type:e.received===Z.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ge.jsonStringifyReplacer)}`;break;case z.unrecognized_keys:n=`Unrecognized key(s) in object: ${ge.joinValues(e.keys,", ")}`;break;case z.invalid_union:n="Invalid input";break;case z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ge.joinValues(e.options)}`;break;case z.invalid_enum_value:n=`Invalid enum value. Expected ${ge.joinValues(e.options)}, received '${e.received}'`;break;case z.invalid_arguments:n="Invalid function arguments";break;case z.invalid_return_type:n="Invalid function return type";break;case z.invalid_date:n="Invalid date";break;case z.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ge.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case z.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case z.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case z.custom:n="Invalid input";break;case z.invalid_intersection_types:n="Intersection results could not be merged";break;case z.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case z.not_finite:n="Number must be finite";break;default:n=t.defaultError,ge.assertNever(e)}return{message:n}};let mE=ud;function gE(){return mE}const yE=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,s=[...n,...i.path||[]],l={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let a="";const o=r.filter(u=>!!u).slice().reverse();for(const u of o)a=u(l,{data:t,defaultError:a}).message;return{...i,path:s,message:a}};function Q(e,t){const n=gE(),r=yE({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ud?void 0:ud].filter(i=>!!i)});e.common.issues.push(r)}class lt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return ne;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const s=await i.key,l=await i.value;r.push({key:s,value:l})}return lt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:s,value:l}=i;if(s.status==="aborted"||l.status==="aborted")return ne;s.status==="dirty"&&t.dirty(),l.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof l.value<"u"||i.alwaysSet)&&(r[s.value]=l.value)}return{status:t.value,value:r}}}const ne=Object.freeze({status:"aborted"}),Os=e=>({status:"dirty",value:e}),zt=e=>({status:"valid",value:e}),Bp=e=>e.status==="aborted",Vp=e=>e.status==="dirty",es=e=>e.status==="valid",lo=e=>typeof Promise<"u"&&e instanceof Promise;var X;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(X||(X={}));class mn{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Hp=(e,t)=>{if(es(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Un(e.common.issues);return this._error=n,this._error}}};function le(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(l,a)=>{const{message:o}=e;return l.code==="invalid_enum_value"?{message:o??a.defaultError}:typeof a.data>"u"?{message:o??r??a.defaultError}:l.code!=="invalid_type"?{message:a.defaultError}:{message:o??n??a.defaultError}},description:i}}class de{get description(){return this._def.description}_getType(t){return Kn(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Kn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new lt,ctx:{common:t.parent.common,data:t.data,parsedType:Kn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(lo(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Kn(t)},i=this._parseSync({data:t,path:r.path,parent:r});return Hp(r,i)}"~validate"(t){var r,i;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Kn(t)};if(!this["~standard"].async)try{const s=this._parseSync({data:t,path:[],parent:n});return es(s)?{value:s.value}:{issues:n.common.issues}}catch(s){(i=(r=s==null?void 0:s.message)==null?void 0:r.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(s=>es(s)?{value:s.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Kn(t)},i=this._parse({data:t,path:r.path,parent:r}),s=await(lo(i)?i:Promise.resolve(i));return Hp(r,s)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const l=t(i),a=()=>s.addIssue({code:z.custom,...r(i)});return typeof Promise<"u"&&l instanceof Promise?l.then(o=>o?!0:(a(),!1)):l?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new rs({schema:this,typeName:te.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return vr.create(this,this._def)}nullable(){return is.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pn.create(this)}promise(){return fo.create(this,this._def)}or(t){return oo.create([this,t],this._def)}and(t){return uo.create(this,t,this._def)}transform(t){return new rs({...le(this._def),schema:this,typeName:te.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new dd({...le(this._def),innerType:this,defaultValue:n,typeName:te.ZodDefault})}brand(){return new zE({typeName:te.ZodBranded,type:this,...le(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new fd({...le(this._def),innerType:this,catchValue:n,typeName:te.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Lf.create(this,t)}readonly(){return hd.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const xE=/^c[^\s-]{8,}$/i,vE=/^[0-9a-z]+$/,kE=/^[0-9A-HJKMNP-TV-Z]{26}$/i,wE=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,bE=/^[a-z0-9_-]{21}$/i,SE=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,EE=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,CE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_E="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let _u;const NE=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jE=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,RE=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,PE=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,TE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,IE=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,w0="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",LE=new RegExp(`^${w0}$`);function b0(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function AE(e){return new RegExp(`^${b0(e)}$`)}function OE(e){let t=`${w0}T${b0(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function DE(e,t){return!!((t==="v4"||!t)&&NE.test(e)||(t==="v6"||!t)&&RE.test(e))}function FE(e,t){if(!SE.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function $E(e,t){return!!((t==="v4"||!t)&&jE.test(e)||(t==="v6"||!t)&&PE.test(e))}class Tn extends de{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Z.string){const s=this._getOrReturnCtx(t);return Q(s,{code:z.invalid_type,expected:Z.string,received:s.parsedType}),ne}const r=new lt;let i;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(i=this._getOrReturnCtx(t,i),Q(i,{code:z.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(i=this._getOrReturnCtx(t,i),Q(i,{code:z.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const l=t.data.length>s.value,a=t.data.length<s.value;(l||a)&&(i=this._getOrReturnCtx(t,i),l?Q(i,{code:z.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&Q(i,{code:z.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")CE.test(t.data)||(i=this._getOrReturnCtx(t,i),Q(i,{validation:"email",code:z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")_u||(_u=new RegExp(_E,"u")),_u.test(t.data)||(i=this._getOrReturnCtx(t,i),Q(i,{validation:"emoji",code:z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")wE.test(t.data)||(i=this._getOrReturnCtx(t,i),Q(i,{validation:"uuid",code:z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")bE.test(t.data)||(i=this._getOrReturnCtx(t,i),Q(i,{validation:"nanoid",code:z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")xE.test(t.data)||(i=this._getOrReturnCtx(t,i),Q(i,{validation:"cuid",code:z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")vE.test(t.data)||(i=this._getOrReturnCtx(t,i),Q(i,{validation:"cuid2",code:z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")kE.test(t.data)||(i=this._getOrReturnCtx(t,i),Q(i,{validation:"ulid",code:z.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Q(i,{validation:"url",code:z.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),Q(i,{validation:"regex",code:z.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(t,i),Q(i,{code:z.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(i=this._getOrReturnCtx(t,i),Q(i,{code:z.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(i=this._getOrReturnCtx(t,i),Q(i,{code:z.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?OE(s).test(t.data)||(i=this._getOrReturnCtx(t,i),Q(i,{code:z.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?LE.test(t.data)||(i=this._getOrReturnCtx(t,i),Q(i,{code:z.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?AE(s).test(t.data)||(i=this._getOrReturnCtx(t,i),Q(i,{code:z.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?EE.test(t.data)||(i=this._getOrReturnCtx(t,i),Q(i,{validation:"duration",code:z.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?DE(t.data,s.version)||(i=this._getOrReturnCtx(t,i),Q(i,{validation:"ip",code:z.invalid_string,message:s.message}),r.dirty()):s.kind==="jwt"?FE(t.data,s.alg)||(i=this._getOrReturnCtx(t,i),Q(i,{validation:"jwt",code:z.invalid_string,message:s.message}),r.dirty()):s.kind==="cidr"?$E(t.data,s.version)||(i=this._getOrReturnCtx(t,i),Q(i,{validation:"cidr",code:z.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?TE.test(t.data)||(i=this._getOrReturnCtx(t,i),Q(i,{validation:"base64",code:z.invalid_string,message:s.message}),r.dirty()):s.kind==="base64url"?IE.test(t.data)||(i=this._getOrReturnCtx(t,i),Q(i,{validation:"base64url",code:z.invalid_string,message:s.message}),r.dirty()):ge.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:z.invalid_string,...X.errToObj(r)})}_addCheck(t){return new Tn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...X.errToObj(t)})}url(t){return this._addCheck({kind:"url",...X.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...X.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...X.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...X.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...X.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...X.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...X.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...X.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...X.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...X.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...X.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...X.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...X.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...X.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...X.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...X.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...X.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...X.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...X.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...X.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...X.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...X.errToObj(n)})}nonempty(t){return this.min(1,X.errToObj(t))}trim(){return new Tn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Tn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Tn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Tn.create=e=>new Tn({checks:[],typeName:te.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...le(e)});function ME(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,s=Number.parseInt(e.toFixed(i).replace(".","")),l=Number.parseInt(t.toFixed(i).replace(".",""));return s%l/10**i}class ts extends de{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Z.number){const s=this._getOrReturnCtx(t);return Q(s,{code:z.invalid_type,expected:Z.number,received:s.parsedType}),ne}let r;const i=new lt;for(const s of this._def.checks)s.kind==="int"?ge.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Q(r,{code:z.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),Q(r,{code:z.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),Q(r,{code:z.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?ME(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),Q(r,{code:z.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Q(r,{code:z.not_finite,message:s.message}),i.dirty()):ge.assertNever(s);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,X.toString(n))}gt(t,n){return this.setLimit("min",t,!1,X.toString(n))}lte(t,n){return this.setLimit("max",t,!0,X.toString(n))}lt(t,n){return this.setLimit("max",t,!1,X.toString(n))}setLimit(t,n,r,i){return new ts({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:X.toString(i)}]})}_addCheck(t){return new ts({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:X.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:X.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:X.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:X.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:X.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:X.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:X.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:X.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:X.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ge.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}ts.create=e=>new ts({checks:[],typeName:te.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...le(e)});class hl extends de{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Z.bigint)return this._getInvalidInput(t);let r;const i=new lt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),Q(r,{code:z.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),Q(r,{code:z.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Q(r,{code:z.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):ge.assertNever(s);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Q(n,{code:z.invalid_type,expected:Z.bigint,received:n.parsedType}),ne}gte(t,n){return this.setLimit("min",t,!0,X.toString(n))}gt(t,n){return this.setLimit("min",t,!1,X.toString(n))}lte(t,n){return this.setLimit("max",t,!0,X.toString(n))}lt(t,n){return this.setLimit("max",t,!1,X.toString(n))}setLimit(t,n,r,i){return new hl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:X.toString(i)}]})}_addCheck(t){return new hl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:X.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:X.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:X.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:X.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:X.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}hl.create=e=>new hl({checks:[],typeName:te.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...le(e)});class qp extends de{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Z.boolean){const r=this._getOrReturnCtx(t);return Q(r,{code:z.invalid_type,expected:Z.boolean,received:r.parsedType}),ne}return zt(t.data)}}qp.create=e=>new qp({typeName:te.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...le(e)});class ao extends de{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Z.date){const s=this._getOrReturnCtx(t);return Q(s,{code:z.invalid_type,expected:Z.date,received:s.parsedType}),ne}if(Number.isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return Q(s,{code:z.invalid_date}),ne}const r=new lt;let i;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(i=this._getOrReturnCtx(t,i),Q(i,{code:z.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(i=this._getOrReturnCtx(t,i),Q(i,{code:z.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):ge.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ao({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:X.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:X.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}ao.create=e=>new ao({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:te.ZodDate,...le(e)});class Qp extends de{_parse(t){if(this._getType(t)!==Z.symbol){const r=this._getOrReturnCtx(t);return Q(r,{code:z.invalid_type,expected:Z.symbol,received:r.parsedType}),ne}return zt(t.data)}}Qp.create=e=>new Qp({typeName:te.ZodSymbol,...le(e)});class Wp extends de{_parse(t){if(this._getType(t)!==Z.undefined){const r=this._getOrReturnCtx(t);return Q(r,{code:z.invalid_type,expected:Z.undefined,received:r.parsedType}),ne}return zt(t.data)}}Wp.create=e=>new Wp({typeName:te.ZodUndefined,...le(e)});class Gp extends de{_parse(t){if(this._getType(t)!==Z.null){const r=this._getOrReturnCtx(t);return Q(r,{code:z.invalid_type,expected:Z.null,received:r.parsedType}),ne}return zt(t.data)}}Gp.create=e=>new Gp({typeName:te.ZodNull,...le(e)});class Zp extends de{constructor(){super(...arguments),this._any=!0}_parse(t){return zt(t.data)}}Zp.create=e=>new Zp({typeName:te.ZodAny,...le(e)});class Kp extends de{constructor(){super(...arguments),this._unknown=!0}_parse(t){return zt(t.data)}}Kp.create=e=>new Kp({typeName:te.ZodUnknown,...le(e)});class Sr extends de{_parse(t){const n=this._getOrReturnCtx(t);return Q(n,{code:z.invalid_type,expected:Z.never,received:n.parsedType}),ne}}Sr.create=e=>new Sr({typeName:te.ZodNever,...le(e)});class Xp extends de{_parse(t){if(this._getType(t)!==Z.undefined){const r=this._getOrReturnCtx(t);return Q(r,{code:z.invalid_type,expected:Z.void,received:r.parsedType}),ne}return zt(t.data)}}Xp.create=e=>new Xp({typeName:te.ZodVoid,...le(e)});class pn extends de{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Z.array)return Q(n,{code:z.invalid_type,expected:Z.array,received:n.parsedType}),ne;if(i.exactLength!==null){const l=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(l||a)&&(Q(n,{code:l?z.too_big:z.too_small,minimum:a?i.exactLength.value:void 0,maximum:l?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Q(n,{code:z.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Q(n,{code:z.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((l,a)=>i.type._parseAsync(new mn(n,l,n.path,a)))).then(l=>lt.mergeArray(r,l));const s=[...n.data].map((l,a)=>i.type._parseSync(new mn(n,l,n.path,a)));return lt.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new pn({...this._def,minLength:{value:t,message:X.toString(n)}})}max(t,n){return new pn({...this._def,maxLength:{value:t,message:X.toString(n)}})}length(t,n){return new pn({...this._def,exactLength:{value:t,message:X.toString(n)}})}nonempty(t){return this.min(1,t)}}pn.create=(e,t)=>new pn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:te.ZodArray,...le(t)});function hi(e){if(e instanceof De){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=vr.create(hi(r))}return new De({...e._def,shape:()=>t})}else return e instanceof pn?new pn({...e._def,type:hi(e.element)}):e instanceof vr?vr.create(hi(e.unwrap())):e instanceof is?is.create(hi(e.unwrap())):e instanceof ri?ri.create(e.items.map(t=>hi(t))):e}class De extends de{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ge.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Z.object){const u=this._getOrReturnCtx(t);return Q(u,{code:z.invalid_type,expected:Z.object,received:u.parsedType}),ne}const{status:r,ctx:i}=this._processInputParams(t),{shape:s,keys:l}=this._getCached(),a=[];if(!(this._def.catchall instanceof Sr&&this._def.unknownKeys==="strip"))for(const u in i.data)l.includes(u)||a.push(u);const o=[];for(const u of l){const c=s[u],d=i.data[u];o.push({key:{status:"valid",value:u},value:c._parse(new mn(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Sr){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)o.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")a.length>0&&(Q(i,{code:z.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const d=i.data[c];o.push({key:{status:"valid",value:c},value:u._parse(new mn(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of o){const d=await c.key,p=await c.value;u.push({key:d,value:p,alwaysSet:c.alwaysSet})}return u}).then(u=>lt.mergeObjectSync(r,u)):lt.mergeObjectSync(r,o)}get shape(){return this._def.shape()}strict(t){return X.errToObj,new De({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,l;const i=((l=(s=this._def).errorMap)==null?void 0:l.call(s,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:X.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new De({...this._def,unknownKeys:"strip"})}passthrough(){return new De({...this._def,unknownKeys:"passthrough"})}extend(t){return new De({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new De({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:te.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new De({...this._def,catchall:t})}pick(t){const n={};for(const r of ge.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new De({...this._def,shape:()=>n})}omit(t){const n={};for(const r of ge.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new De({...this._def,shape:()=>n})}deepPartial(){return hi(this)}partial(t){const n={};for(const r of ge.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new De({...this._def,shape:()=>n})}required(t){const n={};for(const r of ge.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof vr;)s=s._def.innerType;n[r]=s}return new De({...this._def,shape:()=>n})}keyof(){return S0(ge.objectKeys(this.shape))}}De.create=(e,t)=>new De({shape:()=>e,unknownKeys:"strip",catchall:Sr.create(),typeName:te.ZodObject,...le(t)});De.strictCreate=(e,t)=>new De({shape:()=>e,unknownKeys:"strict",catchall:Sr.create(),typeName:te.ZodObject,...le(t)});De.lazycreate=(e,t)=>new De({shape:e,unknownKeys:"strip",catchall:Sr.create(),typeName:te.ZodObject,...le(t)});class oo extends de{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(s){for(const a of s)if(a.result.status==="valid")return a.result;for(const a of s)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const l=s.map(a=>new Un(a.ctx.common.issues));return Q(n,{code:z.invalid_union,unionErrors:l}),ne}if(n.common.async)return Promise.all(r.map(async s=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(i);{let s;const l=[];for(const o of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=o._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:u}),u.common.issues.length&&l.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const a=l.map(o=>new Un(o));return Q(n,{code:z.invalid_union,unionErrors:a}),ne}}get options(){return this._def.options}}oo.create=(e,t)=>new oo({options:e,typeName:te.ZodUnion,...le(t)});function cd(e,t){const n=Kn(e),r=Kn(t);if(e===t)return{valid:!0,data:e};if(n===Z.object&&r===Z.object){const i=ge.objectKeys(t),s=ge.objectKeys(e).filter(a=>i.indexOf(a)!==-1),l={...e,...t};for(const a of s){const o=cd(e[a],t[a]);if(!o.valid)return{valid:!1};l[a]=o.data}return{valid:!0,data:l}}else if(n===Z.array&&r===Z.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let s=0;s<e.length;s++){const l=e[s],a=t[s],o=cd(l,a);if(!o.valid)return{valid:!1};i.push(o.data)}return{valid:!0,data:i}}else return n===Z.date&&r===Z.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class uo extends de{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(s,l)=>{if(Bp(s)||Bp(l))return ne;const a=cd(s.value,l.value);return a.valid?((Vp(s)||Vp(l))&&n.dirty(),{status:n.value,value:a.data}):(Q(r,{code:z.invalid_intersection_types}),ne)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,l])=>i(s,l)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}uo.create=(e,t,n)=>new uo({left:e,right:t,typeName:te.ZodIntersection,...le(n)});class ri extends de{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Z.array)return Q(r,{code:z.invalid_type,expected:Z.array,received:r.parsedType}),ne;if(r.data.length<this._def.items.length)return Q(r,{code:z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ne;!this._def.rest&&r.data.length>this._def.items.length&&(Q(r,{code:z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((l,a)=>{const o=this._def.items[a]||this._def.rest;return o?o._parse(new mn(r,l,r.path,a)):null}).filter(l=>!!l);return r.common.async?Promise.all(s).then(l=>lt.mergeArray(n,l)):lt.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new ri({...this._def,rest:t})}}ri.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ri({items:e,typeName:te.ZodTuple,rest:null,...le(t)})};class co extends de{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Z.object)return Q(r,{code:z.invalid_type,expected:Z.object,received:r.parsedType}),ne;const i=[],s=this._def.keyType,l=this._def.valueType;for(const a in r.data)i.push({key:s._parse(new mn(r,a,r.path,a)),value:l._parse(new mn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?lt.mergeObjectAsync(n,i):lt.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof de?new co({keyType:t,valueType:n,typeName:te.ZodRecord,...le(r)}):new co({keyType:Tn.create(),valueType:t,typeName:te.ZodRecord,...le(n)})}}class Yp extends de{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Z.map)return Q(r,{code:z.invalid_type,expected:Z.map,received:r.parsedType}),ne;const i=this._def.keyType,s=this._def.valueType,l=[...r.data.entries()].map(([a,o],u)=>({key:i._parse(new mn(r,a,r.path,[u,"key"])),value:s._parse(new mn(r,o,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const o of l){const u=await o.key,c=await o.value;if(u.status==="aborted"||c.status==="aborted")return ne;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const o of l){const u=o.key,c=o.value;if(u.status==="aborted"||c.status==="aborted")return ne;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}}Yp.create=(e,t,n)=>new Yp({valueType:t,keyType:e,typeName:te.ZodMap,...le(n)});class pl extends de{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Z.set)return Q(r,{code:z.invalid_type,expected:Z.set,received:r.parsedType}),ne;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Q(r,{code:z.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(Q(r,{code:z.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function l(o){const u=new Set;for(const c of o){if(c.status==="aborted")return ne;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((o,u)=>s._parse(new mn(r,o,r.path,u)));return r.common.async?Promise.all(a).then(o=>l(o)):l(a)}min(t,n){return new pl({...this._def,minSize:{value:t,message:X.toString(n)}})}max(t,n){return new pl({...this._def,maxSize:{value:t,message:X.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}pl.create=(e,t)=>new pl({valueType:e,minSize:null,maxSize:null,typeName:te.ZodSet,...le(t)});class Jp extends de{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Jp.create=(e,t)=>new Jp({getter:e,typeName:te.ZodLazy,...le(t)});class em extends de{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Q(n,{received:n.data,code:z.invalid_literal,expected:this._def.value}),ne}return{status:"valid",value:t.data}}get value(){return this._def.value}}em.create=(e,t)=>new em({value:e,typeName:te.ZodLiteral,...le(t)});function S0(e,t){return new ns({values:e,typeName:te.ZodEnum,...le(t)})}class ns extends de{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Q(n,{expected:ge.joinValues(r),received:n.parsedType,code:z.invalid_type}),ne}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Q(n,{received:n.data,code:z.invalid_enum_value,options:r}),ne}return zt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return ns.create(t,{...this._def,...n})}exclude(t,n=this._def){return ns.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ns.create=S0;class tm extends de{_parse(t){const n=ge.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Z.string&&r.parsedType!==Z.number){const i=ge.objectValues(n);return Q(r,{expected:ge.joinValues(i),received:r.parsedType,code:z.invalid_type}),ne}if(this._cache||(this._cache=new Set(ge.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=ge.objectValues(n);return Q(r,{received:r.data,code:z.invalid_enum_value,options:i}),ne}return zt(t.data)}get enum(){return this._def.values}}tm.create=(e,t)=>new tm({values:e,typeName:te.ZodNativeEnum,...le(t)});class fo extends de{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Z.promise&&n.common.async===!1)return Q(n,{code:z.invalid_type,expected:Z.promise,received:n.parsedType}),ne;const r=n.parsedType===Z.promise?n.data:Promise.resolve(n.data);return zt(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}fo.create=(e,t)=>new fo({type:e,typeName:te.ZodPromise,...le(t)});class rs extends de{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,s={addIssue:l=>{Q(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const l=i.transform(r.data,s);if(r.common.async)return Promise.resolve(l).then(async a=>{if(n.value==="aborted")return ne;const o=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return o.status==="aborted"?ne:o.status==="dirty"||n.value==="dirty"?Os(o.value):o});{if(n.value==="aborted")return ne;const a=this._def.schema._parseSync({data:l,path:r.path,parent:r});return a.status==="aborted"?ne:a.status==="dirty"||n.value==="dirty"?Os(a.value):a}}if(i.type==="refinement"){const l=a=>{const o=i.refinement(a,s);if(r.common.async)return Promise.resolve(o);if(o instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?ne:(a.status==="dirty"&&n.dirty(),l(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?ne:(a.status==="dirty"&&n.dirty(),l(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!es(l))return ne;const a=i.transform(l.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>es(l)?Promise.resolve(i.transform(l.value,s)).then(a=>({status:n.value,value:a})):ne);ge.assertNever(i)}}rs.create=(e,t,n)=>new rs({schema:e,typeName:te.ZodEffects,effect:t,...le(n)});rs.createWithPreprocess=(e,t,n)=>new rs({schema:t,effect:{type:"preprocess",transform:e},typeName:te.ZodEffects,...le(n)});class vr extends de{_parse(t){return this._getType(t)===Z.undefined?zt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}vr.create=(e,t)=>new vr({innerType:e,typeName:te.ZodOptional,...le(t)});class is extends de{_parse(t){return this._getType(t)===Z.null?zt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}is.create=(e,t)=>new is({innerType:e,typeName:te.ZodNullable,...le(t)});class dd extends de{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Z.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}dd.create=(e,t)=>new dd({innerType:e,typeName:te.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...le(t)});class fd extends de{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return lo(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Un(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Un(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}fd.create=(e,t)=>new fd({innerType:e,typeName:te.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...le(t)});class nm extends de{_parse(t){if(this._getType(t)!==Z.nan){const r=this._getOrReturnCtx(t);return Q(r,{code:z.invalid_type,expected:Z.nan,received:r.parsedType}),ne}return{status:"valid",value:t.data}}}nm.create=e=>new nm({typeName:te.ZodNaN,...le(e)});class zE extends de{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Lf extends de{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ne:s.status==="dirty"?(n.dirty(),Os(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ne:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new Lf({in:t,out:n,typeName:te.ZodPipeline})}}class hd extends de{_parse(t){const n=this._def.innerType._parse(t),r=i=>(es(i)&&(i.value=Object.freeze(i.value)),i);return lo(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}hd.create=(e,t)=>new hd({innerType:e,typeName:te.ZodReadonly,...le(t)});var te;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(te||(te={}));const bt=Tn.create,In=ts.create;Sr.create;pn.create;const Tl=De.create;oo.create;uo.create;ri.create;const UE=co.create,Mo=ns.create;fo.create;vr.create;is.create;const E0=Mo(["http_basic","github_token","gitlab_token","bitbucket_app_password","bitbucket_api_token","bitbucket_api_key","bitbucket_server_pat","bearer_token"]),C0=Mo(["git","composer","artifact"]),BE=Tl({url:bt().url("Invalid repository URL"),vcs_type:C0,credential_type:E0,auth_credentials:UE(bt()).refine(e=>Object.keys(e).length>0,"At least one credential field is required"),composer_json_path:bt().optional(),package_filter:bt().optional()});BE.partial();Tl({id:bt(),url:bt(),vcs_type:C0,credential_type:E0,composer_json_path:bt().nullable(),package_filter:bt().nullable(),status:Mo(["pending","active","error","syncing"]),error_message:bt().nullable(),last_synced_at:In().nullable(),created_at:In()});const _0=Mo(["readonly","write"]);Tl({description:bt().min(1,"Description is required"),permissions:_0.default("readonly"),rate_limit_max:In().int().min(0).max(25e3,"Rate limit cannot exceed 25,000 requests/hour").nullable().default(1e3),expires_at:In().int().positive().optional()});Tl({description:bt().min(1,"Description is required").optional(),rate_limit_max:In().int().min(0).max(25e3,"Rate limit cannot exceed 25,000 requests/hour").nullable().optional()});Tl({id:bt(),description:bt(),permissions:_0,rate_limit_max:In().nullable(),created_at:In(),expires_at:In().nullable(),last_used_at:In().nullable()});const N0=C.createContext(void 0),Nu="composer_proxy_admin_token";function VE({children:e}){const[t,n]=C.useState(()=>typeof window<"u"?localStorage.getItem(Nu):null),[r,i]=C.useState(null),[s,l]=C.useState(null);C.useEffect(()=>{t?fetch("/api/auth/me",{headers:{Authorization:`Bearer ${t}`}}).then(d=>{if(d.ok)return d.json();throw new Error("Failed to fetch user")}).then(d=>i(d.user)).catch(d=>{console.error("AuthContext: Failed to fetch user",d),l(d.message||"Unknown auth error"),o()}):i(null)},[t]);const a=d=>{n(d),localStorage.setItem(Nu,d),l(null)},o=()=>{n(null),i(null),localStorage.removeItem(Nu)},u=t!==null&&t.length>0,c=(r==null?void 0:r.role)==="admin";return f.jsx(N0.Provider,{value:{adminToken:t,isAuthenticated:u,user:r,isAdmin:c,login:a,logout:o,authError:s},children:e})}function fs(){const e=C.useContext(N0);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}function HE(){const[e,t]=C.useState(!1),[n,r]=C.useState(null),i=Nr(),{data:s=[],isLoading:l}=Et({queryKey:["repositories"],queryFn:k0}),{data:a}=Et({queryKey:["settings"],queryFn:$o}),o=(a==null?void 0:a.packagist_mirroring_enabled)??!0,u=s.filter(m=>m.id!=="packagist"||o),c=br({mutationFn:GS,onSuccess:()=>{i.invalidateQueries({queryKey:["repositories"]})}}),d=br({mutationFn:ZS,onSuccess:()=>{i.invalidateQueries({queryKey:["repositories"]})}}),p=m=>{const y={active:"bg-emerald-500/20 text-emerald-400 border-emerald-500/30",error:"bg-red-500/20 text-red-400 border-red-500/30",pending:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",syncing:"bg-blue-500/20 text-blue-400 border-blue-500/30"};return f.jsx("span",{className:`px-2 py-1 text-xs font-medium rounded-full border ${y[m]}`,children:m})},{isAdmin:h}=fs();return f.jsxs("div",{className:"space-y-8","data-testid":"repositories-page",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"font-display text-2xl font-bold text-slate-100 mb-2","data-testid":"repositories-heading",children:"Repositories"}),f.jsx("p",{className:"text-slate-400",children:"Manage your package sources. Packages are loaded on-demand when requested."})]}),h&&f.jsx("button",{onClick:()=>t(!0),className:"btn-primary","data-testid":"add-repository-button","aria-label":"Add new repository",children:"+ Add Repository"})]}),f.jsx("div",{className:"card overflow-hidden",children:l?f.jsx("div",{className:"p-8 text-center",children:f.jsx("div",{className:"w-8 h-8 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin mx-auto"})}):u.length===0?f.jsxs("div",{className:"p-8 text-center text-slate-400",children:["No repositories configured yet. ",h?"Add your first repository to get started.":"Ask an admin to configure repositories."]}):f.jsxs("table",{className:"w-full",children:[f.jsx("thead",{className:"bg-slate-800/50 border-b border-slate-700",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"URL"}),f.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Type"}),f.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Status"}),f.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Last Tested"}),h&&f.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Actions"})]})}),f.jsx("tbody",{className:"divide-y divide-slate-800",children:u.map(m=>{const y=m.id==="packagist";return f.jsxs("tr",{className:"hover:bg-slate-800/30",children:[f.jsxs("td",{className:"px-6 py-4",children:[f.jsxs("div",{className:"text-sm text-slate-200 font-medium truncate max-w-xs",children:[m.url,y&&f.jsx("span",{className:"ml-2 text-xs text-slate-500",children:"(Public Packagist)"})]}),m.error_message&&f.jsx("div",{className:"text-xs text-red-400 mt-1",children:m.error_message})]}),f.jsxs("td",{className:"px-6 py-4 text-sm text-slate-400",children:[m.vcs_type," / ",m.credential_type]}),f.jsx("td",{className:"px-6 py-4",children:p(m.status)}),f.jsx("td",{className:"px-6 py-4 text-sm text-slate-400",children:m.last_synced_at?new Date(m.last_synced_at*1e3).toLocaleString():"Never"}),h&&f.jsxs("td",{className:"px-6 py-4 text-right space-x-3",children:[!y&&f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>d.mutate(m.id),disabled:d.isPending||m.status==="syncing",className:"text-primary-400 hover:text-primary-300 text-sm disabled:opacity-50",title:"Test connection and validate credentials. Packages are loaded on-demand when requested.",children:m.status==="syncing"?"Testing...":"Test"}),f.jsx("button",{onClick:()=>r(m),className:"text-slate-400 hover:text-slate-200 text-sm",children:"Edit"}),f.jsx("button",{onClick:()=>{confirm("Delete this repository?")&&c.mutate(m.id)},className:"text-red-400 hover:text-red-300 text-sm",children:"Delete"})]}),y&&f.jsx("span",{className:"text-xs text-slate-500 italic",children:"Managed by system"})]})]},m.id)})})]})}),f.jsx(WE,{}),e&&f.jsx(qE,{onClose:()=>t(!1)}),n&&f.jsx(QE,{repository:n,onClose:()=>r(null)})]})}function qE({onClose:e}){var v;const[t,n]=C.useState(""),[r,i]=C.useState("composer"),[s,l]=C.useState("http_basic"),[a,o]=C.useState({}),[u,c]=C.useState(""),[d,p]=C.useState(""),h=Nr(),m=br({mutationFn:QS,onSuccess:()=>{h.invalidateQueries({queryKey:["repositories"]}),e()}}),y=so[r]||[],_=((v=io[s])==null?void 0:v.fields)||[],g=w=>{i(w);const j=so[w]||[];j.length>0&&!j.includes(s)&&(l(j[0]),o({}))},x=w=>{w.preventDefault(),m.mutate({url:t,vcs_type:r,credential_type:s,auth_credentials:a,composer_json_path:u||void 0,package_filter:d||void 0})};return f.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:f.jsxs("div",{className:"card max-w-lg w-full mx-4 p-6",children:[f.jsxs("div",{className:"flex items-center justify-between mb-6",children:[f.jsx("h3",{className:"font-display text-xl font-bold text-slate-100",children:"Add Repository"}),f.jsx("button",{onClick:e,className:"text-slate-400 hover:text-slate-200",children:f.jsx(Pl,{className:"w-4 h-4"})})]}),f.jsxs("form",{onSubmit:x,className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"label",children:"Repository URL"}),f.jsx("input",{type:"url",value:t,onChange:w=>n(w.target.value),placeholder:"https://github.com/owner/repo or https://composer.example.com",className:"input w-full",required:!0})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"label",children:"Source Type"}),f.jsxs("select",{value:r,onChange:w=>g(w.target.value),className:"input w-full",children:[f.jsx("option",{value:"composer",children:"Composer Repository"}),f.jsx("option",{value:"git",children:"Git Repository"})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"label",children:"Credential Type"}),f.jsx("select",{value:s,onChange:w=>{l(w.target.value),o({})},className:"input w-full",children:y.map(w=>{var j;return f.jsx("option",{value:w,children:((j=io[w])==null?void 0:j.label)||w},w)})})]})]}),_.map(w=>f.jsxs("div",{children:[f.jsx("label",{className:"label",children:w.label}),f.jsx("input",{type:w.type,value:a[w.name]||"",onChange:j=>o(N=>({...N,[w.name]:j.target.value})),className:"input w-full",required:!0})]},w.name)),r==="git"&&f.jsxs("div",{children:[f.jsx("label",{className:"label",children:"Composer.json Path (optional)"}),f.jsx("input",{type:"text",value:u,onChange:w=>c(w.target.value),placeholder:"**/composer.json",className:"input w-full"}),f.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Glob pattern to find composer.json files. Default: **/composer.json"})]}),r==="composer"&&f.jsxs("div",{children:[f.jsx("label",{className:"label",children:"Package Filter (optional)"}),f.jsx("input",{type:"text",value:d,onChange:w=>p(w.target.value),placeholder:"vendor/package1, vendor/package2",className:"input w-full"}),f.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Comma-separated list of packages to filter. Optional - leave empty to allow all packages. Packages are loaded on-demand when requested by Composer."})]}),f.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[f.jsx("button",{type:"button",onClick:e,className:"btn-secondary",children:"Cancel"}),f.jsx("button",{type:"submit",className:"btn-primary",disabled:m.isPending,children:m.isPending?"Adding...":"Add Repository"})]}),m.error&&f.jsx("p",{className:"text-red-400 text-sm",children:m.error.message})]})]})})}function QE({repository:e,onClose:t}){var w;const[n,r]=C.useState(e.url),[i,s]=C.useState(e.vcs_type),[l,a]=C.useState(e.credential_type),[o,u]=C.useState({}),[c,d]=C.useState(e.composer_json_path||""),[p,h]=C.useState(e.package_filter||""),m=Nr(),y=br({mutationFn:j=>WS(e.id,j),onSuccess:()=>{m.invalidateQueries({queryKey:["repositories"]}),t()}}),_=so[i]||[],g=((w=io[l])==null?void 0:w.fields)||[],x=j=>{s(j);const N=so[j]||[];N.length>0&&!N.includes(l)&&(a(N[0]),u({}))},v=j=>{j.preventDefault();const N={};if(n!==e.url&&(N.url=n),i!==e.vcs_type&&(N.vcs_type=i),l!==e.credential_type&&(N.credential_type=l),Object.values(o).some(A=>A.trim()!=="")&&(N.auth_credentials=o),c!==(e.composer_json_path||"")&&(N.composer_json_path=c||void 0),p!==(e.package_filter||"")&&(N.package_filter=p||void 0),Object.keys(N).length===0){t();return}y.mutate(N)};return f.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:f.jsxs("div",{className:"card max-w-lg w-full mx-4 p-6",children:[f.jsxs("div",{className:"flex items-center justify-between mb-6",children:[f.jsx("h3",{className:"font-display text-xl font-bold text-slate-100",children:"Edit Repository"}),f.jsx("button",{onClick:t,className:"text-slate-400 hover:text-slate-200",children:f.jsx(Pl,{className:"w-4 h-4"})})]}),f.jsxs("form",{onSubmit:v,className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"label",children:"Repository URL"}),f.jsx("input",{type:"url",value:n,onChange:j=>r(j.target.value),placeholder:"https://github.com/owner/repo or https://composer.example.com",className:"input w-full",required:!0})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"label",children:"Source Type"}),f.jsxs("select",{value:i,onChange:j=>x(j.target.value),className:"input w-full",children:[f.jsx("option",{value:"composer",children:"Composer Repository"}),f.jsx("option",{value:"git",children:"Git Repository"})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"label",children:"Credential Type"}),f.jsx("select",{value:l,onChange:j=>{a(j.target.value),u({})},className:"input w-full",children:_.map(j=>{var N;return f.jsx("option",{value:j,children:((N=io[j])==null?void 0:N.label)||j},j)})})]})]}),f.jsxs("div",{className:"space-y-4",children:[f.jsx("p",{className:"text-xs text-slate-500",children:"Leave credential fields empty to keep current values."}),g.map(j=>f.jsxs("div",{children:[f.jsx("label",{className:"label",children:j.label}),f.jsx("input",{type:j.type,value:o[j.name]||"",onChange:N=>u(T=>({...T,[j.name]:N.target.value})),placeholder:"Leave empty to keep current",className:"input w-full"})]},j.name))]}),i==="git"&&f.jsxs("div",{children:[f.jsx("label",{className:"label",children:"Composer.json Path (optional)"}),f.jsx("input",{type:"text",value:c,onChange:j=>d(j.target.value),placeholder:"**/composer.json",className:"input w-full"}),f.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Glob pattern to find composer.json files. Default: **/composer.json"})]}),i==="composer"&&f.jsxs("div",{children:[f.jsx("label",{className:"label",children:"Package Filter (optional)"}),f.jsx("input",{type:"text",value:p,onChange:j=>h(j.target.value),placeholder:"vendor/package1, vendor/package2",className:"input w-full"}),f.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Comma-separated list of packages to filter. Optional - leave empty to allow all packages. Packages are loaded on-demand when requested by Composer."})]}),f.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[f.jsx("button",{type:"button",onClick:t,className:"btn-secondary",children:"Cancel"}),f.jsx("button",{type:"submit",className:"btn-primary",disabled:y.isPending,children:y.isPending?"Saving...":"Save Changes"})]}),y.error&&f.jsx("p",{className:"text-red-400 text-sm",children:y.error.message})]})]})})}function WE(){const e=Nr(),{isAdmin:t}=fs(),{data:n,isLoading:r}=Et({queryKey:["settings"],queryFn:$o}),i=br({mutationFn:iE,onSuccess:()=>{e.invalidateQueries({queryKey:["settings"]})}}),s=(n==null?void 0:n.packagist_mirroring_enabled)??!0,l=()=>{t&&i.mutate(!s)};return f.jsxs("div",{className:"card p-6 mt-8",children:[f.jsxs("div",{className:"flex items-start justify-between",children:[f.jsxs("div",{className:"flex-1",children:[f.jsx("h3",{className:"font-display text-lg font-semibold text-slate-100 mb-2",children:"Public Packagist Mirroring"}),f.jsxs("p",{className:"text-slate-400 text-sm mb-4",children:["When enabled, packages not found in your private repositories will be proxied from"," ",f.jsx("a",{href:"https://packagist.org",target:"_blank",rel:"noopener noreferrer",className:"text-primary-400 hover:underline",children:"packagist.org"}),". This allows Composer to resolve public dependencies through this proxy."]}),f.jsxs("div",{className:"bg-slate-800/50 rounded-lg p-4 text-sm",children:[f.jsx("p",{className:"text-slate-300 mb-2",children:f.jsx("strong",{children:"When to disable:"})}),f.jsxs("ul",{className:"list-disc list-inside text-slate-400 space-y-1",children:[f.jsx("li",{children:"You're using Magento Marketplace or another private repository as your primary source"}),f.jsx("li",{children:"You want to ensure only private packages are served by this proxy"}),f.jsx("li",{children:"You have a separate Packagist mirror configured in your Composer"})]})]})]}),f.jsxs("div",{className:"ml-8 flex flex-col items-center",children:[f.jsx("button",{onClick:l,disabled:r||i.isPending||!t,className:`relative inline-flex h-7 w-14 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 focus:ring-offset-slate-900 disabled:opacity-50 ${s?"bg-primary-600":"bg-slate-700"}`,role:"switch","aria-checked":s,children:f.jsx("span",{className:`pointer-events-none inline-block h-6 w-6 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${s?"translate-x-7":"translate-x-0"}`})}),f.jsx("span",{className:"mt-2 text-xs text-slate-500",children:r?"Loading...":s?"Enabled":"Disabled"})]})]}),i.isError&&f.jsxs("p",{className:"text-red-400 text-sm mt-4",children:["Failed to update setting: ",i.error.message]})]})}function GE(){const[e,t]=C.useState(!1),[n,r]=C.useState(null),i=Nr(),{isAdmin:s}=fs(),{data:l=[],isLoading:a}=Et({queryKey:["tokens"],queryFn:KS}),{data:o,isLoading:u}=Et({queryKey:["settings"],queryFn:$o}),c=(o==null?void 0:o.kv_available)??!1,d=a||u,p=br({mutationFn:({id:m,data:y})=>XS(m,y),onSuccess:()=>{i.invalidateQueries({queryKey:["tokens"]})}}),h=br({mutationFn:YS,onSuccess:()=>{i.invalidateQueries({queryKey:["tokens"]})}});return f.jsxs("div",{className:"space-y-8","data-testid":"tokens-page",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"font-display text-2xl font-bold text-slate-100 mb-2","data-testid":"tokens-heading",children:"Access Tokens"}),f.jsx("p",{className:"text-slate-400",children:"Manage tokens for Composer authentication"})]}),s&&f.jsx("button",{onClick:()=>t(!0),className:"btn-primary","data-testid":"generate-token-button","aria-label":"Generate new access token",children:"+ Generate Token"})]}),f.jsx("div",{className:"card overflow-hidden",children:d?f.jsx("div",{className:"p-8 text-center",children:f.jsx("div",{className:"w-8 h-8 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin mx-auto"})}):l.length===0?f.jsxs("div",{className:"p-8 text-center text-slate-400",children:["No tokens generated yet. ",s?"Create your first token to authenticate Composer.":"Ask an admin to generate tokens."]}):f.jsxs("table",{className:"w-full",children:[f.jsx("thead",{className:"bg-slate-800/50 border-b border-slate-700",children:f.jsxs("tr",{children:[f.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Description"}),f.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Permissions"}),c&&f.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Rate Limit"}),f.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Created"}),f.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Last Used"}),s&&f.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Actions"})]})}),f.jsx("tbody",{className:"divide-y divide-slate-800",children:l.map(m=>f.jsx(ZE,{token:m,onUpdate:y=>p.mutate({id:m.id,data:y}),onDelete:()=>{confirm("Revoke this token?")&&h.mutate(m.id)},isUpdating:p.isPending,kvAvailable:c,isAdmin:s},m.id))})]})})]})}function ZE({token:e,onUpdate:t,onDelete:n,isUpdating:r,kvAvailable:i,isAdmin:s}){const[l,a]=C.useState(!1),[o,u]=C.useState(e.description),c=()=>{t({description:o}),a(!1)},d=()=>{u(e.description),a(!1)};return f.jsxs("tr",{className:"hover:bg-slate-800/30",children:[f.jsx("td",{className:"px-6 py-4 text-sm text-slate-200 font-medium",children:l?f.jsx("input",{type:"text",value:o,onChange:p=>u(p.target.value),className:"input w-full text-sm",autoFocus:!0}):e.description}),s&&f.jsx("td",{className:"px-6 py-4 text-right",children:f.jsx("div",{className:"flex items-center justify-end gap-2",children:l?f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:c,disabled:r,className:"text-green-400 hover:text-green-300 text-sm flex items-center gap-1",title:"Save",children:f.jsx($S,{className:"w-4 h-4"})}),f.jsx("button",{onClick:d,disabled:r,className:"text-slate-400 hover:text-slate-200 text-sm",title:"Cancel",children:f.jsx(Pl,{className:"w-4 h-4"})})]}):f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:()=>a(!0),className:"text-blue-400 hover:text-blue-300 text-sm flex items-center gap-1",title:"Edit",children:f.jsx(FS,{className:"w-4 h-4"})}),f.jsx("button",{onClick:n,className:"text-red-400 hover:text-red-300 text-sm",title:"Revoke",children:"Revoke"})]})})})]})}var pd={exports:{}};const KE="2.0.0",j0=256,XE=Number.MAX_SAFE_INTEGER||9007199254740991,YE=16,JE=j0-6,eC=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var zo={MAX_LENGTH:j0,MAX_SAFE_COMPONENT_LENGTH:YE,MAX_SAFE_BUILD_LENGTH:JE,MAX_SAFE_INTEGER:XE,RELEASE_TYPES:eC,SEMVER_SPEC_VERSION:KE,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},ju={};const tC=typeof process=="object"&&ju&&ju.NODE_DEBUG&&/\bsemver\b/i.test(ju.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Uo=tC;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=zo,s=Uo;t=e.exports={};const l=t.re=[],a=t.safeRe=[],o=t.src=[],u=t.safeSrc=[],c=t.t={};let d=0;const p="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[p,r]],m=_=>{for(const[g,x]of h)_=_.split(`${g}*`).join(`${g}{0,${x}}`).split(`${g}+`).join(`${g}{1,${x}}`);return _},y=(_,g,x)=>{const v=m(g),w=d++;s(_,w,g),c[_]=w,o[w]=g,u[w]=v,l[w]=new RegExp(g,x?"g":void 0),a[w]=new RegExp(v,x?"g":void 0)};y("NUMERICIDENTIFIER","0|[1-9]\\d*"),y("NUMERICIDENTIFIERLOOSE","\\d+"),y("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),y("MAINVERSION",`(${o[c.NUMERICIDENTIFIER]})\\.(${o[c.NUMERICIDENTIFIER]})\\.(${o[c.NUMERICIDENTIFIER]})`),y("MAINVERSIONLOOSE",`(${o[c.NUMERICIDENTIFIERLOOSE]})\\.(${o[c.NUMERICIDENTIFIERLOOSE]})\\.(${o[c.NUMERICIDENTIFIERLOOSE]})`),y("PRERELEASEIDENTIFIER",`(?:${o[c.NONNUMERICIDENTIFIER]}|${o[c.NUMERICIDENTIFIER]})`),y("PRERELEASEIDENTIFIERLOOSE",`(?:${o[c.NONNUMERICIDENTIFIER]}|${o[c.NUMERICIDENTIFIERLOOSE]})`),y("PRERELEASE",`(?:-(${o[c.PRERELEASEIDENTIFIER]}(?:\\.${o[c.PRERELEASEIDENTIFIER]})*))`),y("PRERELEASELOOSE",`(?:-?(${o[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[c.PRERELEASEIDENTIFIERLOOSE]})*))`),y("BUILDIDENTIFIER",`${p}+`),y("BUILD",`(?:\\+(${o[c.BUILDIDENTIFIER]}(?:\\.${o[c.BUILDIDENTIFIER]})*))`),y("FULLPLAIN",`v?${o[c.MAINVERSION]}${o[c.PRERELEASE]}?${o[c.BUILD]}?`),y("FULL",`^${o[c.FULLPLAIN]}$`),y("LOOSEPLAIN",`[v=\\s]*${o[c.MAINVERSIONLOOSE]}${o[c.PRERELEASELOOSE]}?${o[c.BUILD]}?`),y("LOOSE",`^${o[c.LOOSEPLAIN]}$`),y("GTLT","((?:<|>)?=?)"),y("XRANGEIDENTIFIERLOOSE",`${o[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),y("XRANGEIDENTIFIER",`${o[c.NUMERICIDENTIFIER]}|x|X|\\*`),y("XRANGEPLAIN",`[v=\\s]*(${o[c.XRANGEIDENTIFIER]})(?:\\.(${o[c.XRANGEIDENTIFIER]})(?:\\.(${o[c.XRANGEIDENTIFIER]})(?:${o[c.PRERELEASE]})?${o[c.BUILD]}?)?)?`),y("XRANGEPLAINLOOSE",`[v=\\s]*(${o[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[c.XRANGEIDENTIFIERLOOSE]})(?:${o[c.PRERELEASELOOSE]})?${o[c.BUILD]}?)?)?`),y("XRANGE",`^${o[c.GTLT]}\\s*${o[c.XRANGEPLAIN]}$`),y("XRANGELOOSE",`^${o[c.GTLT]}\\s*${o[c.XRANGEPLAINLOOSE]}$`),y("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),y("COERCE",`${o[c.COERCEPLAIN]}(?:$|[^\\d])`),y("COERCEFULL",o[c.COERCEPLAIN]+`(?:${o[c.PRERELEASE]})?(?:${o[c.BUILD]})?(?:$|[^\\d])`),y("COERCERTL",o[c.COERCE],!0),y("COERCERTLFULL",o[c.COERCEFULL],!0),y("LONETILDE","(?:~>?)"),y("TILDETRIM",`(\\s*)${o[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",y("TILDE",`^${o[c.LONETILDE]}${o[c.XRANGEPLAIN]}$`),y("TILDELOOSE",`^${o[c.LONETILDE]}${o[c.XRANGEPLAINLOOSE]}$`),y("LONECARET","(?:\\^)"),y("CARETTRIM",`(\\s*)${o[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",y("CARET",`^${o[c.LONECARET]}${o[c.XRANGEPLAIN]}$`),y("CARETLOOSE",`^${o[c.LONECARET]}${o[c.XRANGEPLAINLOOSE]}$`),y("COMPARATORLOOSE",`^${o[c.GTLT]}\\s*(${o[c.LOOSEPLAIN]})$|^$`),y("COMPARATOR",`^${o[c.GTLT]}\\s*(${o[c.FULLPLAIN]})$|^$`),y("COMPARATORTRIM",`(\\s*)${o[c.GTLT]}\\s*(${o[c.LOOSEPLAIN]}|${o[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",y("HYPHENRANGE",`^\\s*(${o[c.XRANGEPLAIN]})\\s+-\\s+(${o[c.XRANGEPLAIN]})\\s*$`),y("HYPHENRANGELOOSE",`^\\s*(${o[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[c.XRANGEPLAINLOOSE]})\\s*$`),y("STAR","(<|>)?=?\\s*\\*"),y("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),y("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(pd,pd.exports);var Il=pd.exports;const nC=Object.freeze({loose:!0}),rC=Object.freeze({}),iC=e=>e?typeof e!="object"?nC:e:rC;var Af=iC;const rm=/^[0-9]+$/,R0=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;const n=rm.test(e),r=rm.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1},sC=(e,t)=>R0(t,e);var P0={compareIdentifiers:R0,rcompareIdentifiers:sC};const ra=Uo,{MAX_LENGTH:im,MAX_SAFE_INTEGER:ia}=zo,{safeRe:sa,t:la}=Il,lC=Af,{compareIdentifiers:Ru}=P0;let aC=class rn{constructor(t,n){if(n=lC(n),t instanceof rn){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>im)throw new TypeError(`version is longer than ${im} characters`);ra("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?sa[la.LOOSE]:sa[la.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>ia||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ia||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ia||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const s=+i;if(s>=0&&s<ia)return s}return i}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(ra("SemVer.compare",this.version,this.options,t),!(t instanceof rn)){if(typeof t=="string"&&t===this.version)return 0;t=new rn(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof rn||(t=new rn(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof rn||(t=new rn(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],i=t.prerelease[n];if(ra("prerelease compare",n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return Ru(r,i)}while(++n)}compareBuild(t){t instanceof rn||(t=new rn(t,this.options));let n=0;do{const r=this.build[n],i=t.build[n];if(ra("build compare",n,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r===i)continue;return Ru(r,i)}while(++n)}inc(t,n,r){if(t.startsWith("pre")){if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(n){const i=`-${n}`.match(this.options.loose?sa[la.PRERELEASELOOSE]:sa[la.PRERELEASE]);if(!i||i[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const i=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[i];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(n){let s=[n,i];r===!1&&(s=[n]),Ru(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var ut=aC;const sm=ut,oC=(e,t,n=!1)=>{if(e instanceof sm)return e;try{return new sm(e,t)}catch(r){if(!n)return null;throw r}};var hs=oC;const uC=hs,cC=(e,t)=>{const n=uC(e,t);return n?n.version:null};var dC=cC;const fC=hs,hC=(e,t)=>{const n=fC(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};var pC=hC;const lm=ut,mC=(e,t,n,r,i)=>{typeof n=="string"&&(i=r,r=n,n=void 0);try{return new lm(e instanceof lm?e.version:e,n).inc(t,r,i).version}catch{return null}};var gC=mC;const am=hs,yC=(e,t)=>{const n=am(e,null,!0),r=am(t,null,!0),i=n.compare(r);if(i===0)return null;const s=i>0,l=s?n:r,a=s?r:n,o=!!l.prerelease.length;if(!!a.prerelease.length&&!o){if(!a.patch&&!a.minor)return"major";if(a.compareMain(l)===0)return a.minor&&!a.patch?"minor":"patch"}const c=o?"pre":"";return n.major!==r.major?c+"major":n.minor!==r.minor?c+"minor":n.patch!==r.patch?c+"patch":"prerelease"};var xC=yC;const vC=ut,kC=(e,t)=>new vC(e,t).major;var wC=kC;const bC=ut,SC=(e,t)=>new bC(e,t).minor;var EC=SC;const CC=ut,_C=(e,t)=>new CC(e,t).patch;var NC=_C;const jC=hs,RC=(e,t)=>{const n=jC(e,t);return n&&n.prerelease.length?n.prerelease:null};var PC=RC;const om=ut,TC=(e,t,n)=>new om(e,n).compare(new om(t,n));var Jt=TC;const IC=Jt,LC=(e,t,n)=>IC(t,e,n);var AC=LC;const OC=Jt,DC=(e,t)=>OC(e,t,!0);var FC=DC;const um=ut,$C=(e,t,n)=>{const r=new um(e,n),i=new um(t,n);return r.compare(i)||r.compareBuild(i)};var Of=$C;const MC=Of,zC=(e,t)=>e.sort((n,r)=>MC(n,r,t));var UC=zC;const BC=Of,VC=(e,t)=>e.sort((n,r)=>BC(r,n,t));var HC=VC;const qC=Jt,QC=(e,t,n)=>qC(e,t,n)>0;var Bo=QC;const WC=Jt,GC=(e,t,n)=>WC(e,t,n)<0;var Df=GC;const ZC=Jt,KC=(e,t,n)=>ZC(e,t,n)===0;var T0=KC;const XC=Jt,YC=(e,t,n)=>XC(e,t,n)!==0;var I0=YC;const JC=Jt,e_=(e,t,n)=>JC(e,t,n)>=0;var Ff=e_;const t_=Jt,n_=(e,t,n)=>t_(e,t,n)<=0;var $f=n_;const r_=T0,i_=I0,s_=Bo,l_=Ff,a_=Df,o_=$f,u_=(e,t,n,r)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return r_(e,n,r);case"!=":return i_(e,n,r);case">":return s_(e,n,r);case">=":return l_(e,n,r);case"<":return a_(e,n,r);case"<=":return o_(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};var L0=u_;const c_=ut,d_=hs,{safeRe:aa,t:oa}=Il,f_=(e,t)=>{if(e instanceof c_)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let n=null;if(!t.rtl)n=e.match(t.includePrerelease?aa[oa.COERCEFULL]:aa[oa.COERCE]);else{const o=t.includePrerelease?aa[oa.COERCERTLFULL]:aa[oa.COERCERTL];let u;for(;(u=o.exec(e))&&(!n||n.index+n[0].length!==e.length);)(!n||u.index+u[0].length!==n.index+n[0].length)&&(n=u),o.lastIndex=u.index+u[1].length+u[2].length;o.lastIndex=-1}if(n===null)return null;const r=n[2],i=n[3]||"0",s=n[4]||"0",l=t.includePrerelease&&n[5]?`-${n[5]}`:"",a=t.includePrerelease&&n[6]?`+${n[6]}`:"";return d_(`${r}.${i}.${s}${l}${a}`,t)};var h_=f_;class p_{constructor(){this.max=1e3,this.map=new Map}get(t){const n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}delete(t){return this.map.delete(t)}set(t,n){if(!this.delete(t)&&n!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(t,n)}return this}}var m_=p_,Pu,cm;function en(){if(cm)return Pu;cm=1;const e=/\s+/g;class t{constructor(I,q){if(q=i(q),I instanceof t)return I.loose===!!q.loose&&I.includePrerelease===!!q.includePrerelease?I:new t(I.raw,q);if(I instanceof s)return this.raw=I.value,this.set=[[I]],this.formatted=void 0,this;if(this.options=q,this.loose=!!q.loose,this.includePrerelease=!!q.includePrerelease,this.raw=I.trim().replace(e," "),this.set=this.raw.split("||").map(B=>this.parseRange(B.trim())).filter(B=>B.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const B=this.set[0];if(this.set=this.set.filter(R=>!y(R[0])),this.set.length===0)this.set=[B];else if(this.set.length>1){for(const R of this.set)if(R.length===1&&_(R[0])){this.set=[R];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let I=0;I<this.set.length;I++){I>0&&(this.formatted+="||");const q=this.set[I];for(let B=0;B<q.length;B++)B>0&&(this.formatted+=" "),this.formatted+=q[B].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(I){const B=((this.options.includePrerelease&&h)|(this.options.loose&&m))+":"+I,R=r.get(B);if(R)return R;const O=this.options.loose,k=O?o[u.HYPHENRANGELOOSE]:o[u.HYPHENRANGE];I=I.replace(k,U(this.options.includePrerelease)),l("hyphen replace",I),I=I.replace(o[u.COMPARATORTRIM],c),l("comparator trim",I),I=I.replace(o[u.TILDETRIM],d),l("tilde trim",I),I=I.replace(o[u.CARETTRIM],p),l("caret trim",I);let K=I.split(" ").map(me=>x(me,this.options)).join(" ").split(/\s+/).map(me=>D(me,this.options));O&&(K=K.filter(me=>(l("loose invalid filter",me,this.options),!!me.match(o[u.COMPARATORLOOSE])))),l("range list",K);const G=new Map,S=K.map(me=>new s(me,this.options));for(const me of S){if(y(me))return[me];G.set(me.value,me)}G.size>1&&G.has("")&&G.delete("");const he=[...G.values()];return r.set(B,he),he}intersects(I,q){if(!(I instanceof t))throw new TypeError("a Range is required");return this.set.some(B=>g(B,q)&&I.set.some(R=>g(R,q)&&B.every(O=>R.every(k=>O.intersects(k,q)))))}test(I){if(!I)return!1;if(typeof I=="string")try{I=new a(I,this.options)}catch{return!1}for(let q=0;q<this.set.length;q++)if(ee(this.set[q],I,this.options))return!0;return!1}}Pu=t;const n=m_,r=new n,i=Af,s=Vo(),l=Uo,a=ut,{safeRe:o,t:u,comparatorTrimReplace:c,tildeTrimReplace:d,caretTrimReplace:p}=Il,{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:m}=zo,y=F=>F.value==="<0.0.0-0",_=F=>F.value==="",g=(F,I)=>{let q=!0;const B=F.slice();let R=B.pop();for(;q&&B.length;)q=B.every(O=>R.intersects(O,I)),R=B.pop();return q},x=(F,I)=>(F=F.replace(o[u.BUILD],""),l("comp",F,I),F=N(F,I),l("caret",F),F=w(F,I),l("tildes",F),F=A(F,I),l("xrange",F),F=b(F,I),l("stars",F),F),v=F=>!F||F.toLowerCase()==="x"||F==="*",w=(F,I)=>F.trim().split(/\s+/).map(q=>j(q,I)).join(" "),j=(F,I)=>{const q=I.loose?o[u.TILDELOOSE]:o[u.TILDE];return F.replace(q,(B,R,O,k,K)=>{l("tilde",F,B,R,O,k,K);let G;return v(R)?G="":v(O)?G=`>=${R}.0.0 <${+R+1}.0.0-0`:v(k)?G=`>=${R}.${O}.0 <${R}.${+O+1}.0-0`:K?(l("replaceTilde pr",K),G=`>=${R}.${O}.${k}-${K} <${R}.${+O+1}.0-0`):G=`>=${R}.${O}.${k} <${R}.${+O+1}.0-0`,l("tilde return",G),G})},N=(F,I)=>F.trim().split(/\s+/).map(q=>T(q,I)).join(" "),T=(F,I)=>{l("caret",F,I);const q=I.loose?o[u.CARETLOOSE]:o[u.CARET],B=I.includePrerelease?"-0":"";return F.replace(q,(R,O,k,K,G)=>{l("caret",F,R,O,k,K,G);let S;return v(O)?S="":v(k)?S=`>=${O}.0.0${B} <${+O+1}.0.0-0`:v(K)?O==="0"?S=`>=${O}.${k}.0${B} <${O}.${+k+1}.0-0`:S=`>=${O}.${k}.0${B} <${+O+1}.0.0-0`:G?(l("replaceCaret pr",G),O==="0"?k==="0"?S=`>=${O}.${k}.${K}-${G} <${O}.${k}.${+K+1}-0`:S=`>=${O}.${k}.${K}-${G} <${O}.${+k+1}.0-0`:S=`>=${O}.${k}.${K}-${G} <${+O+1}.0.0-0`):(l("no pr"),O==="0"?k==="0"?S=`>=${O}.${k}.${K}${B} <${O}.${k}.${+K+1}-0`:S=`>=${O}.${k}.${K}${B} <${O}.${+k+1}.0-0`:S=`>=${O}.${k}.${K} <${+O+1}.0.0-0`),l("caret return",S),S})},A=(F,I)=>(l("replaceXRanges",F,I),F.split(/\s+/).map(q=>L(q,I)).join(" ")),L=(F,I)=>{F=F.trim();const q=I.loose?o[u.XRANGELOOSE]:o[u.XRANGE];return F.replace(q,(B,R,O,k,K,G)=>{l("xRange",F,B,R,O,k,K,G);const S=v(O),he=S||v(k),me=he||v(K),ye=me;return R==="="&&ye&&(R=""),G=I.includePrerelease?"-0":"",S?R===">"||R==="<"?B="<0.0.0-0":B="*":R&&ye?(he&&(k=0),K=0,R===">"?(R=">=",he?(O=+O+1,k=0,K=0):(k=+k+1,K=0)):R==="<="&&(R="<",he?O=+O+1:k=+k+1),R==="<"&&(G="-0"),B=`${R+O}.${k}.${K}${G}`):he?B=`>=${O}.0.0${G} <${+O+1}.0.0-0`:me&&(B=`>=${O}.${k}.0${G} <${O}.${+k+1}.0-0`),l("xRange return",B),B})},b=(F,I)=>(l("replaceStars",F,I),F.trim().replace(o[u.STAR],"")),D=(F,I)=>(l("replaceGTE0",F,I),F.trim().replace(o[I.includePrerelease?u.GTE0PRE:u.GTE0],"")),U=F=>(I,q,B,R,O,k,K,G,S,he,me,ye)=>(v(B)?q="":v(R)?q=`>=${B}.0.0${F?"-0":""}`:v(O)?q=`>=${B}.${R}.0${F?"-0":""}`:k?q=`>=${q}`:q=`>=${q}${F?"-0":""}`,v(S)?G="":v(he)?G=`<${+S+1}.0.0-0`:v(me)?G=`<${S}.${+he+1}.0-0`:ye?G=`<=${S}.${he}.${me}-${ye}`:F?G=`<${S}.${he}.${+me+1}-0`:G=`<=${G}`,`${q} ${G}`.trim()),ee=(F,I,q)=>{for(let B=0;B<F.length;B++)if(!F[B].test(I))return!1;if(I.prerelease.length&&!q.includePrerelease){for(let B=0;B<F.length;B++)if(l(F[B].semver),F[B].semver!==s.ANY&&F[B].semver.prerelease.length>0){const R=F[B].semver;if(R.major===I.major&&R.minor===I.minor&&R.patch===I.patch)return!0}return!1}return!0};return Pu}var Tu,dm;function Vo(){if(dm)return Tu;dm=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(c,d){if(d=n(d),c instanceof t){if(c.loose===!!d.loose)return c;c=c.value}c=c.trim().split(/\s+/).join(" "),l("comparator",c,d),this.options=d,this.loose=!!d.loose,this.parse(c),this.semver===e?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(c){const d=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],p=c.match(d);if(!p)throw new TypeError(`Invalid comparator: ${c}`);this.operator=p[1]!==void 0?p[1]:"",this.operator==="="&&(this.operator=""),p[2]?this.semver=new a(p[2],this.options.loose):this.semver=e}toString(){return this.value}test(c){if(l("Comparator.test",c,this.options.loose),this.semver===e||c===e)return!0;if(typeof c=="string")try{c=new a(c,this.options)}catch{return!1}return s(c,this.operator,this.semver,this.options)}intersects(c,d){if(!(c instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new o(c.value,d).test(this.value):c.operator===""?c.value===""?!0:new o(this.value,d).test(c.semver):(d=n(d),d.includePrerelease&&(this.value==="<0.0.0-0"||c.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||c.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&c.operator.startsWith(">")||this.operator.startsWith("<")&&c.operator.startsWith("<")||this.semver.version===c.semver.version&&this.operator.includes("=")&&c.operator.includes("=")||s(this.semver,"<",c.semver,d)&&this.operator.startsWith(">")&&c.operator.startsWith("<")||s(this.semver,">",c.semver,d)&&this.operator.startsWith("<")&&c.operator.startsWith(">")))}}Tu=t;const n=Af,{safeRe:r,t:i}=Il,s=L0,l=Uo,a=ut,o=en();return Tu}const g_=en(),y_=(e,t,n)=>{try{t=new g_(t,n)}catch{return!1}return t.test(e)};var Ho=y_;const x_=en(),v_=(e,t)=>new x_(e,t).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));var k_=v_;const w_=ut,b_=en(),S_=(e,t,n)=>{let r=null,i=null,s=null;try{s=new b_(t,n)}catch{return null}return e.forEach(l=>{s.test(l)&&(!r||i.compare(l)===-1)&&(r=l,i=new w_(r,n))}),r};var E_=S_;const C_=ut,__=en(),N_=(e,t,n)=>{let r=null,i=null,s=null;try{s=new __(t,n)}catch{return null}return e.forEach(l=>{s.test(l)&&(!r||i.compare(l)===1)&&(r=l,i=new C_(r,n))}),r};var j_=N_;const Iu=ut,R_=en(),fm=Bo,P_=(e,t)=>{e=new R_(e,t);let n=new Iu("0.0.0");if(e.test(n)||(n=new Iu("0.0.0-0"),e.test(n)))return n;n=null;for(let r=0;r<e.set.length;++r){const i=e.set[r];let s=null;i.forEach(l=>{const a=new Iu(l.semver.version);switch(l.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||fm(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${l.operator}`)}}),s&&(!n||fm(n,s))&&(n=s)}return n&&e.test(n)?n:null};var T_=P_;const I_=en(),L_=(e,t)=>{try{return new I_(e,t).range||"*"}catch{return null}};var A_=L_;const O_=ut,A0=Vo(),{ANY:D_}=A0,F_=en(),$_=Ho,hm=Bo,pm=Df,M_=$f,z_=Ff,U_=(e,t,n,r)=>{e=new O_(e,r),t=new F_(t,r);let i,s,l,a,o;switch(n){case">":i=hm,s=M_,l=pm,a=">",o=">=";break;case"<":i=pm,s=z_,l=hm,a="<",o="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if($_(e,t,r))return!1;for(let u=0;u<t.set.length;++u){const c=t.set[u];let d=null,p=null;if(c.forEach(h=>{h.semver===D_&&(h=new A0(">=0.0.0")),d=d||h,p=p||h,i(h.semver,d.semver,r)?d=h:l(h.semver,p.semver,r)&&(p=h)}),d.operator===a||d.operator===o||(!p.operator||p.operator===a)&&s(e,p.semver))return!1;if(p.operator===o&&l(e,p.semver))return!1}return!0};var Mf=U_;const B_=Mf,V_=(e,t,n)=>B_(e,t,">",n);var H_=V_;const q_=Mf,Q_=(e,t,n)=>q_(e,t,"<",n);var W_=Q_;const mm=en(),G_=(e,t,n)=>(e=new mm(e,n),t=new mm(t,n),e.intersects(t,n));var Z_=G_;const K_=Ho,X_=Jt;var Y_=(e,t,n)=>{const r=[];let i=null,s=null;const l=e.sort((c,d)=>X_(c,d,n));for(const c of l)K_(c,t,n)?(s=c,i||(i=c)):(s&&r.push([i,s]),s=null,i=null);i&&r.push([i,null]);const a=[];for(const[c,d]of r)c===d?a.push(c):!d&&c===l[0]?a.push("*"):d?c===l[0]?a.push(`<=${d}`):a.push(`${c} - ${d}`):a.push(`>=${c}`);const o=a.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return o.length<u.length?o:t};const gm=en(),zf=Vo(),{ANY:Lu}=zf,Ns=Ho,Uf=Jt,J_=(e,t,n={})=>{if(e===t)return!0;e=new gm(e,n),t=new gm(t,n);let r=!1;e:for(const i of e.set){for(const s of t.set){const l=tN(i,s,n);if(r=r||l!==null,l)continue e}if(r)return!1}return!0},eN=[new zf(">=0.0.0-0")],ym=[new zf(">=0.0.0")],tN=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Lu){if(t.length===1&&t[0].semver===Lu)return!0;n.includePrerelease?e=eN:e=ym}if(t.length===1&&t[0].semver===Lu){if(n.includePrerelease)return!0;t=ym}const r=new Set;let i,s;for(const h of e)h.operator===">"||h.operator===">="?i=xm(i,h,n):h.operator==="<"||h.operator==="<="?s=vm(s,h,n):r.add(h.semver);if(r.size>1)return null;let l;if(i&&s){if(l=Uf(i.semver,s.semver,n),l>0)return null;if(l===0&&(i.operator!==">="||s.operator!=="<="))return null}for(const h of r){if(i&&!Ns(h,String(i),n)||s&&!Ns(h,String(s),n))return null;for(const m of t)if(!Ns(h,String(m),n))return!1;return!0}let a,o,u,c,d=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1,p=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1;d&&d.prerelease.length===1&&s.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(const h of t){if(c=c||h.operator===">"||h.operator===">=",u=u||h.operator==="<"||h.operator==="<=",i){if(p&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===p.major&&h.semver.minor===p.minor&&h.semver.patch===p.patch&&(p=!1),h.operator===">"||h.operator===">="){if(a=xm(i,h,n),a===h&&a!==i)return!1}else if(i.operator===">="&&!Ns(i.semver,String(h),n))return!1}if(s){if(d&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===d.major&&h.semver.minor===d.minor&&h.semver.patch===d.patch&&(d=!1),h.operator==="<"||h.operator==="<="){if(o=vm(s,h,n),o===h&&o!==s)return!1}else if(s.operator==="<="&&!Ns(s.semver,String(h),n))return!1}if(!h.operator&&(s||i)&&l!==0)return!1}return!(i&&u&&!s&&l!==0||s&&c&&!i&&l!==0||p||d)},xm=(e,t,n)=>{if(!e)return t;const r=Uf(e.semver,t.semver,n);return r>0?e:r<0||t.operator===">"&&e.operator===">="?t:e},vm=(e,t,n)=>{if(!e)return t;const r=Uf(e.semver,t.semver,n);return r<0?e:r>0||t.operator==="<"&&e.operator==="<="?t:e};var nN=J_;const Au=Il,km=zo,rN=ut,wm=P0,iN=hs,sN=dC,lN=pC,aN=gC,oN=xC,uN=wC,cN=EC,dN=NC,fN=PC,hN=Jt,pN=AC,mN=FC,gN=Of,yN=UC,xN=HC,vN=Bo,kN=Df,wN=T0,bN=I0,SN=Ff,EN=$f,CN=L0,_N=h_,NN=Vo(),jN=en(),RN=Ho,PN=k_,TN=E_,IN=j_,LN=T_,AN=A_,ON=Mf,DN=H_,FN=W_,$N=Z_,MN=Y_,zN=nN;var UN={parse:iN,valid:sN,clean:lN,inc:aN,diff:oN,major:uN,minor:cN,patch:dN,prerelease:fN,compare:hN,rcompare:pN,compareLoose:mN,compareBuild:gN,sort:yN,rsort:xN,gt:vN,lt:kN,eq:wN,neq:bN,gte:SN,lte:EN,cmp:CN,coerce:_N,Comparator:NN,Range:jN,satisfies:RN,toComparators:PN,maxSatisfying:TN,minSatisfying:IN,minVersion:LN,validRange:AN,outside:ON,gtr:DN,ltr:FN,intersects:$N,simplifyRange:MN,subset:zN,SemVer:rN,re:Au.re,src:Au.src,tokens:Au.t,SEMVER_SPEC_VERSION:km.SEMVER_SPEC_VERSION,RELEASE_TYPES:km.RELEASE_TYPES,compareIdentifiers:wm.compareIdentifiers,rcompareIdentifiers:wm.rcompareIdentifiers};const dn=yo(UN),BN="composer_proxy_admin_token";function VN(){return typeof window<"u"?localStorage.getItem(BN):null}function HN({distUrl:e}){const[t,n]=C.useState(!1),[r,i]=C.useState(null),s=async l=>{l.stopPropagation(),n(!0),i(null);try{const a=VN(),o={};a&&(o.Authorization=`Bearer ${a}`);const u=await fetch(e,{headers:o});if(!u.ok)throw new Error(`Download failed: ${u.status} ${u.statusText}`);const c=await u.blob(),d=window.URL.createObjectURL(c),p=document.createElement("a");p.href=d,p.download=e.split("/").pop()||"package.zip",document.body.appendChild(p),p.click(),document.body.removeChild(p),window.URL.revokeObjectURL(d)}catch(a){i(a instanceof Error?a.message:"Download failed")}finally{n(!1)}};return r?f.jsxs("div",{className:"flex flex-col items-end gap-1",children:[f.jsx("button",{onClick:s,className:"text-red-400 hover:text-red-300 text-sm","data-testid":"download-button",children:"Retry"}),f.jsx("span",{className:"text-xs text-red-500",children:r})]}):f.jsx("button",{onClick:s,disabled:t,className:"text-primary-400 hover:text-primary-300 text-sm disabled:opacity-50 disabled:cursor-not-allowed","data-testid":"download-button",children:t?"Downloading...":"Download"})}function qN(){const[e,t]=C.useState(""),[n,r]=C.useState(!1),{data:i=[],isLoading:s}=Et({queryKey:["packages",e],queryFn:()=>JS(e||void 0)}),l=i.reduce((a,o)=>(a[o.name]||(a[o.name]=[]),a[o.name].push(o),a),{});return f.jsxs("div",{className:"space-y-8","data-testid":"packages-page",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"font-display text-2xl font-bold text-slate-100 mb-2","data-testid":"packages-heading",children:"Packages"}),f.jsx("p",{className:"text-slate-400",children:"Browse cached packages"})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-72",children:f.jsx("input",{type:"text",value:e,onChange:a=>t(a.target.value),placeholder:"Search packages...",className:"input w-full","data-testid":"package-search-input","aria-label":"Search packages"})}),f.jsx("button",{onClick:()=>r(!0),className:"btn-primary","data-testid":"add-packages-button",children:"Add Package"})]})]}),n&&f.jsx(WN,{onClose:()=>r(!1)}),f.jsx("div",{className:"space-y-4","data-testid":"packages-list",children:s?f.jsx("div",{className:"card p-8 text-center","data-testid":"packages-loading",children:f.jsx("div",{className:"w-8 h-8 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin mx-auto","aria-label":"Loading packages"})}):Object.keys(l).length===0?f.jsx("div",{className:"card p-8 text-center text-slate-400","data-testid":"packages-empty",role:"status","aria-live":"polite",children:"No packages found matching your search."}):Object.entries(l).map(([a,o])=>f.jsx(QN,{name:a,versions:o},a))})]})}function QN({name:e,versions:t}){const[n,r]=C.useState(!1),[i,s]=C.useState(!1),l=C.useMemo(()=>[...t].sort((p,h)=>{const m=/^\d+$/.test(p.version),y=/^\d+$/.test(h.version);if(m&&y){const w=parseInt(p.version,10);return parseInt(h.version,10)-w}if(m&&!y&&dn.valid(h.version))return 1;if(!m&&y&&dn.valid(p.version))return-1;const _=dn.valid(p.version),g=dn.valid(h.version);if(_&&g)return dn.rcompare(p.version,h.version);if(_&&!g)return-1;if(!_&&g)return 1;const x=p.version.match(/^(\d+)/),v=h.version.match(/^(\d+)/);if(x&&v){const w=parseInt(x[1],10),j=parseInt(v[1],10);if(w!==j)return j-w}return h.version.localeCompare(p.version,void 0,{numeric:!0,sensitivity:"base"})}),[t]),a=l[0],o=i?l:l.slice(0,5),u=l.length>5,d=(p=>{if(!p)return[];try{const h=JSON.parse(p);return Array.isArray(h)?h:[h]}catch{return[p]}})(a.license);return f.jsxs("div",{className:"card","data-testid":"package-card","data-package-name":e,children:[f.jsxs("div",{className:"p-4 flex items-center justify-between cursor-pointer hover:bg-slate-800/30",onClick:()=>r(!n),role:"button","aria-expanded":n,"aria-label":`${e} package, ${t.length} versions`,"data-testid":"package-header",children:[f.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[f.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-primary-500/20 to-accent-500/20 rounded-lg flex items-center justify-center",children:f.jsx(ni,{className:"w-5 h-5 text-primary-400"})}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsx(Ji,{to:(()=>{const[p,...h]=e.split("/"),m=h.join("/");return`/packages/${p}/${m}`})(),onClick:p=>p.stopPropagation(),className:"font-medium text-slate-100 hover:text-primary-400 transition-colors",children:e}),a.package_type&&f.jsx("span",{className:"px-2 py-0.5 text-xs bg-slate-700 text-slate-300 rounded",children:a.package_type}),d.length>0&&f.jsx("span",{className:"px-2 py-0.5 text-xs bg-slate-700 text-slate-300 rounded",children:d[0]})]}),a.description&&f.jsx("p",{className:"text-sm text-slate-400 truncate mb-1",children:a.description}),f.jsxs("p",{className:"text-sm text-slate-500",children:[t.length," version",t.length!==1?"s":""," • Latest:"," ",f.jsx("span",{className:"text-primary-400",children:a.version})]})]})]}),f.jsx("span",{className:"text-slate-400","aria-hidden":"true","data-testid":"package-expand-toggle",children:n?"▼":"▶"})]}),n&&f.jsxs("div",{className:"border-t border-slate-800 p-4",role:"region","aria-label":`Versions for ${e}`,children:[f.jsx("h4",{className:"text-sm font-medium text-slate-400 mb-3",children:"Versions"}),f.jsx("div",{className:"space-y-2",role:"list",children:o.map(p=>f.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-800/50 rounded-lg","data-testid":"version-row","data-version":p.version,role:"listitem",children:[f.jsxs("div",{children:[f.jsx("span",{className:"font-medium text-slate-200",children:p.version}),p.released_at&&f.jsxs("span",{className:"text-sm text-slate-500 ml-2","aria-label":`Released ${new Date(p.released_at*1e3).toLocaleDateString()}`,children:["Released ",new Date(p.released_at*1e3).toLocaleDateString()]})]}),f.jsx(HN,{distUrl:p.dist_url})]},p.id))}),u&&!i&&f.jsx("button",{onClick:p=>{p.stopPropagation(),s(!0)},className:"mt-3 text-sm text-primary-400 hover:text-primary-300","data-testid":"show-all-versions-button","aria-label":"Show all versions",children:"Show all"})]})]})}function WN({onClose:e}){const[t,n]=C.useState(""),[r,i]=C.useState(""),s=Nr(),{data:l=[]}=Et({queryKey:["repositories"],queryFn:k0}),{data:a}=Et({queryKey:["settings"],queryFn:$o}),o=C.useMemo(()=>{const p=l.filter(h=>h.vcs_type==="composer"&&h.status==="active").filter(h=>!(a!=null&&a.packagist_mirroring_enabled&&h.url==="https://repo.packagist.org")).map(h=>({...h,displayName:h.url}));return a!=null&&a.packagist_mirroring_enabled&&p.unshift({id:"packagist",url:"https://repo.packagist.org",vcs_type:"composer",credential_type:"none",composer_json_path:null,package_filter:null,status:"active",error_message:null,last_synced_at:null,created_at:0,displayName:"Packagist.org"}),p},[l,a]);C.useMemo(()=>{o.length>0&&!r&&i(o[0].id)},[o,r]);const u=br({mutationFn:d=>sE(d.repositoryId,d.packageNames),onSuccess:()=>{s.invalidateQueries({queryKey:["packages"]}),e()}}),c=d=>{d.preventDefault();const p=t.split(/[,\s\n]+/).map(h=>h.trim()).filter(h=>h.length>0);p.length!==0&&r&&u.mutate({repositoryId:r,packageNames:p})};return f.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:f.jsxs("div",{className:"card max-w-2xl w-full mx-4 p-6 max-h-[90vh] overflow-y-auto",children:[f.jsxs("div",{className:"flex items-center justify-between mb-6",children:[f.jsx("h3",{className:"font-display text-xl font-bold text-slate-100",children:"Add Mirrored Package(s)"}),f.jsx("button",{onClick:e,className:"text-slate-400 hover:text-slate-200",children:f.jsx(Pl,{className:"w-4 h-4"})})]}),f.jsxs("form",{onSubmit:c,className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"label",children:"Package name(s), separated by comma, spaces or newlines"}),f.jsx("textarea",{value:t,onChange:d=>n(d.target.value),placeholder:`vendor/package1
169
+ vendor/package2
170
+ vendor/package3`,className:"input w-full min-h-[120px] resize-y font-mono text-sm",required:!0})]}),f.jsxs("div",{children:[f.jsx("label",{className:"label",children:"Mirrored Repository"}),f.jsx("select",{value:r,onChange:d=>i(d.target.value),className:"input w-full",required:!0,children:o.length===0?f.jsx("option",{value:"",children:"No repositories available"}):o.map(d=>f.jsx("option",{value:d.id,children:d.displayName},d.id))}),f.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"You can set up mirrored third party repositories on the settings page."})]}),u.error&&f.jsx("div",{className:"bg-red-500/10 border border-red-500/50 rounded-lg p-3",children:f.jsx("p",{className:"text-red-400 text-sm",children:u.error.message})}),u.data&&f.jsxs("div",{className:"bg-slate-800/50 rounded-lg p-4",children:[f.jsx("p",{className:"text-slate-200 text-sm mb-2",children:u.data.message}),f.jsx("div",{className:"space-y-1 text-xs",children:u.data.results.map((d,p)=>f.jsxs("div",{className:d.success?"text-green-400":"text-red-400",children:[d.package,": ",d.success?`✓ ${d.versions} version(s) stored`:`✗ ${d.error}`]},p))})]}),f.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[f.jsx("button",{type:"button",onClick:e,className:"btn-secondary",children:"Cancel"}),f.jsx("button",{type:"submit",className:"btn-primary",disabled:u.isPending||o.length===0,children:u.isPending?"Adding...":"Add"})]})]})]})})}function GN(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ZN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,KN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,XN={};function bm(e,t){return(XN.jsx?KN:ZN).test(e)}const YN=/[ \t\n\f\r]/g;function JN(e){return typeof e=="object"?e.type==="text"?Sm(e.value):!1:Sm(e)}function Sm(e){return e.replace(YN,"")===""}class Ll{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ll.prototype.normal={};Ll.prototype.property={};Ll.prototype.space=void 0;function O0(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ll(n,r,t)}function md(e){return e.toLowerCase()}class xt{constructor(t,n){this.attribute=n,this.property=t}}xt.prototype.attribute="";xt.prototype.booleanish=!1;xt.prototype.boolean=!1;xt.prototype.commaOrSpaceSeparated=!1;xt.prototype.commaSeparated=!1;xt.prototype.defined=!1;xt.prototype.mustUseProperty=!1;xt.prototype.number=!1;xt.prototype.overloadedBoolean=!1;xt.prototype.property="";xt.prototype.spaceSeparated=!1;xt.prototype.space=void 0;let e2=0;const ie=ai(),Oe=ai(),gd=ai(),M=ai(),be=ai(),Li=ai(),kt=ai();function ai(){return 2**++e2}const yd=Object.freeze(Object.defineProperty({__proto__:null,boolean:ie,booleanish:Oe,commaOrSpaceSeparated:kt,commaSeparated:Li,number:M,overloadedBoolean:gd,spaceSeparated:be},Symbol.toStringTag,{value:"Module"})),Ou=Object.keys(yd);class Bf extends xt{constructor(t,n,r,i){let s=-1;if(super(t,n),Em(this,"space",i),typeof r=="number")for(;++s<Ou.length;){const l=Ou[s];Em(this,Ou[s],(r&yd[l])===yd[l])}}}Bf.prototype.defined=!0;function Em(e,t,n){n&&(e[t]=n)}function ps(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Bf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[md(r)]=r,n[md(s.attribute)]=r}return new Ll(t,n,e.space)}const D0=ps({properties:{ariaActiveDescendant:null,ariaAtomic:Oe,ariaAutoComplete:null,ariaBusy:Oe,ariaChecked:Oe,ariaColCount:M,ariaColIndex:M,ariaColSpan:M,ariaControls:be,ariaCurrent:null,ariaDescribedBy:be,ariaDetails:null,ariaDisabled:Oe,ariaDropEffect:be,ariaErrorMessage:null,ariaExpanded:Oe,ariaFlowTo:be,ariaGrabbed:Oe,ariaHasPopup:null,ariaHidden:Oe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:be,ariaLevel:M,ariaLive:null,ariaModal:Oe,ariaMultiLine:Oe,ariaMultiSelectable:Oe,ariaOrientation:null,ariaOwns:be,ariaPlaceholder:null,ariaPosInSet:M,ariaPressed:Oe,ariaReadOnly:Oe,ariaRelevant:null,ariaRequired:Oe,ariaRoleDescription:be,ariaRowCount:M,ariaRowIndex:M,ariaRowSpan:M,ariaSelected:Oe,ariaSetSize:M,ariaSort:null,ariaValueMax:M,ariaValueMin:M,ariaValueNow:M,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function F0(e,t){return t in e?e[t]:t}function $0(e,t){return F0(e,t.toLowerCase())}const t2=ps({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Li,acceptCharset:be,accessKey:be,action:null,allow:null,allowFullScreen:ie,allowPaymentRequest:ie,allowUserMedia:ie,alt:null,as:null,async:ie,autoCapitalize:null,autoComplete:be,autoFocus:ie,autoPlay:ie,blocking:be,capture:null,charSet:null,checked:ie,cite:null,className:be,cols:M,colSpan:null,content:null,contentEditable:Oe,controls:ie,controlsList:be,coords:M|Li,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ie,defer:ie,dir:null,dirName:null,disabled:ie,download:gd,draggable:Oe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ie,formTarget:null,headers:be,height:M,hidden:gd,high:M,href:null,hrefLang:null,htmlFor:be,httpEquiv:be,id:null,imageSizes:null,imageSrcSet:null,inert:ie,inputMode:null,integrity:null,is:null,isMap:ie,itemId:null,itemProp:be,itemRef:be,itemScope:ie,itemType:be,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ie,low:M,manifest:null,max:null,maxLength:M,media:null,method:null,min:null,minLength:M,multiple:ie,muted:ie,name:null,nonce:null,noModule:ie,noValidate:ie,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ie,optimum:M,pattern:null,ping:be,placeholder:null,playsInline:ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ie,referrerPolicy:null,rel:be,required:ie,reversed:ie,rows:M,rowSpan:M,sandbox:be,scope:null,scoped:ie,seamless:ie,selected:ie,shadowRootClonable:ie,shadowRootDelegatesFocus:ie,shadowRootMode:null,shape:null,size:M,sizes:null,slot:null,span:M,spellCheck:Oe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:M,step:null,style:null,tabIndex:M,target:null,title:null,translate:null,type:null,typeMustMatch:ie,useMap:null,value:Oe,width:M,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:be,axis:null,background:null,bgColor:null,border:M,borderColor:null,bottomMargin:M,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ie,declare:ie,event:null,face:null,frame:null,frameBorder:null,hSpace:M,leftMargin:M,link:null,longDesc:null,lowSrc:null,marginHeight:M,marginWidth:M,noResize:ie,noHref:ie,noShade:ie,noWrap:ie,object:null,profile:null,prompt:null,rev:null,rightMargin:M,rules:null,scheme:null,scrolling:Oe,standby:null,summary:null,text:null,topMargin:M,valueType:null,version:null,vAlign:null,vLink:null,vSpace:M,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ie,disableRemotePlayback:ie,prefix:null,property:null,results:M,security:null,unselectable:null},space:"html",transform:$0}),n2=ps({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:kt,accentHeight:M,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:M,amplitude:M,arabicForm:null,ascent:M,attributeName:null,attributeType:null,azimuth:M,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:M,by:null,calcMode:null,capHeight:M,className:be,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:M,diffuseConstant:M,direction:null,display:null,dur:null,divisor:M,dominantBaseline:null,download:ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:M,enableBackground:null,end:null,event:null,exponent:M,externalResourcesRequired:null,fill:null,fillOpacity:M,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Li,g2:Li,glyphName:Li,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:M,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:M,horizOriginX:M,horizOriginY:M,id:null,ideographic:M,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:M,k:M,k1:M,k2:M,k3:M,k4:M,kernelMatrix:kt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:M,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:M,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:M,overlineThickness:M,paintOrder:null,panose1:null,path:null,pathLength:M,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:be,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:M,pointsAtY:M,pointsAtZ:M,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:kt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:kt,rev:kt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:kt,requiredFeatures:kt,requiredFonts:kt,requiredFormats:kt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:M,specularExponent:M,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:M,strikethroughThickness:M,string:null,stroke:null,strokeDashArray:kt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:M,strokeOpacity:M,strokeWidth:null,style:null,surfaceScale:M,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:kt,tabIndex:M,tableValues:null,target:null,targetX:M,targetY:M,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:kt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:M,underlineThickness:M,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:M,values:null,vAlphabetic:M,vMathematical:M,vectorEffect:null,vHanging:M,vIdeographic:M,version:null,vertAdvY:M,vertOriginX:M,vertOriginY:M,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:M,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:F0}),M0=ps({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),z0=ps({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:$0}),U0=ps({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),r2={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},i2=/[A-Z]/g,Cm=/-[a-z]/g,s2=/^data[-\w.:]+$/i;function l2(e,t){const n=md(t);let r=t,i=xt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&s2.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Cm,o2);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Cm.test(s)){let l=s.replace(i2,a2);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Bf}return new i(r,t)}function a2(e){return"-"+e.toLowerCase()}function o2(e){return e.charAt(1).toUpperCase()}const u2=O0([D0,t2,M0,z0,U0],"html"),Vf=O0([D0,n2,M0,z0,U0],"svg");function c2(e){return e.join(" ").trim()}var Hf={},_m=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,d2=/\n/g,f2=/^\s*/,h2=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,p2=/^:\s*/,m2=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,g2=/^[;\s]*/,y2=/^\s+|\s+$/g,x2=`
171
+ `,Nm="/",jm="*",Lr="",v2="comment",k2="declaration";function w2(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var y=m.match(d2);y&&(n+=y.length);var _=m.lastIndexOf(x2);r=~_?m.length-_:r+m.length}function s(){var m={line:n,column:r};return function(y){return y.position=new l(m),u(),y}}function l(m){this.start=m,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function a(m){var y=new Error(t.source+":"+n+":"+r+": "+m);if(y.reason=m,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function o(m){var y=m.exec(e);if(y){var _=y[0];return i(_),e=e.slice(_.length),y}}function u(){o(f2)}function c(m){var y;for(m=m||[];y=d();)y!==!1&&m.push(y);return m}function d(){var m=s();if(!(Nm!=e.charAt(0)||jm!=e.charAt(1))){for(var y=2;Lr!=e.charAt(y)&&(jm!=e.charAt(y)||Nm!=e.charAt(y+1));)++y;if(y+=2,Lr===e.charAt(y-1))return a("End of comment missing");var _=e.slice(2,y-2);return r+=2,i(_),e=e.slice(y),r+=2,m({type:v2,comment:_})}}function p(){var m=s(),y=o(h2);if(y){if(d(),!o(p2))return a("property missing ':'");var _=o(m2),g=m({type:k2,property:Rm(y[0].replace(_m,Lr)),value:_?Rm(_[0].replace(_m,Lr)):Lr});return o(g2),g}}function h(){var m=[];c(m);for(var y;y=p();)y!==!1&&(m.push(y),c(m));return m}return u(),h()}function Rm(e){return e?e.replace(y2,Lr):Lr}var b2=w2,S2=Pa&&Pa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hf,"__esModule",{value:!0});Hf.default=C2;const E2=S2(b2);function C2(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,E2.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:l,value:a}=s;i?t(l,a,s):a&&(n=n||{},n[l]=a)}),n}var qo={};Object.defineProperty(qo,"__esModule",{value:!0});qo.camelCase=void 0;var _2=/^--[a-zA-Z0-9_-]+$/,N2=/-([a-z])/g,j2=/^[^-]+$/,R2=/^-(webkit|moz|ms|o|khtml)-/,P2=/^-(ms)-/,T2=function(e){return!e||j2.test(e)||_2.test(e)},I2=function(e,t){return t.toUpperCase()},Pm=function(e,t){return"".concat(t,"-")},L2=function(e,t){return t===void 0&&(t={}),T2(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(P2,Pm):e=e.replace(R2,Pm),e.replace(N2,I2))};qo.camelCase=L2;var A2=Pa&&Pa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},O2=A2(Hf),D2=qo;function xd(e,t){var n={};return!e||typeof e!="string"||(0,O2.default)(e,function(r,i){r&&i&&(n[(0,D2.camelCase)(r,t)]=i)}),n}xd.default=xd;var F2=xd;const $2=yo(F2),B0=V0("end"),qf=V0("start");function V0(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function M2(e){const t=qf(e),n=B0(e);if(t&&n)return{start:t,end:n}}function qs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Tm(e.position):"start"in e||"end"in e?Tm(e):"line"in e||"column"in e?vd(e):""}function vd(e){return Im(e&&e.line)+":"+Im(e&&e.column)}function Tm(e){return vd(e&&e.start)+"-"+vd(e&&e.end)}function Im(e){return e&&typeof e=="number"?e:1}class Je extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},l=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(l=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?s.ruleId=r:(s.source=r.slice(0,o),s.ruleId=r.slice(o+1))}if(!s.place&&s.ancestors&&s.ancestors){const o=s.ancestors[s.ancestors.length-1];o&&(s.place=o.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=qs(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=l&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Je.prototype.file="";Je.prototype.name="";Je.prototype.reason="";Je.prototype.message="";Je.prototype.stack="";Je.prototype.column=void 0;Je.prototype.line=void 0;Je.prototype.ancestors=void 0;Je.prototype.cause=void 0;Je.prototype.fatal=void 0;Je.prototype.place=void 0;Je.prototype.ruleId=void 0;Je.prototype.source=void 0;const Qf={}.hasOwnProperty,z2=new Map,U2=/[A-Z]/g,B2=new Set(["table","tbody","thead","tfoot","tr"]),V2=new Set(["td","th"]),H0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function H2(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Y2(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=X2(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Vf:u2,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=q0(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function q0(e,t,n){if(t.type==="element")return q2(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Q2(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return G2(e,t,n);if(t.type==="mdxjsEsm")return W2(e,t);if(t.type==="root")return Z2(e,t,n);if(t.type==="text")return K2(e,t)}function q2(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Vf,e.schema=i),e.ancestors.push(t);const s=W0(e,t.tagName,!1),l=J2(e,t);let a=Gf(e,t);return B2.has(t.tagName)&&(a=a.filter(function(o){return typeof o=="string"?!JN(o):!0})),Q0(e,l,s,t),Wf(l,a),e.ancestors.pop(),e.schema=r,e.create(t,s,l,n)}function Q2(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ml(e,t.position)}function W2(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ml(e,t.position)}function G2(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Vf,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:W0(e,t.name,!0),l=ej(e,t),a=Gf(e,t);return Q0(e,l,s,t),Wf(l,a),e.ancestors.pop(),e.schema=r,e.create(t,s,l,n)}function Z2(e,t,n){const r={};return Wf(r,Gf(e,t)),e.create(t,e.Fragment,r,n)}function K2(e,t){return t.value}function Q0(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Wf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function X2(e,t,n){return r;function r(i,s,l,a){const u=Array.isArray(l.children)?n:t;return a?u(s,l,a):u(s,l)}}function Y2(e,t){return n;function n(r,i,s,l){const a=Array.isArray(s.children),o=qf(r);return t(i,s,l,a,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function J2(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Qf.call(t.properties,i)){const s=tj(e,i,t.properties[i]);if(s){const[l,a]=s;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&V2.has(t.tagName)?r=a:n[l]=a}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function ej(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const l=s.expression;l.type;const a=l.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else ml(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else ml(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Gf(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:z2;for(;++r<t.children.length;){const s=t.children[r];let l;if(e.passKeys){const o=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(o){const u=i.get(o)||0;l=o+"-"+u,i.set(o,u+1)}}const a=q0(e,s,l);a!==void 0&&n.push(a)}return n}function tj(e,t,n){const r=l2(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?GN(n):c2(n)),r.property==="style"){let i=typeof n=="object"?n:nj(e,String(n));return e.stylePropertyNameCase==="css"&&(i=rj(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?r2[r.property]||r.property:r.attribute,n]}}function nj(e,t){try{return $2(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Je("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=H0+"#cannot-parse-style-attribute",i}}function W0(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,l;for(;++s<i.length;){const a=bm(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=l}else r=bm(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Qf.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ml(e)}function ml(e,t){const n=new Je("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=H0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function rj(e){const t={};let n;for(n in e)Qf.call(e,n)&&(t[ij(n)]=e[n]);return t}function ij(e){let t=e.replace(U2,sj);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function sj(e){return"-"+e.toLowerCase()}const Du={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},lj={};function Zf(e,t){const n=lj,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return G0(e,r,i)}function G0(e,t,n){if(aj(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Lm(e.children,t,n)}return Array.isArray(e)?Lm(e,t,n):""}function Lm(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=G0(e[i],t,n);return r.join("")}function aj(e){return!!(e&&typeof e=="object")}const Am=document.createElement("i");function Kf(e){const t="&"+e+";";Am.innerHTML=t;const n=Am.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function _t(e,t,n,r){const i=e.length;let s=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);s<r.length;)l=r.slice(s,s+1e4),l.unshift(t,0),e.splice(...l),s+=1e4,t+=1e4}function At(e,t){return e.length>0?(_t(e,e.length,0,t),e):t}const Om={}.hasOwnProperty;function Z0(e){const t={};let n=-1;for(;++n<e.length;)oj(t,e[n]);return t}function oj(e,t){let n;for(n in t){const i=(Om.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let l;if(s)for(l in s){Om.call(i,l)||(i[l]=[]);const a=s[l];uj(i[l],Array.isArray(a)?a:a?[a]:[])}}}function uj(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);_t(e,0,0,r)}function K0(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Kt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const it=jr(/[A-Za-z]/),Xe=jr(/[\dA-Za-z]/),cj=jr(/[#-'*+\--9=?A-Z^-~]/);function ho(e){return e!==null&&(e<32||e===127)}const kd=jr(/\d/),dj=jr(/[\dA-Fa-f]/),fj=jr(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function we(e){return e!==null&&(e<0||e===32)}function ae(e){return e===-2||e===-1||e===32}const Qo=jr(new RegExp("\\p{P}|\\p{S}","u")),ii=jr(/\s/);function jr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ms(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let l="";if(s===37&&Xe(e.charCodeAt(n+1))&&Xe(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(l=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(l=String.fromCharCode(s,a),i=1):l="�"}else l=String.fromCharCode(s);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function fe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return l;function l(o){return ae(o)?(e.enter(n),a(o)):t(o)}function a(o){return ae(o)&&s++<i?(e.consume(o),a):(e.exit(n),t(o))}}const hj={tokenize:pj};function pj(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),fe(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),s(a)}function s(a){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return J(a)?(e.consume(a),e.exit("chunkText"),s):(e.consume(a),l)}}const mj={tokenize:gj},Dm={tokenize:yj};function gj(e){const t=this,n=[];let r=0,i,s,l;return a;function a(v){if(r<n.length){const w=n[r];return t.containerState=w[1],e.attempt(w[0].continuation,o,u)(v)}return u(v)}function o(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&x();const w=t.events.length;let j=w,N;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){N=t.events[j][1].end;break}g(r);let T=w;for(;T<t.events.length;)t.events[T][1].end={...N},T++;return _t(t.events,j+1,0,t.events.slice(w)),t.events.length=T,u(v)}return a(v)}function u(v){if(r===n.length){if(!i)return p(v);if(i.currentConstruct&&i.currentConstruct.concrete)return m(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Dm,c,d)(v)}function c(v){return i&&x(),g(r),p(v)}function d(v){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,m(v)}function p(v){return t.containerState={},e.attempt(Dm,h,m)(v)}function h(v){return r++,n.push([t.currentConstruct,t.containerState]),p(v)}function m(v){if(v===null){i&&x(),g(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),y(v)}function y(v){if(v===null){_(e.exit("chunkFlow"),!0),g(0),e.consume(v);return}return J(v)?(e.consume(v),_(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(v),y)}function _(v,w){const j=t.sliceStream(v);if(w&&j.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(j),t.parser.lazy[v.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<l&&(!i.events[N][1].end||i.events[N][1].end.offset>l))return;const T=t.events.length;let A=T,L,b;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(L){b=t.events[A][1].end;break}L=!0}for(g(r),N=T;N<t.events.length;)t.events[N][1].end={...b},N++;_t(t.events,A+1,0,t.events.slice(T)),t.events.length=N}}function g(v){let w=n.length;for(;w-- >v;){const j=n[w];t.containerState=j[1],j[0].exit.call(t,e)}n.length=v}function x(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function yj(e,t,n){return fe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ss(e){if(e===null||we(e)||ii(e))return 1;if(Qo(e))return 2}function Wo(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const wd={name:"attention",resolveAll:xj,tokenize:vj};function xj(e,t){let n=-1,r,i,s,l,a,o,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},p={...e[n][1].start};Fm(d,-o),Fm(p,o),l={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},a={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},s={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[r][1].end={...l.start},e[n][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=At(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=At(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",s,t]]),u=At(u,Wo(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=At(u,[["exit",s,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=At(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,_t(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function vj(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ss(r);let s;return l;function l(o){return s=o,e.enter("attentionSequence"),a(o)}function a(o){if(o===s)return e.consume(o),a;const u=e.exit("attentionSequence"),c=ss(o),d=!c||c===2&&i||n.includes(o),p=!i||i===2&&c||n.includes(r);return u._open=!!(s===42?d:d&&(i||!p)),u._close=!!(s===42?p:p&&(c||!d)),t(o)}}function Fm(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const kj={name:"autolink",tokenize:wj};function wj(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(h){return it(h)?(e.consume(h),l):h===64?n(h):u(h)}function l(h){return h===43||h===45||h===46||Xe(h)?(r=1,a(h)):u(h)}function a(h){return h===58?(e.consume(h),r=0,o):(h===43||h===45||h===46||Xe(h))&&r++<32?(e.consume(h),a):(r=0,u(h))}function o(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||ho(h)?n(h):(e.consume(h),o)}function u(h){return h===64?(e.consume(h),c):cj(h)?(e.consume(h),u):n(h)}function c(h){return Xe(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):p(h)}function p(h){if((h===45||Xe(h))&&r++<63){const m=h===45?p:d;return e.consume(h),m}return n(h)}}const Al={partial:!0,tokenize:bj};function bj(e,t,n){return r;function r(s){return ae(s)?fe(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||J(s)?t(s):n(s)}}const X0={continuation:{tokenize:Ej},exit:Cj,name:"blockQuote",tokenize:Sj};function Sj(e,t,n){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),s}return n(l)}function s(l){return ae(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Ej(e,t,n){const r=this;return i;function i(l){return ae(l)?fe(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):s(l)}function s(l){return e.attempt(X0,t,n)(l)}}function Cj(e){e.exit("blockQuote")}const Y0={name:"characterEscape",tokenize:_j};function _j(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return fj(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const J0={name:"characterReference",tokenize:Nj};function Nj(e,t,n){const r=this;let i=0,s,l;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),o}function o(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,l=Xe,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,l=dj,c):(e.enter("characterReferenceValue"),s=7,l=kd,c(d))}function c(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return l===Xe&&!Kf(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(d)&&i++<s?(e.consume(d),c):n(d)}}const $m={partial:!0,tokenize:Rj},Mm={concrete:!0,name:"codeFenced",tokenize:jj};function jj(e,t,n){const r=this,i={partial:!0,tokenize:j};let s=0,l=0,a;return o;function o(N){return u(N)}function u(N){const T=r.events[r.events.length-1];return s=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,a=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(N)}function c(N){return N===a?(l++,e.consume(N),c):l<3?n(N):(e.exit("codeFencedFenceSequence"),ae(N)?fe(e,d,"whitespace")(N):d(N))}function d(N){return N===null||J(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check($m,y,w)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(N))}function p(N){return N===null||J(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(N)):ae(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),fe(e,h,"whitespace")(N)):N===96&&N===a?n(N):(e.consume(N),p)}function h(N){return N===null||J(N)?d(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(N))}function m(N){return N===null||J(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(N)):N===96&&N===a?n(N):(e.consume(N),m)}function y(N){return e.attempt(i,w,_)(N)}function _(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),g}function g(N){return s>0&&ae(N)?fe(e,x,"linePrefix",s+1)(N):x(N)}function x(N){return N===null||J(N)?e.check($m,y,w)(N):(e.enter("codeFlowValue"),v(N))}function v(N){return N===null||J(N)?(e.exit("codeFlowValue"),x(N)):(e.consume(N),v)}function w(N){return e.exit("codeFenced"),t(N)}function j(N,T,A){let L=0;return b;function b(I){return N.enter("lineEnding"),N.consume(I),N.exit("lineEnding"),D}function D(I){return N.enter("codeFencedFence"),ae(I)?fe(N,U,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):U(I)}function U(I){return I===a?(N.enter("codeFencedFenceSequence"),ee(I)):A(I)}function ee(I){return I===a?(L++,N.consume(I),ee):L>=l?(N.exit("codeFencedFenceSequence"),ae(I)?fe(N,F,"whitespace")(I):F(I)):A(I)}function F(I){return I===null||J(I)?(N.exit("codeFencedFence"),T(I)):A(I)}}}function Rj(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s)}function s(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Fu={name:"codeIndented",tokenize:Tj},Pj={partial:!0,tokenize:Ij};function Tj(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),fe(e,s,"linePrefix",5)(u)}function s(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?o(u):J(u)?e.attempt(Pj,l,o)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||J(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function o(u){return e.exit("codeIndented"),t(u)}}function Ij(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):J(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):fe(e,s,"linePrefix",5)(l)}function s(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):J(l)?i(l):n(l)}}const Lj={name:"codeText",previous:Oj,resolve:Aj,tokenize:Dj};function Aj(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Oj(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Dj(e,t,n){let r=0,i,s;return l;function l(d){return e.enter("codeText"),e.enter("codeTextSequence"),a(d)}function a(d){return d===96?(e.consume(d),r++,a):(e.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),o):d===96?(s=e.enter("codeTextSequence"),i=0,c(d)):J(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||J(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",u(d))}}class Fj{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&js(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),js(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),js(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);js(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);js(this.left,n.reverse())}}}function js(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ev(e){const t={};let n=-1,r,i,s,l,a,o,u;const c=new Fj(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,s=0,s<o.length&&o[s][1].type==="lineEndingBlank"&&(s+=2),s<o.length&&o[s][1].type==="content"))for(;++s<o.length&&o[s][1].type!=="content";)o[s][1].type==="chunkText"&&(o[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,$j(c,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(l=c.get(s),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=s);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return _t(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function $j(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,o=[],u={};let c,d,p=-1,h=n,m=0,y=0;const _=[y];for(;h;){for(;e.get(++i)[1]!==h;);s.push(i),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),d&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(c),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(y=p+1,_.push(y),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):_.pop(),p=_.length;p--;){const g=a.slice(_[p],_[p+1]),x=s.pop();o.push([x,x+g.length-1]),e.splice(x,2,g)}for(o.reverse(),p=-1;++p<o.length;)u[m+o[p][0]]=m+o[p][1],m+=o[p][1]-o[p][0]-1;return u}const Mj={resolve:Uj,tokenize:Bj},zj={partial:!0,tokenize:Vj};function Uj(e){return ev(e),e}function Bj(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):J(a)?e.check(zj,l,s)(a):(e.consume(a),i)}function s(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function l(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Vj(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),fe(e,s,"linePrefix")}function s(l){if(l===null||J(l))return n(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function tv(e,t,n,r,i,s,l,a,o){const u=o||Number.POSITIVE_INFINITY;let c=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(g),e.exit(s),p):g===null||g===32||g===41||ho(g)?n(g):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),y(g))}function p(g){return g===62?(e.enter(s),e.consume(g),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===62?(e.exit("chunkString"),e.exit(a),p(g)):g===null||g===60||J(g)?n(g):(e.consume(g),g===92?m:h)}function m(g){return g===60||g===62||g===92?(e.consume(g),h):h(g)}function y(g){return!c&&(g===null||g===41||we(g))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(g)):c<u&&g===40?(e.consume(g),c++,y):g===41?(e.consume(g),c--,y):g===null||g===32||g===40||ho(g)?n(g):(e.consume(g),g===92?_:y)}function _(g){return g===40||g===41||g===92?(e.consume(g),y):y(g)}}function nv(e,t,n,r,i,s){const l=this;let a=0,o;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(s),c}function c(h){return a>999||h===null||h===91||h===93&&!o||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(s),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):J(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||J(h)||a++>999?(e.exit("chunkString"),c(h)):(e.consume(h),o||(o=!ae(h)),h===92?p:d)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,d):d(h)}}function rv(e,t,n,r,i,s){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,o):n(p)}function o(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(s),u(p))}function u(p){return p===l?(e.exit(s),o(l)):p===null?n(p):J(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),fe(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===l||p===null||J(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?d:c)}function d(p){return p===l||p===92?(e.consume(p),c):c(p)}}function Qs(e,t){let n;return r;function r(i){return J(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ae(i)?fe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Hj={name:"definition",tokenize:Qj},qj={partial:!0,tokenize:Wj};function Qj(e,t,n){const r=this;let i;return s;function s(h){return e.enter("definition"),l(h)}function l(h){return nv.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=Kt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o):n(h)}function o(h){return we(h)?Qs(e,u)(h):u(h)}function u(h){return tv(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(qj,d,d)(h)}function d(h){return ae(h)?fe(e,p,"whitespace")(h):p(h)}function p(h){return h===null||J(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function Wj(e,t,n){return r;function r(a){return we(a)?Qs(e,i)(a):n(a)}function i(a){return rv(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return ae(a)?fe(e,l,"whitespace")(a):l(a)}function l(a){return a===null||J(a)?t(a):n(a)}}const Gj={name:"hardBreakEscape",tokenize:Zj};function Zj(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return J(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Kj={name:"headingAtx",resolve:Xj,tokenize:Yj};function Xj(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},_t(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function Yj(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),s(c)}function s(c){return e.enter("atxHeadingSequence"),l(c)}function l(c){return c===35&&r++<6?(e.consume(c),l):c===null||we(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),o(c)):c===null||J(c)?(e.exit("atxHeading"),t(c)):ae(c)?fe(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function o(c){return c===35?(e.consume(c),o):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||we(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const Jj=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],zm=["pre","script","style","textarea"],eR={concrete:!0,name:"htmlFlow",resolveTo:rR,tokenize:iR},tR={partial:!0,tokenize:lR},nR={partial:!0,tokenize:sR};function rR(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function iR(e,t,n){const r=this;let i,s,l,a,o;return u;function u(S){return c(S)}function c(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),d}function d(S){return S===33?(e.consume(S),p):S===47?(e.consume(S),s=!0,y):S===63?(e.consume(S),i=3,r.interrupt?t:k):it(S)?(e.consume(S),l=String.fromCharCode(S),_):n(S)}function p(S){return S===45?(e.consume(S),i=2,h):S===91?(e.consume(S),i=5,a=0,m):it(S)?(e.consume(S),i=4,r.interrupt?t:k):n(S)}function h(S){return S===45?(e.consume(S),r.interrupt?t:k):n(S)}function m(S){const he="CDATA[";return S===he.charCodeAt(a++)?(e.consume(S),a===he.length?r.interrupt?t:U:m):n(S)}function y(S){return it(S)?(e.consume(S),l=String.fromCharCode(S),_):n(S)}function _(S){if(S===null||S===47||S===62||we(S)){const he=S===47,me=l.toLowerCase();return!he&&!s&&zm.includes(me)?(i=1,r.interrupt?t(S):U(S)):Jj.includes(l.toLowerCase())?(i=6,he?(e.consume(S),g):r.interrupt?t(S):U(S)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):s?x(S):v(S))}return S===45||Xe(S)?(e.consume(S),l+=String.fromCharCode(S),_):n(S)}function g(S){return S===62?(e.consume(S),r.interrupt?t:U):n(S)}function x(S){return ae(S)?(e.consume(S),x):b(S)}function v(S){return S===47?(e.consume(S),b):S===58||S===95||it(S)?(e.consume(S),w):ae(S)?(e.consume(S),v):b(S)}function w(S){return S===45||S===46||S===58||S===95||Xe(S)?(e.consume(S),w):j(S)}function j(S){return S===61?(e.consume(S),N):ae(S)?(e.consume(S),j):v(S)}function N(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),o=S,T):ae(S)?(e.consume(S),N):A(S)}function T(S){return S===o?(e.consume(S),o=null,L):S===null||J(S)?n(S):(e.consume(S),T)}function A(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||we(S)?j(S):(e.consume(S),A)}function L(S){return S===47||S===62||ae(S)?v(S):n(S)}function b(S){return S===62?(e.consume(S),D):n(S)}function D(S){return S===null||J(S)?U(S):ae(S)?(e.consume(S),D):n(S)}function U(S){return S===45&&i===2?(e.consume(S),q):S===60&&i===1?(e.consume(S),B):S===62&&i===4?(e.consume(S),K):S===63&&i===3?(e.consume(S),k):S===93&&i===5?(e.consume(S),O):J(S)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(tR,G,ee)(S)):S===null||J(S)?(e.exit("htmlFlowData"),ee(S)):(e.consume(S),U)}function ee(S){return e.check(nR,F,G)(S)}function F(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),I}function I(S){return S===null||J(S)?ee(S):(e.enter("htmlFlowData"),U(S))}function q(S){return S===45?(e.consume(S),k):U(S)}function B(S){return S===47?(e.consume(S),l="",R):U(S)}function R(S){if(S===62){const he=l.toLowerCase();return zm.includes(he)?(e.consume(S),K):U(S)}return it(S)&&l.length<8?(e.consume(S),l+=String.fromCharCode(S),R):U(S)}function O(S){return S===93?(e.consume(S),k):U(S)}function k(S){return S===62?(e.consume(S),K):S===45&&i===2?(e.consume(S),k):U(S)}function K(S){return S===null||J(S)?(e.exit("htmlFlowData"),G(S)):(e.consume(S),K)}function G(S){return e.exit("htmlFlow"),t(S)}}function sR(e,t,n){const r=this;return i;function i(l){return J(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):n(l)}function s(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function lR(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Al,t,n)}}const aR={name:"htmlText",tokenize:oR};function oR(e,t,n){const r=this;let i,s,l;return a;function a(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),o}function o(k){return k===33?(e.consume(k),u):k===47?(e.consume(k),j):k===63?(e.consume(k),v):it(k)?(e.consume(k),A):n(k)}function u(k){return k===45?(e.consume(k),c):k===91?(e.consume(k),s=0,m):it(k)?(e.consume(k),x):n(k)}function c(k){return k===45?(e.consume(k),h):n(k)}function d(k){return k===null?n(k):k===45?(e.consume(k),p):J(k)?(l=d,B(k)):(e.consume(k),d)}function p(k){return k===45?(e.consume(k),h):d(k)}function h(k){return k===62?q(k):k===45?p(k):d(k)}function m(k){const K="CDATA[";return k===K.charCodeAt(s++)?(e.consume(k),s===K.length?y:m):n(k)}function y(k){return k===null?n(k):k===93?(e.consume(k),_):J(k)?(l=y,B(k)):(e.consume(k),y)}function _(k){return k===93?(e.consume(k),g):y(k)}function g(k){return k===62?q(k):k===93?(e.consume(k),g):y(k)}function x(k){return k===null||k===62?q(k):J(k)?(l=x,B(k)):(e.consume(k),x)}function v(k){return k===null?n(k):k===63?(e.consume(k),w):J(k)?(l=v,B(k)):(e.consume(k),v)}function w(k){return k===62?q(k):v(k)}function j(k){return it(k)?(e.consume(k),N):n(k)}function N(k){return k===45||Xe(k)?(e.consume(k),N):T(k)}function T(k){return J(k)?(l=T,B(k)):ae(k)?(e.consume(k),T):q(k)}function A(k){return k===45||Xe(k)?(e.consume(k),A):k===47||k===62||we(k)?L(k):n(k)}function L(k){return k===47?(e.consume(k),q):k===58||k===95||it(k)?(e.consume(k),b):J(k)?(l=L,B(k)):ae(k)?(e.consume(k),L):q(k)}function b(k){return k===45||k===46||k===58||k===95||Xe(k)?(e.consume(k),b):D(k)}function D(k){return k===61?(e.consume(k),U):J(k)?(l=D,B(k)):ae(k)?(e.consume(k),D):L(k)}function U(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,ee):J(k)?(l=U,B(k)):ae(k)?(e.consume(k),U):(e.consume(k),F)}function ee(k){return k===i?(e.consume(k),i=void 0,I):k===null?n(k):J(k)?(l=ee,B(k)):(e.consume(k),ee)}function F(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||we(k)?L(k):(e.consume(k),F)}function I(k){return k===47||k===62||we(k)?L(k):n(k)}function q(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function B(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),R}function R(k){return ae(k)?fe(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):O(k)}function O(k){return e.enter("htmlTextData"),l(k)}}const Xf={name:"labelEnd",resolveAll:fR,resolveTo:hR,tokenize:pR},uR={tokenize:mR},cR={tokenize:gR},dR={tokenize:yR};function fR(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&_t(e,0,e.length,n),e}function hR(e,t){let n=e.length,r=0,i,s,l,a;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const o={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[s][1].start},end:{...e[l][1].end}},c={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",o,t],["enter",u,t]],a=At(a,e.slice(s+1,s+r+3)),a=At(a,[["enter",c,t]]),a=At(a,Wo(t.parser.constructs.insideSpan.null,e.slice(s+r+4,l-3),t)),a=At(a,[["exit",c,t],e[l-2],e[l-1],["exit",u,t]]),a=At(a,e.slice(l+1)),a=At(a,[["exit",o,t]]),_t(e,s,e.length,a),e}function pR(e,t,n){const r=this;let i=r.events.length,s,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return a;function a(p){return s?s._inactive?d(p):(l=r.parser.defined.includes(Kt(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),o):n(p)}function o(p){return p===40?e.attempt(uR,c,l?c:d)(p):p===91?e.attempt(cR,c,l?u:d)(p):l?c(p):d(p)}function u(p){return e.attempt(dR,c,d)(p)}function c(p){return t(p)}function d(p){return s._balanced=!0,n(p)}}function mR(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return we(d)?Qs(e,s)(d):s(d)}function s(d){return d===41?c(d):tv(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function l(d){return we(d)?Qs(e,o)(d):c(d)}function a(d){return n(d)}function o(d){return d===34||d===39||d===40?rv(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return we(d)?Qs(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function gR(e,t,n){const r=this;return i;function i(a){return nv.call(r,e,s,l,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(Kt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function l(a){return n(a)}}function yR(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const xR={name:"labelStartImage",resolveAll:Xf.resolveAll,tokenize:vR};function vR(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),s}function s(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),l):n(a)}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const kR={name:"labelStartLink",resolveAll:Xf.resolveAll,tokenize:wR};function wR(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),s}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const $u={name:"lineEnding",tokenize:bR};function bR(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),fe(e,t,"linePrefix")}}const ja={name:"thematicBreak",tokenize:SR};function SR(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),o(u)):r>=3&&(u===null||J(u))?(e.exit("thematicBreak"),t(u)):n(u)}function o(u){return u===i?(e.consume(u),r++,o):(e.exit("thematicBreakSequence"),ae(u)?fe(e,a,"whitespace")(u):a(u))}}const ct={continuation:{tokenize:NR},exit:RR,name:"list",tokenize:_R},ER={partial:!0,tokenize:PR},CR={partial:!0,tokenize:jR};function _R(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:kd(h)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(ja,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(h)}return n(h)}function o(h){return kd(h)&&++l<10?(e.consume(h),o):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Al,r.interrupt?n:c,e.attempt(ER,p,d))}function c(h){return r.containerState.initialBlankLine=!0,s++,p(h)}function d(h){return ae(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):n(h)}function p(h){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function NR(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Al,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,fe(e,t,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!ae(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(CR,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,fe(e,e.attempt(ct,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function jR(e,t,n){const r=this;return fe(e,i,"listItemIndent",r.containerState.size+1);function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(s):n(s)}}function RR(e){e.exit(this.containerState.type)}function PR(e,t,n){const r=this;return fe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const l=r.events[r.events.length-1];return!ae(s)&&l&&l[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Um={name:"setextUnderline",resolveTo:TR,tokenize:IR};function TR(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",l,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function IR(e,t,n){const r=this;let i;return s;function s(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),ae(u)?fe(e,o,"lineSuffix")(u):o(u))}function o(u){return u===null||J(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const LR={tokenize:AR};function AR(e){const t=this,n=e.attempt(Al,r,e.attempt(this.parser.constructs.flowInitial,i,fe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Mj,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const OR={resolveAll:sv()},DR=iv("string"),FR=iv("text");function iv(e){return{resolveAll:sv(e==="text"?$R:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,l,a);return l;function l(c){return u(c)?s(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),o}function o(c){return u(c)?(n.exit("data"),s(c)):(n.consume(c),o)}function u(c){if(c===null)return!0;const d=i[c];let p=-1;if(d)for(;++p<d.length;){const h=d[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function sv(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function $R(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,l=-1,a=0,o;for(;s--;){const u=i[s];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)a++,l--;if(l)break;l=-1}else if(u===-2)o=!0,a++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const u={type:n===e.length||o||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:r.start._bufferIndex+l,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const MR={42:ct,43:ct,45:ct,48:ct,49:ct,50:ct,51:ct,52:ct,53:ct,54:ct,55:ct,56:ct,57:ct,62:X0},zR={91:Hj},UR={[-2]:Fu,[-1]:Fu,32:Fu},BR={35:Kj,42:ja,45:[Um,ja],60:eR,61:Um,95:ja,96:Mm,126:Mm},VR={38:J0,92:Y0},HR={[-5]:$u,[-4]:$u,[-3]:$u,33:xR,38:J0,42:wd,60:[kj,aR],91:kR,92:[Gj,Y0],93:Xf,95:wd,96:Lj},qR={null:[wd,OR]},QR={null:[42,95]},WR={null:[]},GR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:QR,contentInitial:zR,disable:WR,document:MR,flow:BR,flowInitial:UR,insideSpan:qR,string:VR,text:HR},Symbol.toStringTag,{value:"Module"}));function ZR(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let l=[],a=[];const o={attempt:T(j),check:T(N),consume:x,enter:v,exit:w,interrupt:T(N,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:m,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:d};let c=t.tokenize.call(u,o);return t.resolveAll&&s.push(t),u;function d(D){return l=At(l,D),_(),l[l.length-1]!==null?[]:(A(t,0),u.events=Wo(s,u.events,u),u.events)}function p(D,U){return XR(h(D),U)}function h(D){return KR(l,D)}function m(){const{_bufferIndex:D,_index:U,line:ee,column:F,offset:I}=r;return{_bufferIndex:D,_index:U,line:ee,column:F,offset:I}}function y(D){i[D.line]=D.column,b()}function _(){let D;for(;r._index<l.length;){const U=l[r._index];if(typeof U=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<U.length;)g(U.charCodeAt(r._bufferIndex));else g(U)}}function g(D){c=c(D)}function x(D){J(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,b()):D!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=D}function v(D,U){const ee=U||{};return ee.type=D,ee.start=m(),u.events.push(["enter",ee,u]),a.push(ee),ee}function w(D){const U=a.pop();return U.end=m(),u.events.push(["exit",U,u]),U}function j(D,U){A(D,U.from)}function N(D,U){U.restore()}function T(D,U){return ee;function ee(F,I,q){let B,R,O,k;return Array.isArray(F)?G(F):"tokenize"in F?G([F]):K(F);function K(ye){return tn;function tn(Hn){const oi=Hn!==null&&ye[Hn],ui=Hn!==null&&ye.null,Dl=[...Array.isArray(oi)?oi:oi?[oi]:[],...Array.isArray(ui)?ui:ui?[ui]:[]];return G(Dl)(Hn)}}function G(ye){return B=ye,R=0,ye.length===0?q:S(ye[R])}function S(ye){return tn;function tn(Hn){return k=L(),O=ye,ye.partial||(u.currentConstruct=ye),ye.name&&u.parser.constructs.disable.null.includes(ye.name)?me():ye.tokenize.call(U?Object.assign(Object.create(u),U):u,o,he,me)(Hn)}}function he(ye){return D(O,k),I}function me(ye){return k.restore(),++R<B.length?S(B[R]):q}}}function A(D,U){D.resolveAll&&!s.includes(D)&&s.push(D),D.resolve&&_t(u.events,U,u.events.length-U,D.resolve(u.events.slice(U),u)),D.resolveTo&&(u.events=D.resolveTo(u.events,u))}function L(){const D=m(),U=u.previous,ee=u.currentConstruct,F=u.events.length,I=Array.from(a);return{from:F,restore:q};function q(){r=D,u.previous=U,u.currentConstruct=ee,u.events.length=F,a=I,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function KR(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,s)];else{if(l=e.slice(n,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}s>0&&l.push(e[i].slice(0,s))}return l}function XR(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let l;if(typeof s=="string")l=s;else switch(s){case-5:{l="\r";break}case-4:{l=`
172
+ `;break}case-3:{l=`\r
173
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(s)}i=s===-2,r.push(l)}return r.join("")}function YR(e){const r={constructs:Z0([GR,...(e||{}).extensions||[]]),content:i(hj),defined:[],document:i(mj),flow:i(LR),lazy:{},string:i(DR),text:i(FR)};return r;function i(s){return l;function l(a){return ZR(r,s,a)}}}function JR(e){for(;!ev(e););return e}const Bm=/[\0\t\n\r]/g;function eP(){let e=1,t="",n=!0,r;return i;function i(s,l,a){const o=[];let u,c,d,p,h;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(l||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(Bm.lastIndex=d,u=Bm.exec(s),p=u&&u.index!==void 0?u.index:s.length,h=s.charCodeAt(p),!u){t=s.slice(d);break}if(h===10&&d===p&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<p&&(o.push(s.slice(d,p)),e+=p-d),h){case 0:{o.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,o.push(-2);e++<c;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return a&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const tP=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nP(e){return e.replace(tP,rP)}function rP(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return K0(n.slice(s?2:1),s?16:10)}return Kf(n)||e}const lv={}.hasOwnProperty;function iP(e,t,n){return typeof t!="string"&&(n=t,t=void 0),sP(n)(JR(YR(n).document().write(eP()(e,t,!0))))}function sP(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ch),autolinkProtocol:L,autolinkEmail:L,atxHeading:s(ah),blockQuote:s(ui),characterEscape:L,characterReference:L,codeFenced:s(Dl),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(Dl,l),codeText:s(zv,l),codeTextData:L,data:L,codeFlowValue:L,definition:s(Uv),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(Bv),hardBreakEscape:s(oh),hardBreakTrailing:s(oh),htmlFlow:s(uh,l),htmlFlowData:L,htmlText:s(uh,l),htmlTextData:L,image:s(Vv),label:l,link:s(ch),listItem:s(Hv),listItemValue:p,listOrdered:s(dh,d),listUnordered:s(dh),paragraph:s(qv),reference:S,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(ah),strong:s(Qv),thematicBreak:s(Gv)},exit:{atxHeading:o(),atxHeadingSequence:j,autolink:o(),autolinkEmail:oi,autolinkProtocol:Hn,blockQuote:o(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:ye,characterReference:tn,codeFenced:o(_),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:m,codeFlowValue:b,codeIndented:o(g),codeText:o(I),codeTextData:b,data:b,definition:o(),definitionDestinationString:w,definitionLabelString:x,definitionTitleString:v,emphasis:o(),hardBreakEscape:o(U),hardBreakTrailing:o(U),htmlFlow:o(ee),htmlFlowData:b,htmlText:o(F),htmlTextData:b,image:o(B),label:O,labelText:R,lineEnding:D,link:o(q),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:he,resourceDestinationString:k,resourceTitleString:K,resource:G,setextHeading:o(A),setextHeadingLineSequence:T,setextHeadingText:N,strong:o(),thematicBreak:o()}};av(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(P){let V={type:"root",children:[]};const re={stack:[V],tokenStack:[],config:t,enter:a,exit:u,buffer:l,resume:c,data:n},ue=[];let ke=-1;for(;++ke<P.length;)if(P[ke][1].type==="listOrdered"||P[ke][1].type==="listUnordered")if(P[ke][0]==="enter")ue.push(ke);else{const Ut=ue.pop();ke=i(P,Ut,ke)}for(ke=-1;++ke<P.length;){const Ut=t[P[ke][0]];lv.call(Ut,P[ke][1].type)&&Ut[P[ke][1].type].call(Object.assign({sliceSerialize:P[ke][2].sliceSerialize},re),P[ke][1])}if(re.tokenStack.length>0){const Ut=re.tokenStack[re.tokenStack.length-1];(Ut[1]||Vm).call(re,void 0,Ut[0])}for(V.position={start:Qn(P.length>0?P[0][1].start:{line:1,column:1,offset:0}),end:Qn(P.length>0?P[P.length-2][1].end:{line:1,column:1,offset:0})},ke=-1;++ke<t.transforms.length;)V=t.transforms[ke](V)||V;return V}function i(P,V,re){let ue=V-1,ke=-1,Ut=!1,Rr,vn,gs,ys;for(;++ue<=re;){const vt=P[ue];switch(vt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{vt[0]==="enter"?ke++:ke--,ys=void 0;break}case"lineEndingBlank":{vt[0]==="enter"&&(Rr&&!ys&&!ke&&!gs&&(gs=ue),ys=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ys=void 0}if(!ke&&vt[0]==="enter"&&vt[1].type==="listItemPrefix"||ke===-1&&vt[0]==="exit"&&(vt[1].type==="listUnordered"||vt[1].type==="listOrdered")){if(Rr){let ci=ue;for(vn=void 0;ci--;){const kn=P[ci];if(kn[1].type==="lineEnding"||kn[1].type==="lineEndingBlank"){if(kn[0]==="exit")continue;vn&&(P[vn][1].type="lineEndingBlank",Ut=!0),kn[1].type="lineEnding",vn=ci}else if(!(kn[1].type==="linePrefix"||kn[1].type==="blockQuotePrefix"||kn[1].type==="blockQuotePrefixWhitespace"||kn[1].type==="blockQuoteMarker"||kn[1].type==="listItemIndent"))break}gs&&(!vn||gs<vn)&&(Rr._spread=!0),Rr.end=Object.assign({},vn?P[vn][1].start:vt[1].end),P.splice(vn||ue,0,["exit",Rr,vt[2]]),ue++,re++}if(vt[1].type==="listItemPrefix"){const ci={type:"listItem",_spread:!1,start:Object.assign({},vt[1].start),end:void 0};Rr=ci,P.splice(ue,0,["enter",ci,vt[2]]),ue++,re++,gs=void 0,ys=!0}}}return P[V][1]._spread=Ut,re}function s(P,V){return re;function re(ue){a.call(this,P(ue),ue),V&&V.call(this,ue)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(P,V,re){this.stack[this.stack.length-1].children.push(P),this.stack.push(P),this.tokenStack.push([V,re||void 0]),P.position={start:Qn(V.start),end:void 0}}function o(P){return V;function V(re){P&&P.call(this,re),u.call(this,re)}}function u(P,V){const re=this.stack.pop(),ue=this.tokenStack.pop();if(ue)ue[0].type!==P.type&&(V?V.call(this,P,ue[0]):(ue[1]||Vm).call(this,P,ue[0]));else throw new Error("Cannot close `"+P.type+"` ("+qs({start:P.start,end:P.end})+"): it’s not open");re.position.end=Qn(P.end)}function c(){return Zf(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(P){if(this.data.expectingFirstListItemValue){const V=this.stack[this.stack.length-2];V.start=Number.parseInt(this.sliceSerialize(P),10),this.data.expectingFirstListItemValue=void 0}}function h(){const P=this.resume(),V=this.stack[this.stack.length-1];V.lang=P}function m(){const P=this.resume(),V=this.stack[this.stack.length-1];V.meta=P}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const P=this.resume(),V=this.stack[this.stack.length-1];V.value=P.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const P=this.resume(),V=this.stack[this.stack.length-1];V.value=P.replace(/(\r?\n|\r)$/g,"")}function x(P){const V=this.resume(),re=this.stack[this.stack.length-1];re.label=V,re.identifier=Kt(this.sliceSerialize(P)).toLowerCase()}function v(){const P=this.resume(),V=this.stack[this.stack.length-1];V.title=P}function w(){const P=this.resume(),V=this.stack[this.stack.length-1];V.url=P}function j(P){const V=this.stack[this.stack.length-1];if(!V.depth){const re=this.sliceSerialize(P).length;V.depth=re}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function T(P){const V=this.stack[this.stack.length-1];V.depth=this.sliceSerialize(P).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function L(P){const re=this.stack[this.stack.length-1].children;let ue=re[re.length-1];(!ue||ue.type!=="text")&&(ue=Wv(),ue.position={start:Qn(P.start),end:void 0},re.push(ue)),this.stack.push(ue)}function b(P){const V=this.stack.pop();V.value+=this.sliceSerialize(P),V.position.end=Qn(P.end)}function D(P){const V=this.stack[this.stack.length-1];if(this.data.atHardBreak){const re=V.children[V.children.length-1];re.position.end=Qn(P.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(V.type)&&(L.call(this,P),b.call(this,P))}function U(){this.data.atHardBreak=!0}function ee(){const P=this.resume(),V=this.stack[this.stack.length-1];V.value=P}function F(){const P=this.resume(),V=this.stack[this.stack.length-1];V.value=P}function I(){const P=this.resume(),V=this.stack[this.stack.length-1];V.value=P}function q(){const P=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=V,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function B(){const P=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=V,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function R(P){const V=this.sliceSerialize(P),re=this.stack[this.stack.length-2];re.label=nP(V),re.identifier=Kt(V).toLowerCase()}function O(){const P=this.stack[this.stack.length-1],V=this.resume(),re=this.stack[this.stack.length-1];if(this.data.inReference=!0,re.type==="link"){const ue=P.children;re.children=ue}else re.alt=V}function k(){const P=this.resume(),V=this.stack[this.stack.length-1];V.url=P}function K(){const P=this.resume(),V=this.stack[this.stack.length-1];V.title=P}function G(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function he(P){const V=this.resume(),re=this.stack[this.stack.length-1];re.label=V,re.identifier=Kt(this.sliceSerialize(P)).toLowerCase(),this.data.referenceType="full"}function me(P){this.data.characterReferenceType=P.type}function ye(P){const V=this.sliceSerialize(P),re=this.data.characterReferenceType;let ue;re?(ue=K0(V,re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ue=Kf(V);const ke=this.stack[this.stack.length-1];ke.value+=ue}function tn(P){const V=this.stack.pop();V.position.end=Qn(P.end)}function Hn(P){b.call(this,P);const V=this.stack[this.stack.length-1];V.url=this.sliceSerialize(P)}function oi(P){b.call(this,P);const V=this.stack[this.stack.length-1];V.url="mailto:"+this.sliceSerialize(P)}function ui(){return{type:"blockquote",children:[]}}function Dl(){return{type:"code",lang:null,meta:null,value:""}}function zv(){return{type:"inlineCode",value:""}}function Uv(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Bv(){return{type:"emphasis",children:[]}}function ah(){return{type:"heading",depth:0,children:[]}}function oh(){return{type:"break"}}function uh(){return{type:"html",value:""}}function Vv(){return{type:"image",title:null,url:"",alt:null}}function ch(){return{type:"link",title:null,url:"",children:[]}}function dh(P){return{type:"list",ordered:P.type==="listOrdered",start:null,spread:P._spread,children:[]}}function Hv(P){return{type:"listItem",spread:P._spread,checked:null,children:[]}}function qv(){return{type:"paragraph",children:[]}}function Qv(){return{type:"strong",children:[]}}function Wv(){return{type:"text",value:""}}function Gv(){return{type:"thematicBreak"}}}function Qn(e){return{line:e.line,column:e.column,offset:e.offset}}function av(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?av(e,r):lP(e,r)}}function lP(e,t){let n;for(n in t)if(lv.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Vm(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qs({start:t.start,end:t.end})+") is still open")}function aP(e){const t=this;t.parser=n;function n(r){return iP(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function oP(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function uP(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
174
+ `}]}function cP(e,t){const n=t.value?t.value+`
175
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function dP(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fP(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hP(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=ms(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=s+1,a+=1,e.footnoteCounts.set(r,a);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,o);const u={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,u),e.applyData(t,u)}function pP(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mP(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ov(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function gP(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ov(e,t);const i={src:ms(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function yP(e,t){const n={src:ms(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function xP(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function vP(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ov(e,t);const i={href:ms(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function kP(e,t){const n={href:ms(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function wP(e,t,n){const r=e.all(t),i=n?bP(n):uv(t),s={},l=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const c=r[a];(i||a!==0||c.type!=="element"||c.tagName!=="p")&&l.push({type:"text",value:`
176
+ `}),c.type==="element"&&c.tagName==="p"&&!i?l.push(...c.children):l.push(c)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&l.push({type:"text",value:`
177
+ `});const u={type:"element",tagName:"li",properties:s,children:l};return e.patch(t,u),e.applyData(t,u)}function bP(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=uv(n[r])}return t}function uv(e){const t=e.spread;return t??e.children.length>1}function SP(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function EP(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CP(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function _P(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function NP(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=qf(t.children[1]),o=B0(t.children[t.children.length-1]);a&&o&&(l.position={start:a,end:o}),i.push(l)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function jP(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let o=-1;const u=[];for(;++o<a;){const d=t.children[o],p={},h=l?l[o]:void 0;h&&(p.align=h);let m={type:"element",tagName:s,properties:p,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),u.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function RP(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Hm=9,qm=32;function PP(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Qm(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Qm(t.slice(i),i>0,!1)),s.join("")}function Qm(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Hm||s===qm;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Hm||s===qm;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function TP(e,t){const n={type:"text",value:PP(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function IP(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const LP={blockquote:oP,break:uP,code:cP,delete:dP,emphasis:fP,footnoteReference:hP,heading:pP,html:mP,imageReference:gP,image:yP,inlineCode:xP,linkReference:vP,link:kP,listItem:wP,list:SP,paragraph:EP,root:CP,strong:_P,table:NP,tableCell:RP,tableRow:jP,text:TP,thematicBreak:IP,toml:ua,yaml:ua,definition:ua,footnoteDefinition:ua};function ua(){}const cv=-1,Go=0,Ws=1,po=2,Yf=3,Jf=4,eh=5,th=6,dv=7,fv=8,Wm=typeof self=="object"?self:globalThis,AP=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,l]=t[i];switch(s){case Go:case cv:return n(l,i);case Ws:{const a=n([],i);for(const o of l)a.push(r(o));return a}case po:{const a=n({},i);for(const[o,u]of l)a[r(o)]=r(u);return a}case Yf:return n(new Date(l),i);case Jf:{const{source:a,flags:o}=l;return n(new RegExp(a,o),i)}case eh:{const a=n(new Map,i);for(const[o,u]of l)a.set(r(o),r(u));return a}case th:{const a=n(new Set,i);for(const o of l)a.add(r(o));return a}case dv:{const{name:a,message:o}=l;return n(new Wm[a](o),i)}case fv:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return n(new DataView(a),l)}}return n(new Wm[s](l),i)};return r},Gm=e=>AP(new Map,e)(0),fi="",{toString:OP}={},{keys:DP}=Object,Rs=e=>{const t=typeof e;if(t!=="object"||!e)return[Go,t];const n=OP.call(e).slice(8,-1);switch(n){case"Array":return[Ws,fi];case"Object":return[po,fi];case"Date":return[Yf,fi];case"RegExp":return[Jf,fi];case"Map":return[eh,fi];case"Set":return[th,fi];case"DataView":return[Ws,n]}return n.includes("Array")?[Ws,n]:n.includes("Error")?[dv,n]:[po,n]},ca=([e,t])=>e===Go&&(t==="function"||t==="symbol"),FP=(e,t,n,r)=>{const i=(l,a)=>{const o=r.push(l)-1;return n.set(a,o),o},s=l=>{if(n.has(l))return n.get(l);let[a,o]=Rs(l);switch(a){case Go:{let c=l;switch(o){case"bigint":a=fv,c=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);c=null;break;case"undefined":return i([cv],l)}return i([a,c],l)}case Ws:{if(o){let p=l;return o==="DataView"?p=new Uint8Array(l.buffer):o==="ArrayBuffer"&&(p=new Uint8Array(l)),i([o,[...p]],l)}const c=[],d=i([a,c],l);for(const p of l)c.push(s(p));return d}case po:{if(o)switch(o){case"BigInt":return i([o,l.toString()],l);case"Boolean":case"Number":case"String":return i([o,l.valueOf()],l)}if(t&&"toJSON"in l)return s(l.toJSON());const c=[],d=i([a,c],l);for(const p of DP(l))(e||!ca(Rs(l[p])))&&c.push([s(p),s(l[p])]);return d}case Yf:return i([a,l.toISOString()],l);case Jf:{const{source:c,flags:d}=l;return i([a,{source:c,flags:d}],l)}case eh:{const c=[],d=i([a,c],l);for(const[p,h]of l)(e||!(ca(Rs(p))||ca(Rs(h))))&&c.push([s(p),s(h)]);return d}case th:{const c=[],d=i([a,c],l);for(const p of l)(e||!ca(Rs(p)))&&c.push(s(p));return d}}const{message:u}=l;return i([a,{name:o,message:u}],l)};return s},Zm=(e,{json:t,lossy:n}={})=>{const r=[];return FP(!(t||n),!!t,new Map,r)(e),r},mo=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Gm(Zm(e,t)):structuredClone(e):(e,t)=>Gm(Zm(e,t));function $P(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function MP(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function zP(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||$P,r=e.options.footnoteBackLabel||MP,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let o=-1;for(;++o<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[o]);if(!u)continue;const c=e.all(u),d=String(u.identifier).toUpperCase(),p=ms(d.toLowerCase());let h=0;const m=[],y=e.footnoteCounts.get(d);for(;y!==void 0&&++h<=y;){m.length>0&&m.push({type:"text",value:" "});let x=typeof n=="string"?n:n(o,h);typeof x=="string"&&(x={type:"text",value:x}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,h),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const _=c[c.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const x=_.children[_.children.length-1];x&&x.type==="text"?x.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...m)}else c.push(...m);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(c,!0)};e.patch(u,g),a.push(g)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...mo(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
178
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
179
+ `}]}}const Zo=function(e){if(e==null)return HP;if(typeof e=="function")return Ko(e);if(typeof e=="object")return Array.isArray(e)?UP(e):BP(e);if(typeof e=="string")return VP(e);throw new Error("Expected function, string, or object as test")};function UP(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Zo(e[n]);return Ko(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function BP(e){const t=e;return Ko(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function VP(e){return Ko(t);function t(n){return n&&n.type===e}}function Ko(e){return t;function t(n,r,i){return!!(qP(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function HP(){return!0}function qP(e){return e!==null&&typeof e=="object"&&"type"in e}const hv=[],QP=!0,bd=!1,WP="skip";function pv(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Zo(i),l=r?-1:1;a(e,void 0,[])();function a(o,u,c){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(o.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=hv,m,y,_;if((!t||s(o,u,c[c.length-1]||void 0))&&(h=GP(n(o,c)),h[0]===bd))return h;if("children"in o&&o.children){const g=o;if(g.children&&h[0]!==WP)for(y=(r?g.children.length:-1)+l,_=c.concat(g);y>-1&&y<g.children.length;){const x=g.children[y];if(m=a(x,y,_)(),m[0]===bd)return m;y=typeof m[1]=="number"?m[1]:y+l}}return h}}}function GP(e){return Array.isArray(e)?e:typeof e=="number"?[QP,e]:e==null?hv:[e]}function nh(e,t,n,r){let i,s,l;typeof t=="function"&&typeof n!="function"?(s=void 0,l=t,i=n):(s=t,l=n,i=r),pv(e,s,a,i);function a(o,u){const c=u[u.length-1],d=c?c.children.indexOf(o):void 0;return l(o,d,c)}}const Sd={}.hasOwnProperty,ZP={};function KP(e,t){const n=t||ZP,r=new Map,i=new Map,s=new Map,l={...LP,...n.handlers},a={all:u,applyData:YP,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:l,one:o,options:n,patch:XP,wrap:eT};return nh(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=c.type==="definition"?r:i,p=String(c.identifier).toUpperCase();d.has(p)||d.set(p,c)}}),a;function o(c,d){const p=c.type,h=a.handlers[p];if(Sd.call(a.handlers,p)&&h)return h(a,c,d);if(a.options.passThrough&&a.options.passThrough.includes(p)){if("children"in c){const{children:y,..._}=c,g=mo(_);return g.children=a.all(c),g}return mo(c)}return(a.options.unknownHandler||JP)(a,c,d)}function u(c){const d=[];if("children"in c){const p=c.children;let h=-1;for(;++h<p.length;){const m=a.one(p[h],c);if(m){if(h&&p[h-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Km(m.value)),!Array.isArray(m)&&m.type==="element")){const y=m.children[0];y&&y.type==="text"&&(y.value=Km(y.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function XP(e,t){e.position&&(t.position=M2(e))}function YP(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&s&&Object.assign(n.properties,mo(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function JP(e,t){const n=t.data||{},r="value"in t&&!(Sd.call(n,"hProperties")||Sd.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function eT(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
180
+ `});++r<e.length;)r&&n.push({type:"text",value:`
181
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
182
+ `}),n}function Km(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Xm(e,t){const n=KP(e,t),r=n.one(e,void 0),i=zP(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
183
+ `},i),s}function tT(e,t){return e&&"run"in e?async function(n,r){const i=Xm(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Xm(n,{file:r,...e||t})}}function Ym(e){if(e)throw e}var Ra=Object.prototype.hasOwnProperty,mv=Object.prototype.toString,Jm=Object.defineProperty,eg=Object.getOwnPropertyDescriptor,tg=function(t){return typeof Array.isArray=="function"?Array.isArray(t):mv.call(t)==="[object Array]"},ng=function(t){if(!t||mv.call(t)!=="[object Object]")return!1;var n=Ra.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ra.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ra.call(t,i)},rg=function(t,n){Jm&&n.name==="__proto__"?Jm(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},ig=function(t,n){if(n==="__proto__")if(Ra.call(t,n)){if(eg)return eg(t,n).value}else return;return t[n]},nT=function e(){var t,n,r,i,s,l,a=arguments[0],o=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},o=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});o<u;++o)if(t=arguments[o],t!=null)for(n in t)r=ig(a,n),i=ig(t,n),a!==i&&(c&&i&&(ng(i)||(s=tg(i)))?(s?(s=!1,l=r&&tg(r)?r:[]):l=r&&ng(r)?r:{},rg(a,{name:n,newValue:e(c,l,i)})):typeof i<"u"&&rg(a,{name:n,newValue:i}));return a};const Mu=yo(nT);function Ed(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function rT(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(o,...u){const c=e[++s];let d=-1;if(o){l(o);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,c?iT(c,a)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function iT(e,t){let n;return r;function r(...l){const a=e.length>l.length;let o;a&&l.push(i);try{o=e.apply(this,l)}catch(u){const c=u;if(a&&n)throw c;return i(c)}a||(o&&o.then&&typeof o.then=="function"?o.then(s,i):o instanceof Error?i(o):s(o))}function i(l,...a){n||(n=!0,t(l,...a))}function s(l){i(null,l)}}const ln={basename:sT,dirname:lT,extname:aT,join:oT,sep:"/"};function sT(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ol(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else l<0&&(s=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function lT(e){if(Ol(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function aT(e){Ol(e);let t=e.length,n=-1,r=0,i=-1,s=0,l;for(;t--;){const a=e.codePointAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function oT(...e){let t=-1,n;for(;++t<e.length;)Ol(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":uT(n)}function uT(e){Ol(e);const t=e.codePointAt(0)===47;let n=cT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function cT(e,t){let n="",r=0,i=-1,s=0,l=-1,a,o;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||s===1))if(i!==l-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=l,s=0;continue}}else if(n.length>0){n="",r=0,i=l,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,s=0}else a===46&&s>-1?s++:s=-1}return n}function Ol(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const dT={cwd:fT};function fT(){return"/"}function Cd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function hT(e){if(typeof e=="string")e=new URL(e);else if(!Cd(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return pT(e)}function pT(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const zu=["history","path","basename","stem","extname","dirname"];class gv{constructor(t){let n;t?Cd(t)?n={path:t}:typeof t=="string"||mT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":dT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<zu.length;){const s=zu[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)zu.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ln.basename(this.path):void 0}set basename(t){Bu(t,"basename"),Uu(t,"basename"),this.path=ln.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ln.dirname(this.path):void 0}set dirname(t){sg(this.basename,"dirname"),this.path=ln.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ln.extname(this.path):void 0}set extname(t){if(Uu(t,"extname"),sg(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ln.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Cd(t)&&(t=hT(t)),Bu(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ln.basename(this.path,this.extname):void 0}set stem(t){Bu(t,"stem"),Uu(t,"stem"),this.path=ln.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Je(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Uu(e,t){if(e&&e.includes(ln.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ln.sep+"`")}function Bu(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function sg(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function mT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const gT=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},yT={}.hasOwnProperty;class rh extends gT{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=rT()}copy(){const t=new rh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Mu(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(qu("data",this.frozen),this.namespace[t]=n,this):yT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(qu("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=da(t),r=this.parser||this.Parser;return Vu("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Vu("process",this.parser||this.Parser),Hu("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,l){const a=da(t),o=r.parse(a);r.run(o,a,function(c,d,p){if(c||!d||!p)return u(c);const h=d,m=r.stringify(h,p);kT(m)?p.value=m:p.result=m,u(c,p)});function u(c,d){c||!d?l(c):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Vu("processSync",this.parser||this.Parser),Hu("processSync",this.compiler||this.Compiler),this.process(t,i),ag("processSync","process",n),r;function i(s,l){n=!0,Ym(s),r=l}}run(t,n,r){lg(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(l,a){const o=da(n);i.run(t,o,u);function u(c,d,p){const h=d||t;c?a(c):l?l(h):r(void 0,h,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),ag("runSync","run",r),i;function s(l,a){Ym(l),i=a,r=!0}}stringify(t,n){this.freeze();const r=da(n),i=this.compiler||this.Compiler;return Hu("stringify",i),lg(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(qu("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")o(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;o(c,d)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=Mu(!0,i.settings,u.settings))}function a(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];s(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function o(u,c){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===u){p=d;break}if(p===-1)r.push([u,...c]);else if(c.length>0){let[h,...m]=c;const y=r[p][1];Ed(y)&&Ed(h)&&(h=Mu(!0,y,h)),r[p]=[u,h,...m]}}}}const xT=new rh().freeze();function Vu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Hu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function qu(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function lg(e){if(!Ed(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ag(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function da(e){return vT(e)?e:new gv(e)}function vT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function kT(e){return typeof e=="string"||wT(e)}function wT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bT="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",og=[],ug={allowDangerousHtml:!0},ST=/^(https?|ircs?|mailto|xmpp)$/i,ET=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function cg(e){const t=CT(e),n=_T(e);return NT(t.runSync(t.parse(n),n),e)}function CT(e){const t=e.rehypePlugins||og,n=e.remarkPlugins||og,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ug}:ug;return xT().use(aP).use(n).use(tT,r).use(t)}function _T(e){const t=e.children||"",n=new gv;return typeof t=="string"&&(n.value=t),n}function NT(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,o=t.urlTransform||jT;for(const c of ET)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+bT+c.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),nh(e,u),H2(e,{Fragment:f.Fragment,components:i,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function u(c,d,p){if(c.type==="raw"&&p&&typeof d=="number")return l?p.children.splice(d,1):p.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let h;for(h in Du)if(Object.hasOwn(Du,h)&&Object.hasOwn(c.properties,h)){const m=c.properties[h],y=Du[h];(y===null||y.includes(c.tagName))&&(c.properties[h]=o(String(m||""),h,c))}}if(c.type==="element"){let h=n?!n.includes(c.tagName):s?s.includes(c.tagName):!1;if(!h&&r&&typeof d=="number"&&(h=!r(c,d,p)),h&&p&&typeof d=="number")return a&&c.children?p.children.splice(d,1,...c.children):p.children.splice(d,1),d}}}function jT(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||ST.test(e.slice(0,t))?e:""}function dg(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function RT(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function PT(e,t,n){const i=Zo((n||{}).ignore||[]),s=TT(t);let l=-1;for(;++l<s.length;)pv(e,"text",a);function a(u,c){let d=-1,p;for(;++d<c.length;){const h=c[d],m=p?p.children:void 0;if(i(h,m?m.indexOf(h):void 0,p))return;p=h}if(p)return o(u,c)}function o(u,c){const d=c[c.length-1],p=s[l][0],h=s[l][1];let m=0;const _=d.children.indexOf(u);let g=!1,x=[];p.lastIndex=0;let v=p.exec(u.value);for(;v;){const w=v.index,j={index:v.index,input:v.input,stack:[...c,u]};let N=h(...v,j);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?p.lastIndex=w+1:(m!==w&&x.push({type:"text",value:u.value.slice(m,w)}),Array.isArray(N)?x.push(...N):N&&x.push(N),m=w+v[0].length,g=!0),!p.global)break;v=p.exec(u.value)}return g?(m<u.value.length&&x.push({type:"text",value:u.value.slice(m)}),d.children.splice(_,1,...x)):x=[u],_+x.length}}function TT(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([IT(i[0]),LT(i[1])])}return t}function IT(e){return typeof e=="string"?new RegExp(RT(e),"g"):e}function LT(e){return typeof e=="function"?e:function(){return e}}const Qu="phrasing",Wu=["autolink","link","image","label"];function AT(){return{transforms:[UT],enter:{literalAutolink:DT,literalAutolinkEmail:Gu,literalAutolinkHttp:Gu,literalAutolinkWww:Gu},exit:{literalAutolink:zT,literalAutolinkEmail:MT,literalAutolinkHttp:FT,literalAutolinkWww:$T}}}function OT(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Qu,notInConstruct:Wu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Qu,notInConstruct:Wu},{character:":",before:"[ps]",after:"\\/",inConstruct:Qu,notInConstruct:Wu}]}}function DT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Gu(e){this.config.enter.autolinkProtocol.call(this,e)}function FT(e){this.config.exit.autolinkProtocol.call(this,e)}function $T(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function MT(e){this.config.exit.autolinkEmail.call(this,e)}function zT(e){this.exit(e)}function UT(e){PT(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,BT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),VT]],{ignore:["link","linkReference"]})}function BT(e,t,n,r,i){let s="";if(!yv(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!HT(n)))return!1;const l=qT(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:s+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function VT(e,t,n,r){return!yv(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function HT(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function qT(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=dg(e,"(");let s=dg(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function yv(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ii(n)||Qo(n))&&(!t||n!==47)}xv.peek=eI;function QT(){this.buffer()}function WT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function GT(){this.buffer()}function ZT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function KT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Kt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function XT(e){this.exit(e)}function YT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Kt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function JT(e){this.exit(e)}function eI(){return"["}function xv(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),a(),l(),s+=i.move("]"),s}function tI(){return{enter:{gfmFootnoteCallString:QT,gfmFootnoteCall:WT,gfmFootnoteDefinitionLabelString:GT,gfmFootnoteDefinition:ZT},exit:{gfmFootnoteCallString:KT,gfmFootnoteCall:XT,gfmFootnoteDefinitionLabelString:YT,gfmFootnoteDefinition:JT}}}function nI(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:xv},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,l){const a=s.createTracker(l);let o=a.move("[^");const u=s.enter("footnoteDefinition"),c=s.enter("label");return o+=a.move(s.safe(s.associationId(r),{before:o,after:"]"})),c(),o+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),o+=a.move((t?`
184
+ `:" ")+s.indentLines(s.containerFlow(r,a.current()),t?vv:rI))),u(),o}}function rI(e,t,n){return t===0?e:vv(e,t,n)}function vv(e,t,n){return(n?"":" ")+e}const iI=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];kv.peek=uI;function sI(){return{canContainEols:["delete"],enter:{strikethrough:aI},exit:{strikethrough:oI}}}function lI(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:iI}],handlers:{delete:kv}}}function aI(e){this.enter({type:"delete",children:[]},e)}function oI(e){this.exit(e)}function kv(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),s(),l}function uI(){return"~"}function cI(e){return e.length}function dI(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||cI,s=[],l=[],a=[],o=[];let u=0,c=-1;for(;++c<e.length;){const y=[],_=[];let g=-1;for(e[c].length>u&&(u=e[c].length);++g<e[c].length;){const x=fI(e[c][g]);if(n.alignDelimiters!==!1){const v=i(x);_[g]=v,(o[g]===void 0||v>o[g])&&(o[g]=v)}y.push(x)}l[c]=y,a[c]=_}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)s[d]=fg(r[d]);else{const y=fg(r);for(;++d<u;)s[d]=y}d=-1;const p=[],h=[];for(;++d<u;){const y=s[d];let _="",g="";y===99?(_=":",g=":"):y===108?_=":":y===114&&(g=":");let x=n.alignDelimiters===!1?1:Math.max(1,o[d]-_.length-g.length);const v=_+"-".repeat(x)+g;n.alignDelimiters!==!1&&(x=_.length+x+g.length,x>o[d]&&(o[d]=x),h[d]=x),p[d]=v}l.splice(1,0,p),a.splice(1,0,h),c=-1;const m=[];for(;++c<l.length;){const y=l[c],_=a[c];d=-1;const g=[];for(;++d<u;){const x=y[d]||"";let v="",w="";if(n.alignDelimiters!==!1){const j=o[d]-(_[d]||0),N=s[d];N===114?v=" ".repeat(j):N===99?j%2?(v=" ".repeat(j/2+.5),w=" ".repeat(j/2-.5)):(v=" ".repeat(j/2),w=v):w=" ".repeat(j)}n.delimiterStart!==!1&&!d&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&x==="")&&(n.delimiterStart!==!1||d)&&g.push(" "),n.alignDelimiters!==!1&&g.push(v),g.push(x),n.alignDelimiters!==!1&&g.push(w),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||d!==u-1)&&g.push("|")}m.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return m.join(`
185
+ `)}function fI(e){return e==null?"":String(e)}function fg(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function hI(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const l=n.indentLines(n.containerFlow(e,s.current()),pI);return i(),l}function pI(e,t,n){return">"+(n?"":" ")+e}function mI(e,t){return hg(e,t.inConstruct,!0)&&!hg(e,t.notInConstruct,!1)}function hg(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function pg(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
186
+ `&&mI(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
187
+ `}function gI(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>l&&(l=s):s=1,i=r+t.length,r=n.indexOf(t,i);return l}function yI(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function xI(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function vI(e,t,n,r){const i=xI(n),s=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(yI(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(s,kI);return d(),p}const a=n.createTracker(r),o=i.repeat(Math.max(gI(s,i)+1,3)),u=n.enter("codeFenced");let c=a.move(o);if(e.lang){const d=n.enter(`codeFencedLang${l}`);c+=a.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...a.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${l}`);c+=a.move(" "),c+=a.move(n.safe(e.meta,{before:c,after:`
188
+ `,encode:["`"],...a.current()})),d()}return c+=a.move(`
189
+ `),s&&(c+=a.move(s+`
190
+ `)),c+=a.move(o),u(),c}function kI(e,t,n){return(n?"":" ")+e}function ih(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function wI(e,t,n,r){const i=ih(n),s=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const o=n.createTracker(r);let u=o.move("[");return u+=o.move(n.safe(n.associationId(e),{before:u,after:"]",...o.current()})),u+=o.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(a=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":`
191
+ `,...o.current()}))),a(),e.title&&(a=n.enter(`title${s}`),u+=o.move(" "+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),a()),l(),u}function bI(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function gl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function go(e,t,n){const r=ss(e),i=ss(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}wv.peek=SI;function wv(e,t,n,r){const i=bI(n),s=n.enter("emphasis"),l=n.createTracker(r),a=l.move(i);let o=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=o.charCodeAt(0),c=go(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(o=gl(u)+o.slice(1));const d=o.charCodeAt(o.length-1),p=go(r.after.charCodeAt(0),d,i);p.inside&&(o=o.slice(0,-1)+gl(d));const h=l.move(i);return s(),n.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},a+o+h}function SI(e,t,n){return n.options.emphasis||"*"}function EI(e,t){let n=!1;return nh(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,bd}),!!((!e.depth||e.depth<3)&&Zf(e)&&(t.options.setext||n))}function CI(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(EI(e,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),p=n.containerPhrasing(e,{...s.current(),before:`
192
+ `,after:`
193
+ `});return d(),c(),p+`
194
+ `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
195
+ `))+1))}const l="#".repeat(i),a=n.enter("headingAtx"),o=n.enter("phrasing");s.move(l+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
196
+ `,...s.current()});return/^[\t ]/.test(u)&&(u=gl(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,n.options.closeAtx&&(u+=" "+l),o(),a(),u}bv.peek=_I;function bv(e){return e.value||""}function _I(){return"<"}Sv.peek=NI;function Sv(e,t,n,r){const i=ih(n),s=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const o=n.createTracker(r);let u=o.move("![");return u+=o.move(n.safe(e.alt,{before:u,after:"]",...o.current()})),u+=o.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(a=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),a(),e.title&&(a=n.enter(`title${s}`),u+=o.move(" "+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),a()),u+=o.move(")"),l(),u}function NI(){return"!"}Ev.peek=jI;function Ev(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let o=a.move("![");const u=n.safe(e.alt,{before:o,after:"]",...a.current()});o+=a.move(u+"]["),l();const c=n.stack;n.stack=[],l=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...a.current()});return l(),n.stack=c,s(),i==="full"||!u||u!==d?o+=a.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=a.move("]"),o}function jI(){return"!"}Cv.peek=RI;function Cv(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const l=n.unsafe[s],a=n.compilePattern(l);let o;if(l.atBreak)for(;o=a.exec(r);){let u=o.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(o.index+1)}}return i+r+i}function RI(){return"`"}function _v(e,t){const n=Zf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Nv.peek=PI;function Nv(e,t,n,r){const i=ih(n),s=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let a,o;if(_v(e,n)){const c=n.stack;n.stack=[],a=n.enter("autolink");let d=l.move("<");return d+=l.move(n.containerPhrasing(e,{before:d,after:">",...l.current()})),d+=l.move(">"),a(),n.stack=c,d}a=n.enter("link"),o=n.enter("label");let u=l.move("[");return u+=l.move(n.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),u+=l.move(")"),a(),u}function PI(e,t,n){return _v(e,n)?"<":"["}jv.peek=TI;function jv(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let o=a.move("[");const u=n.containerPhrasing(e,{before:o,after:"]",...a.current()});o+=a.move(u+"]["),l();const c=n.stack;n.stack=[],l=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...a.current()});return l(),n.stack=c,s(),i==="full"||!u||u!==d?o+=a.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=a.move("]"),o}function TI(){return"["}function sh(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function II(e){const t=sh(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function LI(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Rv(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function AI(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let l=e.ordered?LI(n):sh(n);const a=e.ordered?l==="."?")":".":II(n);let o=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(o=!0),Rv(n)===l&&c){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(l=a),n.bulletCurrent=l;const u=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=s,i(),u}function OI(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function DI(e,t,n,r){const i=OI(n);let s=n.bulletCurrent||sh(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let l=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(s+" ".repeat(l-s.length)),a.shift(l);const o=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),c);return o(),u;function c(d,p,h){return p?(h?"":" ".repeat(l))+d:(h?s:s+" ".repeat(l-s.length))+d}}function FI(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),l=n.containerPhrasing(e,r);return s(),i(),l}const $I=Zo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function MI(e,t,n,r){return(e.children.some(function(l){return $I(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function zI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Pv.peek=UI;function Pv(e,t,n,r){const i=zI(n),s=n.enter("strong"),l=n.createTracker(r),a=l.move(i+i);let o=l.move(n.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=o.charCodeAt(0),c=go(r.before.charCodeAt(r.before.length-1),u,i);c.inside&&(o=gl(u)+o.slice(1));const d=o.charCodeAt(o.length-1),p=go(r.after.charCodeAt(0),d,i);p.inside&&(o=o.slice(0,-1)+gl(d));const h=l.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},a+o+h}function UI(e,t,n){return n.options.strong||"*"}function BI(e,t,n,r){return n.safe(e.value,r)}function VI(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function HI(e,t,n){const r=(Rv(n)+(n.options.ruleSpaces?" ":"")).repeat(VI(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Tv={blockquote:hI,break:pg,code:vI,definition:wI,emphasis:wv,hardBreak:pg,heading:CI,html:bv,image:Sv,imageReference:Ev,inlineCode:Cv,link:Nv,linkReference:jv,list:AI,listItem:DI,paragraph:FI,root:MI,strong:Pv,text:BI,thematicBreak:HI};function qI(){return{enter:{table:QI,tableData:mg,tableHeader:mg,tableRow:GI},exit:{codeText:ZI,table:WI,tableData:Zu,tableHeader:Zu,tableRow:Zu}}}function QI(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function WI(e){this.exit(e),this.data.inTable=void 0}function GI(e){this.enter({type:"tableRow",children:[]},e)}function Zu(e){this.exit(e)}function mg(e){this.enter({type:"tableCell",children:[]},e)}function ZI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,KI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function KI(e,t){return t==="|"?t:e}function XI(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
197
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:l,tableCell:o,tableRow:a}};function l(h,m,y,_){return u(c(h,y,_),h.align)}function a(h,m,y,_){const g=d(h,y,_),x=u([g]);return x.slice(0,x.indexOf(`
198
+ `))}function o(h,m,y,_){const g=y.enter("tableCell"),x=y.enter("phrasing"),v=y.containerPhrasing(h,{..._,before:s,after:s});return x(),g(),v}function u(h,m){return dI(h,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(h,m,y){const _=h.children;let g=-1;const x=[],v=m.enter("table");for(;++g<_.length;)x[g]=d(_[g],m,y);return v(),x}function d(h,m,y){const _=h.children;let g=-1;const x=[],v=m.enter("tableRow");for(;++g<_.length;)x[g]=o(_[g],h,m,y);return v(),x}function p(h,m,y){let _=Tv.inlineCode(h,m,y);return y.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function YI(){return{exit:{taskListCheckValueChecked:gg,taskListCheckValueUnchecked:gg,paragraph:e4}}}function JI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:t4}}}function gg(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function e4(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,l;for(;++s<i.length;){const a=i[s];if(a.type==="paragraph"){l=a;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function t4(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);s&&a.move(l);let o=Tv.listItem(e,t,n,{...r,...a.current()});return s&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),o;function u(c){return c+l}}function n4(){return[AT(),tI(),sI(),qI(),YI()]}function r4(e){return{extensions:[OT(),nI(e),lI(),XI(e),JI()]}}const i4={tokenize:c4,partial:!0},Iv={tokenize:d4,partial:!0},Lv={tokenize:f4,partial:!0},Av={tokenize:h4,partial:!0},s4={tokenize:p4,partial:!0},Ov={name:"wwwAutolink",tokenize:o4,previous:Fv},Dv={name:"protocolAutolink",tokenize:u4,previous:$v},Vn={name:"emailAutolink",tokenize:a4,previous:Mv},xn={};function l4(){return{text:xn}}let Pr=48;for(;Pr<123;)xn[Pr]=Vn,Pr++,Pr===58?Pr=65:Pr===91&&(Pr=97);xn[43]=Vn;xn[45]=Vn;xn[46]=Vn;xn[95]=Vn;xn[72]=[Vn,Dv];xn[104]=[Vn,Dv];xn[87]=[Vn,Ov];xn[119]=[Vn,Ov];function a4(e,t,n){const r=this;let i,s;return l;function l(d){return!_d(d)||!Mv.call(r,r.previous)||lh(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return _d(d)?(e.consume(d),a):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(s4,c,u)(d):d===45||d===95||Xe(d)?(s=!0,e.consume(d),o):c(d)}function u(d){return e.consume(d),i=!0,o}function c(d){return s&&i&&it(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function o4(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!Fv.call(r,r.previous)||lh(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(i4,e.attempt(Iv,e.attempt(Lv,s),n),n)(l))}function s(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function u4(e,t,n){const r=this;let i="",s=!1;return l;function l(d){return(d===72||d===104)&&$v.call(r,r.previous)&&!lh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),a):n(d)}function a(d){if(it(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),a;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),s?u:(s=!0,o)):n(d)}function u(d){return d===null||ho(d)||we(d)||ii(d)||Qo(d)?n(d):e.attempt(Iv,e.attempt(Lv,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function c4(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),s):n(l)}function s(l){return l===null?n(l):t(l)}}function d4(e,t,n){let r,i,s;return l;function l(u){return u===46||u===95?e.check(Av,o,a)(u):u===null||we(u)||ii(u)||u!==45&&Qo(u)?o(u):(s=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function o(u){return i||r||!s?n(u):t(u)}}function f4(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?s(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(Av,t,s)(l):l===null||we(l)||ii(l)?t(l):(e.consume(l),i)}function s(l){return l===41&&r++,e.consume(l),i}}function h4(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),s):a===93?(e.consume(a),i):a===60||a===null||we(a)||ii(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||we(a)||ii(a)?t(a):r(a)}function s(a){return it(a)?l(a):n(a)}function l(a){return a===59?(e.consume(a),r):it(a)?(e.consume(a),l):n(a)}}function p4(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return Xe(s)?n(s):t(s)}}function Fv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||we(e)}function $v(e){return!it(e)}function Mv(e){return!(e===47||_d(e))}function _d(e){return e===43||e===45||e===46||e===95||Xe(e)}function lh(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const m4={tokenize:S4,partial:!0};function g4(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:k4,continuation:{tokenize:w4},exit:b4}},text:{91:{name:"gfmFootnoteCall",tokenize:v4},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:y4,resolveTo:x4}}}}function y4(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){l=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return a;function a(o){if(!l||!l._balanced)return n(o);const u=Kt(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function x4(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function v4(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,l;return a;function a(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(s>999||d===93&&!l||d===null||d===91||we(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(Kt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return we(d)||(l=!0),s++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),s++,u):u(d)}}function k4(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,l=0,a;return o;function o(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(l>999||m===93&&!a||m===null||m===91||we(m))return n(m);if(m===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return s=Kt(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return we(m)||(a=!0),l++,e.consume(m),m===92?d:c}function d(m){return m===91||m===92||m===93?(e.consume(m),l++,c):c(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(s)||i.push(s),fe(e,h,"gfmFootnoteDefinitionWhitespace")):n(m)}function h(m){return t(m)}}function w4(e,t,n){return e.check(Al,t,e.attempt(m4,t,n))}function b4(e){e.exit("gfmFootnoteDefinition")}function S4(e,t,n){const r=this;return fe(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(s):n(s)}}function E4(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let o=-1;for(;++o<l.length;)if(l[o][0]==="enter"&&l[o][1].type==="strikethroughSequenceTemporary"&&l[o][1]._close){let u=o;for(;u--;)if(l[u][0]==="exit"&&l[u][1].type==="strikethroughSequenceTemporary"&&l[u][1]._open&&l[o][1].end.offset-l[o][1].start.offset===l[u][1].end.offset-l[u][1].start.offset){l[o][1].type="strikethroughSequence",l[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},l[u][1].start),end:Object.assign({},l[o][1].end)},d={type:"strikethroughText",start:Object.assign({},l[u][1].end),end:Object.assign({},l[o][1].start)},p=[["enter",c,a],["enter",l[u][1],a],["exit",l[u][1],a],["enter",d,a]],h=a.parser.constructs.insideSpan.null;h&&_t(p,p.length,0,Wo(h,l.slice(u+1,o),a)),_t(p,p.length,0,[["exit",d,a],["enter",l[o][1],a],["exit",l[o][1],a],["exit",c,a]]),_t(l,u-1,o-u+3,p),o=u+p.length-2;break}}for(o=-1;++o<l.length;)l[o][1].type==="strikethroughSequenceTemporary"&&(l[o][1].type="data");return l}function s(l,a,o){const u=this.previous,c=this.events;let d=0;return p;function p(m){return u===126&&c[c.length-1][1].type!=="characterEscape"?o(m):(l.enter("strikethroughSequenceTemporary"),h(m))}function h(m){const y=ss(u);if(m===126)return d>1?o(m):(l.consume(m),d++,h);if(d<2&&!n)return o(m);const _=l.exit("strikethroughSequenceTemporary"),g=ss(m);return _._open=!g||g===2&&!!y,_._close=!y||y===2&&!!g,a(m)}}}class C4{constructor(){this.map=[]}add(t,n,r){_4(this,t,n,r)}consume(t){if(this.map.sort(function(s,l){return s[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function _4(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function N4(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function j4(){return{flow:{null:{name:"table",tokenize:R4,resolveAll:P4}}}}function R4(e,t,n){const r=this;let i=0,s=0,l;return a;function a(b){let D=r.events.length-1;for(;D>-1;){const F=r.events[D][1].type;if(F==="lineEnding"||F==="linePrefix")D--;else break}const U=D>-1?r.events[D][1].type:null,ee=U==="tableHead"||U==="tableRow"?N:o;return ee===N&&r.parser.lazy[r.now().line]?n(b):ee(b)}function o(b){return e.enter("tableHead"),e.enter("tableRow"),u(b)}function u(b){return b===124||(l=!0,s+=1),c(b)}function c(b){return b===null?n(b):J(b)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h):n(b):ae(b)?fe(e,c,"whitespace")(b):(s+=1,l&&(l=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),l=!0,c):(e.enter("data"),d(b)))}function d(b){return b===null||b===124||we(b)?(e.exit("data"),c(b)):(e.consume(b),b===92?p:d)}function p(b){return b===92||b===124?(e.consume(b),d):d(b)}function h(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(b):(e.enter("tableDelimiterRow"),l=!1,ae(b)?fe(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):m(b))}function m(b){return b===45||b===58?_(b):b===124?(l=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),y):j(b)}function y(b){return ae(b)?fe(e,_,"whitespace")(b):_(b)}function _(b){return b===58?(s+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),g):b===45?(s+=1,g(b)):b===null||J(b)?w(b):j(b)}function g(b){return b===45?(e.enter("tableDelimiterFiller"),x(b)):j(b)}function x(b){return b===45?(e.consume(b),x):b===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(b))}function v(b){return ae(b)?fe(e,w,"whitespace")(b):w(b)}function w(b){return b===124?m(b):b===null||J(b)?!l||i!==s?j(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):j(b)}function j(b){return n(b)}function N(b){return e.enter("tableRow"),T(b)}function T(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),T):b===null||J(b)?(e.exit("tableRow"),t(b)):ae(b)?fe(e,T,"whitespace")(b):(e.enter("data"),A(b))}function A(b){return b===null||b===124||we(b)?(e.exit("data"),T(b)):(e.consume(b),b===92?L:A)}function L(b){return b===92||b===124?(e.consume(b),A):A(b)}}function P4(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],l=[0,0,0,0],a=!1,o=0,u,c,d;const p=new C4;for(;++n<e.length;){const h=e[n],m=h[1];h[0]==="enter"?m.type==="tableHead"?(a=!1,o!==0&&(yg(p,t,o,u,c),c=void 0,o=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],l=[0,n+1,0,0],a&&(a=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(s[1]!==0&&(l[0]=l[1],d=fa(p,t,s,i,void 0,d),s=[0,0,0,0]),l[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(l[0]=l[1],d=fa(p,t,s,i,void 0,d)),s=l,l=[s[1],n,0,0])):m.type==="tableHead"?(a=!0,o=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(o=n,s[1]!==0?(l[0]=l[1],d=fa(p,t,s,i,n,d)):l[1]!==0&&(d=fa(p,t,l,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(l[3]=n)}for(o!==0&&yg(p,t,o,u,c),p.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=N4(t.events,n))}return e}function fa(e,t,n,r,i,s){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(s.end=Object.assign({},pi(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const o=pi(t.events,n[1]);if(s={type:l,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const u=pi(t.events,n[2]),c=pi(t.events,n[3]),d={type:a,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],h=t.events[n[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,y=n[3]-n[2]-1;e.add(m,y,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(s.end=Object.assign({},pi(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function yg(e,t,n,r,i){const s=[],l=pi(t.events,n);i&&(i.end=Object.assign({},l),s.push(["exit",i,t])),r.end=Object.assign({},l),s.push(["exit",r,t]),e.add(n+1,0,s)}function pi(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const T4={name:"tasklistCheck",tokenize:L4};function I4(){return{text:{91:T4}}}function L4(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),s)}function s(o){return we(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),l):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),l):n(o)}function l(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(o)}function a(o){return J(o)?t(o):ae(o)?e.check({tokenize:A4},t,n)(o):n(o)}}function A4(e,t,n){return fe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function O4(e){return Z0([l4(),g4(),E4(e),j4(),I4()])}const D4={};function xg(e){const t=this,n=e||D4,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(O4(n)),s.push(n4()),l.push(r4(n))}const F4="composer_proxy_admin_token";function $4(){return typeof window<"u"?localStorage.getItem(F4):null}function M4({distUrl:e,version:t}){const[n,r]=C.useState(!1),[i,s]=C.useState(null),l=async a=>{a.stopPropagation(),r(!0),s(null);try{const o=$4(),u={};o&&(u.Authorization=`Bearer ${o}`);const c=await fetch(e,{headers:u});if(!c.ok)throw new Error(`Download failed: ${c.status} ${c.statusText}`);const d=await c.blob(),p=window.URL.createObjectURL(d),h=document.createElement("a");h.href=p,h.download=e.split("/").pop()||"package.zip",document.body.appendChild(h),h.click(),document.body.removeChild(h),window.URL.revokeObjectURL(p)}catch(o){s(o instanceof Error?o.message:"Download failed")}finally{r(!1)}};return i?f.jsxs("div",{className:"flex flex-col items-end gap-1",children:[f.jsx("button",{onClick:l,className:"text-red-400 hover:text-red-300 text-sm",children:"Retry"}),f.jsx("span",{className:"text-xs text-red-500",children:i})]}):f.jsx("button",{onClick:l,disabled:n,className:"btn-primary text-sm disabled:opacity-50 disabled:cursor-not-allowed",children:n?"Downloading...":`Download ${t}`})}function z4({text:e,label:t}){const[n,r]=C.useState(!1),i=async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)}catch(s){console.error("Failed to copy:",s)}};return f.jsx("button",{onClick:i,className:"px-3 py-1.5 bg-slate-800 hover:bg-slate-700 border border-slate-700 rounded-lg text-sm text-slate-300 hover:text-slate-100 transition-colors flex items-center gap-2",title:n?"Copied!":`Copy ${t||"command"}`,children:n?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:"✓"}),f.jsx("span",{children:"Copied!"})]}):f.jsxs(f.Fragment,{children:[f.jsx("span",{children:"📋"}),f.jsx("span",{children:"Copy"})]})})}function U4(){const{vendor:e,package:t}=Xx(),n=yn(),r=e&&t?`${e}/${t}`:null,i=()=>{const L=n.hash;return L.startsWith("#version--")?L.replace("#version--",""):null},[s,l]=C.useState(i()),[a,o]=C.useState(!1),[u,c]=C.useState(!1);C.useEffect(()=>{const L=i();L!==s&&l(L)},[n.hash]);const d=L=>{l(L),window.location.hash=`version--${L}`},{data:p,isLoading:h}=Et({queryKey:["package",r],queryFn:()=>eE(r),enabled:!!r}),m=C.useMemo(()=>p!=null&&p.versions?[...p.versions].sort((L,b)=>{const D=/^\d+$/.test(L.version),U=/^\d+$/.test(b.version);if(D&&U){const B=parseInt(L.version,10);return parseInt(b.version,10)-B}if(D&&!U&&dn.valid(b.version))return 1;if(!D&&U&&dn.valid(L.version))return-1;const ee=dn.valid(L.version),F=dn.valid(b.version);if(ee&&F)return dn.rcompare(L.version,b.version);if(ee&&!F)return-1;if(!ee&&F)return 1;const I=L.version.match(/^(\d+)/),q=b.version.match(/^(\d+)/);if(I&&q){const B=parseInt(I[1],10),R=parseInt(q[1],10);if(B!==R)return R-B}return b.version.localeCompare(L.version,void 0,{numeric:!0,sensitivity:"base"})}):[],[p]),y=C.useMemo(()=>m.length?s&&m.find(L=>L.version===s)||m[0]:null,[m,s]),{data:_,isLoading:g}=Et({queryKey:["readme",r,y==null?void 0:y.version],queryFn:()=>tE(r,y.version),enabled:!!r&&!!y}),x=C.useMemo(()=>!m.length||!y?!1:y.version===m[0].version,[m,y]),{data:v,isLoading:w}=Et({queryKey:["changelog",r,y==null?void 0:y.version],queryFn:()=>nE(r,y.version),enabled:!!r&&!!y&&x}),{data:j,isLoading:N}=Et({queryKey:["stats",r,y==null?void 0:y.version],queryFn:()=>rE(r,y.version),enabled:!!r&&!!y}),T=L=>{if(!L)return[];try{const b=JSON.parse(L);return Array.isArray(b)?b:[b]}catch{return[L]}};if(h)return f.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:f.jsx("div",{className:"w-8 h-8 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin"})});if(!r)return f.jsxs("div",{className:"card p-8 text-center",children:[f.jsx("p",{className:"text-slate-400",children:"Invalid package name"}),f.jsx(Ji,{to:"/packages",className:"text-primary-400 hover:text-primary-300 mt-4 inline-block",children:"← Back to packages"})]});if(!p||!y)return f.jsxs("div",{className:"card p-8 text-center",children:[f.jsxs("p",{className:"text-slate-400",children:["Package not found: ",r]}),f.jsx(Ji,{to:"/packages",className:"text-primary-400 hover:text-primary-300 mt-4 inline-block",children:"← Back to packages"})]});const A=T(y.license);return f.jsxs("div",{className:"space-y-6",children:[f.jsx("div",{className:"card p-6",children:f.jsx("div",{className:"flex items-start justify-between gap-4",children:f.jsxs("div",{className:"flex-1",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-2 flex-wrap",children:[f.jsx("h1",{className:"font-display text-3xl font-bold text-slate-100",children:p.name}),f.jsx("select",{value:s||y.version,onChange:L=>d(L.target.value),className:"px-3 py-1.5 bg-slate-800 border border-slate-700 rounded-lg text-slate-100 focus:outline-none focus:ring-2 focus:ring-primary-500 text-sm",children:m.map(L=>f.jsx("option",{value:L.version,children:L.version},L.version))})]}),y.description&&f.jsx("p",{className:"text-slate-300 text-lg",children:y.description})]})})}),f.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[f.jsxs("div",{className:"lg:col-span-2",children:[f.jsxs("div",{className:"card p-6",children:[f.jsx("h2",{className:"text-xl font-bold text-slate-100 mb-4",children:"README.md"}),g?f.jsx("div",{className:"flex items-center justify-center py-12",children:f.jsx("div",{className:"w-6 h-6 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin"})}):_?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:`prose prose-invert max-w-none ${a?"":"max-h-[300px] overflow-hidden relative"}`,children:[!a&&f.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-20 bg-gradient-to-t from-slate-900 to-transparent pointer-events-none"}),f.jsx(cg,{remarkPlugins:[xg],className:"markdown-content",components:{a:({node:L,...b})=>f.jsx("a",{...b,className:"text-primary-400 hover:text-primary-300",target:"_blank",rel:"noopener noreferrer"}),code:({node:L,className:b,children:D,...U})=>!b?f.jsx("code",{className:"px-1.5 py-0.5 bg-slate-800 rounded text-sm text-primary-300",...U,children:D}):f.jsx("code",{className:"block p-4 bg-slate-900 rounded-lg overflow-x-auto text-sm",...U,children:D})},children:_})]}),!a&&f.jsx("button",{onClick:()=>o(!0),className:"mt-4 text-primary-400 hover:text-primary-300 text-sm font-medium transition-colors",children:"Expand full README →"}),a&&f.jsx("button",{onClick:()=>o(!1),className:"mt-4 text-primary-400 hover:text-primary-300 text-sm font-medium transition-colors",children:"Collapse README ↑"})]}):f.jsxs("div",{className:"text-center py-12 text-slate-500",children:[f.jsx("p",{className:"mb-2",children:"📄 No README available for this version"}),f.jsx("p",{className:"text-sm text-slate-600",children:"No README file exists in this package version"})]})]}),x&&f.jsxs("div",{className:"card p-6 mt-6",children:[f.jsx("h2",{className:"text-xl font-bold text-slate-100 mb-4",children:"CHANGELOG"}),w?f.jsx("div",{className:"flex items-center justify-center py-12",children:f.jsx("div",{className:"w-6 h-6 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin"})}):v?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:`prose prose-invert max-w-none ${u?"":"max-h-[300px] overflow-hidden relative"}`,children:[!u&&f.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-20 bg-gradient-to-t from-slate-900 to-transparent pointer-events-none"}),f.jsx(cg,{remarkPlugins:[xg],className:"markdown-content",components:{a:({node:L,...b})=>f.jsx("a",{...b,className:"text-primary-400 hover:text-primary-300",target:"_blank",rel:"noopener noreferrer"}),code:({node:L,className:b,children:D,...U})=>!b?f.jsx("code",{className:"px-1.5 py-0.5 bg-slate-800 rounded text-sm text-primary-300",...U,children:D}):f.jsx("code",{className:"block p-4 bg-slate-900 rounded-lg overflow-x-auto text-sm",...U,children:D})},children:v})]}),!u&&f.jsx("button",{onClick:()=>c(!0),className:"mt-4 text-primary-400 hover:text-primary-300 text-sm font-medium transition-colors",children:"Expand full CHANGELOG →"}),u&&f.jsx("button",{onClick:()=>c(!1),className:"mt-4 text-primary-400 hover:text-primary-300 text-sm font-medium transition-colors",children:"Collapse CHANGELOG ↑"})]}):f.jsxs("div",{className:"text-center py-12 text-slate-500",children:[f.jsx("p",{className:"mb-2",children:"📝 No CHANGELOG available"}),f.jsx("p",{className:"text-sm text-slate-600",children:"No CHANGELOG file exists in this package version"})]})]})]}),f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"card p-6",children:[f.jsx("h3",{className:"text-lg font-semibold text-slate-100 mb-4",children:"Get Package"}),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm text-slate-400 mb-2",children:"Install via Composer"}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsxs("code",{className:"flex-1 px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-sm text-primary-300 font-mono break-all",children:["composer require ",p.name,":",y.version]}),f.jsx(z4,{text:`composer require ${p.name}:${y.version}`})]})]}),f.jsx("div",{className:"pt-2 border-t border-slate-700",children:f.jsx(M4,{distUrl:y.dist_url,version:y.version})})]})]}),f.jsxs("div",{className:"card p-6",children:[f.jsx("h3",{className:"text-lg font-semibold text-slate-100 mb-4",children:"About Package"}),f.jsxs("div",{className:"space-y-4",children:[y.package_type&&f.jsxs("div",{children:[f.jsx("span",{className:"text-sm text-slate-400 block mb-1",children:"Type"}),f.jsx("span",{className:"px-3 py-1 text-sm bg-slate-700 text-slate-200 rounded-lg inline-block",children:y.package_type})]}),A.length>0&&f.jsxs("div",{children:[f.jsx("span",{className:"text-sm text-slate-400 block mb-1",children:"License"}),f.jsx("span",{className:"px-3 py-1 text-sm bg-slate-700 text-slate-200 rounded-lg inline-block",children:A.join(", ")})]}),y.homepage&&f.jsxs("div",{children:[f.jsx("span",{className:"text-sm text-slate-400 block mb-1",children:"Homepage"}),f.jsxs("a",{href:y.homepage,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-primary-400 hover:text-primary-300 transition-colors text-sm",children:[f.jsx("span",{children:"🌐"}),f.jsx("span",{children:y.homepage}),f.jsx("span",{className:"text-slate-500",children:"→"})]})]}),f.jsxs("div",{className:"pt-2 border-t border-slate-700 space-y-2",children:[f.jsx("span",{className:"text-sm text-slate-400 block mb-1",children:"Statistics"}),N?f.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-500",children:[f.jsx("div",{className:"w-4 h-4 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin"}),f.jsx("span",{children:"Loading stats..."})]}):j?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"text-sm",children:[f.jsx("span",{className:"text-slate-400",children:"Downloads: "}),f.jsx("span",{className:"text-slate-200 font-medium",children:j.downloads.toLocaleString()})]}),j.lastDownloadedAt?f.jsxs("div",{className:"text-sm",children:[f.jsx("span",{className:"text-slate-400",children:"Last downloaded: "}),f.jsx("span",{className:"text-slate-200",children:new Date(j.lastDownloadedAt*1e3).toLocaleDateString()})]}):f.jsx("div",{className:"text-sm text-slate-500",children:"Never downloaded"})]}):f.jsx("div",{className:"text-sm text-slate-500",children:"No download statistics available"})]})]})]}),f.jsxs("div",{className:"card p-6",children:[f.jsxs("h3",{className:"text-lg font-semibold text-slate-100 mb-4",children:["Versions (",m.length,")"]}),f.jsx("div",{className:"space-y-2 max-h-96 overflow-y-auto",children:m.map(L=>f.jsx("button",{onClick:()=>d(L.version),className:`w-full text-left px-3 py-2 rounded-lg transition-colors ${(s||y.version)===L.version?"bg-primary-500/20 text-primary-400":"bg-slate-800/50 text-slate-300 hover:bg-slate-800"}`,children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"font-medium",children:L.version}),L.released_at&&f.jsx("span",{className:"text-xs text-slate-500",children:new Date(L.released_at*1e3).toLocaleDateString()})]})},L.version))})]})]})]})]})}function B4({onSuccess:e}){const{login:t,authError:n}=fs(),[r,i]=C.useState(""),[s,l]=C.useState(""),[a,o]=C.useState(""),[u,c]=C.useState(null),[d,p]=C.useState(!1),h=async m=>{m.preventDefault(),u!=="2FA required"&&c(null),p(!0);try{const y=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:r,password:s,code:a})}),_=await y.json();y.ok&&_.token?(t(_.token),e()):_.code==="2fa_required"?c("2FA required"):c(_.error||"Invalid credentials")}catch{c("Failed to connect to server")}finally{p(!1)}};return f.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900",children:f.jsx("div",{className:"max-w-md w-full mx-4",children:f.jsxs("div",{className:"bg-slate-800/50 backdrop-blur-sm rounded-2xl shadow-2xl border border-slate-700/50 p-8",children:[f.jsxs("div",{className:"text-center mb-8",children:[f.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-br from-orange-500 to-amber-600 mb-4",children:f.jsx(ni,{className:"w-8 h-8 text-white"})}),f.jsx("h1",{className:"text-2xl font-bold text-white",children:"Composer Proxy"}),f.jsx("p",{className:"text-slate-400 mt-1",children:"Sign in to manage your packages"})]}),f.jsxs("form",{onSubmit:h,className:"space-y-5","data-testid":"login-form",children:[n&&f.jsxs("div",{role:"alert","aria-live":"polite","data-testid":"auth-context-error",className:"bg-red-500/10 border border-red-500/50 rounded-lg p-4 text-red-400 text-sm mb-4",children:["Auth Error: ",n]}),u&&f.jsx("div",{role:"alert","aria-live":"polite","data-testid":"login-error",className:"bg-red-500/10 border border-red-500/50 rounded-lg p-4 text-red-400 text-sm",children:u}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-slate-300 mb-2",children:"Email"}),f.jsx("input",{id:"email",type:"email",value:r,onChange:m=>i(m.target.value),className:"w-full px-4 py-3 bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-transparent transition",placeholder:"admin@example.com",required:!0,"aria-label":"Email address",disabled:d})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-slate-300 mb-2",children:"Password"}),f.jsx("input",{id:"password",type:"password",value:s,onChange:m=>l(m.target.value),className:"w-full px-4 py-3 bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-transparent transition",placeholder:"Enter your password",required:!0,"aria-label":"Password",disabled:d})]}),u==="2FA required"&&f.jsxs("div",{className:"animate-in fade-in slide-in-from-top-2 duration-300",children:[f.jsx("label",{htmlFor:"code",className:"block text-sm font-medium text-slate-300 mb-2",children:"2FA Code"}),f.jsx("input",{id:"code",type:"text",value:a,onChange:m=>o(m.target.value),className:"w-full px-4 py-3 bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-transparent transition",placeholder:"000000",required:!0,autoFocus:!0,maxLength:6,pattern:"\\d{6}","aria-label":"2FA Code",disabled:d})]}),f.jsx("button",{type:"submit",disabled:d||!r||!s||u==="2FA required"&&a.length!==6,className:"w-full py-3 px-4 bg-gradient-to-r from-orange-500 to-amber-600 hover:from-orange-600 hover:to-amber-700 text-white font-semibold rounded-lg shadow-lg shadow-orange-500/25 transition disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Sign in",children:d?"Signing in...":"Sign In"})]})]})})})}function V4(){const{token:e}=Xx(),t=Ef(),[n,r]=C.useState(""),[i,s]=C.useState(""),[l,a]=C.useState(""),[o,u]=C.useState(!1),[c]=zb(),d=c.get("token"),p=e||d,h=async m=>{if(m.preventDefault(),!p){a("Invalid invite link");return}if(n!==i){a("Passwords do not match");return}if(n.length<8){a("Password must be at least 8 characters");return}u(!0),a("");try{await fE(p,n),t("/login",{state:{message:"Password set successfully! Please login."}})}catch(y){a(y.message||"Failed to accept invite")}finally{u(!1)}};return p?f.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900",children:f.jsx("div",{className:"max-w-md w-full mx-4",children:f.jsxs("div",{className:"bg-slate-800/50 backdrop-blur-sm rounded-2xl shadow-2xl border border-slate-700/50 p-8",children:[f.jsxs("div",{className:"text-center mb-8",children:[f.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-br from-orange-500 to-amber-600 mb-4",children:f.jsx(ni,{className:"w-8 h-8 text-white"})}),f.jsx("h1",{className:"text-2xl font-bold text-white",children:"Welcome"}),f.jsx("p",{className:"text-slate-400 mt-1",children:"Set your password to accept the invitation"})]}),f.jsxs("form",{className:"space-y-5",onSubmit:h,children:[f.jsxs("div",{children:[f.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-slate-300 mb-2",children:"New Password"}),f.jsx("input",{id:"password",name:"password",type:"password",required:!0,value:n,onChange:m=>r(m.target.value),className:"w-full px-4 py-3 bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-transparent transition",placeholder:"Minimum 8 characters",minLength:8})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"confirmPassword",className:"block text-sm font-medium text-slate-300 mb-2",children:"Confirm Password"}),f.jsx("input",{id:"confirmPassword",name:"confirmPassword",type:"password",required:!0,value:i,onChange:m=>s(m.target.value),className:"w-full px-4 py-3 bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-transparent transition",placeholder:"Confirm your password"})]}),l&&f.jsx("div",{className:"bg-red-500/10 border border-red-500/50 rounded-lg p-4 text-red-400 text-sm",children:l}),f.jsx("button",{type:"submit",disabled:o,className:"w-full py-3 px-4 bg-gradient-to-r from-orange-500 to-amber-600 hover:from-orange-600 hover:to-amber-700 text-white font-semibold rounded-lg shadow-lg shadow-orange-500/25 transition disabled:opacity-50 disabled:cursor-not-allowed",children:o?"Setting password...":"Set Password and Login"})]})]})})}):f.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900",children:f.jsx("div",{className:"max-w-md w-full mx-4",children:f.jsxs("div",{className:"bg-slate-800/50 backdrop-blur-sm rounded-2xl shadow-2xl border border-slate-700/50 p-8 text-center",children:[f.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Invalid Invite Link"}),f.jsx("p",{className:"text-slate-400",children:"Please check the link in your email."})]})})})}function H4({onSuccess:e}){const[t,n]=C.useState(""),[r,i]=C.useState(""),[s,l]=C.useState(null),[a,o]=C.useState(!1),u=async c=>{c.preventDefault(),l(null),o(!0);try{await HS({email:t,password:r}),e()}catch(d){l(d.message||"Failed to complete setup")}finally{o(!1)}};return f.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900",children:f.jsx("div",{className:"max-w-md w-full mx-4",children:f.jsxs("div",{className:"bg-slate-800/50 backdrop-blur-sm rounded-2xl shadow-2xl border border-slate-700/50 p-8",children:[f.jsxs("div",{className:"text-center mb-8",children:[f.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-br from-green-500 to-emerald-600 mb-4",children:f.jsx(ni,{className:"w-8 h-8 text-white"})}),f.jsx("h1",{className:"text-2xl font-bold text-white",children:"Welcome!"}),f.jsx("p",{className:"text-slate-400 mt-1",children:"Create your Admin account to get started"})]}),f.jsxs("form",{onSubmit:u,className:"space-y-5","data-testid":"setup-form",children:[s&&f.jsx("div",{role:"alert","aria-live":"polite","data-testid":"setup-error",className:"bg-red-500/10 border border-red-500/50 rounded-lg p-4 text-red-400 text-sm",children:s}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-slate-300 mb-2",children:"Admin Email"}),f.jsx("input",{id:"email",type:"email",value:t,onChange:c=>n(c.target.value),className:"w-full px-4 py-3 bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-transparent transition",placeholder:"admin@example.com",required:!0,"aria-label":"Email address"})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-slate-300 mb-2",children:"Create Password"}),f.jsx("input",{id:"password",type:"password",value:r,onChange:c=>i(c.target.value),className:"w-full px-4 py-3 bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-transparent transition",placeholder:"Choose a strong password",required:!0,minLength:8,"aria-label":"Password"})]}),f.jsx("button",{type:"submit",disabled:a||!t||!r,className:"w-full py-3 px-4 bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 text-white font-semibold rounded-lg shadow-lg shadow-green-500/25 transition disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Create Account",children:a?"Setting up...":"Create Account"})]})]})})})}function q4(){const[e,t]=C.useState([]),[n,r]=C.useState(!0),[i,s]=C.useState(null),[l,a]=C.useState(!1),{isAdmin:o}=fs(),[u,c]=C.useState(""),[d,p]=C.useState("viewer"),[h,m]=C.useState(!1);C.useEffect(()=>{y()},[]);const y=async()=>{try{const x=await lE();t(x)}catch(x){s(x.message)}finally{r(!1)}},_=async x=>{if(window.confirm("Are you sure you want to delete this user?"))try{await oE(x),t(e.filter(v=>v.id!==x))}catch(v){alert(v.message)}},g=async x=>{x.preventDefault(),m(!0);try{await aE({email:u,role:d}),a(!1),c(""),y(),alert("User invited successfully. They will receive an email to set their password.")}catch(v){alert(v.message)}finally{m(!1)}};return n?f.jsx("div",{className:"text-slate-400",children:"Loading users..."}):f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Users"}),f.jsx("p",{className:"text-slate-400",children:"Manage access to the Composer Proxy"})]}),o&&f.jsxs("button",{onClick:()=>a(!0),className:"flex items-center gap-2 px-4 py-2 bg-primary-600 hover:bg-primary-500 text-white rounded-lg transition",children:[f.jsx(US,{className:"w-5 h-5"}),"Invite User"]})]}),i&&f.jsx("div",{className:"bg-red-500/10 border border-red-500/50 rounded-lg p-4 text-red-400",children:i}),f.jsx("div",{className:"bg-slate-800/50 border border-slate-700 rounded-xl overflow-hidden",children:f.jsxs("table",{className:"w-full text-left border-collapse",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"bg-slate-800 border-b border-slate-700",children:[f.jsx("th",{className:"px-6 py-4 text-sm font-semibold text-slate-300",children:"User"}),f.jsx("th",{className:"px-6 py-4 text-sm font-semibold text-slate-300",children:"Role"}),f.jsx("th",{className:"px-6 py-4 text-sm font-semibold text-slate-300",children:"Status"}),f.jsx("th",{className:"px-6 py-4 text-sm font-semibold text-slate-300",children:"Created"}),o&&f.jsx("th",{className:"px-6 py-4 text-right text-sm font-semibold text-slate-300",children:"Actions"})]})}),f.jsx("tbody",{className:"divide-y divide-slate-700",children:e.map(x=>f.jsxs("tr",{className:"hover:bg-slate-800/30 transition",children:[f.jsx("td",{className:"px-6 py-4",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-8 h-8 rounded-full bg-slate-700 flex items-center justify-center",children:f.jsx(od,{className:"w-4 h-4 text-slate-400"})}),f.jsxs("div",{children:[f.jsx("div",{className:"text-slate-200 font-medium",children:x.email}),f.jsx("div",{className:"text-xs text-slate-500 font-mono",children:x.id})]})]})}),f.jsx("td",{className:"px-6 py-4",children:f.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-slate-700/50 border border-slate-600 w-fit",children:[f.jsx(v0,{className:"w-3 h-3 text-primary-400"}),f.jsx("span",{className:"text-xs font-medium text-slate-300 capitalize",children:x.role})]})}),f.jsx("td",{className:"px-6 py-4",children:f.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${x.status==="active"?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-yellow-500/10 text-yellow-400 border border-yellow-500/20"}`,children:x.status})}),f.jsx("td",{className:"px-6 py-4 text-sm text-slate-400",children:new Date(x.created_at*1e3).toLocaleDateString()}),o&&f.jsx("td",{className:"px-6 py-4 text-right",children:f.jsx("button",{onClick:()=>_(x.id),className:"p-2 text-slate-400 hover:text-red-400 hover:bg-red-500/10 rounded-lg transition",title:"Delete User",children:f.jsx(zS,{className:"w-4 h-4"})})})]},x.id))})]})}),l&&f.jsx("div",{className:"fixed inset-0 bg-slate-900/80 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:f.jsxs("div",{className:"bg-slate-800 border border-slate-700 rounded-xl shadow-2xl max-w-md w-full p-6",children:[f.jsx("h2",{className:"text-xl font-bold text-white mb-4",children:"Invite New User"}),f.jsxs("form",{onSubmit:g,className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Email"}),f.jsxs("div",{className:"relative",children:[f.jsx(DS,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500"}),f.jsx("input",{type:"email",value:u,onChange:x=>c(x.target.value),className:"w-full bg-slate-900 border border-slate-700 rounded-lg pl-9 pr-4 py-2 text-slate-200 focus:outline-none focus:ring-2 focus:ring-primary-500",placeholder:"user@example.com",required:!0})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Role"}),f.jsxs("select",{value:d,onChange:x=>p(x.target.value),className:"w-full bg-slate-900 border border-slate-700 rounded-lg px-4 py-2 text-slate-200 focus:outline-none focus:ring-2 focus:ring-primary-500",children:[f.jsx("option",{value:"viewer",children:"Viewer"}),f.jsx("option",{value:"admin",children:"Admin"})]})]}),f.jsxs("div",{className:"flex justify-end gap-3 mt-6",children:[f.jsx("button",{type:"button",onClick:()=>a(!1),className:"px-4 py-2 text-slate-300 hover:text-white transition",children:"Cancel"}),f.jsx("button",{type:"submit",disabled:h,className:"px-4 py-2 bg-primary-600 hover:bg-primary-500 text-white rounded-lg transition disabled:opacity-50",children:h?"Inviting...":"Invite User"})]})]})]})})]})}function Q4(){const[e,t]=C.useState(null),[n,r]=C.useState(!0),[i,s]=C.useState(null),[l,a]=C.useState(""),[o,u]=C.useState(null),[c,d]=C.useState(null),[p,h]=C.useState(!1);C.useEffect(()=>{m()},[]);const m=async()=>{try{const x=Fo(),w=await(await fetch("/api/auth/me",{headers:{Authorization:`Bearer ${x}`}})).json();w.user&&t(w.user)}catch(x){console.error("Failed to fetch user",x)}finally{r(!1)}},y=async()=>{h(!0),d(null);try{const x=await uE();s(x)}catch{d("Failed to start 2FA setup")}finally{h(!1)}},_=async()=>{if(i){h(!0),d(null);try{const x=await cE(i.secret,l);u(x.recoveryCodes),s(null),a(""),await m()}catch{d("Invalid code")}finally{h(!1)}}},g=async()=>{if(confirm("Are you sure you want to disable 2FA? Your account will be less secure.")){h(!0),d(null);try{await dE(),await m()}catch{d("Failed to disable 2FA")}finally{h(!1)}}};return n?f.jsx("div",{className:"p-8 text-center text-slate-400",children:"Loading profile..."}):f.jsxs("div",{className:"space-y-6",children:[f.jsx("div",{className:"flex items-center justify-between",children:f.jsx("h1",{className:"text-2xl font-bold text-slate-100 font-display",children:"My Profile"})}),f.jsxs("div",{className:"bg-slate-800 rounded-lg border border-slate-700 p-6",children:[f.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[f.jsx("div",{className:"w-16 h-16 bg-slate-700 rounded-full flex items-center justify-center text-2xl font-bold text-slate-300",children:e==null?void 0:e.email[0].toUpperCase()}),f.jsxs("div",{children:[f.jsx("h2",{className:"text-xl font-semibold text-white",children:e==null?void 0:e.email}),f.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-500/10 text-blue-400 border border-blue-500/20 capitalize",children:e==null?void 0:e.role})]})]}),f.jsxs("div",{className:"border-t border-slate-700 pt-6",children:[f.jsxs("h3",{className:"text-lg font-medium text-white mb-4 flex items-center gap-2",children:[f.jsx(v0,{className:"w-5 h-5 text-orange-500"}),"Security"]}),f.jsxs("div",{className:"bg-slate-900/50 rounded-lg p-6 border border-slate-700/50",children:[f.jsxs("div",{className:"flex items-start justify-between mb-4",children:[f.jsxs("div",{children:[f.jsxs("h4",{className:"font-medium text-slate-200 flex items-center gap-2",children:["Two-Factor Authentication (2FA)",(e==null?void 0:e.two_factor_enabled)&&f.jsx("span",{className:"text-xs bg-green-500/10 text-green-400 border border-green-500/20 px-2 py-0.5 rounded-full",children:"Enabled"})]}),f.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Add an extra layer of security to your account by requiring a code from your authenticator app."})]}),!(e!=null&&e.two_factor_enabled)&&!i&&f.jsx("button",{onClick:y,disabled:p,className:"px-4 py-2 bg-orange-600 hover:bg-orange-700 text-white rounded-lg text-sm font-medium transition",children:"Enable 2FA"}),(e==null?void 0:e.two_factor_enabled)&&f.jsx("button",{onClick:g,disabled:p,className:"px-4 py-2 bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/20 rounded-lg text-sm font-medium transition",children:"Disable"})]}),i&&f.jsxs("div",{className:"mt-6 p-4 bg-slate-800 rounded-lg border border-slate-700 animate-in fade-in slide-in-from-top-4",children:[f.jsxs("h5",{className:"font-medium text-white mb-4 flex items-center gap-2",children:[f.jsx(MS,{className:"w-4 h-4"}),"Scan QR Code"]}),f.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[f.jsxs("div",{className:"flex flex-col items-center",children:[f.jsx("div",{className:"bg-white p-2 rounded-lg mb-4",children:f.jsx("img",{src:i.qrCode,alt:"2FA QR Code",className:"w-48 h-48"})}),f.jsx("p",{className:"text-xs text-slate-500 text-center max-w-xs",children:"Scan this code with Google Authenticator, Authy, or 1Password."})]}),f.jsxs("div",{className:"flex flex-col justify-center space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Manual Entry Code"}),f.jsx("code",{className:"block w-full p-2 bg-slate-900 rounded text-slate-300 font-mono text-sm select-all",children:i.secret})]}),f.jsxs("div",{children:[f.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Verification Code"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"text",value:l,onChange:x=>a(x.target.value),placeholder:"000000",maxLength:6,className:"bg-slate-900 border border-slate-600 rounded px-3 py-2 text-white w-32 focus:ring-2 focus:ring-orange-500 outline-none"}),f.jsx("button",{onClick:_,disabled:l.length!==6||p,className:"px-4 py-2 bg-orange-600 hover:bg-orange-700 text-white rounded font-medium disabled:opacity-50",children:"Verify & Enable"})]}),c&&f.jsx("p",{className:"text-red-400 text-sm mt-2",children:c})]})]})]})]}),o&&f.jsxs("div",{className:"mt-6 p-4 bg-green-500/10 border border-green-500/20 rounded-lg",children:[f.jsxs("div",{className:"flex items-center gap-2 text-green-400 font-medium mb-2",children:[f.jsx(TS,{className:"w-5 h-5"}),"2FA Enabled Successfully!"]}),f.jsx("div",{className:"mb-4 text-slate-300 text-sm",children:"Please save these recovery codes in a secure place. You will need them if you lose access to your authenticator device."}),f.jsx("div",{className:"grid grid-cols-2 gap-2 font-mono text-sm bg-slate-900 p-4 rounded border border-slate-700",children:o.map(x=>f.jsx("div",{className:"text-slate-300 select-all",children:x},x))}),f.jsx("button",{onClick:()=>u(null),className:"mt-4 text-sm text-slate-400 hover:text-white underline",children:"I have saved these codes"})]})]})]})]})]})}function W4(){const{isAuthenticated:e,logout:t}=fs(),[n,r]=C.useState(null),[i,s]=C.useState(!1),[l,a]=C.useState(!0);if(C.useEffect(()=>{VS().then(({authRequired:c,setupRequired:d})=>{r(c),s(d),a(!1)})},[]),l)return f.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900",children:f.jsx("div",{className:"text-slate-400",children:"Loading..."})});const o=yn();if(i)return f.jsx(H4,{onSuccess:()=>s(!1)});if(o.pathname.startsWith("/invite/"))return f.jsx(Np,{children:f.jsx(wn,{path:"/invite/:token",element:f.jsx(V4,{})})});if(n&&!e)return f.jsx(B4,{onSuccess:()=>{}});const u=[{path:"/",label:"Dashboard",icon:PS},{path:"/repositories",label:"Repositories",icon:ni},{path:"/tokens",label:"Access Tokens",icon:AS},{path:"/packages",label:"Packages",icon:x0},{path:"/users",label:"Users",icon:od}];return f.jsxs("div",{className:"min-h-screen",children:[f.jsx("header",{className:"bg-slate-900/90 backdrop-blur-sm border-b border-slate-800 sticky top-0 z-50",children:f.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:f.jsxs("div",{className:"flex items-center justify-between h-16",children:[f.jsxs(Ji,{to:"/",className:"flex items-center gap-3 hover:opacity-80 transition-opacity",children:[f.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-primary-500 to-accent-600 rounded-lg flex items-center justify-center",children:f.jsx(ni,{className:"w-6 h-6 text-white"})}),f.jsxs("div",{children:[f.jsx("h1",{className:"font-display font-bold text-lg text-slate-100",children:"PACKAGE.broker"}),f.jsx("p",{className:"text-xs text-slate-500",children:"Serverless Edition"})]})]}),f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsxs("nav",{className:"flex items-center gap-1",role:"navigation","aria-label":"Main navigation",children:[u.map(c=>f.jsxs(Qc,{to:c.path,end:c.path==="/","data-testid":`nav-${c.path==="/"?"dashboard":c.path.slice(1)}`,className:({isActive:d})=>`px-4 py-2 rounded-lg font-medium text-sm transition-all duration-200 flex items-center gap-2 ${d?"bg-slate-800 text-primary-400 shadow-lg":"text-slate-400 hover:text-slate-200 hover:bg-slate-800/50"}`,children:[f.jsx(c.icon,{className:"w-5 h-5 flex-shrink-0"}),f.jsx("span",{children:c.label})]},c.path)),f.jsxs("a",{href:"https://package.broker",target:"_blank",rel:"noopener noreferrer",className:"px-4 py-2 rounded-lg font-medium text-sm text-slate-400 hover:text-slate-200 hover:bg-slate-800/50 transition-all duration-200 flex items-center gap-2","data-testid":"nav-about",children:[f.jsx(LS,{className:"w-5 h-5 flex-shrink-0"}),f.jsx("span",{children:"About"})]})]}),e&&f.jsxs("div",{className:"flex items-center gap-2 pl-2 border-l border-slate-700 ml-2",children:[f.jsx(Qc,{to:"/profile",className:({isActive:c})=>`px-3 py-2 text-sm rounded-lg transition flex items-center gap-1 ${c?"text-white bg-slate-800":"text-slate-400 hover:text-slate-200"}`,title:"Profile Settings",children:f.jsx(od,{className:"w-4 h-4"})}),f.jsx("button",{onClick:t,className:"px-3 py-2 text-sm text-slate-400 hover:text-red-400 transition flex items-center gap-1",title:"Sign out","aria-label":"Sign out","data-testid":"logout-button",children:f.jsx(OS,{className:"w-4 h-4"})})]})]})]})})}),f.jsx("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:f.jsxs(Np,{children:[f.jsx(wn,{path:"/",element:f.jsx(pE,{})}),f.jsx(wn,{path:"/repositories",element:f.jsx(HE,{})}),f.jsx(wn,{path:"/tokens",element:f.jsx(GE,{})}),f.jsx(wn,{path:"/packages",element:f.jsx(qN,{})}),f.jsx(wn,{path:"/packages/:vendor/:package",element:f.jsx(U4,{})}),f.jsx(wn,{path:"/users",element:f.jsx(q4,{})}),f.jsx(wn,{path:"/profile",element:f.jsx(Q4,{})})]})}),f.jsx("footer",{className:"border-t border-slate-800 mt-16 py-8",children:f.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:f.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[f.jsxs("div",{className:"text-center md:text-left",children:[f.jsx("p",{className:"text-slate-300 font-medium mb-1",children:"PACKAGE.broker"}),f.jsx("p",{className:"text-slate-500 text-sm",children:"A lightweight, self-hosted Composer proxy running on Cloudflare's edge network"})]}),f.jsxs("div",{className:"flex flex-col items-center md:items-end gap-2",children:[f.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[f.jsx("a",{href:"https://github.com/package-broker/server",target:"_blank",rel:"noopener noreferrer",className:"text-slate-400 hover:text-slate-200 transition",children:"GitHub"}),f.jsxs("a",{href:"https://github.com/sponsors/lbajsarowicz",target:"_blank",rel:"noopener noreferrer",className:"text-pink-400 hover:text-pink-300 transition flex items-center gap-1",children:[f.jsx(ad,{className:"w-4 h-4 fill-current"}),"Sponsor"]})]}),f.jsxs("p",{className:"text-slate-500 text-xs",children:["© ",new Date().getFullYear()," Łukasz Bajsarowicz • Licensed under AGPL-3.0"]})]})]})})})]})}function G4(){return f.jsx(VE,{children:f.jsx(W4,{})})}const Z4=new pS({defaultOptions:{queries:{staleTime:1e3*60,refetchOnWindowFocus:!1}}});Ku.createRoot(document.getElementById("root")).render(f.jsx(ck.StrictMode,{children:f.jsx(Db,{children:f.jsx(mS,{client:Z4,children:f.jsx(G4,{})})})}));