@promptowl/contextnest-community 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONFIGURATION.md +118 -0
- package/LICENSE.md +142 -0
- package/README.md +105 -0
- package/dist/chunk-7K2LLJXK.js +58 -0
- package/dist/chunk-DJFEV4ET.js +199 -0
- package/dist/chunk-P6NG56CO.js +127 -0
- package/dist/chunk-Q2DCOS7V.js +491 -0
- package/dist/chunk-USIDOGVJ.js +347 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2867 -0
- package/dist/keys-YV33AJK3.js +16 -0
- package/dist/review-service-5CLVZKAR.js +23 -0
- package/dist/stewardship-service-NC67XBYO.js +31 -0
- package/dist/version-service-Z6FYJRAG.js +23 -0
- package/dist/web3/assets/hootie-C2ocYkn4.svg +8 -0
- package/dist/web3/assets/index-CemroDXg.css +1 -0
- package/dist/web3/assets/index-xLLf4lHJ.js +332 -0
- package/dist/web3/index.html +14 -0
- package/package.json +108 -0
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
function u0(n,o){for(var s=0;s<o.length;s++){const a=o[s];if(typeof a!="string"&&!Array.isArray(a)){for(const c in a)if(c!=="default"&&!(c in n)){const d=Object.getOwnPropertyDescriptor(a,c);d&&Object.defineProperty(n,c,d.get?d:{enumerable:!0,get:()=>a[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))a(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&a(f)}).observe(document,{childList:!0,subtree:!0});function s(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function a(c){if(c.ep)return;c.ep=!0;const d=s(c);fetch(c.href,d)}})();function gu(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Rc={exports:{}},us={},Pc={exports:{}},Re={};/**
|
|
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 Hp;function d0(){if(Hp)return Re;Hp=1;var n=Symbol.for("react.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.iterator;function S(R){return R===null||typeof R!="object"?null:(R=y&&R[y]||R["@@iterator"],typeof R=="function"?R:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,C={};function k(R,U,xe){this.props=R,this.context=U,this.refs=C,this.updater=xe||N}k.prototype.isReactComponent={},k.prototype.setState=function(R,U){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,U,"setState")},k.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function E(){}E.prototype=k.prototype;function T(R,U,xe){this.props=R,this.context=U,this.refs=C,this.updater=xe||N}var A=T.prototype=new E;A.constructor=T,b(A,k.prototype),A.isPureReactComponent=!0;var D=Array.isArray,W=Object.prototype.hasOwnProperty,F={current:null},$={key:!0,ref:!0,__self:!0,__source:!0};function z(R,U,xe){var pe,ue={},se=null,q=null;if(U!=null)for(pe in U.ref!==void 0&&(q=U.ref),U.key!==void 0&&(se=""+U.key),U)W.call(U,pe)&&!$.hasOwnProperty(pe)&&(ue[pe]=U[pe]);var H=arguments.length-2;if(H===1)ue.children=xe;else if(1<H){for(var Z=Array(H),ye=0;ye<H;ye++)Z[ye]=arguments[ye+2];ue.children=Z}if(R&&R.defaultProps)for(pe in H=R.defaultProps,H)ue[pe]===void 0&&(ue[pe]=H[pe]);return{$$typeof:n,type:R,key:se,ref:q,props:ue,_owner:F.current}}function Q(R,U){return{$$typeof:n,type:R.type,key:U,ref:R.ref,props:R.props,_owner:R._owner}}function ee(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function fe(R){var U={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(xe){return U[xe]})}var me=/\/+/g;function we(R,U){return typeof R=="object"&&R!==null&&R.key!=null?fe(""+R.key):U.toString(36)}function ve(R,U,xe,pe,ue){var se=typeof R;(se==="undefined"||se==="boolean")&&(R=null);var q=!1;if(R===null)q=!0;else switch(se){case"string":case"number":q=!0;break;case"object":switch(R.$$typeof){case n:case o:q=!0}}if(q)return q=R,ue=ue(q),R=pe===""?"."+we(q,0):pe,D(ue)?(xe="",R!=null&&(xe=R.replace(me,"$&/")+"/"),ve(ue,U,xe,"",function(ye){return ye})):ue!=null&&(ee(ue)&&(ue=Q(ue,xe+(!ue.key||q&&q.key===ue.key?"":(""+ue.key).replace(me,"$&/")+"/")+R)),U.push(ue)),1;if(q=0,pe=pe===""?".":pe+":",D(R))for(var H=0;H<R.length;H++){se=R[H];var Z=pe+we(se,H);q+=ve(se,U,xe,Z,ue)}else if(Z=S(R),typeof Z=="function")for(R=Z.call(R),H=0;!(se=R.next()).done;)se=se.value,Z=pe+we(se,H++),q+=ve(se,U,xe,Z,ue);else if(se==="object")throw U=String(R),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return q}function Ne(R,U,xe){if(R==null)return R;var pe=[],ue=0;return ve(R,pe,"","",function(se){return U.call(xe,se,ue++)}),pe}function J(R){if(R._status===-1){var U=R._result;U=U(),U.then(function(xe){(R._status===0||R._status===-1)&&(R._status=1,R._result=xe)},function(xe){(R._status===0||R._status===-1)&&(R._status=2,R._result=xe)}),R._status===-1&&(R._status=0,R._result=U)}if(R._status===1)return R._result.default;throw R._result}var re={current:null},V={transition:null},B={ReactCurrentDispatcher:re,ReactCurrentBatchConfig:V,ReactCurrentOwner:F};function O(){throw Error("act(...) is not supported in production builds of React.")}return Re.Children={map:Ne,forEach:function(R,U,xe){Ne(R,function(){U.apply(this,arguments)},xe)},count:function(R){var U=0;return Ne(R,function(){U++}),U},toArray:function(R){return Ne(R,function(U){return U})||[]},only:function(R){if(!ee(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},Re.Component=k,Re.Fragment=s,Re.Profiler=c,Re.PureComponent=T,Re.StrictMode=a,Re.Suspense=g,Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,Re.act=O,Re.cloneElement=function(R,U,xe){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var pe=b({},R.props),ue=R.key,se=R.ref,q=R._owner;if(U!=null){if(U.ref!==void 0&&(se=U.ref,q=F.current),U.key!==void 0&&(ue=""+U.key),R.type&&R.type.defaultProps)var H=R.type.defaultProps;for(Z in U)W.call(U,Z)&&!$.hasOwnProperty(Z)&&(pe[Z]=U[Z]===void 0&&H!==void 0?H[Z]:U[Z])}var Z=arguments.length-2;if(Z===1)pe.children=xe;else if(1<Z){H=Array(Z);for(var ye=0;ye<Z;ye++)H[ye]=arguments[ye+2];pe.children=H}return{$$typeof:n,type:R.type,key:ue,ref:se,props:pe,_owner:q}},Re.createContext=function(R){return R={$$typeof:f,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:d,_context:R},R.Consumer=R},Re.createElement=z,Re.createFactory=function(R){var U=z.bind(null,R);return U.type=R,U},Re.createRef=function(){return{current:null}},Re.forwardRef=function(R){return{$$typeof:m,render:R}},Re.isValidElement=ee,Re.lazy=function(R){return{$$typeof:x,_payload:{_status:-1,_result:R},_init:J}},Re.memo=function(R,U){return{$$typeof:v,type:R,compare:U===void 0?null:U}},Re.startTransition=function(R){var U=V.transition;V.transition={};try{R()}finally{V.transition=U}},Re.unstable_act=O,Re.useCallback=function(R,U){return re.current.useCallback(R,U)},Re.useContext=function(R){return re.current.useContext(R)},Re.useDebugValue=function(){},Re.useDeferredValue=function(R){return re.current.useDeferredValue(R)},Re.useEffect=function(R,U){return re.current.useEffect(R,U)},Re.useId=function(){return re.current.useId()},Re.useImperativeHandle=function(R,U,xe){return re.current.useImperativeHandle(R,U,xe)},Re.useInsertionEffect=function(R,U){return re.current.useInsertionEffect(R,U)},Re.useLayoutEffect=function(R,U){return re.current.useLayoutEffect(R,U)},Re.useMemo=function(R,U){return re.current.useMemo(R,U)},Re.useReducer=function(R,U,xe){return re.current.useReducer(R,U,xe)},Re.useRef=function(R){return re.current.useRef(R)},Re.useState=function(R){return re.current.useState(R)},Re.useSyncExternalStore=function(R,U,xe){return re.current.useSyncExternalStore(R,U,xe)},Re.useTransition=function(){return re.current.useTransition()},Re.version="18.3.1",Re}var Kp;function di(){return Kp||(Kp=1,Pc.exports=d0()),Pc.exports}/**
|
|
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 Gp;function f0(){if(Gp)return us;Gp=1;var n=di(),o=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,c=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function f(m,g,v){var x,y={},S=null,N=null;v!==void 0&&(S=""+v),g.key!==void 0&&(S=""+g.key),g.ref!==void 0&&(N=g.ref);for(x in g)a.call(g,x)&&!d.hasOwnProperty(x)&&(y[x]=g[x]);if(m&&m.defaultProps)for(x in g=m.defaultProps,g)y[x]===void 0&&(y[x]=g[x]);return{$$typeof:o,type:m,key:S,ref:N,props:y,_owner:c.current}}return us.Fragment=s,us.jsx=f,us.jsxs=f,us}var Yp;function p0(){return Yp||(Yp=1,Rc.exports=f0()),Rc.exports}var l=p0(),h=di();const _n=gu(h),vu=u0({__proto__:null,default:_n},[h]);var zl={},Tc={exports:{}},St={},Ac={exports:{}},Mc={};/**
|
|
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
|
+
*/var Qp;function m0(){return Qp||(Qp=1,(function(n){function o(V,B){var O=V.length;V.push(B);e:for(;0<O;){var R=O-1>>>1,U=V[R];if(0<c(U,B))V[R]=B,V[O]=U,O=R;else break e}}function s(V){return V.length===0?null:V[0]}function a(V){if(V.length===0)return null;var B=V[0],O=V.pop();if(O!==B){V[0]=O;e:for(var R=0,U=V.length,xe=U>>>1;R<xe;){var pe=2*(R+1)-1,ue=V[pe],se=pe+1,q=V[se];if(0>c(ue,O))se<U&&0>c(q,ue)?(V[R]=q,V[se]=O,R=se):(V[R]=ue,V[pe]=O,R=pe);else if(se<U&&0>c(q,O))V[R]=q,V[se]=O,R=se;else break e}}return B}function c(V,B){var O=V.sortIndex-B.sortIndex;return O!==0?O:V.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var f=Date,m=f.now();n.unstable_now=function(){return f.now()-m}}var g=[],v=[],x=1,y=null,S=3,N=!1,b=!1,C=!1,k=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(V){for(var B=s(v);B!==null;){if(B.callback===null)a(v);else if(B.startTime<=V)a(v),B.sortIndex=B.expirationTime,o(g,B);else break;B=s(v)}}function D(V){if(C=!1,A(V),!b)if(s(g)!==null)b=!0,J(W);else{var B=s(v);B!==null&&re(D,B.startTime-V)}}function W(V,B){b=!1,C&&(C=!1,E(z),z=-1),N=!0;var O=S;try{for(A(B),y=s(g);y!==null&&(!(y.expirationTime>B)||V&&!fe());){var R=y.callback;if(typeof R=="function"){y.callback=null,S=y.priorityLevel;var U=R(y.expirationTime<=B);B=n.unstable_now(),typeof U=="function"?y.callback=U:y===s(g)&&a(g),A(B)}else a(g);y=s(g)}if(y!==null)var xe=!0;else{var pe=s(v);pe!==null&&re(D,pe.startTime-B),xe=!1}return xe}finally{y=null,S=O,N=!1}}var F=!1,$=null,z=-1,Q=5,ee=-1;function fe(){return!(n.unstable_now()-ee<Q)}function me(){if($!==null){var V=n.unstable_now();ee=V;var B=!0;try{B=$(!0,V)}finally{B?we():(F=!1,$=null)}}else F=!1}var we;if(typeof T=="function")we=function(){T(me)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,Ne=ve.port2;ve.port1.onmessage=me,we=function(){Ne.postMessage(null)}}else we=function(){k(me,0)};function J(V){$=V,F||(F=!0,we())}function re(V,B){z=k(function(){V(n.unstable_now())},B)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(V){V.callback=null},n.unstable_continueExecution=function(){b||N||(b=!0,J(W))},n.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<V?Math.floor(1e3/V):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_getFirstCallbackNode=function(){return s(g)},n.unstable_next=function(V){switch(S){case 1:case 2:case 3:var B=3;break;default:B=S}var O=S;S=B;try{return V()}finally{S=O}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(V,B){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var O=S;S=V;try{return B()}finally{S=O}},n.unstable_scheduleCallback=function(V,B,O){var R=n.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?R+O:R):O=R,V){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=O+U,V={id:x++,callback:B,priorityLevel:V,startTime:O,expirationTime:U,sortIndex:-1},O>R?(V.sortIndex=O,o(v,V),s(g)===null&&V===s(v)&&(C?(E(z),z=-1):C=!0,re(D,O-R))):(V.sortIndex=U,o(g,V),b||N||(b=!0,J(W))),V},n.unstable_shouldYield=fe,n.unstable_wrapCallback=function(V){var B=S;return function(){var O=S;S=B;try{return V.apply(this,arguments)}finally{S=O}}}})(Mc)),Mc}var Xp;function h0(){return Xp||(Xp=1,Ac.exports=m0()),Ac.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 qp;function g0(){if(qp)return St;qp=1;var n=di(),o=h0();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 a=new Set,c={};function d(e,t){f(e,t),f(e+"Capture",t)}function f(e,t){for(c[e]=t,e=0;e<t.length;e++)a.add(t[e])}var m=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,v=/^[: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]*$/,x={},y={};function S(e){return g.call(y,e)?!0:g.call(x,e)?!1:v.test(e)?y[e]=!0:(x[e]=!0,!1)}function N(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function b(e,t,r,i){if(t===null||typeof t>"u"||N(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.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 C(e,t,r,i,u,p,w){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=u,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=p,this.removeEmptyString=w}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){k[e]=new C(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];k[t]=new C(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){k[e]=new C(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){k[e]=new C(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){k[e]=new C(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){k[e]=new C(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){k[e]=new C(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){k[e]=new C(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){k[e]=new C(e,5,!1,e.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function T(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(E,T);k[t]=new C(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(E,T);k[t]=new C(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(E,T);k[t]=new C(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){k[e]=new C(e,1,!1,e.toLowerCase(),null,!1,!1)}),k.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){k[e]=new C(e,1,!1,e.toLowerCase(),null,!0,!0)});function A(e,t,r,i){var u=k.hasOwnProperty(t)?k[t]:null;(u!==null?u.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(b(t,r,u,i)&&(r=null),i||u===null?S(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):u.mustUseProperty?e[u.propertyName]=r===null?u.type===3?!1:"":r:(t=u.attributeName,i=u.attributeNamespace,r===null?e.removeAttribute(t):(u=u.type,r=u===3||u===4&&r===!0?"":""+r,i?e.setAttributeNS(i,t,r):e.setAttribute(t,r))))}var D=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),F=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),fe=Symbol.for("react.context"),me=Symbol.for("react.forward_ref"),we=Symbol.for("react.suspense"),ve=Symbol.for("react.suspense_list"),Ne=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),re=Symbol.for("react.offscreen"),V=Symbol.iterator;function B(e){return e===null||typeof e!="object"?null:(e=V&&e[V]||e["@@iterator"],typeof e=="function"?e:null)}var O=Object.assign,R;function U(e){if(R===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);R=t&&t[1]||""}return`
|
|
34
|
+
`+R+e}var xe=!1;function pe(e,t){if(!e||xe)return"";xe=!0;var r=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(L){var i=L}Reflect.construct(e,[],t)}else{try{t.call()}catch(L){i=L}e.call(t.prototype)}else{try{throw Error()}catch(L){i=L}e()}}catch(L){if(L&&i&&typeof L.stack=="string"){for(var u=L.stack.split(`
|
|
35
|
+
`),p=i.stack.split(`
|
|
36
|
+
`),w=u.length-1,j=p.length-1;1<=w&&0<=j&&u[w]!==p[j];)j--;for(;1<=w&&0<=j;w--,j--)if(u[w]!==p[j]){if(w!==1||j!==1)do if(w--,j--,0>j||u[w]!==p[j]){var _=`
|
|
37
|
+
`+u[w].replace(" at new "," at ");return e.displayName&&_.includes("<anonymous>")&&(_=_.replace("<anonymous>",e.displayName)),_}while(1<=w&&0<=j);break}}}finally{xe=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?U(e):""}function ue(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return e=pe(e.type,!1),e;case 11:return e=pe(e.type.render,!1),e;case 1:return e=pe(e.type,!0),e;default:return""}}function se(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 $:return"Fragment";case F:return"Portal";case Q:return"Profiler";case z:return"StrictMode";case we:return"Suspense";case ve:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fe:return(e.displayName||"Context")+".Consumer";case ee:return(e._context.displayName||"Context")+".Provider";case me:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ne:return t=e.displayName||null,t!==null?t:se(e.type)||"Memo";case J:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}function q(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 se(t);case 8:return t===z?"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 H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Z(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ye(e){var t=Z(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var u=r.get,p=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(w){i=""+w,p.call(this,w)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(w){i=""+w},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ke(e){e._valueTracker||(e._valueTracker=ye(e))}function Te(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Z(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function Ve(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 Qe(e,t){var r=t.checked;return O({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Mn(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=H(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function In(e,t){t=t.checked,t!=null&&A(e,"checked",t,!1)}function xn(e,t){In(e,t);var r=H(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?On(e,t.type,r):t.hasOwnProperty("defaultValue")&&On(e,t.type,H(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Rs(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function On(e,t,r){(t!=="number"||Ve(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var jo=Array.isArray;function Lr(e,t,r,i){if(e=e.options,t){t={};for(var u=0;u<r.length;u++)t["$"+r[u]]=!0;for(r=0;r<e.length;r++)u=t.hasOwnProperty("$"+e[r].value),e[r].selected!==u&&(e[r].selected=u),u&&i&&(e[r].defaultSelected=!0)}else{for(r=""+H(r),t=null,u=0;u<e.length;u++){if(e[u].value===r){e[u].selected=!0,i&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Fi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(s(91));return O({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ed(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(s(92));if(jo(r)){if(1<r.length)throw Error(s(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:H(r)}}function td(e,t){var r=H(t.value),i=H(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),i!=null&&(e.defaultValue=""+i)}function nd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function rd(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 $i(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?rd(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ps,od=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,u){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,u)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ps=Ps||document.createElement("div"),Ps.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ps.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ko(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Eo={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},my=["Webkit","ms","Moz","O"];Object.keys(Eo).forEach(function(e){my.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Eo[t]=Eo[e]})});function sd(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Eo.hasOwnProperty(e)&&Eo[e]?(""+t).trim():t+"px"}function ld(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,u=sd(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,u):e[r]=u}}var hy=O({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 Vi(e,t){if(t){if(hy[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function Bi(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 Ui=null;function Wi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hi=null,zr=null,Fr=null;function id(e){if(e=Qo(e)){if(typeof Hi!="function")throw Error(s(280));var t=e.stateNode;t&&(t=Js(t),Hi(e.stateNode,e.type,t))}}function ad(e){zr?Fr?Fr.push(e):Fr=[e]:zr=e}function cd(){if(zr){var e=zr,t=Fr;if(Fr=zr=null,id(e),t)for(e=0;e<t.length;e++)id(t[e])}}function ud(e,t){return e(t)}function dd(){}var Ki=!1;function fd(e,t,r){if(Ki)return e(t,r);Ki=!0;try{return ud(e,t,r)}finally{Ki=!1,(zr!==null||Fr!==null)&&(dd(),cd())}}function _o(e,t){var r=e.stateNode;if(r===null)return null;var i=Js(r);if(i===null)return null;r=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(s(231,t,typeof r));return r}var Gi=!1;if(m)try{var Ro={};Object.defineProperty(Ro,"passive",{get:function(){Gi=!0}}),window.addEventListener("test",Ro,Ro),window.removeEventListener("test",Ro,Ro)}catch{Gi=!1}function gy(e,t,r,i,u,p,w,j,_){var L=Array.prototype.slice.call(arguments,3);try{t.apply(r,L)}catch(G){this.onError(G)}}var Po=!1,Ts=null,As=!1,Yi=null,vy={onError:function(e){Po=!0,Ts=e}};function xy(e,t,r,i,u,p,w,j,_){Po=!1,Ts=null,gy.apply(vy,arguments)}function yy(e,t,r,i,u,p,w,j,_){if(xy.apply(this,arguments),Po){if(Po){var L=Ts;Po=!1,Ts=null}else throw Error(s(198));As||(As=!0,Yi=L)}}function pr(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function pd(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 md(e){if(pr(e)!==e)throw Error(s(188))}function wy(e){var t=e.alternate;if(!t){if(t=pr(e),t===null)throw Error(s(188));return t!==e?null:e}for(var r=e,i=t;;){var u=r.return;if(u===null)break;var p=u.alternate;if(p===null){if(i=u.return,i!==null){r=i;continue}break}if(u.child===p.child){for(p=u.child;p;){if(p===r)return md(u),e;if(p===i)return md(u),t;p=p.sibling}throw Error(s(188))}if(r.return!==i.return)r=u,i=p;else{for(var w=!1,j=u.child;j;){if(j===r){w=!0,r=u,i=p;break}if(j===i){w=!0,i=u,r=p;break}j=j.sibling}if(!w){for(j=p.child;j;){if(j===r){w=!0,r=p,i=u;break}if(j===i){w=!0,i=p,r=u;break}j=j.sibling}if(!w)throw Error(s(189))}}if(r.alternate!==i)throw Error(s(190))}if(r.tag!==3)throw Error(s(188));return r.stateNode.current===r?e:t}function hd(e){return e=wy(e),e!==null?gd(e):null}function gd(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=gd(e);if(t!==null)return t;e=e.sibling}return null}var vd=o.unstable_scheduleCallback,xd=o.unstable_cancelCallback,Sy=o.unstable_shouldYield,Cy=o.unstable_requestPaint,He=o.unstable_now,Ny=o.unstable_getCurrentPriorityLevel,Qi=o.unstable_ImmediatePriority,yd=o.unstable_UserBlockingPriority,Ms=o.unstable_NormalPriority,by=o.unstable_LowPriority,wd=o.unstable_IdlePriority,Is=null,ln=null;function jy(e){if(ln&&typeof ln.onCommitFiberRoot=="function")try{ln.onCommitFiberRoot(Is,e,void 0,(e.current.flags&128)===128)}catch{}}var Ht=Math.clz32?Math.clz32:_y,ky=Math.log,Ey=Math.LN2;function _y(e){return e>>>=0,e===0?32:31-(ky(e)/Ey|0)|0}var Os=64,Ds=4194304;function To(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 Ls(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,u=e.suspendedLanes,p=e.pingedLanes,w=r&268435455;if(w!==0){var j=w&~u;j!==0?i=To(j):(p&=w,p!==0&&(i=To(p)))}else w=r&~u,w!==0?i=To(w):p!==0&&(i=To(p));if(i===0)return 0;if(t!==0&&t!==i&&(t&u)===0&&(u=i&-i,p=t&-t,u>=p||u===16&&(p&4194240)!==0))return t;if((i&4)!==0&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)r=31-Ht(t),u=1<<r,i|=e[r],t&=~u;return i}function Ry(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 Py(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,u=e.expirationTimes,p=e.pendingLanes;0<p;){var w=31-Ht(p),j=1<<w,_=u[w];_===-1?((j&r)===0||(j&i)!==0)&&(u[w]=Ry(j,t)):_<=t&&(e.expiredLanes|=j),p&=~j}}function Xi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Sd(){var e=Os;return Os<<=1,(Os&4194240)===0&&(Os=64),e}function qi(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ao(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ht(t),e[t]=r}function Ty(e,t){var r=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 i=e.eventTimes;for(e=e.expirationTimes;0<r;){var u=31-Ht(r),p=1<<u;t[u]=0,i[u]=-1,e[u]=-1,r&=~p}}function Zi(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-Ht(r),u=1<<i;u&t|e[i]&t&&(e[i]|=t),r&=~u}}var Ie=0;function Cd(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Nd,Ji,bd,jd,kd,ea=!1,zs=[],Dn=null,Ln=null,zn=null,Mo=new Map,Io=new Map,Fn=[],Ay="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 Ed(e,t){switch(e){case"focusin":case"focusout":Dn=null;break;case"dragenter":case"dragleave":Ln=null;break;case"mouseover":case"mouseout":zn=null;break;case"pointerover":case"pointerout":Mo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Io.delete(t.pointerId)}}function Oo(e,t,r,i,u,p){return e===null||e.nativeEvent!==p?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:p,targetContainers:[u]},t!==null&&(t=Qo(t),t!==null&&Ji(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function My(e,t,r,i,u){switch(t){case"focusin":return Dn=Oo(Dn,e,t,r,i,u),!0;case"dragenter":return Ln=Oo(Ln,e,t,r,i,u),!0;case"mouseover":return zn=Oo(zn,e,t,r,i,u),!0;case"pointerover":var p=u.pointerId;return Mo.set(p,Oo(Mo.get(p)||null,e,t,r,i,u)),!0;case"gotpointercapture":return p=u.pointerId,Io.set(p,Oo(Io.get(p)||null,e,t,r,i,u)),!0}return!1}function _d(e){var t=mr(e.target);if(t!==null){var r=pr(t);if(r!==null){if(t=r.tag,t===13){if(t=pd(r),t!==null){e.blockedOn=t,kd(e.priority,function(){bd(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=na(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);Ui=i,r.target.dispatchEvent(i),Ui=null}else return t=Qo(r),t!==null&&Ji(t),e.blockedOn=r,!1;t.shift()}return!0}function Rd(e,t,r){Fs(e)&&r.delete(t)}function Iy(){ea=!1,Dn!==null&&Fs(Dn)&&(Dn=null),Ln!==null&&Fs(Ln)&&(Ln=null),zn!==null&&Fs(zn)&&(zn=null),Mo.forEach(Rd),Io.forEach(Rd)}function Do(e,t){e.blockedOn===t&&(e.blockedOn=null,ea||(ea=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Iy)))}function Lo(e){function t(u){return Do(u,e)}if(0<zs.length){Do(zs[0],e);for(var r=1;r<zs.length;r++){var i=zs[r];i.blockedOn===e&&(i.blockedOn=null)}}for(Dn!==null&&Do(Dn,e),Ln!==null&&Do(Ln,e),zn!==null&&Do(zn,e),Mo.forEach(t),Io.forEach(t),r=0;r<Fn.length;r++)i=Fn[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<Fn.length&&(r=Fn[0],r.blockedOn===null);)_d(r),r.blockedOn===null&&Fn.shift()}var $r=D.ReactCurrentBatchConfig,$s=!0;function Oy(e,t,r,i){var u=Ie,p=$r.transition;$r.transition=null;try{Ie=1,ta(e,t,r,i)}finally{Ie=u,$r.transition=p}}function Dy(e,t,r,i){var u=Ie,p=$r.transition;$r.transition=null;try{Ie=4,ta(e,t,r,i)}finally{Ie=u,$r.transition=p}}function ta(e,t,r,i){if($s){var u=na(e,t,r,i);if(u===null)ya(e,t,i,Vs,r),Ed(e,i);else if(My(u,e,t,r,i))i.stopPropagation();else if(Ed(e,i),t&4&&-1<Ay.indexOf(e)){for(;u!==null;){var p=Qo(u);if(p!==null&&Nd(p),p=na(e,t,r,i),p===null&&ya(e,t,i,Vs,r),p===u)break;u=p}u!==null&&i.stopPropagation()}else ya(e,t,i,null,r)}}var Vs=null;function na(e,t,r,i){if(Vs=null,e=Wi(i),e=mr(e),e!==null)if(t=pr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=pd(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Vs=e,null}function Pd(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(Ny()){case Qi:return 1;case yd:return 4;case Ms:case by:return 16;case wd:return 536870912;default:return 16}default:return 16}}var $n=null,ra=null,Bs=null;function Td(){if(Bs)return Bs;var e,t=ra,r=t.length,i,u="value"in $n?$n.value:$n.textContent,p=u.length;for(e=0;e<r&&t[e]===u[e];e++);var w=r-e;for(i=1;i<=w&&t[r-i]===u[p-i];i++);return Bs=u.slice(e,1<i?1-i:void 0)}function Us(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 Ws(){return!0}function Ad(){return!1}function _t(e){function t(r,i,u,p,w){this._reactName=r,this._targetInst=u,this.type=i,this.nativeEvent=p,this.target=w,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(r=e[j],this[j]=r?r(p):p[j]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Ws:Ad,this.isPropagationStopped=Ad,this}return O(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ws)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ws)},persist:function(){},isPersistent:Ws}),t}var Vr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oa=_t(Vr),zo=O({},Vr,{view:0,detail:0}),Ly=_t(zo),sa,la,Fo,Hs=O({},zo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:aa,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!==Fo&&(Fo&&e.type==="mousemove"?(sa=e.screenX-Fo.screenX,la=e.screenY-Fo.screenY):la=sa=0,Fo=e),sa)},movementY:function(e){return"movementY"in e?e.movementY:la}}),Md=_t(Hs),zy=O({},Hs,{dataTransfer:0}),Fy=_t(zy),$y=O({},zo,{relatedTarget:0}),ia=_t($y),Vy=O({},Vr,{animationName:0,elapsedTime:0,pseudoElement:0}),By=_t(Vy),Uy=O({},Vr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Wy=_t(Uy),Hy=O({},Vr,{data:0}),Id=_t(Hy),Ky={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Gy={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"},Yy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Qy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yy[e])?!!t[e]:!1}function aa(){return Qy}var Xy=O({},zo,{key:function(e){if(e.key){var t=Ky[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Us(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Gy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:aa,charCode:function(e){return e.type==="keypress"?Us(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Us(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),qy=_t(Xy),Zy=O({},Hs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Od=_t(Zy),Jy=O({},zo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:aa}),ew=_t(Jy),tw=O({},Vr,{propertyName:0,elapsedTime:0,pseudoElement:0}),nw=_t(tw),rw=O({},Hs,{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}),ow=_t(rw),sw=[9,13,27,32],ca=m&&"CompositionEvent"in window,$o=null;m&&"documentMode"in document&&($o=document.documentMode);var lw=m&&"TextEvent"in window&&!$o,Dd=m&&(!ca||$o&&8<$o&&11>=$o),Ld=" ",zd=!1;function Fd(e,t){switch(e){case"keyup":return sw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $d(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Br=!1;function iw(e,t){switch(e){case"compositionend":return $d(t);case"keypress":return t.which!==32?null:(zd=!0,Ld);case"textInput":return e=t.data,e===Ld&&zd?null:e;default:return null}}function aw(e,t){if(Br)return e==="compositionend"||!ca&&Fd(e,t)?(e=Td(),Bs=ra=$n=null,Br=!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 Dd&&t.locale!=="ko"?null:t.data;default:return null}}var cw={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 Vd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!cw[e.type]:t==="textarea"}function Bd(e,t,r,i){ad(i),t=Xs(t,"onChange"),0<t.length&&(r=new oa("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var Vo=null,Bo=null;function uw(e){lf(e,0)}function Ks(e){var t=Gr(e);if(Te(t))return e}function dw(e,t){if(e==="change")return t}var Ud=!1;if(m){var ua;if(m){var da="oninput"in document;if(!da){var Wd=document.createElement("div");Wd.setAttribute("oninput","return;"),da=typeof Wd.oninput=="function"}ua=da}else ua=!1;Ud=ua&&(!document.documentMode||9<document.documentMode)}function Hd(){Vo&&(Vo.detachEvent("onpropertychange",Kd),Bo=Vo=null)}function Kd(e){if(e.propertyName==="value"&&Ks(Bo)){var t=[];Bd(t,Bo,e,Wi(e)),fd(uw,t)}}function fw(e,t,r){e==="focusin"?(Hd(),Vo=t,Bo=r,Vo.attachEvent("onpropertychange",Kd)):e==="focusout"&&Hd()}function pw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ks(Bo)}function mw(e,t){if(e==="click")return Ks(t)}function hw(e,t){if(e==="input"||e==="change")return Ks(t)}function gw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Kt=typeof Object.is=="function"?Object.is:gw;function Uo(e,t){if(Kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var u=r[i];if(!g.call(t,u)||!Kt(e[u],t[u]))return!1}return!0}function Gd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yd(e,t){var r=Gd(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Gd(r)}}function Qd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xd(){for(var e=window,t=Ve();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Ve(e.document)}return t}function fa(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 vw(e){var t=Xd(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Qd(r.ownerDocument.documentElement,r)){if(i!==null&&fa(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var u=r.textContent.length,p=Math.min(i.start,u);i=i.end===void 0?p:Math.min(i.end,u),!e.extend&&p>i&&(u=i,i=p,p=u),u=Yd(r,p);var w=Yd(r,i);u&&w&&(e.rangeCount!==1||e.anchorNode!==u.node||e.anchorOffset!==u.offset||e.focusNode!==w.node||e.focusOffset!==w.offset)&&(t=t.createRange(),t.setStart(u.node,u.offset),e.removeAllRanges(),p>i?(e.addRange(t),e.extend(w.node,w.offset)):(t.setEnd(w.node,w.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var xw=m&&"documentMode"in document&&11>=document.documentMode,Ur=null,pa=null,Wo=null,ma=!1;function qd(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ma||Ur==null||Ur!==Ve(i)||(i=Ur,"selectionStart"in i&&fa(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Wo&&Uo(Wo,i)||(Wo=i,i=Xs(pa,"onSelect"),0<i.length&&(t=new oa("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=Ur)))}function Gs(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Wr={animationend:Gs("Animation","AnimationEnd"),animationiteration:Gs("Animation","AnimationIteration"),animationstart:Gs("Animation","AnimationStart"),transitionend:Gs("Transition","TransitionEnd")},ha={},Zd={};m&&(Zd=document.createElement("div").style,"AnimationEvent"in window||(delete Wr.animationend.animation,delete Wr.animationiteration.animation,delete Wr.animationstart.animation),"TransitionEvent"in window||delete Wr.transitionend.transition);function Ys(e){if(ha[e])return ha[e];if(!Wr[e])return e;var t=Wr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Zd)return ha[e]=t[r];return e}var Jd=Ys("animationend"),ef=Ys("animationiteration"),tf=Ys("animationstart"),nf=Ys("transitionend"),rf=new Map,of="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 Vn(e,t){rf.set(e,t),d(t,[e])}for(var ga=0;ga<of.length;ga++){var va=of[ga],yw=va.toLowerCase(),ww=va[0].toUpperCase()+va.slice(1);Vn(yw,"on"+ww)}Vn(Jd,"onAnimationEnd"),Vn(ef,"onAnimationIteration"),Vn(tf,"onAnimationStart"),Vn("dblclick","onDoubleClick"),Vn("focusin","onFocus"),Vn("focusout","onBlur"),Vn(nf,"onTransitionEnd"),f("onMouseEnter",["mouseout","mouseover"]),f("onMouseLeave",["mouseout","mouseover"]),f("onPointerEnter",["pointerout","pointerover"]),f("onPointerLeave",["pointerout","pointerover"]),d("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),d("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),d("onBeforeInput",["compositionend","keypress","textInput","paste"]),d("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ho="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(" "),Sw=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ho));function sf(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,yy(i,t,void 0,e),e.currentTarget=null}function lf(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],u=i.event;i=i.listeners;e:{var p=void 0;if(t)for(var w=i.length-1;0<=w;w--){var j=i[w],_=j.instance,L=j.currentTarget;if(j=j.listener,_!==p&&u.isPropagationStopped())break e;sf(u,j,L),p=_}else for(w=0;w<i.length;w++){if(j=i[w],_=j.instance,L=j.currentTarget,j=j.listener,_!==p&&u.isPropagationStopped())break e;sf(u,j,L),p=_}}}if(As)throw e=Yi,As=!1,Yi=null,e}function De(e,t){var r=t[ja];r===void 0&&(r=t[ja]=new Set);var i=e+"__bubble";r.has(i)||(af(t,e,2,!1),r.add(i))}function xa(e,t,r){var i=0;t&&(i|=4),af(r,e,i,t)}var Qs="_reactListening"+Math.random().toString(36).slice(2);function Ko(e){if(!e[Qs]){e[Qs]=!0,a.forEach(function(r){r!=="selectionchange"&&(Sw.has(r)||xa(r,!1,e),xa(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Qs]||(t[Qs]=!0,xa("selectionchange",!1,t))}}function af(e,t,r,i){switch(Pd(t)){case 1:var u=Oy;break;case 4:u=Dy;break;default:u=ta}r=u.bind(null,t,r,e),u=void 0,!Gi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),i?u!==void 0?e.addEventListener(t,r,{capture:!0,passive:u}):e.addEventListener(t,r,!0):u!==void 0?e.addEventListener(t,r,{passive:u}):e.addEventListener(t,r,!1)}function ya(e,t,r,i,u){var p=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var w=i.tag;if(w===3||w===4){var j=i.stateNode.containerInfo;if(j===u||j.nodeType===8&&j.parentNode===u)break;if(w===4)for(w=i.return;w!==null;){var _=w.tag;if((_===3||_===4)&&(_=w.stateNode.containerInfo,_===u||_.nodeType===8&&_.parentNode===u))return;w=w.return}for(;j!==null;){if(w=mr(j),w===null)return;if(_=w.tag,_===5||_===6){i=p=w;continue e}j=j.parentNode}}i=i.return}fd(function(){var L=p,G=Wi(r),Y=[];e:{var K=rf.get(e);if(K!==void 0){var te=oa,le=e;switch(e){case"keypress":if(Us(r)===0)break e;case"keydown":case"keyup":te=qy;break;case"focusin":le="focus",te=ia;break;case"focusout":le="blur",te=ia;break;case"beforeblur":case"afterblur":te=ia;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=Md;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=Fy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=ew;break;case Jd:case ef:case tf:te=By;break;case nf:te=nw;break;case"scroll":te=Ly;break;case"wheel":te=ow;break;case"copy":case"cut":case"paste":te=Wy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=Od}var ce=(t&4)!==0,Ke=!ce&&e==="scroll",M=ce?K!==null?K+"Capture":null:K;ce=[];for(var P=L,I;P!==null;){I=P;var X=I.stateNode;if(I.tag===5&&X!==null&&(I=X,M!==null&&(X=_o(P,M),X!=null&&ce.push(Go(P,X,I)))),Ke)break;P=P.return}0<ce.length&&(K=new te(K,le,null,r,G),Y.push({event:K,listeners:ce}))}}if((t&7)===0){e:{if(K=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",K&&r!==Ui&&(le=r.relatedTarget||r.fromElement)&&(mr(le)||le[yn]))break e;if((te||K)&&(K=G.window===G?G:(K=G.ownerDocument)?K.defaultView||K.parentWindow:window,te?(le=r.relatedTarget||r.toElement,te=L,le=le?mr(le):null,le!==null&&(Ke=pr(le),le!==Ke||le.tag!==5&&le.tag!==6)&&(le=null)):(te=null,le=L),te!==le)){if(ce=Md,X="onMouseLeave",M="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(ce=Od,X="onPointerLeave",M="onPointerEnter",P="pointer"),Ke=te==null?K:Gr(te),I=le==null?K:Gr(le),K=new ce(X,P+"leave",te,r,G),K.target=Ke,K.relatedTarget=I,X=null,mr(G)===L&&(ce=new ce(M,P+"enter",le,r,G),ce.target=I,ce.relatedTarget=Ke,X=ce),Ke=X,te&&le)t:{for(ce=te,M=le,P=0,I=ce;I;I=Hr(I))P++;for(I=0,X=M;X;X=Hr(X))I++;for(;0<P-I;)ce=Hr(ce),P--;for(;0<I-P;)M=Hr(M),I--;for(;P--;){if(ce===M||M!==null&&ce===M.alternate)break t;ce=Hr(ce),M=Hr(M)}ce=null}else ce=null;te!==null&&cf(Y,K,te,ce,!1),le!==null&&Ke!==null&&cf(Y,Ke,le,ce,!0)}}e:{if(K=L?Gr(L):window,te=K.nodeName&&K.nodeName.toLowerCase(),te==="select"||te==="input"&&K.type==="file")var de=dw;else if(Vd(K))if(Ud)de=hw;else{de=pw;var Se=fw}else(te=K.nodeName)&&te.toLowerCase()==="input"&&(K.type==="checkbox"||K.type==="radio")&&(de=mw);if(de&&(de=de(e,L))){Bd(Y,de,r,G);break e}Se&&Se(e,K,L),e==="focusout"&&(Se=K._wrapperState)&&Se.controlled&&K.type==="number"&&On(K,"number",K.value)}switch(Se=L?Gr(L):window,e){case"focusin":(Vd(Se)||Se.contentEditable==="true")&&(Ur=Se,pa=L,Wo=null);break;case"focusout":Wo=pa=Ur=null;break;case"mousedown":ma=!0;break;case"contextmenu":case"mouseup":case"dragend":ma=!1,qd(Y,r,G);break;case"selectionchange":if(xw)break;case"keydown":case"keyup":qd(Y,r,G)}var Ce;if(ca)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else Br?Fd(e,r)&&(je="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(je="onCompositionStart");je&&(Dd&&r.locale!=="ko"&&(Br||je!=="onCompositionStart"?je==="onCompositionEnd"&&Br&&(Ce=Td()):($n=G,ra="value"in $n?$n.value:$n.textContent,Br=!0)),Se=Xs(L,je),0<Se.length&&(je=new Id(je,e,null,r,G),Y.push({event:je,listeners:Se}),Ce?je.data=Ce:(Ce=$d(r),Ce!==null&&(je.data=Ce)))),(Ce=lw?iw(e,r):aw(e,r))&&(L=Xs(L,"onBeforeInput"),0<L.length&&(G=new Id("onBeforeInput","beforeinput",null,r,G),Y.push({event:G,listeners:L}),G.data=Ce))}lf(Y,t)})}function Go(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Xs(e,t){for(var r=t+"Capture",i=[];e!==null;){var u=e,p=u.stateNode;u.tag===5&&p!==null&&(u=p,p=_o(e,r),p!=null&&i.unshift(Go(e,p,u)),p=_o(e,t),p!=null&&i.push(Go(e,p,u))),e=e.return}return i}function Hr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function cf(e,t,r,i,u){for(var p=t._reactName,w=[];r!==null&&r!==i;){var j=r,_=j.alternate,L=j.stateNode;if(_!==null&&_===i)break;j.tag===5&&L!==null&&(j=L,u?(_=_o(r,p),_!=null&&w.unshift(Go(r,_,j))):u||(_=_o(r,p),_!=null&&w.push(Go(r,_,j)))),r=r.return}w.length!==0&&e.push({event:t,listeners:w})}var Cw=/\r\n?/g,Nw=/\u0000|\uFFFD/g;function uf(e){return(typeof e=="string"?e:""+e).replace(Cw,`
|
|
38
|
+
`).replace(Nw,"")}function qs(e,t,r){if(t=uf(t),uf(e)!==t&&r)throw Error(s(425))}function Zs(){}var wa=null,Sa=null;function Ca(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 Na=typeof setTimeout=="function"?setTimeout:void 0,bw=typeof clearTimeout=="function"?clearTimeout:void 0,df=typeof Promise=="function"?Promise:void 0,jw=typeof queueMicrotask=="function"?queueMicrotask:typeof df<"u"?function(e){return df.resolve(null).then(e).catch(kw)}:Na;function kw(e){setTimeout(function(){throw e})}function ba(e,t){var r=t,i=0;do{var u=r.nextSibling;if(e.removeChild(r),u&&u.nodeType===8)if(r=u.data,r==="/$"){if(i===0){e.removeChild(u),Lo(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=u}while(r);Lo(t)}function Bn(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 ff(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Kr=Math.random().toString(36).slice(2),an="__reactFiber$"+Kr,Yo="__reactProps$"+Kr,yn="__reactContainer$"+Kr,ja="__reactEvents$"+Kr,Ew="__reactListeners$"+Kr,_w="__reactHandles$"+Kr;function mr(e){var t=e[an];if(t)return t;for(var r=e.parentNode;r;){if(t=r[yn]||r[an]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=ff(e);e!==null;){if(r=e[an])return r;e=ff(e)}return t}e=r,r=e.parentNode}return null}function Qo(e){return e=e[an]||e[yn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Gr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(s(33))}function Js(e){return e[Yo]||null}var ka=[],Yr=-1;function Un(e){return{current:e}}function Le(e){0>Yr||(e.current=ka[Yr],ka[Yr]=null,Yr--)}function Oe(e,t){Yr++,ka[Yr]=e.current,e.current=t}var Wn={},ct=Un(Wn),gt=Un(!1),hr=Wn;function Qr(e,t){var r=e.type.contextTypes;if(!r)return Wn;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var u={},p;for(p in r)u[p]=t[p];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=u),u}function vt(e){return e=e.childContextTypes,e!=null}function el(){Le(gt),Le(ct)}function pf(e,t,r){if(ct.current!==Wn)throw Error(s(168));Oe(ct,t),Oe(gt,r)}function mf(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var u in i)if(!(u in t))throw Error(s(108,q(e)||"Unknown",u));return O({},r,i)}function tl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wn,hr=ct.current,Oe(ct,e),Oe(gt,gt.current),!0}function hf(e,t,r){var i=e.stateNode;if(!i)throw Error(s(169));r?(e=mf(e,t,hr),i.__reactInternalMemoizedMergedChildContext=e,Le(gt),Le(ct),Oe(ct,e)):Le(gt),Oe(gt,r)}var wn=null,nl=!1,Ea=!1;function gf(e){wn===null?wn=[e]:wn.push(e)}function Rw(e){nl=!0,gf(e)}function Hn(){if(!Ea&&wn!==null){Ea=!0;var e=0,t=Ie;try{var r=wn;for(Ie=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}wn=null,nl=!1}catch(u){throw wn!==null&&(wn=wn.slice(e+1)),vd(Qi,Hn),u}finally{Ie=t,Ea=!1}}return null}var Xr=[],qr=0,rl=null,ol=0,Dt=[],Lt=0,gr=null,Sn=1,Cn="";function vr(e,t){Xr[qr++]=ol,Xr[qr++]=rl,rl=e,ol=t}function vf(e,t,r){Dt[Lt++]=Sn,Dt[Lt++]=Cn,Dt[Lt++]=gr,gr=e;var i=Sn;e=Cn;var u=32-Ht(i)-1;i&=~(1<<u),r+=1;var p=32-Ht(t)+u;if(30<p){var w=u-u%5;p=(i&(1<<w)-1).toString(32),i>>=w,u-=w,Sn=1<<32-Ht(t)+u|r<<u|i,Cn=p+e}else Sn=1<<p|r<<u|i,Cn=e}function _a(e){e.return!==null&&(vr(e,1),vf(e,1,0))}function Ra(e){for(;e===rl;)rl=Xr[--qr],Xr[qr]=null,ol=Xr[--qr],Xr[qr]=null;for(;e===gr;)gr=Dt[--Lt],Dt[Lt]=null,Cn=Dt[--Lt],Dt[Lt]=null,Sn=Dt[--Lt],Dt[Lt]=null}var Rt=null,Pt=null,ze=!1,Gt=null;function xf(e,t){var r=Vt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function yf(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Rt=e,Pt=Bn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Rt=e,Pt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=gr!==null?{id:Sn,overflow:Cn}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Vt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Rt=e,Pt=null,!0):!1;default:return!1}}function Pa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ta(e){if(ze){var t=Pt;if(t){var r=t;if(!yf(e,t)){if(Pa(e))throw Error(s(418));t=Bn(r.nextSibling);var i=Rt;t&&yf(e,t)?xf(i,r):(e.flags=e.flags&-4097|2,ze=!1,Rt=e)}}else{if(Pa(e))throw Error(s(418));e.flags=e.flags&-4097|2,ze=!1,Rt=e}}}function wf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Rt=e}function sl(e){if(e!==Rt)return!1;if(!ze)return wf(e),ze=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ca(e.type,e.memoizedProps)),t&&(t=Pt)){if(Pa(e))throw Sf(),Error(s(418));for(;t;)xf(e,t),t=Bn(t.nextSibling)}if(wf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Pt=Bn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Pt=null}}else Pt=Rt?Bn(e.stateNode.nextSibling):null;return!0}function Sf(){for(var e=Pt;e;)e=Bn(e.nextSibling)}function Zr(){Pt=Rt=null,ze=!1}function Aa(e){Gt===null?Gt=[e]:Gt.push(e)}var Pw=D.ReactCurrentBatchConfig;function Xo(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(s(309));var i=r.stateNode}if(!i)throw Error(s(147,e));var u=i,p=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===p?t.ref:(t=function(w){var j=u.refs;w===null?delete j[p]:j[p]=w},t._stringRef=p,t)}if(typeof e!="string")throw Error(s(284));if(!r._owner)throw Error(s(290,e))}return e}function ll(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Cf(e){var t=e._init;return t(e._payload)}function Nf(e){function t(M,P){if(e){var I=M.deletions;I===null?(M.deletions=[P],M.flags|=16):I.push(P)}}function r(M,P){if(!e)return null;for(;P!==null;)t(M,P),P=P.sibling;return null}function i(M,P){for(M=new Map;P!==null;)P.key!==null?M.set(P.key,P):M.set(P.index,P),P=P.sibling;return M}function u(M,P){return M=Jn(M,P),M.index=0,M.sibling=null,M}function p(M,P,I){return M.index=I,e?(I=M.alternate,I!==null?(I=I.index,I<P?(M.flags|=2,P):I):(M.flags|=2,P)):(M.flags|=1048576,P)}function w(M){return e&&M.alternate===null&&(M.flags|=2),M}function j(M,P,I,X){return P===null||P.tag!==6?(P=Nc(I,M.mode,X),P.return=M,P):(P=u(P,I),P.return=M,P)}function _(M,P,I,X){var de=I.type;return de===$?G(M,P,I.props.children,X,I.key):P!==null&&(P.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===J&&Cf(de)===P.type)?(X=u(P,I.props),X.ref=Xo(M,P,I),X.return=M,X):(X=Pl(I.type,I.key,I.props,null,M.mode,X),X.ref=Xo(M,P,I),X.return=M,X)}function L(M,P,I,X){return P===null||P.tag!==4||P.stateNode.containerInfo!==I.containerInfo||P.stateNode.implementation!==I.implementation?(P=bc(I,M.mode,X),P.return=M,P):(P=u(P,I.children||[]),P.return=M,P)}function G(M,P,I,X,de){return P===null||P.tag!==7?(P=jr(I,M.mode,X,de),P.return=M,P):(P=u(P,I),P.return=M,P)}function Y(M,P,I){if(typeof P=="string"&&P!==""||typeof P=="number")return P=Nc(""+P,M.mode,I),P.return=M,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case W:return I=Pl(P.type,P.key,P.props,null,M.mode,I),I.ref=Xo(M,null,P),I.return=M,I;case F:return P=bc(P,M.mode,I),P.return=M,P;case J:var X=P._init;return Y(M,X(P._payload),I)}if(jo(P)||B(P))return P=jr(P,M.mode,I,null),P.return=M,P;ll(M,P)}return null}function K(M,P,I,X){var de=P!==null?P.key:null;if(typeof I=="string"&&I!==""||typeof I=="number")return de!==null?null:j(M,P,""+I,X);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case W:return I.key===de?_(M,P,I,X):null;case F:return I.key===de?L(M,P,I,X):null;case J:return de=I._init,K(M,P,de(I._payload),X)}if(jo(I)||B(I))return de!==null?null:G(M,P,I,X,null);ll(M,I)}return null}function te(M,P,I,X,de){if(typeof X=="string"&&X!==""||typeof X=="number")return M=M.get(I)||null,j(P,M,""+X,de);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case W:return M=M.get(X.key===null?I:X.key)||null,_(P,M,X,de);case F:return M=M.get(X.key===null?I:X.key)||null,L(P,M,X,de);case J:var Se=X._init;return te(M,P,I,Se(X._payload),de)}if(jo(X)||B(X))return M=M.get(I)||null,G(P,M,X,de,null);ll(P,X)}return null}function le(M,P,I,X){for(var de=null,Se=null,Ce=P,je=P=0,rt=null;Ce!==null&&je<I.length;je++){Ce.index>je?(rt=Ce,Ce=null):rt=Ce.sibling;var Me=K(M,Ce,I[je],X);if(Me===null){Ce===null&&(Ce=rt);break}e&&Ce&&Me.alternate===null&&t(M,Ce),P=p(Me,P,je),Se===null?de=Me:Se.sibling=Me,Se=Me,Ce=rt}if(je===I.length)return r(M,Ce),ze&&vr(M,je),de;if(Ce===null){for(;je<I.length;je++)Ce=Y(M,I[je],X),Ce!==null&&(P=p(Ce,P,je),Se===null?de=Ce:Se.sibling=Ce,Se=Ce);return ze&&vr(M,je),de}for(Ce=i(M,Ce);je<I.length;je++)rt=te(Ce,M,je,I[je],X),rt!==null&&(e&&rt.alternate!==null&&Ce.delete(rt.key===null?je:rt.key),P=p(rt,P,je),Se===null?de=rt:Se.sibling=rt,Se=rt);return e&&Ce.forEach(function(er){return t(M,er)}),ze&&vr(M,je),de}function ce(M,P,I,X){var de=B(I);if(typeof de!="function")throw Error(s(150));if(I=de.call(I),I==null)throw Error(s(151));for(var Se=de=null,Ce=P,je=P=0,rt=null,Me=I.next();Ce!==null&&!Me.done;je++,Me=I.next()){Ce.index>je?(rt=Ce,Ce=null):rt=Ce.sibling;var er=K(M,Ce,Me.value,X);if(er===null){Ce===null&&(Ce=rt);break}e&&Ce&&er.alternate===null&&t(M,Ce),P=p(er,P,je),Se===null?de=er:Se.sibling=er,Se=er,Ce=rt}if(Me.done)return r(M,Ce),ze&&vr(M,je),de;if(Ce===null){for(;!Me.done;je++,Me=I.next())Me=Y(M,Me.value,X),Me!==null&&(P=p(Me,P,je),Se===null?de=Me:Se.sibling=Me,Se=Me);return ze&&vr(M,je),de}for(Ce=i(M,Ce);!Me.done;je++,Me=I.next())Me=te(Ce,M,je,Me.value,X),Me!==null&&(e&&Me.alternate!==null&&Ce.delete(Me.key===null?je:Me.key),P=p(Me,P,je),Se===null?de=Me:Se.sibling=Me,Se=Me);return e&&Ce.forEach(function(c0){return t(M,c0)}),ze&&vr(M,je),de}function Ke(M,P,I,X){if(typeof I=="object"&&I!==null&&I.type===$&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case W:e:{for(var de=I.key,Se=P;Se!==null;){if(Se.key===de){if(de=I.type,de===$){if(Se.tag===7){r(M,Se.sibling),P=u(Se,I.props.children),P.return=M,M=P;break e}}else if(Se.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===J&&Cf(de)===Se.type){r(M,Se.sibling),P=u(Se,I.props),P.ref=Xo(M,Se,I),P.return=M,M=P;break e}r(M,Se);break}else t(M,Se);Se=Se.sibling}I.type===$?(P=jr(I.props.children,M.mode,X,I.key),P.return=M,M=P):(X=Pl(I.type,I.key,I.props,null,M.mode,X),X.ref=Xo(M,P,I),X.return=M,M=X)}return w(M);case F:e:{for(Se=I.key;P!==null;){if(P.key===Se)if(P.tag===4&&P.stateNode.containerInfo===I.containerInfo&&P.stateNode.implementation===I.implementation){r(M,P.sibling),P=u(P,I.children||[]),P.return=M,M=P;break e}else{r(M,P);break}else t(M,P);P=P.sibling}P=bc(I,M.mode,X),P.return=M,M=P}return w(M);case J:return Se=I._init,Ke(M,P,Se(I._payload),X)}if(jo(I))return le(M,P,I,X);if(B(I))return ce(M,P,I,X);ll(M,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,P!==null&&P.tag===6?(r(M,P.sibling),P=u(P,I),P.return=M,M=P):(r(M,P),P=Nc(I,M.mode,X),P.return=M,M=P),w(M)):r(M,P)}return Ke}var Jr=Nf(!0),bf=Nf(!1),il=Un(null),al=null,eo=null,Ma=null;function Ia(){Ma=eo=al=null}function Oa(e){var t=il.current;Le(il),e._currentValue=t}function Da(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function to(e,t){al=e,Ma=eo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(xt=!0),e.firstContext=null)}function zt(e){var t=e._currentValue;if(Ma!==e)if(e={context:e,memoizedValue:t,next:null},eo===null){if(al===null)throw Error(s(308));eo=e,al.dependencies={lanes:0,firstContext:e}}else eo=eo.next=e;return t}var xr=null;function La(e){xr===null?xr=[e]:xr.push(e)}function jf(e,t,r,i){var u=t.interleaved;return u===null?(r.next=r,La(t)):(r.next=u.next,u.next=r),t.interleaved=r,Nn(e,i)}function Nn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Kn=!1;function za(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kf(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 bn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Gn(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Ae&2)!==0){var u=i.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),i.pending=t,Nn(e,r)}return u=i.interleaved,u===null?(t.next=t,La(i)):(t.next=u.next,u.next=t),i.interleaved=t,Nn(e,r)}function cl(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Zi(e,r)}}function Ef(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var u=null,p=null;if(r=r.firstBaseUpdate,r!==null){do{var w={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};p===null?u=p=w:p=p.next=w,r=r.next}while(r!==null);p===null?u=p=t:p=p.next=t}else u=p=t;r={baseState:i.baseState,firstBaseUpdate:u,lastBaseUpdate:p,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function ul(e,t,r,i){var u=e.updateQueue;Kn=!1;var p=u.firstBaseUpdate,w=u.lastBaseUpdate,j=u.shared.pending;if(j!==null){u.shared.pending=null;var _=j,L=_.next;_.next=null,w===null?p=L:w.next=L,w=_;var G=e.alternate;G!==null&&(G=G.updateQueue,j=G.lastBaseUpdate,j!==w&&(j===null?G.firstBaseUpdate=L:j.next=L,G.lastBaseUpdate=_))}if(p!==null){var Y=u.baseState;w=0,G=L=_=null,j=p;do{var K=j.lane,te=j.eventTime;if((i&K)===K){G!==null&&(G=G.next={eventTime:te,lane:0,tag:j.tag,payload:j.payload,callback:j.callback,next:null});e:{var le=e,ce=j;switch(K=t,te=r,ce.tag){case 1:if(le=ce.payload,typeof le=="function"){Y=le.call(te,Y,K);break e}Y=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=ce.payload,K=typeof le=="function"?le.call(te,Y,K):le,K==null)break e;Y=O({},Y,K);break e;case 2:Kn=!0}}j.callback!==null&&j.lane!==0&&(e.flags|=64,K=u.effects,K===null?u.effects=[j]:K.push(j))}else te={eventTime:te,lane:K,tag:j.tag,payload:j.payload,callback:j.callback,next:null},G===null?(L=G=te,_=Y):G=G.next=te,w|=K;if(j=j.next,j===null){if(j=u.shared.pending,j===null)break;K=j,j=K.next,K.next=null,u.lastBaseUpdate=K,u.shared.pending=null}}while(!0);if(G===null&&(_=Y),u.baseState=_,u.firstBaseUpdate=L,u.lastBaseUpdate=G,t=u.shared.interleaved,t!==null){u=t;do w|=u.lane,u=u.next;while(u!==t)}else p===null&&(u.shared.lanes=0);Sr|=w,e.lanes=w,e.memoizedState=Y}}function _f(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],u=i.callback;if(u!==null){if(i.callback=null,i=r,typeof u!="function")throw Error(s(191,u));u.call(i)}}}var qo={},cn=Un(qo),Zo=Un(qo),Jo=Un(qo);function yr(e){if(e===qo)throw Error(s(174));return e}function Fa(e,t){switch(Oe(Jo,t),Oe(Zo,e),Oe(cn,qo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$i(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=$i(t,e)}Le(cn),Oe(cn,t)}function no(){Le(cn),Le(Zo),Le(Jo)}function Rf(e){yr(Jo.current);var t=yr(cn.current),r=$i(t,e.type);t!==r&&(Oe(Zo,e),Oe(cn,r))}function $a(e){Zo.current===e&&(Le(cn),Le(Zo))}var Fe=Un(0);function dl(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)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 Va=[];function Ba(){for(var e=0;e<Va.length;e++)Va[e]._workInProgressVersionPrimary=null;Va.length=0}var fl=D.ReactCurrentDispatcher,Ua=D.ReactCurrentBatchConfig,wr=0,$e=null,Xe=null,tt=null,pl=!1,es=!1,ts=0,Tw=0;function ut(){throw Error(s(321))}function Wa(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Kt(e[r],t[r]))return!1;return!0}function Ha(e,t,r,i,u,p){if(wr=p,$e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fl.current=e===null||e.memoizedState===null?Ow:Dw,e=r(i,u),es){p=0;do{if(es=!1,ts=0,25<=p)throw Error(s(301));p+=1,tt=Xe=null,t.updateQueue=null,fl.current=Lw,e=r(i,u)}while(es)}if(fl.current=gl,t=Xe!==null&&Xe.next!==null,wr=0,tt=Xe=$e=null,pl=!1,t)throw Error(s(300));return e}function Ka(){var e=ts!==0;return ts=0,e}function un(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tt===null?$e.memoizedState=tt=e:tt=tt.next=e,tt}function Ft(){if(Xe===null){var e=$e.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=tt===null?$e.memoizedState:tt.next;if(t!==null)tt=t,Xe=e;else{if(e===null)throw Error(s(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},tt===null?$e.memoizedState=tt=e:tt=tt.next=e}return tt}function ns(e,t){return typeof t=="function"?t(e):t}function Ga(e){var t=Ft(),r=t.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=e;var i=Xe,u=i.baseQueue,p=r.pending;if(p!==null){if(u!==null){var w=u.next;u.next=p.next,p.next=w}i.baseQueue=u=p,r.pending=null}if(u!==null){p=u.next,i=i.baseState;var j=w=null,_=null,L=p;do{var G=L.lane;if((wr&G)===G)_!==null&&(_=_.next={lane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),i=L.hasEagerState?L.eagerState:e(i,L.action);else{var Y={lane:G,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null};_===null?(j=_=Y,w=i):_=_.next=Y,$e.lanes|=G,Sr|=G}L=L.next}while(L!==null&&L!==p);_===null?w=i:_.next=j,Kt(i,t.memoizedState)||(xt=!0),t.memoizedState=i,t.baseState=w,t.baseQueue=_,r.lastRenderedState=i}if(e=r.interleaved,e!==null){u=e;do p=u.lane,$e.lanes|=p,Sr|=p,u=u.next;while(u!==e)}else u===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Ya(e){var t=Ft(),r=t.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=e;var i=r.dispatch,u=r.pending,p=t.memoizedState;if(u!==null){r.pending=null;var w=u=u.next;do p=e(p,w.action),w=w.next;while(w!==u);Kt(p,t.memoizedState)||(xt=!0),t.memoizedState=p,t.baseQueue===null&&(t.baseState=p),r.lastRenderedState=p}return[p,i]}function Pf(){}function Tf(e,t){var r=$e,i=Ft(),u=t(),p=!Kt(i.memoizedState,u);if(p&&(i.memoizedState=u,xt=!0),i=i.queue,Qa(If.bind(null,r,i,e),[e]),i.getSnapshot!==t||p||tt!==null&&tt.memoizedState.tag&1){if(r.flags|=2048,rs(9,Mf.bind(null,r,i,u,t),void 0,null),nt===null)throw Error(s(349));(wr&30)!==0||Af(r,t,u)}return u}function Af(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Mf(e,t,r,i){t.value=r,t.getSnapshot=i,Of(t)&&Df(e)}function If(e,t,r){return r(function(){Of(t)&&Df(e)})}function Of(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Kt(e,r)}catch{return!0}}function Df(e){var t=Nn(e,1);t!==null&&qt(t,e,1,-1)}function Lf(e){var t=un();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ns,lastRenderedState:e},t.queue=e,e=e.dispatch=Iw.bind(null,$e,e),[t.memoizedState,e]}function rs(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e)),e}function zf(){return Ft().memoizedState}function ml(e,t,r,i){var u=un();$e.flags|=e,u.memoizedState=rs(1|t,r,void 0,i===void 0?null:i)}function hl(e,t,r,i){var u=Ft();i=i===void 0?null:i;var p=void 0;if(Xe!==null){var w=Xe.memoizedState;if(p=w.destroy,i!==null&&Wa(i,w.deps)){u.memoizedState=rs(t,r,p,i);return}}$e.flags|=e,u.memoizedState=rs(1|t,r,p,i)}function Ff(e,t){return ml(8390656,8,e,t)}function Qa(e,t){return hl(2048,8,e,t)}function $f(e,t){return hl(4,2,e,t)}function Vf(e,t){return hl(4,4,e,t)}function Bf(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 Uf(e,t,r){return r=r!=null?r.concat([e]):null,hl(4,4,Bf.bind(null,t,e),r)}function Xa(){}function Wf(e,t){var r=Ft();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Wa(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function Hf(e,t){var r=Ft();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Wa(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function Kf(e,t,r){return(wr&21)===0?(e.baseState&&(e.baseState=!1,xt=!0),e.memoizedState=r):(Kt(r,t)||(r=Sd(),$e.lanes|=r,Sr|=r,e.baseState=!0),t)}function Aw(e,t){var r=Ie;Ie=r!==0&&4>r?r:4,e(!0);var i=Ua.transition;Ua.transition={};try{e(!1),t()}finally{Ie=r,Ua.transition=i}}function Gf(){return Ft().memoizedState}function Mw(e,t,r){var i=qn(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},Yf(e))Qf(t,r);else if(r=jf(e,t,r,i),r!==null){var u=mt();qt(r,e,i,u),Xf(r,t,i)}}function Iw(e,t,r){var i=qn(e),u={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(Yf(e))Qf(t,u);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=t.lastRenderedReducer,p!==null))try{var w=t.lastRenderedState,j=p(w,r);if(u.hasEagerState=!0,u.eagerState=j,Kt(j,w)){var _=t.interleaved;_===null?(u.next=u,La(t)):(u.next=_.next,_.next=u),t.interleaved=u;return}}catch{}finally{}r=jf(e,t,u,i),r!==null&&(u=mt(),qt(r,e,i,u),Xf(r,t,i))}}function Yf(e){var t=e.alternate;return e===$e||t!==null&&t===$e}function Qf(e,t){es=pl=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Xf(e,t,r){if((r&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Zi(e,r)}}var gl={readContext:zt,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},Ow={readContext:zt,useCallback:function(e,t){return un().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:Ff,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ml(4194308,4,Bf.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ml(4194308,4,e,t)},useInsertionEffect:function(e,t){return ml(4,2,e,t)},useMemo:function(e,t){var r=un();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=un();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Mw.bind(null,$e,e),[i.memoizedState,e]},useRef:function(e){var t=un();return e={current:e},t.memoizedState=e},useState:Lf,useDebugValue:Xa,useDeferredValue:function(e){return un().memoizedState=e},useTransition:function(){var e=Lf(!1),t=e[0];return e=Aw.bind(null,e[1]),un().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=$e,u=un();if(ze){if(r===void 0)throw Error(s(407));r=r()}else{if(r=t(),nt===null)throw Error(s(349));(wr&30)!==0||Af(i,t,r)}u.memoizedState=r;var p={value:r,getSnapshot:t};return u.queue=p,Ff(If.bind(null,i,p,e),[e]),i.flags|=2048,rs(9,Mf.bind(null,i,p,r,t),void 0,null),r},useId:function(){var e=un(),t=nt.identifierPrefix;if(ze){var r=Cn,i=Sn;r=(i&~(1<<32-Ht(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=ts++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Tw++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Dw={readContext:zt,useCallback:Wf,useContext:zt,useEffect:Qa,useImperativeHandle:Uf,useInsertionEffect:$f,useLayoutEffect:Vf,useMemo:Hf,useReducer:Ga,useRef:zf,useState:function(){return Ga(ns)},useDebugValue:Xa,useDeferredValue:function(e){var t=Ft();return Kf(t,Xe.memoizedState,e)},useTransition:function(){var e=Ga(ns)[0],t=Ft().memoizedState;return[e,t]},useMutableSource:Pf,useSyncExternalStore:Tf,useId:Gf,unstable_isNewReconciler:!1},Lw={readContext:zt,useCallback:Wf,useContext:zt,useEffect:Qa,useImperativeHandle:Uf,useInsertionEffect:$f,useLayoutEffect:Vf,useMemo:Hf,useReducer:Ya,useRef:zf,useState:function(){return Ya(ns)},useDebugValue:Xa,useDeferredValue:function(e){var t=Ft();return Xe===null?t.memoizedState=e:Kf(t,Xe.memoizedState,e)},useTransition:function(){var e=Ya(ns)[0],t=Ft().memoizedState;return[e,t]},useMutableSource:Pf,useSyncExternalStore:Tf,useId:Gf,unstable_isNewReconciler:!1};function Yt(e,t){if(e&&e.defaultProps){t=O({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function qa(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:O({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var vl={isMounted:function(e){return(e=e._reactInternals)?pr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=mt(),u=qn(e),p=bn(i,u);p.payload=t,r!=null&&(p.callback=r),t=Gn(e,p,u),t!==null&&(qt(t,e,u,i),cl(t,e,u))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=mt(),u=qn(e),p=bn(i,u);p.tag=1,p.payload=t,r!=null&&(p.callback=r),t=Gn(e,p,u),t!==null&&(qt(t,e,u,i),cl(t,e,u))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=mt(),i=qn(e),u=bn(r,i);u.tag=2,t!=null&&(u.callback=t),t=Gn(e,u,i),t!==null&&(qt(t,e,i,r),cl(t,e,i))}};function qf(e,t,r,i,u,p,w){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,p,w):t.prototype&&t.prototype.isPureReactComponent?!Uo(r,i)||!Uo(u,p):!0}function Zf(e,t,r){var i=!1,u=Wn,p=t.contextType;return typeof p=="object"&&p!==null?p=zt(p):(u=vt(t)?hr:ct.current,i=t.contextTypes,p=(i=i!=null)?Qr(e,u):Wn),t=new t(r,p),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=vl,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=u,e.__reactInternalMemoizedMaskedChildContext=p),t}function Jf(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&vl.enqueueReplaceState(t,t.state,null)}function Za(e,t,r,i){var u=e.stateNode;u.props=r,u.state=e.memoizedState,u.refs={},za(e);var p=t.contextType;typeof p=="object"&&p!==null?u.context=zt(p):(p=vt(t)?hr:ct.current,u.context=Qr(e,p)),u.state=e.memoizedState,p=t.getDerivedStateFromProps,typeof p=="function"&&(qa(e,t,p,r),u.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(t=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),t!==u.state&&vl.enqueueReplaceState(u,u.state,null),ul(e,r,u,i),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308)}function ro(e,t){try{var r="",i=t;do r+=ue(i),i=i.return;while(i);var u=r}catch(p){u=`
|
|
39
|
+
Error generating stack: `+p.message+`
|
|
40
|
+
`+p.stack}return{value:e,source:t,stack:u,digest:null}}function Ja(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function ec(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var zw=typeof WeakMap=="function"?WeakMap:Map;function ep(e,t,r){r=bn(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){bl||(bl=!0,hc=i),ec(e,t)},r}function tp(e,t,r){r=bn(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var u=t.value;r.payload=function(){return i(u)},r.callback=function(){ec(e,t)}}var p=e.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(r.callback=function(){ec(e,t),typeof i!="function"&&(Qn===null?Qn=new Set([this]):Qn.add(this));var w=t.stack;this.componentDidCatch(t.value,{componentStack:w!==null?w:""})}),r}function np(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new zw;var u=new Set;i.set(t,u)}else u=i.get(t),u===void 0&&(u=new Set,i.set(t,u));u.has(r)||(u.add(r),e=Zw.bind(null,e,t,r),t.then(e,e))}function rp(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 op(e,t,r,i,u){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=bn(-1,1),t.tag=2,Gn(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=u,e)}var Fw=D.ReactCurrentOwner,xt=!1;function pt(e,t,r,i){t.child=e===null?bf(t,null,r,i):Jr(t,e.child,r,i)}function sp(e,t,r,i,u){r=r.render;var p=t.ref;return to(t,u),i=Ha(e,t,r,i,p,u),r=Ka(),e!==null&&!xt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,jn(e,t,u)):(ze&&r&&_a(t),t.flags|=1,pt(e,t,i,u),t.child)}function lp(e,t,r,i,u){if(e===null){var p=r.type;return typeof p=="function"&&!Cc(p)&&p.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=p,ip(e,t,p,i,u)):(e=Pl(r.type,null,i,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(p=e.child,(e.lanes&u)===0){var w=p.memoizedProps;if(r=r.compare,r=r!==null?r:Uo,r(w,i)&&e.ref===t.ref)return jn(e,t,u)}return t.flags|=1,e=Jn(p,i),e.ref=t.ref,e.return=t,t.child=e}function ip(e,t,r,i,u){if(e!==null){var p=e.memoizedProps;if(Uo(p,i)&&e.ref===t.ref)if(xt=!1,t.pendingProps=i=p,(e.lanes&u)!==0)(e.flags&131072)!==0&&(xt=!0);else return t.lanes=e.lanes,jn(e,t,u)}return tc(e,t,r,i,u)}function ap(e,t,r){var i=t.pendingProps,u=i.children,p=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Oe(so,Tt),Tt|=r;else{if((r&1073741824)===0)return e=p!==null?p.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Oe(so,Tt),Tt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=p!==null?p.baseLanes:r,Oe(so,Tt),Tt|=i}else p!==null?(i=p.baseLanes|r,t.memoizedState=null):i=r,Oe(so,Tt),Tt|=i;return pt(e,t,u,r),t.child}function cp(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function tc(e,t,r,i,u){var p=vt(r)?hr:ct.current;return p=Qr(t,p),to(t,u),r=Ha(e,t,r,i,p,u),i=Ka(),e!==null&&!xt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~u,jn(e,t,u)):(ze&&i&&_a(t),t.flags|=1,pt(e,t,r,u),t.child)}function up(e,t,r,i,u){if(vt(r)){var p=!0;tl(t)}else p=!1;if(to(t,u),t.stateNode===null)yl(e,t),Zf(t,r,i),Za(t,r,i,u),i=!0;else if(e===null){var w=t.stateNode,j=t.memoizedProps;w.props=j;var _=w.context,L=r.contextType;typeof L=="object"&&L!==null?L=zt(L):(L=vt(r)?hr:ct.current,L=Qr(t,L));var G=r.getDerivedStateFromProps,Y=typeof G=="function"||typeof w.getSnapshotBeforeUpdate=="function";Y||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(j!==i||_!==L)&&Jf(t,w,i,L),Kn=!1;var K=t.memoizedState;w.state=K,ul(t,i,w,u),_=t.memoizedState,j!==i||K!==_||gt.current||Kn?(typeof G=="function"&&(qa(t,r,G,i),_=t.memoizedState),(j=Kn||qf(t,r,j,i,K,_,L))?(Y||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(t.flags|=4194308)):(typeof w.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=_),w.props=i,w.state=_,w.context=L,i=j):(typeof w.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{w=t.stateNode,kf(e,t),j=t.memoizedProps,L=t.type===t.elementType?j:Yt(t.type,j),w.props=L,Y=t.pendingProps,K=w.context,_=r.contextType,typeof _=="object"&&_!==null?_=zt(_):(_=vt(r)?hr:ct.current,_=Qr(t,_));var te=r.getDerivedStateFromProps;(G=typeof te=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(j!==Y||K!==_)&&Jf(t,w,i,_),Kn=!1,K=t.memoizedState,w.state=K,ul(t,i,w,u);var le=t.memoizedState;j!==Y||K!==le||gt.current||Kn?(typeof te=="function"&&(qa(t,r,te,i),le=t.memoizedState),(L=Kn||qf(t,r,L,i,K,le,_)||!1)?(G||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(i,le,_),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(i,le,_)),typeof w.componentDidUpdate=="function"&&(t.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof w.componentDidUpdate!="function"||j===e.memoizedProps&&K===e.memoizedState||(t.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&K===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=le),w.props=i,w.state=le,w.context=_,i=L):(typeof w.componentDidUpdate!="function"||j===e.memoizedProps&&K===e.memoizedState||(t.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||j===e.memoizedProps&&K===e.memoizedState||(t.flags|=1024),i=!1)}return nc(e,t,r,i,p,u)}function nc(e,t,r,i,u,p){cp(e,t);var w=(t.flags&128)!==0;if(!i&&!w)return u&&hf(t,r,!1),jn(e,t,p);i=t.stateNode,Fw.current=t;var j=w&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&w?(t.child=Jr(t,e.child,null,p),t.child=Jr(t,null,j,p)):pt(e,t,j,p),t.memoizedState=i.state,u&&hf(t,r,!0),t.child}function dp(e){var t=e.stateNode;t.pendingContext?pf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&pf(e,t.context,!1),Fa(e,t.containerInfo)}function fp(e,t,r,i,u){return Zr(),Aa(u),t.flags|=256,pt(e,t,r,i),t.child}var rc={dehydrated:null,treeContext:null,retryLane:0};function oc(e){return{baseLanes:e,cachePool:null,transitions:null}}function pp(e,t,r){var i=t.pendingProps,u=Fe.current,p=!1,w=(t.flags&128)!==0,j;if((j=w)||(j=e!==null&&e.memoizedState===null?!1:(u&2)!==0),j?(p=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(u|=1),Oe(Fe,u&1),e===null)return Ta(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(w=i.children,e=i.fallback,p?(i=t.mode,p=t.child,w={mode:"hidden",children:w},(i&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=w):p=Tl(w,i,0,null),e=jr(e,i,r,null),p.return=t,e.return=t,p.sibling=e,t.child=p,t.child.memoizedState=oc(r),t.memoizedState=rc,e):sc(t,w));if(u=e.memoizedState,u!==null&&(j=u.dehydrated,j!==null))return $w(e,t,w,i,j,u,r);if(p){p=i.fallback,w=t.mode,u=e.child,j=u.sibling;var _={mode:"hidden",children:i.children};return(w&1)===0&&t.child!==u?(i=t.child,i.childLanes=0,i.pendingProps=_,t.deletions=null):(i=Jn(u,_),i.subtreeFlags=u.subtreeFlags&14680064),j!==null?p=Jn(j,p):(p=jr(p,w,r,null),p.flags|=2),p.return=t,i.return=t,i.sibling=p,t.child=i,i=p,p=t.child,w=e.child.memoizedState,w=w===null?oc(r):{baseLanes:w.baseLanes|r,cachePool:null,transitions:w.transitions},p.memoizedState=w,p.childLanes=e.childLanes&~r,t.memoizedState=rc,i}return p=e.child,e=p.sibling,i=Jn(p,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function sc(e,t){return t=Tl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function xl(e,t,r,i){return i!==null&&Aa(i),Jr(t,e.child,null,r),e=sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $w(e,t,r,i,u,p,w){if(r)return t.flags&256?(t.flags&=-257,i=Ja(Error(s(422))),xl(e,t,w,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(p=i.fallback,u=t.mode,i=Tl({mode:"visible",children:i.children},u,0,null),p=jr(p,u,w,null),p.flags|=2,i.return=t,p.return=t,i.sibling=p,t.child=i,(t.mode&1)!==0&&Jr(t,e.child,null,w),t.child.memoizedState=oc(w),t.memoizedState=rc,p);if((t.mode&1)===0)return xl(e,t,w,null);if(u.data==="$!"){if(i=u.nextSibling&&u.nextSibling.dataset,i)var j=i.dgst;return i=j,p=Error(s(419)),i=Ja(p,i,void 0),xl(e,t,w,i)}if(j=(w&e.childLanes)!==0,xt||j){if(i=nt,i!==null){switch(w&-w){case 4:u=2;break;case 16:u=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:u=32;break;case 536870912:u=268435456;break;default:u=0}u=(u&(i.suspendedLanes|w))!==0?0:u,u!==0&&u!==p.retryLane&&(p.retryLane=u,Nn(e,u),qt(i,e,u,-1))}return Sc(),i=Ja(Error(s(421))),xl(e,t,w,i)}return u.data==="$?"?(t.flags|=128,t.child=e.child,t=Jw.bind(null,e),u._reactRetry=t,null):(e=p.treeContext,Pt=Bn(u.nextSibling),Rt=t,ze=!0,Gt=null,e!==null&&(Dt[Lt++]=Sn,Dt[Lt++]=Cn,Dt[Lt++]=gr,Sn=e.id,Cn=e.overflow,gr=t),t=sc(t,i.children),t.flags|=4096,t)}function mp(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Da(e.return,t,r)}function lc(e,t,r,i,u){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:u}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=i,p.tail=r,p.tailMode=u)}function hp(e,t,r){var i=t.pendingProps,u=i.revealOrder,p=i.tail;if(pt(e,t,i.children,r),i=Fe.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mp(e,r,t);else if(e.tag===19)mp(e,r,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}i&=1}if(Oe(Fe,i),(t.mode&1)===0)t.memoizedState=null;else switch(u){case"forwards":for(r=t.child,u=null;r!==null;)e=r.alternate,e!==null&&dl(e)===null&&(u=r),r=r.sibling;r=u,r===null?(u=t.child,t.child=null):(u=r.sibling,r.sibling=null),lc(t,!1,u,r,p);break;case"backwards":for(r=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&dl(e)===null){t.child=u;break}e=u.sibling,u.sibling=r,r=u,u=e}lc(t,!0,r,null,p);break;case"together":lc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function yl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function jn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Sr|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,r=Jn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Jn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Vw(e,t,r){switch(t.tag){case 3:dp(t),Zr();break;case 5:Rf(t);break;case 1:vt(t.type)&&tl(t);break;case 4:Fa(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,u=t.memoizedProps.value;Oe(il,i._currentValue),i._currentValue=u;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(Oe(Fe,Fe.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?pp(e,t,r):(Oe(Fe,Fe.current&1),e=jn(e,t,r),e!==null?e.sibling:null);Oe(Fe,Fe.current&1);break;case 19:if(i=(r&t.childLanes)!==0,(e.flags&128)!==0){if(i)return hp(e,t,r);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Oe(Fe,Fe.current),i)break;return null;case 22:case 23:return t.lanes=0,ap(e,t,r)}return jn(e,t,r)}var gp,ic,vp,xp;gp=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},ic=function(){},vp=function(e,t,r,i){var u=e.memoizedProps;if(u!==i){e=t.stateNode,yr(cn.current);var p=null;switch(r){case"input":u=Qe(e,u),i=Qe(e,i),p=[];break;case"select":u=O({},u,{value:void 0}),i=O({},i,{value:void 0}),p=[];break;case"textarea":u=Fi(e,u),i=Fi(e,i),p=[];break;default:typeof u.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=Zs)}Vi(r,i);var w;r=null;for(L in u)if(!i.hasOwnProperty(L)&&u.hasOwnProperty(L)&&u[L]!=null)if(L==="style"){var j=u[L];for(w in j)j.hasOwnProperty(w)&&(r||(r={}),r[w]="")}else L!=="dangerouslySetInnerHTML"&&L!=="children"&&L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&L!=="autoFocus"&&(c.hasOwnProperty(L)?p||(p=[]):(p=p||[]).push(L,null));for(L in i){var _=i[L];if(j=u!=null?u[L]:void 0,i.hasOwnProperty(L)&&_!==j&&(_!=null||j!=null))if(L==="style")if(j){for(w in j)!j.hasOwnProperty(w)||_&&_.hasOwnProperty(w)||(r||(r={}),r[w]="");for(w in _)_.hasOwnProperty(w)&&j[w]!==_[w]&&(r||(r={}),r[w]=_[w])}else r||(p||(p=[]),p.push(L,r)),r=_;else L==="dangerouslySetInnerHTML"?(_=_?_.__html:void 0,j=j?j.__html:void 0,_!=null&&j!==_&&(p=p||[]).push(L,_)):L==="children"?typeof _!="string"&&typeof _!="number"||(p=p||[]).push(L,""+_):L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&(c.hasOwnProperty(L)?(_!=null&&L==="onScroll"&&De("scroll",e),p||j===_||(p=[])):(p=p||[]).push(L,_))}r&&(p=p||[]).push("style",r);var L=p;(t.updateQueue=L)&&(t.flags|=4)}},xp=function(e,t,r,i){r!==i&&(t.flags|=4)};function os(e,t){if(!ze)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var u=e.child;u!==null;)r|=u.lanes|u.childLanes,i|=u.subtreeFlags&14680064,i|=u.flags&14680064,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)r|=u.lanes|u.childLanes,i|=u.subtreeFlags,i|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function Bw(e,t,r){var i=t.pendingProps;switch(Ra(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return vt(t.type)&&el(),dt(t),null;case 3:return i=t.stateNode,no(),Le(gt),Le(ct),Ba(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(sl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Gt!==null&&(xc(Gt),Gt=null))),ic(e,t),dt(t),null;case 5:$a(t);var u=yr(Jo.current);if(r=t.type,e!==null&&t.stateNode!=null)vp(e,t,r,i,u),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(s(166));return dt(t),null}if(e=yr(cn.current),sl(t)){i=t.stateNode,r=t.type;var p=t.memoizedProps;switch(i[an]=t,i[Yo]=p,e=(t.mode&1)!==0,r){case"dialog":De("cancel",i),De("close",i);break;case"iframe":case"object":case"embed":De("load",i);break;case"video":case"audio":for(u=0;u<Ho.length;u++)De(Ho[u],i);break;case"source":De("error",i);break;case"img":case"image":case"link":De("error",i),De("load",i);break;case"details":De("toggle",i);break;case"input":Mn(i,p),De("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!p.multiple},De("invalid",i);break;case"textarea":ed(i,p),De("invalid",i)}Vi(r,p),u=null;for(var w in p)if(p.hasOwnProperty(w)){var j=p[w];w==="children"?typeof j=="string"?i.textContent!==j&&(p.suppressHydrationWarning!==!0&&qs(i.textContent,j,e),u=["children",j]):typeof j=="number"&&i.textContent!==""+j&&(p.suppressHydrationWarning!==!0&&qs(i.textContent,j,e),u=["children",""+j]):c.hasOwnProperty(w)&&j!=null&&w==="onScroll"&&De("scroll",i)}switch(r){case"input":ke(i),Rs(i,p,!0);break;case"textarea":ke(i),nd(i);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(i.onclick=Zs)}i=u,t.updateQueue=i,i!==null&&(t.flags|=4)}else{w=u.nodeType===9?u:u.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=rd(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=w.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=w.createElement(r,{is:i.is}):(e=w.createElement(r),r==="select"&&(w=e,i.multiple?w.multiple=!0:i.size&&(w.size=i.size))):e=w.createElementNS(e,r),e[an]=t,e[Yo]=i,gp(e,t,!1,!1),t.stateNode=e;e:{switch(w=Bi(r,i),r){case"dialog":De("cancel",e),De("close",e),u=i;break;case"iframe":case"object":case"embed":De("load",e),u=i;break;case"video":case"audio":for(u=0;u<Ho.length;u++)De(Ho[u],e);u=i;break;case"source":De("error",e),u=i;break;case"img":case"image":case"link":De("error",e),De("load",e),u=i;break;case"details":De("toggle",e),u=i;break;case"input":Mn(e,i),u=Qe(e,i),De("invalid",e);break;case"option":u=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},u=O({},i,{value:void 0}),De("invalid",e);break;case"textarea":ed(e,i),u=Fi(e,i),De("invalid",e);break;default:u=i}Vi(r,u),j=u;for(p in j)if(j.hasOwnProperty(p)){var _=j[p];p==="style"?ld(e,_):p==="dangerouslySetInnerHTML"?(_=_?_.__html:void 0,_!=null&&od(e,_)):p==="children"?typeof _=="string"?(r!=="textarea"||_!=="")&&ko(e,_):typeof _=="number"&&ko(e,""+_):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(c.hasOwnProperty(p)?_!=null&&p==="onScroll"&&De("scroll",e):_!=null&&A(e,p,_,w))}switch(r){case"input":ke(e),Rs(e,i,!1);break;case"textarea":ke(e),nd(e);break;case"option":i.value!=null&&e.setAttribute("value",""+H(i.value));break;case"select":e.multiple=!!i.multiple,p=i.value,p!=null?Lr(e,!!i.multiple,p,!1):i.defaultValue!=null&&Lr(e,!!i.multiple,i.defaultValue,!0);break;default:typeof u.onClick=="function"&&(e.onclick=Zs)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return dt(t),null;case 6:if(e&&t.stateNode!=null)xp(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(s(166));if(r=yr(Jo.current),yr(cn.current),sl(t)){if(i=t.stateNode,r=t.memoizedProps,i[an]=t,(p=i.nodeValue!==r)&&(e=Rt,e!==null))switch(e.tag){case 3:qs(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qs(i.nodeValue,r,(e.mode&1)!==0)}p&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[an]=t,t.stateNode=i}return dt(t),null;case 13:if(Le(Fe),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ze&&Pt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Sf(),Zr(),t.flags|=98560,p=!1;else if(p=sl(t),i!==null&&i.dehydrated!==null){if(e===null){if(!p)throw Error(s(318));if(p=t.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(s(317));p[an]=t}else Zr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),p=!1}else Gt!==null&&(xc(Gt),Gt=null),p=!0;if(!p)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Fe.current&1)!==0?qe===0&&(qe=3):Sc())),t.updateQueue!==null&&(t.flags|=4),dt(t),null);case 4:return no(),ic(e,t),e===null&&Ko(t.stateNode.containerInfo),dt(t),null;case 10:return Oa(t.type._context),dt(t),null;case 17:return vt(t.type)&&el(),dt(t),null;case 19:if(Le(Fe),p=t.memoizedState,p===null)return dt(t),null;if(i=(t.flags&128)!==0,w=p.rendering,w===null)if(i)os(p,!1);else{if(qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(w=dl(e),w!==null){for(t.flags|=128,os(p,!1),i=w.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)p=r,e=i,p.flags&=14680066,w=p.alternate,w===null?(p.childLanes=0,p.lanes=e,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=w.childLanes,p.lanes=w.lanes,p.child=w.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=w.memoizedProps,p.memoizedState=w.memoizedState,p.updateQueue=w.updateQueue,p.type=w.type,e=w.dependencies,p.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Oe(Fe,Fe.current&1|2),t.child}e=e.sibling}p.tail!==null&&He()>lo&&(t.flags|=128,i=!0,os(p,!1),t.lanes=4194304)}else{if(!i)if(e=dl(w),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),os(p,!0),p.tail===null&&p.tailMode==="hidden"&&!w.alternate&&!ze)return dt(t),null}else 2*He()-p.renderingStartTime>lo&&r!==1073741824&&(t.flags|=128,i=!0,os(p,!1),t.lanes=4194304);p.isBackwards?(w.sibling=t.child,t.child=w):(r=p.last,r!==null?r.sibling=w:t.child=w,p.last=w)}return p.tail!==null?(t=p.tail,p.rendering=t,p.tail=t.sibling,p.renderingStartTime=He(),t.sibling=null,r=Fe.current,Oe(Fe,i?r&1|2:r&1),t):(dt(t),null);case 22:case 23:return wc(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(Tt&1073741824)!==0&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Uw(e,t){switch(Ra(t),t.tag){case 1:return vt(t.type)&&el(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return no(),Le(gt),Le(ct),Ba(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return $a(t),null;case 13:if(Le(Fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Zr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Le(Fe),null;case 4:return no(),null;case 10:return Oa(t.type._context),null;case 22:case 23:return wc(),null;case 24:return null;default:return null}}var wl=!1,ft=!1,Ww=typeof WeakSet=="function"?WeakSet:Set,oe=null;function oo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Be(e,t,i)}else r.current=null}function ac(e,t,r){try{r()}catch(i){Be(e,t,i)}}var yp=!1;function Hw(e,t){if(wa=$s,e=Xd(),fa(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var u=i.anchorOffset,p=i.focusNode;i=i.focusOffset;try{r.nodeType,p.nodeType}catch{r=null;break e}var w=0,j=-1,_=-1,L=0,G=0,Y=e,K=null;t:for(;;){for(var te;Y!==r||u!==0&&Y.nodeType!==3||(j=w+u),Y!==p||i!==0&&Y.nodeType!==3||(_=w+i),Y.nodeType===3&&(w+=Y.nodeValue.length),(te=Y.firstChild)!==null;)K=Y,Y=te;for(;;){if(Y===e)break t;if(K===r&&++L===u&&(j=w),K===p&&++G===i&&(_=w),(te=Y.nextSibling)!==null)break;Y=K,K=Y.parentNode}Y=te}r=j===-1||_===-1?null:{start:j,end:_}}else r=null}r=r||{start:0,end:0}}else r=null;for(Sa={focusedElem:e,selectionRange:r},$s=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;try{var le=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(le!==null){var ce=le.memoizedProps,Ke=le.memoizedState,M=t.stateNode,P=M.getSnapshotBeforeUpdate(t.elementType===t.type?ce:Yt(t.type,ce),Ke);M.__reactInternalSnapshotBeforeUpdate=P}break;case 3:var I=t.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(X){Be(t,t.return,X)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return le=yp,yp=!1,le}function ss(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var u=i=i.next;do{if((u.tag&e)===e){var p=u.destroy;u.destroy=void 0,p!==void 0&&ac(t,r,p)}u=u.next}while(u!==i)}}function Sl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function cc(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function wp(e){var t=e.alternate;t!==null&&(e.alternate=null,wp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[an],delete t[Yo],delete t[ja],delete t[Ew],delete t[_w])),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 Sp(e){return e.tag===5||e.tag===3||e.tag===4}function Cp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sp(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 uc(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Zs));else if(i!==4&&(e=e.child,e!==null))for(uc(e,t,r),e=e.sibling;e!==null;)uc(e,t,r),e=e.sibling}function dc(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(dc(e,t,r),e=e.sibling;e!==null;)dc(e,t,r),e=e.sibling}var st=null,Qt=!1;function Yn(e,t,r){for(r=r.child;r!==null;)Np(e,t,r),r=r.sibling}function Np(e,t,r){if(ln&&typeof ln.onCommitFiberUnmount=="function")try{ln.onCommitFiberUnmount(Is,r)}catch{}switch(r.tag){case 5:ft||oo(r,t);case 6:var i=st,u=Qt;st=null,Yn(e,t,r),st=i,Qt=u,st!==null&&(Qt?(e=st,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):st.removeChild(r.stateNode));break;case 18:st!==null&&(Qt?(e=st,r=r.stateNode,e.nodeType===8?ba(e.parentNode,r):e.nodeType===1&&ba(e,r),Lo(e)):ba(st,r.stateNode));break;case 4:i=st,u=Qt,st=r.stateNode.containerInfo,Qt=!0,Yn(e,t,r),st=i,Qt=u;break;case 0:case 11:case 14:case 15:if(!ft&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){u=i=i.next;do{var p=u,w=p.destroy;p=p.tag,w!==void 0&&((p&2)!==0||(p&4)!==0)&&ac(r,t,w),u=u.next}while(u!==i)}Yn(e,t,r);break;case 1:if(!ft&&(oo(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(j){Be(r,t,j)}Yn(e,t,r);break;case 21:Yn(e,t,r);break;case 22:r.mode&1?(ft=(i=ft)||r.memoizedState!==null,Yn(e,t,r),ft=i):Yn(e,t,r);break;default:Yn(e,t,r)}}function bp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Ww),t.forEach(function(i){var u=e0.bind(null,e,i);r.has(i)||(r.add(i),i.then(u,u))})}}function Xt(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var u=r[i];try{var p=e,w=t,j=w;e:for(;j!==null;){switch(j.tag){case 5:st=j.stateNode,Qt=!1;break e;case 3:st=j.stateNode.containerInfo,Qt=!0;break e;case 4:st=j.stateNode.containerInfo,Qt=!0;break e}j=j.return}if(st===null)throw Error(s(160));Np(p,w,u),st=null,Qt=!1;var _=u.alternate;_!==null&&(_.return=null),u.return=null}catch(L){Be(u,t,L)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)jp(t,e),t=t.sibling}function jp(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Xt(t,e),dn(e),i&4){try{ss(3,e,e.return),Sl(3,e)}catch(ce){Be(e,e.return,ce)}try{ss(5,e,e.return)}catch(ce){Be(e,e.return,ce)}}break;case 1:Xt(t,e),dn(e),i&512&&r!==null&&oo(r,r.return);break;case 5:if(Xt(t,e),dn(e),i&512&&r!==null&&oo(r,r.return),e.flags&32){var u=e.stateNode;try{ko(u,"")}catch(ce){Be(e,e.return,ce)}}if(i&4&&(u=e.stateNode,u!=null)){var p=e.memoizedProps,w=r!==null?r.memoizedProps:p,j=e.type,_=e.updateQueue;if(e.updateQueue=null,_!==null)try{j==="input"&&p.type==="radio"&&p.name!=null&&In(u,p),Bi(j,w);var L=Bi(j,p);for(w=0;w<_.length;w+=2){var G=_[w],Y=_[w+1];G==="style"?ld(u,Y):G==="dangerouslySetInnerHTML"?od(u,Y):G==="children"?ko(u,Y):A(u,G,Y,L)}switch(j){case"input":xn(u,p);break;case"textarea":td(u,p);break;case"select":var K=u._wrapperState.wasMultiple;u._wrapperState.wasMultiple=!!p.multiple;var te=p.value;te!=null?Lr(u,!!p.multiple,te,!1):K!==!!p.multiple&&(p.defaultValue!=null?Lr(u,!!p.multiple,p.defaultValue,!0):Lr(u,!!p.multiple,p.multiple?[]:"",!1))}u[Yo]=p}catch(ce){Be(e,e.return,ce)}}break;case 6:if(Xt(t,e),dn(e),i&4){if(e.stateNode===null)throw Error(s(162));u=e.stateNode,p=e.memoizedProps;try{u.nodeValue=p}catch(ce){Be(e,e.return,ce)}}break;case 3:if(Xt(t,e),dn(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Lo(t.containerInfo)}catch(ce){Be(e,e.return,ce)}break;case 4:Xt(t,e),dn(e);break;case 13:Xt(t,e),dn(e),u=e.child,u.flags&8192&&(p=u.memoizedState!==null,u.stateNode.isHidden=p,!p||u.alternate!==null&&u.alternate.memoizedState!==null||(mc=He())),i&4&&bp(e);break;case 22:if(G=r!==null&&r.memoizedState!==null,e.mode&1?(ft=(L=ft)||G,Xt(t,e),ft=L):Xt(t,e),dn(e),i&8192){if(L=e.memoizedState!==null,(e.stateNode.isHidden=L)&&!G&&(e.mode&1)!==0)for(oe=e,G=e.child;G!==null;){for(Y=oe=G;oe!==null;){switch(K=oe,te=K.child,K.tag){case 0:case 11:case 14:case 15:ss(4,K,K.return);break;case 1:oo(K,K.return);var le=K.stateNode;if(typeof le.componentWillUnmount=="function"){i=K,r=K.return;try{t=i,le.props=t.memoizedProps,le.state=t.memoizedState,le.componentWillUnmount()}catch(ce){Be(i,r,ce)}}break;case 5:oo(K,K.return);break;case 22:if(K.memoizedState!==null){_p(Y);continue}}te!==null?(te.return=K,oe=te):_p(Y)}G=G.sibling}e:for(G=null,Y=e;;){if(Y.tag===5){if(G===null){G=Y;try{u=Y.stateNode,L?(p=u.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(j=Y.stateNode,_=Y.memoizedProps.style,w=_!=null&&_.hasOwnProperty("display")?_.display:null,j.style.display=sd("display",w))}catch(ce){Be(e,e.return,ce)}}}else if(Y.tag===6){if(G===null)try{Y.stateNode.nodeValue=L?"":Y.memoizedProps}catch(ce){Be(e,e.return,ce)}}else if((Y.tag!==22&&Y.tag!==23||Y.memoizedState===null||Y===e)&&Y.child!==null){Y.child.return=Y,Y=Y.child;continue}if(Y===e)break e;for(;Y.sibling===null;){if(Y.return===null||Y.return===e)break e;G===Y&&(G=null),Y=Y.return}G===Y&&(G=null),Y.sibling.return=Y.return,Y=Y.sibling}}break;case 19:Xt(t,e),dn(e),i&4&&bp(e);break;case 21:break;default:Xt(t,e),dn(e)}}function dn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Sp(r)){var i=r;break e}r=r.return}throw Error(s(160))}switch(i.tag){case 5:var u=i.stateNode;i.flags&32&&(ko(u,""),i.flags&=-33);var p=Cp(e);dc(e,p,u);break;case 3:case 4:var w=i.stateNode.containerInfo,j=Cp(e);uc(e,j,w);break;default:throw Error(s(161))}}catch(_){Be(e,e.return,_)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Kw(e,t,r){oe=e,kp(e)}function kp(e,t,r){for(var i=(e.mode&1)!==0;oe!==null;){var u=oe,p=u.child;if(u.tag===22&&i){var w=u.memoizedState!==null||wl;if(!w){var j=u.alternate,_=j!==null&&j.memoizedState!==null||ft;j=wl;var L=ft;if(wl=w,(ft=_)&&!L)for(oe=u;oe!==null;)w=oe,_=w.child,w.tag===22&&w.memoizedState!==null?Rp(u):_!==null?(_.return=w,oe=_):Rp(u);for(;p!==null;)oe=p,kp(p),p=p.sibling;oe=u,wl=j,ft=L}Ep(e)}else(u.subtreeFlags&8772)!==0&&p!==null?(p.return=u,oe=p):Ep(e)}}function Ep(e){for(;oe!==null;){var t=oe;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:ft||Sl(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!ft)if(r===null)i.componentDidMount();else{var u=t.elementType===t.type?r.memoizedProps:Yt(t.type,r.memoizedProps);i.componentDidUpdate(u,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var p=t.updateQueue;p!==null&&_f(t,p,i);break;case 3:var w=t.updateQueue;if(w!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}_f(t,w,r)}break;case 5:var j=t.stateNode;if(r===null&&t.flags&4){r=j;var _=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":_.autoFocus&&r.focus();break;case"img":_.src&&(r.src=_.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var L=t.alternate;if(L!==null){var G=L.memoizedState;if(G!==null){var Y=G.dehydrated;Y!==null&&Lo(Y)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}ft||t.flags&512&&cc(t)}catch(K){Be(t,t.return,K)}}if(t===e){oe=null;break}if(r=t.sibling,r!==null){r.return=t.return,oe=r;break}oe=t.return}}function _p(e){for(;oe!==null;){var t=oe;if(t===e){oe=null;break}var r=t.sibling;if(r!==null){r.return=t.return,oe=r;break}oe=t.return}}function Rp(e){for(;oe!==null;){var t=oe;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Sl(4,t)}catch(_){Be(t,r,_)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var u=t.return;try{i.componentDidMount()}catch(_){Be(t,u,_)}}var p=t.return;try{cc(t)}catch(_){Be(t,p,_)}break;case 5:var w=t.return;try{cc(t)}catch(_){Be(t,w,_)}}}catch(_){Be(t,t.return,_)}if(t===e){oe=null;break}var j=t.sibling;if(j!==null){j.return=t.return,oe=j;break}oe=t.return}}var Gw=Math.ceil,Cl=D.ReactCurrentDispatcher,fc=D.ReactCurrentOwner,$t=D.ReactCurrentBatchConfig,Ae=0,nt=null,Ge=null,lt=0,Tt=0,so=Un(0),qe=0,ls=null,Sr=0,Nl=0,pc=0,is=null,yt=null,mc=0,lo=1/0,kn=null,bl=!1,hc=null,Qn=null,jl=!1,Xn=null,kl=0,as=0,gc=null,El=-1,_l=0;function mt(){return(Ae&6)!==0?He():El!==-1?El:El=He()}function qn(e){return(e.mode&1)===0?1:(Ae&2)!==0&<!==0?lt&-lt:Pw.transition!==null?(_l===0&&(_l=Sd()),_l):(e=Ie,e!==0||(e=window.event,e=e===void 0?16:Pd(e.type)),e)}function qt(e,t,r,i){if(50<as)throw as=0,gc=null,Error(s(185));Ao(e,r,i),((Ae&2)===0||e!==nt)&&(e===nt&&((Ae&2)===0&&(Nl|=r),qe===4&&Zn(e,lt)),wt(e,i),r===1&&Ae===0&&(t.mode&1)===0&&(lo=He()+500,nl&&Hn()))}function wt(e,t){var r=e.callbackNode;Py(e,t);var i=Ls(e,e===nt?lt:0);if(i===0)r!==null&&xd(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&xd(r),t===1)e.tag===0?Rw(Tp.bind(null,e)):gf(Tp.bind(null,e)),jw(function(){(Ae&6)===0&&Hn()}),r=null;else{switch(Cd(i)){case 1:r=Qi;break;case 4:r=yd;break;case 16:r=Ms;break;case 536870912:r=wd;break;default:r=Ms}r=Fp(r,Pp.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Pp(e,t){if(El=-1,_l=0,(Ae&6)!==0)throw Error(s(327));var r=e.callbackNode;if(io()&&e.callbackNode!==r)return null;var i=Ls(e,e===nt?lt:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=Rl(e,i);else{t=i;var u=Ae;Ae|=2;var p=Mp();(nt!==e||lt!==t)&&(kn=null,lo=He()+500,Nr(e,t));do try{Xw();break}catch(j){Ap(e,j)}while(!0);Ia(),Cl.current=p,Ae=u,Ge!==null?t=0:(nt=null,lt=0,t=qe)}if(t!==0){if(t===2&&(u=Xi(e),u!==0&&(i=u,t=vc(e,u))),t===1)throw r=ls,Nr(e,0),Zn(e,i),wt(e,He()),r;if(t===6)Zn(e,i);else{if(u=e.current.alternate,(i&30)===0&&!Yw(u)&&(t=Rl(e,i),t===2&&(p=Xi(e),p!==0&&(i=p,t=vc(e,p))),t===1))throw r=ls,Nr(e,0),Zn(e,i),wt(e,He()),r;switch(e.finishedWork=u,e.finishedLanes=i,t){case 0:case 1:throw Error(s(345));case 2:br(e,yt,kn);break;case 3:if(Zn(e,i),(i&130023424)===i&&(t=mc+500-He(),10<t)){if(Ls(e,0)!==0)break;if(u=e.suspendedLanes,(u&i)!==i){mt(),e.pingedLanes|=e.suspendedLanes&u;break}e.timeoutHandle=Na(br.bind(null,e,yt,kn),t);break}br(e,yt,kn);break;case 4:if(Zn(e,i),(i&4194240)===i)break;for(t=e.eventTimes,u=-1;0<i;){var w=31-Ht(i);p=1<<w,w=t[w],w>u&&(u=w),i&=~p}if(i=u,i=He()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Gw(i/1960))-i,10<i){e.timeoutHandle=Na(br.bind(null,e,yt,kn),i);break}br(e,yt,kn);break;case 5:br(e,yt,kn);break;default:throw Error(s(329))}}}return wt(e,He()),e.callbackNode===r?Pp.bind(null,e):null}function vc(e,t){var r=is;return e.current.memoizedState.isDehydrated&&(Nr(e,t).flags|=256),e=Rl(e,t),e!==2&&(t=yt,yt=r,t!==null&&xc(t)),e}function xc(e){yt===null?yt=e:yt.push.apply(yt,e)}function Yw(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var u=r[i],p=u.getSnapshot;u=u.value;try{if(!Kt(p(),u))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Zn(e,t){for(t&=~pc,t&=~Nl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Ht(t),i=1<<r;e[r]=-1,t&=~i}}function Tp(e){if((Ae&6)!==0)throw Error(s(327));io();var t=Ls(e,0);if((t&1)===0)return wt(e,He()),null;var r=Rl(e,t);if(e.tag!==0&&r===2){var i=Xi(e);i!==0&&(t=i,r=vc(e,i))}if(r===1)throw r=ls,Nr(e,0),Zn(e,t),wt(e,He()),r;if(r===6)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,br(e,yt,kn),wt(e,He()),null}function yc(e,t){var r=Ae;Ae|=1;try{return e(t)}finally{Ae=r,Ae===0&&(lo=He()+500,nl&&Hn())}}function Cr(e){Xn!==null&&Xn.tag===0&&(Ae&6)===0&&io();var t=Ae;Ae|=1;var r=$t.transition,i=Ie;try{if($t.transition=null,Ie=1,e)return e()}finally{Ie=i,$t.transition=r,Ae=t,(Ae&6)===0&&Hn()}}function wc(){Tt=so.current,Le(so)}function Nr(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,bw(r)),Ge!==null)for(r=Ge.return;r!==null;){var i=r;switch(Ra(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&el();break;case 3:no(),Le(gt),Le(ct),Ba();break;case 5:$a(i);break;case 4:no();break;case 13:Le(Fe);break;case 19:Le(Fe);break;case 10:Oa(i.type._context);break;case 22:case 23:wc()}r=r.return}if(nt=e,Ge=e=Jn(e.current,null),lt=Tt=t,qe=0,ls=null,pc=Nl=Sr=0,yt=is=null,xr!==null){for(t=0;t<xr.length;t++)if(r=xr[t],i=r.interleaved,i!==null){r.interleaved=null;var u=i.next,p=r.pending;if(p!==null){var w=p.next;p.next=u,i.next=w}r.pending=i}xr=null}return e}function Ap(e,t){do{var r=Ge;try{if(Ia(),fl.current=gl,pl){for(var i=$e.memoizedState;i!==null;){var u=i.queue;u!==null&&(u.pending=null),i=i.next}pl=!1}if(wr=0,tt=Xe=$e=null,es=!1,ts=0,fc.current=null,r===null||r.return===null){qe=1,ls=t,Ge=null;break}e:{var p=e,w=r.return,j=r,_=t;if(t=lt,j.flags|=32768,_!==null&&typeof _=="object"&&typeof _.then=="function"){var L=_,G=j,Y=G.tag;if((G.mode&1)===0&&(Y===0||Y===11||Y===15)){var K=G.alternate;K?(G.updateQueue=K.updateQueue,G.memoizedState=K.memoizedState,G.lanes=K.lanes):(G.updateQueue=null,G.memoizedState=null)}var te=rp(w);if(te!==null){te.flags&=-257,op(te,w,j,p,t),te.mode&1&&np(p,L,t),t=te,_=L;var le=t.updateQueue;if(le===null){var ce=new Set;ce.add(_),t.updateQueue=ce}else le.add(_);break e}else{if((t&1)===0){np(p,L,t),Sc();break e}_=Error(s(426))}}else if(ze&&j.mode&1){var Ke=rp(w);if(Ke!==null){(Ke.flags&65536)===0&&(Ke.flags|=256),op(Ke,w,j,p,t),Aa(ro(_,j));break e}}p=_=ro(_,j),qe!==4&&(qe=2),is===null?is=[p]:is.push(p),p=w;do{switch(p.tag){case 3:p.flags|=65536,t&=-t,p.lanes|=t;var M=ep(p,_,t);Ef(p,M);break e;case 1:j=_;var P=p.type,I=p.stateNode;if((p.flags&128)===0&&(typeof P.getDerivedStateFromError=="function"||I!==null&&typeof I.componentDidCatch=="function"&&(Qn===null||!Qn.has(I)))){p.flags|=65536,t&=-t,p.lanes|=t;var X=tp(p,j,t);Ef(p,X);break e}}p=p.return}while(p!==null)}Op(r)}catch(de){t=de,Ge===r&&r!==null&&(Ge=r=r.return);continue}break}while(!0)}function Mp(){var e=Cl.current;return Cl.current=gl,e===null?gl:e}function Sc(){(qe===0||qe===3||qe===2)&&(qe=4),nt===null||(Sr&268435455)===0&&(Nl&268435455)===0||Zn(nt,lt)}function Rl(e,t){var r=Ae;Ae|=2;var i=Mp();(nt!==e||lt!==t)&&(kn=null,Nr(e,t));do try{Qw();break}catch(u){Ap(e,u)}while(!0);if(Ia(),Ae=r,Cl.current=i,Ge!==null)throw Error(s(261));return nt=null,lt=0,qe}function Qw(){for(;Ge!==null;)Ip(Ge)}function Xw(){for(;Ge!==null&&!Sy();)Ip(Ge)}function Ip(e){var t=zp(e.alternate,e,Tt);e.memoizedProps=e.pendingProps,t===null?Op(e):Ge=t,fc.current=null}function Op(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Bw(r,t,Tt),r!==null){Ge=r;return}}else{if(r=Uw(r,t),r!==null){r.flags&=32767,Ge=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{qe=6,Ge=null;return}}if(t=t.sibling,t!==null){Ge=t;return}Ge=t=e}while(t!==null);qe===0&&(qe=5)}function br(e,t,r){var i=Ie,u=$t.transition;try{$t.transition=null,Ie=1,qw(e,t,r,i)}finally{$t.transition=u,Ie=i}return null}function qw(e,t,r,i){do io();while(Xn!==null);if((Ae&6)!==0)throw Error(s(327));r=e.finishedWork;var u=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var p=r.lanes|r.childLanes;if(Ty(e,p),e===nt&&(Ge=nt=null,lt=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||jl||(jl=!0,Fp(Ms,function(){return io(),null})),p=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||p){p=$t.transition,$t.transition=null;var w=Ie;Ie=1;var j=Ae;Ae|=4,fc.current=null,Hw(e,r),jp(r,e),vw(Sa),$s=!!wa,Sa=wa=null,e.current=r,Kw(r),Cy(),Ae=j,Ie=w,$t.transition=p}else e.current=r;if(jl&&(jl=!1,Xn=e,kl=u),p=e.pendingLanes,p===0&&(Qn=null),jy(r.stateNode),wt(e,He()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)u=t[r],i(u.value,{componentStack:u.stack,digest:u.digest});if(bl)throw bl=!1,e=hc,hc=null,e;return(kl&1)!==0&&e.tag!==0&&io(),p=e.pendingLanes,(p&1)!==0?e===gc?as++:(as=0,gc=e):as=0,Hn(),null}function io(){if(Xn!==null){var e=Cd(kl),t=$t.transition,r=Ie;try{if($t.transition=null,Ie=16>e?16:e,Xn===null)var i=!1;else{if(e=Xn,Xn=null,kl=0,(Ae&6)!==0)throw Error(s(331));var u=Ae;for(Ae|=4,oe=e.current;oe!==null;){var p=oe,w=p.child;if((oe.flags&16)!==0){var j=p.deletions;if(j!==null){for(var _=0;_<j.length;_++){var L=j[_];for(oe=L;oe!==null;){var G=oe;switch(G.tag){case 0:case 11:case 15:ss(8,G,p)}var Y=G.child;if(Y!==null)Y.return=G,oe=Y;else for(;oe!==null;){G=oe;var K=G.sibling,te=G.return;if(wp(G),G===L){oe=null;break}if(K!==null){K.return=te,oe=K;break}oe=te}}}var le=p.alternate;if(le!==null){var ce=le.child;if(ce!==null){le.child=null;do{var Ke=ce.sibling;ce.sibling=null,ce=Ke}while(ce!==null)}}oe=p}}if((p.subtreeFlags&2064)!==0&&w!==null)w.return=p,oe=w;else e:for(;oe!==null;){if(p=oe,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:ss(9,p,p.return)}var M=p.sibling;if(M!==null){M.return=p.return,oe=M;break e}oe=p.return}}var P=e.current;for(oe=P;oe!==null;){w=oe;var I=w.child;if((w.subtreeFlags&2064)!==0&&I!==null)I.return=w,oe=I;else e:for(w=P;oe!==null;){if(j=oe,(j.flags&2048)!==0)try{switch(j.tag){case 0:case 11:case 15:Sl(9,j)}}catch(de){Be(j,j.return,de)}if(j===w){oe=null;break e}var X=j.sibling;if(X!==null){X.return=j.return,oe=X;break e}oe=j.return}}if(Ae=u,Hn(),ln&&typeof ln.onPostCommitFiberRoot=="function")try{ln.onPostCommitFiberRoot(Is,e)}catch{}i=!0}return i}finally{Ie=r,$t.transition=t}}return!1}function Dp(e,t,r){t=ro(r,t),t=ep(e,t,1),e=Gn(e,t,1),t=mt(),e!==null&&(Ao(e,1,t),wt(e,t))}function Be(e,t,r){if(e.tag===3)Dp(e,e,r);else for(;t!==null;){if(t.tag===3){Dp(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Qn===null||!Qn.has(i))){e=ro(r,e),e=tp(t,e,1),t=Gn(t,e,1),e=mt(),t!==null&&(Ao(t,1,e),wt(t,e));break}}t=t.return}}function Zw(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=mt(),e.pingedLanes|=e.suspendedLanes&r,nt===e&&(lt&r)===r&&(qe===4||qe===3&&(lt&130023424)===lt&&500>He()-mc?Nr(e,0):pc|=r),wt(e,t)}function Lp(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ds,Ds<<=1,(Ds&130023424)===0&&(Ds=4194304)));var r=mt();e=Nn(e,t),e!==null&&(Ao(e,t,r),wt(e,r))}function Jw(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Lp(e,r)}function e0(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,u=e.memoizedState;u!==null&&(r=u.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(s(314))}i!==null&&i.delete(t),Lp(e,r)}var zp;zp=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||gt.current)xt=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return xt=!1,Vw(e,t,r);xt=(e.flags&131072)!==0}else xt=!1,ze&&(t.flags&1048576)!==0&&vf(t,ol,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;yl(e,t),e=t.pendingProps;var u=Qr(t,ct.current);to(t,r),u=Ha(null,t,i,e,u,r);var p=Ka();return t.flags|=1,typeof u=="object"&&u!==null&&typeof u.render=="function"&&u.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,vt(i)?(p=!0,tl(t)):p=!1,t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,za(t),u.updater=vl,t.stateNode=u,u._reactInternals=t,Za(t,i,e,r),t=nc(null,t,i,!0,p,r)):(t.tag=0,ze&&p&&_a(t),pt(null,t,u,r),t=t.child),t;case 16:i=t.elementType;e:{switch(yl(e,t),e=t.pendingProps,u=i._init,i=u(i._payload),t.type=i,u=t.tag=n0(i),e=Yt(i,e),u){case 0:t=tc(null,t,i,e,r);break e;case 1:t=up(null,t,i,e,r);break e;case 11:t=sp(null,t,i,e,r);break e;case 14:t=lp(null,t,i,Yt(i.type,e),r);break e}throw Error(s(306,i,""))}return t;case 0:return i=t.type,u=t.pendingProps,u=t.elementType===i?u:Yt(i,u),tc(e,t,i,u,r);case 1:return i=t.type,u=t.pendingProps,u=t.elementType===i?u:Yt(i,u),up(e,t,i,u,r);case 3:e:{if(dp(t),e===null)throw Error(s(387));i=t.pendingProps,p=t.memoizedState,u=p.element,kf(e,t),ul(t,i,null,r);var w=t.memoizedState;if(i=w.element,p.isDehydrated)if(p={element:i,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},t.updateQueue.baseState=p,t.memoizedState=p,t.flags&256){u=ro(Error(s(423)),t),t=fp(e,t,i,r,u);break e}else if(i!==u){u=ro(Error(s(424)),t),t=fp(e,t,i,r,u);break e}else for(Pt=Bn(t.stateNode.containerInfo.firstChild),Rt=t,ze=!0,Gt=null,r=bf(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Zr(),i===u){t=jn(e,t,r);break e}pt(e,t,i,r)}t=t.child}return t;case 5:return Rf(t),e===null&&Ta(t),i=t.type,u=t.pendingProps,p=e!==null?e.memoizedProps:null,w=u.children,Ca(i,u)?w=null:p!==null&&Ca(i,p)&&(t.flags|=32),cp(e,t),pt(e,t,w,r),t.child;case 6:return e===null&&Ta(t),null;case 13:return pp(e,t,r);case 4:return Fa(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Jr(t,null,i,r):pt(e,t,i,r),t.child;case 11:return i=t.type,u=t.pendingProps,u=t.elementType===i?u:Yt(i,u),sp(e,t,i,u,r);case 7:return pt(e,t,t.pendingProps,r),t.child;case 8:return pt(e,t,t.pendingProps.children,r),t.child;case 12:return pt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,u=t.pendingProps,p=t.memoizedProps,w=u.value,Oe(il,i._currentValue),i._currentValue=w,p!==null)if(Kt(p.value,w)){if(p.children===u.children&&!gt.current){t=jn(e,t,r);break e}}else for(p=t.child,p!==null&&(p.return=t);p!==null;){var j=p.dependencies;if(j!==null){w=p.child;for(var _=j.firstContext;_!==null;){if(_.context===i){if(p.tag===1){_=bn(-1,r&-r),_.tag=2;var L=p.updateQueue;if(L!==null){L=L.shared;var G=L.pending;G===null?_.next=_:(_.next=G.next,G.next=_),L.pending=_}}p.lanes|=r,_=p.alternate,_!==null&&(_.lanes|=r),Da(p.return,r,t),j.lanes|=r;break}_=_.next}}else if(p.tag===10)w=p.type===t.type?null:p.child;else if(p.tag===18){if(w=p.return,w===null)throw Error(s(341));w.lanes|=r,j=w.alternate,j!==null&&(j.lanes|=r),Da(w,r,t),w=p.sibling}else w=p.child;if(w!==null)w.return=p;else for(w=p;w!==null;){if(w===t){w=null;break}if(p=w.sibling,p!==null){p.return=w.return,w=p;break}w=w.return}p=w}pt(e,t,u.children,r),t=t.child}return t;case 9:return u=t.type,i=t.pendingProps.children,to(t,r),u=zt(u),i=i(u),t.flags|=1,pt(e,t,i,r),t.child;case 14:return i=t.type,u=Yt(i,t.pendingProps),u=Yt(i.type,u),lp(e,t,i,u,r);case 15:return ip(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,u=t.pendingProps,u=t.elementType===i?u:Yt(i,u),yl(e,t),t.tag=1,vt(i)?(e=!0,tl(t)):e=!1,to(t,r),Zf(t,i,u),Za(t,i,u,r),nc(null,t,i,!0,e,r);case 19:return hp(e,t,r);case 22:return ap(e,t,r)}throw Error(s(156,t.tag))};function Fp(e,t){return vd(e,t)}function t0(e,t,r,i){this.tag=e,this.key=r,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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(e,t,r,i){return new t0(e,t,r,i)}function Cc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function n0(e){if(typeof e=="function")return Cc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===me)return 11;if(e===Ne)return 14}return 2}function Jn(e,t){var r=e.alternate;return r===null?(r=Vt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Pl(e,t,r,i,u,p){var w=2;if(i=e,typeof e=="function")Cc(e)&&(w=1);else if(typeof e=="string")w=5;else e:switch(e){case $:return jr(r.children,u,p,t);case z:w=8,u|=8;break;case Q:return e=Vt(12,r,t,u|2),e.elementType=Q,e.lanes=p,e;case we:return e=Vt(13,r,t,u),e.elementType=we,e.lanes=p,e;case ve:return e=Vt(19,r,t,u),e.elementType=ve,e.lanes=p,e;case re:return Tl(r,u,p,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ee:w=10;break e;case fe:w=9;break e;case me:w=11;break e;case Ne:w=14;break e;case J:w=16,i=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=Vt(w,r,t,u),t.elementType=e,t.type=i,t.lanes=p,t}function jr(e,t,r,i){return e=Vt(7,e,i,t),e.lanes=r,e}function Tl(e,t,r,i){return e=Vt(22,e,i,t),e.elementType=re,e.lanes=r,e.stateNode={isHidden:!1},e}function Nc(e,t,r){return e=Vt(6,e,null,t),e.lanes=r,e}function bc(e,t,r){return t=Vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function r0(e,t,r,i,u){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=qi(0),this.expirationTimes=qi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qi(0),this.identifierPrefix=i,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function jc(e,t,r,i,u,p,w,j,_){return e=new r0(e,t,r,j,_),t===1?(t=1,p===!0&&(t|=8)):t=0,p=Vt(3,null,null,t),e.current=p,p.stateNode=e,p.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},za(p),e}function o0(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:F,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function $p(e){if(!e)return Wn;e=e._reactInternals;e:{if(pr(e)!==e||e.tag!==1)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(vt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(s(171))}if(e.tag===1){var r=e.type;if(vt(r))return mf(e,r,t)}return t}function Vp(e,t,r,i,u,p,w,j,_){return e=jc(r,i,!0,e,u,p,w,j,_),e.context=$p(null),r=e.current,i=mt(),u=qn(r),p=bn(i,u),p.callback=t??null,Gn(r,p,u),e.current.lanes=u,Ao(e,u,i),wt(e,i),e}function Al(e,t,r,i){var u=t.current,p=mt(),w=qn(u);return r=$p(r),t.context===null?t.context=r:t.pendingContext=r,t=bn(p,w),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=Gn(u,t,w),e!==null&&(qt(e,u,w,p),cl(e,u,w)),w}function Ml(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 Bp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function kc(e,t){Bp(e,t),(e=e.alternate)&&Bp(e,t)}function s0(){return null}var Up=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ec(e){this._internalRoot=e}Il.prototype.render=Ec.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));Al(e,t,null,null)},Il.prototype.unmount=Ec.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cr(function(){Al(null,e,null,null)}),t[yn]=null}};function Il(e){this._internalRoot=e}Il.prototype.unstable_scheduleHydration=function(e){if(e){var t=jd();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Fn.length&&t!==0&&t<Fn[r].priority;r++);Fn.splice(r,0,e),r===0&&_d(e)}};function _c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ol(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Wp(){}function l0(e,t,r,i,u){if(u){if(typeof i=="function"){var p=i;i=function(){var L=Ml(w);p.call(L)}}var w=Vp(t,i,e,0,null,!1,!1,"",Wp);return e._reactRootContainer=w,e[yn]=w.current,Ko(e.nodeType===8?e.parentNode:e),Cr(),w}for(;u=e.lastChild;)e.removeChild(u);if(typeof i=="function"){var j=i;i=function(){var L=Ml(_);j.call(L)}}var _=jc(e,0,!1,null,null,!1,!1,"",Wp);return e._reactRootContainer=_,e[yn]=_.current,Ko(e.nodeType===8?e.parentNode:e),Cr(function(){Al(t,_,r,i)}),_}function Dl(e,t,r,i,u){var p=r._reactRootContainer;if(p){var w=p;if(typeof u=="function"){var j=u;u=function(){var _=Ml(w);j.call(_)}}Al(t,w,e,u)}else w=l0(r,t,e,u,i);return Ml(w)}Nd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=To(t.pendingLanes);r!==0&&(Zi(t,r|1),wt(t,He()),(Ae&6)===0&&(lo=He()+500,Hn()))}break;case 13:Cr(function(){var i=Nn(e,1);if(i!==null){var u=mt();qt(i,e,1,u)}}),kc(e,1)}},Ji=function(e){if(e.tag===13){var t=Nn(e,134217728);if(t!==null){var r=mt();qt(t,e,134217728,r)}kc(e,134217728)}},bd=function(e){if(e.tag===13){var t=qn(e),r=Nn(e,t);if(r!==null){var i=mt();qt(r,e,t,i)}kc(e,t)}},jd=function(){return Ie},kd=function(e,t){var r=Ie;try{return Ie=e,t()}finally{Ie=r}},Hi=function(e,t,r){switch(t){case"input":if(xn(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var u=Js(i);if(!u)throw Error(s(90));Te(i),xn(i,u)}}}break;case"textarea":td(e,r);break;case"select":t=r.value,t!=null&&Lr(e,!!r.multiple,t,!1)}},ud=yc,dd=Cr;var i0={usingClientEntryPoint:!1,Events:[Qo,Gr,Js,ad,cd,yc]},cs={findFiberByHostInstance:mr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},a0={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:D.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=hd(e),e===null?null:e.stateNode},findFiberByHostInstance:cs.findFiberByHostInstance||s0,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 Ll=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ll.isDisabled&&Ll.supportsFiber)try{Is=Ll.inject(a0),ln=Ll}catch{}}return St.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=i0,St.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_c(t))throw Error(s(200));return o0(e,t,null,r)},St.createRoot=function(e,t){if(!_c(e))throw Error(s(299));var r=!1,i="",u=Up;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=jc(e,1,!1,null,null,r,!1,i,u),e[yn]=t.current,Ko(e.nodeType===8?e.parentNode:e),new Ec(t)},St.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(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=hd(t),e=e===null?null:e.stateNode,e},St.flushSync=function(e){return Cr(e)},St.hydrate=function(e,t,r){if(!Ol(t))throw Error(s(200));return Dl(null,e,t,!0,r)},St.hydrateRoot=function(e,t,r){if(!_c(e))throw Error(s(405));var i=r!=null&&r.hydratedSources||null,u=!1,p="",w=Up;if(r!=null&&(r.unstable_strictMode===!0&&(u=!0),r.identifierPrefix!==void 0&&(p=r.identifierPrefix),r.onRecoverableError!==void 0&&(w=r.onRecoverableError)),t=Vp(t,null,e,1,r??null,u,!1,p,w),e[yn]=t.current,Ko(e),i)for(e=0;e<i.length;e++)r=i[e],u=r._getVersion,u=u(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,u]:t.mutableSourceEagerHydrationData.push(r,u);return new Il(t)},St.render=function(e,t,r){if(!Ol(t))throw Error(s(200));return Dl(null,e,t,!1,r)},St.unmountComponentAtNode=function(e){if(!Ol(e))throw Error(s(40));return e._reactRootContainer?(Cr(function(){Dl(null,null,e,!1,function(){e._reactRootContainer=null,e[yn]=null})}),!0):!1},St.unstable_batchedUpdates=yc,St.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!Ol(r))throw Error(s(200));if(e==null||e._reactInternals===void 0)throw Error(s(38));return Dl(e,t,r,!1,i)},St.version="18.3.1-next-f1338f8080-20240426",St}var Zp;function Um(){if(Zp)return Tc.exports;Zp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(o){console.error(o)}}return n(),Tc.exports=g0(),Tc.exports}var Jp;function v0(){if(Jp)return zl;Jp=1;var n=Um();return zl.createRoot=n.createRoot,zl.hydrateRoot=n.hydrateRoot,zl}var x0=v0();const y0=gu(x0),w0="";function Wm(){return localStorage.getItem("cnst_token")}function xu(n){localStorage.setItem("cnst_token",n)}function S0(){localStorage.removeItem("cnst_token")}function C0(){return!!Wm()}async function We(n,o={}){const s={"Content-Type":"application/json",...o.headers},a=Wm();a&&(s.Authorization=`Bearer ${a}`);const c=await fetch(`${w0}${n}`,{...o,headers:s}),d=await c.json();if(!c.ok)throw new Error(d.error||`Request failed: ${c.status}`);return d}async function Hm(n,o){const s=await We("/auth/login",{method:"POST",body:JSON.stringify({email:n,password:o})});return xu(s.api_key),s}async function N0(n,o,s){const a=await We("/auth/register",{method:"POST",body:JSON.stringify({email:n,password:o,name:s})});return xu(a.api_key),a}async function Km(){return We("/auth/device",{method:"POST",body:JSON.stringify({})})}async function Gm(n,o){return We(`/auth/device/poll?code=${encodeURIComponent(n)}&client_secret=${encodeURIComponent(o)}`)}async function Ym(n){const o=await We("/auth/promptowl",{method:"POST",body:JSON.stringify({token:n})});return xu(o.api_key),o}async function b0(){return We("/health")}async function j0(){return We("/auth/admin-status")}async function k0(){return We("/auth/teammates")}async function E0(n,o){return We("/auth/invite",{method:"POST",body:JSON.stringify({email:n,label:o})})}async function _0(n){return We(`/nests/${n}/settings`)}async function R0(n,o){return We(`/nests/${n}/settings`,{method:"PATCH",body:JSON.stringify(o)})}async function P0(){return We("/nests")}async function T0(n,o){return We("/nests",{method:"POST",body:JSON.stringify({name:n,description:o})})}async function A0(n){return We(`/nests/${n}/nodes`)}async function M0(n,o){return We(`/nests/${n}/nodes`,{method:"POST",body:JSON.stringify(o)})}async function I0(n){return We(`/nests/${n}/stewards`)}async function O0(n){return We(`/nests/${n}/stewards/sync`,{method:"POST",body:"{}"})}async function D0(n,o="pending"){return We(`/nests/${n}/review-queue?status=${o}`)}async function L0(n,o,s,a){return We(`/nests/${n}/nodes/${o}/submit-review`,{method:"POST",body:JSON.stringify({note:s,priority:a})})}async function z0(n,o,s){return We(`/nests/${n}/nodes/${o}/approve`,{method:"POST",body:JSON.stringify({note:s})})}async function F0(n,o,s){return We(`/nests/${n}/nodes/${o}/reject`,{method:"POST",body:JSON.stringify({note:s})})}async function $0(n,o){return We(`/nests/${n}/nodes/${o}/versions`)}function V0({onLogin:n}){const[o,s]=h.useState("login"),[a,c]=h.useState(""),[d,f]=h.useState(""),[m,g]=h.useState(""),[v,x]=h.useState(null),[y,S]=h.useState(!1),[N,b]=h.useState(null),[C,k]=h.useState(null),[E,T]=h.useState(!1),A=async()=>{C&&(await navigator.clipboard.writeText(C),T(!0),setTimeout(()=>T(!1),1500))},D=async F=>{F.preventDefault(),x(null),S(!0);try{o==="register"?await N0(a,d,m):await Hm(a,d),n()}catch($){x($.message)}finally{S(!1)}},W=async()=>{x(null),S(!0);try{const F=await Km();b(F.verificationUrl),k(F.deviceCode),window.open(F.verificationUrl,"_blank");for(let $=0;$<180;$++){await new Promise(Q=>setTimeout(Q,2e3));const z=await Gm(F.deviceCode,F.clientSecret);if(z.status==="approved"&&z.token){await Ym(z.token),n();return}if(z.status==="expired"){x("Login expired. Try again."),b(null),k(null),S(!1);return}}}catch(F){x(F.message),b(null),k(null),S(!1)}};return l.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:l.jsxs("div",{className:"w-full max-w-sm space-y-6 p-6",children:[l.jsxs("div",{className:"text-center",children:[l.jsx("span",{className:"text-4xl",children:"🪺"}),l.jsx("h1",{className:"text-xl font-semibold mt-2",children:"ContextNest"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Community Server"})]}),l.jsx("button",{onClick:W,disabled:y,className:"w-full flex items-center justify-center gap-2 py-2.5 px-4 rounded-lg border border-border bg-card hover:bg-secondary text-sm font-medium transition-colors",children:y&&N?"Waiting for approval...":"Login with PromptOwl"}),N&&l.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 space-y-2",children:[l.jsxs("p",{className:"text-xs text-muted-foreground",children:["A new tab opened at"," ",l.jsx("a",{href:N,target:"_blank",className:"text-primary underline",children:"PromptOwl"}),". If it asks for a verification code, use this:"]}),C&&l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("code",{className:"flex-1 bg-background border rounded px-2 py-1.5 text-xs font-mono break-all",children:C}),l.jsx("button",{type:"button",onClick:A,className:"px-2 py-1.5 rounded border text-xs hover:bg-secondary",children:E?"Copied":"Copy"})]})]}),l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute inset-0 flex items-center",children:l.jsx("div",{className:"w-full border-t border-border"})}),l.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:l.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"or"})})]}),l.jsxs("form",{onSubmit:D,className:"space-y-3",children:[o==="register"&&l.jsx("input",{type:"text",placeholder:"Name",value:m,onChange:F=>g(F.target.value),className:"w-full px-3 py-2 rounded-md border border-input bg-background text-sm"}),l.jsx("input",{type:"email",placeholder:"Email",value:a,onChange:F=>c(F.target.value),required:!0,className:"w-full px-3 py-2 rounded-md border border-input bg-background text-sm"}),l.jsx("input",{type:"password",placeholder:"Password",value:d,onChange:F=>f(F.target.value),required:!0,className:"w-full px-3 py-2 rounded-md border border-input bg-background text-sm"}),l.jsx("button",{type:"submit",disabled:y,className:"w-full py-2.5 px-4 rounded-lg bg-primary text-primary-foreground text-sm font-medium hover:opacity-90 disabled:opacity-50",children:y?"...":o==="register"?"Create Account":"Login"})]}),v&&l.jsx("p",{className:"text-sm text-destructive text-center",children:v}),l.jsx("p",{className:"text-xs text-center text-muted-foreground",children:o==="login"?l.jsxs(l.Fragment,{children:["No account?"," ",l.jsx("button",{onClick:()=>s("register"),className:"text-primary underline",children:"Register"})]}):l.jsxs(l.Fragment,{children:["Have an account?"," ",l.jsx("button",{onClick:()=>s("login"),className:"text-primary underline",children:"Login"})]})})]})})}/**
|
|
41
|
+
* @license lucide-react v0.577.0 - ISC
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the ISC license.
|
|
44
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/const Qm=(...n)=>n.filter((o,s,a)=>!!o&&o.trim()!==""&&a.indexOf(o)===s).join(" ").trim();/**
|
|
46
|
+
* @license lucide-react v0.577.0 - ISC
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the ISC license.
|
|
49
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/const B0=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
51
|
+
* @license lucide-react v0.577.0 - ISC
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the ISC license.
|
|
54
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/const U0=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,s,a)=>a?a.toUpperCase():s.toLowerCase());/**
|
|
56
|
+
* @license lucide-react v0.577.0 - ISC
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the ISC license.
|
|
59
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/const em=n=>{const o=U0(n);return o.charAt(0).toUpperCase()+o.slice(1)};/**
|
|
61
|
+
* @license lucide-react v0.577.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/var W0={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"};/**
|
|
66
|
+
* @license lucide-react v0.577.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const H0=n=>{for(const o in n)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1};/**
|
|
71
|
+
* @license lucide-react v0.577.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const K0=h.forwardRef(({color:n="currentColor",size:o=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:c="",children:d,iconNode:f,...m},g)=>h.createElement("svg",{ref:g,...W0,width:o,height:o,stroke:n,strokeWidth:a?Number(s)*24/Number(o):s,className:Qm("lucide",c),...!d&&!H0(m)&&{"aria-hidden":"true"},...m},[...f.map(([v,x])=>h.createElement(v,x)),...Array.isArray(d)?d:[d]]));/**
|
|
76
|
+
* @license lucide-react v0.577.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const Ee=(n,o)=>{const s=h.forwardRef(({className:a,...c},d)=>h.createElement(K0,{ref:d,iconNode:o,className:Qm(`lucide-${B0(em(n))}`,`lucide-${n}`,a),...c}));return s.displayName=em(n),s};/**
|
|
81
|
+
* @license lucide-react v0.577.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const G0=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Xm=Ee("arrow-left",G0);/**
|
|
86
|
+
* @license lucide-react v0.577.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const Y0=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],qm=Ee("bot",Y0);/**
|
|
91
|
+
* @license lucide-react v0.577.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const Q0=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],Zm=Ee("building-2",Q0);/**
|
|
96
|
+
* @license lucide-react v0.577.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const X0=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ar=Ee("check",X0);/**
|
|
101
|
+
* @license lucide-react v0.577.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const q0=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Jm=Ee("chevron-down",q0);/**
|
|
106
|
+
* @license lucide-react v0.577.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const Z0=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],eh=Ee("chevron-right",Z0);/**
|
|
111
|
+
* @license lucide-react v0.577.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const J0=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],e1=Ee("chevron-up",J0);/**
|
|
116
|
+
* @license lucide-react v0.577.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const t1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Mr=Ee("circle-alert",t1);/**
|
|
121
|
+
* @license lucide-react v0.577.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const n1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ho=Ee("circle-check",n1);/**
|
|
126
|
+
* @license lucide-react v0.577.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const r1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Qc=Ee("circle-x",r1);/**
|
|
131
|
+
* @license lucide-react v0.577.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const o1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],s1=Ee("circle",o1);/**
|
|
136
|
+
* @license lucide-react v0.577.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const l1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],yu=Ee("clock",l1);/**
|
|
141
|
+
* @license lucide-react v0.577.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const i1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],fi=Ee("copy",i1);/**
|
|
146
|
+
* @license lucide-react v0.577.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const a1=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],c1=Ee("database",a1);/**
|
|
151
|
+
* @license lucide-react v0.577.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const u1=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],d1=Ee("ellipsis-vertical",u1);/**
|
|
156
|
+
* @license lucide-react v0.577.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const f1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],p1=Ee("external-link",f1);/**
|
|
161
|
+
* @license lucide-react v0.577.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const m1=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],h1=Ee("eye",m1);/**
|
|
166
|
+
* @license lucide-react v0.577.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const g1=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],v1=Ee("file-pen",g1);/**
|
|
171
|
+
* @license lucide-react v0.577.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const x1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],go=Ee("file-text",x1);/**
|
|
176
|
+
* @license lucide-react v0.577.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const y1=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],th=Ee("folder",y1);/**
|
|
181
|
+
* @license lucide-react v0.577.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const w1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],S1=Ee("globe",w1);/**
|
|
186
|
+
* @license lucide-react v0.577.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const C1=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Xc=Ee("history",C1);/**
|
|
191
|
+
* @license lucide-react v0.577.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const N1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],qc=Ee("info",N1);/**
|
|
196
|
+
* @license lucide-react v0.577.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const b1=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],j1=Ee("link-2",b1);/**
|
|
201
|
+
* @license lucide-react v0.577.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const k1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Nt=Ee("loader-circle",k1);/**
|
|
206
|
+
* @license lucide-react v0.577.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const E1=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],_1=Ee("message-square",E1);/**
|
|
211
|
+
* @license lucide-react v0.577.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const R1=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],nh=Ee("monitor",R1);/**
|
|
216
|
+
* @license lucide-react v0.577.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const P1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Zc=Ee("plus",P1);/**
|
|
221
|
+
* @license lucide-react v0.577.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const T1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Jc=Ee("refresh-cw",T1);/**
|
|
226
|
+
* @license lucide-react v0.577.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const A1=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],tm=Ee("rotate-ccw",A1);/**
|
|
231
|
+
* @license lucide-react v0.577.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const M1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],I1=Ee("search",M1);/**
|
|
236
|
+
* @license lucide-react v0.577.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const O1=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],rh=Ee("send",O1);/**
|
|
241
|
+
* @license lucide-react v0.577.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const D1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],nm=Ee("settings",D1);/**
|
|
246
|
+
* @license lucide-react v0.577.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const L1=[["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"}]],Mt=Ee("shield",L1);/**
|
|
251
|
+
* @license lucide-react v0.577.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const z1=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],oh=Ee("tag",z1);/**
|
|
256
|
+
* @license lucide-react v0.577.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const F1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],sh=Ee("terminal",F1);/**
|
|
261
|
+
* @license lucide-react v0.577.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const $1=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],V1=Ee("trash-2",$1);/**
|
|
266
|
+
* @license lucide-react v0.577.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const B1=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],rm=Ee("triangle-alert",B1);/**
|
|
271
|
+
* @license lucide-react v0.577.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const U1=[["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"}]],fo=Ee("user-plus",U1);/**
|
|
276
|
+
* @license lucide-react v0.577.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const W1=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],lh=Ee("users",W1);function ih(n){var o,s,a="";if(typeof n=="string"||typeof n=="number")a+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(o=0;o<c;o++)n[o]&&(s=ih(n[o]))&&(a&&(a+=" "),a+=s)}else for(s in n)n[s]&&(a&&(a+=" "),a+=s);return a}function ah(){for(var n,o,s=0,a="",c=arguments.length;s<c;s++)(n=arguments[s])&&(o=ih(n))&&(a&&(a+=" "),a+=o);return a}const H1=(n,o)=>{const s=new Array(n.length+o.length);for(let a=0;a<n.length;a++)s[a]=n[a];for(let a=0;a<o.length;a++)s[n.length+a]=o[a];return s},K1=(n,o)=>({classGroupId:n,validator:o}),ch=(n=new Map,o=null,s)=>({nextPart:n,validators:o,classGroupId:s}),ql="-",om=[],G1="arbitrary..",Y1=n=>{const o=X1(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:a}=n;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return Q1(f);const m=f.split(ql),g=m[0]===""&&m.length>1?1:0;return uh(m,g,o)},getConflictingClassGroupIds:(f,m)=>{if(m){const g=a[f],v=s[f];return g?v?H1(v,g):g:v||om}return s[f]||om}}},uh=(n,o,s)=>{if(n.length-o===0)return s.classGroupId;const c=n[o],d=s.nextPart.get(c);if(d){const v=uh(n,o+1,d);if(v)return v}const f=s.validators;if(f===null)return;const m=o===0?n.join(ql):n.slice(o).join(ql),g=f.length;for(let v=0;v<g;v++){const x=f[v];if(x.validator(m))return x.classGroupId}},Q1=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=n.slice(1,-1),s=o.indexOf(":"),a=o.slice(0,s);return a?G1+a:void 0})(),X1=n=>{const{theme:o,classGroups:s}=n;return q1(s,o)},q1=(n,o)=>{const s=ch();for(const a in n){const c=n[a];wu(c,s,a,o)}return s},wu=(n,o,s,a)=>{const c=n.length;for(let d=0;d<c;d++){const f=n[d];Z1(f,o,s,a)}},Z1=(n,o,s,a)=>{if(typeof n=="string"){J1(n,o,s);return}if(typeof n=="function"){eS(n,o,s,a);return}tS(n,o,s,a)},J1=(n,o,s)=>{const a=n===""?o:dh(o,n);a.classGroupId=s},eS=(n,o,s,a)=>{if(nS(n)){wu(n(a),o,s,a);return}o.validators===null&&(o.validators=[]),o.validators.push(K1(s,n))},tS=(n,o,s,a)=>{const c=Object.entries(n),d=c.length;for(let f=0;f<d;f++){const[m,g]=c[f];wu(g,dh(o,m),s,a)}},dh=(n,o)=>{let s=n;const a=o.split(ql),c=a.length;for(let d=0;d<c;d++){const f=a[d];let m=s.nextPart.get(f);m||(m=ch(),s.nextPart.set(f,m)),s=m}return s},nS=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,rS=n=>{if(n<1)return{get:()=>{},set:()=>{}};let o=0,s=Object.create(null),a=Object.create(null);const c=(d,f)=>{s[d]=f,o++,o>n&&(o=0,a=s,s=Object.create(null))};return{get(d){let f=s[d];if(f!==void 0)return f;if((f=a[d])!==void 0)return c(d,f),f},set(d,f){d in s?s[d]=f:c(d,f)}}},eu="!",sm=":",oS=[],lm=(n,o,s,a,c)=>({modifiers:n,hasImportantModifier:o,baseClassName:s,maybePostfixModifierPosition:a,isExternal:c}),sS=n=>{const{prefix:o,experimentalParseClassName:s}=n;let a=c=>{const d=[];let f=0,m=0,g=0,v;const x=c.length;for(let C=0;C<x;C++){const k=c[C];if(f===0&&m===0){if(k===sm){d.push(c.slice(g,C)),g=C+1;continue}if(k==="/"){v=C;continue}}k==="["?f++:k==="]"?f--:k==="("?m++:k===")"&&m--}const y=d.length===0?c:c.slice(g);let S=y,N=!1;y.endsWith(eu)?(S=y.slice(0,-1),N=!0):y.startsWith(eu)&&(S=y.slice(1),N=!0);const b=v&&v>g?v-g:void 0;return lm(d,N,S,b)};if(o){const c=o+sm,d=a;a=f=>f.startsWith(c)?d(f.slice(c.length)):lm(oS,!1,f,void 0,!0)}if(s){const c=a;a=d=>s({className:d,parseClassName:c})}return a},lS=n=>{const o=new Map;return n.orderSensitiveModifiers.forEach((s,a)=>{o.set(s,1e6+a)}),s=>{const a=[];let c=[];for(let d=0;d<s.length;d++){const f=s[d],m=f[0]==="[",g=o.has(f);m||g?(c.length>0&&(c.sort(),a.push(...c),c=[]),a.push(f)):c.push(f)}return c.length>0&&(c.sort(),a.push(...c)),a}},iS=n=>({cache:rS(n.cacheSize),parseClassName:sS(n),sortModifiers:lS(n),...Y1(n)}),aS=/\s+/,cS=(n,o)=>{const{parseClassName:s,getClassGroupId:a,getConflictingClassGroupIds:c,sortModifiers:d}=o,f=[],m=n.trim().split(aS);let g="";for(let v=m.length-1;v>=0;v-=1){const x=m[v],{isExternal:y,modifiers:S,hasImportantModifier:N,baseClassName:b,maybePostfixModifierPosition:C}=s(x);if(y){g=x+(g.length>0?" "+g:g);continue}let k=!!C,E=a(k?b.substring(0,C):b);if(!E){if(!k){g=x+(g.length>0?" "+g:g);continue}if(E=a(b),!E){g=x+(g.length>0?" "+g:g);continue}k=!1}const T=S.length===0?"":S.length===1?S[0]:d(S).join(":"),A=N?T+eu:T,D=A+E;if(f.indexOf(D)>-1)continue;f.push(D);const W=c(E,k);for(let F=0;F<W.length;++F){const $=W[F];f.push(A+$)}g=x+(g.length>0?" "+g:g)}return g},uS=(...n)=>{let o=0,s,a,c="";for(;o<n.length;)(s=n[o++])&&(a=fh(s))&&(c&&(c+=" "),c+=a);return c},fh=n=>{if(typeof n=="string")return n;let o,s="";for(let a=0;a<n.length;a++)n[a]&&(o=fh(n[a]))&&(s&&(s+=" "),s+=o);return s},dS=(n,...o)=>{let s,a,c,d;const f=g=>{const v=o.reduce((x,y)=>y(x),n());return s=iS(v),a=s.cache.get,c=s.cache.set,d=m,m(g)},m=g=>{const v=a(g);if(v)return v;const x=cS(g,s);return c(g,x),x};return d=f,(...g)=>d(uS(...g))},fS=[],Ze=n=>{const o=s=>s[n]||fS;return o.isThemeGetter=!0,o},ph=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,mh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pS=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,mS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hS=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,tr=n=>pS.test(n),_e=n=>!!n&&!Number.isNaN(Number(n)),nr=n=>!!n&&Number.isInteger(Number(n)),Ic=n=>n.endsWith("%")&&_e(n.slice(0,-1)),En=n=>mS.test(n),hh=()=>!0,yS=n=>hS.test(n)&&!gS.test(n),Su=()=>!1,wS=n=>vS.test(n),SS=n=>xS.test(n),CS=n=>!ie(n)&&!ae(n),NS=n=>ar(n,xh,Su),ie=n=>ph.test(n),kr=n=>ar(n,yh,yS),im=n=>ar(n,TS,_e),bS=n=>ar(n,Sh,hh),jS=n=>ar(n,wh,Su),am=n=>ar(n,gh,Su),kS=n=>ar(n,vh,SS),Fl=n=>ar(n,Ch,wS),ae=n=>mh.test(n),ds=n=>Ir(n,yh),ES=n=>Ir(n,wh),cm=n=>Ir(n,gh),_S=n=>Ir(n,xh),RS=n=>Ir(n,vh),$l=n=>Ir(n,Ch,!0),PS=n=>Ir(n,Sh,!0),ar=(n,o,s)=>{const a=ph.exec(n);return a?a[1]?o(a[1]):s(a[2]):!1},Ir=(n,o,s=!1)=>{const a=mh.exec(n);return a?a[1]?o(a[1]):s:!1},gh=n=>n==="position"||n==="percentage",vh=n=>n==="image"||n==="url",xh=n=>n==="length"||n==="size"||n==="bg-size",yh=n=>n==="length",TS=n=>n==="number",wh=n=>n==="family-name",Sh=n=>n==="number"||n==="weight",Ch=n=>n==="shadow",AS=()=>{const n=Ze("color"),o=Ze("font"),s=Ze("text"),a=Ze("font-weight"),c=Ze("tracking"),d=Ze("leading"),f=Ze("breakpoint"),m=Ze("container"),g=Ze("spacing"),v=Ze("radius"),x=Ze("shadow"),y=Ze("inset-shadow"),S=Ze("text-shadow"),N=Ze("drop-shadow"),b=Ze("blur"),C=Ze("perspective"),k=Ze("aspect"),E=Ze("ease"),T=Ze("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],W=()=>[...D(),ae,ie],F=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],z=()=>[ae,ie,g],Q=()=>[tr,"full","auto",...z()],ee=()=>[nr,"none","subgrid",ae,ie],fe=()=>["auto",{span:["full",nr,ae,ie]},nr,ae,ie],me=()=>[nr,"auto",ae,ie],we=()=>["auto","min","max","fr",ae,ie],ve=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ne=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",...z()],re=()=>[tr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],V=()=>[tr,"screen","full","dvw","lvw","svw","min","max","fit",...z()],B=()=>[tr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],O=()=>[n,ae,ie],R=()=>[...D(),cm,am,{position:[ae,ie]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",_S,NS,{size:[ae,ie]}],pe=()=>[Ic,ds,kr],ue=()=>["","none","full",v,ae,ie],se=()=>["",_e,ds,kr],q=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[_e,Ic,cm,am],ye=()=>["","none",b,ae,ie],ke=()=>["none",_e,ae,ie],Te=()=>["none",_e,ae,ie],Ve=()=>[_e,ae,ie],Qe=()=>[tr,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[En],breakpoint:[En],color:[hh],container:[En],"drop-shadow":[En],ease:["in","out","in-out"],font:[CS],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[En],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[En],shadow:[En],spacing:["px",_e],text:[En],"text-shadow":[En],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",tr,ie,ae,k]}],container:["container"],columns:[{columns:[_e,ie,ae,m]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:W()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{"inset-s":Q(),start:Q()}],end:[{"inset-e":Q(),end:Q()}],"inset-bs":[{"inset-bs":Q()}],"inset-be":[{"inset-be":Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[nr,"auto",ae,ie]}],basis:[{basis:[tr,"full","auto",m,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[_e,tr,"auto","initial","none",ie]}],grow:[{grow:["",_e,ae,ie]}],shrink:[{shrink:["",_e,ae,ie]}],order:[{order:[nr,"first","last","none",ae,ie]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:fe()}],"col-start":[{"col-start":me()}],"col-end":[{"col-end":me()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:fe()}],"row-start":[{"row-start":me()}],"row-end":[{"row-end":me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":we()}],"auto-rows":[{"auto-rows":we()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...ve(),"normal"]}],"justify-items":[{"justify-items":[...Ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ne()]}],"align-content":[{content:["normal",...ve()]}],"align-items":[{items:[...Ne(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ne(),{baseline:["","last"]}]}],"place-content":[{"place-content":ve()}],"place-items":[{"place-items":[...Ne(),"baseline"]}],"place-self":[{"place-self":["auto",...Ne()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mbs:[{mbs:J()}],mbe:[{mbe:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:re()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...B()]}],"min-block-size":[{"min-block":["auto",...B()]}],"max-block-size":[{"max-block":["none",...B()]}],w:[{w:[m,"screen",...re()]}],"min-w":[{"min-w":[m,"screen","none",...re()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[f]},...re()]}],h:[{h:["screen","lh",...re()]}],"min-h":[{"min-h":["screen","lh","none",...re()]}],"max-h":[{"max-h":["screen","lh",...re()]}],"font-size":[{text:["base",s,ds,kr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,PS,bS]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ic,ie]}],"font-family":[{font:[ES,jS,o]}],"font-features":[{"font-features":[ie]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,ae,ie]}],"line-clamp":[{"line-clamp":[_e,"none",ae,im]}],leading:[{leading:[d,...z()]}],"list-image":[{"list-image":["none",ae,ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:[_e,"from-font","auto",ae,kr]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[_e,"auto",ae,ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:R()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:xe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},nr,ae,ie],radial:["",ae,ie],conic:[nr,ae,ie]},RS,kS]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...q(),"hidden","none"]}],"divide-style":[{divide:[...q(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[_e,ae,ie]}],"outline-w":[{outline:["",_e,ds,kr]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",x,$l,Fl]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",y,$l,Fl]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[_e,kr]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",S,$l,Fl]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[_e,ae,ie]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[_e]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[ae,ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[_e]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:R()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:xe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,ie]}],filter:[{filter:["","none",ae,ie]}],blur:[{blur:ye()}],brightness:[{brightness:[_e,ae,ie]}],contrast:[{contrast:[_e,ae,ie]}],"drop-shadow":[{"drop-shadow":["","none",N,$l,Fl]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",_e,ae,ie]}],"hue-rotate":[{"hue-rotate":[_e,ae,ie]}],invert:[{invert:["",_e,ae,ie]}],saturate:[{saturate:[_e,ae,ie]}],sepia:[{sepia:["",_e,ae,ie]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,ie]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[_e,ae,ie]}],"backdrop-contrast":[{"backdrop-contrast":[_e,ae,ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",_e,ae,ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[_e,ae,ie]}],"backdrop-invert":[{"backdrop-invert":["",_e,ae,ie]}],"backdrop-opacity":[{"backdrop-opacity":[_e,ae,ie]}],"backdrop-saturate":[{"backdrop-saturate":[_e,ae,ie]}],"backdrop-sepia":[{"backdrop-sepia":["",_e,ae,ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[_e,"initial",ae,ie]}],ease:[{ease:["linear","initial",E,ae,ie]}],delay:[{delay:[_e,ae,ie]}],animate:[{animate:["none",T,ae,ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ae,ie]}],"perspective-origin":[{"perspective-origin":W()}],rotate:[{rotate:ke()}],"rotate-x":[{"rotate-x":ke()}],"rotate-y":[{"rotate-y":ke()}],"rotate-z":[{"rotate-z":ke()}],scale:[{scale:Te()}],"scale-x":[{"scale-x":Te()}],"scale-y":[{"scale-y":Te()}],"scale-z":[{"scale-z":Te()}],"scale-3d":["scale-3d"],skew:[{skew:Ve()}],"skew-x":[{"skew-x":Ve()}],"skew-y":[{"skew-y":Ve()}],transform:[{transform:[ae,ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:W()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Qe()}],"translate-x":[{"translate-x":Qe()}],"translate-y":[{"translate-y":Qe()}],"translate-z":[{"translate-z":Qe()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,ie]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,ie]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[_e,ds,kr,im]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},MS=dS(AS);function ge(...n){return MS(ah(n))}const Je=h.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:ge("rounded-lg border bg-card text-card-foreground shadow-sm",n),...o}));Je.displayName="Card";const it=h.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:ge("flex flex-col space-y-1.5 p-6",n),...o}));it.displayName="CardHeader";const at=h.forwardRef(({className:n,...o},s)=>l.jsx("h3",{ref:s,className:ge("text-2xl font-semibold leading-none tracking-tight",n),...o}));at.displayName="CardTitle";const Jt=h.forwardRef(({className:n,...o},s)=>l.jsx("p",{ref:s,className:ge("text-sm text-muted-foreground",n),...o}));Jt.displayName="CardDescription";const et=h.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:ge("p-6 pt-0",n),...o}));et.displayName="CardContent";const IS=h.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:ge("flex items-center p-6 pt-0",n),...o}));IS.displayName="CardFooter";function um(n,o){if(typeof n=="function")return n(o);n!=null&&(n.current=o)}function Cs(...n){return o=>{let s=!1;const a=n.map(c=>{const d=um(c,o);return!s&&typeof d=="function"&&(s=!0),d});if(s)return()=>{for(let c=0;c<a.length;c++){const d=a[c];typeof d=="function"?d():um(n[c],null)}}}}function Pe(...n){return h.useCallback(Cs(...n),n)}var OS=Symbol.for("react.lazy"),Zl=vu[" use ".trim().toString()];function DS(n){return typeof n=="object"&&n!==null&&"then"in n}function Nh(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===OS&&"_payload"in n&&DS(n._payload)}function bh(n){const o=zS(n),s=h.forwardRef((a,c)=>{let{children:d,...f}=a;Nh(d)&&typeof Zl=="function"&&(d=Zl(d._payload));const m=h.Children.toArray(d),g=m.find($S);if(g){const v=g.props.children,x=m.map(y=>y===g?h.Children.count(v)>1?h.Children.only(null):h.isValidElement(v)?v.props.children:null:y);return l.jsx(o,{...f,ref:c,children:h.isValidElement(v)?h.cloneElement(v,void 0,x):null})}return l.jsx(o,{...f,ref:c,children:d})});return s.displayName=`${n}.Slot`,s}var LS=bh("Slot");function zS(n){const o=h.forwardRef((s,a)=>{let{children:c,...d}=s;if(Nh(c)&&typeof Zl=="function"&&(c=Zl(c._payload)),h.isValidElement(c)){const f=BS(c),m=VS(d,c.props);return c.type!==h.Fragment&&(m.ref=a?Cs(a,f):f),h.cloneElement(c,m)}return h.Children.count(c)>1?h.Children.only(null):null});return o.displayName=`${n}.SlotClone`,o}var FS=Symbol("radix.slottable");function $S(n){return h.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===FS}function VS(n,o){const s={...o};for(const a in o){const c=n[a],d=o[a];/^on[A-Z]/.test(a)?c&&d?s[a]=(...m)=>{const g=d(...m);return c(...m),g}:c&&(s[a]=c):a==="style"?s[a]={...c,...d}:a==="className"&&(s[a]=[c,d].filter(Boolean).join(" "))}return{...n,...s}}function BS(n){var a,c;let o=(a=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:a.get,s=o&&"isReactWarning"in o&&o.isReactWarning;return s?n.ref:(o=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,s=o&&"isReactWarning"in o&&o.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}const dm=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,fm=ah,pi=(n,o)=>s=>{var a;if((o==null?void 0:o.variants)==null)return fm(n,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:c,defaultVariants:d}=o,f=Object.keys(c).map(v=>{const x=s==null?void 0:s[v],y=d==null?void 0:d[v];if(x===null)return null;const S=dm(x)||dm(y);return c[v][S]}),m=s&&Object.entries(s).reduce((v,x)=>{let[y,S]=x;return S===void 0||(v[y]=S),v},{}),g=o==null||(a=o.compoundVariants)===null||a===void 0?void 0:a.reduce((v,x)=>{let{class:y,className:S,...N}=x;return Object.entries(N).every(b=>{let[C,k]=b;return Array.isArray(k)?k.includes({...d,...m}[C]):{...d,...m}[C]===k})?[...v,y,S]:v},[]);return fm(n,f,g,s==null?void 0:s.class,s==null?void 0:s.className)},US=pi("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),he=h.forwardRef(({className:n,variant:o="default",size:s="default",asChild:a=!1,...c},d)=>{const f=a?LS:"button";return l.jsx(f,{className:ge(US({variant:o,size:s,className:n})),ref:d,...c})});he.displayName="Button";const Ut=h.forwardRef(({className:n,type:o,...s},a)=>l.jsx("input",{type:o,className:ge("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n),ref:a,...s}));Ut.displayName="Input";var Ns=Um();const WS=gu(Ns);var HS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],mi=HS.reduce((n,o)=>{const s=bh(`Primitive.${o}`),a=h.forwardRef((c,d)=>{const{asChild:f,...m}=c,g=f?s:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(g,{...m,ref:d})});return a.displayName=`Primitive.${o}`,{...n,[o]:a}},{}),KS="Label",jh=h.forwardRef((n,o)=>l.jsx(mi.label,{...n,ref:o,onMouseDown:s=>{var c;s.target.closest("button, input, select, textarea")||((c=n.onMouseDown)==null||c.call(n,s),!s.defaultPrevented&&s.detail>1&&s.preventDefault())}}));jh.displayName=KS;var kh=jh;const GS=pi("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ue=h.forwardRef(({className:n,...o},s)=>l.jsx(kh,{ref:s,className:ge(GS(),n),...o}));Ue.displayName=kh.displayName;const YS="00000000-0000-0000-0000-000000000000";function QS({onSelectNest:n}){const[o,s]=h.useState([]),[a,c]=h.useState(!0),[d,f]=h.useState(!1),[m,g]=h.useState(""),[v,x]=h.useState(""),y=typeof window<"u"?window.location.origin:"http://localhost:3838",S=async()=>{c(!0);try{const b=await P0();s(b.nests)}catch{}finally{c(!1)}};h.useEffect(()=>{S()},[]);const N=async b=>{if(b.preventDefault(),!!m.trim())try{await T0(m,v),g(""),x(""),f(!1),S()}catch{}};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs(Je,{className:"bg-gradient-to-br from-blue-50 to-indigo-50 border-blue-200",children:[l.jsx(it,{className:"pb-3",children:l.jsxs("div",{className:"flex items-start justify-between",children:[l.jsxs("div",{children:[l.jsx(at,{className:"text-lg",children:"Your Community Server"}),l.jsxs(Jt,{children:["Running at"," ",l.jsx("code",{className:"text-xs bg-white/60 px-1.5 py-0.5 rounded font-mono",children:y}),l.jsx(XS,{value:y})]})]}),l.jsx("div",{className:"flex gap-4 text-center",children:l.jsxs("div",{children:[l.jsx("div",{className:"text-2xl font-bold",children:o.length}),l.jsx("div",{className:"text-xs text-muted-foreground",children:"Nests"})]})})]})}),l.jsx(et,{className:"pt-0",children:l.jsxs("div",{className:"grid md:grid-cols-3 gap-3 text-xs",children:[l.jsx(Oc,{icon:l.jsx(qm,{className:"h-4 w-4"}),title:"Hootie",desc:"Settings → Vault → Remote Server → paste URL"}),l.jsx(Oc,{icon:l.jsx(nh,{className:"h-4 w-4"}),title:"Claude Desktop",desc:"Add MCP endpoint per nest via Connect button"}),l.jsx(Oc,{icon:l.jsx(sh,{className:"h-4 w-4"}),title:"CLI",desc:`ctx --server ${y}`,mono:!0})]})})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-xl font-semibold",children:"Nests"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Shared knowledge vaults for your team"})]}),l.jsxs(he,{onClick:()=>f(!0),children:[l.jsx(Zc,{className:"h-4 w-4 mr-2"}),"New Nest"]})]}),d&&l.jsx(Je,{children:l.jsx(et,{className:"pt-6",children:l.jsxs("form",{onSubmit:N,className:"space-y-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx(Ue,{children:"Name"}),l.jsx(Ut,{placeholder:"Team Knowledge",value:m,onChange:b=>g(b.target.value),autoFocus:!0})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx(Ue,{children:"Description (optional)"}),l.jsx(Ut,{placeholder:"Shared docs for the engineering team",value:v,onChange:b=>x(b.target.value)})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(he,{type:"submit",children:"Create Nest"}),l.jsx(he,{type:"button",variant:"outline",onClick:()=>f(!1),children:"Cancel"})]})]})})}),a?l.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Loading..."}):o.length===0?l.jsx(Je,{children:l.jsxs(et,{className:"text-center py-12",children:[l.jsx(c1,{className:"h-12 w-12 mx-auto text-muted-foreground mb-3"}),l.jsx("p",{className:"font-medium",children:"No nests yet"}),l.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Create your first nest to start sharing knowledge with your team"}),l.jsxs(he,{onClick:()=>f(!0),children:[l.jsx(Zc,{className:"h-4 w-4 mr-2"}),"Create First Nest"]})]})}):l.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:o.map(b=>{const C=b.user_id===YS;return l.jsx("button",{onClick:()=>n(b.id,b.name),className:`text-left p-4 rounded-lg border bg-card hover:bg-secondary/50 transition-colors ${C?"border-dashed border-amber-300":"border-border"}`,children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:`p-2 rounded-md ${C?"bg-amber-100":"bg-primary/10"}`,children:C?l.jsx(S1,{className:"h-5 w-5 text-amber-700"}):l.jsx(go,{className:"h-5 w-5 text-primary"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("h3",{className:"font-medium truncate",children:b.name}),b.description&&l.jsx("p",{className:"text-sm text-muted-foreground truncate mt-0.5",children:b.description}),l.jsxs("div",{className:"flex items-center gap-2 mt-2 text-xs text-muted-foreground flex-wrap",children:[C&&l.jsx("span",{className:"px-1.5 py-0.5 rounded bg-amber-50 text-amber-800 border border-amber-200",title:"Owned by the anonymous admin — no stewardship applied",children:"Ungoverned"}),l.jsx("span",{className:`px-1.5 py-0.5 rounded ${b.visibility==="public"?"bg-green-100 text-green-700":"bg-secondary text-secondary-foreground"}`,children:b.visibility}),l.jsx("span",{children:new Date(b.created_at).toLocaleDateString()})]})]})]})},b.id)})})]})}function Oc({icon:n,title:o,desc:s,mono:a}){return l.jsxs("div",{className:"flex items-start gap-2 p-2 rounded bg-white/40",children:[l.jsx("div",{className:"text-muted-foreground mt-0.5",children:n}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"font-medium text-foreground",children:o}),l.jsx("div",{className:`text-muted-foreground ${a?"font-mono text-[10px]":""} truncate`,children:s})]})]})}function XS({value:n}){const[o,s]=h.useState(!1);return l.jsx("button",{onClick:async a=>{a.stopPropagation(),await navigator.clipboard.writeText(n),s(!0),setTimeout(()=>s(!1),1200)},className:"ml-1 inline-flex items-center hover:text-foreground",children:o?l.jsx(Ar,{className:"h-3 w-3 text-green-600"}):l.jsx(fi,{className:"h-3 w-3"})})}function ne(n,o,{checkForDefaultPrevented:s=!0}={}){return function(c){if(n==null||n(c),s===!1||!c.defaultPrevented)return o==null?void 0:o(c)}}function qS(n,o){const s=h.createContext(o),a=d=>{const{children:f,...m}=d,g=h.useMemo(()=>m,Object.values(m));return l.jsx(s.Provider,{value:g,children:f})};a.displayName=n+"Provider";function c(d){const f=h.useContext(s);if(f)return f;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${n}\``)}return[a,c]}function on(n,o=[]){let s=[];function a(d,f){const m=h.createContext(f),g=s.length;s=[...s,f];const v=y=>{var E;const{scope:S,children:N,...b}=y,C=((E=S==null?void 0:S[n])==null?void 0:E[g])||m,k=h.useMemo(()=>b,Object.values(b));return l.jsx(C.Provider,{value:k,children:N})};v.displayName=d+"Provider";function x(y,S){var C;const N=((C=S==null?void 0:S[n])==null?void 0:C[g])||m,b=h.useContext(N);if(b)return b;if(f!==void 0)return f;throw new Error(`\`${y}\` must be used within \`${d}\``)}return[v,x]}const c=()=>{const d=s.map(f=>h.createContext(f));return function(m){const g=(m==null?void 0:m[n])||d;return h.useMemo(()=>({[`__scope${n}`]:{...m,[n]:g}}),[m,g])}};return c.scopeName=n,[a,ZS(c,...o)]}function ZS(...n){const o=n[0];if(n.length===1)return o;const s=()=>{const a=n.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(d){const f=a.reduce((m,{useScope:g,scopeName:v})=>{const y=g(d)[`__scope${v}`];return{...m,...y}},{});return h.useMemo(()=>({[`__scope${o.scopeName}`]:f}),[f])}};return s.scopeName=o.scopeName,s}var Ye=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},JS=vu[" useId ".trim().toString()]||(()=>{}),eC=0;function mn(n){const[o,s]=h.useState(JS());return Ye(()=>{s(a=>a??String(eC++))},[n]),o?`radix-${o}`:""}var tC=vu[" useInsertionEffect ".trim().toString()]||Ye;function sr({prop:n,defaultProp:o,onChange:s=()=>{},caller:a}){const[c,d,f]=nC({defaultProp:o,onChange:s}),m=n!==void 0,g=m?n:c;{const x=h.useRef(n!==void 0);h.useEffect(()=>{const y=x.current;y!==m&&console.warn(`${a} is changing from ${y?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=m},[m,a])}const v=h.useCallback(x=>{var y;if(m){const S=rC(x)?x(n):x;S!==n&&((y=f.current)==null||y.call(f,S))}else d(x)},[m,n,d,f]);return[g,v]}function nC({defaultProp:n,onChange:o}){const[s,a]=h.useState(n),c=h.useRef(s),d=h.useRef(o);return tC(()=>{d.current=o},[o]),h.useEffect(()=>{var f;c.current!==s&&((f=d.current)==null||f.call(d,s),c.current=s)},[s,c]),[s,a,d]}function rC(n){return typeof n=="function"}function vo(n){const o=oC(n),s=h.forwardRef((a,c)=>{const{children:d,...f}=a,m=h.Children.toArray(d),g=m.find(lC);if(g){const v=g.props.children,x=m.map(y=>y===g?h.Children.count(v)>1?h.Children.only(null):h.isValidElement(v)?v.props.children:null:y);return l.jsx(o,{...f,ref:c,children:h.isValidElement(v)?h.cloneElement(v,void 0,x):null})}return l.jsx(o,{...f,ref:c,children:d})});return s.displayName=`${n}.Slot`,s}function oC(n){const o=h.forwardRef((s,a)=>{const{children:c,...d}=s;if(h.isValidElement(c)){const f=aC(c),m=iC(d,c.props);return c.type!==h.Fragment&&(m.ref=a?Cs(a,f):f),h.cloneElement(c,m)}return h.Children.count(c)>1?h.Children.only(null):null});return o.displayName=`${n}.SlotClone`,o}var sC=Symbol("radix.slottable");function lC(n){return h.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===sC}function iC(n,o){const s={...o};for(const a in o){const c=n[a],d=o[a];/^on[A-Z]/.test(a)?c&&d?s[a]=(...m)=>{const g=d(...m);return c(...m),g}:c&&(s[a]=c):a==="style"?s[a]={...c,...d}:a==="className"&&(s[a]=[c,d].filter(Boolean).join(" "))}return{...n,...s}}function aC(n){var a,c;let o=(a=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:a.get,s=o&&"isReactWarning"in o&&o.isReactWarning;return s?n.ref:(o=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,s=o&&"isReactWarning"in o&&o.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var cC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],be=cC.reduce((n,o)=>{const s=vo(`Primitive.${o}`),a=h.forwardRef((c,d)=>{const{asChild:f,...m}=c,g=f?s:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(g,{...m,ref:d})});return a.displayName=`Primitive.${o}`,{...n,[o]:a}},{});function Eh(n,o){n&&Ns.flushSync(()=>n.dispatchEvent(o))}function ot(n){const o=h.useRef(n);return h.useEffect(()=>{o.current=n}),h.useMemo(()=>(...s)=>{var a;return(a=o.current)==null?void 0:a.call(o,...s)},[])}function uC(n,o=globalThis==null?void 0:globalThis.document){const s=ot(n);h.useEffect(()=>{const a=c=>{c.key==="Escape"&&s(c)};return o.addEventListener("keydown",a,{capture:!0}),()=>o.removeEventListener("keydown",a,{capture:!0})},[s,o])}var dC="DismissableLayer",tu="dismissableLayer.update",fC="dismissableLayer.pointerDownOutside",pC="dismissableLayer.focusOutside",pm,_h=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hi=h.forwardRef((n,o)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:m,...g}=n,v=h.useContext(_h),[x,y]=h.useState(null),S=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,N]=h.useState({}),b=Pe(o,$=>y($)),C=Array.from(v.layers),[k]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),E=C.indexOf(k),T=x?C.indexOf(x):-1,A=v.layersWithOutsidePointerEventsDisabled.size>0,D=T>=E,W=gC($=>{const z=$.target,Q=[...v.branches].some(ee=>ee.contains(z));!D||Q||(c==null||c($),f==null||f($),$.defaultPrevented||m==null||m())},S),F=vC($=>{const z=$.target;[...v.branches].some(ee=>ee.contains(z))||(d==null||d($),f==null||f($),$.defaultPrevented||m==null||m())},S);return uC($=>{T===v.layers.size-1&&(a==null||a($),!$.defaultPrevented&&m&&($.preventDefault(),m()))},S),h.useEffect(()=>{if(x)return s&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(pm=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(x)),v.layers.add(x),mm(),()=>{s&&v.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=pm)}},[x,S,s,v]),h.useEffect(()=>()=>{x&&(v.layers.delete(x),v.layersWithOutsidePointerEventsDisabled.delete(x),mm())},[x,v]),h.useEffect(()=>{const $=()=>N({});return document.addEventListener(tu,$),()=>document.removeEventListener(tu,$)},[]),l.jsx(be.div,{...g,ref:b,style:{pointerEvents:A?D?"auto":"none":void 0,...n.style},onFocusCapture:ne(n.onFocusCapture,F.onFocusCapture),onBlurCapture:ne(n.onBlurCapture,F.onBlurCapture),onPointerDownCapture:ne(n.onPointerDownCapture,W.onPointerDownCapture)})});hi.displayName=dC;var mC="DismissableLayerBranch",hC=h.forwardRef((n,o)=>{const s=h.useContext(_h),a=h.useRef(null),c=Pe(o,a);return h.useEffect(()=>{const d=a.current;if(d)return s.branches.add(d),()=>{s.branches.delete(d)}},[s.branches]),l.jsx(be.div,{...n,ref:c})});hC.displayName=mC;function gC(n,o=globalThis==null?void 0:globalThis.document){const s=ot(n),a=h.useRef(!1),c=h.useRef(()=>{});return h.useEffect(()=>{const d=m=>{if(m.target&&!a.current){let g=function(){Rh(fC,s,v,{discrete:!0})};const v={originalEvent:m};m.pointerType==="touch"?(o.removeEventListener("click",c.current),c.current=g,o.addEventListener("click",c.current,{once:!0})):g()}else o.removeEventListener("click",c.current);a.current=!1},f=window.setTimeout(()=>{o.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(f),o.removeEventListener("pointerdown",d),o.removeEventListener("click",c.current)}},[o,s]),{onPointerDownCapture:()=>a.current=!0}}function vC(n,o=globalThis==null?void 0:globalThis.document){const s=ot(n),a=h.useRef(!1);return h.useEffect(()=>{const c=d=>{d.target&&!a.current&&Rh(pC,s,{originalEvent:d},{discrete:!1})};return o.addEventListener("focusin",c),()=>o.removeEventListener("focusin",c)},[o,s]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function mm(){const n=new CustomEvent(tu);document.dispatchEvent(n)}function Rh(n,o,s,{discrete:a}){const c=s.originalEvent.target,d=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:s});o&&c.addEventListener(n,o,{once:!0}),a?Eh(c,d):c.dispatchEvent(d)}var Dc="focusScope.autoFocusOnMount",Lc="focusScope.autoFocusOnUnmount",hm={bubbles:!1,cancelable:!0},xC="FocusScope",gi=h.forwardRef((n,o)=>{const{loop:s=!1,trapped:a=!1,onMountAutoFocus:c,onUnmountAutoFocus:d,...f}=n,[m,g]=h.useState(null),v=ot(c),x=ot(d),y=h.useRef(null),S=Pe(o,C=>g(C)),N=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(a){let C=function(A){if(N.paused||!m)return;const D=A.target;m.contains(D)?y.current=D:rr(y.current,{select:!0})},k=function(A){if(N.paused||!m)return;const D=A.relatedTarget;D!==null&&(m.contains(D)||rr(y.current,{select:!0}))},E=function(A){if(document.activeElement===document.body)for(const W of A)W.removedNodes.length>0&&rr(m)};document.addEventListener("focusin",C),document.addEventListener("focusout",k);const T=new MutationObserver(E);return m&&T.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",k),T.disconnect()}}},[a,m,N.paused]),h.useEffect(()=>{if(m){vm.add(N);const C=document.activeElement;if(!m.contains(C)){const E=new CustomEvent(Dc,hm);m.addEventListener(Dc,v),m.dispatchEvent(E),E.defaultPrevented||(yC(bC(Ph(m)),{select:!0}),document.activeElement===C&&rr(m))}return()=>{m.removeEventListener(Dc,v),setTimeout(()=>{const E=new CustomEvent(Lc,hm);m.addEventListener(Lc,x),m.dispatchEvent(E),E.defaultPrevented||rr(C??document.body,{select:!0}),m.removeEventListener(Lc,x),vm.remove(N)},0)}}},[m,v,x,N]);const b=h.useCallback(C=>{if(!s&&!a||N.paused)return;const k=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,E=document.activeElement;if(k&&E){const T=C.currentTarget,[A,D]=wC(T);A&&D?!C.shiftKey&&E===D?(C.preventDefault(),s&&rr(A,{select:!0})):C.shiftKey&&E===A&&(C.preventDefault(),s&&rr(D,{select:!0})):E===T&&C.preventDefault()}},[s,a,N.paused]);return l.jsx(be.div,{tabIndex:-1,...f,ref:S,onKeyDown:b})});gi.displayName=xC;function yC(n,{select:o=!1}={}){const s=document.activeElement;for(const a of n)if(rr(a,{select:o}),document.activeElement!==s)return}function wC(n){const o=Ph(n),s=gm(o,n),a=gm(o.reverse(),n);return[s,a]}function Ph(n){const o=[],s=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const c=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||c?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)o.push(s.currentNode);return o}function gm(n,o){for(const s of n)if(!SC(s,{upTo:o}))return s}function SC(n,{upTo:o}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(o!==void 0&&n===o)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function CC(n){return n instanceof HTMLInputElement&&"select"in n}function rr(n,{select:o=!1}={}){if(n&&n.focus){const s=document.activeElement;n.focus({preventScroll:!0}),n!==s&&CC(n)&&o&&n.select()}}var vm=NC();function NC(){let n=[];return{add(o){const s=n[0];o!==s&&(s==null||s.pause()),n=xm(n,o),n.unshift(o)},remove(o){var s;n=xm(n,o),(s=n[0])==null||s.resume()}}}function xm(n,o){const s=[...n],a=s.indexOf(o);return a!==-1&&s.splice(a,1),s}function bC(n){return n.filter(o=>o.tagName!=="A")}var jC="Portal",vi=h.forwardRef((n,o)=>{var m;const{container:s,...a}=n,[c,d]=h.useState(!1);Ye(()=>d(!0),[]);const f=s||c&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return f?WS.createPortal(l.jsx(be.div,{...a,ref:o}),f):null});vi.displayName=jC;function kC(n,o){return h.useReducer((s,a)=>o[s][a]??s,n)}var Et=n=>{const{present:o,children:s}=n,a=EC(o),c=typeof s=="function"?s({present:a.isPresent}):h.Children.only(s),d=Pe(a.ref,_C(c));return typeof s=="function"||a.isPresent?h.cloneElement(c,{ref:d}):null};Et.displayName="Presence";function EC(n){const[o,s]=h.useState(),a=h.useRef(null),c=h.useRef(n),d=h.useRef("none"),f=n?"mounted":"unmounted",[m,g]=kC(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const v=Vl(a.current);d.current=m==="mounted"?v:"none"},[m]),Ye(()=>{const v=a.current,x=c.current;if(x!==n){const S=d.current,N=Vl(v);n?g("MOUNT"):N==="none"||(v==null?void 0:v.display)==="none"?g("UNMOUNT"):g(x&&S!==N?"ANIMATION_OUT":"UNMOUNT"),c.current=n}},[n,g]),Ye(()=>{if(o){let v;const x=o.ownerDocument.defaultView??window,y=N=>{const C=Vl(a.current).includes(CSS.escape(N.animationName));if(N.target===o&&C&&(g("ANIMATION_END"),!c.current)){const k=o.style.animationFillMode;o.style.animationFillMode="forwards",v=x.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=k)})}},S=N=>{N.target===o&&(d.current=Vl(a.current))};return o.addEventListener("animationstart",S),o.addEventListener("animationcancel",y),o.addEventListener("animationend",y),()=>{x.clearTimeout(v),o.removeEventListener("animationstart",S),o.removeEventListener("animationcancel",y),o.removeEventListener("animationend",y)}}else g("ANIMATION_END")},[o,g]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:h.useCallback(v=>{a.current=v?getComputedStyle(v):null,s(v)},[])}}function Vl(n){return(n==null?void 0:n.animationName)||"none"}function _C(n){var a,c;let o=(a=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:a.get,s=o&&"isReactWarning"in o&&o.isReactWarning;return s?n.ref:(o=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,s=o&&"isReactWarning"in o&&o.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var zc=0;function Cu(){h.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??ym()),document.body.insertAdjacentElement("beforeend",n[1]??ym()),zc++,()=>{zc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),zc--}},[])}function ym(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var fn=function(){return fn=Object.assign||function(o){for(var s,a=1,c=arguments.length;a<c;a++){s=arguments[a];for(var d in s)Object.prototype.hasOwnProperty.call(s,d)&&(o[d]=s[d])}return o},fn.apply(this,arguments)};function Th(n,o){var s={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&o.indexOf(a)<0&&(s[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,a=Object.getOwnPropertySymbols(n);c<a.length;c++)o.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(n,a[c])&&(s[a[c]]=n[a[c]]);return s}function RC(n,o,s){if(s||arguments.length===2)for(var a=0,c=o.length,d;a<c;a++)(d||!(a in o))&&(d||(d=Array.prototype.slice.call(o,0,a)),d[a]=o[a]);return n.concat(d||Array.prototype.slice.call(o))}var Yl="right-scroll-bar-position",Ql="width-before-scroll-bar",PC="with-scroll-bars-hidden",TC="--removed-body-scroll-bar-size";function Fc(n,o){return typeof n=="function"?n(o):n&&(n.current=o),n}function AC(n,o){var s=h.useState(function(){return{value:n,callback:o,facade:{get current(){return s.value},set current(a){var c=s.value;c!==a&&(s.value=a,s.callback(a,c))}}}})[0];return s.callback=o,s.facade}var MC=typeof window<"u"?h.useLayoutEffect:h.useEffect,wm=new WeakMap;function IC(n,o){var s=AC(null,function(a){return n.forEach(function(c){return Fc(c,a)})});return MC(function(){var a=wm.get(s);if(a){var c=new Set(a),d=new Set(n),f=s.current;c.forEach(function(m){d.has(m)||Fc(m,null)}),d.forEach(function(m){c.has(m)||Fc(m,f)})}wm.set(s,n)},[n]),s}function OC(n){return n}function DC(n,o){o===void 0&&(o=OC);var s=[],a=!1,c={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:n},useMedium:function(d){var f=o(d,a);return s.push(f),function(){s=s.filter(function(m){return m!==f})}},assignSyncMedium:function(d){for(a=!0;s.length;){var f=s;s=[],f.forEach(d)}s={push:function(m){return d(m)},filter:function(){return s}}},assignMedium:function(d){a=!0;var f=[];if(s.length){var m=s;s=[],m.forEach(d),f=s}var g=function(){var x=f;f=[],x.forEach(d)},v=function(){return Promise.resolve().then(g)};v(),s={push:function(x){f.push(x),v()},filter:function(x){return f=f.filter(x),s}}}};return c}function LC(n){n===void 0&&(n={});var o=DC(null);return o.options=fn({async:!0,ssr:!1},n),o}var Ah=function(n){var o=n.sideCar,s=Th(n,["sideCar"]);if(!o)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=o.read();if(!a)throw new Error("Sidecar medium not found");return h.createElement(a,fn({},s))};Ah.isSideCarExport=!0;function zC(n,o){return n.useMedium(o),Ah}var Mh=LC(),$c=function(){},xi=h.forwardRef(function(n,o){var s=h.useRef(null),a=h.useState({onScrollCapture:$c,onWheelCapture:$c,onTouchMoveCapture:$c}),c=a[0],d=a[1],f=n.forwardProps,m=n.children,g=n.className,v=n.removeScrollBar,x=n.enabled,y=n.shards,S=n.sideCar,N=n.noRelative,b=n.noIsolation,C=n.inert,k=n.allowPinchZoom,E=n.as,T=E===void 0?"div":E,A=n.gapMode,D=Th(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),W=S,F=IC([s,o]),$=fn(fn({},D),c);return h.createElement(h.Fragment,null,x&&h.createElement(W,{sideCar:Mh,removeScrollBar:v,shards:y,noRelative:N,noIsolation:b,inert:C,setCallbacks:d,allowPinchZoom:!!k,lockRef:s,gapMode:A}),f?h.cloneElement(h.Children.only(m),fn(fn({},$),{ref:F})):h.createElement(T,fn({},$,{className:g,ref:F}),m))});xi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xi.classNames={fullWidth:Ql,zeroRight:Yl};var FC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $C(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var o=FC();return o&&n.setAttribute("nonce",o),n}function VC(n,o){n.styleSheet?n.styleSheet.cssText=o:n.appendChild(document.createTextNode(o))}function BC(n){var o=document.head||document.getElementsByTagName("head")[0];o.appendChild(n)}var UC=function(){var n=0,o=null;return{add:function(s){n==0&&(o=$C())&&(VC(o,s),BC(o)),n++},remove:function(){n--,!n&&o&&(o.parentNode&&o.parentNode.removeChild(o),o=null)}}},WC=function(){var n=UC();return function(o,s){h.useEffect(function(){return n.add(o),function(){n.remove()}},[o&&s])}},Ih=function(){var n=WC(),o=function(s){var a=s.styles,c=s.dynamic;return n(a,c),null};return o},HC={left:0,top:0,right:0,gap:0},Vc=function(n){return parseInt(n||"",10)||0},KC=function(n){var o=window.getComputedStyle(document.body),s=o[n==="padding"?"paddingLeft":"marginLeft"],a=o[n==="padding"?"paddingTop":"marginTop"],c=o[n==="padding"?"paddingRight":"marginRight"];return[Vc(s),Vc(a),Vc(c)]},GC=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return HC;var o=KC(n),s=document.documentElement.clientWidth,a=window.innerWidth;return{left:o[0],top:o[1],right:o[2],gap:Math.max(0,a-s+o[2]-o[0])}},YC=Ih(),po="data-scroll-locked",QC=function(n,o,s,a){var c=n.left,d=n.top,f=n.right,m=n.gap;return s===void 0&&(s="margin"),`
|
|
281
|
+
.`.concat(PC,` {
|
|
282
|
+
overflow: hidden `).concat(a,`;
|
|
283
|
+
padding-right: `).concat(m,"px ").concat(a,`;
|
|
284
|
+
}
|
|
285
|
+
body[`).concat(po,`] {
|
|
286
|
+
overflow: hidden `).concat(a,`;
|
|
287
|
+
overscroll-behavior: contain;
|
|
288
|
+
`).concat([o&&"position: relative ".concat(a,";"),s==="margin"&&`
|
|
289
|
+
padding-left: `.concat(c,`px;
|
|
290
|
+
padding-top: `).concat(d,`px;
|
|
291
|
+
padding-right: `).concat(f,`px;
|
|
292
|
+
margin-left:0;
|
|
293
|
+
margin-top:0;
|
|
294
|
+
margin-right: `).concat(m,"px ").concat(a,`;
|
|
295
|
+
`),s==="padding"&&"padding-right: ".concat(m,"px ").concat(a,";")].filter(Boolean).join(""),`
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.`).concat(Yl,` {
|
|
299
|
+
right: `).concat(m,"px ").concat(a,`;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.`).concat(Ql,` {
|
|
303
|
+
margin-right: `).concat(m,"px ").concat(a,`;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.`).concat(Yl," .").concat(Yl,` {
|
|
307
|
+
right: 0 `).concat(a,`;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.`).concat(Ql," .").concat(Ql,` {
|
|
311
|
+
margin-right: 0 `).concat(a,`;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
body[`).concat(po,`] {
|
|
315
|
+
`).concat(TC,": ").concat(m,`px;
|
|
316
|
+
}
|
|
317
|
+
`)},Sm=function(){var n=parseInt(document.body.getAttribute(po)||"0",10);return isFinite(n)?n:0},XC=function(){h.useEffect(function(){return document.body.setAttribute(po,(Sm()+1).toString()),function(){var n=Sm()-1;n<=0?document.body.removeAttribute(po):document.body.setAttribute(po,n.toString())}},[])},qC=function(n){var o=n.noRelative,s=n.noImportant,a=n.gapMode,c=a===void 0?"margin":a;XC();var d=h.useMemo(function(){return GC(c)},[c]);return h.createElement(YC,{styles:QC(d,!o,c,s?"":"!important")})},nu=!1;if(typeof window<"u")try{var Bl=Object.defineProperty({},"passive",{get:function(){return nu=!0,!0}});window.addEventListener("test",Bl,Bl),window.removeEventListener("test",Bl,Bl)}catch{nu=!1}var ao=nu?{passive:!1}:!1,ZC=function(n){return n.tagName==="TEXTAREA"},Oh=function(n,o){if(!(n instanceof Element))return!1;var s=window.getComputedStyle(n);return s[o]!=="hidden"&&!(s.overflowY===s.overflowX&&!ZC(n)&&s[o]==="visible")},JC=function(n){return Oh(n,"overflowY")},eN=function(n){return Oh(n,"overflowX")},Cm=function(n,o){var s=o.ownerDocument,a=o;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var c=Dh(n,a);if(c){var d=Lh(n,a),f=d[1],m=d[2];if(f>m)return!0}a=a.parentNode}while(a&&a!==s.body);return!1},tN=function(n){var o=n.scrollTop,s=n.scrollHeight,a=n.clientHeight;return[o,s,a]},nN=function(n){var o=n.scrollLeft,s=n.scrollWidth,a=n.clientWidth;return[o,s,a]},Dh=function(n,o){return n==="v"?JC(o):eN(o)},Lh=function(n,o){return n==="v"?tN(o):nN(o)},rN=function(n,o){return n==="h"&&o==="rtl"?-1:1},oN=function(n,o,s,a,c){var d=rN(n,window.getComputedStyle(o).direction),f=d*a,m=s.target,g=o.contains(m),v=!1,x=f>0,y=0,S=0;do{if(!m)break;var N=Lh(n,m),b=N[0],C=N[1],k=N[2],E=C-k-d*b;(b||E)&&Dh(n,m)&&(y+=E,S+=b);var T=m.parentNode;m=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!g&&m!==document.body||g&&(o.contains(m)||o===m));return(x&&Math.abs(y)<1||!x&&Math.abs(S)<1)&&(v=!0),v},Ul=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},Nm=function(n){return[n.deltaX,n.deltaY]},bm=function(n){return n&&"current"in n?n.current:n},sN=function(n,o){return n[0]===o[0]&&n[1]===o[1]},lN=function(n){return`
|
|
318
|
+
.block-interactivity-`.concat(n,` {pointer-events: none;}
|
|
319
|
+
.allow-interactivity-`).concat(n,` {pointer-events: all;}
|
|
320
|
+
`)},iN=0,co=[];function aN(n){var o=h.useRef([]),s=h.useRef([0,0]),a=h.useRef(),c=h.useState(iN++)[0],d=h.useState(Ih)[0],f=h.useRef(n);h.useEffect(function(){f.current=n},[n]),h.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(c));var C=RC([n.lockRef.current],(n.shards||[]).map(bm),!0).filter(Boolean);return C.forEach(function(k){return k.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),C.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(c))})}}},[n.inert,n.lockRef.current,n.shards]);var m=h.useCallback(function(C,k){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!f.current.allowPinchZoom;var E=Ul(C),T=s.current,A="deltaX"in C?C.deltaX:T[0]-E[0],D="deltaY"in C?C.deltaY:T[1]-E[1],W,F=C.target,$=Math.abs(A)>Math.abs(D)?"h":"v";if("touches"in C&&$==="h"&&F.type==="range")return!1;var z=window.getSelection(),Q=z&&z.anchorNode,ee=Q?Q===F||Q.contains(F):!1;if(ee)return!1;var fe=Cm($,F);if(!fe)return!0;if(fe?W=$:(W=$==="v"?"h":"v",fe=Cm($,F)),!fe)return!1;if(!a.current&&"changedTouches"in C&&(A||D)&&(a.current=W),!W)return!0;var me=a.current||W;return oN(me,k,C,me==="h"?A:D)},[]),g=h.useCallback(function(C){var k=C;if(!(!co.length||co[co.length-1]!==d)){var E="deltaY"in k?Nm(k):Ul(k),T=o.current.filter(function(W){return W.name===k.type&&(W.target===k.target||k.target===W.shadowParent)&&sN(W.delta,E)})[0];if(T&&T.should){k.cancelable&&k.preventDefault();return}if(!T){var A=(f.current.shards||[]).map(bm).filter(Boolean).filter(function(W){return W.contains(k.target)}),D=A.length>0?m(k,A[0]):!f.current.noIsolation;D&&k.cancelable&&k.preventDefault()}}},[]),v=h.useCallback(function(C,k,E,T){var A={name:C,delta:k,target:E,should:T,shadowParent:cN(E)};o.current.push(A),setTimeout(function(){o.current=o.current.filter(function(D){return D!==A})},1)},[]),x=h.useCallback(function(C){s.current=Ul(C),a.current=void 0},[]),y=h.useCallback(function(C){v(C.type,Nm(C),C.target,m(C,n.lockRef.current))},[]),S=h.useCallback(function(C){v(C.type,Ul(C),C.target,m(C,n.lockRef.current))},[]);h.useEffect(function(){return co.push(d),n.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:S}),document.addEventListener("wheel",g,ao),document.addEventListener("touchmove",g,ao),document.addEventListener("touchstart",x,ao),function(){co=co.filter(function(C){return C!==d}),document.removeEventListener("wheel",g,ao),document.removeEventListener("touchmove",g,ao),document.removeEventListener("touchstart",x,ao)}},[]);var N=n.removeScrollBar,b=n.inert;return h.createElement(h.Fragment,null,b?h.createElement(d,{styles:lN(c)}):null,N?h.createElement(qC,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function cN(n){for(var o=null;n!==null;)n instanceof ShadowRoot&&(o=n.host,n=n.host),n=n.parentNode;return o}const uN=zC(Mh,aN);var yi=h.forwardRef(function(n,o){return h.createElement(xi,fn({},n,{ref:o,sideCar:uN}))});yi.classNames=xi.classNames;var dN=function(n){if(typeof document>"u")return null;var o=Array.isArray(n)?n[0]:n;return o.ownerDocument.body},uo=new WeakMap,Wl=new WeakMap,Hl={},Bc=0,zh=function(n){return n&&(n.host||zh(n.parentNode))},fN=function(n,o){return o.map(function(s){if(n.contains(s))return s;var a=zh(s);return a&&n.contains(a)?a:(console.error("aria-hidden",s,"in not contained inside",n,". Doing nothing"),null)}).filter(function(s){return!!s})},pN=function(n,o,s,a){var c=fN(o,Array.isArray(n)?n:[n]);Hl[s]||(Hl[s]=new WeakMap);var d=Hl[s],f=[],m=new Set,g=new Set(c),v=function(y){!y||m.has(y)||(m.add(y),v(y.parentNode))};c.forEach(v);var x=function(y){!y||g.has(y)||Array.prototype.forEach.call(y.children,function(S){if(m.has(S))x(S);else try{var N=S.getAttribute(a),b=N!==null&&N!=="false",C=(uo.get(S)||0)+1,k=(d.get(S)||0)+1;uo.set(S,C),d.set(S,k),f.push(S),C===1&&b&&Wl.set(S,!0),k===1&&S.setAttribute(s,"true"),b||S.setAttribute(a,"true")}catch(E){console.error("aria-hidden: cannot operate on ",S,E)}})};return x(o),m.clear(),Bc++,function(){f.forEach(function(y){var S=uo.get(y)-1,N=d.get(y)-1;uo.set(y,S),d.set(y,N),S||(Wl.has(y)||y.removeAttribute(a),Wl.delete(y)),N||y.removeAttribute(s)}),Bc--,Bc||(uo=new WeakMap,uo=new WeakMap,Wl=new WeakMap,Hl={})}},Nu=function(n,o,s){s===void 0&&(s="data-aria-hidden");var a=Array.from(Array.isArray(n)?n:[n]),c=dN(n);return c?(a.push.apply(a,Array.from(c.querySelectorAll("[aria-live], script"))),pN(a,c,s,"aria-hidden")):function(){return null}},wi="Dialog",[Fh]=on(wi),[mN,sn]=Fh(wi),$h=n=>{const{__scopeDialog:o,children:s,open:a,defaultOpen:c,onOpenChange:d,modal:f=!0}=n,m=h.useRef(null),g=h.useRef(null),[v,x]=sr({prop:a,defaultProp:c??!1,onChange:d,caller:wi});return l.jsx(mN,{scope:o,triggerRef:m,contentRef:g,contentId:mn(),titleId:mn(),descriptionId:mn(),open:v,onOpenChange:x,onOpenToggle:h.useCallback(()=>x(y=>!y),[x]),modal:f,children:s})};$h.displayName=wi;var Vh="DialogTrigger",hN=h.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,c=sn(Vh,s),d=Pe(o,c.triggerRef);return l.jsx(be.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":ku(c.open),...a,ref:d,onClick:ne(n.onClick,c.onOpenToggle)})});hN.displayName=Vh;var bu="DialogPortal",[gN,Bh]=Fh(bu,{forceMount:void 0}),Uh=n=>{const{__scopeDialog:o,forceMount:s,children:a,container:c}=n,d=sn(bu,o);return l.jsx(gN,{scope:o,forceMount:s,children:h.Children.map(a,f=>l.jsx(Et,{present:s||d.open,children:l.jsx(vi,{asChild:!0,container:c,children:f})}))})};Uh.displayName=bu;var Jl="DialogOverlay",Wh=h.forwardRef((n,o)=>{const s=Bh(Jl,n.__scopeDialog),{forceMount:a=s.forceMount,...c}=n,d=sn(Jl,n.__scopeDialog);return d.modal?l.jsx(Et,{present:a||d.open,children:l.jsx(xN,{...c,ref:o})}):null});Wh.displayName=Jl;var vN=vo("DialogOverlay.RemoveScroll"),xN=h.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,c=sn(Jl,s);return l.jsx(yi,{as:vN,allowPinchZoom:!0,shards:[c.contentRef],children:l.jsx(be.div,{"data-state":ku(c.open),...a,ref:o,style:{pointerEvents:"auto",...a.style}})})}),_r="DialogContent",Hh=h.forwardRef((n,o)=>{const s=Bh(_r,n.__scopeDialog),{forceMount:a=s.forceMount,...c}=n,d=sn(_r,n.__scopeDialog);return l.jsx(Et,{present:a||d.open,children:d.modal?l.jsx(yN,{...c,ref:o}):l.jsx(wN,{...c,ref:o})})});Hh.displayName=_r;var yN=h.forwardRef((n,o)=>{const s=sn(_r,n.__scopeDialog),a=h.useRef(null),c=Pe(o,s.contentRef,a);return h.useEffect(()=>{const d=a.current;if(d)return Nu(d)},[]),l.jsx(Kh,{...n,ref:c,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ne(n.onCloseAutoFocus,d=>{var f;d.preventDefault(),(f=s.triggerRef.current)==null||f.focus()}),onPointerDownOutside:ne(n.onPointerDownOutside,d=>{const f=d.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0;(f.button===2||m)&&d.preventDefault()}),onFocusOutside:ne(n.onFocusOutside,d=>d.preventDefault())})}),wN=h.forwardRef((n,o)=>{const s=sn(_r,n.__scopeDialog),a=h.useRef(!1),c=h.useRef(!1);return l.jsx(Kh,{...n,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{var f,m;(f=n.onCloseAutoFocus)==null||f.call(n,d),d.defaultPrevented||(a.current||(m=s.triggerRef.current)==null||m.focus(),d.preventDefault()),a.current=!1,c.current=!1},onInteractOutside:d=>{var g,v;(g=n.onInteractOutside)==null||g.call(n,d),d.defaultPrevented||(a.current=!0,d.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const f=d.target;((v=s.triggerRef.current)==null?void 0:v.contains(f))&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&c.current&&d.preventDefault()}})}),Kh=h.forwardRef((n,o)=>{const{__scopeDialog:s,trapFocus:a,onOpenAutoFocus:c,onCloseAutoFocus:d,...f}=n,m=sn(_r,s),g=h.useRef(null),v=Pe(o,g);return Cu(),l.jsxs(l.Fragment,{children:[l.jsx(gi,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:c,onUnmountAutoFocus:d,children:l.jsx(hi,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":ku(m.open),...f,ref:v,onDismiss:()=>m.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(SN,{titleId:m.titleId}),l.jsx(NN,{contentRef:g,descriptionId:m.descriptionId})]})]})}),ju="DialogTitle",Gh=h.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,c=sn(ju,s);return l.jsx(be.h2,{id:c.titleId,...a,ref:o})});Gh.displayName=ju;var Yh="DialogDescription",Qh=h.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,c=sn(Yh,s);return l.jsx(be.p,{id:c.descriptionId,...a,ref:o})});Qh.displayName=Yh;var Xh="DialogClose",qh=h.forwardRef((n,o)=>{const{__scopeDialog:s,...a}=n,c=sn(Xh,s);return l.jsx(be.button,{type:"button",...a,ref:o,onClick:ne(n.onClick,()=>c.onOpenChange(!1))})});qh.displayName=Xh;function ku(n){return n?"open":"closed"}var Zh="DialogTitleWarning",[rE,Jh]=qS(Zh,{contentName:_r,titleName:ju,docsSlug:"dialog"}),SN=({titleId:n})=>{const o=Jh(Zh),s=`\`${o.contentName}\` requires a \`${o.titleName}\` for the component to be accessible for screen reader users.
|
|
321
|
+
|
|
322
|
+
If you want to hide the \`${o.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
323
|
+
|
|
324
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${o.docsSlug}`;return h.useEffect(()=>{n&&(document.getElementById(n)||console.error(s))},[s,n]),null},CN="DialogDescriptionWarning",NN=({contentRef:n,descriptionId:o})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Jh(CN).contentName}}.`;return h.useEffect(()=>{var d;const c=(d=n.current)==null?void 0:d.getAttribute("aria-describedby");o&&c&&(document.getElementById(o)||console.warn(a))},[a,n,o]),null},bN=$h,jN=Uh,eg=Wh,tg=Hh,ng=Gh,rg=Qh,kN=qh;function EN(n,o){if(n==null)return{};var s={},a=Object.keys(n),c,d;for(d=0;d<a.length;d++)c=a[d],!(o.indexOf(c)>=0)&&(s[c]=n[c]);return s}var _N=["color"],RN=h.forwardRef(function(n,o){var s=n.color,a=s===void 0?"currentColor":s,c=EN(n,_N);return h.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c,{ref:o}),h.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});const Ot=bN,PN=jN,og=h.forwardRef(({className:n,...o},s)=>l.jsx(eg,{ref:s,className:ge("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),...o}));og.displayName=eg.displayName;const bt=h.forwardRef(({className:n,children:o,hideCloseButton:s,...a},c)=>l.jsxs(PN,{children:[l.jsx(og,{}),l.jsxs(tg,{ref:c,className:ge("fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-4 sm:p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",n),...a,children:[o,!s&&l.jsxs(kN,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[l.jsx(RN,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));bt.displayName=tg.displayName;const jt=({className:n,...o})=>l.jsx("div",{className:ge("flex flex-col space-y-1.5 text-center sm:text-left",n),...o});jt.displayName="DialogHeader";const en=({className:n,...o})=>l.jsx("div",{className:ge("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",n),...o});en.displayName="DialogFooter";const kt=h.forwardRef(({className:n,...o},s)=>l.jsx(ng,{ref:s,className:ge("text-lg font-semibold leading-none tracking-tight",n),...o}));kt.displayName=ng.displayName;const tn=h.forwardRef(({className:n,...o},s)=>l.jsx(rg,{ref:s,className:ge("text-sm text-muted-foreground",n),...o}));tn.displayName=rg.displayName;function Eu(n){const o=n+"CollectionProvider",[s,a]=on(o),[c,d]=s(o,{collectionRef:{current:null},itemMap:new Map}),f=C=>{const{scope:k,children:E}=C,T=_n.useRef(null),A=_n.useRef(new Map).current;return l.jsx(c,{scope:k,itemMap:A,collectionRef:T,children:E})};f.displayName=o;const m=n+"CollectionSlot",g=vo(m),v=_n.forwardRef((C,k)=>{const{scope:E,children:T}=C,A=d(m,E),D=Pe(k,A.collectionRef);return l.jsx(g,{ref:D,children:T})});v.displayName=m;const x=n+"CollectionItemSlot",y="data-radix-collection-item",S=vo(x),N=_n.forwardRef((C,k)=>{const{scope:E,children:T,...A}=C,D=_n.useRef(null),W=Pe(k,D),F=d(x,E);return _n.useEffect(()=>(F.itemMap.set(D,{ref:D,...A}),()=>void F.itemMap.delete(D))),l.jsx(S,{[y]:"",ref:W,children:T})});N.displayName=x;function b(C){const k=d(n+"CollectionConsumer",C);return _n.useCallback(()=>{const T=k.collectionRef.current;if(!T)return[];const A=Array.from(T.querySelectorAll(`[${y}]`));return Array.from(k.itemMap.values()).sort((F,$)=>A.indexOf(F.ref.current)-A.indexOf($.ref.current))},[k.collectionRef,k.itemMap])}return[{Provider:f,Slot:v,ItemSlot:N},b,a]}var TN=h.createContext(void 0);function bs(n){const o=h.useContext(TN);return n||o||"ltr"}var Uc="rovingFocusGroup.onEntryFocus",AN={bubbles:!1,cancelable:!0},js="RovingFocusGroup",[ru,sg,MN]=Eu(js),[IN,Si]=on(js,[MN]),[ON,DN]=IN(js),lg=h.forwardRef((n,o)=>l.jsx(ru.Provider,{scope:n.__scopeRovingFocusGroup,children:l.jsx(ru.Slot,{scope:n.__scopeRovingFocusGroup,children:l.jsx(LN,{...n,ref:o})})}));lg.displayName=js;var LN=h.forwardRef((n,o)=>{const{__scopeRovingFocusGroup:s,orientation:a,loop:c=!1,dir:d,currentTabStopId:f,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:g,onEntryFocus:v,preventScrollOnEntryFocus:x=!1,...y}=n,S=h.useRef(null),N=Pe(o,S),b=bs(d),[C,k]=sr({prop:f,defaultProp:m??null,onChange:g,caller:js}),[E,T]=h.useState(!1),A=ot(v),D=sg(s),W=h.useRef(!1),[F,$]=h.useState(0);return h.useEffect(()=>{const z=S.current;if(z)return z.addEventListener(Uc,A),()=>z.removeEventListener(Uc,A)},[A]),l.jsx(ON,{scope:s,orientation:a,dir:b,loop:c,currentTabStopId:C,onItemFocus:h.useCallback(z=>k(z),[k]),onItemShiftTab:h.useCallback(()=>T(!0),[]),onFocusableItemAdd:h.useCallback(()=>$(z=>z+1),[]),onFocusableItemRemove:h.useCallback(()=>$(z=>z-1),[]),children:l.jsx(be.div,{tabIndex:E||F===0?-1:0,"data-orientation":a,...y,ref:N,style:{outline:"none",...n.style},onMouseDown:ne(n.onMouseDown,()=>{W.current=!0}),onFocus:ne(n.onFocus,z=>{const Q=!W.current;if(z.target===z.currentTarget&&Q&&!E){const ee=new CustomEvent(Uc,AN);if(z.currentTarget.dispatchEvent(ee),!ee.defaultPrevented){const fe=D().filter(J=>J.focusable),me=fe.find(J=>J.active),we=fe.find(J=>J.id===C),Ne=[me,we,...fe].filter(Boolean).map(J=>J.ref.current);cg(Ne,x)}}W.current=!1}),onBlur:ne(n.onBlur,()=>T(!1))})})}),ig="RovingFocusGroupItem",ag=h.forwardRef((n,o)=>{const{__scopeRovingFocusGroup:s,focusable:a=!0,active:c=!1,tabStopId:d,children:f,...m}=n,g=mn(),v=d||g,x=DN(ig,s),y=x.currentTabStopId===v,S=sg(s),{onFocusableItemAdd:N,onFocusableItemRemove:b,currentTabStopId:C}=x;return h.useEffect(()=>{if(a)return N(),()=>b()},[a,N,b]),l.jsx(ru.ItemSlot,{scope:s,id:v,focusable:a,active:c,children:l.jsx(be.span,{tabIndex:y?0:-1,"data-orientation":x.orientation,...m,ref:o,onMouseDown:ne(n.onMouseDown,k=>{a?x.onItemFocus(v):k.preventDefault()}),onFocus:ne(n.onFocus,()=>x.onItemFocus(v)),onKeyDown:ne(n.onKeyDown,k=>{if(k.key==="Tab"&&k.shiftKey){x.onItemShiftTab();return}if(k.target!==k.currentTarget)return;const E=$N(k,x.orientation,x.dir);if(E!==void 0){if(k.metaKey||k.ctrlKey||k.altKey||k.shiftKey)return;k.preventDefault();let A=S().filter(D=>D.focusable).map(D=>D.ref.current);if(E==="last")A.reverse();else if(E==="prev"||E==="next"){E==="prev"&&A.reverse();const D=A.indexOf(k.currentTarget);A=x.loop?VN(A,D+1):A.slice(D+1)}setTimeout(()=>cg(A))}}),children:typeof f=="function"?f({isCurrentTabStop:y,hasTabStop:C!=null}):f})})});ag.displayName=ig;var zN={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function FN(n,o){return o!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function $N(n,o,s){const a=FN(n.key,s);if(!(o==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(o==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return zN[a]}function cg(n,o=!1){const s=document.activeElement;for(const a of n)if(a===s||(a.focus({preventScroll:o}),document.activeElement!==s))return}function VN(n,o){return n.map((s,a)=>n[(o+a)%n.length])}var ug=lg,dg=ag,Ci="Tabs",[BN]=on(Ci,[Si]),fg=Si(),[UN,_u]=BN(Ci),pg=h.forwardRef((n,o)=>{const{__scopeTabs:s,value:a,onValueChange:c,defaultValue:d,orientation:f="horizontal",dir:m,activationMode:g="automatic",...v}=n,x=bs(m),[y,S]=sr({prop:a,onChange:c,defaultProp:d??"",caller:Ci});return l.jsx(UN,{scope:s,baseId:mn(),value:y,onValueChange:S,orientation:f,dir:x,activationMode:g,children:l.jsx(be.div,{dir:x,"data-orientation":f,...v,ref:o})})});pg.displayName=Ci;var mg="TabsList",hg=h.forwardRef((n,o)=>{const{__scopeTabs:s,loop:a=!0,...c}=n,d=_u(mg,s),f=fg(s);return l.jsx(ug,{asChild:!0,...f,orientation:d.orientation,dir:d.dir,loop:a,children:l.jsx(be.div,{role:"tablist","aria-orientation":d.orientation,...c,ref:o})})});hg.displayName=mg;var gg="TabsTrigger",vg=h.forwardRef((n,o)=>{const{__scopeTabs:s,value:a,disabled:c=!1,...d}=n,f=_u(gg,s),m=fg(s),g=wg(f.baseId,a),v=Sg(f.baseId,a),x=a===f.value;return l.jsx(dg,{asChild:!0,...m,focusable:!c,active:x,children:l.jsx(be.button,{type:"button",role:"tab","aria-selected":x,"aria-controls":v,"data-state":x?"active":"inactive","data-disabled":c?"":void 0,disabled:c,id:g,...d,ref:o,onMouseDown:ne(n.onMouseDown,y=>{!c&&y.button===0&&y.ctrlKey===!1?f.onValueChange(a):y.preventDefault()}),onKeyDown:ne(n.onKeyDown,y=>{[" ","Enter"].includes(y.key)&&f.onValueChange(a)}),onFocus:ne(n.onFocus,()=>{const y=f.activationMode!=="manual";!x&&!c&&y&&f.onValueChange(a)})})})});vg.displayName=gg;var xg="TabsContent",yg=h.forwardRef((n,o)=>{const{__scopeTabs:s,value:a,forceMount:c,children:d,...f}=n,m=_u(xg,s),g=wg(m.baseId,a),v=Sg(m.baseId,a),x=a===m.value,y=h.useRef(x);return h.useEffect(()=>{const S=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(S)},[]),l.jsx(Et,{present:c||x,children:({present:S})=>l.jsx(be.div,{"data-state":x?"active":"inactive","data-orientation":m.orientation,role:"tabpanel","aria-labelledby":g,hidden:!S,id:v,tabIndex:0,...f,ref:o,style:{...n.style,animationDuration:y.current?"0s":void 0},children:S&&d})})});yg.displayName=xg;function wg(n,o){return`${n}-trigger-${o}`}function Sg(n,o){return`${n}-content-${o}`}var WN=pg,Cg=hg,Ng=vg,bg=yg;const HN=WN,jg=h.forwardRef(({className:n,...o},s)=>l.jsx(Cg,{ref:s,className:ge("inline-flex min-h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",n),...o}));jg.displayName=Cg.displayName;const ps=h.forwardRef(({className:n,...o},s)=>l.jsx(Ng,{ref:s,className:ge("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",n),...o}));ps.displayName=Ng.displayName;const ms=h.forwardRef(({className:n,...o},s)=>l.jsx(bg,{ref:s,className:ge("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n),...o}));ms.displayName=bg.displayName;function KN({isOpen:n,onClose:o,nestId:s,nestName:a}){const c=typeof window<"u"?window.location.origin:"http://localhost:3838",d=`${c}/nests/${s}/mcp`,f=JSON.stringify({mcpServers:{[GN(a)]:{url:d}}},null,2),m=`ctx --server ${c} --nest ${s} query "type:document"`;return l.jsx(Ot,{open:n,onOpenChange:o,children:l.jsxs(bt,{className:"sm:max-w-[640px] max-h-[85vh] flex flex-col",children:[l.jsxs(jt,{children:[l.jsxs(kt,{children:["Connect to ",a]}),l.jsx(tn,{children:"Point your tools at this nest to read, write, and query context."})]}),l.jsx("div",{className:"flex-1 overflow-y-auto",children:l.jsxs(HN,{defaultValue:"hootie",className:"w-full",children:[l.jsxs(jg,{className:"grid w-full grid-cols-4",children:[l.jsxs(ps,{value:"hootie",children:[l.jsx(qm,{className:"h-3.5 w-3.5 mr-1"}),"Hootie"]}),l.jsxs(ps,{value:"claude",children:[l.jsx(nh,{className:"h-3.5 w-3.5 mr-1"}),"Claude"]}),l.jsx(ps,{value:"mcp",children:"MCP"}),l.jsxs(ps,{value:"cli",children:[l.jsx(sh,{className:"h-3.5 w-3.5 mr-1"}),"CLI"]})]}),l.jsxs(ms,{value:"hootie",className:"space-y-4 pt-4",children:[l.jsxs("div",{children:[l.jsxs("p",{className:"text-sm mb-3",children:["In Hootie, open ",l.jsx("strong",{children:"Settings → ContextNest Vault → Remote Server"})," and paste:"]}),l.jsx(fs,{label:"Server URL",value:c}),l.jsx(fs,{label:"API Key",value:"(leave blank — open mode)",dim:!0})]}),l.jsxs("ol",{className:"text-xs text-muted-foreground space-y-1 list-decimal list-inside",children:[l.jsx("li",{children:"Open Hootie"}),l.jsx("li",{children:"Click the gear icon (Settings)"}),l.jsx("li",{children:"Scroll to ContextNest Vault"}),l.jsx("li",{children:'Switch tab to "Remote Server"'}),l.jsx("li",{children:"Paste the URL above, click Test Vault"})]})]}),l.jsxs(ms,{value:"claude",className:"space-y-4 pt-4",children:[l.jsxs("div",{children:[l.jsxs("p",{className:"text-sm mb-3",children:["Add this to your ",l.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"claude_desktop_config.json"}),":"]}),l.jsx(fs,{label:"Config",value:f,multiline:!0}),l.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:["Location: ",l.jsx("code",{className:"text-[10px]",children:"%APPDATA%\\Claude\\claude_desktop_config.json"})," (Windows) or ",l.jsx("code",{className:"text-[10px]",children:"~/Library/Application Support/Claude/claude_desktop_config.json"})," (Mac)"]})]}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Restart Claude Desktop after editing. The nest's 16 context tools will appear in the tools panel."})]}),l.jsxs(ms,{value:"mcp",className:"space-y-4 pt-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm mb-3",children:"This nest exposes a Streamable HTTP MCP endpoint with 16 tools (9 content + 7 governance):"}),l.jsx(fs,{label:"MCP Endpoint",value:d})]}),l.jsxs("div",{className:"text-xs text-muted-foreground space-y-2",children:[l.jsx("p",{className:"font-medium",children:"Available tools:"}),l.jsxs("div",{className:"grid grid-cols-2 gap-x-4 font-mono text-[11px]",children:[l.jsx("span",{children:"context_init"}),l.jsx("span",{children:"context_stewards"}),l.jsx("span",{children:"context_overview"}),l.jsx("span",{children:"context_review_queue"}),l.jsx("span",{children:"context_search"}),l.jsx("span",{children:"context_submit_review"}),l.jsx("span",{children:"context_query"}),l.jsx("span",{children:"context_approve"}),l.jsx("span",{children:"context_get"}),l.jsx("span",{children:"context_reject"}),l.jsx("span",{children:"context_list"}),l.jsx("span",{children:"context_versions"}),l.jsx("span",{children:"context_resolve"}),l.jsx("span",{children:"context_assign_steward"}),l.jsx("span",{children:"context_create"}),l.jsx("span",{children:"context_update"})]})]})]}),l.jsxs(ms,{value:"cli",className:"space-y-4 pt-4",children:[l.jsxs("div",{children:[l.jsxs("p",{className:"text-sm mb-3",children:["Use ",l.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"ctx"})," pointed at this server:"]}),l.jsx(fs,{label:"Example query",value:m})]}),l.jsxs("div",{className:"text-xs text-muted-foreground space-y-2",children:[l.jsx("p",{className:"font-medium",children:"Common commands:"}),l.jsxs("div",{className:"space-y-1 font-mono text-[11px]",children:[l.jsxs("div",{children:["ctx --server ",c," --nest ",s,' query "#architecture"']}),l.jsxs("div",{children:["ctx --server ",c," --nest ",s,' add "My Doc" content.md']}),l.jsxs("div",{children:["ctx --server ",c," --nest ",s," publish"]})]}),l.jsxs("p",{className:"pt-2",children:["Install:"," ",l.jsx("code",{className:"text-[11px] bg-muted px-1 py-0.5 rounded",children:"npm i -g @promptowl/contextnest-cli"})]})]})]})]})}),l.jsx("div",{className:"border-t pt-3",children:l.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[l.jsx("span",{children:"Nest ID:"}),l.jsx("code",{className:"flex-1 bg-muted px-2 py-1 rounded text-[11px] font-mono truncate",children:s}),l.jsx(kg,{value:s})]})})]})})}function fs({label:n,value:o,multiline:s,dim:a}){return l.jsxs("div",{className:"mb-3",children:[l.jsxs("div",{className:"flex items-center justify-between mb-1",children:[l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),l.jsx(kg,{value:o})]}),l.jsx("pre",{className:`${s?"p-3":"px-3 py-2"} bg-muted rounded text-xs font-mono ${s?"whitespace-pre overflow-x-auto":"truncate"} ${a?"text-muted-foreground italic":""}`,children:o})]})}function kg({value:n}){const[o,s]=h.useState(!1),a=async()=>{try{await navigator.clipboard.writeText(n),s(!0),setTimeout(()=>s(!1),1500)}catch{}};return l.jsx(he,{variant:"ghost",size:"sm",className:"h-6 px-2",onClick:a,children:o?l.jsx(Ar,{className:"h-3 w-3 text-green-600"}):l.jsx(fi,{className:"h-3 w-3"})})}function GN(n){return n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"nest"}function Ru(n){const o=h.useRef({value:n,previous:n});return h.useMemo(()=>(o.current.value!==n&&(o.current.previous=o.current.value,o.current.value=n),o.current.previous),[n])}function Pu(n){const[o,s]=h.useState(void 0);return Ye(()=>{if(n){s({width:n.offsetWidth,height:n.offsetHeight});const a=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const d=c[0];let f,m;if("borderBoxSize"in d){const g=d.borderBoxSize,v=Array.isArray(g)?g[0]:g;f=v.inlineSize,m=v.blockSize}else f=n.offsetWidth,m=n.offsetHeight;s({width:f,height:m})});return a.observe(n,{box:"border-box"}),()=>a.unobserve(n)}else s(void 0)},[n]),o}var Ni="Switch",[YN]=on(Ni),[QN,XN]=YN(Ni),Eg=h.forwardRef((n,o)=>{const{__scopeSwitch:s,name:a,checked:c,defaultChecked:d,required:f,disabled:m,value:g="on",onCheckedChange:v,form:x,...y}=n,[S,N]=h.useState(null),b=Pe(o,A=>N(A)),C=h.useRef(!1),k=S?x||!!S.closest("form"):!0,[E,T]=sr({prop:c,defaultProp:d??!1,onChange:v,caller:Ni});return l.jsxs(QN,{scope:s,checked:E,disabled:m,children:[l.jsx(be.button,{type:"button",role:"switch","aria-checked":E,"aria-required":f,"data-state":Tg(E),"data-disabled":m?"":void 0,disabled:m,value:g,...y,ref:b,onClick:ne(n.onClick,A=>{T(D=>!D),k&&(C.current=A.isPropagationStopped(),C.current||A.stopPropagation())})}),k&&l.jsx(Pg,{control:S,bubbles:!C.current,name:a,value:g,checked:E,required:f,disabled:m,form:x,style:{transform:"translateX(-100%)"}})]})});Eg.displayName=Ni;var _g="SwitchThumb",Rg=h.forwardRef((n,o)=>{const{__scopeSwitch:s,...a}=n,c=XN(_g,s);return l.jsx(be.span,{"data-state":Tg(c.checked),"data-disabled":c.disabled?"":void 0,...a,ref:o})});Rg.displayName=_g;var qN="SwitchBubbleInput",Pg=h.forwardRef(({__scopeSwitch:n,control:o,checked:s,bubbles:a=!0,...c},d)=>{const f=h.useRef(null),m=Pe(f,d),g=Ru(s),v=Pu(o);return h.useEffect(()=>{const x=f.current;if(!x)return;const y=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(y,"checked").set;if(g!==s&&N){const b=new Event("click",{bubbles:a});N.call(x,s),x.dispatchEvent(b)}},[g,s,a]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s,...c,tabIndex:-1,ref:m,style:{...c.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Pg.displayName=qN;function Tg(n){return n?"checked":"unchecked"}var Ag=Eg,ZN=Rg;const Mg=h.forwardRef(({className:n,...o},s)=>l.jsx(Ag,{className:ge("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-lg border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",n),...o,ref:s,children:l.jsx(ZN,{className:ge("pointer-events-none block h-4 w-4 rounded-lg bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));Mg.displayName=Ag.displayName;const JN=pi("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",warning:"border-warning/50 text-warning dark:border-warning [&>svg]:text-warning"}},defaultVariants:{variant:"default"}}),cr=h.forwardRef(({className:n,variant:o,...s},a)=>l.jsx("div",{ref:a,role:"alert",className:ge(JN({variant:o}),n),...s}));cr.displayName="Alert";const eb=h.forwardRef(({className:n,...o},s)=>l.jsx("h5",{ref:s,className:ge("mb-1 font-medium leading-none tracking-tight",n),...o}));eb.displayName="AlertTitle";const ur=h.forwardRef(({className:n,...o},s)=>l.jsx("div",{ref:s,className:ge("text-sm [&_p]:leading-relaxed",n),...o}));ur.displayName="AlertDescription";function tb({nestId:n,nestName:o,stewardshipEnabled:s,onClose:a,onChanged:c}){const[d,f]=h.useState(s),[m,g]=h.useState(!1),[v,x]=h.useState(null),y=async()=>{if(d===s){a();return}g(!0),x(null);try{if((await R0(n,{stewardship_enabled:d})).stewardship_enabled!==d){x("Server did not accept the change. You may not have permission to change this setting."),g(!1);return}c()}catch(S){x(S.message),g(!1)}};return l.jsx(Ot,{open:!0,onOpenChange:a,children:l.jsxs(bt,{className:"sm:max-w-[500px]",children:[l.jsxs(jt,{children:[l.jsxs(kt,{children:["Settings: ",o]}),l.jsx(tn,{children:"Admin controls for this nest. Changes apply to all future documents."})]}),l.jsxs("div",{className:"space-y-4 py-2",children:[v&&l.jsxs(cr,{variant:"destructive",children:[l.jsx(Mr,{className:"h-4 w-4"}),l.jsx(ur,{children:v})]}),l.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsxs(Ue,{className:"flex items-center gap-2 text-sm font-medium",children:[l.jsx(Mt,{className:"h-4 w-4"}),"Stewardship & Approval Workflow"]}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Require steward approval before documents become AI-ready. New documents will start as ",l.jsx("strong",{children:"drafts"}),"."]})]}),l.jsx(Mg,{checked:d,onCheckedChange:f})]}),!d&&l.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted-foreground pt-2 border-t",children:[l.jsx(qc,{className:"h-3.5 w-3.5 mt-0.5 flex-shrink-0"}),l.jsxs("div",{children:[l.jsx("strong",{className:"text-foreground",children:"Currently off."})," New documents are auto-approved and immediately available to AI. Versioning is still on — every edit creates a new version."]})]}),d&&l.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted-foreground pt-2 border-t",children:[l.jsx(qc,{className:"h-3.5 w-3.5 mt-0.5 flex-shrink-0"}),l.jsxs("div",{children:[l.jsx("strong",{className:"text-foreground",children:"When enabled:"})," New documents start as drafts. Assigned stewards must approve before they're available to AI queries. Existing approved documents stay approved."]})]})]})]}),l.jsxs(en,{children:[l.jsx(he,{variant:"outline",onClick:a,disabled:m,children:"Cancel"}),l.jsx(he,{onClick:y,disabled:m,children:m?l.jsx(Nt,{className:"h-4 w-4 animate-spin"}):"Save Settings"})]})]})})}function ou(n,[o,s]){return Math.min(s,Math.max(o,n))}const nb=["top","right","bottom","left"],lr=Math.min,At=Math.max,ei=Math.round,Kl=Math.floor,hn=n=>({x:n,y:n}),rb={left:"right",right:"left",bottom:"top",top:"bottom"};function su(n,o,s){return At(n,lr(o,s))}function Pn(n,o){return typeof n=="function"?n(o):n}function Tn(n){return n.split("-")[0]}function Co(n){return n.split("-")[1]}function Tu(n){return n==="x"?"y":"x"}function Au(n){return n==="y"?"height":"width"}function pn(n){const o=n[0];return o==="t"||o==="b"?"y":"x"}function Mu(n){return Tu(pn(n))}function ob(n,o,s){s===void 0&&(s=!1);const a=Co(n),c=Mu(n),d=Au(c);let f=c==="x"?a===(s?"end":"start")?"right":"left":a==="start"?"bottom":"top";return o.reference[d]>o.floating[d]&&(f=ti(f)),[f,ti(f)]}function sb(n){const o=ti(n);return[lu(n),o,lu(o)]}function lu(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const jm=["left","right"],km=["right","left"],lb=["top","bottom"],ib=["bottom","top"];function ab(n,o,s){switch(n){case"top":case"bottom":return s?o?km:jm:o?jm:km;case"left":case"right":return o?lb:ib;default:return[]}}function cb(n,o,s,a){const c=Co(n);let d=ab(Tn(n),s==="start",a);return c&&(d=d.map(f=>f+"-"+c),o&&(d=d.concat(d.map(lu)))),d}function ti(n){const o=Tn(n);return rb[o]+n.slice(o.length)}function ub(n){return{top:0,right:0,bottom:0,left:0,...n}}function Ig(n){return typeof n!="number"?ub(n):{top:n,right:n,bottom:n,left:n}}function ni(n){const{x:o,y:s,width:a,height:c}=n;return{width:a,height:c,top:s,left:o,right:o+a,bottom:s+c,x:o,y:s}}function Em(n,o,s){let{reference:a,floating:c}=n;const d=pn(o),f=Mu(o),m=Au(f),g=Tn(o),v=d==="y",x=a.x+a.width/2-c.width/2,y=a.y+a.height/2-c.height/2,S=a[m]/2-c[m]/2;let N;switch(g){case"top":N={x,y:a.y-c.height};break;case"bottom":N={x,y:a.y+a.height};break;case"right":N={x:a.x+a.width,y};break;case"left":N={x:a.x-c.width,y};break;default:N={x:a.x,y:a.y}}switch(Co(o)){case"start":N[f]-=S*(s&&v?-1:1);break;case"end":N[f]+=S*(s&&v?-1:1);break}return N}async function db(n,o){var s;o===void 0&&(o={});const{x:a,y:c,platform:d,rects:f,elements:m,strategy:g}=n,{boundary:v="clippingAncestors",rootBoundary:x="viewport",elementContext:y="floating",altBoundary:S=!1,padding:N=0}=Pn(o,n),b=Ig(N),k=m[S?y==="floating"?"reference":"floating":y],E=ni(await d.getClippingRect({element:(s=await(d.isElement==null?void 0:d.isElement(k)))==null||s?k:k.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(m.floating)),boundary:v,rootBoundary:x,strategy:g})),T=y==="floating"?{x:a,y:c,width:f.floating.width,height:f.floating.height}:f.reference,A=await(d.getOffsetParent==null?void 0:d.getOffsetParent(m.floating)),D=await(d.isElement==null?void 0:d.isElement(A))?await(d.getScale==null?void 0:d.getScale(A))||{x:1,y:1}:{x:1,y:1},W=ni(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:T,offsetParent:A,strategy:g}):T);return{top:(E.top-W.top+b.top)/D.y,bottom:(W.bottom-E.bottom+b.bottom)/D.y,left:(E.left-W.left+b.left)/D.x,right:(W.right-E.right+b.right)/D.x}}const fb=50,pb=async(n,o,s)=>{const{placement:a="bottom",strategy:c="absolute",middleware:d=[],platform:f}=s,m=f.detectOverflow?f:{...f,detectOverflow:db},g=await(f.isRTL==null?void 0:f.isRTL(o));let v=await f.getElementRects({reference:n,floating:o,strategy:c}),{x,y}=Em(v,a,g),S=a,N=0;const b={};for(let C=0;C<d.length;C++){const k=d[C];if(!k)continue;const{name:E,fn:T}=k,{x:A,y:D,data:W,reset:F}=await T({x,y,initialPlacement:a,placement:S,strategy:c,middlewareData:b,rects:v,platform:m,elements:{reference:n,floating:o}});x=A??x,y=D??y,b[E]={...b[E],...W},F&&N<fb&&(N++,typeof F=="object"&&(F.placement&&(S=F.placement),F.rects&&(v=F.rects===!0?await f.getElementRects({reference:n,floating:o,strategy:c}):F.rects),{x,y}=Em(v,S,g)),C=-1)}return{x,y,placement:S,strategy:c,middlewareData:b}},mb=n=>({name:"arrow",options:n,async fn(o){const{x:s,y:a,placement:c,rects:d,platform:f,elements:m,middlewareData:g}=o,{element:v,padding:x=0}=Pn(n,o)||{};if(v==null)return{};const y=Ig(x),S={x:s,y:a},N=Mu(c),b=Au(N),C=await f.getDimensions(v),k=N==="y",E=k?"top":"left",T=k?"bottom":"right",A=k?"clientHeight":"clientWidth",D=d.reference[b]+d.reference[N]-S[N]-d.floating[b],W=S[N]-d.reference[N],F=await(f.getOffsetParent==null?void 0:f.getOffsetParent(v));let $=F?F[A]:0;(!$||!await(f.isElement==null?void 0:f.isElement(F)))&&($=m.floating[A]||d.floating[b]);const z=D/2-W/2,Q=$/2-C[b]/2-1,ee=lr(y[E],Q),fe=lr(y[T],Q),me=ee,we=$-C[b]-fe,ve=$/2-C[b]/2+z,Ne=su(me,ve,we),J=!g.arrow&&Co(c)!=null&&ve!==Ne&&d.reference[b]/2-(ve<me?ee:fe)-C[b]/2<0,re=J?ve<me?ve-me:ve-we:0;return{[N]:S[N]+re,data:{[N]:Ne,centerOffset:ve-Ne-re,...J&&{alignmentOffset:re}},reset:J}}}),hb=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(o){var s,a;const{placement:c,middlewareData:d,rects:f,initialPlacement:m,platform:g,elements:v}=o,{mainAxis:x=!0,crossAxis:y=!0,fallbackPlacements:S,fallbackStrategy:N="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:C=!0,...k}=Pn(n,o);if((s=d.arrow)!=null&&s.alignmentOffset)return{};const E=Tn(c),T=pn(m),A=Tn(m)===m,D=await(g.isRTL==null?void 0:g.isRTL(v.floating)),W=S||(A||!C?[ti(m)]:sb(m)),F=b!=="none";!S&&F&&W.push(...cb(m,C,b,D));const $=[m,...W],z=await g.detectOverflow(o,k),Q=[];let ee=((a=d.flip)==null?void 0:a.overflows)||[];if(x&&Q.push(z[E]),y){const ve=ob(c,f,D);Q.push(z[ve[0]],z[ve[1]])}if(ee=[...ee,{placement:c,overflows:Q}],!Q.every(ve=>ve<=0)){var fe,me;const ve=(((fe=d.flip)==null?void 0:fe.index)||0)+1,Ne=$[ve];if(Ne&&(!(y==="alignment"?T!==pn(Ne):!1)||ee.every(V=>pn(V.placement)===T?V.overflows[0]>0:!0)))return{data:{index:ve,overflows:ee},reset:{placement:Ne}};let J=(me=ee.filter(re=>re.overflows[0]<=0).sort((re,V)=>re.overflows[1]-V.overflows[1])[0])==null?void 0:me.placement;if(!J)switch(N){case"bestFit":{var we;const re=(we=ee.filter(V=>{if(F){const B=pn(V.placement);return B===T||B==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(B=>B>0).reduce((B,O)=>B+O,0)]).sort((V,B)=>V[1]-B[1])[0])==null?void 0:we[0];re&&(J=re);break}case"initialPlacement":J=m;break}if(c!==J)return{reset:{placement:J}}}return{}}}};function _m(n,o){return{top:n.top-o.height,right:n.right-o.width,bottom:n.bottom-o.height,left:n.left-o.width}}function Rm(n){return nb.some(o=>n[o]>=0)}const gb=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(o){const{rects:s,platform:a}=o,{strategy:c="referenceHidden",...d}=Pn(n,o);switch(c){case"referenceHidden":{const f=await a.detectOverflow(o,{...d,elementContext:"reference"}),m=_m(f,s.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:Rm(m)}}}case"escaped":{const f=await a.detectOverflow(o,{...d,altBoundary:!0}),m=_m(f,s.floating);return{data:{escapedOffsets:m,escaped:Rm(m)}}}default:return{}}}}},Og=new Set(["left","top"]);async function vb(n,o){const{placement:s,platform:a,elements:c}=n,d=await(a.isRTL==null?void 0:a.isRTL(c.floating)),f=Tn(s),m=Co(s),g=pn(s)==="y",v=Og.has(f)?-1:1,x=d&&g?-1:1,y=Pn(o,n);let{mainAxis:S,crossAxis:N,alignmentAxis:b}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return m&&typeof b=="number"&&(N=m==="end"?b*-1:b),g?{x:N*x,y:S*v}:{x:S*v,y:N*x}}const xb=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(o){var s,a;const{x:c,y:d,placement:f,middlewareData:m}=o,g=await vb(o,n);return f===((s=m.offset)==null?void 0:s.placement)&&(a=m.arrow)!=null&&a.alignmentOffset?{}:{x:c+g.x,y:d+g.y,data:{...g,placement:f}}}}},yb=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(o){const{x:s,y:a,placement:c,platform:d}=o,{mainAxis:f=!0,crossAxis:m=!1,limiter:g={fn:E=>{let{x:T,y:A}=E;return{x:T,y:A}}},...v}=Pn(n,o),x={x:s,y:a},y=await d.detectOverflow(o,v),S=pn(Tn(c)),N=Tu(S);let b=x[N],C=x[S];if(f){const E=N==="y"?"top":"left",T=N==="y"?"bottom":"right",A=b+y[E],D=b-y[T];b=su(A,b,D)}if(m){const E=S==="y"?"top":"left",T=S==="y"?"bottom":"right",A=C+y[E],D=C-y[T];C=su(A,C,D)}const k=g.fn({...o,[N]:b,[S]:C});return{...k,data:{x:k.x-s,y:k.y-a,enabled:{[N]:f,[S]:m}}}}}},wb=function(n){return n===void 0&&(n={}),{options:n,fn(o){const{x:s,y:a,placement:c,rects:d,middlewareData:f}=o,{offset:m=0,mainAxis:g=!0,crossAxis:v=!0}=Pn(n,o),x={x:s,y:a},y=pn(c),S=Tu(y);let N=x[S],b=x[y];const C=Pn(m,o),k=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(g){const A=S==="y"?"height":"width",D=d.reference[S]-d.floating[A]+k.mainAxis,W=d.reference[S]+d.reference[A]-k.mainAxis;N<D?N=D:N>W&&(N=W)}if(v){var E,T;const A=S==="y"?"width":"height",D=Og.has(Tn(c)),W=d.reference[y]-d.floating[A]+(D&&((E=f.offset)==null?void 0:E[y])||0)+(D?0:k.crossAxis),F=d.reference[y]+d.reference[A]+(D?0:((T=f.offset)==null?void 0:T[y])||0)-(D?k.crossAxis:0);b<W?b=W:b>F&&(b=F)}return{[S]:N,[y]:b}}}},Sb=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(o){var s,a;const{placement:c,rects:d,platform:f,elements:m}=o,{apply:g=()=>{},...v}=Pn(n,o),x=await f.detectOverflow(o,v),y=Tn(c),S=Co(c),N=pn(c)==="y",{width:b,height:C}=d.floating;let k,E;y==="top"||y==="bottom"?(k=y,E=S===(await(f.isRTL==null?void 0:f.isRTL(m.floating))?"start":"end")?"left":"right"):(E=y,k=S==="end"?"top":"bottom");const T=C-x.top-x.bottom,A=b-x.left-x.right,D=lr(C-x[k],T),W=lr(b-x[E],A),F=!o.middlewareData.shift;let $=D,z=W;if((s=o.middlewareData.shift)!=null&&s.enabled.x&&(z=A),(a=o.middlewareData.shift)!=null&&a.enabled.y&&($=T),F&&!S){const ee=At(x.left,0),fe=At(x.right,0),me=At(x.top,0),we=At(x.bottom,0);N?z=b-2*(ee!==0||fe!==0?ee+fe:At(x.left,x.right)):$=C-2*(me!==0||we!==0?me+we:At(x.top,x.bottom))}await g({...o,availableWidth:z,availableHeight:$});const Q=await f.getDimensions(m.floating);return b!==Q.width||C!==Q.height?{reset:{rects:!0}}:{}}}};function bi(){return typeof window<"u"}function No(n){return Dg(n)?(n.nodeName||"").toLowerCase():"#document"}function It(n){var o;return(n==null||(o=n.ownerDocument)==null?void 0:o.defaultView)||window}function gn(n){var o;return(o=(Dg(n)?n.ownerDocument:n.document)||window.document)==null?void 0:o.documentElement}function Dg(n){return bi()?n instanceof Node||n instanceof It(n).Node:!1}function nn(n){return bi()?n instanceof Element||n instanceof It(n).Element:!1}function An(n){return bi()?n instanceof HTMLElement||n instanceof It(n).HTMLElement:!1}function Pm(n){return!bi()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof It(n).ShadowRoot}function ks(n){const{overflow:o,overflowX:s,overflowY:a,display:c}=rn(n);return/auto|scroll|overlay|hidden|clip/.test(o+a+s)&&c!=="inline"&&c!=="contents"}function Cb(n){return/^(table|td|th)$/.test(No(n))}function ji(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const Nb=/transform|translate|scale|rotate|perspective|filter/,bb=/paint|layout|strict|content/,Er=n=>!!n&&n!=="none";let Wc;function Iu(n){const o=nn(n)?rn(n):n;return Er(o.transform)||Er(o.translate)||Er(o.scale)||Er(o.rotate)||Er(o.perspective)||!Ou()&&(Er(o.backdropFilter)||Er(o.filter))||Nb.test(o.willChange||"")||bb.test(o.contain||"")}function jb(n){let o=ir(n);for(;An(o)&&!xo(o);){if(Iu(o))return o;if(ji(o))return null;o=ir(o)}return null}function Ou(){return Wc==null&&(Wc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Wc}function xo(n){return/^(html|body|#document)$/.test(No(n))}function rn(n){return It(n).getComputedStyle(n)}function ki(n){return nn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function ir(n){if(No(n)==="html")return n;const o=n.assignedSlot||n.parentNode||Pm(n)&&n.host||gn(n);return Pm(o)?o.host:o}function Lg(n){const o=ir(n);return xo(o)?n.ownerDocument?n.ownerDocument.body:n.body:An(o)&&ks(o)?o:Lg(o)}function vs(n,o,s){var a;o===void 0&&(o=[]),s===void 0&&(s=!0);const c=Lg(n),d=c===((a=n.ownerDocument)==null?void 0:a.body),f=It(c);if(d){const m=iu(f);return o.concat(f,f.visualViewport||[],ks(c)?c:[],m&&s?vs(m):[])}else return o.concat(c,vs(c,[],s))}function iu(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function zg(n){const o=rn(n);let s=parseFloat(o.width)||0,a=parseFloat(o.height)||0;const c=An(n),d=c?n.offsetWidth:s,f=c?n.offsetHeight:a,m=ei(s)!==d||ei(a)!==f;return m&&(s=d,a=f),{width:s,height:a,$:m}}function Du(n){return nn(n)?n:n.contextElement}function mo(n){const o=Du(n);if(!An(o))return hn(1);const s=o.getBoundingClientRect(),{width:a,height:c,$:d}=zg(o);let f=(d?ei(s.width):s.width)/a,m=(d?ei(s.height):s.height)/c;return(!f||!Number.isFinite(f))&&(f=1),(!m||!Number.isFinite(m))&&(m=1),{x:f,y:m}}const kb=hn(0);function Fg(n){const o=It(n);return!Ou()||!o.visualViewport?kb:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function Eb(n,o,s){return o===void 0&&(o=!1),!s||o&&s!==It(n)?!1:o}function Rr(n,o,s,a){o===void 0&&(o=!1),s===void 0&&(s=!1);const c=n.getBoundingClientRect(),d=Du(n);let f=hn(1);o&&(a?nn(a)&&(f=mo(a)):f=mo(n));const m=Eb(d,s,a)?Fg(d):hn(0);let g=(c.left+m.x)/f.x,v=(c.top+m.y)/f.y,x=c.width/f.x,y=c.height/f.y;if(d){const S=It(d),N=a&&nn(a)?It(a):a;let b=S,C=iu(b);for(;C&&a&&N!==b;){const k=mo(C),E=C.getBoundingClientRect(),T=rn(C),A=E.left+(C.clientLeft+parseFloat(T.paddingLeft))*k.x,D=E.top+(C.clientTop+parseFloat(T.paddingTop))*k.y;g*=k.x,v*=k.y,x*=k.x,y*=k.y,g+=A,v+=D,b=It(C),C=iu(b)}}return ni({width:x,height:y,x:g,y:v})}function Ei(n,o){const s=ki(n).scrollLeft;return o?o.left+s:Rr(gn(n)).left+s}function $g(n,o){const s=n.getBoundingClientRect(),a=s.left+o.scrollLeft-Ei(n,s),c=s.top+o.scrollTop;return{x:a,y:c}}function _b(n){let{elements:o,rect:s,offsetParent:a,strategy:c}=n;const d=c==="fixed",f=gn(a),m=o?ji(o.floating):!1;if(a===f||m&&d)return s;let g={scrollLeft:0,scrollTop:0},v=hn(1);const x=hn(0),y=An(a);if((y||!y&&!d)&&((No(a)!=="body"||ks(f))&&(g=ki(a)),y)){const N=Rr(a);v=mo(a),x.x=N.x+a.clientLeft,x.y=N.y+a.clientTop}const S=f&&!y&&!d?$g(f,g):hn(0);return{width:s.width*v.x,height:s.height*v.y,x:s.x*v.x-g.scrollLeft*v.x+x.x+S.x,y:s.y*v.y-g.scrollTop*v.y+x.y+S.y}}function Rb(n){return Array.from(n.getClientRects())}function Pb(n){const o=gn(n),s=ki(n),a=n.ownerDocument.body,c=At(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),d=At(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let f=-s.scrollLeft+Ei(n);const m=-s.scrollTop;return rn(a).direction==="rtl"&&(f+=At(o.clientWidth,a.clientWidth)-c),{width:c,height:d,x:f,y:m}}const Tm=25;function Tb(n,o){const s=It(n),a=gn(n),c=s.visualViewport;let d=a.clientWidth,f=a.clientHeight,m=0,g=0;if(c){d=c.width,f=c.height;const x=Ou();(!x||x&&o==="fixed")&&(m=c.offsetLeft,g=c.offsetTop)}const v=Ei(a);if(v<=0){const x=a.ownerDocument,y=x.body,S=getComputedStyle(y),N=x.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,b=Math.abs(a.clientWidth-y.clientWidth-N);b<=Tm&&(d-=b)}else v<=Tm&&(d+=v);return{width:d,height:f,x:m,y:g}}function Ab(n,o){const s=Rr(n,!0,o==="fixed"),a=s.top+n.clientTop,c=s.left+n.clientLeft,d=An(n)?mo(n):hn(1),f=n.clientWidth*d.x,m=n.clientHeight*d.y,g=c*d.x,v=a*d.y;return{width:f,height:m,x:g,y:v}}function Am(n,o,s){let a;if(o==="viewport")a=Tb(n,s);else if(o==="document")a=Pb(gn(n));else if(nn(o))a=Ab(o,s);else{const c=Fg(n);a={x:o.x-c.x,y:o.y-c.y,width:o.width,height:o.height}}return ni(a)}function Vg(n,o){const s=ir(n);return s===o||!nn(s)||xo(s)?!1:rn(s).position==="fixed"||Vg(s,o)}function Mb(n,o){const s=o.get(n);if(s)return s;let a=vs(n,[],!1).filter(m=>nn(m)&&No(m)!=="body"),c=null;const d=rn(n).position==="fixed";let f=d?ir(n):n;for(;nn(f)&&!xo(f);){const m=rn(f),g=Iu(f);!g&&m.position==="fixed"&&(c=null),(d?!g&&!c:!g&&m.position==="static"&&!!c&&(c.position==="absolute"||c.position==="fixed")||ks(f)&&!g&&Vg(n,f))?a=a.filter(x=>x!==f):c=m,f=ir(f)}return o.set(n,a),a}function Ib(n){let{element:o,boundary:s,rootBoundary:a,strategy:c}=n;const f=[...s==="clippingAncestors"?ji(o)?[]:Mb(o,this._c):[].concat(s),a],m=Am(o,f[0],c);let g=m.top,v=m.right,x=m.bottom,y=m.left;for(let S=1;S<f.length;S++){const N=Am(o,f[S],c);g=At(N.top,g),v=lr(N.right,v),x=lr(N.bottom,x),y=At(N.left,y)}return{width:v-y,height:x-g,x:y,y:g}}function Ob(n){const{width:o,height:s}=zg(n);return{width:o,height:s}}function Db(n,o,s){const a=An(o),c=gn(o),d=s==="fixed",f=Rr(n,!0,d,o);let m={scrollLeft:0,scrollTop:0};const g=hn(0);function v(){g.x=Ei(c)}if(a||!a&&!d)if((No(o)!=="body"||ks(c))&&(m=ki(o)),a){const N=Rr(o,!0,d,o);g.x=N.x+o.clientLeft,g.y=N.y+o.clientTop}else c&&v();d&&!a&&c&&v();const x=c&&!a&&!d?$g(c,m):hn(0),y=f.left+m.scrollLeft-g.x-x.x,S=f.top+m.scrollTop-g.y-x.y;return{x:y,y:S,width:f.width,height:f.height}}function Hc(n){return rn(n).position==="static"}function Mm(n,o){if(!An(n)||rn(n).position==="fixed")return null;if(o)return o(n);let s=n.offsetParent;return gn(n)===s&&(s=s.ownerDocument.body),s}function Bg(n,o){const s=It(n);if(ji(n))return s;if(!An(n)){let c=ir(n);for(;c&&!xo(c);){if(nn(c)&&!Hc(c))return c;c=ir(c)}return s}let a=Mm(n,o);for(;a&&Cb(a)&&Hc(a);)a=Mm(a,o);return a&&xo(a)&&Hc(a)&&!Iu(a)?s:a||jb(n)||s}const Lb=async function(n){const o=this.getOffsetParent||Bg,s=this.getDimensions,a=await s(n.floating);return{reference:Db(n.reference,await o(n.floating),n.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function zb(n){return rn(n).direction==="rtl"}const Fb={convertOffsetParentRelativeRectToViewportRelativeRect:_b,getDocumentElement:gn,getClippingRect:Ib,getOffsetParent:Bg,getElementRects:Lb,getClientRects:Rb,getDimensions:Ob,getScale:mo,isElement:nn,isRTL:zb};function Ug(n,o){return n.x===o.x&&n.y===o.y&&n.width===o.width&&n.height===o.height}function $b(n,o){let s=null,a;const c=gn(n);function d(){var m;clearTimeout(a),(m=s)==null||m.disconnect(),s=null}function f(m,g){m===void 0&&(m=!1),g===void 0&&(g=1),d();const v=n.getBoundingClientRect(),{left:x,top:y,width:S,height:N}=v;if(m||o(),!S||!N)return;const b=Kl(y),C=Kl(c.clientWidth-(x+S)),k=Kl(c.clientHeight-(y+N)),E=Kl(x),A={rootMargin:-b+"px "+-C+"px "+-k+"px "+-E+"px",threshold:At(0,lr(1,g))||1};let D=!0;function W(F){const $=F[0].intersectionRatio;if($!==g){if(!D)return f();$?f(!1,$):a=setTimeout(()=>{f(!1,1e-7)},1e3)}$===1&&!Ug(v,n.getBoundingClientRect())&&f(),D=!1}try{s=new IntersectionObserver(W,{...A,root:c.ownerDocument})}catch{s=new IntersectionObserver(W,A)}s.observe(n)}return f(!0),d}function Vb(n,o,s,a){a===void 0&&(a={});const{ancestorScroll:c=!0,ancestorResize:d=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:g=!1}=a,v=Du(n),x=c||d?[...v?vs(v):[],...o?vs(o):[]]:[];x.forEach(E=>{c&&E.addEventListener("scroll",s,{passive:!0}),d&&E.addEventListener("resize",s)});const y=v&&m?$b(v,s):null;let S=-1,N=null;f&&(N=new ResizeObserver(E=>{let[T]=E;T&&T.target===v&&N&&o&&(N.unobserve(o),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var A;(A=N)==null||A.observe(o)})),s()}),v&&!g&&N.observe(v),o&&N.observe(o));let b,C=g?Rr(n):null;g&&k();function k(){const E=Rr(n);C&&!Ug(C,E)&&s(),C=E,b=requestAnimationFrame(k)}return s(),()=>{var E;x.forEach(T=>{c&&T.removeEventListener("scroll",s),d&&T.removeEventListener("resize",s)}),y==null||y(),(E=N)==null||E.disconnect(),N=null,g&&cancelAnimationFrame(b)}}const Bb=xb,Ub=yb,Wb=hb,Hb=Sb,Kb=gb,Im=mb,Gb=wb,Yb=(n,o,s)=>{const a=new Map,c={platform:Fb,...s},d={...c.platform,_c:a};return pb(n,o,{...c,platform:d})};var Qb=typeof document<"u",Xb=function(){},Xl=Qb?h.useLayoutEffect:Xb;function ri(n,o){if(n===o)return!0;if(typeof n!=typeof o)return!1;if(typeof n=="function"&&n.toString()===o.toString())return!0;let s,a,c;if(n&&o&&typeof n=="object"){if(Array.isArray(n)){if(s=n.length,s!==o.length)return!1;for(a=s;a--!==0;)if(!ri(n[a],o[a]))return!1;return!0}if(c=Object.keys(n),s=c.length,s!==Object.keys(o).length)return!1;for(a=s;a--!==0;)if(!{}.hasOwnProperty.call(o,c[a]))return!1;for(a=s;a--!==0;){const d=c[a];if(!(d==="_owner"&&n.$$typeof)&&!ri(n[d],o[d]))return!1}return!0}return n!==n&&o!==o}function Wg(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Om(n,o){const s=Wg(n);return Math.round(o*s)/s}function Kc(n){const o=h.useRef(n);return Xl(()=>{o.current=n}),o}function qb(n){n===void 0&&(n={});const{placement:o="bottom",strategy:s="absolute",middleware:a=[],platform:c,elements:{reference:d,floating:f}={},transform:m=!0,whileElementsMounted:g,open:v}=n,[x,y]=h.useState({x:0,y:0,strategy:s,placement:o,middlewareData:{},isPositioned:!1}),[S,N]=h.useState(a);ri(S,a)||N(a);const[b,C]=h.useState(null),[k,E]=h.useState(null),T=h.useCallback(V=>{V!==F.current&&(F.current=V,C(V))},[]),A=h.useCallback(V=>{V!==$.current&&($.current=V,E(V))},[]),D=d||b,W=f||k,F=h.useRef(null),$=h.useRef(null),z=h.useRef(x),Q=g!=null,ee=Kc(g),fe=Kc(c),me=Kc(v),we=h.useCallback(()=>{if(!F.current||!$.current)return;const V={placement:o,strategy:s,middleware:S};fe.current&&(V.platform=fe.current),Yb(F.current,$.current,V).then(B=>{const O={...B,isPositioned:me.current!==!1};ve.current&&!ri(z.current,O)&&(z.current=O,Ns.flushSync(()=>{y(O)}))})},[S,o,s,fe,me]);Xl(()=>{v===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,y(V=>({...V,isPositioned:!1})))},[v]);const ve=h.useRef(!1);Xl(()=>(ve.current=!0,()=>{ve.current=!1}),[]),Xl(()=>{if(D&&(F.current=D),W&&($.current=W),D&&W){if(ee.current)return ee.current(D,W,we);we()}},[D,W,we,ee,Q]);const Ne=h.useMemo(()=>({reference:F,floating:$,setReference:T,setFloating:A}),[T,A]),J=h.useMemo(()=>({reference:D,floating:W}),[D,W]),re=h.useMemo(()=>{const V={position:s,left:0,top:0};if(!J.floating)return V;const B=Om(J.floating,x.x),O=Om(J.floating,x.y);return m?{...V,transform:"translate("+B+"px, "+O+"px)",...Wg(J.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:B,top:O}},[s,m,J.floating,x.x,x.y]);return h.useMemo(()=>({...x,update:we,refs:Ne,elements:J,floatingStyles:re}),[x,we,Ne,J,re])}const Zb=n=>{function o(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:n,fn(s){const{element:a,padding:c}=typeof n=="function"?n(s):n;return a&&o(a)?a.current!=null?Im({element:a.current,padding:c}).fn(s):{}:a?Im({element:a,padding:c}).fn(s):{}}}},Jb=(n,o)=>{const s=Bb(n);return{name:s.name,fn:s.fn,options:[n,o]}},ej=(n,o)=>{const s=Ub(n);return{name:s.name,fn:s.fn,options:[n,o]}},tj=(n,o)=>({fn:Gb(n).fn,options:[n,o]}),nj=(n,o)=>{const s=Wb(n);return{name:s.name,fn:s.fn,options:[n,o]}},rj=(n,o)=>{const s=Hb(n);return{name:s.name,fn:s.fn,options:[n,o]}},oj=(n,o)=>{const s=Kb(n);return{name:s.name,fn:s.fn,options:[n,o]}},sj=(n,o)=>{const s=Zb(n);return{name:s.name,fn:s.fn,options:[n,o]}};var lj="Arrow",Hg=h.forwardRef((n,o)=>{const{children:s,width:a=10,height:c=5,...d}=n;return l.jsx(be.svg,{...d,ref:o,width:a,height:c,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?s:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Hg.displayName=lj;var ij=Hg,Lu="Popper",[Kg,_i]=on(Lu),[aj,Gg]=Kg(Lu),Yg=n=>{const{__scopePopper:o,children:s}=n,[a,c]=h.useState(null);return l.jsx(aj,{scope:o,anchor:a,onAnchorChange:c,children:s})};Yg.displayName=Lu;var Qg="PopperAnchor",Xg=h.forwardRef((n,o)=>{const{__scopePopper:s,virtualRef:a,...c}=n,d=Gg(Qg,s),f=h.useRef(null),m=Pe(o,f),g=h.useRef(null);return h.useEffect(()=>{const v=g.current;g.current=(a==null?void 0:a.current)||f.current,v!==g.current&&d.onAnchorChange(g.current)}),a?null:l.jsx(be.div,{...c,ref:m})});Xg.displayName=Qg;var zu="PopperContent",[cj,uj]=Kg(zu),qg=h.forwardRef((n,o)=>{var q,H,Z,ye,ke,Te;const{__scopePopper:s,side:a="bottom",sideOffset:c=0,align:d="center",alignOffset:f=0,arrowPadding:m=0,avoidCollisions:g=!0,collisionBoundary:v=[],collisionPadding:x=0,sticky:y="partial",hideWhenDetached:S=!1,updatePositionStrategy:N="optimized",onPlaced:b,...C}=n,k=Gg(zu,s),[E,T]=h.useState(null),A=Pe(o,Ve=>T(Ve)),[D,W]=h.useState(null),F=Pu(D),$=(F==null?void 0:F.width)??0,z=(F==null?void 0:F.height)??0,Q=a+(d!=="center"?"-"+d:""),ee=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},fe=Array.isArray(v)?v:[v],me=fe.length>0,we={padding:ee,boundary:fe.filter(fj),altBoundary:me},{refs:ve,floatingStyles:Ne,placement:J,isPositioned:re,middlewareData:V}=qb({strategy:"fixed",placement:Q,whileElementsMounted:(...Ve)=>Vb(...Ve,{animationFrame:N==="always"}),elements:{reference:k.anchor},middleware:[Jb({mainAxis:c+z,alignmentAxis:f}),g&&ej({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?tj():void 0,...we}),g&&nj({...we}),rj({...we,apply:({elements:Ve,rects:Qe,availableWidth:Mn,availableHeight:In})=>{const{width:xn,height:Rs}=Qe.reference,On=Ve.floating.style;On.setProperty("--radix-popper-available-width",`${Mn}px`),On.setProperty("--radix-popper-available-height",`${In}px`),On.setProperty("--radix-popper-anchor-width",`${xn}px`),On.setProperty("--radix-popper-anchor-height",`${Rs}px`)}}),D&&sj({element:D,padding:m}),pj({arrowWidth:$,arrowHeight:z}),S&&oj({strategy:"referenceHidden",...we})]}),[B,O]=ev(J),R=ot(b);Ye(()=>{re&&(R==null||R())},[re,R]);const U=(q=V.arrow)==null?void 0:q.x,xe=(H=V.arrow)==null?void 0:H.y,pe=((Z=V.arrow)==null?void 0:Z.centerOffset)!==0,[ue,se]=h.useState();return Ye(()=>{E&&se(window.getComputedStyle(E).zIndex)},[E]),l.jsx("div",{ref:ve.setFloating,"data-radix-popper-content-wrapper":"",style:{...Ne,transform:re?Ne.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(ye=V.transformOrigin)==null?void 0:ye.x,(ke=V.transformOrigin)==null?void 0:ke.y].join(" "),...((Te=V.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:l.jsx(cj,{scope:s,placedSide:B,onArrowChange:W,arrowX:U,arrowY:xe,shouldHideArrow:pe,children:l.jsx(be.div,{"data-side":B,"data-align":O,...C,ref:A,style:{...C.style,animation:re?void 0:"none"}})})})});qg.displayName=zu;var Zg="PopperArrow",dj={top:"bottom",right:"left",bottom:"top",left:"right"},Jg=h.forwardRef(function(o,s){const{__scopePopper:a,...c}=o,d=uj(Zg,a),f=dj[d.placedSide];return l.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:l.jsx(ij,{...c,ref:s,style:{...c.style,display:"block"}})})});Jg.displayName=Zg;function fj(n){return n!==null}var pj=n=>({name:"transformOrigin",options:n,fn(o){var k,E,T;const{placement:s,rects:a,middlewareData:c}=o,f=((k=c.arrow)==null?void 0:k.centerOffset)!==0,m=f?0:n.arrowWidth,g=f?0:n.arrowHeight,[v,x]=ev(s),y={start:"0%",center:"50%",end:"100%"}[x],S=(((E=c.arrow)==null?void 0:E.x)??0)+m/2,N=(((T=c.arrow)==null?void 0:T.y)??0)+g/2;let b="",C="";return v==="bottom"?(b=f?y:`${S}px`,C=`${-g}px`):v==="top"?(b=f?y:`${S}px`,C=`${a.floating.height+g}px`):v==="right"?(b=`${-g}px`,C=f?y:`${N}px`):v==="left"&&(b=`${a.floating.width+g}px`,C=f?y:`${N}px`),{data:{x:b,y:C}}}});function ev(n){const[o,s="center"]=n.split("-");return[o,s]}var tv=Yg,nv=Xg,rv=qg,ov=Jg,sv=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),mj="VisuallyHidden",hj=h.forwardRef((n,o)=>l.jsx(be.span,{...n,ref:o,style:{...sv,...n.style}}));hj.displayName=mj;var gj=[" ","Enter","ArrowUp","ArrowDown"],vj=[" ","Enter"],Pr="Select",[Ri,Pi,xj]=Eu(Pr),[bo]=on(Pr,[xj,_i]),Ti=_i(),[yj,dr]=bo(Pr),[wj,Sj]=bo(Pr),lv=n=>{const{__scopeSelect:o,children:s,open:a,defaultOpen:c,onOpenChange:d,value:f,defaultValue:m,onValueChange:g,dir:v,name:x,autoComplete:y,disabled:S,required:N,form:b}=n,C=Ti(o),[k,E]=h.useState(null),[T,A]=h.useState(null),[D,W]=h.useState(!1),F=bs(v),[$,z]=sr({prop:a,defaultProp:c??!1,onChange:d,caller:Pr}),[Q,ee]=sr({prop:f,defaultProp:m,onChange:g,caller:Pr}),fe=h.useRef(null),me=k?b||!!k.closest("form"):!0,[we,ve]=h.useState(new Set),Ne=Array.from(we).map(J=>J.props.value).join(";");return l.jsx(tv,{...C,children:l.jsxs(yj,{required:N,scope:o,trigger:k,onTriggerChange:E,valueNode:T,onValueNodeChange:A,valueNodeHasChildren:D,onValueNodeHasChildrenChange:W,contentId:mn(),value:Q,onValueChange:ee,open:$,onOpenChange:z,dir:F,triggerPointerDownPosRef:fe,disabled:S,children:[l.jsx(Ri.Provider,{scope:o,children:l.jsx(wj,{scope:n.__scopeSelect,onNativeOptionAdd:h.useCallback(J=>{ve(re=>new Set(re).add(J))},[]),onNativeOptionRemove:h.useCallback(J=>{ve(re=>{const V=new Set(re);return V.delete(J),V})},[]),children:s})}),me?l.jsxs(Pv,{"aria-hidden":!0,required:N,tabIndex:-1,name:x,autoComplete:y,value:Q,onChange:J=>ee(J.target.value),disabled:S,form:b,children:[Q===void 0?l.jsx("option",{value:""}):null,Array.from(we)]},Ne):null]})})};lv.displayName=Pr;var iv="SelectTrigger",av=h.forwardRef((n,o)=>{const{__scopeSelect:s,disabled:a=!1,...c}=n,d=Ti(s),f=dr(iv,s),m=f.disabled||a,g=Pe(o,f.onTriggerChange),v=Pi(s),x=h.useRef("touch"),[y,S,N]=Av(C=>{const k=v().filter(A=>!A.disabled),E=k.find(A=>A.value===f.value),T=Mv(k,C,E);T!==void 0&&f.onValueChange(T.value)}),b=C=>{m||(f.onOpenChange(!0),N()),C&&(f.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})};return l.jsx(nv,{asChild:!0,...d,children:l.jsx(be.button,{type:"button",role:"combobox","aria-controls":f.contentId,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":Tv(f.value)?"":void 0,...c,ref:g,onClick:ne(c.onClick,C=>{C.currentTarget.focus(),x.current!=="mouse"&&b(C)}),onPointerDown:ne(c.onPointerDown,C=>{x.current=C.pointerType;const k=C.target;k.hasPointerCapture(C.pointerId)&&k.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(b(C),C.preventDefault())}),onKeyDown:ne(c.onKeyDown,C=>{const k=y.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&S(C.key),!(k&&C.key===" ")&&gj.includes(C.key)&&(b(),C.preventDefault())})})})});av.displayName=iv;var cv="SelectValue",uv=h.forwardRef((n,o)=>{const{__scopeSelect:s,className:a,style:c,children:d,placeholder:f="",...m}=n,g=dr(cv,s),{onValueNodeHasChildrenChange:v}=g,x=d!==void 0,y=Pe(o,g.onValueNodeChange);return Ye(()=>{v(x)},[v,x]),l.jsx(be.span,{...m,ref:y,style:{pointerEvents:"none"},children:Tv(g.value)?l.jsx(l.Fragment,{children:f}):d})});uv.displayName=cv;var Cj="SelectIcon",dv=h.forwardRef((n,o)=>{const{__scopeSelect:s,children:a,...c}=n;return l.jsx(be.span,{"aria-hidden":!0,...c,ref:o,children:a||"▼"})});dv.displayName=Cj;var Nj="SelectPortal",fv=n=>l.jsx(vi,{asChild:!0,...n});fv.displayName=Nj;var Tr="SelectContent",pv=h.forwardRef((n,o)=>{const s=dr(Tr,n.__scopeSelect),[a,c]=h.useState();if(Ye(()=>{c(new DocumentFragment)},[]),!s.open){const d=a;return d?Ns.createPortal(l.jsx(mv,{scope:n.__scopeSelect,children:l.jsx(Ri.Slot,{scope:n.__scopeSelect,children:l.jsx("div",{children:n.children})})}),d):null}return l.jsx(hv,{...n,ref:o})});pv.displayName=Tr;var Zt=10,[mv,fr]=bo(Tr),bj="SelectContentImpl",jj=vo("SelectContent.RemoveScroll"),hv=h.forwardRef((n,o)=>{const{__scopeSelect:s,position:a="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:d,onPointerDownOutside:f,side:m,sideOffset:g,align:v,alignOffset:x,arrowPadding:y,collisionBoundary:S,collisionPadding:N,sticky:b,hideWhenDetached:C,avoidCollisions:k,...E}=n,T=dr(Tr,s),[A,D]=h.useState(null),[W,F]=h.useState(null),$=Pe(o,q=>D(q)),[z,Q]=h.useState(null),[ee,fe]=h.useState(null),me=Pi(s),[we,ve]=h.useState(!1),Ne=h.useRef(!1);h.useEffect(()=>{if(A)return Nu(A)},[A]),Cu();const J=h.useCallback(q=>{const[H,...Z]=me().map(Te=>Te.ref.current),[ye]=Z.slice(-1),ke=document.activeElement;for(const Te of q)if(Te===ke||(Te==null||Te.scrollIntoView({block:"nearest"}),Te===H&&W&&(W.scrollTop=0),Te===ye&&W&&(W.scrollTop=W.scrollHeight),Te==null||Te.focus(),document.activeElement!==ke))return},[me,W]),re=h.useCallback(()=>J([z,A]),[J,z,A]);h.useEffect(()=>{we&&re()},[we,re]);const{onOpenChange:V,triggerPointerDownPosRef:B}=T;h.useEffect(()=>{if(A){let q={x:0,y:0};const H=ye=>{var ke,Te;q={x:Math.abs(Math.round(ye.pageX)-(((ke=B.current)==null?void 0:ke.x)??0)),y:Math.abs(Math.round(ye.pageY)-(((Te=B.current)==null?void 0:Te.y)??0))}},Z=ye=>{q.x<=10&&q.y<=10?ye.preventDefault():A.contains(ye.target)||V(!1),document.removeEventListener("pointermove",H),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",Z,{capture:!0})}}},[A,V,B]),h.useEffect(()=>{const q=()=>V(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[V]);const[O,R]=Av(q=>{const H=me().filter(ke=>!ke.disabled),Z=H.find(ke=>ke.ref.current===document.activeElement),ye=Mv(H,q,Z);ye&&setTimeout(()=>ye.ref.current.focus())}),U=h.useCallback((q,H,Z)=>{const ye=!Ne.current&&!Z;(T.value!==void 0&&T.value===H||ye)&&(Q(q),ye&&(Ne.current=!0))},[T.value]),xe=h.useCallback(()=>A==null?void 0:A.focus(),[A]),pe=h.useCallback((q,H,Z)=>{const ye=!Ne.current&&!Z;(T.value!==void 0&&T.value===H||ye)&&fe(q)},[T.value]),ue=a==="popper"?au:gv,se=ue===au?{side:m,sideOffset:g,align:v,alignOffset:x,arrowPadding:y,collisionBoundary:S,collisionPadding:N,sticky:b,hideWhenDetached:C,avoidCollisions:k}:{};return l.jsx(mv,{scope:s,content:A,viewport:W,onViewportChange:F,itemRefCallback:U,selectedItem:z,onItemLeave:xe,itemTextRefCallback:pe,focusSelectedItem:re,selectedItemText:ee,position:a,isPositioned:we,searchRef:O,children:l.jsx(yi,{as:jj,allowPinchZoom:!0,children:l.jsx(gi,{asChild:!0,trapped:T.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:ne(c,q=>{var H;(H=T.trigger)==null||H.focus({preventScroll:!0}),q.preventDefault()}),children:l.jsx(hi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:l.jsx(ue,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:q=>q.preventDefault(),...E,...se,onPlaced:()=>ve(!0),ref:$,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:ne(E.onKeyDown,q=>{const H=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!H&&q.key.length===1&&R(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let ye=me().filter(ke=>!ke.disabled).map(ke=>ke.ref.current);if(["ArrowUp","End"].includes(q.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const ke=q.target,Te=ye.indexOf(ke);ye=ye.slice(Te+1)}setTimeout(()=>J(ye)),q.preventDefault()}})})})})})})});hv.displayName=bj;var kj="SelectItemAlignedPosition",gv=h.forwardRef((n,o)=>{const{__scopeSelect:s,onPlaced:a,...c}=n,d=dr(Tr,s),f=fr(Tr,s),[m,g]=h.useState(null),[v,x]=h.useState(null),y=Pe(o,$=>x($)),S=Pi(s),N=h.useRef(!1),b=h.useRef(!0),{viewport:C,selectedItem:k,selectedItemText:E,focusSelectedItem:T}=f,A=h.useCallback(()=>{if(d.trigger&&d.valueNode&&m&&v&&C&&k&&E){const $=d.trigger.getBoundingClientRect(),z=v.getBoundingClientRect(),Q=d.valueNode.getBoundingClientRect(),ee=E.getBoundingClientRect();if(d.dir!=="rtl"){const ke=ee.left-z.left,Te=Q.left-ke,Ve=$.left-Te,Qe=$.width+Ve,Mn=Math.max(Qe,z.width),In=window.innerWidth-Zt,xn=ou(Te,[Zt,Math.max(Zt,In-Mn)]);m.style.minWidth=Qe+"px",m.style.left=xn+"px"}else{const ke=z.right-ee.right,Te=window.innerWidth-Q.right-ke,Ve=window.innerWidth-$.right-Te,Qe=$.width+Ve,Mn=Math.max(Qe,z.width),In=window.innerWidth-Zt,xn=ou(Te,[Zt,Math.max(Zt,In-Mn)]);m.style.minWidth=Qe+"px",m.style.right=xn+"px"}const fe=S(),me=window.innerHeight-Zt*2,we=C.scrollHeight,ve=window.getComputedStyle(v),Ne=parseInt(ve.borderTopWidth,10),J=parseInt(ve.paddingTop,10),re=parseInt(ve.borderBottomWidth,10),V=parseInt(ve.paddingBottom,10),B=Ne+J+we+V+re,O=Math.min(k.offsetHeight*5,B),R=window.getComputedStyle(C),U=parseInt(R.paddingTop,10),xe=parseInt(R.paddingBottom,10),pe=$.top+$.height/2-Zt,ue=me-pe,se=k.offsetHeight/2,q=k.offsetTop+se,H=Ne+J+q,Z=B-H;if(H<=pe){const ke=fe.length>0&&k===fe[fe.length-1].ref.current;m.style.bottom="0px";const Te=v.clientHeight-C.offsetTop-C.offsetHeight,Ve=Math.max(ue,se+(ke?xe:0)+Te+re),Qe=H+Ve;m.style.height=Qe+"px"}else{const ke=fe.length>0&&k===fe[0].ref.current;m.style.top="0px";const Ve=Math.max(pe,Ne+C.offsetTop+(ke?U:0)+se)+Z;m.style.height=Ve+"px",C.scrollTop=H-pe+C.offsetTop}m.style.margin=`${Zt}px 0`,m.style.minHeight=O+"px",m.style.maxHeight=me+"px",a==null||a(),requestAnimationFrame(()=>N.current=!0)}},[S,d.trigger,d.valueNode,m,v,C,k,E,d.dir,a]);Ye(()=>A(),[A]);const[D,W]=h.useState();Ye(()=>{v&&W(window.getComputedStyle(v).zIndex)},[v]);const F=h.useCallback($=>{$&&b.current===!0&&(A(),T==null||T(),b.current=!1)},[A,T]);return l.jsx(_j,{scope:s,contentWrapper:m,shouldExpandOnScrollRef:N,onScrollButtonChange:F,children:l.jsx("div",{ref:g,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:l.jsx(be.div,{...c,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});gv.displayName=kj;var Ej="SelectPopperPosition",au=h.forwardRef((n,o)=>{const{__scopeSelect:s,align:a="start",collisionPadding:c=Zt,...d}=n,f=Ti(s);return l.jsx(rv,{...f,...d,ref:o,align:a,collisionPadding:c,style:{boxSizing:"border-box",...d.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});au.displayName=Ej;var[_j,Fu]=bo(Tr,{}),cu="SelectViewport",vv=h.forwardRef((n,o)=>{const{__scopeSelect:s,nonce:a,...c}=n,d=fr(cu,s),f=Fu(cu,s),m=Pe(o,d.onViewportChange),g=h.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),l.jsx(Ri.Slot,{scope:s,children:l.jsx(be.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:ne(c.onScroll,v=>{const x=v.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:S}=f;if(S!=null&&S.current&&y){const N=Math.abs(g.current-x.scrollTop);if(N>0){const b=window.innerHeight-Zt*2,C=parseFloat(y.style.minHeight),k=parseFloat(y.style.height),E=Math.max(C,k);if(E<b){const T=E+N,A=Math.min(b,T),D=T-A;y.style.height=A+"px",y.style.bottom==="0px"&&(x.scrollTop=D>0?D:0,y.style.justifyContent="flex-end")}}}g.current=x.scrollTop})})})]})});vv.displayName=cu;var xv="SelectGroup",[Rj,Pj]=bo(xv),Tj=h.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n,c=mn();return l.jsx(Rj,{scope:s,id:c,children:l.jsx(be.div,{role:"group","aria-labelledby":c,...a,ref:o})})});Tj.displayName=xv;var yv="SelectLabel",wv=h.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n,c=Pj(yv,s);return l.jsx(be.div,{id:c.id,...a,ref:o})});wv.displayName=yv;var oi="SelectItem",[Aj,Sv]=bo(oi),Cv=h.forwardRef((n,o)=>{const{__scopeSelect:s,value:a,disabled:c=!1,textValue:d,...f}=n,m=dr(oi,s),g=fr(oi,s),v=m.value===a,[x,y]=h.useState(d??""),[S,N]=h.useState(!1),b=Pe(o,T=>{var A;return(A=g.itemRefCallback)==null?void 0:A.call(g,T,a,c)}),C=mn(),k=h.useRef("touch"),E=()=>{c||(m.onValueChange(a),m.onOpenChange(!1))};if(a==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(Aj,{scope:s,value:a,disabled:c,textId:C,isSelected:v,onItemTextChange:h.useCallback(T=>{y(A=>A||((T==null?void 0:T.textContent)??"").trim())},[]),children:l.jsx(Ri.ItemSlot,{scope:s,value:a,disabled:c,textValue:x,children:l.jsx(be.div,{role:"option","aria-labelledby":C,"data-highlighted":S?"":void 0,"aria-selected":v&&S,"data-state":v?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...f,ref:b,onFocus:ne(f.onFocus,()=>N(!0)),onBlur:ne(f.onBlur,()=>N(!1)),onClick:ne(f.onClick,()=>{k.current!=="mouse"&&E()}),onPointerUp:ne(f.onPointerUp,()=>{k.current==="mouse"&&E()}),onPointerDown:ne(f.onPointerDown,T=>{k.current=T.pointerType}),onPointerMove:ne(f.onPointerMove,T=>{var A;k.current=T.pointerType,c?(A=g.onItemLeave)==null||A.call(g):k.current==="mouse"&&T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ne(f.onPointerLeave,T=>{var A;T.currentTarget===document.activeElement&&((A=g.onItemLeave)==null||A.call(g))}),onKeyDown:ne(f.onKeyDown,T=>{var D;((D=g.searchRef)==null?void 0:D.current)!==""&&T.key===" "||(vj.includes(T.key)&&E(),T.key===" "&&T.preventDefault())})})})})});Cv.displayName=oi;var hs="SelectItemText",Nv=h.forwardRef((n,o)=>{const{__scopeSelect:s,className:a,style:c,...d}=n,f=dr(hs,s),m=fr(hs,s),g=Sv(hs,s),v=Sj(hs,s),[x,y]=h.useState(null),S=Pe(o,E=>y(E),g.onItemTextChange,E=>{var T;return(T=m.itemTextRefCallback)==null?void 0:T.call(m,E,g.value,g.disabled)}),N=x==null?void 0:x.textContent,b=h.useMemo(()=>l.jsx("option",{value:g.value,disabled:g.disabled,children:N},g.value),[g.disabled,g.value,N]),{onNativeOptionAdd:C,onNativeOptionRemove:k}=v;return Ye(()=>(C(b),()=>k(b)),[C,k,b]),l.jsxs(l.Fragment,{children:[l.jsx(be.span,{id:g.textId,...d,ref:S}),g.isSelected&&f.valueNode&&!f.valueNodeHasChildren?Ns.createPortal(d.children,f.valueNode):null]})});Nv.displayName=hs;var bv="SelectItemIndicator",jv=h.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n;return Sv(bv,s).isSelected?l.jsx(be.span,{"aria-hidden":!0,...a,ref:o}):null});jv.displayName=bv;var uu="SelectScrollUpButton",kv=h.forwardRef((n,o)=>{const s=fr(uu,n.__scopeSelect),a=Fu(uu,n.__scopeSelect),[c,d]=h.useState(!1),f=Pe(o,a.onScrollButtonChange);return Ye(()=>{if(s.viewport&&s.isPositioned){let m=function(){const v=g.scrollTop>0;d(v)};const g=s.viewport;return m(),g.addEventListener("scroll",m),()=>g.removeEventListener("scroll",m)}},[s.viewport,s.isPositioned]),c?l.jsx(_v,{...n,ref:f,onAutoScroll:()=>{const{viewport:m,selectedItem:g}=s;m&&g&&(m.scrollTop=m.scrollTop-g.offsetHeight)}}):null});kv.displayName=uu;var du="SelectScrollDownButton",Ev=h.forwardRef((n,o)=>{const s=fr(du,n.__scopeSelect),a=Fu(du,n.__scopeSelect),[c,d]=h.useState(!1),f=Pe(o,a.onScrollButtonChange);return Ye(()=>{if(s.viewport&&s.isPositioned){let m=function(){const v=g.scrollHeight-g.clientHeight,x=Math.ceil(g.scrollTop)<v;d(x)};const g=s.viewport;return m(),g.addEventListener("scroll",m),()=>g.removeEventListener("scroll",m)}},[s.viewport,s.isPositioned]),c?l.jsx(_v,{...n,ref:f,onAutoScroll:()=>{const{viewport:m,selectedItem:g}=s;m&&g&&(m.scrollTop=m.scrollTop+g.offsetHeight)}}):null});Ev.displayName=du;var _v=h.forwardRef((n,o)=>{const{__scopeSelect:s,onAutoScroll:a,...c}=n,d=fr("SelectScrollButton",s),f=h.useRef(null),m=Pi(s),g=h.useCallback(()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},[]);return h.useEffect(()=>()=>g(),[g]),Ye(()=>{var x;const v=m().find(y=>y.ref.current===document.activeElement);(x=v==null?void 0:v.ref.current)==null||x.scrollIntoView({block:"nearest"})},[m]),l.jsx(be.div,{"aria-hidden":!0,...c,ref:o,style:{flexShrink:0,...c.style},onPointerDown:ne(c.onPointerDown,()=>{f.current===null&&(f.current=window.setInterval(a,50))}),onPointerMove:ne(c.onPointerMove,()=>{var v;(v=d.onItemLeave)==null||v.call(d),f.current===null&&(f.current=window.setInterval(a,50))}),onPointerLeave:ne(c.onPointerLeave,()=>{g()})})}),Mj="SelectSeparator",Rv=h.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n;return l.jsx(be.div,{"aria-hidden":!0,...a,ref:o})});Rv.displayName=Mj;var fu="SelectArrow",Ij=h.forwardRef((n,o)=>{const{__scopeSelect:s,...a}=n,c=Ti(s),d=dr(fu,s),f=fr(fu,s);return d.open&&f.position==="popper"?l.jsx(ov,{...c,...a,ref:o}):null});Ij.displayName=fu;var Oj="SelectBubbleInput",Pv=h.forwardRef(({__scopeSelect:n,value:o,...s},a)=>{const c=h.useRef(null),d=Pe(a,c),f=Ru(o);return h.useEffect(()=>{const m=c.current;if(!m)return;const g=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(g,"value").set;if(f!==o&&x){const y=new Event("change",{bubbles:!0});x.call(m,o),m.dispatchEvent(y)}},[f,o]),l.jsx(be.select,{...s,style:{...sv,...s.style},ref:d,defaultValue:o})});Pv.displayName=Oj;function Tv(n){return n===""||n===void 0}function Av(n){const o=ot(n),s=h.useRef(""),a=h.useRef(0),c=h.useCallback(f=>{const m=s.current+f;o(m),(function g(v){s.current=v,window.clearTimeout(a.current),v!==""&&(a.current=window.setTimeout(()=>g(""),1e3))})(m)},[o]),d=h.useCallback(()=>{s.current="",window.clearTimeout(a.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(a.current),[]),[s,c,d]}function Mv(n,o,s){const c=o.length>1&&Array.from(o).every(v=>v===o[0])?o[0]:o,d=s?n.indexOf(s):-1;let f=Dj(n,Math.max(d,0));c.length===1&&(f=f.filter(v=>v!==s));const g=f.find(v=>v.textValue.toLowerCase().startsWith(c.toLowerCase()));return g!==s?g:void 0}function Dj(n,o){return n.map((s,a)=>n[(o+a)%n.length])}var Lj=lv,Iv=av,zj=uv,Fj=dv,$j=fv,Ov=pv,Vj=vv,Dv=wv,Lv=Cv,Bj=Nv,Uj=jv,zv=kv,Fv=Ev,$v=Rv;const si=Lj,li=zj,xs=h.forwardRef(({className:n,children:o,...s},a)=>l.jsxs(Iv,{ref:a,className:ge("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n),...s,children:[o,l.jsx(Fj,{asChild:!0,children:l.jsx(Jm,{className:"h-4 w-4 opacity-50"})})]}));xs.displayName=Iv.displayName;const Vv=h.forwardRef(({className:n,...o},s)=>l.jsx(zv,{ref:s,className:ge("flex cursor-default items-center justify-center py-1",n),...o,children:l.jsx(e1,{className:"h-4 w-4"})}));Vv.displayName=zv.displayName;const Bv=h.forwardRef(({className:n,...o},s)=>l.jsx(Fv,{ref:s,className:ge("flex cursor-default items-center justify-center py-1",n),...o,children:l.jsx(Jm,{className:"h-4 w-4"})}));Bv.displayName=Fv.displayName;const ys=h.forwardRef(({className:n,children:o,position:s="popper",...a},c)=>l.jsx($j,{children:l.jsxs(Ov,{ref:c,className:ge("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:s,...a,children:[l.jsx(Vv,{}),l.jsx(Vj,{className:ge("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),l.jsx(Bv,{})]})}));ys.displayName=Ov.displayName;const Wj=h.forwardRef(({className:n,...o},s)=>l.jsx(Dv,{ref:s,className:ge("py-1.5 pl-8 pr-2 text-sm font-semibold",n),...o}));Wj.displayName=Dv.displayName;const Ct=h.forwardRef(({className:n,children:o,...s},a)=>l.jsxs(Lv,{ref:a,className:ge("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...s,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Uj,{children:l.jsx(Ar,{className:"h-4 w-4"})})}),l.jsx(Bj,{children:o})]}));Ct.displayName=Lv.displayName;const Hj=h.forwardRef(({className:n,...o},s)=>l.jsx($v,{ref:s,className:ge("-mx-1 my-1 h-px bg-muted",n),...o}));Hj.displayName=$v.displayName;const Ai=h.forwardRef(({className:n,...o},s)=>l.jsx("textarea",{className:ge("flex min-h-[82px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n),ref:s,...o}));Ai.displayName="Textarea";function Kj(n,o=[]){let s=[];function a(d,f){const m=h.createContext(f);m.displayName=d+"Context";const g=s.length;s=[...s,f];const v=y=>{var E;const{scope:S,children:N,...b}=y,C=((E=S==null?void 0:S[n])==null?void 0:E[g])||m,k=h.useMemo(()=>b,Object.values(b));return l.jsx(C.Provider,{value:k,children:N})};v.displayName=d+"Provider";function x(y,S){var C;const N=((C=S==null?void 0:S[n])==null?void 0:C[g])||m,b=h.useContext(N);if(b)return b;if(f!==void 0)return f;throw new Error(`\`${y}\` must be used within \`${d}\``)}return[v,x]}const c=()=>{const d=s.map(f=>h.createContext(f));return function(m){const g=(m==null?void 0:m[n])||d;return h.useMemo(()=>({[`__scope${n}`]:{...m,[n]:g}}),[m,g])}};return c.scopeName=n,[a,Gj(c,...o)]}function Gj(...n){const o=n[0];if(n.length===1)return o;const s=()=>{const a=n.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(d){const f=a.reduce((m,{useScope:g,scopeName:v})=>{const y=g(d)[`__scope${v}`];return{...m,...y}},{});return h.useMemo(()=>({[`__scope${o.scopeName}`]:f}),[f])}};return s.scopeName=o.scopeName,s}var Gc={exports:{}},Yc={};/**
|
|
325
|
+
* @license React
|
|
326
|
+
* use-sync-external-store-shim.production.js
|
|
327
|
+
*
|
|
328
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
329
|
+
*
|
|
330
|
+
* This source code is licensed under the MIT license found in the
|
|
331
|
+
* LICENSE file in the root directory of this source tree.
|
|
332
|
+
*/var Dm;function Yj(){if(Dm)return Yc;Dm=1;var n=di();function o(y,S){return y===S&&(y!==0||1/y===1/S)||y!==y&&S!==S}var s=typeof Object.is=="function"?Object.is:o,a=n.useState,c=n.useEffect,d=n.useLayoutEffect,f=n.useDebugValue;function m(y,S){var N=S(),b=a({inst:{value:N,getSnapshot:S}}),C=b[0].inst,k=b[1];return d(function(){C.value=N,C.getSnapshot=S,g(C)&&k({inst:C})},[y,N,S]),c(function(){return g(C)&&k({inst:C}),y(function(){g(C)&&k({inst:C})})},[y]),f(N),N}function g(y){var S=y.getSnapshot;y=y.value;try{var N=S();return!s(y,N)}catch{return!0}}function v(y,S){return S()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:m;return Yc.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:x,Yc}var Lm;function Qj(){return Lm||(Lm=1,Gc.exports=Yj()),Gc.exports}var Xj=Qj();function qj(){return Xj.useSyncExternalStore(Zj,()=>!0,()=>!1)}function Zj(){return()=>{}}var $u="Avatar",[Jj]=Kj($u),[ek,Uv]=Jj($u),Wv=h.forwardRef((n,o)=>{const{__scopeAvatar:s,...a}=n,[c,d]=h.useState("idle");return l.jsx(ek,{scope:s,imageLoadingStatus:c,onImageLoadingStatusChange:d,children:l.jsx(mi.span,{...a,ref:o})})});Wv.displayName=$u;var Hv="AvatarImage",Kv=h.forwardRef((n,o)=>{const{__scopeAvatar:s,src:a,onLoadingStatusChange:c=()=>{},...d}=n,f=Uv(Hv,s),m=tk(a,d),g=ot(v=>{c(v),f.onImageLoadingStatusChange(v)});return Ye(()=>{m!=="idle"&&g(m)},[m,g]),m==="loaded"?l.jsx(mi.img,{...d,ref:o,src:a}):null});Kv.displayName=Hv;var Gv="AvatarFallback",Yv=h.forwardRef((n,o)=>{const{__scopeAvatar:s,delayMs:a,...c}=n,d=Uv(Gv,s),[f,m]=h.useState(a===void 0);return h.useEffect(()=>{if(a!==void 0){const g=window.setTimeout(()=>m(!0),a);return()=>window.clearTimeout(g)}},[a]),f&&d.imageLoadingStatus!=="loaded"?l.jsx(mi.span,{...c,ref:o}):null});Yv.displayName=Gv;function zm(n,o){return n?o?(n.src!==o&&(n.src=o),n.complete&&n.naturalWidth>0?"loaded":"loading"):"error":"idle"}function tk(n,{referrerPolicy:o,crossOrigin:s}){const a=qj(),c=h.useRef(null),d=a?(c.current||(c.current=new window.Image),c.current):null,[f,m]=h.useState(()=>zm(d,n));return Ye(()=>{m(zm(d,n))},[d,n]),Ye(()=>{const g=y=>()=>{m(y)};if(!d)return;const v=g("loaded"),x=g("error");return d.addEventListener("load",v),d.addEventListener("error",x),o&&(d.referrerPolicy=o),typeof s=="string"&&(d.crossOrigin=s),()=>{d.removeEventListener("load",v),d.removeEventListener("error",x)}},[d,s,o]),f}var Qv=Wv,Xv=Kv,qv=Yv;const yo=h.forwardRef(({className:n,...o},s)=>l.jsx(Qv,{ref:s,className:ge("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",n),...o}));yo.displayName=Qv.displayName;const nk=h.forwardRef(({className:n,...o},s)=>l.jsx(Xv,{ref:s,className:ge("aspect-square h-full w-full",n),...o}));nk.displayName=Xv.displayName;const wo=h.forwardRef(({className:n,...o},s)=>l.jsx(qv,{ref:s,className:ge("flex h-full w-full items-center justify-center rounded-full bg-muted",n),...o}));wo.displayName=qv.displayName;const rk=pi("inline-flex items-center rounded-sm border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-muted text-foreground hover:bg-muted/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80 dark:text-destructive-foreground",outline:"text-foreground dark:text-foreground",success:"bg-green-100 text-green-700 border-green-200 dark:bg-green-900/50 dark:text-green-300 dark:border-green-700",warning:"bg-amber-100 text-amber-700 border-amber-200 dark:bg-amber-900/50 dark:text-amber-300 dark:border-amber-700",info:"bg-blue-100 text-blue-700 border-blue-200 dark:bg-blue-900/50 dark:text-blue-300 dark:border-blue-700",rejected:"bg-red-100 text-red-700 border-red-200 dark:bg-red-900/50 dark:text-red-300 dark:border-red-700",neutral:"bg-gray-100 text-gray-700 border-gray-200 dark:bg-gray-700 dark:text-gray-200 dark:border-gray-600"}},defaultVariants:{variant:"default"}});function Rn({className:n,variant:o,...s}){return l.jsx("div",{className:ge(rk({variant:o}),n),...s})}var pu=["Enter"," "],ok=["ArrowDown","PageUp","Home"],Zv=["ArrowUp","PageDown","End"],sk=[...ok,...Zv],lk={ltr:[...pu,"ArrowRight"],rtl:[...pu,"ArrowLeft"]},ik={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Es="Menu",[ws,ak,ck]=Eu(Es),[Or,Jv]=on(Es,[ck,_i,Si]),Mi=_i(),ex=Si(),[uk,Dr]=Or(Es),[dk,_s]=Or(Es),tx=n=>{const{__scopeMenu:o,open:s=!1,children:a,dir:c,onOpenChange:d,modal:f=!0}=n,m=Mi(o),[g,v]=h.useState(null),x=h.useRef(!1),y=ot(d),S=bs(c);return h.useEffect(()=>{const N=()=>{x.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>x.current=!1;return document.addEventListener("keydown",N,{capture:!0}),()=>{document.removeEventListener("keydown",N,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),l.jsx(tv,{...m,children:l.jsx(uk,{scope:o,open:s,onOpenChange:y,content:g,onContentChange:v,children:l.jsx(dk,{scope:o,onClose:h.useCallback(()=>y(!1),[y]),isUsingKeyboardRef:x,dir:S,modal:f,children:a})})})};tx.displayName=Es;var fk="MenuAnchor",Vu=h.forwardRef((n,o)=>{const{__scopeMenu:s,...a}=n,c=Mi(s);return l.jsx(nv,{...c,...a,ref:o})});Vu.displayName=fk;var Bu="MenuPortal",[pk,nx]=Or(Bu,{forceMount:void 0}),rx=n=>{const{__scopeMenu:o,forceMount:s,children:a,container:c}=n,d=Dr(Bu,o);return l.jsx(pk,{scope:o,forceMount:s,children:l.jsx(Et,{present:s||d.open,children:l.jsx(vi,{asChild:!0,container:c,children:a})})})};rx.displayName=Bu;var Bt="MenuContent",[mk,Uu]=Or(Bt),ox=h.forwardRef((n,o)=>{const s=nx(Bt,n.__scopeMenu),{forceMount:a=s.forceMount,...c}=n,d=Dr(Bt,n.__scopeMenu),f=_s(Bt,n.__scopeMenu);return l.jsx(ws.Provider,{scope:n.__scopeMenu,children:l.jsx(Et,{present:a||d.open,children:l.jsx(ws.Slot,{scope:n.__scopeMenu,children:f.modal?l.jsx(hk,{...c,ref:o}):l.jsx(gk,{...c,ref:o})})})})}),hk=h.forwardRef((n,o)=>{const s=Dr(Bt,n.__scopeMenu),a=h.useRef(null),c=Pe(o,a);return h.useEffect(()=>{const d=a.current;if(d)return Nu(d)},[]),l.jsx(Wu,{...n,ref:c,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:ne(n.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})}),gk=h.forwardRef((n,o)=>{const s=Dr(Bt,n.__scopeMenu);return l.jsx(Wu,{...n,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})}),vk=vo("MenuContent.ScrollLock"),Wu=h.forwardRef((n,o)=>{const{__scopeMenu:s,loop:a=!1,trapFocus:c,onOpenAutoFocus:d,onCloseAutoFocus:f,disableOutsidePointerEvents:m,onEntryFocus:g,onEscapeKeyDown:v,onPointerDownOutside:x,onFocusOutside:y,onInteractOutside:S,onDismiss:N,disableOutsideScroll:b,...C}=n,k=Dr(Bt,s),E=_s(Bt,s),T=Mi(s),A=ex(s),D=ak(s),[W,F]=h.useState(null),$=h.useRef(null),z=Pe(o,$,k.onContentChange),Q=h.useRef(0),ee=h.useRef(""),fe=h.useRef(0),me=h.useRef(null),we=h.useRef("right"),ve=h.useRef(0),Ne=b?yi:h.Fragment,J=b?{as:vk,allowPinchZoom:!0}:void 0,re=B=>{var q,H;const O=ee.current+B,R=D().filter(Z=>!Z.disabled),U=document.activeElement,xe=(q=R.find(Z=>Z.ref.current===U))==null?void 0:q.textValue,pe=R.map(Z=>Z.textValue),ue=Rk(pe,O,xe),se=(H=R.find(Z=>Z.textValue===ue))==null?void 0:H.ref.current;(function Z(ye){ee.current=ye,window.clearTimeout(Q.current),ye!==""&&(Q.current=window.setTimeout(()=>Z(""),1e3))})(O),se&&setTimeout(()=>se.focus())};h.useEffect(()=>()=>window.clearTimeout(Q.current),[]),Cu();const V=h.useCallback(B=>{var R,U;return we.current===((R=me.current)==null?void 0:R.side)&&Tk(B,(U=me.current)==null?void 0:U.area)},[]);return l.jsx(mk,{scope:s,searchRef:ee,onItemEnter:h.useCallback(B=>{V(B)&&B.preventDefault()},[V]),onItemLeave:h.useCallback(B=>{var O;V(B)||((O=$.current)==null||O.focus(),F(null))},[V]),onTriggerLeave:h.useCallback(B=>{V(B)&&B.preventDefault()},[V]),pointerGraceTimerRef:fe,onPointerGraceIntentChange:h.useCallback(B=>{me.current=B},[]),children:l.jsx(Ne,{...J,children:l.jsx(gi,{asChild:!0,trapped:c,onMountAutoFocus:ne(d,B=>{var O;B.preventDefault(),(O=$.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:f,children:l.jsx(hi,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:v,onPointerDownOutside:x,onFocusOutside:y,onInteractOutside:S,onDismiss:N,children:l.jsx(ug,{asChild:!0,...A,dir:E.dir,orientation:"vertical",loop:a,currentTabStopId:W,onCurrentTabStopIdChange:F,onEntryFocus:ne(g,B=>{E.isUsingKeyboardRef.current||B.preventDefault()}),preventScrollOnEntryFocus:!0,children:l.jsx(rv,{role:"menu","aria-orientation":"vertical","data-state":wx(k.open),"data-radix-menu-content":"",dir:E.dir,...T,...C,ref:z,style:{outline:"none",...C.style},onKeyDown:ne(C.onKeyDown,B=>{const R=B.target.closest("[data-radix-menu-content]")===B.currentTarget,U=B.ctrlKey||B.altKey||B.metaKey,xe=B.key.length===1;R&&(B.key==="Tab"&&B.preventDefault(),!U&&xe&&re(B.key));const pe=$.current;if(B.target!==pe||!sk.includes(B.key))return;B.preventDefault();const se=D().filter(q=>!q.disabled).map(q=>q.ref.current);Zv.includes(B.key)&&se.reverse(),Ek(se)}),onBlur:ne(n.onBlur,B=>{B.currentTarget.contains(B.target)||(window.clearTimeout(Q.current),ee.current="")}),onPointerMove:ne(n.onPointerMove,Ss(B=>{const O=B.target,R=ve.current!==B.clientX;if(B.currentTarget.contains(O)&&R){const U=B.clientX>ve.current?"right":"left";we.current=U,ve.current=B.clientX}}))})})})})})})});ox.displayName=Bt;var xk="MenuGroup",Hu=h.forwardRef((n,o)=>{const{__scopeMenu:s,...a}=n;return l.jsx(be.div,{role:"group",...a,ref:o})});Hu.displayName=xk;var yk="MenuLabel",sx=h.forwardRef((n,o)=>{const{__scopeMenu:s,...a}=n;return l.jsx(be.div,{...a,ref:o})});sx.displayName=yk;var ii="MenuItem",Fm="menu.itemSelect",Ii=h.forwardRef((n,o)=>{const{disabled:s=!1,onSelect:a,...c}=n,d=h.useRef(null),f=_s(ii,n.__scopeMenu),m=Uu(ii,n.__scopeMenu),g=Pe(o,d),v=h.useRef(!1),x=()=>{const y=d.current;if(!s&&y){const S=new CustomEvent(Fm,{bubbles:!0,cancelable:!0});y.addEventListener(Fm,N=>a==null?void 0:a(N),{once:!0}),Eh(y,S),S.defaultPrevented?v.current=!1:f.onClose()}};return l.jsx(lx,{...c,ref:g,disabled:s,onClick:ne(n.onClick,x),onPointerDown:y=>{var S;(S=n.onPointerDown)==null||S.call(n,y),v.current=!0},onPointerUp:ne(n.onPointerUp,y=>{var S;v.current||(S=y.currentTarget)==null||S.click()}),onKeyDown:ne(n.onKeyDown,y=>{const S=m.searchRef.current!=="";s||S&&y.key===" "||pu.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})});Ii.displayName=ii;var lx=h.forwardRef((n,o)=>{const{__scopeMenu:s,disabled:a=!1,textValue:c,...d}=n,f=Uu(ii,s),m=ex(s),g=h.useRef(null),v=Pe(o,g),[x,y]=h.useState(!1),[S,N]=h.useState("");return h.useEffect(()=>{const b=g.current;b&&N((b.textContent??"").trim())},[d.children]),l.jsx(ws.ItemSlot,{scope:s,disabled:a,textValue:c??S,children:l.jsx(dg,{asChild:!0,...m,focusable:!a,children:l.jsx(be.div,{role:"menuitem","data-highlighted":x?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...d,ref:v,onPointerMove:ne(n.onPointerMove,Ss(b=>{a?f.onItemLeave(b):(f.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ne(n.onPointerLeave,Ss(b=>f.onItemLeave(b))),onFocus:ne(n.onFocus,()=>y(!0)),onBlur:ne(n.onBlur,()=>y(!1))})})})}),wk="MenuCheckboxItem",ix=h.forwardRef((n,o)=>{const{checked:s=!1,onCheckedChange:a,...c}=n;return l.jsx(fx,{scope:n.__scopeMenu,checked:s,children:l.jsx(Ii,{role:"menuitemcheckbox","aria-checked":ai(s)?"mixed":s,...c,ref:o,"data-state":Gu(s),onSelect:ne(c.onSelect,()=>a==null?void 0:a(ai(s)?!0:!s),{checkForDefaultPrevented:!1})})})});ix.displayName=wk;var ax="MenuRadioGroup",[Sk,Ck]=Or(ax,{value:void 0,onValueChange:()=>{}}),cx=h.forwardRef((n,o)=>{const{value:s,onValueChange:a,...c}=n,d=ot(a);return l.jsx(Sk,{scope:n.__scopeMenu,value:s,onValueChange:d,children:l.jsx(Hu,{...c,ref:o})})});cx.displayName=ax;var ux="MenuRadioItem",dx=h.forwardRef((n,o)=>{const{value:s,...a}=n,c=Ck(ux,n.__scopeMenu),d=s===c.value;return l.jsx(fx,{scope:n.__scopeMenu,checked:d,children:l.jsx(Ii,{role:"menuitemradio","aria-checked":d,...a,ref:o,"data-state":Gu(d),onSelect:ne(a.onSelect,()=>{var f;return(f=c.onValueChange)==null?void 0:f.call(c,s)},{checkForDefaultPrevented:!1})})})});dx.displayName=ux;var Ku="MenuItemIndicator",[fx,Nk]=Or(Ku,{checked:!1}),px=h.forwardRef((n,o)=>{const{__scopeMenu:s,forceMount:a,...c}=n,d=Nk(Ku,s);return l.jsx(Et,{present:a||ai(d.checked)||d.checked===!0,children:l.jsx(be.span,{...c,ref:o,"data-state":Gu(d.checked)})})});px.displayName=Ku;var bk="MenuSeparator",mx=h.forwardRef((n,o)=>{const{__scopeMenu:s,...a}=n;return l.jsx(be.div,{role:"separator","aria-orientation":"horizontal",...a,ref:o})});mx.displayName=bk;var jk="MenuArrow",hx=h.forwardRef((n,o)=>{const{__scopeMenu:s,...a}=n,c=Mi(s);return l.jsx(ov,{...c,...a,ref:o})});hx.displayName=jk;var kk="MenuSub",[oE,gx]=Or(kk),gs="MenuSubTrigger",vx=h.forwardRef((n,o)=>{const s=Dr(gs,n.__scopeMenu),a=_s(gs,n.__scopeMenu),c=gx(gs,n.__scopeMenu),d=Uu(gs,n.__scopeMenu),f=h.useRef(null),{pointerGraceTimerRef:m,onPointerGraceIntentChange:g}=d,v={__scopeMenu:n.__scopeMenu},x=h.useCallback(()=>{f.current&&window.clearTimeout(f.current),f.current=null},[]);return h.useEffect(()=>x,[x]),h.useEffect(()=>{const y=m.current;return()=>{window.clearTimeout(y),g(null)}},[m,g]),l.jsx(Vu,{asChild:!0,...v,children:l.jsx(lx,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":c.contentId,"data-state":wx(s.open),...n,ref:Cs(o,c.onTriggerChange),onClick:y=>{var S;(S=n.onClick)==null||S.call(n,y),!(n.disabled||y.defaultPrevented)&&(y.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:ne(n.onPointerMove,Ss(y=>{d.onItemEnter(y),!y.defaultPrevented&&!n.disabled&&!s.open&&!f.current&&(d.onPointerGraceIntentChange(null),f.current=window.setTimeout(()=>{s.onOpenChange(!0),x()},100))})),onPointerLeave:ne(n.onPointerLeave,Ss(y=>{var N,b;x();const S=(N=s.content)==null?void 0:N.getBoundingClientRect();if(S){const C=(b=s.content)==null?void 0:b.dataset.side,k=C==="right",E=k?-5:5,T=S[k?"left":"right"],A=S[k?"right":"left"];d.onPointerGraceIntentChange({area:[{x:y.clientX+E,y:y.clientY},{x:T,y:S.top},{x:A,y:S.top},{x:A,y:S.bottom},{x:T,y:S.bottom}],side:C}),window.clearTimeout(m.current),m.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(y),y.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:ne(n.onKeyDown,y=>{var N;const S=d.searchRef.current!=="";n.disabled||S&&y.key===" "||lk[a.dir].includes(y.key)&&(s.onOpenChange(!0),(N=s.content)==null||N.focus(),y.preventDefault())})})})});vx.displayName=gs;var xx="MenuSubContent",yx=h.forwardRef((n,o)=>{const s=nx(Bt,n.__scopeMenu),{forceMount:a=s.forceMount,...c}=n,d=Dr(Bt,n.__scopeMenu),f=_s(Bt,n.__scopeMenu),m=gx(xx,n.__scopeMenu),g=h.useRef(null),v=Pe(o,g);return l.jsx(ws.Provider,{scope:n.__scopeMenu,children:l.jsx(Et,{present:a||d.open,children:l.jsx(ws.Slot,{scope:n.__scopeMenu,children:l.jsx(Wu,{id:m.contentId,"aria-labelledby":m.triggerId,...c,ref:v,align:"start",side:f.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:x=>{var y;f.isUsingKeyboardRef.current&&((y=g.current)==null||y.focus()),x.preventDefault()},onCloseAutoFocus:x=>x.preventDefault(),onFocusOutside:ne(n.onFocusOutside,x=>{x.target!==m.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:ne(n.onEscapeKeyDown,x=>{f.onClose(),x.preventDefault()}),onKeyDown:ne(n.onKeyDown,x=>{var N;const y=x.currentTarget.contains(x.target),S=ik[f.dir].includes(x.key);y&&S&&(d.onOpenChange(!1),(N=m.trigger)==null||N.focus(),x.preventDefault())})})})})})});yx.displayName=xx;function wx(n){return n?"open":"closed"}function ai(n){return n==="indeterminate"}function Gu(n){return ai(n)?"indeterminate":n?"checked":"unchecked"}function Ek(n){const o=document.activeElement;for(const s of n)if(s===o||(s.focus(),document.activeElement!==o))return}function _k(n,o){return n.map((s,a)=>n[(o+a)%n.length])}function Rk(n,o,s){const c=o.length>1&&Array.from(o).every(v=>v===o[0])?o[0]:o,d=s?n.indexOf(s):-1;let f=_k(n,Math.max(d,0));c.length===1&&(f=f.filter(v=>v!==s));const g=f.find(v=>v.toLowerCase().startsWith(c.toLowerCase()));return g!==s?g:void 0}function Pk(n,o){const{x:s,y:a}=n;let c=!1;for(let d=0,f=o.length-1;d<o.length;f=d++){const m=o[d],g=o[f],v=m.x,x=m.y,y=g.x,S=g.y;x>a!=S>a&&s<(y-v)*(a-x)/(S-x)+v&&(c=!c)}return c}function Tk(n,o){if(!o)return!1;const s={x:n.clientX,y:n.clientY};return Pk(s,o)}function Ss(n){return o=>o.pointerType==="mouse"?n(o):void 0}var Ak=tx,Mk=Vu,Ik=rx,Ok=ox,Dk=Hu,Lk=sx,zk=Ii,Fk=ix,$k=cx,Vk=dx,Bk=px,Uk=mx,Wk=hx,Hk=vx,Kk=yx,Oi="DropdownMenu",[Gk]=on(Oi,[Jv]),ht=Jv(),[Yk,Sx]=Gk(Oi),Cx=n=>{const{__scopeDropdownMenu:o,children:s,dir:a,open:c,defaultOpen:d,onOpenChange:f,modal:m=!0}=n,g=ht(o),v=h.useRef(null),[x,y]=sr({prop:c,defaultProp:d??!1,onChange:f,caller:Oi});return l.jsx(Yk,{scope:o,triggerId:mn(),triggerRef:v,contentId:mn(),open:x,onOpenChange:y,onOpenToggle:h.useCallback(()=>y(S=>!S),[y]),modal:m,children:l.jsx(Ak,{...g,open:x,onOpenChange:y,dir:a,modal:m,children:s})})};Cx.displayName=Oi;var Nx="DropdownMenuTrigger",bx=h.forwardRef((n,o)=>{const{__scopeDropdownMenu:s,disabled:a=!1,...c}=n,d=Sx(Nx,s),f=ht(s);return l.jsx(Mk,{asChild:!0,...f,children:l.jsx(be.button,{type:"button",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":d.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...c,ref:Cs(o,d.triggerRef),onPointerDown:ne(n.onPointerDown,m=>{!a&&m.button===0&&m.ctrlKey===!1&&(d.onOpenToggle(),d.open||m.preventDefault())}),onKeyDown:ne(n.onKeyDown,m=>{a||(["Enter"," "].includes(m.key)&&d.onOpenToggle(),m.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(m.key)&&m.preventDefault())})})})});bx.displayName=Nx;var Qk="DropdownMenuPortal",jx=n=>{const{__scopeDropdownMenu:o,...s}=n,a=ht(o);return l.jsx(Ik,{...a,...s})};jx.displayName=Qk;var kx="DropdownMenuContent",Ex=h.forwardRef((n,o)=>{const{__scopeDropdownMenu:s,...a}=n,c=Sx(kx,s),d=ht(s),f=h.useRef(!1);return l.jsx(Ok,{id:c.contentId,"aria-labelledby":c.triggerId,...d,...a,ref:o,onCloseAutoFocus:ne(n.onCloseAutoFocus,m=>{var g;f.current||(g=c.triggerRef.current)==null||g.focus(),f.current=!1,m.preventDefault()}),onInteractOutside:ne(n.onInteractOutside,m=>{const g=m.detail.originalEvent,v=g.button===0&&g.ctrlKey===!0,x=g.button===2||v;(!c.modal||x)&&(f.current=!0)}),style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ex.displayName=kx;var Xk="DropdownMenuGroup",qk=h.forwardRef((n,o)=>{const{__scopeDropdownMenu:s,...a}=n,c=ht(s);return l.jsx(Dk,{...c,...a,ref:o})});qk.displayName=Xk;var Zk="DropdownMenuLabel",_x=h.forwardRef((n,o)=>{const{__scopeDropdownMenu:s,...a}=n,c=ht(s);return l.jsx(Lk,{...c,...a,ref:o})});_x.displayName=Zk;var Jk="DropdownMenuItem",Rx=h.forwardRef((n,o)=>{const{__scopeDropdownMenu:s,...a}=n,c=ht(s);return l.jsx(zk,{...c,...a,ref:o})});Rx.displayName=Jk;var e2="DropdownMenuCheckboxItem",Px=h.forwardRef((n,o)=>{const{__scopeDropdownMenu:s,...a}=n,c=ht(s);return l.jsx(Fk,{...c,...a,ref:o})});Px.displayName=e2;var t2="DropdownMenuRadioGroup",n2=h.forwardRef((n,o)=>{const{__scopeDropdownMenu:s,...a}=n,c=ht(s);return l.jsx($k,{...c,...a,ref:o})});n2.displayName=t2;var r2="DropdownMenuRadioItem",Tx=h.forwardRef((n,o)=>{const{__scopeDropdownMenu:s,...a}=n,c=ht(s);return l.jsx(Vk,{...c,...a,ref:o})});Tx.displayName=r2;var o2="DropdownMenuItemIndicator",Ax=h.forwardRef((n,o)=>{const{__scopeDropdownMenu:s,...a}=n,c=ht(s);return l.jsx(Bk,{...c,...a,ref:o})});Ax.displayName=o2;var s2="DropdownMenuSeparator",Mx=h.forwardRef((n,o)=>{const{__scopeDropdownMenu:s,...a}=n,c=ht(s);return l.jsx(Uk,{...c,...a,ref:o})});Mx.displayName=s2;var l2="DropdownMenuArrow",i2=h.forwardRef((n,o)=>{const{__scopeDropdownMenu:s,...a}=n,c=ht(s);return l.jsx(Wk,{...c,...a,ref:o})});i2.displayName=l2;var a2="DropdownMenuSubTrigger",Ix=h.forwardRef((n,o)=>{const{__scopeDropdownMenu:s,...a}=n,c=ht(s);return l.jsx(Hk,{...c,...a,ref:o})});Ix.displayName=a2;var c2="DropdownMenuSubContent",Ox=h.forwardRef((n,o)=>{const{__scopeDropdownMenu:s,...a}=n,c=ht(s);return l.jsx(Kk,{...c,...a,ref:o,style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ox.displayName=c2;var u2=Cx,d2=bx,f2=jx,Dx=Ex,Lx=_x,zx=Rx,Fx=Px,$x=Tx,Vx=Ax,Bx=Mx,Ux=Ix,Wx=Ox;const p2=u2,m2=d2,h2=h.forwardRef(({className:n,inset:o,children:s,...a},c)=>l.jsxs(Ux,{ref:c,className:ge("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",o&&"pl-8",n),...a,children:[s,l.jsx(eh,{className:"ml-auto h-4 w-4"})]}));h2.displayName=Ux.displayName;const g2=h.forwardRef(({className:n,...o},s)=>l.jsx(Wx,{ref:s,className:ge("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n),...o}));g2.displayName=Wx.displayName;const Hx=h.forwardRef(({className:n,sideOffset:o=4,...s},a)=>l.jsx(f2,{children:l.jsx(Dx,{ref:a,sideOffset:o,className:ge("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n),...s})}));Hx.displayName=Dx.displayName;const Kx=h.forwardRef(({className:n,inset:o,...s},a)=>l.jsx(zx,{ref:a,className:ge("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o&&"pl-8",n),...s}));Kx.displayName=zx.displayName;const v2=h.forwardRef(({className:n,children:o,checked:s,...a},c)=>l.jsxs(Fx,{ref:c,className:ge("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),checked:s,...a,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Vx,{children:l.jsx(Ar,{className:"h-4 w-4"})})}),o]}));v2.displayName=Fx.displayName;const x2=h.forwardRef(({className:n,children:o,...s},a)=>l.jsxs($x,{ref:a,className:ge("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...s,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(Vx,{children:l.jsx(s1,{className:"h-2 w-2 fill-current"})})}),o]}));x2.displayName=$x.displayName;const y2=h.forwardRef(({className:n,inset:o,...s},a)=>l.jsx(Lx,{ref:a,className:ge("px-2 py-1.5 text-sm font-semibold",o&&"pl-8",n),...s}));y2.displayName=Lx.displayName;const w2=h.forwardRef(({className:n,...o},s)=>l.jsx(Bx,{ref:s,className:ge("-mx-1 my-1 h-px bg-muted",n),...o}));w2.displayName=Bx.displayName;const S2={document:{label:"Document",icon:go},folder:{label:"Folder",icon:th},tag:{label:"Tag",icon:oh},nest:{label:"Nest",icon:Zm}};function C2({stewards:n,loading:o=!1,showScope:s=!1,className:a,onAddSteward:c,onRemove:d,compact:f=!1}){const[m,g]=h.useState(null),v=async S=>{if(d){g(S);try{await d(S)}finally{g(null)}}},x=S=>{const N=S2[S.scope];let b="";return S.scope==="tag"?b=S.tagName||"":(S.scope==="document"||S.scope==="folder")&&(b=S.nodePattern||""),l.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[l.jsx(N.icon,{className:"h-3 w-3"}),l.jsx("span",{children:N.label}),b&&l.jsxs("span",{className:"opacity-75",children:[": ",b]})]})},y=S=>(S.userEmail[0]||"?").toUpperCase();return o?l.jsx("div",{className:ge("flex items-center justify-center py-4",a),children:l.jsx(Nt,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):n.length===0?l.jsxs("div",{className:ge("text-center py-4",a),children:[l.jsx(Mt,{className:"h-8 w-8 mx-auto text-muted-foreground mb-2"}),l.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"No stewards assigned"}),c&&l.jsxs(he,{variant:"outline",size:"sm",onClick:c,children:[l.jsx(fo,{className:"h-4 w-4 mr-2"}),"Assign Steward"]})]}):f?l.jsxs("div",{className:ge("flex items-center gap-1",a),children:[l.jsx(Mt,{className:"h-4 w-4 text-muted-foreground"}),l.jsx("div",{className:"flex -space-x-2",children:n.slice(0,3).map(S=>l.jsx(yo,{className:"h-6 w-6 border-2 border-background",children:l.jsx(wo,{className:"text-[10px]",children:y(S)})},S.id))}),n.length>3&&l.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",n.length-3]}),c&&l.jsx(he,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:c,children:l.jsx(fo,{className:"h-3 w-3"})})]}):l.jsxs("div",{className:ge("space-y-2",a),children:[n.map(S=>l.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-lg border bg-card",children:[l.jsx(yo,{className:"h-8 w-8",children:l.jsx(wo,{children:y(S)})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"font-medium text-sm truncate",children:S.userEmail}),s&&x(S),l.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[l.jsx(Rn,{variant:"secondary",className:"text-[10px] px-1.5 py-0 capitalize",children:S.role}),S.canApprove&&l.jsx(Rn,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:"Approve"}),S.canReject&&l.jsx(Rn,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:"Reject"})]})]}),d&&l.jsxs(p2,{children:[l.jsx(m2,{asChild:!0,children:l.jsx(he,{variant:"ghost",size:"icon",className:"h-8 w-8",disabled:m===S.id,children:m===S.id?l.jsx(Nt,{className:"h-4 w-4 animate-spin"}):l.jsx(d1,{className:"h-4 w-4"})})}),l.jsx(Hx,{align:"end",children:l.jsxs(Kx,{className:"text-destructive",onClick:()=>v(S.id),children:[l.jsx(V1,{className:"h-4 w-4 mr-2"}),"Remove"]})})]})]},S.id)),c&&l.jsxs(he,{variant:"outline",className:"w-full",onClick:c,children:[l.jsx(fo,{className:"h-4 w-4 mr-2"}),"Add Steward"]})]})}var Di="Checkbox",[N2]=on(Di),[b2,Yu]=N2(Di);function j2(n){const{__scopeCheckbox:o,checked:s,children:a,defaultChecked:c,disabled:d,form:f,name:m,onCheckedChange:g,required:v,value:x="on",internal_do_not_use_render:y}=n,[S,N]=sr({prop:s,defaultProp:c??!1,onChange:g,caller:Di}),[b,C]=h.useState(null),[k,E]=h.useState(null),T=h.useRef(!1),A=b?!!f||!!b.closest("form"):!0,D={checked:S,disabled:d,setChecked:N,control:b,setControl:C,name:m,form:f,value:x,hasConsumerStoppedPropagationRef:T,required:v,defaultChecked:or(c)?!1:c,isFormControl:A,bubbleInput:k,setBubbleInput:E};return l.jsx(b2,{scope:o,...D,children:k2(y)?y(D):a})}var Gx="CheckboxTrigger",Yx=h.forwardRef(({__scopeCheckbox:n,onKeyDown:o,onClick:s,...a},c)=>{const{control:d,value:f,disabled:m,checked:g,required:v,setControl:x,setChecked:y,hasConsumerStoppedPropagationRef:S,isFormControl:N,bubbleInput:b}=Yu(Gx,n),C=Pe(c,x),k=h.useRef(g);return h.useEffect(()=>{const E=d==null?void 0:d.form;if(E){const T=()=>y(k.current);return E.addEventListener("reset",T),()=>E.removeEventListener("reset",T)}},[d,y]),l.jsx(be.button,{type:"button",role:"checkbox","aria-checked":or(g)?"mixed":g,"aria-required":v,"data-state":Jx(g),"data-disabled":m?"":void 0,disabled:m,value:f,...a,ref:C,onKeyDown:ne(o,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:ne(s,E=>{y(T=>or(T)?!0:!T),b&&N&&(S.current=E.isPropagationStopped(),S.current||E.stopPropagation())})})});Yx.displayName=Gx;var Qu=h.forwardRef((n,o)=>{const{__scopeCheckbox:s,name:a,checked:c,defaultChecked:d,required:f,disabled:m,value:g,onCheckedChange:v,form:x,...y}=n;return l.jsx(j2,{__scopeCheckbox:s,checked:c,defaultChecked:d,disabled:m,required:f,onCheckedChange:v,name:a,form:x,value:g,internal_do_not_use_render:({isFormControl:S})=>l.jsxs(l.Fragment,{children:[l.jsx(Yx,{...y,ref:o,__scopeCheckbox:s}),S&&l.jsx(Zx,{__scopeCheckbox:s})]})})});Qu.displayName=Di;var Qx="CheckboxIndicator",Xx=h.forwardRef((n,o)=>{const{__scopeCheckbox:s,forceMount:a,...c}=n,d=Yu(Qx,s);return l.jsx(Et,{present:a||or(d.checked)||d.checked===!0,children:l.jsx(be.span,{"data-state":Jx(d.checked),"data-disabled":d.disabled?"":void 0,...c,ref:o,style:{pointerEvents:"none",...n.style}})})});Xx.displayName=Qx;var qx="CheckboxBubbleInput",Zx=h.forwardRef(({__scopeCheckbox:n,...o},s)=>{const{control:a,hasConsumerStoppedPropagationRef:c,checked:d,defaultChecked:f,required:m,disabled:g,name:v,value:x,form:y,bubbleInput:S,setBubbleInput:N}=Yu(qx,n),b=Pe(s,N),C=Ru(d),k=Pu(a);h.useEffect(()=>{const T=S;if(!T)return;const A=window.HTMLInputElement.prototype,W=Object.getOwnPropertyDescriptor(A,"checked").set,F=!c.current;if(C!==d&&W){const $=new Event("click",{bubbles:F});T.indeterminate=or(d),W.call(T,or(d)?!1:d),T.dispatchEvent($)}},[S,C,d,c]);const E=h.useRef(or(d)?!1:d);return l.jsx(be.input,{type:"checkbox","aria-hidden":!0,defaultChecked:f??E.current,required:m,disabled:g,name:v,value:x,form:y,...o,tabIndex:-1,ref:b,style:{...o.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Zx.displayName=qx;function k2(n){return typeof n=="function"}function or(n){return n==="indeterminate"}function Jx(n){return or(n)?"indeterminate":n?"checked":"unchecked"}const mu=h.forwardRef(({className:n,...o},s)=>l.jsx(Qu,{ref:s,className:ge("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",n),...o,children:l.jsx(Xx,{className:ge("flex items-center justify-center text-current"),children:l.jsx(Ar,{className:"h-4 w-4"})})}));mu.displayName=Qu.displayName;const Gl={nest:{label:"Entire Nest",icon:Zm,placeholder:""},tag:{label:"Tag",icon:oh,placeholder:"e.g., #architecture"},folder:{label:"Folder",icon:th,placeholder:"e.g., nodes/api-*"},document:{label:"Document",icon:go,placeholder:"e.g., nodes/getting-started"}};function E2({isOpen:n,onClose:o,onSubmit:s}){const[a,c]=h.useState(""),[d,f]=h.useState("tag"),[m,g]=h.useState(""),[v,x]=h.useState("reviewer"),[y,S]=h.useState(!0),[N,b]=h.useState(!0),[C,k]=h.useState(!1),[E,T]=h.useState(null),A=async()=>{if(!a.trim()){T("Please enter an email");return}if(d!=="nest"&&!m.trim()){T(`Please specify the ${d} target`);return}k(!0),T(null);try{await s({email:a.trim(),scope:d,target:d==="nest"?void 0:m.trim(),role:v,canApprove:y,canReject:N}),D()}catch(F){T(F instanceof Error?F.message:"Failed to assign steward")}finally{k(!1)}},D=()=>{C||(c(""),f("tag"),g(""),x("reviewer"),S(!0),b(!0),T(null),o())},W=Gl[d].icon;return l.jsx(Ot,{open:n,onOpenChange:D,children:l.jsxs(bt,{className:"sm:max-w-[500px]",children:[l.jsxs(jt,{children:[l.jsx(kt,{children:"Assign Context Steward"}),l.jsx(tn,{children:"Stewards can approve or reject documents within their assigned scope, ensuring quality context is available for AI."})]}),l.jsxs("div",{className:"space-y-4 py-4",children:[E&&l.jsxs(cr,{variant:"destructive",children:[l.jsx(Mr,{className:"h-4 w-4"}),l.jsx(ur,{children:E})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ue,{htmlFor:"email",children:"Steward Email"}),l.jsx(Ut,{id:"email",type:"email",placeholder:"reviewer@acme.com",value:a,onChange:F=>c(F.target.value),disabled:C})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ue,{children:"Scope"}),l.jsxs(si,{value:d,onValueChange:F=>{f(F),g("")},disabled:C,children:[l.jsx(xs,{children:l.jsx(li,{})}),l.jsx(ys,{children:Object.entries(Gl).map(([F,$])=>{const z=$.icon;return l.jsx(Ct,{value:F,children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(z,{className:"h-4 w-4"}),$.label]})},F)})})]})]}),d!=="nest"&&l.jsxs("div",{className:"space-y-2",children:[l.jsxs(Ue,{htmlFor:"target",children:[l.jsx(W,{className:"h-4 w-4 inline mr-2"}),Gl[d].label," Pattern"]}),l.jsx(Ut,{id:"target",placeholder:Gl[d].placeholder,value:m,onChange:F=>g(F.target.value),disabled:C}),l.jsx("p",{className:"text-xs text-muted-foreground",children:d==="tag"?"Steward approves any document with this tag.":d==="folder"?"Glob pattern for the folder path (supports * wildcards).":"Exact document ID."})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ue,{children:"Role"}),l.jsxs(si,{value:v,onValueChange:F=>x(F),disabled:C,children:[l.jsx(xs,{children:l.jsx(li,{})}),l.jsxs(ys,{children:[l.jsx(Ct,{value:"editor",children:"Editor — can edit but not approve"}),l.jsx(Ct,{value:"reviewer",children:"Reviewer — can approve/reject"}),l.jsx(Ct,{value:"viewer",children:"Viewer — read-only access"})]})]})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsx(Ue,{children:"Permissions"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(mu,{id:"can-approve",checked:y,onCheckedChange:F=>S(!!F),disabled:C}),l.jsx(Ue,{htmlFor:"can-approve",className:"font-normal cursor-pointer",children:"Can approve documents"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(mu,{id:"can-reject",checked:N,onCheckedChange:F=>b(!!F),disabled:C}),l.jsx(Ue,{htmlFor:"can-reject",className:"font-normal cursor-pointer",children:"Can reject/request changes"})]})]})]}),l.jsxs(en,{children:[l.jsx(he,{variant:"outline",onClick:D,disabled:C,children:"Cancel"}),l.jsxs(he,{onClick:A,disabled:C||!a.trim(),children:[C?l.jsx(Nt,{className:"h-4 w-4 mr-2 animate-spin"}):l.jsx(fo,{className:"h-4 w-4 mr-2"}),"Assign Steward"]})]})]})})}const _2={low:{label:"Low",className:"bg-gray-100 text-gray-600"},normal:{label:"Normal",className:"bg-blue-100 text-blue-600"},high:{label:"High",className:"bg-amber-100 text-amber-600",icon:rm},urgent:{label:"Urgent",className:"bg-red-100 text-red-600",icon:rm}};function R2(n){const o=new Date(n),a=new Date().getTime()-o.getTime();return a<6e4?"Just now":a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:a<6048e5?`${Math.floor(a/864e5)}d ago`:o.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function P2({requests:n,loading:o=!1,error:s=null,className:a,showHeader:c=!0,onRefresh:d,onSelect:f}){return o?l.jsxs(Je,{className:a,children:[c&&l.jsx(it,{className:"pb-3",children:l.jsx(at,{className:"text-lg",children:"Review Queue"})}),l.jsx(et,{children:l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx(Nt,{className:"h-6 w-6 animate-spin text-muted-foreground"})})})]}):s?l.jsxs(Je,{className:a,children:[c&&l.jsx(it,{className:"pb-3",children:l.jsx(at,{className:"text-lg",children:"Review Queue"})}),l.jsx(et,{children:l.jsxs("div",{className:"text-center py-4 text-sm text-destructive",children:[s,d&&l.jsx(he,{variant:"ghost",size:"sm",onClick:d,className:"ml-2",children:l.jsx(Jc,{className:"h-4 w-4"})})]})})]}):l.jsxs(Je,{className:a,children:[c&&l.jsx(it,{className:"pb-3",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx(at,{className:"text-lg",children:"Review Queue"}),l.jsx(Jt,{children:"Documents awaiting your approval"})]}),d&&l.jsx(he,{variant:"ghost",size:"icon",onClick:d,className:"h-8 w-8",children:l.jsx(Jc,{className:"h-4 w-4"})})]})}),l.jsx(et,{children:n.length===0?l.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[l.jsx(ho,{className:"h-10 w-10 text-green-500 mb-3"}),l.jsx("p",{className:"text-sm font-medium",children:"All caught up!"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"No documents awaiting review"})]}):l.jsx("div",{className:"space-y-2",children:n.map(m=>{var x;const g=_2[m.priority],v=g.icon;return l.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border hover:bg-muted/50 cursor-pointer transition-colors group",onClick:()=>f==null?void 0:f(m),children:[l.jsx(go,{className:"h-5 w-5 text-blue-500 flex-shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"font-medium truncate",children:m.nodeId}),l.jsxs(Rn,{variant:"secondary",className:ge("text-[10px] px-1.5 py-0",g.className),children:[v&&l.jsx(v,{className:"h-3 w-3 mr-1"}),g.label]})]}),l.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mt-1",children:[l.jsxs("span",{children:["v",m.version]}),l.jsx("span",{children:"•"}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(yo,{className:"h-4 w-4",children:l.jsx(wo,{className:"text-[8px]",children:((x=m.requestedBy[0])==null?void 0:x.toUpperCase())||"?"})}),l.jsx("span",{children:m.requestedBy})]}),l.jsx("span",{children:"•"}),l.jsx(yu,{className:"h-3 w-3"}),l.jsx("span",{children:R2(m.requestedAt)})]}),m.requestNote&&l.jsxs("p",{className:"text-xs text-muted-foreground mt-1 truncate",children:["“",m.requestNote,"”"]})]}),l.jsx(eh,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]},m.id)})})})]})}function T2({documentTitle:n,version:o,onApprove:s,onReject:a,className:c}){const[d,f]=h.useState(null),[m,g]=h.useState(""),[v,x]=h.useState(!1),[y,S]=h.useState(null),N=async()=>{if(d){if(d==="reject"&&!m.trim()){S("Please provide feedback explaining why this document is being rejected.");return}x(!0),S(null);try{d==="approve"?await s(m||void 0):await a(m),b()}catch(C){S(C instanceof Error?C.message:`Failed to ${d} document`)}finally{x(!1)}}},b=()=>{v||(f(null),g(""),S(null))};return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:c,children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(he,{variant:"outline",className:"border-green-200 text-green-700 hover:bg-green-50 hover:text-green-800",onClick:()=>f("approve"),children:[l.jsx(ho,{className:"h-4 w-4 mr-2"})," Approve"]}),l.jsxs(he,{variant:"outline",className:"border-red-200 text-red-700 hover:bg-red-50 hover:text-red-800",onClick:()=>f("reject"),children:[l.jsx(Qc,{className:"h-4 w-4 mr-2"})," Request Changes"]})]})}),l.jsx(Ot,{open:!!d,onOpenChange:b,children:l.jsxs(bt,{className:"sm:max-w-[425px]",children:[l.jsxs(jt,{children:[l.jsx(kt,{children:d==="approve"?"Approve Document":"Request Changes"}),l.jsx(tn,{children:d==="approve"?`Approve "${n}" (v${o}). This version will become the official AI context for this document.`:`Request changes for "${n}" (v${o}). The author will be notified with your feedback.`})]}),l.jsxs("div",{className:"space-y-4 py-4",children:[y&&l.jsxs(cr,{variant:"destructive",children:[l.jsx(Mr,{className:"h-4 w-4"}),l.jsx(ur,{children:y})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs(Ue,{htmlFor:"review-note",children:[l.jsx(_1,{className:"h-4 w-4 inline mr-2"}),d==="approve"?"Note (optional)":"Feedback (required)"]}),l.jsx(Ai,{id:"review-note",placeholder:d==="approve"?"Add any notes for the author...":"Explain what changes are needed...",value:m,onChange:C=>g(C.target.value),disabled:v,className:"min-h-[100px]"}),d==="reject"&&l.jsx("p",{className:"text-xs text-muted-foreground",children:"Providing clear feedback helps authors make the right changes."})]})]}),l.jsxs(en,{children:[l.jsx(he,{variant:"outline",onClick:b,disabled:v,children:"Cancel"}),l.jsxs(he,{onClick:N,disabled:v,className:d==="approve"?"bg-green-600 hover:bg-green-700":"bg-red-600 hover:bg-red-700",children:[v?l.jsx(Nt,{className:"h-4 w-4 mr-2 animate-spin"}):d==="approve"?l.jsx(ho,{className:"h-4 w-4 mr-2"}):l.jsx(Qc,{className:"h-4 w-4 mr-2"}),d==="approve"?"Approve":"Request Changes"]})]})]})})]})}function A2({isOpen:n,onClose:o,documentTitle:s,currentVersion:a,onSubmit:c}){const[d,f]=h.useState(""),[m,g]=h.useState("normal"),[v,x]=h.useState(!1),[y,S]=h.useState(null),N=async()=>{x(!0),S(null);try{await c(d,m),b()}catch(C){S(C instanceof Error?C.message:"Failed to submit for review")}finally{x(!1)}},b=()=>{v||(f(""),g("normal"),S(null),o())};return l.jsx(Ot,{open:n,onOpenChange:b,children:l.jsxs(bt,{className:"sm:max-w-[425px]",children:[l.jsxs(jt,{children:[l.jsx(kt,{children:"Submit for Review"}),l.jsxs(tn,{children:["Submit “",s,"” (v",a,") for steward approval. Once approved, this version will be available as AI context."]})]}),l.jsxs("div",{className:"space-y-4 py-4",children:[y&&l.jsxs(cr,{variant:"destructive",children:[l.jsx(Mr,{className:"h-4 w-4"}),l.jsx(ur,{children:y})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ue,{htmlFor:"priority",children:"Priority"}),l.jsxs(si,{value:m,onValueChange:C=>g(C),disabled:v,children:[l.jsx(xs,{id:"priority",children:l.jsx(li,{placeholder:"Select priority"})}),l.jsxs(ys,{children:[l.jsx(Ct,{value:"low",children:"Low"}),l.jsx(Ct,{value:"normal",children:"Normal"}),l.jsx(Ct,{value:"high",children:"High"}),l.jsx(Ct,{value:"urgent",children:"Urgent"})]})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ue,{htmlFor:"note",children:"Note for Reviewer (optional)"}),l.jsx(Ai,{id:"note",placeholder:"Add context or specific areas to review...",value:d,onChange:C=>f(C.target.value),disabled:v,className:"min-h-[100px]"})]})]}),l.jsxs(en,{children:[l.jsx(he,{variant:"outline",onClick:b,disabled:v,children:"Cancel"}),l.jsxs(he,{onClick:N,disabled:v,children:[v?l.jsx(Nt,{className:"h-4 w-4 mr-2 animate-spin"}):l.jsx(rh,{className:"h-4 w-4 mr-2"}),"Submit for Review"]})]})]})})}function M2(n,o){return h.useReducer((s,a)=>o[s][a]??s,n)}var Xu="ScrollArea",[ey]=on(Xu),[I2,Wt]=ey(Xu),ty=h.forwardRef((n,o)=>{const{__scopeScrollArea:s,type:a="hover",dir:c,scrollHideDelay:d=600,...f}=n,[m,g]=h.useState(null),[v,x]=h.useState(null),[y,S]=h.useState(null),[N,b]=h.useState(null),[C,k]=h.useState(null),[E,T]=h.useState(0),[A,D]=h.useState(0),[W,F]=h.useState(!1),[$,z]=h.useState(!1),Q=Pe(o,fe=>g(fe)),ee=bs(c);return l.jsx(I2,{scope:s,type:a,dir:ee,scrollHideDelay:d,scrollArea:m,viewport:v,onViewportChange:x,content:y,onContentChange:S,scrollbarX:N,onScrollbarXChange:b,scrollbarXEnabled:W,onScrollbarXEnabledChange:F,scrollbarY:C,onScrollbarYChange:k,scrollbarYEnabled:$,onScrollbarYEnabledChange:z,onCornerWidthChange:T,onCornerHeightChange:D,children:l.jsx(be.div,{dir:ee,...f,ref:Q,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":A+"px",...n.style}})})});ty.displayName=Xu;var ny="ScrollAreaViewport",ry=h.forwardRef((n,o)=>{const{__scopeScrollArea:s,children:a,nonce:c,...d}=n,f=Wt(ny,s),m=h.useRef(null),g=Pe(o,m,f.onViewportChange);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:c}),l.jsx(be.div,{"data-radix-scroll-area-viewport":"",...d,ref:g,style:{overflowX:f.scrollbarXEnabled?"scroll":"hidden",overflowY:f.scrollbarYEnabled?"scroll":"hidden",...n.style},children:l.jsx("div",{ref:f.onContentChange,style:{minWidth:"100%",display:"table"},children:a})})]})});ry.displayName=ny;var vn="ScrollAreaScrollbar",qu=h.forwardRef((n,o)=>{const{forceMount:s,...a}=n,c=Wt(vn,n.__scopeScrollArea),{onScrollbarXEnabledChange:d,onScrollbarYEnabledChange:f}=c,m=n.orientation==="horizontal";return h.useEffect(()=>(m?d(!0):f(!0),()=>{m?d(!1):f(!1)}),[m,d,f]),c.type==="hover"?l.jsx(O2,{...a,ref:o,forceMount:s}):c.type==="scroll"?l.jsx(D2,{...a,ref:o,forceMount:s}):c.type==="auto"?l.jsx(oy,{...a,ref:o,forceMount:s}):c.type==="always"?l.jsx(Zu,{...a,ref:o}):null});qu.displayName=vn;var O2=h.forwardRef((n,o)=>{const{forceMount:s,...a}=n,c=Wt(vn,n.__scopeScrollArea),[d,f]=h.useState(!1);return h.useEffect(()=>{const m=c.scrollArea;let g=0;if(m){const v=()=>{window.clearTimeout(g),f(!0)},x=()=>{g=window.setTimeout(()=>f(!1),c.scrollHideDelay)};return m.addEventListener("pointerenter",v),m.addEventListener("pointerleave",x),()=>{window.clearTimeout(g),m.removeEventListener("pointerenter",v),m.removeEventListener("pointerleave",x)}}},[c.scrollArea,c.scrollHideDelay]),l.jsx(Et,{present:s||d,children:l.jsx(oy,{"data-state":d?"visible":"hidden",...a,ref:o})})}),D2=h.forwardRef((n,o)=>{const{forceMount:s,...a}=n,c=Wt(vn,n.__scopeScrollArea),d=n.orientation==="horizontal",f=zi(()=>g("SCROLL_END"),100),[m,g]=M2("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return h.useEffect(()=>{if(m==="idle"){const v=window.setTimeout(()=>g("HIDE"),c.scrollHideDelay);return()=>window.clearTimeout(v)}},[m,c.scrollHideDelay,g]),h.useEffect(()=>{const v=c.viewport,x=d?"scrollLeft":"scrollTop";if(v){let y=v[x];const S=()=>{const N=v[x];y!==N&&(g("SCROLL"),f()),y=N};return v.addEventListener("scroll",S),()=>v.removeEventListener("scroll",S)}},[c.viewport,d,g,f]),l.jsx(Et,{present:s||m!=="hidden",children:l.jsx(Zu,{"data-state":m==="hidden"?"hidden":"visible",...a,ref:o,onPointerEnter:ne(n.onPointerEnter,()=>g("POINTER_ENTER")),onPointerLeave:ne(n.onPointerLeave,()=>g("POINTER_LEAVE"))})})}),oy=h.forwardRef((n,o)=>{const s=Wt(vn,n.__scopeScrollArea),{forceMount:a,...c}=n,[d,f]=h.useState(!1),m=n.orientation==="horizontal",g=zi(()=>{if(s.viewport){const v=s.viewport.offsetWidth<s.viewport.scrollWidth,x=s.viewport.offsetHeight<s.viewport.scrollHeight;f(m?v:x)}},10);return So(s.viewport,g),So(s.content,g),l.jsx(Et,{present:a||d,children:l.jsx(Zu,{"data-state":d?"visible":"hidden",...c,ref:o})})}),Zu=h.forwardRef((n,o)=>{const{orientation:s="vertical",...a}=n,c=Wt(vn,n.__scopeScrollArea),d=h.useRef(null),f=h.useRef(0),[m,g]=h.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),v=cy(m.viewport,m.content),x={...a,sizes:m,onSizesChange:g,hasThumb:v>0&&v<1,onThumbChange:S=>d.current=S,onThumbPointerUp:()=>f.current=0,onThumbPointerDown:S=>f.current=S};function y(S,N){return B2(S,f.current,m,N)}return s==="horizontal"?l.jsx(L2,{...x,ref:o,onThumbPositionChange:()=>{if(c.viewport&&d.current){const S=c.viewport.scrollLeft,N=$m(S,m,c.dir);d.current.style.transform=`translate3d(${N}px, 0, 0)`}},onWheelScroll:S=>{c.viewport&&(c.viewport.scrollLeft=S)},onDragScroll:S=>{c.viewport&&(c.viewport.scrollLeft=y(S,c.dir))}}):s==="vertical"?l.jsx(z2,{...x,ref:o,onThumbPositionChange:()=>{if(c.viewport&&d.current){const S=c.viewport.scrollTop,N=$m(S,m);d.current.style.transform=`translate3d(0, ${N}px, 0)`}},onWheelScroll:S=>{c.viewport&&(c.viewport.scrollTop=S)},onDragScroll:S=>{c.viewport&&(c.viewport.scrollTop=y(S))}}):null}),L2=h.forwardRef((n,o)=>{const{sizes:s,onSizesChange:a,...c}=n,d=Wt(vn,n.__scopeScrollArea),[f,m]=h.useState(),g=h.useRef(null),v=Pe(o,g,d.onScrollbarXChange);return h.useEffect(()=>{g.current&&m(getComputedStyle(g.current))},[g]),l.jsx(ly,{"data-orientation":"horizontal",...c,ref:v,sizes:s,style:{bottom:0,left:d.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:d.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Li(s)+"px",...n.style},onThumbPointerDown:x=>n.onThumbPointerDown(x.x),onDragScroll:x=>n.onDragScroll(x.x),onWheelScroll:(x,y)=>{if(d.viewport){const S=d.viewport.scrollLeft+x.deltaX;n.onWheelScroll(S),dy(S,y)&&x.preventDefault()}},onResize:()=>{g.current&&d.viewport&&f&&a({content:d.viewport.scrollWidth,viewport:d.viewport.offsetWidth,scrollbar:{size:g.current.clientWidth,paddingStart:ui(f.paddingLeft),paddingEnd:ui(f.paddingRight)}})}})}),z2=h.forwardRef((n,o)=>{const{sizes:s,onSizesChange:a,...c}=n,d=Wt(vn,n.__scopeScrollArea),[f,m]=h.useState(),g=h.useRef(null),v=Pe(o,g,d.onScrollbarYChange);return h.useEffect(()=>{g.current&&m(getComputedStyle(g.current))},[g]),l.jsx(ly,{"data-orientation":"vertical",...c,ref:v,sizes:s,style:{top:0,right:d.dir==="ltr"?0:void 0,left:d.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Li(s)+"px",...n.style},onThumbPointerDown:x=>n.onThumbPointerDown(x.y),onDragScroll:x=>n.onDragScroll(x.y),onWheelScroll:(x,y)=>{if(d.viewport){const S=d.viewport.scrollTop+x.deltaY;n.onWheelScroll(S),dy(S,y)&&x.preventDefault()}},onResize:()=>{g.current&&d.viewport&&f&&a({content:d.viewport.scrollHeight,viewport:d.viewport.offsetHeight,scrollbar:{size:g.current.clientHeight,paddingStart:ui(f.paddingTop),paddingEnd:ui(f.paddingBottom)}})}})}),[F2,sy]=ey(vn),ly=h.forwardRef((n,o)=>{const{__scopeScrollArea:s,sizes:a,hasThumb:c,onThumbChange:d,onThumbPointerUp:f,onThumbPointerDown:m,onThumbPositionChange:g,onDragScroll:v,onWheelScroll:x,onResize:y,...S}=n,N=Wt(vn,s),[b,C]=h.useState(null),k=Pe(o,Q=>C(Q)),E=h.useRef(null),T=h.useRef(""),A=N.viewport,D=a.content-a.viewport,W=ot(x),F=ot(g),$=zi(y,10);function z(Q){if(E.current){const ee=Q.clientX-E.current.left,fe=Q.clientY-E.current.top;v({x:ee,y:fe})}}return h.useEffect(()=>{const Q=ee=>{const fe=ee.target;(b==null?void 0:b.contains(fe))&&W(ee,D)};return document.addEventListener("wheel",Q,{passive:!1}),()=>document.removeEventListener("wheel",Q,{passive:!1})},[A,b,D,W]),h.useEffect(F,[a,F]),So(b,$),So(N.content,$),l.jsx(F2,{scope:s,scrollbar:b,hasThumb:c,onThumbChange:ot(d),onThumbPointerUp:ot(f),onThumbPositionChange:F,onThumbPointerDown:ot(m),children:l.jsx(be.div,{...S,ref:k,style:{position:"absolute",...S.style},onPointerDown:ne(n.onPointerDown,Q=>{Q.button===0&&(Q.target.setPointerCapture(Q.pointerId),E.current=b.getBoundingClientRect(),T.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",N.viewport&&(N.viewport.style.scrollBehavior="auto"),z(Q))}),onPointerMove:ne(n.onPointerMove,z),onPointerUp:ne(n.onPointerUp,Q=>{const ee=Q.target;ee.hasPointerCapture(Q.pointerId)&&ee.releasePointerCapture(Q.pointerId),document.body.style.webkitUserSelect=T.current,N.viewport&&(N.viewport.style.scrollBehavior=""),E.current=null})})})}),ci="ScrollAreaThumb",iy=h.forwardRef((n,o)=>{const{forceMount:s,...a}=n,c=sy(ci,n.__scopeScrollArea);return l.jsx(Et,{present:s||c.hasThumb,children:l.jsx($2,{ref:o,...a})})}),$2=h.forwardRef((n,o)=>{const{__scopeScrollArea:s,style:a,...c}=n,d=Wt(ci,s),f=sy(ci,s),{onThumbPositionChange:m}=f,g=Pe(o,y=>f.onThumbChange(y)),v=h.useRef(void 0),x=zi(()=>{v.current&&(v.current(),v.current=void 0)},100);return h.useEffect(()=>{const y=d.viewport;if(y){const S=()=>{if(x(),!v.current){const N=U2(y,m);v.current=N,m()}};return m(),y.addEventListener("scroll",S),()=>y.removeEventListener("scroll",S)}},[d.viewport,x,m]),l.jsx(be.div,{"data-state":f.hasThumb?"visible":"hidden",...c,ref:g,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...a},onPointerDownCapture:ne(n.onPointerDownCapture,y=>{const N=y.target.getBoundingClientRect(),b=y.clientX-N.left,C=y.clientY-N.top;f.onThumbPointerDown({x:b,y:C})}),onPointerUp:ne(n.onPointerUp,f.onThumbPointerUp)})});iy.displayName=ci;var Ju="ScrollAreaCorner",ay=h.forwardRef((n,o)=>{const s=Wt(Ju,n.__scopeScrollArea),a=!!(s.scrollbarX&&s.scrollbarY);return s.type!=="scroll"&&a?l.jsx(V2,{...n,ref:o}):null});ay.displayName=Ju;var V2=h.forwardRef((n,o)=>{const{__scopeScrollArea:s,...a}=n,c=Wt(Ju,s),[d,f]=h.useState(0),[m,g]=h.useState(0),v=!!(d&&m);return So(c.scrollbarX,()=>{var y;const x=((y=c.scrollbarX)==null?void 0:y.offsetHeight)||0;c.onCornerHeightChange(x),g(x)}),So(c.scrollbarY,()=>{var y;const x=((y=c.scrollbarY)==null?void 0:y.offsetWidth)||0;c.onCornerWidthChange(x),f(x)}),v?l.jsx(be.div,{...a,ref:o,style:{width:d,height:m,position:"absolute",right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:0,...n.style}}):null});function ui(n){return n?parseInt(n,10):0}function cy(n,o){const s=n/o;return isNaN(s)?0:s}function Li(n){const o=cy(n.viewport,n.content),s=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,a=(n.scrollbar.size-s)*o;return Math.max(a,18)}function B2(n,o,s,a="ltr"){const c=Li(s),d=c/2,f=o||d,m=c-f,g=s.scrollbar.paddingStart+f,v=s.scrollbar.size-s.scrollbar.paddingEnd-m,x=s.content-s.viewport,y=a==="ltr"?[0,x]:[x*-1,0];return uy([g,v],y)(n)}function $m(n,o,s="ltr"){const a=Li(o),c=o.scrollbar.paddingStart+o.scrollbar.paddingEnd,d=o.scrollbar.size-c,f=o.content-o.viewport,m=d-a,g=s==="ltr"?[0,f]:[f*-1,0],v=ou(n,g);return uy([0,f],[0,m])(v)}function uy(n,o){return s=>{if(n[0]===n[1]||o[0]===o[1])return o[0];const a=(o[1]-o[0])/(n[1]-n[0]);return o[0]+a*(s-n[0])}}function dy(n,o){return n>0&&n<o}var U2=(n,o=()=>{})=>{let s={left:n.scrollLeft,top:n.scrollTop},a=0;return(function c(){const d={left:n.scrollLeft,top:n.scrollTop},f=s.left!==d.left,m=s.top!==d.top;(f||m)&&o(),s=d,a=window.requestAnimationFrame(c)})(),()=>window.cancelAnimationFrame(a)};function zi(n,o){const s=ot(n),a=h.useRef(0);return h.useEffect(()=>()=>window.clearTimeout(a.current),[]),h.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(s,o)},[s,o])}function So(n,o){const s=ot(o);Ye(()=>{let a=0;if(n){const c=new ResizeObserver(()=>{cancelAnimationFrame(a),a=window.requestAnimationFrame(s)});return c.observe(n),()=>{window.cancelAnimationFrame(a),c.unobserve(n)}}},[n,s])}var fy=ty,W2=ry,H2=ay;const hu=h.forwardRef(({className:n,children:o,...s},a)=>l.jsxs(fy,{ref:a,className:ge("relative overflow-hidden",n),...s,children:[l.jsx(W2,{className:"h-full w-full rounded-[inherit]",children:o}),l.jsx(py,{}),l.jsx(H2,{})]}));hu.displayName=fy.displayName;const py=h.forwardRef(({className:n,orientation:o="vertical",...s},a)=>l.jsx(qu,{ref:a,orientation:o,className:ge("flex touch-none select-none transition-colors",o==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",o==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",n),...s,children:l.jsx(iy,{className:"relative flex-1 rounded-full bg-border"})}));py.displayName=qu.displayName;function Vm(n){return new Date(n).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function K2({versions:n,currentVersion:o,approvedVersion:s,loading:a=!1,onRestore:c,className:d}){const[f,m]=h.useState(null),[g,v]=h.useState(null),[x,y]=h.useState(!1),S=async()=>{if(!(!g||!c)){y(!0);try{await c(g),v(null)}finally{y(!1)}}};return a?l.jsxs(Je,{className:d,children:[l.jsx(it,{className:"pb-3",children:l.jsxs(at,{className:"text-sm font-medium flex items-center gap-2",children:[l.jsx(Xc,{className:"h-4 w-4"}),"Version History"]})}),l.jsx(et,{children:l.jsx("div",{className:"flex items-center justify-center py-4",children:l.jsx(Nt,{className:"h-5 w-5 animate-spin text-muted-foreground"})})})]}):l.jsxs(Je,{className:d,children:[l.jsx(it,{className:"pb-3",children:l.jsxs(at,{className:"text-sm font-medium flex items-center gap-2",children:[l.jsx(Xc,{className:"h-4 w-4"}),"Version History",l.jsxs(Rn,{variant:"secondary",className:"text-[10px] ml-auto",children:["v",o]})]})}),l.jsx(et,{children:n.length===0?l.jsx("div",{className:"text-center py-4 text-sm text-muted-foreground",children:"No version history"}):l.jsx(hu,{className:"max-h-[240px]",children:l.jsx("div",{className:"space-y-1",children:n.map(N=>{const b=N.version===s;return l.jsxs("div",{className:`flex items-center justify-between p-2 rounded hover:bg-muted/50 group ${b?"bg-green-50 border border-green-200":""}`,children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"text-sm font-medium flex items-center gap-2",children:["Version ",N.version,b&&l.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-green-700",children:[l.jsx(ho,{className:"h-3 w-3"})," AI-active"]})]}),l.jsxs("div",{className:"text-xs text-muted-foreground truncate",children:[Vm(N.editedAt)," · ",N.editedBy,N.changeNote&&` · ${N.changeNote}`]})]}),l.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[N.content&&l.jsx(he,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>m(N),children:l.jsx(h1,{className:"h-3.5 w-3.5"})}),c&&N.version!==o&&l.jsx(he,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>v(N.version),children:l.jsx(tm,{className:"h-3.5 w-3.5"})})]})]},N.version)})})})}),l.jsx(Ot,{open:!!f,onOpenChange:()=>m(null),children:l.jsxs(bt,{className:"max-w-2xl max-h-[80vh]",children:[l.jsxs(jt,{children:[l.jsxs(kt,{children:["Version ",f==null?void 0:f.version," Preview"]}),l.jsxs(tn,{children:[f&&Vm(f.editedAt),(f==null?void 0:f.changeNote)&&` · ${f.changeNote}`]})]}),l.jsx(hu,{className:"max-h-[50vh]",children:l.jsx("pre",{className:"text-sm whitespace-pre-wrap font-mono p-4 bg-muted/30 rounded",children:(f==null?void 0:f.content)||"(no content)"})}),l.jsxs(en,{children:[l.jsx(he,{variant:"outline",onClick:()=>m(null),children:"Close"}),c&&f&&f.version!==o&&l.jsxs(he,{onClick:()=>{v(f.version),m(null)},children:[l.jsx(tm,{className:"h-4 w-4 mr-2"}),"Restore This Version"]})]})]})}),l.jsx(Ot,{open:!!g,onOpenChange:()=>v(null),children:l.jsxs(bt,{children:[l.jsxs(jt,{children:[l.jsxs(kt,{children:["Restore Version ",g,"?"]}),l.jsxs(tn,{children:["This will create a new version with the content from version ",g,". Your current content will be saved in the version history."]})]}),l.jsxs(en,{children:[l.jsx(he,{variant:"outline",onClick:()=>v(null),disabled:x,children:"Cancel"}),l.jsx(he,{onClick:S,disabled:x,children:x?"Restoring...":"Restore"})]})]})})]})}const Bm={draft:{label:"Draft",icon:v1,className:"bg-gray-100 text-gray-700 border-gray-200"},pending_review:{label:"Pending Review",icon:yu,className:"bg-amber-100 text-amber-700 border-amber-200"},approved:{label:"Approved",icon:ho,className:"bg-green-100 text-green-700 border-green-200"},rejected:{label:"Rejected",icon:Qc,className:"bg-red-100 text-red-700 border-red-200"}};function G2({status:n,approvedVersion:o,currentVersion:s,showIcon:a=!0,size:c="default",className:d}){const f=Bm[n]||Bm.draft,m=f.icon,g=n==="approved"&&o&&s&&o<s;return l.jsxs(Rn,{variant:"outline",className:ge("!rounded-sm",f.className,c==="sm"&&"text-[10px] px-1.5 py-0",d),children:[a&&l.jsx(m,{className:ge("mr-1",c==="sm"?"h-3 w-3":"h-3.5 w-3.5")}),f.label,g&&l.jsxs("span",{className:"ml-1 text-[10px] opacity-75",children:["(v",o,")"]})]})}function Y2({nestId:n,nestName:o,isAdmin:s,onBack:a}){const[c,d]=h.useState([]),[f,m]=h.useState([]),[g,v]=h.useState([]),[x,y]=h.useState(!1),[S,N]=h.useState(!1),[b,C]=h.useState("all"),[k,E]=h.useState(!0),[T,A]=h.useState(""),[D,W]=h.useState("all"),[F,$]=h.useState(null),[z,Q]=h.useState(null),[ee,fe]=h.useState(null),[me,we]=h.useState({versions:[],approvedVersion:null,currentVersion:0}),[ve,Ne]=h.useState(!1),[J,re]=h.useState(!1),[V,B]=h.useState(!1),O=h.useCallback(async()=>{E(!0);const[H,Z,ye,ke]=await Promise.all([A0(n).catch(()=>({nodes:[]})),I0(n).catch(()=>({stewards:[]})),D0(n).catch(()=>({requests:[],total:0})),_0(n).catch(()=>({stewardship_enabled:!1}))]);d(H.nodes),m(Z.stewards),v(ye.requests),y(ke.stewardship_enabled),E(!1)},[n]);h.useEffect(()=>{O()},[O]);const R={total:c.length,pending:c.filter(H=>H.status==="pending_review").length,approved:c.filter(H=>H.status==="approved").length,reviewQueue:g.length},U=c.filter(H=>!(D!=="all"&&H.status!==D||T&&!H.title.toLowerCase().includes(T.toLowerCase()))),xe=async H=>{fe(H);try{const Z=await $0(n,H.id);we(Z)}catch{}},pe=async H=>{F&&(await z0(n,F.id,H),$(null),O())},ue=async H=>{F&&(await F0(n,F.id,H),$(null),O())},se=async(H,Z)=>{z&&(await L0(n,z.id,H,Z),Q(null),O())},q=async H=>{const Z=localStorage.getItem("cnst_token"),ye=await fetch(`/nests/${n}/stewards`,{method:"POST",headers:{"Content-Type":"application/json",...Z?{Authorization:`Bearer ${Z}`}:{}},body:JSON.stringify(H)});if(!ye.ok){const ke=await ye.json();throw new Error(ke.error||"Failed to assign")}O()};return l.jsxs("div",{className:"md:py-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row items-start justify-between gap-2 sm:gap-4 mb-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(he,{variant:"ghost",size:"icon",onClick:a,children:l.jsx(Xm,{className:"h-4 w-4"})}),l.jsx("h3",{className:"text-xl font-semibold",children:o})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(he,{variant:"outline",onClick:()=>B(!0),children:[l.jsx(j1,{className:"h-4 w-4 mr-2"}),"Connect"]}),s&&l.jsxs(he,{variant:"outline",onClick:()=>N(!0),children:[l.jsx(nm,{className:"h-4 w-4 mr-2"}),"Settings"]}),x&&l.jsxs(l.Fragment,{children:[l.jsxs(he,{variant:"outline",onClick:()=>O0(n).then(O),children:[l.jsx(Jc,{className:"h-4 w-4 mr-2"}),"Sync stewards.yaml"]}),l.jsxs(he,{variant:"outline",onClick:()=>re(!0),children:[l.jsx(Mt,{className:"h-4 w-4 mr-2"}),"Assign Steward"]})]}),l.jsxs(he,{onClick:()=>Ne(!0),children:[l.jsx(Zc,{className:"h-4 w-4 mr-2"}),"New Document"]})]})]}),l.jsxs("div",{className:`grid grid-cols-1 gap-4 mb-6 ${x?"md:grid-cols-4":"md:grid-cols-1 max-w-sm"}`,children:[l.jsxs(Je,{children:[l.jsxs(it,{className:"pb-2",children:[l.jsx(Jt,{children:"Total Documents"}),l.jsx(at,{className:"text-3xl",children:R.total})]}),l.jsx(et,{children:l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(go,{className:"h-4 w-4"}),l.jsx("span",{children:x?"In your context":"Auto-approved, AI-ready"})]})})]}),x&&l.jsxs(l.Fragment,{children:[l.jsxs(Je,{children:[l.jsxs(it,{className:"pb-2",children:[l.jsx(Jt,{children:"Pending Review"}),l.jsx(at,{className:"text-3xl text-amber-600",children:R.pending})]}),l.jsx(et,{children:l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(yu,{className:"h-4 w-4"}),l.jsx("span",{children:"Awaiting approval"})]})})]}),l.jsxs(Je,{children:[l.jsxs(it,{className:"pb-2",children:[l.jsx(Jt,{children:"AI Ready"}),l.jsx(at,{className:"text-3xl text-green-600",children:R.approved})]}),l.jsx(et,{children:l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(ho,{className:"h-4 w-4"}),l.jsx("span",{children:"Approved for AI"})]})})]}),l.jsxs(Je,{children:[l.jsxs(it,{className:"pb-2",children:[l.jsx(Jt,{children:"Review Queue"}),l.jsx(at,{className:"text-3xl text-blue-600",children:R.reviewQueue})]}),l.jsx(et,{children:l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[l.jsx(Mt,{className:"h-4 w-4"}),l.jsx("span",{children:"Need your review"})]})})]})]})]}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_380px] gap-8",children:[l.jsx("div",{className:"space-y-4",children:l.jsxs(Je,{children:[l.jsx(it,{children:l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx(at,{className:"text-lg",children:"Documents"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("div",{className:"relative",children:[l.jsx(I1,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),l.jsx(Ut,{placeholder:"Search...",value:T,onChange:H=>A(H.target.value),className:"pl-9 w-48 h-8"})]}),x&&l.jsxs(si,{value:D,onValueChange:W,children:[l.jsx(xs,{className:"w-[140px] h-8",children:l.jsx(li,{})}),l.jsxs(ys,{children:[l.jsx(Ct,{value:"all",children:"All Status"}),l.jsx(Ct,{value:"draft",children:"Draft"}),l.jsx(Ct,{value:"pending_review",children:"Pending"}),l.jsx(Ct,{value:"approved",children:"Approved"}),l.jsx(Ct,{value:"rejected",children:"Rejected"})]})]})]})]})}),l.jsx(et,{children:k?l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx(Nt,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):U.length===0?l.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:T||D!=="all"?"No matching documents":"No documents yet"}):l.jsx("div",{className:"space-y-2",children:U.map(H=>{var Z;return l.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border hover:bg-muted/50 transition-colors group",children:[l.jsx(go,{className:"h-5 w-5 text-muted-foreground flex-shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"font-medium truncate",children:H.title}),x&&l.jsx(G2,{status:H.status||"draft",size:"sm"})]}),l.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mt-1",children:[l.jsxs("span",{children:["v",H.version||1]}),((Z=H.tags)==null?void 0:Z.length)>0&&l.jsxs(l.Fragment,{children:[l.jsx("span",{children:"·"}),l.jsx("span",{className:"truncate",children:H.tags.slice(0,3).join(" ")})]})]})]}),l.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[x&&H.status==="draft"&&l.jsxs(he,{variant:"outline",size:"sm",onClick:()=>Q(H),children:[l.jsx(rh,{className:"h-3.5 w-3.5 mr-1"}),"Submit"]}),x&&H.status==="pending_review"&&l.jsx(he,{variant:"outline",size:"sm",onClick:()=>$(H),className:"border-green-200 text-green-700 hover:bg-green-50",children:"Review"}),l.jsx(he,{variant:"ghost",size:"sm",onClick:()=>xe(H),children:l.jsx(Xc,{className:"h-3.5 w-3.5"})})]})]},H.id)})})})]})}),l.jsx("div",{className:"space-y-4",children:x?l.jsxs(l.Fragment,{children:[l.jsxs(Je,{className:"border-blue-200 bg-blue-50/40",children:[l.jsx(it,{className:"pb-2",children:l.jsxs(at,{className:"text-sm flex items-center gap-2",children:[l.jsx(Mt,{className:"h-4 w-4 text-blue-700"}),"How stewardship works"]})}),l.jsxs(et,{className:"text-xs text-muted-foreground space-y-2 leading-relaxed",children:[l.jsxs("p",{children:[l.jsx("strong",{className:"text-foreground",children:"New documents start as drafts."})," ","They're not available to AI queries until a steward approves them."]}),l.jsxs("p",{children:[l.jsx("strong",{className:"text-foreground",children:"Stewards"})," are people you name to govern content by scope. Resolution priority (first match wins):"]}),l.jsxs("ol",{className:"list-decimal list-inside ml-2 space-y-0.5",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Document"})," — this exact doc"]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Folder"})," — everything under a path"]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Tag"})," — everything with #tag"]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Nest"})," — anything not matched above"]})]}),l.jsxs("p",{children:[l.jsx("strong",{className:"text-foreground",children:"Reviewers"})," can approve/reject; ",l.jsx("strong",{className:"text-foreground",children:"editors"})," can edit;"," ",l.jsx("strong",{className:"text-foreground",children:"viewers"})," have read access. Authors can't approve their own work."]})]})]}),l.jsx(P2,{requests:g,loading:k,onRefresh:O,onSelect:H=>{const Z=c.find(ye=>ye.id===H.nodeId);Z&&$(Z)}}),l.jsxs(Je,{children:[l.jsx(it,{className:"pb-3",children:l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{children:[l.jsx(at,{className:"text-lg",children:"Stewards"}),l.jsx(Jt,{children:f.length===0?"Nobody's governing content yet":"Who governs what"})]}),f.length>0&&l.jsx("div",{className:"flex items-center gap-2",children:["all","document","folder","tag","nest"].map(H=>l.jsx("button",{onClick:()=>C(H),className:`text-xs px-2 py-1 rounded border ${b===H?"bg-primary text-primary-foreground border-primary":"bg-background text-muted-foreground border-border hover:bg-secondary"}`,children:H==="all"?"All":H.charAt(0).toUpperCase()+H.slice(1)},H))})]})}),l.jsx(et,{children:f.length===0?l.jsxs("div",{className:"text-sm space-y-3 py-2",children:[l.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Without stewards, every draft needs the nest owner to approve. Add an editor/reviewer to delegate approvals for a tag, folder, or specific doc."}),l.jsxs(he,{variant:"outline",size:"sm",className:"w-full",onClick:()=>re(!0),children:[l.jsx(Mt,{className:"h-3.5 w-3.5 mr-2"}),"Assign your first steward"]})]}):l.jsx(C2,{stewards:b==="all"?f:f.filter(H=>H.scope===b),showScope:!0,onAddSteward:()=>re(!0)})})]})]}):l.jsxs(Je,{children:[l.jsxs(it,{className:"pb-3",children:[l.jsxs(at,{className:"text-base flex items-center gap-2",children:[l.jsx(Mt,{className:"h-4 w-4"}),"Stewardship is off"]}),l.jsx(Jt,{children:"New documents are auto-approved and immediately AI-ready."})]}),l.jsxs(et,{children:[l.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Enable stewardship to require steward approval before documents become AI-ready. Versioning stays on either way."}),s?l.jsxs(he,{variant:"outline",size:"sm",className:"w-full",onClick:()=>N(!0),children:[l.jsx(nm,{className:"h-3.5 w-3.5 mr-2"}),"Open Settings"]}):l.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Only the server admin can enable stewardship."})]})]})})]}),V&&l.jsx(KN,{isOpen:V,onClose:()=>B(!1),nestId:n,nestName:o}),S&&l.jsx(tb,{nestId:n,nestName:o,stewardshipEnabled:x,onClose:()=>N(!1),onChanged:()=>{N(!1),O()}}),ve&&l.jsx(Q2,{nestId:n,onClose:()=>Ne(!1),onCreated:()=>{Ne(!1),O()}}),J&&l.jsx(E2,{isOpen:J,onClose:()=>re(!1),onSubmit:q}),z&&l.jsx(A2,{isOpen:!!z,onClose:()=>Q(null),documentTitle:z.title,currentVersion:z.version||1,onSubmit:se}),F&&l.jsx(X2,{node:F,onApprove:pe,onReject:ue,onClose:()=>$(null)}),ee&&l.jsx(Ot,{open:!0,onOpenChange:()=>fe(null),children:l.jsxs(bt,{className:"sm:max-w-[600px]",children:[l.jsx(jt,{children:l.jsx(kt,{children:ee.title})}),l.jsx(K2,{versions:me.versions,currentVersion:me.currentVersion,approvedVersion:me.approvedVersion})]})})]})}function Q2({nestId:n,onClose:o,onCreated:s}){const[a,c]=h.useState(""),[d,f]=h.useState(""),[m,g]=h.useState(""),[v,x]=h.useState(!1),y=async S=>{if(S.preventDefault(),!(!a.trim()||!d.trim())){x(!0);try{await M0(n,{title:a,content:d,tags:m.split(",").map(N=>N.trim()).filter(Boolean)}),s()}finally{x(!1)}}};return l.jsx(Ot,{open:!0,onOpenChange:o,children:l.jsxs(bt,{className:"sm:max-w-[600px]",children:[l.jsx(jt,{children:l.jsx(kt,{children:"New Document"})}),l.jsxs("form",{onSubmit:y,className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ue,{children:"Title"}),l.jsx(Ut,{value:a,onChange:S=>c(S.target.value),placeholder:"Document title",autoFocus:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ue,{children:"Content"}),l.jsx(Ai,{value:d,onChange:S=>f(S.target.value),placeholder:"Markdown content...",rows:10,className:"font-mono text-sm"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ue,{children:"Tags"}),l.jsx(Ut,{value:m,onChange:S=>g(S.target.value),placeholder:"Comma-separated (e.g., architecture, api)"})]}),l.jsxs(en,{children:[l.jsx(he,{variant:"outline",onClick:o,type:"button",children:"Cancel"}),l.jsx(he,{type:"submit",disabled:v||!a||!d,children:v?l.jsx(Nt,{className:"h-4 w-4 animate-spin"}):"Create"})]})]})]})})}function X2({node:n,onApprove:o,onReject:s,onClose:a}){return l.jsx(Ot,{open:!0,onOpenChange:a,children:l.jsxs(bt,{className:"sm:max-w-[600px] max-h-[80vh] flex flex-col",children:[l.jsx(jt,{children:l.jsx(kt,{children:n.title})}),l.jsx("div",{className:"flex-1 overflow-y-auto bg-muted/30 p-4 rounded-md",children:l.jsx("pre",{className:"text-sm whitespace-pre-wrap font-mono",children:n.content||"(no content)"})}),l.jsx(en,{children:l.jsx(T2,{documentTitle:n.title,version:n.version||1,onApprove:o,onReject:s})})]})})}function q2({alreadyClaimed:n,existingAdmin:o,onClose:s,onLoggedIn:a}){const[c,d]=h.useState("promptowl"),[f,m]=h.useState(""),[g,v]=h.useState(""),[x,y]=h.useState(!1),[S,N]=h.useState(null),[b,C]=h.useState(null),[k,E]=h.useState(null),[T,A]=h.useState(!1),D=async()=>{k&&(await navigator.clipboard.writeText(k),A(!0),setTimeout(()=>A(!1),1500))},W=async()=>{N(null),y(!0);try{const $=await Km();C($.verificationUrl),E($.deviceCode),window.open($.verificationUrl,"_blank");for(let z=0;z<180;z++){await new Promise(ee=>setTimeout(ee,2e3));const Q=await Gm($.deviceCode,$.clientSecret);if(Q.status==="approved"&&Q.token){await Ym(Q.token),a();return}if(Q.status==="expired"){N("Login expired. Try again."),C(null),E(null),y(!1);return}}}catch($){N($.message),C(null),E(null),y(!1)}},F=async $=>{$.preventDefault(),N(null),y(!0);try{await Hm(f,g),a()}catch(z){N(z.message),y(!1)}};return l.jsx(Ot,{open:!0,onOpenChange:s,children:l.jsxs(bt,{className:"sm:max-w-[420px]",children:[l.jsxs(jt,{children:[l.jsxs(kt,{className:"flex items-center gap-2",children:[l.jsx(Mt,{className:"h-4 w-4"}),n?"Login":"Claim as Admin"]}),l.jsx(tn,{children:n?o?`This server is administered by ${o}. Login to manage settings and teammates.`:"Login with your account.":"The first PromptOwl-authenticated user becomes this server's admin. Admins can enable stewardship, invite teammates, and manage settings."})]}),l.jsxs("div",{className:"space-y-4 pt-2",children:[S&&l.jsxs(cr,{variant:"destructive",children:[l.jsx(Mr,{className:"h-4 w-4"}),l.jsx(ur,{children:S})]}),c==="promptowl"?l.jsxs(l.Fragment,{children:[l.jsx(he,{onClick:W,disabled:x,className:"w-full",children:x&&b?l.jsxs(l.Fragment,{children:[l.jsx(Nt,{className:"h-4 w-4 mr-2 animate-spin"}),"Waiting for approval..."]}):"Login with PromptOwl"}),b&&l.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 space-y-2",children:[l.jsxs("p",{className:"text-xs text-muted-foreground",children:["A new tab opened at"," ",l.jsxs("a",{href:b,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-primary underline",children:["PromptOwl",l.jsx(p1,{className:"h-3 w-3"})]}),". If it asks for a verification code, use this:"]}),k&&l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("code",{className:"flex-1 bg-background border rounded px-2 py-1.5 text-xs font-mono break-all",children:k}),l.jsx(he,{size:"sm",variant:"outline",onClick:D,children:T?l.jsx(Ar,{className:"h-3.5 w-3.5 text-green-600"}):l.jsx(fi,{className:"h-3.5 w-3.5"})})]})]}),l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute inset-0 flex items-center",children:l.jsx("div",{className:"w-full border-t border-border"})}),l.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:l.jsx("span",{className:"bg-background px-2 text-muted-foreground",children:"or"})})]}),l.jsx(he,{variant:"outline",className:"w-full",onClick:()=>d("password"),children:"Use email + password"})]}):l.jsxs("form",{onSubmit:F,className:"space-y-3",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx(Ue,{children:"Email"}),l.jsx(Ut,{type:"email",value:f,onChange:$=>m($.target.value),required:!0,autoFocus:!0})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx(Ue,{children:"Password"}),l.jsx(Ut,{type:"password",value:g,onChange:$=>v($.target.value),required:!0})]}),l.jsx(he,{type:"submit",disabled:x,className:"w-full",children:x?l.jsx(Nt,{className:"h-4 w-4 animate-spin"}):"Login"}),l.jsx("button",{type:"button",onClick:()=>d("promptowl"),className:"w-full text-xs text-muted-foreground hover:text-foreground",children:"← Back to PromptOwl login"})]})]})]})})}function Z2({onBack:n}){const[o,s]=h.useState([]),[a,c]=h.useState([]),[d,f]=h.useState(!0),[m,g]=h.useState(null),[v,x]=h.useState(!1),[y,S]=h.useState(""),[N,b]=h.useState(null),C=async()=>{f(!0);try{const E=await k0();s(E.teammates),c(E.pending_stewards||[]),g(null)}catch(E){g(E.message)}finally{f(!1)}};h.useEffect(()=>{C()},[]);const k=E=>{if(!E)return"Never";const T=new Date(E),A=Date.now()-T.getTime();return A<6e4?"Just now":A<36e5?`${Math.floor(A/6e4)}m ago`:A<864e5?`${Math.floor(A/36e5)}h ago`:A<6048e5?`${Math.floor(A/864e5)}d ago`:T.toLocaleDateString()};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[l.jsx(he,{variant:"ghost",size:"icon",onClick:n,children:l.jsx(Xm,{className:"h-4 w-4"})}),l.jsxs("div",{className:"flex-1",children:[l.jsx("h2",{className:"text-2xl font-semibold",children:"Teammates"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Invite teammates and manage their access keys"})]}),l.jsxs(he,{onClick:()=>x(!0),children:[l.jsx(fo,{className:"h-4 w-4 mr-2"}),"Invite Teammate"]})]}),m&&l.jsxs(cr,{variant:"destructive",className:"mb-4",children:[l.jsx(Mr,{className:"h-4 w-4"}),l.jsx(ur,{children:m})]}),l.jsxs(Je,{children:[l.jsxs(it,{children:[l.jsxs(at,{className:"text-lg flex items-center gap-2",children:[l.jsx(lh,{className:"h-4 w-4"}),"All Users"]}),l.jsx(Jt,{children:"Everyone who has access to this community server"})]}),l.jsx(et,{children:d?l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx(Nt,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):o.length===0?l.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:'No teammates yet. Click "Invite Teammate" to add one.'}):l.jsx("div",{className:"space-y-2",children:o.map(E=>l.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border",children:[l.jsx(yo,{className:"h-9 w-9",children:l.jsx(wo,{children:(E.email[0]||"?").toUpperCase()})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"font-medium truncate",children:E.name||E.email}),E.is_admin&&l.jsxs(Rn,{variant:"outline",className:"gap-1 border-blue-200 bg-blue-50 text-blue-700",children:[l.jsx(Mt,{className:"h-3 w-3"}),"Admin"]})]}),l.jsxs("div",{className:"text-xs text-muted-foreground flex items-center gap-3",children:[l.jsx("span",{children:E.email}),l.jsx("span",{children:"·"}),l.jsxs("span",{children:[E.key_count," key",E.key_count!==1?"s":""]}),l.jsx("span",{children:"·"}),l.jsxs("span",{children:["last active ",k(E.last_active)]})]})]})]},E.id))})})]}),a.length>0&&l.jsxs(Je,{className:"mt-4 border-amber-200 bg-amber-50/40",children:[l.jsxs(it,{children:[l.jsxs(at,{className:"text-lg flex items-center gap-2",children:[l.jsx(Mt,{className:"h-4 w-4 text-amber-700"}),"Stewards without server access"]}),l.jsx(Jt,{children:"These emails are assigned as stewards on one or more nests, but haven't been invited to this server yet — they can't log in or approve anything until they have an API key."})]}),l.jsx(et,{children:l.jsx("div",{className:"space-y-2",children:a.map(E=>l.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-background",children:[l.jsx(yo,{className:"h-9 w-9",children:l.jsx(wo,{className:"bg-amber-100 text-amber-800",children:(E[0]||"?").toUpperCase()})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("span",{className:"font-medium text-sm truncate",children:E}),l.jsx("div",{className:"text-xs text-muted-foreground",children:"Assigned as steward · no API key yet"})]}),l.jsxs(he,{size:"sm",onClick:()=>{S(E),x(!0)},children:[l.jsx(fo,{className:"h-3.5 w-3.5 mr-1"}),"Invite"]})]},E))})})]}),v&&l.jsx(J2,{seedEmail:y,onClose:()=>{x(!1),S("")},onCreated:(E,T)=>{x(!1),S(""),b({email:E,key:T}),C()}}),N&&l.jsx(eE,{email:N.email,apiKey:N.key,onClose:()=>b(null)})]})}function J2({seedEmail:n,onClose:o,onCreated:s}){const[a,c]=h.useState(n||""),[d,f]=h.useState(""),[m,g]=h.useState(!1),[v,x]=h.useState(null),y=async S=>{if(S.preventDefault(),!!a.trim()){g(!0),x(null);try{const N=await E0(a,d||void 0);s(a,N.api_key)}catch(N){x(N.message),g(!1)}}};return l.jsx(Ot,{open:!0,onOpenChange:o,children:l.jsxs(bt,{className:"sm:max-w-[420px]",children:[l.jsxs(jt,{children:[l.jsx(kt,{children:"Invite Teammate"}),l.jsx(tn,{children:"Create an API key for a teammate. They'll use it to authenticate from Hootie, Claude Desktop, or the CLI."})]}),l.jsxs("form",{onSubmit:y,className:"space-y-3",children:[v&&l.jsxs(cr,{variant:"destructive",children:[l.jsx(Mr,{className:"h-4 w-4"}),l.jsx(ur,{children:v})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx(Ue,{children:"Email"}),l.jsx(Ut,{type:"email",placeholder:"jane@acme.com",value:a,onChange:S=>c(S.target.value),required:!0,autoFocus:!0})]}),l.jsxs("div",{className:"space-y-1",children:[l.jsx(Ue,{children:"Key label (optional)"}),l.jsx(Ut,{placeholder:"Jane's laptop",value:d,onChange:S=>f(S.target.value)})]}),l.jsxs(en,{children:[l.jsx(he,{variant:"outline",type:"button",onClick:o,children:"Cancel"}),l.jsx(he,{type:"submit",disabled:m||!a.trim(),children:m?l.jsx(Nt,{className:"h-4 w-4 animate-spin"}):"Generate Key"})]})]})]})})}function eE({email:n,apiKey:o,onClose:s}){const[a,c]=h.useState(!1),d=async()=>{await navigator.clipboard.writeText(o),c(!0),setTimeout(()=>c(!1),1500)};return l.jsx(Ot,{open:!0,onOpenChange:s,children:l.jsxs(bt,{className:"sm:max-w-[520px]",children:[l.jsxs(jt,{children:[l.jsxs(kt,{children:["Key created for ",n]}),l.jsxs(tn,{children:["Copy this key and send it to them via Slack, email, or another secure channel. ",l.jsx("strong",{children:"It won't be shown again."})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Ue,{className:"text-xs text-muted-foreground",children:"API Key"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("code",{className:"flex-1 bg-muted px-3 py-2 rounded text-xs font-mono break-all",children:o}),l.jsx(he,{size:"sm",variant:"outline",onClick:d,children:a?l.jsx(Ar,{className:"h-3.5 w-3.5 text-green-600"}):l.jsx(fi,{className:"h-3.5 w-3.5"})})]}),l.jsx("p",{className:"text-xs text-muted-foreground pt-2",children:"They'll paste this into:"}),l.jsxs("ul",{className:"text-xs text-muted-foreground list-disc list-inside space-y-0.5",children:[l.jsx("li",{children:"Hootie → Settings → Vault → Remote Server → API Key"}),l.jsxs("li",{children:["Claude Desktop → add as"," ",l.jsx("code",{className:"text-[10px]",children:"Authorization: Bearer ..."})," ","in MCP config"]}),l.jsxs("li",{children:["CLI → ",l.jsx("code",{className:"text-[10px]",children:"--key ..."})," flag"]})]})]}),l.jsx(en,{children:l.jsx(he,{onClick:s,children:"Done"})})]})})}const tE="/assets/hootie-C2ocYkn4.svg";function nE(){var k,E,T;const[n,o]=h.useState(null),[s,a]=h.useState(!1),[c,d]=h.useState({page:"dashboard"}),[f,m]=h.useState(null),[g,v]=h.useState(null),[x,y]=h.useState(!1),S=h.useCallback(async()=>{try{const A=await j0();v(A)}catch{}},[]);h.useEffect(()=>{b0().then(A=>{o(A.auth_mode),(A.auth_mode==="open"||C0())&&a(!0)}).catch(()=>m("Cannot connect to server")),S()},[S]);const N=()=>{S0(),a(n==="open"),S()},b=()=>{y(!1),S(),n==="key"&&a(!0)};if(f)return l.jsx("div",{className:"min-h-screen flex items-center justify-center",children:l.jsxs("div",{className:"text-center",children:[l.jsx("p",{className:"text-lg font-medium text-destructive",children:f}),l.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Check that the community server is running."})]})});if(n===null)return l.jsx("div",{className:"min-h-screen flex items-center justify-center",children:l.jsx("div",{className:"animate-pulse text-muted-foreground",children:"Connecting..."})});if(!s&&n==="key")return l.jsx(V0,{onLogin:()=>a(!0)});const C=!!((k=g==null?void 0:g.me)!=null&&k.is_admin);return l.jsxs("div",{className:"min-h-screen bg-background",children:[l.jsx("header",{className:"border-b border-border bg-card",children:l.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-3 flex items-center justify-between",children:[l.jsxs("button",{onClick:()=>d({page:"dashboard"}),className:"flex items-center gap-2 hover:opacity-80",children:[l.jsx("img",{src:tE,alt:"ContextNest",className:"h-7 w-7"}),l.jsx("span",{className:"font-semibold",children:"ContextNest"}),l.jsx(Rn,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:"Community"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[n==="open"&&!C&&l.jsxs("span",{className:"hidden md:inline-flex items-center gap-1.5 text-xs text-amber-700 bg-amber-50 border border-amber-200 px-2 py-1 rounded",children:[l.jsx(qc,{className:"h-3 w-3"}),"Open mode"]}),C&&l.jsxs(l.Fragment,{children:[l.jsxs(Rn,{variant:"outline",className:"gap-1 border-blue-200 bg-blue-50 text-blue-700",children:[l.jsx(Mt,{className:"h-3 w-3"}),"Admin: ",(E=g==null?void 0:g.me)==null?void 0:E.email]}),l.jsxs(he,{variant:"ghost",size:"sm",onClick:()=>d({page:"teammates"}),children:[l.jsx(lh,{className:"h-3.5 w-3.5 mr-1"}),"Teammates"]})]}),g!=null&&g.me?l.jsx(he,{variant:"ghost",size:"sm",onClick:N,children:"Logout"}):l.jsxs(he,{variant:"outline",size:"sm",onClick:()=>y(!0),children:[l.jsx(Mt,{className:"h-3.5 w-3.5 mr-1"}),g!=null&&g.claimed?"Login":"Claim as Admin"]})]})]})}),l.jsxs("main",{className:"max-w-6xl mx-auto px-4 py-6",children:[c.page==="dashboard"&&l.jsx(QS,{onSelectNest:(A,D)=>d({page:"nest",nestId:A,nestName:D})}),c.page==="nest"&&l.jsx(Y2,{nestId:c.nestId,nestName:c.nestName,isAdmin:C,onBack:()=>d({page:"dashboard"})}),c.page==="teammates"&&l.jsx(Z2,{onBack:()=>d({page:"dashboard"})})]}),x&&l.jsx(q2,{alreadyClaimed:!!(g!=null&&g.claimed),existingAdmin:((T=g==null?void 0:g.admin)==null?void 0:T.email)||null,onClose:()=>y(!1),onLoggedIn:b})]})}y0.createRoot(document.getElementById("root")).render(l.jsx(_n.StrictMode,{children:l.jsx(nE,{})}));
|